@sanity/ui 3.0.0-static.10 → 3.0.0-static.11
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/_chunks-cjs/_visual-editing.js +160 -207
- package/dist/_chunks-cjs/_visual-editing.js.map +1 -1
- package/dist/_chunks-es/_visual-editing.mjs +161 -208
- package/dist/_chunks-es/_visual-editing.mjs.map +1 -1
- package/dist/_visual-editing.d.mts +1 -3
- package/dist/_visual-editing.d.ts +1 -3
- package/dist/cli.js +1 -1
- package/dist/css.d.mts +115 -2
- package/dist/css.d.ts +115 -2
- package/dist/css.js +539 -402
- package/dist/css.js.map +1 -1
- package/dist/css.mjs +541 -404
- package/dist/css.mjs.map +1 -1
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +50 -17
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +45 -12
- package/dist/index.mjs.map +1 -1
- package/dist/sanity-theme.css +1 -1
- package/dist/system.css +418 -182
- package/dist/theme.js +10 -11
- package/dist/theme.js.map +1 -1
- package/dist/theme.mjs +10 -11
- package/dist/theme.mjs.map +1 -1
- package/package.json +1 -1
- package/src/css/_resp.ts +0 -1
- package/src/css/aspects/font/font.style.ts +7 -66
- package/src/css/aspects/shadow/shadow.style.ts +16 -41
- package/src/css/compile/compilePalette.ts +4 -3
- package/src/css/compile/compileSystem.ts +0 -3
- package/src/css/compile/compileTheme_v3.ts +233 -219
- package/src/css/components/skeleton/skeleton.style.ts +8 -4
- package/src/css/constants.ts +9 -0
- package/src/css/index.ts +1 -0
- package/src/css/primitives/_arrow/_arrow.style.ts +6 -8
- package/src/css/primitives/_arrow/_arrow.ts +4 -0
- package/src/css/primitives/_selectable/_selectable.style.ts +23 -23
- package/src/css/primitives/button/button.style.ts +48 -15
- package/src/css/primitives/card/card.style.ts +1 -1
- package/src/css/primitives/token/token.style.ts +37 -36
- package/src/css/responsiveRules.ts +12 -19
- package/src/css/types.ts +106 -3
- package/src/css/varNames.ts +101 -4
- package/src/css/vars.ts +52 -16
- package/src/theme/v3/buildTheme_v3.ts +1 -1
- package/src/theme/v3/{defaults.ts → defaultTokens.ts} +1 -2
- package/src/theme/v3/index.ts +1 -1
- package/src/theme/v3/resolveTokens.ts +9 -9
- package/src/ui/RootClassNames.tsx +41 -0
- package/src/ui/_compat/helpers.ts +72 -0
- package/src/ui/_compat/index.ts +2 -6
- package/src/ui/_compat/studioTheme.ts +7 -0
- package/src/ui/_compat/types.ts +0 -83
- package/src/ui/index.ts +1 -0
- package/src/ui/primitives/button/button.tsx +5 -6
- package/src/ui/primitives/popover/popover.tsx +25 -7
- package/src/ui/primitives/popover/popoverCard.tsx +46 -45
- package/src/ui/primitives/tooltip/tooltip.tsx +9 -2
- package/src/ui/primitives/tooltip/tooltipCard.tsx +1 -1
- package/src/ui/utils/arrow/arrow.tsx +3 -11
- package/src/ui/utils/elementQuery/elementQuery.tsx +10 -8
- package/src/ui/utils/virtualList/virtualList.tsx +37 -32
- package/src/css/components/breadcrumbs/rules.ts +0 -25
- package/src/css/components/dialog/rules.ts +0 -78
- package/src/css/components/skeleton/rules.ts +0 -113
- package/src/css/components/toast/rules.ts +0 -18
- package/src/css/components/tree/rules.ts +0 -168
- package/src/css/primitives/popover/rules.ts +0 -5
- package/src/css/primitives/spinner/rules.ts +0 -21
- package/src/css/primitives/token/rules.ts +0 -45
package/dist/css.js
CHANGED
|
@@ -75,7 +75,14 @@ function radius(props) {
|
|
|
75
75
|
function shadow(props) {
|
|
76
76
|
return composeClassNames(_resp("shadow", props.shadow));
|
|
77
77
|
}
|
|
78
|
-
const
|
|
78
|
+
const BREAKPOINTS = {
|
|
79
|
+
1: 360,
|
|
80
|
+
2: 600,
|
|
81
|
+
3: 900,
|
|
82
|
+
4: 1200,
|
|
83
|
+
5: 1800,
|
|
84
|
+
6: 2400
|
|
85
|
+
}, PREFIX = "s-";
|
|
79
86
|
function scopeClassName(className) {
|
|
80
87
|
if (className !== void 0)
|
|
81
88
|
return `${PREFIX}${className.trim()}`;
|
|
@@ -89,98 +96,6 @@ function textOverflow(props) {
|
|
|
89
96
|
function width(props) {
|
|
90
97
|
return _resp("w", props.width) ?? "";
|
|
91
98
|
}
|
|
92
|
-
function compileRule(selector, props, context) {
|
|
93
|
-
let css = compileProperties$1(selector, props);
|
|
94
|
-
if (props["@nest"] && (css += compileNestedRules(selector, props["@nest"], context)), props["@keyframes"])
|
|
95
|
-
for (const name in props["@keyframes"])
|
|
96
|
-
context.keyframes[name] = props["@keyframes"][name];
|
|
97
|
-
if (props["@media"])
|
|
98
|
-
for (const key in props["@media"])
|
|
99
|
-
context.media[key] || (context.media[key] = {}), context.media[key][selector] = props["@media"][key];
|
|
100
|
-
return css;
|
|
101
|
-
}
|
|
102
|
-
function compileProperties$1(selector, props) {
|
|
103
|
-
let css = "{";
|
|
104
|
-
for (const key in props) {
|
|
105
|
-
if (key === "@keyframes" || key === "@media" || key === "@nest") continue;
|
|
106
|
-
const value = props[key], valueArr = Array.isArray(value) ? value : [value];
|
|
107
|
-
for (const v of valueArr)
|
|
108
|
-
css += toSnakeCase$1(key) + ":" + v + ";";
|
|
109
|
-
}
|
|
110
|
-
return css === "{" ? "" : selector + css + "}";
|
|
111
|
-
}
|
|
112
|
-
function compileNestedRules(selector, props, context) {
|
|
113
|
-
if (!props) return "";
|
|
114
|
-
let css = "";
|
|
115
|
-
for (const [_selector, _props] of Object.entries(props))
|
|
116
|
-
css += `
|
|
117
|
-
` + compileRule(_selector.replace(/\./g, `.${PREFIX}`).replace(/&/g, selector), _props, context);
|
|
118
|
-
return css;
|
|
119
|
-
}
|
|
120
|
-
function toSnakeCase$1(value) {
|
|
121
|
-
return value.replace(/[A-Z]/g, (match) => "-" + match.toLowerCase());
|
|
122
|
-
}
|
|
123
|
-
function compilePalette() {
|
|
124
|
-
const props = {
|
|
125
|
-
...compileHues(),
|
|
126
|
-
"--black": color.color.black.hex,
|
|
127
|
-
"--white": color.color.white.hex
|
|
128
|
-
};
|
|
129
|
-
return compileRule(":root", props, {
|
|
130
|
-
keyframes: {},
|
|
131
|
-
media: {}
|
|
132
|
-
});
|
|
133
|
-
}
|
|
134
|
-
function compileHues() {
|
|
135
|
-
const rules2 = {};
|
|
136
|
-
for (const hue of theme.HUES)
|
|
137
|
-
for (const tint of theme.TINTS)
|
|
138
|
-
rules2[`--${hue}-${tint}`] = color.color[hue][tint].hex;
|
|
139
|
-
return rules2;
|
|
140
|
-
}
|
|
141
|
-
function _mergeStyles(styles) {
|
|
142
|
-
const keyframes2 = {}, layers = {}, rules2 = {};
|
|
143
|
-
for (const s of styles)
|
|
144
|
-
if (s) {
|
|
145
|
-
Object.assign(keyframes2, s.keyframes);
|
|
146
|
-
for (const layerName in s.layers)
|
|
147
|
-
layers[layerName] || (layers[layerName] = {}), Object.assign(layers[layerName], s.layers[layerName]);
|
|
148
|
-
Object.assign(rules2, s.rules);
|
|
149
|
-
}
|
|
150
|
-
return {
|
|
151
|
-
keyframes: keyframes2,
|
|
152
|
-
layers,
|
|
153
|
-
rules: rules2
|
|
154
|
-
};
|
|
155
|
-
}
|
|
156
|
-
function _responsiveRule(rules2, _name, properties) {
|
|
157
|
-
const name = _name.replace(/\./g, "_");
|
|
158
|
-
rules2[`.${name}`] = properties, rules2[`.1\\:${name}`] = {
|
|
159
|
-
"@media": {
|
|
160
|
-
"screen and (min-width: 360px)": properties
|
|
161
|
-
}
|
|
162
|
-
}, rules2[`.2\\:${name}`] = {
|
|
163
|
-
"@media": {
|
|
164
|
-
"screen and (min-width: 600px)": properties
|
|
165
|
-
}
|
|
166
|
-
}, rules2[`.3\\:${name}`] = {
|
|
167
|
-
"@media": {
|
|
168
|
-
"screen and (min-width: 900px)": properties
|
|
169
|
-
}
|
|
170
|
-
}, rules2[`.4\\:${name}`] = {
|
|
171
|
-
"@media": {
|
|
172
|
-
"screen and (min-width: 1200px)": properties
|
|
173
|
-
}
|
|
174
|
-
}, rules2[`.5\\:${name}`] = {
|
|
175
|
-
"@media": {
|
|
176
|
-
"screen and (min-width: 1800px)": properties
|
|
177
|
-
}
|
|
178
|
-
}, rules2[`.6\\:${name}`] = {
|
|
179
|
-
"@media": {
|
|
180
|
-
"screen and (min-width: 2400px)": properties
|
|
181
|
-
}
|
|
182
|
-
};
|
|
183
|
-
}
|
|
184
99
|
const varNames = {
|
|
185
100
|
avatar: {
|
|
186
101
|
distance: "--avatar-distance",
|
|
@@ -197,6 +112,20 @@ const varNames = {
|
|
|
197
112
|
}
|
|
198
113
|
}), {})
|
|
199
114
|
},
|
|
115
|
+
button: {
|
|
116
|
+
border: {
|
|
117
|
+
width: "--button-border-width"
|
|
118
|
+
},
|
|
119
|
+
focusRing: {
|
|
120
|
+
offset: "--button-focus-ring-offset",
|
|
121
|
+
width: "--button-focus-ring-width"
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
card: {
|
|
125
|
+
shadow: {
|
|
126
|
+
outline: "--card-shadow-outline"
|
|
127
|
+
}
|
|
128
|
+
},
|
|
200
129
|
color: {
|
|
201
130
|
// card scope
|
|
202
131
|
accent: {
|
|
@@ -424,6 +353,7 @@ const varNames = {
|
|
|
424
353
|
font: {
|
|
425
354
|
code: {
|
|
426
355
|
family: "--font-code-family",
|
|
356
|
+
featureSettings: "--font-code-feature-settings",
|
|
427
357
|
sizes: theme.FONT_CODE_SIZE.reduce((acc, size) => ({
|
|
428
358
|
...acc,
|
|
429
359
|
[size]: {
|
|
@@ -435,7 +365,7 @@ const varNames = {
|
|
|
435
365
|
iconSize: `--font-code-${size}-icon-size`
|
|
436
366
|
}
|
|
437
367
|
}), {}),
|
|
438
|
-
|
|
368
|
+
weights: {
|
|
439
369
|
regular: "--font-code-weight-regular",
|
|
440
370
|
medium: "--font-code-weight-medium",
|
|
441
371
|
semibold: "--font-code-weight-semibold",
|
|
@@ -444,6 +374,7 @@ const varNames = {
|
|
|
444
374
|
},
|
|
445
375
|
heading: {
|
|
446
376
|
family: "--font-heading-family",
|
|
377
|
+
featureSettings: "--font-heading-feature-settings",
|
|
447
378
|
sizes: theme.FONT_HEADING_SIZE.reduce((acc, size) => ({
|
|
448
379
|
...acc,
|
|
449
380
|
[size]: {
|
|
@@ -455,7 +386,7 @@ const varNames = {
|
|
|
455
386
|
iconSize: `--font-heading-${size}-icon-size`
|
|
456
387
|
}
|
|
457
388
|
}), {}),
|
|
458
|
-
|
|
389
|
+
weights: {
|
|
459
390
|
regular: "--font-heading-weight-regular",
|
|
460
391
|
medium: "--font-heading-weight-medium",
|
|
461
392
|
semibold: "--font-heading-weight-semibold",
|
|
@@ -464,6 +395,7 @@ const varNames = {
|
|
|
464
395
|
},
|
|
465
396
|
label: {
|
|
466
397
|
family: "--font-label-family",
|
|
398
|
+
featureSettings: "--font-label-feature-settings",
|
|
467
399
|
sizes: theme.FONT_LABEL_SIZE.reduce((acc, size) => ({
|
|
468
400
|
...acc,
|
|
469
401
|
[size]: {
|
|
@@ -475,7 +407,7 @@ const varNames = {
|
|
|
475
407
|
iconSize: `--font-label-${size}-icon-size`
|
|
476
408
|
}
|
|
477
409
|
}), {}),
|
|
478
|
-
|
|
410
|
+
weights: {
|
|
479
411
|
regular: "--font-label-weight-regular",
|
|
480
412
|
medium: "--font-label-weight-medium",
|
|
481
413
|
semibold: "--font-label-weight-semibold",
|
|
@@ -484,6 +416,7 @@ const varNames = {
|
|
|
484
416
|
},
|
|
485
417
|
text: {
|
|
486
418
|
family: "--font-text-family",
|
|
419
|
+
featureSettings: "--font-text-feature-settings",
|
|
487
420
|
sizes: theme.FONT_TEXT_SIZE.reduce((acc, size) => ({
|
|
488
421
|
...acc,
|
|
489
422
|
[size]: {
|
|
@@ -495,7 +428,7 @@ const varNames = {
|
|
|
495
428
|
iconSize: `--font-text-${size}-icon-size`
|
|
496
429
|
}
|
|
497
430
|
}), {}),
|
|
498
|
-
|
|
431
|
+
weights: {
|
|
499
432
|
regular: "--font-text-weight-regular",
|
|
500
433
|
medium: "--font-text-weight-medium",
|
|
501
434
|
semibold: "--font-text-weight-semibold",
|
|
@@ -504,6 +437,47 @@ const varNames = {
|
|
|
504
437
|
}
|
|
505
438
|
},
|
|
506
439
|
input: {
|
|
440
|
+
border: {
|
|
441
|
+
width: "--input-border-width"
|
|
442
|
+
},
|
|
443
|
+
checkbox: {
|
|
444
|
+
focusRing: {
|
|
445
|
+
offset: "--input-checkbox-focus-ring-offset",
|
|
446
|
+
width: "--input-checkbox-focus-ring-width"
|
|
447
|
+
},
|
|
448
|
+
size: "--input-checkbox-size"
|
|
449
|
+
},
|
|
450
|
+
radio: {
|
|
451
|
+
focusRing: {
|
|
452
|
+
offset: "--input-radio-focus-ring-offset",
|
|
453
|
+
width: "--input-radio-focus-ring-width"
|
|
454
|
+
},
|
|
455
|
+
markSize: "--input-radio-mark-size",
|
|
456
|
+
size: "--input-radio-size"
|
|
457
|
+
},
|
|
458
|
+
select: {
|
|
459
|
+
focusRing: {
|
|
460
|
+
offset: "--input-select-focus-ring-offset",
|
|
461
|
+
width: "--input-select-focus-ring-width"
|
|
462
|
+
}
|
|
463
|
+
},
|
|
464
|
+
switch: {
|
|
465
|
+
focusRing: {
|
|
466
|
+
offset: "--input-switch-focus-ring-offset",
|
|
467
|
+
width: "--input-switch-focus-ring-width"
|
|
468
|
+
},
|
|
469
|
+
height: "--input-switch-height",
|
|
470
|
+
padding: "--input-switch-padding",
|
|
471
|
+
transitionDurationMs: "--input-switch-transition-duration-ms",
|
|
472
|
+
transitionTimingFunction: "--input-switch-transition-timing-function",
|
|
473
|
+
width: "--input-switch-width"
|
|
474
|
+
},
|
|
475
|
+
text: {
|
|
476
|
+
focusRing: {
|
|
477
|
+
offset: "--input-text-focus-ring-offset",
|
|
478
|
+
width: "--input-text-focus-ring-width"
|
|
479
|
+
}
|
|
480
|
+
},
|
|
507
481
|
fontSize: "--input-font-size",
|
|
508
482
|
lineHeight: "--input-line-height",
|
|
509
483
|
letterSpacing: "--input-letter-spacing",
|
|
@@ -514,7 +488,21 @@ const varNames = {
|
|
|
514
488
|
padding: "--input-padding"
|
|
515
489
|
},
|
|
516
490
|
radius: Object.fromEntries(theme.RADIUS.map((radius2) => [radius2, `--radius-${radius2}`])),
|
|
517
|
-
|
|
491
|
+
shadow: Object.fromEntries(theme.SHADOW.map((shadow2) => [shadow2, {
|
|
492
|
+
umbra: `--shadow-${shadow2}-umbra`,
|
|
493
|
+
penumbra: `--shadow-${shadow2}-penumbra`,
|
|
494
|
+
ambient: `--shadow-${shadow2}-ambient`
|
|
495
|
+
}])),
|
|
496
|
+
space: Object.fromEntries(theme.SPACE.map((space) => [space, `--space-${String(space).replace(".", "_")}`])),
|
|
497
|
+
// color
|
|
498
|
+
black: "--black",
|
|
499
|
+
white: "--white",
|
|
500
|
+
...color.COLOR_HUES.reduce((acc, hue) => {
|
|
501
|
+
const tints = {};
|
|
502
|
+
for (const tint of color.COLOR_TINTS)
|
|
503
|
+
tints[tint] = `--${hue}-${tint}`;
|
|
504
|
+
return acc[hue] = tints, acc;
|
|
505
|
+
}, {})
|
|
518
506
|
};
|
|
519
507
|
function buildColorCardVarNames(props) {
|
|
520
508
|
const {
|
|
@@ -692,6 +680,98 @@ function buildColorVariantVarNames(options) {
|
|
|
692
680
|
}
|
|
693
681
|
return vars2;
|
|
694
682
|
}
|
|
683
|
+
function compileRule(selector, props, context) {
|
|
684
|
+
let css = compileProperties$1(selector, props);
|
|
685
|
+
if (props["@nest"] && (css += compileNestedRules(selector, props["@nest"], context)), props["@keyframes"])
|
|
686
|
+
for (const name in props["@keyframes"])
|
|
687
|
+
context.keyframes[name] = props["@keyframes"][name];
|
|
688
|
+
if (props["@media"])
|
|
689
|
+
for (const key in props["@media"])
|
|
690
|
+
context.media[key] || (context.media[key] = {}), context.media[key][selector] = props["@media"][key];
|
|
691
|
+
return css;
|
|
692
|
+
}
|
|
693
|
+
function compileProperties$1(selector, props) {
|
|
694
|
+
let css = "{";
|
|
695
|
+
for (const key in props) {
|
|
696
|
+
if (key === "@keyframes" || key === "@media" || key === "@nest") continue;
|
|
697
|
+
const value = props[key], valueArr = Array.isArray(value) ? value : [value];
|
|
698
|
+
for (const v of valueArr)
|
|
699
|
+
css += toSnakeCase$1(key) + ":" + v + ";";
|
|
700
|
+
}
|
|
701
|
+
return css === "{" ? "" : selector + css + "}";
|
|
702
|
+
}
|
|
703
|
+
function compileNestedRules(selector, props, context) {
|
|
704
|
+
if (!props) return "";
|
|
705
|
+
let css = "";
|
|
706
|
+
for (const [_selector, _props] of Object.entries(props))
|
|
707
|
+
css += `
|
|
708
|
+
` + compileRule(_selector.replace(/\./g, `.${PREFIX}`).replace(/&/g, selector), _props, context);
|
|
709
|
+
return css;
|
|
710
|
+
}
|
|
711
|
+
function toSnakeCase$1(value) {
|
|
712
|
+
return value.replace(/[A-Z]/g, (match) => "-" + match.toLowerCase());
|
|
713
|
+
}
|
|
714
|
+
function compilePalette() {
|
|
715
|
+
const props = {
|
|
716
|
+
...compileHues(),
|
|
717
|
+
[varNames.black]: color.color.black.hex,
|
|
718
|
+
[varNames.white]: color.color.white.hex
|
|
719
|
+
};
|
|
720
|
+
return compileRule(":root", props, {
|
|
721
|
+
keyframes: {},
|
|
722
|
+
media: {}
|
|
723
|
+
});
|
|
724
|
+
}
|
|
725
|
+
function compileHues() {
|
|
726
|
+
const rules2 = {};
|
|
727
|
+
for (const hue of theme.HUES)
|
|
728
|
+
for (const tint of theme.TINTS)
|
|
729
|
+
rules2[varNames[hue][tint]] = color.color[hue][tint].hex;
|
|
730
|
+
return rules2;
|
|
731
|
+
}
|
|
732
|
+
function _mergeStyles(styles) {
|
|
733
|
+
const keyframes2 = {}, layers = {}, rules2 = {};
|
|
734
|
+
for (const s of styles)
|
|
735
|
+
if (s) {
|
|
736
|
+
Object.assign(keyframes2, s.keyframes);
|
|
737
|
+
for (const layerName in s.layers)
|
|
738
|
+
layers[layerName] || (layers[layerName] = {}), Object.assign(layers[layerName], s.layers[layerName]);
|
|
739
|
+
Object.assign(rules2, s.rules);
|
|
740
|
+
}
|
|
741
|
+
return {
|
|
742
|
+
keyframes: keyframes2,
|
|
743
|
+
layers,
|
|
744
|
+
rules: rules2
|
|
745
|
+
};
|
|
746
|
+
}
|
|
747
|
+
function _responsiveRule(rules2, _name, properties) {
|
|
748
|
+
const name = _name.replace(/\./g, "_");
|
|
749
|
+
rules2[`.${name}`] = properties, rules2[`.1\\:${name}`] = {
|
|
750
|
+
"@media": {
|
|
751
|
+
"screen and (min-width: 360px)": properties
|
|
752
|
+
}
|
|
753
|
+
}, rules2[`.2\\:${name}`] = {
|
|
754
|
+
"@media": {
|
|
755
|
+
"screen and (min-width: 600px)": properties
|
|
756
|
+
}
|
|
757
|
+
}, rules2[`.3\\:${name}`] = {
|
|
758
|
+
"@media": {
|
|
759
|
+
"screen and (min-width: 900px)": properties
|
|
760
|
+
}
|
|
761
|
+
}, rules2[`.4\\:${name}`] = {
|
|
762
|
+
"@media": {
|
|
763
|
+
"screen and (min-width: 1200px)": properties
|
|
764
|
+
}
|
|
765
|
+
}, rules2[`.5\\:${name}`] = {
|
|
766
|
+
"@media": {
|
|
767
|
+
"screen and (min-width: 1800px)": properties
|
|
768
|
+
}
|
|
769
|
+
}, rules2[`.6\\:${name}`] = {
|
|
770
|
+
"@media": {
|
|
771
|
+
"screen and (min-width: 2400px)": properties
|
|
772
|
+
}
|
|
773
|
+
};
|
|
774
|
+
}
|
|
695
775
|
const darkColorVars = {};
|
|
696
776
|
for (const tone of theme.THEME_COLOR_CARD_TONES)
|
|
697
777
|
darkColorVars[tone] = buildColorCardVars({
|
|
@@ -844,6 +924,11 @@ const colorVars = {
|
|
|
844
924
|
}
|
|
845
925
|
}), {})
|
|
846
926
|
},
|
|
927
|
+
card: {
|
|
928
|
+
shadow: {
|
|
929
|
+
outline: `var(${varNames.card.shadow.outline})`
|
|
930
|
+
}
|
|
931
|
+
},
|
|
847
932
|
color: colorVars,
|
|
848
933
|
container: {
|
|
849
934
|
0: `var(${varNames.container[0]})`,
|
|
@@ -868,10 +953,10 @@ const colorVars = {
|
|
|
868
953
|
}
|
|
869
954
|
}), {}),
|
|
870
955
|
weight: {
|
|
871
|
-
regular: `var(${varNames.font.code.
|
|
872
|
-
medium: `var(${varNames.font.code.
|
|
873
|
-
semibold: `var(${varNames.font.code.
|
|
874
|
-
bold: `var(${varNames.font.code.
|
|
956
|
+
regular: `var(${varNames.font.code.weights.regular})`,
|
|
957
|
+
medium: `var(${varNames.font.code.weights.medium})`,
|
|
958
|
+
semibold: `var(${varNames.font.code.weights.semibold})`,
|
|
959
|
+
bold: `var(${varNames.font.code.weights.bold})`
|
|
875
960
|
}
|
|
876
961
|
},
|
|
877
962
|
heading: {
|
|
@@ -888,10 +973,10 @@ const colorVars = {
|
|
|
888
973
|
}
|
|
889
974
|
}), {}),
|
|
890
975
|
weight: {
|
|
891
|
-
regular: `var(${varNames.font.heading.
|
|
892
|
-
medium: `var(${varNames.font.heading.
|
|
893
|
-
semibold: `var(${varNames.font.heading.
|
|
894
|
-
bold: `var(${varNames.font.heading.
|
|
976
|
+
regular: `var(${varNames.font.heading.weights.regular})`,
|
|
977
|
+
medium: `var(${varNames.font.heading.weights.medium})`,
|
|
978
|
+
semibold: `var(${varNames.font.heading.weights.semibold})`,
|
|
979
|
+
bold: `var(${varNames.font.heading.weights.bold})`
|
|
895
980
|
}
|
|
896
981
|
},
|
|
897
982
|
label: {
|
|
@@ -908,10 +993,10 @@ const colorVars = {
|
|
|
908
993
|
}
|
|
909
994
|
}), {}),
|
|
910
995
|
weight: {
|
|
911
|
-
regular: `var(${varNames.font.label.
|
|
912
|
-
medium: `var(${varNames.font.label.
|
|
913
|
-
semibold: `var(${varNames.font.label.
|
|
914
|
-
bold: `var(${varNames.font.label.
|
|
996
|
+
regular: `var(${varNames.font.label.weights.regular})`,
|
|
997
|
+
medium: `var(${varNames.font.label.weights.medium})`,
|
|
998
|
+
semibold: `var(${varNames.font.label.weights.semibold})`,
|
|
999
|
+
bold: `var(${varNames.font.label.weights.bold})`
|
|
915
1000
|
}
|
|
916
1001
|
},
|
|
917
1002
|
text: {
|
|
@@ -928,10 +1013,10 @@ const colorVars = {
|
|
|
928
1013
|
}
|
|
929
1014
|
}), {}),
|
|
930
1015
|
weight: {
|
|
931
|
-
regular: `var(${varNames.font.text.
|
|
932
|
-
medium: `var(${varNames.font.text.
|
|
933
|
-
semibold: `var(${varNames.font.text.
|
|
934
|
-
bold: `var(${varNames.font.text.
|
|
1016
|
+
regular: `var(${varNames.font.text.weights.regular})`,
|
|
1017
|
+
medium: `var(${varNames.font.text.weights.medium})`,
|
|
1018
|
+
semibold: `var(${varNames.font.text.weights.semibold})`,
|
|
1019
|
+
bold: `var(${varNames.font.text.weights.bold})`
|
|
935
1020
|
}
|
|
936
1021
|
}
|
|
937
1022
|
},
|
|
@@ -952,7 +1037,21 @@ const colorVars = {
|
|
|
952
1037
|
}
|
|
953
1038
|
},
|
|
954
1039
|
radius: Object.fromEntries(theme.RADIUS.map((radius2) => [radius2, `var(${varNames.radius[radius2]})`])),
|
|
955
|
-
|
|
1040
|
+
shadow: Object.fromEntries(theme.SHADOW.map((shadow2) => [shadow2, {
|
|
1041
|
+
umbra: `var(${varNames.shadow[shadow2].umbra})`,
|
|
1042
|
+
penumbra: `var(${varNames.shadow[shadow2].penumbra})`,
|
|
1043
|
+
ambient: `var(${varNames.shadow[shadow2].ambient})`
|
|
1044
|
+
}])),
|
|
1045
|
+
space: Object.fromEntries(theme.SPACE.map((space) => [space, `var(${varNames.space[space]})`])),
|
|
1046
|
+
// color
|
|
1047
|
+
black: `var(${varNames.black})`,
|
|
1048
|
+
white: `var(${varNames.white})`,
|
|
1049
|
+
...color.COLOR_HUES.reduce((acc, hue) => {
|
|
1050
|
+
const tints = {};
|
|
1051
|
+
for (const tint of color.COLOR_TINTS)
|
|
1052
|
+
tints[tint] = `var(--${hue}-${tint})`;
|
|
1053
|
+
return acc[hue] = tints, acc;
|
|
1054
|
+
}, {})
|
|
956
1055
|
};
|
|
957
1056
|
function buildColorCardVars(props) {
|
|
958
1057
|
const {
|
|
@@ -1293,9 +1392,8 @@ const flexStyle = {
|
|
|
1293
1392
|
layers: {
|
|
1294
1393
|
util: util$n
|
|
1295
1394
|
}
|
|
1296
|
-
},
|
|
1395
|
+
}, primitive$q = {
|
|
1297
1396
|
".font": {
|
|
1298
|
-
// 'position': 'relative',
|
|
1299
1397
|
fontFamily: "var(--font-family)",
|
|
1300
1398
|
fontFeatureSettings: "var(--font-feature-settings)",
|
|
1301
1399
|
fontSize: "var(--font-size)",
|
|
@@ -1350,24 +1448,24 @@ const flexStyle = {
|
|
|
1350
1448
|
"--font-weight": "var(--font-weight-bold)"
|
|
1351
1449
|
}
|
|
1352
1450
|
};
|
|
1353
|
-
_responsiveRule(
|
|
1451
|
+
_responsiveRule(primitive$q, "text-align-initial", {
|
|
1354
1452
|
textAlign: "initial"
|
|
1355
1453
|
});
|
|
1356
|
-
_responsiveRule(
|
|
1454
|
+
_responsiveRule(primitive$q, "text-align-left", {
|
|
1357
1455
|
textAlign: "left"
|
|
1358
1456
|
});
|
|
1359
|
-
_responsiveRule(
|
|
1457
|
+
_responsiveRule(primitive$q, "text-align-center", {
|
|
1360
1458
|
textAlign: "center"
|
|
1361
1459
|
});
|
|
1362
|
-
_responsiveRule(
|
|
1460
|
+
_responsiveRule(primitive$q, "text-align-right", {
|
|
1363
1461
|
textAlign: "right"
|
|
1364
1462
|
});
|
|
1365
|
-
_responsiveRule(
|
|
1463
|
+
_responsiveRule(primitive$q, "text-align-justify", {
|
|
1366
1464
|
textAlign: "justify"
|
|
1367
1465
|
});
|
|
1368
1466
|
const fontStyle = {
|
|
1369
1467
|
layers: {
|
|
1370
|
-
primitive:
|
|
1468
|
+
primitive: primitive$q
|
|
1371
1469
|
}
|
|
1372
1470
|
}, util$m = {};
|
|
1373
1471
|
for (const space of theme.SPACE)
|
|
@@ -2019,24 +2117,12 @@ const radiusStyle = {
|
|
|
2019
2117
|
util: util$2
|
|
2020
2118
|
}
|
|
2021
2119
|
}, util$1 = {};
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
_responsiveRule(util$1,
|
|
2026
|
-
|
|
2027
|
-
});
|
|
2028
|
-
_responsiveRule(util$1, "shadow-2", {
|
|
2029
|
-
boxShadow: [`var(--shadow-outline) ${vars.color.shadow.outline}`, `var(--shadow-2-umbra) ${vars.color.shadow.umbra}`, `var(--shadow-2-penumbra) ${vars.color.shadow.penumbra}`, `var(--shadow-2-ambient) ${vars.color.shadow.ambient}`].join(", ")
|
|
2030
|
-
});
|
|
2031
|
-
_responsiveRule(util$1, "shadow-3", {
|
|
2032
|
-
boxShadow: [`var(--shadow-outline) ${vars.color.shadow.outline}`, `var(--shadow-3-umbra) ${vars.color.shadow.umbra}`, `var(--shadow-3-penumbra) ${vars.color.shadow.penumbra}`, `var(--shadow-3-ambient) ${vars.color.shadow.ambient}`].join(", ")
|
|
2033
|
-
});
|
|
2034
|
-
_responsiveRule(util$1, "shadow-4", {
|
|
2035
|
-
boxShadow: [`var(--shadow-outline) ${vars.color.shadow.outline}`, `var(--shadow-4-umbra) ${vars.color.shadow.umbra}`, `var(--shadow-4-penumbra) ${vars.color.shadow.penumbra}`, `var(--shadow-4-ambient) ${vars.color.shadow.ambient}`].join(", ")
|
|
2036
|
-
});
|
|
2037
|
-
_responsiveRule(util$1, "shadow-5", {
|
|
2038
|
-
boxShadow: [`var(--shadow-outline) ${vars.color.shadow.outline}`, `var(--shadow-5-umbra) ${vars.color.shadow.umbra}`, `var(--shadow-5-penumbra) ${vars.color.shadow.penumbra}`, `var(--shadow-5-ambient) ${vars.color.shadow.ambient}`].join(", ")
|
|
2039
|
-
});
|
|
2120
|
+
for (const shadow2 of theme.SHADOW)
|
|
2121
|
+
shadow2 === 0 ? _responsiveRule(util$1, "shadow-0", {
|
|
2122
|
+
boxShadow: "none"
|
|
2123
|
+
}) : _responsiveRule(util$1, `shadow-${shadow2}`, {
|
|
2124
|
+
boxShadow: [`0 0 0 ${vars.card.shadow.outline} ${vars.color.shadow.outline}`, `${vars.shadow[shadow2].umbra} ${vars.color.shadow.umbra}`, `${vars.shadow[shadow2].penumbra} ${vars.color.shadow.penumbra}`, `${vars.shadow[shadow2].ambient} ${vars.color.shadow.ambient}`].join(", ")
|
|
2125
|
+
});
|
|
2040
2126
|
const shadowStyle = {
|
|
2041
2127
|
layers: {
|
|
2042
2128
|
util: util$1
|
|
@@ -2158,8 +2244,8 @@ const widthStyle = {
|
|
|
2158
2244
|
layers: {
|
|
2159
2245
|
component: component$3
|
|
2160
2246
|
}
|
|
2161
|
-
}, keyframes$1 = {
|
|
2162
|
-
|
|
2247
|
+
}, KEYFRAMES_PULSE = "skeleton-pulse", keyframes$1 = {
|
|
2248
|
+
[KEYFRAMES_PULSE]: {
|
|
2163
2249
|
"0%": {
|
|
2164
2250
|
backgroundPosition: "100%"
|
|
2165
2251
|
},
|
|
@@ -2169,8 +2255,8 @@ const widthStyle = {
|
|
|
2169
2255
|
}
|
|
2170
2256
|
}, component$2 = {
|
|
2171
2257
|
".skeleton": {
|
|
2172
|
-
|
|
2173
|
-
|
|
2258
|
+
[varNames.color.skeleton.from]: `color-mix(in srgb, transparent, ${vars.color.muted.fg} 5%)`,
|
|
2259
|
+
[varNames.color.skeleton.to]: `color-mix(in srgb, transparent, ${vars.color.muted.fg} 10%)`,
|
|
2174
2260
|
backgroundColor: vars.color.skeleton.from,
|
|
2175
2261
|
backgroundPosition: "100%",
|
|
2176
2262
|
backgroundSize: "200% 100%",
|
|
@@ -2180,7 +2266,7 @@ const widthStyle = {
|
|
|
2180
2266
|
"@nest": {
|
|
2181
2267
|
"&[data-animated]": {
|
|
2182
2268
|
backgroundImage: ["linear-gradient(to right", vars.color.skeleton.from, vars.color.skeleton.to, vars.color.skeleton.from, vars.color.skeleton.from, vars.color.skeleton.from, ")"].join(", "),
|
|
2183
|
-
animationName:
|
|
2269
|
+
animationName: KEYFRAMES_PULSE,
|
|
2184
2270
|
animationTimingFunction: "ease-in-out",
|
|
2185
2271
|
animationIterationCount: "infinite",
|
|
2186
2272
|
animationDuration: "2000ms"
|
|
@@ -2335,8 +2421,13 @@ const skeletonStyle = {
|
|
|
2335
2421
|
}
|
|
2336
2422
|
}
|
|
2337
2423
|
},
|
|
2424
|
+
".arrow-stroke-mask": {
|
|
2425
|
+
// @ts-expect-error `y` is not a valid property in 'csstype'
|
|
2426
|
+
y: vars.shadow.outline
|
|
2427
|
+
},
|
|
2338
2428
|
".arrow-stroke": {
|
|
2339
|
-
stroke: vars.color.shadow.outline
|
|
2429
|
+
stroke: vars.color.shadow.outline,
|
|
2430
|
+
strokeWidth: `calc(${vars.card.shadow.outline} * 2)`
|
|
2340
2431
|
},
|
|
2341
2432
|
".arrow-shape": {
|
|
2342
2433
|
fill: vars.color.bg
|
|
@@ -2481,9 +2572,9 @@ const _inputStyle = {
|
|
|
2481
2572
|
".selectable": {
|
|
2482
2573
|
backgroundColor: vars.color.bg,
|
|
2483
2574
|
color: vars.color.fg,
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2575
|
+
[varNames.color.bg]: vars.color.tinted.bg[0],
|
|
2576
|
+
[varNames.color.border]: vars.color.tinted.border[2],
|
|
2577
|
+
[varNames.color.fg]: vars.color.tinted.fg[2],
|
|
2487
2578
|
"@nest": {
|
|
2488
2579
|
"&:is(button)": {
|
|
2489
2580
|
WebkitFontSmoothing: "inherit",
|
|
@@ -2509,32 +2600,32 @@ const _inputStyle = {
|
|
|
2509
2600
|
// cursor: 'pointer',
|
|
2510
2601
|
},
|
|
2511
2602
|
"&:not([data-disabled]):hover": {
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2603
|
+
[varNames.color.bg]: vars.color.tinted.bg[1],
|
|
2604
|
+
[varNames.color.border]: vars.color.tinted.border[3],
|
|
2605
|
+
[varNames.color.fg]: vars.color.tinted.fg[1],
|
|
2606
|
+
[varNames.color.muted.bg]: vars.color.tinted.bg[2],
|
|
2607
|
+
[varNames.color.muted.fg]: vars.color.tinted.fg[4]
|
|
2517
2608
|
},
|
|
2518
2609
|
'&:not([data-disabled]):active, &:not([data-disabled])[aria-pressed="true"], &:not([data-disabled])[data-pressed]': {
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2610
|
+
[varNames.color.bg]: vars.color.tinted.bg[2],
|
|
2611
|
+
[varNames.color.border]: vars.color.tinted.border[4],
|
|
2612
|
+
[varNames.color.fg]: vars.color.tinted.fg[0],
|
|
2613
|
+
[varNames.color.muted.bg]: vars.color.tinted.bg[3],
|
|
2614
|
+
[varNames.color.muted.fg]: vars.color.tinted.fg[4]
|
|
2524
2615
|
},
|
|
2525
2616
|
"&:not([data-disabled]):focus": {
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2617
|
+
[varNames.color.bg]: vars.color.solid.primary.bg[0],
|
|
2618
|
+
[varNames.color.border]: vars.color.solid.primary.border[1],
|
|
2619
|
+
[varNames.color.fg]: vars.color.solid.primary.fg[0],
|
|
2620
|
+
[varNames.color.muted.bg]: vars.color.solid.primary.bg[1],
|
|
2621
|
+
[varNames.color.muted.fg]: vars.color.solid.primary.fg[3]
|
|
2531
2622
|
},
|
|
2532
2623
|
"&[data-disabled]": {
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2624
|
+
[varNames.color.bg]: vars.color.tinted.bg[0],
|
|
2625
|
+
[varNames.color.border]: vars.color.tinted.border[1],
|
|
2626
|
+
[varNames.color.fg]: vars.color.tinted.border[4],
|
|
2627
|
+
[varNames.color.muted.bg]: vars.color.tinted.bg[1],
|
|
2628
|
+
[varNames.color.muted.fg]: vars.color.tinted.border[4]
|
|
2538
2629
|
}
|
|
2539
2630
|
}
|
|
2540
2631
|
}
|
|
@@ -2855,11 +2946,22 @@ for (const tone of theme.THEME_COLOR_STATE_TONES) {
|
|
|
2855
2946
|
[varNames.color.muted.fg]: solid.fg[4]
|
|
2856
2947
|
},
|
|
2857
2948
|
"&[data-disabled]": {
|
|
2858
|
-
[varNames.color.bg]: vars.color.default.
|
|
2859
|
-
[varNames.color.
|
|
2860
|
-
[varNames.color.
|
|
2861
|
-
[varNames.color.
|
|
2862
|
-
[varNames.color.
|
|
2949
|
+
[varNames.color.avatar.gray.bg]: vars.color.tinted.default.bg[3],
|
|
2950
|
+
[varNames.color.avatar.blue.bg]: vars.color.tinted.default.bg[3],
|
|
2951
|
+
[varNames.color.avatar.purple.bg]: vars.color.tinted.default.bg[3],
|
|
2952
|
+
[varNames.color.avatar.magenta.bg]: vars.color.tinted.default.bg[3],
|
|
2953
|
+
[varNames.color.avatar.red.bg]: vars.color.tinted.default.bg[3],
|
|
2954
|
+
[varNames.color.avatar.orange.bg]: vars.color.tinted.default.bg[3],
|
|
2955
|
+
[varNames.color.avatar.yellow.bg]: vars.color.tinted.default.bg[3],
|
|
2956
|
+
[varNames.color.avatar.green.bg]: vars.color.tinted.default.bg[3],
|
|
2957
|
+
[varNames.color.avatar.cyan.bg]: vars.color.tinted.default.bg[3],
|
|
2958
|
+
[varNames.color.bg]: vars.color.tinted.default.bg[1],
|
|
2959
|
+
[varNames.color.border]: vars.color.tinted.default.border[1],
|
|
2960
|
+
[varNames.color.code.bg]: vars.color.tinted.default.bg[2],
|
|
2961
|
+
[varNames.color.code.fg]: vars.color.tinted.default.border[4],
|
|
2962
|
+
[varNames.color.fg]: vars.color.tinted.default.border[4],
|
|
2963
|
+
[varNames.color.muted.bg]: vars.color.tinted.default.bg[2],
|
|
2964
|
+
[varNames.color.muted.fg]: vars.color.tinted.default.border[4]
|
|
2863
2965
|
}
|
|
2864
2966
|
}
|
|
2865
2967
|
}, primitive$j[`.button.${variantMap.ghost}.${toneMap$1[tone]}`] = {
|
|
@@ -2895,11 +2997,22 @@ for (const tone of theme.THEME_COLOR_STATE_TONES) {
|
|
|
2895
2997
|
"--button-box-shadow": "inset 0 0 0 var(--button-border-width) var(--color-border)"
|
|
2896
2998
|
},
|
|
2897
2999
|
"&[data-disabled]": {
|
|
2898
|
-
[varNames.color.bg]: vars.color.default.
|
|
2899
|
-
[varNames.color.
|
|
2900
|
-
[varNames.color.
|
|
2901
|
-
[varNames.color.
|
|
2902
|
-
[varNames.color.
|
|
3000
|
+
[varNames.color.avatar.gray.bg]: vars.color.tinted.default.bg[2],
|
|
3001
|
+
[varNames.color.avatar.blue.bg]: vars.color.tinted.default.bg[2],
|
|
3002
|
+
[varNames.color.avatar.purple.bg]: vars.color.tinted.default.bg[2],
|
|
3003
|
+
[varNames.color.avatar.magenta.bg]: vars.color.tinted.default.bg[2],
|
|
3004
|
+
[varNames.color.avatar.red.bg]: vars.color.tinted.default.bg[2],
|
|
3005
|
+
[varNames.color.avatar.orange.bg]: vars.color.tinted.default.bg[2],
|
|
3006
|
+
[varNames.color.avatar.yellow.bg]: vars.color.tinted.default.bg[2],
|
|
3007
|
+
[varNames.color.avatar.green.bg]: vars.color.tinted.default.bg[2],
|
|
3008
|
+
[varNames.color.avatar.cyan.bg]: vars.color.tinted.default.bg[2],
|
|
3009
|
+
[varNames.color.bg]: vars.color.tinted.default.bg[0],
|
|
3010
|
+
[varNames.color.border]: vars.color.tinted.default.border[0],
|
|
3011
|
+
[varNames.color.code.bg]: vars.color.tinted.default.bg[1],
|
|
3012
|
+
[varNames.color.code.fg]: vars.color.tinted.default.border[3],
|
|
3013
|
+
[varNames.color.fg]: vars.color.tinted.default.border[4],
|
|
3014
|
+
[varNames.color.muted.bg]: vars.color.tinted.default.bg[1],
|
|
3015
|
+
[varNames.color.muted.fg]: vars.color.tinted.default.border[3]
|
|
2903
3016
|
}
|
|
2904
3017
|
}
|
|
2905
3018
|
}, primitive$j[`.button.${variantMap.bleed}.${toneMap$1[tone]}`] = {
|
|
@@ -2933,11 +3046,22 @@ for (const tone of theme.THEME_COLOR_STATE_TONES) {
|
|
|
2933
3046
|
[varNames.color.muted.fg]: tinted.fg[3]
|
|
2934
3047
|
},
|
|
2935
3048
|
"&[data-disabled]": {
|
|
2936
|
-
[varNames.color.bg]: vars.color.default.
|
|
2937
|
-
[varNames.color.
|
|
2938
|
-
[varNames.color.
|
|
2939
|
-
[varNames.color.
|
|
2940
|
-
[varNames.color.
|
|
3049
|
+
[varNames.color.avatar.gray.bg]: vars.color.tinted.default.bg[2],
|
|
3050
|
+
[varNames.color.avatar.blue.bg]: vars.color.tinted.default.bg[2],
|
|
3051
|
+
[varNames.color.avatar.purple.bg]: vars.color.tinted.default.bg[2],
|
|
3052
|
+
[varNames.color.avatar.magenta.bg]: vars.color.tinted.default.bg[2],
|
|
3053
|
+
[varNames.color.avatar.red.bg]: vars.color.tinted.default.bg[2],
|
|
3054
|
+
[varNames.color.avatar.orange.bg]: vars.color.tinted.default.bg[2],
|
|
3055
|
+
[varNames.color.avatar.yellow.bg]: vars.color.tinted.default.bg[2],
|
|
3056
|
+
[varNames.color.avatar.green.bg]: vars.color.tinted.default.bg[2],
|
|
3057
|
+
[varNames.color.avatar.cyan.bg]: vars.color.tinted.default.bg[2],
|
|
3058
|
+
[varNames.color.bg]: vars.color.tinted.default.bg[0],
|
|
3059
|
+
[varNames.color.border]: vars.color.tinted.default.border[0],
|
|
3060
|
+
[varNames.color.code.bg]: vars.color.tinted.default.bg[1],
|
|
3061
|
+
[varNames.color.code.fg]: vars.color.tinted.default.border[3],
|
|
3062
|
+
[varNames.color.fg]: vars.color.tinted.default.border[4],
|
|
3063
|
+
[varNames.color.muted.bg]: vars.color.tinted.default.bg[1],
|
|
3064
|
+
[varNames.color.muted.fg]: vars.color.tinted.default.border[3]
|
|
2941
3065
|
}
|
|
2942
3066
|
}
|
|
2943
3067
|
};
|
|
@@ -3030,7 +3154,7 @@ const buttonStyle = {
|
|
|
3030
3154
|
// '--color-muted-bg': vars.color.solid.bg[1],
|
|
3031
3155
|
// '--color-muted-fg': vars.color.solid.fg[3],
|
|
3032
3156
|
// },
|
|
3033
|
-
"a&[data-disabled]
|
|
3157
|
+
"a&[data-disabled], button&[data-disabled]": {
|
|
3034
3158
|
[varNames.color.bg]: vars.color.tinted.default.bg[2],
|
|
3035
3159
|
[varNames.color.border]: vars.color.tinted.default.border[4],
|
|
3036
3160
|
[varNames.color.fg]: vars.color.tinted.default.fg[0],
|
|
@@ -3909,115 +4033,115 @@ const textStyle = {
|
|
|
3909
4033
|
_prefix: !1,
|
|
3910
4034
|
"@nest": {
|
|
3911
4035
|
"&.atrule": {
|
|
3912
|
-
color:
|
|
4036
|
+
color: vars.color.code.token.atrule
|
|
3913
4037
|
},
|
|
3914
4038
|
"&.attr-name": {
|
|
3915
|
-
color:
|
|
4039
|
+
color: vars.color.code.token.attrName
|
|
3916
4040
|
},
|
|
3917
4041
|
"&.attr-value": {
|
|
3918
|
-
color:
|
|
4042
|
+
color: vars.color.code.token.attrValue
|
|
3919
4043
|
},
|
|
3920
4044
|
"&.attribute": {
|
|
3921
|
-
color:
|
|
4045
|
+
color: vars.color.code.token.attribute
|
|
3922
4046
|
},
|
|
3923
4047
|
"&.boolean": {
|
|
3924
|
-
color:
|
|
4048
|
+
color: vars.color.code.token.boolean
|
|
3925
4049
|
},
|
|
3926
4050
|
"&.builtin": {
|
|
3927
|
-
color:
|
|
4051
|
+
color: vars.color.code.token.builtin
|
|
3928
4052
|
},
|
|
3929
4053
|
"&.cdata": {
|
|
3930
|
-
color:
|
|
4054
|
+
color: vars.color.code.token.cdata
|
|
3931
4055
|
},
|
|
3932
4056
|
"&.char": {
|
|
3933
|
-
color:
|
|
4057
|
+
color: vars.color.code.token.char
|
|
3934
4058
|
},
|
|
3935
4059
|
"&.class": {
|
|
3936
|
-
color:
|
|
4060
|
+
color: vars.color.code.token.class
|
|
3937
4061
|
},
|
|
3938
4062
|
"&.class-name": {
|
|
3939
|
-
color:
|
|
4063
|
+
color: vars.color.code.token.className
|
|
3940
4064
|
},
|
|
3941
4065
|
"&.comment": {
|
|
3942
|
-
color:
|
|
4066
|
+
color: vars.color.code.token.comment
|
|
3943
4067
|
},
|
|
3944
4068
|
"&.constant": {
|
|
3945
|
-
color:
|
|
4069
|
+
color: vars.color.code.token.constant
|
|
3946
4070
|
},
|
|
3947
4071
|
"&.deleted": {
|
|
3948
|
-
color:
|
|
4072
|
+
color: vars.color.code.token.deleted
|
|
3949
4073
|
},
|
|
3950
4074
|
"&.doctype": {
|
|
3951
|
-
color:
|
|
4075
|
+
color: vars.color.code.token.doctype
|
|
3952
4076
|
},
|
|
3953
4077
|
"&.entity": {
|
|
3954
|
-
color:
|
|
4078
|
+
color: vars.color.code.token.entity
|
|
3955
4079
|
},
|
|
3956
4080
|
"&.function": {
|
|
3957
|
-
color:
|
|
4081
|
+
color: vars.color.code.token.function
|
|
3958
4082
|
},
|
|
3959
4083
|
"&.hexcode": {
|
|
3960
|
-
color:
|
|
4084
|
+
color: vars.color.code.token.hexcode
|
|
3961
4085
|
},
|
|
3962
4086
|
"&.id": {
|
|
3963
|
-
color:
|
|
4087
|
+
color: vars.color.code.token.id
|
|
3964
4088
|
},
|
|
3965
4089
|
"&.important": {
|
|
3966
|
-
color:
|
|
4090
|
+
color: vars.color.code.token.important
|
|
3967
4091
|
},
|
|
3968
4092
|
"&.inserted": {
|
|
3969
|
-
color:
|
|
4093
|
+
color: vars.color.code.token.inserted
|
|
3970
4094
|
},
|
|
3971
4095
|
"&.keyword": {
|
|
3972
|
-
color:
|
|
4096
|
+
color: vars.color.code.token.keyword
|
|
3973
4097
|
},
|
|
3974
4098
|
"&.number": {
|
|
3975
|
-
color:
|
|
4099
|
+
color: vars.color.code.token.number
|
|
3976
4100
|
},
|
|
3977
4101
|
"&.operator": {
|
|
3978
|
-
color:
|
|
4102
|
+
color: vars.color.code.token.operator
|
|
3979
4103
|
},
|
|
3980
4104
|
"&.prolog": {
|
|
3981
|
-
color:
|
|
4105
|
+
color: vars.color.code.token.prolog
|
|
3982
4106
|
},
|
|
3983
4107
|
"&.property": {
|
|
3984
|
-
color:
|
|
4108
|
+
color: vars.color.code.token.property
|
|
3985
4109
|
},
|
|
3986
4110
|
"&.pseudo-class": {
|
|
3987
|
-
color:
|
|
4111
|
+
color: vars.color.code.token.pseudoClass
|
|
3988
4112
|
},
|
|
3989
4113
|
"&.pseudo-element": {
|
|
3990
|
-
color:
|
|
4114
|
+
color: vars.color.code.token.pseudoElement
|
|
3991
4115
|
},
|
|
3992
4116
|
"&.punctuation": {
|
|
3993
|
-
color:
|
|
4117
|
+
color: vars.color.code.token.punctuation
|
|
3994
4118
|
},
|
|
3995
4119
|
"&.attr-value &:not(.attr-equals).punctuation": {
|
|
3996
4120
|
color: "inherit"
|
|
3997
4121
|
},
|
|
3998
4122
|
"&.regex": {
|
|
3999
|
-
color:
|
|
4123
|
+
color: vars.color.code.token.regex
|
|
4000
4124
|
},
|
|
4001
4125
|
"&.selector": {
|
|
4002
|
-
color:
|
|
4126
|
+
color: vars.color.code.token.selector
|
|
4003
4127
|
},
|
|
4004
4128
|
"&.string": {
|
|
4005
|
-
color:
|
|
4129
|
+
color: vars.color.code.token.string
|
|
4006
4130
|
},
|
|
4007
4131
|
"&.symbol": {
|
|
4008
|
-
color:
|
|
4132
|
+
color: vars.color.code.token.symbol
|
|
4009
4133
|
},
|
|
4010
4134
|
"&.tag": {
|
|
4011
|
-
color:
|
|
4135
|
+
color: vars.color.code.token.tag
|
|
4012
4136
|
},
|
|
4013
4137
|
"&.unit": {
|
|
4014
|
-
color:
|
|
4138
|
+
color: vars.color.code.token.unit
|
|
4015
4139
|
},
|
|
4016
4140
|
"&.url": {
|
|
4017
|
-
color:
|
|
4141
|
+
color: vars.color.code.token.url
|
|
4018
4142
|
},
|
|
4019
4143
|
"&.variable": {
|
|
4020
|
-
color:
|
|
4144
|
+
color: vars.color.code.token.variable
|
|
4021
4145
|
}
|
|
4022
4146
|
}
|
|
4023
4147
|
}
|
|
@@ -4245,6 +4369,7 @@ function toSnakeCase(str) {
|
|
|
4245
4369
|
function compileSystem() {
|
|
4246
4370
|
return compileStyle(systemStyle);
|
|
4247
4371
|
}
|
|
4372
|
+
const THEME_COLOR_SCHEMES = ["dark", "light"], THEME_COLOR_VARIANTS = ["tinted", "solid"];
|
|
4248
4373
|
function compileTheme_v3(theme2) {
|
|
4249
4374
|
return compileRule(":root", compileThemeProperties(theme2), {
|
|
4250
4375
|
keyframes: {},
|
|
@@ -4255,6 +4380,7 @@ function compileThemeProperties(theme2) {
|
|
|
4255
4380
|
return {
|
|
4256
4381
|
...buildAvatarThemeProperties(theme2),
|
|
4257
4382
|
...buildButtonThemeProperties(theme2),
|
|
4383
|
+
[varNames.card.shadow.outline]: px(theme2.card.shadow.outline),
|
|
4258
4384
|
...buildContainerThemeProperties(theme2),
|
|
4259
4385
|
...buildFontCodeThemeProperties(theme2),
|
|
4260
4386
|
...buildFontHeadingThemeProperties(theme2),
|
|
@@ -4269,161 +4395,166 @@ function compileThemeProperties(theme2) {
|
|
|
4269
4395
|
}
|
|
4270
4396
|
function buildAvatarThemeProperties(theme2) {
|
|
4271
4397
|
return {
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4398
|
+
[varNames.avatar.focusRing.offset]: px(theme2.avatar.focusRing.offset),
|
|
4399
|
+
[varNames.avatar.focusRing.width]: px(theme2.avatar.focusRing.width),
|
|
4400
|
+
[varNames.avatar.sizes[0].distance]: px(theme2.avatar.sizes[0].distance),
|
|
4401
|
+
[varNames.avatar.sizes[0].size]: px(theme2.avatar.sizes[0].size),
|
|
4402
|
+
[varNames.avatar.sizes[1].distance]: px(theme2.avatar.sizes[1].distance),
|
|
4403
|
+
[varNames.avatar.sizes[1].size]: px(theme2.avatar.sizes[1].size),
|
|
4404
|
+
[varNames.avatar.sizes[2].distance]: px(theme2.avatar.sizes[2].distance),
|
|
4405
|
+
[varNames.avatar.sizes[2].size]: px(theme2.avatar.sizes[2].size),
|
|
4406
|
+
[varNames.avatar.sizes[3].distance]: px(theme2.avatar.sizes[3].distance),
|
|
4407
|
+
[varNames.avatar.sizes[3].size]: px(theme2.avatar.sizes[3].size)
|
|
4282
4408
|
};
|
|
4283
4409
|
}
|
|
4284
4410
|
function buildButtonThemeProperties(theme2) {
|
|
4285
4411
|
return {
|
|
4286
|
-
|
|
4287
|
-
|
|
4288
|
-
|
|
4289
|
-
// [`--button-text-weight`]: theme.button.textWeight,
|
|
4412
|
+
[varNames.button.border.width]: px(theme2.button.border.width),
|
|
4413
|
+
[varNames.button.focusRing.offset]: px(theme2.button.focusRing.offset),
|
|
4414
|
+
[varNames.button.focusRing.width]: px(theme2.button.focusRing.width)
|
|
4290
4415
|
};
|
|
4291
4416
|
}
|
|
4292
4417
|
function buildContainerThemeProperties(theme2) {
|
|
4293
4418
|
return {
|
|
4294
|
-
|
|
4295
|
-
|
|
4296
|
-
|
|
4297
|
-
|
|
4298
|
-
|
|
4299
|
-
|
|
4419
|
+
[varNames.container[0]]: px(theme2.container[0]),
|
|
4420
|
+
[varNames.container[1]]: px(theme2.container[1]),
|
|
4421
|
+
[varNames.container[2]]: px(theme2.container[2]),
|
|
4422
|
+
[varNames.container[3]]: px(theme2.container[3]),
|
|
4423
|
+
[varNames.container[4]]: px(theme2.container[4]),
|
|
4424
|
+
[varNames.container[5]]: px(theme2.container[5])
|
|
4300
4425
|
};
|
|
4301
4426
|
}
|
|
4302
4427
|
function buildFontCodeThemeProperties(theme$1) {
|
|
4303
4428
|
const props = {
|
|
4304
|
-
|
|
4305
|
-
|
|
4306
|
-
|
|
4307
|
-
|
|
4308
|
-
|
|
4309
|
-
|
|
4429
|
+
[varNames.font.code.family]: theme$1.font.code.family,
|
|
4430
|
+
[varNames.font.code.featureSettings]: theme$1.font.code.featureSettings,
|
|
4431
|
+
[varNames.font.code.weights.regular]: `${theme$1.font.code.weights.regular}`,
|
|
4432
|
+
[varNames.font.code.weights.medium]: `${theme$1.font.code.weights.medium}`,
|
|
4433
|
+
[varNames.font.code.weights.semibold]: `${theme$1.font.code.weights.semibold}`,
|
|
4434
|
+
[varNames.font.code.weights.bold]: `${theme$1.font.code.weights.bold}`
|
|
4310
4435
|
};
|
|
4311
|
-
for (const size of theme.FONT_CODE_SIZE)
|
|
4312
|
-
|
|
4436
|
+
for (const size of theme.FONT_CODE_SIZE) {
|
|
4437
|
+
const v = varNames.font.code.sizes[size], t = theme$1.font.code.sizes[size];
|
|
4438
|
+
props[v.fontSize] = rem(t.fontSize), props[v.lineHeight] = rem(t.lineHeight), props[v.ascenderHeight] = px(t.ascenderHeight), props[v.descenderHeight] = px(t.descenderHeight), props[v.letterSpacing] = px(t.letterSpacing), props[v.iconSize] = px(t.iconSize);
|
|
4439
|
+
}
|
|
4313
4440
|
return props;
|
|
4314
4441
|
}
|
|
4315
4442
|
function buildFontHeadingThemeProperties(theme$1) {
|
|
4316
4443
|
const props = {
|
|
4317
|
-
|
|
4318
|
-
|
|
4319
|
-
|
|
4320
|
-
|
|
4321
|
-
|
|
4322
|
-
|
|
4444
|
+
[varNames.font.heading.family]: theme$1.font.heading.family,
|
|
4445
|
+
[varNames.font.heading.featureSettings]: theme$1.font.heading.featureSettings,
|
|
4446
|
+
[varNames.font.heading.weights.regular]: `${theme$1.font.heading.weights.regular}`,
|
|
4447
|
+
[varNames.font.heading.weights.medium]: `${theme$1.font.heading.weights.medium}`,
|
|
4448
|
+
[varNames.font.heading.weights.semibold]: `${theme$1.font.heading.weights.semibold}`,
|
|
4449
|
+
[varNames.font.heading.weights.bold]: `${theme$1.font.heading.weights.bold}`
|
|
4323
4450
|
};
|
|
4324
|
-
for (const size of theme.FONT_HEADING_SIZE)
|
|
4325
|
-
|
|
4451
|
+
for (const size of theme.FONT_HEADING_SIZE) {
|
|
4452
|
+
const v = varNames.font.heading.sizes[size], t = theme$1.font.heading.sizes[size];
|
|
4453
|
+
props[v.fontSize] = rem(t.fontSize), props[v.lineHeight] = rem(t.lineHeight), props[v.ascenderHeight] = px(t.ascenderHeight), props[v.descenderHeight] = px(t.descenderHeight), props[v.letterSpacing] = px(t.letterSpacing), props[v.iconSize] = px(t.iconSize);
|
|
4454
|
+
}
|
|
4326
4455
|
return props;
|
|
4327
4456
|
}
|
|
4328
4457
|
function buildFontLabelThemeProperties(theme$1) {
|
|
4329
4458
|
const props = {
|
|
4330
|
-
|
|
4331
|
-
|
|
4332
|
-
|
|
4333
|
-
|
|
4334
|
-
|
|
4335
|
-
|
|
4459
|
+
[varNames.font.label.family]: theme$1.font.label.family,
|
|
4460
|
+
[varNames.font.label.featureSettings]: theme$1.font.label.featureSettings,
|
|
4461
|
+
[varNames.font.label.weights.regular]: `${theme$1.font.label.weights.regular}`,
|
|
4462
|
+
[varNames.font.label.weights.medium]: `${theme$1.font.label.weights.medium}`,
|
|
4463
|
+
[varNames.font.label.weights.semibold]: `${theme$1.font.label.weights.semibold}`,
|
|
4464
|
+
[varNames.font.label.weights.bold]: `${theme$1.font.label.weights.bold}`
|
|
4336
4465
|
};
|
|
4337
|
-
for (const size of theme.FONT_LABEL_SIZE)
|
|
4338
|
-
|
|
4466
|
+
for (const size of theme.FONT_LABEL_SIZE) {
|
|
4467
|
+
const v = varNames.font.label.sizes[size], t = theme$1.font.label.sizes[size];
|
|
4468
|
+
props[v.fontSize] = rem(t.fontSize), props[v.lineHeight] = rem(t.lineHeight), props[v.ascenderHeight] = px(t.ascenderHeight), props[v.descenderHeight] = px(t.descenderHeight), props[v.letterSpacing] = px(t.letterSpacing), props[v.iconSize] = px(t.iconSize);
|
|
4469
|
+
}
|
|
4339
4470
|
return props;
|
|
4340
4471
|
}
|
|
4341
4472
|
function buildFontTextThemeProperties(theme$1) {
|
|
4342
4473
|
const props = {
|
|
4343
|
-
|
|
4344
|
-
|
|
4345
|
-
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
|
|
4474
|
+
[varNames.font.text.family]: theme$1.font.text.family,
|
|
4475
|
+
[varNames.font.text.featureSettings]: theme$1.font.text.featureSettings,
|
|
4476
|
+
[varNames.font.text.weights.regular]: `${theme$1.font.text.weights.regular}`,
|
|
4477
|
+
[varNames.font.text.weights.medium]: `${theme$1.font.text.weights.medium}`,
|
|
4478
|
+
[varNames.font.text.weights.semibold]: `${theme$1.font.text.weights.semibold}`,
|
|
4479
|
+
[varNames.font.text.weights.bold]: `${theme$1.font.text.weights.bold}`
|
|
4349
4480
|
};
|
|
4350
|
-
for (const size of theme.FONT_TEXT_SIZE)
|
|
4351
|
-
|
|
4481
|
+
for (const size of theme.FONT_TEXT_SIZE) {
|
|
4482
|
+
const v = varNames.font.text.sizes[size], t = theme$1.font.text.sizes[size];
|
|
4483
|
+
props[v.fontSize] = rem(t.fontSize), props[v.lineHeight] = rem(t.lineHeight), props[v.ascenderHeight] = px(t.ascenderHeight), props[v.descenderHeight] = px(t.descenderHeight), props[v.letterSpacing] = px(t.letterSpacing), props[v.iconSize] = px(t.iconSize);
|
|
4484
|
+
}
|
|
4352
4485
|
return props;
|
|
4353
4486
|
}
|
|
4354
4487
|
function buildInputThemeProperties(theme2) {
|
|
4355
4488
|
return {
|
|
4356
|
-
|
|
4357
|
-
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
|
|
4362
|
-
|
|
4363
|
-
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
|
|
4367
|
-
|
|
4368
|
-
|
|
4369
|
-
|
|
4370
|
-
|
|
4371
|
-
|
|
4372
|
-
|
|
4373
|
-
|
|
4374
|
-
|
|
4489
|
+
[varNames.input.border.width]: px(theme2.input.border.width),
|
|
4490
|
+
[varNames.input.checkbox.focusRing.offset]: px(theme2.input.checkbox.focusRing.offset),
|
|
4491
|
+
[varNames.input.checkbox.focusRing.width]: px(theme2.input.checkbox.focusRing.width),
|
|
4492
|
+
[varNames.input.checkbox.size]: px(theme2.input.checkbox.size),
|
|
4493
|
+
[varNames.input.radio.focusRing.offset]: px(theme2.input.radio.focusRing.offset),
|
|
4494
|
+
[varNames.input.radio.focusRing.width]: px(theme2.input.radio.focusRing.width),
|
|
4495
|
+
[varNames.input.radio.markSize]: px(theme2.input.radio.markSize),
|
|
4496
|
+
[varNames.input.radio.size]: px(theme2.input.radio.size),
|
|
4497
|
+
[varNames.input.select.focusRing.offset]: px(theme2.input.select.focusRing.offset),
|
|
4498
|
+
[varNames.input.select.focusRing.width]: px(theme2.input.select.focusRing.width),
|
|
4499
|
+
[varNames.input.switch.focusRing.offset]: px(theme2.input.switch.focusRing.offset),
|
|
4500
|
+
[varNames.input.switch.focusRing.width]: px(theme2.input.switch.focusRing.width),
|
|
4501
|
+
[varNames.input.switch.height]: px(theme2.input.switch.height),
|
|
4502
|
+
[varNames.input.switch.padding]: px(theme2.input.switch.padding),
|
|
4503
|
+
[varNames.input.switch.transitionDurationMs]: `${theme2.input.switch.transitionDurationMs}ms`,
|
|
4504
|
+
[varNames.input.switch.transitionTimingFunction]: theme2.input.switch.transitionTimingFunction,
|
|
4505
|
+
[varNames.input.switch.width]: px(theme2.input.switch.width),
|
|
4506
|
+
[varNames.input.text.focusRing.offset]: px(theme2.input.text.focusRing.offset),
|
|
4507
|
+
[varNames.input.text.focusRing.width]: px(theme2.input.text.focusRing.width)
|
|
4375
4508
|
};
|
|
4376
4509
|
}
|
|
4377
4510
|
function buildRadiusThemeProperties(theme2) {
|
|
4378
4511
|
return {
|
|
4379
|
-
|
|
4380
|
-
|
|
4381
|
-
|
|
4382
|
-
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
|
|
4512
|
+
[varNames.radius[0]]: rem(theme2.radius[0]),
|
|
4513
|
+
[varNames.radius[1]]: rem(theme2.radius[1]),
|
|
4514
|
+
[varNames.radius[2]]: rem(theme2.radius[2]),
|
|
4515
|
+
[varNames.radius[3]]: rem(theme2.radius[3]),
|
|
4516
|
+
[varNames.radius[4]]: rem(theme2.radius[4]),
|
|
4517
|
+
[varNames.radius[5]]: rem(theme2.radius[5]),
|
|
4518
|
+
[varNames.radius[6]]: rem(theme2.radius[6])
|
|
4386
4519
|
};
|
|
4387
4520
|
}
|
|
4388
4521
|
function buildShadowThemeProperties(theme2) {
|
|
4389
4522
|
return {
|
|
4390
|
-
|
|
4391
|
-
|
|
4392
|
-
|
|
4393
|
-
|
|
4394
|
-
|
|
4395
|
-
|
|
4396
|
-
|
|
4397
|
-
|
|
4398
|
-
|
|
4399
|
-
|
|
4400
|
-
|
|
4401
|
-
|
|
4402
|
-
|
|
4403
|
-
|
|
4404
|
-
|
|
4405
|
-
|
|
4406
|
-
|
|
4407
|
-
|
|
4408
|
-
"--shadow-5-ambient": toBoxShadow(theme2.shadow[5]?.ambient)
|
|
4523
|
+
[varNames.shadow[0].umbra]: toBoxShadow(theme2.shadow[0]?.umbra),
|
|
4524
|
+
[varNames.shadow[0].penumbra]: toBoxShadow(theme2.shadow[0]?.penumbra),
|
|
4525
|
+
[varNames.shadow[0].ambient]: toBoxShadow(theme2.shadow[0]?.ambient),
|
|
4526
|
+
[varNames.shadow[1].umbra]: toBoxShadow(theme2.shadow[1]?.umbra),
|
|
4527
|
+
[varNames.shadow[1].penumbra]: toBoxShadow(theme2.shadow[1]?.penumbra),
|
|
4528
|
+
[varNames.shadow[1].ambient]: toBoxShadow(theme2.shadow[1]?.ambient),
|
|
4529
|
+
[varNames.shadow[2].umbra]: toBoxShadow(theme2.shadow[2]?.umbra),
|
|
4530
|
+
[varNames.shadow[2].penumbra]: toBoxShadow(theme2.shadow[2]?.penumbra),
|
|
4531
|
+
[varNames.shadow[2].ambient]: toBoxShadow(theme2.shadow[2]?.ambient),
|
|
4532
|
+
[varNames.shadow[3].umbra]: toBoxShadow(theme2.shadow[3]?.umbra),
|
|
4533
|
+
[varNames.shadow[3].penumbra]: toBoxShadow(theme2.shadow[3]?.penumbra),
|
|
4534
|
+
[varNames.shadow[3].ambient]: toBoxShadow(theme2.shadow[3]?.ambient),
|
|
4535
|
+
[varNames.shadow[4].umbra]: toBoxShadow(theme2.shadow[4]?.umbra),
|
|
4536
|
+
[varNames.shadow[4].penumbra]: toBoxShadow(theme2.shadow[4]?.penumbra),
|
|
4537
|
+
[varNames.shadow[4].ambient]: toBoxShadow(theme2.shadow[4]?.ambient),
|
|
4538
|
+
[varNames.shadow[5].umbra]: toBoxShadow(theme2.shadow[5]?.umbra),
|
|
4539
|
+
[varNames.shadow[5].penumbra]: toBoxShadow(theme2.shadow[5]?.penumbra),
|
|
4540
|
+
[varNames.shadow[5].ambient]: toBoxShadow(theme2.shadow[5]?.ambient)
|
|
4409
4541
|
};
|
|
4410
4542
|
}
|
|
4411
4543
|
function buildSpaceThemeProperties(theme2) {
|
|
4412
4544
|
return {
|
|
4413
|
-
|
|
4414
|
-
|
|
4415
|
-
|
|
4416
|
-
|
|
4417
|
-
|
|
4418
|
-
|
|
4419
|
-
|
|
4420
|
-
|
|
4421
|
-
|
|
4422
|
-
|
|
4423
|
-
|
|
4545
|
+
[varNames.space[0]]: rem(theme2.space[0]),
|
|
4546
|
+
[varNames.space[0.5]]: rem(theme2.space[1] / 2),
|
|
4547
|
+
[varNames.space[1]]: rem(theme2.space[1]),
|
|
4548
|
+
[varNames.space[2]]: rem(theme2.space[2]),
|
|
4549
|
+
[varNames.space[3]]: rem(theme2.space[3]),
|
|
4550
|
+
[varNames.space[4]]: rem(theme2.space[4]),
|
|
4551
|
+
[varNames.space[5]]: rem(theme2.space[5]),
|
|
4552
|
+
[varNames.space[6]]: rem(theme2.space[6]),
|
|
4553
|
+
[varNames.space[7]]: rem(theme2.space[7]),
|
|
4554
|
+
[varNames.space[8]]: rem(theme2.space[8]),
|
|
4555
|
+
[varNames.space[9]]: rem(theme2.space[9])
|
|
4424
4556
|
};
|
|
4425
4557
|
}
|
|
4426
|
-
const THEME_COLOR_SCHEMES = ["dark", "light"], THEME_COLOR_VARIANTS = ["tinted", "solid"];
|
|
4427
4558
|
function buildColorThemeProperties(theme$1) {
|
|
4428
4559
|
const props = {};
|
|
4429
4560
|
for (const scheme of THEME_COLOR_SCHEMES)
|
|
@@ -4437,27 +4568,27 @@ function buildColorThemeProperties(theme$1) {
|
|
|
4437
4568
|
}));
|
|
4438
4569
|
for (const colorVariant of THEME_COLOR_VARIANTS)
|
|
4439
4570
|
for (const elementTone of theme.THEME_COLOR_STATE_TONES) {
|
|
4440
|
-
const
|
|
4441
|
-
bgVar:
|
|
4442
|
-
hue:
|
|
4571
|
+
const v = varNames.color[scheme][cardTone][colorVariant][elementTone], t = theme$1._tokens.color[cardTone].variant[colorVariant][elementTone], context = {
|
|
4572
|
+
bgVar: v.bg[0],
|
|
4573
|
+
hue: t._hue,
|
|
4443
4574
|
scheme
|
|
4444
4575
|
};
|
|
4445
4576
|
Object.assign(props, {
|
|
4446
|
-
[
|
|
4447
|
-
[
|
|
4448
|
-
[
|
|
4449
|
-
[
|
|
4450
|
-
[
|
|
4451
|
-
[
|
|
4452
|
-
[
|
|
4453
|
-
[
|
|
4454
|
-
[
|
|
4455
|
-
[
|
|
4456
|
-
[
|
|
4457
|
-
[
|
|
4458
|
-
[
|
|
4459
|
-
[
|
|
4460
|
-
[
|
|
4577
|
+
[v.bg[0]]: theme.renderColor(t.bg[0], context),
|
|
4578
|
+
[v.bg[1]]: `color-mix(in srgb, var(${v.bg[0]}), var(${v.bg[4]}) 25%)`,
|
|
4579
|
+
[v.bg[2]]: `color-mix(in srgb, var(${v.bg[0]}), var(${v.bg[4]}) 50%)`,
|
|
4580
|
+
[v.bg[3]]: `color-mix(in srgb, var(${v.bg[0]}), var(${v.bg[4]}) 75%)`,
|
|
4581
|
+
[v.bg[4]]: theme.renderColor(t.bg[4], context),
|
|
4582
|
+
[v.border[0]]: theme.renderColor(t.border[0], context),
|
|
4583
|
+
[v.border[1]]: `color-mix(in srgb, var(${v.border[0]}), var(${v.border[4]}) 25%)`,
|
|
4584
|
+
[v.border[2]]: `color-mix(in srgb, var(${v.border[0]}), var(${v.border[4]}) 50%)`,
|
|
4585
|
+
[v.border[3]]: `color-mix(in srgb, var(${v.border[0]}), var(${v.border[4]}) 75%)`,
|
|
4586
|
+
[v.border[4]]: theme.renderColor(t.border[4], context),
|
|
4587
|
+
[v.fg[0]]: theme.renderColor(t.fg[0], context),
|
|
4588
|
+
[v.fg[1]]: `color-mix(in srgb, var(${v.fg[0]}), var(${v.fg[4]}) 25%)`,
|
|
4589
|
+
[v.fg[2]]: `color-mix(in srgb, var(${v.fg[0]}), var(${v.fg[4]}) 50%)`,
|
|
4590
|
+
[v.fg[3]]: `color-mix(in srgb, var(${v.fg[0]}), var(${v.fg[4]}) 75%)`,
|
|
4591
|
+
[v.fg[4]]: theme.renderColor(t.fg[4], context)
|
|
4461
4592
|
});
|
|
4462
4593
|
}
|
|
4463
4594
|
}
|
|
@@ -4467,16 +4598,16 @@ function buildColorAvatarThemeProperties(theme$1, options) {
|
|
|
4467
4598
|
const {
|
|
4468
4599
|
scheme,
|
|
4469
4600
|
cardTone
|
|
4470
|
-
} = options,
|
|
4601
|
+
} = options, v = varNames.color[scheme][cardTone], t = theme$1._tokens.color[cardTone], props = {};
|
|
4471
4602
|
for (const hue of theme.HUES) {
|
|
4472
4603
|
const context = {
|
|
4473
|
-
bgVar:
|
|
4474
|
-
hue:
|
|
4604
|
+
bgVar: varNames.color.bg,
|
|
4605
|
+
hue: t.avatar[hue]._hue ?? hue,
|
|
4475
4606
|
scheme
|
|
4476
4607
|
};
|
|
4477
4608
|
Object.assign(props, {
|
|
4478
|
-
[
|
|
4479
|
-
[
|
|
4609
|
+
[v.avatar[hue].bg]: theme.renderColor(t.avatar[hue].bg, context),
|
|
4610
|
+
[v.avatar[hue].fg]: theme.renderColor(t.avatar[hue].fg, context)
|
|
4480
4611
|
});
|
|
4481
4612
|
}
|
|
4482
4613
|
return props;
|
|
@@ -4485,63 +4616,63 @@ function buildColorCardThemeProperties(theme$1, options) {
|
|
|
4485
4616
|
const {
|
|
4486
4617
|
scheme,
|
|
4487
4618
|
cardTone
|
|
4488
|
-
} = options,
|
|
4489
|
-
bgVar:
|
|
4490
|
-
hue:
|
|
4619
|
+
} = options, v = varNames.color[scheme][cardTone], t = theme$1._tokens.color[cardTone], context = {
|
|
4620
|
+
bgVar: varNames.color.bg,
|
|
4621
|
+
hue: t._hue,
|
|
4491
4622
|
scheme
|
|
4492
4623
|
};
|
|
4493
4624
|
return {
|
|
4494
4625
|
// backdrop
|
|
4495
|
-
[
|
|
4626
|
+
[v.backdrop]: theme.renderColor(t.backdrop, context),
|
|
4496
4627
|
// code
|
|
4497
|
-
[
|
|
4498
|
-
[
|
|
4628
|
+
[v.code.bg]: theme.renderColor(t.code.bg, context),
|
|
4629
|
+
[v.code.fg]: theme.renderColor(t.code.fg, context),
|
|
4499
4630
|
// code / token
|
|
4500
|
-
[
|
|
4501
|
-
[
|
|
4502
|
-
[
|
|
4503
|
-
[
|
|
4504
|
-
[
|
|
4505
|
-
[
|
|
4506
|
-
[
|
|
4507
|
-
[
|
|
4508
|
-
[
|
|
4509
|
-
[
|
|
4510
|
-
[
|
|
4511
|
-
[
|
|
4512
|
-
[
|
|
4513
|
-
[
|
|
4514
|
-
[
|
|
4515
|
-
[
|
|
4516
|
-
[
|
|
4517
|
-
[
|
|
4518
|
-
[
|
|
4519
|
-
[
|
|
4520
|
-
[
|
|
4521
|
-
[
|
|
4522
|
-
[
|
|
4523
|
-
[
|
|
4524
|
-
[
|
|
4525
|
-
[
|
|
4526
|
-
[
|
|
4527
|
-
[
|
|
4528
|
-
[
|
|
4529
|
-
[
|
|
4530
|
-
[
|
|
4531
|
-
[
|
|
4532
|
-
[
|
|
4533
|
-
[
|
|
4534
|
-
[
|
|
4535
|
-
[
|
|
4631
|
+
[v.code.token.atrule]: theme.renderColor(t.code.token.atrule, context),
|
|
4632
|
+
[v.code.token.attrName]: theme.renderColor(t.code.token.attrName, context),
|
|
4633
|
+
[v.code.token.attrValue]: theme.renderColor(t.code.token.attrValue, context),
|
|
4634
|
+
[v.code.token.attribute]: theme.renderColor(t.code.token.attribute, context),
|
|
4635
|
+
[v.code.token.boolean]: theme.renderColor(t.code.token.boolean, context),
|
|
4636
|
+
[v.code.token.builtin]: theme.renderColor(t.code.token.builtin, context),
|
|
4637
|
+
[v.code.token.cdata]: theme.renderColor(t.code.token.cdata, context),
|
|
4638
|
+
[v.code.token.char]: theme.renderColor(t.code.token.char, context),
|
|
4639
|
+
[v.code.token.className]: theme.renderColor(t.code.token.className, context),
|
|
4640
|
+
[v.code.token.class]: theme.renderColor(t.code.token.class, context),
|
|
4641
|
+
[v.code.token.comment]: theme.renderColor(t.code.token.comment, context),
|
|
4642
|
+
[v.code.token.constant]: theme.renderColor(t.code.token.constant, context),
|
|
4643
|
+
[v.code.token.deleted]: theme.renderColor(t.code.token.deleted, context),
|
|
4644
|
+
[v.code.token.doctype]: theme.renderColor(t.code.token.doctype, context),
|
|
4645
|
+
[v.code.token.entity]: theme.renderColor(t.code.token.entity, context),
|
|
4646
|
+
[v.code.token.function]: theme.renderColor(t.code.token.function, context),
|
|
4647
|
+
[v.code.token.hexcode]: theme.renderColor(t.code.token.hexcode, context),
|
|
4648
|
+
[v.code.token.id]: theme.renderColor(t.code.token.id, context),
|
|
4649
|
+
[v.code.token.important]: theme.renderColor(t.code.token.important, context),
|
|
4650
|
+
[v.code.token.inserted]: theme.renderColor(t.code.token.inserted, context),
|
|
4651
|
+
[v.code.token.keyword]: theme.renderColor(t.code.token.keyword, context),
|
|
4652
|
+
[v.code.token.number]: theme.renderColor(t.code.token.number, context),
|
|
4653
|
+
[v.code.token.operator]: theme.renderColor(t.code.token.operator, context),
|
|
4654
|
+
[v.code.token.prolog]: theme.renderColor(t.code.token.prolog, context),
|
|
4655
|
+
[v.code.token.property]: theme.renderColor(t.code.token.property, context),
|
|
4656
|
+
[v.code.token.pseudoClass]: theme.renderColor(t.code.token.pseudoClass, context),
|
|
4657
|
+
[v.code.token.pseudoElement]: theme.renderColor(t.code.token.pseudoElement, context),
|
|
4658
|
+
[v.code.token.punctuation]: theme.renderColor(t.code.token.punctuation, context),
|
|
4659
|
+
[v.code.token.regex]: theme.renderColor(t.code.token.regex, context),
|
|
4660
|
+
[v.code.token.selector]: theme.renderColor(t.code.token.selector, context),
|
|
4661
|
+
[v.code.token.string]: theme.renderColor(t.code.token.string, context),
|
|
4662
|
+
[v.code.token.symbol]: theme.renderColor(t.code.token.symbol, context),
|
|
4663
|
+
[v.code.token.tag]: theme.renderColor(t.code.token.tag, context),
|
|
4664
|
+
[v.code.token.unit]: theme.renderColor(t.code.token.unit, context),
|
|
4665
|
+
[v.code.token.url]: theme.renderColor(t.code.token.url, context),
|
|
4666
|
+
[v.code.token.variable]: theme.renderColor(t.code.token.variable, context),
|
|
4536
4667
|
// focus ring
|
|
4537
|
-
[
|
|
4668
|
+
[v.focusRing]: theme.renderColor(t.focusRing, context),
|
|
4538
4669
|
// link
|
|
4539
|
-
[
|
|
4670
|
+
[v.link.fg]: theme.renderColor(t.link.fg, context),
|
|
4540
4671
|
// shadow
|
|
4541
|
-
[
|
|
4542
|
-
[
|
|
4543
|
-
[
|
|
4544
|
-
[
|
|
4672
|
+
[v.shadow.outline]: theme.renderColor(t.shadow.outline, context),
|
|
4673
|
+
[v.shadow.umbra]: theme.renderColor(t.shadow.umbra, context),
|
|
4674
|
+
[v.shadow.penumbra]: theme.renderColor(t.shadow.penumbra, context),
|
|
4675
|
+
[v.shadow.ambient]: theme.renderColor(t.shadow.ambient, context)
|
|
4545
4676
|
};
|
|
4546
4677
|
}
|
|
4547
4678
|
function compileTheme(theme2) {
|
|
@@ -4620,6 +4751,9 @@ function _arrow() {
|
|
|
4620
4751
|
function _arrowStroke() {
|
|
4621
4752
|
return _comp("arrow-stroke");
|
|
4622
4753
|
}
|
|
4754
|
+
function _arrowStrokeMask() {
|
|
4755
|
+
return _comp("arrow-stroke-mask");
|
|
4756
|
+
}
|
|
4623
4757
|
function _arrowShape() {
|
|
4624
4758
|
return _comp("arrow-shape");
|
|
4625
4759
|
}
|
|
@@ -4776,9 +4910,12 @@ function tooltipCard() {
|
|
|
4776
4910
|
function srOnly() {
|
|
4777
4911
|
return composeClassNames("sr-only");
|
|
4778
4912
|
}
|
|
4913
|
+
exports.BREAKPOINTS = BREAKPOINTS;
|
|
4914
|
+
exports.PREFIX = PREFIX;
|
|
4779
4915
|
exports._arrow = _arrow;
|
|
4780
4916
|
exports._arrowShape = _arrowShape;
|
|
4781
4917
|
exports._arrowStroke = _arrowStroke;
|
|
4918
|
+
exports._arrowStrokeMask = _arrowStrokeMask;
|
|
4782
4919
|
exports._input = _input;
|
|
4783
4920
|
exports._inputElement = _inputElement;
|
|
4784
4921
|
exports._inputPresentation = _inputPresentation;
|