@sanity/ui 3.0.0-static.3 → 3.0.0-static.5

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.
Files changed (68) hide show
  1. package/dist/_chunks-cjs/_visual-editing.js +98 -64
  2. package/dist/_chunks-cjs/_visual-editing.js.map +1 -1
  3. package/dist/_chunks-cjs/buildCommand.js +1 -1
  4. package/dist/_chunks-cjs/buildCommand.js.map +1 -1
  5. package/dist/_chunks-es/_visual-editing.mjs +99 -65
  6. package/dist/_chunks-es/_visual-editing.mjs.map +1 -1
  7. package/dist/_visual-editing.d.mts +4 -1
  8. package/dist/_visual-editing.d.ts +4 -1
  9. package/dist/cli.js +1 -1
  10. package/dist/css.d.mts +145 -893
  11. package/dist/css.d.ts +145 -893
  12. package/dist/css.js +182 -191
  13. package/dist/css.js.map +1 -1
  14. package/dist/css.mjs +182 -191
  15. package/dist/css.mjs.map +1 -1
  16. package/dist/index.d.mts +4 -1
  17. package/dist/index.d.ts +4 -1
  18. package/dist/index.js +12 -14
  19. package/dist/index.js.map +1 -1
  20. package/dist/index.mjs +12 -14
  21. package/dist/index.mjs.map +1 -1
  22. package/dist/sanity-palette.css +1 -9
  23. package/dist/sanity-theme.css +1 -1
  24. package/dist/system.css +114 -109
  25. package/dist/theme.d.mts +1 -43
  26. package/dist/theme.d.ts +1 -43
  27. package/dist/theme.js +291 -102
  28. package/dist/theme.js.map +1 -1
  29. package/dist/theme.mjs +272 -85
  30. package/dist/theme.mjs.map +1 -1
  31. package/package.json +1 -1
  32. package/src/cli/buildCommand.ts +2 -2
  33. package/src/css/_comp.ts +1 -0
  34. package/src/css/aspects/flex/flexJustify.style.ts +3 -3
  35. package/src/css/aspects/grid/types.ts +2 -2
  36. package/src/css/aspects/textOverflow/textOverflow.ts +2 -2
  37. package/src/css/compile/compilePalette.ts +8 -41
  38. package/src/css/compile/compileTheme_v3.ts +0 -18
  39. package/src/css/index.ts +2 -2
  40. package/src/css/primitives/_selectable/_contants.ts +1 -1
  41. package/src/css/primitives/box/box.ts +3 -0
  42. package/src/css/primitives/button/_constants.ts +1 -1
  43. package/src/css/primitives/button/button.style.ts +12 -13
  44. package/src/css/primitives/card/_constants.ts +2 -2
  45. package/src/css/primitives/card/card.ts +1 -1
  46. package/src/css/primitives/stack/index.ts +1 -0
  47. package/src/css/primitives/stack/stack.style.ts +9 -0
  48. package/src/css/primitives/stack/stack.ts +6 -0
  49. package/src/css/system.style.ts +2 -0
  50. package/src/theme/defaults/config.ts +2 -2
  51. package/src/theme/defaults/fonts.ts +4 -4
  52. package/src/theme/palette/constants.ts +1 -3
  53. package/src/theme/palette/types.ts +0 -12
  54. package/src/theme/v3/buildTheme_v3.ts +1 -2
  55. package/src/theme/v3/defaults.ts +12 -31
  56. package/src/theme/v3/types.ts +0 -3
  57. package/src/ui/StyleTags.tsx +1 -1
  58. package/src/ui/primitives/box/box.tsx +6 -0
  59. package/src/ui/primitives/button/button.tsx +12 -11
  60. package/src/ui/primitives/card/card.tsx +5 -2
  61. package/src/ui/primitives/heading/heading.tsx +1 -1
  62. package/src/ui/primitives/select/select.tsx +3 -3
  63. package/src/ui/primitives/stack/stack.tsx +10 -5
  64. package/src/ui/primitives/text/text.tsx +1 -1
  65. package/dist/_chunks-cjs/v3_v2.js +0 -251
  66. package/dist/_chunks-cjs/v3_v2.js.map +0 -1
  67. package/dist/_chunks-es/v3_v2.mjs +0 -252
  68. package/dist/_chunks-es/v3_v2.mjs.map +0 -1
package/dist/css.js CHANGED
@@ -1,7 +1,91 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: !0 });
3
- var v3_v2 = require("./_chunks-cjs/v3_v2.js"), theme = require("@sanity/ui/theme");
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}`, _resp("text-align", props.align));
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 overflow(props) {
58
+ return composeClassNames(_resp("overflow", props.overflow), _resp("overflow-x", props.overflowX), _resp("overflow-y", props.overflowY));
59
+ }
60
+ function padding(props) {
61
+ 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));
62
+ }
63
+ function pointerEvents(props) {
64
+ return composeClassNames(props.pointerEvents && `pointer-events-${props.pointerEvents}`);
65
+ }
66
+ function position(props) {
67
+ return composeClassNames(_resp("position", props.position));
68
+ }
69
+ function radius(props) {
70
+ return composeClassNames(_resp("r", props.radius));
71
+ }
72
+ function shadow(props) {
73
+ return composeClassNames(_resp("shadow", props.shadow));
74
+ }
4
75
  const PREFIX = "s-";
76
+ function scopeClassName(className) {
77
+ if (className !== void 0)
78
+ return `${PREFIX}${className.trim()}`;
79
+ }
80
+ function _comp(...classNames) {
81
+ return getClassNames(...classNames).filter(Boolean).map(scopeClassName).join(" ") || void 0;
82
+ }
83
+ function textOverflow(props) {
84
+ return _comp(props.textOverflow && `text-overflow-${props.textOverflow}`);
85
+ }
86
+ function width(props) {
87
+ return _resp("w", props.width) ?? "";
88
+ }
5
89
  function compileRule(selector, props, context) {
6
90
  let css = compileProperties$1(selector, props);
7
91
  if (props["@nest"] && (css += compileNestedRules(selector, props["@nest"], context)), props["@keyframes"])
@@ -33,44 +117,22 @@ function compileNestedRules(selector, props, context) {
33
117
  function toSnakeCase$1(value) {
34
118
  return value.replace(/[A-Z]/g, (match) => "-" + match.toLowerCase());
35
119
  }
36
- function compilePalette(config) {
120
+ function compilePalette() {
37
121
  const props = {
38
- "--l-min": `${config.luminosity.min * 100}%`,
39
- "--l-max": `${config.luminosity.max * 100}%`,
40
- "--l-range": "calc(var(--l-max) - var(--l-min))",
41
- "--c-min": `${config.chroma.min}`,
42
- "--c-max": `${config.chroma.max}`,
43
- "--c-range": "calc(var(--c-max) - var(--c-min))",
44
- ...compileHues(config.hues),
45
- "--black": `oklch(
46
- calc(var(--l-min) + 0.0 * var(--l-range))
47
- calc(var(--c-min) + 0.0 * var(--gray-c-range))
48
- var(--gray-h)
49
- )`,
50
- "--white": `oklch(
51
- calc(var(--l-min) + 1.0 * var(--l-range))
52
- calc(var(--c-min) + 0.0 * var(--gray-c-range))
53
- var(--gray-h)
54
- )`
122
+ ...compileHues(),
123
+ "--black": color.color.black.hex,
124
+ "--white": color.color.white.hex
55
125
  };
56
126
  return compileRule(":root", props, {
57
127
  keyframes: {},
58
128
  media: {}
59
129
  });
60
130
  }
61
- function compileHues(hues) {
131
+ function compileHues() {
62
132
  const rules2 = {};
63
- for (const hue of theme.HUES) {
64
- const {
65
- c,
66
- h
67
- } = hues[hue];
68
- rules2[`--${hue}-h`] = `${h}`, rules2[`--${hue}-c`] = `${c}`, rules2[`--${hue}-c-max`] = `min(var(--c-max), var(--${hue}-c))`, rules2[`--${hue}-c-range`] = `calc(var(--${hue}-c-max) - var(--c-min))`;
69
- for (const tint of theme.TINTS) {
70
- const l_offset = parseFloat((1 - tint / 1e3).toFixed(2)), c_offset_tmp = tint / 500, c_offset = parseFloat((c_offset_tmp < 1 ? c_offset_tmp : 2 - c_offset_tmp).toFixed(1));
71
- rules2[`--${hue}-${tint}`] = ["oklch(", `calc(var(--l-min) + ${l_offset} * var(--l-range)) `, `calc(var(--c-min) + ${c_offset} * var(--${hue}-c-range)) `, `var(--${hue}-h)`, ")"].join("");
72
- }
73
- }
133
+ for (const hue of theme.HUES)
134
+ for (const tint of theme.TINTS)
135
+ rules2[`--${hue}-${tint}`] = color.color[hue][tint].hex;
74
136
  return rules2;
75
137
  }
76
138
  function _mergeStyles(styles) {
@@ -839,11 +901,11 @@ function buildColorCardVars(props) {
839
901
  fg: `var(${prefix.accent.fg})`
840
902
  },
841
903
  avatar: {
842
- ...theme.THEME_COLOR_AVATAR_COLORS.reduce((acc, color) => ({
904
+ ...theme.THEME_COLOR_AVATAR_COLORS.reduce((acc, color2) => ({
843
905
  ...acc,
844
- [color]: {
845
- bg: `var(${prefix.avatar[color].bg})`,
846
- fg: `var(${prefix.avatar[color].fg})`
906
+ [color2]: {
907
+ bg: `var(${prefix.avatar[color2].bg})`,
908
+ fg: `var(${prefix.avatar[color2].fg})`
847
909
  }
848
910
  }), {})
849
911
  },
@@ -1087,13 +1149,13 @@ _responsiveRule(util$o, "flex-justify-flex-end", {
1087
1149
  _responsiveRule(util$o, "flex-justify-center", {
1088
1150
  justifyContent: "center"
1089
1151
  });
1090
- _responsiveRule(util$o, "flex-justify-between", {
1152
+ _responsiveRule(util$o, "flex-justify-space-between", {
1091
1153
  justifyContent: "space-between"
1092
1154
  });
1093
- _responsiveRule(util$o, "flex-justify-around", {
1155
+ _responsiveRule(util$o, "flex-justify-space-around", {
1094
1156
  justifyContent: "space-around"
1095
1157
  });
1096
- _responsiveRule(util$o, "flex-justify-evenly", {
1158
+ _responsiveRule(util$o, "flex-justify-space-evenly", {
1097
1159
  justifyContent: "space-evenly"
1098
1160
  });
1099
1161
  const flexJustifyStyle = {
@@ -2139,7 +2201,7 @@ const skeletonStyle = {
2139
2201
  layers: {
2140
2202
  component
2141
2203
  }
2142
- }, primitive$o = {
2204
+ }, primitive$p = {
2143
2205
  ".arrow": {
2144
2206
  position: "absolute",
2145
2207
  // todo: replace with vars?
@@ -2191,9 +2253,9 @@ const skeletonStyle = {
2191
2253
  }
2192
2254
  }, _arrowStyle = {
2193
2255
  layers: {
2194
- primitive: primitive$o
2256
+ primitive: primitive$p
2195
2257
  }
2196
- }, primitive$n = {
2258
+ }, primitive$o = {
2197
2259
  ".input": {
2198
2260
  position: "relative"
2199
2261
  },
@@ -2297,7 +2359,7 @@ const skeletonStyle = {
2297
2359
  };
2298
2360
  for (const textSize of theme.FONT_TEXT_SIZE) {
2299
2361
  const source = vars.font.text.sizes[textSize];
2300
- primitive$n[`.input-${textSize}`] = {
2362
+ primitive$o[`.input-${textSize}`] = {
2301
2363
  [varNames.input.fontSize]: source.fontSize,
2302
2364
  [varNames.input.lineHeight]: source.lineHeight,
2303
2365
  [varNames.input.letterSpacing]: source.letterSpacing,
@@ -2306,26 +2368,26 @@ for (const textSize of theme.FONT_TEXT_SIZE) {
2306
2368
  };
2307
2369
  }
2308
2370
  for (const space of theme.SPACE)
2309
- primitive$n[`.input-p-${space}`] = {
2371
+ primitive$o[`.input-p-${space}`] = {
2310
2372
  [varNames.input.padding]: vars.space[space]
2311
2373
  };
2312
2374
  for (const space of theme.SPACE)
2313
- primitive$n[`.input-g-${space}`] = {
2375
+ primitive$o[`.input-g-${space}`] = {
2314
2376
  [varNames.input.gap]: vars.space[space]
2315
2377
  };
2316
2378
  const _inputStyle = {
2317
2379
  layers: {
2318
- primitive: primitive$n
2380
+ primitive: primitive$o
2319
2381
  }
2320
2382
  }, toneMap$2 = {
2321
- default: "surface",
2383
+ default: "default",
2322
2384
  neutral: "neutral",
2323
2385
  suggest: "suggest",
2324
2386
  primary: "accent",
2325
2387
  positive: "positive",
2326
2388
  caution: "caution",
2327
2389
  critical: "critical"
2328
- }, primitive$m = {
2390
+ }, primitive$n = {
2329
2391
  ".selectable": {
2330
2392
  backgroundColor: vars.color.bg,
2331
2393
  color: vars.color.fg,
@@ -2390,7 +2452,7 @@ const _inputStyle = {
2390
2452
  }
2391
2453
  }, _selectableStyle = {
2392
2454
  layers: {
2393
- primitive: primitive$m
2455
+ primitive: primitive$n
2394
2456
  }
2395
2457
  };
2396
2458
  function buildSelectableTones() {
@@ -2432,7 +2494,7 @@ function buildSelectableTones() {
2432
2494
  }
2433
2495
  return rules2;
2434
2496
  }
2435
- const primitive$l = {
2497
+ const primitive$m = {
2436
2498
  ".avatar": {
2437
2499
  backgroundColor: vars.color.avatar.bg,
2438
2500
  position: "relative",
@@ -2469,11 +2531,11 @@ const primitive$l = {
2469
2531
  [varNames.color.avatar.bg]: vars.color.border,
2470
2532
  [varNames.color.avatar.fg]: vars.color.bg
2471
2533
  },
2472
- ...theme.THEME_COLOR_AVATAR_COLORS.reduce((acc, color) => ({
2534
+ ...theme.THEME_COLOR_AVATAR_COLORS.reduce((acc, color2) => ({
2473
2535
  ...acc,
2474
- [`&.${color}`]: {
2475
- [varNames.color.avatar.bg]: vars.color.avatar[color].bg,
2476
- [varNames.color.avatar.fg]: vars.color.avatar[color].fg
2536
+ [`&.${color2}`]: {
2537
+ [varNames.color.avatar.bg]: vars.color.avatar[color2].bg,
2538
+ [varNames.color.avatar.fg]: vars.color.avatar[color2].fg
2477
2539
  }
2478
2540
  }), {})
2479
2541
  }
@@ -2564,15 +2626,15 @@ const primitive$l = {
2564
2626
  }
2565
2627
  };
2566
2628
  for (const size of theme.AVATAR_SIZE)
2567
- _responsiveRule(primitive$l, `avatar-${size}`, {
2629
+ _responsiveRule(primitive$m, `avatar-${size}`, {
2568
2630
  [varNames.avatar.distance]: vars.avatar.sizes[size].distance,
2569
2631
  [varNames.avatar.size]: vars.avatar.sizes[size].size
2570
2632
  });
2571
2633
  const avatarStyle = {
2572
2634
  layers: {
2573
- primitive: primitive$l
2635
+ primitive: primitive$m
2574
2636
  }
2575
- }, primitive$k = {
2637
+ }, primitive$l = {
2576
2638
  ".badge": {
2577
2639
  backgroundColor: vars.color.bg,
2578
2640
  color: vars.color.fg,
@@ -2580,15 +2642,15 @@ const avatarStyle = {
2580
2642
  }
2581
2643
  };
2582
2644
  for (const tone of theme.THEME_COLOR_STATE_TONES)
2583
- primitive$k[`.badge-${tone}`] = {
2645
+ primitive$l[`.badge-${tone}`] = {
2584
2646
  [varNames.color.bg]: vars.color.tinted[tone].bg[4],
2585
2647
  [varNames.color.fg]: vars.color.tinted[tone].fg[1]
2586
2648
  };
2587
2649
  const badgeStyle = {
2588
2650
  layers: {
2589
- primitive: primitive$k
2651
+ primitive: primitive$l
2590
2652
  }
2591
- }, primitive$j = {
2653
+ }, primitive$k = {
2592
2654
  ".box": {
2593
2655
  minWidth: 0,
2594
2656
  minHeight: 0,
@@ -2610,10 +2672,10 @@ const badgeStyle = {
2610
2672
  }
2611
2673
  }, boxStyle = {
2612
2674
  layers: {
2613
- primitive: primitive$j
2675
+ primitive: primitive$k
2614
2676
  }
2615
2677
  }, toneMap$1 = {
2616
- default: "surface",
2678
+ default: "default",
2617
2679
  neutral: "neutral",
2618
2680
  suggest: "suggest",
2619
2681
  primary: "accent",
@@ -2624,7 +2686,7 @@ const badgeStyle = {
2624
2686
  default: "solid",
2625
2687
  ghost: "ghost",
2626
2688
  bleed: "tinted"
2627
- }, primitive$i = {
2689
+ }, primitive$j = {
2628
2690
  ".button": {
2629
2691
  WebkitFontSmoothing: "inherit",
2630
2692
  appearance: "none",
@@ -2643,6 +2705,8 @@ const badgeStyle = {
2643
2705
  backgroundColor: vars.color.bg,
2644
2706
  color: vars.color.fg,
2645
2707
  boxShadow: "var(--button-box-shadow)",
2708
+ alignItems: "center",
2709
+ // 'justifyContent': 'center',
2646
2710
  "@nest": {
2647
2711
  "&::-moz-focus-inner": {
2648
2712
  border: 0,
@@ -2671,7 +2735,7 @@ const badgeStyle = {
2671
2735
  };
2672
2736
  for (const tone of theme.THEME_COLOR_STATE_TONES) {
2673
2737
  const solid = vars.color.solid[tone], tinted = vars.color.tinted[tone];
2674
- primitive$i[`.button.${variantMap.default}.${toneMap$1[tone]}`] = {
2738
+ primitive$j[`.button.${variantMap.default}.${toneMap$1[tone]}`] = {
2675
2739
  [varNames.color.bg]: solid.bg[0],
2676
2740
  [varNames.color.border]: solid.border[1],
2677
2741
  [varNames.color.fg]: solid.fg[0],
@@ -2703,37 +2767,37 @@ for (const tone of theme.THEME_COLOR_STATE_TONES) {
2703
2767
  [varNames.color.muted.fg]: vars.color.default.tinted.fg[1]
2704
2768
  }
2705
2769
  }
2706
- }, primitive$i[`.button.${variantMap.ghost}.${toneMap$1[tone]}`] = {
2707
- [varNames.color.bg]: tinted.bg[0],
2708
- [varNames.color.border]: tinted.border[1],
2770
+ }, primitive$j[`.button.${variantMap.ghost}.${toneMap$1[tone]}`] = {
2771
+ [varNames.color.bg]: tinted.bg[1],
2772
+ [varNames.color.border]: tinted.border[0],
2709
2773
  [varNames.color.fg]: tinted.fg[2],
2710
- "--button-box-shadow": ["inset 0 0 0 var(--button-border-width) var(--color-border)", "inset 0 -1.5px 0 0.5px var(--color-shadow-umbra)"].join(","),
2774
+ "--button-box-shadow": "inset 0 0 0 var(--button-border-width) var(--color-border)",
2711
2775
  "@nest": {
2712
2776
  "&:not([data-disabled]):hover": {
2713
- [varNames.color.bg]: tinted.bg[1],
2714
- [varNames.color.border]: tinted.border[2],
2777
+ [varNames.color.bg]: tinted.bg[2],
2778
+ [varNames.color.border]: tinted.border[1],
2715
2779
  [varNames.color.fg]: tinted.fg[1]
2716
2780
  // '--button-box-shadow': `inset 0 0 0 var(--button-border-width) var(--color-border)`,
2717
2781
  },
2718
2782
  "&:not([data-disabled]):active": {
2719
- [varNames.color.bg]: tinted.bg[2],
2720
- [varNames.color.border]: tinted.border[3],
2783
+ [varNames.color.bg]: tinted.bg[3],
2784
+ [varNames.color.border]: tinted.border[2],
2721
2785
  [varNames.color.fg]: tinted.fg[1],
2722
2786
  "--button-box-shadow": "inset 0 0 0 var(--button-border-width) var(--color-border)"
2723
2787
  },
2724
2788
  "&:not([data-disabled])[data-selected]": {
2725
- [varNames.color.bg]: tinted.bg[2],
2726
- [varNames.color.border]: tinted.border[3],
2789
+ [varNames.color.bg]: tinted.bg[3],
2790
+ [varNames.color.border]: tinted.border[2],
2727
2791
  [varNames.color.fg]: tinted.fg[1],
2728
2792
  "--button-box-shadow": "inset 0 0 0 var(--button-border-width) var(--color-border)"
2729
2793
  },
2730
2794
  "&[data-disabled]": {
2731
- [varNames.color.bg]: vars.color.default.tinted.bg[0],
2795
+ [varNames.color.bg]: vars.color.default.tinted.bg[1],
2732
2796
  [varNames.color.border]: vars.color.default.tinted.border[0],
2733
2797
  [varNames.color.fg]: vars.color.default.tinted.fg[2]
2734
2798
  }
2735
2799
  }
2736
- }, primitive$i[`.button.${variantMap.bleed}.${toneMap$1[tone]}`] = {
2800
+ }, primitive$j[`.button.${variantMap.bleed}.${toneMap$1[tone]}`] = {
2737
2801
  boxShadow: "none",
2738
2802
  [varNames.color.bg]: tinted.bg[0],
2739
2803
  [varNames.color.border]: tinted.border[1],
@@ -2770,11 +2834,11 @@ for (const tone of theme.THEME_COLOR_STATE_TONES) {
2770
2834
  }
2771
2835
  const buttonStyle = {
2772
2836
  layers: {
2773
- primitive: primitive$i
2837
+ primitive: primitive$j
2774
2838
  }
2775
2839
  }, toneMap = {
2776
- transparent: "canvas",
2777
- default: "surface",
2840
+ transparent: "transparent",
2841
+ default: "default",
2778
2842
  neutral: "neutral",
2779
2843
  suggest: "suggest",
2780
2844
  primary: "accent",
@@ -2782,7 +2846,7 @@ const buttonStyle = {
2782
2846
  caution: "caution",
2783
2847
  critical: "critical",
2784
2848
  inherit: void 0
2785
- }, primitive$h = {
2849
+ }, primitive$i = {
2786
2850
  ".card": {
2787
2851
  backgroundColor: vars.color.bg,
2788
2852
  color: vars.color.fg,
@@ -2821,7 +2885,7 @@ for (const scheme of theme.THEME_COLOR_SCHEMES) {
2821
2885
  const _varNames = varNames.color[tone], _vars = vars.color[scheme][tone];
2822
2886
  _assignToneProps(schemeProps, _varNames, _vars);
2823
2887
  }
2824
- primitive$h[`.card.${scheme}`] = schemeProps;
2888
+ primitive$i[`.card.${scheme}`] = schemeProps;
2825
2889
  }
2826
2890
  for (const tone of theme.THEME_COLOR_CARD_TONES) {
2827
2891
  const _varNames = varNames.color, _vars = vars.color[tone], toneProps = {};
@@ -2849,11 +2913,11 @@ for (const tone of theme.THEME_COLOR_CARD_TONES) {
2849
2913
  // '--card-skeleton-to-color': 'var(--color-skeleton-to)',
2850
2914
  "--card-hairline-soft-color": vars.color.tinted.default.border[1],
2851
2915
  "--card-hairline-hard-color": vars.color.tinted.default.border[2]
2852
- }), primitive$h[`.card.${toneMap[tone]}`] = toneProps;
2916
+ }), primitive$i[`.card.${toneMap[tone]}`] = toneProps;
2853
2917
  }
2854
2918
  const cardStyle = {
2855
2919
  layers: {
2856
- primitive: primitive$h
2920
+ primitive: primitive$i
2857
2921
  }
2858
2922
  };
2859
2923
  function _assignToneProps(toneProps, _varNames, _vars) {
@@ -2929,7 +2993,7 @@ function _assignToneProps(toneProps, _varNames, _vars) {
2929
2993
  });
2930
2994
  }
2931
2995
  }
2932
- const primitive$g = {
2996
+ const primitive$h = {
2933
2997
  ".checkbox": {
2934
2998
  position: "relative",
2935
2999
  display: "inline-block"
@@ -3059,9 +3123,9 @@ const primitive$g = {
3059
3123
  }
3060
3124
  }, checkboxStyle = {
3061
3125
  layers: {
3062
- primitive: primitive$g
3126
+ primitive: primitive$h
3063
3127
  }
3064
- }, primitive$f = {
3128
+ }, primitive$g = {
3065
3129
  ".code": {
3066
3130
  "--font-weight-regular": "var(--font-code-weight-regular)",
3067
3131
  "--font-weight-medium": "var(--font-code-weight-medium)",
@@ -3097,7 +3161,7 @@ const primitive$g = {
3097
3161
  }
3098
3162
  };
3099
3163
  for (const size of theme.FONT_CODE_SIZE)
3100
- _responsiveRule(primitive$f, `code-${size}`, {
3164
+ _responsiveRule(primitive$g, `code-${size}`, {
3101
3165
  "--font-size": `var(--font-code-${size}-size)`,
3102
3166
  "--font-line-height": `var(--font-code-${size}-line-height)`,
3103
3167
  "--font-letter-spacing": `var(--font-code-${size}-letter-spacing)`,
@@ -3108,18 +3172,18 @@ for (const size of theme.FONT_CODE_SIZE)
3108
3172
  });
3109
3173
  const codeStyle = {
3110
3174
  layers: {
3111
- primitive: primitive$f
3175
+ primitive: primitive$g
3112
3176
  }
3113
- }, primitive$e = {
3177
+ }, primitive$f = {
3114
3178
  ".container": {
3115
3179
  margin: "0 auto",
3116
3180
  width: "100%"
3117
3181
  }
3118
3182
  }, containerStyle = {
3119
3183
  layers: {
3120
- primitive: primitive$e
3184
+ primitive: primitive$f
3121
3185
  }
3122
- }, primitive$d = {
3186
+ }, primitive$e = {
3123
3187
  ".heading": {
3124
3188
  "--font-weight-regular": "var(--font-heading-weight-regular)",
3125
3189
  "--font-weight-medium": "var(--font-heading-weight-medium)",
@@ -3143,7 +3207,7 @@ const codeStyle = {
3143
3207
  }
3144
3208
  };
3145
3209
  for (const size of theme.FONT_HEADING_SIZE)
3146
- _responsiveRule(primitive$d, `heading-${size}`, {
3210
+ _responsiveRule(primitive$e, `heading-${size}`, {
3147
3211
  "--font-size": `var(--font-heading-${size}-size)`,
3148
3212
  "--font-line-height": `var(--font-heading-${size}-line-height)`,
3149
3213
  "--font-letter-spacing": `var(--font-heading-${size}-letter-spacing)`,
@@ -3154,9 +3218,9 @@ for (const size of theme.FONT_HEADING_SIZE)
3154
3218
  });
3155
3219
  const headingStyle = {
3156
3220
  layers: {
3157
- primitive: primitive$d
3221
+ primitive: primitive$e
3158
3222
  }
3159
- }, primitive$c = {
3223
+ }, primitive$d = {
3160
3224
  ".kbd": {
3161
3225
  // '--color-bg': 'var(--color-tinted-default-bg-1)',
3162
3226
  // '--color-border': 'var(--color-tinted-default-border-2)',
@@ -3173,9 +3237,9 @@ const headingStyle = {
3173
3237
  }
3174
3238
  }, kbdStyle = {
3175
3239
  layers: {
3176
- primitive: primitive$c
3240
+ primitive: primitive$d
3177
3241
  }
3178
- }, primitive$b = {
3242
+ }, primitive$c = {
3179
3243
  ".label": {
3180
3244
  "--font-weight-regular": "var(--font-label-weight-regular)",
3181
3245
  "--font-weight-medium": "var(--font-label-weight-medium)",
@@ -3200,7 +3264,7 @@ const headingStyle = {
3200
3264
  }
3201
3265
  };
3202
3266
  for (const size of theme.FONT_LABEL_SIZE)
3203
- _responsiveRule(primitive$b, `label-${size}`, {
3267
+ _responsiveRule(primitive$c, `label-${size}`, {
3204
3268
  "--font-size": `var(--font-label-${size}-size)`,
3205
3269
  "--font-line-height": `var(--font-label-${size}-line-height)`,
3206
3270
  "--font-letter-spacing": `var(--font-label-${size}-letter-spacing)`,
@@ -3211,13 +3275,13 @@ for (const size of theme.FONT_LABEL_SIZE)
3211
3275
  });
3212
3276
  const labelStyle = {
3213
3277
  layers: {
3214
- primitive: primitive$b
3278
+ primitive: primitive$c
3215
3279
  }
3216
- }, primitive$a = {}, popoverStyle = {
3280
+ }, primitive$b = {}, popoverStyle = {
3217
3281
  layers: {
3218
- primitive: primitive$a
3282
+ primitive: primitive$b
3219
3283
  }
3220
- }, primitive$9 = {
3284
+ }, primitive$a = {
3221
3285
  ".radio": {
3222
3286
  position: "relative",
3223
3287
  "@nest": {
@@ -3323,9 +3387,9 @@ const labelStyle = {
3323
3387
  }
3324
3388
  }, radioStyle = {
3325
3389
  layers: {
3326
- primitive: primitive$9
3390
+ primitive: primitive$a
3327
3391
  }
3328
- }, primitive$8 = {
3392
+ }, primitive$9 = {
3329
3393
  ".select": {
3330
3394
  "@nest": {
3331
3395
  "& > select:disabled": {
@@ -3345,7 +3409,7 @@ const labelStyle = {
3345
3409
  }
3346
3410
  }, selectStyle = {
3347
3411
  layers: {
3348
- primitive: primitive$8
3412
+ primitive: primitive$9
3349
3413
  }
3350
3414
  }, keyframes = {
3351
3415
  "spinner-rotate": {
@@ -3356,13 +3420,21 @@ const labelStyle = {
3356
3420
  transform: "rotate(360deg)"
3357
3421
  }
3358
3422
  }
3359
- }, primitive$7 = {
3423
+ }, primitive$8 = {
3360
3424
  ".spinner": {},
3361
3425
  ".animated-spinner-icon": {
3362
3426
  animation: "spinner-rotate 500ms linear infinite"
3363
3427
  }
3364
3428
  }, spinnerStyle = {
3365
3429
  keyframes,
3430
+ layers: {
3431
+ primitive: primitive$8
3432
+ }
3433
+ }, primitive$7 = {
3434
+ ".stack": {
3435
+ gridTemplateColumns: "minmax(0, 1fr)"
3436
+ }
3437
+ }, stackStyle = {
3366
3438
  layers: {
3367
3439
  primitive: primitive$7
3368
3440
  }
@@ -3948,6 +4020,7 @@ const textStyle = {
3948
4020
  radioStyle,
3949
4021
  selectStyle,
3950
4022
  spinnerStyle,
4023
+ stackStyle,
3951
4024
  switchStyle,
3952
4025
  textAreaStyle,
3953
4026
  textInputStyle,
@@ -4087,7 +4160,6 @@ function compileThemeProperties(theme2) {
4087
4160
  ...buildRadiusThemeProperties(theme2),
4088
4161
  ...buildShadowThemeProperties(theme2),
4089
4162
  ...buildSpaceThemeProperties(theme2),
4090
- // ...buildColorPaletteProperties(palette),
4091
4163
  ...buildColorThemeProperties(theme2)
4092
4164
  };
4093
4165
  }
@@ -4365,93 +4437,9 @@ function compileTheme(theme2) {
4365
4437
  ` : `/* v0 - not supported */
4366
4438
  `;
4367
4439
  }
4368
- function getClassNames(...classNames) {
4369
- return classNames.map((n) => typeof n == "string" && n.trim()).filter(Boolean).join(" ").split(" ");
4370
- }
4371
- function composeClassNames(...classNames) {
4372
- return unique(getClassNames(...classNames)).join(" ") || void 0;
4373
- }
4374
- function unique(array) {
4375
- return Array.from(new Set(array));
4376
- }
4377
- function scopeClassName(className) {
4378
- if (className !== void 0)
4379
- return `${PREFIX}${className.trim()}`;
4380
- }
4381
- function _comp(...classNames) {
4382
- return getClassNames(...classNames).map(scopeClassName).join(" ") || void 0;
4383
- }
4384
4440
  function breadcrumbs() {
4385
4441
  return _comp("breadcrumbs");
4386
4442
  }
4387
- function _resp(prefix, prop) {
4388
- if (!(prop === void 0 || prop === !1))
4389
- return Array.isArray(prop) ? prop.map((value, index) => {
4390
- if (value === void 0 || typeof prop == "boolean" && prop === !1) return;
4391
- const className = (typeof value == "boolean" ? [prefix] : [prefix, value]).filter((s) => s === 0 || !!s).join("-").replace(/\./g, "_");
4392
- return index === 0 ? className : `${index}:${className}`;
4393
- }).filter(Boolean).join(" ") : (typeof prop == "boolean" ? [prefix] : [prefix, prop]).filter((s) => s === 0 || !!s).join("-").replace(/\./g, "_");
4394
- }
4395
- function border(props) {
4396
- 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));
4397
- }
4398
- function display(props) {
4399
- return composeClassNames(_resp(void 0, props.display));
4400
- }
4401
- function flex(props) {
4402
- return composeClassNames(_resp("flex-align", props.align), _resp("f", props.direction), _resp("flex-justify", props.justify), _resp("flex", props.wrap));
4403
- }
4404
- function flexItem(props) {
4405
- return composeClassNames(_resp("f", props.flex));
4406
- }
4407
- function font(props) {
4408
- return composeClassNames("font", props.weight && `font-${props.weight}`, _resp("text-align", props.align));
4409
- }
4410
- function gap(props) {
4411
- return composeClassNames(_resp("g", props.gap), _resp("gx", props.gapX), _resp("gy", props.gapY));
4412
- }
4413
- function grid(props) {
4414
- 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));
4415
- }
4416
- function gridItem(props) {
4417
- 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));
4418
- }
4419
- function height(props) {
4420
- return composeClassNames(_resp("h", props.height));
4421
- }
4422
- function inset(props) {
4423
- return composeClassNames(_resp("inset", props.inset), _resp("top", props.insetTop), _resp("right", props.insetRight), _resp("bottom", props.insetBottom), _resp("left", props.insetLeft));
4424
- }
4425
- function margin(props) {
4426
- 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));
4427
- }
4428
- function maxWidth(props) {
4429
- return _resp("max-w", props.maxWidth) ?? "";
4430
- }
4431
- function overflow(props) {
4432
- return composeClassNames(_resp("overflow", props.overflow), _resp("overflow-x", props.overflowX), _resp("overflow-y", props.overflowY));
4433
- }
4434
- function padding(props) {
4435
- 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));
4436
- }
4437
- function pointerEvents(props) {
4438
- return composeClassNames(props.pointerEvents && `pointer-events-${props.pointerEvents}`);
4439
- }
4440
- function position(props) {
4441
- return composeClassNames(_resp("position", props.position));
4442
- }
4443
- function radius(props) {
4444
- return composeClassNames(_resp("r", props.radius));
4445
- }
4446
- function shadow(props) {
4447
- return composeClassNames(_resp("shadow", props.shadow));
4448
- }
4449
- function textOverflow(props) {
4450
- return composeClassNames(props.textOverflow && `text-overflow-${props.textOverflow}`);
4451
- }
4452
- function width(props) {
4453
- return _resp("w", props.width) ?? "";
4454
- }
4455
4443
  function dialog() {
4456
4444
  return _comp("dialog", inset({
4457
4445
  inset: 0
@@ -4593,7 +4581,7 @@ function buttonLoadingBox() {
4593
4581
  return "button-loading-box";
4594
4582
  }
4595
4583
  function card(props) {
4596
- return _comp(props.scheme, toneMap[props.tone ?? "inherit"], "card", props.checkered && "card-checkered", shadow(props));
4584
+ return _comp(props.scheme, toneMap[props.tone ?? "default"], "card", props.checkered && "card-checkered", shadow(props));
4597
4585
  }
4598
4586
  function checkbox() {
4599
4587
  return _comp("checkbox");
@@ -4636,6 +4624,9 @@ function spinner() {
4636
4624
  function animatedSpinnerIcon() {
4637
4625
  return _comp("animated-spinner-icon");
4638
4626
  }
4627
+ function stack() {
4628
+ return _comp("stack");
4629
+ }
4639
4630
  function _switch() {
4640
4631
  return _comp("switch");
4641
4632
  }
@@ -4669,7 +4660,6 @@ function tooltipCard() {
4669
4660
  function srOnly() {
4670
4661
  return composeClassNames("sr-only");
4671
4662
  }
4672
- exports.v3_v2 = v3_v2.v3_v2;
4673
4663
  exports._arrow = _arrow;
4674
4664
  exports._arrowShape = _arrowShape;
4675
4665
  exports._arrowStroke = _arrowStroke;
@@ -4749,6 +4739,7 @@ exports.shadow = shadow;
4749
4739
  exports.skeleton = skeleton;
4750
4740
  exports.spinner = spinner;
4751
4741
  exports.srOnly = srOnly;
4742
+ exports.stack = stack;
4752
4743
  exports.text = text;
4753
4744
  exports.textArea = textArea;
4754
4745
  exports.textInput = textInput;