@massimo-cassandro/minimo 1.20.7 → 1.20.8
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/design-tokens/README.md +13 -12
- package/design-tokens/_src/typography.minimo.tokens.mjs +19 -13
- package/design-tokens/tokens-config-sample.mjs +19 -14
- package/design-tokens/utilities/build-tokens-src/config.mjs +11 -11
- package/design-tokens/utilities/build-tokens-src/formats/css.mjs +19 -2
- package/design-tokens/utilities/build-tokens-src/formats/{penpot.mjs → json.mjs} +61 -58
- package/design-tokens/utilities/build-tokens-src/platforms.mjs +22 -21
- package/design-tokens/utilities/build-tokens.mjs +37 -29
- package/index.js +6 -2
- package/package.json +1 -1
- package/src/custom-properties.css +9 -9
- package/src/utilities/dom-builder-helpers/form-tags.js +1 -1
- package/design-tokens/tokens/design-tokens/_src/alerts.minimo.tokens.jsonc +0 -28
- package/design-tokens/tokens/design-tokens/_src/badge.minimo.tokens.jsonc +0 -42
- package/design-tokens/tokens/design-tokens/_src/btn-close.minimo.tokens.jsonc +0 -102
- package/design-tokens/tokens/design-tokens/_src/btn-color-themes.minimo.tokens.jsonc +0 -182
- package/design-tokens/tokens/design-tokens/_src/btn.minimo.tokens.jsonc +0 -210
- package/design-tokens/tokens/design-tokens/_src/color-accent.minimo.tokens.jsonc +0 -16
- package/design-tokens/tokens/design-tokens/_src/color-neutral.minimo.tokens.jsonc +0 -18
- package/design-tokens/tokens/design-tokens/_src/color-primary.minimo.tokens.jsonc +0 -18
- package/design-tokens/tokens/design-tokens/_src/color-secondary.minimo.tokens.jsonc +0 -18
- package/design-tokens/tokens/design-tokens/_src/flex-grid.minimo.tokens.jsonc +0 -24
- package/design-tokens/tokens/design-tokens/_src/form-validation.minimo.tokens.jsonc +0 -22
- package/design-tokens/tokens/design-tokens/_src/form.minimo.tokens.jsonc +0 -366
- package/design-tokens/tokens/design-tokens/_src/headings.minimo.tokens.jsonc +0 -70
- package/design-tokens/tokens/design-tokens/_src/layout.minimo.tokens.jsonc +0 -28
- package/design-tokens/tokens/design-tokens/_src/link.minimo.tokens.jsonc +0 -44
- package/design-tokens/tokens/design-tokens/_src/radius.minimo.tokens.jsonc +0 -42
- package/design-tokens/tokens/design-tokens/_src/shadows.minimo.tokens.jsonc +0 -19
- package/design-tokens/tokens/design-tokens/_src/size.minimo.tokens.jsonc +0 -46
- package/design-tokens/tokens/design-tokens/_src/status.minimo.tokens.jsonc +0 -98
- package/design-tokens/tokens/design-tokens/_src/switch.minimo.tokens.jsonc +0 -32
- package/design-tokens/tokens/design-tokens/_src/table.minimo.tokens.jsonc +0 -84
- package/design-tokens/tokens/design-tokens/_src/text.minimo.tokens.jsonc +0 -38
- package/design-tokens/tokens/design-tokens/_src/typography.minimo.tokens.jsonc +0 -110
- package/design-tokens/tokens/design-tokens/_src/utility.minimo.tokens.jsonc +0 -14
- package/design-tokens/tokens/design-tokens/_src/z-index.minimo.tokens.jsonc +0 -18
- package/design-tokens/tokens/src/components/inner-nav/inner-nav.minimo.tokens.jsonc +0 -20
- package/design-tokens/tokens/src/components/modal-alert/modal-alert.minimo.tokens.jsonc +0 -246
- package/design-tokens/tokens/src/components/modal-popup/modal-popup.minimo.tokens.jsonc +0 -128
- package/design-tokens/tokens/src/components/sf-macro/sf-macro.minimo.tokens.jsonc +0 -84
- package/design-tokens/tokens/src/components/slide-up-down-toggle/slide-up-down-toggle.minimo.tokens.jsonc +0 -14
- package/design-tokens/tokens/src/components/snackbar/snackbar.minimo.tokens.jsonc +0 -146
- package/design-tokens/tokens/src/components/spinner/spinner.minimo.tokens.jsonc +0 -24
- package/design-tokens/tokens/src/components/unsplash-page/unsplash-page.minimo.tokens.jsonc +0 -170
- package/design-tokens/tokens/src/web-components/s-datatable-component/simple-datatable.minimo.tokens.jsonc +0 -51
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
// build-tokens-src/config.mjs <- reads --config flag and resolves all paths
|
|
11
11
|
// build-tokens-src/transforms.mjs <- registers custom Style Dictionary transforms
|
|
12
12
|
// build-tokens-src/formats/css.mjs <- registers the css/variables-sorted format
|
|
13
|
-
// build-tokens-src/formats/
|
|
14
|
-
// build-tokens-src/platforms.mjs <- builds the platforms object (css + optional
|
|
13
|
+
// build-tokens-src/formats/json.mjs <- registers the json/tokens format, exports helpers
|
|
14
|
+
// build-tokens-src/platforms.mjs <- builds the platforms object (css + optional json)
|
|
15
15
|
|
|
16
16
|
import StyleDictionary from 'style-dictionary';
|
|
17
17
|
import * as path from 'node:path';
|
|
@@ -26,10 +26,10 @@ import {
|
|
|
26
26
|
buildPath,
|
|
27
27
|
destFile,
|
|
28
28
|
stylelintConfigPath,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
jsonBuildPath,
|
|
30
|
+
jsonDestFile,
|
|
31
|
+
jsonFormat,
|
|
32
|
+
jsonExpression,
|
|
33
33
|
source,
|
|
34
34
|
mergeCustomProps,
|
|
35
35
|
customPropsGroups,
|
|
@@ -45,8 +45,8 @@ import './build-tokens-src/transforms.mjs';
|
|
|
45
45
|
import { customPropsCount } from './build-tokens-src/formats/css.mjs';
|
|
46
46
|
import { loadExistingCustomProps } from './build-tokens-src/merge-css.mjs';
|
|
47
47
|
|
|
48
|
-
// ── 4.
|
|
49
|
-
import {
|
|
48
|
+
// ── 4. JSON format ────────────────────────────────────────────────────────────
|
|
49
|
+
import { buildJsonFiles, collectConcreteFilePaths } from './build-tokens-src/formats/json.mjs';
|
|
50
50
|
|
|
51
51
|
// ── 5. Platforms builder ──────────────────────────────────────────────────────
|
|
52
52
|
import { buildPlatforms } from './build-tokens-src/platforms.mjs';
|
|
@@ -60,29 +60,37 @@ if (mergeCustomProps) {
|
|
|
60
60
|
loadExistingCustomProps(path.join(buildPath, destFile));
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
// ── 6. Collect concrete source file paths (multi-file
|
|
63
|
+
// ── 6. Collect concrete source file paths (multi-file JSON mode only) ────────
|
|
64
64
|
// Source entries may be glob patterns. SD expands them internally and stores
|
|
65
65
|
// the concrete path in token.filePath. We need those concrete paths to build
|
|
66
|
-
// the per-file descriptors for the
|
|
66
|
+
// the per-file descriptors for the json platform.
|
|
67
67
|
//
|
|
68
68
|
// SD v5 lazy-loads sources: `await sd.hasInitialized` triggers loading;
|
|
69
69
|
// after that sd.allTokens is a plain synchronous array with filePath populated.
|
|
70
70
|
//
|
|
71
|
-
// In single-file mode (
|
|
71
|
+
// In single-file mode (jsonDestFile is set) we skip this step entirely.
|
|
72
72
|
let concreteFilePaths = [];
|
|
73
73
|
|
|
74
|
-
if (
|
|
74
|
+
if (jsonBuildPath && !jsonDestFile) {
|
|
75
75
|
const sdInit = new StyleDictionary({ source, log: { verbosity: 'silent' }, platforms: {} });
|
|
76
76
|
concreteFilePaths = await collectConcreteFilePaths(sdInit);
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
// ── 7. Clean
|
|
80
|
-
//
|
|
81
|
-
// from the source are not left behind as stale artefacts
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
79
|
+
// ── 7. Clean json output directory ───────────────────────────────────────────
|
|
80
|
+
// Remove only previously generated *.json/*.jsonc files, so that tokens
|
|
81
|
+
// removed from the source are not left behind as stale artefacts, while any
|
|
82
|
+
// other file placed in jsonBuildPath by the user (e.g. a README) is left
|
|
83
|
+
// untouched. Files are written flat in jsonBuildPath (no subdirectories), so
|
|
84
|
+
// only its top level is scanned.
|
|
85
|
+
if (jsonBuildPath) {
|
|
86
|
+
const { readdir, rm, mkdir } = await import('fs/promises');
|
|
87
|
+
const existingEntries = await readdir(jsonBuildPath, { withFileTypes: true }).catch(() => []);
|
|
88
|
+
await Promise.all(
|
|
89
|
+
existingEntries
|
|
90
|
+
.filter((entry) => entry.isFile() && /\.jsonc?$/.test(entry.name))
|
|
91
|
+
.map((entry) => rm(path.join(jsonBuildPath, entry.name)))
|
|
92
|
+
);
|
|
93
|
+
await mkdir(jsonBuildPath, { recursive: true });
|
|
86
94
|
}
|
|
87
95
|
|
|
88
96
|
// ── 8. Build ──────────────────────────────────────────────────────────────────
|
|
@@ -92,10 +100,10 @@ const sd = new StyleDictionary({
|
|
|
92
100
|
platforms: buildPlatforms({
|
|
93
101
|
buildPath,
|
|
94
102
|
destFile,
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
103
|
+
jsonBuildPath,
|
|
104
|
+
jsonDestFile,
|
|
105
|
+
jsonFormat,
|
|
106
|
+
jsonExpression,
|
|
99
107
|
concreteFilePaths,
|
|
100
108
|
customPropsGroups,
|
|
101
109
|
pxToRem,
|
|
@@ -122,20 +130,20 @@ console.log(styleText(['yellow'], `[build-tokens] config file : ${short(configAb
|
|
|
122
130
|
console.log(styleText(['yellow'], `[build-tokens] source : ${source.map(short)}`));
|
|
123
131
|
console.log(styleText(['yellow'], `[build-tokens] dest file : ${short(path.join(buildPath, destFile))}`));
|
|
124
132
|
|
|
125
|
-
if (
|
|
126
|
-
const
|
|
127
|
-
if (
|
|
133
|
+
if (jsonBuildPath) {
|
|
134
|
+
const jsonFiles = buildJsonFiles(concreteFilePaths, jsonDestFile, jsonFormat, jsonExpression);
|
|
135
|
+
if (jsonFiles.length === 1) {
|
|
128
136
|
console.log(styleText(['yellow'],
|
|
129
|
-
`[build-tokens]
|
|
137
|
+
`[build-tokens] json : ${short(path.join(jsonBuildPath, jsonFiles[0].destination))}`
|
|
130
138
|
));
|
|
131
139
|
} else {
|
|
132
140
|
console.log(styleText(['yellow'],
|
|
133
|
-
`[build-tokens]
|
|
141
|
+
`[build-tokens] json : ${jsonFiles.length} files in ${short(jsonBuildPath)}`
|
|
134
142
|
));
|
|
135
143
|
}
|
|
136
144
|
} else {
|
|
137
145
|
console.log(styleText(['yellow'],
|
|
138
|
-
'[build-tokens]
|
|
146
|
+
'[build-tokens] json : (disabled — jsonBuildPath not set)'
|
|
139
147
|
));
|
|
140
148
|
}
|
|
141
149
|
|
package/index.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
// utilities
|
|
2
2
|
export { betterText } from './src/utilities/better-text.js';
|
|
3
|
-
export { buildPictureTag } from './src/utilities/dom-builder-helpers/picture-tag.js';
|
|
4
|
-
export { buildInputTag, buildCheckboxTag, buildTextareaTag } from './src/utilities/dom-builder-helpers/form-tags.js';
|
|
5
3
|
export { classnames, classnamesNull } from './src/utilities/classnames.js';
|
|
6
4
|
export { createId } from './src/utilities/create-id.js';
|
|
7
5
|
export { disableBtnsOnSubmit } from './src/utilities/disable-btns-on-submit.js';
|
|
@@ -20,6 +18,10 @@ export { titleCase } from './src/utilities/title-case.js';
|
|
|
20
18
|
export { truncateString } from './src/utilities/truncate-string.js';
|
|
21
19
|
export { ValidationError } from './src/utilities/validation-error-class.js';
|
|
22
20
|
|
|
21
|
+
// domBuilder helpers
|
|
22
|
+
export { buildPictureTag } from './src/utilities/dom-builder-helpers/picture-tag.js';
|
|
23
|
+
export { buildInputTag, buildCheckboxTag, buildTextareaTag } from './src/utilities/dom-builder-helpers/form-tags.js';
|
|
24
|
+
|
|
23
25
|
// components
|
|
24
26
|
export { dismissAlerts } from './src/components/dismiss-alerts.js';
|
|
25
27
|
export { formResetSubmit } from './src/components/form-reset-submit.js';
|
|
@@ -31,3 +33,5 @@ export { sf_macro } from './src/components/sf-macro/sf-macro.js';
|
|
|
31
33
|
export { slideToggle, slideUp, slideDown } from './src/components/slide-up-down-toggle/slide-up-down-toggle.js';
|
|
32
34
|
export { snackbar } from './src/components/snackbar/snackbar.js';
|
|
33
35
|
export { unsplashPage } from './src/components/unsplash-page/unsplash-page.js';
|
|
36
|
+
|
|
37
|
+
// web components
|
package/package.json
CHANGED
|
@@ -113,15 +113,15 @@
|
|
|
113
113
|
|
|
114
114
|
--font-family: sans-serif;
|
|
115
115
|
--font-family-mono: 'Monaspace Neon Var', 'Monaspace Neon', 'Aptos Mono', 'Roboto Mono', 'SFMono-Regular', 'Menlo', 'Monaco', 'Consolas', 'Liberation Mono', 'Andale Mono', 'Courier New', monospace;
|
|
116
|
-
--font-size-2xl: clamp(2rem, .7692rem + 1.9231vw, 2.5rem);
|
|
117
|
-
--font-size-3xl: clamp(2.2rem, .2308rem + 3.0769vw, 3rem);
|
|
118
|
-
--font-size-base: clamp(.9rem, .6538rem + .3846vw, 1rem);
|
|
119
|
-
--font-size-lg: clamp(1.2rem, .7077rem + .7692vw, 1.4rem);
|
|
120
|
-
--font-size-md: clamp(1.05rem, .6808rem + .5769vw, 1.2rem);
|
|
121
|
-
--font-size-sm: clamp(.8rem, .5538rem + .3846vw, .9rem);
|
|
122
|
-
--font-size-xl: clamp(1.6rem, 1.1077rem + .7692vw, 1.8rem);
|
|
123
|
-
--font-size-xs: clamp(.7rem, .4538rem + .3846vw, .8rem);
|
|
124
|
-
--font-size-xxs: clamp(.6rem, .3538rem + .3846vw, .7rem);
|
|
116
|
+
--font-size-2xl: clamp(2rem, .7692rem + 1.9231vw, 2.5rem); /* 64-90rem: https://clamp.font-size.app/?config=eyJyb290IjoiMTYiLCJtaW5XaWR0aCI6IjY0cmVtIiwibWF4V2lkdGgiOiI5MHJlbSIsIm1pbkZvbnRTaXplIjoiMnJlbSIsIm1heEZvbnRTaXplIjoiMi41cmVtIn0%3D */
|
|
117
|
+
--font-size-3xl: clamp(2.2rem, .2308rem + 3.0769vw, 3rem); /* 64-90rem: https://clamp.font-size.app/?config=eyJyb290IjoiMTYiLCJtaW5XaWR0aCI6IjY0cmVtIiwibWF4V2lkdGgiOiI5MHJlbSIsIm1pbkZvbnRTaXplIjoiMi4ycmVtIiwibWF4Rm9udFNpemUiOiIzcmVtIn0%3D */
|
|
118
|
+
--font-size-base: clamp(.9rem, .6538rem + .3846vw, 1rem); /* 64 to 90 rem: https://clamp.font-size.app/?config=eyJyb290IjoiMTYiLCJtaW5XaWR0aCI6IjY0cmVtIiwibWF4V2lkdGgiOiI5MHJlbSIsIm1pbkZvbnRTaXplIjoiLjlyZW0iLCJtYXhGb250U2l6ZSI6IjFyZW0ifQ%3D%3D */
|
|
119
|
+
--font-size-lg: clamp(1.2rem, .7077rem + .7692vw, 1.4rem); /* 64-90rem: https://clamp.font-size.app/?config=eyJyb290IjoiMTYiLCJtaW5XaWR0aCI6IjY0cmVtIiwibWF4V2lkdGgiOiI5MHJlbSIsIm1pbkZvbnRTaXplIjoiMS4ycmVtIiwibWF4Rm9udFNpemUiOiIxLjRyZW0ifQ%3D%3D */
|
|
120
|
+
--font-size-md: clamp(1.05rem, .6808rem + .5769vw, 1.2rem); /* 64-90rem: https://clamp.font-size.app/?config=eyJyb290IjoiMTYiLCJtaW5XaWR0aCI6IjY0cmVtIiwibWF4V2lkdGgiOiI5MHJlbSIsIm1pbkZvbnRTaXplIjoiMS4wNXJlbSIsIm1heEZvbnRTaXplIjoiMS4ycmVtIn0%3D */
|
|
121
|
+
--font-size-sm: clamp(.8rem, .5538rem + .3846vw, .9rem); /* 64-90rem: https://clamp.font-size.app/?config=eyJyb290IjoiMTYiLCJtaW5XaWR0aCI6IjY0cmVtIiwibWF4V2lkdGgiOiI5MHJlbSIsIm1pbkZvbnRTaXplIjoiLjhyZW0iLCJtYXhGb250U2l6ZSI6Ii45cmVtIn0%3D */
|
|
122
|
+
--font-size-xl: clamp(1.6rem, 1.1077rem + .7692vw, 1.8rem); /* 64-90rem: https://clamp.font-size.app/?config=eyJyb290IjoiMTYiLCJtaW5XaWR0aCI6IjY0cmVtIiwibWF4V2lkdGgiOiI5MHJlbSIsIm1pbkZvbnRTaXplIjoiMS42cmVtIiwibWF4Rm9udFNpemUiOiIxLjhyZW0ifQ%3D%3D */
|
|
123
|
+
--font-size-xs: clamp(.7rem, .4538rem + .3846vw, .8rem); /* 64-90rem: https://clamp.font-size.app/?config=eyJyb290IjoiMTYiLCJtaW5XaWR0aCI6IjY0cmVtIiwibWF4V2lkdGgiOiI5MHJlbSIsIm1pbkZvbnRTaXplIjoiLjdyZW0iLCJtYXhGb250U2l6ZSI6Ii44cmVtIn0%3D */
|
|
124
|
+
--font-size-xxs: clamp(.6rem, .3538rem + .3846vw, .7rem); /* 64-90rem: https://clamp.font-size.app/?config=eyJyb290IjoiMTYiLCJtaW5XaWR0aCI6IjY0cmVtIiwibWF4V2lkdGgiOiI5MHJlbSIsIm1pbkZvbnRTaXplIjoiLjZyZW0iLCJtYXhGb250U2l6ZSI6Ii43cmVtIn0%3D */
|
|
125
125
|
--font-style-base: normal;
|
|
126
126
|
--font-weight-bold: 700;
|
|
127
127
|
--font-weight-light: 300;
|
|
@@ -11,7 +11,7 @@ import { randomId } from '../random-id.js';
|
|
|
11
11
|
* @param {boolean} [args.condition=true] - When false, returns `null` without building anything.
|
|
12
12
|
* @param {string | null} [args.wrapperClass=null] - optional class to be added to the `.form-group` wrapper.
|
|
13
13
|
* @param {string | HTMLElement | null} [args.help=null] - Optional help text.
|
|
14
|
-
* @param {Array} args.children - domBuilder children to render inside the `.form-group` (before the help text).
|
|
14
|
+
* @param {Array<Object>} args.children - domBuilder children to render inside the `.form-group` (before the help text).
|
|
15
15
|
* @returns {DomBuilderItem|null} The `.form-group` domBuilder item, or `null` when `condition` is false.
|
|
16
16
|
*/
|
|
17
17
|
function buildFormGroup({
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
// -----------------------------------------------------------------------
|
|
2
|
-
// Generated file — do not edit manually.
|
|
3
|
-
// This file is produced by the design-token build pipeline.
|
|
4
|
-
// Source of truth: the token files in the project source directory.
|
|
5
|
-
// Re-generate with: node build-tokens.mjs --config <path/to/config>
|
|
6
|
-
// -----------------------------------------------------------------------
|
|
7
|
-
{
|
|
8
|
-
"alert": {
|
|
9
|
-
"border": {
|
|
10
|
-
"radius": {
|
|
11
|
-
"$type": "dimension",
|
|
12
|
-
"$value": "{radius.sm}"
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
"box-shadow": {
|
|
16
|
-
"$type": "shadow",
|
|
17
|
-
"$value": [
|
|
18
|
-
{
|
|
19
|
-
"offsetX": 0,
|
|
20
|
-
"offsetY": 0,
|
|
21
|
-
"blur": "8px",
|
|
22
|
-
"spread": 0,
|
|
23
|
-
"color": "oklch(0 0 0 / 0.5)"
|
|
24
|
-
}
|
|
25
|
-
]
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
// -----------------------------------------------------------------------
|
|
2
|
-
// Generated file — do not edit manually.
|
|
3
|
-
// This file is produced by the design-token build pipeline.
|
|
4
|
-
// Source of truth: the token files in the project source directory.
|
|
5
|
-
// Re-generate with: node build-tokens.mjs --config <path/to/config>
|
|
6
|
-
// -----------------------------------------------------------------------
|
|
7
|
-
{
|
|
8
|
-
"badge": {
|
|
9
|
-
"background": {
|
|
10
|
-
"color": {
|
|
11
|
-
"$type": "color",
|
|
12
|
-
"$value": "{primary.100}"
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
"color": {
|
|
16
|
-
"$type": "color",
|
|
17
|
-
"$value": "{primary.100-fg}"
|
|
18
|
-
},
|
|
19
|
-
"font": {
|
|
20
|
-
"size": {
|
|
21
|
-
"$type": "dimension",
|
|
22
|
-
"$value": "{font.size.xs}"
|
|
23
|
-
},
|
|
24
|
-
"weight": {
|
|
25
|
-
"$type": "number",
|
|
26
|
-
"$value": "{font.weight.semibold}"
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
"lg": {
|
|
30
|
-
"font": {
|
|
31
|
-
"size": {
|
|
32
|
-
"$type": "dimension",
|
|
33
|
-
"$value": "{font.size.base}"
|
|
34
|
-
},
|
|
35
|
-
"weight": {
|
|
36
|
-
"$type": "number",
|
|
37
|
-
"$value": "{badge.font.weight}"
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
// -----------------------------------------------------------------------
|
|
2
|
-
// Generated file — do not edit manually.
|
|
3
|
-
// This file is produced by the design-token build pipeline.
|
|
4
|
-
// Source of truth: the token files in the project source directory.
|
|
5
|
-
// Re-generate with: node build-tokens.mjs --config <path/to/config>
|
|
6
|
-
// -----------------------------------------------------------------------
|
|
7
|
-
{
|
|
8
|
-
"btn": {
|
|
9
|
-
"close": {
|
|
10
|
-
"size": {
|
|
11
|
-
"$type": "dimension",
|
|
12
|
-
"$value": "1.5rem"
|
|
13
|
-
},
|
|
14
|
-
"padding": {
|
|
15
|
-
"$type": "dimension",
|
|
16
|
-
"$value": "3px"
|
|
17
|
-
},
|
|
18
|
-
"border": {
|
|
19
|
-
"width": {
|
|
20
|
-
"$type": "dimension",
|
|
21
|
-
"$value": "2px"
|
|
22
|
-
},
|
|
23
|
-
"color": {
|
|
24
|
-
"$type": "color",
|
|
25
|
-
"$value": "{btn.close.icon.color}"
|
|
26
|
-
},
|
|
27
|
-
"radius": {
|
|
28
|
-
"$type": "dimension",
|
|
29
|
-
"$value": "50%"
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
"background": {
|
|
33
|
-
"color": {
|
|
34
|
-
"$type": "color",
|
|
35
|
-
"$value": "{body.background.color}"
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
"icon": {
|
|
39
|
-
"color": {
|
|
40
|
-
"$type": "color",
|
|
41
|
-
"$value": "{text.color}"
|
|
42
|
-
},
|
|
43
|
-
"bar": {
|
|
44
|
-
"size": {
|
|
45
|
-
"$type": "dimension",
|
|
46
|
-
"$value": "2px"
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
"hover": {
|
|
51
|
-
"background": {
|
|
52
|
-
"color": {
|
|
53
|
-
"$type": "color",
|
|
54
|
-
"$value": "{btn.close.icon.color}"
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
"border": {
|
|
58
|
-
"color": {
|
|
59
|
-
"$type": "color",
|
|
60
|
-
"$value": "{btn.close.icon.color}"
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
"icon": {
|
|
64
|
-
"color": {
|
|
65
|
-
"$type": "color",
|
|
66
|
-
"$value": "{btn.close.background.color}"
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
"focus": {
|
|
71
|
-
"outline": {
|
|
72
|
-
"width": {
|
|
73
|
-
"$type": "dimension",
|
|
74
|
-
"$value": "2px"
|
|
75
|
-
},
|
|
76
|
-
"offset": {
|
|
77
|
-
"$type": "dimension",
|
|
78
|
-
"$value": "2px"
|
|
79
|
-
},
|
|
80
|
-
"color": {
|
|
81
|
-
"$type": "color",
|
|
82
|
-
"$value": "{link.focus.outline.color}"
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
"active": {
|
|
87
|
-
"background": {
|
|
88
|
-
"color": {
|
|
89
|
-
"$type": "color",
|
|
90
|
-
"$value": "{btn.close.background.color}"
|
|
91
|
-
}
|
|
92
|
-
},
|
|
93
|
-
"icon": {
|
|
94
|
-
"color": {
|
|
95
|
-
"$type": "color",
|
|
96
|
-
"$value": "{link.active.color}"
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
}
|
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
// -----------------------------------------------------------------------
|
|
2
|
-
// Generated file — do not edit manually.
|
|
3
|
-
// This file is produced by the design-token build pipeline.
|
|
4
|
-
// Source of truth: the token files in the project source directory.
|
|
5
|
-
// Re-generate with: node build-tokens.mjs --config <path/to/config>
|
|
6
|
-
// -----------------------------------------------------------------------
|
|
7
|
-
{
|
|
8
|
-
"btn": {
|
|
9
|
-
"primary": {
|
|
10
|
-
"background": {
|
|
11
|
-
"color": {
|
|
12
|
-
"$type": "color",
|
|
13
|
-
"$value": "{primary.100}"
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
"color": {
|
|
17
|
-
"$type": "color",
|
|
18
|
-
"$value": "{primary.100-fg}"
|
|
19
|
-
},
|
|
20
|
-
"border": {
|
|
21
|
-
"color": {
|
|
22
|
-
"$type": "color",
|
|
23
|
-
"$value": "{btn.primary.background.color}"
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
"focus": {
|
|
27
|
-
"outline": {
|
|
28
|
-
"color": {
|
|
29
|
-
"$type": "color",
|
|
30
|
-
"$value": "color-mix(in srgb, {btn.primary.background.color} 60%, transparent)"
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
"hover": {
|
|
35
|
-
"background": {
|
|
36
|
-
"color": {
|
|
37
|
-
"$type": "color",
|
|
38
|
-
"$value": "{btn.primary.color}"
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
"color": {
|
|
42
|
-
"$type": "color",
|
|
43
|
-
"$value": "{btn.primary.background.color}"
|
|
44
|
-
},
|
|
45
|
-
"border": {
|
|
46
|
-
"color": {
|
|
47
|
-
"$type": "color",
|
|
48
|
-
"$value": "{btn.primary.hover.color}"
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
"active": {
|
|
53
|
-
"background": {
|
|
54
|
-
"color": {
|
|
55
|
-
"$type": "color",
|
|
56
|
-
"$value": "color-mix(in srgb, {btn.primary.background.color} 60%, #000)"
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
"color": {
|
|
60
|
-
"$type": "color",
|
|
61
|
-
"$value": "{btn.primary.color}"
|
|
62
|
-
},
|
|
63
|
-
"border": {
|
|
64
|
-
"color": {
|
|
65
|
-
"$type": "color",
|
|
66
|
-
"$value": "{btn.primary.active.background.color}"
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
"hollow": {
|
|
71
|
-
"background": {
|
|
72
|
-
"color": {
|
|
73
|
-
"$type": "color",
|
|
74
|
-
"$value": "{btn.primary.color}"
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
"color": {
|
|
78
|
-
"$type": "color",
|
|
79
|
-
"$value": "{btn.primary.background.color}"
|
|
80
|
-
},
|
|
81
|
-
"hover": {
|
|
82
|
-
"background": {
|
|
83
|
-
"color": {
|
|
84
|
-
"$type": "color",
|
|
85
|
-
"$value": "{btn.primary.background.color}"
|
|
86
|
-
}
|
|
87
|
-
},
|
|
88
|
-
"color": {
|
|
89
|
-
"$type": "color",
|
|
90
|
-
"$value": "{btn.primary.color}"
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
},
|
|
95
|
-
"secondary": {
|
|
96
|
-
"background": {
|
|
97
|
-
"color": {
|
|
98
|
-
"$type": "color",
|
|
99
|
-
"$value": "{secondary.100}"
|
|
100
|
-
}
|
|
101
|
-
},
|
|
102
|
-
"color": {
|
|
103
|
-
"$type": "color",
|
|
104
|
-
"$value": "{secondary.100-fg}"
|
|
105
|
-
},
|
|
106
|
-
"border": {
|
|
107
|
-
"color": {
|
|
108
|
-
"$type": "color",
|
|
109
|
-
"$value": "{btn.secondary.background.color}"
|
|
110
|
-
}
|
|
111
|
-
},
|
|
112
|
-
"focus": {
|
|
113
|
-
"outline": {
|
|
114
|
-
"color": {
|
|
115
|
-
"$type": "color",
|
|
116
|
-
"$value": "color-mix(in srgb, {btn.secondary.background.color} 60%, transparent)"
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
},
|
|
120
|
-
"hover": {
|
|
121
|
-
"background": {
|
|
122
|
-
"color": {
|
|
123
|
-
"$type": "color",
|
|
124
|
-
"$value": "{btn.secondary.color}"
|
|
125
|
-
}
|
|
126
|
-
},
|
|
127
|
-
"color": {
|
|
128
|
-
"$type": "color",
|
|
129
|
-
"$value": "{btn.secondary.background.color}"
|
|
130
|
-
},
|
|
131
|
-
"border": {
|
|
132
|
-
"color": {
|
|
133
|
-
"$type": "color",
|
|
134
|
-
"$value": "{btn.secondary.hover.color}"
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
},
|
|
138
|
-
"active": {
|
|
139
|
-
"background": {
|
|
140
|
-
"color": {
|
|
141
|
-
"$type": "color",
|
|
142
|
-
"$value": "color-mix(in srgb, {btn.secondary.background.color} 60%, #000)"
|
|
143
|
-
}
|
|
144
|
-
},
|
|
145
|
-
"color": {
|
|
146
|
-
"$type": "color",
|
|
147
|
-
"$value": "{btn.secondary.color}"
|
|
148
|
-
},
|
|
149
|
-
"border": {
|
|
150
|
-
"color": {
|
|
151
|
-
"$type": "color",
|
|
152
|
-
"$value": "{btn.secondary.active.background.color}"
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
},
|
|
156
|
-
"hollow": {
|
|
157
|
-
"background": {
|
|
158
|
-
"color": {
|
|
159
|
-
"$type": "color",
|
|
160
|
-
"$value": "{btn.secondary.color}"
|
|
161
|
-
}
|
|
162
|
-
},
|
|
163
|
-
"color": {
|
|
164
|
-
"$type": "color",
|
|
165
|
-
"$value": "{btn.secondary.background.color}"
|
|
166
|
-
},
|
|
167
|
-
"hover": {
|
|
168
|
-
"background": {
|
|
169
|
-
"color": {
|
|
170
|
-
"$type": "color",
|
|
171
|
-
"$value": "{btn.secondary.background.color}"
|
|
172
|
-
}
|
|
173
|
-
},
|
|
174
|
-
"color": {
|
|
175
|
-
"$type": "color",
|
|
176
|
-
"$value": "{btn.secondary.color}"
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
}
|