@gryt/ui 0.21.1 → 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 it, useContext as _, useRef as W, forwardRef as s, useCallback as K, useLayoutEffect as ht, useMemo as wt, useState as vt, useEffect as Nt, useSyncExternalStore as Pt } from "react";
4
- import { createGrytTheme as Tt } from "@gryt/theme";
5
- import { GRYT_HUE_KEYS as ma, GRYT_NEUTRAL_KEYS as pa, GRYT_RADIUS_KEYS as ba, GRYT_THEME_NAME_MAX as fa, alphaScale as xa, cloneGrytTheme as ha, contrast as wa, createGrytTheme as va, decodeGrytTheme as Na, encodeGrytTheme as Pa, grytAlphaScales as Ta, grytAlphaScalesLight as ka, grytLightTokens as Ca, grytPresets as Sa, grytPresetsById as $a, grytScales as Ra, grytScalesLight as Ia, grytTheme as Aa, grytThemeHues as Da, grytThemeToOptions as Ma, grytTokens as Ga, hexToOklch as La, hexToRgb as ja, hueScale as za, hueScaleLight as Ba, isHexColor as Fa, neutralScale as Ea, neutralScaleLight as Va, normalizeHexColor as _a, normalizeThemeName as Ya, oklchToHex as Ha, rgbToHex as Oa } from "@gryt/theme";
6
- import { Button as st } from "@base-ui/react/button";
7
- import { clsx as kt } from "clsx";
8
- import { twMerge as Ct } from "tailwind-merge";
9
- import { Field as V } from "@base-ui/react/field";
10
- import { PaperPlaneTilt as St, X as ct, Check as lt, CaretUpDown as $t, CircleNotch as Rt, CaretDown as It, Minus as At, Plus as Dt } from "@phosphor-icons/react";
11
- import { Avatar as O } from "@base-ui/react/avatar";
12
- import { owlAvatarDataUri as Mt } from "@gryt/owl";
13
- import { avatarSeed as Ua } from "@gryt/owl";
14
- import { Checkbox as tt } from "@base-ui/react/checkbox";
15
- import { Radio as et } from "@base-ui/react/radio";
16
- import { RadioGroup as Gt } from "@base-ui/react/radio-group";
17
- import { Switch as rt } 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 Lt } from "@base-ui/react/separator";
21
- import { Progress as X } from "@base-ui/react/progress";
22
- import { Dialog as C } from "@base-ui/react/dialog";
23
- import { Drawer as v } 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 jt } from "@base-ui/react/toggle";
32
- import { ToggleGroup as zt } 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 y } from "@base-ui/react/combobox";
37
- import { CheckboxGroup as Bt } from "@base-ui/react/checkbox-group";
38
- import { Collapsible as Q } from "@base-ui/react/collapsible";
39
- import { Form as Ft } from "@base-ui/react/form";
40
- import { Fieldset as dt } from "@base-ui/react/fieldset";
41
- import { Menubar as Et } 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 ot } 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 gt = it(void 0);
48
- function ut() {
49
- return _(gt);
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 Vt(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 po({
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 = W(null), l = e === void 0 ? void 0 : Vt(e) ? e : Tt(e);
62
- return /* @__PURE__ */ o("div", { className: t, style: l, ref: c, children: /* @__PURE__ */ o(
63
- gt.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 Ct(kt(a));
70
+ function s(...n) {
71
+ return ze(He(n));
72
72
  }
73
- const _t = {
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
- }, Yt = {
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
- }, Ht = 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
- st,
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 _t = {
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
- Yt[i],
125
- _t[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 _t = {
134
134
  }
135
135
  );
136
136
  }
137
- ), b = "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gryt-accent-light", Ot = "has-[:focus-visible]:outline-2 has-[:focus-visible]:outline-offset-2 has-[:focus-visible]:outline-gryt-accent-light", yt = [
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(" "), mt = {
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", Xt = {
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
- }, pt = {
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
- }, Ut = {
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
- }, Kt = {
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
- }, Wt = {
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
- }, Qt = {
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
- }, bo = 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
- st,
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 _t = {
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
- b,
213
- j,
214
- Qt[e],
215
- Wt[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
- ), fo = 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,274 +234,294 @@ const _t = {
234
234
  }
235
235
  );
236
236
  }
237
- ), xo = 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
- ), ho = 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
- ...f
266
- }, u) {
267
- const N = /* @__PURE__ */ o(
268
- V.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: u,
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
- yt,
275
- d && "resize-y leading-6",
274
+ de,
275
+ g && "resize-y leading-6",
276
276
  e ? "border-gryt-danger" : "border-gryt-border",
277
- mt[m],
277
+ ue[y],
278
278
  t
279
279
  ),
280
- ...f
280
+ ...p
281
281
  }
282
282
  );
283
- return /* @__PURE__ */ g(
284
- V.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(V.Label, { className: "text-xs font-medium text-gryt-muted", children: c }) : null,
292
- N,
293
- i ? /* @__PURE__ */ o(
294
- V.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
- ), wo = 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
- }, f) {
318
- const u = W(null), N = K(() => {
319
- const x = u.current;
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
320
  if (!x)
321
321
  return;
322
- const H = window.getComputedStyle(x), J = parseFloat(H.lineHeight) || 24, q = parseFloat(H.paddingTop) + parseFloat(H.paddingBottom);
322
+ const T = window.getComputedStyle(x), w = parseFloat(T.lineHeight) || 24, R = parseFloat(T.paddingTop) + parseFloat(T.paddingBottom);
323
323
  x.style.height = "auto", x.style.height = `${Math.min(
324
- Math.max(x.scrollHeight, J * i + q),
325
- J * r + q
324
+ Math.max(x.scrollHeight, w * a + R),
325
+ w * r + R
326
326
  )}px`;
327
- }, [r, i]);
328
- ht(N, [N, m.value]);
329
- function Z(x) {
327
+ }, [r, a]);
328
+ Se(h, [h, y.value]);
329
+ function S(x) {
330
330
  if (!c) {
331
331
  x.preventDefault();
332
332
  return;
333
333
  }
334
334
  c(x);
335
335
  }
336
- return /* @__PURE__ */ g("form", { className: n("gryt-composer", t), onSubmit: Z, children: [
336
+ return /* @__PURE__ */ d("form", { className: s("gryt-composer", t), onSubmit: S, children: [
337
337
  /* @__PURE__ */ o(
338
338
  "textarea",
339
339
  {
340
340
  ref: (x) => {
341
- u.current = x, typeof f == "function" ? f(x) : f && (f.current = 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: N,
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
- Ht,
352
+ yt,
353
353
  {
354
354
  type: "submit",
355
355
  disabled: e,
356
356
  size: "small",
357
- endIcon: /* @__PURE__ */ o(St, { 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
- ), Zt = {
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
- }, Jt = 256, qt = s(function({ alt: t, children: e, className: r, fallback: i, seed: c, size: l = "medium", src: d, ...m }, f) {
368
- const u = wt(
369
- () => c ? Mt(c, { size: Jt }) : void 0,
367
+ }, Xt = 256, gr = l(function({
368
+ alt: t,
369
+ children: e,
370
+ className: r,
371
+ fallback: a,
372
+ seed: c,
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,
370
380
  [c]
371
- );
372
- return /* @__PURE__ */ g(
373
- O.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,
374
387
  {
375
388
  ref: f,
376
- className: n(
389
+ className: s(
377
390
  "gryt-avatar inline-flex shrink-0 items-center justify-center overflow-hidden align-middle select-none",
378
391
  "rounded-(--gryt-radius-full) bg-gryt-surface-raised font-medium text-gryt-text ring-1 ring-gryt-border",
379
- Zt[l],
392
+ ur[g],
380
393
  r
381
394
  ),
382
- ...m,
395
+ ...p,
383
396
  children: [
384
- d ? /* @__PURE__ */ o(
385
- O.Image,
397
+ y ? /* @__PURE__ */ o(
398
+ Pt.Image,
386
399
  {
387
- src: d,
400
+ src: y,
388
401
  alt: t,
389
402
  className: "h-full w-full object-cover"
390
403
  }
391
404
  ) : null,
392
- /* @__PURE__ */ o(O.Fallback, { className: "flex h-full w-full items-center justify-center", children: u ? /* @__PURE__ */ o("img", { src: u, alt: t, className: "h-full w-full object-cover" }) : i ?? e })
405
+ /* @__PURE__ */ o(Pt.Fallback, { className: "flex h-full w-full items-center justify-center", children: x ? /* @__PURE__ */ o(
406
+ "img",
407
+ {
408
+ src: x,
409
+ alt: t,
410
+ className: "h-full w-full object-cover"
411
+ }
412
+ ) : a ?? e })
393
413
  ]
394
414
  }
395
415
  );
396
- }), vo = s(function({ active: t = !1, avatar: e, className: r, subtitle: i, title: c, ...l }, d) {
397
- return /* @__PURE__ */ g(
416
+ }), ea = l(function({ active: t = !1, avatar: e, className: r, subtitle: a, title: c, ...m }, g) {
417
+ return /* @__PURE__ */ d(
398
418
  "button",
399
419
  {
400
- ref: d,
420
+ ref: g,
401
421
  type: "button",
402
- className: n(
422
+ className: s(
403
423
  "gryt-conversation-item enabled:cursor-pointer disabled:cursor-not-allowed disabled:opacity-50",
404
424
  t ? "bg-gryt-accent text-gryt-on-accent" : "text-gryt-text hover:bg-white/5",
405
425
  r
406
426
  ),
407
- ...l,
427
+ ...m,
408
428
  children: [
409
429
  e ?? /* @__PURE__ */ o(
410
- qt,
430
+ gr,
411
431
  {
412
432
  size: "small",
413
- className: n(
433
+ className: s(
414
434
  t ? "bg-gryt-on-accent text-gryt-accent-9 ring-transparent" : "bg-gryt-surface-raised text-gryt-text"
415
435
  ),
416
436
  children: c.slice(0, 1).toUpperCase()
417
437
  }
418
438
  ),
419
- /* @__PURE__ */ g("span", { className: "min-w-0 flex-1", children: [
439
+ /* @__PURE__ */ d("span", { className: "min-w-0 flex-1", children: [
420
440
  /* @__PURE__ */ o("span", { className: "block truncate text-sm font-semibold", children: c }),
421
- i ? /* @__PURE__ */ o(
441
+ a ? /* @__PURE__ */ o(
422
442
  "span",
423
443
  {
424
- className: n(
444
+ className: s(
425
445
  "block truncate text-xs",
426
446
  t ? "text-gryt-on-accent/85" : "text-gryt-muted"
427
447
  ),
428
- children: i
448
+ children: a
429
449
  }
430
450
  ) : null
431
451
  ] })
432
452
  ]
433
453
  }
434
454
  );
435
- }), No = s(function({ badgeContent: t, children: e, className: r, max: i = 99, showZero: c = !1, ...l }, d) {
436
- const m = typeof t == "number" ? t : null, f = m !== null && m === 0 && !c, u = m !== null && m > i ? `${i}+` : t;
437
- 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(
438
458
  "span",
439
459
  {
440
- ref: d,
441
- className: n("gryt-badge relative inline-flex", r),
442
- ...l,
460
+ ref: g,
461
+ className: s("gryt-badge relative inline-flex", r),
462
+ ...m,
443
463
  children: [
444
464
  e,
445
- t !== void 0 && !f ? /* @__PURE__ */ o(
465
+ t !== void 0 && !p ? /* @__PURE__ */ o(
446
466
  "span",
447
467
  {
448
- className: n(
468
+ className: s(
449
469
  "gryt-badge-dot absolute -top-1 -right-1 z-10 inline-flex items-center justify-center",
450
470
  "min-w-5 rounded-(--gryt-radius-full) px-1.5 py-0.5",
451
471
  "bg-gryt-accent text-[0.65rem] leading-none font-semibold text-gryt-on-accent",
452
472
  "ring-2 ring-gryt-bg"
453
473
  ),
454
- children: u
474
+ children: f
455
475
  }
456
476
  ) : null
457
477
  ]
458
478
  }
459
479
  );
460
- }), te = {
480
+ }), mr = {
461
481
  neutral: "border-gryt-border bg-gryt-surface-raised text-gryt-text",
462
482
  primary: "border-gryt-accent-6 bg-gryt-accent-3 text-gryt-accent-11",
463
483
  secondary: "border-gryt-secondary-6 bg-gryt-secondary-3 text-gryt-secondary-11",
464
484
  success: "border-gryt-success-6 bg-gryt-success-3 text-gryt-success-11",
465
485
  warning: "border-gryt-warning-6 bg-gryt-warning-3 text-gryt-warning-11",
466
486
  danger: "border-gryt-danger-6 bg-gryt-danger-3 text-gryt-danger-11"
467
- }, Po = s(function({ children: t, className: e, icon: r, label: i, onDelete: c, tone: l = "neutral", ...d }, m) {
468
- 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(
469
489
  "span",
470
490
  {
471
- ref: m,
472
- className: n(
491
+ ref: y,
492
+ className: s(
473
493
  "gryt-chip inline-flex items-center gap-1.5 rounded-(--gryt-radius-full) border px-3 py-1 text-xs font-medium",
474
- te[l],
494
+ mr[m],
475
495
  e
476
496
  ),
477
- ...d,
497
+ ...g,
478
498
  children: [
479
499
  r,
480
- i ?? t,
500
+ a ?? t,
481
501
  c ? /* @__PURE__ */ o(
482
502
  "button",
483
503
  {
484
504
  type: "button",
485
505
  "aria-label": "Remove",
486
506
  onClick: c,
487
- className: n(
507
+ className: s(
488
508
  "-mr-1 inline-flex h-4 w-4 cursor-pointer items-center justify-center rounded-(--gryt-radius-full)",
489
509
  "opacity-70 transition-opacity hover:opacity-100",
490
- b
510
+ P
491
511
  ),
492
- children: /* @__PURE__ */ o(ct, { size: 10, weight: "bold", "aria-hidden": "true" })
512
+ children: /* @__PURE__ */ o(Gt, { size: 10, weight: "bold", "aria-hidden": "true" })
493
513
  }
494
514
  ) : null
495
515
  ]
496
516
  }
497
517
  );
498
- }), To = s(
499
- function({ className: t, tone: e = "primary", ...r }, i) {
518
+ }), Kt = l(
519
+ function({ className: t, tone: e = "primary", ...r }, a) {
500
520
  return /* @__PURE__ */ o(
501
- tt.Root,
521
+ Vt.Root,
502
522
  {
503
- ref: i,
504
- className: n(
523
+ ref: a,
524
+ className: s(
505
525
  "gryt-checkbox flex h-5 w-5 shrink-0 items-center justify-center",
506
526
  "rounded-(--gryt-radius-sm) border border-gryt-border bg-gryt-surface-raised",
507
527
  "transition-[scale,background-color,border-color] duration-(--gryt-dur-spring) ease-spring",
@@ -511,18 +531,18 @@ const _t = {
511
531
  "hover:not-data-disabled:border-gryt-accent-light",
512
532
  "motion-safe:hover:not-data-disabled:scale-[1.08]",
513
533
  "motion-safe:active:not-data-disabled:scale-[0.92]",
514
- b,
515
- j,
534
+ P,
535
+ q,
516
536
  // Unchecked stays a neutral outline; the tone only paints once checked.
517
- Xt[e],
537
+ sr[e],
518
538
  t
519
539
  ),
520
540
  ...r,
521
541
  children: /* @__PURE__ */ o(
522
- tt.Indicator,
542
+ Vt.Indicator,
523
543
  {
524
544
  keepMounted: !0,
525
- className: n(
545
+ className: s(
526
546
  "flex origin-center",
527
547
  "transition-[scale,opacity] duration-(--gryt-dur-spring) ease-spring",
528
548
  // Scaling from 0 rather than from something near 1 is deliberate.
@@ -532,65 +552,65 @@ const _t = {
532
552
  "data-unchecked:scale-0 data-unchecked:opacity-0",
533
553
  "motion-reduce:transition-none"
534
554
  ),
535
- children: /* @__PURE__ */ o(lt, { size: 12, weight: "bold" })
555
+ children: /* @__PURE__ */ o(jt, { size: 12, weight: "bold" })
536
556
  }
537
557
  )
538
558
  }
539
559
  );
540
560
  }
541
- ), ko = s(function({ className: t, tone: e = "primary", ...r }, i) {
561
+ ), oa = l(function({ className: t, tone: e = "primary", ...r }, a) {
542
562
  return /* @__PURE__ */ o(
543
- et.Root,
563
+ Ot.Root,
544
564
  {
545
- ref: i,
546
- className: n(
565
+ ref: a,
566
+ className: s(
547
567
  "gryt-radio flex h-5 w-5 shrink-0 items-center justify-center",
548
568
  "rounded-(--gryt-radius-full) border border-gryt-border bg-gryt-surface-raised",
549
569
  "transition-[scale,background-color,border-color] duration-(--gryt-dur-spring) ease-spring",
550
570
  "hover:not-data-disabled:border-gryt-accent-light",
551
571
  "motion-safe:hover:not-data-disabled:scale-[1.08]",
552
572
  "motion-safe:active:not-data-disabled:scale-[0.92]",
553
- b,
554
- j,
573
+ P,
574
+ q,
555
575
  // Border takes the tone when selected; the dot inside carries the fill.
556
- Ut[e],
576
+ ir[e],
557
577
  t
558
578
  ),
559
579
  ...r,
560
580
  children: /* @__PURE__ */ o(
561
- et.Indicator,
581
+ Ot.Indicator,
562
582
  {
563
583
  keepMounted: !0,
564
- className: n(
584
+ className: s(
565
585
  "h-2.5 w-2.5 origin-center rounded-(--gryt-radius-full)",
566
586
  "transition-[scale,opacity] duration-(--gryt-dur-spring) ease-spring",
567
587
  // From 0, for the same reason as the Checkbox tick — see the note there.
568
588
  "data-unchecked:scale-0 data-unchecked:opacity-0",
569
589
  "motion-reduce:transition-none",
570
- pt[e]
590
+ ge[e]
571
591
  )
572
592
  }
573
593
  )
574
594
  }
575
595
  );
576
- }), Co = s(
596
+ }), aa = l(
577
597
  function({ className: t, ...e }, r) {
578
598
  return /* @__PURE__ */ o(
579
- Gt,
599
+ We,
580
600
  {
581
601
  ref: r,
582
- className: n("gryt-radio-group flex flex-col gap-2", t),
602
+ className: s("gryt-radio-group flex flex-col gap-2", t),
583
603
  ...e
584
604
  }
585
605
  );
586
606
  }
587
- ), So = s(
588
- function({ className: t, tone: e = "primary", ...r }, i) {
607
+ ), sa = l(
608
+ function({ className: t, tone: e = "primary", ...r }, a) {
589
609
  return /* @__PURE__ */ o(
590
- rt.Root,
610
+ Yt.Root,
591
611
  {
592
- ref: i,
593
- className: n(
612
+ ref: a,
613
+ className: s(
594
614
  "gryt-switch relative inline-flex h-6 w-10 shrink-0 items-center",
595
615
  "rounded-(--gryt-radius-full) border border-gryt-border bg-gryt-surface-raised p-0.5",
596
616
  "transition-[scale,background-color,border-color] duration-(--gryt-dur-spring) ease-spring",
@@ -598,16 +618,16 @@ const _t = {
598
618
  "hover:not-data-disabled:border-gryt-accent-light",
599
619
  "motion-safe:hover:not-data-disabled:scale-[1.05]",
600
620
  "motion-safe:active:not-data-disabled:scale-[0.95]",
601
- b,
602
- j,
603
- Kt[e],
621
+ P,
622
+ q,
623
+ lr[e],
604
624
  t
605
625
  ),
606
626
  ...r,
607
627
  children: /* @__PURE__ */ o(
608
- rt.Thumb,
628
+ Yt.Thumb,
609
629
  {
610
- className: n(
630
+ className: s(
611
631
  "h-4.5 w-4.5 rounded-(--gryt-radius-full) bg-gryt-text",
612
632
  "transition-transform duration-(--gryt-dur-spring) ease-spring motion-reduce:transition-none",
613
633
  "data-checked:translate-x-4 data-checked:bg-gryt-bg"
@@ -617,70 +637,70 @@ const _t = {
617
637
  }
618
638
  );
619
639
  }
620
- ), at = 3;
621
- function $o({
622
- className: a,
640
+ ), Wt = 3;
641
+ function pr({
642
+ className: n,
623
643
  tone: t = "primary",
624
644
  "aria-label": e,
625
645
  ...r
626
646
  }) {
627
- const [i, c] = vt(!1), l = W(null);
628
- Nt(() => {
629
- if (!i && l.current === null)
647
+ const [a, c] = _(!1), m = Mt(null);
648
+ $e(() => {
649
+ if (!a && m.current === null)
630
650
  return;
631
- const u = () => {
632
- l.current = null, c(!1);
651
+ const f = () => {
652
+ m.current = null, c(!1);
633
653
  };
634
- return window.addEventListener("pointerup", u), window.addEventListener("pointercancel", u), () => {
635
- window.removeEventListener("pointerup", u), window.removeEventListener("pointercancel", u);
654
+ return window.addEventListener("pointerup", f), window.addEventListener("pointercancel", f), () => {
655
+ window.removeEventListener("pointerup", f), window.removeEventListener("pointercancel", f);
636
656
  };
637
- }, [i]);
638
- function d(u) {
639
- l.current = { x: u.clientX, y: u.clientY };
657
+ }, [a]);
658
+ function g(f) {
659
+ m.current = { x: f.clientX, y: f.clientY };
640
660
  }
641
- function m(u) {
642
- const N = l.current;
643
- if (N === null || i)
661
+ function y(f) {
662
+ const h = m.current;
663
+ if (h === null || a)
644
664
  return;
645
- (Math.abs(u.clientX - N.x) > at || Math.abs(u.clientY - N.y) > at) && c(!0);
665
+ (Math.abs(f.clientX - h.x) > Wt || Math.abs(f.clientY - h.y) > Wt) && c(!0);
646
666
  }
647
- const f = i ? "transition-none" : "duration-(--gryt-dur-spring) ease-spring-tight motion-reduce:transition-none";
648
- return /* @__PURE__ */ o(z.Root, { className: n("gryt-slider w-full", a), ...r, children: /* @__PURE__ */ o(
649
- 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,
650
670
  {
651
671
  className: "flex w-full cursor-pointer touch-none items-center py-2 select-none",
652
- onPointerDown: d,
653
- onPointerMove: m,
654
- 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: [
655
675
  /* @__PURE__ */ o(
656
- z.Indicator,
676
+ rt.Indicator,
657
677
  {
658
- className: n(
678
+ className: s(
659
679
  "h-full rounded-(--gryt-radius-full) select-none",
660
680
  "transition-[width]",
661
- f,
662
- pt[t]
681
+ p,
682
+ ge[t]
663
683
  )
664
684
  }
665
685
  ),
666
686
  /* @__PURE__ */ o(
667
- z.Thumb,
687
+ rt.Thumb,
668
688
  {
669
689
  "aria-label": e,
670
- className: n(
690
+ className: s(
671
691
  "group h-4 w-4 rounded-(--gryt-radius-full) select-none",
672
692
  "transition-[inset-inline-start]",
673
- f,
693
+ p,
674
694
  // The ring goes on the thumb but the focus lands on the visually
675
695
  // hidden input inside it, so this has to match a descendant.
676
696
  // Without it the slider is the one control here you cannot see
677
697
  // yourself tab to.
678
- Ot
698
+ ar
679
699
  ),
680
700
  children: /* @__PURE__ */ o(
681
701
  "span",
682
702
  {
683
- className: n(
703
+ className: s(
684
704
  "block h-full w-full rounded-(--gryt-radius-full) bg-gryt-text",
685
705
  "transition-[scale] duration-(--gryt-dur-spring) ease-spring",
686
706
  "motion-safe:group-hover:scale-[1.12] motion-safe:group-active:scale-[0.94]",
@@ -694,67 +714,67 @@ function $o({
694
714
  }
695
715
  ) });
696
716
  }
697
- const ee = {
717
+ const yr = {
698
718
  small: "min-h-9 px-3 text-sm",
699
719
  medium: "min-h-11 px-4 text-sm"
700
720
  };
701
- function Ro({
702
- className: a,
721
+ function fr({
722
+ className: n,
703
723
  label: t,
704
724
  options: e = [],
705
725
  placeholder: r = "Select",
706
- size: i = "medium",
726
+ size: a = "medium",
707
727
  ...c
708
728
  }) {
709
- const l = ut();
710
- return /* @__PURE__ */ g(h.Root, { items: e, ...c, children: [
711
- /* @__PURE__ */ g("div", { className: n("gryt-select flex w-full flex-col gap-1.5", a), children: [
712
- t ? /* @__PURE__ */ o(h.Label, { className: "text-xs font-medium text-gryt-muted", children: t }) : null,
713
- /* @__PURE__ */ g(
714
- 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,
715
735
  {
716
- className: n(
736
+ className: s(
717
737
  "flex w-full cursor-pointer items-center justify-between gap-2",
718
738
  "rounded-(--gryt-radius-xl) border border-gryt-border bg-gryt-surface-raised",
719
739
  "text-gryt-text select-none",
720
740
  "transition-colors duration-150 hover:border-gryt-accent-light",
721
741
  "data-disabled:cursor-not-allowed data-disabled:opacity-60",
722
- b,
723
- ee[i]
742
+ P,
743
+ yr[a]
724
744
  ),
725
745
  children: [
726
- /* @__PURE__ */ o(h.Value, { placeholder: r }),
727
- /* @__PURE__ */ o(h.Icon, { className: "shrink-0 text-gryt-muted", children: /* @__PURE__ */ o($t, { 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 }) })
728
748
  ]
729
749
  }
730
750
  )
731
751
  ] }),
732
- /* @__PURE__ */ o(h.Portal, { container: l, children: /* @__PURE__ */ o(
733
- h.Positioner,
752
+ /* @__PURE__ */ o(C.Portal, { container: m, children: /* @__PURE__ */ o(
753
+ C.Positioner,
734
754
  {
735
755
  sideOffset: 6,
736
756
  className: "gryt-select-positioner outline-none",
737
757
  children: /* @__PURE__ */ o(
738
- h.Popup,
758
+ C.Popup,
739
759
  {
740
- className: n("min-w-(--anchor-width) p-1", D, $),
741
- children: /* @__PURE__ */ o(h.List, { children: e.map((d) => /* @__PURE__ */ g(
742
- 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,
743
763
  {
744
- value: d.value,
745
- disabled: d.disabled,
746
- className: n(
764
+ value: g.value,
765
+ disabled: g.disabled,
766
+ className: s(
747
767
  "flex cursor-pointer items-center justify-between gap-2",
748
768
  "rounded-(--gryt-radius-md) px-3 py-2 text-sm text-gryt-text",
749
769
  "outline-none select-none data-highlighted:bg-gryt-surface-raised",
750
770
  "data-disabled:cursor-not-allowed data-disabled:opacity-50"
751
771
  ),
752
772
  children: [
753
- /* @__PURE__ */ o(h.ItemText, { children: d.label }),
754
- /* @__PURE__ */ o(h.ItemIndicator, { className: "text-gryt-accent-11", children: /* @__PURE__ */ o(lt, { 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" }) })
755
775
  ]
756
776
  },
757
- String(d.value)
777
+ String(g.value)
758
778
  )) })
759
779
  }
760
780
  )
@@ -762,46 +782,46 @@ function Ro({
762
782
  ) })
763
783
  ] });
764
784
  }
765
- function Io({
766
- children: a,
785
+ function ia({
786
+ children: n,
767
787
  className: t,
768
788
  side: e = "top",
769
789
  sideOffset: r = 8,
770
- title: i
790
+ title: a
771
791
  }) {
772
- const c = ut();
773
- return /* @__PURE__ */ g(I.Root, { children: [
774
- /* @__PURE__ */ o(I.Trigger, { render: a }),
775
- /* @__PURE__ */ o(I.Portal, { container: c, children: /* @__PURE__ */ o(
776
- 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,
777
797
  {
778
798
  side: e,
779
799
  sideOffset: r,
780
800
  className: "gryt-tooltip-positioner",
781
801
  children: /* @__PURE__ */ o(
782
- I.Popup,
802
+ F.Popup,
783
803
  {
784
- className: n(
804
+ className: s(
785
805
  "gryt-tooltip rounded-(--gryt-radius-md) border border-gryt-border bg-gryt-surface-raised",
786
806
  "px-2.5 py-1.5 text-xs text-gryt-text",
787
- $,
807
+ H,
788
808
  t
789
809
  ),
790
- children: i
810
+ children: a
791
811
  }
792
812
  )
793
813
  }
794
814
  ) })
795
815
  ] });
796
816
  }
797
- const Ao = I.Provider, Do = s(
798
- function({ className: t, orientation: e = "horizontal", ...r }, i) {
817
+ const la = F.Provider, ca = l(
818
+ function({ className: t, orientation: e = "horizontal", ...r }, a) {
799
819
  return /* @__PURE__ */ o(
800
- Lt,
820
+ Je,
801
821
  {
802
- ref: i,
822
+ ref: a,
803
823
  orientation: e,
804
- className: n(
824
+ className: s(
805
825
  "gryt-divider bg-gryt-border",
806
826
  e === "vertical" ? "h-full w-px" : "h-px w-full",
807
827
  t
@@ -810,12 +830,12 @@ const Ao = I.Provider, Do = s(
810
830
  }
811
831
  );
812
832
  }
813
- ), Mo = s(function({ className: t, ...e }, r) {
833
+ ), da = l(function({ className: t, ...e }, r) {
814
834
  return /* @__PURE__ */ o(
815
835
  "div",
816
836
  {
817
837
  ref: r,
818
- className: n(
838
+ className: s(
819
839
  "gryt-card rounded-(--gryt-radius-xl) border border-gryt-border bg-gryt-surface text-gryt-text",
820
840
  t
821
841
  ),
@@ -823,87 +843,87 @@ const Ao = I.Provider, Do = s(
823
843
  }
824
844
  );
825
845
  });
826
- function Go({
827
- children: a,
846
+ function ua({
847
+ children: n,
828
848
  className: t,
829
849
  subheader: e,
830
850
  title: r,
831
- ...i
851
+ ...a
832
852
  }) {
833
- return /* @__PURE__ */ g(
853
+ return /* @__PURE__ */ d(
834
854
  "div",
835
855
  {
836
- className: n("gryt-card-header flex flex-col gap-1 p-4", t),
837
- ...i,
856
+ className: s("gryt-card-header flex flex-col gap-1 p-4", t),
857
+ ...a,
838
858
  children: [
839
859
  r ? /* @__PURE__ */ o("span", { className: "text-base font-semibold text-gryt-text", children: r }) : null,
840
860
  e ? /* @__PURE__ */ o("span", { className: "text-sm text-gryt-muted", children: e }) : null,
841
- a
861
+ n
842
862
  ]
843
863
  }
844
864
  );
845
865
  }
846
- function Lo({
847
- className: a,
866
+ function ga({
867
+ className: n,
848
868
  ...t
849
869
  }) {
850
870
  return /* @__PURE__ */ o(
851
871
  "div",
852
872
  {
853
- className: n(
873
+ className: s(
854
874
  "gryt-card-content px-4 pb-4 text-sm text-gryt-muted",
855
- a
875
+ n
856
876
  ),
857
877
  ...t
858
878
  }
859
879
  );
860
880
  }
861
- function jo({
862
- className: a,
881
+ function ma({
882
+ className: n,
863
883
  ...t
864
884
  }) {
865
885
  return /* @__PURE__ */ o(
866
886
  "div",
867
887
  {
868
- className: n(
888
+ className: s(
869
889
  "gryt-card-actions flex items-center gap-2 px-4 pb-4",
870
- a
890
+ n
871
891
  ),
872
892
  ...t
873
893
  }
874
894
  );
875
895
  }
876
- const re = {
896
+ const hr = {
877
897
  info: "border-gryt-secondary-6 bg-gryt-secondary-3 text-gryt-secondary-11",
878
898
  success: "border-gryt-success-6 bg-gryt-success-3 text-gryt-success-11",
879
899
  warning: "border-gryt-warning-6 bg-gryt-warning-3 text-gryt-warning-11",
880
900
  error: "border-gryt-danger-6 bg-gryt-danger-3 text-gryt-danger-11"
881
- }, zo = s(function({ className: t, severity: e = "info", ...r }, i) {
901
+ }, pa = l(function({ className: t, severity: e = "info", ...r }, a) {
882
902
  return /* @__PURE__ */ o(
883
903
  "div",
884
904
  {
885
- ref: i,
905
+ ref: a,
886
906
  role: "alert",
887
- className: n(
907
+ className: s(
888
908
  "gryt-alert rounded-(--gryt-radius-lg) border px-4 py-3 text-sm",
889
- re[e],
909
+ hr[e],
890
910
  t
891
911
  ),
892
912
  ...r
893
913
  }
894
914
  );
895
915
  });
896
- function Bo({ className: a, value: t = null, ...e }) {
916
+ function ya({ className: n, value: t = null, ...e }) {
897
917
  return /* @__PURE__ */ o(
898
- X.Root,
918
+ St.Root,
899
919
  {
900
920
  value: t,
901
- className: n("gryt-progress w-full", a),
921
+ className: s("gryt-progress w-full", n),
902
922
  ...e,
903
- children: /* @__PURE__ */ o(X.Track, { className: "h-1.5 w-full overflow-hidden rounded-(--gryt-radius-full) bg-gryt-surface-raised", children: /* @__PURE__ */ o(
904
- X.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,
905
925
  {
906
- className: n(
926
+ className: s(
907
927
  "h-full rounded-(--gryt-radius-full) bg-gryt-accent",
908
928
  "transition-[width] duration-300 ease-out motion-reduce:transition-none",
909
929
  // Base UI marks the indicator indeterminate and leaves its width
@@ -918,41 +938,41 @@ function Bo({ className: a, value: t = null, ...e }) {
918
938
  }
919
939
  );
920
940
  }
921
- function Fo({
922
- className: a,
941
+ function fa({
942
+ className: n,
923
943
  size: t = 24,
924
944
  "aria-label": e = "Loading"
925
945
  }) {
926
946
  return /* @__PURE__ */ o(
927
- Rt,
947
+ _e,
928
948
  {
929
949
  role: "status",
930
950
  "aria-label": e,
931
951
  size: t,
932
952
  weight: "bold",
933
- className: n(
953
+ className: s(
934
954
  "gryt-spinner text-gryt-accent-11 motion-safe:animate-spin",
935
- a
955
+ n
936
956
  )
937
957
  }
938
958
  );
939
959
  }
940
- const oe = {
960
+ const br = {
941
961
  text: "h-4 rounded-(--gryt-radius-sm)",
942
962
  rounded: "rounded-(--gryt-radius-lg)",
943
963
  circular: "rounded-(--gryt-radius-full)",
944
964
  rectangular: "rounded-none"
945
965
  };
946
- function Eo({
947
- className: a,
966
+ function ha({
967
+ className: n,
948
968
  height: t,
949
969
  style: e,
950
970
  variant: r = "text",
951
- width: i,
971
+ width: a,
952
972
  ...c
953
973
  }) {
954
- const l = {
955
- width: i,
974
+ const m = {
975
+ width: a,
956
976
  height: t,
957
977
  ...e
958
978
  };
@@ -960,7 +980,7 @@ function Eo({
960
980
  "div",
961
981
  {
962
982
  "aria-hidden": "true",
963
- className: n(
983
+ className: s(
964
984
  // Not bg-gryt-surface-raised. #1e2028 against #1a1d24 is four points of
965
985
  // luminance, which is invisible on a laptop screen at an angle — the
966
986
  // placeholder that is meant to say "something is coming" said nothing.
@@ -968,24 +988,24 @@ function Eo({
968
988
  // the surfaces it can land on rather than only the one it was picked
969
989
  // against, and it dims rather than brightens as it pulses.
970
990
  "gryt-skeleton bg-white/9 motion-safe:animate-pulse",
971
- oe[r],
972
- a
991
+ br[r],
992
+ n
973
993
  ),
974
- style: l,
994
+ style: m,
975
995
  ...c
976
996
  }
977
997
  );
978
998
  }
979
- const bt = "transition-[opacity,scale,translate] duration-(--gryt-dur-spring) ease-spring motion-reduce:transition-none", ae = s(
999
+ const pe = "transition-[opacity,scale,translate] duration-(--gryt-dur-spring) ease-spring motion-reduce:transition-none", xr = l(
980
1000
  function({ className: t, ...e }, r) {
981
1001
  return /* @__PURE__ */ o(
982
- C.Backdrop,
1002
+ j.Backdrop,
983
1003
  {
984
1004
  ref: r,
985
- className: n(
1005
+ className: s(
986
1006
  "gryt-dialog-backdrop fixed inset-0 min-h-dvh bg-black/60",
987
1007
  "backdrop-blur-(--gryt-backdrop-blur)",
988
- bt,
1008
+ pe,
989
1009
  "data-starting-style:opacity-0 data-ending-style:opacity-0",
990
1010
  t
991
1011
  ),
@@ -993,17 +1013,17 @@ const bt = "transition-[opacity,scale,translate] duration-(--gryt-dur-spring) ea
993
1013
  }
994
1014
  );
995
1015
  }
996
- ), ne = s(
1016
+ ), vr = l(
997
1017
  function({ className: t, ...e }, r) {
998
1018
  return /* @__PURE__ */ o(
999
- C.Popup,
1019
+ j.Popup,
1000
1020
  {
1001
1021
  ref: r,
1002
- className: n(
1022
+ className: s(
1003
1023
  "gryt-dialog fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2",
1004
1024
  "flex w-[32rem] max-w-[calc(100vw-3rem)] flex-col gap-4",
1005
1025
  "rounded-(--gryt-radius-lg) border border-gryt-border bg-gryt-surface p-5 text-gryt-text",
1006
- bt,
1026
+ pe,
1007
1027
  "data-starting-style:scale-[0.98] data-starting-style:opacity-0",
1008
1028
  "data-ending-style:scale-[0.98] data-ending-style:opacity-0",
1009
1029
  t
@@ -1012,13 +1032,13 @@ const bt = "transition-[opacity,scale,translate] duration-(--gryt-dur-spring) ea
1012
1032
  }
1013
1033
  );
1014
1034
  }
1015
- ), ie = s(
1035
+ ), wr = l(
1016
1036
  function({ className: t, ...e }, r) {
1017
1037
  return /* @__PURE__ */ o(
1018
- C.Title,
1038
+ j.Title,
1019
1039
  {
1020
1040
  ref: r,
1021
- className: n(
1041
+ className: s(
1022
1042
  "gryt-dialog-title text-base font-semibold text-gryt-text",
1023
1043
  t
1024
1044
  ),
@@ -1026,13 +1046,13 @@ const bt = "transition-[opacity,scale,translate] duration-(--gryt-dur-spring) ea
1026
1046
  }
1027
1047
  );
1028
1048
  }
1029
- ), se = s(
1049
+ ), Nr = l(
1030
1050
  function({ className: t, ...e }, r) {
1031
1051
  return /* @__PURE__ */ o(
1032
- C.Description,
1052
+ j.Description,
1033
1053
  {
1034
1054
  ref: r,
1035
- className: n(
1055
+ className: s(
1036
1056
  "gryt-dialog-description text-sm text-gryt-muted",
1037
1057
  t
1038
1058
  ),
@@ -1040,13 +1060,13 @@ const bt = "transition-[opacity,scale,translate] duration-(--gryt-dur-spring) ea
1040
1060
  }
1041
1061
  );
1042
1062
  }
1043
- ), ce = s(
1063
+ ), Tr = l(
1044
1064
  function({ className: t, ...e }, r) {
1045
1065
  return /* @__PURE__ */ o(
1046
1066
  "div",
1047
1067
  {
1048
1068
  ref: r,
1049
- className: n(
1069
+ className: s(
1050
1070
  "gryt-dialog-footer flex justify-end gap-3",
1051
1071
  t
1052
1072
  ),
@@ -1054,45 +1074,45 @@ const bt = "transition-[opacity,scale,translate] duration-(--gryt-dur-spring) ea
1054
1074
  }
1055
1075
  );
1056
1076
  }
1057
- ), Vo = {
1058
- Root: C.Root,
1059
- Trigger: C.Trigger,
1060
- Portal: C.Portal,
1061
- Close: C.Close,
1062
- Backdrop: ae,
1063
- Popup: ne,
1064
- Title: ie,
1065
- Description: se,
1066
- Footer: ce
1067
- }, le = () => () => {
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 = () => () => {
1068
1088
  };
1069
- function de(a) {
1070
- const t = K(
1089
+ function Sr(n) {
1090
+ const t = It(
1071
1091
  (r) => {
1072
- if (typeof window > "u" || !window.matchMedia) return le();
1073
- const i = window.matchMedia(a);
1074
- 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);
1075
1095
  },
1076
- [a]
1077
- ), e = K(() => typeof window > "u" || !window.matchMedia ? !1 : window.matchMedia(a).matches, [a]);
1078
- return Pt(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);
1079
1099
  }
1080
- const ge = {
1100
+ const $r = {
1081
1101
  left: "left",
1082
1102
  right: "right",
1083
1103
  top: "up",
1084
1104
  bottom: "down"
1085
- }, Y = it("right"), ue = {
1105
+ }, bt = ne("right"), Cr = {
1086
1106
  left: "items-stretch justify-start",
1087
1107
  right: "items-stretch justify-end",
1088
1108
  top: "items-start justify-center",
1089
1109
  bottom: "items-end justify-center"
1090
- }, ye = {
1110
+ }, kr = {
1091
1111
  left: "rounded-r-(--gryt-radius-xl)",
1092
1112
  right: "rounded-l-(--gryt-radius-xl)",
1093
1113
  top: "rounded-b-(--gryt-radius-xl)",
1094
1114
  bottom: "rounded-t-(--gryt-radius-xl)"
1095
- }, me = {
1115
+ }, Rr = {
1096
1116
  left: [
1097
1117
  "h-full w-[calc(20rem+var(--gryt-drawer-bleed))] max-w-[calc(85vw+var(--gryt-drawer-bleed))]",
1098
1118
  "-ml-(--gryt-drawer-bleed) border-r py-5 pr-5 pl-[calc(1.25rem+var(--gryt-drawer-bleed))]",
@@ -1122,41 +1142,41 @@ const ge = {
1122
1142
  "data-ending-style:[transform:translateY(calc(100%-var(--gryt-drawer-bleed)))]"
1123
1143
  ].join(" ")
1124
1144
  };
1125
- function pe({
1126
- side: a = "right",
1145
+ function Ar({
1146
+ side: n = "right",
1127
1147
  sheetOnMobile: t = !0,
1128
1148
  children: e,
1129
1149
  ...r
1130
1150
  }) {
1131
- const i = de("(max-width: 767px)"), c = t && i ? "bottom" : a;
1132
- return /* @__PURE__ */ o(Y.Provider, { value: c, children: /* @__PURE__ */ o(v.Root, { swipeDirection: ge[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 }) });
1133
1153
  }
1134
- const be = s(
1154
+ const Ir = l(
1135
1155
  function({ className: t, ...e }, r) {
1136
- const i = _(Y);
1156
+ const a = ht(bt);
1137
1157
  return /* @__PURE__ */ o(
1138
- v.Viewport,
1158
+ I.Viewport,
1139
1159
  {
1140
1160
  ref: r,
1141
- className: n(
1161
+ className: s(
1142
1162
  // z-50 matters: the popup is no longer positioned itself, so the
1143
1163
  // viewport is what has to sit above the page. Without it a sticky
1144
1164
  // site header renders over the panel.
1145
1165
  "gryt-drawer-viewport fixed inset-0 z-50 flex",
1146
- ue[i],
1166
+ Cr[a],
1147
1167
  t
1148
1168
  ),
1149
1169
  ...e
1150
1170
  }
1151
1171
  );
1152
1172
  }
1153
- ), fe = s(function({ className: t, ...e }, r) {
1154
- const i = _(Y);
1173
+ ), Dr = l(function({ className: t, ...e }, r) {
1174
+ const a = ht(bt);
1155
1175
  return /* @__PURE__ */ o(
1156
- v.Popup,
1176
+ I.Popup,
1157
1177
  {
1158
1178
  ref: r,
1159
- className: n(
1179
+ className: s(
1160
1180
  "gryt-drawer flex flex-col gap-4 border-gryt-border bg-gryt-surface text-gryt-text",
1161
1181
  "overflow-y-auto overscroll-contain outline-none",
1162
1182
  "transition-transform duration-(--gryt-dur-spring-soft) ease-spring-tight",
@@ -1164,19 +1184,19 @@ const be = s(
1164
1184
  // duration here turns a drag into a drag plus lag.
1165
1185
  "data-swiping:duration-0 data-swiping:select-none",
1166
1186
  "motion-reduce:transition-none",
1167
- me[i],
1168
- ye[i],
1187
+ Rr[a],
1188
+ kr[a],
1169
1189
  t
1170
1190
  ),
1171
1191
  ...e
1172
1192
  }
1173
1193
  );
1174
- }), xe = s(function({ className: t, ...e }, r) {
1194
+ }), Lr = l(function({ className: t, ...e }, r) {
1175
1195
  return /* @__PURE__ */ o(
1176
- v.Backdrop,
1196
+ I.Backdrop,
1177
1197
  {
1178
1198
  ref: r,
1179
- className: n(
1199
+ className: s(
1180
1200
  "gryt-drawer-backdrop fixed inset-0 z-50 min-h-dvh bg-black/60",
1181
1201
  "backdrop-blur-(--gryt-backdrop-blur)",
1182
1202
  // Lightens as the panel is dragged away, so letting go halfway does not
@@ -1192,64 +1212,64 @@ const be = s(
1192
1212
  }
1193
1213
  );
1194
1214
  });
1195
- function he({ className: a }) {
1196
- const t = _(Y);
1215
+ function Mr({ className: n }) {
1216
+ const t = ht(bt);
1197
1217
  return t !== "bottom" && t !== "top" ? null : /* @__PURE__ */ o(
1198
1218
  "div",
1199
1219
  {
1200
1220
  "aria-hidden": !0,
1201
- className: n(
1221
+ className: s(
1202
1222
  "gryt-drawer-grabber mx-auto h-1.5 w-10 shrink-0 rounded-(--gryt-radius-full) bg-gryt-border",
1203
1223
  t === "top" && "order-last",
1204
- a
1224
+ n
1205
1225
  )
1206
1226
  }
1207
1227
  );
1208
1228
  }
1209
- const _o = {
1210
- Root: pe,
1211
- Trigger: v.Trigger,
1212
- Portal: v.Portal,
1213
- Backdrop: xe,
1214
- Viewport: be,
1215
- Popup: fe,
1216
- Content: v.Content,
1217
- Grabber: he,
1218
- Close: v.Close,
1219
- Title: v.Title,
1220
- Description: v.Description
1221
- }, we = s(
1222
- 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) {
1223
1243
  return /* @__PURE__ */ o(
1224
- A.Positioner,
1244
+ V.Positioner,
1225
1245
  {
1226
- ref: i,
1246
+ ref: a,
1227
1247
  sideOffset: e,
1228
- className: n("gryt-menu-positioner outline-none", t),
1248
+ className: s("gryt-menu-positioner outline-none", t),
1229
1249
  ...r
1230
1250
  }
1231
1251
  );
1232
1252
  }
1233
- ), ve = s(function({ className: t, ...e }, r) {
1253
+ ), jr = l(function({ className: t, ...e }, r) {
1234
1254
  return /* @__PURE__ */ o(
1235
- A.Popup,
1255
+ V.Popup,
1236
1256
  {
1237
1257
  ref: r,
1238
- className: n(
1258
+ className: s(
1239
1259
  "gryt-menu min-w-44 p-1 outline-none",
1240
- D,
1241
- $,
1260
+ Y,
1261
+ H,
1242
1262
  t
1243
1263
  ),
1244
1264
  ...e
1245
1265
  }
1246
1266
  );
1247
- }), Ne = s(function({ className: t, ...e }, r) {
1267
+ }), Er = l(function({ className: t, ...e }, r) {
1248
1268
  return /* @__PURE__ */ o(
1249
- A.Item,
1269
+ V.Item,
1250
1270
  {
1251
1271
  ref: r,
1252
- className: n(
1272
+ className: s(
1253
1273
  "gryt-menu-item flex cursor-pointer items-center gap-2 rounded-(--gryt-radius-md)",
1254
1274
  "px-3 py-2 text-sm text-gryt-text outline-none select-none",
1255
1275
  // Base UI drives keyboard and pointer highlight through the same
@@ -1261,29 +1281,29 @@ const _o = {
1261
1281
  ...e
1262
1282
  }
1263
1283
  );
1264
- }), Pe = s(function({ className: t, ...e }, r) {
1284
+ }), Hr = l(function({ className: t, ...e }, r) {
1265
1285
  return /* @__PURE__ */ o(
1266
- A.Separator,
1286
+ V.Separator,
1267
1287
  {
1268
1288
  ref: r,
1269
- 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),
1270
1290
  ...e
1271
1291
  }
1272
1292
  );
1273
- }), U = {
1274
- Root: A.Root,
1275
- Trigger: A.Trigger,
1276
- Portal: A.Portal,
1277
- Positioner: we,
1278
- Popup: ve,
1279
- Item: Ne,
1280
- Separator: Pe
1281
- }, Te = 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) {
1282
1302
  return /* @__PURE__ */ o(
1283
- E.Root,
1303
+ dt.Root,
1284
1304
  {
1285
1305
  ref: r,
1286
- className: n(
1306
+ className: s(
1287
1307
  "gryt-tabs",
1288
1308
  // Vertical puts the rail and the panel side by side. min-w-0 on the
1289
1309
  // panel does the rest; without the flex here the panel lands under the
@@ -1294,12 +1314,12 @@ const _o = {
1294
1314
  ...e
1295
1315
  }
1296
1316
  );
1297
- }), ke = s(function({ className: t, ...e }, r) {
1317
+ }), Br = l(function({ className: t, ...e }, r) {
1298
1318
  return /* @__PURE__ */ o(
1299
- E.List,
1319
+ dt.List,
1300
1320
  {
1301
1321
  ref: r,
1302
- className: n(
1322
+ className: s(
1303
1323
  "gryt-tabs-list relative inline-flex items-center gap-1 rounded-(--gryt-radius-full) bg-gryt-surface-raised p-1",
1304
1324
  // A rail, not a pill: rows are full width and the corner radius drops
1305
1325
  // to lg, because a 999px radius on a tall box bows its short edges.
@@ -1311,12 +1331,12 @@ const _o = {
1311
1331
  ...e
1312
1332
  }
1313
1333
  );
1314
- }), Ce = s(function({ className: t, ...e }, r) {
1334
+ }), Fr = l(function({ className: t, ...e }, r) {
1315
1335
  return /* @__PURE__ */ o(
1316
- E.Tab,
1336
+ dt.Tab,
1317
1337
  {
1318
1338
  ref: r,
1319
- className: n(
1339
+ className: s(
1320
1340
  "gryt-tab inline-flex min-h-8 cursor-pointer items-center justify-center whitespace-nowrap",
1321
1341
  "rounded-(--gryt-radius-full) border-0 bg-transparent px-4 py-1.5",
1322
1342
  "text-sm font-medium text-gryt-muted select-none",
@@ -1342,20 +1362,20 @@ const _o = {
1342
1362
  "data-[orientation=vertical]:gap-2.5 data-[orientation=vertical]:px-3",
1343
1363
  "data-[orientation=vertical]:rounded-(--gryt-radius-md)",
1344
1364
  "data-disabled:cursor-not-allowed data-disabled:opacity-50",
1345
- b,
1365
+ P,
1346
1366
  t
1347
1367
  ),
1348
1368
  ...e
1349
1369
  }
1350
1370
  );
1351
- }), Se = s(
1371
+ }), _r = l(
1352
1372
  function({ className: t, ...e }, r) {
1353
1373
  return /* @__PURE__ */ o(
1354
- E.Indicator,
1374
+ dt.Indicator,
1355
1375
  {
1356
1376
  ref: r,
1357
1377
  renderBeforeHydration: !0,
1358
- className: n(
1378
+ className: s(
1359
1379
  "gryt-tabs-indicator absolute top-1 left-0 z-0 h-[calc(100%-0.5rem)]",
1360
1380
  "w-(--active-tab-width) translate-x-(--active-tab-left)",
1361
1381
  "rounded-(--gryt-radius-full) bg-gryt-accent",
@@ -1375,12 +1395,12 @@ const _o = {
1375
1395
  }
1376
1396
  );
1377
1397
  }
1378
- ), $e = s(function({ className: t, ...e }, r) {
1398
+ ), Vr = l(function({ className: t, ...e }, r) {
1379
1399
  return /* @__PURE__ */ o(
1380
- E.Panel,
1400
+ dt.Panel,
1381
1401
  {
1382
1402
  ref: r,
1383
- className: n(
1403
+ className: s(
1384
1404
  "gryt-tabs-panel pt-3 text-sm text-gryt-text",
1385
1405
  // Beside the rail rather than under it, and allowed to shrink so long
1386
1406
  // content wraps instead of pushing the rail off screen.
@@ -1391,49 +1411,49 @@ const _o = {
1391
1411
  ...e
1392
1412
  }
1393
1413
  );
1394
- }), Yo = Object.assign(Te, { List: ke, Tab: Ce, Panel: $e, Indicator: Se }), Re = 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) {
1395
1415
  return /* @__PURE__ */ o(
1396
- F.Root,
1416
+ ct.Root,
1397
1417
  {
1398
1418
  ref: r,
1399
- className: n(
1419
+ className: s(
1400
1420
  "gryt-accordion flex w-full flex-col gap-2 rounded-(--gryt-radius-xl) border border-gryt-border bg-gryt-surface p-2",
1401
1421
  t
1402
1422
  ),
1403
1423
  ...e
1404
1424
  }
1405
1425
  );
1406
- }), Ie = s(
1426
+ }), Yr = l(
1407
1427
  function({ className: t, ...e }, r) {
1408
1428
  return /* @__PURE__ */ o(
1409
- F.Item,
1429
+ ct.Item,
1410
1430
  {
1411
1431
  ref: r,
1412
- className: n("gryt-accordion-item", t),
1432
+ className: s("gryt-accordion-item", t),
1413
1433
  ...e
1414
1434
  }
1415
1435
  );
1416
1436
  }
1417
- ), Ae = s(
1418
- function({ children: t, className: e, expandIcon: r, ...i }, c) {
1419
- return /* @__PURE__ */ o(F.Header, { className: "gryt-accordion-header m-0", children: /* @__PURE__ */ g(
1420
- 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,
1421
1441
  {
1422
1442
  ref: c,
1423
- className: n(
1443
+ className: s(
1424
1444
  "gryt-accordion-trigger flex w-full cursor-pointer items-center justify-between gap-3",
1425
1445
  "rounded-(--gryt-radius-lg) border-0 bg-transparent px-3 py-2.5",
1426
1446
  "text-left text-sm font-medium text-gryt-text select-none",
1427
1447
  "transition-colors duration-150 hover:bg-gryt-surface-raised",
1428
1448
  "data-disabled:cursor-not-allowed data-disabled:opacity-50",
1429
- b,
1449
+ P,
1430
1450
  e
1431
1451
  ),
1432
- ...i,
1452
+ ...a,
1433
1453
  children: [
1434
1454
  t,
1435
1455
  r === void 0 ? /* @__PURE__ */ o(
1436
- It,
1456
+ Ve,
1437
1457
  {
1438
1458
  size: 16,
1439
1459
  className: "shrink-0 transition-transform duration-(--gryt-dur-spring) ease-spring data-panel-open:rotate-180 motion-reduce:transition-none"
@@ -1443,13 +1463,13 @@ const _o = {
1443
1463
  }
1444
1464
  ) });
1445
1465
  }
1446
- ), De = s(
1447
- function({ children: t, className: e, ...r }, i) {
1466
+ ), Xr = l(
1467
+ function({ children: t, className: e, ...r }, a) {
1448
1468
  return /* @__PURE__ */ o(
1449
- F.Panel,
1469
+ ct.Panel,
1450
1470
  {
1451
- ref: i,
1452
- className: n(
1471
+ ref: a,
1472
+ className: s(
1453
1473
  "gryt-accordion-panel overflow-hidden text-sm text-gryt-muted",
1454
1474
  // Base UI measures the panel and exposes the height as a variable,
1455
1475
  // which is what makes a real open and close transition possible.
@@ -1463,105 +1483,105 @@ const _o = {
1463
1483
  }
1464
1484
  );
1465
1485
  }
1466
- ), Ho = Object.assign(Re, { Item: Ie, Trigger: Ae, Panel: De }), Me = s(
1467
- 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) {
1468
1488
  return /* @__PURE__ */ o(
1469
- k.Positioner,
1489
+ G.Positioner,
1470
1490
  {
1471
- ref: i,
1491
+ ref: a,
1472
1492
  sideOffset: e,
1473
- className: n("gryt-context-menu-positioner outline-none", t),
1493
+ className: s("gryt-context-menu-positioner outline-none", t),
1474
1494
  ...r
1475
1495
  }
1476
1496
  );
1477
1497
  }
1478
- ), Oo = {
1479
- Root: k.Root,
1480
- Trigger: k.Trigger,
1481
- Portal: k.Portal,
1482
- Positioner: Me,
1483
- Popup: U.Popup,
1484
- Item: U.Item,
1485
- Separator: U.Separator,
1486
- Group: k.Group,
1487
- GroupLabel: k.GroupLabel,
1488
- SubmenuRoot: k.SubmenuRoot,
1489
- SubmenuTrigger: k.SubmenuTrigger
1490
- }, Ge = s(
1491
- 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) {
1492
1512
  return /* @__PURE__ */ o(
1493
- P.Positioner,
1513
+ L.Positioner,
1494
1514
  {
1495
- ref: i,
1515
+ ref: a,
1496
1516
  sideOffset: e,
1497
- className: n("gryt-popover-positioner outline-none", t),
1517
+ className: s("gryt-popover-positioner outline-none", t),
1498
1518
  ...r
1499
1519
  }
1500
1520
  );
1501
1521
  }
1502
- ), Le = s(
1522
+ ), Jr = l(
1503
1523
  function({ className: t, ...e }, r) {
1504
1524
  return /* @__PURE__ */ o(
1505
- P.Popup,
1525
+ L.Popup,
1506
1526
  {
1507
1527
  ref: r,
1508
- className: n(
1528
+ className: s(
1509
1529
  "gryt-popover max-w-[min(20rem,calc(100vw-2rem))] p-4 outline-none",
1510
- D,
1511
- $,
1530
+ Y,
1531
+ H,
1512
1532
  t
1513
1533
  ),
1514
1534
  ...e
1515
1535
  }
1516
1536
  );
1517
1537
  }
1518
- ), je = s(function({ className: t, ...e }, r) {
1538
+ ), Qr = l(function({ className: t, ...e }, r) {
1519
1539
  return /* @__PURE__ */ o(
1520
- P.Title,
1540
+ L.Title,
1521
1541
  {
1522
1542
  ref: r,
1523
- className: n(
1543
+ className: s(
1524
1544
  "gryt-popover-title text-sm font-semibold text-gryt-text",
1525
1545
  t
1526
1546
  ),
1527
1547
  ...e
1528
1548
  }
1529
1549
  );
1530
- }), ze = s(function({ className: t, ...e }, r) {
1550
+ }), Zr = l(function({ className: t, ...e }, r) {
1531
1551
  return /* @__PURE__ */ o(
1532
- P.Description,
1552
+ L.Description,
1533
1553
  {
1534
1554
  ref: r,
1535
- className: n(
1555
+ className: s(
1536
1556
  "gryt-popover-description mt-1 text-sm leading-6 text-gryt-muted",
1537
1557
  t
1538
1558
  ),
1539
1559
  ...e
1540
1560
  }
1541
1561
  );
1542
- }), Xo = {
1543
- Root: P.Root,
1544
- Trigger: P.Trigger,
1545
- Portal: P.Portal,
1546
- Positioner: Ge,
1547
- Popup: Le,
1548
- Title: je,
1549
- Description: ze,
1550
- Close: P.Close,
1551
- Arrow: P.Arrow
1552
- }, Be = {
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 = {
1553
1573
  neutral: "border-white/8 bg-gryt-surface",
1554
1574
  info: "border-gryt-secondary-6 bg-gryt-secondary-2",
1555
1575
  success: "border-gryt-success-6 bg-gryt-success-2",
1556
1576
  warning: "border-gryt-warning-6 bg-gryt-warning-2",
1557
1577
  danger: "border-gryt-danger-6 bg-gryt-danger-2"
1558
- }, Fe = s(
1578
+ }, tn = l(
1559
1579
  function({ className: t, ...e }, r) {
1560
1580
  return /* @__PURE__ */ o(
1561
- T.Viewport,
1581
+ M.Viewport,
1562
1582
  {
1563
1583
  ref: r,
1564
- className: n(
1584
+ className: s(
1565
1585
  "gryt-toast-viewport fixed right-4 bottom-4 z-50 flex w-[min(22rem,calc(100vw-2rem))]",
1566
1586
  "flex-col gap-2 outline-none",
1567
1587
  t
@@ -1570,12 +1590,12 @@ const _o = {
1570
1590
  }
1571
1591
  );
1572
1592
  }
1573
- ), Ee = s(function({ className: t, severity: e = "neutral", ...r }, i) {
1593
+ ), en = l(function({ className: t, severity: e = "neutral", ...r }, a) {
1574
1594
  return /* @__PURE__ */ o(
1575
- T.Root,
1595
+ M.Root,
1576
1596
  {
1577
- ref: i,
1578
- className: n(
1597
+ ref: a,
1598
+ className: s(
1579
1599
  "gryt-toast relative flex flex-col p-3 pr-9",
1580
1600
  // Not popupSurface. That border is --gryt-border, a solid slate line
1581
1601
  // that is right for a menu anchored to the thing that opened it and too
@@ -1583,7 +1603,7 @@ const _o = {
1583
1603
  // white hairline separates it from the page without drawing a box
1584
1604
  // around it.
1585
1605
  "rounded-(--gryt-radius-xl) border text-gryt-text",
1586
- Be[e],
1606
+ qr[e],
1587
1607
  // Swiping is a pointer gesture, so the toast follows the finger
1588
1608
  // through Base UI's swipe variables before it animates out.
1589
1609
  "transition-[opacity,transform] duration-(--gryt-dur-spring) ease-spring",
@@ -1595,37 +1615,37 @@ const _o = {
1595
1615
  ...r
1596
1616
  }
1597
1617
  );
1598
- }), Ve = s(function({ className: t, ...e }, r) {
1618
+ }), rn = l(function({ className: t, ...e }, r) {
1599
1619
  return /* @__PURE__ */ o(
1600
- T.Title,
1620
+ M.Title,
1601
1621
  {
1602
1622
  ref: r,
1603
- className: n(
1623
+ className: s(
1604
1624
  "gryt-toast-title text-sm font-semibold text-gryt-text",
1605
1625
  t
1606
1626
  ),
1607
1627
  ...e
1608
1628
  }
1609
1629
  );
1610
- }), _e = s(function({ className: t, ...e }, r) {
1630
+ }), nn = l(function({ className: t, ...e }, r) {
1611
1631
  return /* @__PURE__ */ o(
1612
- T.Description,
1632
+ M.Description,
1613
1633
  {
1614
1634
  ref: r,
1615
- className: n(
1635
+ className: s(
1616
1636
  "gryt-toast-description mt-0.5 text-sm leading-6 text-gryt-muted",
1617
1637
  t
1618
1638
  ),
1619
1639
  ...e
1620
1640
  }
1621
1641
  );
1622
- }), Ye = s(function({ className: t, children: e, ...r }, i) {
1642
+ }), on = l(function({ className: t, children: e, ...r }, a) {
1623
1643
  return /* @__PURE__ */ o(
1624
- T.Close,
1644
+ M.Close,
1625
1645
  {
1626
- ref: i,
1646
+ ref: a,
1627
1647
  "aria-label": "Close",
1628
- className: n(
1648
+ className: s(
1629
1649
  "gryt-toast-close absolute top-2.5 right-2.5 inline-flex h-6 w-6 items-center justify-center",
1630
1650
  "rounded-(--gryt-radius-full) border-0 bg-transparent text-gryt-muted",
1631
1651
  "transition-colors hover:bg-white/8 hover:text-gryt-text motion-reduce:transition-none",
@@ -1633,15 +1653,15 @@ const _o = {
1633
1653
  t
1634
1654
  ),
1635
1655
  ...r,
1636
- children: e ?? /* @__PURE__ */ o(ct, { size: 14, weight: "bold" })
1656
+ children: e ?? /* @__PURE__ */ o(Gt, { size: 14, weight: "bold" })
1637
1657
  }
1638
1658
  );
1639
- }), He = s(function({ className: t, ...e }, r) {
1659
+ }), an = l(function({ className: t, ...e }, r) {
1640
1660
  return /* @__PURE__ */ o(
1641
- T.Action,
1661
+ M.Action,
1642
1662
  {
1643
1663
  ref: r,
1644
- className: n(
1664
+ className: s(
1645
1665
  "gryt-toast-action mt-2 self-start rounded-(--gryt-radius-full) border-0",
1646
1666
  "bg-gryt-accent px-3 py-1.5 text-sm font-medium text-gryt-on-accent",
1647
1667
  "transition-[scale] duration-(--gryt-dur-spring) ease-spring",
@@ -1652,33 +1672,33 @@ const _o = {
1652
1672
  ...e
1653
1673
  }
1654
1674
  );
1655
- }), Uo = {
1656
- Provider: T.Provider,
1657
- Portal: T.Portal,
1658
- Viewport: Fe,
1659
- Root: Ee,
1660
- Title: Ve,
1661
- Description: _e,
1662
- Close: Ye,
1663
- Action: He
1664
- }, Ko = T.useToastManager, Oe = 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(
1665
1685
  function({ className: t, ...e }, r) {
1666
1686
  return /* @__PURE__ */ o(
1667
- L.Root,
1687
+ Z.Root,
1668
1688
  {
1669
1689
  ref: r,
1670
- className: n("gryt-scroll-area relative", t),
1690
+ className: s("gryt-scroll-area relative", t),
1671
1691
  ...e
1672
1692
  }
1673
1693
  );
1674
1694
  }
1675
- ), Xe = s(
1695
+ ), ln = l(
1676
1696
  function({ className: t, ...e }, r) {
1677
1697
  return /* @__PURE__ */ o(
1678
- L.Viewport,
1698
+ Z.Viewport,
1679
1699
  {
1680
1700
  ref: r,
1681
- className: n(
1701
+ className: s(
1682
1702
  "gryt-scroll-area-viewport h-full w-full overscroll-contain",
1683
1703
  "focus-visible:outline-2 focus-visible:-outline-offset-1 focus-visible:outline-gryt-accent-light",
1684
1704
  t
@@ -1687,14 +1707,14 @@ const _o = {
1687
1707
  }
1688
1708
  );
1689
1709
  }
1690
- ), Ue = s(
1691
- function({ className: t, orientation: e, ...r }, i) {
1710
+ ), cn = l(
1711
+ function({ className: t, orientation: e, ...r }, a) {
1692
1712
  return /* @__PURE__ */ o(
1693
- L.Scrollbar,
1713
+ Z.Scrollbar,
1694
1714
  {
1695
- ref: i,
1715
+ ref: a,
1696
1716
  orientation: e,
1697
- className: n(
1717
+ className: s(
1698
1718
  "gryt-scroll-area-scrollbar flex touch-none p-0.5 select-none",
1699
1719
  // Fades in on hover or while scrolling rather than sitting there
1700
1720
  // permanently — a chat sidebar is mostly not being scrolled.
@@ -1705,17 +1725,17 @@ const _o = {
1705
1725
  t
1706
1726
  ),
1707
1727
  ...r,
1708
- 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" })
1709
1729
  }
1710
1730
  );
1711
1731
  }
1712
- ), Wo = {
1713
- Root: Oe,
1714
- Viewport: Xe,
1715
- Scrollbar: Ue,
1716
- Content: L.Content,
1717
- Corner: L.Corner
1718
- }, Ke = {
1732
+ ), $a = {
1733
+ Root: sn,
1734
+ Viewport: ln,
1735
+ Scrollbar: cn,
1736
+ Content: Z.Content,
1737
+ Corner: Z.Corner
1738
+ }, dn = {
1719
1739
  primary: [
1720
1740
  "text-gryt-muted hover:not-data-disabled:bg-white/8",
1721
1741
  "data-pressed:bg-gryt-accent data-pressed:text-gryt-on-accent",
@@ -1736,18 +1756,18 @@ const _o = {
1736
1756
  "data-pressed:bg-gryt-danger data-pressed:text-gryt-on-danger",
1737
1757
  "data-pressed:hover:not-data-disabled:bg-gryt-danger"
1738
1758
  ].join(" ")
1739
- }, We = {
1759
+ }, un = {
1740
1760
  xsmall: "h-8 min-w-8 px-2 text-xs",
1741
1761
  small: "h-9 min-w-9 px-2.5 text-sm",
1742
1762
  medium: "h-10 min-w-10 px-3 text-sm",
1743
1763
  large: "h-12 min-w-12 px-4 text-base"
1744
- }, Qo = s(
1745
- 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) {
1746
1766
  return /* @__PURE__ */ o(
1747
- jt,
1767
+ Qe,
1748
1768
  {
1749
1769
  ref: c,
1750
- className: n(
1770
+ className: s(
1751
1771
  "gryt-toggle",
1752
1772
  "inline-flex shrink-0 items-center justify-center gap-2 border-0 bg-transparent",
1753
1773
  "rounded-(--gryt-radius-full) font-medium select-none",
@@ -1755,23 +1775,23 @@ const _o = {
1755
1775
  "transition-[scale,background-color,color] duration-(--gryt-dur-spring) ease-spring",
1756
1776
  "motion-safe:hover:not-data-disabled:scale-[1.06]",
1757
1777
  "motion-safe:active:not-data-disabled:scale-[0.94]",
1758
- b,
1759
- j,
1760
- We[e],
1761
- Ke[r],
1778
+ P,
1779
+ q,
1780
+ un[e],
1781
+ dn[r],
1762
1782
  t
1763
1783
  ),
1764
- ...i
1784
+ ...a
1765
1785
  }
1766
1786
  );
1767
1787
  }
1768
- ), Zo = s(
1788
+ ), gn = l(
1769
1789
  function({ className: t, ...e }, r) {
1770
1790
  return /* @__PURE__ */ o(
1771
- zt,
1791
+ Ze,
1772
1792
  {
1773
1793
  ref: r,
1774
- className: n(
1794
+ className: s(
1775
1795
  "gryt-toggle-group inline-flex items-center gap-1",
1776
1796
  "rounded-(--gryt-radius-full) border border-gryt-border bg-gryt-surface p-1",
1777
1797
  t
@@ -1780,38 +1800,807 @@ const _o = {
1780
1800
  }
1781
1801
  );
1782
1802
  }
1783
- ), Qe = {
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 = {
1784
2573
  primary: "bg-gryt-accent",
1785
2574
  success: "bg-gryt-success",
1786
2575
  warning: "bg-gryt-warning",
1787
2576
  danger: "bg-gryt-danger"
1788
2577
  };
1789
- function Jo({
1790
- className: a,
2578
+ function Ia({
2579
+ className: n,
1791
2580
  value: t,
1792
2581
  label: e,
1793
2582
  showValue: r = !1,
1794
- tone: i = "primary",
2583
+ tone: a = "primary",
1795
2584
  ...c
1796
2585
  }) {
1797
- return /* @__PURE__ */ g(
1798
- B.Root,
2586
+ return /* @__PURE__ */ d(
2587
+ nt.Root,
1799
2588
  {
1800
2589
  value: t,
1801
- 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),
1802
2591
  ...c,
1803
2592
  children: [
1804
- (e || r) && /* @__PURE__ */ g("div", { className: "flex items-baseline justify-between gap-2", children: [
1805
- e ? /* @__PURE__ */ o(B.Label, { className: "text-sm text-gryt-muted", children: e }) : /* @__PURE__ */ o("span", {}),
1806
- 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" })
1807
2596
  ] }),
1808
- /* @__PURE__ */ o(B.Track, { className: "h-1.5 w-full overflow-hidden rounded-(--gryt-radius-full) bg-gryt-surface-raised", children: /* @__PURE__ */ o(
1809
- 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,
1810
2599
  {
1811
- className: n(
2600
+ className: s(
1812
2601
  "h-full rounded-(--gryt-radius-full)",
1813
2602
  "transition-[width] duration-120 ease-out motion-reduce:transition-none",
1814
- Qe[i]
2603
+ In[a]
1815
2604
  )
1816
2605
  }
1817
2606
  ) })
@@ -1819,13 +2608,13 @@ function Jo({
1819
2608
  }
1820
2609
  );
1821
2610
  }
1822
- const Ze = s(
2611
+ const Dn = l(
1823
2612
  function({ className: t, ...e }, r) {
1824
2613
  return /* @__PURE__ */ o(
1825
- S.Popup,
2614
+ E.Popup,
1826
2615
  {
1827
2616
  ref: r,
1828
- className: n(
2617
+ className: s(
1829
2618
  "gryt-alert-dialog fixed top-1/2 left-1/2 z-50 -translate-x-1/2 -translate-y-1/2",
1830
2619
  "flex w-[32rem] max-w-[calc(100vw-3rem)] flex-col gap-4",
1831
2620
  "rounded-(--gryt-radius-lg) border border-gryt-border bg-gryt-surface p-5 text-gryt-text",
@@ -1839,12 +2628,12 @@ const Ze = s(
1839
2628
  }
1840
2629
  );
1841
2630
  }
1842
- ), Je = s(function({ className: t, ...e }, r) {
2631
+ ), Ln = l(function({ className: t, ...e }, r) {
1843
2632
  return /* @__PURE__ */ o(
1844
- S.Backdrop,
2633
+ E.Backdrop,
1845
2634
  {
1846
2635
  ref: r,
1847
- className: n(
2636
+ className: s(
1848
2637
  "gryt-alert-dialog-backdrop fixed inset-0 z-50 min-h-dvh bg-black/60",
1849
2638
  "backdrop-blur-(--gryt-backdrop-blur)",
1850
2639
  "transition-opacity duration-(--gryt-dur-spring) ease-spring motion-reduce:transition-none",
@@ -1854,40 +2643,40 @@ const Ze = s(
1854
2643
  ...e
1855
2644
  }
1856
2645
  );
1857
- }), qe = s(function({ className: t, ...e }, r) {
2646
+ }), Mn = l(function({ className: t, ...e }, r) {
1858
2647
  return /* @__PURE__ */ o(
1859
- S.Title,
2648
+ E.Title,
1860
2649
  {
1861
2650
  ref: r,
1862
- className: n(
2651
+ className: s(
1863
2652
  "gryt-alert-dialog-title text-lg font-semibold text-gryt-text",
1864
2653
  t
1865
2654
  ),
1866
2655
  ...e
1867
2656
  }
1868
2657
  );
1869
- }), tr = s(function({ className: t, ...e }, r) {
2658
+ }), Gn = l(function({ className: t, ...e }, r) {
1870
2659
  return /* @__PURE__ */ o(
1871
- S.Description,
2660
+ E.Description,
1872
2661
  {
1873
2662
  ref: r,
1874
- className: n(
2663
+ className: s(
1875
2664
  "gryt-alert-dialog-description text-sm leading-6 text-gryt-muted",
1876
2665
  t
1877
2666
  ),
1878
2667
  ...e
1879
2668
  }
1880
2669
  );
1881
- }), qo = {
1882
- Root: S.Root,
1883
- Trigger: S.Trigger,
1884
- Portal: S.Portal,
1885
- Backdrop: Je,
1886
- Popup: Ze,
1887
- Title: qe,
1888
- Description: tr,
1889
- Close: S.Close
1890
- }, ft = [
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 = [
1891
2680
  "flex cursor-default items-center gap-2 rounded-(--gryt-radius-md)",
1892
2681
  "px-3 py-2 text-sm text-gryt-text outline-none select-none",
1893
2682
  // Base UI drives keyboard and pointer highlight through one attribute, so
@@ -1895,195 +2684,195 @@ const Ze = s(
1895
2684
  "data-highlighted:bg-gryt-surface-raised",
1896
2685
  "data-selected:text-gryt-accent-11",
1897
2686
  "data-disabled:cursor-not-allowed data-disabled:opacity-50"
1898
- ].join(" "), xt = [
1899
- yt,
1900
- mt.medium,
2687
+ ].join(" "), he = [
2688
+ de,
2689
+ ue.medium,
1901
2690
  "border-gryt-border",
1902
- b
1903
- ].join(" "), er = s(function({ className: t, ...e }, r) {
2691
+ P
2692
+ ].join(" "), jn = l(function({ className: t, ...e }, r) {
1904
2693
  return /* @__PURE__ */ o(
1905
- y.Input,
2694
+ v.Input,
1906
2695
  {
1907
2696
  ref: r,
1908
- className: n("gryt-combobox-input", xt, t),
2697
+ className: s("gryt-combobox-input", he, t),
1909
2698
  ...e
1910
2699
  }
1911
2700
  );
1912
- }), rr = s(function({ className: t, sideOffset: e = 6, ...r }, i) {
2701
+ }), En = l(function({ className: t, sideOffset: e = 6, ...r }, a) {
1913
2702
  return /* @__PURE__ */ o(
1914
- y.Positioner,
2703
+ v.Positioner,
1915
2704
  {
1916
- ref: i,
2705
+ ref: a,
1917
2706
  sideOffset: e,
1918
- className: n("gryt-combobox-positioner outline-none", t),
2707
+ className: s("gryt-combobox-positioner outline-none", t),
1919
2708
  ...r
1920
2709
  }
1921
2710
  );
1922
- }), or = s(
2711
+ }), Hn = l(
1923
2712
  function({ className: t, ...e }, r) {
1924
2713
  return /* @__PURE__ */ o(
1925
- y.Popup,
2714
+ v.Popup,
1926
2715
  {
1927
2716
  ref: r,
1928
- className: n(
2717
+ className: s(
1929
2718
  "gryt-combobox max-h-64 w-(--anchor-width) overflow-y-auto overscroll-contain p-1 outline-none",
1930
- D,
1931
- $,
2719
+ Y,
2720
+ H,
1932
2721
  t
1933
2722
  ),
1934
2723
  ...e
1935
2724
  }
1936
2725
  );
1937
2726
  }
1938
- ), ar = s(function({ className: t, ...e }, r) {
2727
+ ), zn = l(function({ className: t, ...e }, r) {
1939
2728
  return /* @__PURE__ */ o(
1940
- y.Item,
2729
+ v.Item,
1941
2730
  {
1942
2731
  ref: r,
1943
- className: n("gryt-combobox-item", ft, t),
2732
+ className: s("gryt-combobox-item", fe, t),
1944
2733
  ...e
1945
2734
  }
1946
2735
  );
1947
- }), nr = s(function({ className: t, ...e }, r) {
2736
+ }), Bn = l(function({ className: t, ...e }, r) {
1948
2737
  return /* @__PURE__ */ o(
1949
- y.Empty,
2738
+ v.Empty,
1950
2739
  {
1951
2740
  ref: r,
1952
- className: n(
2741
+ className: s(
1953
2742
  "gryt-combobox-empty px-3 py-2 text-sm text-gryt-muted",
1954
2743
  t
1955
2744
  ),
1956
2745
  ...e
1957
2746
  }
1958
2747
  );
1959
- }), ta = {
1960
- Root: y.Root,
1961
- Input: er,
1962
- InputGroup: y.InputGroup,
1963
- Trigger: y.Trigger,
1964
- Icon: y.Icon,
1965
- Clear: y.Clear,
1966
- Value: y.Value,
1967
- Chips: y.Chips,
1968
- Chip: y.Chip,
1969
- ChipRemove: y.ChipRemove,
1970
- Portal: y.Portal,
1971
- Positioner: rr,
1972
- Popup: or,
1973
- List: y.List,
1974
- Item: ar,
1975
- ItemIndicator: y.ItemIndicator,
1976
- Group: y.Group,
1977
- GroupLabel: y.GroupLabel,
1978
- Empty: nr,
1979
- Separator: y.Separator
1980
- }, ir = 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) {
1981
2770
  return /* @__PURE__ */ o(
1982
- p.Input,
2771
+ N.Input,
1983
2772
  {
1984
2773
  ref: r,
1985
- className: n("gryt-autocomplete-input", xt, t),
2774
+ className: s("gryt-autocomplete-input", he, t),
1986
2775
  ...e
1987
2776
  }
1988
2777
  );
1989
- }), sr = s(function({ className: t, sideOffset: e = 6, ...r }, i) {
2778
+ }), _n = l(function({ className: t, sideOffset: e = 6, ...r }, a) {
1990
2779
  return /* @__PURE__ */ o(
1991
- p.Positioner,
2780
+ N.Positioner,
1992
2781
  {
1993
- ref: i,
2782
+ ref: a,
1994
2783
  sideOffset: e,
1995
- className: n("gryt-autocomplete-positioner outline-none", t),
2784
+ className: s("gryt-autocomplete-positioner outline-none", t),
1996
2785
  ...r
1997
2786
  }
1998
2787
  );
1999
- }), cr = s(function({ className: t, ...e }, r) {
2788
+ }), Vn = l(function({ className: t, ...e }, r) {
2000
2789
  return /* @__PURE__ */ o(
2001
- p.Popup,
2790
+ N.Popup,
2002
2791
  {
2003
2792
  ref: r,
2004
- className: n(
2793
+ className: s(
2005
2794
  "gryt-autocomplete max-h-64 w-(--anchor-width) overflow-y-auto overscroll-contain p-1 outline-none",
2006
- D,
2007
- $,
2795
+ Y,
2796
+ H,
2008
2797
  t
2009
2798
  ),
2010
2799
  ...e
2011
2800
  }
2012
2801
  );
2013
- }), lr = s(function({ className: t, ...e }, r) {
2802
+ }), On = l(function({ className: t, ...e }, r) {
2014
2803
  return /* @__PURE__ */ o(
2015
- p.Item,
2804
+ N.Item,
2016
2805
  {
2017
2806
  ref: r,
2018
- className: n("gryt-autocomplete-item", ft, t),
2807
+ className: s("gryt-autocomplete-item", fe, t),
2019
2808
  ...e
2020
2809
  }
2021
2810
  );
2022
- }), dr = s(function({ className: t, ...e }, r) {
2811
+ }), Yn = l(function({ className: t, ...e }, r) {
2023
2812
  return /* @__PURE__ */ o(
2024
- p.Empty,
2813
+ N.Empty,
2025
2814
  {
2026
2815
  ref: r,
2027
- className: n(
2816
+ className: s(
2028
2817
  "gryt-autocomplete-empty px-3 py-2 text-sm text-gryt-muted",
2029
2818
  t
2030
2819
  ),
2031
2820
  ...e
2032
2821
  }
2033
2822
  );
2034
- }), ea = {
2035
- Root: p.Root,
2036
- Input: ir,
2037
- InputGroup: p.InputGroup,
2038
- Trigger: p.Trigger,
2039
- Icon: p.Icon,
2040
- Clear: p.Clear,
2041
- Value: p.Value,
2042
- Portal: p.Portal,
2043
- Positioner: sr,
2044
- Popup: cr,
2045
- List: p.List,
2046
- Item: lr,
2047
- Group: p.Group,
2048
- GroupLabel: p.GroupLabel,
2049
- Empty: dr,
2050
- Separator: p.Separator
2051
- }, ra = 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(
2052
2841
  function({ className: t, ...e }, r) {
2053
2842
  return /* @__PURE__ */ o(
2054
- Bt,
2843
+ qe,
2055
2844
  {
2056
2845
  ref: r,
2057
- className: n("gryt-checkbox-group flex flex-col gap-2", t),
2846
+ className: s("gryt-checkbox-group flex flex-col gap-2", t),
2058
2847
  ...e
2059
2848
  }
2060
2849
  );
2061
2850
  }
2062
- ), gr = s(
2851
+ ), Un = l(
2063
2852
  function({ className: t, ...e }, r) {
2064
2853
  return /* @__PURE__ */ o(
2065
- Q.Trigger,
2854
+ Et.Trigger,
2066
2855
  {
2067
2856
  ref: r,
2068
- className: n(
2857
+ className: s(
2069
2858
  "gryt-collapsible-trigger flex w-full items-center justify-between gap-2",
2070
2859
  "rounded-(--gryt-radius-md) border-0 bg-transparent px-2 py-2 text-left",
2071
2860
  "text-sm font-medium text-gryt-text select-none",
2072
2861
  "transition-colors hover:bg-gryt-surface-raised motion-reduce:transition-none",
2073
- b,
2862
+ P,
2074
2863
  t
2075
2864
  ),
2076
2865
  ...e
2077
2866
  }
2078
2867
  );
2079
2868
  }
2080
- ), ur = s(
2869
+ ), Xn = l(
2081
2870
  function({ className: t, ...e }, r) {
2082
2871
  return /* @__PURE__ */ o(
2083
- Q.Panel,
2872
+ Et.Panel,
2084
2873
  {
2085
2874
  ref: r,
2086
- className: n(
2875
+ className: s(
2087
2876
  "gryt-collapsible-panel overflow-hidden",
2088
2877
  // Base UI measures the panel and exposes the height as a variable, so
2089
2878
  // this animates to the content's real height rather than to a guess.
@@ -2096,26 +2885,26 @@ const Ze = s(
2096
2885
  }
2097
2886
  );
2098
2887
  }
2099
- ), oa = {
2100
- Root: Q.Root,
2101
- Trigger: gr,
2102
- Panel: ur
2103
- }, aa = 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) {
2104
2893
  return /* @__PURE__ */ o(
2105
- Ft,
2894
+ tr,
2106
2895
  {
2107
2896
  ref: r,
2108
- 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),
2109
2898
  ...e
2110
2899
  }
2111
2900
  );
2112
- }), yr = s(
2901
+ }), Kn = l(
2113
2902
  function({ className: t, ...e }, r) {
2114
2903
  return /* @__PURE__ */ o(
2115
- dt.Root,
2904
+ ie.Root,
2116
2905
  {
2117
2906
  ref: r,
2118
- className: n(
2907
+ className: s(
2119
2908
  "gryt-fieldset flex min-w-0 flex-col gap-3 border-0 p-0",
2120
2909
  t
2121
2910
  ),
@@ -2123,25 +2912,25 @@ const Ze = s(
2123
2912
  }
2124
2913
  );
2125
2914
  }
2126
- ), mr = s(function({ className: t, ...e }, r) {
2915
+ ), Wn = l(function({ className: t, ...e }, r) {
2127
2916
  return /* @__PURE__ */ o(
2128
- dt.Legend,
2917
+ ie.Legend,
2129
2918
  {
2130
2919
  ref: r,
2131
- className: n(
2920
+ className: s(
2132
2921
  "gryt-fieldset-legend text-sm font-semibold text-gryt-text",
2133
2922
  t
2134
2923
  ),
2135
2924
  ...e
2136
2925
  }
2137
2926
  );
2138
- }), na = { Root: yr, Legend: mr }, ia = s(
2927
+ }), Ha = { Root: Kn, Legend: Wn }, za = l(
2139
2928
  function({ className: t, ...e }, r) {
2140
2929
  return /* @__PURE__ */ o(
2141
- Et,
2930
+ er,
2142
2931
  {
2143
2932
  ref: r,
2144
- className: n(
2933
+ className: s(
2145
2934
  "gryt-menubar flex items-center gap-1",
2146
2935
  "rounded-(--gryt-radius-md) border border-gryt-border bg-gryt-surface p-1",
2147
2936
  t
@@ -2150,132 +2939,132 @@ const Ze = s(
2150
2939
  }
2151
2940
  );
2152
2941
  }
2153
- ), pr = s(function({ className: t, ...e }, r) {
2942
+ ), Jn = l(function({ className: t, ...e }, r) {
2154
2943
  return /* @__PURE__ */ o(
2155
- w.Trigger,
2944
+ k.Trigger,
2156
2945
  {
2157
2946
  ref: r,
2158
- className: n(
2947
+ className: s(
2159
2948
  "gryt-navigation-menu-trigger flex items-center gap-1.5 rounded-(--gryt-radius-md)",
2160
2949
  "border-0 bg-transparent px-3 py-2 text-sm font-medium text-gryt-text select-none",
2161
2950
  "transition-colors hover:bg-gryt-surface-raised motion-reduce:transition-none",
2162
2951
  "data-popup-open:bg-gryt-surface-raised",
2163
- b,
2952
+ P,
2164
2953
  t
2165
2954
  ),
2166
2955
  ...e
2167
2956
  }
2168
2957
  );
2169
- }), br = s(function({ className: t, ...e }, r) {
2958
+ }), Qn = l(function({ className: t, ...e }, r) {
2170
2959
  return /* @__PURE__ */ o(
2171
- w.Popup,
2960
+ k.Popup,
2172
2961
  {
2173
2962
  ref: r,
2174
- className: n(
2963
+ className: s(
2175
2964
  "gryt-navigation-menu-popup outline-none",
2176
- D,
2177
- $,
2965
+ Y,
2966
+ H,
2178
2967
  t
2179
2968
  ),
2180
2969
  ...e
2181
2970
  }
2182
2971
  );
2183
- }), fr = s(function({ className: t, ...e }, r) {
2972
+ }), Zn = l(function({ className: t, ...e }, r) {
2184
2973
  return /* @__PURE__ */ o(
2185
- w.Positioner,
2974
+ k.Positioner,
2186
2975
  {
2187
2976
  ref: r,
2188
- className: n("gryt-navigation-menu-positioner outline-none", t),
2977
+ className: s("gryt-navigation-menu-positioner outline-none", t),
2189
2978
  ...e
2190
2979
  }
2191
2980
  );
2192
- }), xr = s(function({ className: t, ...e }, r) {
2981
+ }), qn = l(function({ className: t, ...e }, r) {
2193
2982
  return /* @__PURE__ */ o(
2194
- w.Viewport,
2983
+ k.Viewport,
2195
2984
  {
2196
2985
  ref: r,
2197
- className: n(
2986
+ className: s(
2198
2987
  "gryt-navigation-menu-viewport relative overflow-hidden",
2199
2988
  t
2200
2989
  ),
2201
2990
  ...e
2202
2991
  }
2203
2992
  );
2204
- }), hr = s(function({ className: t, ...e }, r) {
2993
+ }), to = l(function({ className: t, ...e }, r) {
2205
2994
  return /* @__PURE__ */ o(
2206
- w.Link,
2995
+ k.Link,
2207
2996
  {
2208
2997
  ref: r,
2209
- className: n(
2998
+ className: s(
2210
2999
  "gryt-navigation-menu-link block rounded-(--gryt-radius-md) px-3 py-2",
2211
3000
  "text-sm text-gryt-text no-underline outline-none",
2212
3001
  "transition-colors hover:bg-gryt-surface-raised motion-reduce:transition-none",
2213
- b,
3002
+ P,
2214
3003
  t
2215
3004
  ),
2216
3005
  ...e
2217
3006
  }
2218
3007
  );
2219
- }), sa = {
2220
- Root: w.Root,
2221
- List: w.List,
2222
- Item: w.Item,
2223
- Trigger: pr,
2224
- Content: w.Content,
2225
- Portal: w.Portal,
2226
- Positioner: fr,
2227
- Viewport: xr,
2228
- Popup: br,
2229
- Link: hr,
2230
- Icon: w.Icon,
2231
- Arrow: w.Arrow
2232
- }, nt = "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", ca = s(
2233
- function({ className: t, label: e, scrubbable: r = !1, ...i }, c) {
2234
- return /* @__PURE__ */ g(
2235
- 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,
2236
3025
  {
2237
3026
  ref: c,
2238
- className: n("gryt-number-field flex flex-col gap-1.5", t),
2239
- ...i,
3027
+ className: s("gryt-number-field flex flex-col gap-1.5", t),
3028
+ ...a,
2240
3029
  children: [
2241
- 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: [
2242
3031
  e,
2243
- /* @__PURE__ */ o(R.ScrubAreaCursor, {})
3032
+ /* @__PURE__ */ o(z.ScrubAreaCursor, {})
2244
3033
  ] }) : /* @__PURE__ */ o("span", { className: "text-sm text-gryt-muted", children: e })),
2245
- /* @__PURE__ */ g(
2246
- R.Group,
3034
+ /* @__PURE__ */ d(
3035
+ z.Group,
2247
3036
  {
2248
- className: n(
3037
+ className: s(
2249
3038
  "flex w-fit items-center overflow-hidden rounded-(--gryt-radius-full)",
2250
3039
  "border border-gryt-border bg-gryt-surface-raised",
2251
3040
  "focus-within:outline-2 focus-within:outline-offset-2 focus-within:outline-gryt-accent-light",
2252
- j
3041
+ q
2253
3042
  ),
2254
3043
  children: [
2255
3044
  /* @__PURE__ */ o(
2256
- R.Decrement,
3045
+ z.Decrement,
2257
3046
  {
2258
3047
  "aria-label": "Decrease",
2259
- className: n(nt, "rounded-l-(--gryt-radius-full)"),
2260
- children: /* @__PURE__ */ o(At, { size: 14, weight: "bold" })
3048
+ className: s(re, "rounded-l-(--gryt-radius-full)"),
3049
+ children: /* @__PURE__ */ o(Ye, { size: 14, weight: "bold" })
2261
3050
  }
2262
3051
  ),
2263
3052
  /* @__PURE__ */ o(
2264
- R.Input,
3053
+ z.Input,
2265
3054
  {
2266
- className: n(
3055
+ className: s(
2267
3056
  "w-16 border-0 bg-transparent px-1 py-2 text-center",
2268
3057
  "font-mono text-sm text-gryt-text tabular-nums outline-none",
2269
- b
3058
+ P
2270
3059
  )
2271
3060
  }
2272
3061
  ),
2273
3062
  /* @__PURE__ */ o(
2274
- R.Increment,
3063
+ z.Increment,
2275
3064
  {
2276
3065
  "aria-label": "Increase",
2277
- className: n(nt, "rounded-r-(--gryt-radius-full)"),
2278
- children: /* @__PURE__ */ o(Dt, { size: 14, weight: "bold" })
3066
+ className: s(re, "rounded-r-(--gryt-radius-full)"),
3067
+ children: /* @__PURE__ */ o(Ue, { size: 14, weight: "bold" })
2279
3068
  }
2280
3069
  )
2281
3070
  ]
@@ -2285,73 +3074,73 @@ const Ze = s(
2285
3074
  }
2286
3075
  );
2287
3076
  }
2288
- ), la = s(
2289
- function({ className: t, length: e = 6, ...r }, i) {
3077
+ ), _a = l(
3078
+ function({ className: t, length: e = 6, ...r }, a) {
2290
3079
  return /* @__PURE__ */ o(
2291
- ot.Root,
3080
+ Ut.Root,
2292
3081
  {
2293
- ref: i,
3082
+ ref: a,
2294
3083
  length: e,
2295
- className: n("gryt-otp-field flex gap-2", t),
3084
+ className: s("gryt-otp-field flex gap-2", t),
2296
3085
  ...r,
2297
- children: Array.from({ length: e }, (c, l) => /* @__PURE__ */ o(
2298
- ot.Input,
3086
+ children: Array.from({ length: e }, (c, m) => /* @__PURE__ */ o(
3087
+ Ut.Input,
2299
3088
  {
2300
- className: n(
3089
+ className: s(
2301
3090
  "gryt-otp-input h-12 w-10 rounded-(--gryt-radius-md) text-center",
2302
3091
  "border border-gryt-border bg-gryt-surface-raised",
2303
3092
  "font-mono text-lg text-gryt-text tabular-nums outline-none",
2304
3093
  "transition-colors duration-(--gryt-dur-fast) motion-reduce:transition-none",
2305
3094
  "data-filled:border-gryt-accent",
2306
- b
3095
+ P
2307
3096
  )
2308
3097
  },
2309
- l
3098
+ m
2310
3099
  ))
2311
3100
  }
2312
3101
  );
2313
3102
  }
2314
- ), wr = s(
2315
- function({ className: t, sideOffset: e = 8, ...r }, i) {
3103
+ ), eo = l(
3104
+ function({ className: t, sideOffset: e = 8, ...r }, a) {
2316
3105
  return /* @__PURE__ */ o(
2317
- M.Positioner,
3106
+ W.Positioner,
2318
3107
  {
2319
- ref: i,
3108
+ ref: a,
2320
3109
  sideOffset: e,
2321
- className: n("gryt-preview-card-positioner outline-none", t),
3110
+ className: s("gryt-preview-card-positioner outline-none", t),
2322
3111
  ...r
2323
3112
  }
2324
3113
  );
2325
3114
  }
2326
- ), vr = s(
3115
+ ), ro = l(
2327
3116
  function({ className: t, ...e }, r) {
2328
3117
  return /* @__PURE__ */ o(
2329
- M.Popup,
3118
+ W.Popup,
2330
3119
  {
2331
3120
  ref: r,
2332
- className: n(
3121
+ className: s(
2333
3122
  "gryt-preview-card w-64 max-w-[calc(100vw-2rem)] p-4 outline-none",
2334
- D,
2335
- $,
3123
+ Y,
3124
+ H,
2336
3125
  t
2337
3126
  ),
2338
3127
  ...e
2339
3128
  }
2340
3129
  );
2341
3130
  }
2342
- ), da = {
2343
- Root: M.Root,
2344
- Trigger: M.Trigger,
2345
- Portal: M.Portal,
2346
- Positioner: wr,
2347
- Popup: vr,
2348
- Arrow: M.Arrow
2349
- }, Nr = 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) {
2350
3139
  return /* @__PURE__ */ o(
2351
- G.Root,
3140
+ J.Root,
2352
3141
  {
2353
3142
  ref: r,
2354
- className: n(
3143
+ className: s(
2355
3144
  "gryt-toolbar flex items-center gap-1",
2356
3145
  "rounded-(--gryt-radius-full) border border-gryt-border bg-gryt-surface p-1",
2357
3146
  t
@@ -2359,113 +3148,121 @@ const Ze = s(
2359
3148
  ...e
2360
3149
  }
2361
3150
  );
2362
- }), Pr = s(function({ className: t, ...e }, r) {
3151
+ }), oo = l(function({ className: t, ...e }, r) {
2363
3152
  return /* @__PURE__ */ o(
2364
- G.Separator,
3153
+ J.Separator,
2365
3154
  {
2366
3155
  ref: r,
2367
- 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),
2368
3157
  ...e
2369
3158
  }
2370
3159
  );
2371
- }), ga = {
2372
- Root: Nr,
2373
- Group: G.Group,
2374
- Button: G.Button,
2375
- Link: G.Link,
2376
- Input: G.Input,
2377
- Separator: Pr
3160
+ }), Oa = {
3161
+ Root: no,
3162
+ Group: J.Group,
3163
+ Button: J.Button,
3164
+ Link: J.Link,
3165
+ Input: J.Input,
3166
+ Separator: oo
2378
3167
  };
2379
3168
  export {
2380
- Ho as Accordion,
2381
- zo as Alert,
2382
- qo as AlertDialog,
2383
- ea as Autocomplete,
2384
- qt as Avatar,
2385
- No as Badge,
2386
- Ht as Button,
2387
- Mo as Card,
2388
- jo as CardActions,
2389
- Lo as CardContent,
2390
- Go as CardHeader,
2391
- To as Checkbox,
2392
- ra as CheckboxGroup,
2393
- Po as Chip,
2394
- oa as Collapsible,
2395
- ta as Combobox,
2396
- wo as Composer,
2397
- Oo as ContextMenu,
2398
- vo as ConversationItem,
2399
- Vo as Dialog,
2400
- Do as Divider,
2401
- _o as Drawer,
2402
- na as Fieldset,
2403
- aa as Form,
2404
- ma as GRYT_HUE_KEYS,
2405
- pa as GRYT_NEUTRAL_KEYS,
2406
- ba as GRYT_RADIUS_KEYS,
2407
- fa as GRYT_THEME_NAME_MAX,
2408
- po as GrytProvider,
2409
- bo as IconButton,
2410
- U as Menu,
2411
- ia as Menubar,
2412
- xo as MessageBubble,
2413
- Jo as Meter,
2414
- sa as NavigationMenu,
2415
- ca as NumberField,
2416
- la as OtpField,
2417
- Xo as Popover,
2418
- da as PreviewCard,
2419
- Bo as Progress,
2420
- ko as Radio,
2421
- Co as RadioGroup,
2422
- Wo as ScrollArea,
2423
- Ro as Select,
2424
- Eo as Skeleton,
2425
- $o as Slider,
2426
- Fo as Spinner,
2427
- fo as Surface,
2428
- So as Switch,
2429
- Ce as Tab,
2430
- Yo as Tabs,
2431
- ho as TextField,
2432
- Uo as Toast,
2433
- Qo as Toggle,
2434
- Zo as ToggleGroup,
2435
- ga as Toolbar,
2436
- Io as Tooltip,
2437
- Ao as TooltipProvider,
2438
- xa as alphaScale,
2439
- Ua as avatarSeed,
2440
- ha as cloneGrytTheme,
2441
- n as cn,
2442
- wa as contrast,
2443
- va as createGrytTheme,
2444
- Na as decodeGrytTheme,
2445
- Pa as encodeGrytTheme,
2446
- Ta as grytAlphaScales,
2447
- ka as grytAlphaScalesLight,
2448
- Ca as grytLightTokens,
2449
- Sa as grytPresets,
2450
- $a as grytPresetsById,
2451
- Ra as grytScales,
2452
- Ia as grytScalesLight,
2453
- Aa as grytTheme,
2454
- Da as grytThemeHues,
2455
- Ma as grytThemeToOptions,
2456
- Ga as grytTokens,
2457
- La as hexToOklch,
2458
- ja as hexToRgb,
2459
- za as hueScale,
2460
- Ba as hueScaleLight,
2461
- Fa as isHexColor,
2462
- Ea as neutralScale,
2463
- Va as neutralScaleLight,
2464
- _a as normalizeHexColor,
2465
- Ya as normalizeThemeName,
2466
- Ha as oklchToHex,
2467
- Oa as rgbToHex,
2468
- de as useMediaQuery,
2469
- Ko 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
2470
3267
  };
2471
3268
  //# sourceMappingURL=index.js.map