@sanity/ui 3.0.0-static.16 → 3.0.0-static.17
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/README.md +2 -4
- package/bin/{ui.js → sanity-ui.cjs} +1 -1
- package/dist/_chunks-cjs/{_visual-editing.js → _visual-editing.cjs} +4 -4
- package/dist/_chunks-cjs/_visual-editing.cjs.map +1 -0
- package/dist/_chunks-cjs/{buildCommand.js → buildCommand.cjs} +26 -10
- package/dist/_chunks-cjs/buildCommand.cjs.map +1 -0
- package/dist/_chunks-cjs/{refractor.js → refractor.cjs} +1 -1
- package/dist/_chunks-cjs/refractor.cjs.map +1 -0
- package/dist/_chunks-es/{_visual-editing.mjs → _visual-editing.js} +4 -4
- package/dist/_chunks-es/_visual-editing.js.map +1 -0
- package/dist/_chunks-es/{refractor.mjs → refractor.js} +1 -1
- package/dist/_chunks-es/refractor.js.map +1 -0
- package/dist/_visual-editing.cjs +30 -0
- package/dist/_visual-editing.cjs.map +1 -0
- package/dist/_visual-editing.js +29 -29
- package/dist/_visual-editing.js.map +1 -1
- package/dist/{cli.js → cli.cjs} +4 -4
- package/dist/cli.cjs.map +1 -0
- package/dist/{css.mjs → css.cjs} +490 -499
- package/dist/css.cjs.map +1 -0
- package/dist/{css.d.mts → css.d.cts} +19 -23
- package/dist/css.d.ts +19 -23
- package/dist/css.js +490 -497
- package/dist/css.js.map +1 -1
- package/dist/{index.mjs → index.cjs} +368 -367
- package/dist/{index.mjs.map → index.cjs.map} +1 -1
- package/dist/index.js +366 -367
- package/dist/index.js.map +1 -1
- package/dist/{theme.mjs → theme.cjs} +219 -196
- package/dist/theme.cjs.map +1 -0
- package/dist/{theme.d.mts → theme.d.cts} +2 -0
- package/dist/theme.d.ts +2 -0
- package/dist/theme.js +218 -195
- package/dist/theme.js.map +1 -1
- package/dist/{sanity-palette.css → ui-palette.css} +1 -1
- package/dist/ui-palette.min.css +1 -0
- package/dist/{system.css → ui-system.css} +258 -140
- package/dist/ui-system.min.css +1 -0
- package/dist/{sanity-theme.css → ui-theme.css} +199 -199
- package/dist/ui-theme.min.css +1 -0
- package/dist/ui.css +29152 -0
- package/dist/ui.min.css +1 -0
- package/package.json +20 -20
- package/src/cli/buildCommand.ts +55 -20
- package/src/cli/index.ts +1 -1
- package/src/core/StyleTags.tsx +4 -4
- package/src/core/components/autocomplete/__workshop__/async.tsx +2 -2
- package/src/core/components/autocomplete/__workshop__/custom.tsx +2 -2
- package/src/core/components/autocomplete/__workshop__/focusAndBlur.tsx +3 -3
- package/src/core/primitives/button/__workshop__/custom.tsx +18 -41
- package/src/core/primitives/button/button.tsx +3 -1
- package/src/core/primitives/card/__workshop__/asButton.tsx +0 -9
- package/src/core/primitives/card/__workshop__/interactive.tsx +0 -1
- package/src/core/primitives/card/__workshop__/props.tsx +0 -3
- package/src/core/primitives/card/__workshop__/selected.tsx +6 -37
- package/src/core/primitives/heading/__workshop__/opticalAlignment.tsx +1 -1
- package/src/core/primitives/heading/__workshop__/plain.tsx +1 -8
- package/src/core/primitives/label/__workshop__/plain.tsx +1 -9
- package/src/core/primitives/text/__workshop__/example.tsx +1 -9
- package/src/css/{compilePalette.ts → _compilePalette.ts} +2 -2
- package/src/css/{compileSystem.ts → _compileSystem.ts} +1 -1
- package/src/css/{compileTheme.ts → _compileTheme.ts} +3 -3
- package/src/css/{compileTheme_v3.ts → _compileTheme_v3.ts} +7 -1
- package/src/css/_system.style.ts +1 -0
- package/src/css/index.ts +3 -3
- package/src/css/primitives/button/button.style.ts +23 -9
- package/src/css/primitives/button/button.ts +1 -12
- package/src/css/primitives/button/types.ts +1 -6
- package/src/css/primitives/card/card.style.ts +12 -21
- package/src/css/primitives/kbd/kbd.style.ts +3 -6
- package/src/css/types.ts +9 -9
- package/src/theme/v3/color/buildColor_v3.ts +53 -25
- package/src/theme/v3/color/card.ts +0 -42
- package/src/theme/v3/color/renderColor.test.ts +1 -0
- package/src/theme/v3/color/renderColor.ts +9 -2
- package/src/theme/v3/color/token.ts +1 -0
- package/src/theme/v3/defaultTokens.ts +7 -2
- package/dist/_chunks-cjs/_visual-editing.js.map +0 -1
- package/dist/_chunks-cjs/buildCommand.js.map +0 -1
- package/dist/_chunks-cjs/refractor.js.map +0 -1
- package/dist/_chunks-es/_visual-editing.mjs.map +0 -1
- package/dist/_chunks-es/refractor.mjs.map +0 -1
- package/dist/_visual-editing.mjs +0 -30
- package/dist/_visual-editing.mjs.map +0 -1
- package/dist/cli.js.map +0 -1
- package/dist/css.mjs.map +0 -1
- package/dist/sanity-palette.min.css +0 -1
- package/dist/sanity-theme.min.css +0 -1
- package/dist/system.min.css +0 -1
- package/dist/theme.mjs.map +0 -1
- package/src/css/primitives/button/_constants.ts +0 -17
- /package/dist/{_visual-editing.d.mts → _visual-editing.d.cts} +0 -0
- /package/dist/{cli.d.ts → cli.d.cts} +0 -0
- /package/dist/{index.d.mts → index.d.cts} +0 -0
package/dist/css.js
CHANGED
|
@@ -1,83 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var color = require("@sanity/color"), theme = require("@sanity/ui/theme");
|
|
4
|
-
function _resp(prefix, prop) {
|
|
5
|
-
if (!(prop === void 0 || prop === !1))
|
|
6
|
-
return Array.isArray(prop) ? prop.map((value, index) => {
|
|
7
|
-
if (value === void 0 || typeof prop == "boolean" && prop === !1) return;
|
|
8
|
-
const className = (typeof value == "boolean" ? [prefix] : [prefix, value]).filter((s) => s === 0 || !!s).join("-").replace(/\./g, "_");
|
|
9
|
-
return index === 0 ? className : `${index}:${className}`;
|
|
10
|
-
}).filter(Boolean).join(" ") : (typeof prop == "boolean" ? [prefix] : [prefix, prop]).filter((s) => s === 0 || !!s).join("-").replace(/\./g, "_");
|
|
11
|
-
}
|
|
12
|
-
function _getClassNames(...classNames) {
|
|
13
|
-
return classNames.map((n) => typeof n == "string" && n.trim()).filter(Boolean).join(" ").split(" ");
|
|
14
|
-
}
|
|
15
|
-
function composeClassNames(...classNames) {
|
|
16
|
-
return unique(_getClassNames(...classNames)).join(" ") || void 0;
|
|
17
|
-
}
|
|
18
|
-
function unique(array) {
|
|
19
|
-
return Array.from(new Set(array));
|
|
20
|
-
}
|
|
21
|
-
function border(props) {
|
|
22
|
-
return composeClassNames(_resp("border", props.border), _resp("border-t", props.borderTop), _resp("border-r", props.borderRight), _resp("border-b", props.borderBottom), _resp("border-l", props.borderLeft));
|
|
23
|
-
}
|
|
24
|
-
function display(props) {
|
|
25
|
-
return composeClassNames(_resp(void 0, props.display));
|
|
26
|
-
}
|
|
27
|
-
function flex(props) {
|
|
28
|
-
return composeClassNames(_resp("flex-align", props.align), _resp("f", props.direction), _resp("flex-justify", props.justify), _resp("flex", props.wrap));
|
|
29
|
-
}
|
|
30
|
-
function flexItem(props) {
|
|
31
|
-
return composeClassNames(_resp("f", props.flex));
|
|
32
|
-
}
|
|
33
|
-
function font(props) {
|
|
34
|
-
return composeClassNames("font", props.weight && `font-${props.weight}`);
|
|
35
|
-
}
|
|
36
|
-
function gap(props) {
|
|
37
|
-
return composeClassNames(_resp("g", props.gap), _resp("gx", props.gapX), _resp("gy", props.gapY));
|
|
38
|
-
}
|
|
39
|
-
function grid(props) {
|
|
40
|
-
return composeClassNames(_resp("auto-cols", props.autoCols), _resp("auto-flow", props.autoFlow), _resp("auto-rows", props.autoRows), _resp("cols", props.columns), _resp("rows", props.rows));
|
|
41
|
-
}
|
|
42
|
-
function gridItem(props) {
|
|
43
|
-
return composeClassNames(_resp("col", props.column), _resp("col-start", props.columnStart), _resp("col-end", props.columnEnd), _resp("row", props.row), _resp("row-start", props.rowStart), _resp("row-end", props.rowEnd));
|
|
44
|
-
}
|
|
45
|
-
function height(props) {
|
|
46
|
-
return composeClassNames(_resp("h", props.height));
|
|
47
|
-
}
|
|
48
|
-
function inset(props) {
|
|
49
|
-
return composeClassNames(_resp("inset", props.inset), _resp("top", props.insetTop), _resp("right", props.insetRight), _resp("bottom", props.insetBottom), _resp("left", props.insetLeft));
|
|
50
|
-
}
|
|
51
|
-
function margin(props) {
|
|
52
|
-
return composeClassNames(_resp("m", props.margin), _resp("mx", props.marginX), _resp("my", props.marginY), _resp("mt", props.marginTop), _resp("mr", props.marginRight), _resp("mb", props.marginBottom), _resp("ml", props.marginLeft));
|
|
53
|
-
}
|
|
54
|
-
function maxWidth(props) {
|
|
55
|
-
return _resp("max-w", props.maxWidth) ?? "";
|
|
56
|
-
}
|
|
57
|
-
function minWidth(props) {
|
|
58
|
-
return _resp("min-w", props.minWidth) ?? "";
|
|
59
|
-
}
|
|
60
|
-
function overflow(props) {
|
|
61
|
-
return composeClassNames(_resp("overflow", props.overflow), _resp("overflow-x", props.overflowX), _resp("overflow-y", props.overflowY));
|
|
62
|
-
}
|
|
63
|
-
function padding(props) {
|
|
64
|
-
return composeClassNames(_resp("p", props.padding), _resp("px", props.paddingX), _resp("py", props.paddingY), _resp("pt", props.paddingTop), _resp("pr", props.paddingRight), _resp("pb", props.paddingBottom), _resp("pl", props.paddingLeft));
|
|
65
|
-
}
|
|
66
|
-
function pointerEvents(props) {
|
|
67
|
-
return composeClassNames(props.pointerEvents && `pointer-events-${props.pointerEvents}`);
|
|
68
|
-
}
|
|
69
|
-
function position(props) {
|
|
70
|
-
return composeClassNames(_resp("position", props.position));
|
|
71
|
-
}
|
|
72
|
-
function radius(props) {
|
|
73
|
-
return composeClassNames(_resp("r", props.radius));
|
|
74
|
-
}
|
|
75
|
-
function shadow(props) {
|
|
76
|
-
return composeClassNames(_resp("shadow", props.shadow));
|
|
77
|
-
}
|
|
78
|
-
function textAlign(props) {
|
|
79
|
-
return composeClassNames(_resp("text-align", props.textAlign));
|
|
80
|
-
}
|
|
1
|
+
import { COLOR_HUES, COLOR_TINTS, color } from "@sanity/color";
|
|
2
|
+
import { SPACE, SHADOW, RADIUS, FONT_TEXT_SIZE, FONT_LABEL_SIZE, FONT_HEADING_SIZE, FONT_CODE_SIZE, THEME_COLOR_CARD_TONES, AVATAR_SIZE, THEME_COLOR_STATE_TONES, HUES, TINTS, THEME_COLOR_AVATAR_COLORS, THEME_COLOR_SCHEMES as THEME_COLOR_SCHEMES$1, renderColor } from "@sanity/ui/theme";
|
|
81
3
|
const BREAKPOINTS = {
|
|
82
4
|
1: 360,
|
|
83
5
|
2: 600,
|
|
@@ -86,19 +8,6 @@ const BREAKPOINTS = {
|
|
|
86
8
|
5: 1800,
|
|
87
9
|
6: 2400
|
|
88
10
|
}, PREFIX = "s-";
|
|
89
|
-
function scopeClassName(className) {
|
|
90
|
-
if (className !== void 0)
|
|
91
|
-
return `${PREFIX}${className.trim()}`;
|
|
92
|
-
}
|
|
93
|
-
function _comp(...classNames) {
|
|
94
|
-
return _getClassNames(...classNames).filter(Boolean).map(scopeClassName).join(" ") || void 0;
|
|
95
|
-
}
|
|
96
|
-
function textOverflow(props) {
|
|
97
|
-
return _comp(props.textOverflow && `text-overflow-${props.textOverflow}`);
|
|
98
|
-
}
|
|
99
|
-
function width(props) {
|
|
100
|
-
return _resp("w", props.width) ?? "";
|
|
101
|
-
}
|
|
102
11
|
function isRecord(value) {
|
|
103
12
|
return value !== null && typeof value == "object" && !Array.isArray(value);
|
|
104
13
|
}
|
|
@@ -210,7 +119,7 @@ const varNames = {
|
|
|
210
119
|
width: "--avatar-focus-ring-width"
|
|
211
120
|
},
|
|
212
121
|
size: "--avatar-size",
|
|
213
|
-
sizes:
|
|
122
|
+
sizes: AVATAR_SIZE.reduce((acc, size) => ({
|
|
214
123
|
...acc,
|
|
215
124
|
[size]: {
|
|
216
125
|
distance: `--avatar-${size}-distance`,
|
|
@@ -351,15 +260,15 @@ const varNames = {
|
|
|
351
260
|
variant: "tinted"
|
|
352
261
|
}),
|
|
353
262
|
// tone scopes
|
|
354
|
-
...
|
|
263
|
+
...THEME_COLOR_CARD_TONES.reduce((acc, tone) => (acc[tone] = buildColorCardVarNames({
|
|
355
264
|
tone
|
|
356
265
|
}), acc), {}),
|
|
357
266
|
// scheme scopes
|
|
358
|
-
dark:
|
|
267
|
+
dark: THEME_COLOR_CARD_TONES.reduce((acc, tone) => (acc[tone] = buildColorCardVarNames({
|
|
359
268
|
scheme: "dark",
|
|
360
269
|
tone
|
|
361
270
|
}), acc), {}),
|
|
362
|
-
light:
|
|
271
|
+
light: THEME_COLOR_CARD_TONES.reduce((acc, tone) => (acc[tone] = buildColorCardVarNames({
|
|
363
272
|
scheme: "light",
|
|
364
273
|
tone
|
|
365
274
|
}), acc), {})
|
|
@@ -376,7 +285,7 @@ const varNames = {
|
|
|
376
285
|
code: {
|
|
377
286
|
family: "--font-code-family",
|
|
378
287
|
featureSettings: "--font-code-feature-settings",
|
|
379
|
-
sizes:
|
|
288
|
+
sizes: FONT_CODE_SIZE.reduce((acc, size) => ({
|
|
380
289
|
...acc,
|
|
381
290
|
[size]: {
|
|
382
291
|
fontSize: `--font-code-${size}-size`,
|
|
@@ -397,7 +306,7 @@ const varNames = {
|
|
|
397
306
|
heading: {
|
|
398
307
|
family: "--font-heading-family",
|
|
399
308
|
featureSettings: "--font-heading-feature-settings",
|
|
400
|
-
sizes:
|
|
309
|
+
sizes: FONT_HEADING_SIZE.reduce((acc, size) => ({
|
|
401
310
|
...acc,
|
|
402
311
|
[size]: {
|
|
403
312
|
fontSize: `--font-heading-${size}-size`,
|
|
@@ -418,7 +327,7 @@ const varNames = {
|
|
|
418
327
|
label: {
|
|
419
328
|
family: "--font-label-family",
|
|
420
329
|
featureSettings: "--font-label-feature-settings",
|
|
421
|
-
sizes:
|
|
330
|
+
sizes: FONT_LABEL_SIZE.reduce((acc, size) => ({
|
|
422
331
|
...acc,
|
|
423
332
|
[size]: {
|
|
424
333
|
fontSize: `--font-label-${size}-size`,
|
|
@@ -439,7 +348,7 @@ const varNames = {
|
|
|
439
348
|
text: {
|
|
440
349
|
family: "--font-text-family",
|
|
441
350
|
featureSettings: "--font-text-feature-settings",
|
|
442
|
-
sizes:
|
|
351
|
+
sizes: FONT_TEXT_SIZE.reduce((acc, size) => ({
|
|
443
352
|
...acc,
|
|
444
353
|
[size]: {
|
|
445
354
|
fontSize: `--font-text-${size}-size`,
|
|
@@ -508,19 +417,19 @@ const varNames = {
|
|
|
508
417
|
gap: "--input-gap",
|
|
509
418
|
padding: "--input-padding"
|
|
510
419
|
},
|
|
511
|
-
radius: Object.fromEntries(
|
|
512
|
-
shadow: Object.fromEntries(
|
|
420
|
+
radius: Object.fromEntries(RADIUS.map((radius2) => [radius2, `--radius-${radius2}`])),
|
|
421
|
+
shadow: Object.fromEntries(SHADOW.map((shadow2) => [shadow2, {
|
|
513
422
|
umbra: `--shadow-${shadow2}-umbra`,
|
|
514
423
|
penumbra: `--shadow-${shadow2}-penumbra`,
|
|
515
424
|
ambient: `--shadow-${shadow2}-ambient`
|
|
516
425
|
}])),
|
|
517
|
-
space: Object.fromEntries(
|
|
426
|
+
space: Object.fromEntries(SPACE.map((space) => [space, `--space-${String(space).replace(".", "_")}`])),
|
|
518
427
|
// color
|
|
519
428
|
black: "--black",
|
|
520
429
|
white: "--white",
|
|
521
|
-
...
|
|
430
|
+
...COLOR_HUES.reduce((acc, hue) => {
|
|
522
431
|
const tints = {};
|
|
523
|
-
for (const tint of
|
|
432
|
+
for (const tint of COLOR_TINTS)
|
|
524
433
|
tints[tint] = `--${hue}-${tint}`;
|
|
525
434
|
return acc[hue] = tints, acc;
|
|
526
435
|
}, {})
|
|
@@ -670,7 +579,7 @@ function buildColorVariantVarNames(options) {
|
|
|
670
579
|
4: `${prefix}-fg-4`
|
|
671
580
|
}
|
|
672
581
|
};
|
|
673
|
-
for (const elementTone of
|
|
582
|
+
for (const elementTone of THEME_COLOR_STATE_TONES) {
|
|
674
583
|
const _prefix = scheme && tone ? `--color-${scheme}-${tone}-${variant}-${elementTone}` : tone ? `--color-${tone}-${variant}-${elementTone}` : `--color-${variant}-${elementTone}`;
|
|
675
584
|
vars2[elementTone] = {
|
|
676
585
|
bg: {
|
|
@@ -698,10 +607,10 @@ function buildColorVariantVarNames(options) {
|
|
|
698
607
|
}
|
|
699
608
|
return vars2;
|
|
700
609
|
}
|
|
701
|
-
function
|
|
610
|
+
function _compilePalette() {
|
|
702
611
|
return _compileStyle({
|
|
703
612
|
layers: {
|
|
704
|
-
|
|
613
|
+
palette: {
|
|
705
614
|
":root": compilePaletteProperties()
|
|
706
615
|
}
|
|
707
616
|
}
|
|
@@ -709,12 +618,12 @@ function compilePalette() {
|
|
|
709
618
|
}
|
|
710
619
|
function compilePaletteProperties() {
|
|
711
620
|
const rules2 = {
|
|
712
|
-
[varNames.black]: color.
|
|
713
|
-
[varNames.white]: color.
|
|
621
|
+
[varNames.black]: color.black.hex,
|
|
622
|
+
[varNames.white]: color.white.hex
|
|
714
623
|
};
|
|
715
|
-
for (const hue of
|
|
716
|
-
for (const tint of
|
|
717
|
-
rules2[varNames[hue][tint]] = color
|
|
624
|
+
for (const hue of HUES)
|
|
625
|
+
for (const tint of TINTS)
|
|
626
|
+
rules2[varNames[hue][tint]] = color[hue][tint].hex;
|
|
718
627
|
return rules2;
|
|
719
628
|
}
|
|
720
629
|
function _mergeStyles(styles) {
|
|
@@ -760,13 +669,13 @@ function _responsiveRule(rules2, _name, properties) {
|
|
|
760
669
|
};
|
|
761
670
|
}
|
|
762
671
|
const darkColorVars = {};
|
|
763
|
-
for (const tone of
|
|
672
|
+
for (const tone of THEME_COLOR_CARD_TONES)
|
|
764
673
|
darkColorVars[tone] = buildColorCardVars({
|
|
765
674
|
scheme: "dark",
|
|
766
675
|
tone
|
|
767
676
|
});
|
|
768
677
|
const lightColorVars = {};
|
|
769
|
-
for (const tone of
|
|
678
|
+
for (const tone of THEME_COLOR_CARD_TONES)
|
|
770
679
|
lightColorVars[tone] = buildColorCardVars({
|
|
771
680
|
scheme: "light",
|
|
772
681
|
tone
|
|
@@ -888,7 +797,7 @@ const colorVars = {
|
|
|
888
797
|
tinted: buildColorVariantVars({
|
|
889
798
|
variant: "tinted"
|
|
890
799
|
}),
|
|
891
|
-
...
|
|
800
|
+
...THEME_COLOR_CARD_TONES.reduce((acc, tone) => ({
|
|
892
801
|
...acc,
|
|
893
802
|
[tone]: buildColorCardVars({
|
|
894
803
|
tone
|
|
@@ -900,7 +809,7 @@ const colorVars = {
|
|
|
900
809
|
avatar: {
|
|
901
810
|
distance: `var(${varNames.avatar.distance})`,
|
|
902
811
|
size: `var(${varNames.avatar.size})`,
|
|
903
|
-
sizes:
|
|
812
|
+
sizes: AVATAR_SIZE.reduce((acc, size) => ({
|
|
904
813
|
...acc,
|
|
905
814
|
[size]: {
|
|
906
815
|
size: `var(${varNames.avatar.sizes[size].size})`,
|
|
@@ -925,7 +834,7 @@ const colorVars = {
|
|
|
925
834
|
font: {
|
|
926
835
|
code: {
|
|
927
836
|
family: `var(${varNames.font.code.family})`,
|
|
928
|
-
sizes:
|
|
837
|
+
sizes: FONT_CODE_SIZE.reduce((acc, size) => ({
|
|
929
838
|
...acc,
|
|
930
839
|
[size]: {
|
|
931
840
|
fontSize: `var(${varNames.font.code.sizes[size].fontSize})`,
|
|
@@ -945,7 +854,7 @@ const colorVars = {
|
|
|
945
854
|
},
|
|
946
855
|
heading: {
|
|
947
856
|
family: `var(${varNames.font.heading.family})`,
|
|
948
|
-
sizes:
|
|
857
|
+
sizes: FONT_HEADING_SIZE.reduce((acc, size) => ({
|
|
949
858
|
...acc,
|
|
950
859
|
[size]: {
|
|
951
860
|
fontSize: `var(${varNames.font.heading.sizes[size].fontSize})`,
|
|
@@ -965,7 +874,7 @@ const colorVars = {
|
|
|
965
874
|
},
|
|
966
875
|
label: {
|
|
967
876
|
family: `var(${varNames.font.label.family})`,
|
|
968
|
-
sizes:
|
|
877
|
+
sizes: FONT_LABEL_SIZE.reduce((acc, size) => ({
|
|
969
878
|
...acc,
|
|
970
879
|
[size]: {
|
|
971
880
|
fontSize: `var(${varNames.font.label.sizes[size].fontSize})`,
|
|
@@ -985,7 +894,7 @@ const colorVars = {
|
|
|
985
894
|
},
|
|
986
895
|
text: {
|
|
987
896
|
family: `var(${varNames.font.text.family})`,
|
|
988
|
-
sizes:
|
|
897
|
+
sizes: FONT_TEXT_SIZE.reduce((acc, size) => ({
|
|
989
898
|
...acc,
|
|
990
899
|
[size]: {
|
|
991
900
|
fontSize: `var(${varNames.font.text.sizes[size].fontSize})`,
|
|
@@ -1020,19 +929,19 @@ const colorVars = {
|
|
|
1020
929
|
}
|
|
1021
930
|
}
|
|
1022
931
|
},
|
|
1023
|
-
radius: Object.fromEntries(
|
|
1024
|
-
shadow: Object.fromEntries(
|
|
932
|
+
radius: Object.fromEntries(RADIUS.map((radius2) => [radius2, `var(${varNames.radius[radius2]})`])),
|
|
933
|
+
shadow: Object.fromEntries(SHADOW.map((shadow2) => [shadow2, {
|
|
1025
934
|
umbra: `var(${varNames.shadow[shadow2].umbra})`,
|
|
1026
935
|
penumbra: `var(${varNames.shadow[shadow2].penumbra})`,
|
|
1027
936
|
ambient: `var(${varNames.shadow[shadow2].ambient})`
|
|
1028
937
|
}])),
|
|
1029
|
-
space: Object.fromEntries(
|
|
938
|
+
space: Object.fromEntries(SPACE.map((space) => [space, `var(${varNames.space[space]})`])),
|
|
1030
939
|
// color
|
|
1031
940
|
black: `var(${varNames.black})`,
|
|
1032
941
|
white: `var(${varNames.white})`,
|
|
1033
|
-
...
|
|
942
|
+
...COLOR_HUES.reduce((acc, hue) => {
|
|
1034
943
|
const tints = {};
|
|
1035
|
-
for (const tint of
|
|
944
|
+
for (const tint of COLOR_TINTS)
|
|
1036
945
|
tints[tint] = `var(--${hue}-${tint})`;
|
|
1037
946
|
return acc[hue] = tints, acc;
|
|
1038
947
|
}, {})
|
|
@@ -1044,7 +953,7 @@ function buildColorCardVars(props) {
|
|
|
1044
953
|
} = props, prefix = scheme ? varNames.color[scheme][tone] : varNames.color[tone];
|
|
1045
954
|
return {
|
|
1046
955
|
avatar: {
|
|
1047
|
-
...
|
|
956
|
+
...THEME_COLOR_AVATAR_COLORS.reduce((acc, color2) => ({
|
|
1048
957
|
...acc,
|
|
1049
958
|
[color2]: {
|
|
1050
959
|
bg: `var(${prefix.avatar[color2].bg})`,
|
|
@@ -1153,7 +1062,7 @@ function buildColorVariantVars(options) {
|
|
|
1153
1062
|
4: `var(${_prefix}-fg-4)`
|
|
1154
1063
|
}
|
|
1155
1064
|
};
|
|
1156
|
-
for (const elementTone of
|
|
1065
|
+
for (const elementTone of THEME_COLOR_STATE_TONES) {
|
|
1157
1066
|
const prefix = scheme && tone ? `--color-${scheme}-${tone}-${variant}-${elementTone}` : tone ? `--color-${tone}-${variant}-${elementTone}` : `--color-${variant}-${elementTone}`;
|
|
1158
1067
|
vars2[elementTone] = {
|
|
1159
1068
|
bg: {
|
|
@@ -1433,15 +1342,15 @@ const flexStyle = {
|
|
|
1433
1342
|
primitive: primitive$q
|
|
1434
1343
|
}
|
|
1435
1344
|
}, util$n = {};
|
|
1436
|
-
for (const space of
|
|
1345
|
+
for (const space of SPACE)
|
|
1437
1346
|
_responsiveRule(util$n, `g-${space}`, {
|
|
1438
1347
|
gap: vars.space[space]
|
|
1439
1348
|
});
|
|
1440
|
-
for (const space of
|
|
1349
|
+
for (const space of SPACE)
|
|
1441
1350
|
_responsiveRule(util$n, `gx-${space}`, {
|
|
1442
1351
|
columnGap: vars.space[space]
|
|
1443
1352
|
});
|
|
1444
|
-
for (const space of
|
|
1353
|
+
for (const space of SPACE)
|
|
1445
1354
|
_responsiveRule(util$n, `gy-${space}`, {
|
|
1446
1355
|
rowGap: vars.space[space]
|
|
1447
1356
|
});
|
|
@@ -1875,33 +1784,33 @@ const insetStyle = {
|
|
|
1875
1784
|
util: util$a
|
|
1876
1785
|
}
|
|
1877
1786
|
}, util$9 = {};
|
|
1878
|
-
for (const space of
|
|
1787
|
+
for (const space of SPACE)
|
|
1879
1788
|
_responsiveRule(util$9, `m-${space}`, {
|
|
1880
1789
|
margin: vars.space[space]
|
|
1881
1790
|
});
|
|
1882
|
-
for (const space of
|
|
1791
|
+
for (const space of SPACE)
|
|
1883
1792
|
_responsiveRule(util$9, `mx-${space}`, {
|
|
1884
1793
|
marginLeft: vars.space[space],
|
|
1885
1794
|
marginRight: vars.space[space]
|
|
1886
1795
|
});
|
|
1887
|
-
for (const space of
|
|
1796
|
+
for (const space of SPACE)
|
|
1888
1797
|
_responsiveRule(util$9, `my-${space}`, {
|
|
1889
1798
|
marginTop: vars.space[space],
|
|
1890
1799
|
marginBottom: vars.space[space]
|
|
1891
1800
|
});
|
|
1892
|
-
for (const space of
|
|
1801
|
+
for (const space of SPACE)
|
|
1893
1802
|
_responsiveRule(util$9, `mt-${space}`, {
|
|
1894
1803
|
marginTop: vars.space[space]
|
|
1895
1804
|
});
|
|
1896
|
-
for (const space of
|
|
1805
|
+
for (const space of SPACE)
|
|
1897
1806
|
_responsiveRule(util$9, `mr-${space}`, {
|
|
1898
1807
|
marginRight: vars.space[space]
|
|
1899
1808
|
});
|
|
1900
|
-
for (const space of
|
|
1809
|
+
for (const space of SPACE)
|
|
1901
1810
|
_responsiveRule(util$9, `mb-${space}`, {
|
|
1902
1811
|
marginBottom: vars.space[space]
|
|
1903
1812
|
});
|
|
1904
|
-
for (const space of
|
|
1813
|
+
for (const space of SPACE)
|
|
1905
1814
|
_responsiveRule(util$9, `ml-${space}`, {
|
|
1906
1815
|
marginLeft: vars.space[space]
|
|
1907
1816
|
});
|
|
@@ -1987,33 +1896,33 @@ const overflowStyle = {
|
|
|
1987
1896
|
util: util$6
|
|
1988
1897
|
}
|
|
1989
1898
|
}, util$5 = {};
|
|
1990
|
-
for (const space of
|
|
1899
|
+
for (const space of SPACE)
|
|
1991
1900
|
_responsiveRule(util$5, `p-${space}`, {
|
|
1992
1901
|
padding: vars.space[space]
|
|
1993
1902
|
});
|
|
1994
|
-
for (const space of
|
|
1903
|
+
for (const space of SPACE)
|
|
1995
1904
|
_responsiveRule(util$5, `px-${space}`, {
|
|
1996
1905
|
paddingLeft: vars.space[space],
|
|
1997
1906
|
paddingRight: vars.space[space]
|
|
1998
1907
|
});
|
|
1999
|
-
for (const space of
|
|
1908
|
+
for (const space of SPACE)
|
|
2000
1909
|
_responsiveRule(util$5, `py-${space}`, {
|
|
2001
1910
|
paddingTop: vars.space[space],
|
|
2002
1911
|
paddingBottom: vars.space[space]
|
|
2003
1912
|
});
|
|
2004
|
-
for (const space of
|
|
1913
|
+
for (const space of SPACE)
|
|
2005
1914
|
_responsiveRule(util$5, `pt-${space}`, {
|
|
2006
1915
|
paddingTop: vars.space[space]
|
|
2007
1916
|
});
|
|
2008
|
-
for (const space of
|
|
1917
|
+
for (const space of SPACE)
|
|
2009
1918
|
_responsiveRule(util$5, `pr-${space}`, {
|
|
2010
1919
|
paddingRight: vars.space[space]
|
|
2011
1920
|
});
|
|
2012
|
-
for (const space of
|
|
1921
|
+
for (const space of SPACE)
|
|
2013
1922
|
_responsiveRule(util$5, `pb-${space}`, {
|
|
2014
1923
|
paddingBottom: vars.space[space]
|
|
2015
1924
|
});
|
|
2016
|
-
for (const space of
|
|
1925
|
+
for (const space of SPACE)
|
|
2017
1926
|
_responsiveRule(util$5, `pl-${space}`, {
|
|
2018
1927
|
paddingLeft: vars.space[space]
|
|
2019
1928
|
});
|
|
@@ -2082,7 +1991,7 @@ const radiusStyle = {
|
|
|
2082
1991
|
util: util$3
|
|
2083
1992
|
}
|
|
2084
1993
|
}, util$2 = {};
|
|
2085
|
-
for (const shadow2 of
|
|
1994
|
+
for (const shadow2 of SHADOW)
|
|
2086
1995
|
shadow2 === 0 ? _responsiveRule(util$2, "shadow-0", {
|
|
2087
1996
|
boxShadow: "none"
|
|
2088
1997
|
}) : _responsiveRule(util$2, `shadow-${shadow2}`, {
|
|
@@ -2270,25 +2179,25 @@ const widthStyle = {
|
|
|
2270
2179
|
height: "calc(var(--font-skeleton-line-height) - var(--font-skeleton-ascender-height) - var(--font-skeleton-descender-height))"
|
|
2271
2180
|
}
|
|
2272
2181
|
};
|
|
2273
|
-
for (const size of
|
|
2182
|
+
for (const size of FONT_CODE_SIZE)
|
|
2274
2183
|
_responsiveRule(component$2, `code-skeleton-${size}`, {
|
|
2275
2184
|
"--font-skeleton-line-height": vars.font.code.sizes[size].lineHeight,
|
|
2276
2185
|
"--font-skeleton-ascender-height": vars.font.code.sizes[size].ascenderHeight,
|
|
2277
2186
|
"--font-skeleton-descender-height": vars.font.code.sizes[size].descenderHeight
|
|
2278
2187
|
});
|
|
2279
|
-
for (const size of
|
|
2188
|
+
for (const size of FONT_HEADING_SIZE)
|
|
2280
2189
|
_responsiveRule(component$2, `heading-skeleton-${size}`, {
|
|
2281
2190
|
"--font-skeleton-line-height": vars.font.heading.sizes[size].lineHeight,
|
|
2282
2191
|
"--font-skeleton-ascender-height": vars.font.heading.sizes[size].ascenderHeight,
|
|
2283
2192
|
"--font-skeleton-descender-height": vars.font.heading.sizes[size].descenderHeight
|
|
2284
2193
|
});
|
|
2285
|
-
for (const size of
|
|
2194
|
+
for (const size of FONT_LABEL_SIZE)
|
|
2286
2195
|
_responsiveRule(component$2, `label-skeleton-${size}`, {
|
|
2287
2196
|
"--font-skeleton-line-height": vars.font.label.sizes[size].lineHeight,
|
|
2288
2197
|
"--font-skeleton-ascender-height": vars.font.label.sizes[size].ascenderHeight,
|
|
2289
2198
|
"--font-skeleton-descender-height": vars.font.label.sizes[size].descenderHeight
|
|
2290
2199
|
});
|
|
2291
|
-
for (const size of
|
|
2200
|
+
for (const size of FONT_TEXT_SIZE)
|
|
2292
2201
|
_responsiveRule(component$2, `text-skeleton-${size}`, {
|
|
2293
2202
|
"--font-skeleton-line-height": vars.font.text.sizes[size].lineHeight,
|
|
2294
2203
|
"--font-skeleton-ascender-height": vars.font.text.sizes[size].ascenderHeight,
|
|
@@ -2523,7 +2432,7 @@ const skeletonStyle = {
|
|
|
2523
2432
|
}
|
|
2524
2433
|
}
|
|
2525
2434
|
};
|
|
2526
|
-
for (const size of
|
|
2435
|
+
for (const size of FONT_TEXT_SIZE) {
|
|
2527
2436
|
const source = vars.font.text.sizes[size];
|
|
2528
2437
|
_responsiveRule(primitive$o, `input-${size}`, {
|
|
2529
2438
|
[varNames.input.fontSize]: source.fontSize,
|
|
@@ -2533,11 +2442,11 @@ for (const size of theme.FONT_TEXT_SIZE) {
|
|
|
2533
2442
|
[varNames.input.descenderHeight]: source.descenderHeight
|
|
2534
2443
|
});
|
|
2535
2444
|
}
|
|
2536
|
-
for (const space of
|
|
2445
|
+
for (const space of SPACE)
|
|
2537
2446
|
_responsiveRule(primitive$o, `input-p-${space}`, {
|
|
2538
2447
|
[varNames.input.padding]: vars.space[space]
|
|
2539
2448
|
});
|
|
2540
|
-
for (const space of
|
|
2449
|
+
for (const space of SPACE)
|
|
2541
2450
|
_responsiveRule(primitive$o, `input-g-${space}`, {
|
|
2542
2451
|
[varNames.input.gap]: vars.space[space]
|
|
2543
2452
|
});
|
|
@@ -2615,7 +2524,7 @@ const _inputStyle = {
|
|
|
2615
2524
|
};
|
|
2616
2525
|
function buildSelectableTones() {
|
|
2617
2526
|
const rules2 = {};
|
|
2618
|
-
for (const tone of
|
|
2527
|
+
for (const tone of THEME_COLOR_STATE_TONES) {
|
|
2619
2528
|
const target = varNames.color, source = vars.color;
|
|
2620
2529
|
rules2[`&.${tone}`] = {
|
|
2621
2530
|
[target.tinted.bg[0]]: source.tinted[tone].bg[0],
|
|
@@ -2686,7 +2595,7 @@ const primitive$m = {
|
|
|
2686
2595
|
[varNames.color.avatar.bg]: vars.color.border,
|
|
2687
2596
|
[varNames.color.avatar.fg]: vars.color.bg
|
|
2688
2597
|
},
|
|
2689
|
-
...
|
|
2598
|
+
...THEME_COLOR_AVATAR_COLORS.reduce((acc, color2) => ({
|
|
2690
2599
|
...acc,
|
|
2691
2600
|
[`&.${color2}`]: {
|
|
2692
2601
|
[varNames.color.avatar.bg]: vars.color.avatar[color2].bg,
|
|
@@ -2780,7 +2689,7 @@ const primitive$m = {
|
|
|
2780
2689
|
}
|
|
2781
2690
|
}
|
|
2782
2691
|
};
|
|
2783
|
-
for (const size of
|
|
2692
|
+
for (const size of AVATAR_SIZE)
|
|
2784
2693
|
_responsiveRule(primitive$m, `avatar-${size}`, {
|
|
2785
2694
|
[varNames.avatar.distance]: vars.avatar.sizes[size].distance,
|
|
2786
2695
|
[varNames.avatar.size]: vars.avatar.sizes[size].size
|
|
@@ -2796,7 +2705,7 @@ const avatarStyle = {
|
|
|
2796
2705
|
verticalAlign: "top"
|
|
2797
2706
|
}
|
|
2798
2707
|
};
|
|
2799
|
-
for (const tone of
|
|
2708
|
+
for (const tone of THEME_COLOR_STATE_TONES)
|
|
2800
2709
|
primitive$l[`.badge-${tone}`] = {
|
|
2801
2710
|
[varNames.color.bg]: vars.color.tinted[tone].bg[4],
|
|
2802
2711
|
[varNames.color.fg]: vars.color.tinted[tone].fg[3]
|
|
@@ -2832,18 +2741,6 @@ const badgeStyle = {
|
|
|
2832
2741
|
layers: {
|
|
2833
2742
|
primitive: primitive$k
|
|
2834
2743
|
}
|
|
2835
|
-
}, toneMap = {
|
|
2836
|
-
default: "default",
|
|
2837
|
-
neutral: "neutral",
|
|
2838
|
-
suggest: "suggest",
|
|
2839
|
-
primary: "accent",
|
|
2840
|
-
positive: "positive",
|
|
2841
|
-
caution: "caution",
|
|
2842
|
-
critical: "critical"
|
|
2843
|
-
}, variantMap = {
|
|
2844
|
-
default: "solid",
|
|
2845
|
-
ghost: "ghost",
|
|
2846
|
-
bleed: "tinted"
|
|
2847
2744
|
}, primitive$j = {
|
|
2848
2745
|
".button": {
|
|
2849
2746
|
WebkitFontSmoothing: "inherit",
|
|
@@ -2891,11 +2788,13 @@ const badgeStyle = {
|
|
|
2891
2788
|
opacity: 0.8
|
|
2892
2789
|
}
|
|
2893
2790
|
};
|
|
2894
|
-
for (const tone of
|
|
2791
|
+
for (const tone of THEME_COLOR_STATE_TONES) {
|
|
2895
2792
|
const solid = vars.color.solid[tone], tinted = vars.color.tinted[tone];
|
|
2896
|
-
primitive$j[`.button
|
|
2793
|
+
primitive$j[`.button[data-mode="default"][data-tone="${tone}"]`] = {
|
|
2897
2794
|
[varNames.color.bg]: solid.bg[0],
|
|
2898
2795
|
[varNames.color.border]: solid.border[1],
|
|
2796
|
+
[varNames.color.code.bg]: solid.bg[1],
|
|
2797
|
+
[varNames.color.code.fg]: solid.fg[4],
|
|
2899
2798
|
[varNames.color.fg]: solid.fg[0],
|
|
2900
2799
|
[varNames.color.muted.bg]: solid.bg[1],
|
|
2901
2800
|
[varNames.color.muted.fg]: solid.fg[4],
|
|
@@ -2904,6 +2803,8 @@ for (const tone of theme.THEME_COLOR_STATE_TONES) {
|
|
|
2904
2803
|
"&:not([data-disabled]):hover": {
|
|
2905
2804
|
[varNames.color.bg]: solid.bg[1],
|
|
2906
2805
|
[varNames.color.border]: solid.border[2],
|
|
2806
|
+
[varNames.color.code.bg]: solid.bg[2],
|
|
2807
|
+
[varNames.color.code.fg]: solid.fg[4],
|
|
2907
2808
|
[varNames.color.fg]: solid.fg[0],
|
|
2908
2809
|
[varNames.color.muted.bg]: solid.bg[2],
|
|
2909
2810
|
[varNames.color.muted.fg]: solid.fg[4]
|
|
@@ -2911,6 +2812,8 @@ for (const tone of theme.THEME_COLOR_STATE_TONES) {
|
|
|
2911
2812
|
"&:not([data-disabled]):active": {
|
|
2912
2813
|
[varNames.color.bg]: solid.bg[2],
|
|
2913
2814
|
[varNames.color.border]: solid.border[3],
|
|
2815
|
+
[varNames.color.code.bg]: solid.bg[3],
|
|
2816
|
+
[varNames.color.code.fg]: solid.fg[4],
|
|
2914
2817
|
[varNames.color.fg]: solid.fg[0],
|
|
2915
2818
|
[varNames.color.muted.bg]: solid.bg[3],
|
|
2916
2819
|
[varNames.color.muted.fg]: solid.fg[4]
|
|
@@ -2918,6 +2821,8 @@ for (const tone of theme.THEME_COLOR_STATE_TONES) {
|
|
|
2918
2821
|
"&:not([data-disabled])[data-selected]": {
|
|
2919
2822
|
[varNames.color.bg]: solid.bg[2],
|
|
2920
2823
|
[varNames.color.border]: solid.border[3],
|
|
2824
|
+
[varNames.color.code.bg]: solid.bg[3],
|
|
2825
|
+
[varNames.color.code.fg]: solid.fg[4],
|
|
2921
2826
|
[varNames.color.fg]: solid.fg[0],
|
|
2922
2827
|
[varNames.color.muted.bg]: solid.bg[3],
|
|
2923
2828
|
[varNames.color.muted.fg]: solid.fg[4]
|
|
@@ -2941,25 +2846,30 @@ for (const tone of theme.THEME_COLOR_STATE_TONES) {
|
|
|
2941
2846
|
[varNames.color.muted.fg]: vars.color.tinted.default.border[4]
|
|
2942
2847
|
}
|
|
2943
2848
|
}
|
|
2944
|
-
}, primitive$j[`.button
|
|
2849
|
+
}, primitive$j[`.button[data-mode="ghost"][data-tone="${tone}"]`] = {
|
|
2945
2850
|
[varNames.color.bg]: tinted.bg[1],
|
|
2946
|
-
[varNames.color.border]: tinted.border[
|
|
2851
|
+
[varNames.color.border]: tinted.border[1],
|
|
2947
2852
|
[varNames.color.fg]: tinted.fg[2],
|
|
2853
|
+
[varNames.color.code.bg]: tinted.bg[2],
|
|
2854
|
+
[varNames.color.code.fg]: tinted.fg[4],
|
|
2948
2855
|
[varNames.color.muted.bg]: tinted.bg[2],
|
|
2949
2856
|
[varNames.color.muted.fg]: tinted.fg[4],
|
|
2950
2857
|
"--button-box-shadow": "inset 0 0 0 var(--button-border-width) var(--color-border)",
|
|
2951
2858
|
"@nest": {
|
|
2952
2859
|
"&:not([data-disabled]):hover": {
|
|
2953
2860
|
[varNames.color.bg]: tinted.bg[2],
|
|
2954
|
-
[varNames.color.border]: tinted.border[
|
|
2861
|
+
[varNames.color.border]: tinted.border[2],
|
|
2862
|
+
[varNames.color.code.bg]: tinted.bg[3],
|
|
2863
|
+
[varNames.color.code.fg]: tinted.fg[3],
|
|
2955
2864
|
[varNames.color.fg]: tinted.fg[1],
|
|
2956
2865
|
[varNames.color.muted.bg]: tinted.bg[3],
|
|
2957
2866
|
[varNames.color.muted.fg]: tinted.fg[3]
|
|
2958
|
-
// '--button-box-shadow': `inset 0 0 0 var(--button-border-width) var(--color-border)`,
|
|
2959
2867
|
},
|
|
2960
2868
|
"&:not([data-disabled]):active": {
|
|
2961
2869
|
[varNames.color.bg]: tinted.bg[3],
|
|
2962
|
-
[varNames.color.border]: tinted.border[
|
|
2870
|
+
[varNames.color.border]: tinted.border[3],
|
|
2871
|
+
[varNames.color.code.bg]: tinted.bg[4],
|
|
2872
|
+
[varNames.color.code.fg]: tinted.fg[3],
|
|
2963
2873
|
[varNames.color.fg]: tinted.fg[1],
|
|
2964
2874
|
[varNames.color.muted.bg]: tinted.bg[4],
|
|
2965
2875
|
[varNames.color.muted.fg]: tinted.fg[3],
|
|
@@ -2967,7 +2877,9 @@ for (const tone of theme.THEME_COLOR_STATE_TONES) {
|
|
|
2967
2877
|
},
|
|
2968
2878
|
"&:not([data-disabled])[data-selected]": {
|
|
2969
2879
|
[varNames.color.bg]: tinted.bg[3],
|
|
2970
|
-
[varNames.color.border]: tinted.border[
|
|
2880
|
+
[varNames.color.border]: tinted.border[3],
|
|
2881
|
+
[varNames.color.code.bg]: tinted.bg[4],
|
|
2882
|
+
[varNames.color.code.fg]: tinted.fg[3],
|
|
2971
2883
|
[varNames.color.fg]: tinted.fg[1],
|
|
2972
2884
|
[varNames.color.muted.bg]: tinted.bg[4],
|
|
2973
2885
|
[varNames.color.muted.fg]: tinted.fg[3],
|
|
@@ -2992,7 +2904,7 @@ for (const tone of theme.THEME_COLOR_STATE_TONES) {
|
|
|
2992
2904
|
[varNames.color.muted.fg]: vars.color.tinted.default.border[3]
|
|
2993
2905
|
}
|
|
2994
2906
|
}
|
|
2995
|
-
}, primitive$j[`.button
|
|
2907
|
+
}, primitive$j[`.button[data-mode="bleed"][data-tone="${tone}"]`] = {
|
|
2996
2908
|
boxShadow: "none",
|
|
2997
2909
|
[varNames.color.bg]: tinted.bg[0],
|
|
2998
2910
|
[varNames.color.border]: tinted.border[1],
|
|
@@ -3078,6 +2990,11 @@ const buttonStyle = {
|
|
|
3078
2990
|
font: "inherit",
|
|
3079
2991
|
whiteSpace: "inherit"
|
|
3080
2992
|
},
|
|
2993
|
+
"&[data-checkered]": {
|
|
2994
|
+
backgroundSize: `${vars.space[3]} ${vars.space[3]}`,
|
|
2995
|
+
backgroundPosition: "top left",
|
|
2996
|
+
backgroundImage: `repeating-conic-gradient(${vars.color.bg} 0% 25%, ${vars.color.muted.bg} 0% 50%)`
|
|
2997
|
+
},
|
|
3081
2998
|
"a&:not([data-disabled]):hover, button&:not([data-disabled]):hover": {
|
|
3082
2999
|
[varNames.color.bg]: vars.color.tinted.default.bg[1],
|
|
3083
3000
|
[varNames.color.border]: vars.color.tinted.default.border[3],
|
|
@@ -3114,41 +3031,27 @@ const buttonStyle = {
|
|
|
3114
3031
|
[varNames.color.muted.bg]: vars.color.solid.primary.bg[1],
|
|
3115
3032
|
[varNames.color.muted.fg]: vars.color.solid.primary.fg[3]
|
|
3116
3033
|
},
|
|
3117
|
-
// '&:not([data-disabled]):focus': {
|
|
3118
|
-
// '--color-bg': vars.color.solid.bg[0],
|
|
3119
|
-
// '--color-border': vars.color.solid.border[1],
|
|
3120
|
-
// '--color-fg': vars.color.solid.fg[1],
|
|
3121
|
-
// '--color-muted-bg': vars.color.solid.bg[1],
|
|
3122
|
-
// '--color-muted-fg': vars.color.solid.fg[3],
|
|
3123
|
-
// },
|
|
3124
3034
|
"a&[data-disabled], button&[data-disabled]": {
|
|
3125
|
-
[varNames.color.bg]: vars.color.tinted.default.bg[
|
|
3126
|
-
[varNames.color.border]: vars.color.tinted.default.border[
|
|
3127
|
-
[varNames.color.fg]: vars.color.tinted.default.
|
|
3128
|
-
[varNames.color.muted.bg]: vars.color.tinted.default.bg[
|
|
3129
|
-
[varNames.color.muted.fg]: vars.color.tinted.default.
|
|
3035
|
+
[varNames.color.bg]: vars.color.tinted.default.bg[0],
|
|
3036
|
+
[varNames.color.border]: vars.color.tinted.default.border[1],
|
|
3037
|
+
[varNames.color.fg]: vars.color.tinted.default.border[3],
|
|
3038
|
+
[varNames.color.muted.bg]: vars.color.tinted.default.bg[1],
|
|
3039
|
+
[varNames.color.muted.fg]: vars.color.tinted.default.border[1]
|
|
3130
3040
|
}
|
|
3131
|
-
// '&[data-disabled]': {
|
|
3132
|
-
// '--color-bg': vars.color.tinted.bg[0],
|
|
3133
|
-
// '--color-border': vars.color.tinted.border[1],
|
|
3134
|
-
// '--color-fg': vars.color.tinted.border[4],
|
|
3135
|
-
// '--color-muted-bg': vars.color.tinted.bg[1],
|
|
3136
|
-
// '--color-muted-fg': vars.color.tinted.border[4],
|
|
3137
|
-
// },
|
|
3138
3041
|
}
|
|
3139
3042
|
}
|
|
3140
3043
|
};
|
|
3141
|
-
for (const scheme of
|
|
3044
|
+
for (const scheme of THEME_COLOR_SCHEMES$1) {
|
|
3142
3045
|
const schemeProps = {
|
|
3143
3046
|
colorScheme: scheme
|
|
3144
3047
|
};
|
|
3145
|
-
for (const tone of
|
|
3048
|
+
for (const tone of THEME_COLOR_CARD_TONES) {
|
|
3146
3049
|
const _varNames = varNames.color[tone], _vars = vars.color[scheme][tone];
|
|
3147
3050
|
_assignToneProps(schemeProps, _varNames, _vars);
|
|
3148
3051
|
}
|
|
3149
3052
|
primitive$i[`.card.${scheme}`] = schemeProps;
|
|
3150
3053
|
}
|
|
3151
|
-
for (const tone of
|
|
3054
|
+
for (const tone of THEME_COLOR_CARD_TONES) {
|
|
3152
3055
|
const _varNames = varNames.color, _vars = vars.color[tone], toneProps = {};
|
|
3153
3056
|
_assignToneProps(toneProps, _varNames, _vars), Object.assign(toneProps, {
|
|
3154
3057
|
"--card-bg-color": vars.color.bg,
|
|
@@ -3183,7 +3086,7 @@ const cardStyle = {
|
|
|
3183
3086
|
}
|
|
3184
3087
|
};
|
|
3185
3088
|
function _assignToneProps(toneProps, _varNames, _vars) {
|
|
3186
|
-
for (const hue of
|
|
3089
|
+
for (const hue of THEME_COLOR_AVATAR_COLORS)
|
|
3187
3090
|
toneProps[`${_varNames.avatar[hue].bg}`] = _vars.avatar[hue].bg, toneProps[`${_varNames.avatar[hue].fg}`] = _vars.avatar[hue].fg;
|
|
3188
3091
|
Object.assign(toneProps, {
|
|
3189
3092
|
[_varNames.backdrop]: _vars.backdrop,
|
|
@@ -3233,7 +3136,7 @@ function _assignToneProps(toneProps, _varNames, _vars) {
|
|
|
3233
3136
|
[_varNames.shadow.ambient]: _vars.shadow.ambient
|
|
3234
3137
|
});
|
|
3235
3138
|
for (const variant of ["solid", "tinted"])
|
|
3236
|
-
for (const elementTone of
|
|
3139
|
+
for (const elementTone of THEME_COLOR_STATE_TONES) {
|
|
3237
3140
|
const __varNames = _varNames[variant][elementTone], __vars = _vars[variant][elementTone];
|
|
3238
3141
|
Object.assign(toneProps, {
|
|
3239
3142
|
[__varNames.bg[0]]: __vars.bg[0],
|
|
@@ -3421,7 +3324,7 @@ const primitive$h = {
|
|
|
3421
3324
|
}
|
|
3422
3325
|
}
|
|
3423
3326
|
};
|
|
3424
|
-
for (const size of
|
|
3327
|
+
for (const size of FONT_CODE_SIZE)
|
|
3425
3328
|
_responsiveRule(primitive$g, `code-${size}`, {
|
|
3426
3329
|
"--font-size": `var(--font-code-${size}-size)`,
|
|
3427
3330
|
"--font-line-height": `var(--font-code-${size}-line-height)`,
|
|
@@ -3467,7 +3370,7 @@ const codeStyle = {
|
|
|
3467
3370
|
"--color-fg": "var(--color-tinted-default-fg-4)"
|
|
3468
3371
|
}
|
|
3469
3372
|
};
|
|
3470
|
-
for (const size of
|
|
3373
|
+
for (const size of FONT_HEADING_SIZE)
|
|
3471
3374
|
_responsiveRule(primitive$e, `heading-${size}`, {
|
|
3472
3375
|
"--font-size": `var(--font-heading-${size}-size)`,
|
|
3473
3376
|
"--font-line-height": `var(--font-heading-${size}-line-height)`,
|
|
@@ -3483,11 +3386,8 @@ const headingStyle = {
|
|
|
3483
3386
|
}
|
|
3484
3387
|
}, primitive$d = {
|
|
3485
3388
|
".kbd": {
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
// '--color-fg': 'var(--color-tinted-default-fg-3)',
|
|
3489
|
-
boxShadow: "inset 0 0 0 0.5px var(--color-tinted-default-border-3)",
|
|
3490
|
-
background: "var(--color-muted-bg)",
|
|
3389
|
+
boxShadow: `inset 0 0 0 0.5px ${vars.color.border}`,
|
|
3390
|
+
backgroundColor: vars.color.muted.bg,
|
|
3491
3391
|
font: "inherit",
|
|
3492
3392
|
verticalAlign: "top",
|
|
3493
3393
|
"@nest": {
|
|
@@ -3524,7 +3424,7 @@ const headingStyle = {
|
|
|
3524
3424
|
"--color-fg": "var(--color-muted-fg)"
|
|
3525
3425
|
}
|
|
3526
3426
|
};
|
|
3527
|
-
for (const size of
|
|
3427
|
+
for (const size of FONT_LABEL_SIZE)
|
|
3528
3428
|
_responsiveRule(primitive$c, `label-${size}`, {
|
|
3529
3429
|
"--font-size": `var(--font-label-${size}-size)`,
|
|
3530
3430
|
"--font-line-height": `var(--font-label-${size}-line-height)`,
|
|
@@ -3808,7 +3708,7 @@ const labelStyle = {
|
|
|
3808
3708
|
color: "var(--color-muted-fg)"
|
|
3809
3709
|
}
|
|
3810
3710
|
};
|
|
3811
|
-
for (const size of
|
|
3711
|
+
for (const size of FONT_TEXT_SIZE)
|
|
3812
3712
|
_responsiveRule(primitive$5, `text-${size}`, {
|
|
3813
3713
|
"--font-size": `var(--font-text-${size}-size)`,
|
|
3814
3714
|
"--font-line-height": `var(--font-text-${size}-line-height)`,
|
|
@@ -4027,6 +3927,7 @@ const textStyle = {
|
|
|
4027
3927
|
{
|
|
4028
3928
|
// define order of layers
|
|
4029
3929
|
layers: {
|
|
3930
|
+
palette: {},
|
|
4030
3931
|
theme: {},
|
|
4031
3932
|
base: {},
|
|
4032
3933
|
util: {},
|
|
@@ -4107,69 +4008,70 @@ const textStyle = {
|
|
|
4107
4008
|
toastStyle,
|
|
4108
4009
|
treeStyle
|
|
4109
4010
|
]);
|
|
4110
|
-
function
|
|
4011
|
+
function _compileSystem() {
|
|
4111
4012
|
return _compileStyle(_systemStyle);
|
|
4112
4013
|
}
|
|
4113
4014
|
const THEME_COLOR_SCHEMES = ["dark", "light"], THEME_COLOR_VARIANTS = ["tinted", "solid"];
|
|
4114
|
-
function
|
|
4015
|
+
function _compileTheme_v3(theme) {
|
|
4115
4016
|
return _compileStyle({
|
|
4116
4017
|
layers: {
|
|
4117
4018
|
theme: {
|
|
4118
|
-
":root": compileThemeProperties(
|
|
4019
|
+
":root": compileThemeProperties(theme)
|
|
4119
4020
|
}
|
|
4120
4021
|
}
|
|
4121
4022
|
});
|
|
4122
4023
|
}
|
|
4123
|
-
function compileThemeProperties(
|
|
4024
|
+
function compileThemeProperties(theme) {
|
|
4124
4025
|
return {
|
|
4125
|
-
...buildAvatarThemeProperties(
|
|
4126
|
-
...buildButtonThemeProperties(
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
...
|
|
4130
|
-
...
|
|
4131
|
-
...
|
|
4132
|
-
...
|
|
4133
|
-
...
|
|
4134
|
-
...
|
|
4135
|
-
...
|
|
4136
|
-
...
|
|
4137
|
-
...
|
|
4026
|
+
...buildAvatarThemeProperties(theme),
|
|
4027
|
+
...buildButtonThemeProperties(theme),
|
|
4028
|
+
// card
|
|
4029
|
+
[varNames.card.shadow.outline]: px(theme.card.shadow.outline),
|
|
4030
|
+
...buildColorThemeProperties(theme),
|
|
4031
|
+
...buildContainerThemeProperties(theme),
|
|
4032
|
+
...buildFontCodeThemeProperties(theme),
|
|
4033
|
+
...buildFontHeadingThemeProperties(theme),
|
|
4034
|
+
...buildFontLabelThemeProperties(theme),
|
|
4035
|
+
...buildFontTextThemeProperties(theme),
|
|
4036
|
+
...buildInputThemeProperties(theme),
|
|
4037
|
+
...buildRadiusThemeProperties(theme),
|
|
4038
|
+
...buildShadowThemeProperties(theme),
|
|
4039
|
+
...buildSpaceThemeProperties(theme)
|
|
4138
4040
|
};
|
|
4139
4041
|
}
|
|
4140
|
-
function buildAvatarThemeProperties(
|
|
4042
|
+
function buildAvatarThemeProperties(theme) {
|
|
4141
4043
|
return {
|
|
4142
|
-
[varNames.avatar.focusRing.offset]: px(
|
|
4143
|
-
[varNames.avatar.focusRing.width]: px(
|
|
4144
|
-
[varNames.avatar.sizes[0].distance]: rem(
|
|
4145
|
-
[varNames.avatar.sizes[0].size]: rem(
|
|
4146
|
-
[varNames.avatar.sizes[1].distance]: rem(
|
|
4147
|
-
[varNames.avatar.sizes[1].size]: rem(
|
|
4148
|
-
[varNames.avatar.sizes[2].distance]: rem(
|
|
4149
|
-
[varNames.avatar.sizes[2].size]: rem(
|
|
4150
|
-
[varNames.avatar.sizes[3].distance]: rem(
|
|
4151
|
-
[varNames.avatar.sizes[3].size]: rem(
|
|
4044
|
+
[varNames.avatar.focusRing.offset]: px(theme.avatar.focusRing.offset),
|
|
4045
|
+
[varNames.avatar.focusRing.width]: px(theme.avatar.focusRing.width),
|
|
4046
|
+
[varNames.avatar.sizes[0].distance]: rem(theme.avatar.sizes[0].distance),
|
|
4047
|
+
[varNames.avatar.sizes[0].size]: rem(theme.avatar.sizes[0].size),
|
|
4048
|
+
[varNames.avatar.sizes[1].distance]: rem(theme.avatar.sizes[1].distance),
|
|
4049
|
+
[varNames.avatar.sizes[1].size]: rem(theme.avatar.sizes[1].size),
|
|
4050
|
+
[varNames.avatar.sizes[2].distance]: rem(theme.avatar.sizes[2].distance),
|
|
4051
|
+
[varNames.avatar.sizes[2].size]: rem(theme.avatar.sizes[2].size),
|
|
4052
|
+
[varNames.avatar.sizes[3].distance]: rem(theme.avatar.sizes[3].distance),
|
|
4053
|
+
[varNames.avatar.sizes[3].size]: rem(theme.avatar.sizes[3].size)
|
|
4152
4054
|
};
|
|
4153
4055
|
}
|
|
4154
|
-
function buildButtonThemeProperties(
|
|
4056
|
+
function buildButtonThemeProperties(theme) {
|
|
4155
4057
|
return {
|
|
4156
|
-
[varNames.button.border.width]: px(
|
|
4157
|
-
[varNames.button.focusRing.offset]: px(
|
|
4158
|
-
[varNames.button.focusRing.width]: px(
|
|
4058
|
+
[varNames.button.border.width]: px(theme.button.border.width),
|
|
4059
|
+
[varNames.button.focusRing.offset]: px(theme.button.focusRing.offset),
|
|
4060
|
+
[varNames.button.focusRing.width]: px(theme.button.focusRing.width)
|
|
4159
4061
|
};
|
|
4160
4062
|
}
|
|
4161
|
-
function buildContainerThemeProperties(
|
|
4063
|
+
function buildContainerThemeProperties(theme) {
|
|
4162
4064
|
return {
|
|
4163
|
-
[varNames.container[0]]: rem(
|
|
4164
|
-
[varNames.container[1]]: rem(
|
|
4165
|
-
[varNames.container[2]]: rem(
|
|
4166
|
-
[varNames.container[3]]: rem(
|
|
4167
|
-
[varNames.container[4]]: rem(
|
|
4168
|
-
[varNames.container[5]]: rem(
|
|
4065
|
+
[varNames.container[0]]: rem(theme.container[0]),
|
|
4066
|
+
[varNames.container[1]]: rem(theme.container[1]),
|
|
4067
|
+
[varNames.container[2]]: rem(theme.container[2]),
|
|
4068
|
+
[varNames.container[3]]: rem(theme.container[3]),
|
|
4069
|
+
[varNames.container[4]]: rem(theme.container[4]),
|
|
4070
|
+
[varNames.container[5]]: rem(theme.container[5])
|
|
4169
4071
|
};
|
|
4170
4072
|
}
|
|
4171
|
-
function buildFontCodeThemeProperties(theme
|
|
4172
|
-
const v = varNames.font.code, t = theme
|
|
4073
|
+
function buildFontCodeThemeProperties(theme) {
|
|
4074
|
+
const v = varNames.font.code, t = theme.font.code, props = {
|
|
4173
4075
|
[v.family]: t.family,
|
|
4174
4076
|
[v.featureSettings]: t.featureSettings || "normal",
|
|
4175
4077
|
[v.weights.regular]: t.weights.regular,
|
|
@@ -4177,14 +4079,14 @@ function buildFontCodeThemeProperties(theme$1) {
|
|
|
4177
4079
|
[v.weights.semibold]: t.weights.semibold,
|
|
4178
4080
|
[v.weights.bold]: t.weights.bold
|
|
4179
4081
|
};
|
|
4180
|
-
for (const size of
|
|
4181
|
-
const _v = varNames.font.code.sizes[size], _t = theme
|
|
4082
|
+
for (const size of FONT_CODE_SIZE) {
|
|
4083
|
+
const _v = varNames.font.code.sizes[size], _t = theme.font.code.sizes[size];
|
|
4182
4084
|
props[_v.fontSize] = rem(_t.fontSize), props[_v.lineHeight] = rem(_t.lineHeight), props[_v.ascenderHeight] = rem(_t.ascenderHeight), props[_v.descenderHeight] = rem(_t.descenderHeight), props[_v.letterSpacing] = rem(_t.letterSpacing), props[_v.iconSize] = rem(_t.iconSize);
|
|
4183
4085
|
}
|
|
4184
4086
|
return props;
|
|
4185
4087
|
}
|
|
4186
|
-
function buildFontHeadingThemeProperties(theme
|
|
4187
|
-
const v = varNames.font.heading, t = theme
|
|
4088
|
+
function buildFontHeadingThemeProperties(theme) {
|
|
4089
|
+
const v = varNames.font.heading, t = theme.font.heading, props = {
|
|
4188
4090
|
[v.family]: t.family,
|
|
4189
4091
|
[v.featureSettings]: t.featureSettings,
|
|
4190
4092
|
[v.weights.regular]: t.weights.regular,
|
|
@@ -4192,14 +4094,14 @@ function buildFontHeadingThemeProperties(theme$1) {
|
|
|
4192
4094
|
[v.weights.semibold]: t.weights.semibold,
|
|
4193
4095
|
[v.weights.bold]: t.weights.bold
|
|
4194
4096
|
};
|
|
4195
|
-
for (const size of
|
|
4097
|
+
for (const size of FONT_HEADING_SIZE) {
|
|
4196
4098
|
const _v = v.sizes[size], _t = t.sizes[size];
|
|
4197
4099
|
props[_v.fontSize] = rem(_t.fontSize), props[_v.lineHeight] = rem(_t.lineHeight), props[_v.ascenderHeight] = rem(_t.ascenderHeight), props[_v.descenderHeight] = rem(_t.descenderHeight), props[_v.letterSpacing] = rem(_t.letterSpacing), props[_v.iconSize] = rem(_t.iconSize);
|
|
4198
4100
|
}
|
|
4199
4101
|
return props;
|
|
4200
4102
|
}
|
|
4201
|
-
function buildFontLabelThemeProperties(theme
|
|
4202
|
-
const v = varNames.font.label, t = theme
|
|
4103
|
+
function buildFontLabelThemeProperties(theme) {
|
|
4104
|
+
const v = varNames.font.label, t = theme.font.label, props = {
|
|
4203
4105
|
[v.family]: t.family,
|
|
4204
4106
|
[v.featureSettings]: t.featureSettings,
|
|
4205
4107
|
[v.weights.regular]: t.weights.regular,
|
|
@@ -4207,14 +4109,14 @@ function buildFontLabelThemeProperties(theme$1) {
|
|
|
4207
4109
|
[v.weights.semibold]: t.weights.semibold,
|
|
4208
4110
|
[v.weights.bold]: t.weights.bold
|
|
4209
4111
|
};
|
|
4210
|
-
for (const size of
|
|
4112
|
+
for (const size of FONT_LABEL_SIZE) {
|
|
4211
4113
|
const _v = v.sizes[size], _t = t.sizes[size];
|
|
4212
4114
|
props[_v.fontSize] = rem(_t.fontSize), props[_v.lineHeight] = rem(_t.lineHeight), props[_v.ascenderHeight] = rem(_t.ascenderHeight), props[_v.descenderHeight] = rem(_t.descenderHeight), props[_v.letterSpacing] = rem(_t.letterSpacing), props[_v.iconSize] = rem(_t.iconSize);
|
|
4213
4115
|
}
|
|
4214
4116
|
return props;
|
|
4215
4117
|
}
|
|
4216
|
-
function buildFontTextThemeProperties(theme
|
|
4217
|
-
const v = varNames.font.text, t = theme
|
|
4118
|
+
function buildFontTextThemeProperties(theme) {
|
|
4119
|
+
const v = varNames.font.text, t = theme.font.text, props = {
|
|
4218
4120
|
[v.family]: t.family,
|
|
4219
4121
|
[v.featureSettings]: t.featureSettings,
|
|
4220
4122
|
[v.weights.regular]: t.weights.regular,
|
|
@@ -4222,208 +4124,301 @@ function buildFontTextThemeProperties(theme$1) {
|
|
|
4222
4124
|
[v.weights.semibold]: t.weights.semibold,
|
|
4223
4125
|
[v.weights.bold]: t.weights.bold
|
|
4224
4126
|
};
|
|
4225
|
-
for (const size of
|
|
4127
|
+
for (const size of FONT_TEXT_SIZE) {
|
|
4226
4128
|
const _v = v.sizes[size], _t = t.sizes[size];
|
|
4227
4129
|
props[_v.fontSize] = rem(_t.fontSize), props[_v.lineHeight] = rem(_t.lineHeight), props[_v.ascenderHeight] = rem(_t.ascenderHeight), props[_v.descenderHeight] = rem(_t.descenderHeight), props[_v.letterSpacing] = rem(_t.letterSpacing), props[_v.iconSize] = rem(_t.iconSize);
|
|
4228
4130
|
}
|
|
4229
4131
|
return props;
|
|
4230
4132
|
}
|
|
4231
|
-
function buildInputThemeProperties(
|
|
4133
|
+
function buildInputThemeProperties(theme) {
|
|
4232
4134
|
return {
|
|
4233
|
-
[varNames.input.border.width]: px(
|
|
4234
|
-
[varNames.input.checkbox.focusRing.offset]: px(
|
|
4235
|
-
[varNames.input.checkbox.focusRing.width]: px(
|
|
4236
|
-
[varNames.input.checkbox.size]: rem(
|
|
4237
|
-
[varNames.input.radio.focusRing.offset]: px(
|
|
4238
|
-
[varNames.input.radio.focusRing.width]: px(
|
|
4239
|
-
[varNames.input.radio.markSize]: rem(
|
|
4240
|
-
[varNames.input.radio.size]: rem(
|
|
4241
|
-
[varNames.input.select.focusRing.offset]: px(
|
|
4242
|
-
[varNames.input.select.focusRing.width]: px(
|
|
4243
|
-
[varNames.input.switch.focusRing.offset]: px(
|
|
4244
|
-
[varNames.input.switch.focusRing.width]: px(
|
|
4245
|
-
[varNames.input.switch.height]: rem(
|
|
4246
|
-
[varNames.input.switch.padding]: rem(
|
|
4247
|
-
[varNames.input.switch.transitionDurationMs]: `${
|
|
4248
|
-
[varNames.input.switch.transitionTimingFunction]:
|
|
4249
|
-
[varNames.input.switch.width]: rem(
|
|
4250
|
-
[varNames.input.text.focusRing.offset]: px(
|
|
4251
|
-
[varNames.input.text.focusRing.width]: px(
|
|
4135
|
+
[varNames.input.border.width]: px(theme.input.border.width),
|
|
4136
|
+
[varNames.input.checkbox.focusRing.offset]: px(theme.input.checkbox.focusRing.offset),
|
|
4137
|
+
[varNames.input.checkbox.focusRing.width]: px(theme.input.checkbox.focusRing.width),
|
|
4138
|
+
[varNames.input.checkbox.size]: rem(theme.input.checkbox.size),
|
|
4139
|
+
[varNames.input.radio.focusRing.offset]: px(theme.input.radio.focusRing.offset),
|
|
4140
|
+
[varNames.input.radio.focusRing.width]: px(theme.input.radio.focusRing.width),
|
|
4141
|
+
[varNames.input.radio.markSize]: rem(theme.input.radio.markSize),
|
|
4142
|
+
[varNames.input.radio.size]: rem(theme.input.radio.size),
|
|
4143
|
+
[varNames.input.select.focusRing.offset]: px(theme.input.select.focusRing.offset),
|
|
4144
|
+
[varNames.input.select.focusRing.width]: px(theme.input.select.focusRing.width),
|
|
4145
|
+
[varNames.input.switch.focusRing.offset]: px(theme.input.switch.focusRing.offset),
|
|
4146
|
+
[varNames.input.switch.focusRing.width]: px(theme.input.switch.focusRing.width),
|
|
4147
|
+
[varNames.input.switch.height]: rem(theme.input.switch.height),
|
|
4148
|
+
[varNames.input.switch.padding]: rem(theme.input.switch.padding),
|
|
4149
|
+
[varNames.input.switch.transitionDurationMs]: `${theme.input.switch.transitionDurationMs}ms`,
|
|
4150
|
+
[varNames.input.switch.transitionTimingFunction]: theme.input.switch.transitionTimingFunction,
|
|
4151
|
+
[varNames.input.switch.width]: rem(theme.input.switch.width),
|
|
4152
|
+
[varNames.input.text.focusRing.offset]: px(theme.input.text.focusRing.offset),
|
|
4153
|
+
[varNames.input.text.focusRing.width]: px(theme.input.text.focusRing.width)
|
|
4252
4154
|
};
|
|
4253
4155
|
}
|
|
4254
|
-
function buildRadiusThemeProperties(
|
|
4156
|
+
function buildRadiusThemeProperties(theme) {
|
|
4255
4157
|
return {
|
|
4256
|
-
[varNames.radius[0]]: px(
|
|
4257
|
-
[varNames.radius[1]]: px(
|
|
4258
|
-
[varNames.radius[2]]: px(
|
|
4259
|
-
[varNames.radius[3]]: px(
|
|
4260
|
-
[varNames.radius[4]]: px(
|
|
4261
|
-
[varNames.radius[5]]: px(
|
|
4262
|
-
[varNames.radius[6]]: px(
|
|
4158
|
+
[varNames.radius[0]]: px(theme.radius[0]),
|
|
4159
|
+
[varNames.radius[1]]: px(theme.radius[1]),
|
|
4160
|
+
[varNames.radius[2]]: px(theme.radius[2]),
|
|
4161
|
+
[varNames.radius[3]]: px(theme.radius[3]),
|
|
4162
|
+
[varNames.radius[4]]: px(theme.radius[4]),
|
|
4163
|
+
[varNames.radius[5]]: px(theme.radius[5]),
|
|
4164
|
+
[varNames.radius[6]]: px(theme.radius[6])
|
|
4263
4165
|
};
|
|
4264
4166
|
}
|
|
4265
|
-
function buildShadowThemeProperties(
|
|
4167
|
+
function buildShadowThemeProperties(theme) {
|
|
4266
4168
|
return {
|
|
4267
|
-
[varNames.shadow[0].umbra]: toBoxShadow(
|
|
4268
|
-
[varNames.shadow[0].penumbra]: toBoxShadow(
|
|
4269
|
-
[varNames.shadow[0].ambient]: toBoxShadow(
|
|
4270
|
-
[varNames.shadow[1].umbra]: toBoxShadow(
|
|
4271
|
-
[varNames.shadow[1].penumbra]: toBoxShadow(
|
|
4272
|
-
[varNames.shadow[1].ambient]: toBoxShadow(
|
|
4273
|
-
[varNames.shadow[2].umbra]: toBoxShadow(
|
|
4274
|
-
[varNames.shadow[2].penumbra]: toBoxShadow(
|
|
4275
|
-
[varNames.shadow[2].ambient]: toBoxShadow(
|
|
4276
|
-
[varNames.shadow[3].umbra]: toBoxShadow(
|
|
4277
|
-
[varNames.shadow[3].penumbra]: toBoxShadow(
|
|
4278
|
-
[varNames.shadow[3].ambient]: toBoxShadow(
|
|
4279
|
-
[varNames.shadow[4].umbra]: toBoxShadow(
|
|
4280
|
-
[varNames.shadow[4].penumbra]: toBoxShadow(
|
|
4281
|
-
[varNames.shadow[4].ambient]: toBoxShadow(
|
|
4282
|
-
[varNames.shadow[5].umbra]: toBoxShadow(
|
|
4283
|
-
[varNames.shadow[5].penumbra]: toBoxShadow(
|
|
4284
|
-
[varNames.shadow[5].ambient]: toBoxShadow(
|
|
4169
|
+
[varNames.shadow[0].umbra]: toBoxShadow(theme.shadow[0]?.umbra),
|
|
4170
|
+
[varNames.shadow[0].penumbra]: toBoxShadow(theme.shadow[0]?.penumbra),
|
|
4171
|
+
[varNames.shadow[0].ambient]: toBoxShadow(theme.shadow[0]?.ambient),
|
|
4172
|
+
[varNames.shadow[1].umbra]: toBoxShadow(theme.shadow[1]?.umbra),
|
|
4173
|
+
[varNames.shadow[1].penumbra]: toBoxShadow(theme.shadow[1]?.penumbra),
|
|
4174
|
+
[varNames.shadow[1].ambient]: toBoxShadow(theme.shadow[1]?.ambient),
|
|
4175
|
+
[varNames.shadow[2].umbra]: toBoxShadow(theme.shadow[2]?.umbra),
|
|
4176
|
+
[varNames.shadow[2].penumbra]: toBoxShadow(theme.shadow[2]?.penumbra),
|
|
4177
|
+
[varNames.shadow[2].ambient]: toBoxShadow(theme.shadow[2]?.ambient),
|
|
4178
|
+
[varNames.shadow[3].umbra]: toBoxShadow(theme.shadow[3]?.umbra),
|
|
4179
|
+
[varNames.shadow[3].penumbra]: toBoxShadow(theme.shadow[3]?.penumbra),
|
|
4180
|
+
[varNames.shadow[3].ambient]: toBoxShadow(theme.shadow[3]?.ambient),
|
|
4181
|
+
[varNames.shadow[4].umbra]: toBoxShadow(theme.shadow[4]?.umbra),
|
|
4182
|
+
[varNames.shadow[4].penumbra]: toBoxShadow(theme.shadow[4]?.penumbra),
|
|
4183
|
+
[varNames.shadow[4].ambient]: toBoxShadow(theme.shadow[4]?.ambient),
|
|
4184
|
+
[varNames.shadow[5].umbra]: toBoxShadow(theme.shadow[5]?.umbra),
|
|
4185
|
+
[varNames.shadow[5].penumbra]: toBoxShadow(theme.shadow[5]?.penumbra),
|
|
4186
|
+
[varNames.shadow[5].ambient]: toBoxShadow(theme.shadow[5]?.ambient)
|
|
4285
4187
|
};
|
|
4286
4188
|
}
|
|
4287
|
-
function buildSpaceThemeProperties(
|
|
4189
|
+
function buildSpaceThemeProperties(theme) {
|
|
4288
4190
|
return {
|
|
4289
|
-
[varNames.space[0]]: px(
|
|
4290
|
-
[varNames.space[0.5]]: px(
|
|
4291
|
-
[varNames.space[1]]: px(
|
|
4292
|
-
[varNames.space[2]]: px(
|
|
4293
|
-
[varNames.space[3]]: px(
|
|
4294
|
-
[varNames.space[4]]: px(
|
|
4295
|
-
[varNames.space[5]]: px(
|
|
4296
|
-
[varNames.space[6]]: px(
|
|
4297
|
-
[varNames.space[7]]: px(
|
|
4298
|
-
[varNames.space[8]]: px(
|
|
4299
|
-
[varNames.space[9]]: px(
|
|
4191
|
+
[varNames.space[0]]: px(theme.space[0]),
|
|
4192
|
+
[varNames.space[0.5]]: px(theme.space[1] / 2),
|
|
4193
|
+
[varNames.space[1]]: px(theme.space[1]),
|
|
4194
|
+
[varNames.space[2]]: px(theme.space[2]),
|
|
4195
|
+
[varNames.space[3]]: px(theme.space[3]),
|
|
4196
|
+
[varNames.space[4]]: px(theme.space[4]),
|
|
4197
|
+
[varNames.space[5]]: px(theme.space[5]),
|
|
4198
|
+
[varNames.space[6]]: px(theme.space[6]),
|
|
4199
|
+
[varNames.space[7]]: px(theme.space[7]),
|
|
4200
|
+
[varNames.space[8]]: px(theme.space[8]),
|
|
4201
|
+
[varNames.space[9]]: px(theme.space[9])
|
|
4300
4202
|
};
|
|
4301
4203
|
}
|
|
4302
|
-
function buildColorThemeProperties(theme
|
|
4204
|
+
function buildColorThemeProperties(theme) {
|
|
4303
4205
|
const props = {};
|
|
4304
4206
|
for (const scheme of THEME_COLOR_SCHEMES)
|
|
4305
|
-
for (const cardTone of
|
|
4306
|
-
Object.assign(props, buildColorAvatarThemeProperties(theme
|
|
4207
|
+
for (const cardTone of THEME_COLOR_CARD_TONES) {
|
|
4208
|
+
Object.assign(props, buildColorAvatarThemeProperties(theme, {
|
|
4307
4209
|
scheme,
|
|
4308
4210
|
cardTone
|
|
4309
|
-
})), Object.assign(props, buildColorCardThemeProperties(theme
|
|
4211
|
+
})), Object.assign(props, buildColorCardThemeProperties(theme, {
|
|
4310
4212
|
scheme,
|
|
4311
4213
|
cardTone
|
|
4312
4214
|
}));
|
|
4313
4215
|
for (const colorVariant of THEME_COLOR_VARIANTS)
|
|
4314
|
-
for (const elementTone of
|
|
4315
|
-
const v = varNames.color[scheme][cardTone][colorVariant][elementTone], t = theme
|
|
4216
|
+
for (const elementTone of THEME_COLOR_STATE_TONES) {
|
|
4217
|
+
const v = varNames.color[scheme][cardTone][colorVariant][elementTone], t = theme._tokens.color[cardTone].variant[colorVariant][elementTone], context = {
|
|
4218
|
+
bgValue: "transparent",
|
|
4316
4219
|
bgVar: v.bg[0],
|
|
4317
4220
|
hue: t._hue,
|
|
4318
4221
|
scheme
|
|
4319
4222
|
};
|
|
4320
4223
|
Object.assign(props, {
|
|
4321
|
-
[v.bg[0]]:
|
|
4224
|
+
[v.bg[0]]: renderColor(t.bg[0], context),
|
|
4322
4225
|
[v.bg[1]]: `color-mix(in srgb, var(${v.bg[0]}), var(${v.bg[4]}) 25%)`,
|
|
4323
4226
|
[v.bg[2]]: `color-mix(in srgb, var(${v.bg[0]}), var(${v.bg[4]}) 50%)`,
|
|
4324
4227
|
[v.bg[3]]: `color-mix(in srgb, var(${v.bg[0]}), var(${v.bg[4]}) 75%)`,
|
|
4325
|
-
[v.bg[4]]:
|
|
4326
|
-
[v.border[0]]:
|
|
4228
|
+
[v.bg[4]]: renderColor(t.bg[4], context),
|
|
4229
|
+
[v.border[0]]: renderColor(t.border[0], context),
|
|
4327
4230
|
[v.border[1]]: `color-mix(in srgb, var(${v.border[0]}), var(${v.border[4]}) 25%)`,
|
|
4328
4231
|
[v.border[2]]: `color-mix(in srgb, var(${v.border[0]}), var(${v.border[4]}) 50%)`,
|
|
4329
4232
|
[v.border[3]]: `color-mix(in srgb, var(${v.border[0]}), var(${v.border[4]}) 75%)`,
|
|
4330
|
-
[v.border[4]]:
|
|
4331
|
-
[v.fg[0]]:
|
|
4233
|
+
[v.border[4]]: renderColor(t.border[4], context),
|
|
4234
|
+
[v.fg[0]]: renderColor(t.fg[0], context),
|
|
4332
4235
|
[v.fg[1]]: `color-mix(in srgb, var(${v.fg[0]}), var(${v.fg[4]}) 25%)`,
|
|
4333
4236
|
[v.fg[2]]: `color-mix(in srgb, var(${v.fg[0]}), var(${v.fg[4]}) 50%)`,
|
|
4334
4237
|
[v.fg[3]]: `color-mix(in srgb, var(${v.fg[0]}), var(${v.fg[4]}) 75%)`,
|
|
4335
|
-
[v.fg[4]]:
|
|
4238
|
+
[v.fg[4]]: renderColor(t.fg[4], context)
|
|
4336
4239
|
});
|
|
4337
4240
|
}
|
|
4338
4241
|
}
|
|
4339
4242
|
return props;
|
|
4340
4243
|
}
|
|
4341
|
-
function buildColorAvatarThemeProperties(theme
|
|
4244
|
+
function buildColorAvatarThemeProperties(theme, options) {
|
|
4342
4245
|
const {
|
|
4343
4246
|
scheme,
|
|
4344
4247
|
cardTone
|
|
4345
|
-
} = options, v = varNames.color[scheme][cardTone], t = theme
|
|
4346
|
-
for (const hue of
|
|
4248
|
+
} = options, v = varNames.color[scheme][cardTone], t = theme._tokens.color[cardTone], props = {};
|
|
4249
|
+
for (const hue of HUES) {
|
|
4347
4250
|
const context = {
|
|
4251
|
+
bgValue: "transparent",
|
|
4348
4252
|
bgVar: varNames.color.bg,
|
|
4349
4253
|
hue: t.avatar[hue]._hue ?? hue,
|
|
4350
4254
|
scheme
|
|
4351
4255
|
};
|
|
4352
4256
|
Object.assign(props, {
|
|
4353
|
-
[v.avatar[hue].bg]:
|
|
4354
|
-
[v.avatar[hue].fg]:
|
|
4257
|
+
[v.avatar[hue].bg]: renderColor(t.avatar[hue].bg, context),
|
|
4258
|
+
[v.avatar[hue].fg]: renderColor(t.avatar[hue].fg, context)
|
|
4355
4259
|
});
|
|
4356
4260
|
}
|
|
4357
4261
|
return props;
|
|
4358
4262
|
}
|
|
4359
|
-
function buildColorCardThemeProperties(theme
|
|
4263
|
+
function buildColorCardThemeProperties(theme, options) {
|
|
4360
4264
|
const {
|
|
4361
4265
|
scheme,
|
|
4362
4266
|
cardTone
|
|
4363
|
-
} = options, v = varNames.color[scheme][cardTone], t = theme
|
|
4267
|
+
} = options, v = varNames.color[scheme][cardTone], t = theme._tokens.color[cardTone], context = {
|
|
4268
|
+
bgValue: "transparent",
|
|
4364
4269
|
bgVar: varNames.color.bg,
|
|
4365
4270
|
hue: t._hue,
|
|
4366
4271
|
scheme
|
|
4367
4272
|
};
|
|
4368
4273
|
return {
|
|
4369
4274
|
// backdrop
|
|
4370
|
-
[v.backdrop]:
|
|
4275
|
+
[v.backdrop]: renderColor(t.backdrop, context),
|
|
4371
4276
|
// code
|
|
4372
|
-
[v.code.bg]:
|
|
4373
|
-
[v.code.fg]:
|
|
4277
|
+
[v.code.bg]: renderColor(t.code.bg, context),
|
|
4278
|
+
[v.code.fg]: renderColor(t.code.fg, context),
|
|
4374
4279
|
// code / token
|
|
4375
|
-
[v.code.token.atrule]:
|
|
4376
|
-
[v.code.token.attrName]:
|
|
4377
|
-
[v.code.token.attrValue]:
|
|
4378
|
-
[v.code.token.attribute]:
|
|
4379
|
-
[v.code.token.boolean]:
|
|
4380
|
-
[v.code.token.builtin]:
|
|
4381
|
-
[v.code.token.cdata]:
|
|
4382
|
-
[v.code.token.char]:
|
|
4383
|
-
[v.code.token.className]:
|
|
4384
|
-
[v.code.token.class]:
|
|
4385
|
-
[v.code.token.comment]:
|
|
4386
|
-
[v.code.token.constant]:
|
|
4387
|
-
[v.code.token.deleted]:
|
|
4388
|
-
[v.code.token.doctype]:
|
|
4389
|
-
[v.code.token.entity]:
|
|
4390
|
-
[v.code.token.function]:
|
|
4391
|
-
[v.code.token.hexcode]:
|
|
4392
|
-
[v.code.token.id]:
|
|
4393
|
-
[v.code.token.important]:
|
|
4394
|
-
[v.code.token.inserted]:
|
|
4395
|
-
[v.code.token.keyword]:
|
|
4396
|
-
[v.code.token.number]:
|
|
4397
|
-
[v.code.token.operator]:
|
|
4398
|
-
[v.code.token.prolog]:
|
|
4399
|
-
[v.code.token.property]:
|
|
4400
|
-
[v.code.token.pseudoClass]:
|
|
4401
|
-
[v.code.token.pseudoElement]:
|
|
4402
|
-
[v.code.token.punctuation]:
|
|
4403
|
-
[v.code.token.regex]:
|
|
4404
|
-
[v.code.token.selector]:
|
|
4405
|
-
[v.code.token.string]:
|
|
4406
|
-
[v.code.token.symbol]:
|
|
4407
|
-
[v.code.token.tag]:
|
|
4408
|
-
[v.code.token.unit]:
|
|
4409
|
-
[v.code.token.url]:
|
|
4410
|
-
[v.code.token.variable]:
|
|
4280
|
+
[v.code.token.atrule]: renderColor(t.code.token.atrule, context),
|
|
4281
|
+
[v.code.token.attrName]: renderColor(t.code.token.attrName, context),
|
|
4282
|
+
[v.code.token.attrValue]: renderColor(t.code.token.attrValue, context),
|
|
4283
|
+
[v.code.token.attribute]: renderColor(t.code.token.attribute, context),
|
|
4284
|
+
[v.code.token.boolean]: renderColor(t.code.token.boolean, context),
|
|
4285
|
+
[v.code.token.builtin]: renderColor(t.code.token.builtin, context),
|
|
4286
|
+
[v.code.token.cdata]: renderColor(t.code.token.cdata, context),
|
|
4287
|
+
[v.code.token.char]: renderColor(t.code.token.char, context),
|
|
4288
|
+
[v.code.token.className]: renderColor(t.code.token.className, context),
|
|
4289
|
+
[v.code.token.class]: renderColor(t.code.token.class, context),
|
|
4290
|
+
[v.code.token.comment]: renderColor(t.code.token.comment, context),
|
|
4291
|
+
[v.code.token.constant]: renderColor(t.code.token.constant, context),
|
|
4292
|
+
[v.code.token.deleted]: renderColor(t.code.token.deleted, context),
|
|
4293
|
+
[v.code.token.doctype]: renderColor(t.code.token.doctype, context),
|
|
4294
|
+
[v.code.token.entity]: renderColor(t.code.token.entity, context),
|
|
4295
|
+
[v.code.token.function]: renderColor(t.code.token.function, context),
|
|
4296
|
+
[v.code.token.hexcode]: renderColor(t.code.token.hexcode, context),
|
|
4297
|
+
[v.code.token.id]: renderColor(t.code.token.id, context),
|
|
4298
|
+
[v.code.token.important]: renderColor(t.code.token.important, context),
|
|
4299
|
+
[v.code.token.inserted]: renderColor(t.code.token.inserted, context),
|
|
4300
|
+
[v.code.token.keyword]: renderColor(t.code.token.keyword, context),
|
|
4301
|
+
[v.code.token.number]: renderColor(t.code.token.number, context),
|
|
4302
|
+
[v.code.token.operator]: renderColor(t.code.token.operator, context),
|
|
4303
|
+
[v.code.token.prolog]: renderColor(t.code.token.prolog, context),
|
|
4304
|
+
[v.code.token.property]: renderColor(t.code.token.property, context),
|
|
4305
|
+
[v.code.token.pseudoClass]: renderColor(t.code.token.pseudoClass, context),
|
|
4306
|
+
[v.code.token.pseudoElement]: renderColor(t.code.token.pseudoElement, context),
|
|
4307
|
+
[v.code.token.punctuation]: renderColor(t.code.token.punctuation, context),
|
|
4308
|
+
[v.code.token.regex]: renderColor(t.code.token.regex, context),
|
|
4309
|
+
[v.code.token.selector]: renderColor(t.code.token.selector, context),
|
|
4310
|
+
[v.code.token.string]: renderColor(t.code.token.string, context),
|
|
4311
|
+
[v.code.token.symbol]: renderColor(t.code.token.symbol, context),
|
|
4312
|
+
[v.code.token.tag]: renderColor(t.code.token.tag, context),
|
|
4313
|
+
[v.code.token.unit]: renderColor(t.code.token.unit, context),
|
|
4314
|
+
[v.code.token.url]: renderColor(t.code.token.url, context),
|
|
4315
|
+
[v.code.token.variable]: renderColor(t.code.token.variable, context),
|
|
4411
4316
|
// focus ring
|
|
4412
|
-
[v.focusRing]:
|
|
4317
|
+
[v.focusRing]: renderColor(t.focusRing, context),
|
|
4413
4318
|
// link
|
|
4414
|
-
[v.link.fg]:
|
|
4319
|
+
[v.link.fg]: renderColor(t.link.fg, context),
|
|
4415
4320
|
// shadow
|
|
4416
|
-
[v.shadow.outline]:
|
|
4417
|
-
[v.shadow.umbra]:
|
|
4418
|
-
[v.shadow.penumbra]:
|
|
4419
|
-
[v.shadow.ambient]:
|
|
4321
|
+
[v.shadow.outline]: renderColor(t.shadow.outline, context),
|
|
4322
|
+
[v.shadow.umbra]: renderColor(t.shadow.umbra, context),
|
|
4323
|
+
[v.shadow.penumbra]: renderColor(t.shadow.penumbra, context),
|
|
4324
|
+
[v.shadow.ambient]: renderColor(t.shadow.ambient, context)
|
|
4420
4325
|
};
|
|
4421
4326
|
}
|
|
4422
|
-
function
|
|
4423
|
-
return
|
|
4327
|
+
function _compileTheme(theme) {
|
|
4328
|
+
return theme.v3 ? _compileTheme_v3(theme.v3) : theme.v2 ? `/* v2 - not supported */
|
|
4424
4329
|
` : `/* v0 - not supported */
|
|
4425
4330
|
`;
|
|
4426
4331
|
}
|
|
4332
|
+
function _resp(prefix, prop) {
|
|
4333
|
+
if (!(prop === void 0 || prop === !1))
|
|
4334
|
+
return Array.isArray(prop) ? prop.map((value, index) => {
|
|
4335
|
+
if (value === void 0 || typeof prop == "boolean" && prop === !1) return;
|
|
4336
|
+
const className = (typeof value == "boolean" ? [prefix] : [prefix, value]).filter((s) => s === 0 || !!s).join("-").replace(/\./g, "_");
|
|
4337
|
+
return index === 0 ? className : `${index}:${className}`;
|
|
4338
|
+
}).filter(Boolean).join(" ") : (typeof prop == "boolean" ? [prefix] : [prefix, prop]).filter((s) => s === 0 || !!s).join("-").replace(/\./g, "_");
|
|
4339
|
+
}
|
|
4340
|
+
function _getClassNames(...classNames) {
|
|
4341
|
+
return classNames.map((n) => typeof n == "string" && n.trim()).filter(Boolean).join(" ").split(" ");
|
|
4342
|
+
}
|
|
4343
|
+
function composeClassNames(...classNames) {
|
|
4344
|
+
return unique(_getClassNames(...classNames)).join(" ") || void 0;
|
|
4345
|
+
}
|
|
4346
|
+
function unique(array) {
|
|
4347
|
+
return Array.from(new Set(array));
|
|
4348
|
+
}
|
|
4349
|
+
function border(props) {
|
|
4350
|
+
return composeClassNames(_resp("border", props.border), _resp("border-t", props.borderTop), _resp("border-r", props.borderRight), _resp("border-b", props.borderBottom), _resp("border-l", props.borderLeft));
|
|
4351
|
+
}
|
|
4352
|
+
function display(props) {
|
|
4353
|
+
return composeClassNames(_resp(void 0, props.display));
|
|
4354
|
+
}
|
|
4355
|
+
function flex(props) {
|
|
4356
|
+
return composeClassNames(_resp("flex-align", props.align), _resp("f", props.direction), _resp("flex-justify", props.justify), _resp("flex", props.wrap));
|
|
4357
|
+
}
|
|
4358
|
+
function flexItem(props) {
|
|
4359
|
+
return composeClassNames(_resp("f", props.flex));
|
|
4360
|
+
}
|
|
4361
|
+
function font(props) {
|
|
4362
|
+
return composeClassNames("font", props.weight && `font-${props.weight}`);
|
|
4363
|
+
}
|
|
4364
|
+
function gap(props) {
|
|
4365
|
+
return composeClassNames(_resp("g", props.gap), _resp("gx", props.gapX), _resp("gy", props.gapY));
|
|
4366
|
+
}
|
|
4367
|
+
function grid(props) {
|
|
4368
|
+
return composeClassNames(_resp("auto-cols", props.autoCols), _resp("auto-flow", props.autoFlow), _resp("auto-rows", props.autoRows), _resp("cols", props.columns), _resp("rows", props.rows));
|
|
4369
|
+
}
|
|
4370
|
+
function gridItem(props) {
|
|
4371
|
+
return composeClassNames(_resp("col", props.column), _resp("col-start", props.columnStart), _resp("col-end", props.columnEnd), _resp("row", props.row), _resp("row-start", props.rowStart), _resp("row-end", props.rowEnd));
|
|
4372
|
+
}
|
|
4373
|
+
function height(props) {
|
|
4374
|
+
return composeClassNames(_resp("h", props.height));
|
|
4375
|
+
}
|
|
4376
|
+
function inset(props) {
|
|
4377
|
+
return composeClassNames(_resp("inset", props.inset), _resp("top", props.insetTop), _resp("right", props.insetRight), _resp("bottom", props.insetBottom), _resp("left", props.insetLeft));
|
|
4378
|
+
}
|
|
4379
|
+
function margin(props) {
|
|
4380
|
+
return composeClassNames(_resp("m", props.margin), _resp("mx", props.marginX), _resp("my", props.marginY), _resp("mt", props.marginTop), _resp("mr", props.marginRight), _resp("mb", props.marginBottom), _resp("ml", props.marginLeft));
|
|
4381
|
+
}
|
|
4382
|
+
function maxWidth(props) {
|
|
4383
|
+
return _resp("max-w", props.maxWidth) ?? "";
|
|
4384
|
+
}
|
|
4385
|
+
function minWidth(props) {
|
|
4386
|
+
return _resp("min-w", props.minWidth) ?? "";
|
|
4387
|
+
}
|
|
4388
|
+
function overflow(props) {
|
|
4389
|
+
return composeClassNames(_resp("overflow", props.overflow), _resp("overflow-x", props.overflowX), _resp("overflow-y", props.overflowY));
|
|
4390
|
+
}
|
|
4391
|
+
function padding(props) {
|
|
4392
|
+
return composeClassNames(_resp("p", props.padding), _resp("px", props.paddingX), _resp("py", props.paddingY), _resp("pt", props.paddingTop), _resp("pr", props.paddingRight), _resp("pb", props.paddingBottom), _resp("pl", props.paddingLeft));
|
|
4393
|
+
}
|
|
4394
|
+
function pointerEvents(props) {
|
|
4395
|
+
return composeClassNames(props.pointerEvents && `pointer-events-${props.pointerEvents}`);
|
|
4396
|
+
}
|
|
4397
|
+
function position(props) {
|
|
4398
|
+
return composeClassNames(_resp("position", props.position));
|
|
4399
|
+
}
|
|
4400
|
+
function radius(props) {
|
|
4401
|
+
return composeClassNames(_resp("r", props.radius));
|
|
4402
|
+
}
|
|
4403
|
+
function shadow(props) {
|
|
4404
|
+
return composeClassNames(_resp("shadow", props.shadow));
|
|
4405
|
+
}
|
|
4406
|
+
function textAlign(props) {
|
|
4407
|
+
return composeClassNames(_resp("text-align", props.textAlign));
|
|
4408
|
+
}
|
|
4409
|
+
function scopeClassName(className) {
|
|
4410
|
+
if (className !== void 0)
|
|
4411
|
+
return `${PREFIX}${className.trim()}`;
|
|
4412
|
+
}
|
|
4413
|
+
function _comp(...classNames) {
|
|
4414
|
+
return _getClassNames(...classNames).filter(Boolean).map(scopeClassName).join(" ") || void 0;
|
|
4415
|
+
}
|
|
4416
|
+
function textOverflow(props) {
|
|
4417
|
+
return _comp(props.textOverflow && `text-overflow-${props.textOverflow}`);
|
|
4418
|
+
}
|
|
4419
|
+
function width(props) {
|
|
4420
|
+
return _resp("w", props.width) ?? "";
|
|
4421
|
+
}
|
|
4427
4422
|
function breadcrumbs() {
|
|
4428
4423
|
return _comp("breadcrumbs");
|
|
4429
4424
|
}
|
|
@@ -4563,11 +4558,7 @@ function box(props) {
|
|
|
4563
4558
|
);
|
|
4564
4559
|
}
|
|
4565
4560
|
function button(props) {
|
|
4566
|
-
|
|
4567
|
-
mode,
|
|
4568
|
-
tone
|
|
4569
|
-
} = props;
|
|
4570
|
-
return _comp("button", variantMap[mode ?? "default"], toneMap[tone ?? "default"], display(props), flexItem(props), radius(props), width(props));
|
|
4561
|
+
return _comp("button", display(props), flexItem(props), radius(props), width(props));
|
|
4571
4562
|
}
|
|
4572
4563
|
function buttonLoadingBox() {
|
|
4573
4564
|
return "button-loading-box";
|
|
@@ -4661,107 +4652,109 @@ function tooltipCard() {
|
|
|
4661
4652
|
function srOnly() {
|
|
4662
4653
|
return _comp(composeClassNames("sr-only"));
|
|
4663
4654
|
}
|
|
4664
|
-
|
|
4665
|
-
|
|
4666
|
-
|
|
4667
|
-
|
|
4668
|
-
|
|
4669
|
-
|
|
4670
|
-
|
|
4671
|
-
|
|
4672
|
-
|
|
4673
|
-
|
|
4674
|
-
|
|
4675
|
-
|
|
4676
|
-
|
|
4677
|
-
|
|
4678
|
-
|
|
4679
|
-
|
|
4680
|
-
|
|
4681
|
-
|
|
4682
|
-
|
|
4683
|
-
|
|
4684
|
-
|
|
4685
|
-
|
|
4686
|
-
|
|
4687
|
-
|
|
4688
|
-
|
|
4689
|
-
|
|
4690
|
-
|
|
4691
|
-
|
|
4692
|
-
|
|
4693
|
-
|
|
4694
|
-
|
|
4695
|
-
|
|
4696
|
-
|
|
4697
|
-
|
|
4698
|
-
|
|
4699
|
-
|
|
4700
|
-
|
|
4701
|
-
|
|
4702
|
-
|
|
4703
|
-
|
|
4704
|
-
|
|
4705
|
-
|
|
4706
|
-
|
|
4707
|
-
|
|
4708
|
-
|
|
4709
|
-
|
|
4710
|
-
|
|
4711
|
-
|
|
4712
|
-
|
|
4713
|
-
|
|
4714
|
-
|
|
4715
|
-
|
|
4716
|
-
|
|
4717
|
-
|
|
4718
|
-
|
|
4719
|
-
|
|
4720
|
-
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
|
|
4725
|
-
|
|
4726
|
-
|
|
4727
|
-
|
|
4728
|
-
|
|
4729
|
-
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
|
|
4733
|
-
|
|
4734
|
-
|
|
4735
|
-
|
|
4736
|
-
|
|
4737
|
-
|
|
4738
|
-
|
|
4739
|
-
|
|
4740
|
-
|
|
4741
|
-
|
|
4742
|
-
|
|
4743
|
-
|
|
4744
|
-
|
|
4745
|
-
|
|
4746
|
-
|
|
4747
|
-
|
|
4748
|
-
|
|
4749
|
-
|
|
4750
|
-
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
|
|
4759
|
-
|
|
4760
|
-
|
|
4761
|
-
|
|
4762
|
-
|
|
4763
|
-
|
|
4764
|
-
|
|
4765
|
-
|
|
4766
|
-
|
|
4655
|
+
export {
|
|
4656
|
+
BREAKPOINTS,
|
|
4657
|
+
PREFIX,
|
|
4658
|
+
_arrow,
|
|
4659
|
+
_arrowShape,
|
|
4660
|
+
_arrowStroke,
|
|
4661
|
+
_arrowStrokeMask,
|
|
4662
|
+
_compilePalette,
|
|
4663
|
+
_compileSystem,
|
|
4664
|
+
_compileTheme,
|
|
4665
|
+
_getClassNames,
|
|
4666
|
+
_input,
|
|
4667
|
+
_inputElement,
|
|
4668
|
+
_inputPresentation,
|
|
4669
|
+
_selectable,
|
|
4670
|
+
_switch,
|
|
4671
|
+
_switchElement,
|
|
4672
|
+
_switchPresentation,
|
|
4673
|
+
_switchThumb,
|
|
4674
|
+
_switchTrack,
|
|
4675
|
+
animatedSpinnerIcon,
|
|
4676
|
+
avatar,
|
|
4677
|
+
avatarArrow,
|
|
4678
|
+
avatarCounter,
|
|
4679
|
+
avatarImage,
|
|
4680
|
+
avatarInitials,
|
|
4681
|
+
avatarStack,
|
|
4682
|
+
badge,
|
|
4683
|
+
border,
|
|
4684
|
+
box,
|
|
4685
|
+
breadcrumbs,
|
|
4686
|
+
button,
|
|
4687
|
+
buttonLoadingBox,
|
|
4688
|
+
card,
|
|
4689
|
+
checkbox,
|
|
4690
|
+
checkboxInput,
|
|
4691
|
+
code,
|
|
4692
|
+
codeSkeleton,
|
|
4693
|
+
composeClassNames,
|
|
4694
|
+
container,
|
|
4695
|
+
dialog,
|
|
4696
|
+
dialogCardRoot,
|
|
4697
|
+
dialogContainer,
|
|
4698
|
+
dialogContent,
|
|
4699
|
+
dialogFooter,
|
|
4700
|
+
dialogHeader,
|
|
4701
|
+
dialogLayout,
|
|
4702
|
+
display,
|
|
4703
|
+
flex,
|
|
4704
|
+
flexItem,
|
|
4705
|
+
font,
|
|
4706
|
+
gap,
|
|
4707
|
+
grid,
|
|
4708
|
+
gridItem,
|
|
4709
|
+
heading,
|
|
4710
|
+
headingSkeleton,
|
|
4711
|
+
height,
|
|
4712
|
+
inset,
|
|
4713
|
+
isArray,
|
|
4714
|
+
isRecord,
|
|
4715
|
+
kbd,
|
|
4716
|
+
label,
|
|
4717
|
+
labelSkeleton,
|
|
4718
|
+
margin,
|
|
4719
|
+
maxWidth,
|
|
4720
|
+
menu,
|
|
4721
|
+
menuDivider,
|
|
4722
|
+
minWidth,
|
|
4723
|
+
overflow,
|
|
4724
|
+
padding,
|
|
4725
|
+
pointerEvents,
|
|
4726
|
+
popover,
|
|
4727
|
+
popoverCard,
|
|
4728
|
+
position,
|
|
4729
|
+
px,
|
|
4730
|
+
radio,
|
|
4731
|
+
radius,
|
|
4732
|
+
rem,
|
|
4733
|
+
scopeClassName,
|
|
4734
|
+
select,
|
|
4735
|
+
selectPresentation,
|
|
4736
|
+
shadow,
|
|
4737
|
+
skeleton,
|
|
4738
|
+
spinner,
|
|
4739
|
+
srOnly,
|
|
4740
|
+
stack,
|
|
4741
|
+
text,
|
|
4742
|
+
textAlign,
|
|
4743
|
+
textArea,
|
|
4744
|
+
textInput,
|
|
4745
|
+
textOverflow,
|
|
4746
|
+
textSkeleton,
|
|
4747
|
+
toBoxShadow,
|
|
4748
|
+
toast,
|
|
4749
|
+
toastLayer,
|
|
4750
|
+
toastLoadingBar,
|
|
4751
|
+
toastLoadingBarMask,
|
|
4752
|
+
toastLoadingBarProgress,
|
|
4753
|
+
tooltip,
|
|
4754
|
+
tooltipCard,
|
|
4755
|
+
treeItem,
|
|
4756
|
+
varNames,
|
|
4757
|
+
vars,
|
|
4758
|
+
width
|
|
4759
|
+
};
|
|
4767
4760
|
//# sourceMappingURL=css.js.map
|