@gryt/ui 0.22.0 → 0.23.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.
package/dist/index.js CHANGED
@@ -1,101 +1,101 @@
1
- import { jsx as o, jsxs as g } from "react/jsx-runtime";
2
- import { Tooltip as I } from "@base-ui/react/tooltip";
3
- import { createContext as ct, useContext as Y, useRef as Q, forwardRef as s, useCallback as W, useLayoutEffect as vt, useMemo as tt, useState as Nt, useEffect as Pt, useSyncExternalStore as Tt } from "react";
4
- import { createGrytTheme as kt } from "@gryt/theme";
5
- import { GRYT_HUE_KEYS as pa, GRYT_NEUTRAL_KEYS as ba, GRYT_RADIUS_KEYS as fa, GRYT_THEME_NAME_MAX as xa, alphaScale as ha, cloneGrytTheme as wa, contrast as va, createGrytTheme as Na, decodeGrytTheme as Pa, encodeGrytTheme as Ta, grytAlphaScales as ka, grytAlphaScalesLight as Ca, grytLightTokens as Sa, grytPresets as $a, grytPresetsById as Ra, grytScales as Ia, grytScalesLight as Aa, grytTheme as Da, grytThemeHues as Ma, grytThemeToOptions as Ga, grytTokens as La, hexToOklch as ja, hexToRgb as za, hueScale as Ba, hueScaleLight as Fa, isHexColor as Ea, neutralScale as Va, neutralScaleLight as _a, normalizeHexColor as Ya, normalizeThemeName as Ha, oklchToHex as Oa, rgbToHex as Xa } from "@gryt/theme";
6
- import { Button as lt } from "@base-ui/react/button";
7
- import { clsx as Ct } from "clsx";
8
- import { twMerge as St } from "tailwind-merge";
9
- import { Field as _ } from "@base-ui/react/field";
10
- import { PaperPlaneTilt as $t, X as dt, Check as gt, CaretUpDown as Rt, CircleNotch as It, CaretDown as At, Minus as Dt, Plus as Mt } from "@phosphor-icons/react";
11
- import { Avatar as X } from "@base-ui/react/avatar";
12
- import { owlAvatarDataUri as Gt, eggAvatarDataUri as Lt } from "@gryt/owl";
13
- import { avatarSeed as Ka } from "@gryt/owl";
14
- import { Checkbox as et } from "@base-ui/react/checkbox";
15
- import { Radio as rt } from "@base-ui/react/radio";
16
- import { RadioGroup as jt } from "@base-ui/react/radio-group";
17
- import { Switch as ot } from "@base-ui/react/switch";
18
- import { Slider as z } from "@base-ui/react/slider";
19
- import { Select as h } from "@base-ui/react/select";
20
- import { Separator as zt } from "@base-ui/react/separator";
21
- import { Progress as U } from "@base-ui/react/progress";
22
- import { Dialog as C } from "@base-ui/react/dialog";
23
- import { Drawer as N } from "@base-ui/react/drawer";
24
- import { Menu as A } from "@base-ui/react/menu";
25
- import { Tabs as E } from "@base-ui/react/tabs";
26
- import { Accordion as F } from "@base-ui/react/accordion";
27
- import { ContextMenu as k } from "@base-ui/react/context-menu";
28
- import { Popover as P } from "@base-ui/react/popover";
29
- import { Toast as T } from "@base-ui/react/toast";
30
- import { ScrollArea as L } from "@base-ui/react/scroll-area";
31
- import { Toggle as Bt } from "@base-ui/react/toggle";
32
- import { ToggleGroup as Ft } from "@base-ui/react/toggle-group";
33
- import { Meter as B } from "@base-ui/react/meter";
34
- import { AlertDialog as S } from "@base-ui/react/alert-dialog";
35
- import { Autocomplete as p } from "@base-ui/react/autocomplete";
36
- import { Combobox as u } from "@base-ui/react/combobox";
37
- import { CheckboxGroup as Et } from "@base-ui/react/checkbox-group";
38
- import { Collapsible as Z } from "@base-ui/react/collapsible";
39
- import { Form as Vt } from "@base-ui/react/form";
40
- import { Fieldset as ut } from "@base-ui/react/fieldset";
41
- import { Menubar as _t } from "@base-ui/react/menubar";
42
- import { NavigationMenu as w } from "@base-ui/react/navigation-menu";
43
- import { NumberField as R } from "@base-ui/react/number-field";
44
- import { OTPField as at } from "@base-ui/react/otp-field";
45
- import { PreviewCard as M } from "@base-ui/react/preview-card";
46
- import { Toolbar as G } from "@base-ui/react/toolbar";
47
- const yt = ct(void 0);
48
- function mt() {
49
- return Y(yt);
1
+ import { jsx as o, jsxs as d } from "react/jsx-runtime";
2
+ import { Tooltip as F } from "@base-ui/react/tooltip";
3
+ import { createContext as ne, useContext as ht, useRef as Mt, forwardRef as l, useCallback as It, useLayoutEffect as Se, useMemo as it, useState as _, useEffect as $e, useSyncExternalStore as Ce, useId as ke } from "react";
4
+ import { createGrytTheme as oe, grytTheme as Re, GRYT_RADIUS_KEYS as Ae, grytThemeToOptions as Ie, grytThemeHues as De, normalizeHexColor as lt, isHexColor as Le, contrast as Q, oklchToHex as A, hexToOklch as pt, decodeGrytTheme as Me, grytTokens as Dt, grytLightTokens as Ge, grytPresets as _t, grytPresetsById as je, GRYT_THEME_NAME_MAX as Ee } from "@gryt/theme";
5
+ import { GRYT_HUE_KEYS as Xa, GRYT_NEUTRAL_KEYS as Ka, GRYT_RADIUS_KEYS as Wa, GRYT_THEME_NAME_MAX as Ja, alphaScale as Qa, cloneGrytTheme as Za, contrast as qa, createGrytTheme as ts, decodeGrytTheme as es, encodeGrytTheme as rs, encodeGrytTheme as ns, grytAlphaScales as os, grytAlphaScalesLight as as, grytLightTokens as ss, grytPresets as is, grytPresetsById as ls, grytScales as cs, grytScalesLight as ds, grytTheme as us, grytThemeHues as gs, grytThemeToOptions as ms, grytTokens as ps, hexToOklch as ys, hexToRgb as fs, hueScale as hs, hueScaleLight as bs, isHexColor as xs, neutralScale as vs, neutralScaleLight as ws, normalizeHexColor as Ns, normalizeThemeName as Ts, oklchToHex as Ps, rgbToHex as Ss } from "@gryt/theme";
6
+ import { Button as ae } from "@base-ui/react/button";
7
+ import { clsx as He } from "clsx";
8
+ import { twMerge as ze } from "tailwind-merge";
9
+ import { Field as gt } from "@base-ui/react/field";
10
+ import { PaperPlaneTilt as Be, X as Gt, Check as jt, CaretUpDown as Fe, CircleNotch as _e, CaretDown as Ve, Warning as se, ArrowsClockwise as Oe, Minus as Ye, Plus as Ue } from "@phosphor-icons/react";
11
+ import { Avatar as Pt } from "@base-ui/react/avatar";
12
+ import { owlAvatarDataUri as Xe, eggAvatarDataUri as Ke } from "@gryt/owl";
13
+ import { avatarSeed as Cs } from "@gryt/owl";
14
+ import { Checkbox as Vt } from "@base-ui/react/checkbox";
15
+ import { Radio as Ot } from "@base-ui/react/radio";
16
+ import { RadioGroup as We } from "@base-ui/react/radio-group";
17
+ import { Switch as Yt } from "@base-ui/react/switch";
18
+ import { Slider as rt } from "@base-ui/react/slider";
19
+ import { Select as C } from "@base-ui/react/select";
20
+ import { Separator as Je } from "@base-ui/react/separator";
21
+ import { Progress as St } from "@base-ui/react/progress";
22
+ import { Dialog as j } from "@base-ui/react/dialog";
23
+ import { Drawer as I } from "@base-ui/react/drawer";
24
+ import { Menu as V } from "@base-ui/react/menu";
25
+ import { Tabs as dt } from "@base-ui/react/tabs";
26
+ import { Accordion as ct } from "@base-ui/react/accordion";
27
+ import { ContextMenu as G } from "@base-ui/react/context-menu";
28
+ import { Popover as L } from "@base-ui/react/popover";
29
+ import { Toast as M } from "@base-ui/react/toast";
30
+ import { ScrollArea as Z } from "@base-ui/react/scroll-area";
31
+ import { Toggle as Qe } from "@base-ui/react/toggle";
32
+ import { ToggleGroup as Ze } from "@base-ui/react/toggle-group";
33
+ import { Meter as nt } from "@base-ui/react/meter";
34
+ import { AlertDialog as E } from "@base-ui/react/alert-dialog";
35
+ import { Autocomplete as N } from "@base-ui/react/autocomplete";
36
+ import { Combobox as v } from "@base-ui/react/combobox";
37
+ import { CheckboxGroup as qe } from "@base-ui/react/checkbox-group";
38
+ import { Collapsible as Et } from "@base-ui/react/collapsible";
39
+ import { Form as tr } from "@base-ui/react/form";
40
+ import { Fieldset as ie } from "@base-ui/react/fieldset";
41
+ import { Menubar as er } from "@base-ui/react/menubar";
42
+ import { NavigationMenu as k } from "@base-ui/react/navigation-menu";
43
+ import { NumberField as z } from "@base-ui/react/number-field";
44
+ import { OTPField as Ut } from "@base-ui/react/otp-field";
45
+ import { PreviewCard as W } from "@base-ui/react/preview-card";
46
+ import { Toolbar as J } from "@base-ui/react/toolbar";
47
+ const le = ne(void 0);
48
+ function ce() {
49
+ return ht(le);
50
50
  }
51
- function Yt(a) {
52
- return Object.keys(a).some((t) => t.startsWith("--"));
51
+ function rr(n) {
52
+ return Object.keys(n).some((t) => t.startsWith("--"));
53
53
  }
54
- function bo({
55
- children: a,
54
+ function Jo({
55
+ children: n,
56
56
  className: t,
57
57
  theme: e,
58
58
  tooltipDelay: r = 400,
59
- containOverlays: i = !1
59
+ containOverlays: a = !1
60
60
  }) {
61
- const c = Q(null), l = e === void 0 ? void 0 : Yt(e) ? e : kt(e);
62
- return /* @__PURE__ */ o("div", { className: t, style: l, ref: c, children: /* @__PURE__ */ o(
63
- yt.Provider,
61
+ const c = Mt(null), m = e === void 0 ? void 0 : rr(e) ? e : oe(e);
62
+ return /* @__PURE__ */ o("div", { className: t, style: m, ref: c, children: /* @__PURE__ */ o(
63
+ le.Provider,
64
64
  {
65
- value: i ? c : void 0,
66
- children: /* @__PURE__ */ o(I.Provider, { delay: r, children: a })
65
+ value: a ? c : void 0,
66
+ children: /* @__PURE__ */ o(F.Provider, { delay: r, children: n })
67
67
  }
68
68
  ) });
69
69
  }
70
- function n(...a) {
71
- return St(Ct(a));
70
+ function s(...n) {
71
+ return ze(He(n));
72
72
  }
73
- const Ht = {
73
+ const nr = {
74
74
  primary: "bg-gryt-accent text-gryt-on-accent hover:not-data-disabled:bg-gryt-accent-light data-disabled:bg-gryt-surface-raised data-disabled:text-gryt-muted",
75
75
  secondary: "bg-gryt-secondary text-gryt-on-secondary hover:not-data-disabled:bg-gryt-secondary-light data-disabled:bg-gryt-surface-raised data-disabled:text-gryt-muted",
76
76
  neutral: "bg-gryt-surface-raised text-gryt-text hover:not-data-disabled:bg-gryt-surface-hover data-disabled:text-gryt-muted",
77
77
  danger: "bg-gryt-danger text-gryt-on-danger hover:not-data-disabled:bg-gryt-danger-light data-disabled:bg-gryt-surface-raised data-disabled:text-gryt-muted",
78
78
  ghost: "bg-transparent text-gryt-muted hover:not-data-disabled:bg-white/8 hover:not-data-disabled:text-gryt-text"
79
- }, Ot = {
79
+ }, or = {
80
80
  xsmall: "min-h-8 px-3 text-xs",
81
81
  small: "min-h-9 px-4 text-sm",
82
82
  medium: "min-h-10 px-5 text-sm",
83
83
  large: "min-h-12 px-6 text-base"
84
- }, Xt = s(
84
+ }, yt = l(
85
85
  function({
86
86
  children: t,
87
87
  className: e,
88
88
  endIcon: r,
89
- size: i = "medium",
89
+ size: a = "medium",
90
90
  startIcon: c,
91
- tone: l = "primary",
92
- ...d
93
- }, m) {
94
- return /* @__PURE__ */ g(
95
- lt,
91
+ tone: m = "primary",
92
+ ...g
93
+ }, y) {
94
+ return /* @__PURE__ */ d(
95
+ ae,
96
96
  {
97
- ref: m,
98
- className: n(
97
+ ref: y,
98
+ className: s(
99
99
  "gryt-button",
100
100
  "inline-flex cursor-pointer items-center justify-center gap-2 border-0 shadow-none",
101
101
  "rounded-(--gryt-radius-full) font-semibold whitespace-nowrap select-none",
@@ -121,11 +121,11 @@ const Ht = {
121
121
  // and an icon at full strength on a dead button is the same lie in
122
122
  // miniature.
123
123
  "data-disabled:cursor-not-allowed data-disabled:opacity-60",
124
- Ot[i],
125
- Ht[l],
124
+ or[a],
125
+ nr[m],
126
126
  e
127
127
  ),
128
- ...d,
128
+ ...g,
129
129
  children: [
130
130
  c,
131
131
  t,
@@ -134,68 +134,68 @@ const Ht = {
134
134
  }
135
135
  );
136
136
  }
137
- ), f = "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gryt-accent-light", Ut = "has-[:focus-visible]:outline-2 has-[:focus-visible]:outline-offset-2 has-[:focus-visible]:outline-gryt-accent-light", pt = [
137
+ ), P = "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gryt-accent-light", ar = "has-[:focus-visible]:outline-2 has-[:focus-visible]:outline-offset-2 has-[:focus-visible]:outline-gryt-accent-light", de = [
138
138
  "w-full rounded-(--gryt-radius-xl) border bg-gryt-surface-raised",
139
139
  "text-gryt-text outline-none placeholder:text-gryt-muted",
140
140
  "transition-colors duration-150 motion-reduce:transition-none",
141
141
  "hover:border-gryt-accent-light focus:border-gryt-accent",
142
142
  "disabled:cursor-not-allowed disabled:opacity-60"
143
- ].join(" "), bt = {
143
+ ].join(" "), ue = {
144
144
  small: "min-h-9 px-3 py-1.5 text-sm",
145
145
  medium: "min-h-11 px-4 py-2.5 text-sm"
146
- }, D = "rounded-(--gryt-radius-xl) border border-gryt-border bg-gryt-surface text-gryt-text", $ = [
146
+ }, Y = "rounded-(--gryt-radius-xl) border border-gryt-border bg-gryt-surface text-gryt-text", H = [
147
147
  // scale and translate are named explicitly because Tailwind v4 sets them as
148
148
  // standalone CSS properties rather than folding them into `transform`, so
149
149
  // transitioning `transform` would leave the popup snapping into place.
150
150
  "transition-[opacity,scale,translate] duration-(--gryt-dur-spring) ease-spring motion-reduce:transition-none",
151
151
  "data-starting-style:scale-[0.98] data-starting-style:opacity-0",
152
152
  "data-ending-style:scale-[0.98] data-ending-style:opacity-0"
153
- ].join(" "), j = "cursor-pointer data-disabled:cursor-not-allowed data-disabled:opacity-50", Kt = {
153
+ ].join(" "), q = "cursor-pointer data-disabled:cursor-not-allowed data-disabled:opacity-50", sr = {
154
154
  primary: "data-checked:bg-gryt-accent data-checked:text-gryt-on-accent",
155
155
  secondary: "data-checked:bg-gryt-secondary data-checked:text-gryt-on-secondary",
156
156
  neutral: "data-checked:bg-gryt-surface-hover data-checked:text-gryt-text",
157
157
  danger: "data-checked:bg-gryt-danger data-checked:text-gryt-on-danger",
158
158
  success: "data-checked:bg-gryt-success data-checked:text-gryt-on-accent",
159
159
  warning: "data-checked:bg-gryt-warning data-checked:text-gryt-on-accent"
160
- }, ft = {
160
+ }, ge = {
161
161
  primary: "bg-gryt-accent",
162
162
  secondary: "bg-gryt-secondary",
163
163
  neutral: "bg-gryt-surface-hover",
164
164
  danger: "bg-gryt-danger",
165
165
  success: "bg-gryt-success",
166
166
  warning: "bg-gryt-warning"
167
- }, Wt = {
167
+ }, ir = {
168
168
  primary: "data-checked:border-gryt-accent",
169
169
  secondary: "data-checked:border-gryt-secondary",
170
170
  neutral: "data-checked:border-gryt-muted",
171
171
  danger: "data-checked:border-gryt-danger",
172
172
  success: "data-checked:border-gryt-success",
173
173
  warning: "data-checked:border-gryt-warning"
174
- }, Qt = {
174
+ }, lr = {
175
175
  primary: "data-checked:bg-gryt-accent",
176
176
  secondary: "data-checked:bg-gryt-secondary",
177
177
  neutral: "data-checked:bg-gryt-surface-hover",
178
178
  danger: "data-checked:bg-gryt-danger",
179
179
  success: "data-checked:bg-gryt-success",
180
180
  warning: "data-checked:bg-gryt-warning"
181
- }, Zt = {
181
+ }, cr = {
182
182
  primary: "text-gryt-accent-11 hover:not-data-disabled:bg-gryt-accent-3",
183
183
  secondary: "text-gryt-secondary-11 hover:not-data-disabled:bg-gryt-secondary-3",
184
184
  neutral: "text-gryt-muted hover:not-data-disabled:bg-white/8 hover:not-data-disabled:text-gryt-text",
185
185
  danger: "text-gryt-danger-11 hover:not-data-disabled:bg-gryt-danger-3",
186
186
  ghost: "text-gryt-muted hover:not-data-disabled:bg-white/8 hover:not-data-disabled:text-gryt-text"
187
- }, Jt = {
187
+ }, dr = {
188
188
  xsmall: "h-8 w-8",
189
189
  small: "h-9 w-9",
190
190
  medium: "h-10 w-10",
191
191
  large: "h-12 w-12"
192
- }, fo = s(
193
- function({ className: t, size: e = "medium", tone: r = "neutral", ...i }, c) {
192
+ }, Qo = l(
193
+ function({ className: t, size: e = "medium", tone: r = "neutral", ...a }, c) {
194
194
  return /* @__PURE__ */ o(
195
- lt,
195
+ ae,
196
196
  {
197
197
  ref: c,
198
- className: n(
198
+ className: s(
199
199
  "gryt-icon-button",
200
200
  "inline-flex shrink-0 items-center justify-center border-0 bg-transparent p-0",
201
201
  "rounded-(--gryt-radius-full) select-none",
@@ -209,23 +209,23 @@ const Ht = {
209
209
  // that is what it is; Base UI puts it there, nothing to pass.
210
210
  "motion-safe:not-[[aria-haspopup]]:hover:not-data-disabled:scale-[1.06]",
211
211
  "motion-safe:not-[[aria-haspopup]]:active:not-data-disabled:scale-[0.94]",
212
- f,
213
- j,
214
- Jt[e],
215
- Zt[r],
212
+ P,
213
+ q,
214
+ dr[e],
215
+ cr[r],
216
216
  t
217
217
  ),
218
- ...i
218
+ ...a
219
219
  }
220
220
  );
221
221
  }
222
- ), xo = s(
223
- function({ className: t, elevated: e = !1, ...r }, i) {
222
+ ), Zo = l(
223
+ function({ className: t, elevated: e = !1, ...r }, a) {
224
224
  return /* @__PURE__ */ o(
225
225
  "div",
226
226
  {
227
- ref: i,
228
- className: n(
227
+ ref: a,
228
+ className: s(
229
229
  "gryt-surface rounded-(--gryt-radius-lg) border border-gryt-border p-4 text-gryt-text",
230
230
  e ? "bg-gryt-surface-raised" : "bg-gryt-surface",
231
231
  t
@@ -234,294 +234,294 @@ const Ht = {
234
234
  }
235
235
  );
236
236
  }
237
- ), ho = s(
238
- function({ children: t, className: e, from: r = "assistant", ...i }, c) {
237
+ ), qo = l(
238
+ function({ children: t, className: e, from: r = "assistant", ...a }, c) {
239
239
  return /* @__PURE__ */ o(
240
240
  "div",
241
241
  {
242
242
  ref: c,
243
- className: n(
243
+ className: s(
244
244
  "gryt-message-bubble",
245
245
  r === "user" && "ml-auto bg-gryt-accent text-gryt-on-accent",
246
246
  r === "assistant" && "mr-auto border border-gryt-border bg-gryt-surface text-gryt-text",
247
247
  r === "system" && "mx-auto border border-dashed border-gryt-border bg-transparent text-gryt-muted",
248
248
  e
249
249
  ),
250
- ...i,
250
+ ...a,
251
251
  children: t
252
252
  }
253
253
  );
254
254
  }
255
- ), wo = s(
255
+ ), me = l(
256
256
  function({
257
257
  className: t,
258
258
  error: e = !1,
259
259
  fieldClassName: r,
260
- helperText: i,
260
+ helperText: a,
261
261
  label: c,
262
- minRows: l = 3,
263
- multiline: d = !1,
264
- size: m = "medium",
265
- ...x
266
- }, y) {
267
- const v = /* @__PURE__ */ o(
268
- _.Control,
262
+ minRows: m = 3,
263
+ multiline: g = !1,
264
+ size: y = "medium",
265
+ ...p
266
+ }, f) {
267
+ const h = /* @__PURE__ */ o(
268
+ gt.Control,
269
269
  {
270
- ref: y,
271
- render: d ? /* @__PURE__ */ o("textarea", { rows: l }) : void 0,
272
- className: n(
270
+ ref: f,
271
+ render: g ? /* @__PURE__ */ o("textarea", { rows: m }) : void 0,
272
+ className: s(
273
273
  "gryt-text-field-control",
274
- pt,
275
- d && "resize-y leading-6",
274
+ de,
275
+ g && "resize-y leading-6",
276
276
  e ? "border-gryt-danger" : "border-gryt-border",
277
- bt[m],
277
+ ue[y],
278
278
  t
279
279
  ),
280
- ...x
280
+ ...p
281
281
  }
282
282
  );
283
- return /* @__PURE__ */ g(
284
- _.Root,
283
+ return /* @__PURE__ */ d(
284
+ gt.Root,
285
285
  {
286
- className: n(
286
+ className: s(
287
287
  "gryt-text-field flex w-full flex-col gap-1.5",
288
288
  r
289
289
  ),
290
290
  children: [
291
- c ? /* @__PURE__ */ o(_.Label, { className: "text-xs font-medium text-gryt-muted", children: c }) : null,
292
- v,
293
- i ? /* @__PURE__ */ o(
294
- _.Description,
291
+ c ? /* @__PURE__ */ o(gt.Label, { className: "text-xs font-medium text-gryt-muted", children: c }) : null,
292
+ h,
293
+ a ? /* @__PURE__ */ o(
294
+ gt.Description,
295
295
  {
296
- className: n(
296
+ className: s(
297
297
  "text-xs",
298
298
  e ? "text-gryt-danger-11" : "text-gryt-muted"
299
299
  ),
300
- children: i
300
+ children: a
301
301
  }
302
302
  ) : null
303
303
  ]
304
304
  }
305
305
  );
306
306
  }
307
- ), vo = s(
307
+ ), ta = l(
308
308
  function({
309
309
  className: t,
310
310
  disabled: e = !1,
311
311
  maxRows: r = 8,
312
- minRows: i = 1,
312
+ minRows: a = 1,
313
313
  onSubmit: c,
314
- placeholder: l = "Message Gryt",
315
- submitLabel: d = "Send",
316
- ...m
317
- }, x) {
318
- const y = Q(null), v = W(() => {
319
- const b = y.current;
320
- if (!b)
314
+ placeholder: m = "Message Gryt",
315
+ submitLabel: g = "Send",
316
+ ...y
317
+ }, p) {
318
+ const f = Mt(null), h = It(() => {
319
+ const x = f.current;
320
+ if (!x)
321
321
  return;
322
- const O = window.getComputedStyle(b), J = parseFloat(O.lineHeight) || 24, q = parseFloat(O.paddingTop) + parseFloat(O.paddingBottom);
323
- b.style.height = "auto", b.style.height = `${Math.min(
324
- Math.max(b.scrollHeight, J * i + q),
325
- J * r + q
322
+ const T = window.getComputedStyle(x), w = parseFloat(T.lineHeight) || 24, R = parseFloat(T.paddingTop) + parseFloat(T.paddingBottom);
323
+ x.style.height = "auto", x.style.height = `${Math.min(
324
+ Math.max(x.scrollHeight, w * a + R),
325
+ w * r + R
326
326
  )}px`;
327
- }, [r, i]);
328
- vt(v, [v, m.value]);
329
- function V(b) {
327
+ }, [r, a]);
328
+ Se(h, [h, y.value]);
329
+ function S(x) {
330
330
  if (!c) {
331
- b.preventDefault();
331
+ x.preventDefault();
332
332
  return;
333
333
  }
334
- c(b);
334
+ c(x);
335
335
  }
336
- return /* @__PURE__ */ g("form", { className: n("gryt-composer", t), onSubmit: V, children: [
336
+ return /* @__PURE__ */ d("form", { className: s("gryt-composer", t), onSubmit: S, children: [
337
337
  /* @__PURE__ */ o(
338
338
  "textarea",
339
339
  {
340
- ref: (b) => {
341
- y.current = b, typeof x == "function" ? x(b) : x && (x.current = b);
340
+ ref: (x) => {
341
+ f.current = x, typeof p == "function" ? p(x) : p && (p.current = x);
342
342
  },
343
- rows: i,
343
+ rows: a,
344
344
  disabled: e,
345
- placeholder: l,
346
- onInput: v,
345
+ placeholder: m,
346
+ onInput: h,
347
347
  className: "gryt-composer-textarea disabled:cursor-not-allowed disabled:opacity-60",
348
- ...m
348
+ ...y
349
349
  }
350
350
  ),
351
351
  /* @__PURE__ */ o(
352
- Xt,
352
+ yt,
353
353
  {
354
354
  type: "submit",
355
355
  disabled: e,
356
356
  size: "small",
357
- endIcon: /* @__PURE__ */ o($t, { size: 14, weight: "fill" }),
358
- children: d
357
+ endIcon: /* @__PURE__ */ o(Be, { size: 14, weight: "fill" }),
358
+ children: g
359
359
  }
360
360
  )
361
361
  ] });
362
362
  }
363
- ), qt = {
363
+ ), ur = {
364
364
  small: "h-8 w-8 text-xs",
365
365
  medium: "h-10 w-10 text-sm",
366
366
  large: "h-12 w-12 text-base"
367
- }, nt = 256, te = s(function({
367
+ }, Xt = 256, gr = l(function({
368
368
  alt: t,
369
369
  children: e,
370
370
  className: r,
371
- fallback: i,
371
+ fallback: a,
372
372
  seed: c,
373
- eggSeed: l,
374
- size: d = "medium",
375
- src: m,
376
- ...x
377
- }, y) {
378
- const v = tt(
379
- () => c ? Gt(c, { size: nt }) : void 0,
373
+ eggSeed: m,
374
+ size: g = "medium",
375
+ src: y,
376
+ ...p
377
+ }, f) {
378
+ const h = it(
379
+ () => c ? Xe(c, { size: Xt }) : void 0,
380
380
  [c]
381
- ), V = tt(
382
- () => l ? Lt(l, { size: nt }) : void 0,
383
- [l]
384
- ), b = v ?? V;
385
- return /* @__PURE__ */ g(
386
- X.Root,
381
+ ), S = it(
382
+ () => m ? Ke(m, { size: Xt }) : void 0,
383
+ [m]
384
+ ), x = h ?? S;
385
+ return /* @__PURE__ */ d(
386
+ Pt.Root,
387
387
  {
388
- ref: y,
389
- className: n(
388
+ ref: f,
389
+ className: s(
390
390
  "gryt-avatar inline-flex shrink-0 items-center justify-center overflow-hidden align-middle select-none",
391
391
  "rounded-(--gryt-radius-full) bg-gryt-surface-raised font-medium text-gryt-text ring-1 ring-gryt-border",
392
- qt[d],
392
+ ur[g],
393
393
  r
394
394
  ),
395
- ...x,
395
+ ...p,
396
396
  children: [
397
- m ? /* @__PURE__ */ o(
398
- X.Image,
397
+ y ? /* @__PURE__ */ o(
398
+ Pt.Image,
399
399
  {
400
- src: m,
400
+ src: y,
401
401
  alt: t,
402
402
  className: "h-full w-full object-cover"
403
403
  }
404
404
  ) : null,
405
- /* @__PURE__ */ o(X.Fallback, { className: "flex h-full w-full items-center justify-center", children: b ? /* @__PURE__ */ o(
405
+ /* @__PURE__ */ o(Pt.Fallback, { className: "flex h-full w-full items-center justify-center", children: x ? /* @__PURE__ */ o(
406
406
  "img",
407
407
  {
408
- src: b,
408
+ src: x,
409
409
  alt: t,
410
410
  className: "h-full w-full object-cover"
411
411
  }
412
- ) : i ?? e })
412
+ ) : a ?? e })
413
413
  ]
414
414
  }
415
415
  );
416
- }), No = s(function({ active: t = !1, avatar: e, className: r, subtitle: i, title: c, ...l }, d) {
417
- return /* @__PURE__ */ g(
416
+ }), ea = l(function({ active: t = !1, avatar: e, className: r, subtitle: a, title: c, ...m }, g) {
417
+ return /* @__PURE__ */ d(
418
418
  "button",
419
419
  {
420
- ref: d,
420
+ ref: g,
421
421
  type: "button",
422
- className: n(
422
+ className: s(
423
423
  "gryt-conversation-item enabled:cursor-pointer disabled:cursor-not-allowed disabled:opacity-50",
424
424
  t ? "bg-gryt-accent text-gryt-on-accent" : "text-gryt-text hover:bg-white/5",
425
425
  r
426
426
  ),
427
- ...l,
427
+ ...m,
428
428
  children: [
429
429
  e ?? /* @__PURE__ */ o(
430
- te,
430
+ gr,
431
431
  {
432
432
  size: "small",
433
- className: n(
433
+ className: s(
434
434
  t ? "bg-gryt-on-accent text-gryt-accent-9 ring-transparent" : "bg-gryt-surface-raised text-gryt-text"
435
435
  ),
436
436
  children: c.slice(0, 1).toUpperCase()
437
437
  }
438
438
  ),
439
- /* @__PURE__ */ g("span", { className: "min-w-0 flex-1", children: [
439
+ /* @__PURE__ */ d("span", { className: "min-w-0 flex-1", children: [
440
440
  /* @__PURE__ */ o("span", { className: "block truncate text-sm font-semibold", children: c }),
441
- i ? /* @__PURE__ */ o(
441
+ a ? /* @__PURE__ */ o(
442
442
  "span",
443
443
  {
444
- className: n(
444
+ className: s(
445
445
  "block truncate text-xs",
446
446
  t ? "text-gryt-on-accent/85" : "text-gryt-muted"
447
447
  ),
448
- children: i
448
+ children: a
449
449
  }
450
450
  ) : null
451
451
  ] })
452
452
  ]
453
453
  }
454
454
  );
455
- }), Po = s(function({ badgeContent: t, children: e, className: r, max: i = 99, showZero: c = !1, ...l }, d) {
456
- const m = typeof t == "number" ? t : null, x = m !== null && m === 0 && !c, y = m !== null && m > i ? `${i}+` : t;
457
- return /* @__PURE__ */ g(
455
+ }), ra = l(function({ badgeContent: t, children: e, className: r, max: a = 99, showZero: c = !1, ...m }, g) {
456
+ const y = typeof t == "number" ? t : null, p = y !== null && y === 0 && !c, f = y !== null && y > a ? `${a}+` : t;
457
+ return /* @__PURE__ */ d(
458
458
  "span",
459
459
  {
460
- ref: d,
461
- className: n("gryt-badge relative inline-flex", r),
462
- ...l,
460
+ ref: g,
461
+ className: s("gryt-badge relative inline-flex", r),
462
+ ...m,
463
463
  children: [
464
464
  e,
465
- t !== void 0 && !x ? /* @__PURE__ */ o(
465
+ t !== void 0 && !p ? /* @__PURE__ */ o(
466
466
  "span",
467
467
  {
468
- className: n(
468
+ className: s(
469
469
  "gryt-badge-dot absolute -top-1 -right-1 z-10 inline-flex items-center justify-center",
470
470
  "min-w-5 rounded-(--gryt-radius-full) px-1.5 py-0.5",
471
471
  "bg-gryt-accent text-[0.65rem] leading-none font-semibold text-gryt-on-accent",
472
472
  "ring-2 ring-gryt-bg"
473
473
  ),
474
- children: y
474
+ children: f
475
475
  }
476
476
  ) : null
477
477
  ]
478
478
  }
479
479
  );
480
- }), ee = {
480
+ }), mr = {
481
481
  neutral: "border-gryt-border bg-gryt-surface-raised text-gryt-text",
482
482
  primary: "border-gryt-accent-6 bg-gryt-accent-3 text-gryt-accent-11",
483
483
  secondary: "border-gryt-secondary-6 bg-gryt-secondary-3 text-gryt-secondary-11",
484
484
  success: "border-gryt-success-6 bg-gryt-success-3 text-gryt-success-11",
485
485
  warning: "border-gryt-warning-6 bg-gryt-warning-3 text-gryt-warning-11",
486
486
  danger: "border-gryt-danger-6 bg-gryt-danger-3 text-gryt-danger-11"
487
- }, To = s(function({ children: t, className: e, icon: r, label: i, onDelete: c, tone: l = "neutral", ...d }, m) {
488
- return /* @__PURE__ */ g(
487
+ }, na = l(function({ children: t, className: e, icon: r, label: a, onDelete: c, tone: m = "neutral", ...g }, y) {
488
+ return /* @__PURE__ */ d(
489
489
  "span",
490
490
  {
491
- ref: m,
492
- className: n(
491
+ ref: y,
492
+ className: s(
493
493
  "gryt-chip inline-flex items-center gap-1.5 rounded-(--gryt-radius-full) border px-3 py-1 text-xs font-medium",
494
- ee[l],
494
+ mr[m],
495
495
  e
496
496
  ),
497
- ...d,
497
+ ...g,
498
498
  children: [
499
499
  r,
500
- i ?? t,
500
+ a ?? t,
501
501
  c ? /* @__PURE__ */ o(
502
502
  "button",
503
503
  {
504
504
  type: "button",
505
505
  "aria-label": "Remove",
506
506
  onClick: c,
507
- className: n(
507
+ className: s(
508
508
  "-mr-1 inline-flex h-4 w-4 cursor-pointer items-center justify-center rounded-(--gryt-radius-full)",
509
509
  "opacity-70 transition-opacity hover:opacity-100",
510
- f
510
+ P
511
511
  ),
512
- children: /* @__PURE__ */ o(dt, { size: 10, weight: "bold", "aria-hidden": "true" })
512
+ children: /* @__PURE__ */ o(Gt, { size: 10, weight: "bold", "aria-hidden": "true" })
513
513
  }
514
514
  ) : null
515
515
  ]
516
516
  }
517
517
  );
518
- }), ko = s(
519
- function({ className: t, tone: e = "primary", ...r }, i) {
518
+ }), Kt = l(
519
+ function({ className: t, tone: e = "primary", ...r }, a) {
520
520
  return /* @__PURE__ */ o(
521
- et.Root,
521
+ Vt.Root,
522
522
  {
523
- ref: i,
524
- className: n(
523
+ ref: a,
524
+ className: s(
525
525
  "gryt-checkbox flex h-5 w-5 shrink-0 items-center justify-center",
526
526
  "rounded-(--gryt-radius-sm) border border-gryt-border bg-gryt-surface-raised",
527
527
  "transition-[scale,background-color,border-color] duration-(--gryt-dur-spring) ease-spring",
@@ -531,18 +531,18 @@ const Ht = {
531
531
  "hover:not-data-disabled:border-gryt-accent-light",
532
532
  "motion-safe:hover:not-data-disabled:scale-[1.08]",
533
533
  "motion-safe:active:not-data-disabled:scale-[0.92]",
534
- f,
535
- j,
534
+ P,
535
+ q,
536
536
  // Unchecked stays a neutral outline; the tone only paints once checked.
537
- Kt[e],
537
+ sr[e],
538
538
  t
539
539
  ),
540
540
  ...r,
541
541
  children: /* @__PURE__ */ o(
542
- et.Indicator,
542
+ Vt.Indicator,
543
543
  {
544
544
  keepMounted: !0,
545
- className: n(
545
+ className: s(
546
546
  "flex origin-center",
547
547
  "transition-[scale,opacity] duration-(--gryt-dur-spring) ease-spring",
548
548
  // Scaling from 0 rather than from something near 1 is deliberate.
@@ -552,65 +552,65 @@ const Ht = {
552
552
  "data-unchecked:scale-0 data-unchecked:opacity-0",
553
553
  "motion-reduce:transition-none"
554
554
  ),
555
- children: /* @__PURE__ */ o(gt, { size: 12, weight: "bold" })
555
+ children: /* @__PURE__ */ o(jt, { size: 12, weight: "bold" })
556
556
  }
557
557
  )
558
558
  }
559
559
  );
560
560
  }
561
- ), Co = s(function({ className: t, tone: e = "primary", ...r }, i) {
561
+ ), oa = l(function({ className: t, tone: e = "primary", ...r }, a) {
562
562
  return /* @__PURE__ */ o(
563
- rt.Root,
563
+ Ot.Root,
564
564
  {
565
- ref: i,
566
- className: n(
565
+ ref: a,
566
+ className: s(
567
567
  "gryt-radio flex h-5 w-5 shrink-0 items-center justify-center",
568
568
  "rounded-(--gryt-radius-full) border border-gryt-border bg-gryt-surface-raised",
569
569
  "transition-[scale,background-color,border-color] duration-(--gryt-dur-spring) ease-spring",
570
570
  "hover:not-data-disabled:border-gryt-accent-light",
571
571
  "motion-safe:hover:not-data-disabled:scale-[1.08]",
572
572
  "motion-safe:active:not-data-disabled:scale-[0.92]",
573
- f,
574
- j,
573
+ P,
574
+ q,
575
575
  // Border takes the tone when selected; the dot inside carries the fill.
576
- Wt[e],
576
+ ir[e],
577
577
  t
578
578
  ),
579
579
  ...r,
580
580
  children: /* @__PURE__ */ o(
581
- rt.Indicator,
581
+ Ot.Indicator,
582
582
  {
583
583
  keepMounted: !0,
584
- className: n(
584
+ className: s(
585
585
  "h-2.5 w-2.5 origin-center rounded-(--gryt-radius-full)",
586
586
  "transition-[scale,opacity] duration-(--gryt-dur-spring) ease-spring",
587
587
  // From 0, for the same reason as the Checkbox tick — see the note there.
588
588
  "data-unchecked:scale-0 data-unchecked:opacity-0",
589
589
  "motion-reduce:transition-none",
590
- ft[e]
590
+ ge[e]
591
591
  )
592
592
  }
593
593
  )
594
594
  }
595
595
  );
596
- }), So = s(
596
+ }), aa = l(
597
597
  function({ className: t, ...e }, r) {
598
598
  return /* @__PURE__ */ o(
599
- jt,
599
+ We,
600
600
  {
601
601
  ref: r,
602
- className: n("gryt-radio-group flex flex-col gap-2", t),
602
+ className: s("gryt-radio-group flex flex-col gap-2", t),
603
603
  ...e
604
604
  }
605
605
  );
606
606
  }
607
- ), $o = s(
608
- function({ className: t, tone: e = "primary", ...r }, i) {
607
+ ), sa = l(
608
+ function({ className: t, tone: e = "primary", ...r }, a) {
609
609
  return /* @__PURE__ */ o(
610
- ot.Root,
610
+ Yt.Root,
611
611
  {
612
- ref: i,
613
- className: n(
612
+ ref: a,
613
+ className: s(
614
614
  "gryt-switch relative inline-flex h-6 w-10 shrink-0 items-center",
615
615
  "rounded-(--gryt-radius-full) border border-gryt-border bg-gryt-surface-raised p-0.5",
616
616
  "transition-[scale,background-color,border-color] duration-(--gryt-dur-spring) ease-spring",
@@ -618,16 +618,16 @@ const Ht = {
618
618
  "hover:not-data-disabled:border-gryt-accent-light",
619
619
  "motion-safe:hover:not-data-disabled:scale-[1.05]",
620
620
  "motion-safe:active:not-data-disabled:scale-[0.95]",
621
- f,
622
- j,
623
- Qt[e],
621
+ P,
622
+ q,
623
+ lr[e],
624
624
  t
625
625
  ),
626
626
  ...r,
627
627
  children: /* @__PURE__ */ o(
628
- ot.Thumb,
628
+ Yt.Thumb,
629
629
  {
630
- className: n(
630
+ className: s(
631
631
  "h-4.5 w-4.5 rounded-(--gryt-radius-full) bg-gryt-text",
632
632
  "transition-transform duration-(--gryt-dur-spring) ease-spring motion-reduce:transition-none",
633
633
  "data-checked:translate-x-4 data-checked:bg-gryt-bg"
@@ -637,70 +637,70 @@ const Ht = {
637
637
  }
638
638
  );
639
639
  }
640
- ), it = 3;
641
- function Ro({
642
- className: a,
640
+ ), Wt = 3;
641
+ function pr({
642
+ className: n,
643
643
  tone: t = "primary",
644
644
  "aria-label": e,
645
645
  ...r
646
646
  }) {
647
- const [i, c] = Nt(!1), l = Q(null);
648
- Pt(() => {
649
- if (!i && l.current === null)
647
+ const [a, c] = _(!1), m = Mt(null);
648
+ $e(() => {
649
+ if (!a && m.current === null)
650
650
  return;
651
- const y = () => {
652
- l.current = null, c(!1);
651
+ const f = () => {
652
+ m.current = null, c(!1);
653
653
  };
654
- return window.addEventListener("pointerup", y), window.addEventListener("pointercancel", y), () => {
655
- window.removeEventListener("pointerup", y), window.removeEventListener("pointercancel", y);
654
+ return window.addEventListener("pointerup", f), window.addEventListener("pointercancel", f), () => {
655
+ window.removeEventListener("pointerup", f), window.removeEventListener("pointercancel", f);
656
656
  };
657
- }, [i]);
658
- function d(y) {
659
- l.current = { x: y.clientX, y: y.clientY };
657
+ }, [a]);
658
+ function g(f) {
659
+ m.current = { x: f.clientX, y: f.clientY };
660
660
  }
661
- function m(y) {
662
- const v = l.current;
663
- if (v === null || i)
661
+ function y(f) {
662
+ const h = m.current;
663
+ if (h === null || a)
664
664
  return;
665
- (Math.abs(y.clientX - v.x) > it || Math.abs(y.clientY - v.y) > it) && c(!0);
665
+ (Math.abs(f.clientX - h.x) > Wt || Math.abs(f.clientY - h.y) > Wt) && c(!0);
666
666
  }
667
- const x = i ? "transition-none" : "duration-(--gryt-dur-spring) ease-spring-tight motion-reduce:transition-none";
668
- return /* @__PURE__ */ o(z.Root, { className: n("gryt-slider w-full", a), ...r, children: /* @__PURE__ */ o(
669
- z.Control,
667
+ const p = a ? "transition-none" : "duration-(--gryt-dur-spring) ease-spring-tight motion-reduce:transition-none";
668
+ return /* @__PURE__ */ o(rt.Root, { className: s("gryt-slider w-full", n), ...r, children: /* @__PURE__ */ o(
669
+ rt.Control,
670
670
  {
671
671
  className: "flex w-full cursor-pointer touch-none items-center py-2 select-none",
672
- onPointerDown: d,
673
- onPointerMove: m,
674
- children: /* @__PURE__ */ g(z.Track, { className: "h-1.5 w-full rounded-(--gryt-radius-full) bg-gryt-surface-raised select-none", children: [
672
+ onPointerDown: g,
673
+ onPointerMove: y,
674
+ children: /* @__PURE__ */ d(rt.Track, { className: "h-1.5 w-full rounded-(--gryt-radius-full) bg-gryt-surface-raised select-none", children: [
675
675
  /* @__PURE__ */ o(
676
- z.Indicator,
676
+ rt.Indicator,
677
677
  {
678
- className: n(
678
+ className: s(
679
679
  "h-full rounded-(--gryt-radius-full) select-none",
680
680
  "transition-[width]",
681
- x,
682
- ft[t]
681
+ p,
682
+ ge[t]
683
683
  )
684
684
  }
685
685
  ),
686
686
  /* @__PURE__ */ o(
687
- z.Thumb,
687
+ rt.Thumb,
688
688
  {
689
689
  "aria-label": e,
690
- className: n(
690
+ className: s(
691
691
  "group h-4 w-4 rounded-(--gryt-radius-full) select-none",
692
692
  "transition-[inset-inline-start]",
693
- x,
693
+ p,
694
694
  // The ring goes on the thumb but the focus lands on the visually
695
695
  // hidden input inside it, so this has to match a descendant.
696
696
  // Without it the slider is the one control here you cannot see
697
697
  // yourself tab to.
698
- Ut
698
+ ar
699
699
  ),
700
700
  children: /* @__PURE__ */ o(
701
701
  "span",
702
702
  {
703
- className: n(
703
+ className: s(
704
704
  "block h-full w-full rounded-(--gryt-radius-full) bg-gryt-text",
705
705
  "transition-[scale] duration-(--gryt-dur-spring) ease-spring",
706
706
  "motion-safe:group-hover:scale-[1.12] motion-safe:group-active:scale-[0.94]",
@@ -714,67 +714,67 @@ function Ro({
714
714
  }
715
715
  ) });
716
716
  }
717
- const re = {
717
+ const yr = {
718
718
  small: "min-h-9 px-3 text-sm",
719
719
  medium: "min-h-11 px-4 text-sm"
720
720
  };
721
- function Io({
722
- className: a,
721
+ function fr({
722
+ className: n,
723
723
  label: t,
724
724
  options: e = [],
725
725
  placeholder: r = "Select",
726
- size: i = "medium",
726
+ size: a = "medium",
727
727
  ...c
728
728
  }) {
729
- const l = mt();
730
- return /* @__PURE__ */ g(h.Root, { items: e, ...c, children: [
731
- /* @__PURE__ */ g("div", { className: n("gryt-select flex w-full flex-col gap-1.5", a), children: [
732
- t ? /* @__PURE__ */ o(h.Label, { className: "text-xs font-medium text-gryt-muted", children: t }) : null,
733
- /* @__PURE__ */ g(
734
- h.Trigger,
729
+ const m = ce();
730
+ return /* @__PURE__ */ d(C.Root, { items: e, ...c, children: [
731
+ /* @__PURE__ */ d("div", { className: s("gryt-select flex w-full flex-col gap-1.5", n), children: [
732
+ t ? /* @__PURE__ */ o(C.Label, { className: "text-xs font-medium text-gryt-muted", children: t }) : null,
733
+ /* @__PURE__ */ d(
734
+ C.Trigger,
735
735
  {
736
- className: n(
736
+ className: s(
737
737
  "flex w-full cursor-pointer items-center justify-between gap-2",
738
738
  "rounded-(--gryt-radius-xl) border border-gryt-border bg-gryt-surface-raised",
739
739
  "text-gryt-text select-none",
740
740
  "transition-colors duration-150 hover:border-gryt-accent-light",
741
741
  "data-disabled:cursor-not-allowed data-disabled:opacity-60",
742
- f,
743
- re[i]
742
+ P,
743
+ yr[a]
744
744
  ),
745
745
  children: [
746
- /* @__PURE__ */ o(h.Value, { placeholder: r }),
747
- /* @__PURE__ */ o(h.Icon, { className: "shrink-0 text-gryt-muted", children: /* @__PURE__ */ o(Rt, { size: 16 }) })
746
+ /* @__PURE__ */ o(C.Value, { placeholder: r }),
747
+ /* @__PURE__ */ o(C.Icon, { className: "shrink-0 text-gryt-muted", children: /* @__PURE__ */ o(Fe, { size: 16 }) })
748
748
  ]
749
749
  }
750
750
  )
751
751
  ] }),
752
- /* @__PURE__ */ o(h.Portal, { container: l, children: /* @__PURE__ */ o(
753
- h.Positioner,
752
+ /* @__PURE__ */ o(C.Portal, { container: m, children: /* @__PURE__ */ o(
753
+ C.Positioner,
754
754
  {
755
755
  sideOffset: 6,
756
756
  className: "gryt-select-positioner outline-none",
757
757
  children: /* @__PURE__ */ o(
758
- h.Popup,
758
+ C.Popup,
759
759
  {
760
- className: n("min-w-(--anchor-width) p-1", D, $),
761
- children: /* @__PURE__ */ o(h.List, { children: e.map((d) => /* @__PURE__ */ g(
762
- h.Item,
760
+ className: s("min-w-(--anchor-width) p-1", Y, H),
761
+ children: /* @__PURE__ */ o(C.List, { children: e.map((g) => /* @__PURE__ */ d(
762
+ C.Item,
763
763
  {
764
- value: d.value,
765
- disabled: d.disabled,
766
- className: n(
764
+ value: g.value,
765
+ disabled: g.disabled,
766
+ className: s(
767
767
  "flex cursor-pointer items-center justify-between gap-2",
768
768
  "rounded-(--gryt-radius-md) px-3 py-2 text-sm text-gryt-text",
769
769
  "outline-none select-none data-highlighted:bg-gryt-surface-raised",
770
770
  "data-disabled:cursor-not-allowed data-disabled:opacity-50"
771
771
  ),
772
772
  children: [
773
- /* @__PURE__ */ o(h.ItemText, { children: d.label }),
774
- /* @__PURE__ */ o(h.ItemIndicator, { className: "text-gryt-accent-11", children: /* @__PURE__ */ o(gt, { size: 14, weight: "bold" }) })
773
+ /* @__PURE__ */ o(C.ItemText, { children: g.label }),
774
+ /* @__PURE__ */ o(C.ItemIndicator, { className: "text-gryt-accent-11", children: /* @__PURE__ */ o(jt, { size: 14, weight: "bold" }) })
775
775
  ]
776
776
  },
777
- String(d.value)
777
+ String(g.value)
778
778
  )) })
779
779
  }
780
780
  )
@@ -782,46 +782,46 @@ function Io({
782
782
  ) })
783
783
  ] });
784
784
  }
785
- function Ao({
786
- children: a,
785
+ function ia({
786
+ children: n,
787
787
  className: t,
788
788
  side: e = "top",
789
789
  sideOffset: r = 8,
790
- title: i
790
+ title: a
791
791
  }) {
792
- const c = mt();
793
- return /* @__PURE__ */ g(I.Root, { children: [
794
- /* @__PURE__ */ o(I.Trigger, { render: a }),
795
- /* @__PURE__ */ o(I.Portal, { container: c, children: /* @__PURE__ */ o(
796
- I.Positioner,
792
+ const c = ce();
793
+ return /* @__PURE__ */ d(F.Root, { children: [
794
+ /* @__PURE__ */ o(F.Trigger, { render: n }),
795
+ /* @__PURE__ */ o(F.Portal, { container: c, children: /* @__PURE__ */ o(
796
+ F.Positioner,
797
797
  {
798
798
  side: e,
799
799
  sideOffset: r,
800
800
  className: "gryt-tooltip-positioner",
801
801
  children: /* @__PURE__ */ o(
802
- I.Popup,
802
+ F.Popup,
803
803
  {
804
- className: n(
804
+ className: s(
805
805
  "gryt-tooltip rounded-(--gryt-radius-md) border border-gryt-border bg-gryt-surface-raised",
806
806
  "px-2.5 py-1.5 text-xs text-gryt-text",
807
- $,
807
+ H,
808
808
  t
809
809
  ),
810
- children: i
810
+ children: a
811
811
  }
812
812
  )
813
813
  }
814
814
  ) })
815
815
  ] });
816
816
  }
817
- const Do = I.Provider, Mo = s(
818
- function({ className: t, orientation: e = "horizontal", ...r }, i) {
817
+ const la = F.Provider, ca = l(
818
+ function({ className: t, orientation: e = "horizontal", ...r }, a) {
819
819
  return /* @__PURE__ */ o(
820
- zt,
820
+ Je,
821
821
  {
822
- ref: i,
822
+ ref: a,
823
823
  orientation: e,
824
- className: n(
824
+ className: s(
825
825
  "gryt-divider bg-gryt-border",
826
826
  e === "vertical" ? "h-full w-px" : "h-px w-full",
827
827
  t
@@ -830,12 +830,12 @@ const Do = I.Provider, Mo = s(
830
830
  }
831
831
  );
832
832
  }
833
- ), Go = s(function({ className: t, ...e }, r) {
833
+ ), da = l(function({ className: t, ...e }, r) {
834
834
  return /* @__PURE__ */ o(
835
835
  "div",
836
836
  {
837
837
  ref: r,
838
- className: n(
838
+ className: s(
839
839
  "gryt-card rounded-(--gryt-radius-xl) border border-gryt-border bg-gryt-surface text-gryt-text",
840
840
  t
841
841
  ),
@@ -843,87 +843,87 @@ const Do = I.Provider, Mo = s(
843
843
  }
844
844
  );
845
845
  });
846
- function Lo({
847
- children: a,
846
+ function ua({
847
+ children: n,
848
848
  className: t,
849
849
  subheader: e,
850
850
  title: r,
851
- ...i
851
+ ...a
852
852
  }) {
853
- return /* @__PURE__ */ g(
853
+ return /* @__PURE__ */ d(
854
854
  "div",
855
855
  {
856
- className: n("gryt-card-header flex flex-col gap-1 p-4", t),
857
- ...i,
856
+ className: s("gryt-card-header flex flex-col gap-1 p-4", t),
857
+ ...a,
858
858
  children: [
859
859
  r ? /* @__PURE__ */ o("span", { className: "text-base font-semibold text-gryt-text", children: r }) : null,
860
860
  e ? /* @__PURE__ */ o("span", { className: "text-sm text-gryt-muted", children: e }) : null,
861
- a
861
+ n
862
862
  ]
863
863
  }
864
864
  );
865
865
  }
866
- function jo({
867
- className: a,
866
+ function ga({
867
+ className: n,
868
868
  ...t
869
869
  }) {
870
870
  return /* @__PURE__ */ o(
871
871
  "div",
872
872
  {
873
- className: n(
873
+ className: s(
874
874
  "gryt-card-content px-4 pb-4 text-sm text-gryt-muted",
875
- a
875
+ n
876
876
  ),
877
877
  ...t
878
878
  }
879
879
  );
880
880
  }
881
- function zo({
882
- className: a,
881
+ function ma({
882
+ className: n,
883
883
  ...t
884
884
  }) {
885
885
  return /* @__PURE__ */ o(
886
886
  "div",
887
887
  {
888
- className: n(
888
+ className: s(
889
889
  "gryt-card-actions flex items-center gap-2 px-4 pb-4",
890
- a
890
+ n
891
891
  ),
892
892
  ...t
893
893
  }
894
894
  );
895
895
  }
896
- const oe = {
896
+ const hr = {
897
897
  info: "border-gryt-secondary-6 bg-gryt-secondary-3 text-gryt-secondary-11",
898
898
  success: "border-gryt-success-6 bg-gryt-success-3 text-gryt-success-11",
899
899
  warning: "border-gryt-warning-6 bg-gryt-warning-3 text-gryt-warning-11",
900
900
  error: "border-gryt-danger-6 bg-gryt-danger-3 text-gryt-danger-11"
901
- }, Bo = s(function({ className: t, severity: e = "info", ...r }, i) {
901
+ }, pa = l(function({ className: t, severity: e = "info", ...r }, a) {
902
902
  return /* @__PURE__ */ o(
903
903
  "div",
904
904
  {
905
- ref: i,
905
+ ref: a,
906
906
  role: "alert",
907
- className: n(
907
+ className: s(
908
908
  "gryt-alert rounded-(--gryt-radius-lg) border px-4 py-3 text-sm",
909
- oe[e],
909
+ hr[e],
910
910
  t
911
911
  ),
912
912
  ...r
913
913
  }
914
914
  );
915
915
  });
916
- function Fo({ className: a, value: t = null, ...e }) {
916
+ function ya({ className: n, value: t = null, ...e }) {
917
917
  return /* @__PURE__ */ o(
918
- U.Root,
918
+ St.Root,
919
919
  {
920
920
  value: t,
921
- className: n("gryt-progress w-full", a),
921
+ className: s("gryt-progress w-full", n),
922
922
  ...e,
923
- children: /* @__PURE__ */ o(U.Track, { className: "h-1.5 w-full overflow-hidden rounded-(--gryt-radius-full) bg-gryt-surface-raised", children: /* @__PURE__ */ o(
924
- U.Indicator,
923
+ children: /* @__PURE__ */ o(St.Track, { className: "h-1.5 w-full overflow-hidden rounded-(--gryt-radius-full) bg-gryt-surface-raised", children: /* @__PURE__ */ o(
924
+ St.Indicator,
925
925
  {
926
- className: n(
926
+ className: s(
927
927
  "h-full rounded-(--gryt-radius-full) bg-gryt-accent",
928
928
  "transition-[width] duration-300 ease-out motion-reduce:transition-none",
929
929
  // Base UI marks the indicator indeterminate and leaves its width
@@ -938,41 +938,41 @@ function Fo({ className: a, value: t = null, ...e }) {
938
938
  }
939
939
  );
940
940
  }
941
- function Eo({
942
- className: a,
941
+ function fa({
942
+ className: n,
943
943
  size: t = 24,
944
944
  "aria-label": e = "Loading"
945
945
  }) {
946
946
  return /* @__PURE__ */ o(
947
- It,
947
+ _e,
948
948
  {
949
949
  role: "status",
950
950
  "aria-label": e,
951
951
  size: t,
952
952
  weight: "bold",
953
- className: n(
953
+ className: s(
954
954
  "gryt-spinner text-gryt-accent-11 motion-safe:animate-spin",
955
- a
955
+ n
956
956
  )
957
957
  }
958
958
  );
959
959
  }
960
- const ae = {
960
+ const br = {
961
961
  text: "h-4 rounded-(--gryt-radius-sm)",
962
962
  rounded: "rounded-(--gryt-radius-lg)",
963
963
  circular: "rounded-(--gryt-radius-full)",
964
964
  rectangular: "rounded-none"
965
965
  };
966
- function Vo({
967
- className: a,
966
+ function ha({
967
+ className: n,
968
968
  height: t,
969
969
  style: e,
970
970
  variant: r = "text",
971
- width: i,
971
+ width: a,
972
972
  ...c
973
973
  }) {
974
- const l = {
975
- width: i,
974
+ const m = {
975
+ width: a,
976
976
  height: t,
977
977
  ...e
978
978
  };
@@ -980,7 +980,7 @@ function Vo({
980
980
  "div",
981
981
  {
982
982
  "aria-hidden": "true",
983
- className: n(
983
+ className: s(
984
984
  // Not bg-gryt-surface-raised. #1e2028 against #1a1d24 is four points of
985
985
  // luminance, which is invisible on a laptop screen at an angle — the
986
986
  // placeholder that is meant to say "something is coming" said nothing.
@@ -988,24 +988,24 @@ function Vo({
988
988
  // the surfaces it can land on rather than only the one it was picked
989
989
  // against, and it dims rather than brightens as it pulses.
990
990
  "gryt-skeleton bg-white/9 motion-safe:animate-pulse",
991
- ae[r],
992
- a
991
+ br[r],
992
+ n
993
993
  ),
994
- style: l,
994
+ style: m,
995
995
  ...c
996
996
  }
997
997
  );
998
998
  }
999
- const xt = "transition-[opacity,scale,translate] duration-(--gryt-dur-spring) ease-spring motion-reduce:transition-none", ne = s(
999
+ const pe = "transition-[opacity,scale,translate] duration-(--gryt-dur-spring) ease-spring motion-reduce:transition-none", xr = l(
1000
1000
  function({ className: t, ...e }, r) {
1001
1001
  return /* @__PURE__ */ o(
1002
- C.Backdrop,
1002
+ j.Backdrop,
1003
1003
  {
1004
1004
  ref: r,
1005
- className: n(
1005
+ className: s(
1006
1006
  "gryt-dialog-backdrop fixed inset-0 min-h-dvh bg-black/60",
1007
1007
  "backdrop-blur-(--gryt-backdrop-blur)",
1008
- xt,
1008
+ pe,
1009
1009
  "data-starting-style:opacity-0 data-ending-style:opacity-0",
1010
1010
  t
1011
1011
  ),
@@ -1013,17 +1013,17 @@ const xt = "transition-[opacity,scale,translate] duration-(--gryt-dur-spring) ea
1013
1013
  }
1014
1014
  );
1015
1015
  }
1016
- ), ie = s(
1016
+ ), vr = l(
1017
1017
  function({ className: t, ...e }, r) {
1018
1018
  return /* @__PURE__ */ o(
1019
- C.Popup,
1019
+ j.Popup,
1020
1020
  {
1021
1021
  ref: r,
1022
- className: n(
1022
+ className: s(
1023
1023
  "gryt-dialog fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2",
1024
1024
  "flex w-[32rem] max-w-[calc(100vw-3rem)] flex-col gap-4",
1025
1025
  "rounded-(--gryt-radius-lg) border border-gryt-border bg-gryt-surface p-5 text-gryt-text",
1026
- xt,
1026
+ pe,
1027
1027
  "data-starting-style:scale-[0.98] data-starting-style:opacity-0",
1028
1028
  "data-ending-style:scale-[0.98] data-ending-style:opacity-0",
1029
1029
  t
@@ -1032,13 +1032,13 @@ const xt = "transition-[opacity,scale,translate] duration-(--gryt-dur-spring) ea
1032
1032
  }
1033
1033
  );
1034
1034
  }
1035
- ), se = s(
1035
+ ), wr = l(
1036
1036
  function({ className: t, ...e }, r) {
1037
1037
  return /* @__PURE__ */ o(
1038
- C.Title,
1038
+ j.Title,
1039
1039
  {
1040
1040
  ref: r,
1041
- className: n(
1041
+ className: s(
1042
1042
  "gryt-dialog-title text-base font-semibold text-gryt-text",
1043
1043
  t
1044
1044
  ),
@@ -1046,13 +1046,13 @@ const xt = "transition-[opacity,scale,translate] duration-(--gryt-dur-spring) ea
1046
1046
  }
1047
1047
  );
1048
1048
  }
1049
- ), ce = s(
1049
+ ), Nr = l(
1050
1050
  function({ className: t, ...e }, r) {
1051
1051
  return /* @__PURE__ */ o(
1052
- C.Description,
1052
+ j.Description,
1053
1053
  {
1054
1054
  ref: r,
1055
- className: n(
1055
+ className: s(
1056
1056
  "gryt-dialog-description text-sm text-gryt-muted",
1057
1057
  t
1058
1058
  ),
@@ -1060,13 +1060,13 @@ const xt = "transition-[opacity,scale,translate] duration-(--gryt-dur-spring) ea
1060
1060
  }
1061
1061
  );
1062
1062
  }
1063
- ), le = s(
1063
+ ), Tr = l(
1064
1064
  function({ className: t, ...e }, r) {
1065
1065
  return /* @__PURE__ */ o(
1066
1066
  "div",
1067
1067
  {
1068
1068
  ref: r,
1069
- className: n(
1069
+ className: s(
1070
1070
  "gryt-dialog-footer flex justify-end gap-3",
1071
1071
  t
1072
1072
  ),
@@ -1074,45 +1074,45 @@ const xt = "transition-[opacity,scale,translate] duration-(--gryt-dur-spring) ea
1074
1074
  }
1075
1075
  );
1076
1076
  }
1077
- ), _o = {
1078
- Root: C.Root,
1079
- Trigger: C.Trigger,
1080
- Portal: C.Portal,
1081
- Close: C.Close,
1082
- Backdrop: ne,
1083
- Popup: ie,
1084
- Title: se,
1085
- Description: ce,
1086
- Footer: le
1087
- }, de = () => () => {
1077
+ ), ba = {
1078
+ Root: j.Root,
1079
+ Trigger: j.Trigger,
1080
+ Portal: j.Portal,
1081
+ Close: j.Close,
1082
+ Backdrop: xr,
1083
+ Popup: vr,
1084
+ Title: wr,
1085
+ Description: Nr,
1086
+ Footer: Tr
1087
+ }, Pr = () => () => {
1088
1088
  };
1089
- function ge(a) {
1090
- const t = W(
1089
+ function Sr(n) {
1090
+ const t = It(
1091
1091
  (r) => {
1092
- if (typeof window > "u" || !window.matchMedia) return de();
1093
- const i = window.matchMedia(a);
1094
- return i.addEventListener("change", r), () => i.removeEventListener("change", r);
1092
+ if (typeof window > "u" || !window.matchMedia) return Pr();
1093
+ const a = window.matchMedia(n);
1094
+ return a.addEventListener("change", r), () => a.removeEventListener("change", r);
1095
1095
  },
1096
- [a]
1097
- ), e = W(() => typeof window > "u" || !window.matchMedia ? !1 : window.matchMedia(a).matches, [a]);
1098
- return Tt(t, e, () => !1);
1096
+ [n]
1097
+ ), e = It(() => typeof window > "u" || !window.matchMedia ? !1 : window.matchMedia(n).matches, [n]);
1098
+ return Ce(t, e, () => !1);
1099
1099
  }
1100
- const ue = {
1100
+ const $r = {
1101
1101
  left: "left",
1102
1102
  right: "right",
1103
1103
  top: "up",
1104
1104
  bottom: "down"
1105
- }, H = ct("right"), ye = {
1105
+ }, bt = ne("right"), Cr = {
1106
1106
  left: "items-stretch justify-start",
1107
1107
  right: "items-stretch justify-end",
1108
1108
  top: "items-start justify-center",
1109
1109
  bottom: "items-end justify-center"
1110
- }, me = {
1110
+ }, kr = {
1111
1111
  left: "rounded-r-(--gryt-radius-xl)",
1112
1112
  right: "rounded-l-(--gryt-radius-xl)",
1113
1113
  top: "rounded-b-(--gryt-radius-xl)",
1114
1114
  bottom: "rounded-t-(--gryt-radius-xl)"
1115
- }, pe = {
1115
+ }, Rr = {
1116
1116
  left: [
1117
1117
  "h-full w-[calc(20rem+var(--gryt-drawer-bleed))] max-w-[calc(85vw+var(--gryt-drawer-bleed))]",
1118
1118
  "-ml-(--gryt-drawer-bleed) border-r py-5 pr-5 pl-[calc(1.25rem+var(--gryt-drawer-bleed))]",
@@ -1142,41 +1142,41 @@ const ue = {
1142
1142
  "data-ending-style:[transform:translateY(calc(100%-var(--gryt-drawer-bleed)))]"
1143
1143
  ].join(" ")
1144
1144
  };
1145
- function be({
1146
- side: a = "right",
1145
+ function Ar({
1146
+ side: n = "right",
1147
1147
  sheetOnMobile: t = !0,
1148
1148
  children: e,
1149
1149
  ...r
1150
1150
  }) {
1151
- const i = ge("(max-width: 767px)"), c = t && i ? "bottom" : a;
1152
- return /* @__PURE__ */ o(H.Provider, { value: c, children: /* @__PURE__ */ o(N.Root, { swipeDirection: ue[c], ...r, children: e }) });
1151
+ const a = Sr("(max-width: 767px)"), c = t && a ? "bottom" : n;
1152
+ return /* @__PURE__ */ o(bt.Provider, { value: c, children: /* @__PURE__ */ o(I.Root, { swipeDirection: $r[c], ...r, children: e }) });
1153
1153
  }
1154
- const fe = s(
1154
+ const Ir = l(
1155
1155
  function({ className: t, ...e }, r) {
1156
- const i = Y(H);
1156
+ const a = ht(bt);
1157
1157
  return /* @__PURE__ */ o(
1158
- N.Viewport,
1158
+ I.Viewport,
1159
1159
  {
1160
1160
  ref: r,
1161
- className: n(
1161
+ className: s(
1162
1162
  // z-50 matters: the popup is no longer positioned itself, so the
1163
1163
  // viewport is what has to sit above the page. Without it a sticky
1164
1164
  // site header renders over the panel.
1165
1165
  "gryt-drawer-viewport fixed inset-0 z-50 flex",
1166
- ye[i],
1166
+ Cr[a],
1167
1167
  t
1168
1168
  ),
1169
1169
  ...e
1170
1170
  }
1171
1171
  );
1172
1172
  }
1173
- ), xe = s(function({ className: t, ...e }, r) {
1174
- const i = Y(H);
1173
+ ), Dr = l(function({ className: t, ...e }, r) {
1174
+ const a = ht(bt);
1175
1175
  return /* @__PURE__ */ o(
1176
- N.Popup,
1176
+ I.Popup,
1177
1177
  {
1178
1178
  ref: r,
1179
- className: n(
1179
+ className: s(
1180
1180
  "gryt-drawer flex flex-col gap-4 border-gryt-border bg-gryt-surface text-gryt-text",
1181
1181
  "overflow-y-auto overscroll-contain outline-none",
1182
1182
  "transition-transform duration-(--gryt-dur-spring-soft) ease-spring-tight",
@@ -1184,19 +1184,19 @@ const fe = s(
1184
1184
  // duration here turns a drag into a drag plus lag.
1185
1185
  "data-swiping:duration-0 data-swiping:select-none",
1186
1186
  "motion-reduce:transition-none",
1187
- pe[i],
1188
- me[i],
1187
+ Rr[a],
1188
+ kr[a],
1189
1189
  t
1190
1190
  ),
1191
1191
  ...e
1192
1192
  }
1193
1193
  );
1194
- }), he = s(function({ className: t, ...e }, r) {
1194
+ }), Lr = l(function({ className: t, ...e }, r) {
1195
1195
  return /* @__PURE__ */ o(
1196
- N.Backdrop,
1196
+ I.Backdrop,
1197
1197
  {
1198
1198
  ref: r,
1199
- className: n(
1199
+ className: s(
1200
1200
  "gryt-drawer-backdrop fixed inset-0 z-50 min-h-dvh bg-black/60",
1201
1201
  "backdrop-blur-(--gryt-backdrop-blur)",
1202
1202
  // Lightens as the panel is dragged away, so letting go halfway does not
@@ -1212,64 +1212,64 @@ const fe = s(
1212
1212
  }
1213
1213
  );
1214
1214
  });
1215
- function we({ className: a }) {
1216
- const t = Y(H);
1215
+ function Mr({ className: n }) {
1216
+ const t = ht(bt);
1217
1217
  return t !== "bottom" && t !== "top" ? null : /* @__PURE__ */ o(
1218
1218
  "div",
1219
1219
  {
1220
1220
  "aria-hidden": !0,
1221
- className: n(
1221
+ className: s(
1222
1222
  "gryt-drawer-grabber mx-auto h-1.5 w-10 shrink-0 rounded-(--gryt-radius-full) bg-gryt-border",
1223
1223
  t === "top" && "order-last",
1224
- a
1224
+ n
1225
1225
  )
1226
1226
  }
1227
1227
  );
1228
1228
  }
1229
- const Yo = {
1230
- Root: be,
1231
- Trigger: N.Trigger,
1232
- Portal: N.Portal,
1233
- Backdrop: he,
1234
- Viewport: fe,
1235
- Popup: xe,
1236
- Content: N.Content,
1237
- Grabber: we,
1238
- Close: N.Close,
1239
- Title: N.Title,
1240
- Description: N.Description
1241
- }, ve = s(
1242
- function({ className: t, sideOffset: e = 8, ...r }, i) {
1229
+ const xa = {
1230
+ Root: Ar,
1231
+ Trigger: I.Trigger,
1232
+ Portal: I.Portal,
1233
+ Backdrop: Lr,
1234
+ Viewport: Ir,
1235
+ Popup: Dr,
1236
+ Content: I.Content,
1237
+ Grabber: Mr,
1238
+ Close: I.Close,
1239
+ Title: I.Title,
1240
+ Description: I.Description
1241
+ }, Gr = l(
1242
+ function({ className: t, sideOffset: e = 8, ...r }, a) {
1243
1243
  return /* @__PURE__ */ o(
1244
- A.Positioner,
1244
+ V.Positioner,
1245
1245
  {
1246
- ref: i,
1246
+ ref: a,
1247
1247
  sideOffset: e,
1248
- className: n("gryt-menu-positioner outline-none", t),
1248
+ className: s("gryt-menu-positioner outline-none", t),
1249
1249
  ...r
1250
1250
  }
1251
1251
  );
1252
1252
  }
1253
- ), Ne = s(function({ className: t, ...e }, r) {
1253
+ ), jr = l(function({ className: t, ...e }, r) {
1254
1254
  return /* @__PURE__ */ o(
1255
- A.Popup,
1255
+ V.Popup,
1256
1256
  {
1257
1257
  ref: r,
1258
- className: n(
1258
+ className: s(
1259
1259
  "gryt-menu min-w-44 p-1 outline-none",
1260
- D,
1261
- $,
1260
+ Y,
1261
+ H,
1262
1262
  t
1263
1263
  ),
1264
1264
  ...e
1265
1265
  }
1266
1266
  );
1267
- }), Pe = s(function({ className: t, ...e }, r) {
1267
+ }), Er = l(function({ className: t, ...e }, r) {
1268
1268
  return /* @__PURE__ */ o(
1269
- A.Item,
1269
+ V.Item,
1270
1270
  {
1271
1271
  ref: r,
1272
- className: n(
1272
+ className: s(
1273
1273
  "gryt-menu-item flex cursor-pointer items-center gap-2 rounded-(--gryt-radius-md)",
1274
1274
  "px-3 py-2 text-sm text-gryt-text outline-none select-none",
1275
1275
  // Base UI drives keyboard and pointer highlight through the same
@@ -1281,29 +1281,29 @@ const Yo = {
1281
1281
  ...e
1282
1282
  }
1283
1283
  );
1284
- }), Te = s(function({ className: t, ...e }, r) {
1284
+ }), Hr = l(function({ className: t, ...e }, r) {
1285
1285
  return /* @__PURE__ */ o(
1286
- A.Separator,
1286
+ V.Separator,
1287
1287
  {
1288
1288
  ref: r,
1289
- className: n("gryt-menu-separator my-1 h-px bg-gryt-border", t),
1289
+ className: s("gryt-menu-separator my-1 h-px bg-gryt-border", t),
1290
1290
  ...e
1291
1291
  }
1292
1292
  );
1293
- }), K = {
1294
- Root: A.Root,
1295
- Trigger: A.Trigger,
1296
- Portal: A.Portal,
1297
- Positioner: ve,
1298
- Popup: Ne,
1299
- Item: Pe,
1300
- Separator: Te
1301
- }, ke = s(function({ className: t, ...e }, r) {
1293
+ }), $t = {
1294
+ Root: V.Root,
1295
+ Trigger: V.Trigger,
1296
+ Portal: V.Portal,
1297
+ Positioner: Gr,
1298
+ Popup: jr,
1299
+ Item: Er,
1300
+ Separator: Hr
1301
+ }, zr = l(function({ className: t, ...e }, r) {
1302
1302
  return /* @__PURE__ */ o(
1303
- E.Root,
1303
+ dt.Root,
1304
1304
  {
1305
1305
  ref: r,
1306
- className: n(
1306
+ className: s(
1307
1307
  "gryt-tabs",
1308
1308
  // Vertical puts the rail and the panel side by side. min-w-0 on the
1309
1309
  // panel does the rest; without the flex here the panel lands under the
@@ -1314,12 +1314,12 @@ const Yo = {
1314
1314
  ...e
1315
1315
  }
1316
1316
  );
1317
- }), Ce = s(function({ className: t, ...e }, r) {
1317
+ }), Br = l(function({ className: t, ...e }, r) {
1318
1318
  return /* @__PURE__ */ o(
1319
- E.List,
1319
+ dt.List,
1320
1320
  {
1321
1321
  ref: r,
1322
- className: n(
1322
+ className: s(
1323
1323
  "gryt-tabs-list relative inline-flex items-center gap-1 rounded-(--gryt-radius-full) bg-gryt-surface-raised p-1",
1324
1324
  // A rail, not a pill: rows are full width and the corner radius drops
1325
1325
  // to lg, because a 999px radius on a tall box bows its short edges.
@@ -1331,12 +1331,12 @@ const Yo = {
1331
1331
  ...e
1332
1332
  }
1333
1333
  );
1334
- }), Se = s(function({ className: t, ...e }, r) {
1334
+ }), Fr = l(function({ className: t, ...e }, r) {
1335
1335
  return /* @__PURE__ */ o(
1336
- E.Tab,
1336
+ dt.Tab,
1337
1337
  {
1338
1338
  ref: r,
1339
- className: n(
1339
+ className: s(
1340
1340
  "gryt-tab inline-flex min-h-8 cursor-pointer items-center justify-center whitespace-nowrap",
1341
1341
  "rounded-(--gryt-radius-full) border-0 bg-transparent px-4 py-1.5",
1342
1342
  "text-sm font-medium text-gryt-muted select-none",
@@ -1362,20 +1362,20 @@ const Yo = {
1362
1362
  "data-[orientation=vertical]:gap-2.5 data-[orientation=vertical]:px-3",
1363
1363
  "data-[orientation=vertical]:rounded-(--gryt-radius-md)",
1364
1364
  "data-disabled:cursor-not-allowed data-disabled:opacity-50",
1365
- f,
1365
+ P,
1366
1366
  t
1367
1367
  ),
1368
1368
  ...e
1369
1369
  }
1370
1370
  );
1371
- }), $e = s(
1371
+ }), _r = l(
1372
1372
  function({ className: t, ...e }, r) {
1373
1373
  return /* @__PURE__ */ o(
1374
- E.Indicator,
1374
+ dt.Indicator,
1375
1375
  {
1376
1376
  ref: r,
1377
1377
  renderBeforeHydration: !0,
1378
- className: n(
1378
+ className: s(
1379
1379
  "gryt-tabs-indicator absolute top-1 left-0 z-0 h-[calc(100%-0.5rem)]",
1380
1380
  "w-(--active-tab-width) translate-x-(--active-tab-left)",
1381
1381
  "rounded-(--gryt-radius-full) bg-gryt-accent",
@@ -1395,12 +1395,12 @@ const Yo = {
1395
1395
  }
1396
1396
  );
1397
1397
  }
1398
- ), Re = s(function({ className: t, ...e }, r) {
1398
+ ), Vr = l(function({ className: t, ...e }, r) {
1399
1399
  return /* @__PURE__ */ o(
1400
- E.Panel,
1400
+ dt.Panel,
1401
1401
  {
1402
1402
  ref: r,
1403
- className: n(
1403
+ className: s(
1404
1404
  "gryt-tabs-panel pt-3 text-sm text-gryt-text",
1405
1405
  // Beside the rail rather than under it, and allowed to shrink so long
1406
1406
  // content wraps instead of pushing the rail off screen.
@@ -1411,49 +1411,49 @@ const Yo = {
1411
1411
  ...e
1412
1412
  }
1413
1413
  );
1414
- }), Ho = Object.assign(ke, { List: Ce, Tab: Se, Panel: Re, Indicator: $e }), Ie = s(function({ className: t, ...e }, r) {
1414
+ }), va = Object.assign(zr, { List: Br, Tab: Fr, Panel: Vr, Indicator: _r }), Or = l(function({ className: t, ...e }, r) {
1415
1415
  return /* @__PURE__ */ o(
1416
- F.Root,
1416
+ ct.Root,
1417
1417
  {
1418
1418
  ref: r,
1419
- className: n(
1419
+ className: s(
1420
1420
  "gryt-accordion flex w-full flex-col gap-2 rounded-(--gryt-radius-xl) border border-gryt-border bg-gryt-surface p-2",
1421
1421
  t
1422
1422
  ),
1423
1423
  ...e
1424
1424
  }
1425
1425
  );
1426
- }), Ae = s(
1426
+ }), Yr = l(
1427
1427
  function({ className: t, ...e }, r) {
1428
1428
  return /* @__PURE__ */ o(
1429
- F.Item,
1429
+ ct.Item,
1430
1430
  {
1431
1431
  ref: r,
1432
- className: n("gryt-accordion-item", t),
1432
+ className: s("gryt-accordion-item", t),
1433
1433
  ...e
1434
1434
  }
1435
1435
  );
1436
1436
  }
1437
- ), De = s(
1438
- function({ children: t, className: e, expandIcon: r, ...i }, c) {
1439
- return /* @__PURE__ */ o(F.Header, { className: "gryt-accordion-header m-0", children: /* @__PURE__ */ g(
1440
- F.Trigger,
1437
+ ), Ur = l(
1438
+ function({ children: t, className: e, expandIcon: r, ...a }, c) {
1439
+ return /* @__PURE__ */ o(ct.Header, { className: "gryt-accordion-header m-0", children: /* @__PURE__ */ d(
1440
+ ct.Trigger,
1441
1441
  {
1442
1442
  ref: c,
1443
- className: n(
1443
+ className: s(
1444
1444
  "gryt-accordion-trigger flex w-full cursor-pointer items-center justify-between gap-3",
1445
1445
  "rounded-(--gryt-radius-lg) border-0 bg-transparent px-3 py-2.5",
1446
1446
  "text-left text-sm font-medium text-gryt-text select-none",
1447
1447
  "transition-colors duration-150 hover:bg-gryt-surface-raised",
1448
1448
  "data-disabled:cursor-not-allowed data-disabled:opacity-50",
1449
- f,
1449
+ P,
1450
1450
  e
1451
1451
  ),
1452
- ...i,
1452
+ ...a,
1453
1453
  children: [
1454
1454
  t,
1455
1455
  r === void 0 ? /* @__PURE__ */ o(
1456
- At,
1456
+ Ve,
1457
1457
  {
1458
1458
  size: 16,
1459
1459
  className: "shrink-0 transition-transform duration-(--gryt-dur-spring) ease-spring data-panel-open:rotate-180 motion-reduce:transition-none"
@@ -1463,13 +1463,13 @@ const Yo = {
1463
1463
  }
1464
1464
  ) });
1465
1465
  }
1466
- ), Me = s(
1467
- function({ children: t, className: e, ...r }, i) {
1466
+ ), Xr = l(
1467
+ function({ children: t, className: e, ...r }, a) {
1468
1468
  return /* @__PURE__ */ o(
1469
- F.Panel,
1469
+ ct.Panel,
1470
1470
  {
1471
- ref: i,
1472
- className: n(
1471
+ ref: a,
1472
+ className: s(
1473
1473
  "gryt-accordion-panel overflow-hidden text-sm text-gryt-muted",
1474
1474
  // Base UI measures the panel and exposes the height as a variable,
1475
1475
  // which is what makes a real open and close transition possible.
@@ -1483,105 +1483,105 @@ const Yo = {
1483
1483
  }
1484
1484
  );
1485
1485
  }
1486
- ), Oo = Object.assign(Ie, { Item: Ae, Trigger: De, Panel: Me }), Ge = s(
1487
- function({ className: t, sideOffset: e = 2, ...r }, i) {
1486
+ ), wa = Object.assign(Or, { Item: Yr, Trigger: Ur, Panel: Xr }), Kr = l(
1487
+ function({ className: t, sideOffset: e = 2, ...r }, a) {
1488
1488
  return /* @__PURE__ */ o(
1489
- k.Positioner,
1489
+ G.Positioner,
1490
1490
  {
1491
- ref: i,
1491
+ ref: a,
1492
1492
  sideOffset: e,
1493
- className: n("gryt-context-menu-positioner outline-none", t),
1493
+ className: s("gryt-context-menu-positioner outline-none", t),
1494
1494
  ...r
1495
1495
  }
1496
1496
  );
1497
1497
  }
1498
- ), Xo = {
1499
- Root: k.Root,
1500
- Trigger: k.Trigger,
1501
- Portal: k.Portal,
1502
- Positioner: Ge,
1503
- Popup: K.Popup,
1504
- Item: K.Item,
1505
- Separator: K.Separator,
1506
- Group: k.Group,
1507
- GroupLabel: k.GroupLabel,
1508
- SubmenuRoot: k.SubmenuRoot,
1509
- SubmenuTrigger: k.SubmenuTrigger
1510
- }, Le = s(
1511
- function({ className: t, sideOffset: e = 8, ...r }, i) {
1498
+ ), Na = {
1499
+ Root: G.Root,
1500
+ Trigger: G.Trigger,
1501
+ Portal: G.Portal,
1502
+ Positioner: Kr,
1503
+ Popup: $t.Popup,
1504
+ Item: $t.Item,
1505
+ Separator: $t.Separator,
1506
+ Group: G.Group,
1507
+ GroupLabel: G.GroupLabel,
1508
+ SubmenuRoot: G.SubmenuRoot,
1509
+ SubmenuTrigger: G.SubmenuTrigger
1510
+ }, Wr = l(
1511
+ function({ className: t, sideOffset: e = 8, ...r }, a) {
1512
1512
  return /* @__PURE__ */ o(
1513
- P.Positioner,
1513
+ L.Positioner,
1514
1514
  {
1515
- ref: i,
1515
+ ref: a,
1516
1516
  sideOffset: e,
1517
- className: n("gryt-popover-positioner outline-none", t),
1517
+ className: s("gryt-popover-positioner outline-none", t),
1518
1518
  ...r
1519
1519
  }
1520
1520
  );
1521
1521
  }
1522
- ), je = s(
1522
+ ), Jr = l(
1523
1523
  function({ className: t, ...e }, r) {
1524
1524
  return /* @__PURE__ */ o(
1525
- P.Popup,
1525
+ L.Popup,
1526
1526
  {
1527
1527
  ref: r,
1528
- className: n(
1528
+ className: s(
1529
1529
  "gryt-popover max-w-[min(20rem,calc(100vw-2rem))] p-4 outline-none",
1530
- D,
1531
- $,
1530
+ Y,
1531
+ H,
1532
1532
  t
1533
1533
  ),
1534
1534
  ...e
1535
1535
  }
1536
1536
  );
1537
1537
  }
1538
- ), ze = s(function({ className: t, ...e }, r) {
1538
+ ), Qr = l(function({ className: t, ...e }, r) {
1539
1539
  return /* @__PURE__ */ o(
1540
- P.Title,
1540
+ L.Title,
1541
1541
  {
1542
1542
  ref: r,
1543
- className: n(
1543
+ className: s(
1544
1544
  "gryt-popover-title text-sm font-semibold text-gryt-text",
1545
1545
  t
1546
1546
  ),
1547
1547
  ...e
1548
1548
  }
1549
1549
  );
1550
- }), Be = s(function({ className: t, ...e }, r) {
1550
+ }), Zr = l(function({ className: t, ...e }, r) {
1551
1551
  return /* @__PURE__ */ o(
1552
- P.Description,
1552
+ L.Description,
1553
1553
  {
1554
1554
  ref: r,
1555
- className: n(
1555
+ className: s(
1556
1556
  "gryt-popover-description mt-1 text-sm leading-6 text-gryt-muted",
1557
1557
  t
1558
1558
  ),
1559
1559
  ...e
1560
1560
  }
1561
1561
  );
1562
- }), Uo = {
1563
- Root: P.Root,
1564
- Trigger: P.Trigger,
1565
- Portal: P.Portal,
1566
- Positioner: Le,
1567
- Popup: je,
1568
- Title: ze,
1569
- Description: Be,
1570
- Close: P.Close,
1571
- Arrow: P.Arrow
1572
- }, Fe = {
1562
+ }), Ta = {
1563
+ Root: L.Root,
1564
+ Trigger: L.Trigger,
1565
+ Portal: L.Portal,
1566
+ Positioner: Wr,
1567
+ Popup: Jr,
1568
+ Title: Qr,
1569
+ Description: Zr,
1570
+ Close: L.Close,
1571
+ Arrow: L.Arrow
1572
+ }, qr = {
1573
1573
  neutral: "border-white/8 bg-gryt-surface",
1574
1574
  info: "border-gryt-secondary-6 bg-gryt-secondary-2",
1575
1575
  success: "border-gryt-success-6 bg-gryt-success-2",
1576
1576
  warning: "border-gryt-warning-6 bg-gryt-warning-2",
1577
1577
  danger: "border-gryt-danger-6 bg-gryt-danger-2"
1578
- }, Ee = s(
1578
+ }, tn = l(
1579
1579
  function({ className: t, ...e }, r) {
1580
1580
  return /* @__PURE__ */ o(
1581
- T.Viewport,
1581
+ M.Viewport,
1582
1582
  {
1583
1583
  ref: r,
1584
- className: n(
1584
+ className: s(
1585
1585
  "gryt-toast-viewport fixed right-4 bottom-4 z-50 flex w-[min(22rem,calc(100vw-2rem))]",
1586
1586
  "flex-col gap-2 outline-none",
1587
1587
  t
@@ -1590,12 +1590,12 @@ const Yo = {
1590
1590
  }
1591
1591
  );
1592
1592
  }
1593
- ), Ve = s(function({ className: t, severity: e = "neutral", ...r }, i) {
1593
+ ), en = l(function({ className: t, severity: e = "neutral", ...r }, a) {
1594
1594
  return /* @__PURE__ */ o(
1595
- T.Root,
1595
+ M.Root,
1596
1596
  {
1597
- ref: i,
1598
- className: n(
1597
+ ref: a,
1598
+ className: s(
1599
1599
  "gryt-toast relative flex flex-col p-3 pr-9",
1600
1600
  // Not popupSurface. That border is --gryt-border, a solid slate line
1601
1601
  // that is right for a menu anchored to the thing that opened it and too
@@ -1603,7 +1603,7 @@ const Yo = {
1603
1603
  // white hairline separates it from the page without drawing a box
1604
1604
  // around it.
1605
1605
  "rounded-(--gryt-radius-xl) border text-gryt-text",
1606
- Fe[e],
1606
+ qr[e],
1607
1607
  // Swiping is a pointer gesture, so the toast follows the finger
1608
1608
  // through Base UI's swipe variables before it animates out.
1609
1609
  "transition-[opacity,transform] duration-(--gryt-dur-spring) ease-spring",
@@ -1615,37 +1615,37 @@ const Yo = {
1615
1615
  ...r
1616
1616
  }
1617
1617
  );
1618
- }), _e = s(function({ className: t, ...e }, r) {
1618
+ }), rn = l(function({ className: t, ...e }, r) {
1619
1619
  return /* @__PURE__ */ o(
1620
- T.Title,
1620
+ M.Title,
1621
1621
  {
1622
1622
  ref: r,
1623
- className: n(
1623
+ className: s(
1624
1624
  "gryt-toast-title text-sm font-semibold text-gryt-text",
1625
1625
  t
1626
1626
  ),
1627
1627
  ...e
1628
1628
  }
1629
1629
  );
1630
- }), Ye = s(function({ className: t, ...e }, r) {
1630
+ }), nn = l(function({ className: t, ...e }, r) {
1631
1631
  return /* @__PURE__ */ o(
1632
- T.Description,
1632
+ M.Description,
1633
1633
  {
1634
1634
  ref: r,
1635
- className: n(
1635
+ className: s(
1636
1636
  "gryt-toast-description mt-0.5 text-sm leading-6 text-gryt-muted",
1637
1637
  t
1638
1638
  ),
1639
1639
  ...e
1640
1640
  }
1641
1641
  );
1642
- }), He = s(function({ className: t, children: e, ...r }, i) {
1642
+ }), on = l(function({ className: t, children: e, ...r }, a) {
1643
1643
  return /* @__PURE__ */ o(
1644
- T.Close,
1644
+ M.Close,
1645
1645
  {
1646
- ref: i,
1646
+ ref: a,
1647
1647
  "aria-label": "Close",
1648
- className: n(
1648
+ className: s(
1649
1649
  "gryt-toast-close absolute top-2.5 right-2.5 inline-flex h-6 w-6 items-center justify-center",
1650
1650
  "rounded-(--gryt-radius-full) border-0 bg-transparent text-gryt-muted",
1651
1651
  "transition-colors hover:bg-white/8 hover:text-gryt-text motion-reduce:transition-none",
@@ -1653,15 +1653,15 @@ const Yo = {
1653
1653
  t
1654
1654
  ),
1655
1655
  ...r,
1656
- children: e ?? /* @__PURE__ */ o(dt, { size: 14, weight: "bold" })
1656
+ children: e ?? /* @__PURE__ */ o(Gt, { size: 14, weight: "bold" })
1657
1657
  }
1658
1658
  );
1659
- }), Oe = s(function({ className: t, ...e }, r) {
1659
+ }), an = l(function({ className: t, ...e }, r) {
1660
1660
  return /* @__PURE__ */ o(
1661
- T.Action,
1661
+ M.Action,
1662
1662
  {
1663
1663
  ref: r,
1664
- className: n(
1664
+ className: s(
1665
1665
  "gryt-toast-action mt-2 self-start rounded-(--gryt-radius-full) border-0",
1666
1666
  "bg-gryt-accent px-3 py-1.5 text-sm font-medium text-gryt-on-accent",
1667
1667
  "transition-[scale] duration-(--gryt-dur-spring) ease-spring",
@@ -1672,33 +1672,33 @@ const Yo = {
1672
1672
  ...e
1673
1673
  }
1674
1674
  );
1675
- }), Ko = {
1676
- Provider: T.Provider,
1677
- Portal: T.Portal,
1678
- Viewport: Ee,
1679
- Root: Ve,
1680
- Title: _e,
1681
- Description: Ye,
1682
- Close: He,
1683
- Action: Oe
1684
- }, Wo = T.useToastManager, Xe = s(
1675
+ }), Pa = {
1676
+ Provider: M.Provider,
1677
+ Portal: M.Portal,
1678
+ Viewport: tn,
1679
+ Root: en,
1680
+ Title: rn,
1681
+ Description: nn,
1682
+ Close: on,
1683
+ Action: an
1684
+ }, Sa = M.useToastManager, sn = l(
1685
1685
  function({ className: t, ...e }, r) {
1686
1686
  return /* @__PURE__ */ o(
1687
- L.Root,
1687
+ Z.Root,
1688
1688
  {
1689
1689
  ref: r,
1690
- className: n("gryt-scroll-area relative", t),
1690
+ className: s("gryt-scroll-area relative", t),
1691
1691
  ...e
1692
1692
  }
1693
1693
  );
1694
1694
  }
1695
- ), Ue = s(
1695
+ ), ln = l(
1696
1696
  function({ className: t, ...e }, r) {
1697
1697
  return /* @__PURE__ */ o(
1698
- L.Viewport,
1698
+ Z.Viewport,
1699
1699
  {
1700
1700
  ref: r,
1701
- className: n(
1701
+ className: s(
1702
1702
  "gryt-scroll-area-viewport h-full w-full overscroll-contain",
1703
1703
  "focus-visible:outline-2 focus-visible:-outline-offset-1 focus-visible:outline-gryt-accent-light",
1704
1704
  t
@@ -1707,14 +1707,14 @@ const Yo = {
1707
1707
  }
1708
1708
  );
1709
1709
  }
1710
- ), Ke = s(
1711
- function({ className: t, orientation: e, ...r }, i) {
1710
+ ), cn = l(
1711
+ function({ className: t, orientation: e, ...r }, a) {
1712
1712
  return /* @__PURE__ */ o(
1713
- L.Scrollbar,
1713
+ Z.Scrollbar,
1714
1714
  {
1715
- ref: i,
1715
+ ref: a,
1716
1716
  orientation: e,
1717
- className: n(
1717
+ className: s(
1718
1718
  "gryt-scroll-area-scrollbar flex touch-none p-0.5 select-none",
1719
1719
  // Fades in on hover or while scrolling rather than sitting there
1720
1720
  // permanently — a chat sidebar is mostly not being scrolled.
@@ -1725,17 +1725,17 @@ const Yo = {
1725
1725
  t
1726
1726
  ),
1727
1727
  ...r,
1728
- children: /* @__PURE__ */ o(L.Thumb, { className: "flex-1 rounded-(--gryt-radius-full) bg-gryt-border transition-colors hover:bg-gryt-muted motion-reduce:transition-none" })
1728
+ children: /* @__PURE__ */ o(Z.Thumb, { className: "flex-1 rounded-(--gryt-radius-full) bg-gryt-border transition-colors hover:bg-gryt-muted motion-reduce:transition-none" })
1729
1729
  }
1730
1730
  );
1731
1731
  }
1732
- ), Qo = {
1733
- Root: Xe,
1734
- Viewport: Ue,
1735
- Scrollbar: Ke,
1736
- Content: L.Content,
1737
- Corner: L.Corner
1738
- }, We = {
1732
+ ), $a = {
1733
+ Root: sn,
1734
+ Viewport: ln,
1735
+ Scrollbar: cn,
1736
+ Content: Z.Content,
1737
+ Corner: Z.Corner
1738
+ }, dn = {
1739
1739
  primary: [
1740
1740
  "text-gryt-muted hover:not-data-disabled:bg-white/8",
1741
1741
  "data-pressed:bg-gryt-accent data-pressed:text-gryt-on-accent",
@@ -1756,18 +1756,18 @@ const Yo = {
1756
1756
  "data-pressed:bg-gryt-danger data-pressed:text-gryt-on-danger",
1757
1757
  "data-pressed:hover:not-data-disabled:bg-gryt-danger"
1758
1758
  ].join(" ")
1759
- }, Qe = {
1759
+ }, un = {
1760
1760
  xsmall: "h-8 min-w-8 px-2 text-xs",
1761
1761
  small: "h-9 min-w-9 px-2.5 text-sm",
1762
1762
  medium: "h-10 min-w-10 px-3 text-sm",
1763
1763
  large: "h-12 min-w-12 px-4 text-base"
1764
- }, Zo = s(
1765
- function({ className: t, size: e = "medium", tone: r = "primary", ...i }, c) {
1764
+ }, Jt = l(
1765
+ function({ className: t, size: e = "medium", tone: r = "primary", ...a }, c) {
1766
1766
  return /* @__PURE__ */ o(
1767
- Bt,
1767
+ Qe,
1768
1768
  {
1769
1769
  ref: c,
1770
- className: n(
1770
+ className: s(
1771
1771
  "gryt-toggle",
1772
1772
  "inline-flex shrink-0 items-center justify-center gap-2 border-0 bg-transparent",
1773
1773
  "rounded-(--gryt-radius-full) font-medium select-none",
@@ -1775,23 +1775,23 @@ const Yo = {
1775
1775
  "transition-[scale,background-color,color] duration-(--gryt-dur-spring) ease-spring",
1776
1776
  "motion-safe:hover:not-data-disabled:scale-[1.06]",
1777
1777
  "motion-safe:active:not-data-disabled:scale-[0.94]",
1778
- f,
1779
- j,
1780
- Qe[e],
1781
- We[r],
1778
+ P,
1779
+ q,
1780
+ un[e],
1781
+ dn[r],
1782
1782
  t
1783
1783
  ),
1784
- ...i
1784
+ ...a
1785
1785
  }
1786
1786
  );
1787
1787
  }
1788
- ), Jo = s(
1788
+ ), gn = l(
1789
1789
  function({ className: t, ...e }, r) {
1790
1790
  return /* @__PURE__ */ o(
1791
- Ft,
1791
+ Ze,
1792
1792
  {
1793
1793
  ref: r,
1794
- className: n(
1794
+ className: s(
1795
1795
  "gryt-toggle-group inline-flex items-center gap-1",
1796
1796
  "rounded-(--gryt-radius-full) border border-gryt-border bg-gryt-surface p-1",
1797
1797
  t
@@ -1800,38 +1800,807 @@ const Yo = {
1800
1800
  }
1801
1801
  );
1802
1802
  }
1803
- ), Ze = {
1803
+ ), ye = Ae, Ca = Re;
1804
+ function Lt(n, t) {
1805
+ return t === "light" && n.lightHue !== null ? "lightHue" : "hue";
1806
+ }
1807
+ const ft = De;
1808
+ function mn(n) {
1809
+ return {
1810
+ hue: { ...n.hue },
1811
+ lightHue: n.lightHue === null ? null : { ...n.lightHue },
1812
+ dark: { ...n.dark },
1813
+ light: { ...n.light },
1814
+ radius: { ...n.radius }
1815
+ };
1816
+ }
1817
+ function pn(n, t) {
1818
+ return { ...ft(n, t), ...n[t] };
1819
+ }
1820
+ function yn(n, t) {
1821
+ return oe(Ie(n, t));
1822
+ }
1823
+ function D(n, t) {
1824
+ const e = n;
1825
+ return Array.from(
1826
+ { length: 12 },
1827
+ (r, a) => e[`--gryt-${t}-${a + 1}`]
1828
+ );
1829
+ }
1830
+ function Qt(n) {
1831
+ return JSON.stringify(n);
1832
+ }
1833
+ const Ct = {
1834
+ accent: "Accent",
1835
+ accentLight: "Accent, light",
1836
+ secondary: "Secondary",
1837
+ secondaryLight: "Secondary, light",
1838
+ success: "Success",
1839
+ danger: "Danger",
1840
+ dangerLight: "Danger, light",
1841
+ warning: "Warning",
1842
+ onAccent: "Text on accent",
1843
+ onSecondary: "Text on secondary",
1844
+ onDanger: "Text on danger"
1845
+ }, Zt = {
1846
+ bg: "Page",
1847
+ surface: "Surface",
1848
+ surfaceRaised: "Raised surface",
1849
+ surfaceHover: "Surface, hovered",
1850
+ border: "Border",
1851
+ muted: "Muted text",
1852
+ text: "Text"
1853
+ }, qt = {
1854
+ sm: "Small",
1855
+ md: "Medium",
1856
+ lg: "Large",
1857
+ xl: "Extra large",
1858
+ full: "Full"
1859
+ }, fn = {
1860
+ sm: "Chips, swatches, small insets",
1861
+ md: "Menu rows, list items",
1862
+ lg: "Cards and panels",
1863
+ xl: "Dialogs, composers, bubbles",
1864
+ full: "Buttons, fields, avatars"
1865
+ };
1866
+ function ot({
1867
+ label: n,
1868
+ value: t,
1869
+ onChange: e,
1870
+ warning: r,
1871
+ disabled: a = !1
1872
+ }) {
1873
+ const c = ke(), [m, g] = _(t), [y, p] = _(t);
1874
+ t !== y && (p(t), g(t));
1875
+ function f(h) {
1876
+ g(h), Le(h) && e(lt(h));
1877
+ }
1878
+ return /* @__PURE__ */ d("div", { className: "min-w-0", children: [
1879
+ /* @__PURE__ */ d(
1880
+ "span",
1881
+ {
1882
+ className: "mb-1 flex items-center gap-1.5 text-xs font-medium text-gryt-muted",
1883
+ id: `${c}-label`,
1884
+ children: [
1885
+ /* @__PURE__ */ o("span", { className: "truncate", children: n }),
1886
+ r ? /* @__PURE__ */ o("span", { className: "inline-flex shrink-0 text-gryt-warning-11", title: r, children: /* @__PURE__ */ o(se, { "aria-label": r, size: 13 }) }) : null
1887
+ ]
1888
+ }
1889
+ ),
1890
+ /* @__PURE__ */ d("span", { className: "flex items-center gap-2", children: [
1891
+ /* @__PURE__ */ o(
1892
+ "input",
1893
+ {
1894
+ "aria-label": `${n}, colour picker`,
1895
+ className: "docs-swatch disabled:cursor-not-allowed disabled:opacity-60",
1896
+ disabled: a,
1897
+ onChange: (h) => f(h.target.value),
1898
+ type: "color",
1899
+ value: lt(t)
1900
+ }
1901
+ ),
1902
+ /* @__PURE__ */ o(
1903
+ me,
1904
+ {
1905
+ "aria-label": `${n}, hex value`,
1906
+ className: "font-mono",
1907
+ disabled: a,
1908
+ onBlur: () => g(t),
1909
+ onChange: (h) => f(h.target.value),
1910
+ size: "small",
1911
+ spellCheck: !1,
1912
+ value: m
1913
+ }
1914
+ )
1915
+ ] })
1916
+ ] });
1917
+ }
1918
+ const hn = {
1919
+ pass: jt,
1920
+ tight: se,
1921
+ fail: Gt
1922
+ }, te = {
1923
+ pass: "text-gryt-success-11",
1924
+ tight: "text-gryt-warning-11",
1925
+ fail: "text-gryt-danger-11"
1926
+ };
1927
+ function bn({ checks: n, onRepair: t }) {
1928
+ const e = n.filter(
1929
+ (r) => !r.advisory && r.level === "fail"
1930
+ ).length;
1931
+ return /* @__PURE__ */ d("section", { className: "min-w-0", children: [
1932
+ /* @__PURE__ */ d("header", { className: "flex items-center justify-between gap-2 pb-2", children: [
1933
+ /* @__PURE__ */ o("h2", { className: "m-0 text-[11px] font-semibold uppercase tracking-wider text-gryt-muted", children: "Contrast" }),
1934
+ e > 0 ? /* @__PURE__ */ d("span", { className: "text-xs text-gryt-danger-11", children: [
1935
+ e,
1936
+ " of ",
1937
+ n.length
1938
+ ] }) : /* @__PURE__ */ d("span", { className: "text-xs text-gryt-muted", children: [
1939
+ n.length,
1940
+ " checks pass"
1941
+ ] })
1942
+ ] }),
1943
+ /* @__PURE__ */ o("ul", { className: "m-0 list-none space-y-1 p-0", children: n.map((r) => {
1944
+ const a = r.advisory && r.level === "fail" ? "tight" : r.level, c = hn[a];
1945
+ return /* @__PURE__ */ d(
1946
+ "li",
1947
+ {
1948
+ className: "flex items-center justify-between gap-2 text-xs",
1949
+ children: [
1950
+ /* @__PURE__ */ d("span", { className: "flex min-w-0 items-center gap-1.5", children: [
1951
+ /* @__PURE__ */ o(c, { "aria-hidden": "true", className: te[a], size: 12 }),
1952
+ /* @__PURE__ */ o("span", { className: "truncate text-gryt-muted", children: r.label })
1953
+ ] }),
1954
+ /* @__PURE__ */ d("span", { className: "shrink-0 font-mono text-[11px] text-gryt-muted", children: [
1955
+ /* @__PURE__ */ o("span", { className: a === "pass" ? "text-gryt-text" : te[a], children: r.ratio.toFixed(1) }),
1956
+ /* @__PURE__ */ d("span", { "aria-hidden": "true", children: [
1957
+ " / ",
1958
+ r.min
1959
+ ] }),
1960
+ /* @__PURE__ */ d("span", { className: "sr-only", children: [
1961
+ " against a minimum of ",
1962
+ r.min
1963
+ ] }),
1964
+ !r.advisory && r.ratio >= 7 ? /* @__PURE__ */ o("span", { className: "pl-1.5 text-[10px] text-gryt-success-11", children: "AAA" }) : null
1965
+ ] })
1966
+ ]
1967
+ },
1968
+ r.id
1969
+ );
1970
+ }) }),
1971
+ t ? /* @__PURE__ */ o("div", { className: "pt-3", children: /* @__PURE__ */ o(yt, { onClick: t, size: "small", tone: "neutral", children: "Fix the text colours" }) }) : null
1972
+ ] });
1973
+ }
1974
+ function U({ label: n, steps: t }) {
1975
+ return /* @__PURE__ */ d("div", { className: "min-w-0", children: [
1976
+ /* @__PURE__ */ o("span", { className: "mb-1 block text-[11px] font-medium tracking-wide text-gryt-muted", children: n }),
1977
+ /* @__PURE__ */ o("ol", { className: "m-0 flex list-none gap-px overflow-hidden rounded-(--gryt-radius-sm) border border-gryt-border p-0", children: t.map((e, r) => /* @__PURE__ */ o(
1978
+ "li",
1979
+ {
1980
+ className: "h-6 min-w-0 flex-1",
1981
+ style: { backgroundColor: e },
1982
+ title: `${n} ${r + 1} · ${e}`
1983
+ },
1984
+ `${n}-${r}`
1985
+ )) })
1986
+ ] });
1987
+ }
1988
+ const xn = [
1989
+ { family: "accent", label: "Accent" },
1990
+ { family: "secondary", label: "Secondary" },
1991
+ { family: "success", label: "Success" },
1992
+ { family: "danger", label: "Danger" },
1993
+ { family: "warning", label: "Warning" }
1994
+ ];
1995
+ function vn(n, t) {
1996
+ return n < t ? "fail" : n < t * 1.1 ? "tight" : "pass";
1997
+ }
1998
+ function B(n, t, e, r, a, c, m = !1) {
1999
+ const g = Q(e, r);
2000
+ return {
2001
+ id: n,
2002
+ label: t,
2003
+ foreground: e,
2004
+ background: r,
2005
+ ratio: g,
2006
+ min: a,
2007
+ level: vn(g, a),
2008
+ advisory: m,
2009
+ paths: c
2010
+ };
2011
+ }
2012
+ function wn(n, t, e) {
2013
+ const r = D(t, "neutral"), a = r[0], c = r[1], m = r[11], g = r[10], y = r[5], p = e, f = Lt(n, e), h = ft(n, e), S = [
2014
+ B("text-page", "Text on the page", m, a, 4.5, [
2015
+ `${p}.text`,
2016
+ `${p}.bg`
2017
+ ]),
2018
+ B("text-surface", "Text on a surface", m, c, 4.5, [
2019
+ `${p}.text`,
2020
+ `${p}.surface`
2021
+ ]),
2022
+ B("muted-page", "Muted text on the page", g, a, 4.5, [
2023
+ `${p}.muted`,
2024
+ `${p}.bg`
2025
+ ]),
2026
+ B("muted-surface", "Muted text on a surface", g, c, 4.5, [
2027
+ `${p}.muted`,
2028
+ `${p}.surface`
2029
+ ])
2030
+ ];
2031
+ for (const { family: T, label: w } of xn) {
2032
+ const R = D(t, T);
2033
+ S.push(
2034
+ B(
2035
+ `${T}-text`,
2036
+ `${w} text on the page`,
2037
+ R[10],
2038
+ a,
2039
+ 4.5,
2040
+ [`${f}.${T}`, `${p}.bg`]
2041
+ )
2042
+ );
2043
+ }
2044
+ const x = [
2045
+ { family: "accent", on: "onAccent", label: "Label on a filled button" },
2046
+ { family: "secondary", on: "onSecondary", label: "Label on a secondary button" },
2047
+ { family: "danger", on: "onDanger", label: "Label on a danger button" }
2048
+ ];
2049
+ for (const { family: T, on: w, label: R } of x)
2050
+ S.push(
2051
+ B(`${w}-fill`, R, h[w], D(t, T)[8], 4.5, [
2052
+ `${f}.${w}`,
2053
+ `${f}.${T}`
2054
+ ])
2055
+ );
2056
+ return S.push(
2057
+ B(
2058
+ "border-page",
2059
+ "Border against the page",
2060
+ y,
2061
+ a,
2062
+ 1.15,
2063
+ [`${p}.border`, `${p}.bg`],
2064
+ !0
2065
+ )
2066
+ ), S;
2067
+ }
2068
+ function b(n, t) {
2069
+ return n + Math.random() * (t - n);
2070
+ }
2071
+ function kt(n) {
2072
+ return n[Math.floor(Math.random() * n.length)];
2073
+ }
2074
+ const Nn = [
2075
+ { sm: 8, md: 12, lg: 20, xl: 28, full: 999 },
2076
+ { sm: 6, md: 8, lg: 14, xl: 18, full: 999 },
2077
+ { sm: 4, md: 6, lg: 10, xl: 14, full: 8 },
2078
+ { sm: 2, md: 4, lg: 6, xl: 8, full: 4 },
2079
+ { sm: 10, md: 16, lg: 24, xl: 32, full: 999 }
2080
+ ];
2081
+ function Tn() {
2082
+ const n = b(0, 360), t = kt([0.4, 0.8, 1.4, 2.2]), e = n + kt([-1, 1]) * b(110, 200), r = (S, x, T = n) => A({ l: S, c: x * t, h: T }), a = b(0.15, 0.21), c = {
2083
+ bg: r(a, 0.011),
2084
+ surface: r(a + 0.045, 0.014),
2085
+ surfaceRaised: r(a + 0.062, 0.016),
2086
+ surfaceHover: r(a + 0.125, 0.022),
2087
+ border: r(a + 0.125, 0.024),
2088
+ muted: r(b(0.62, 0.665), 8e-3),
2089
+ text: r(b(0.9, 0.925), 8e-3)
2090
+ }, m = b(0.95, 0.968), g = {
2091
+ bg: r(m, 6e-3),
2092
+ surface: r(b(0.995, 1), 1e-3),
2093
+ surfaceRaised: r(m + 0.016, 4e-3),
2094
+ surfaceHover: r(m - 0.035, 0.01),
2095
+ border: r(b(0.878, 0.9), 0.014),
2096
+ muted: r(b(0.46, 0.5), 0.014),
2097
+ text: r(b(0.23, 0.27), 0.014)
2098
+ }, y = A({ l: b(0.67, 0.74), c: b(0.13, 0.17), h: n }), p = A({
2099
+ l: b(0.79, 0.85),
2100
+ c: b(0.09, 0.13),
2101
+ h: e
2102
+ }), f = A({ l: b(0.67, 0.72), c: b(0.15, 0.19), h: b(18, 30) }), h = {
2103
+ accent: y,
2104
+ accentLight: Rt(y, 0.085),
2105
+ secondary: p,
2106
+ secondaryLight: Rt(p, 0.07),
2107
+ success: A({ l: b(0.8, 0.85), c: b(0.15, 0.19), h: b(140, 156) }),
2108
+ danger: f,
2109
+ dangerLight: Rt(f, 0.08),
2110
+ warning: A({ l: b(0.82, 0.86), c: b(0.14, 0.17), h: b(72, 90) }),
2111
+ onAccent: "",
2112
+ onSecondary: "",
2113
+ onDanger: ""
2114
+ };
2115
+ return h.onAccent = O(y), h.onSecondary = O(p), h.onDanger = O(f), {
2116
+ hue: h,
2117
+ // Generated themes keep one hue set. Splitting light off is a decision
2118
+ // somebody makes about their own palette, not something to roll for them.
2119
+ lightHue: null,
2120
+ dark: c,
2121
+ light: g,
2122
+ radius: { ...kt(Nn) }
2123
+ };
2124
+ }
2125
+ function Rt(n, t) {
2126
+ const { l: e, c: r, h: a } = pt(n);
2127
+ return A({ l: Math.min(0.97, e + t), c: r * 0.85, h: a });
2128
+ }
2129
+ function O(n) {
2130
+ const { c: t, h: e } = pt(n), r = A({ l: 0.17, c: Math.min(0.05, t * 0.3), h: e }), a = A({ l: 0.97, c: Math.min(0.03, t * 0.2), h: e }), c = Q(r, n) >= Q(a, n) ? r : a;
2131
+ return st(c, n, 7);
2132
+ }
2133
+ function at(n) {
2134
+ return {
2135
+ ...n,
2136
+ onAccent: O(n.accent),
2137
+ onSecondary: O(n.secondary),
2138
+ onDanger: O(n.danger)
2139
+ };
2140
+ }
2141
+ function X(n) {
2142
+ const t = at(n);
2143
+ return t.onAccent === n.onAccent && t.onSecondary === n.onSecondary && t.onDanger === n.onDanger;
2144
+ }
2145
+ function st(n, t, e) {
2146
+ if (Q(n, t) >= e) return n;
2147
+ const { l: r, c: a, h: c } = pt(n), m = r >= pt(t).l ? 1 : -1;
2148
+ let g = r;
2149
+ for (let y = 0; y < 120; y++) {
2150
+ g = Math.min(1, Math.max(0, g + m * 8e-3));
2151
+ const p = A({ l: g, c: a, h: c });
2152
+ if (Q(p, t) >= e) return p;
2153
+ if (g === 0 || g === 1) break;
2154
+ }
2155
+ return m === 1 ? "#ffffff" : "#000000";
2156
+ }
2157
+ function Pn(n) {
2158
+ const t = mn(n);
2159
+ for (const e of ["dark", "light"])
2160
+ t[e].text = st(
2161
+ t[e].text,
2162
+ t[e].bg,
2163
+ 7
2164
+ ), t[e].text = st(
2165
+ t[e].text,
2166
+ t[e].surface,
2167
+ 7
2168
+ ), t[e].muted = st(
2169
+ t[e].muted,
2170
+ t[e].bg,
2171
+ 4.5
2172
+ ), t[e].muted = st(
2173
+ t[e].muted,
2174
+ t[e].surface,
2175
+ 4.5
2176
+ );
2177
+ for (const e of [t.hue, t.lightHue])
2178
+ if (e !== null)
2179
+ for (const [r, a] of [
2180
+ ["onAccent", "accent"],
2181
+ ["onSecondary", "secondary"],
2182
+ ["onDanger", "danger"]
2183
+ ]) {
2184
+ const c = e[a];
2185
+ Q(e[r], c) < 7 && (e[r] = O(c));
2186
+ }
2187
+ return t;
2188
+ }
2189
+ function Sn(n) {
2190
+ return n === "light" ? { ...Dt.color, ...Ge } : { ...Dt.color };
2191
+ }
2192
+ function $n(n, t) {
2193
+ const e = Sn(t);
2194
+ return Object.entries(pn(n, t)).filter(
2195
+ ([r, a]) => lt(a) !== lt(e[r] ?? "")
2196
+ );
2197
+ }
2198
+ function Cn(n) {
2199
+ return ye.filter(
2200
+ (t) => n.radius[t] !== Dt.radius[t]
2201
+ ).map((t) => [t, n.radius[t]]);
2202
+ }
2203
+ function ee(n, t) {
2204
+ const e = [];
2205
+ t === "light" && e.push(' appearance: "light",');
2206
+ const r = $n(n, t);
2207
+ r.length > 0 && (e.push(" color: {"), r.forEach(([m, g], y) => {
2208
+ const p = y === r.length - 1 ? "" : ",";
2209
+ e.push(` ${m}: "${lt(g)}"${p}`);
2210
+ }), e.push(" },"));
2211
+ const a = Cn(n);
2212
+ a.length > 0 && e.push(
2213
+ ` radius: { ${a.map(([m, g]) => `${m}: ${g}`).join(", ")} }`
2214
+ );
2215
+ const c = e.length - 1;
2216
+ return c >= 0 && (e[c] = e[c].replace(/,$/, "")), e.length === 0 ? "" : `{
2217
+ ${e.join(`
2218
+ `)}
2219
+ }`;
2220
+ }
2221
+ function ka(n) {
2222
+ const t = ee(n, "dark"), e = ee(n, "light");
2223
+ return `import { createGrytTheme, GrytProvider } from "@gryt/ui";
2224
+
2225
+ // One call per appearance. The scales are regenerated from these anchors, so
2226
+ // every component moves with them — not just the tokens named here.
2227
+ const dark = createGrytTheme(${t});
2228
+
2229
+ const light = createGrytTheme(${e});
2230
+
2231
+ export function App({ appearance }: { appearance: "dark" | "light" }) {
2232
+ return (
2233
+ <GrytProvider theme={appearance === "light" ? light : dark}>
2234
+ {/* your app */}
2235
+ </GrytProvider>
2236
+ );
2237
+ }`;
2238
+ }
2239
+ function Ra(n) {
2240
+ return JSON.stringify(n, null, 2);
2241
+ }
2242
+ function kn(n) {
2243
+ const t = n.trim();
2244
+ if (t === "") return { error: "Nothing to import." };
2245
+ const e = Me(t);
2246
+ return e === null ? {
2247
+ error: t.startsWith("{") ? "No theme in that JSON." : "No theme in that link."
2248
+ } : { draft: e.theme, appearance: e.appearance };
2249
+ }
2250
+ const mt = {
2251
+ sm: 24,
2252
+ md: 32,
2253
+ lg: 48,
2254
+ xl: 64,
2255
+ full: 40
2256
+ }, At = 999, Rn = [
2257
+ "bg",
2258
+ "surface",
2259
+ "surfaceRaised",
2260
+ "surfaceHover",
2261
+ "border"
2262
+ ], An = ["text", "muted"];
2263
+ function Aa({
2264
+ value: n,
2265
+ onChange: t,
2266
+ appearance: e,
2267
+ onAppearanceChange: r,
2268
+ actions: a,
2269
+ footer: c,
2270
+ className: m
2271
+ }) {
2272
+ const [g, y] = _(
2273
+ () => X(n.hue) && (n.lightHue === null || X(n.lightHue))
2274
+ ), [p, f] = _(null);
2275
+ if (p !== null && p !== n) {
2276
+ f(null);
2277
+ const i = X(n.hue) && (n.lightHue === null || X(n.lightHue));
2278
+ i !== g && y(i);
2279
+ }
2280
+ const [h, S] = _(""), [x, T] = _(null), w = it(() => yn(n, e), [n, e]), R = it(
2281
+ () => wn(n, w, e),
2282
+ [n, w, e]
2283
+ ), tt = it(() => {
2284
+ const i = /* @__PURE__ */ new Map();
2285
+ for (const u of R)
2286
+ if (!(u.advisory || u.level !== "fail"))
2287
+ for (const $ of u.paths)
2288
+ i.has($) || i.set($, `${u.label}: ${u.ratio.toFixed(1)}, needs ${u.min}`);
2289
+ return i;
2290
+ }, [R]), be = Qt(n), Ht = _t.find((i) => Qt(i.theme) === be)?.id ?? "custom", zt = n[e], xt = Lt(n, e), vt = ft(n, e), xe = R.filter(
2291
+ (i) => !i.advisory && i.level === "fail"
2292
+ ).length;
2293
+ function ut(i) {
2294
+ f(i), t(i);
2295
+ }
2296
+ function et(i) {
2297
+ const u = i(n);
2298
+ ut(
2299
+ g ? {
2300
+ ...u,
2301
+ hue: at(u.hue),
2302
+ lightHue: u.lightHue === null ? null : at(u.lightHue)
2303
+ } : u
2304
+ );
2305
+ }
2306
+ function wt(i) {
2307
+ y(
2308
+ X(i.hue) && (i.lightHue === null || X(i.lightHue))
2309
+ ), ut(i);
2310
+ }
2311
+ function Nt(i, u) {
2312
+ et(($) => {
2313
+ const Tt = Lt($, e);
2314
+ return {
2315
+ ...$,
2316
+ [Tt]: { ...ft($, e), [i]: u }
2317
+ };
2318
+ });
2319
+ }
2320
+ function ve(i) {
2321
+ et((u) => ({
2322
+ ...u,
2323
+ lightHue: i ? { ...u.hue } : null
2324
+ }));
2325
+ }
2326
+ function we(i) {
2327
+ y(i), i && ut({
2328
+ ...n,
2329
+ hue: at(n.hue),
2330
+ lightHue: n.lightHue === null ? null : at(n.lightHue)
2331
+ });
2332
+ }
2333
+ function Bt(i, u) {
2334
+ et(($) => ({
2335
+ ...$,
2336
+ [e]: { ...$[e], [i]: u }
2337
+ }));
2338
+ }
2339
+ function Ne(i) {
2340
+ et((u) => ({ ...u, name: i === "" ? void 0 : i }));
2341
+ }
2342
+ function Te(i, u) {
2343
+ et(($) => ({
2344
+ ...$,
2345
+ radius: { ...$.radius, [i]: u }
2346
+ }));
2347
+ }
2348
+ function Pe(i) {
2349
+ const u = kn(i);
2350
+ if (u.error !== void 0 || u.draft === void 0) {
2351
+ T(u.error ?? "That did not look like a theme.");
2352
+ return;
2353
+ }
2354
+ wt(u.draft), u.appearance !== void 0 && r(u.appearance), T(null), S("");
2355
+ }
2356
+ return /* @__PURE__ */ d("div", { className: s("flex min-w-0 flex-col gap-(--space-md)", m), children: [
2357
+ /* @__PURE__ */ d("div", { className: "flex flex-wrap items-end gap-3 border-y border-gryt-border py-3", children: [
2358
+ /* @__PURE__ */ o("div", { className: "w-52", children: /* @__PURE__ */ o(
2359
+ fr,
2360
+ {
2361
+ label: "Preset",
2362
+ onValueChange: (i) => {
2363
+ const u = je.get(String(i));
2364
+ u && wt(u.theme);
2365
+ },
2366
+ options: [
2367
+ ..._t.map((i) => ({
2368
+ label: i.name,
2369
+ value: i.id
2370
+ })),
2371
+ ...Ht === "custom" ? [{ label: "Custom", value: "custom" }] : []
2372
+ ],
2373
+ size: "small",
2374
+ value: Ht
2375
+ }
2376
+ ) }),
2377
+ /* @__PURE__ */ o("div", { className: "w-48", children: /* @__PURE__ */ o(
2378
+ me,
2379
+ {
2380
+ label: "Name",
2381
+ maxLength: Ee,
2382
+ onChange: (i) => Ne(i.target.value),
2383
+ placeholder: "Untitled theme",
2384
+ size: "small",
2385
+ value: n.name ?? ""
2386
+ }
2387
+ ) }),
2388
+ /* @__PURE__ */ d(yt, { onClick: () => wt(Tn()), size: "small", tone: "neutral", children: [
2389
+ /* @__PURE__ */ o(Oe, { "aria-hidden": "true", size: 15 }),
2390
+ "Generate"
2391
+ ] }),
2392
+ /* @__PURE__ */ d("div", { className: "ml-auto flex items-end gap-3", children: [
2393
+ /* @__PURE__ */ d(
2394
+ gn,
2395
+ {
2396
+ "aria-label": "Appearance",
2397
+ onValueChange: (i) => {
2398
+ const u = i[i.length - 1];
2399
+ (u === "dark" || u === "light") && r(u);
2400
+ },
2401
+ value: [e],
2402
+ children: [
2403
+ /* @__PURE__ */ o(Jt, { size: "small", value: "dark", children: "Dark" }),
2404
+ /* @__PURE__ */ o(Jt, { size: "small", value: "light", children: "Light" })
2405
+ ]
2406
+ }
2407
+ ),
2408
+ a
2409
+ ] })
2410
+ ] }),
2411
+ /* @__PURE__ */ d("p", { className: "m-0 text-xs text-gryt-muted", children: [
2412
+ "Editing the ",
2413
+ e,
2414
+ " half. The neutrals below belong to it",
2415
+ n.lightHue === null ? "; the hues are shared, because step 9 is the same colour in both." : " and so do the hues."
2416
+ ] }),
2417
+ /* @__PURE__ */ d("div", { className: "flex flex-col gap-2", children: [
2418
+ e === "light" ? /* @__PURE__ */ d("label", { className: "flex cursor-pointer items-center gap-2 text-xs text-gryt-muted", children: [
2419
+ /* @__PURE__ */ o(
2420
+ Kt,
2421
+ {
2422
+ checked: n.lightHue !== null,
2423
+ onCheckedChange: ve
2424
+ }
2425
+ ),
2426
+ "Light has its own hues"
2427
+ ] }) : null,
2428
+ /* @__PURE__ */ d("label", { className: "flex cursor-pointer items-center gap-2 text-xs text-gryt-muted", children: [
2429
+ /* @__PURE__ */ o(Kt, { checked: g, onCheckedChange: we }),
2430
+ "Pick label colours automatically"
2431
+ ] })
2432
+ ] }),
2433
+ /* @__PURE__ */ d("div", { className: "flex flex-col gap-(--space-md)", children: [
2434
+ /* @__PURE__ */ d(K, { title: "Surfaces", children: [
2435
+ Rn.map((i) => /* @__PURE__ */ o(
2436
+ ot,
2437
+ {
2438
+ label: Zt[i],
2439
+ onChange: (u) => Bt(i, u),
2440
+ value: zt[i],
2441
+ warning: tt.get(`${e}.${i}`)
2442
+ },
2443
+ i
2444
+ )),
2445
+ /* @__PURE__ */ o(U, { label: "neutral", steps: D(w, "neutral") })
2446
+ ] }),
2447
+ /* @__PURE__ */ o(K, { title: "Text", children: An.map((i) => /* @__PURE__ */ o(
2448
+ ot,
2449
+ {
2450
+ label: Zt[i],
2451
+ onChange: (u) => Bt(i, u),
2452
+ value: zt[i],
2453
+ warning: tt.get(`${e}.${i}`)
2454
+ },
2455
+ i
2456
+ )) }),
2457
+ /* @__PURE__ */ d(K, { title: "Accent", children: [
2458
+ ["accent", "accentLight", "onAccent"].map((i) => /* @__PURE__ */ o(
2459
+ ot,
2460
+ {
2461
+ disabled: g && i === "onAccent",
2462
+ label: Ct[i],
2463
+ onChange: (u) => Nt(i, u),
2464
+ value: vt[i],
2465
+ warning: tt.get(`${xt}.${i}`)
2466
+ },
2467
+ i
2468
+ )),
2469
+ /* @__PURE__ */ o(U, { label: "accent", steps: D(w, "accent") })
2470
+ ] }),
2471
+ /* @__PURE__ */ d(K, { title: "Secondary", children: [
2472
+ ["secondary", "secondaryLight", "onSecondary"].map(
2473
+ (i) => /* @__PURE__ */ o(
2474
+ ot,
2475
+ {
2476
+ disabled: g && i === "onSecondary",
2477
+ label: Ct[i],
2478
+ onChange: (u) => Nt(i, u),
2479
+ value: vt[i],
2480
+ warning: tt.get(`${xt}.${i}`)
2481
+ },
2482
+ i
2483
+ )
2484
+ ),
2485
+ /* @__PURE__ */ o(U, { label: "secondary", steps: D(w, "secondary") })
2486
+ ] }),
2487
+ /* @__PURE__ */ d(K, { title: "Status", children: [
2488
+ [
2489
+ "success",
2490
+ "danger",
2491
+ "dangerLight",
2492
+ "onDanger",
2493
+ "warning"
2494
+ ].map((i) => /* @__PURE__ */ o(
2495
+ ot,
2496
+ {
2497
+ disabled: g && i === "onDanger",
2498
+ label: Ct[i],
2499
+ onChange: (u) => Nt(i, u),
2500
+ value: vt[i],
2501
+ warning: tt.get(`${xt}.${i}`)
2502
+ },
2503
+ i
2504
+ )),
2505
+ /* @__PURE__ */ o(U, { label: "success", steps: D(w, "success") }),
2506
+ /* @__PURE__ */ o(U, { label: "danger", steps: D(w, "danger") }),
2507
+ /* @__PURE__ */ o(U, { label: "warning", steps: D(w, "warning") })
2508
+ ] }),
2509
+ /* @__PURE__ */ o(K, { title: "Radius", children: ye.map((i) => {
2510
+ const u = n.radius[i], $ = i === "full" && u >= At ? mt.full : u;
2511
+ return /* @__PURE__ */ d("div", { className: "min-w-0", children: [
2512
+ /* @__PURE__ */ d("div", { className: "mb-1 flex items-baseline justify-between gap-2", children: [
2513
+ /* @__PURE__ */ o("span", { className: "text-xs font-medium text-gryt-muted", children: qt[i] }),
2514
+ /* @__PURE__ */ o("span", { className: "font-mono text-[11px] text-gryt-muted", children: u >= At ? "pill" : `${u}px` })
2515
+ ] }),
2516
+ /* @__PURE__ */ o(
2517
+ pr,
2518
+ {
2519
+ "aria-label": `${qt[i]} radius`,
2520
+ max: mt[i],
2521
+ min: 0,
2522
+ onValueChange: (Tt) => {
2523
+ const Ft = Number(Tt);
2524
+ Te(
2525
+ i,
2526
+ i === "full" && Ft >= mt.full ? At : Ft
2527
+ );
2528
+ },
2529
+ value: Math.min($, mt[i])
2530
+ }
2531
+ ),
2532
+ /* @__PURE__ */ o("p", { className: "m-0 pt-1 text-[11px] text-gryt-muted", children: fn[i] })
2533
+ ] }, i);
2534
+ }) }),
2535
+ /* @__PURE__ */ o(
2536
+ bn,
2537
+ {
2538
+ checks: R,
2539
+ onRepair: xe > 0 ? () => ut(Pn(n)) : void 0
2540
+ }
2541
+ ),
2542
+ /* @__PURE__ */ d("section", { className: "min-w-0", children: [
2543
+ /* @__PURE__ */ o("h2", { className: "m-0 pb-2 text-[11px] font-semibold uppercase tracking-wider text-gryt-muted", children: "Load one back" }),
2544
+ /* @__PURE__ */ o("p", { className: "m-0 pb-2 text-sm text-gryt-muted", children: "Paste a theme’s JSON, or a link somebody sent you." }),
2545
+ /* @__PURE__ */ d("div", { className: "flex flex-col gap-2 sm:flex-row", children: [
2546
+ /* @__PURE__ */ o(
2547
+ "textarea",
2548
+ {
2549
+ "aria-label": "Theme JSON or a shared link",
2550
+ className: "min-h-11 flex-1 rounded-(--gryt-radius-xl) border border-gryt-border bg-gryt-surface-raised px-4 py-2.5 font-mono text-sm text-gryt-text outline-none placeholder:text-gryt-muted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gryt-accent-light",
2551
+ onChange: (i) => S(i.target.value),
2552
+ placeholder: "{ …",
2553
+ rows: 2,
2554
+ spellCheck: !1,
2555
+ value: h
2556
+ }
2557
+ ),
2558
+ /* @__PURE__ */ o(yt, { onClick: () => Pe(h), tone: "neutral", children: "Load" })
2559
+ ] }),
2560
+ x ? /* @__PURE__ */ o("p", { className: "m-0 pt-2 text-sm text-gryt-danger-11", children: x }) : null
2561
+ ] }),
2562
+ c
2563
+ ] })
2564
+ ] });
2565
+ }
2566
+ function K({ title: n, children: t }) {
2567
+ return /* @__PURE__ */ d("section", { className: "min-w-0", children: [
2568
+ /* @__PURE__ */ o("h2", { className: "m-0 pb-2 text-[11px] font-semibold uppercase tracking-wider text-gryt-muted", children: n }),
2569
+ /* @__PURE__ */ o("div", { className: "flex flex-col gap-3", children: t })
2570
+ ] });
2571
+ }
2572
+ const In = {
1804
2573
  primary: "bg-gryt-accent",
1805
2574
  success: "bg-gryt-success",
1806
2575
  warning: "bg-gryt-warning",
1807
2576
  danger: "bg-gryt-danger"
1808
2577
  };
1809
- function qo({
1810
- className: a,
2578
+ function Ia({
2579
+ className: n,
1811
2580
  value: t,
1812
2581
  label: e,
1813
2582
  showValue: r = !1,
1814
- tone: i = "primary",
2583
+ tone: a = "primary",
1815
2584
  ...c
1816
2585
  }) {
1817
- return /* @__PURE__ */ g(
1818
- B.Root,
2586
+ return /* @__PURE__ */ d(
2587
+ nt.Root,
1819
2588
  {
1820
2589
  value: t,
1821
- className: n("gryt-meter flex w-full flex-col gap-1.5", a),
2590
+ className: s("gryt-meter flex w-full flex-col gap-1.5", n),
1822
2591
  ...c,
1823
2592
  children: [
1824
- (e || r) && /* @__PURE__ */ g("div", { className: "flex items-baseline justify-between gap-2", children: [
1825
- e ? /* @__PURE__ */ o(B.Label, { className: "text-sm text-gryt-muted", children: e }) : /* @__PURE__ */ o("span", {}),
1826
- r && /* @__PURE__ */ o(B.Value, { className: "font-mono text-xs text-gryt-muted tabular-nums" })
2593
+ (e || r) && /* @__PURE__ */ d("div", { className: "flex items-baseline justify-between gap-2", children: [
2594
+ e ? /* @__PURE__ */ o(nt.Label, { className: "text-sm text-gryt-muted", children: e }) : /* @__PURE__ */ o("span", {}),
2595
+ r && /* @__PURE__ */ o(nt.Value, { className: "font-mono text-xs text-gryt-muted tabular-nums" })
1827
2596
  ] }),
1828
- /* @__PURE__ */ o(B.Track, { className: "h-1.5 w-full overflow-hidden rounded-(--gryt-radius-full) bg-gryt-surface-raised", children: /* @__PURE__ */ o(
1829
- B.Indicator,
2597
+ /* @__PURE__ */ o(nt.Track, { className: "h-1.5 w-full overflow-hidden rounded-(--gryt-radius-full) bg-gryt-surface-raised", children: /* @__PURE__ */ o(
2598
+ nt.Indicator,
1830
2599
  {
1831
- className: n(
2600
+ className: s(
1832
2601
  "h-full rounded-(--gryt-radius-full)",
1833
2602
  "transition-[width] duration-120 ease-out motion-reduce:transition-none",
1834
- Ze[i]
2603
+ In[a]
1835
2604
  )
1836
2605
  }
1837
2606
  ) })
@@ -1839,13 +2608,13 @@ function qo({
1839
2608
  }
1840
2609
  );
1841
2610
  }
1842
- const Je = s(
2611
+ const Dn = l(
1843
2612
  function({ className: t, ...e }, r) {
1844
2613
  return /* @__PURE__ */ o(
1845
- S.Popup,
2614
+ E.Popup,
1846
2615
  {
1847
2616
  ref: r,
1848
- className: n(
2617
+ className: s(
1849
2618
  "gryt-alert-dialog fixed top-1/2 left-1/2 z-50 -translate-x-1/2 -translate-y-1/2",
1850
2619
  "flex w-[32rem] max-w-[calc(100vw-3rem)] flex-col gap-4",
1851
2620
  "rounded-(--gryt-radius-lg) border border-gryt-border bg-gryt-surface p-5 text-gryt-text",
@@ -1859,12 +2628,12 @@ const Je = s(
1859
2628
  }
1860
2629
  );
1861
2630
  }
1862
- ), qe = s(function({ className: t, ...e }, r) {
2631
+ ), Ln = l(function({ className: t, ...e }, r) {
1863
2632
  return /* @__PURE__ */ o(
1864
- S.Backdrop,
2633
+ E.Backdrop,
1865
2634
  {
1866
2635
  ref: r,
1867
- className: n(
2636
+ className: s(
1868
2637
  "gryt-alert-dialog-backdrop fixed inset-0 z-50 min-h-dvh bg-black/60",
1869
2638
  "backdrop-blur-(--gryt-backdrop-blur)",
1870
2639
  "transition-opacity duration-(--gryt-dur-spring) ease-spring motion-reduce:transition-none",
@@ -1874,40 +2643,40 @@ const Je = s(
1874
2643
  ...e
1875
2644
  }
1876
2645
  );
1877
- }), tr = s(function({ className: t, ...e }, r) {
2646
+ }), Mn = l(function({ className: t, ...e }, r) {
1878
2647
  return /* @__PURE__ */ o(
1879
- S.Title,
2648
+ E.Title,
1880
2649
  {
1881
2650
  ref: r,
1882
- className: n(
2651
+ className: s(
1883
2652
  "gryt-alert-dialog-title text-lg font-semibold text-gryt-text",
1884
2653
  t
1885
2654
  ),
1886
2655
  ...e
1887
2656
  }
1888
2657
  );
1889
- }), er = s(function({ className: t, ...e }, r) {
2658
+ }), Gn = l(function({ className: t, ...e }, r) {
1890
2659
  return /* @__PURE__ */ o(
1891
- S.Description,
2660
+ E.Description,
1892
2661
  {
1893
2662
  ref: r,
1894
- className: n(
2663
+ className: s(
1895
2664
  "gryt-alert-dialog-description text-sm leading-6 text-gryt-muted",
1896
2665
  t
1897
2666
  ),
1898
2667
  ...e
1899
2668
  }
1900
2669
  );
1901
- }), ta = {
1902
- Root: S.Root,
1903
- Trigger: S.Trigger,
1904
- Portal: S.Portal,
1905
- Backdrop: qe,
1906
- Popup: Je,
1907
- Title: tr,
1908
- Description: er,
1909
- Close: S.Close
1910
- }, ht = [
2670
+ }), Da = {
2671
+ Root: E.Root,
2672
+ Trigger: E.Trigger,
2673
+ Portal: E.Portal,
2674
+ Backdrop: Ln,
2675
+ Popup: Dn,
2676
+ Title: Mn,
2677
+ Description: Gn,
2678
+ Close: E.Close
2679
+ }, fe = [
1911
2680
  "flex cursor-default items-center gap-2 rounded-(--gryt-radius-md)",
1912
2681
  "px-3 py-2 text-sm text-gryt-text outline-none select-none",
1913
2682
  // Base UI drives keyboard and pointer highlight through one attribute, so
@@ -1915,195 +2684,195 @@ const Je = s(
1915
2684
  "data-highlighted:bg-gryt-surface-raised",
1916
2685
  "data-selected:text-gryt-accent-11",
1917
2686
  "data-disabled:cursor-not-allowed data-disabled:opacity-50"
1918
- ].join(" "), wt = [
1919
- pt,
1920
- bt.medium,
2687
+ ].join(" "), he = [
2688
+ de,
2689
+ ue.medium,
1921
2690
  "border-gryt-border",
1922
- f
1923
- ].join(" "), rr = s(function({ className: t, ...e }, r) {
2691
+ P
2692
+ ].join(" "), jn = l(function({ className: t, ...e }, r) {
1924
2693
  return /* @__PURE__ */ o(
1925
- u.Input,
2694
+ v.Input,
1926
2695
  {
1927
2696
  ref: r,
1928
- className: n("gryt-combobox-input", wt, t),
2697
+ className: s("gryt-combobox-input", he, t),
1929
2698
  ...e
1930
2699
  }
1931
2700
  );
1932
- }), or = s(function({ className: t, sideOffset: e = 6, ...r }, i) {
2701
+ }), En = l(function({ className: t, sideOffset: e = 6, ...r }, a) {
1933
2702
  return /* @__PURE__ */ o(
1934
- u.Positioner,
2703
+ v.Positioner,
1935
2704
  {
1936
- ref: i,
2705
+ ref: a,
1937
2706
  sideOffset: e,
1938
- className: n("gryt-combobox-positioner outline-none", t),
2707
+ className: s("gryt-combobox-positioner outline-none", t),
1939
2708
  ...r
1940
2709
  }
1941
2710
  );
1942
- }), ar = s(
2711
+ }), Hn = l(
1943
2712
  function({ className: t, ...e }, r) {
1944
2713
  return /* @__PURE__ */ o(
1945
- u.Popup,
2714
+ v.Popup,
1946
2715
  {
1947
2716
  ref: r,
1948
- className: n(
2717
+ className: s(
1949
2718
  "gryt-combobox max-h-64 w-(--anchor-width) overflow-y-auto overscroll-contain p-1 outline-none",
1950
- D,
1951
- $,
2719
+ Y,
2720
+ H,
1952
2721
  t
1953
2722
  ),
1954
2723
  ...e
1955
2724
  }
1956
2725
  );
1957
2726
  }
1958
- ), nr = s(function({ className: t, ...e }, r) {
2727
+ ), zn = l(function({ className: t, ...e }, r) {
1959
2728
  return /* @__PURE__ */ o(
1960
- u.Item,
2729
+ v.Item,
1961
2730
  {
1962
2731
  ref: r,
1963
- className: n("gryt-combobox-item", ht, t),
2732
+ className: s("gryt-combobox-item", fe, t),
1964
2733
  ...e
1965
2734
  }
1966
2735
  );
1967
- }), ir = s(function({ className: t, ...e }, r) {
2736
+ }), Bn = l(function({ className: t, ...e }, r) {
1968
2737
  return /* @__PURE__ */ o(
1969
- u.Empty,
2738
+ v.Empty,
1970
2739
  {
1971
2740
  ref: r,
1972
- className: n(
2741
+ className: s(
1973
2742
  "gryt-combobox-empty px-3 py-2 text-sm text-gryt-muted",
1974
2743
  t
1975
2744
  ),
1976
2745
  ...e
1977
2746
  }
1978
2747
  );
1979
- }), ea = {
1980
- Root: u.Root,
1981
- Input: rr,
1982
- InputGroup: u.InputGroup,
1983
- Trigger: u.Trigger,
1984
- Icon: u.Icon,
1985
- Clear: u.Clear,
1986
- Value: u.Value,
1987
- Chips: u.Chips,
1988
- Chip: u.Chip,
1989
- ChipRemove: u.ChipRemove,
1990
- Portal: u.Portal,
1991
- Positioner: or,
1992
- Popup: ar,
1993
- List: u.List,
1994
- Item: nr,
1995
- ItemIndicator: u.ItemIndicator,
1996
- Group: u.Group,
1997
- GroupLabel: u.GroupLabel,
1998
- Empty: ir,
1999
- Separator: u.Separator
2000
- }, sr = s(function({ className: t, ...e }, r) {
2748
+ }), La = {
2749
+ Root: v.Root,
2750
+ Input: jn,
2751
+ InputGroup: v.InputGroup,
2752
+ Trigger: v.Trigger,
2753
+ Icon: v.Icon,
2754
+ Clear: v.Clear,
2755
+ Value: v.Value,
2756
+ Chips: v.Chips,
2757
+ Chip: v.Chip,
2758
+ ChipRemove: v.ChipRemove,
2759
+ Portal: v.Portal,
2760
+ Positioner: En,
2761
+ Popup: Hn,
2762
+ List: v.List,
2763
+ Item: zn,
2764
+ ItemIndicator: v.ItemIndicator,
2765
+ Group: v.Group,
2766
+ GroupLabel: v.GroupLabel,
2767
+ Empty: Bn,
2768
+ Separator: v.Separator
2769
+ }, Fn = l(function({ className: t, ...e }, r) {
2001
2770
  return /* @__PURE__ */ o(
2002
- p.Input,
2771
+ N.Input,
2003
2772
  {
2004
2773
  ref: r,
2005
- className: n("gryt-autocomplete-input", wt, t),
2774
+ className: s("gryt-autocomplete-input", he, t),
2006
2775
  ...e
2007
2776
  }
2008
2777
  );
2009
- }), cr = s(function({ className: t, sideOffset: e = 6, ...r }, i) {
2778
+ }), _n = l(function({ className: t, sideOffset: e = 6, ...r }, a) {
2010
2779
  return /* @__PURE__ */ o(
2011
- p.Positioner,
2780
+ N.Positioner,
2012
2781
  {
2013
- ref: i,
2782
+ ref: a,
2014
2783
  sideOffset: e,
2015
- className: n("gryt-autocomplete-positioner outline-none", t),
2784
+ className: s("gryt-autocomplete-positioner outline-none", t),
2016
2785
  ...r
2017
2786
  }
2018
2787
  );
2019
- }), lr = s(function({ className: t, ...e }, r) {
2788
+ }), Vn = l(function({ className: t, ...e }, r) {
2020
2789
  return /* @__PURE__ */ o(
2021
- p.Popup,
2790
+ N.Popup,
2022
2791
  {
2023
2792
  ref: r,
2024
- className: n(
2793
+ className: s(
2025
2794
  "gryt-autocomplete max-h-64 w-(--anchor-width) overflow-y-auto overscroll-contain p-1 outline-none",
2026
- D,
2027
- $,
2795
+ Y,
2796
+ H,
2028
2797
  t
2029
2798
  ),
2030
2799
  ...e
2031
2800
  }
2032
2801
  );
2033
- }), dr = s(function({ className: t, ...e }, r) {
2802
+ }), On = l(function({ className: t, ...e }, r) {
2034
2803
  return /* @__PURE__ */ o(
2035
- p.Item,
2804
+ N.Item,
2036
2805
  {
2037
2806
  ref: r,
2038
- className: n("gryt-autocomplete-item", ht, t),
2807
+ className: s("gryt-autocomplete-item", fe, t),
2039
2808
  ...e
2040
2809
  }
2041
2810
  );
2042
- }), gr = s(function({ className: t, ...e }, r) {
2811
+ }), Yn = l(function({ className: t, ...e }, r) {
2043
2812
  return /* @__PURE__ */ o(
2044
- p.Empty,
2813
+ N.Empty,
2045
2814
  {
2046
2815
  ref: r,
2047
- className: n(
2816
+ className: s(
2048
2817
  "gryt-autocomplete-empty px-3 py-2 text-sm text-gryt-muted",
2049
2818
  t
2050
2819
  ),
2051
2820
  ...e
2052
2821
  }
2053
2822
  );
2054
- }), ra = {
2055
- Root: p.Root,
2056
- Input: sr,
2057
- InputGroup: p.InputGroup,
2058
- Trigger: p.Trigger,
2059
- Icon: p.Icon,
2060
- Clear: p.Clear,
2061
- Value: p.Value,
2062
- Portal: p.Portal,
2063
- Positioner: cr,
2064
- Popup: lr,
2065
- List: p.List,
2066
- Item: dr,
2067
- Group: p.Group,
2068
- GroupLabel: p.GroupLabel,
2069
- Empty: gr,
2070
- Separator: p.Separator
2071
- }, oa = s(
2823
+ }), Ma = {
2824
+ Root: N.Root,
2825
+ Input: Fn,
2826
+ InputGroup: N.InputGroup,
2827
+ Trigger: N.Trigger,
2828
+ Icon: N.Icon,
2829
+ Clear: N.Clear,
2830
+ Value: N.Value,
2831
+ Portal: N.Portal,
2832
+ Positioner: _n,
2833
+ Popup: Vn,
2834
+ List: N.List,
2835
+ Item: On,
2836
+ Group: N.Group,
2837
+ GroupLabel: N.GroupLabel,
2838
+ Empty: Yn,
2839
+ Separator: N.Separator
2840
+ }, Ga = l(
2072
2841
  function({ className: t, ...e }, r) {
2073
2842
  return /* @__PURE__ */ o(
2074
- Et,
2843
+ qe,
2075
2844
  {
2076
2845
  ref: r,
2077
- className: n("gryt-checkbox-group flex flex-col gap-2", t),
2846
+ className: s("gryt-checkbox-group flex flex-col gap-2", t),
2078
2847
  ...e
2079
2848
  }
2080
2849
  );
2081
2850
  }
2082
- ), ur = s(
2851
+ ), Un = l(
2083
2852
  function({ className: t, ...e }, r) {
2084
2853
  return /* @__PURE__ */ o(
2085
- Z.Trigger,
2854
+ Et.Trigger,
2086
2855
  {
2087
2856
  ref: r,
2088
- className: n(
2857
+ className: s(
2089
2858
  "gryt-collapsible-trigger flex w-full items-center justify-between gap-2",
2090
2859
  "rounded-(--gryt-radius-md) border-0 bg-transparent px-2 py-2 text-left",
2091
2860
  "text-sm font-medium text-gryt-text select-none",
2092
2861
  "transition-colors hover:bg-gryt-surface-raised motion-reduce:transition-none",
2093
- f,
2862
+ P,
2094
2863
  t
2095
2864
  ),
2096
2865
  ...e
2097
2866
  }
2098
2867
  );
2099
2868
  }
2100
- ), yr = s(
2869
+ ), Xn = l(
2101
2870
  function({ className: t, ...e }, r) {
2102
2871
  return /* @__PURE__ */ o(
2103
- Z.Panel,
2872
+ Et.Panel,
2104
2873
  {
2105
2874
  ref: r,
2106
- className: n(
2875
+ className: s(
2107
2876
  "gryt-collapsible-panel overflow-hidden",
2108
2877
  // Base UI measures the panel and exposes the height as a variable, so
2109
2878
  // this animates to the content's real height rather than to a guess.
@@ -2116,26 +2885,26 @@ const Je = s(
2116
2885
  }
2117
2886
  );
2118
2887
  }
2119
- ), aa = {
2120
- Root: Z.Root,
2121
- Trigger: ur,
2122
- Panel: yr
2123
- }, na = s(function({ className: t, ...e }, r) {
2888
+ ), ja = {
2889
+ Root: Et.Root,
2890
+ Trigger: Un,
2891
+ Panel: Xn
2892
+ }, Ea = l(function({ className: t, ...e }, r) {
2124
2893
  return /* @__PURE__ */ o(
2125
- Vt,
2894
+ tr,
2126
2895
  {
2127
2896
  ref: r,
2128
- className: n("gryt-form flex flex-col gap-(--gryt-space-lg)", t),
2897
+ className: s("gryt-form flex flex-col gap-(--gryt-space-lg)", t),
2129
2898
  ...e
2130
2899
  }
2131
2900
  );
2132
- }), mr = s(
2901
+ }), Kn = l(
2133
2902
  function({ className: t, ...e }, r) {
2134
2903
  return /* @__PURE__ */ o(
2135
- ut.Root,
2904
+ ie.Root,
2136
2905
  {
2137
2906
  ref: r,
2138
- className: n(
2907
+ className: s(
2139
2908
  "gryt-fieldset flex min-w-0 flex-col gap-3 border-0 p-0",
2140
2909
  t
2141
2910
  ),
@@ -2143,25 +2912,25 @@ const Je = s(
2143
2912
  }
2144
2913
  );
2145
2914
  }
2146
- ), pr = s(function({ className: t, ...e }, r) {
2915
+ ), Wn = l(function({ className: t, ...e }, r) {
2147
2916
  return /* @__PURE__ */ o(
2148
- ut.Legend,
2917
+ ie.Legend,
2149
2918
  {
2150
2919
  ref: r,
2151
- className: n(
2920
+ className: s(
2152
2921
  "gryt-fieldset-legend text-sm font-semibold text-gryt-text",
2153
2922
  t
2154
2923
  ),
2155
2924
  ...e
2156
2925
  }
2157
2926
  );
2158
- }), ia = { Root: mr, Legend: pr }, sa = s(
2927
+ }), Ha = { Root: Kn, Legend: Wn }, za = l(
2159
2928
  function({ className: t, ...e }, r) {
2160
2929
  return /* @__PURE__ */ o(
2161
- _t,
2930
+ er,
2162
2931
  {
2163
2932
  ref: r,
2164
- className: n(
2933
+ className: s(
2165
2934
  "gryt-menubar flex items-center gap-1",
2166
2935
  "rounded-(--gryt-radius-md) border border-gryt-border bg-gryt-surface p-1",
2167
2936
  t
@@ -2170,132 +2939,132 @@ const Je = s(
2170
2939
  }
2171
2940
  );
2172
2941
  }
2173
- ), br = s(function({ className: t, ...e }, r) {
2942
+ ), Jn = l(function({ className: t, ...e }, r) {
2174
2943
  return /* @__PURE__ */ o(
2175
- w.Trigger,
2944
+ k.Trigger,
2176
2945
  {
2177
2946
  ref: r,
2178
- className: n(
2947
+ className: s(
2179
2948
  "gryt-navigation-menu-trigger flex items-center gap-1.5 rounded-(--gryt-radius-md)",
2180
2949
  "border-0 bg-transparent px-3 py-2 text-sm font-medium text-gryt-text select-none",
2181
2950
  "transition-colors hover:bg-gryt-surface-raised motion-reduce:transition-none",
2182
2951
  "data-popup-open:bg-gryt-surface-raised",
2183
- f,
2952
+ P,
2184
2953
  t
2185
2954
  ),
2186
2955
  ...e
2187
2956
  }
2188
2957
  );
2189
- }), fr = s(function({ className: t, ...e }, r) {
2958
+ }), Qn = l(function({ className: t, ...e }, r) {
2190
2959
  return /* @__PURE__ */ o(
2191
- w.Popup,
2960
+ k.Popup,
2192
2961
  {
2193
2962
  ref: r,
2194
- className: n(
2963
+ className: s(
2195
2964
  "gryt-navigation-menu-popup outline-none",
2196
- D,
2197
- $,
2965
+ Y,
2966
+ H,
2198
2967
  t
2199
2968
  ),
2200
2969
  ...e
2201
2970
  }
2202
2971
  );
2203
- }), xr = s(function({ className: t, ...e }, r) {
2972
+ }), Zn = l(function({ className: t, ...e }, r) {
2204
2973
  return /* @__PURE__ */ o(
2205
- w.Positioner,
2974
+ k.Positioner,
2206
2975
  {
2207
2976
  ref: r,
2208
- className: n("gryt-navigation-menu-positioner outline-none", t),
2977
+ className: s("gryt-navigation-menu-positioner outline-none", t),
2209
2978
  ...e
2210
2979
  }
2211
2980
  );
2212
- }), hr = s(function({ className: t, ...e }, r) {
2981
+ }), qn = l(function({ className: t, ...e }, r) {
2213
2982
  return /* @__PURE__ */ o(
2214
- w.Viewport,
2983
+ k.Viewport,
2215
2984
  {
2216
2985
  ref: r,
2217
- className: n(
2986
+ className: s(
2218
2987
  "gryt-navigation-menu-viewport relative overflow-hidden",
2219
2988
  t
2220
2989
  ),
2221
2990
  ...e
2222
2991
  }
2223
2992
  );
2224
- }), wr = s(function({ className: t, ...e }, r) {
2993
+ }), to = l(function({ className: t, ...e }, r) {
2225
2994
  return /* @__PURE__ */ o(
2226
- w.Link,
2995
+ k.Link,
2227
2996
  {
2228
2997
  ref: r,
2229
- className: n(
2998
+ className: s(
2230
2999
  "gryt-navigation-menu-link block rounded-(--gryt-radius-md) px-3 py-2",
2231
3000
  "text-sm text-gryt-text no-underline outline-none",
2232
3001
  "transition-colors hover:bg-gryt-surface-raised motion-reduce:transition-none",
2233
- f,
3002
+ P,
2234
3003
  t
2235
3004
  ),
2236
3005
  ...e
2237
3006
  }
2238
3007
  );
2239
- }), ca = {
2240
- Root: w.Root,
2241
- List: w.List,
2242
- Item: w.Item,
2243
- Trigger: br,
2244
- Content: w.Content,
2245
- Portal: w.Portal,
2246
- Positioner: xr,
2247
- Viewport: hr,
2248
- Popup: fr,
2249
- Link: wr,
2250
- Icon: w.Icon,
2251
- Arrow: w.Arrow
2252
- }, st = "flex h-9 w-9 shrink-0 items-center justify-center border-0 bg-transparent text-gryt-muted transition-colors hover:not-data-disabled:bg-white/8 hover:not-data-disabled:text-gryt-text motion-reduce:transition-none disabled:cursor-not-allowed disabled:opacity-50", la = s(
2253
- function({ className: t, label: e, scrubbable: r = !1, ...i }, c) {
2254
- return /* @__PURE__ */ g(
2255
- R.Root,
3008
+ }), Ba = {
3009
+ Root: k.Root,
3010
+ List: k.List,
3011
+ Item: k.Item,
3012
+ Trigger: Jn,
3013
+ Content: k.Content,
3014
+ Portal: k.Portal,
3015
+ Positioner: Zn,
3016
+ Viewport: qn,
3017
+ Popup: Qn,
3018
+ Link: to,
3019
+ Icon: k.Icon,
3020
+ Arrow: k.Arrow
3021
+ }, re = "flex h-9 w-9 shrink-0 items-center justify-center border-0 bg-transparent text-gryt-muted transition-colors hover:not-data-disabled:bg-white/8 hover:not-data-disabled:text-gryt-text motion-reduce:transition-none disabled:cursor-not-allowed disabled:opacity-50", Fa = l(
3022
+ function({ className: t, label: e, scrubbable: r = !1, ...a }, c) {
3023
+ return /* @__PURE__ */ d(
3024
+ z.Root,
2256
3025
  {
2257
3026
  ref: c,
2258
- className: n("gryt-number-field flex flex-col gap-1.5", t),
2259
- ...i,
3027
+ className: s("gryt-number-field flex flex-col gap-1.5", t),
3028
+ ...a,
2260
3029
  children: [
2261
- e && (r ? /* @__PURE__ */ g(R.ScrubArea, { className: "cursor-ew-resize text-sm text-gryt-muted select-none", children: [
3030
+ e && (r ? /* @__PURE__ */ d(z.ScrubArea, { className: "cursor-ew-resize text-sm text-gryt-muted select-none", children: [
2262
3031
  e,
2263
- /* @__PURE__ */ o(R.ScrubAreaCursor, {})
3032
+ /* @__PURE__ */ o(z.ScrubAreaCursor, {})
2264
3033
  ] }) : /* @__PURE__ */ o("span", { className: "text-sm text-gryt-muted", children: e })),
2265
- /* @__PURE__ */ g(
2266
- R.Group,
3034
+ /* @__PURE__ */ d(
3035
+ z.Group,
2267
3036
  {
2268
- className: n(
3037
+ className: s(
2269
3038
  "flex w-fit items-center overflow-hidden rounded-(--gryt-radius-full)",
2270
3039
  "border border-gryt-border bg-gryt-surface-raised",
2271
3040
  "focus-within:outline-2 focus-within:outline-offset-2 focus-within:outline-gryt-accent-light",
2272
- j
3041
+ q
2273
3042
  ),
2274
3043
  children: [
2275
3044
  /* @__PURE__ */ o(
2276
- R.Decrement,
3045
+ z.Decrement,
2277
3046
  {
2278
3047
  "aria-label": "Decrease",
2279
- className: n(st, "rounded-l-(--gryt-radius-full)"),
2280
- children: /* @__PURE__ */ o(Dt, { size: 14, weight: "bold" })
3048
+ className: s(re, "rounded-l-(--gryt-radius-full)"),
3049
+ children: /* @__PURE__ */ o(Ye, { size: 14, weight: "bold" })
2281
3050
  }
2282
3051
  ),
2283
3052
  /* @__PURE__ */ o(
2284
- R.Input,
3053
+ z.Input,
2285
3054
  {
2286
- className: n(
3055
+ className: s(
2287
3056
  "w-16 border-0 bg-transparent px-1 py-2 text-center",
2288
3057
  "font-mono text-sm text-gryt-text tabular-nums outline-none",
2289
- f
3058
+ P
2290
3059
  )
2291
3060
  }
2292
3061
  ),
2293
3062
  /* @__PURE__ */ o(
2294
- R.Increment,
3063
+ z.Increment,
2295
3064
  {
2296
3065
  "aria-label": "Increase",
2297
- className: n(st, "rounded-r-(--gryt-radius-full)"),
2298
- children: /* @__PURE__ */ o(Mt, { size: 14, weight: "bold" })
3066
+ className: s(re, "rounded-r-(--gryt-radius-full)"),
3067
+ children: /* @__PURE__ */ o(Ue, { size: 14, weight: "bold" })
2299
3068
  }
2300
3069
  )
2301
3070
  ]
@@ -2305,73 +3074,73 @@ const Je = s(
2305
3074
  }
2306
3075
  );
2307
3076
  }
2308
- ), da = s(
2309
- function({ className: t, length: e = 6, ...r }, i) {
3077
+ ), _a = l(
3078
+ function({ className: t, length: e = 6, ...r }, a) {
2310
3079
  return /* @__PURE__ */ o(
2311
- at.Root,
3080
+ Ut.Root,
2312
3081
  {
2313
- ref: i,
3082
+ ref: a,
2314
3083
  length: e,
2315
- className: n("gryt-otp-field flex gap-2", t),
3084
+ className: s("gryt-otp-field flex gap-2", t),
2316
3085
  ...r,
2317
- children: Array.from({ length: e }, (c, l) => /* @__PURE__ */ o(
2318
- at.Input,
3086
+ children: Array.from({ length: e }, (c, m) => /* @__PURE__ */ o(
3087
+ Ut.Input,
2319
3088
  {
2320
- className: n(
3089
+ className: s(
2321
3090
  "gryt-otp-input h-12 w-10 rounded-(--gryt-radius-md) text-center",
2322
3091
  "border border-gryt-border bg-gryt-surface-raised",
2323
3092
  "font-mono text-lg text-gryt-text tabular-nums outline-none",
2324
3093
  "transition-colors duration-(--gryt-dur-fast) motion-reduce:transition-none",
2325
3094
  "data-filled:border-gryt-accent",
2326
- f
3095
+ P
2327
3096
  )
2328
3097
  },
2329
- l
3098
+ m
2330
3099
  ))
2331
3100
  }
2332
3101
  );
2333
3102
  }
2334
- ), vr = s(
2335
- function({ className: t, sideOffset: e = 8, ...r }, i) {
3103
+ ), eo = l(
3104
+ function({ className: t, sideOffset: e = 8, ...r }, a) {
2336
3105
  return /* @__PURE__ */ o(
2337
- M.Positioner,
3106
+ W.Positioner,
2338
3107
  {
2339
- ref: i,
3108
+ ref: a,
2340
3109
  sideOffset: e,
2341
- className: n("gryt-preview-card-positioner outline-none", t),
3110
+ className: s("gryt-preview-card-positioner outline-none", t),
2342
3111
  ...r
2343
3112
  }
2344
3113
  );
2345
3114
  }
2346
- ), Nr = s(
3115
+ ), ro = l(
2347
3116
  function({ className: t, ...e }, r) {
2348
3117
  return /* @__PURE__ */ o(
2349
- M.Popup,
3118
+ W.Popup,
2350
3119
  {
2351
3120
  ref: r,
2352
- className: n(
3121
+ className: s(
2353
3122
  "gryt-preview-card w-64 max-w-[calc(100vw-2rem)] p-4 outline-none",
2354
- D,
2355
- $,
3123
+ Y,
3124
+ H,
2356
3125
  t
2357
3126
  ),
2358
3127
  ...e
2359
3128
  }
2360
3129
  );
2361
3130
  }
2362
- ), ga = {
2363
- Root: M.Root,
2364
- Trigger: M.Trigger,
2365
- Portal: M.Portal,
2366
- Positioner: vr,
2367
- Popup: Nr,
2368
- Arrow: M.Arrow
2369
- }, Pr = s(function({ className: t, ...e }, r) {
3131
+ ), Va = {
3132
+ Root: W.Root,
3133
+ Trigger: W.Trigger,
3134
+ Portal: W.Portal,
3135
+ Positioner: eo,
3136
+ Popup: ro,
3137
+ Arrow: W.Arrow
3138
+ }, no = l(function({ className: t, ...e }, r) {
2370
3139
  return /* @__PURE__ */ o(
2371
- G.Root,
3140
+ J.Root,
2372
3141
  {
2373
3142
  ref: r,
2374
- className: n(
3143
+ className: s(
2375
3144
  "gryt-toolbar flex items-center gap-1",
2376
3145
  "rounded-(--gryt-radius-full) border border-gryt-border bg-gryt-surface p-1",
2377
3146
  t
@@ -2379,113 +3148,121 @@ const Je = s(
2379
3148
  ...e
2380
3149
  }
2381
3150
  );
2382
- }), Tr = s(function({ className: t, ...e }, r) {
3151
+ }), oo = l(function({ className: t, ...e }, r) {
2383
3152
  return /* @__PURE__ */ o(
2384
- G.Separator,
3153
+ J.Separator,
2385
3154
  {
2386
3155
  ref: r,
2387
- className: n("gryt-toolbar-separator mx-1 h-6 w-px bg-gryt-border", t),
3156
+ className: s("gryt-toolbar-separator mx-1 h-6 w-px bg-gryt-border", t),
2388
3157
  ...e
2389
3158
  }
2390
3159
  );
2391
- }), ua = {
2392
- Root: Pr,
2393
- Group: G.Group,
2394
- Button: G.Button,
2395
- Link: G.Link,
2396
- Input: G.Input,
2397
- Separator: Tr
3160
+ }), Oa = {
3161
+ Root: no,
3162
+ Group: J.Group,
3163
+ Button: J.Button,
3164
+ Link: J.Link,
3165
+ Input: J.Input,
3166
+ Separator: oo
2398
3167
  };
2399
3168
  export {
2400
- Oo as Accordion,
2401
- Bo as Alert,
2402
- ta as AlertDialog,
2403
- ra as Autocomplete,
2404
- te as Avatar,
2405
- Po as Badge,
2406
- Xt as Button,
2407
- Go as Card,
2408
- zo as CardActions,
2409
- jo as CardContent,
2410
- Lo as CardHeader,
2411
- ko as Checkbox,
2412
- oa as CheckboxGroup,
2413
- To as Chip,
2414
- aa as Collapsible,
2415
- ea as Combobox,
2416
- vo as Composer,
2417
- Xo as ContextMenu,
2418
- No as ConversationItem,
2419
- _o as Dialog,
2420
- Mo as Divider,
2421
- Yo as Drawer,
2422
- ia as Fieldset,
2423
- na as Form,
2424
- pa as GRYT_HUE_KEYS,
2425
- ba as GRYT_NEUTRAL_KEYS,
2426
- fa as GRYT_RADIUS_KEYS,
2427
- xa as GRYT_THEME_NAME_MAX,
2428
- bo as GrytProvider,
2429
- fo as IconButton,
2430
- K as Menu,
2431
- sa as Menubar,
2432
- ho as MessageBubble,
2433
- qo as Meter,
2434
- ca as NavigationMenu,
2435
- la as NumberField,
2436
- da as OtpField,
2437
- Uo as Popover,
2438
- ga as PreviewCard,
2439
- Fo as Progress,
2440
- Co as Radio,
2441
- So as RadioGroup,
2442
- Qo as ScrollArea,
2443
- Io as Select,
2444
- Vo as Skeleton,
2445
- Ro as Slider,
2446
- Eo as Spinner,
2447
- xo as Surface,
2448
- $o as Switch,
2449
- Se as Tab,
2450
- Ho as Tabs,
2451
- wo as TextField,
2452
- Ko as Toast,
2453
- Zo as Toggle,
2454
- Jo as ToggleGroup,
2455
- ua as Toolbar,
2456
- Ao as Tooltip,
2457
- Do as TooltipProvider,
2458
- ha as alphaScale,
2459
- Ka as avatarSeed,
2460
- wa as cloneGrytTheme,
2461
- n as cn,
2462
- va as contrast,
2463
- Na as createGrytTheme,
2464
- Pa as decodeGrytTheme,
2465
- Ta as encodeGrytTheme,
2466
- ka as grytAlphaScales,
2467
- Ca as grytAlphaScalesLight,
2468
- Sa as grytLightTokens,
2469
- $a as grytPresets,
2470
- Ra as grytPresetsById,
2471
- Ia as grytScales,
2472
- Aa as grytScalesLight,
2473
- Da as grytTheme,
2474
- Ma as grytThemeHues,
2475
- Ga as grytThemeToOptions,
2476
- La as grytTokens,
2477
- ja as hexToOklch,
2478
- za as hexToRgb,
2479
- Ba as hueScale,
2480
- Fa as hueScaleLight,
2481
- Ea as isHexColor,
2482
- Va as neutralScale,
2483
- _a as neutralScaleLight,
2484
- Ya as normalizeHexColor,
2485
- Ha as normalizeThemeName,
2486
- Oa as oklchToHex,
2487
- Xa as rgbToHex,
2488
- ge as useMediaQuery,
2489
- Wo as useToastManager
3169
+ wa as Accordion,
3170
+ pa as Alert,
3171
+ Da as AlertDialog,
3172
+ Ma as Autocomplete,
3173
+ gr as Avatar,
3174
+ ra as Badge,
3175
+ yt as Button,
3176
+ da as Card,
3177
+ ma as CardActions,
3178
+ ga as CardContent,
3179
+ ua as CardHeader,
3180
+ Kt as Checkbox,
3181
+ Ga as CheckboxGroup,
3182
+ na as Chip,
3183
+ ja as Collapsible,
3184
+ La as Combobox,
3185
+ ta as Composer,
3186
+ Na as ContextMenu,
3187
+ ea as ConversationItem,
3188
+ ba as Dialog,
3189
+ ca as Divider,
3190
+ xa as Drawer,
3191
+ Ha as Fieldset,
3192
+ Ea as Form,
3193
+ Xa as GRYT_HUE_KEYS,
3194
+ Ka as GRYT_NEUTRAL_KEYS,
3195
+ Wa as GRYT_RADIUS_KEYS,
3196
+ Ja as GRYT_THEME_NAME_MAX,
3197
+ Jo as GrytProvider,
3198
+ Qo as IconButton,
3199
+ $t as Menu,
3200
+ za as Menubar,
3201
+ qo as MessageBubble,
3202
+ Ia as Meter,
3203
+ Ba as NavigationMenu,
3204
+ Fa as NumberField,
3205
+ _a as OtpField,
3206
+ Ta as Popover,
3207
+ Va as PreviewCard,
3208
+ ya as Progress,
3209
+ oa as Radio,
3210
+ aa as RadioGroup,
3211
+ $a as ScrollArea,
3212
+ fr as Select,
3213
+ ha as Skeleton,
3214
+ pr as Slider,
3215
+ fa as Spinner,
3216
+ Zo as Surface,
3217
+ sa as Switch,
3218
+ Fr as Tab,
3219
+ va as Tabs,
3220
+ me as TextField,
3221
+ Aa as ThemeEditor,
3222
+ Pa as Toast,
3223
+ Jt as Toggle,
3224
+ gn as ToggleGroup,
3225
+ Oa as Toolbar,
3226
+ ia as Tooltip,
3227
+ la as TooltipProvider,
3228
+ Qa as alphaScale,
3229
+ Cs as avatarSeed,
3230
+ mn as cloneDraft,
3231
+ Za as cloneGrytTheme,
3232
+ s as cn,
3233
+ qa as contrast,
3234
+ ts as createGrytTheme,
3235
+ es as decodeGrytTheme,
3236
+ rs as encodeDraft,
3237
+ ns as encodeGrytTheme,
3238
+ os as grytAlphaScales,
3239
+ as as grytAlphaScalesLight,
3240
+ Ca as grytDraft,
3241
+ ss as grytLightTokens,
3242
+ is as grytPresets,
3243
+ ls as grytPresetsById,
3244
+ cs as grytScales,
3245
+ ds as grytScalesLight,
3246
+ us as grytTheme,
3247
+ gs as grytThemeHues,
3248
+ ms as grytThemeToOptions,
3249
+ ps as grytTokens,
3250
+ ys as hexToOklch,
3251
+ fs as hexToRgb,
3252
+ hs as hueScale,
3253
+ bs as hueScaleLight,
3254
+ kn as importTheme,
3255
+ xs as isHexColor,
3256
+ vs as neutralScale,
3257
+ ws as neutralScaleLight,
3258
+ Ns as normalizeHexColor,
3259
+ Ts as normalizeThemeName,
3260
+ Ps as oklchToHex,
3261
+ Ss as rgbToHex,
3262
+ ka as themeCode,
3263
+ Ra as themeJson,
3264
+ yn as themeStyle,
3265
+ Sr as useMediaQuery,
3266
+ Sa as useToastManager
2490
3267
  };
2491
3268
  //# sourceMappingURL=index.js.map