Skip to content

Commit

Permalink
V 3/beta color changes (#1318)
Browse files Browse the repository at this point in the history
  • Loading branch information
svenvoskamp authored Sep 7, 2023
1 parent 2bf7e57 commit 570c61d
Show file tree
Hide file tree
Showing 38 changed files with 199 additions and 140 deletions.
15 changes: 13 additions & 2 deletions apps/gallery/stories/composites/wui-icon-box.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ import '@web3modal/ui/src/composites/wui-icon-box'
import type { WuiIconBox } from '@web3modal/ui/src/composites/wui-icon-box'
import { html } from 'lit'

import { backgroundOptions, colorOptions, iconOptions } from '../../utils/PresetUtils'
import {
backgroundOptions,
colorOptions,
iconBoxBorderOptions,
iconOptions
} from '../../utils/PresetUtils'

type Component = Meta<WuiIconBox>

Expand All @@ -15,7 +20,8 @@ export default {
iconColor: 'accent-100',
icon: 'copy',
background: 'transparent',
border: false
border: false,
borderColor: undefined
},

argTypes: {
Expand All @@ -42,6 +48,10 @@ export default {
},
border: {
control: { type: 'boolean' }
},
borderColor: {
options: iconBoxBorderOptions,
control: { type: 'select' }
}
}
} as Component
Expand All @@ -55,5 +65,6 @@ export const Default: Component = {
icon=${args.icon}
background=${args.background}
?border=${args.border}
.borderColor=${args.borderColor}
></wui-icon-box>`
}
6 changes: 6 additions & 0 deletions apps/gallery/utils/PresetUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import type {
FlexWrapType,
GridContentType,
GridItemsType,
IconBoxBorderType,
IconType,
LogoType,
PlacementType,
Expand Down Expand Up @@ -259,4 +260,9 @@ export const accountEntryOptions: AccountEntryType[] = ['icon', 'image']

export const themeOptions: ThemeType[] = ['dark', 'light']

export const iconBoxBorderOptions: IconBoxBorderType[] = [
'wui-color-bg-125',
'wui-overlay-accent-010'
]

export const tagLabelOptions = ['get wallet', 'installed', 'qr code', 'recent']
2 changes: 1 addition & 1 deletion packages/scaffold/src/partials/w3m-legal-footer/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { css } from 'lit'

export default css`
wui-flex {
background-color: var(--wui-overlay-005);
background-color: var(--wui-gray-glass-005);
}
a {
Expand Down
1 change: 1 addition & 0 deletions packages/scaffold/src/utils/w3m-connecting-widget/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ export class W3mConnectingWidget extends LitElement {
icon="close"
size="sm"
border
borderColor="wui-color-bg-125"
></wui-icon-box>
</wui-flex>
Expand Down
2 changes: 2 additions & 0 deletions packages/scaffold/src/views/w3m-all-wallets-view/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ export class W3mAllWalletsView extends LitElement {
backgroundcolor="accent-100"
icon="qrCode"
background="transparent"
border
borderColor="wui-overlay-accent-010"
@click=${this.onWalletConnectQr.bind(this)}
></wui-icon-box>
`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export class W3mNetworkSwitchView extends LitElement {
icon="close"
size="sm"
?border=${true}
borderColor="wui-color-bg-125"
></wui-icon-box>
</wui-flex>
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/components/wui-card/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default css`
:host {
display: block;
border-radius: clamp(0px, var(--wui-border-radius-l), 44px);
border: 1px solid var(--wui-overlay-005);
border: 1px solid var(--wui-gray-glass-005);
background-color: var(--wui-color-bg-125);
overflow: hidden;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/components/wui-shimmer/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { css } from 'lit'
export default css`
:host {
display: block;
outline: 1px solid var(--wui-overlay-005);
outline: 1px solid var(--wui-gray-glass-005);
background: linear-gradient(
90deg,
var(--wui-color-bg-200) 5%,
Expand Down
18 changes: 9 additions & 9 deletions packages/ui/src/composites/wui-account-button/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,24 @@ export default css`
button {
border-radius: var(--wui-border-radius-3xl);
background: var(--wui-overlay-002);
background: var(--wui-gray-glass-002);
display: flex;
gap: var(--wui-spacing-xs);
padding: var(--wui-spacing-3xs) var(--wui-spacing-xs) var(--wui-spacing-3xs)
var(--wui-spacing-xs);
border: 1px solid var(--wui-overlay-005);
border: 1px solid var(--wui-gray-glass-005);
}
button:disabled {
background: var(--wui-overlay-015);
background: var(--wui-gray-glass-015);
}
button:disabled > wui-text {
color: var(--wui-overlay-015);
color: var(--wui-gray-glass-015);
}
button:disabled > wui-flex > wui-text {
color: var(--wui-overlay-015);
color: var(--wui-gray-glass-015);
}
button:disabled > wui-image,
Expand Down Expand Up @@ -52,13 +52,13 @@ export default css`
border-radius: var(--wui-border-radius-3xl);
width: 24px;
height: 24px;
outline: 2px solid var(--wui-overlay-005);
outline: 2px solid var(--wui-gray-glass-005);
}
wui-flex {
border-radius: var(--wui-border-radius-3xl);
border: 1px solid var(--wui-overlay-005);
background: var(--wui-overlay-005);
border: 1px solid var(--wui-gray-glass-005);
background: var(--wui-gray-glass-005);
padding: 4px var(--wui-spacing-m) 4px var(--wui-spacing-xxs);
}
Expand All @@ -71,7 +71,7 @@ export default css`
wui-avatar {
width: 20px;
height: 20px;
outline: 2px solid var(--wui-overlay-010);
outline: 2px solid var(--wui-gray-glass-010);
}
@media (hover: hover) and (pointer: fine) {
Expand Down
4 changes: 2 additions & 2 deletions packages/ui/src/composites/wui-all-wallets-image/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default css`
width: 40px;
height: 40px;
overflow: hidden;
background: var(--wui-overlay-002);
background: var(--wui-gray-glass-002);
display: flex;
justify-content: center;
align-items: center;
Expand All @@ -24,7 +24,7 @@ export default css`
left: 0;
right: 0;
border-radius: inherit;
border: 1px solid var(--wui-overlay-010);
border: 1px solid var(--wui-gray-glass-010);
pointer-events: none;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/composites/wui-avatar/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default css`
display: block;
width: 64px;
height: 64px;
outline: 8px solid var(--wui-overlay-005);
outline: 8px solid var(--wui-gray-glass-005);
border-radius: var(--wui-border-radius-3xl);
overflow: hidden;
position: relative;
Expand Down
4 changes: 2 additions & 2 deletions packages/ui/src/composites/wui-button/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ export default css`
}
button {
border: 1px solid var(--wui-overlay-010);
border: 1px solid var(--wui-gray-glass-010);
border-radius: var(--wui-border-radius-m);
}
button:disabled {
border: 1px solid var(--wui-overlay-010);
border: 1px solid var(--wui-gray-glass-010);
}
button[data-size='sm'] {
Expand Down
4 changes: 2 additions & 2 deletions packages/ui/src/composites/wui-card-select-loader/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default css`
width: 76px;
row-gap: var(--wui-spacing-xs);
padding: var(--wui-spacing-xs) 10px;
background-color: var(--wui-overlay-002);
background-color: var(--wui-gray-glass-002);
border-radius: clamp(0px, var(--wui-border-radius-xs), 20px);
position: relative;
}
Expand All @@ -27,7 +27,7 @@ export default css`
}
svg > path {
stroke: var(--wui-overlay-010);
stroke: var(--wui-gray-glass-010);
stroke-width: 1px;
}
`
10 changes: 5 additions & 5 deletions packages/ui/src/composites/wui-card-select/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default css`
width: 76px;
row-gap: var(--wui-spacing-xs);
padding: var(--wui-spacing-xs) var(--wui-spacing-0);
background-color: var(--wui-overlay-002);
background-color: var(--wui-gray-glass-002);
border-radius: clamp(0px, var(--wui-border-radius-xs), 20px);
}
Expand All @@ -20,20 +20,20 @@ export default css`
}
button:disabled > wui-text {
color: var(--wui-overlay-015);
color: var(--wui-gray-glass-015);
}
[data-selected='true'] {
background-color: var(--wui-color-accent-020);
background-color: var(--wui-accent-glass-020);
}
@media (hover: hover) and (pointer: fine) {
[data-selected='true']:hover:enabled {
background-color: var(--wui-color-accent-015);
background-color: var(--wui-accent-glass-015);
}
}
[data-selected='true']:active:enabled {
background-color: var(--wui-color-accent-010);
background-color: var(--wui-accent-glass-010);
}
`
22 changes: 11 additions & 11 deletions packages/ui/src/composites/wui-chip/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { css } from 'lit'

export default css`
a {
border: 1px solid var(--wui-overlay-010);
border: 1px solid var(--wui-gray-glass-010);
border-radius: var(--wui-border-radius-3xl);
}
Expand All @@ -23,7 +23,7 @@ export default css`
a[data-variant='shade'] {
background-color: transparent;
background-color: var(--wui-overlay-010);
background-color: var(--wui-gray-glass-010);
color: var(--wui-color-fg-200);
}
Expand Down Expand Up @@ -61,7 +61,7 @@ export default css`
}
a[data-variant='shade'] > wui-image {
border: 1px solid var(--wui-overlay-010);
border: 1px solid var(--wui-gray-glass-010);
}
a[data-variant='fill'] > wui-icon,
Expand All @@ -85,16 +85,16 @@ export default css`
}
a[data-variant='shade']:focus-visible {
background-color: var(--wui-overlay-015);
background-color: var(--wui-gray-glass-015);
}
a[data-variant='transparent']:focus-visible {
background-color: var(--wui-overlay-005);
background-color: var(--wui-gray-glass-005);
}
a.disabled {
color: var(--wui-overlay-015);
background-color: var(--wui-overlay-015);
color: var(--wui-gray-glass-015);
background-color: var(--wui-gray-glass-015);
pointer-events: none;
}
Expand All @@ -104,11 +104,11 @@ export default css`
}
a[data-variant='shade']:hover {
background-color: var(--wui-overlay-015);
background-color: var(--wui-gray-glass-015);
}
a[data-variant='transparent']:hover {
background-color: var(--wui-overlay-005);
background-color: var(--wui-gray-glass-005);
}
}
Expand All @@ -117,10 +117,10 @@ export default css`
}
a[data-variant='shade']:active {
background-color: var(--wui-overlay-020);
background-color: var(--wui-gray-glass-020);
}
a[data-variant='transparent']:active {
background-color: var(--wui-overlay-010);
background-color: var(--wui-gray-glass-010);
}
`
14 changes: 7 additions & 7 deletions packages/ui/src/composites/wui-connect-button/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,24 @@ export default css`
button {
background: var(--wui-color-accent-100);
border: 1px solid var(--wui-overlay-010);
border: 1px solid var(--wui-gray-glass-010);
border-radius: var(--wui-border-radius-m);
gap: var(--wui-spacing-xs);
}
button.loading {
background: var(--wui-overlay-010);
border: 1px solid var(--wui-overlay-010);
background: var(--wui-gray-glass-010);
border: 1px solid var(--wui-gray-glass-010);
pointer-events: none;
}
button:disabled {
background-color: var(--wui-overlay-015);
border: 1px solid var(--wui-overlay-010);
background-color: var(--wui-gray-glass-015);
border: 1px solid var(--wui-gray-glass-010);
}
button:disabled > wui-text {
color: var(--wui-overlay-015);
color: var(--wui-gray-glass-015);
}
@media (hover: hover) and (pointer: fine) {
Expand All @@ -39,7 +39,7 @@ export default css`
}
button:focus-visible {
border: 1px solid var(--wui-overlay-010);
border: 1px solid var(--wui-gray-glass-010);
background-color: var(--wui-color-accent-090);
-webkit-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);
-moz-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);
Expand Down
Loading

3 comments on commit 570c61d

@vercel
Copy link

@vercel vercel bot commented on 570c61d Sep 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 570c61d Sep 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 570c61d Sep 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.