Skip to content

Commit 4f23f2a

Browse files
chore: update s2 tokens (#7371)
* chore: update s2 tokens * correct theme * fix lint * Upgrade all deps --------- Co-authored-by: Devon Govett <[email protected]>
1 parent 262cc75 commit 4f23f2a

File tree

5 files changed

+15
-20
lines changed

5 files changed

+15
-20
lines changed

packages/@react-spectrum/s2/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@
120120
"postpack": "git checkout -- package.json"
121121
},
122122
"devDependencies": {
123-
"@adobe/spectrum-tokens": "^13.0.0-beta.48",
123+
"@adobe/spectrum-tokens": "^13.0.0-beta.53",
124124
"@parcel/macros": "2.12.1-canary.3165",
125125
"@react-aria/test-utils": "1.0.0-alpha.1"
126126
},

packages/@react-spectrum/s2/src/Meter.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import {createContext, forwardRef, ReactNode} from 'react';
2020
import {DOMRef, DOMRefValue, LabelPosition} from '@react-types/shared';
2121
import {FieldLabel} from './Field';
2222
import {fieldLabel, getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};
23-
import {size, style} from '../style' with {type: 'macro'};
23+
import {lightDark, size, style} from '../style' with {type: 'macro'};
2424
import {SkeletonWrapper} from './Skeleton';
2525
import {Text} from './Content';
2626
import {useDOMRef} from '@react-spectrum/utils';
@@ -37,8 +37,8 @@ interface MeterStyleProps {
3737
* @default 'M'
3838
*/
3939
size?: 'S' | 'M' | 'L' | 'XL',
40-
/**
41-
* The static color style to apply. Useful when the button appears over a color background.
40+
/**
41+
* The static color style to apply. Useful when the button appears over a color background.
4242
*/
4343
staticColor?: 'white' | 'black',
4444
/**
@@ -82,11 +82,11 @@ const fillStyles = style<MeterStyleProps>({
8282
borderStyle: 'none',
8383
borderRadius: 'full',
8484
backgroundColor: {
85-
default: 'informative-visual',
85+
default: lightDark('informative-800', 'informative-900'), // 'informative-visual',
8686
variant: {
87-
positive: 'positive-visual',
88-
notice: 'notice-visual',
89-
negative: 'negative-visual'
87+
positive: lightDark('positive-800', 'positive-900'), // 'positive-visual',
88+
notice: lightDark('notice-800', 'notice-900'), // 'notice-visual',
89+
negative: lightDark('negative-800', 'negative-900') // 'negative-visual'
9090
},
9191
staticColor: {
9292
white: {

packages/@react-spectrum/s2/style/spectrum-theme.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,6 @@ export const style = createTheme({
451451
isPressed: colorToken('neutral-subdued-content-color-down')
452452
// isSelected: colorToken('neutral-subdued-content-color-selected'),
453453
},
454-
'neutral-visual': weirdColorToken('neutral-visual-color'),
455454
negative: {
456455
default: colorToken('negative-content-color-default'),
457456
isHovered: colorToken('negative-content-color-hover'),
@@ -496,26 +495,22 @@ export const style = createTheme({
496495
isFocusVisible: weirdColorToken('negative-background-color-key-focus'),
497496
isPressed: weirdColorToken('negative-background-color-down')
498497
},
499-
'negative-visual': weirdColorToken('negative-visual-color'),
500498
'negative-subtle': weirdColorToken('negative-subtle-background-color-default'),
501499
informative: {
502500
default: weirdColorToken('informative-background-color-default'),
503501
isHovered: weirdColorToken('informative-background-color-hover'),
504502
isFocusVisible: weirdColorToken('informative-background-color-key-focus'),
505503
isPressed: weirdColorToken('informative-background-color-down')
506504
},
507-
'informative-visual': weirdColorToken('informative-visual-color'),
508505
'informative-subtle': weirdColorToken('informative-subtle-background-color-default'),
509506
positive: {
510507
default: weirdColorToken('positive-background-color-default'),
511508
isHovered: weirdColorToken('positive-background-color-hover'),
512509
isFocusVisible: weirdColorToken('positive-background-color-key-focus'),
513510
isPressed: weirdColorToken('positive-background-color-down')
514511
},
515-
'positive-visual': weirdColorToken('positive-visual-color'),
516512
'positive-subtle': weirdColorToken('positive-subtle-background-color-default'),
517513
notice: weirdColorToken('notice-background-color-default'),
518-
'notice-visual': weirdColorToken('notice-visual-color'),
519514
'notice-subtle': weirdColorToken('notice-subtle-background-color-default'),
520515
gray: weirdColorToken('gray-background-color-default'),
521516
'gray-subtle': weirdColorToken('gray-subtle-background-color-default'),

packages/dev/parcel-transformer-s2-icon/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"parcel": "^2.0.0"
77
},
88
"dependencies": {
9-
"@adobe/spectrum-tokens": "^13.0.0-beta.48",
9+
"@adobe/spectrum-tokens": "^13.0.0-beta.53",
1010
"@parcel/plugin": "^2.0.0",
1111
"@svgr/core": "^6.2.0",
1212
"@svgr/plugin-jsx": "^6.2.0",

yarn.lock

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,10 @@ __metadata:
145145
languageName: unknown
146146
linkType: soft
147147

148-
"@adobe/spectrum-tokens@npm:^13.0.0-beta.48":
149-
version: 13.0.0-beta.49
150-
resolution: "@adobe/spectrum-tokens@npm:13.0.0-beta.49"
151-
checksum: 10c0/91dad202f31901a6e014a019964c1d917ef073f98debd2f04573c371109dd491ba0a942c68843358f2b3f10281737173b89daed23328f233e290e12b7faa1d49
148+
"@adobe/spectrum-tokens@npm:^13.0.0-beta.53":
149+
version: 13.0.0-beta.53
150+
resolution: "@adobe/spectrum-tokens@npm:13.0.0-beta.53"
151+
checksum: 10c0/e9968e211aec06cb6af1fbc29712cafa79f0b971b4c22882c6a65f14ea8fb23afe2c81f8bbfd377bbde4332cb1dbdc873e6a32a2cc6e3933592eb5724a6ce471
152152
languageName: node
153153
linkType: hard
154154

@@ -7534,7 +7534,7 @@ __metadata:
75347534
version: 0.0.0-use.local
75357535
resolution: "@react-spectrum/parcel-transformer-s2-icon@workspace:packages/dev/parcel-transformer-s2-icon"
75367536
dependencies:
7537-
"@adobe/spectrum-tokens": "npm:^13.0.0-beta.48"
7537+
"@adobe/spectrum-tokens": "npm:^13.0.0-beta.53"
75387538
"@parcel/plugin": "npm:^2.0.0"
75397539
"@svgr/core": "npm:^6.2.0"
75407540
"@svgr/plugin-jsx": "npm:^6.2.0"
@@ -7651,7 +7651,7 @@ __metadata:
76517651
version: 0.0.0-use.local
76527652
resolution: "@react-spectrum/s2@workspace:packages/@react-spectrum/s2"
76537653
dependencies:
7654-
"@adobe/spectrum-tokens": "npm:^13.0.0-beta.48"
7654+
"@adobe/spectrum-tokens": "npm:^13.0.0-beta.53"
76557655
"@parcel/macros": "npm:2.12.1-canary.3165"
76567656
"@react-aria/collections": "npm:3.0.0-alpha.5"
76577657
"@react-aria/i18n": "npm:^3.12.3"

0 commit comments

Comments
 (0)