Skip to content

Commit 61ed767

Browse files
chore: get rid of mentions of .value for references (#1443)
1 parent e77feb4 commit 61ed767

File tree

70 files changed

+302
-302
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+302
-302
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ This tells the style dictionary build system how and what to build. The default
187187
"small": { "value": "10px" },
188188
"medium": { "value": "16px" },
189189
"large": { "value": "24px" },
190-
"base": { "value": "{size.font.medium.value}" }
190+
"base": { "value": "{size.font.medium}" }
191191
}
192192
}
193193
}

__integration__/css.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ describe('integration', async () => {
3131
breakpoint: {
3232
xs: { value: '304px' },
3333
sm: { value: '768px' },
34-
md: { value: 'calc({breakpoint.xs.value} / {breakpoint.sm.value})' },
34+
md: { value: 'calc({breakpoint.xs} / {breakpoint.sm})' },
3535
},
3636
},
3737
platforms: {

__integration__/logging/platform.test.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ describe(`integration`, () => {
9191
const sd = new StyleDictionary({
9292
tokens: {
9393
color: {
94-
danger: { value: '{color.red.value}' },
94+
danger: { value: '{color.red}' },
9595
},
9696
},
9797
platforms: {
@@ -112,11 +112,11 @@ describe(`integration`, () => {
112112
const sd = new StyleDictionary({
113113
tokens: {
114114
color: {
115-
foo: { value: '{color.foo.value}' },
116-
teal: { value: '{color.blue.value}' },
117-
blue: { value: '{color.green.value}' },
118-
green: { value: '{color.teal.value}' },
119-
purple: { value: '{color.teal.value}' },
115+
foo: { value: '{color.foo}' },
116+
teal: { value: '{color.blue}' },
117+
blue: { value: '{color.green}' },
118+
green: { value: '{color.teal}' },
119+
purple: { value: '{color.teal}' },
120120
},
121121
},
122122
platforms: {

__integration__/nameCollisions.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const tokens = {
2323
color: {
2424
red: { value: '#f00' },
2525
background: {
26-
red: { value: '{color.red.value}' },
26+
red: { value: '{color.red}' },
2727
},
2828
},
2929
};

__integration__/objectValues.test.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ describe('integration', async () => {
5050
primary: {
5151
// getReferences should work on objects like this:
5252
value: {
53-
color: '{color.red.value}',
54-
width: '{size.border.value}',
53+
color: '{color.red}',
54+
width: '{size.border}',
5555
style: 'solid',
5656
},
5757
type: 'border',
@@ -61,21 +61,21 @@ describe('integration', async () => {
6161
light: {
6262
value: [
6363
{
64-
color: '{color.red.value}',
64+
color: '{color.red}',
6565
},
6666
{
67-
color: '{color.green.value}',
67+
color: '{color.green}',
6868
},
6969
],
7070
type: 'shadow',
7171
},
7272
dark: {
7373
value: [
7474
{
75-
color: '{color.green.value}',
75+
color: '{color.green}',
7676
},
7777
{
78-
color: '{color.red.value}',
78+
color: '{color.red}',
7979
},
8080
],
8181
type: 'shadow',
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"color": {
33
"background": {
4-
"primary": { "value": "{color.core.neutral.0.value}", "type": "color", "themeable": true },
5-
"secondary": { "value": "{color.core.neutral.100.value}", "type": "color" },
6-
"tertiary": { "value": "{color.core.neutral.200.value}", "type": "color" },
7-
"danger": { "value": "{color.core.red.0.value}", "type": "color" },
8-
"warning": { "value": "{color.core.orange.0.value}", "type": "color" },
9-
"success": { "value": "{color.core.green.0.value}", "type": "color" },
10-
"info": { "value": "{color.core.blue.0.value}", "type": "color" },
11-
"disabled": { "value": "{color.background.tertiary.value}", "type": "color" }
4+
"primary": { "value": "{color.core.neutral.0}", "type": "color", "themeable": true },
5+
"secondary": { "value": "{color.core.neutral.100}", "type": "color" },
6+
"tertiary": { "value": "{color.core.neutral.200}", "type": "color" },
7+
"danger": { "value": "{color.core.red.0}", "type": "color" },
8+
"warning": { "value": "{color.core.orange.0}", "type": "color" },
9+
"success": { "value": "{color.core.green.0}", "type": "color" },
10+
"info": { "value": "{color.core.blue.0}", "type": "color" },
11+
"disabled": { "value": "{color.background.tertiary}", "type": "color" }
1212
}
1313
}
1414
}

__integration__/tokens/color/border.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"color": {
33
"border": {
4-
"primary": { "value": "{color.core.neutral.300.value}", "type": "color" },
4+
"primary": { "value": "{color.core.neutral.300}", "type": "color" },
55
"secondary": {},
66
"tertiary": {}
77
}

__integration__/tokens/color/brand.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
"color": {
33
"brand": {
44
"primary": {
5-
"value": "{color.core.aqua.700.value}",
5+
"value": "{color.core.aqua.700}",
66
"type": "color"
77
},
88

99
"secondary": {
10-
"value": "{color.core.purple.700.value}",
10+
"value": "{color.core.purple.700}",
1111
"type": "color"
1212
}
1313
}
+12-12
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
{
22
"color": {
33
"font": {
4-
"primary": { "value": "{color.core.neutral.1100.value}", "type": "color" },
5-
"secondary": { "value": "{color.core.neutral.900.value}", "type": "color" },
6-
"tertiary": { "value": "{color.core.neutral.800.value}", "type": "color" },
4+
"primary": { "value": "{color.core.neutral.1100}", "type": "color" },
5+
"secondary": { "value": "{color.core.neutral.900}", "type": "color" },
6+
"tertiary": { "value": "{color.core.neutral.800}", "type": "color" },
77

88
"interactive": {
9-
"_": { "value": "{color.brand.primary.value}", "type": "color" },
10-
"hover": { "value": "{color.brand.primary.value}", "type": "color" },
11-
"active": { "value": "{color.brand.secondary.value}", "type": "color" },
12-
"disabled": { "value": "{color.font.tertiary.value}", "type": "color" }
9+
"_": { "value": "{color.brand.primary}", "type": "color" },
10+
"hover": { "value": "{color.brand.primary}", "type": "color" },
11+
"active": { "value": "{color.brand.secondary}", "type": "color" },
12+
"disabled": { "value": "{color.font.tertiary}", "type": "color" },
1313
},
1414

15-
"danger": { "value": "{color.core.red.1000.value}", "type": "color" },
16-
"warning": { "value": "{color.core.orange.1000.value}", "type": "color" },
15+
"danger": { "value": "{color.core.red.1000}", "type": "color" },
16+
"warning": { "value": "{color.core.orange.1000}", "type": "color" },
1717
// make sure references without .value work too
18-
"success": { "value": "{color.core.green.1000}", "type": "color" }
19-
}
20-
}
18+
"success": { "value": "{color.core.green.1000}", "type": "color" },
19+
},
20+
},
2121
}

__tests__/__configs/tokenCollisions.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"color": {
44
"red": { "value": "#f00" },
55
"background": {
6-
"red": { "value": "{color.red.value}" }
6+
"red": { "value": "{color.red}" }
77
}
88
}
99
},
+15-15
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
{
2-
"prop0" : { "value": 0 },
3-
"prop01" : { "value": "" },
4-
"prop1" : { "value": "test1 value" },
5-
"prop2" : { "value": "test2 value" },
6-
"prop3" : { "value": "{prop1.value}" },
7-
"prop4" : { "value": "{prop3.value}" },
8-
"prop5" : { "value": 5 },
9-
"prop6" : { "value": 6 },
10-
"prop7" : { "value": "{prop5.value}" },
11-
"prop8" : { "value": "{prop7.value}" },
12-
"prop12" : { "value": "{prop1.value}, {prop2.value} and some extra stuff" },
13-
"prop124" : { "value": "{prop1.value}, {prop2.value} and {prop4.value}" },
14-
"prop15" : { "value": "{prop1.value}, {prop5.value} and some extra stuff" },
15-
"prop156" : { "value": "{prop1.value}, {prop5.value} and {prop6.value}" },
16-
"prop1568" : { "value": "{prop1.value}, {prop5.value}, {prop6.value} and {prop8.value}" }
2+
"prop0": { "value": 0 },
3+
"prop01": { "value": "" },
4+
"prop1": { "value": "test1 value" },
5+
"prop2": { "value": "test2 value" },
6+
"prop3": { "value": "{prop1}" },
7+
"prop4": { "value": "{prop3}" },
8+
"prop5": { "value": 5 },
9+
"prop6": { "value": 6 },
10+
"prop7": { "value": "{prop5}" },
11+
"prop8": { "value": "{prop7}" },
12+
"prop12": { "value": "{prop1}, {prop2} and some extra stuff" },
13+
"prop124": { "value": "{prop1}, {prop2} and {prop4}" },
14+
"prop15": { "value": "{prop1}, {prop5} and some extra stuff" },
15+
"prop156": { "value": "{prop1}, {prop5} and {prop6}" },
16+
"prop1568": { "value": "{prop1}, {prop5}, {prop6} and {prop8}" }
1717
}

__tests__/__tokens/borders.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -2,40 +2,40 @@
22
"border": {
33
"layout": {
44
"light": {
5-
"value": "1px solid {color.border.light.value}",
5+
"value": "1px solid {color.border.light}",
66
"type": "border",
77
"comment": ""
88
},
99
"dark": {
10-
"value": "1px solid {color.border.dark.value}",
10+
"value": "1px solid {color.border.dark}",
1111
"type": "border",
1212
"comment": ""
1313
},
1414
"base": {
15-
"value": "1px solid {color.border.base.value}",
15+
"value": "1px solid {color.border.base}",
1616
"type": "border",
1717
"comment": ""
1818
}
1919
},
2020

2121
"input": {
2222
"base": {
23-
"value": "1px solid {color.border.base.value}",
23+
"value": "1px solid {color.border.base}",
2424
"type": "border",
2525
"comment": ""
2626
},
2727
"focus": {
28-
"value": "1px solid {color.border.focus.value}",
28+
"value": "1px solid {color.border.focus}",
2929
"type": "border",
3030
"comment": ""
3131
},
3232
"error": {
33-
"value": "1px solid {color.border.base.value}",
33+
"value": "1px solid {color.border.base}",
3434
"type": "border",
3535
"comment": ""
3636
},
3737
"button": {
38-
"value": "1px solid {color.font.link.value}",
38+
"value": "1px solid {color.font.link}",
3939
"type": "border",
4040
"comment": ""
4141
}

__tests__/__tokens/colors.json

+8-8
Original file line numberDiff line numberDiff line change
@@ -77,27 +77,27 @@
7777
},
7878

7979
"border": {
80-
"light": { "value": "{color.base.squidink.10.value}", "type": "color" },
81-
"base": { "value": "{color.base.squidink.20.value}", "type": "color" },
82-
"dark": { "value": "{color.base.squidink.40.value}", "type": "color" },
83-
"focus": { "value": "{color.base.orange.100.value}", "type": "color" }
80+
"light": { "value": "{color.base.squidink.10}", "type": "color" },
81+
"base": { "value": "{color.base.squidink.20}", "type": "color" },
82+
"dark": { "value": "{color.base.squidink.40}", "type": "color" },
83+
"focus": { "value": "{color.base.orange.100}", "type": "color" }
8484
},
8585

8686
"font": {
87-
"link": { "value": "{color.base.blue.100.value}", "type": "color" }
87+
"link": { "value": "{color.base.blue.100}", "type": "color" }
8888
},
8989

9090
"button": {
91-
"base": { "value": "{color.base.blue.100.value}", "type": "color" },
91+
"base": { "value": "{color.base.blue.100}", "type": "color" },
9292
"active": {
93-
"value": "{color.button.base.value}",
93+
"value": "{color.button.base}",
9494
"type": "color",
9595
"transformColor": {
9696
"darken": 0.5
9797
}
9898
},
9999
"hover": {
100-
"value": "{color.button.active.value}",
100+
"value": "{color.button.active}",
101101
"type": "color",
102102
"transformColor": {
103103
"darken": 0.2

__tests__/__tokens/font_sizes.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"type": "fontSize"
3131
},
3232
"base": {
33-
"value": "{size.font.medium.value}",
33+
"value": "{size.font.medium}",
3434
"type": "fontSize"
3535
}
3636
}

__tests__/__tokens/nonString.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"type": "color"
1111
},
1212
"otherRed": {
13-
"value": "{color.red.value}",
13+
"value": "{color.red}",
1414
"type": "color"
1515
}
1616
},
@@ -21,19 +21,19 @@
2121
"type": "dimension"
2222
},
2323
"otherLarge": {
24-
"value": "{size.large.value}",
24+
"value": "{size.large}",
2525
"type": "dimension"
2626
}
2727
},
2828

2929
"number": {
3030
"test": { "value": 20, "type": "number" },
31-
"otherTest": { "value": "{number.test.value}", "type": "number" }
31+
"otherTest": { "value": "{number.test}", "type": "number" }
3232
},
3333

3434
"array": {
3535
"test": { "value": ["foo", "bar"] },
36-
"otherTest": { "value": "{array.test.value}" }
36+
"otherTest": { "value": "{array.test}" }
3737
},
3838

3939
"object": {
@@ -45,6 +45,6 @@
4545
}
4646
}
4747
},
48-
"otherTest": { "value": "{object.test.value}" }
48+
"otherTest": { "value": "{object.test}" }
4949
}
5050
}

0 commit comments

Comments
 (0)