@glasshome/ui 1.42.0 → 1.44.0

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 (153) hide show
  1. package/SPEC.md +8 -5
  2. package/dist/index.js +2 -2
  3. package/dist/lib/anchor-placement.d.ts +4 -0
  4. package/dist/lib/balance-rows.d.ts +10 -4
  5. package/dist/lib/behavior/anchored.d.ts +16 -3
  6. package/dist/lib/behavior/button-root.d.ts +7 -0
  7. package/dist/lib/behavior/collection.d.ts +8 -0
  8. package/dist/lib/behavior/dismiss.d.ts +6 -4
  9. package/dist/lib/behavior/focus-scope.d.ts +9 -1
  10. package/dist/lib/behavior/hide-outside.d.ts +1 -1
  11. package/dist/lib/behavior/layer-stack.d.ts +3 -2
  12. package/dist/lib/behavior/menu.d.ts +62 -0
  13. package/dist/lib/behavior/modal-root.d.ts +2 -0
  14. package/dist/lib/behavior/range.d.ts +44 -0
  15. package/dist/lib/color/color.d.ts +41 -0
  16. package/dist/lib/color/index.d.ts +2 -0
  17. package/dist/lib/color/intl.d.ts +40 -0
  18. package/dist/lib/dock-slot-classes.d.ts +2 -0
  19. package/dist/lib/hold.d.ts +1 -1
  20. package/dist/lib/locale.d.ts +3 -0
  21. package/dist/lib/menu-classes.d.ts +2 -0
  22. package/dist/lib/motion-classes.d.ts +2 -1
  23. package/dist/lib/overlay-classes.d.ts +1 -0
  24. package/dist/lib/scroll-track.d.ts +3 -2
  25. package/dist/lib/section-tokens.d.ts +1 -1
  26. package/dist/lib/segment-classes.d.ts +2 -0
  27. package/dist/lib/shadow-layer.d.ts +0 -45
  28. package/dist/lib/toggle-set.d.ts +44 -0
  29. package/dist/lib/visually-hidden.d.ts +3 -0
  30. package/dist/solid/accordion.d.ts +35 -11
  31. package/dist/solid/avatar.d.ts +8 -4
  32. package/dist/solid/bottom-sheet/bottom-sheet.d.ts +1 -1
  33. package/dist/solid/button.d.ts +5 -4
  34. package/dist/solid/charts.d.ts +1 -1
  35. package/dist/solid/checkbox.d.ts +14 -4
  36. package/dist/solid/collapsible.d.ts +33 -5
  37. package/dist/solid/color-disc.d.ts +1 -1
  38. package/dist/solid/color-slider.d.ts +1 -1
  39. package/dist/solid/color-wheel.d.ts +1 -1
  40. package/dist/solid/context-menu.d.ts +58 -24
  41. package/dist/solid/data-table.d.ts +4 -2
  42. package/dist/solid/dialog-parts.d.ts +8 -8
  43. package/dist/solid/dropdown-menu.d.ts +55 -24
  44. package/dist/solid/empty.d.ts +1 -1
  45. package/dist/solid/form.d.ts +5 -6
  46. package/dist/solid/hover-card.d.ts +65 -9
  47. package/dist/solid/index.d.ts +1 -1
  48. package/dist/solid/index.js +7752 -13493
  49. package/dist/solid/input-group.d.ts +6 -6
  50. package/dist/solid/item.d.ts +1 -1
  51. package/dist/solid/menu-parts.d.ts +175 -24
  52. package/dist/solid/option-card.d.ts +1 -4
  53. package/dist/solid/picker-row.d.ts +2 -0
  54. package/dist/solid/popover.d.ts +77 -12
  55. package/dist/solid/progress.d.ts +11 -3
  56. package/dist/solid/radio-group.d.ts +31 -6
  57. package/dist/solid/responsive-dialog.d.ts +1 -1
  58. package/dist/solid/scroll-area.d.ts +1 -1
  59. package/dist/solid/section-card.d.ts +2 -3
  60. package/dist/solid/select.d.ts +107 -10
  61. package/dist/solid/selection.d.ts +10 -1
  62. package/dist/solid/sheet.d.ts +1 -1
  63. package/dist/solid/sliding-indicator.d.ts +1 -1
  64. package/dist/solid/sonner.d.ts +1 -1
  65. package/dist/solid/toggle.d.ts +11 -3
  66. package/dist/solid/tooltip.d.ts +22 -22
  67. package/dist/tokens/index.js +54 -51
  68. package/dist/{utils-CxAii-e9.js → utils-BbIeGt7o.js} +376 -314
  69. package/package.json +3 -6
  70. package/src/lib/anchor-placement.ts +10 -3
  71. package/src/lib/balance-rows.ts +115 -40
  72. package/src/lib/behavior/anchored.ts +41 -9
  73. package/src/lib/behavior/button-root.tsx +103 -0
  74. package/src/lib/behavior/collection.ts +56 -28
  75. package/src/lib/behavior/dismiss.ts +61 -21
  76. package/src/lib/behavior/focus-scope.ts +75 -9
  77. package/src/lib/behavior/hide-outside.ts +2 -2
  78. package/src/lib/behavior/layer-stack.ts +33 -8
  79. package/src/lib/behavior/menu.ts +462 -0
  80. package/src/lib/behavior/modal-root.tsx +24 -18
  81. package/src/lib/behavior/polymorphic.tsx +1 -1
  82. package/src/lib/behavior/presence.ts +1 -1
  83. package/src/lib/behavior/range.ts +212 -0
  84. package/src/lib/clipboard.ts +2 -3
  85. package/src/lib/color/color.ts +746 -0
  86. package/src/lib/color/index.ts +2 -0
  87. package/src/lib/color/intl.ts +60 -0
  88. package/src/lib/dock-slot-classes.ts +3 -0
  89. package/src/lib/hold.ts +1 -1
  90. package/src/lib/locale.ts +62 -0
  91. package/src/lib/menu-classes.ts +3 -0
  92. package/src/lib/motion-classes.ts +8 -9
  93. package/src/lib/overlay-classes.ts +1 -3
  94. package/src/lib/scroll-track.ts +11 -6
  95. package/src/lib/section-tokens.ts +1 -1
  96. package/src/lib/segment-classes.ts +3 -0
  97. package/src/lib/shadow-layer.ts +0 -118
  98. package/src/lib/toggle-set.ts +133 -0
  99. package/src/lib/visually-hidden.ts +15 -0
  100. package/src/solid/accordion.tsx +294 -20
  101. package/src/solid/area-picker.tsx +4 -4
  102. package/src/solid/avatar.tsx +98 -24
  103. package/src/solid/bottom-sheet/arbitration.ts +4 -11
  104. package/src/solid/bottom-sheet/bottom-sheet.tsx +4 -5
  105. package/src/solid/bottom-sheet/drag-controller.ts +7 -20
  106. package/src/solid/button.tsx +12 -6
  107. package/src/solid/charts.tsx +1 -1
  108. package/src/solid/checkbox.tsx +167 -44
  109. package/src/solid/collapsible.tsx +260 -12
  110. package/src/solid/color-disc.tsx +11 -12
  111. package/src/solid/color-slider.tsx +114 -47
  112. package/src/solid/color-wheel.tsx +137 -39
  113. package/src/solid/context-menu.tsx +285 -94
  114. package/src/solid/data-table.tsx +48 -22
  115. package/src/solid/dialog-parts.tsx +39 -17
  116. package/src/solid/dock.tsx +44 -43
  117. package/src/solid/dropdown-menu.tsx +252 -115
  118. package/src/solid/empty.tsx +1 -1
  119. package/src/solid/entity-selector.tsx +3 -3
  120. package/src/solid/face-toggle.tsx +43 -18
  121. package/src/solid/form.tsx +5 -6
  122. package/src/solid/glyph-tile.tsx +48 -21
  123. package/src/solid/hover-card.tsx +287 -25
  124. package/src/solid/icon-picker.tsx +1 -2
  125. package/src/solid/image-picker.tsx +2 -2
  126. package/src/solid/index.ts +1 -3
  127. package/src/solid/input-group.tsx +2 -2
  128. package/src/solid/item.tsx +1 -1
  129. package/src/solid/menu-parts.tsx +610 -155
  130. package/src/solid/option-card.tsx +7 -13
  131. package/src/solid/picker-row.tsx +5 -1
  132. package/src/solid/popover.tsx +423 -80
  133. package/src/solid/preview-tile.tsx +1 -1
  134. package/src/solid/progress.tsx +84 -15
  135. package/src/solid/radio-group.tsx +271 -34
  136. package/src/solid/responsive-dialog.tsx +1 -1
  137. package/src/solid/schema-form.tsx +1 -6
  138. package/src/solid/scroll-area.tsx +1 -1
  139. package/src/solid/section-card.tsx +3 -4
  140. package/src/solid/select.tsx +939 -95
  141. package/src/solid/selection.tsx +165 -74
  142. package/src/solid/sheet.tsx +1 -1
  143. package/src/solid/slider.tsx +115 -65
  144. package/src/solid/sliding-indicator.tsx +4 -16
  145. package/src/solid/sonner.tsx +1 -1
  146. package/src/solid/tabs.tsx +12 -6
  147. package/src/solid/term.tsx +3 -4
  148. package/src/solid/toggle-group.tsx +34 -101
  149. package/src/solid/toggle.tsx +43 -9
  150. package/src/solid/tooltip.tsx +24 -24
  151. package/src/styles/globals.css +61 -50
  152. package/src/styles/theme.css +12 -6
  153. package/src/tokens/material.ts +11 -2
@@ -30,6 +30,6 @@ interface SlidingIndicatorProps extends ComponentProps<"div"> {
30
30
  wrapped?: boolean;
31
31
  children: JSX.Element;
32
32
  }
33
- /** @deprecated Use `SelectionScope` with a `SelectionHighlight` in each item; removed in 2.0. */
33
+ /** @deprecated `SelectionScope` with a `SelectionHighlight` in each item; removed in 2.0.0. */
34
34
  export declare function SlidingIndicator(props: SlidingIndicatorProps): JSX.Element;
35
35
  export {};
@@ -25,7 +25,7 @@ declare const toast: ((message: ToastMessage, data?: ExternalToast) => string |
25
25
  warning: (message: ToastMessage, data?: ExternalToast) => string | number;
26
26
  info: (message: ToastMessage, data?: ExternalToast) => string | number;
27
27
  message: (message: ToastMessage, data?: ExternalToast) => string | number;
28
- /** @deprecated Use `toast.promise`, which ends the loading toast when the promise settles. Removed in 2.0.0. */
28
+ /** @deprecated `toast.promise`; removed in 2.0.0. */
29
29
  loading: (message: ToastMessage, data?: ExternalToast) => string | number;
30
30
  custom: (jsx: (id: number | string) => JSX.Element, data?: ExternalToast) => string | number;
31
31
  dismiss: (id?: number | string) => string | number | undefined;
@@ -1,6 +1,6 @@
1
- import { ToggleButton as ToggleButtonPrimitive } from "@kobalte/core/toggle-button";
2
1
  import { type VariantProps } from "cva";
3
- import { type Component, type ComponentProps } from "solid-js";
2
+ import { type Accessor, type JSX } from "solid-js";
3
+ import { type ButtonRootProps } from "../lib/behavior/button-root.js";
4
4
  declare const toggleVariants: import("cva").CVAComponent<Omit<{
5
5
  base: string;
6
6
  variants: {
@@ -45,5 +45,13 @@ declare const toggleVariants: import("cva").CVAComponent<Omit<{
45
45
  lg: string;
46
46
  };
47
47
  }>;
48
- declare const Toggle: Component<ComponentProps<typeof ToggleButtonPrimitive> & VariantProps<typeof toggleVariants>>;
48
+ type ToggleProps = Omit<ButtonRootProps<"button">, "children" | "onChange"> & VariantProps<typeof toggleVariants> & {
49
+ pressed?: boolean;
50
+ defaultPressed?: boolean;
51
+ onChange?: (pressed: boolean) => void;
52
+ children?: JSX.Element | ((state: {
53
+ pressed: Accessor<boolean>;
54
+ }) => JSX.Element);
55
+ };
56
+ declare function Toggle(props: ToggleProps): JSX.Element;
49
57
  export { Toggle, toggleVariants };
@@ -10,51 +10,51 @@ interface TooltipRootProps {
10
10
  openDelay?: number;
11
11
  closeDelay?: number;
12
12
  children?: JSX.Element;
13
- /** @deprecated Ignored. */
13
+ /** @deprecated Ignored; removed in 2.0.0. */
14
14
  id?: string;
15
- /** @deprecated Ignored. */
15
+ /** @deprecated Ignored; removed in 2.0.0. */
16
16
  disabled?: boolean;
17
- /** @deprecated Ignored. */
17
+ /** @deprecated Ignored; removed in 2.0.0. */
18
18
  skipDelayDuration?: number;
19
- /** @deprecated Ignored. */
19
+ /** @deprecated Ignored; removed in 2.0.0. */
20
20
  triggerOnFocusOnly?: boolean;
21
- /** @deprecated Ignored. */
21
+ /** @deprecated Ignored; removed in 2.0.0. */
22
22
  ignoreSafeArea?: boolean;
23
- /** @deprecated Ignored. */
23
+ /** @deprecated Ignored; removed in 2.0.0. */
24
24
  forceMount?: boolean;
25
- /** @deprecated Ignored. */
25
+ /** @deprecated Ignored; removed in 2.0.0. */
26
26
  getAnchorRect?: (anchor?: HTMLElement) => unknown;
27
- /** @deprecated Ignored. */
27
+ /** @deprecated Ignored; removed in 2.0.0. */
28
28
  shift?: number;
29
- /** @deprecated Ignored. */
29
+ /** @deprecated Ignored; removed in 2.0.0. */
30
30
  flip?: boolean | string;
31
- /** @deprecated Ignored. */
31
+ /** @deprecated Ignored; removed in 2.0.0. */
32
32
  slide?: boolean;
33
- /** @deprecated Ignored. */
33
+ /** @deprecated Ignored; removed in 2.0.0. */
34
34
  overlap?: boolean;
35
- /** @deprecated Ignored. */
35
+ /** @deprecated Ignored; removed in 2.0.0. */
36
36
  sameWidth?: boolean;
37
- /** @deprecated Ignored. */
37
+ /** @deprecated Ignored; removed in 2.0.0. */
38
38
  fitViewport?: boolean;
39
- /** @deprecated Ignored. */
39
+ /** @deprecated Ignored; removed in 2.0.0. */
40
40
  hideWhenDetached?: boolean;
41
- /** @deprecated Ignored. */
41
+ /** @deprecated Ignored; removed in 2.0.0. */
42
42
  detachedPadding?: number;
43
- /** @deprecated Ignored. */
43
+ /** @deprecated Ignored; removed in 2.0.0. */
44
44
  arrowPadding?: number;
45
- /** @deprecated Ignored. */
45
+ /** @deprecated Ignored; removed in 2.0.0. */
46
46
  overflowPadding?: number;
47
47
  }
48
48
  interface TooltipContentProps extends ComponentProps<"div"> {
49
- /** @deprecated Ignored. */
49
+ /** @deprecated Ignored; removed in 2.0.0. */
50
50
  forceMount?: boolean;
51
- /** @deprecated Ignored. */
51
+ /** @deprecated Ignored; removed in 2.0.0. */
52
52
  onEscapeKeyDown?: (event: Event) => void;
53
- /** @deprecated Ignored. */
53
+ /** @deprecated Ignored; removed in 2.0.0. */
54
54
  onPointerDownOutside?: (event: Event) => void;
55
- /** @deprecated Ignored. */
55
+ /** @deprecated Ignored; removed in 2.0.0. */
56
56
  onFocusOutside?: (event: Event) => void;
57
- /** @deprecated Ignored. */
57
+ /** @deprecated Ignored; removed in 2.0.0. */
58
58
  onInteractOutside?: (event: Event) => void;
59
59
  }
60
60
  type TooltipTriggerProps<T extends ValidComponent> = {
@@ -166,10 +166,10 @@ var g = 1, _ = {
166
166
  ..._,
167
167
  inkLift: 1
168
168
  }
169
- }, y = {
169
+ }, ee = {
170
170
  v: 1,
171
171
  preset: "frosted"
172
- }, b = {
172
+ }, y = {
173
173
  blur: [0, 48],
174
174
  clarity: [0, 100],
175
175
  depth: [0, 2],
@@ -189,7 +189,7 @@ var g = 1, _ = {
189
189
  washAngle: [0, 360],
190
190
  relief: [0, 2],
191
191
  fill: [0, .6]
192
- }, x = {
192
+ }, b = {
193
193
  vibrancy: 1,
194
194
  inset: 0,
195
195
  lightFrom: 315,
@@ -205,10 +205,10 @@ var g = 1, _ = {
205
205
  relief: 1,
206
206
  accent: "theme",
207
207
  fill: 0
208
- }, S = 85, C = Object.keys(b);
209
- function w(e) {
208
+ }, x = 85, S = Object.keys(y);
209
+ function C(e) {
210
210
  let { edgeWidth: n, edgeInk: r, edgeAccent: i, inkLift: a, ...o } = v[e.preset], s = {
211
- ...x,
211
+ ...b,
212
212
  ...o,
213
213
  ...e.dials
214
214
  }, c = {
@@ -217,11 +217,11 @@ function w(e) {
217
217
  sheen: s.sheen ?? s.depth,
218
218
  shadow: s.shadow ?? s.depth
219
219
  };
220
- for (let e of C) c[e] = t(c[e], ...b[e]);
220
+ for (let e of S) c[e] = t(c[e], ...y[e]);
221
221
  return c;
222
222
  }
223
- function T(e) {
224
- let { blur: t, clarity: n, depth: r, tint: i, glow: a, ink: o } = w(e);
223
+ function w(e) {
224
+ let { blur: t, clarity: n, depth: r, tint: i, glow: a, ink: o } = C(e);
225
225
  return {
226
226
  blur: t,
227
227
  clarity: n,
@@ -231,15 +231,15 @@ function T(e) {
231
231
  ink: o
232
232
  };
233
233
  }
234
- var E = 315, D = (e) => Math.round(e * 1e4) / 1e4, O = (e, t) => `url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='${e}' height='${e}'><filter id='n' x='0' y='0' width='100%' height='100%'>${t}</filter><rect width='${e}' height='${e}' filter='url(%23n)'/></svg>")`, ee = (e) => O(160, `<feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' seed='0' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.7 0 0 0 0 0.7 0 0 0 0 0.7 0 0 0 ${D(e * .3)} 0'/>`), te = {
234
+ var T = 315, E = (e) => Math.round(e * 1e4) / 1e4, D = (e, t) => `url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='${e}' height='${e}'><filter id='n' x='0' y='0' width='100%' height='100%'>${t}</filter><rect width='${e}' height='${e}' filter='url(%23n)'/></svg>")`, te = (e) => D(160, `<feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' seed='0' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.7 0 0 0 0 0.7 0 0 0 0 0.7 0 0 0 ${E(e * .3)} 0'/>`), ne = {
235
235
  flat: 1,
236
236
  fade: 3,
237
237
  "two-tone": 1
238
- }, ne = {
238
+ }, O = (e, t, n, r) => `${E(50 + n * e + r * t)}% ${E(50 + n * t - r * e)}%`, re = {
239
239
  top: [0, 0],
240
240
  "top-bottom": [1, 0],
241
241
  around: [0, 1]
242
- }, re = {
242
+ }, ie = {
243
243
  flat: {
244
244
  "--material-control-track": "var(--input)",
245
245
  "--material-control-fill": "var(--material-accent)",
@@ -251,8 +251,8 @@ var E = 315, D = (e) => Math.round(e * 1e4) / 1e4, O = (e, t) => `url("data:imag
251
251
  "--material-control-knob": "var(--material-face)"
252
252
  }
253
253
  };
254
- function ie(e, t, n = "light") {
255
- let r = w(e), i = v[e.preset], a = t === "none" ? 0 : r.blur, o = t === "none" ? Math.max(r.clarity, S) : r.clarity, s = n === "dark" ? r.darkScale : 1, c = (r.lightFrom - E) * Math.PI / 180, [l, u] = ne[r.rim];
254
+ function ae(e, t, n = "light") {
255
+ let r = C(e), i = v[e.preset], a = t === "none" ? 0 : r.blur, o = t === "none" ? Math.max(r.clarity, x) : r.clarity, s = n === "dark" ? r.darkScale : 1, c = (r.lightFrom - T) * Math.PI / 180, l = E(Math.cos(c)), u = E(Math.sin(c)), [d, f] = re[r.rim];
256
256
  return {
257
257
  "--material-blur": `${a}px`,
258
258
  "--material-clarity": `${o}%`,
@@ -265,24 +265,27 @@ function ie(e, t, n = "light") {
265
265
  "--material-ink-level": `${r.ink}`,
266
266
  "--material-ink-lift": `${i.inkLift}`,
267
267
  "--_material-vibrancy": `${r.vibrancy}`,
268
- "--_material-edge": `${D(r.edge * s)}`,
269
- "--_material-sheen": `${D(r.sheen * s)}`,
268
+ "--_material-edge": `${E(r.edge * s)}`,
269
+ "--_material-sheen": `${E(r.sheen * s)}`,
270
270
  "--_material-shadow": `${r.shadow}`,
271
- "--_material-inset": `${D(r.inset * s)}`,
272
- "--_material-light-cos": `${D(Math.cos(c))}`,
273
- "--_material-light-sin": `${D(Math.sin(c))}`,
274
- "--_material-rim-bottom": `${l}`,
275
- "--_material-rim-around": `${u}`,
271
+ "--_material-inset": `${E(r.inset * s)}`,
272
+ "--_material-light-cos": `${l}`,
273
+ "--_material-light-sin": `${u}`,
274
+ "--_material-sheen-at": O(l, u, -28, 42),
275
+ "--_material-shade-at": O(l, u, 32, -50),
276
+ "--_material-relief-at": O(l, u, 0, 12),
277
+ "--_material-rim-bottom": `${d}`,
278
+ "--_material-rim-around": `${f}`,
276
279
  "--_material-glow-out": r.glowAt === "outside" ? "1" : "0",
277
280
  "--_material-glow-in": r.glowAt === "inside" ? "1" : "0",
278
- "--_material-inner-glow": `${D(r.innerGlow * s)}`,
281
+ "--_material-inner-glow": `${E(r.innerGlow * s)}`,
279
282
  "--_material-inner-glow-hue": `${r.innerGlowHue}`,
280
- "--_material-grain": r.grain > 0 ? ee(r.grain) : "none",
281
- "--_material-wash-split": `${te[r.washStyle]}`,
283
+ "--_material-grain": r.grain > 0 ? te(r.grain) : "none",
284
+ "--_material-wash-split": `${ne[r.washStyle]}`,
282
285
  "--_material-wash-angle": `${r.washAngle}deg`,
283
286
  "--_material-two-tone": r.washStyle === "two-tone" ? "1" : "0",
284
287
  "--_material-face-raised": r.face === "raised" ? "1" : "0",
285
- ...re[r.face],
288
+ ...ie[r.face],
286
289
  "--_material-relief": `${r.relief}`,
287
290
  "--material-accent": r.accent === "theme" ? "var(--primary)" : r.accent,
288
291
  "--_material-fill": `${r.fill}`
@@ -636,7 +639,7 @@ var K = 1, q = {
636
639
  cool: "oklch(0.965 0.02 240)",
637
640
  neutral: "oklch(0.97 0 0)",
638
641
  warm: "oklch(0.965 0.025 75)"
639
- }, J = {
642
+ }, oe = {
640
643
  light: {
641
644
  ground: {},
642
645
  card: {
@@ -683,41 +686,41 @@ var K = 1, q = {
683
686
  }
684
687
  }
685
688
  };
686
- function Y(e, n) {
689
+ function J(e, n) {
687
690
  let a = r(e);
688
691
  return a ? i(t(n.lTo ?? a.l + (n.l ?? 0), 0, 1), t(a.c * (n.c ?? 1), 0, n.cMax ?? .4), a.h) : e;
689
692
  }
690
- function X(e, t) {
691
- let n = J[t];
693
+ function Y(e, t) {
694
+ let n = oe[t];
692
695
  return {
693
- background: Y(e.surface, n.ground),
694
- card: Y(e.surface, n.card),
695
- border: Y(e.surface, n.border),
696
- secondary: Y(e.surface, n.secondary),
697
- primary: Y(e.accent, n.primary),
698
- accent: Y(e.accent, n.accent)
696
+ background: J(e.surface, n.ground),
697
+ card: J(e.surface, n.card),
698
+ border: J(e.surface, n.border),
699
+ secondary: J(e.surface, n.secondary),
700
+ primary: J(e.accent, n.primary),
701
+ accent: J(e.accent, n.accent)
699
702
  };
700
703
  }
701
- var ae = [
704
+ var se = [
702
705
  "primary",
703
706
  "ring",
704
707
  "mutedForeground",
705
708
  "destructive"
706
709
  ];
707
- function Z(e) {
710
+ function X(e) {
708
711
  let t = { ...e }, n = new Set(V(t).map((e) => e.text));
709
- for (let e of ae) n.has(e) && (t[e] = G(t, e) ?? t[e]);
712
+ for (let e of se) n.has(e) && (t[e] = G(t, e) ?? t[e]);
710
713
  return t;
711
714
  }
712
- function Q(e) {
713
- let t = X(e, "light"), n = s(t, "light"), r = e.darkLinked ? c(t) : s(X(e, "dark"), "dark");
715
+ function Z(e) {
716
+ let t = Y(e, "light"), n = s(t, "light"), r = e.darkLinked ? c(t) : s(Y(e, "dark"), "dark");
714
717
  return {
715
- light: Z(n),
716
- dark: Z(r)
718
+ light: X(n),
719
+ dark: X(r)
717
720
  };
718
721
  }
719
- function oe(e) {
720
- let t = Q(e);
722
+ function ce(e) {
723
+ let t = Z(e);
721
724
  return {
722
725
  light: {
723
726
  ...t.light,
@@ -729,15 +732,15 @@ function oe(e) {
729
732
  }
730
733
  };
731
734
  }
732
- function se(e, t, n) {
735
+ function le(e, t, n) {
733
736
  return e.set[t][n] === void 0;
734
737
  }
735
- function $(e, t) {
738
+ function Q(e, t) {
736
739
  let n = {};
737
740
  for (let r of Object.keys(t)) t[r] !== e[r] && (n[r] = t[r]);
738
741
  return n;
739
742
  }
740
- function ce(e, t, n) {
743
+ function $(e, t, n) {
741
744
  let r = {
742
745
  v: 1,
743
746
  accent: e.light.primary,
@@ -749,14 +752,14 @@ function ce(e, t, n) {
749
752
  light: {},
750
753
  dark: {}
751
754
  }
752
- }, i = Q(r);
755
+ }, i = Z(r);
753
756
  return {
754
757
  ...r,
755
758
  set: {
756
- light: $(i.light, e.light),
757
- dark: $(i.dark, e.dark)
759
+ light: Q(i.light, e.light),
760
+ dark: Q(i.dark, e.dark)
758
761
  }
759
762
  };
760
763
  }
761
764
  //#endregion
762
- export { k as DEFAULT_THEME_ID, j as FONT_MONO, A as FONT_SANS, y as FROSTED, v as MATERIAL_PRESETS, b as MATERIAL_RANGES, g as MATERIAL_VERSION, B as READABLE_PAIRS, K as RECIPE_VERSION, P as THEME_PRESETS, q as TINT_SURFACES, t as clamp, z as contrastRatio, c as deriveDarkFromLight, u as ensureFullThemeColors, V as findUnreadable, G as fixReadable, F as getAllPresets, I as getPreset, se as isDerived, T as materialDials, w as materialTerms, d as oklchToHex, r as parseOklch, L as parseThemeBlock, ie as resolveMaterial, oe as resolveRecipe, s as resolveThemeColors, ce as seedsFromColors, i as toOklch };
765
+ export { k as DEFAULT_THEME_ID, j as FONT_MONO, A as FONT_SANS, ee as FROSTED, v as MATERIAL_PRESETS, y as MATERIAL_RANGES, g as MATERIAL_VERSION, B as READABLE_PAIRS, K as RECIPE_VERSION, P as THEME_PRESETS, q as TINT_SURFACES, t as clamp, z as contrastRatio, c as deriveDarkFromLight, u as ensureFullThemeColors, V as findUnreadable, G as fixReadable, F as getAllPresets, I as getPreset, le as isDerived, w as materialDials, C as materialTerms, d as oklchToHex, r as parseOklch, L as parseThemeBlock, ae as resolveMaterial, ce as resolveRecipe, s as resolveThemeColors, $ as seedsFromColors, i as toOklch };