@digdir/designsystemet 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/options.d.ts.map +1 -1
- package/dist/src/colors/colorMetadata.d.ts.map +1 -1
- package/dist/src/colors/colorMetadata.js +79 -31
- package/dist/src/colors/theme.d.ts.map +1 -1
- package/dist/src/colors/theme.js +7 -1
- package/dist/src/colors/types.d.ts +4 -1
- package/dist/src/colors/types.d.ts.map +1 -1
- package/dist/src/colors/utils.d.ts.map +1 -1
- package/dist/src/migrations/beta-to-v1.d.ts.map +1 -1
- package/dist/src/migrations/codemods/css/run.d.ts.map +1 -1
- package/dist/src/migrations/codemods/jsx/run.d.ts.map +1 -1
- package/dist/src/migrations/color-rename-next49.d.ts.map +1 -1
- package/dist/src/migrations/react-beta-to-v1.d.ts.map +1 -1
- package/dist/src/tokens/build/configs.d.ts +5 -0
- package/dist/src/tokens/build/configs.d.ts.map +1 -1
- package/dist/src/tokens/build/configs.js +18 -6
- package/dist/src/tokens/build/formats/css.d.ts.map +1 -1
- package/dist/src/tokens/build/formats/css.js +5 -4
- package/dist/src/tokens/build/types.d.ts +3 -0
- package/dist/src/tokens/build/types.d.ts.map +1 -1
- package/dist/src/tokens/build/utils/getMultidimensionalThemes.d.ts.map +1 -1
- package/dist/src/tokens/build.d.ts.map +1 -1
- package/dist/src/tokens/build.js +35 -9
- package/dist/src/tokens/create.d.ts.map +1 -1
- package/dist/src/tokens/utils.d.ts +1 -0
- package/dist/src/tokens/utils.d.ts.map +1 -1
- package/dist/src/tokens/utils.js +4 -0
- package/dist/src/tokens/write.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/src/tokens/build/builtin-colors.css +0 -87
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../bin/options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAE5F,QAAA,MAAM,yBAAyB,
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../bin/options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAE5F,QAAA,MAAM,yBAAyB,GAC5B,GAAG,SAAS,iBAAiB,EAAE,MAC/B,IAAI,SAAS,OAAO,EAAE,EAAE,IAAI,SAAS,YAAY,EAAE,CAAC,SAAS,MAAM,IAAI,EACtE,SAAS,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,EAC5B,QAAQ,CAAC,wBAMV,CAAC;AAEJ,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAExE;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,GAjB9B,IAAI,SAAS,OAAO,EAAE,EAAE,IAAI,SAAS,YAAY,EAAE,CAAC,SAAS,MAAM,IAAI,WAC7D,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,UACpB,CAAC,wBAeuD,CAAC;AAErE;;;GAGG;AACH,eAAO,MAAM,mBAAmB,GAvB7B,IAAI,SAAS,OAAO,EAAE,EAAE,IAAI,SAAS,YAAY,EAAE,CAAC,SAAS,MAAM,IAAI,WAC7D,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,UACpB,CAAC,wBAqB0D,CAAC;AAExE;;;GAGG;AACH,eAAO,MAAM,YAAY,GA7BtB,IAAI,SAAS,OAAO,EAAE,EAAE,IAAI,SAAS,YAAY,EAAE,CAAC,SAAS,MAAM,IAAI,WAC7D,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,UACpB,CAAC,wBA2B0D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"colorMetadata.d.ts","sourceRoot":"","sources":["../../../src/colors/colorMetadata.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,WAAW,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE3F,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,YAAY,EAAE,QAAQ,CAMrD,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"colorMetadata.d.ts","sourceRoot":"","sources":["../../../src/colors/colorMetadata.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,WAAW,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE3F,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,YAAY,EAAE,QAAQ,CAMrD,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,mBAiP3B,CAAC;AAIF,eAAO,MAAM,wBAAwB,GAAI,QAAQ,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uCAE3D,CAAC"}
|
|
@@ -12,10 +12,13 @@ const colorMetadata = {
|
|
|
12
12
|
name: "background-default",
|
|
13
13
|
group: "background",
|
|
14
14
|
displayName: "Background Default",
|
|
15
|
-
description:
|
|
15
|
+
description: {
|
|
16
|
+
long: "Background Default er den mest n\xF8ytrale bakgrunnsfargen.",
|
|
17
|
+
short: "Standard bakgrunnsfarge."
|
|
18
|
+
},
|
|
16
19
|
luminance: {
|
|
17
20
|
light: 1,
|
|
18
|
-
dark:
|
|
21
|
+
dark: 9e-3,
|
|
19
22
|
contrast: 1e-3
|
|
20
23
|
}
|
|
21
24
|
},
|
|
@@ -24,10 +27,13 @@ const colorMetadata = {
|
|
|
24
27
|
name: "background-tinted",
|
|
25
28
|
group: "background",
|
|
26
29
|
displayName: "Background Tinted",
|
|
27
|
-
description:
|
|
30
|
+
description: {
|
|
31
|
+
long: "Background Tinted er en bakgrunnsfarge som har et hint av farge i seg.",
|
|
32
|
+
short: "Bakgrunn med et hint av farge i seg."
|
|
33
|
+
},
|
|
28
34
|
luminance: {
|
|
29
35
|
light: 0.9,
|
|
30
|
-
dark: 0.
|
|
36
|
+
dark: 0.014,
|
|
31
37
|
contrast: 65e-4
|
|
32
38
|
}
|
|
33
39
|
},
|
|
@@ -36,10 +42,13 @@ const colorMetadata = {
|
|
|
36
42
|
name: "surface-default",
|
|
37
43
|
group: "surface",
|
|
38
44
|
displayName: "Surface Default",
|
|
39
|
-
description:
|
|
45
|
+
description: {
|
|
46
|
+
long: "Surface Default brukes p\xE5 flater som ligger opp\xE5 bakgrunnsfargene. Dette er den mest n\xF8ytrale surface fargen.",
|
|
47
|
+
short: "Standardfarge for overflater / komponenter."
|
|
48
|
+
},
|
|
40
49
|
luminance: {
|
|
41
50
|
light: 1,
|
|
42
|
-
dark: 0.
|
|
51
|
+
dark: 0.021,
|
|
43
52
|
contrast: 0.015
|
|
44
53
|
}
|
|
45
54
|
},
|
|
@@ -48,10 +57,13 @@ const colorMetadata = {
|
|
|
48
57
|
name: "surface-tinted",
|
|
49
58
|
group: "surface",
|
|
50
59
|
displayName: "Surface Tinted",
|
|
51
|
-
description:
|
|
60
|
+
description: {
|
|
61
|
+
long: "Surface Tinted brukes p\xE5 flater som ligger opp\xE5 bakgrunnsfargene. Denne har et hint av farge i seg.",
|
|
62
|
+
short: "Overflater / komponenter med et hint av farge i seg."
|
|
63
|
+
},
|
|
52
64
|
luminance: {
|
|
53
65
|
light: 0.81,
|
|
54
|
-
dark: 0.
|
|
66
|
+
dark: 0.027,
|
|
55
67
|
contrast: 0.015
|
|
56
68
|
}
|
|
57
69
|
},
|
|
@@ -60,10 +72,13 @@ const colorMetadata = {
|
|
|
60
72
|
name: "surface-hover",
|
|
61
73
|
group: "surface",
|
|
62
74
|
displayName: "Surface Hover",
|
|
63
|
-
description:
|
|
75
|
+
description: {
|
|
76
|
+
long: "Surface Hover brukes p\xE5 interaktive flater som ligger opp\xE5 bakgrunnsfargene i en hover state.",
|
|
77
|
+
short: "Hover-farge til overflater / komponenter."
|
|
78
|
+
},
|
|
64
79
|
luminance: {
|
|
65
80
|
light: 0.7,
|
|
66
|
-
dark: 0.
|
|
81
|
+
dark: 0.036,
|
|
67
82
|
contrast: 0.028
|
|
68
83
|
}
|
|
69
84
|
},
|
|
@@ -72,10 +87,13 @@ const colorMetadata = {
|
|
|
72
87
|
name: "surface-active",
|
|
73
88
|
group: "surface",
|
|
74
89
|
displayName: "Surface Active",
|
|
75
|
-
description:
|
|
90
|
+
description: {
|
|
91
|
+
long: "Surface Active brukes p\xE5 interaktive flater som ligger opp\xE5 bakgrunnsfargene i en active state.",
|
|
92
|
+
short: "Active-farge til overflater / komponenter."
|
|
93
|
+
},
|
|
76
94
|
luminance: {
|
|
77
|
-
light: 0.
|
|
78
|
-
dark: 0.
|
|
95
|
+
light: 0.59,
|
|
96
|
+
dark: 0.056,
|
|
79
97
|
contrast: 0.045
|
|
80
98
|
}
|
|
81
99
|
},
|
|
@@ -84,10 +102,13 @@ const colorMetadata = {
|
|
|
84
102
|
name: "border-subtle",
|
|
85
103
|
group: "border",
|
|
86
104
|
displayName: "Border Subtle",
|
|
87
|
-
description:
|
|
105
|
+
description: {
|
|
106
|
+
long: "Border Subtle er den lyseste border-fargen og brukes for \xE5 skille elementer fra hverandre.",
|
|
107
|
+
short: "Border-farge med lav kontrast til dekorativ bruk (skillelinjer)."
|
|
108
|
+
},
|
|
88
109
|
luminance: {
|
|
89
110
|
light: 0.5,
|
|
90
|
-
dark: 0.
|
|
111
|
+
dark: 0.08,
|
|
91
112
|
contrast: 0.26
|
|
92
113
|
}
|
|
93
114
|
},
|
|
@@ -96,10 +117,13 @@ const colorMetadata = {
|
|
|
96
117
|
name: "border-default",
|
|
97
118
|
group: "border",
|
|
98
119
|
displayName: "Border Default",
|
|
99
|
-
description:
|
|
120
|
+
description: {
|
|
121
|
+
long: "Border Default er en border-farge som brukes n\xE5r man \xF8nsker god kontrast mot bakgrunnsfargene.",
|
|
122
|
+
short: "Standard border-farge til skjemakomponenter og meningsb\xE6rende elementer."
|
|
123
|
+
},
|
|
100
124
|
luminance: {
|
|
101
|
-
light: 0.
|
|
102
|
-
dark: 0.
|
|
125
|
+
light: 0.19,
|
|
126
|
+
dark: 0.22,
|
|
103
127
|
contrast: 0.4
|
|
104
128
|
}
|
|
105
129
|
},
|
|
@@ -108,10 +132,13 @@ const colorMetadata = {
|
|
|
108
132
|
name: "border-strong",
|
|
109
133
|
group: "border",
|
|
110
134
|
displayName: "Border Strong",
|
|
111
|
-
description:
|
|
135
|
+
description: {
|
|
136
|
+
long: "Border Strong er den m\xF8rkeste border-fargen og brukes n\xE5r man \xF8nsker en veldig tydelig og sterk border.",
|
|
137
|
+
short: "Border-farge med h\xF8y kontrast for ekstra synlighet."
|
|
138
|
+
},
|
|
112
139
|
luminance: {
|
|
113
|
-
light: 0.
|
|
114
|
-
dark: 0.
|
|
140
|
+
light: 0.11,
|
|
141
|
+
dark: 0.39,
|
|
115
142
|
contrast: 0.6
|
|
116
143
|
}
|
|
117
144
|
},
|
|
@@ -120,10 +147,13 @@ const colorMetadata = {
|
|
|
120
147
|
name: "text-subtle",
|
|
121
148
|
group: "text",
|
|
122
149
|
displayName: "Text Subtle",
|
|
123
|
-
description:
|
|
150
|
+
description: {
|
|
151
|
+
long: "Text Subtle er den lyseste tekstfargen og brukes p\xE5 tekst som skal v\xE6re litt mindre synlig eller for \xE5 skape variasjon i typografien.",
|
|
152
|
+
short: "Tekst- og ikonfarge med lavere kontrast."
|
|
153
|
+
},
|
|
124
154
|
luminance: {
|
|
125
|
-
light: 0.
|
|
126
|
-
dark: 0.
|
|
155
|
+
light: 0.11,
|
|
156
|
+
dark: 0.39,
|
|
127
157
|
contrast: 0.57
|
|
128
158
|
}
|
|
129
159
|
},
|
|
@@ -132,10 +162,13 @@ const colorMetadata = {
|
|
|
132
162
|
name: "text-default",
|
|
133
163
|
group: "text",
|
|
134
164
|
displayName: "Text Default",
|
|
135
|
-
description:
|
|
165
|
+
description: {
|
|
166
|
+
long: "Text Default er den m\xF8rkeste tekstfargen og brukes p\xE5 tekst som skal v\xE6re mest synlig. Denne fargen b\xF8r brukes p\xE5 mesteparten av teksten p\xE5 en side.",
|
|
167
|
+
short: "Tekst- og ikonfarge med h\xF8y kontrast og god synlighet."
|
|
168
|
+
},
|
|
136
169
|
luminance: {
|
|
137
170
|
light: 0.0245,
|
|
138
|
-
dark: 0.
|
|
171
|
+
dark: 0.84,
|
|
139
172
|
contrast: 0.86
|
|
140
173
|
}
|
|
141
174
|
},
|
|
@@ -144,7 +177,10 @@ const colorMetadata = {
|
|
|
144
177
|
name: "base-default",
|
|
145
178
|
group: "base",
|
|
146
179
|
displayName: "Base Default",
|
|
147
|
-
description:
|
|
180
|
+
description: {
|
|
181
|
+
long: "Base Default fargen f\xE5r den samme hex koden som fargen som er valgt i verkt\xF8yet. Brukes ofte som farge p\xE5 viktige elementer og p\xE5 flater som skal fange brukerens oppmerksomhet.",
|
|
182
|
+
short: "Standardfarge for solide bakgrunner."
|
|
183
|
+
},
|
|
148
184
|
luminance: {
|
|
149
185
|
light: 1,
|
|
150
186
|
dark: 1,
|
|
@@ -156,7 +192,10 @@ const colorMetadata = {
|
|
|
156
192
|
name: "base-hover",
|
|
157
193
|
group: "base",
|
|
158
194
|
displayName: "Base Hover",
|
|
159
|
-
description:
|
|
195
|
+
description: {
|
|
196
|
+
long: "Base Hover brukes som hover farge p\xE5 elementer som bruker Base Default fargen.",
|
|
197
|
+
short: "Hover-farge for solide bakgrunner."
|
|
198
|
+
},
|
|
160
199
|
luminance: {
|
|
161
200
|
light: 1,
|
|
162
201
|
dark: 1,
|
|
@@ -168,7 +207,10 @@ const colorMetadata = {
|
|
|
168
207
|
name: "base-active",
|
|
169
208
|
group: "base",
|
|
170
209
|
displayName: "Base Active",
|
|
171
|
-
description:
|
|
210
|
+
description: {
|
|
211
|
+
long: "Base Active brukes som active farge p\xE5 elementer som bruker Base Default fargen.",
|
|
212
|
+
short: "Active-farge for solide bakgrunner."
|
|
213
|
+
},
|
|
172
214
|
luminance: {
|
|
173
215
|
light: 1,
|
|
174
216
|
dark: 1,
|
|
@@ -180,7 +222,10 @@ const colorMetadata = {
|
|
|
180
222
|
name: "base-contrast-subtle",
|
|
181
223
|
group: "base",
|
|
182
224
|
displayName: "Contrast Subtle",
|
|
183
|
-
description:
|
|
225
|
+
description: {
|
|
226
|
+
long: "Contrast Subtle brukes som en viktig meningsb\xE6rende farge opp\xE5 Base Default fargen.",
|
|
227
|
+
short: "Farge med god kontrast mot Base-default."
|
|
228
|
+
},
|
|
184
229
|
luminance: {
|
|
185
230
|
light: 1,
|
|
186
231
|
dark: 1,
|
|
@@ -192,7 +237,10 @@ const colorMetadata = {
|
|
|
192
237
|
name: "base-contrast-default",
|
|
193
238
|
group: "base",
|
|
194
239
|
displayName: "Contrast Default",
|
|
195
|
-
description:
|
|
240
|
+
description: {
|
|
241
|
+
long: "Contrast Default brukes som en viktig meningsb\xE6rende farge opp\xE5 alle Base fargane.",
|
|
242
|
+
short: "Farge med god kontrast mot Base-default og Base-hover."
|
|
243
|
+
},
|
|
196
244
|
luminance: {
|
|
197
245
|
light: 1,
|
|
198
246
|
dark: 1,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../src/colors/theme.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAG7E,eAAO,MAAM,eAAe,UAW3B,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../src/colors/theme.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAG7E,eAAO,MAAM,eAAe,UAW3B,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,GAAI,OAAO,QAAQ,EAAE,aAAa,WAAW,KAAG,KAAK,EAiCnF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,GAAI,OAAO,QAAQ,KAAG,SAIrD,CAAC;AAgCH;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,GAAI,OAAO,QAAQ,EAAE,MAAM,SAAS,GAAG,QAAQ,KAAG,QAgBnF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,cAAc,GAAI,WAAW,MAAM,EAAE,aAAa,WAAW,WAEzE,CAAC"}
|
package/dist/src/colors/theme.js
CHANGED
|
@@ -15,11 +15,17 @@ const RESERVED_COLORS = [
|
|
|
15
15
|
"red"
|
|
16
16
|
];
|
|
17
17
|
const generateColorScale = (color, colorScheme) => {
|
|
18
|
+
let interpolationColor = color;
|
|
19
|
+
if (colorScheme === "dark") {
|
|
20
|
+
const [L, C, H] = chroma(color).oklch();
|
|
21
|
+
const chromaModifier = 0.7;
|
|
22
|
+
interpolationColor = chroma(L, C * chromaModifier, H, "oklch").hex();
|
|
23
|
+
}
|
|
18
24
|
const colors = R.mapObjIndexed((colorData) => {
|
|
19
25
|
const luminance = colorData.luminance[colorScheme];
|
|
20
26
|
return {
|
|
21
27
|
...colorData,
|
|
22
|
-
hex: chroma(
|
|
28
|
+
hex: chroma(interpolationColor).luminance(luminance).hex()
|
|
23
29
|
};
|
|
24
30
|
}, colorMetadata);
|
|
25
31
|
const baseColors = generateBaseColors(color, colorScheme);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/colors/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,MAAM,GAAG,UAAU,CAAC;AACxD,MAAM,MAAM,YAAY,GAAG,I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ACF,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;KAC/B,CAAC,IAAI,MAAM,oBAAoB,GAAG,oBAAoB,CAAC,CAAC,CAAC,GAAG,aAAa;CAC3E,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,UAAU,CAAC;IACjB,MAAM,EAAE,WAAW,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE;QACX,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE;QACT,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,KAAK,GAAG,aAAa,GAAG;IAClC,GAAG,EAAE,QAAQ,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB,KAAK,EAAE,KAAK,EAAE,CAAC;IACf,IAAI,EAAE,KAAK,EAAE,CAAC;IACd,QAAQ,EAAE,KAAK,EAAE,CAAC;CACnB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,QAAQ,CAAC;AAEhC;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,IAAI,MAAM,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/colors/utils.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAErD;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/colors/utils.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAErD;;;;;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AI,QAAQ,MAAM,KAAG,QAQ7C,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,KAAK;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,KAAG,QAOnE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"beta-to-v1.d.ts","sourceRoot":"","sources":["../../../src/migrations/beta-to-v1.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"beta-to-v1.d.ts","sourceRoot":"","sources":["../../../src/migrations/beta-to-v1.ts"],"names":[],"mappings":"yBAGgB,OAAO,MAAM;AAA7B,wBAmVK"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../../../src/migrations/codemods/css/run.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAG9C,KAAK,eAAe,GAAG;IACrB,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../../../src/migrations/codemods/css/run.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAG9C,KAAK,eAAe,GAAG;IACrB,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,aAAa,GAAU,0BAA8C,eAAe,kBA0BhG,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../../../src/migrations/codemods/jsx/run.ts"],"names":[],"mappings":"AAKA,KAAK,eAAe,GAAG;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,OAAO,CAAC;CACf,CAAC;AAIF,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../../../src/migrations/codemods/jsx/run.ts"],"names":[],"mappings":"AAKA,KAAK,eAAe,GAAG;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,OAAO,CAAC;CACf,CAAC;AAIF,eAAO,MAAM,aAAa,GAAU,sBAAqC,eAAe,kBAiBvF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"color-rename-next49.d.ts","sourceRoot":"","sources":["../../../src/migrations/color-rename-next49.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"color-rename-next49.d.ts","sourceRoot":"","sources":["../../../src/migrations/color-rename-next49.ts"],"names":[],"mappings":"yBA6BgB,OAAO,MAAM;AAA7B,wBAwBE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-beta-to-v1.d.ts","sourceRoot":"","sources":["../../../src/migrations/react-beta-to-v1.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"react-beta-to-v1.d.ts","sourceRoot":"","sources":["../../../src/migrations/react-beta-to-v1.ts"],"names":[],"mappings":"yBAEgB,OAAO,MAAM;AAA7B,wBAAuE"}
|
|
@@ -13,6 +13,11 @@ export declare const configs: {
|
|
|
13
13
|
colorSchemeVariables: GetStyleDictionaryConfig;
|
|
14
14
|
mainColorVariables: GetStyleDictionaryConfig;
|
|
15
15
|
supportColorVariables: GetStyleDictionaryConfig;
|
|
16
|
+
neutralColorVariables: GetStyleDictionaryConfig;
|
|
17
|
+
successColorVariables: GetStyleDictionaryConfig;
|
|
18
|
+
dangerColorVariables: GetStyleDictionaryConfig;
|
|
19
|
+
warningColorVariables: GetStyleDictionaryConfig;
|
|
20
|
+
infoColorVariables: GetStyleDictionaryConfig;
|
|
16
21
|
typographyVariables: GetStyleDictionaryConfig;
|
|
17
22
|
semanticVariables: GetStyleDictionaryConfig;
|
|
18
23
|
typescriptTokens: GetStyleDictionaryConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configs.d.ts","sourceRoot":"","sources":["../../../../src/tokens/build/configs.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,IAAI,qBAAqB,EAAoB,MAAM,wBAAwB,CAAC;AAQhG,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"configs.d.ts","sourceRoot":"","sources":["../../../../src/tokens/build/configs.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,IAAI,qBAAqB,EAAoB,MAAM,wBAAwB,CAAC;AAQhG,OAAO,KAAK,EAGV,kBAAkB,EAClB,2BAA2B,EAC3B,cAAc,EACd,gBAAgB,EACjB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,KAAK,oBAAoB,EAA6B,MAAM,sCAAsC,CAAC;AAO5G,eAAO,MAAM,MAAM,OAAO,CAAC;AAC3B,eAAO,MAAM,cAAc,KAAK,CAAC;AA8BjC,MAAM,MAAM,wBAAwB,GAAG,CACrC,WAAW,EAAE,gBAAgB,EAC7B,OAAO,EAAE;IACP,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,KACE,qBAAqB,GAAG;IAAE,MAAM,EAAE,qBAAqB,CAAC;IAAC,oBAAoB,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAA;CAAE,EAAE,CAAC;AA6OnH,eAAO,MAAM,OAAO;;;;;;;;;;;;CAYnB,CAAC;AAEF,eAAO,MAAM,4BAA4B,GACvC,WAAW,wBAAwB,EACnC,QAAQ,oBAAoB,EAAE,EAC9B,YAAY,cAAc,EAAE,EAC5B,SAAS,kBAAkB,KAC1B,2BAA2B,EA8B7B,CAAC"}
|
|
@@ -3,7 +3,7 @@ import * as R from "ramda";
|
|
|
3
3
|
import StyleDictionary from "style-dictionary";
|
|
4
4
|
import { outputReferencesFilter } from "style-dictionary/utils";
|
|
5
5
|
import { buildOptions } from "../build.js";
|
|
6
|
-
import { isColorCategoryToken, isDigit, pathStartsWithOneOf, typeEquals } from "../utils.js";
|
|
6
|
+
import { isColorCategoryToken, isDigit, isSemanticColorToken, pathStartsWithOneOf, typeEquals } from "../utils.js";
|
|
7
7
|
import { formats } from "./formats/css.js";
|
|
8
8
|
import { jsTokens } from "./formats/js-tokens.js";
|
|
9
9
|
import { resolveMath, sizeRem, typographyName, unitless } from "./transformers.js";
|
|
@@ -68,10 +68,17 @@ const colorSchemeVariables = ({ "color-scheme": colorScheme = "light", theme },
|
|
|
68
68
|
}
|
|
69
69
|
};
|
|
70
70
|
};
|
|
71
|
-
const colorCategoryVariables = (
|
|
71
|
+
const colorCategoryVariables = (opts) => ({ "color-scheme": colorScheme, theme, ...permutation }, { outPath }) => {
|
|
72
|
+
const category = opts.category;
|
|
73
|
+
const color = category === "builtin" ? opts.color : permutation[`${category}-color`];
|
|
74
|
+
if (!color) {
|
|
75
|
+
throw new Error(
|
|
76
|
+
category === "builtin" ? `Missing color for built-in color ${opts.color}` : `Missing color for category ${category}`
|
|
77
|
+
);
|
|
78
|
+
}
|
|
72
79
|
const layer = `ds.theme.color`;
|
|
73
80
|
const isRootColor = color === buildOptions?.rootColor;
|
|
74
|
-
const selector =
|
|
81
|
+
const selector = isRootColor ? `:root, [data-color-scheme], [data-color="${color}"]` : `[data-color="${color}"], [data-color-scheme][data-color="${color}"]`;
|
|
75
82
|
const config = {
|
|
76
83
|
usesDtcg,
|
|
77
84
|
preprocessors: ["tokens-studio"],
|
|
@@ -91,7 +98,7 @@ const colorCategoryVariables = (category) => ({ "color-scheme": colorScheme, the
|
|
|
91
98
|
{
|
|
92
99
|
destination: `color/${color}.css`,
|
|
93
100
|
format: formats.colorCategory.name,
|
|
94
|
-
filter: (token) => isColorCategoryToken(token, category)
|
|
101
|
+
filter: (token) => category === "builtin" ? isSemanticColorToken(token, color) : isColorCategoryToken(token, category)
|
|
95
102
|
}
|
|
96
103
|
],
|
|
97
104
|
options: {
|
|
@@ -229,8 +236,13 @@ const typographyVariables = ({ theme, typography }, { outPath }) => {
|
|
|
229
236
|
};
|
|
230
237
|
const configs = {
|
|
231
238
|
colorSchemeVariables,
|
|
232
|
-
mainColorVariables: colorCategoryVariables("main"),
|
|
233
|
-
supportColorVariables: colorCategoryVariables("support"),
|
|
239
|
+
mainColorVariables: colorCategoryVariables({ category: "main" }),
|
|
240
|
+
supportColorVariables: colorCategoryVariables({ category: "support" }),
|
|
241
|
+
neutralColorVariables: colorCategoryVariables({ category: "builtin", color: "neutral" }),
|
|
242
|
+
successColorVariables: colorCategoryVariables({ category: "builtin", color: "success" }),
|
|
243
|
+
dangerColorVariables: colorCategoryVariables({ category: "builtin", color: "danger" }),
|
|
244
|
+
warningColorVariables: colorCategoryVariables({ category: "builtin", color: "warning" }),
|
|
245
|
+
infoColorVariables: colorCategoryVariables({ category: "builtin", color: "info" }),
|
|
234
246
|
typographyVariables,
|
|
235
247
|
semanticVariables,
|
|
236
248
|
typescriptTokens
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"css.d.ts","sourceRoot":"","sources":["../../../../../src/tokens/build/formats/css.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAarD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,YAAY,CAAC,YAAY,EAAE,CAAC,CAAC,EAAE,gBAAgB,KAAK,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,uDAetG;AAsDD,OAAO,QAAQ,wBAAwB,CAAC;IACtC,UAAiB,YAAY;QAC3B,mBAAmB,CAAC,EAAE,MAAM,CAAC;KAC9B;CACF;
|
|
1
|
+
{"version":3,"file":"css.d.ts","sourceRoot":"","sources":["../../../../../src/tokens/build/formats/css.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAarD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,YAAY,CAAC,YAAY,EAAE,CAAC,CAAC,EAAE,gBAAgB,KAAK,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,uDAetG;AAsDD,OAAO,QAAQ,wBAAwB,CAAC;IACtC,UAAiB,YAAY;QAC3B,mBAAmB,CAAC,EAAE,MAAM,CAAC;KAC9B;CACF;AAsCD,eAAO,MAAM,kBAAkB,GAAI,GAAG,gBAAgB,YAA4D,CAAC;AAEnH,eAAO,MAAM,cAAc,MAHY,gBAAgB,YAGkC,CAAC;AAE1F;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,GAAI,QAAQ,CAAC,CAAC,EAAE,gBAAgB,KAAK,MAAM,EAAE,OAAO,gBAAgB;;;;CAYrG,CAAC;AA4FF,eAAO,MAAM,OAAO;;;;;CAKc,CAAC"}
|
|
@@ -86,10 +86,11 @@ const colorCategory = {
|
|
|
86
86
|
}),
|
|
87
87
|
(token) => ({
|
|
88
88
|
...token,
|
|
89
|
-
name: token.name.replace(
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
89
|
+
name: token.name.replace(/color-\w+-/, "color-"),
|
|
90
|
+
original: {
|
|
91
|
+
...token.original,
|
|
92
|
+
$value: new RegExp(`color-(${colorCategories.main}|${colorCategories.support})-`).test(token.name) ? token.original.$value : `{${token.path.join(".")}}`
|
|
93
|
+
}
|
|
93
94
|
})
|
|
94
95
|
);
|
|
95
96
|
const formattedTokens = dictionary.allTokens.map(format).join("\n");
|
|
@@ -5,6 +5,7 @@ export declare const colorCategories: {
|
|
|
5
5
|
readonly support: "support";
|
|
6
6
|
};
|
|
7
7
|
export type ColorCategories = keyof typeof colorCategories;
|
|
8
|
+
export type BuiltInColors = 'neutral' | 'success' | 'warning' | 'danger' | 'info';
|
|
8
9
|
/**
|
|
9
10
|
* A multi-dimensional theme is a concrete permutation of the possible theme dimensions
|
|
10
11
|
*/
|
|
@@ -37,6 +38,8 @@ export type BuildConfig = {
|
|
|
37
38
|
build?: (sdConfigs: SDConfigForThemePermutation[], options: GetSdConfigOptions) => Promise<void>;
|
|
38
39
|
/** Whether the build config is enabled. @default () => true */
|
|
39
40
|
enabled?: () => boolean;
|
|
41
|
+
/** Custom log message. */
|
|
42
|
+
log?: (config: SDConfigForThemePermutation) => string;
|
|
40
43
|
};
|
|
41
44
|
export type SDConfigForThemePermutation = {
|
|
42
45
|
permutation: ThemePermutation;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/tokens/build/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAChG,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AAE7D,eAAO,MAAM,eAAe;;;CAGlB,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,eAAe,CAAC;AAE3D;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,MAAM,gBAAgB,CAAC;AAEpD,MAAM,MAAM,iBAAiB,GAAG,CAAC,KAAK,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,qBAAqB,KAAK,OAAO,CAAC;AAEtG,MAAM,MAAM,kBAAkB,GAAG;IAC/B,OAAO,EA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ACH,eAAO,MAAM,yBAAyB,
|
|
1
|
+
{"version":3,"file":"getMultidimensionalThemes.d.ts","sourceRoot":"","sources":["../../../../../src/tokens/build/utils/getMultidimensionalThemes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAMxD,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEpE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,yBAAyB,GAAI,QAAQ,oBAAoB,EAAE,EAAE,YAAY,cAAc,EAAE,sBAerG,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,WAAW,EAAE,gBAAgB,CAAC;CAC/B,CAAC;AAEF,QAAA,MAAM,SAAS,EAAE,OAAO,MAAsD,CAAC;AAC/E;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,WAAW,GAAG;IAAE,CAAC,SAAS,CAAC,EAAE,IAAI,CAAA;CAAE,CAAC;AAMvE;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,WAAW,GAAG,oBAAoB,GAAG,oBAAoB,CAUlG;AAED,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,gBAAgB,EAAE,oBAAoB,EAAE,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../src/tokens/build.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../src/tokens/build.ts"],"names":[],"mappings":"AAmBA,KAAK,OAAO,GAAG;IACb,yBAAyB;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,wCAAwC;IACxC,MAAM,EAAE,MAAM,CAAC;IACf,8BAA8B;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,4BAA4B;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,wCAAwC;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wCAAwC;IACxC,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,mDAAmD;IACnD,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,eAAO,IAAI,YAAY,EAAE,OAAO,GAAG,SAAS,CAAC;AA4D7C,wBAAsB,WAAW,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CA6FjE"}
|
package/dist/src/tokens/build.js
CHANGED
|
@@ -4,10 +4,12 @@ import chalk from "chalk";
|
|
|
4
4
|
import * as R from "ramda";
|
|
5
5
|
import StyleDictionary from "style-dictionary";
|
|
6
6
|
import { configs, getConfigsForThemeDimensions } from "./build/configs.js";
|
|
7
|
-
import {
|
|
7
|
+
import {
|
|
8
|
+
colorCategories
|
|
9
|
+
} from "./build/types.js";
|
|
8
10
|
import { makeEntryFile } from "./build/utils/entryfile.js";
|
|
9
11
|
import { processThemeObject } from "./build/utils/getMultidimensionalThemes.js";
|
|
10
|
-
import { cleanDir,
|
|
12
|
+
import { cleanDir, writeFile } from "./utils.js";
|
|
11
13
|
let buildOptions;
|
|
12
14
|
const sd = new StyleDictionary();
|
|
13
15
|
const buildConfigs = {
|
|
@@ -15,6 +17,31 @@ const buildConfigs = {
|
|
|
15
17
|
"color-scheme": { getConfig: configs.colorSchemeVariables, dimensions: ["color-scheme"] },
|
|
16
18
|
"main-color": { getConfig: configs.mainColorVariables, dimensions: ["main-color"] },
|
|
17
19
|
"support-color": { getConfig: configs.supportColorVariables, dimensions: ["support-color"] },
|
|
20
|
+
"neutral-color": {
|
|
21
|
+
getConfig: configs.neutralColorVariables,
|
|
22
|
+
dimensions: ["semantic"],
|
|
23
|
+
log: ({ permutation: { theme } }) => `${theme} - neutral`
|
|
24
|
+
},
|
|
25
|
+
"success-color": {
|
|
26
|
+
getConfig: configs.successColorVariables,
|
|
27
|
+
dimensions: ["semantic"],
|
|
28
|
+
log: ({ permutation: { theme } }) => `${theme} - success`
|
|
29
|
+
},
|
|
30
|
+
"danger-color": {
|
|
31
|
+
getConfig: configs.dangerColorVariables,
|
|
32
|
+
dimensions: ["semantic"],
|
|
33
|
+
log: ({ permutation: { theme } }) => `${theme} - danger`
|
|
34
|
+
},
|
|
35
|
+
"warning-color": {
|
|
36
|
+
getConfig: configs.warningColorVariables,
|
|
37
|
+
dimensions: ["semantic"],
|
|
38
|
+
log: ({ permutation: { theme } }) => `${theme} - warning`
|
|
39
|
+
},
|
|
40
|
+
"info-color": {
|
|
41
|
+
getConfig: configs.infoColorVariables,
|
|
42
|
+
dimensions: ["semantic"],
|
|
43
|
+
log: ({ permutation: { theme } }) => `${theme} - info`
|
|
44
|
+
},
|
|
18
45
|
semantic: { getConfig: configs.semanticVariables, dimensions: ["semantic"] },
|
|
19
46
|
storefront: {
|
|
20
47
|
name: "Storefront preview tokens",
|
|
@@ -24,16 +51,13 @@ const buildConfigs = {
|
|
|
24
51
|
enabled: () => buildOptions?.preview ?? false
|
|
25
52
|
},
|
|
26
53
|
entryFiles: {
|
|
27
|
-
name: "CSS
|
|
54
|
+
name: "Concatenated CSS file",
|
|
28
55
|
getConfig: configs.semanticVariables,
|
|
29
56
|
dimensions: ["semantic"],
|
|
57
|
+
log: ({ permutation: { theme } }) => `${theme}.css`,
|
|
30
58
|
build: async (sdConfigs, { outPath, dry }) => {
|
|
31
59
|
await Promise.all(
|
|
32
60
|
sdConfigs.map(async ({ permutation: { theme } }) => {
|
|
33
|
-
console.log(`\u{1F477} ${theme}.css`);
|
|
34
|
-
const builtinColorsFilename = "builtin-colors.css";
|
|
35
|
-
const builtinColors = path.resolve(import.meta.dirname, "build", builtinColorsFilename);
|
|
36
|
-
await copyFile(builtinColors, path.resolve(outPath, theme, builtinColorsFilename), dry);
|
|
37
61
|
return makeEntryFile({ theme, outPath, buildPath: path.resolve(outPath, theme), dry });
|
|
38
62
|
})
|
|
39
63
|
);
|
|
@@ -86,10 +110,12 @@ async function buildTokens(options) {
|
|
|
86
110
|
await buildConfig.build(sdConfigs, { outPath: targetDir, tokensDir, ...buildConfig.options, dry });
|
|
87
111
|
}
|
|
88
112
|
await Promise.all(
|
|
89
|
-
sdConfigs.map(async (
|
|
113
|
+
sdConfigs.map(async (sdConfig) => {
|
|
114
|
+
const { config, permutation } = sdConfig;
|
|
90
115
|
const modes = ["theme", ...buildConfig.dimensions];
|
|
91
116
|
const modeMessage = modes.map((x) => permutation[x]).join(" - ");
|
|
92
|
-
|
|
117
|
+
const logMessage = R.isNil(buildConfig.log) ? modeMessage : buildConfig?.log(sdConfig);
|
|
118
|
+
console.log(logMessage);
|
|
93
119
|
if (!dry) {
|
|
94
120
|
return (await sd.extend(config)).buildAllPlatforms();
|
|
95
121
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../src/tokens/create.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAU,KAAK,EAAE,MAAM,EAAyB,MAAM,YAAY,CAAC;AAE/E,eAAO,MAAM,UAAU;;;;;;;;;;;;;;CAcb,CAAC;AAoEX,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../src/tokens/create.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAU,KAAK,EAAE,MAAM,EAAyB,MAAM,YAAY,CAAC;AAE/E,eAAO,MAAM,UAAU;;;;;;;;;;;;;;CAcb,CAAC;AAoEX,eAAO,MAAM,YAAY,GAAI,MAAM,KAAK,WAqBvC,CAAC"}
|
|
@@ -23,6 +23,7 @@ export declare const getValue: <T>(token: TransformedToken | DesignToken) => T;
|
|
|
23
23
|
export declare const typeEquals: import("ts-toolbelt/out/Function/Curry.js").Curry<(types: string[] | string, token: TransformedToken) => boolean>;
|
|
24
24
|
export declare const pathStartsWithOneOf: import("ts-toolbelt/out/Function/Curry.js").Curry<(paths: string[], token: TransformedToken) => boolean>;
|
|
25
25
|
export declare function isSemanticToken(token: TransformedToken): boolean;
|
|
26
|
+
export declare function isSemanticColorToken(token: TransformedToken, color: string): boolean;
|
|
26
27
|
export declare function isGlobalColorToken(token: TransformedToken): boolean;
|
|
27
28
|
export declare function isColorCategoryToken(token: TransformedToken, category?: 'main' | 'support'): boolean;
|
|
28
29
|
export declare const mkdir: (dir: string, dry?: boolean) => Promise<string | void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/tokens/utils.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAM5E;;;;GAIG;AACH,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/tokens/utils.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAM5E;;;;GAIG;AACH,eAAO,MAAM,OAAO,GAAI,OAAO,gBAAgB,WAAkD,CAAC;AAElG;;;;;;GAMG;AACH,eAAO,MAAM,QAAQ,GAAI,CAAC,EAAE,OAAO,gBAAgB,GAAG,WAAW,KAAG,CAAuC,CAAC;AAE5G;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,4DAAmB,MAAM,EAAE,GAAG,MAAM,SAAS,gBAAgB,aAMlF,CAAC;AAEH,eAAO,MAAM,mBAAmB,4DAAmB,MAAM,EAAE,SAAS,gBAAgB,aASlF,CAAC;AAEH,wBAAgB,eAAe,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAEhE;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAEpF;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAEnE;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,gBAAgB,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAKpG;AAED,eAAO,MAAM,KAAK,GAAU,KAAK,MAAM,EAAE,MAAM,OAAO,2BAOrD,CAAC;AAEF,eAAO,MAAM,SAAS,GAAU,MAAM,MAAM,EAAE,MAAM,MAAM,EAAE,MAAM,OAAO,kBAOxE,CAAC;AAEF,eAAO,MAAM,EAAE,GAAU,KAAK,MAAM,EAAE,MAAM,MAAM,EAAE,MAAM,OAAO,kBAOhE,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAU,KAAK,MAAM,EAAE,MAAM,MAAM,EAAE,MAAM,OAAO,kBAOtE,CAAC;AAEF,eAAO,MAAM,OAAO,GAAI,GAAG,MAAM,YAAoB,CAAC;AAEtD,eAAO,MAAM,QAAQ,GAAU,KAAK,MAAM,EAAE,MAAM,OAAO,kBASxD,CAAC"}
|
package/dist/src/tokens/utils.js
CHANGED
|
@@ -22,6 +22,9 @@ const pathStartsWithOneOf = R.curry((paths, token) => {
|
|
|
22
22
|
function isSemanticToken(token) {
|
|
23
23
|
return token.filePath.includes("semantic/");
|
|
24
24
|
}
|
|
25
|
+
function isSemanticColorToken(token, color) {
|
|
26
|
+
return token.filePath.includes("semantic/") && R.startsWith(["color", color], token.path);
|
|
27
|
+
}
|
|
25
28
|
function isGlobalColorToken(token) {
|
|
26
29
|
return typeEquals("color", token) && pathStartsWithOneOf(["global"], token);
|
|
27
30
|
}
|
|
@@ -77,6 +80,7 @@ export {
|
|
|
77
80
|
isColorCategoryToken,
|
|
78
81
|
isDigit,
|
|
79
82
|
isGlobalColorToken,
|
|
83
|
+
isSemanticColorToken,
|
|
80
84
|
isSemanticToken,
|
|
81
85
|
mkdir,
|
|
82
86
|
pathStartsWithOneOf,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"write.d.ts","sourceRoot":"","sources":["../../../src/tokens/write.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAoB,KAAK,EAAE,MAAM,EAA8B,MAAM,YAAY,CAAC;AAS9F,eAAO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"write.d.ts","sourceRoot":"","sources":["../../../src/tokens/write.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAoB,KAAK,EAAE,MAAM,EAA8B,MAAM,YAAY,CAAC;AAS9F,eAAO,MAAM,SAAS,GAAI,MAAM,OAAO,WAAkC,CAAC;AAyB1E,KAAK,kBAAkB,GAAG;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,KAAK,CAAC;IACb,wCAAwC;IACxC,GAAG,CAAC,EAAE,OAAO,CAAC;CACf,CAAC;AAEF,eAAO,MAAM,WAAW,GAAU,SAAS,kBAAkB,kBA6K5D,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
@layer ds.theme.color {
|
|
2
|
-
[data-color=neutral] {
|
|
3
|
-
--ds-color-background-default: var(--ds-color-neutral-background-default);
|
|
4
|
-
--ds-color-background-tinted: var(--ds-color-neutral-background-tinted);
|
|
5
|
-
--ds-color-surface-tinted: var(--ds-color-neutral-surface-tinted);
|
|
6
|
-
--ds-color-surface-hover: var(--ds-color-neutral-surface-hover);
|
|
7
|
-
--ds-color-surface-active: var(--ds-color-neutral-surface-active);
|
|
8
|
-
--ds-color-border-subtle: var(--ds-color-neutral-border-subtle);
|
|
9
|
-
--ds-color-border-default: var(--ds-color-neutral-border-default);
|
|
10
|
-
--ds-color-border-strong: var(--ds-color-neutral-border-strong);
|
|
11
|
-
--ds-color-base-default: var(--ds-color-neutral-base-default);
|
|
12
|
-
--ds-color-base-hover: var(--ds-color-neutral-base-hover);
|
|
13
|
-
--ds-color-base-active: var(--ds-color-neutral-base-active);
|
|
14
|
-
--ds-color-text-subtle: var(--ds-color-neutral-text-subtle);
|
|
15
|
-
--ds-color-text-default: var(--ds-color-neutral-text-default);
|
|
16
|
-
--ds-color-base-contrast-default: var(--ds-color-neutral-base-contrast-default);
|
|
17
|
-
--ds-color-base-contrast-subtle: var(--ds-color-neutral-base-contrast-subtle);
|
|
18
|
-
}
|
|
19
|
-
[data-color=success] {
|
|
20
|
-
--ds-color-background-default: var(--ds-color-success-background-default);
|
|
21
|
-
--ds-color-background-tinted: var(--ds-color-success-background-tinted);
|
|
22
|
-
--ds-color-surface-tinted: var(--ds-color-success-surface-tinted);
|
|
23
|
-
--ds-color-surface-hover: var(--ds-color-success-surface-hover);
|
|
24
|
-
--ds-color-surface-active: var(--ds-color-success-surface-active);
|
|
25
|
-
--ds-color-border-subtle: var(--ds-color-success-border-subtle);
|
|
26
|
-
--ds-color-border-default: var(--ds-color-success-border-default);
|
|
27
|
-
--ds-color-border-strong: var(--ds-color-success-border-strong);
|
|
28
|
-
--ds-color-base-default: var(--ds-color-success-base-default);
|
|
29
|
-
--ds-color-base-hover: var(--ds-color-success-base-hover);
|
|
30
|
-
--ds-color-base-active: var(--ds-color-success-base-active);
|
|
31
|
-
--ds-color-text-subtle: var(--ds-color-success-text-subtle);
|
|
32
|
-
--ds-color-text-default: var(--ds-color-success-text-default);
|
|
33
|
-
--ds-color-base-contrast-default: var(--ds-color-success-base-contrast-default);
|
|
34
|
-
--ds-color-base-contrast-subtle: var(--ds-color-success-base-contrast-subtle);
|
|
35
|
-
}
|
|
36
|
-
[data-color=warning] {
|
|
37
|
-
--ds-color-background-default: var(--ds-color-warning-background-default);
|
|
38
|
-
--ds-color-background-tinted: var(--ds-color-warning-background-tinted);
|
|
39
|
-
--ds-color-surface-tinted: var(--ds-color-warning-surface-tinted);
|
|
40
|
-
--ds-color-surface-hover: var(--ds-color-warning-surface-hover);
|
|
41
|
-
--ds-color-surface-active: var(--ds-color-warning-surface-active);
|
|
42
|
-
--ds-color-border-subtle: var(--ds-color-warning-border-subtle);
|
|
43
|
-
--ds-color-border-default: var(--ds-color-warning-border-default);
|
|
44
|
-
--ds-color-border-strong: var(--ds-color-warning-border-strong);
|
|
45
|
-
--ds-color-base-default: var(--ds-color-warning-base-default);
|
|
46
|
-
--ds-color-base-hover: var(--ds-color-warning-base-hover);
|
|
47
|
-
--ds-color-base-active: var(--ds-color-warning-base-active);
|
|
48
|
-
--ds-color-text-subtle: var(--ds-color-warning-text-subtle);
|
|
49
|
-
--ds-color-text-default: var(--ds-color-warning-text-default);
|
|
50
|
-
--ds-color-base-contrast-default: var(--ds-color-warning-base-contrast-default);
|
|
51
|
-
--ds-color-base-contrast-subtle: var(--ds-color-warning-base-contrast-subtle);
|
|
52
|
-
}
|
|
53
|
-
[data-color=danger] {
|
|
54
|
-
--ds-color-background-default: var(--ds-color-danger-background-default);
|
|
55
|
-
--ds-color-background-tinted: var(--ds-color-danger-background-tinted);
|
|
56
|
-
--ds-color-surface-tinted: var(--ds-color-danger-surface-tinted);
|
|
57
|
-
--ds-color-surface-hover: var(--ds-color-danger-surface-hover);
|
|
58
|
-
--ds-color-surface-active: var(--ds-color-danger-surface-active);
|
|
59
|
-
--ds-color-border-subtle: var(--ds-color-danger-border-subtle);
|
|
60
|
-
--ds-color-border-default: var(--ds-color-danger-border-default);
|
|
61
|
-
--ds-color-border-strong: var(--ds-color-danger-border-strong);
|
|
62
|
-
--ds-color-base-default: var(--ds-color-danger-base-default);
|
|
63
|
-
--ds-color-base-hover: var(--ds-color-danger-base-hover);
|
|
64
|
-
--ds-color-base-active: var(--ds-color-danger-base-active);
|
|
65
|
-
--ds-color-text-subtle: var(--ds-color-danger-text-subtle);
|
|
66
|
-
--ds-color-text-default: var(--ds-color-danger-text-default);
|
|
67
|
-
--ds-color-base-contrast-default: var(--ds-color-danger-base-contrast-default);
|
|
68
|
-
--ds-color-base-contrast-subtle: var(--ds-color-danger-base-contrast-subtle);
|
|
69
|
-
}
|
|
70
|
-
[data-color=info] {
|
|
71
|
-
--ds-color-background-default: var(--ds-color-info-background-default);
|
|
72
|
-
--ds-color-background-tinted: var(--ds-color-info-background-tinted);
|
|
73
|
-
--ds-color-surface-tinted: var(--ds-color-info-surface-tinted);
|
|
74
|
-
--ds-color-surface-hover: var(--ds-color-info-surface-hover);
|
|
75
|
-
--ds-color-surface-active: var(--ds-color-info-surface-active);
|
|
76
|
-
--ds-color-border-subtle: var(--ds-color-info-border-subtle);
|
|
77
|
-
--ds-color-border-default: var(--ds-color-info-border-default);
|
|
78
|
-
--ds-color-border-strong: var(--ds-color-info-border-strong);
|
|
79
|
-
--ds-color-base-default: var(--ds-color-info-base-default);
|
|
80
|
-
--ds-color-base-hover: var(--ds-color-info-base-hover);
|
|
81
|
-
--ds-color-base-active: var(--ds-color-info-base-active);
|
|
82
|
-
--ds-color-text-subtle: var(--ds-color-info-text-subtle);
|
|
83
|
-
--ds-color-text-default: var(--ds-color-info-text-default);
|
|
84
|
-
--ds-color-base-contrast-default: var(--ds-color-info-base-contrast-default);
|
|
85
|
-
--ds-color-base-contrast-subtle: var(--ds-color-info-base-contrast-subtle);
|
|
86
|
-
}
|
|
87
|
-
}
|