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