@sanity/ui 3.0.0-static.4 → 3.0.0-static.6

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 (51) hide show
  1. package/dist/_chunks-cjs/_visual-editing.js +81 -31
  2. package/dist/_chunks-cjs/_visual-editing.js.map +1 -1
  3. package/dist/_chunks-es/_visual-editing.mjs +82 -32
  4. package/dist/_chunks-es/_visual-editing.mjs.map +1 -1
  5. package/dist/_visual-editing.d.mts +14 -11
  6. package/dist/_visual-editing.d.ts +14 -11
  7. package/dist/cli.js +1 -1
  8. package/dist/css.d.mts +144 -852
  9. package/dist/css.d.ts +144 -852
  10. package/dist/css.js +155 -141
  11. package/dist/css.js.map +1 -1
  12. package/dist/css.mjs +154 -141
  13. package/dist/css.mjs.map +1 -1
  14. package/dist/index.d.mts +14 -11
  15. package/dist/index.d.ts +14 -11
  16. package/dist/index.js +2 -4
  17. package/dist/index.js.map +1 -1
  18. package/dist/index.mjs +4 -6
  19. package/dist/index.mjs.map +1 -1
  20. package/dist/sanity-theme.css +1 -1
  21. package/dist/system.css +54 -49
  22. package/dist/theme.js +271 -33
  23. package/dist/theme.js.map +1 -1
  24. package/dist/theme.mjs +252 -16
  25. package/dist/theme.mjs.map +1 -1
  26. package/package.json +2 -2
  27. package/src/css/aspects/flex/flexJustify.style.ts +3 -3
  28. package/src/css/aspects/grid/types.ts +2 -2
  29. package/src/css/index.ts +2 -2
  30. package/src/css/primitives/_input/__workshop__/index.ts +1 -1
  31. package/src/css/primitives/button/button.style.ts +6 -4
  32. package/src/css/primitives/stack/index.ts +1 -0
  33. package/src/css/primitives/stack/stack.style.ts +9 -0
  34. package/src/css/primitives/stack/stack.ts +6 -0
  35. package/src/css/system.style.ts +2 -0
  36. package/src/theme/v3/defaults.ts +1 -1
  37. package/src/ui/components/autocomplete/__workshop__/index.ts +1 -1
  38. package/src/ui/components/dialog/dialog.tsx +3 -4
  39. package/src/ui/constants.ts +6 -0
  40. package/src/ui/hooks/useMediaIndex/useMediaIndex.ts +0 -2
  41. package/src/ui/primitives/box/box.tsx +6 -0
  42. package/src/ui/primitives/button/button.tsx +11 -10
  43. package/src/ui/primitives/code/code.tsx +1 -1
  44. package/src/ui/primitives/popover/popover.tsx +5 -75
  45. package/src/ui/primitives/stack/stack.tsx +10 -5
  46. package/src/ui/primitives/textInput/textInput.tsx +1 -1
  47. package/src/ui/primitives/tooltip/tooltip.tsx +2 -3
  48. package/dist/_chunks-cjs/v3_v2.js +0 -251
  49. package/dist/_chunks-cjs/v3_v2.js.map +0 -1
  50. package/dist/_chunks-es/v3_v2.mjs +0 -252
  51. package/dist/_chunks-es/v3_v2.mjs.map +0 -1
package/dist/css.mjs CHANGED
@@ -1,7 +1,90 @@
1
- import { v3_v2 } from "./_chunks-es/v3_v2.mjs";
2
1
  import { color } from "@sanity/color";
3
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
+ }
4
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
+ }
5
88
  function compileRule(selector, props, context) {
6
89
  let css = compileProperties$1(selector, props);
7
90
  if (props["@nest"] && (css += compileNestedRules(selector, props["@nest"], context)), props["@keyframes"])
@@ -1065,13 +1148,13 @@ _responsiveRule(util$o, "flex-justify-flex-end", {
1065
1148
  _responsiveRule(util$o, "flex-justify-center", {
1066
1149
  justifyContent: "center"
1067
1150
  });
1068
- _responsiveRule(util$o, "flex-justify-between", {
1151
+ _responsiveRule(util$o, "flex-justify-space-between", {
1069
1152
  justifyContent: "space-between"
1070
1153
  });
1071
- _responsiveRule(util$o, "flex-justify-around", {
1154
+ _responsiveRule(util$o, "flex-justify-space-around", {
1072
1155
  justifyContent: "space-around"
1073
1156
  });
1074
- _responsiveRule(util$o, "flex-justify-evenly", {
1157
+ _responsiveRule(util$o, "flex-justify-space-evenly", {
1075
1158
  justifyContent: "space-evenly"
1076
1159
  });
1077
1160
  const flexJustifyStyle = {
@@ -2117,7 +2200,7 @@ const skeletonStyle = {
2117
2200
  layers: {
2118
2201
  component
2119
2202
  }
2120
- }, primitive$o = {
2203
+ }, primitive$p = {
2121
2204
  ".arrow": {
2122
2205
  position: "absolute",
2123
2206
  // todo: replace with vars?
@@ -2169,9 +2252,9 @@ const skeletonStyle = {
2169
2252
  }
2170
2253
  }, _arrowStyle = {
2171
2254
  layers: {
2172
- primitive: primitive$o
2255
+ primitive: primitive$p
2173
2256
  }
2174
- }, primitive$n = {
2257
+ }, primitive$o = {
2175
2258
  ".input": {
2176
2259
  position: "relative"
2177
2260
  },
@@ -2275,7 +2358,7 @@ const skeletonStyle = {
2275
2358
  };
2276
2359
  for (const textSize of FONT_TEXT_SIZE) {
2277
2360
  const source = vars.font.text.sizes[textSize];
2278
- primitive$n[`.input-${textSize}`] = {
2361
+ primitive$o[`.input-${textSize}`] = {
2279
2362
  [varNames.input.fontSize]: source.fontSize,
2280
2363
  [varNames.input.lineHeight]: source.lineHeight,
2281
2364
  [varNames.input.letterSpacing]: source.letterSpacing,
@@ -2284,16 +2367,16 @@ for (const textSize of FONT_TEXT_SIZE) {
2284
2367
  };
2285
2368
  }
2286
2369
  for (const space of SPACE)
2287
- primitive$n[`.input-p-${space}`] = {
2370
+ primitive$o[`.input-p-${space}`] = {
2288
2371
  [varNames.input.padding]: vars.space[space]
2289
2372
  };
2290
2373
  for (const space of SPACE)
2291
- primitive$n[`.input-g-${space}`] = {
2374
+ primitive$o[`.input-g-${space}`] = {
2292
2375
  [varNames.input.gap]: vars.space[space]
2293
2376
  };
2294
2377
  const _inputStyle = {
2295
2378
  layers: {
2296
- primitive: primitive$n
2379
+ primitive: primitive$o
2297
2380
  }
2298
2381
  }, toneMap$2 = {
2299
2382
  default: "default",
@@ -2303,7 +2386,7 @@ const _inputStyle = {
2303
2386
  positive: "positive",
2304
2387
  caution: "caution",
2305
2388
  critical: "critical"
2306
- }, primitive$m = {
2389
+ }, primitive$n = {
2307
2390
  ".selectable": {
2308
2391
  backgroundColor: vars.color.bg,
2309
2392
  color: vars.color.fg,
@@ -2368,7 +2451,7 @@ const _inputStyle = {
2368
2451
  }
2369
2452
  }, _selectableStyle = {
2370
2453
  layers: {
2371
- primitive: primitive$m
2454
+ primitive: primitive$n
2372
2455
  }
2373
2456
  };
2374
2457
  function buildSelectableTones() {
@@ -2410,7 +2493,7 @@ function buildSelectableTones() {
2410
2493
  }
2411
2494
  return rules2;
2412
2495
  }
2413
- const primitive$l = {
2496
+ const primitive$m = {
2414
2497
  ".avatar": {
2415
2498
  backgroundColor: vars.color.avatar.bg,
2416
2499
  position: "relative",
@@ -2542,15 +2625,15 @@ const primitive$l = {
2542
2625
  }
2543
2626
  };
2544
2627
  for (const size of AVATAR_SIZE)
2545
- _responsiveRule(primitive$l, `avatar-${size}`, {
2628
+ _responsiveRule(primitive$m, `avatar-${size}`, {
2546
2629
  [varNames.avatar.distance]: vars.avatar.sizes[size].distance,
2547
2630
  [varNames.avatar.size]: vars.avatar.sizes[size].size
2548
2631
  });
2549
2632
  const avatarStyle = {
2550
2633
  layers: {
2551
- primitive: primitive$l
2634
+ primitive: primitive$m
2552
2635
  }
2553
- }, primitive$k = {
2636
+ }, primitive$l = {
2554
2637
  ".badge": {
2555
2638
  backgroundColor: vars.color.bg,
2556
2639
  color: vars.color.fg,
@@ -2558,15 +2641,15 @@ const avatarStyle = {
2558
2641
  }
2559
2642
  };
2560
2643
  for (const tone of THEME_COLOR_STATE_TONES)
2561
- primitive$k[`.badge-${tone}`] = {
2644
+ primitive$l[`.badge-${tone}`] = {
2562
2645
  [varNames.color.bg]: vars.color.tinted[tone].bg[4],
2563
2646
  [varNames.color.fg]: vars.color.tinted[tone].fg[1]
2564
2647
  };
2565
2648
  const badgeStyle = {
2566
2649
  layers: {
2567
- primitive: primitive$k
2650
+ primitive: primitive$l
2568
2651
  }
2569
- }, primitive$j = {
2652
+ }, primitive$k = {
2570
2653
  ".box": {
2571
2654
  minWidth: 0,
2572
2655
  minHeight: 0,
@@ -2588,7 +2671,7 @@ const badgeStyle = {
2588
2671
  }
2589
2672
  }, boxStyle = {
2590
2673
  layers: {
2591
- primitive: primitive$j
2674
+ primitive: primitive$k
2592
2675
  }
2593
2676
  }, toneMap$1 = {
2594
2677
  default: "default",
@@ -2602,7 +2685,7 @@ const badgeStyle = {
2602
2685
  default: "solid",
2603
2686
  ghost: "ghost",
2604
2687
  bleed: "tinted"
2605
- }, primitive$i = {
2688
+ }, primitive$j = {
2606
2689
  ".button": {
2607
2690
  WebkitFontSmoothing: "inherit",
2608
2691
  appearance: "none",
@@ -2621,6 +2704,8 @@ const badgeStyle = {
2621
2704
  backgroundColor: vars.color.bg,
2622
2705
  color: vars.color.fg,
2623
2706
  boxShadow: "var(--button-box-shadow)",
2707
+ alignItems: "center",
2708
+ // 'justifyContent': 'center',
2624
2709
  "@nest": {
2625
2710
  "&::-moz-focus-inner": {
2626
2711
  border: 0,
@@ -2649,7 +2734,7 @@ const badgeStyle = {
2649
2734
  };
2650
2735
  for (const tone of THEME_COLOR_STATE_TONES) {
2651
2736
  const solid = vars.color.solid[tone], tinted = vars.color.tinted[tone];
2652
- primitive$i[`.button.${variantMap.default}.${toneMap$1[tone]}`] = {
2737
+ primitive$j[`.button.${variantMap.default}.${toneMap$1[tone]}`] = {
2653
2738
  [varNames.color.bg]: solid.bg[0],
2654
2739
  [varNames.color.border]: solid.border[1],
2655
2740
  [varNames.color.fg]: solid.fg[0],
@@ -2681,27 +2766,27 @@ for (const tone of THEME_COLOR_STATE_TONES) {
2681
2766
  [varNames.color.muted.fg]: vars.color.default.tinted.fg[1]
2682
2767
  }
2683
2768
  }
2684
- }, primitive$i[`.button.${variantMap.ghost}.${toneMap$1[tone]}`] = {
2769
+ }, primitive$j[`.button.${variantMap.ghost}.${toneMap$1[tone]}`] = {
2685
2770
  [varNames.color.bg]: tinted.bg[1],
2686
- [varNames.color.border]: tinted.border[1],
2771
+ [varNames.color.border]: tinted.border[0],
2687
2772
  [varNames.color.fg]: tinted.fg[2],
2688
2773
  "--button-box-shadow": "inset 0 0 0 var(--button-border-width) var(--color-border)",
2689
2774
  "@nest": {
2690
2775
  "&:not([data-disabled]):hover": {
2691
2776
  [varNames.color.bg]: tinted.bg[2],
2692
- [varNames.color.border]: tinted.border[2],
2777
+ [varNames.color.border]: tinted.border[1],
2693
2778
  [varNames.color.fg]: tinted.fg[1]
2694
2779
  // '--button-box-shadow': `inset 0 0 0 var(--button-border-width) var(--color-border)`,
2695
2780
  },
2696
2781
  "&:not([data-disabled]):active": {
2697
2782
  [varNames.color.bg]: tinted.bg[3],
2698
- [varNames.color.border]: tinted.border[3],
2783
+ [varNames.color.border]: tinted.border[2],
2699
2784
  [varNames.color.fg]: tinted.fg[1],
2700
2785
  "--button-box-shadow": "inset 0 0 0 var(--button-border-width) var(--color-border)"
2701
2786
  },
2702
2787
  "&:not([data-disabled])[data-selected]": {
2703
2788
  [varNames.color.bg]: tinted.bg[3],
2704
- [varNames.color.border]: tinted.border[3],
2789
+ [varNames.color.border]: tinted.border[2],
2705
2790
  [varNames.color.fg]: tinted.fg[1],
2706
2791
  "--button-box-shadow": "inset 0 0 0 var(--button-border-width) var(--color-border)"
2707
2792
  },
@@ -2711,7 +2796,7 @@ for (const tone of THEME_COLOR_STATE_TONES) {
2711
2796
  [varNames.color.fg]: vars.color.default.tinted.fg[2]
2712
2797
  }
2713
2798
  }
2714
- }, primitive$i[`.button.${variantMap.bleed}.${toneMap$1[tone]}`] = {
2799
+ }, primitive$j[`.button.${variantMap.bleed}.${toneMap$1[tone]}`] = {
2715
2800
  boxShadow: "none",
2716
2801
  [varNames.color.bg]: tinted.bg[0],
2717
2802
  [varNames.color.border]: tinted.border[1],
@@ -2748,7 +2833,7 @@ for (const tone of THEME_COLOR_STATE_TONES) {
2748
2833
  }
2749
2834
  const buttonStyle = {
2750
2835
  layers: {
2751
- primitive: primitive$i
2836
+ primitive: primitive$j
2752
2837
  }
2753
2838
  }, toneMap = {
2754
2839
  transparent: "transparent",
@@ -2760,7 +2845,7 @@ const buttonStyle = {
2760
2845
  caution: "caution",
2761
2846
  critical: "critical",
2762
2847
  inherit: void 0
2763
- }, primitive$h = {
2848
+ }, primitive$i = {
2764
2849
  ".card": {
2765
2850
  backgroundColor: vars.color.bg,
2766
2851
  color: vars.color.fg,
@@ -2799,7 +2884,7 @@ for (const scheme of THEME_COLOR_SCHEMES$1) {
2799
2884
  const _varNames = varNames.color[tone], _vars = vars.color[scheme][tone];
2800
2885
  _assignToneProps(schemeProps, _varNames, _vars);
2801
2886
  }
2802
- primitive$h[`.card.${scheme}`] = schemeProps;
2887
+ primitive$i[`.card.${scheme}`] = schemeProps;
2803
2888
  }
2804
2889
  for (const tone of THEME_COLOR_CARD_TONES) {
2805
2890
  const _varNames = varNames.color, _vars = vars.color[tone], toneProps = {};
@@ -2827,11 +2912,11 @@ for (const tone of THEME_COLOR_CARD_TONES) {
2827
2912
  // '--card-skeleton-to-color': 'var(--color-skeleton-to)',
2828
2913
  "--card-hairline-soft-color": vars.color.tinted.default.border[1],
2829
2914
  "--card-hairline-hard-color": vars.color.tinted.default.border[2]
2830
- }), primitive$h[`.card.${toneMap[tone]}`] = toneProps;
2915
+ }), primitive$i[`.card.${toneMap[tone]}`] = toneProps;
2831
2916
  }
2832
2917
  const cardStyle = {
2833
2918
  layers: {
2834
- primitive: primitive$h
2919
+ primitive: primitive$i
2835
2920
  }
2836
2921
  };
2837
2922
  function _assignToneProps(toneProps, _varNames, _vars) {
@@ -2907,7 +2992,7 @@ function _assignToneProps(toneProps, _varNames, _vars) {
2907
2992
  });
2908
2993
  }
2909
2994
  }
2910
- const primitive$g = {
2995
+ const primitive$h = {
2911
2996
  ".checkbox": {
2912
2997
  position: "relative",
2913
2998
  display: "inline-block"
@@ -3037,9 +3122,9 @@ const primitive$g = {
3037
3122
  }
3038
3123
  }, checkboxStyle = {
3039
3124
  layers: {
3040
- primitive: primitive$g
3125
+ primitive: primitive$h
3041
3126
  }
3042
- }, primitive$f = {
3127
+ }, primitive$g = {
3043
3128
  ".code": {
3044
3129
  "--font-weight-regular": "var(--font-code-weight-regular)",
3045
3130
  "--font-weight-medium": "var(--font-code-weight-medium)",
@@ -3075,7 +3160,7 @@ const primitive$g = {
3075
3160
  }
3076
3161
  };
3077
3162
  for (const size of FONT_CODE_SIZE)
3078
- _responsiveRule(primitive$f, `code-${size}`, {
3163
+ _responsiveRule(primitive$g, `code-${size}`, {
3079
3164
  "--font-size": `var(--font-code-${size}-size)`,
3080
3165
  "--font-line-height": `var(--font-code-${size}-line-height)`,
3081
3166
  "--font-letter-spacing": `var(--font-code-${size}-letter-spacing)`,
@@ -3086,18 +3171,18 @@ for (const size of FONT_CODE_SIZE)
3086
3171
  });
3087
3172
  const codeStyle = {
3088
3173
  layers: {
3089
- primitive: primitive$f
3174
+ primitive: primitive$g
3090
3175
  }
3091
- }, primitive$e = {
3176
+ }, primitive$f = {
3092
3177
  ".container": {
3093
3178
  margin: "0 auto",
3094
3179
  width: "100%"
3095
3180
  }
3096
3181
  }, containerStyle = {
3097
3182
  layers: {
3098
- primitive: primitive$e
3183
+ primitive: primitive$f
3099
3184
  }
3100
- }, primitive$d = {
3185
+ }, primitive$e = {
3101
3186
  ".heading": {
3102
3187
  "--font-weight-regular": "var(--font-heading-weight-regular)",
3103
3188
  "--font-weight-medium": "var(--font-heading-weight-medium)",
@@ -3121,7 +3206,7 @@ const codeStyle = {
3121
3206
  }
3122
3207
  };
3123
3208
  for (const size of FONT_HEADING_SIZE)
3124
- _responsiveRule(primitive$d, `heading-${size}`, {
3209
+ _responsiveRule(primitive$e, `heading-${size}`, {
3125
3210
  "--font-size": `var(--font-heading-${size}-size)`,
3126
3211
  "--font-line-height": `var(--font-heading-${size}-line-height)`,
3127
3212
  "--font-letter-spacing": `var(--font-heading-${size}-letter-spacing)`,
@@ -3132,9 +3217,9 @@ for (const size of FONT_HEADING_SIZE)
3132
3217
  });
3133
3218
  const headingStyle = {
3134
3219
  layers: {
3135
- primitive: primitive$d
3220
+ primitive: primitive$e
3136
3221
  }
3137
- }, primitive$c = {
3222
+ }, primitive$d = {
3138
3223
  ".kbd": {
3139
3224
  // '--color-bg': 'var(--color-tinted-default-bg-1)',
3140
3225
  // '--color-border': 'var(--color-tinted-default-border-2)',
@@ -3151,9 +3236,9 @@ const headingStyle = {
3151
3236
  }
3152
3237
  }, kbdStyle = {
3153
3238
  layers: {
3154
- primitive: primitive$c
3239
+ primitive: primitive$d
3155
3240
  }
3156
- }, primitive$b = {
3241
+ }, primitive$c = {
3157
3242
  ".label": {
3158
3243
  "--font-weight-regular": "var(--font-label-weight-regular)",
3159
3244
  "--font-weight-medium": "var(--font-label-weight-medium)",
@@ -3178,7 +3263,7 @@ const headingStyle = {
3178
3263
  }
3179
3264
  };
3180
3265
  for (const size of FONT_LABEL_SIZE)
3181
- _responsiveRule(primitive$b, `label-${size}`, {
3266
+ _responsiveRule(primitive$c, `label-${size}`, {
3182
3267
  "--font-size": `var(--font-label-${size}-size)`,
3183
3268
  "--font-line-height": `var(--font-label-${size}-line-height)`,
3184
3269
  "--font-letter-spacing": `var(--font-label-${size}-letter-spacing)`,
@@ -3189,13 +3274,13 @@ for (const size of FONT_LABEL_SIZE)
3189
3274
  });
3190
3275
  const labelStyle = {
3191
3276
  layers: {
3192
- primitive: primitive$b
3277
+ primitive: primitive$c
3193
3278
  }
3194
- }, primitive$a = {}, popoverStyle = {
3279
+ }, primitive$b = {}, popoverStyle = {
3195
3280
  layers: {
3196
- primitive: primitive$a
3281
+ primitive: primitive$b
3197
3282
  }
3198
- }, primitive$9 = {
3283
+ }, primitive$a = {
3199
3284
  ".radio": {
3200
3285
  position: "relative",
3201
3286
  "@nest": {
@@ -3301,9 +3386,9 @@ const labelStyle = {
3301
3386
  }
3302
3387
  }, radioStyle = {
3303
3388
  layers: {
3304
- primitive: primitive$9
3389
+ primitive: primitive$a
3305
3390
  }
3306
- }, primitive$8 = {
3391
+ }, primitive$9 = {
3307
3392
  ".select": {
3308
3393
  "@nest": {
3309
3394
  "& > select:disabled": {
@@ -3323,7 +3408,7 @@ const labelStyle = {
3323
3408
  }
3324
3409
  }, selectStyle = {
3325
3410
  layers: {
3326
- primitive: primitive$8
3411
+ primitive: primitive$9
3327
3412
  }
3328
3413
  }, keyframes = {
3329
3414
  "spinner-rotate": {
@@ -3334,13 +3419,21 @@ const labelStyle = {
3334
3419
  transform: "rotate(360deg)"
3335
3420
  }
3336
3421
  }
3337
- }, primitive$7 = {
3422
+ }, primitive$8 = {
3338
3423
  ".spinner": {},
3339
3424
  ".animated-spinner-icon": {
3340
3425
  animation: "spinner-rotate 500ms linear infinite"
3341
3426
  }
3342
3427
  }, spinnerStyle = {
3343
3428
  keyframes,
3429
+ layers: {
3430
+ primitive: primitive$8
3431
+ }
3432
+ }, primitive$7 = {
3433
+ ".stack": {
3434
+ gridTemplateColumns: "minmax(0, 1fr)"
3435
+ }
3436
+ }, stackStyle = {
3344
3437
  layers: {
3345
3438
  primitive: primitive$7
3346
3439
  }
@@ -3926,6 +4019,7 @@ const textStyle = {
3926
4019
  radioStyle,
3927
4020
  selectStyle,
3928
4021
  spinnerStyle,
4022
+ stackStyle,
3929
4023
  switchStyle,
3930
4024
  textAreaStyle,
3931
4025
  textInputStyle,
@@ -4342,93 +4436,9 @@ function compileTheme(theme) {
4342
4436
  ` : `/* v0 - not supported */
4343
4437
  `;
4344
4438
  }
4345
- function getClassNames(...classNames) {
4346
- return classNames.map((n) => typeof n == "string" && n.trim()).filter(Boolean).join(" ").split(" ");
4347
- }
4348
- function composeClassNames(...classNames) {
4349
- return unique(getClassNames(...classNames)).join(" ") || void 0;
4350
- }
4351
- function unique(array) {
4352
- return Array.from(new Set(array));
4353
- }
4354
- function scopeClassName(className) {
4355
- if (className !== void 0)
4356
- return `${PREFIX}${className.trim()}`;
4357
- }
4358
- function _comp(...classNames) {
4359
- return getClassNames(...classNames).filter(Boolean).map(scopeClassName).join(" ") || void 0;
4360
- }
4361
4439
  function breadcrumbs() {
4362
4440
  return _comp("breadcrumbs");
4363
4441
  }
4364
- function _resp(prefix, prop) {
4365
- if (!(prop === void 0 || prop === !1))
4366
- return Array.isArray(prop) ? prop.map((value, index) => {
4367
- if (value === void 0 || typeof prop == "boolean" && prop === !1) return;
4368
- const className = (typeof value == "boolean" ? [prefix] : [prefix, value]).filter((s) => s === 0 || !!s).join("-").replace(/\./g, "_");
4369
- return index === 0 ? className : `${index}:${className}`;
4370
- }).filter(Boolean).join(" ") : (typeof prop == "boolean" ? [prefix] : [prefix, prop]).filter((s) => s === 0 || !!s).join("-").replace(/\./g, "_");
4371
- }
4372
- function border(props) {
4373
- 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));
4374
- }
4375
- function display(props) {
4376
- return composeClassNames(_resp(void 0, props.display));
4377
- }
4378
- function flex(props) {
4379
- return composeClassNames(_resp("flex-align", props.align), _resp("f", props.direction), _resp("flex-justify", props.justify), _resp("flex", props.wrap));
4380
- }
4381
- function flexItem(props) {
4382
- return composeClassNames(_resp("f", props.flex));
4383
- }
4384
- function font(props) {
4385
- return composeClassNames("font", props.weight && `font-${props.weight}`, _resp("text-align", props.align));
4386
- }
4387
- function gap(props) {
4388
- return composeClassNames(_resp("g", props.gap), _resp("gx", props.gapX), _resp("gy", props.gapY));
4389
- }
4390
- function grid(props) {
4391
- 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));
4392
- }
4393
- function gridItem(props) {
4394
- 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));
4395
- }
4396
- function height(props) {
4397
- return composeClassNames(_resp("h", props.height));
4398
- }
4399
- function inset(props) {
4400
- return composeClassNames(_resp("inset", props.inset), _resp("top", props.insetTop), _resp("right", props.insetRight), _resp("bottom", props.insetBottom), _resp("left", props.insetLeft));
4401
- }
4402
- function margin(props) {
4403
- 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));
4404
- }
4405
- function maxWidth(props) {
4406
- return _resp("max-w", props.maxWidth) ?? "";
4407
- }
4408
- function overflow(props) {
4409
- return composeClassNames(_resp("overflow", props.overflow), _resp("overflow-x", props.overflowX), _resp("overflow-y", props.overflowY));
4410
- }
4411
- function padding(props) {
4412
- 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));
4413
- }
4414
- function pointerEvents(props) {
4415
- return composeClassNames(props.pointerEvents && `pointer-events-${props.pointerEvents}`);
4416
- }
4417
- function position(props) {
4418
- return composeClassNames(_resp("position", props.position));
4419
- }
4420
- function radius(props) {
4421
- return composeClassNames(_resp("r", props.radius));
4422
- }
4423
- function shadow(props) {
4424
- return composeClassNames(_resp("shadow", props.shadow));
4425
- }
4426
- function textOverflow(props) {
4427
- return _comp(props.textOverflow && `text-overflow-${props.textOverflow}`);
4428
- }
4429
- function width(props) {
4430
- return _resp("w", props.width) ?? "";
4431
- }
4432
4442
  function dialog() {
4433
4443
  return _comp("dialog", inset({
4434
4444
  inset: 0
@@ -4613,6 +4623,9 @@ function spinner() {
4613
4623
  function animatedSpinnerIcon() {
4614
4624
  return _comp("animated-spinner-icon");
4615
4625
  }
4626
+ function stack() {
4627
+ return _comp("stack");
4628
+ }
4616
4629
  function _switch() {
4617
4630
  return _comp("switch");
4618
4631
  }
@@ -4726,6 +4739,7 @@ export {
4726
4739
  skeleton,
4727
4740
  spinner,
4728
4741
  srOnly,
4742
+ stack,
4729
4743
  text,
4730
4744
  textArea,
4731
4745
  textInput,
@@ -4740,7 +4754,6 @@ export {
4740
4754
  tooltip,
4741
4755
  tooltipCard,
4742
4756
  treeItem,
4743
- v3_v2,
4744
4757
  varNames,
4745
4758
  vars,
4746
4759
  width