@digdir/designsystemet 1.0.0 → 1.0.2
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/theme.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 +17 -5
- 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/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AM,CAAC,YAAY,EAAE,QAAQ,CAMrD,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,mBAsM3B,CAAC;AAIF,eAAO,MAAM,wBAAwB,
|
|
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,mBAsM3B,CAAC;AAIF,eAAO,MAAM,wBAAwB,GAAI,QAAQ,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uCAE3D,CAAC"}
|
|
@@ -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,EAwBnF,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"}
|
|
@@ -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;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,GAAI,KAAK,QAAQ,EAAE,oBAAkB,WAO5D,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,GAAI,KAAK,QAAQ,aAGrC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,UAAU,GAAI,KAAK,QAAQ,aAKvC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,WAAW,GAAI,KAAK,MAAM,EAAE,WAExC,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,QAAQ,GAAI,GAAG,MAAM,EAAE,GAAG,MAAM,EAAE,GAAG,MAAM,KAAG,QAE1D,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,QAAQ,GAAI,KAAK,MAAM,EAAE,OAAM,KAAK,GAAG,GAAW;;;;CAO9D,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,GAAI,QAAQ,QAAQ,EAAE,QAAQ,QAAQ,WAIpE,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,wBAAwB,GAAI,WAAW,MAAM,EAAE,WAAW,QAAQ,EAAE,iBAAiB,QAAQ,WAYzG,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,GAAI,QAAQ,QAAQ,EAAE,QAAQ,QAAQ,EAAE,OAAM,YAAY,GAAG,IAAI,GAAG,KAAY,YAYhH,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,UAAU,GAAI,KAAK,MAAM,YAErC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,GAAI,WAAW,MAAM,WAM1D,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,GAAI,KAAK,QAAQ,WAMhD,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,GAAI,kBAAkB,QAAQ,EAAE,iBAAiB,QAAQ,YAe1F,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,YAAY,GAAI,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;AA2OnH,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,7 +68,14 @@ 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
81
|
const selector = `${isRootColor ? ":root, [data-color-scheme], " : ""}[data-color="${color}"]`;
|
|
@@ -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;;;CAG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jG,+DAA+D;IAC/D,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC;IACxB,0BAA0B;IAC1B,GAAG,CAAC,EAAE,CAAC,MAAM,EAAE,2BAA2B,KAAK,MAAM,CAAC;CACvD,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG;IAAE,WAAW,EAAE,gBAAgB,CAAC;IAAC,MAAM,EAAE,qBAAqB,CAAA;CAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,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anticToken(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
|
-
}
|