@gryt/ui 0.13.1 → 0.14.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,1129 +1,88 @@
1
- import { jsx as o, jsxs as m } from "react/jsx-runtime";
2
- import { Tooltip as G } from "@base-ui/react/tooltip";
3
- import { Button as Se } from "@base-ui/react/button";
4
- import { forwardRef as i, useRef as Re, useCallback as de, useLayoutEffect as Xe, useState as We, useEffect as Ke, useSyncExternalStore as Je, useContext as ue, createContext as Qe } from "react";
5
- import { clsx as Ze } from "clsx";
6
- import { twMerge as qe } from "tailwind-merge";
7
- import { Field as q } from "@base-ui/react/field";
8
- import { PaperPlaneTilt as et, X as $e, Check as Ce, CaretUpDown as tt, CircleNotch as rt, CaretDown as at, Minus as ot, Plus as nt } from "@phosphor-icons/react";
9
- import { Avatar as ae } from "@base-ui/react/avatar";
10
- import { Checkbox as he } from "@base-ui/react/checkbox";
11
- import { Radio as xe } from "@base-ui/react/radio";
12
- import { RadioGroup as st } from "@base-ui/react/radio-group";
13
- import { Switch as we } from "@base-ui/react/switch";
14
- import { Slider as U } from "@base-ui/react/slider";
15
- import { Select as v } from "@base-ui/react/select";
16
- import { Separator as ct } from "@base-ui/react/separator";
17
- import { Progress as oe } from "@base-ui/react/progress";
18
- import { Dialog as M } from "@base-ui/react/dialog";
19
- import { Drawer as k } from "@base-ui/react/drawer";
20
- import { Menu as j } from "@base-ui/react/menu";
21
- import { Tabs as Z } from "@base-ui/react/tabs";
22
- import { Accordion as K } from "@base-ui/react/accordion";
23
- import { ContextMenu as A } from "@base-ui/react/context-menu";
24
- import { Popover as R } from "@base-ui/react/popover";
25
- import { Toast as C } from "@base-ui/react/toast";
26
- import { ScrollArea as _ } from "@base-ui/react/scroll-area";
27
- import { Toggle as it } from "@base-ui/react/toggle";
28
- import { ToggleGroup as dt } from "@base-ui/react/toggle-group";
29
- import { Meter as O } from "@base-ui/react/meter";
30
- import { AlertDialog as I } from "@base-ui/react/alert-dialog";
31
- import { Autocomplete as h } from "@base-ui/react/autocomplete";
32
- import { Combobox as b } from "@base-ui/react/combobox";
33
- import { CheckboxGroup as lt } from "@base-ui/react/checkbox-group";
34
- import { Collapsible as ge } from "@base-ui/react/collapsible";
35
- import { Form as ut } from "@base-ui/react/form";
36
- import { Fieldset as Ae } from "@base-ui/react/fieldset";
37
- import { Menubar as gt } from "@base-ui/react/menubar";
38
- import { NavigationMenu as N } from "@base-ui/react/navigation-menu";
39
- import { NumberField as D } from "@base-ui/react/number-field";
40
- import { OTPField as ve } from "@base-ui/react/otp-field";
41
- import { PreviewCard as z } from "@base-ui/react/preview-card";
42
- import { Toolbar as B } from "@base-ui/react/toolbar";
43
- function Me(a) {
44
- return a <= 0.04045 ? a / 12.92 : ((a + 0.055) / 1.055) ** 2.4;
45
- }
46
- function ne(a) {
47
- return a <= 31308e-7 ? 12.92 * a : 1.055 * a ** (1 / 2.4) - 0.055;
48
- }
49
- function Y(a) {
50
- return Math.min(1, Math.max(0, a));
51
- }
52
- function X(a) {
53
- const t = a.replace("#", ""), r = t.length === 3 ? t.split("").map((e) => e + e).join("") : t;
54
- return [
55
- parseInt(r.slice(0, 2), 16) / 255,
56
- parseInt(r.slice(2, 4), 16) / 255,
57
- parseInt(r.slice(4, 6), 16) / 255
58
- ];
59
- }
60
- function Ie([a, t, r]) {
61
- const e = (n) => Math.round(Y(n) * 255).toString(16).padStart(2, "0");
62
- return `#${e(a)}${e(t)}${e(r)}`;
63
- }
64
- function J(a) {
65
- const [t, r, e] = X(a).map(Me), n = Math.cbrt(
66
- 0.4122214708 * t + 0.5363325363 * r + 0.0514459929 * e
67
- ), c = Math.cbrt(
68
- 0.2119034982 * t + 0.6806995451 * r + 0.1073969566 * e
69
- ), d = Math.cbrt(
70
- 0.0883024619 * t + 0.2817188376 * r + 0.6299787005 * e
71
- ), l = 0.2104542553 * n + 0.793617785 * c - 0.0040720468 * d, g = 1.9779984951 * n - 2.428592205 * c + 0.4505937099 * d, y = 0.0259040371 * n + 0.7827717662 * c - 0.808675766 * d;
72
- return {
73
- l,
74
- c: Math.hypot(g, y),
75
- h: (Math.atan2(y, g) * 180 / Math.PI + 360) % 360
76
- };
77
- }
78
- function $({ l: a, c: t, h: r }) {
79
- const e = t * Math.cos(r * Math.PI / 180), n = t * Math.sin(r * Math.PI / 180), c = (a + 0.3963377774 * e + 0.2158037573 * n) ** 3, d = (a - 0.1055613458 * e - 0.0638541728 * n) ** 3, l = (a - 0.0894841775 * e - 1.291485548 * n) ** 3;
80
- return Ie([
81
- ne(Y(4.0767416621 * c - 3.3077115913 * d + 0.2309699292 * l)),
82
- ne(Y(-1.2684380046 * c + 2.6097574011 * d - 0.3413193965 * l)),
83
- ne(Y(-0.0041960863 * c - 0.7034186147 * d + 1.707614701 * l))
84
- ]);
85
- }
86
- const ft = [0.195, 0.24, 0.27, 0.3, 0.33, 0.37, 0.43, 0.52], yt = [0.014, 0.026, 0.04, 0.052, 0.062, 0.072, 0.084, 0.1];
87
- function L(a, t) {
88
- const { h: r } = J(a), e = ft.map((l, g) => $({ l, c: yt[g], h: r }));
89
- e.push(a, t);
90
- const n = J(t).l, c = Math.min(0.95, Math.max(0.84, n + 0.04)), d = Math.min(0.98, Math.max(c + 0.06, 0.93));
91
- return e.push($({ l: c, c: 0.11, h: r })), e.push($({ l: d, c: 0.055, h: r })), e;
92
- }
93
- const mt = [
94
- 0.187,
95
- 0.231,
96
- 0.245,
97
- 0.268,
98
- 0.289,
99
- 0.31,
100
- 0.355,
101
- 0.425,
102
- 0.52,
103
- 0.57,
104
- 0.627,
105
- 0.908
106
- ], pt = [
107
- 0.011,
108
- 0.014,
109
- 0.016,
110
- 0.019,
111
- 0.022,
112
- 0.024,
113
- 0.026,
114
- 0.026,
115
- 0.02,
116
- 0.012,
117
- 0,
118
- 8e-3
119
- ];
120
- function He(a) {
121
- const t = {
122
- 0: a.bg,
123
- 1: a.surface,
124
- 2: a.surfaceRaised,
125
- 5: a.border,
126
- 10: a.muted,
127
- 11: a.text
128
- }, r = J(a.border).h;
129
- return mt.map(
130
- (e, n) => t[n] ?? $({ l: e, c: pt[n], h: r })
131
- );
132
- }
133
- function Q(a, t) {
134
- const r = X(t);
135
- return a.map((e) => {
136
- const n = X(e);
137
- let c = 0;
138
- for (let f = 0; f < 3; f++) {
139
- const p = n[f], P = r[f];
140
- p > P ? c = Math.max(c, P < 1 ? (p - P) / (1 - P) : 0) : p < P && (c = Math.max(c, P > 0 ? (P - p) / P : 0));
141
- }
142
- if (c < 1e-6) return "transparent";
143
- const d = Ie(
144
- n.map((f, p) => Y(r[p] + (f - r[p]) / c))
145
- ), [l, g, y] = X(d).map((f) => Math.round(f * 255));
146
- return `rgb(${l} ${g} ${y} / ${(c * 100).toFixed(1)}%)`;
147
- });
148
- }
149
- const bt = [
150
- 0.962,
151
- 1,
152
- 0.978,
153
- 0.952,
154
- 0.928,
155
- 0.898,
156
- 0.855,
157
- 0.79,
158
- 0.66,
159
- 0.61,
160
- 0.48,
161
- 0.25
162
- ], ht = [
163
- 6e-3,
164
- 0,
165
- 4e-3,
166
- 7e-3,
167
- 0.01,
168
- 0.013,
169
- 0.016,
170
- 0.018,
171
- 0.016,
172
- 0.014,
173
- 0.012,
174
- 0.014
175
- ], xt = [0.975, 0.955, 0.93, 0.905, 0.878, 0.845, 0.795, 0.72], wt = [0.012, 0.024, 0.038, 0.05, 0.062, 0.074, 0.09, 0.11];
176
- function De(a) {
177
- const t = {
178
- 0: a.bg,
179
- 1: a.surface,
180
- 2: a.surfaceRaised,
181
- 5: a.border,
182
- 10: a.muted,
183
- 11: a.text
184
- }, r = J(a.border).h;
185
- return bt.map(
186
- (e, n) => t[n] ?? $({ l: e, c: ht[n], h: r })
187
- );
188
- }
189
- function S(a) {
190
- const { l: t, c: r, h: e } = J(a), n = xt.map(
191
- (c, d) => $({ l: c, c: wt[d], h: e })
192
- );
193
- return n.push(a), n.push($({ l: Math.max(0, t - 0.07), c: r, h: e })), n.push($({ l: 0.46, c: 0.15, h: e })), n.push($({ l: 0.33, c: 0.1, h: e })), n;
194
- }
195
- function Ne(a) {
196
- const [t, r, e] = X(a).map(Me);
197
- return 0.2126 * t + 0.7152 * r + 0.0722 * e;
198
- }
199
- function eo(a, t) {
200
- const r = Ne(a), e = Ne(t);
201
- return (Math.max(r, e) + 0.05) / (Math.min(r, e) + 0.05);
202
- }
203
- const u = {
204
- color: {
205
- bg: "#111318",
206
- surface: "#1a1d24",
207
- surfaceRaised: "#1e2028",
208
- surfaceHover: "#334155",
209
- border: "#2b303d",
210
- text: "#e0e0e6",
211
- muted: "#888888",
212
- accent: "#968ff8",
213
- accentLight: "#b4afff",
214
- secondary: "#7dd3fc",
215
- secondaryLight: "#bae6fd",
216
- success: "#4ade80",
217
- danger: "#f87171",
218
- dangerLight: "#fca5a5",
219
- warning: "#fbbf24",
220
- // The fill's own hue, dark enough to clear 7:1 against it. See the note in
221
- // theme.css: these are the only text in the library that always sits on a
222
- // saturated colour, so they are held to AAA rather than AA.
223
- onAccent: "#0c0a20",
224
- onSecondary: "#02121a",
225
- onDanger: "#1f0405"
226
- },
227
- radius: {
228
- sm: 8,
229
- md: 12,
230
- lg: 20,
231
- xl: 28,
232
- full: 999
233
- }
234
- }, T = {
235
- bg: "#f1f2f7",
236
- surface: "#ffffff",
237
- surfaceRaised: "#f7f8fb",
238
- border: "#dadde6",
239
- muted: "#5b5d65",
240
- text: "#1f2129"
241
- }, Pe = {
242
- neutral: He({
243
- bg: u.color.bg,
244
- surface: u.color.surface,
245
- surfaceRaised: u.color.surfaceRaised,
246
- border: u.color.border,
247
- muted: u.color.muted,
248
- text: u.color.text
249
- }),
250
- accent: L(u.color.accent, u.color.accentLight),
251
- secondary: L(
252
- u.color.secondary,
253
- u.color.secondaryLight
254
- ),
255
- success: L(u.color.success, u.color.success),
256
- danger: L(u.color.danger, u.color.dangerLight),
257
- warning: L(u.color.warning, u.color.warning)
258
- }, le = {
259
- neutral: De(T),
260
- accent: S(u.color.accent),
261
- secondary: S(u.color.secondary),
262
- success: S(u.color.success),
263
- danger: S(u.color.danger),
264
- warning: S(u.color.warning)
265
- }, Ge = le.neutral[3], to = {
266
- neutral: Q(Pe.neutral, u.color.bg),
267
- accent: Q(Pe.accent, u.color.bg)
268
- }, ro = {
269
- neutral: Q(le.neutral, T.bg),
270
- accent: Q(le.accent, T.bg)
271
- };
272
- function vt(a = {}) {
273
- const t = a.appearance === "light", e = { ...t ? {
274
- ...u.color,
275
- ...T,
276
- surfaceHover: Ge
277
- } : u.color, ...a.color }, n = { ...u.radius, ...a.radius }, c = {
278
- bg: e.bg,
279
- surface: e.surface,
280
- surfaceRaised: e.surfaceRaised,
281
- border: e.border,
282
- muted: e.muted,
283
- text: e.text
284
- }, d = t ? {
285
- neutral: De(c),
286
- accent: S(e.accent),
287
- secondary: S(e.secondary),
288
- success: S(e.success),
289
- danger: S(e.danger),
290
- warning: S(e.warning)
291
- } : {
292
- neutral: He(c),
293
- accent: L(e.accent, e.accentLight),
294
- secondary: L(e.secondary, e.secondaryLight),
295
- success: L(e.success, e.success),
296
- danger: L(e.danger, e.dangerLight),
297
- warning: L(e.warning, e.warning)
298
- }, l = {};
299
- for (const [g, y] of Object.entries(d))
300
- y.forEach((f, p) => {
301
- l[`--gryt-${g}-${p + 1}`] = f, l[`--color-gryt-${g}-${p + 1}`] = f;
302
- });
303
- for (const g of ["neutral", "accent"])
304
- Q(d[g], e.bg).forEach((y, f) => {
305
- l[`--gryt-${g}-a${f + 1}`] = y, l[`--color-gryt-${g}-a${f + 1}`] = y;
306
- });
307
- return {
308
- ...l,
309
- "--gryt-bg": e.bg,
310
- "--gryt-surface": e.surface,
311
- "--gryt-surface-raised": e.surfaceRaised,
312
- "--gryt-surface-hover": e.surfaceHover,
313
- "--gryt-border": e.border,
314
- "--gryt-text": e.text,
315
- "--gryt-muted": e.muted,
316
- "--gryt-accent": e.accent,
317
- "--gryt-accent-light": e.accentLight,
318
- "--gryt-secondary": e.secondary,
319
- "--gryt-secondary-light": e.secondaryLight,
320
- "--gryt-success": e.success,
321
- "--gryt-danger": e.danger,
322
- "--gryt-danger-light": e.dangerLight,
323
- "--gryt-warning": e.warning,
324
- "--gryt-on-accent": e.onAccent,
325
- "--gryt-on-secondary": e.onSecondary,
326
- "--gryt-on-danger": e.onDanger,
327
- // Tailwind's @theme emits --color-* names, and the utilities compile
328
- // against those. Both sets have to move together or an override would
329
- // change the raw var but not bg-gryt-accent.
330
- "--color-gryt-bg": e.bg,
331
- "--color-gryt-surface": e.surface,
332
- "--color-gryt-surface-raised": e.surfaceRaised,
333
- "--color-gryt-surface-hover": e.surfaceHover,
334
- "--color-gryt-border": e.border,
335
- "--color-gryt-text": e.text,
336
- "--color-gryt-muted": e.muted,
337
- "--color-gryt-accent": e.accent,
338
- "--color-gryt-accent-light": e.accentLight,
339
- "--color-gryt-secondary": e.secondary,
340
- "--color-gryt-secondary-light": e.secondaryLight,
341
- "--color-gryt-success": e.success,
342
- "--color-gryt-danger": e.danger,
343
- "--color-gryt-danger-light": e.dangerLight,
344
- "--color-gryt-warning": e.warning,
345
- "--color-gryt-on-accent": e.onAccent,
346
- "--color-gryt-on-secondary": e.onSecondary,
347
- "--color-gryt-on-danger": e.onDanger,
348
- "--gryt-radius-sm": `${n.sm}px`,
349
- "--gryt-radius-md": `${n.md}px`,
350
- "--gryt-radius-lg": `${n.lg}px`,
351
- "--gryt-radius-xl": `${n.xl}px`,
352
- "--gryt-radius-full": `${n.full}px`
353
- };
354
- }
355
- function Nt(a) {
1
+ import { jsx as o, jsxs as d } from "react/jsx-runtime";
2
+ import { Tooltip as I } from "@base-ui/react/tooltip";
3
+ import { createGrytTheme as bt } from "./theme.js";
4
+ import { GRYT_HUE_KEYS as ca, GRYT_NEUTRAL_KEYS as la, GRYT_RADIUS_KEYS as da, GRYT_THEME_NAME_MAX as ga, alphaScale as ua, cloneGrytTheme as ya, contrast as pa, decodeGrytTheme as ma, encodeGrytTheme as ba, grytAlphaScales as fa, grytAlphaScalesLight as xa, grytLightTokens as ha, grytPresets as wa, grytPresetsById as va, grytScales as Na, grytScalesLight as Pa, grytTheme as Ta, grytThemeHues as ka, grytThemeToOptions as Ca, grytTokens as Sa, hexToOklch as $a, hexToRgb as Ra, hueScale as Ia, hueScaleLight as Aa, isHexColor as Da, neutralScale as Ma, neutralScaleLight as Ga, normalizeHexColor as La, normalizeThemeName as ja, oklchToHex as Ba, rgbToHex as za } from "./theme.js";
5
+ import { Button as nt } from "@base-ui/react/button";
6
+ import { forwardRef as s, useRef as it, useCallback as U, useLayoutEffect as ft, useState as xt, useEffect as ht, useSyncExternalStore as wt, useContext as K, createContext as vt } from "react";
7
+ import { clsx as Nt } from "clsx";
8
+ import { twMerge as Pt } from "tailwind-merge";
9
+ import { Field as V } from "@base-ui/react/field";
10
+ import { PaperPlaneTilt as Tt, X as st, Check as ct, CaretUpDown as kt, CircleNotch as Ct, CaretDown as St, Minus as $t, Plus as Rt } from "@phosphor-icons/react";
11
+ import { Avatar as H } from "@base-ui/react/avatar";
12
+ import { Checkbox as q } from "@base-ui/react/checkbox";
13
+ import { Radio as tt } from "@base-ui/react/radio";
14
+ import { RadioGroup as It } from "@base-ui/react/radio-group";
15
+ import { Switch as et } from "@base-ui/react/switch";
16
+ import { Slider as B } from "@base-ui/react/slider";
17
+ import { Select as x } from "@base-ui/react/select";
18
+ import { Separator as At } from "@base-ui/react/separator";
19
+ import { Progress as O } from "@base-ui/react/progress";
20
+ import { Dialog as C } from "@base-ui/react/dialog";
21
+ import { Drawer as v } from "@base-ui/react/drawer";
22
+ import { Menu as A } from "@base-ui/react/menu";
23
+ import { Tabs as E } from "@base-ui/react/tabs";
24
+ import { Accordion as F } from "@base-ui/react/accordion";
25
+ import { ContextMenu as k } from "@base-ui/react/context-menu";
26
+ import { Popover as P } from "@base-ui/react/popover";
27
+ import { Toast as T } from "@base-ui/react/toast";
28
+ import { ScrollArea as L } from "@base-ui/react/scroll-area";
29
+ import { Toggle as Dt } from "@base-ui/react/toggle";
30
+ import { ToggleGroup as Mt } from "@base-ui/react/toggle-group";
31
+ import { Meter as z } from "@base-ui/react/meter";
32
+ import { AlertDialog as S } from "@base-ui/react/alert-dialog";
33
+ import { Autocomplete as m } from "@base-ui/react/autocomplete";
34
+ import { Combobox as g } from "@base-ui/react/combobox";
35
+ import { CheckboxGroup as Gt } from "@base-ui/react/checkbox-group";
36
+ import { Collapsible as W } from "@base-ui/react/collapsible";
37
+ import { Form as Lt } from "@base-ui/react/form";
38
+ import { Fieldset as lt } from "@base-ui/react/fieldset";
39
+ import { Menubar as jt } from "@base-ui/react/menubar";
40
+ import { NavigationMenu as h } from "@base-ui/react/navigation-menu";
41
+ import { NumberField as R } from "@base-ui/react/number-field";
42
+ import { OTPField as rt } from "@base-ui/react/otp-field";
43
+ import { PreviewCard as M } from "@base-ui/react/preview-card";
44
+ import { Toolbar as G } from "@base-ui/react/toolbar";
45
+ function Bt(a) {
356
46
  return Object.keys(a).some((t) => t.startsWith("--"));
357
47
  }
358
- function ao({
48
+ function co({
359
49
  children: a,
360
50
  className: t,
361
- theme: r,
362
- tooltipDelay: e = 400
51
+ theme: e,
52
+ tooltipDelay: r = 400
363
53
  }) {
364
- const n = r === void 0 ? void 0 : Nt(r) ? r : vt(r);
365
- return /* @__PURE__ */ o("div", { className: t, style: n, children: /* @__PURE__ */ o(G.Provider, { delay: e, children: a }) });
366
- }
367
- const ee = [
368
- "accent",
369
- "accentLight",
370
- "secondary",
371
- "secondaryLight",
372
- "success",
373
- "danger",
374
- "dangerLight",
375
- "warning",
376
- "onAccent",
377
- "onSecondary",
378
- "onDanger"
379
- ], je = [
380
- "bg",
381
- "surface",
382
- "surfaceRaised",
383
- "surfaceHover",
384
- "border",
385
- "muted",
386
- "text"
387
- ], fe = ["sm", "md", "lg", "xl", "full"], Pt = 60;
388
- function ye(a) {
389
- return a.replace(/\s+/g, " ").trim().slice(0, Pt);
390
- }
391
- const F = {
392
- hue: {
393
- accent: u.color.accent,
394
- accentLight: u.color.accentLight,
395
- secondary: u.color.secondary,
396
- secondaryLight: u.color.secondaryLight,
397
- success: u.color.success,
398
- danger: u.color.danger,
399
- dangerLight: u.color.dangerLight,
400
- warning: u.color.warning,
401
- onAccent: u.color.onAccent,
402
- onSecondary: u.color.onSecondary,
403
- onDanger: u.color.onDanger
404
- },
405
- lightHue: null,
406
- dark: {
407
- bg: u.color.bg,
408
- surface: u.color.surface,
409
- surfaceRaised: u.color.surfaceRaised,
410
- surfaceHover: u.color.surfaceHover,
411
- border: u.color.border,
412
- muted: u.color.muted,
413
- text: u.color.text
414
- },
415
- light: {
416
- bg: T.bg,
417
- surface: T.surface,
418
- surfaceRaised: T.surfaceRaised,
419
- surfaceHover: Ge,
420
- border: T.border,
421
- muted: T.muted,
422
- text: T.text
423
- },
424
- radius: { ...u.radius }
425
- };
426
- function Ee(a) {
427
- return {
428
- ...a.name === void 0 ? {} : { name: a.name },
429
- hue: { ...a.hue },
430
- lightHue: a.lightHue === null ? null : { ...a.lightHue },
431
- dark: { ...a.dark },
432
- light: { ...a.light },
433
- radius: { ...a.radius }
434
- };
435
- }
436
- function kt(a, t) {
437
- return t === "light" && a.lightHue !== null ? a.lightHue : a.hue;
438
- }
439
- function oo(a, t) {
440
- return {
441
- appearance: t,
442
- color: { ...kt(a, t), ...a[t] },
443
- radius: { ...a.radius }
444
- };
445
- }
446
- const W = {
447
- accent: "accent",
448
- accentLight: "accent-light",
449
- secondary: "secondary",
450
- secondaryLight: "secondary-light",
451
- success: "success",
452
- danger: "danger",
453
- dangerLight: "danger-light",
454
- warning: "warning",
455
- onAccent: "on-accent",
456
- onSecondary: "on-secondary",
457
- onDanger: "on-danger"
458
- }, ze = {
459
- bg: "bg",
460
- surface: "surface",
461
- surfaceRaised: "raised",
462
- surfaceHover: "hover",
463
- border: "border",
464
- muted: "muted",
465
- text: "text"
466
- }, Tt = /^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;
467
- function Be(a) {
468
- return Tt.test(a.trim());
469
- }
470
- function me(a) {
471
- const t = a.trim().toLowerCase();
472
- return t.length === 4 ? `#${t[1]}${t[1]}${t[2]}${t[2]}${t[3]}${t[3]}` : t;
473
- }
474
- function no(a, t) {
475
- const r = new URLSearchParams(), e = (c) => me(c).slice(1), n = ye(a.name ?? "");
476
- n !== "" && r.set("name", n);
477
- for (const c of ee)
478
- a.hue[c] !== F.hue[c] && r.set(W[c], e(a.hue[c]));
479
- if (a.lightHue !== null)
480
- for (const c of ee)
481
- r.set(`lh-${W[c]}`, e(a.lightHue[c]));
482
- for (const c of ["dark", "light"]) {
483
- const d = c === "dark" ? "d" : "l";
484
- for (const l of je)
485
- a[c][l] !== F[c][l] && r.set(`${d}-${ze[l]}`, e(a[c][l]));
486
- }
487
- for (const c of fe)
488
- a.radius[c] !== F.radius[c] && r.set(`r-${c}`, String(a.radius[c]));
489
- return t === "light" && r.set("mode", "light"), r;
54
+ const i = e === void 0 ? void 0 : Bt(e) ? e : bt(e);
55
+ return /* @__PURE__ */ o("div", { className: t, style: i, children: /* @__PURE__ */ o(I.Provider, { delay: r, children: a }) });
490
56
  }
491
- function so(a) {
492
- const t = a.trim();
493
- if (t === "") return null;
494
- if (t.startsWith("{")) return St(t);
495
- const r = t.includes("?") ? t.slice(t.indexOf("?") + 1) : t;
496
- return Lt(new URLSearchParams(r));
57
+ function n(...a) {
58
+ return Pt(Nt(a));
497
59
  }
498
- function Lt(a) {
499
- const t = Ee(F);
500
- let r = !1;
501
- const e = (c) => {
502
- const d = a.get(c);
503
- if (d === null) return null;
504
- const l = d.startsWith("#") ? d : `#${d}`;
505
- return Be(l) ? (r = !0, me(l)) : null;
506
- }, n = ye(a.get("name") ?? "");
507
- n !== "" && (t.name = n, r = !0);
508
- for (const c of ee) {
509
- const d = e(W[c]);
510
- d !== null && (t.hue[c] = d);
511
- }
512
- if (a.has(`lh-${W.accent}`)) {
513
- const c = { ...t.hue };
514
- for (const d of ee) {
515
- const l = e(`lh-${W[d]}`);
516
- l !== null && (c[d] = l);
517
- }
518
- t.lightHue = c;
519
- }
520
- for (const c of ["dark", "light"]) {
521
- const d = c === "dark" ? "d" : "l";
522
- for (const l of je) {
523
- const g = e(`${d}-${ze[l]}`);
524
- g !== null && (t[c][l] = g);
525
- }
526
- }
527
- for (const c of fe) {
528
- const d = Number(a.get(`r-${c}`));
529
- Number.isFinite(d) && d >= 0 && d <= 999 && a.has(`r-${c}`) && (t.radius[c] = Math.round(d), r = !0);
530
- }
531
- return r ? {
532
- theme: t,
533
- appearance: a.get("mode") === "light" ? "light" : "dark"
534
- } : null;
535
- }
536
- function St(a) {
537
- let t;
538
- try {
539
- t = JSON.parse(a);
540
- } catch {
541
- return null;
542
- }
543
- if (typeof t != "object" || t === null) return null;
544
- const r = t, e = Ee(F);
545
- let n = !1;
546
- const c = (d, l) => {
547
- if (!(typeof d != "object" || d === null))
548
- for (const [g, y] of Object.entries(d))
549
- typeof y == "string" && Be(y) && g in l && (l[g] = me(y), n = !0);
550
- };
551
- if (typeof r.name == "string") {
552
- const d = ye(r.name);
553
- d !== "" && (e.name = d, n = !0);
554
- }
555
- if (c(r.hue, e.hue), c(r.dark, e.dark), c(r.light, e.light), typeof r.lightHue == "object" && r.lightHue !== null) {
556
- const d = { ...e.hue };
557
- c(r.lightHue, d), e.lightHue = d;
558
- }
559
- if (typeof r.radius == "object" && r.radius !== null)
560
- for (const [d, l] of Object.entries(
561
- r.radius
562
- )) {
563
- const g = Number(l);
564
- fe.includes(d) && Number.isFinite(g) && g >= 0 && g <= 999 && (e.radius[d] = Math.round(g), n = !0);
565
- }
566
- return n ? { theme: e, appearance: "dark" } : null;
567
- }
568
- const se = { sm: 8, md: 12, lg: 20, xl: 28, full: 999 }, ce = { sm: 6, md: 8, lg: 14, xl: 18, full: 999 }, Rt = { sm: 4, md: 6, lg: 10, xl: 14, full: 6 }, $t = { sm: 6, md: 8, lg: 10, xl: 14, full: 10 }, ke = { sm: 2, md: 4, lg: 6, xl: 8, full: 4 }, Ct = [
569
- {
570
- id: "gryt",
571
- name: "Gryt",
572
- note: "What the library ships, from the Gryt code-theme.",
573
- group: "Gryt",
574
- source: "github.com/Gryt-chat/code-theme",
575
- theme: F
576
- },
577
- {
578
- id: "ember",
579
- name: "Ember",
580
- note: "Warm all the way down — the neutrals are brown, not blue.",
581
- group: "Gryt",
582
- theme: {
583
- name: "Ember",
584
- hue: {
585
- accent: "#f0803c",
586
- accentLight: "#ff9f66",
587
- secondary: "#d9a441",
588
- secondaryLight: "#ecc06a",
589
- success: "#8bb056",
590
- danger: "#e35d55",
591
- dangerLight: "#ef8079",
592
- warning: "#e8b33e",
593
- onAccent: "#231004",
594
- onSecondary: "#241a04",
595
- onDanger: "#2b0a08"
596
- },
597
- lightHue: null,
598
- dark: {
599
- bg: "#17110e",
600
- surface: "#1f1815",
601
- surfaceRaised: "#251d19",
602
- surfaceHover: "#33261f",
603
- border: "#352822",
604
- muted: "#a48f81",
605
- text: "#f5ece5"
606
- },
607
- light: {
608
- bg: "#f6efe8",
609
- surface: "#fffdfb",
610
- surfaceRaised: "#faf3ec",
611
- surfaceHover: "#efe3d8",
612
- border: "#e0d2c4",
613
- muted: "#6b5b50",
614
- text: "#241a14"
615
- },
616
- radius: se
617
- }
618
- },
619
- {
620
- id: "paper",
621
- name: "Paper",
622
- note: "Near-monochrome. One quiet slate accent and nothing else.",
623
- group: "Gryt",
624
- theme: {
625
- name: "Paper",
626
- hue: {
627
- accent: "#8390a8",
628
- accentLight: "#a3aec2",
629
- secondary: "#93a0a0",
630
- secondaryLight: "#b1bcbc",
631
- success: "#7f9b7f",
632
- danger: "#b56b6b",
633
- dangerLight: "#c98d8d",
634
- warning: "#b39a6a",
635
- onAccent: "#11151c",
636
- onSecondary: "#121717",
637
- onDanger: "#1d0e0e"
638
- },
639
- lightHue: null,
640
- dark: {
641
- bg: "#101011",
642
- surface: "#17171a",
643
- surfaceRaised: "#1d1d20",
644
- surfaceHover: "#282a2e",
645
- border: "#2a2a2e",
646
- muted: "#8e8e94",
647
- text: "#ededf0"
648
- },
649
- light: {
650
- bg: "#f0f0f2",
651
- surface: "#ffffff",
652
- surfaceRaised: "#f7f7f9",
653
- surfaceHover: "#e6e6ea",
654
- border: "#d6d6dc",
655
- muted: "#5b5b63",
656
- text: "#17171a"
657
- },
658
- radius: ce
659
- }
660
- },
661
- {
662
- id: "signal",
663
- name: "Signal",
664
- note: "Black, white, and a yellow that cannot be missed.",
665
- group: "Gryt",
666
- theme: {
667
- name: "Signal",
668
- hue: {
669
- accent: "#ffd400",
670
- accentLight: "#ffe454",
671
- secondary: "#00d0ff",
672
- secondaryLight: "#66e2ff",
673
- success: "#00e06a",
674
- danger: "#ff453a",
675
- dangerLight: "#ff7a72",
676
- warning: "#ffab00",
677
- onAccent: "#161200",
678
- onSecondary: "#001a20",
679
- onDanger: "#1a0300"
680
- },
681
- lightHue: null,
682
- dark: {
683
- bg: "#000000",
684
- surface: "#0c0c0c",
685
- surfaceRaised: "#151515",
686
- surfaceHover: "#242424",
687
- border: "#454545",
688
- muted: "#bcbcbc",
689
- text: "#ffffff"
690
- },
691
- light: {
692
- bg: "#f0f0f0",
693
- surface: "#ffffff",
694
- surfaceRaised: "#f8f8f8",
695
- surfaceHover: "#e3e3e3",
696
- border: "#6f6f6f",
697
- muted: "#3d3d3d",
698
- text: "#000000"
699
- },
700
- radius: ke
701
- }
702
- },
703
- {
704
- /* Dracula's eleven, and Alucard's eleven for the light half, from the
705
- palette tables in dracula/dracula-theme. Background, Current Line,
706
- Foreground and Comment are exact; the two steps between Background and
707
- Current Line are derived, because Dracula does not name them. */
708
- id: "dracula",
709
- name: "Dracula",
710
- note: "The purple-and-pink dark theme, with Alucard as its light half.",
711
- group: "Ported",
712
- source: "draculatheme.com, MIT",
713
- theme: {
714
- name: "Dracula",
715
- hue: {
716
- accent: "#bd93f9",
717
- accentLight: "#d0b3fb",
718
- secondary: "#8be9fd",
719
- secondaryLight: "#aff0fe",
720
- success: "#50fa7b",
721
- danger: "#ff5555",
722
- dangerLight: "#ff7979",
723
- warning: "#ffb86c",
724
- onAccent: "#282a36",
725
- onSecondary: "#282a36",
726
- onDanger: "#282a36"
727
- },
728
- lightHue: {
729
- accent: "#644ac9",
730
- accentLight: "#7b64d6",
731
- secondary: "#036a96",
732
- secondaryLight: "#0b83b5",
733
- success: "#14710a",
734
- danger: "#cb3a2a",
735
- dangerLight: "#d95445",
736
- warning: "#a34d14",
737
- onAccent: "#fffbeb",
738
- onSecondary: "#fffbeb",
739
- onDanger: "#fffbeb"
740
- },
741
- dark: {
742
- bg: "#282a36",
743
- surface: "#31323f",
744
- surfaceRaised: "#383a49",
745
- surfaceHover: "#44475a",
746
- border: "#44475a",
747
- muted: "#6272a4",
748
- text: "#f8f8f2"
749
- },
750
- light: {
751
- bg: "#f5f1e1",
752
- surface: "#fffbeb",
753
- surfaceRaised: "#faf6e6",
754
- surfaceHover: "#ece7d4",
755
- border: "#dcd6bf",
756
- muted: "#6c664b",
757
- text: "#1f1f1f"
758
- },
759
- radius: ce
760
- }
761
- },
762
- {
763
- /* nord0-nord15, exactly as nordtheme.com publishes them. Polar Night is
764
- the dark neutrals, Snow Storm the light ones, Frost the accents and
765
- Aurora the status colours. Nothing here is derived. */
766
- id: "nord",
767
- name: "Nord",
768
- note: "Polar Night and Snow Storm, with Frost on top.",
769
- group: "Ported",
770
- source: "nordtheme.com, MIT",
771
- theme: {
772
- name: "Nord",
773
- hue: {
774
- accent: "#88c0d0",
775
- accentLight: "#8fbcbb",
776
- secondary: "#81a1c1",
777
- secondaryLight: "#a3b8d4",
778
- success: "#a3be8c",
779
- danger: "#bf616a",
780
- dangerLight: "#d08770",
781
- warning: "#ebcb8b",
782
- onAccent: "#2e3440",
783
- onSecondary: "#2e3440",
784
- onDanger: "#eceff4"
785
- },
786
- lightHue: {
787
- accent: "#5e81ac",
788
- accentLight: "#81a1c1",
789
- secondary: "#8fbcbb",
790
- secondaryLight: "#88c0d0",
791
- success: "#a3be8c",
792
- danger: "#bf616a",
793
- dangerLight: "#d08770",
794
- warning: "#ebcb8b",
795
- onAccent: "#eceff4",
796
- onSecondary: "#2e3440",
797
- onDanger: "#eceff4"
798
- },
799
- dark: {
800
- bg: "#2e3440",
801
- surface: "#3b4252",
802
- surfaceRaised: "#434c5e",
803
- surfaceHover: "#4c566a",
804
- border: "#4c566a",
805
- muted: "#d8dee9",
806
- text: "#eceff4"
807
- },
808
- light: {
809
- bg: "#e5e9f0",
810
- surface: "#eceff4",
811
- surfaceRaised: "#e9edf2",
812
- surfaceHover: "#d8dee9",
813
- border: "#c9d1de",
814
- muted: "#4c566a",
815
- text: "#2e3440"
816
- },
817
- radius: ce
818
- }
819
- },
820
- {
821
- /* Mocha and Latte from catppuccin/palette's palette.json. base, mantle,
822
- surface0/1/2, text and subtext0 are exact; the border step is derived
823
- from surface1 and surface2, which is where a border sits in their own
824
- ports. */
825
- id: "catppuccin",
826
- name: "Catppuccin",
827
- note: "Mocha for dark, Latte for light. Mauve does the accent work.",
828
- group: "Ported",
829
- source: "catppuccin/palette, MIT",
830
- theme: {
831
- name: "Catppuccin",
832
- hue: {
833
- accent: "#cba6f7",
834
- accentLight: "#dcc0fa",
835
- secondary: "#89b4fa",
836
- secondaryLight: "#a8c8fb",
837
- success: "#a6e3a1",
838
- danger: "#f38ba8",
839
- dangerLight: "#eba0ac",
840
- warning: "#f9e2af",
841
- onAccent: "#1e1e2e",
842
- onSecondary: "#1e1e2e",
843
- onDanger: "#1e1e2e"
844
- },
845
- lightHue: {
846
- accent: "#8839ef",
847
- accentLight: "#9a55f2",
848
- secondary: "#1e66f5",
849
- secondaryLight: "#4680f7",
850
- success: "#40a02b",
851
- danger: "#d20f39",
852
- dangerLight: "#e64553",
853
- warning: "#df8e1d",
854
- onAccent: "#eff1f5",
855
- onSecondary: "#eff1f5",
856
- onDanger: "#eff1f5"
857
- },
858
- dark: {
859
- bg: "#1e1e2e",
860
- surface: "#313244",
861
- surfaceRaised: "#45475a",
862
- surfaceHover: "#585b70",
863
- border: "#45475a",
864
- muted: "#a6adc8",
865
- text: "#cdd6f4"
866
- },
867
- light: {
868
- bg: "#e6e9ef",
869
- surface: "#eff1f5",
870
- surfaceRaised: "#eaedf3",
871
- surfaceHover: "#dce0e8",
872
- border: "#ccd0da",
873
- muted: "#6c6f85",
874
- text: "#4c4f69"
875
- },
876
- radius: se
877
- }
878
- },
879
- {
880
- /* Primer's functional tokens, from @primer/primitives' compiled themes:
881
- bgColor-default, bgColor-muted, borderColor-default, fgColor-default,
882
- fgColor-muted, and the -emphasis fills for accent, danger, success,
883
- attention and done. The raised and hover steps are derived — Primer
884
- expresses those as translucent overlays rather than as solid colours. */
885
- id: "github",
886
- name: "GitHub",
887
- note: "Primer's own tokens, six-pixel corners included.",
888
- group: "Ported",
889
- source: "@primer/primitives",
890
- theme: {
891
- name: "GitHub",
892
- hue: {
893
- accent: "#1f6feb",
894
- accentLight: "#4493f8",
895
- secondary: "#8957e5",
896
- secondaryLight: "#a371f7",
897
- success: "#238636",
898
- danger: "#da3633",
899
- dangerLight: "#f85149",
900
- warning: "#9e6a03",
901
- onAccent: "#ffffff",
902
- onSecondary: "#ffffff",
903
- onDanger: "#ffffff"
904
- },
905
- lightHue: {
906
- accent: "#0969da",
907
- accentLight: "#218bff",
908
- secondary: "#8250df",
909
- secondaryLight: "#a475f9",
910
- success: "#1f883d",
911
- danger: "#cf222e",
912
- dangerLight: "#d1242f",
913
- warning: "#9a6700",
914
- onAccent: "#ffffff",
915
- onSecondary: "#ffffff",
916
- onDanger: "#ffffff"
917
- },
918
- dark: {
919
- bg: "#0d1117",
920
- surface: "#151b23",
921
- surfaceRaised: "#1c222b",
922
- surfaceHover: "#262c36",
923
- border: "#3d444d",
924
- muted: "#9198a1",
925
- text: "#f0f6fc"
926
- },
927
- light: {
928
- bg: "#f6f8fa",
929
- surface: "#ffffff",
930
- surfaceRaised: "#fbfcfd",
931
- surfaceHover: "#eef1f4",
932
- border: "#d1d9e0",
933
- muted: "#59636e",
934
- text: "#1f2328"
935
- },
936
- radius: Rt
937
- }
938
- },
939
- {
940
- /* Read off anthropic.com's own stylesheet: the clay #d97757, the cream
941
- #f0eee6 and #faf9f5, the ink #141413, and the neutrals #3d3d3a,
942
- #87867f, #b0aea5, #c6c4ba, #e8e6dc. Anthropic publishes no token file,
943
- so the status hues have no published counterpart and are Gryt's own —
944
- this is the one preset that is a likeness rather than a port. */
945
- id: "claude",
946
- name: "Claude",
947
- note: "Anthropic's clay orange on cream and near-black.",
948
- group: "Ported",
949
- source: "anthropic.com — a likeness, not a published palette",
950
- theme: {
951
- name: "Claude",
952
- hue: {
953
- accent: "#d97757",
954
- accentLight: "#e59275",
955
- secondary: "#7d9ec4",
956
- secondaryLight: "#9db8d6",
957
- success: "#6ba368",
958
- danger: "#bf4d43",
959
- dangerLight: "#d4726a",
960
- warning: "#d9a441",
961
- onAccent: "#241009",
962
- onSecondary: "#0c1720",
963
- onDanger: "#faf9f5"
964
- },
965
- lightHue: null,
966
- dark: {
967
- bg: "#141413",
968
- surface: "#1f1e1d",
969
- surfaceRaised: "#262624",
970
- surfaceHover: "#3d3d3a",
971
- border: "#3d3d3a",
972
- muted: "#b0aea5",
973
- text: "#faf9f5"
974
- },
975
- light: {
976
- bg: "#f0eee6",
977
- surface: "#faf9f5",
978
- surfaceRaised: "#f5f3ec",
979
- surfaceHover: "#e8e6dc",
980
- border: "#d5d2c5",
981
- muted: "#87867f",
982
- text: "#141413"
983
- },
984
- radius: se
985
- }
986
- },
987
- {
988
- /* The zinc theme from shadcn-ui/ui's registry, converted from its OKLCH
989
- values. One deliberate departure: shadcn's primary is monochrome —
990
- near-white in dark, near-black in light — which cannot be a Gryt accent,
991
- because the accent is also the colour every link and focus ring is drawn
992
- from. Its destructive red is the accent here, and the neutrals are the
993
- theme's own. */
994
- id: "shadcn",
995
- name: "shadcn/ui",
996
- note: "Zinc neutrals and a ten-pixel radius. No pills anywhere.",
997
- group: "Ported",
998
- source: "ui.shadcn.com, MIT — accent adapted",
999
- theme: {
1000
- name: "shadcn/ui",
1001
- hue: {
1002
- accent: "#a1a1aa",
1003
- accentLight: "#d4d4d8",
1004
- secondary: "#71717a",
1005
- secondaryLight: "#a1a1aa",
1006
- success: "#4ade80",
1007
- danger: "#e7000b",
1008
- dangerLight: "#fb2c36",
1009
- warning: "#fd9a00",
1010
- onAccent: "#18181b",
1011
- onSecondary: "#fafafa",
1012
- onDanger: "#fafafa"
1013
- },
1014
- lightHue: {
1015
- accent: "#3f3f46",
1016
- accentLight: "#52525b",
1017
- secondary: "#71717a",
1018
- secondaryLight: "#a1a1aa",
1019
- success: "#00a63e",
1020
- danger: "#e7000b",
1021
- dangerLight: "#fb2c36",
1022
- warning: "#e17100",
1023
- onAccent: "#fafafa",
1024
- onSecondary: "#fafafa",
1025
- onDanger: "#fafafa"
1026
- },
1027
- dark: {
1028
- bg: "#18181b",
1029
- surface: "#27272a",
1030
- surfaceRaised: "#3f3f46",
1031
- surfaceHover: "#3f3f46",
1032
- border: "#3f3f46",
1033
- muted: "#a1a1aa",
1034
- text: "#fafafa"
1035
- },
1036
- light: {
1037
- bg: "#f4f4f5",
1038
- surface: "#ffffff",
1039
- surfaceRaised: "#fafafa",
1040
- surfaceHover: "#e4e4e7",
1041
- border: "#e4e4e7",
1042
- muted: "#71717a",
1043
- text: "#18181b"
1044
- },
1045
- radius: $t
1046
- }
1047
- },
1048
- {
1049
- /* Ethan Schoonover's sixteen, exactly. base03 and base02 are the dark
1050
- page and surface, base2 and base3 the light ones, and the accent hues
1051
- are shared between the two halves — which is the whole point of
1052
- Solarized. The steps between base03 and base02 are derived. */
1053
- id: "solarized",
1054
- name: "Solarized",
1055
- note: "Both halves on one set of accents, as designed.",
1056
- group: "Ported",
1057
- source: "ethanschoonover.com/solarized, MIT",
1058
- theme: {
1059
- name: "Solarized",
1060
- hue: {
1061
- accent: "#268bd2",
1062
- accentLight: "#4ba3e3",
1063
- secondary: "#2aa198",
1064
- secondaryLight: "#43bbb1",
1065
- success: "#859900",
1066
- danger: "#dc322f",
1067
- dangerLight: "#cb4b16",
1068
- warning: "#b58900",
1069
- onAccent: "#fdf6e3",
1070
- onSecondary: "#002b36",
1071
- onDanger: "#fdf6e3"
1072
- },
1073
- lightHue: null,
1074
- dark: {
1075
- bg: "#002b36",
1076
- surface: "#073642",
1077
- surfaceRaised: "#0b414f",
1078
- surfaceHover: "#134b5a",
1079
- border: "#0f4757",
1080
- muted: "#93a1a1",
1081
- text: "#eee8d5"
1082
- },
1083
- light: {
1084
- bg: "#eee8d5",
1085
- surface: "#fdf6e3",
1086
- surfaceRaised: "#f7f0dc",
1087
- surfaceHover: "#e4dcc4",
1088
- border: "#d9d0b4",
1089
- muted: "#586e75",
1090
- text: "#073642"
1091
- },
1092
- radius: ke
1093
- }
1094
- }
1095
- ], co = new Map(
1096
- Ct.map((a) => [a.id, a])
1097
- );
1098
- function s(...a) {
1099
- return qe(Ze(a));
1100
- }
1101
- const At = {
60
+ const zt = {
1102
61
  primary: "bg-gryt-accent text-gryt-on-accent hover:not-data-disabled:bg-gryt-accent-light",
1103
62
  secondary: "bg-gryt-secondary text-gryt-on-secondary hover:not-data-disabled:bg-gryt-secondary-light",
1104
63
  neutral: "bg-gryt-surface-raised text-gryt-text hover:not-data-disabled:bg-gryt-surface-hover",
1105
64
  danger: "bg-gryt-danger text-gryt-on-danger hover:not-data-disabled:bg-gryt-danger-light",
1106
65
  ghost: "bg-transparent text-gryt-muted hover:not-data-disabled:bg-white/8 hover:not-data-disabled:text-gryt-text"
1107
- }, Mt = {
66
+ }, Ft = {
1108
67
  xsmall: "min-h-8 px-3 text-xs",
1109
68
  small: "min-h-9 px-4 text-sm",
1110
69
  medium: "min-h-10 px-5 text-sm",
1111
70
  large: "min-h-12 px-6 text-base"
1112
- }, It = i(
71
+ }, Et = s(
1113
72
  function({
1114
73
  children: t,
1115
- className: r,
1116
- endIcon: e,
1117
- size: n = "medium",
74
+ className: e,
75
+ endIcon: r,
76
+ size: i = "medium",
1118
77
  startIcon: c,
1119
- tone: d = "primary",
1120
- ...l
1121
- }, g) {
1122
- return /* @__PURE__ */ m(
1123
- Se,
78
+ tone: l = "primary",
79
+ ...p
80
+ }, u) {
81
+ return /* @__PURE__ */ d(
82
+ nt,
1124
83
  {
1125
- ref: g,
1126
- className: s(
84
+ ref: u,
85
+ className: n(
1127
86
  "gryt-button",
1128
87
  "inline-flex cursor-pointer items-center justify-center gap-2 border-0 shadow-none",
1129
88
  "rounded-(--gryt-radius-full) font-semibold whitespace-nowrap select-none",
@@ -1144,81 +103,81 @@ const At = {
1144
103
  "motion-safe:not-[[aria-haspopup]]:active:not-data-disabled:scale-[0.96]",
1145
104
  "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gryt-accent-light",
1146
105
  "data-disabled:cursor-not-allowed data-disabled:opacity-50",
1147
- Mt[n],
1148
- At[d],
1149
- r
106
+ Ft[i],
107
+ zt[l],
108
+ e
1150
109
  ),
1151
- ...l,
110
+ ...p,
1152
111
  children: [
1153
112
  c,
1154
113
  t,
1155
- e
114
+ r
1156
115
  ]
1157
116
  }
1158
117
  );
1159
118
  }
1160
- ), x = "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gryt-accent-light", Ht = "has-[:focus-visible]:outline-2 has-[:focus-visible]:outline-offset-2 has-[:focus-visible]:outline-gryt-accent-light", Fe = [
119
+ ), b = "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gryt-accent-light", Vt = "has-[:focus-visible]:outline-2 has-[:focus-visible]:outline-offset-2 has-[:focus-visible]:outline-gryt-accent-light", dt = [
1161
120
  "w-full rounded-(--gryt-radius-xl) border bg-gryt-surface-raised",
1162
121
  "text-gryt-text outline-none placeholder:text-gryt-muted",
1163
122
  "transition-colors duration-150 motion-reduce:transition-none",
1164
123
  "hover:border-gryt-accent-light focus:border-gryt-accent",
1165
124
  "disabled:cursor-not-allowed disabled:opacity-60"
1166
- ].join(" "), _e = {
125
+ ].join(" "), gt = {
1167
126
  small: "min-h-9 px-3 py-1.5 text-sm",
1168
127
  medium: "min-h-11 px-4 py-2.5 text-sm"
1169
- }, E = "rounded-(--gryt-radius-xl) border border-gryt-border bg-gryt-surface text-gryt-text", H = [
128
+ }, D = "rounded-(--gryt-radius-xl) border border-gryt-border bg-gryt-surface text-gryt-text", $ = [
1170
129
  // scale and translate are named explicitly because Tailwind v4 sets them as
1171
130
  // standalone CSS properties rather than folding them into `transform`, so
1172
131
  // transitioning `transform` would leave the popup snapping into place.
1173
132
  "transition-[opacity,scale,translate] duration-(--gryt-dur-spring) ease-spring motion-reduce:transition-none",
1174
133
  "data-starting-style:scale-[0.98] data-starting-style:opacity-0",
1175
134
  "data-ending-style:scale-[0.98] data-ending-style:opacity-0"
1176
- ].join(" "), V = "cursor-pointer data-disabled:cursor-not-allowed data-disabled:opacity-50", Dt = {
135
+ ].join(" "), j = "cursor-pointer data-disabled:cursor-not-allowed data-disabled:opacity-50", _t = {
1177
136
  primary: "data-checked:bg-gryt-accent data-checked:text-gryt-on-accent",
1178
137
  secondary: "data-checked:bg-gryt-secondary data-checked:text-gryt-on-secondary",
1179
138
  neutral: "data-checked:bg-gryt-surface-hover data-checked:text-gryt-text",
1180
139
  danger: "data-checked:bg-gryt-danger data-checked:text-gryt-on-danger",
1181
140
  success: "data-checked:bg-gryt-success data-checked:text-gryt-on-accent",
1182
141
  warning: "data-checked:bg-gryt-warning data-checked:text-gryt-on-accent"
1183
- }, Ve = {
142
+ }, ut = {
1184
143
  primary: "bg-gryt-accent",
1185
144
  secondary: "bg-gryt-secondary",
1186
145
  neutral: "bg-gryt-surface-hover",
1187
146
  danger: "bg-gryt-danger",
1188
147
  success: "bg-gryt-success",
1189
148
  warning: "bg-gryt-warning"
1190
- }, Gt = {
149
+ }, Yt = {
1191
150
  primary: "data-checked:border-gryt-accent",
1192
151
  secondary: "data-checked:border-gryt-secondary",
1193
152
  neutral: "data-checked:border-gryt-muted",
1194
153
  danger: "data-checked:border-gryt-danger",
1195
154
  success: "data-checked:border-gryt-success",
1196
155
  warning: "data-checked:border-gryt-warning"
1197
- }, jt = {
156
+ }, Ht = {
1198
157
  primary: "data-checked:bg-gryt-accent",
1199
158
  secondary: "data-checked:bg-gryt-secondary",
1200
159
  neutral: "data-checked:bg-gryt-surface-hover",
1201
160
  danger: "data-checked:bg-gryt-danger",
1202
161
  success: "data-checked:bg-gryt-success",
1203
162
  warning: "data-checked:bg-gryt-warning"
1204
- }, Et = {
163
+ }, Ot = {
1205
164
  primary: "text-gryt-accent-11 hover:not-data-disabled:bg-gryt-accent-3",
1206
165
  secondary: "text-gryt-secondary-11 hover:not-data-disabled:bg-gryt-secondary-3",
1207
166
  neutral: "text-gryt-muted hover:not-data-disabled:bg-white/8 hover:not-data-disabled:text-gryt-text",
1208
167
  danger: "text-gryt-danger-11 hover:not-data-disabled:bg-gryt-danger-3",
1209
168
  ghost: "text-gryt-muted hover:not-data-disabled:bg-white/8 hover:not-data-disabled:text-gryt-text"
1210
- }, zt = {
169
+ }, Xt = {
1211
170
  xsmall: "h-8 w-8",
1212
171
  small: "h-9 w-9",
1213
172
  medium: "h-10 w-10",
1214
173
  large: "h-12 w-12"
1215
- }, io = i(
1216
- function({ className: t, size: r = "medium", tone: e = "neutral", ...n }, c) {
174
+ }, lo = s(
175
+ function({ className: t, size: e = "medium", tone: r = "neutral", ...i }, c) {
1217
176
  return /* @__PURE__ */ o(
1218
- Se,
177
+ nt,
1219
178
  {
1220
179
  ref: c,
1221
- className: s(
180
+ className: n(
1222
181
  "gryt-icon-button",
1223
182
  "inline-flex shrink-0 items-center justify-center border-0 bg-transparent p-0",
1224
183
  "rounded-(--gryt-radius-full) select-none",
@@ -1232,295 +191,295 @@ const At = {
1232
191
  // that is what it is; Base UI puts it there, nothing to pass.
1233
192
  "motion-safe:not-[[aria-haspopup]]:hover:not-data-disabled:scale-[1.06]",
1234
193
  "motion-safe:not-[[aria-haspopup]]:active:not-data-disabled:scale-[0.94]",
1235
- x,
1236
- V,
1237
- zt[r],
1238
- Et[e],
194
+ b,
195
+ j,
196
+ Xt[e],
197
+ Ot[r],
1239
198
  t
1240
199
  ),
1241
- ...n
200
+ ...i
1242
201
  }
1243
202
  );
1244
203
  }
1245
- ), lo = i(
1246
- function({ className: t, elevated: r = !1, ...e }, n) {
204
+ ), go = s(
205
+ function({ className: t, elevated: e = !1, ...r }, i) {
1247
206
  return /* @__PURE__ */ o(
1248
207
  "div",
1249
208
  {
1250
- ref: n,
1251
- className: s(
209
+ ref: i,
210
+ className: n(
1252
211
  "gryt-surface rounded-(--gryt-radius-lg) border border-gryt-border p-4 text-gryt-text",
1253
- r ? "bg-gryt-surface-raised" : "bg-gryt-surface",
212
+ e ? "bg-gryt-surface-raised" : "bg-gryt-surface",
1254
213
  t
1255
214
  ),
1256
- ...e
215
+ ...r
1257
216
  }
1258
217
  );
1259
218
  }
1260
- ), uo = i(
1261
- function({ children: t, className: r, from: e = "assistant", ...n }, c) {
219
+ ), uo = s(
220
+ function({ children: t, className: e, from: r = "assistant", ...i }, c) {
1262
221
  return /* @__PURE__ */ o(
1263
222
  "div",
1264
223
  {
1265
224
  ref: c,
1266
- className: s(
225
+ className: n(
1267
226
  "gryt-message-bubble",
1268
- e === "user" && "ml-auto bg-gryt-accent text-gryt-on-accent",
1269
- e === "assistant" && "mr-auto border border-gryt-border bg-gryt-surface text-gryt-text",
1270
- e === "system" && "mx-auto border border-dashed border-gryt-border bg-transparent text-gryt-muted",
1271
- r
227
+ r === "user" && "ml-auto bg-gryt-accent text-gryt-on-accent",
228
+ r === "assistant" && "mr-auto border border-gryt-border bg-gryt-surface text-gryt-text",
229
+ r === "system" && "mx-auto border border-dashed border-gryt-border bg-transparent text-gryt-muted",
230
+ e
1272
231
  ),
1273
- ...n,
232
+ ...i,
1274
233
  children: t
1275
234
  }
1276
235
  );
1277
236
  }
1278
- ), go = i(
237
+ ), yo = s(
1279
238
  function({
1280
239
  className: t,
1281
- error: r = !1,
1282
- fieldClassName: e,
1283
- helperText: n,
240
+ error: e = !1,
241
+ fieldClassName: r,
242
+ helperText: i,
1284
243
  label: c,
1285
- minRows: d = 3,
1286
- multiline: l = !1,
1287
- size: g = "medium",
1288
- ...y
1289
- }, f) {
1290
- const p = /* @__PURE__ */ o(
1291
- q.Control,
244
+ minRows: l = 3,
245
+ multiline: p = !1,
246
+ size: u = "medium",
247
+ ...w
248
+ }, y) {
249
+ const N = /* @__PURE__ */ o(
250
+ V.Control,
1292
251
  {
1293
- ref: f,
1294
- render: l ? /* @__PURE__ */ o("textarea", { rows: d }) : void 0,
1295
- className: s(
252
+ ref: y,
253
+ render: p ? /* @__PURE__ */ o("textarea", { rows: l }) : void 0,
254
+ className: n(
1296
255
  "gryt-text-field-control",
1297
- Fe,
1298
- l && "resize-y leading-6",
1299
- r ? "border-gryt-danger" : "border-gryt-border",
1300
- _e[g],
256
+ dt,
257
+ p && "resize-y leading-6",
258
+ e ? "border-gryt-danger" : "border-gryt-border",
259
+ gt[u],
1301
260
  t
1302
261
  ),
1303
- ...y
262
+ ...w
1304
263
  }
1305
264
  );
1306
- return /* @__PURE__ */ m(
1307
- q.Root,
265
+ return /* @__PURE__ */ d(
266
+ V.Root,
1308
267
  {
1309
- className: s(
268
+ className: n(
1310
269
  "gryt-text-field flex w-full flex-col gap-1.5",
1311
- e
270
+ r
1312
271
  ),
1313
272
  children: [
1314
- c ? /* @__PURE__ */ o(q.Label, { className: "text-xs font-medium text-gryt-muted", children: c }) : null,
1315
- p,
1316
- n ? /* @__PURE__ */ o(
1317
- q.Description,
273
+ c ? /* @__PURE__ */ o(V.Label, { className: "text-xs font-medium text-gryt-muted", children: c }) : null,
274
+ N,
275
+ i ? /* @__PURE__ */ o(
276
+ V.Description,
1318
277
  {
1319
- className: s(
278
+ className: n(
1320
279
  "text-xs",
1321
- r ? "text-gryt-danger-11" : "text-gryt-muted"
280
+ e ? "text-gryt-danger-11" : "text-gryt-muted"
1322
281
  ),
1323
- children: n
282
+ children: i
1324
283
  }
1325
284
  ) : null
1326
285
  ]
1327
286
  }
1328
287
  );
1329
288
  }
1330
- ), fo = i(
289
+ ), po = s(
1331
290
  function({
1332
291
  className: t,
1333
- disabled: r = !1,
1334
- maxRows: e = 8,
1335
- minRows: n = 1,
292
+ disabled: e = !1,
293
+ maxRows: r = 8,
294
+ minRows: i = 1,
1336
295
  onSubmit: c,
1337
- placeholder: d = "Message Gryt",
1338
- submitLabel: l = "Send",
1339
- ...g
1340
- }, y) {
1341
- const f = Re(null), p = de(() => {
1342
- const w = f.current;
1343
- if (!w)
296
+ placeholder: l = "Message Gryt",
297
+ submitLabel: p = "Send",
298
+ ...u
299
+ }, w) {
300
+ const y = it(null), N = U(() => {
301
+ const f = y.current;
302
+ if (!f)
1344
303
  return;
1345
- const re = window.getComputedStyle(w), pe = parseFloat(re.lineHeight) || 24, be = parseFloat(re.paddingTop) + parseFloat(re.paddingBottom);
1346
- w.style.height = "auto", w.style.height = `${Math.min(
1347
- Math.max(w.scrollHeight, pe * n + be),
1348
- pe * e + be
304
+ const Y = window.getComputedStyle(f), J = parseFloat(Y.lineHeight) || 24, Z = parseFloat(Y.paddingTop) + parseFloat(Y.paddingBottom);
305
+ f.style.height = "auto", f.style.height = `${Math.min(
306
+ Math.max(f.scrollHeight, J * i + Z),
307
+ J * r + Z
1349
308
  )}px`;
1350
- }, [e, n]);
1351
- Xe(p, [p, g.value]);
1352
- function P(w) {
309
+ }, [r, i]);
310
+ ft(N, [N, u.value]);
311
+ function Q(f) {
1353
312
  if (!c) {
1354
- w.preventDefault();
313
+ f.preventDefault();
1355
314
  return;
1356
315
  }
1357
- c(w);
316
+ c(f);
1358
317
  }
1359
- return /* @__PURE__ */ m("form", { className: s("gryt-composer", t), onSubmit: P, children: [
318
+ return /* @__PURE__ */ d("form", { className: n("gryt-composer", t), onSubmit: Q, children: [
1360
319
  /* @__PURE__ */ o(
1361
320
  "textarea",
1362
321
  {
1363
- ref: (w) => {
1364
- f.current = w, typeof y == "function" ? y(w) : y && (y.current = w);
322
+ ref: (f) => {
323
+ y.current = f, typeof w == "function" ? w(f) : w && (w.current = f);
1365
324
  },
1366
- rows: n,
1367
- disabled: r,
1368
- placeholder: d,
1369
- onInput: p,
325
+ rows: i,
326
+ disabled: e,
327
+ placeholder: l,
328
+ onInput: N,
1370
329
  className: "gryt-composer-textarea disabled:cursor-not-allowed disabled:opacity-60",
1371
- ...g
330
+ ...u
1372
331
  }
1373
332
  ),
1374
333
  /* @__PURE__ */ o(
1375
- It,
334
+ Et,
1376
335
  {
1377
336
  type: "submit",
1378
- disabled: r,
337
+ disabled: e,
1379
338
  size: "small",
1380
- endIcon: /* @__PURE__ */ o(et, { size: 14, weight: "fill" }),
1381
- children: l
339
+ endIcon: /* @__PURE__ */ o(Tt, { size: 14, weight: "fill" }),
340
+ children: p
1382
341
  }
1383
342
  )
1384
343
  ] });
1385
344
  }
1386
- ), Bt = {
345
+ ), Ut = {
1387
346
  small: "h-8 w-8 text-xs",
1388
347
  medium: "h-10 w-10 text-sm",
1389
348
  large: "h-12 w-12 text-base"
1390
- }, Ft = i(function({ alt: t, children: r, className: e, fallback: n, size: c = "medium", src: d, ...l }, g) {
1391
- return /* @__PURE__ */ m(
1392
- ae.Root,
349
+ }, Kt = s(function({ alt: t, children: e, className: r, fallback: i, size: c = "medium", src: l, ...p }, u) {
350
+ return /* @__PURE__ */ d(
351
+ H.Root,
1393
352
  {
1394
- ref: g,
1395
- className: s(
353
+ ref: u,
354
+ className: n(
1396
355
  "gryt-avatar inline-flex shrink-0 items-center justify-center overflow-hidden align-middle select-none",
1397
356
  "rounded-(--gryt-radius-full) bg-gryt-surface-raised font-medium text-gryt-text ring-1 ring-gryt-border",
1398
- Bt[c],
1399
- e
357
+ Ut[c],
358
+ r
1400
359
  ),
1401
- ...l,
360
+ ...p,
1402
361
  children: [
1403
- d ? /* @__PURE__ */ o(
1404
- ae.Image,
362
+ l ? /* @__PURE__ */ o(
363
+ H.Image,
1405
364
  {
1406
- src: d,
365
+ src: l,
1407
366
  alt: t,
1408
367
  className: "h-full w-full object-cover"
1409
368
  }
1410
369
  ) : null,
1411
- /* @__PURE__ */ o(ae.Fallback, { className: "flex h-full w-full items-center justify-center", children: n ?? r })
370
+ /* @__PURE__ */ o(H.Fallback, { className: "flex h-full w-full items-center justify-center", children: i ?? e })
1412
371
  ]
1413
372
  }
1414
373
  );
1415
- }), yo = i(function({ active: t = !1, avatar: r, className: e, subtitle: n, title: c, ...d }, l) {
1416
- return /* @__PURE__ */ m(
374
+ }), mo = s(function({ active: t = !1, avatar: e, className: r, subtitle: i, title: c, ...l }, p) {
375
+ return /* @__PURE__ */ d(
1417
376
  "button",
1418
377
  {
1419
- ref: l,
378
+ ref: p,
1420
379
  type: "button",
1421
- className: s(
380
+ className: n(
1422
381
  "gryt-conversation-item enabled:cursor-pointer disabled:cursor-not-allowed disabled:opacity-50",
1423
382
  t ? "bg-gryt-accent text-gryt-on-accent" : "text-gryt-text hover:bg-white/5",
1424
- e
383
+ r
1425
384
  ),
1426
- ...d,
385
+ ...l,
1427
386
  children: [
1428
- r ?? /* @__PURE__ */ o(
1429
- Ft,
387
+ e ?? /* @__PURE__ */ o(
388
+ Kt,
1430
389
  {
1431
390
  size: "small",
1432
- className: s(
391
+ className: n(
1433
392
  t ? "bg-gryt-on-accent text-gryt-accent-9 ring-transparent" : "bg-gryt-surface-raised text-gryt-text"
1434
393
  ),
1435
394
  children: c.slice(0, 1).toUpperCase()
1436
395
  }
1437
396
  ),
1438
- /* @__PURE__ */ m("span", { className: "min-w-0 flex-1", children: [
397
+ /* @__PURE__ */ d("span", { className: "min-w-0 flex-1", children: [
1439
398
  /* @__PURE__ */ o("span", { className: "block truncate text-sm font-semibold", children: c }),
1440
- n ? /* @__PURE__ */ o(
399
+ i ? /* @__PURE__ */ o(
1441
400
  "span",
1442
401
  {
1443
- className: s(
402
+ className: n(
1444
403
  "block truncate text-xs",
1445
404
  t ? "text-gryt-on-accent/85" : "text-gryt-muted"
1446
405
  ),
1447
- children: n
406
+ children: i
1448
407
  }
1449
408
  ) : null
1450
409
  ] })
1451
410
  ]
1452
411
  }
1453
412
  );
1454
- }), mo = i(function({ badgeContent: t, children: r, className: e, max: n = 99, showZero: c = !1, ...d }, l) {
1455
- const g = typeof t == "number" ? t : null, y = g !== null && g === 0 && !c, f = g !== null && g > n ? `${n}+` : t;
1456
- return /* @__PURE__ */ m(
413
+ }), bo = s(function({ badgeContent: t, children: e, className: r, max: i = 99, showZero: c = !1, ...l }, p) {
414
+ const u = typeof t == "number" ? t : null, w = u !== null && u === 0 && !c, y = u !== null && u > i ? `${i}+` : t;
415
+ return /* @__PURE__ */ d(
1457
416
  "span",
1458
417
  {
1459
- ref: l,
1460
- className: s("gryt-badge relative inline-flex", e),
1461
- ...d,
418
+ ref: p,
419
+ className: n("gryt-badge relative inline-flex", r),
420
+ ...l,
1462
421
  children: [
1463
- r,
1464
- t !== void 0 && !y ? /* @__PURE__ */ o(
422
+ e,
423
+ t !== void 0 && !w ? /* @__PURE__ */ o(
1465
424
  "span",
1466
425
  {
1467
- className: s(
426
+ className: n(
1468
427
  "gryt-badge-dot absolute -top-1 -right-1 z-10 inline-flex items-center justify-center",
1469
428
  "min-w-5 rounded-(--gryt-radius-full) px-1.5 py-0.5",
1470
429
  "bg-gryt-accent text-[0.65rem] leading-none font-semibold text-gryt-on-accent",
1471
430
  "ring-2 ring-gryt-bg"
1472
431
  ),
1473
- children: f
432
+ children: y
1474
433
  }
1475
434
  ) : null
1476
435
  ]
1477
436
  }
1478
437
  );
1479
- }), _t = {
438
+ }), Wt = {
1480
439
  neutral: "border-gryt-border bg-gryt-surface-raised text-gryt-text",
1481
440
  primary: "border-gryt-accent-6 bg-gryt-accent-3 text-gryt-accent-11",
1482
441
  secondary: "border-gryt-secondary-6 bg-gryt-secondary-3 text-gryt-secondary-11",
1483
442
  success: "border-gryt-success-6 bg-gryt-success-3 text-gryt-success-11",
1484
443
  warning: "border-gryt-warning-6 bg-gryt-warning-3 text-gryt-warning-11",
1485
444
  danger: "border-gryt-danger-6 bg-gryt-danger-3 text-gryt-danger-11"
1486
- }, po = i(function({ children: t, className: r, icon: e, label: n, onDelete: c, tone: d = "neutral", ...l }, g) {
1487
- return /* @__PURE__ */ m(
445
+ }, fo = s(function({ children: t, className: e, icon: r, label: i, onDelete: c, tone: l = "neutral", ...p }, u) {
446
+ return /* @__PURE__ */ d(
1488
447
  "span",
1489
448
  {
1490
- ref: g,
1491
- className: s(
449
+ ref: u,
450
+ className: n(
1492
451
  "gryt-chip inline-flex items-center gap-1.5 rounded-(--gryt-radius-full) border px-3 py-1 text-xs font-medium",
1493
- _t[d],
1494
- r
452
+ Wt[l],
453
+ e
1495
454
  ),
1496
- ...l,
455
+ ...p,
1497
456
  children: [
1498
- e,
1499
- n ?? t,
457
+ r,
458
+ i ?? t,
1500
459
  c ? /* @__PURE__ */ o(
1501
460
  "button",
1502
461
  {
1503
462
  type: "button",
1504
463
  "aria-label": "Remove",
1505
464
  onClick: c,
1506
- className: s(
465
+ className: n(
1507
466
  "-mr-1 inline-flex h-4 w-4 cursor-pointer items-center justify-center rounded-(--gryt-radius-full)",
1508
467
  "opacity-70 transition-opacity hover:opacity-100",
1509
- x
468
+ b
1510
469
  ),
1511
- children: /* @__PURE__ */ o($e, { size: 10, weight: "bold", "aria-hidden": "true" })
470
+ children: /* @__PURE__ */ o(st, { size: 10, weight: "bold", "aria-hidden": "true" })
1512
471
  }
1513
472
  ) : null
1514
473
  ]
1515
474
  }
1516
475
  );
1517
- }), bo = i(
1518
- function({ className: t, tone: r = "primary", ...e }, n) {
476
+ }), xo = s(
477
+ function({ className: t, tone: e = "primary", ...r }, i) {
1519
478
  return /* @__PURE__ */ o(
1520
- he.Root,
479
+ q.Root,
1521
480
  {
1522
- ref: n,
1523
- className: s(
481
+ ref: i,
482
+ className: n(
1524
483
  "gryt-checkbox flex h-5 w-5 shrink-0 items-center justify-center",
1525
484
  "rounded-(--gryt-radius-sm) border border-gryt-border bg-gryt-surface-raised",
1526
485
  "transition-[scale,background-color,border-color] duration-(--gryt-dur-spring) ease-spring",
@@ -1530,18 +489,18 @@ const At = {
1530
489
  "hover:not-data-disabled:border-gryt-accent-light",
1531
490
  "motion-safe:hover:not-data-disabled:scale-[1.08]",
1532
491
  "motion-safe:active:not-data-disabled:scale-[0.92]",
1533
- x,
1534
- V,
492
+ b,
493
+ j,
1535
494
  // Unchecked stays a neutral outline; the tone only paints once checked.
1536
- Dt[r],
495
+ _t[e],
1537
496
  t
1538
497
  ),
1539
- ...e,
498
+ ...r,
1540
499
  children: /* @__PURE__ */ o(
1541
- he.Indicator,
500
+ q.Indicator,
1542
501
  {
1543
502
  keepMounted: !0,
1544
- className: s(
503
+ className: n(
1545
504
  "flex origin-center",
1546
505
  "transition-[scale,opacity] duration-(--gryt-dur-spring) ease-spring",
1547
506
  // Scaling from 0 rather than from something near 1 is deliberate.
@@ -1551,65 +510,65 @@ const At = {
1551
510
  "data-unchecked:scale-0 data-unchecked:opacity-0",
1552
511
  "motion-reduce:transition-none"
1553
512
  ),
1554
- children: /* @__PURE__ */ o(Ce, { size: 12, weight: "bold" })
513
+ children: /* @__PURE__ */ o(ct, { size: 12, weight: "bold" })
1555
514
  }
1556
515
  )
1557
516
  }
1558
517
  );
1559
518
  }
1560
- ), ho = i(function({ className: t, tone: r = "primary", ...e }, n) {
519
+ ), ho = s(function({ className: t, tone: e = "primary", ...r }, i) {
1561
520
  return /* @__PURE__ */ o(
1562
- xe.Root,
521
+ tt.Root,
1563
522
  {
1564
- ref: n,
1565
- className: s(
523
+ ref: i,
524
+ className: n(
1566
525
  "gryt-radio flex h-5 w-5 shrink-0 items-center justify-center",
1567
526
  "rounded-(--gryt-radius-full) border border-gryt-border bg-gryt-surface-raised",
1568
527
  "transition-[scale,background-color,border-color] duration-(--gryt-dur-spring) ease-spring",
1569
528
  "hover:not-data-disabled:border-gryt-accent-light",
1570
529
  "motion-safe:hover:not-data-disabled:scale-[1.08]",
1571
530
  "motion-safe:active:not-data-disabled:scale-[0.92]",
1572
- x,
1573
- V,
531
+ b,
532
+ j,
1574
533
  // Border takes the tone when selected; the dot inside carries the fill.
1575
- Gt[r],
534
+ Yt[e],
1576
535
  t
1577
536
  ),
1578
- ...e,
537
+ ...r,
1579
538
  children: /* @__PURE__ */ o(
1580
- xe.Indicator,
539
+ tt.Indicator,
1581
540
  {
1582
541
  keepMounted: !0,
1583
- className: s(
542
+ className: n(
1584
543
  "h-2.5 w-2.5 origin-center rounded-(--gryt-radius-full)",
1585
544
  "transition-[scale,opacity] duration-(--gryt-dur-spring) ease-spring",
1586
545
  // From 0, for the same reason as the Checkbox tick — see the note there.
1587
546
  "data-unchecked:scale-0 data-unchecked:opacity-0",
1588
547
  "motion-reduce:transition-none",
1589
- Ve[r]
548
+ ut[e]
1590
549
  )
1591
550
  }
1592
551
  )
1593
552
  }
1594
553
  );
1595
- }), xo = i(
1596
- function({ className: t, ...r }, e) {
554
+ }), wo = s(
555
+ function({ className: t, ...e }, r) {
1597
556
  return /* @__PURE__ */ o(
1598
- st,
557
+ It,
1599
558
  {
1600
- ref: e,
1601
- className: s("gryt-radio-group flex flex-col gap-2", t),
1602
- ...r
559
+ ref: r,
560
+ className: n("gryt-radio-group flex flex-col gap-2", t),
561
+ ...e
1603
562
  }
1604
563
  );
1605
564
  }
1606
- ), wo = i(
1607
- function({ className: t, tone: r = "primary", ...e }, n) {
565
+ ), vo = s(
566
+ function({ className: t, tone: e = "primary", ...r }, i) {
1608
567
  return /* @__PURE__ */ o(
1609
- we.Root,
568
+ et.Root,
1610
569
  {
1611
- ref: n,
1612
- className: s(
570
+ ref: i,
571
+ className: n(
1613
572
  "gryt-switch relative inline-flex h-6 w-10 shrink-0 items-center",
1614
573
  "rounded-(--gryt-radius-full) border border-gryt-border bg-gryt-surface-raised p-0.5",
1615
574
  "transition-[scale,background-color,border-color] duration-(--gryt-dur-spring) ease-spring",
@@ -1617,16 +576,16 @@ const At = {
1617
576
  "hover:not-data-disabled:border-gryt-accent-light",
1618
577
  "motion-safe:hover:not-data-disabled:scale-[1.05]",
1619
578
  "motion-safe:active:not-data-disabled:scale-[0.95]",
1620
- x,
1621
- V,
1622
- jt[r],
579
+ b,
580
+ j,
581
+ Ht[e],
1623
582
  t
1624
583
  ),
1625
- ...e,
584
+ ...r,
1626
585
  children: /* @__PURE__ */ o(
1627
- we.Thumb,
586
+ et.Thumb,
1628
587
  {
1629
- className: s(
588
+ className: n(
1630
589
  "h-4.5 w-4.5 rounded-(--gryt-radius-full) bg-gryt-text",
1631
590
  "transition-transform duration-(--gryt-dur-spring) ease-spring motion-reduce:transition-none",
1632
591
  "data-checked:translate-x-4 data-checked:bg-gryt-bg"
@@ -1636,70 +595,70 @@ const At = {
1636
595
  }
1637
596
  );
1638
597
  }
1639
- ), Te = 3;
1640
- function vo({
598
+ ), ot = 3;
599
+ function No({
1641
600
  className: a,
1642
601
  tone: t = "primary",
1643
- "aria-label": r,
1644
- ...e
602
+ "aria-label": e,
603
+ ...r
1645
604
  }) {
1646
- const [n, c] = We(!1), d = Re(null);
1647
- Ke(() => {
1648
- if (!n && d.current === null)
605
+ const [i, c] = xt(!1), l = it(null);
606
+ ht(() => {
607
+ if (!i && l.current === null)
1649
608
  return;
1650
- const f = () => {
1651
- d.current = null, c(!1);
609
+ const y = () => {
610
+ l.current = null, c(!1);
1652
611
  };
1653
- return window.addEventListener("pointerup", f), window.addEventListener("pointercancel", f), () => {
1654
- window.removeEventListener("pointerup", f), window.removeEventListener("pointercancel", f);
612
+ return window.addEventListener("pointerup", y), window.addEventListener("pointercancel", y), () => {
613
+ window.removeEventListener("pointerup", y), window.removeEventListener("pointercancel", y);
1655
614
  };
1656
- }, [n]);
1657
- function l(f) {
1658
- d.current = { x: f.clientX, y: f.clientY };
615
+ }, [i]);
616
+ function p(y) {
617
+ l.current = { x: y.clientX, y: y.clientY };
1659
618
  }
1660
- function g(f) {
1661
- const p = d.current;
1662
- if (p === null || n)
619
+ function u(y) {
620
+ const N = l.current;
621
+ if (N === null || i)
1663
622
  return;
1664
- (Math.abs(f.clientX - p.x) > Te || Math.abs(f.clientY - p.y) > Te) && c(!0);
623
+ (Math.abs(y.clientX - N.x) > ot || Math.abs(y.clientY - N.y) > ot) && c(!0);
1665
624
  }
1666
- const y = n ? "transition-none" : "duration-(--gryt-dur-spring) ease-spring-tight motion-reduce:transition-none";
1667
- return /* @__PURE__ */ o(U.Root, { className: s("gryt-slider w-full", a), ...e, children: /* @__PURE__ */ o(
1668
- U.Control,
625
+ const w = i ? "transition-none" : "duration-(--gryt-dur-spring) ease-spring-tight motion-reduce:transition-none";
626
+ return /* @__PURE__ */ o(B.Root, { className: n("gryt-slider w-full", a), ...r, children: /* @__PURE__ */ o(
627
+ B.Control,
1669
628
  {
1670
629
  className: "flex w-full cursor-pointer touch-none items-center py-2 select-none",
1671
- onPointerDown: l,
1672
- onPointerMove: g,
1673
- children: /* @__PURE__ */ m(U.Track, { className: "h-1.5 w-full rounded-(--gryt-radius-full) bg-gryt-surface-raised select-none", children: [
630
+ onPointerDown: p,
631
+ onPointerMove: u,
632
+ children: /* @__PURE__ */ d(B.Track, { className: "h-1.5 w-full rounded-(--gryt-radius-full) bg-gryt-surface-raised select-none", children: [
1674
633
  /* @__PURE__ */ o(
1675
- U.Indicator,
634
+ B.Indicator,
1676
635
  {
1677
- className: s(
636
+ className: n(
1678
637
  "h-full rounded-(--gryt-radius-full) select-none",
1679
638
  "transition-[width]",
1680
- y,
1681
- Ve[t]
639
+ w,
640
+ ut[t]
1682
641
  )
1683
642
  }
1684
643
  ),
1685
644
  /* @__PURE__ */ o(
1686
- U.Thumb,
645
+ B.Thumb,
1687
646
  {
1688
- "aria-label": r,
1689
- className: s(
647
+ "aria-label": e,
648
+ className: n(
1690
649
  "group h-4 w-4 rounded-(--gryt-radius-full) select-none",
1691
650
  "transition-[inset-inline-start]",
1692
- y,
651
+ w,
1693
652
  // The ring goes on the thumb but the focus lands on the visually
1694
653
  // hidden input inside it, so this has to match a descendant.
1695
654
  // Without it the slider is the one control here you cannot see
1696
655
  // yourself tab to.
1697
- Ht
656
+ Vt
1698
657
  ),
1699
658
  children: /* @__PURE__ */ o(
1700
659
  "span",
1701
660
  {
1702
- className: s(
661
+ className: n(
1703
662
  "block h-full w-full rounded-(--gryt-radius-full) bg-gryt-text",
1704
663
  "transition-[scale] duration-(--gryt-dur-spring) ease-spring",
1705
664
  "motion-safe:group-hover:scale-[1.12] motion-safe:group-active:scale-[0.94]",
@@ -1713,66 +672,66 @@ function vo({
1713
672
  }
1714
673
  ) });
1715
674
  }
1716
- const Vt = {
675
+ const Qt = {
1717
676
  small: "min-h-9 px-3 text-sm",
1718
677
  medium: "min-h-11 px-4 text-sm"
1719
678
  };
1720
- function No({
679
+ function Po({
1721
680
  className: a,
1722
681
  label: t,
1723
- options: r = [],
1724
- placeholder: e = "Select",
1725
- size: n = "medium",
682
+ options: e = [],
683
+ placeholder: r = "Select",
684
+ size: i = "medium",
1726
685
  ...c
1727
686
  }) {
1728
- return /* @__PURE__ */ m(v.Root, { items: r, ...c, children: [
1729
- /* @__PURE__ */ m("div", { className: s("gryt-select flex w-full flex-col gap-1.5", a), children: [
1730
- t ? /* @__PURE__ */ o(v.Label, { className: "text-xs font-medium text-gryt-muted", children: t }) : null,
1731
- /* @__PURE__ */ m(
1732
- v.Trigger,
687
+ return /* @__PURE__ */ d(x.Root, { items: e, ...c, children: [
688
+ /* @__PURE__ */ d("div", { className: n("gryt-select flex w-full flex-col gap-1.5", a), children: [
689
+ t ? /* @__PURE__ */ o(x.Label, { className: "text-xs font-medium text-gryt-muted", children: t }) : null,
690
+ /* @__PURE__ */ d(
691
+ x.Trigger,
1733
692
  {
1734
- className: s(
693
+ className: n(
1735
694
  "flex w-full cursor-pointer items-center justify-between gap-2",
1736
695
  "rounded-(--gryt-radius-xl) border border-gryt-border bg-gryt-surface-raised",
1737
696
  "text-gryt-text select-none",
1738
697
  "transition-colors duration-150 hover:border-gryt-accent-light",
1739
698
  "data-disabled:cursor-not-allowed data-disabled:opacity-60",
1740
- x,
1741
- Vt[n]
699
+ b,
700
+ Qt[i]
1742
701
  ),
1743
702
  children: [
1744
- /* @__PURE__ */ o(v.Value, { placeholder: e }),
1745
- /* @__PURE__ */ o(v.Icon, { className: "shrink-0 text-gryt-muted", children: /* @__PURE__ */ o(tt, { size: 16 }) })
703
+ /* @__PURE__ */ o(x.Value, { placeholder: r }),
704
+ /* @__PURE__ */ o(x.Icon, { className: "shrink-0 text-gryt-muted", children: /* @__PURE__ */ o(kt, { size: 16 }) })
1746
705
  ]
1747
706
  }
1748
707
  )
1749
708
  ] }),
1750
- /* @__PURE__ */ o(v.Portal, { children: /* @__PURE__ */ o(
1751
- v.Positioner,
709
+ /* @__PURE__ */ o(x.Portal, { children: /* @__PURE__ */ o(
710
+ x.Positioner,
1752
711
  {
1753
712
  sideOffset: 6,
1754
713
  className: "gryt-select-positioner outline-none",
1755
714
  children: /* @__PURE__ */ o(
1756
- v.Popup,
715
+ x.Popup,
1757
716
  {
1758
- className: s("min-w-(--anchor-width) p-1", E, H),
1759
- children: /* @__PURE__ */ o(v.List, { children: r.map((d) => /* @__PURE__ */ m(
1760
- v.Item,
717
+ className: n("min-w-(--anchor-width) p-1", D, $),
718
+ children: /* @__PURE__ */ o(x.List, { children: e.map((l) => /* @__PURE__ */ d(
719
+ x.Item,
1761
720
  {
1762
- value: d.value,
1763
- disabled: d.disabled,
1764
- className: s(
721
+ value: l.value,
722
+ disabled: l.disabled,
723
+ className: n(
1765
724
  "flex cursor-pointer items-center justify-between gap-2",
1766
725
  "rounded-(--gryt-radius-md) px-3 py-2 text-sm text-gryt-text",
1767
726
  "outline-none select-none data-highlighted:bg-gryt-surface-raised",
1768
727
  "data-disabled:cursor-not-allowed data-disabled:opacity-50"
1769
728
  ),
1770
729
  children: [
1771
- /* @__PURE__ */ o(v.ItemText, { children: d.label }),
1772
- /* @__PURE__ */ o(v.ItemIndicator, { className: "text-gryt-accent-11", children: /* @__PURE__ */ o(Ce, { size: 14, weight: "bold" }) })
730
+ /* @__PURE__ */ o(x.ItemText, { children: l.label }),
731
+ /* @__PURE__ */ o(x.ItemIndicator, { className: "text-gryt-accent-11", children: /* @__PURE__ */ o(ct, { size: 14, weight: "bold" }) })
1773
732
  ]
1774
733
  },
1775
- String(d.value)
734
+ String(l.value)
1776
735
  )) })
1777
736
  }
1778
737
  )
@@ -1780,81 +739,81 @@ function No({
1780
739
  ) })
1781
740
  ] });
1782
741
  }
1783
- function Po({
742
+ function To({
1784
743
  children: a,
1785
744
  className: t,
1786
- side: r = "top",
1787
- sideOffset: e = 8,
1788
- title: n
745
+ side: e = "top",
746
+ sideOffset: r = 8,
747
+ title: i
1789
748
  }) {
1790
- return /* @__PURE__ */ m(G.Root, { children: [
1791
- /* @__PURE__ */ o(G.Trigger, { render: a }),
1792
- /* @__PURE__ */ o(G.Portal, { children: /* @__PURE__ */ o(
1793
- G.Positioner,
749
+ return /* @__PURE__ */ d(I.Root, { children: [
750
+ /* @__PURE__ */ o(I.Trigger, { render: a }),
751
+ /* @__PURE__ */ o(I.Portal, { children: /* @__PURE__ */ o(
752
+ I.Positioner,
1794
753
  {
1795
- side: r,
1796
- sideOffset: e,
754
+ side: e,
755
+ sideOffset: r,
1797
756
  className: "gryt-tooltip-positioner",
1798
757
  children: /* @__PURE__ */ o(
1799
- G.Popup,
758
+ I.Popup,
1800
759
  {
1801
- className: s(
760
+ className: n(
1802
761
  "gryt-tooltip rounded-(--gryt-radius-md) border border-gryt-border bg-gryt-surface-raised",
1803
762
  "px-2.5 py-1.5 text-xs text-gryt-text",
1804
- H,
763
+ $,
1805
764
  t
1806
765
  ),
1807
- children: n
766
+ children: i
1808
767
  }
1809
768
  )
1810
769
  }
1811
770
  ) })
1812
771
  ] });
1813
772
  }
1814
- const ko = G.Provider, To = i(
1815
- function({ className: t, orientation: r = "horizontal", ...e }, n) {
773
+ const ko = I.Provider, Co = s(
774
+ function({ className: t, orientation: e = "horizontal", ...r }, i) {
1816
775
  return /* @__PURE__ */ o(
1817
- ct,
776
+ At,
1818
777
  {
1819
- ref: n,
1820
- orientation: r,
1821
- className: s(
778
+ ref: i,
779
+ orientation: e,
780
+ className: n(
1822
781
  "gryt-divider bg-gryt-border",
1823
- r === "vertical" ? "h-full w-px" : "h-px w-full",
782
+ e === "vertical" ? "h-full w-px" : "h-px w-full",
1824
783
  t
1825
784
  ),
1826
- ...e
785
+ ...r
1827
786
  }
1828
787
  );
1829
788
  }
1830
- ), Lo = i(function({ className: t, ...r }, e) {
789
+ ), So = s(function({ className: t, ...e }, r) {
1831
790
  return /* @__PURE__ */ o(
1832
791
  "div",
1833
792
  {
1834
- ref: e,
1835
- className: s(
793
+ ref: r,
794
+ className: n(
1836
795
  "gryt-card rounded-(--gryt-radius-xl) border border-gryt-border bg-gryt-surface text-gryt-text",
1837
796
  t
1838
797
  ),
1839
- ...r
798
+ ...e
1840
799
  }
1841
800
  );
1842
801
  });
1843
- function So({
802
+ function $o({
1844
803
  children: a,
1845
804
  className: t,
1846
- subheader: r,
1847
- title: e,
1848
- ...n
805
+ subheader: e,
806
+ title: r,
807
+ ...i
1849
808
  }) {
1850
- return /* @__PURE__ */ m(
809
+ return /* @__PURE__ */ d(
1851
810
  "div",
1852
811
  {
1853
- className: s("gryt-card-header flex flex-col gap-1 p-4", t),
1854
- ...n,
812
+ className: n("gryt-card-header flex flex-col gap-1 p-4", t),
813
+ ...i,
1855
814
  children: [
1856
- e ? /* @__PURE__ */ o("span", { className: "text-base font-semibold text-gryt-text", children: e }) : null,
1857
- r ? /* @__PURE__ */ o("span", { className: "text-sm text-gryt-muted", children: r }) : null,
815
+ r ? /* @__PURE__ */ o("span", { className: "text-base font-semibold text-gryt-text", children: r }) : null,
816
+ e ? /* @__PURE__ */ o("span", { className: "text-sm text-gryt-muted", children: e }) : null,
1858
817
  a
1859
818
  ]
1860
819
  }
@@ -1867,7 +826,7 @@ function Ro({
1867
826
  return /* @__PURE__ */ o(
1868
827
  "div",
1869
828
  {
1870
- className: s(
829
+ className: n(
1871
830
  "gryt-card-content px-4 pb-4 text-sm text-gryt-muted",
1872
831
  a
1873
832
  ),
@@ -1875,14 +834,14 @@ function Ro({
1875
834
  }
1876
835
  );
1877
836
  }
1878
- function $o({
837
+ function Io({
1879
838
  className: a,
1880
839
  ...t
1881
840
  }) {
1882
841
  return /* @__PURE__ */ o(
1883
842
  "div",
1884
843
  {
1885
- className: s(
844
+ className: n(
1886
845
  "gryt-card-actions flex items-center gap-2 px-4 pb-4",
1887
846
  a
1888
847
  ),
@@ -1890,80 +849,80 @@ function $o({
1890
849
  }
1891
850
  );
1892
851
  }
1893
- const Ut = {
852
+ const Jt = {
1894
853
  info: "border-gryt-secondary-6 bg-gryt-secondary-3 text-gryt-secondary-11",
1895
854
  success: "border-gryt-success-6 bg-gryt-success-3 text-gryt-success-11",
1896
855
  warning: "border-gryt-warning-6 bg-gryt-warning-3 text-gryt-warning-11",
1897
856
  error: "border-gryt-danger-6 bg-gryt-danger-3 text-gryt-danger-11"
1898
- }, Co = i(function({ className: t, severity: r = "info", ...e }, n) {
857
+ }, Ao = s(function({ className: t, severity: e = "info", ...r }, i) {
1899
858
  return /* @__PURE__ */ o(
1900
859
  "div",
1901
860
  {
1902
- ref: n,
861
+ ref: i,
1903
862
  role: "alert",
1904
- className: s(
863
+ className: n(
1905
864
  "gryt-alert rounded-(--gryt-radius-lg) border px-4 py-3 text-sm",
1906
- Ut[r],
865
+ Jt[e],
1907
866
  t
1908
867
  ),
1909
- ...e
868
+ ...r
1910
869
  }
1911
870
  );
1912
871
  });
1913
- function Ao({ className: a, value: t = null, ...r }) {
872
+ function Do({ className: a, value: t = null, ...e }) {
1914
873
  return /* @__PURE__ */ o(
1915
- oe.Root,
874
+ O.Root,
1916
875
  {
1917
876
  value: t,
1918
- className: s("gryt-progress w-full", a),
1919
- ...r,
1920
- children: /* @__PURE__ */ o(oe.Track, { className: "h-1.5 w-full overflow-hidden rounded-(--gryt-radius-full) bg-gryt-surface-raised", children: /* @__PURE__ */ o(oe.Indicator, { className: "h-full rounded-(--gryt-radius-full) bg-gryt-accent transition-[width] duration-300 ease-out motion-reduce:transition-none" }) })
877
+ className: n("gryt-progress w-full", a),
878
+ ...e,
879
+ children: /* @__PURE__ */ o(O.Track, { className: "h-1.5 w-full overflow-hidden rounded-(--gryt-radius-full) bg-gryt-surface-raised", children: /* @__PURE__ */ o(O.Indicator, { className: "h-full rounded-(--gryt-radius-full) bg-gryt-accent transition-[width] duration-300 ease-out motion-reduce:transition-none" }) })
1921
880
  }
1922
881
  );
1923
882
  }
1924
883
  function Mo({
1925
884
  className: a,
1926
885
  size: t = 24,
1927
- "aria-label": r = "Loading"
886
+ "aria-label": e = "Loading"
1928
887
  }) {
1929
888
  return /* @__PURE__ */ o(
1930
- rt,
889
+ Ct,
1931
890
  {
1932
891
  role: "status",
1933
- "aria-label": r,
892
+ "aria-label": e,
1934
893
  size: t,
1935
894
  weight: "bold",
1936
- className: s(
895
+ className: n(
1937
896
  "gryt-spinner text-gryt-accent-11 motion-safe:animate-spin",
1938
897
  a
1939
898
  )
1940
899
  }
1941
900
  );
1942
901
  }
1943
- const Ot = {
902
+ const Zt = {
1944
903
  text: "h-4 rounded-(--gryt-radius-sm)",
1945
904
  rounded: "rounded-(--gryt-radius-lg)",
1946
905
  circular: "rounded-(--gryt-radius-full)",
1947
906
  rectangular: "rounded-none"
1948
907
  };
1949
- function Io({
908
+ function Go({
1950
909
  className: a,
1951
910
  height: t,
1952
- style: r,
1953
- variant: e = "text",
1954
- width: n,
911
+ style: e,
912
+ variant: r = "text",
913
+ width: i,
1955
914
  ...c
1956
915
  }) {
1957
- const d = {
1958
- width: n,
916
+ const l = {
917
+ width: i,
1959
918
  height: t,
1960
- ...r
919
+ ...e
1961
920
  };
1962
921
  return /* @__PURE__ */ o(
1963
922
  "div",
1964
923
  {
1965
924
  "aria-hidden": "true",
1966
- className: s(
925
+ className: n(
1967
926
  // Not bg-gryt-surface-raised. #1e2028 against #1a1d24 is four points of
1968
927
  // luminance, which is invisible on a laptop screen at an angle — the
1969
928
  // placeholder that is meant to say "something is coming" said nothing.
@@ -1971,131 +930,131 @@ function Io({
1971
930
  // the surfaces it can land on rather than only the one it was picked
1972
931
  // against, and it dims rather than brightens as it pulses.
1973
932
  "gryt-skeleton bg-white/9 motion-safe:animate-pulse",
1974
- Ot[e],
933
+ Zt[r],
1975
934
  a
1976
935
  ),
1977
- style: d,
936
+ style: l,
1978
937
  ...c
1979
938
  }
1980
939
  );
1981
940
  }
1982
- const Ue = "transition-[opacity,scale,translate] duration-(--gryt-dur-spring) ease-spring motion-reduce:transition-none", Yt = i(
1983
- function({ className: t, ...r }, e) {
941
+ const yt = "transition-[opacity,scale,translate] duration-(--gryt-dur-spring) ease-spring motion-reduce:transition-none", qt = s(
942
+ function({ className: t, ...e }, r) {
1984
943
  return /* @__PURE__ */ o(
1985
- M.Backdrop,
944
+ C.Backdrop,
1986
945
  {
1987
- ref: e,
1988
- className: s(
946
+ ref: r,
947
+ className: n(
1989
948
  "gryt-dialog-backdrop fixed inset-0 min-h-dvh bg-black/60",
1990
949
  "backdrop-blur-(--gryt-backdrop-blur)",
1991
- Ue,
950
+ yt,
1992
951
  "data-starting-style:opacity-0 data-ending-style:opacity-0",
1993
952
  t
1994
953
  ),
1995
- ...r
954
+ ...e
1996
955
  }
1997
956
  );
1998
957
  }
1999
- ), Xt = i(
2000
- function({ className: t, ...r }, e) {
958
+ ), te = s(
959
+ function({ className: t, ...e }, r) {
2001
960
  return /* @__PURE__ */ o(
2002
- M.Popup,
961
+ C.Popup,
2003
962
  {
2004
- ref: e,
2005
- className: s(
963
+ ref: r,
964
+ className: n(
2006
965
  "gryt-dialog fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2",
2007
966
  "flex w-[32rem] max-w-[calc(100vw-3rem)] flex-col gap-4",
2008
967
  "rounded-(--gryt-radius-lg) border border-gryt-border bg-gryt-surface p-5 text-gryt-text",
2009
- Ue,
968
+ yt,
2010
969
  "data-starting-style:scale-[0.98] data-starting-style:opacity-0",
2011
970
  "data-ending-style:scale-[0.98] data-ending-style:opacity-0",
2012
971
  t
2013
972
  ),
2014
- ...r
973
+ ...e
2015
974
  }
2016
975
  );
2017
976
  }
2018
- ), Wt = i(
2019
- function({ className: t, ...r }, e) {
977
+ ), ee = s(
978
+ function({ className: t, ...e }, r) {
2020
979
  return /* @__PURE__ */ o(
2021
- M.Title,
980
+ C.Title,
2022
981
  {
2023
- ref: e,
2024
- className: s(
982
+ ref: r,
983
+ className: n(
2025
984
  "gryt-dialog-title text-base font-semibold text-gryt-text",
2026
985
  t
2027
986
  ),
2028
- ...r
987
+ ...e
2029
988
  }
2030
989
  );
2031
990
  }
2032
- ), Kt = i(
2033
- function({ className: t, ...r }, e) {
991
+ ), re = s(
992
+ function({ className: t, ...e }, r) {
2034
993
  return /* @__PURE__ */ o(
2035
- M.Description,
994
+ C.Description,
2036
995
  {
2037
- ref: e,
2038
- className: s(
996
+ ref: r,
997
+ className: n(
2039
998
  "gryt-dialog-description text-sm text-gryt-muted",
2040
999
  t
2041
1000
  ),
2042
- ...r
1001
+ ...e
2043
1002
  }
2044
1003
  );
2045
1004
  }
2046
- ), Jt = i(
2047
- function({ className: t, ...r }, e) {
1005
+ ), oe = s(
1006
+ function({ className: t, ...e }, r) {
2048
1007
  return /* @__PURE__ */ o(
2049
1008
  "div",
2050
1009
  {
2051
- ref: e,
2052
- className: s(
1010
+ ref: r,
1011
+ className: n(
2053
1012
  "gryt-dialog-footer flex justify-end gap-3",
2054
1013
  t
2055
1014
  ),
2056
- ...r
1015
+ ...e
2057
1016
  }
2058
1017
  );
2059
1018
  }
2060
- ), Ho = {
2061
- Root: M.Root,
2062
- Trigger: M.Trigger,
2063
- Portal: M.Portal,
2064
- Close: M.Close,
2065
- Backdrop: Yt,
2066
- Popup: Xt,
2067
- Title: Wt,
2068
- Description: Kt,
2069
- Footer: Jt
2070
- }, Qt = () => () => {
1019
+ ), Lo = {
1020
+ Root: C.Root,
1021
+ Trigger: C.Trigger,
1022
+ Portal: C.Portal,
1023
+ Close: C.Close,
1024
+ Backdrop: qt,
1025
+ Popup: te,
1026
+ Title: ee,
1027
+ Description: re,
1028
+ Footer: oe
1029
+ }, ae = () => () => {
2071
1030
  };
2072
- function Zt(a) {
2073
- const t = de(
2074
- (e) => {
2075
- if (typeof window > "u" || !window.matchMedia) return Qt();
2076
- const n = window.matchMedia(a);
2077
- return n.addEventListener("change", e), () => n.removeEventListener("change", e);
1031
+ function ne(a) {
1032
+ const t = U(
1033
+ (r) => {
1034
+ if (typeof window > "u" || !window.matchMedia) return ae();
1035
+ const i = window.matchMedia(a);
1036
+ return i.addEventListener("change", r), () => i.removeEventListener("change", r);
2078
1037
  },
2079
1038
  [a]
2080
- ), r = de(() => typeof window > "u" || !window.matchMedia ? !1 : window.matchMedia(a).matches, [a]);
2081
- return Je(t, r, () => !1);
1039
+ ), e = U(() => typeof window > "u" || !window.matchMedia ? !1 : window.matchMedia(a).matches, [a]);
1040
+ return wt(t, e, () => !1);
2082
1041
  }
2083
- const qt = {
1042
+ const ie = {
2084
1043
  left: "left",
2085
1044
  right: "right",
2086
1045
  top: "up",
2087
1046
  bottom: "down"
2088
- }, te = Qe("right"), er = {
1047
+ }, _ = vt("right"), se = {
2089
1048
  left: "items-stretch justify-start",
2090
1049
  right: "items-stretch justify-end",
2091
1050
  top: "items-start justify-center",
2092
1051
  bottom: "items-end justify-center"
2093
- }, tr = {
1052
+ }, ce = {
2094
1053
  left: "rounded-r-(--gryt-radius-xl)",
2095
1054
  right: "rounded-l-(--gryt-radius-xl)",
2096
1055
  top: "rounded-b-(--gryt-radius-xl)",
2097
1056
  bottom: "rounded-t-(--gryt-radius-xl)"
2098
- }, rr = {
1057
+ }, le = {
2099
1058
  left: [
2100
1059
  "h-full w-[calc(20rem+var(--gryt-drawer-bleed))] max-w-[calc(85vw+var(--gryt-drawer-bleed))]",
2101
1060
  "-ml-(--gryt-drawer-bleed) border-r py-5 pr-5 pl-[calc(1.25rem+var(--gryt-drawer-bleed))]",
@@ -2125,41 +1084,41 @@ const qt = {
2125
1084
  "data-ending-style:[transform:translateY(calc(100%-var(--gryt-drawer-bleed)))]"
2126
1085
  ].join(" ")
2127
1086
  };
2128
- function ar({
1087
+ function de({
2129
1088
  side: a = "right",
2130
1089
  sheetOnMobile: t = !0,
2131
- children: r,
2132
- ...e
1090
+ children: e,
1091
+ ...r
2133
1092
  }) {
2134
- const n = Zt("(max-width: 767px)"), c = t && n ? "bottom" : a;
2135
- return /* @__PURE__ */ o(te.Provider, { value: c, children: /* @__PURE__ */ o(k.Root, { swipeDirection: qt[c], ...e, children: r }) });
1093
+ const i = ne("(max-width: 767px)"), c = t && i ? "bottom" : a;
1094
+ return /* @__PURE__ */ o(_.Provider, { value: c, children: /* @__PURE__ */ o(v.Root, { swipeDirection: ie[c], ...r, children: e }) });
2136
1095
  }
2137
- const or = i(
2138
- function({ className: t, ...r }, e) {
2139
- const n = ue(te);
1096
+ const ge = s(
1097
+ function({ className: t, ...e }, r) {
1098
+ const i = K(_);
2140
1099
  return /* @__PURE__ */ o(
2141
- k.Viewport,
1100
+ v.Viewport,
2142
1101
  {
2143
- ref: e,
2144
- className: s(
1102
+ ref: r,
1103
+ className: n(
2145
1104
  // z-50 matters: the popup is no longer positioned itself, so the
2146
1105
  // viewport is what has to sit above the page. Without it a sticky
2147
1106
  // site header renders over the panel.
2148
1107
  "gryt-drawer-viewport fixed inset-0 z-50 flex",
2149
- er[n],
1108
+ se[i],
2150
1109
  t
2151
1110
  ),
2152
- ...r
1111
+ ...e
2153
1112
  }
2154
1113
  );
2155
1114
  }
2156
- ), nr = i(function({ className: t, ...r }, e) {
2157
- const n = ue(te);
1115
+ ), ue = s(function({ className: t, ...e }, r) {
1116
+ const i = K(_);
2158
1117
  return /* @__PURE__ */ o(
2159
- k.Popup,
1118
+ v.Popup,
2160
1119
  {
2161
- ref: e,
2162
- className: s(
1120
+ ref: r,
1121
+ className: n(
2163
1122
  "gryt-drawer flex flex-col gap-4 border-gryt-border bg-gryt-surface text-gryt-text",
2164
1123
  "overflow-y-auto overscroll-contain outline-none",
2165
1124
  "transition-transform duration-(--gryt-dur-spring-soft) ease-spring",
@@ -2167,19 +1126,19 @@ const or = i(
2167
1126
  // duration here turns a drag into a drag plus lag.
2168
1127
  "data-swiping:duration-0 data-swiping:select-none",
2169
1128
  "motion-reduce:transition-none",
2170
- rr[n],
2171
- tr[n],
1129
+ le[i],
1130
+ ce[i],
2172
1131
  t
2173
1132
  ),
2174
- ...r
1133
+ ...e
2175
1134
  }
2176
1135
  );
2177
- }), sr = i(function({ className: t, ...r }, e) {
1136
+ }), ye = s(function({ className: t, ...e }, r) {
2178
1137
  return /* @__PURE__ */ o(
2179
- k.Backdrop,
1138
+ v.Backdrop,
2180
1139
  {
2181
- ref: e,
2182
- className: s(
1140
+ ref: r,
1141
+ className: n(
2183
1142
  "gryt-drawer-backdrop fixed inset-0 z-50 min-h-dvh bg-black/60",
2184
1143
  "backdrop-blur-(--gryt-backdrop-blur)",
2185
1144
  // Lightens as the panel is dragged away, so letting go halfway does not
@@ -2191,17 +1150,17 @@ const or = i(
2191
1150
  "motion-reduce:transition-none",
2192
1151
  t
2193
1152
  ),
2194
- ...r
1153
+ ...e
2195
1154
  }
2196
1155
  );
2197
1156
  });
2198
- function cr({ className: a }) {
2199
- const t = ue(te);
1157
+ function pe({ className: a }) {
1158
+ const t = K(_);
2200
1159
  return t !== "bottom" && t !== "top" ? null : /* @__PURE__ */ o(
2201
1160
  "div",
2202
1161
  {
2203
1162
  "aria-hidden": !0,
2204
- className: s(
1163
+ className: n(
2205
1164
  "gryt-drawer-grabber mx-auto h-1.5 w-10 shrink-0 rounded-(--gryt-radius-full) bg-gryt-border",
2206
1165
  t === "top" && "order-last",
2207
1166
  a
@@ -2209,50 +1168,50 @@ function cr({ className: a }) {
2209
1168
  }
2210
1169
  );
2211
1170
  }
2212
- const Do = {
2213
- Root: ar,
2214
- Trigger: k.Trigger,
2215
- Portal: k.Portal,
2216
- Backdrop: sr,
2217
- Viewport: or,
2218
- Popup: nr,
2219
- Content: k.Content,
2220
- Grabber: cr,
2221
- Close: k.Close,
2222
- Title: k.Title,
2223
- Description: k.Description
2224
- }, ir = i(
2225
- function({ className: t, sideOffset: r = 8, ...e }, n) {
1171
+ const jo = {
1172
+ Root: de,
1173
+ Trigger: v.Trigger,
1174
+ Portal: v.Portal,
1175
+ Backdrop: ye,
1176
+ Viewport: ge,
1177
+ Popup: ue,
1178
+ Content: v.Content,
1179
+ Grabber: pe,
1180
+ Close: v.Close,
1181
+ Title: v.Title,
1182
+ Description: v.Description
1183
+ }, me = s(
1184
+ function({ className: t, sideOffset: e = 8, ...r }, i) {
2226
1185
  return /* @__PURE__ */ o(
2227
- j.Positioner,
1186
+ A.Positioner,
2228
1187
  {
2229
- ref: n,
2230
- sideOffset: r,
2231
- className: s("gryt-menu-positioner outline-none", t),
2232
- ...e
1188
+ ref: i,
1189
+ sideOffset: e,
1190
+ className: n("gryt-menu-positioner outline-none", t),
1191
+ ...r
2233
1192
  }
2234
1193
  );
2235
1194
  }
2236
- ), dr = i(function({ className: t, ...r }, e) {
1195
+ ), be = s(function({ className: t, ...e }, r) {
2237
1196
  return /* @__PURE__ */ o(
2238
- j.Popup,
1197
+ A.Popup,
2239
1198
  {
2240
- ref: e,
2241
- className: s(
1199
+ ref: r,
1200
+ className: n(
2242
1201
  "gryt-menu min-w-44 p-1 outline-none",
2243
- E,
2244
- H,
1202
+ D,
1203
+ $,
2245
1204
  t
2246
1205
  ),
2247
- ...r
1206
+ ...e
2248
1207
  }
2249
1208
  );
2250
- }), lr = i(function({ className: t, ...r }, e) {
1209
+ }), fe = s(function({ className: t, ...e }, r) {
2251
1210
  return /* @__PURE__ */ o(
2252
- j.Item,
1211
+ A.Item,
2253
1212
  {
2254
- ref: e,
2255
- className: s(
1213
+ ref: r,
1214
+ className: n(
2256
1215
  "gryt-menu-item flex cursor-pointer items-center gap-2 rounded-(--gryt-radius-md)",
2257
1216
  "px-3 py-2 text-sm text-gryt-text outline-none select-none",
2258
1217
  // Base UI drives keyboard and pointer highlight through the same
@@ -2261,32 +1220,32 @@ const Do = {
2261
1220
  "data-disabled:cursor-not-allowed data-disabled:opacity-50",
2262
1221
  t
2263
1222
  ),
2264
- ...r
1223
+ ...e
2265
1224
  }
2266
1225
  );
2267
- }), ur = i(function({ className: t, ...r }, e) {
1226
+ }), xe = s(function({ className: t, ...e }, r) {
2268
1227
  return /* @__PURE__ */ o(
2269
- j.Separator,
1228
+ A.Separator,
2270
1229
  {
2271
- ref: e,
2272
- className: s("gryt-menu-separator my-1 h-px bg-gryt-border", t),
2273
- ...r
1230
+ ref: r,
1231
+ className: n("gryt-menu-separator my-1 h-px bg-gryt-border", t),
1232
+ ...e
2274
1233
  }
2275
1234
  );
2276
- }), ie = {
2277
- Root: j.Root,
2278
- Trigger: j.Trigger,
2279
- Portal: j.Portal,
2280
- Positioner: ir,
2281
- Popup: dr,
2282
- Item: lr,
2283
- Separator: ur
2284
- }, gr = i(function({ className: t, ...r }, e) {
1235
+ }), X = {
1236
+ Root: A.Root,
1237
+ Trigger: A.Trigger,
1238
+ Portal: A.Portal,
1239
+ Positioner: me,
1240
+ Popup: be,
1241
+ Item: fe,
1242
+ Separator: xe
1243
+ }, he = s(function({ className: t, ...e }, r) {
2285
1244
  return /* @__PURE__ */ o(
2286
- Z.Root,
1245
+ E.Root,
2287
1246
  {
2288
- ref: e,
2289
- className: s(
1247
+ ref: r,
1248
+ className: n(
2290
1249
  "gryt-tabs",
2291
1250
  // Vertical puts the rail and the panel side by side. min-w-0 on the
2292
1251
  // panel does the rest; without the flex here the panel lands under the
@@ -2294,15 +1253,15 @@ const Do = {
2294
1253
  "data-[orientation=vertical]:flex data-[orientation=vertical]:items-stretch",
2295
1254
  t
2296
1255
  ),
2297
- ...r
1256
+ ...e
2298
1257
  }
2299
1258
  );
2300
- }), fr = i(function({ className: t, ...r }, e) {
1259
+ }), we = s(function({ className: t, ...e }, r) {
2301
1260
  return /* @__PURE__ */ o(
2302
- Z.List,
1261
+ E.List,
2303
1262
  {
2304
- ref: e,
2305
- className: s(
1263
+ ref: r,
1264
+ className: n(
2306
1265
  "gryt-tabs-list relative inline-flex items-center gap-1 rounded-(--gryt-radius-full) bg-gryt-surface-raised p-1",
2307
1266
  // A rail, not a pill: rows are full width and the corner radius drops
2308
1267
  // to lg, because a 999px radius on a tall box bows its short edges.
@@ -2311,15 +1270,15 @@ const Do = {
2311
1270
  "data-[orientation=vertical]:rounded-(--gryt-radius-lg)",
2312
1271
  t
2313
1272
  ),
2314
- ...r
1273
+ ...e
2315
1274
  }
2316
1275
  );
2317
- }), yr = i(function({ className: t, ...r }, e) {
1276
+ }), ve = s(function({ className: t, ...e }, r) {
2318
1277
  return /* @__PURE__ */ o(
2319
- Z.Tab,
1278
+ E.Tab,
2320
1279
  {
2321
- ref: e,
2322
- className: s(
1280
+ ref: r,
1281
+ className: n(
2323
1282
  "gryt-tab inline-flex min-h-8 cursor-pointer items-center justify-center whitespace-nowrap",
2324
1283
  "rounded-(--gryt-radius-full) border-0 bg-transparent px-4 py-1.5",
2325
1284
  "text-sm font-medium text-gryt-muted select-none",
@@ -2334,20 +1293,20 @@ const Do = {
2334
1293
  "data-[orientation=vertical]:gap-2.5 data-[orientation=vertical]:px-3",
2335
1294
  "data-[orientation=vertical]:rounded-(--gryt-radius-md)",
2336
1295
  "data-disabled:cursor-not-allowed data-disabled:opacity-50",
2337
- x,
1296
+ b,
2338
1297
  t
2339
1298
  ),
2340
- ...r
1299
+ ...e
2341
1300
  }
2342
1301
  );
2343
- }), mr = i(
2344
- function({ className: t, ...r }, e) {
1302
+ }), Ne = s(
1303
+ function({ className: t, ...e }, r) {
2345
1304
  return /* @__PURE__ */ o(
2346
- Z.Indicator,
1305
+ E.Indicator,
2347
1306
  {
2348
- ref: e,
1307
+ ref: r,
2349
1308
  renderBeforeHydration: !0,
2350
- className: s(
1309
+ className: n(
2351
1310
  "gryt-tabs-indicator absolute top-1 left-0 z-0 h-[calc(100%-0.5rem)]",
2352
1311
  "w-(--active-tab-width) translate-x-(--active-tab-left)",
2353
1312
  "rounded-(--gryt-radius-full) bg-gryt-accent",
@@ -2363,16 +1322,16 @@ const Do = {
2363
1322
  "[[data-orientation=vertical]_&]:transition-[translate,height]",
2364
1323
  t
2365
1324
  ),
2366
- ...r
1325
+ ...e
2367
1326
  }
2368
1327
  );
2369
1328
  }
2370
- ), pr = i(function({ className: t, ...r }, e) {
1329
+ ), Pe = s(function({ className: t, ...e }, r) {
2371
1330
  return /* @__PURE__ */ o(
2372
- Z.Panel,
1331
+ E.Panel,
2373
1332
  {
2374
- ref: e,
2375
- className: s(
1333
+ ref: r,
1334
+ className: n(
2376
1335
  "gryt-tabs-panel pt-3 text-sm text-gryt-text",
2377
1336
  // Beside the rail rather than under it, and allowed to shrink so long
2378
1337
  // content wraps instead of pushing the rail off screen.
@@ -2380,194 +1339,194 @@ const Do = {
2380
1339
  "data-[orientation=vertical]:pt-0 data-[orientation=vertical]:pl-4",
2381
1340
  t
2382
1341
  ),
2383
- ...r
1342
+ ...e
2384
1343
  }
2385
1344
  );
2386
- }), Go = Object.assign(gr, { List: fr, Tab: yr, Panel: pr, Indicator: mr }), br = i(function({ className: t, ...r }, e) {
1345
+ }), Bo = Object.assign(he, { List: we, Tab: ve, Panel: Pe, Indicator: Ne }), Te = s(function({ className: t, ...e }, r) {
2387
1346
  return /* @__PURE__ */ o(
2388
- K.Root,
1347
+ F.Root,
2389
1348
  {
2390
- ref: e,
2391
- className: s(
1349
+ ref: r,
1350
+ className: n(
2392
1351
  "gryt-accordion flex w-full flex-col gap-2 rounded-(--gryt-radius-xl) border border-gryt-border bg-gryt-surface p-2",
2393
1352
  t
2394
1353
  ),
2395
- ...r
1354
+ ...e
2396
1355
  }
2397
1356
  );
2398
- }), hr = i(
2399
- function({ className: t, ...r }, e) {
1357
+ }), ke = s(
1358
+ function({ className: t, ...e }, r) {
2400
1359
  return /* @__PURE__ */ o(
2401
- K.Item,
1360
+ F.Item,
2402
1361
  {
2403
- ref: e,
2404
- className: s("gryt-accordion-item", t),
2405
- ...r
1362
+ ref: r,
1363
+ className: n("gryt-accordion-item", t),
1364
+ ...e
2406
1365
  }
2407
1366
  );
2408
1367
  }
2409
- ), xr = i(
2410
- function({ children: t, className: r, expandIcon: e, ...n }, c) {
2411
- return /* @__PURE__ */ o(K.Header, { className: "gryt-accordion-header m-0", children: /* @__PURE__ */ m(
2412
- K.Trigger,
1368
+ ), Ce = s(
1369
+ function({ children: t, className: e, expandIcon: r, ...i }, c) {
1370
+ return /* @__PURE__ */ o(F.Header, { className: "gryt-accordion-header m-0", children: /* @__PURE__ */ d(
1371
+ F.Trigger,
2413
1372
  {
2414
1373
  ref: c,
2415
- className: s(
1374
+ className: n(
2416
1375
  "gryt-accordion-trigger flex w-full cursor-pointer items-center justify-between gap-3",
2417
1376
  "rounded-(--gryt-radius-lg) border-0 bg-transparent px-3 py-2.5",
2418
1377
  "text-left text-sm font-medium text-gryt-text select-none",
2419
1378
  "transition-colors duration-150 hover:bg-gryt-surface-raised",
2420
1379
  "data-disabled:cursor-not-allowed data-disabled:opacity-50",
2421
- x,
2422
- r
1380
+ b,
1381
+ e
2423
1382
  ),
2424
- ...n,
1383
+ ...i,
2425
1384
  children: [
2426
1385
  t,
2427
- e === void 0 ? /* @__PURE__ */ o(
2428
- at,
1386
+ r === void 0 ? /* @__PURE__ */ o(
1387
+ St,
2429
1388
  {
2430
1389
  size: 16,
2431
1390
  className: "shrink-0 transition-transform duration-(--gryt-dur-spring) ease-spring data-panel-open:rotate-180 motion-reduce:transition-none"
2432
1391
  }
2433
- ) : e
1392
+ ) : r
2434
1393
  ]
2435
1394
  }
2436
1395
  ) });
2437
1396
  }
2438
- ), wr = i(
2439
- function({ children: t, className: r, ...e }, n) {
1397
+ ), Se = s(
1398
+ function({ children: t, className: e, ...r }, i) {
2440
1399
  return /* @__PURE__ */ o(
2441
- K.Panel,
1400
+ F.Panel,
2442
1401
  {
2443
- ref: n,
2444
- className: s(
1402
+ ref: i,
1403
+ className: n(
2445
1404
  "gryt-accordion-panel overflow-hidden text-sm text-gryt-muted",
2446
1405
  // Base UI measures the panel and exposes the height as a variable,
2447
1406
  // which is what makes a real open and close transition possible.
2448
1407
  "h-[var(--accordion-panel-height)] transition-[height] duration-(--gryt-dur-spring-soft) ease-spring",
2449
1408
  "data-starting-style:h-0 data-ending-style:h-0",
2450
1409
  "motion-reduce:transition-none",
2451
- r
1410
+ e
2452
1411
  ),
2453
- ...e,
1412
+ ...r,
2454
1413
  children: /* @__PURE__ */ o("div", { className: "px-3 pt-1 pb-3", children: t })
2455
1414
  }
2456
1415
  );
2457
1416
  }
2458
- ), jo = Object.assign(br, { Item: hr, Trigger: xr, Panel: wr }), vr = i(
2459
- function({ className: t, sideOffset: r = 2, ...e }, n) {
1417
+ ), zo = Object.assign(Te, { Item: ke, Trigger: Ce, Panel: Se }), $e = s(
1418
+ function({ className: t, sideOffset: e = 2, ...r }, i) {
2460
1419
  return /* @__PURE__ */ o(
2461
- A.Positioner,
1420
+ k.Positioner,
2462
1421
  {
2463
- ref: n,
2464
- sideOffset: r,
2465
- className: s("gryt-context-menu-positioner outline-none", t),
2466
- ...e
1422
+ ref: i,
1423
+ sideOffset: e,
1424
+ className: n("gryt-context-menu-positioner outline-none", t),
1425
+ ...r
2467
1426
  }
2468
1427
  );
2469
1428
  }
2470
- ), Eo = {
2471
- Root: A.Root,
2472
- Trigger: A.Trigger,
2473
- Portal: A.Portal,
2474
- Positioner: vr,
2475
- Popup: ie.Popup,
2476
- Item: ie.Item,
2477
- Separator: ie.Separator,
2478
- Group: A.Group,
2479
- GroupLabel: A.GroupLabel,
2480
- SubmenuRoot: A.SubmenuRoot,
2481
- SubmenuTrigger: A.SubmenuTrigger
2482
- }, Nr = i(
2483
- function({ className: t, sideOffset: r = 8, ...e }, n) {
1429
+ ), Fo = {
1430
+ Root: k.Root,
1431
+ Trigger: k.Trigger,
1432
+ Portal: k.Portal,
1433
+ Positioner: $e,
1434
+ Popup: X.Popup,
1435
+ Item: X.Item,
1436
+ Separator: X.Separator,
1437
+ Group: k.Group,
1438
+ GroupLabel: k.GroupLabel,
1439
+ SubmenuRoot: k.SubmenuRoot,
1440
+ SubmenuTrigger: k.SubmenuTrigger
1441
+ }, Re = s(
1442
+ function({ className: t, sideOffset: e = 8, ...r }, i) {
2484
1443
  return /* @__PURE__ */ o(
2485
- R.Positioner,
1444
+ P.Positioner,
2486
1445
  {
2487
- ref: n,
2488
- sideOffset: r,
2489
- className: s("gryt-popover-positioner outline-none", t),
2490
- ...e
1446
+ ref: i,
1447
+ sideOffset: e,
1448
+ className: n("gryt-popover-positioner outline-none", t),
1449
+ ...r
2491
1450
  }
2492
1451
  );
2493
1452
  }
2494
- ), Pr = i(
2495
- function({ className: t, ...r }, e) {
1453
+ ), Ie = s(
1454
+ function({ className: t, ...e }, r) {
2496
1455
  return /* @__PURE__ */ o(
2497
- R.Popup,
1456
+ P.Popup,
2498
1457
  {
2499
- ref: e,
2500
- className: s(
1458
+ ref: r,
1459
+ className: n(
2501
1460
  "gryt-popover max-w-[min(20rem,calc(100vw-2rem))] p-4 outline-none",
2502
- E,
2503
- H,
1461
+ D,
1462
+ $,
2504
1463
  t
2505
1464
  ),
2506
- ...r
1465
+ ...e
2507
1466
  }
2508
1467
  );
2509
1468
  }
2510
- ), kr = i(function({ className: t, ...r }, e) {
1469
+ ), Ae = s(function({ className: t, ...e }, r) {
2511
1470
  return /* @__PURE__ */ o(
2512
- R.Title,
1471
+ P.Title,
2513
1472
  {
2514
- ref: e,
2515
- className: s(
1473
+ ref: r,
1474
+ className: n(
2516
1475
  "gryt-popover-title text-sm font-semibold text-gryt-text",
2517
1476
  t
2518
1477
  ),
2519
- ...r
1478
+ ...e
2520
1479
  }
2521
1480
  );
2522
- }), Tr = i(function({ className: t, ...r }, e) {
1481
+ }), De = s(function({ className: t, ...e }, r) {
2523
1482
  return /* @__PURE__ */ o(
2524
- R.Description,
1483
+ P.Description,
2525
1484
  {
2526
- ref: e,
2527
- className: s(
1485
+ ref: r,
1486
+ className: n(
2528
1487
  "gryt-popover-description mt-1 text-sm leading-6 text-gryt-muted",
2529
1488
  t
2530
1489
  ),
2531
- ...r
1490
+ ...e
2532
1491
  }
2533
1492
  );
2534
- }), zo = {
2535
- Root: R.Root,
2536
- Trigger: R.Trigger,
2537
- Portal: R.Portal,
2538
- Positioner: Nr,
2539
- Popup: Pr,
2540
- Title: kr,
2541
- Description: Tr,
2542
- Close: R.Close,
2543
- Arrow: R.Arrow
2544
- }, Lr = {
1493
+ }), Eo = {
1494
+ Root: P.Root,
1495
+ Trigger: P.Trigger,
1496
+ Portal: P.Portal,
1497
+ Positioner: Re,
1498
+ Popup: Ie,
1499
+ Title: Ae,
1500
+ Description: De,
1501
+ Close: P.Close,
1502
+ Arrow: P.Arrow
1503
+ }, Me = {
2545
1504
  neutral: "border-white/8 bg-gryt-surface",
2546
1505
  info: "border-gryt-secondary-6 bg-gryt-secondary-2",
2547
1506
  success: "border-gryt-success-6 bg-gryt-success-2",
2548
1507
  warning: "border-gryt-warning-6 bg-gryt-warning-2",
2549
1508
  danger: "border-gryt-danger-6 bg-gryt-danger-2"
2550
- }, Sr = i(
2551
- function({ className: t, ...r }, e) {
1509
+ }, Ge = s(
1510
+ function({ className: t, ...e }, r) {
2552
1511
  return /* @__PURE__ */ o(
2553
- C.Viewport,
1512
+ T.Viewport,
2554
1513
  {
2555
- ref: e,
2556
- className: s(
1514
+ ref: r,
1515
+ className: n(
2557
1516
  "gryt-toast-viewport fixed right-4 bottom-4 z-50 flex w-[min(22rem,calc(100vw-2rem))]",
2558
1517
  "flex-col gap-2 outline-none",
2559
1518
  t
2560
1519
  ),
2561
- ...r
1520
+ ...e
2562
1521
  }
2563
1522
  );
2564
1523
  }
2565
- ), Rr = i(function({ className: t, severity: r = "neutral", ...e }, n) {
1524
+ ), Le = s(function({ className: t, severity: e = "neutral", ...r }, i) {
2566
1525
  return /* @__PURE__ */ o(
2567
- C.Root,
1526
+ T.Root,
2568
1527
  {
2569
- ref: n,
2570
- className: s(
1528
+ ref: i,
1529
+ className: n(
2571
1530
  "gryt-toast relative flex flex-col p-3 pr-9",
2572
1531
  // Not popupSurface. That border is --gryt-border, a solid slate line
2573
1532
  // that is right for a menu anchored to the thing that opened it and too
@@ -2575,7 +1534,7 @@ const Do = {
2575
1534
  // white hairline separates it from the page without drawing a box
2576
1535
  // around it.
2577
1536
  "rounded-(--gryt-radius-xl) border text-gryt-text",
2578
- Lr[r],
1537
+ Me[e],
2579
1538
  // Swiping is a pointer gesture, so the toast follows the finger
2580
1539
  // through Base UI's swipe variables before it animates out.
2581
1540
  "transition-[opacity,transform] duration-(--gryt-dur-spring) ease-spring",
@@ -2584,56 +1543,56 @@ const Do = {
2584
1543
  "motion-reduce:transition-none",
2585
1544
  t
2586
1545
  ),
2587
- ...e
1546
+ ...r
2588
1547
  }
2589
1548
  );
2590
- }), $r = i(function({ className: t, ...r }, e) {
1549
+ }), je = s(function({ className: t, ...e }, r) {
2591
1550
  return /* @__PURE__ */ o(
2592
- C.Title,
1551
+ T.Title,
2593
1552
  {
2594
- ref: e,
2595
- className: s(
1553
+ ref: r,
1554
+ className: n(
2596
1555
  "gryt-toast-title text-sm font-semibold text-gryt-text",
2597
1556
  t
2598
1557
  ),
2599
- ...r
1558
+ ...e
2600
1559
  }
2601
1560
  );
2602
- }), Cr = i(function({ className: t, ...r }, e) {
1561
+ }), Be = s(function({ className: t, ...e }, r) {
2603
1562
  return /* @__PURE__ */ o(
2604
- C.Description,
1563
+ T.Description,
2605
1564
  {
2606
- ref: e,
2607
- className: s(
1565
+ ref: r,
1566
+ className: n(
2608
1567
  "gryt-toast-description mt-0.5 text-sm leading-6 text-gryt-muted",
2609
1568
  t
2610
1569
  ),
2611
- ...r
1570
+ ...e
2612
1571
  }
2613
1572
  );
2614
- }), Ar = i(function({ className: t, children: r, ...e }, n) {
1573
+ }), ze = s(function({ className: t, children: e, ...r }, i) {
2615
1574
  return /* @__PURE__ */ o(
2616
- C.Close,
1575
+ T.Close,
2617
1576
  {
2618
- ref: n,
1577
+ ref: i,
2619
1578
  "aria-label": "Close",
2620
- className: s(
1579
+ className: n(
2621
1580
  "gryt-toast-close absolute top-2.5 right-2.5 inline-flex h-6 w-6 items-center justify-center",
2622
1581
  "rounded-(--gryt-radius-full) border-0 bg-transparent text-gryt-muted",
2623
1582
  "transition-colors hover:bg-white/8 hover:text-gryt-text motion-reduce:transition-none",
2624
1583
  "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gryt-accent-light",
2625
1584
  t
2626
1585
  ),
2627
- ...e,
2628
- children: r ?? /* @__PURE__ */ o($e, { size: 14, weight: "bold" })
1586
+ ...r,
1587
+ children: e ?? /* @__PURE__ */ o(st, { size: 14, weight: "bold" })
2629
1588
  }
2630
1589
  );
2631
- }), Mr = i(function({ className: t, ...r }, e) {
1590
+ }), Fe = s(function({ className: t, ...e }, r) {
2632
1591
  return /* @__PURE__ */ o(
2633
- C.Action,
1592
+ T.Action,
2634
1593
  {
2635
- ref: e,
2636
- className: s(
1594
+ ref: r,
1595
+ className: n(
2637
1596
  "gryt-toast-action mt-2 self-start rounded-(--gryt-radius-full) border-0",
2638
1597
  "bg-gryt-accent px-3 py-1.5 text-sm font-medium text-gryt-on-accent",
2639
1598
  "transition-[scale] duration-(--gryt-dur-spring) ease-spring",
@@ -2641,73 +1600,73 @@ const Do = {
2641
1600
  "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gryt-accent-light",
2642
1601
  t
2643
1602
  ),
2644
- ...r
1603
+ ...e
2645
1604
  }
2646
1605
  );
2647
- }), Bo = {
2648
- Provider: C.Provider,
2649
- Portal: C.Portal,
2650
- Viewport: Sr,
2651
- Root: Rr,
2652
- Title: $r,
2653
- Description: Cr,
2654
- Close: Ar,
2655
- Action: Mr
2656
- }, Fo = C.useToastManager, Ir = i(
2657
- function({ className: t, ...r }, e) {
1606
+ }), Vo = {
1607
+ Provider: T.Provider,
1608
+ Portal: T.Portal,
1609
+ Viewport: Ge,
1610
+ Root: Le,
1611
+ Title: je,
1612
+ Description: Be,
1613
+ Close: ze,
1614
+ Action: Fe
1615
+ }, _o = T.useToastManager, Ee = s(
1616
+ function({ className: t, ...e }, r) {
2658
1617
  return /* @__PURE__ */ o(
2659
- _.Root,
1618
+ L.Root,
2660
1619
  {
2661
- ref: e,
2662
- className: s("gryt-scroll-area relative", t),
2663
- ...r
1620
+ ref: r,
1621
+ className: n("gryt-scroll-area relative", t),
1622
+ ...e
2664
1623
  }
2665
1624
  );
2666
1625
  }
2667
- ), Hr = i(
2668
- function({ className: t, ...r }, e) {
1626
+ ), Ve = s(
1627
+ function({ className: t, ...e }, r) {
2669
1628
  return /* @__PURE__ */ o(
2670
- _.Viewport,
1629
+ L.Viewport,
2671
1630
  {
2672
- ref: e,
2673
- className: s(
1631
+ ref: r,
1632
+ className: n(
2674
1633
  "gryt-scroll-area-viewport h-full w-full overscroll-contain",
2675
1634
  "focus-visible:outline-2 focus-visible:-outline-offset-1 focus-visible:outline-gryt-accent-light",
2676
1635
  t
2677
1636
  ),
2678
- ...r
1637
+ ...e
2679
1638
  }
2680
1639
  );
2681
1640
  }
2682
- ), Dr = i(
2683
- function({ className: t, orientation: r, ...e }, n) {
1641
+ ), _e = s(
1642
+ function({ className: t, orientation: e, ...r }, i) {
2684
1643
  return /* @__PURE__ */ o(
2685
- _.Scrollbar,
1644
+ L.Scrollbar,
2686
1645
  {
2687
- ref: n,
2688
- orientation: r,
2689
- className: s(
1646
+ ref: i,
1647
+ orientation: e,
1648
+ className: n(
2690
1649
  "gryt-scroll-area-scrollbar flex touch-none p-0.5 select-none",
2691
1650
  // Fades in on hover or while scrolling rather than sitting there
2692
1651
  // permanently — a chat sidebar is mostly not being scrolled.
2693
1652
  "opacity-0 transition-opacity duration-(--gryt-dur-fast)",
2694
1653
  "data-hovering:opacity-100 data-scrolling:opacity-100",
2695
1654
  "motion-reduce:transition-none",
2696
- r === "horizontal" ? "h-2 flex-col" : "w-2",
1655
+ e === "horizontal" ? "h-2 flex-col" : "w-2",
2697
1656
  t
2698
1657
  ),
2699
- ...e,
2700
- children: /* @__PURE__ */ o(_.Thumb, { className: "flex-1 rounded-(--gryt-radius-full) bg-gryt-border transition-colors hover:bg-gryt-muted motion-reduce:transition-none" })
1658
+ ...r,
1659
+ 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" })
2701
1660
  }
2702
1661
  );
2703
1662
  }
2704
- ), _o = {
2705
- Root: Ir,
2706
- Viewport: Hr,
2707
- Scrollbar: Dr,
2708
- Content: _.Content,
2709
- Corner: _.Corner
2710
- }, Gr = {
1663
+ ), Yo = {
1664
+ Root: Ee,
1665
+ Viewport: Ve,
1666
+ Scrollbar: _e,
1667
+ Content: L.Content,
1668
+ Corner: L.Corner
1669
+ }, Ye = {
2711
1670
  primary: [
2712
1671
  "text-gryt-muted hover:not-data-disabled:bg-white/8",
2713
1672
  "data-pressed:bg-gryt-accent data-pressed:text-gryt-on-accent",
@@ -2728,18 +1687,18 @@ const Do = {
2728
1687
  "data-pressed:bg-gryt-danger data-pressed:text-gryt-on-danger",
2729
1688
  "data-pressed:hover:not-data-disabled:bg-gryt-danger"
2730
1689
  ].join(" ")
2731
- }, jr = {
1690
+ }, He = {
2732
1691
  xsmall: "h-8 min-w-8 px-2 text-xs",
2733
1692
  small: "h-9 min-w-9 px-2.5 text-sm",
2734
1693
  medium: "h-10 min-w-10 px-3 text-sm",
2735
1694
  large: "h-12 min-w-12 px-4 text-base"
2736
- }, Vo = i(
2737
- function({ className: t, size: r = "medium", tone: e = "primary", ...n }, c) {
1695
+ }, Ho = s(
1696
+ function({ className: t, size: e = "medium", tone: r = "primary", ...i }, c) {
2738
1697
  return /* @__PURE__ */ o(
2739
- it,
1698
+ Dt,
2740
1699
  {
2741
1700
  ref: c,
2742
- className: s(
1701
+ className: n(
2743
1702
  "gryt-toggle",
2744
1703
  "inline-flex shrink-0 items-center justify-center gap-2 border-0 bg-transparent",
2745
1704
  "rounded-(--gryt-radius-full) font-medium select-none",
@@ -2747,63 +1706,63 @@ const Do = {
2747
1706
  "transition-[scale,background-color,color] duration-(--gryt-dur-spring) ease-spring",
2748
1707
  "motion-safe:hover:not-data-disabled:scale-[1.06]",
2749
1708
  "motion-safe:active:not-data-disabled:scale-[0.94]",
2750
- x,
2751
- V,
2752
- jr[r],
2753
- Gr[e],
1709
+ b,
1710
+ j,
1711
+ He[e],
1712
+ Ye[r],
2754
1713
  t
2755
1714
  ),
2756
- ...n
1715
+ ...i
2757
1716
  }
2758
1717
  );
2759
1718
  }
2760
- ), Uo = i(
2761
- function({ className: t, ...r }, e) {
1719
+ ), Oo = s(
1720
+ function({ className: t, ...e }, r) {
2762
1721
  return /* @__PURE__ */ o(
2763
- dt,
1722
+ Mt,
2764
1723
  {
2765
- ref: e,
2766
- className: s(
1724
+ ref: r,
1725
+ className: n(
2767
1726
  "gryt-toggle-group inline-flex items-center gap-1",
2768
1727
  "rounded-(--gryt-radius-full) border border-gryt-border bg-gryt-surface p-1",
2769
1728
  t
2770
1729
  ),
2771
- ...r
1730
+ ...e
2772
1731
  }
2773
1732
  );
2774
1733
  }
2775
- ), Er = {
1734
+ ), Oe = {
2776
1735
  primary: "bg-gryt-accent",
2777
1736
  success: "bg-gryt-success",
2778
1737
  warning: "bg-gryt-warning",
2779
1738
  danger: "bg-gryt-danger"
2780
1739
  };
2781
- function Oo({
1740
+ function Xo({
2782
1741
  className: a,
2783
1742
  value: t,
2784
- label: r,
2785
- showValue: e = !1,
2786
- tone: n = "primary",
1743
+ label: e,
1744
+ showValue: r = !1,
1745
+ tone: i = "primary",
2787
1746
  ...c
2788
1747
  }) {
2789
- return /* @__PURE__ */ m(
2790
- O.Root,
1748
+ return /* @__PURE__ */ d(
1749
+ z.Root,
2791
1750
  {
2792
1751
  value: t,
2793
- className: s("gryt-meter flex w-full flex-col gap-1.5", a),
1752
+ className: n("gryt-meter flex w-full flex-col gap-1.5", a),
2794
1753
  ...c,
2795
1754
  children: [
2796
- (r || e) && /* @__PURE__ */ m("div", { className: "flex items-baseline justify-between gap-2", children: [
2797
- r ? /* @__PURE__ */ o(O.Label, { className: "text-sm text-gryt-muted", children: r }) : /* @__PURE__ */ o("span", {}),
2798
- e && /* @__PURE__ */ o(O.Value, { className: "font-mono text-xs text-gryt-muted tabular-nums" })
1755
+ (e || r) && /* @__PURE__ */ d("div", { className: "flex items-baseline justify-between gap-2", children: [
1756
+ e ? /* @__PURE__ */ o(z.Label, { className: "text-sm text-gryt-muted", children: e }) : /* @__PURE__ */ o("span", {}),
1757
+ r && /* @__PURE__ */ o(z.Value, { className: "font-mono text-xs text-gryt-muted tabular-nums" })
2799
1758
  ] }),
2800
- /* @__PURE__ */ o(O.Track, { className: "h-1.5 w-full overflow-hidden rounded-(--gryt-radius-full) bg-gryt-surface-raised", children: /* @__PURE__ */ o(
2801
- O.Indicator,
1759
+ /* @__PURE__ */ o(z.Track, { className: "h-1.5 w-full overflow-hidden rounded-(--gryt-radius-full) bg-gryt-surface-raised", children: /* @__PURE__ */ o(
1760
+ z.Indicator,
2802
1761
  {
2803
- className: s(
1762
+ className: n(
2804
1763
  "h-full rounded-(--gryt-radius-full)",
2805
1764
  "transition-[width] duration-120 ease-out motion-reduce:transition-none",
2806
- Er[n]
1765
+ Oe[i]
2807
1766
  )
2808
1767
  }
2809
1768
  ) })
@@ -2811,13 +1770,13 @@ function Oo({
2811
1770
  }
2812
1771
  );
2813
1772
  }
2814
- const zr = i(
2815
- function({ className: t, ...r }, e) {
1773
+ const Xe = s(
1774
+ function({ className: t, ...e }, r) {
2816
1775
  return /* @__PURE__ */ o(
2817
- I.Popup,
1776
+ S.Popup,
2818
1777
  {
2819
- ref: e,
2820
- className: s(
1778
+ ref: r,
1779
+ className: n(
2821
1780
  "gryt-alert-dialog fixed top-1/2 left-1/2 z-50 -translate-x-1/2 -translate-y-1/2",
2822
1781
  "flex w-[32rem] max-w-[calc(100vw-3rem)] flex-col gap-4",
2823
1782
  "rounded-(--gryt-radius-lg) border border-gryt-border bg-gryt-surface p-5 text-gryt-text",
@@ -2827,59 +1786,59 @@ const zr = i(
2827
1786
  "data-ending-style:scale-[0.98] data-ending-style:opacity-0",
2828
1787
  t
2829
1788
  ),
2830
- ...r
1789
+ ...e
2831
1790
  }
2832
1791
  );
2833
1792
  }
2834
- ), Br = i(function({ className: t, ...r }, e) {
1793
+ ), Ue = s(function({ className: t, ...e }, r) {
2835
1794
  return /* @__PURE__ */ o(
2836
- I.Backdrop,
1795
+ S.Backdrop,
2837
1796
  {
2838
- ref: e,
2839
- className: s(
1797
+ ref: r,
1798
+ className: n(
2840
1799
  "gryt-alert-dialog-backdrop fixed inset-0 z-50 min-h-dvh bg-black/60",
2841
1800
  "backdrop-blur-(--gryt-backdrop-blur)",
2842
1801
  "transition-opacity duration-(--gryt-dur-spring) ease-spring motion-reduce:transition-none",
2843
1802
  "data-starting-style:opacity-0 data-ending-style:opacity-0",
2844
1803
  t
2845
1804
  ),
2846
- ...r
1805
+ ...e
2847
1806
  }
2848
1807
  );
2849
- }), Fr = i(function({ className: t, ...r }, e) {
1808
+ }), Ke = s(function({ className: t, ...e }, r) {
2850
1809
  return /* @__PURE__ */ o(
2851
- I.Title,
1810
+ S.Title,
2852
1811
  {
2853
- ref: e,
2854
- className: s(
1812
+ ref: r,
1813
+ className: n(
2855
1814
  "gryt-alert-dialog-title text-lg font-semibold text-gryt-text",
2856
1815
  t
2857
1816
  ),
2858
- ...r
1817
+ ...e
2859
1818
  }
2860
1819
  );
2861
- }), _r = i(function({ className: t, ...r }, e) {
1820
+ }), We = s(function({ className: t, ...e }, r) {
2862
1821
  return /* @__PURE__ */ o(
2863
- I.Description,
1822
+ S.Description,
2864
1823
  {
2865
- ref: e,
2866
- className: s(
1824
+ ref: r,
1825
+ className: n(
2867
1826
  "gryt-alert-dialog-description text-sm leading-6 text-gryt-muted",
2868
1827
  t
2869
1828
  ),
2870
- ...r
1829
+ ...e
2871
1830
  }
2872
1831
  );
2873
- }), Yo = {
2874
- Root: I.Root,
2875
- Trigger: I.Trigger,
2876
- Portal: I.Portal,
2877
- Backdrop: Br,
2878
- Popup: zr,
2879
- Title: Fr,
2880
- Description: _r,
2881
- Close: I.Close
2882
- }, Oe = [
1832
+ }), Uo = {
1833
+ Root: S.Root,
1834
+ Trigger: S.Trigger,
1835
+ Portal: S.Portal,
1836
+ Backdrop: Ue,
1837
+ Popup: Xe,
1838
+ Title: Ke,
1839
+ Description: We,
1840
+ Close: S.Close
1841
+ }, pt = [
2883
1842
  "flex cursor-default items-center gap-2 rounded-(--gryt-radius-md)",
2884
1843
  "px-3 py-2 text-sm text-gryt-text outline-none select-none",
2885
1844
  // Base UI drives keyboard and pointer highlight through one attribute, so
@@ -2887,195 +1846,195 @@ const zr = i(
2887
1846
  "data-highlighted:bg-gryt-surface-raised",
2888
1847
  "data-selected:text-gryt-accent-11",
2889
1848
  "data-disabled:cursor-not-allowed data-disabled:opacity-50"
2890
- ].join(" "), Ye = [
2891
- Fe,
2892
- _e.medium,
1849
+ ].join(" "), mt = [
1850
+ dt,
1851
+ gt.medium,
2893
1852
  "border-gryt-border",
2894
- x
2895
- ].join(" "), Vr = i(function({ className: t, ...r }, e) {
1853
+ b
1854
+ ].join(" "), Qe = s(function({ className: t, ...e }, r) {
2896
1855
  return /* @__PURE__ */ o(
2897
- b.Input,
1856
+ g.Input,
2898
1857
  {
2899
- ref: e,
2900
- className: s("gryt-combobox-input", Ye, t),
2901
- ...r
1858
+ ref: r,
1859
+ className: n("gryt-combobox-input", mt, t),
1860
+ ...e
2902
1861
  }
2903
1862
  );
2904
- }), Ur = i(function({ className: t, sideOffset: r = 6, ...e }, n) {
1863
+ }), Je = s(function({ className: t, sideOffset: e = 6, ...r }, i) {
2905
1864
  return /* @__PURE__ */ o(
2906
- b.Positioner,
1865
+ g.Positioner,
2907
1866
  {
2908
- ref: n,
2909
- sideOffset: r,
2910
- className: s("gryt-combobox-positioner outline-none", t),
2911
- ...e
1867
+ ref: i,
1868
+ sideOffset: e,
1869
+ className: n("gryt-combobox-positioner outline-none", t),
1870
+ ...r
2912
1871
  }
2913
1872
  );
2914
- }), Or = i(
2915
- function({ className: t, ...r }, e) {
1873
+ }), Ze = s(
1874
+ function({ className: t, ...e }, r) {
2916
1875
  return /* @__PURE__ */ o(
2917
- b.Popup,
1876
+ g.Popup,
2918
1877
  {
2919
- ref: e,
2920
- className: s(
1878
+ ref: r,
1879
+ className: n(
2921
1880
  "gryt-combobox max-h-64 w-(--anchor-width) overflow-y-auto overscroll-contain p-1 outline-none",
2922
- E,
2923
- H,
1881
+ D,
1882
+ $,
2924
1883
  t
2925
1884
  ),
2926
- ...r
1885
+ ...e
2927
1886
  }
2928
1887
  );
2929
1888
  }
2930
- ), Yr = i(function({ className: t, ...r }, e) {
1889
+ ), qe = s(function({ className: t, ...e }, r) {
2931
1890
  return /* @__PURE__ */ o(
2932
- b.Item,
1891
+ g.Item,
2933
1892
  {
2934
- ref: e,
2935
- className: s("gryt-combobox-item", Oe, t),
2936
- ...r
1893
+ ref: r,
1894
+ className: n("gryt-combobox-item", pt, t),
1895
+ ...e
2937
1896
  }
2938
1897
  );
2939
- }), Xr = i(function({ className: t, ...r }, e) {
1898
+ }), tr = s(function({ className: t, ...e }, r) {
2940
1899
  return /* @__PURE__ */ o(
2941
- b.Empty,
1900
+ g.Empty,
2942
1901
  {
2943
- ref: e,
2944
- className: s(
1902
+ ref: r,
1903
+ className: n(
2945
1904
  "gryt-combobox-empty px-3 py-2 text-sm text-gryt-muted",
2946
1905
  t
2947
1906
  ),
2948
- ...r
1907
+ ...e
2949
1908
  }
2950
1909
  );
2951
- }), Xo = {
2952
- Root: b.Root,
2953
- Input: Vr,
2954
- InputGroup: b.InputGroup,
2955
- Trigger: b.Trigger,
2956
- Icon: b.Icon,
2957
- Clear: b.Clear,
2958
- Value: b.Value,
2959
- Chips: b.Chips,
2960
- Chip: b.Chip,
2961
- ChipRemove: b.ChipRemove,
2962
- Portal: b.Portal,
2963
- Positioner: Ur,
2964
- Popup: Or,
2965
- List: b.List,
2966
- Item: Yr,
2967
- ItemIndicator: b.ItemIndicator,
2968
- Group: b.Group,
2969
- GroupLabel: b.GroupLabel,
2970
- Empty: Xr,
2971
- Separator: b.Separator
2972
- }, Wr = i(function({ className: t, ...r }, e) {
1910
+ }), Ko = {
1911
+ Root: g.Root,
1912
+ Input: Qe,
1913
+ InputGroup: g.InputGroup,
1914
+ Trigger: g.Trigger,
1915
+ Icon: g.Icon,
1916
+ Clear: g.Clear,
1917
+ Value: g.Value,
1918
+ Chips: g.Chips,
1919
+ Chip: g.Chip,
1920
+ ChipRemove: g.ChipRemove,
1921
+ Portal: g.Portal,
1922
+ Positioner: Je,
1923
+ Popup: Ze,
1924
+ List: g.List,
1925
+ Item: qe,
1926
+ ItemIndicator: g.ItemIndicator,
1927
+ Group: g.Group,
1928
+ GroupLabel: g.GroupLabel,
1929
+ Empty: tr,
1930
+ Separator: g.Separator
1931
+ }, er = s(function({ className: t, ...e }, r) {
2973
1932
  return /* @__PURE__ */ o(
2974
- h.Input,
1933
+ m.Input,
2975
1934
  {
2976
- ref: e,
2977
- className: s("gryt-autocomplete-input", Ye, t),
2978
- ...r
1935
+ ref: r,
1936
+ className: n("gryt-autocomplete-input", mt, t),
1937
+ ...e
2979
1938
  }
2980
1939
  );
2981
- }), Kr = i(function({ className: t, sideOffset: r = 6, ...e }, n) {
1940
+ }), rr = s(function({ className: t, sideOffset: e = 6, ...r }, i) {
2982
1941
  return /* @__PURE__ */ o(
2983
- h.Positioner,
1942
+ m.Positioner,
2984
1943
  {
2985
- ref: n,
2986
- sideOffset: r,
2987
- className: s("gryt-autocomplete-positioner outline-none", t),
2988
- ...e
1944
+ ref: i,
1945
+ sideOffset: e,
1946
+ className: n("gryt-autocomplete-positioner outline-none", t),
1947
+ ...r
2989
1948
  }
2990
1949
  );
2991
- }), Jr = i(function({ className: t, ...r }, e) {
1950
+ }), or = s(function({ className: t, ...e }, r) {
2992
1951
  return /* @__PURE__ */ o(
2993
- h.Popup,
1952
+ m.Popup,
2994
1953
  {
2995
- ref: e,
2996
- className: s(
1954
+ ref: r,
1955
+ className: n(
2997
1956
  "gryt-autocomplete max-h-64 w-(--anchor-width) overflow-y-auto overscroll-contain p-1 outline-none",
2998
- E,
2999
- H,
1957
+ D,
1958
+ $,
3000
1959
  t
3001
1960
  ),
3002
- ...r
1961
+ ...e
3003
1962
  }
3004
1963
  );
3005
- }), Qr = i(function({ className: t, ...r }, e) {
1964
+ }), ar = s(function({ className: t, ...e }, r) {
3006
1965
  return /* @__PURE__ */ o(
3007
- h.Item,
1966
+ m.Item,
3008
1967
  {
3009
- ref: e,
3010
- className: s("gryt-autocomplete-item", Oe, t),
3011
- ...r
1968
+ ref: r,
1969
+ className: n("gryt-autocomplete-item", pt, t),
1970
+ ...e
3012
1971
  }
3013
1972
  );
3014
- }), Zr = i(function({ className: t, ...r }, e) {
1973
+ }), nr = s(function({ className: t, ...e }, r) {
3015
1974
  return /* @__PURE__ */ o(
3016
- h.Empty,
1975
+ m.Empty,
3017
1976
  {
3018
- ref: e,
3019
- className: s(
1977
+ ref: r,
1978
+ className: n(
3020
1979
  "gryt-autocomplete-empty px-3 py-2 text-sm text-gryt-muted",
3021
1980
  t
3022
1981
  ),
3023
- ...r
1982
+ ...e
3024
1983
  }
3025
1984
  );
3026
1985
  }), Wo = {
3027
- Root: h.Root,
3028
- Input: Wr,
3029
- InputGroup: h.InputGroup,
3030
- Trigger: h.Trigger,
3031
- Icon: h.Icon,
3032
- Clear: h.Clear,
3033
- Value: h.Value,
3034
- Portal: h.Portal,
3035
- Positioner: Kr,
3036
- Popup: Jr,
3037
- List: h.List,
3038
- Item: Qr,
3039
- Group: h.Group,
3040
- GroupLabel: h.GroupLabel,
3041
- Empty: Zr,
3042
- Separator: h.Separator
3043
- }, Ko = i(
3044
- function({ className: t, ...r }, e) {
1986
+ Root: m.Root,
1987
+ Input: er,
1988
+ InputGroup: m.InputGroup,
1989
+ Trigger: m.Trigger,
1990
+ Icon: m.Icon,
1991
+ Clear: m.Clear,
1992
+ Value: m.Value,
1993
+ Portal: m.Portal,
1994
+ Positioner: rr,
1995
+ Popup: or,
1996
+ List: m.List,
1997
+ Item: ar,
1998
+ Group: m.Group,
1999
+ GroupLabel: m.GroupLabel,
2000
+ Empty: nr,
2001
+ Separator: m.Separator
2002
+ }, Qo = s(
2003
+ function({ className: t, ...e }, r) {
3045
2004
  return /* @__PURE__ */ o(
3046
- lt,
2005
+ Gt,
3047
2006
  {
3048
- ref: e,
3049
- className: s("gryt-checkbox-group flex flex-col gap-2", t),
3050
- ...r
2007
+ ref: r,
2008
+ className: n("gryt-checkbox-group flex flex-col gap-2", t),
2009
+ ...e
3051
2010
  }
3052
2011
  );
3053
2012
  }
3054
- ), qr = i(
3055
- function({ className: t, ...r }, e) {
2013
+ ), ir = s(
2014
+ function({ className: t, ...e }, r) {
3056
2015
  return /* @__PURE__ */ o(
3057
- ge.Trigger,
2016
+ W.Trigger,
3058
2017
  {
3059
- ref: e,
3060
- className: s(
2018
+ ref: r,
2019
+ className: n(
3061
2020
  "gryt-collapsible-trigger flex w-full items-center justify-between gap-2",
3062
2021
  "rounded-(--gryt-radius-md) border-0 bg-transparent px-2 py-2 text-left",
3063
2022
  "text-sm font-medium text-gryt-text select-none",
3064
2023
  "transition-colors hover:bg-gryt-surface-raised motion-reduce:transition-none",
3065
- x,
2024
+ b,
3066
2025
  t
3067
2026
  ),
3068
- ...r
2027
+ ...e
3069
2028
  }
3070
2029
  );
3071
2030
  }
3072
- ), ea = i(
3073
- function({ className: t, ...r }, e) {
2031
+ ), sr = s(
2032
+ function({ className: t, ...e }, r) {
3074
2033
  return /* @__PURE__ */ o(
3075
- ge.Panel,
2034
+ W.Panel,
3076
2035
  {
3077
- ref: e,
3078
- className: s(
2036
+ ref: r,
2037
+ className: n(
3079
2038
  "gryt-collapsible-panel overflow-hidden",
3080
2039
  // Base UI measures the panel and exposes the height as a variable, so
3081
2040
  // this animates to the content's real height rather than to a guess.
@@ -3084,190 +2043,190 @@ const zr = i(
3084
2043
  "motion-reduce:transition-none",
3085
2044
  t
3086
2045
  ),
3087
- ...r
2046
+ ...e
3088
2047
  }
3089
2048
  );
3090
2049
  }
3091
2050
  ), Jo = {
3092
- Root: ge.Root,
3093
- Trigger: qr,
3094
- Panel: ea
3095
- }, Qo = i(function({ className: t, ...r }, e) {
2051
+ Root: W.Root,
2052
+ Trigger: ir,
2053
+ Panel: sr
2054
+ }, Zo = s(function({ className: t, ...e }, r) {
3096
2055
  return /* @__PURE__ */ o(
3097
- ut,
2056
+ Lt,
3098
2057
  {
3099
- ref: e,
3100
- className: s("gryt-form flex flex-col gap-(--gryt-space-lg)", t),
3101
- ...r
2058
+ ref: r,
2059
+ className: n("gryt-form flex flex-col gap-(--gryt-space-lg)", t),
2060
+ ...e
3102
2061
  }
3103
2062
  );
3104
- }), ta = i(
3105
- function({ className: t, ...r }, e) {
2063
+ }), cr = s(
2064
+ function({ className: t, ...e }, r) {
3106
2065
  return /* @__PURE__ */ o(
3107
- Ae.Root,
2066
+ lt.Root,
3108
2067
  {
3109
- ref: e,
3110
- className: s(
2068
+ ref: r,
2069
+ className: n(
3111
2070
  "gryt-fieldset flex min-w-0 flex-col gap-3 border-0 p-0",
3112
2071
  t
3113
2072
  ),
3114
- ...r
2073
+ ...e
3115
2074
  }
3116
2075
  );
3117
2076
  }
3118
- ), ra = i(function({ className: t, ...r }, e) {
2077
+ ), lr = s(function({ className: t, ...e }, r) {
3119
2078
  return /* @__PURE__ */ o(
3120
- Ae.Legend,
2079
+ lt.Legend,
3121
2080
  {
3122
- ref: e,
3123
- className: s(
2081
+ ref: r,
2082
+ className: n(
3124
2083
  "gryt-fieldset-legend text-sm font-semibold text-gryt-text",
3125
2084
  t
3126
2085
  ),
3127
- ...r
2086
+ ...e
3128
2087
  }
3129
2088
  );
3130
- }), Zo = { Root: ta, Legend: ra }, qo = i(
3131
- function({ className: t, ...r }, e) {
2089
+ }), qo = { Root: cr, Legend: lr }, ta = s(
2090
+ function({ className: t, ...e }, r) {
3132
2091
  return /* @__PURE__ */ o(
3133
- gt,
2092
+ jt,
3134
2093
  {
3135
- ref: e,
3136
- className: s(
2094
+ ref: r,
2095
+ className: n(
3137
2096
  "gryt-menubar flex items-center gap-1",
3138
2097
  "rounded-(--gryt-radius-md) border border-gryt-border bg-gryt-surface p-1",
3139
2098
  t
3140
2099
  ),
3141
- ...r
2100
+ ...e
3142
2101
  }
3143
2102
  );
3144
2103
  }
3145
- ), aa = i(function({ className: t, ...r }, e) {
2104
+ ), dr = s(function({ className: t, ...e }, r) {
3146
2105
  return /* @__PURE__ */ o(
3147
- N.Trigger,
2106
+ h.Trigger,
3148
2107
  {
3149
- ref: e,
3150
- className: s(
2108
+ ref: r,
2109
+ className: n(
3151
2110
  "gryt-navigation-menu-trigger flex items-center gap-1.5 rounded-(--gryt-radius-md)",
3152
2111
  "border-0 bg-transparent px-3 py-2 text-sm font-medium text-gryt-text select-none",
3153
2112
  "transition-colors hover:bg-gryt-surface-raised motion-reduce:transition-none",
3154
2113
  "data-popup-open:bg-gryt-surface-raised",
3155
- x,
2114
+ b,
3156
2115
  t
3157
2116
  ),
3158
- ...r
2117
+ ...e
3159
2118
  }
3160
2119
  );
3161
- }), oa = i(function({ className: t, ...r }, e) {
2120
+ }), gr = s(function({ className: t, ...e }, r) {
3162
2121
  return /* @__PURE__ */ o(
3163
- N.Popup,
2122
+ h.Popup,
3164
2123
  {
3165
- ref: e,
3166
- className: s(
2124
+ ref: r,
2125
+ className: n(
3167
2126
  "gryt-navigation-menu-popup outline-none",
3168
- E,
3169
- H,
2127
+ D,
2128
+ $,
3170
2129
  t
3171
2130
  ),
3172
- ...r
2131
+ ...e
3173
2132
  }
3174
2133
  );
3175
- }), na = i(function({ className: t, ...r }, e) {
2134
+ }), ur = s(function({ className: t, ...e }, r) {
3176
2135
  return /* @__PURE__ */ o(
3177
- N.Positioner,
2136
+ h.Positioner,
3178
2137
  {
3179
- ref: e,
3180
- className: s("gryt-navigation-menu-positioner outline-none", t),
3181
- ...r
2138
+ ref: r,
2139
+ className: n("gryt-navigation-menu-positioner outline-none", t),
2140
+ ...e
3182
2141
  }
3183
2142
  );
3184
- }), sa = i(function({ className: t, ...r }, e) {
2143
+ }), yr = s(function({ className: t, ...e }, r) {
3185
2144
  return /* @__PURE__ */ o(
3186
- N.Viewport,
2145
+ h.Viewport,
3187
2146
  {
3188
- ref: e,
3189
- className: s(
2147
+ ref: r,
2148
+ className: n(
3190
2149
  "gryt-navigation-menu-viewport relative overflow-hidden",
3191
2150
  t
3192
2151
  ),
3193
- ...r
2152
+ ...e
3194
2153
  }
3195
2154
  );
3196
- }), ca = i(function({ className: t, ...r }, e) {
2155
+ }), pr = s(function({ className: t, ...e }, r) {
3197
2156
  return /* @__PURE__ */ o(
3198
- N.Link,
2157
+ h.Link,
3199
2158
  {
3200
- ref: e,
3201
- className: s(
2159
+ ref: r,
2160
+ className: n(
3202
2161
  "gryt-navigation-menu-link block rounded-(--gryt-radius-md) px-3 py-2",
3203
2162
  "text-sm text-gryt-text no-underline outline-none",
3204
2163
  "transition-colors hover:bg-gryt-surface-raised motion-reduce:transition-none",
3205
- x,
2164
+ b,
3206
2165
  t
3207
2166
  ),
3208
- ...r
2167
+ ...e
3209
2168
  }
3210
2169
  );
3211
- }), en = {
3212
- Root: N.Root,
3213
- List: N.List,
3214
- Item: N.Item,
3215
- Trigger: aa,
3216
- Content: N.Content,
3217
- Portal: N.Portal,
3218
- Positioner: na,
3219
- Viewport: sa,
3220
- Popup: oa,
3221
- Link: ca,
3222
- Icon: N.Icon,
3223
- Arrow: N.Arrow
3224
- }, Le = "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", tn = i(
3225
- function({ className: t, label: r, scrubbable: e = !1, ...n }, c) {
3226
- return /* @__PURE__ */ m(
3227
- D.Root,
2170
+ }), ea = {
2171
+ Root: h.Root,
2172
+ List: h.List,
2173
+ Item: h.Item,
2174
+ Trigger: dr,
2175
+ Content: h.Content,
2176
+ Portal: h.Portal,
2177
+ Positioner: ur,
2178
+ Viewport: yr,
2179
+ Popup: gr,
2180
+ Link: pr,
2181
+ Icon: h.Icon,
2182
+ Arrow: h.Arrow
2183
+ }, at = "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", ra = s(
2184
+ function({ className: t, label: e, scrubbable: r = !1, ...i }, c) {
2185
+ return /* @__PURE__ */ d(
2186
+ R.Root,
3228
2187
  {
3229
2188
  ref: c,
3230
- className: s("gryt-number-field flex flex-col gap-1.5", t),
3231
- ...n,
2189
+ className: n("gryt-number-field flex flex-col gap-1.5", t),
2190
+ ...i,
3232
2191
  children: [
3233
- r && (e ? /* @__PURE__ */ m(D.ScrubArea, { className: "cursor-ew-resize text-sm text-gryt-muted select-none", children: [
3234
- r,
3235
- /* @__PURE__ */ o(D.ScrubAreaCursor, {})
3236
- ] }) : /* @__PURE__ */ o("span", { className: "text-sm text-gryt-muted", children: r })),
3237
- /* @__PURE__ */ m(
3238
- D.Group,
2192
+ e && (r ? /* @__PURE__ */ d(R.ScrubArea, { className: "cursor-ew-resize text-sm text-gryt-muted select-none", children: [
2193
+ e,
2194
+ /* @__PURE__ */ o(R.ScrubAreaCursor, {})
2195
+ ] }) : /* @__PURE__ */ o("span", { className: "text-sm text-gryt-muted", children: e })),
2196
+ /* @__PURE__ */ d(
2197
+ R.Group,
3239
2198
  {
3240
- className: s(
2199
+ className: n(
3241
2200
  "flex w-fit items-center overflow-hidden rounded-(--gryt-radius-full)",
3242
2201
  "border border-gryt-border bg-gryt-surface-raised",
3243
2202
  "focus-within:outline-2 focus-within:outline-offset-2 focus-within:outline-gryt-accent-light",
3244
- V
2203
+ j
3245
2204
  ),
3246
2205
  children: [
3247
2206
  /* @__PURE__ */ o(
3248
- D.Decrement,
2207
+ R.Decrement,
3249
2208
  {
3250
2209
  "aria-label": "Decrease",
3251
- className: s(Le, "rounded-l-(--gryt-radius-full)"),
3252
- children: /* @__PURE__ */ o(ot, { size: 14, weight: "bold" })
2210
+ className: n(at, "rounded-l-(--gryt-radius-full)"),
2211
+ children: /* @__PURE__ */ o($t, { size: 14, weight: "bold" })
3253
2212
  }
3254
2213
  ),
3255
2214
  /* @__PURE__ */ o(
3256
- D.Input,
2215
+ R.Input,
3257
2216
  {
3258
- className: s(
2217
+ className: n(
3259
2218
  "w-16 border-0 bg-transparent px-1 py-2 text-center",
3260
2219
  "font-mono text-sm text-gryt-text tabular-nums outline-none",
3261
- x
2220
+ b
3262
2221
  )
3263
2222
  }
3264
2223
  ),
3265
2224
  /* @__PURE__ */ o(
3266
- D.Increment,
2225
+ R.Increment,
3267
2226
  {
3268
2227
  "aria-label": "Increase",
3269
- className: s(Le, "rounded-r-(--gryt-radius-full)"),
3270
- children: /* @__PURE__ */ o(nt, { size: 14, weight: "bold" })
2228
+ className: n(at, "rounded-r-(--gryt-radius-full)"),
2229
+ children: /* @__PURE__ */ o(Rt, { size: 14, weight: "bold" })
3271
2230
  }
3272
2231
  )
3273
2232
  ]
@@ -3277,179 +2236,186 @@ const zr = i(
3277
2236
  }
3278
2237
  );
3279
2238
  }
3280
- ), rn = i(
3281
- function({ className: t, length: r = 6, ...e }, n) {
2239
+ ), oa = s(
2240
+ function({ className: t, length: e = 6, ...r }, i) {
3282
2241
  return /* @__PURE__ */ o(
3283
- ve.Root,
2242
+ rt.Root,
3284
2243
  {
3285
- ref: n,
3286
- length: r,
3287
- className: s("gryt-otp-field flex gap-2", t),
3288
- ...e,
3289
- children: Array.from({ length: r }, (c, d) => /* @__PURE__ */ o(
3290
- ve.Input,
2244
+ ref: i,
2245
+ length: e,
2246
+ className: n("gryt-otp-field flex gap-2", t),
2247
+ ...r,
2248
+ children: Array.from({ length: e }, (c, l) => /* @__PURE__ */ o(
2249
+ rt.Input,
3291
2250
  {
3292
- className: s(
2251
+ className: n(
3293
2252
  "gryt-otp-input h-12 w-10 rounded-(--gryt-radius-md) text-center",
3294
2253
  "border border-gryt-border bg-gryt-surface-raised",
3295
2254
  "font-mono text-lg text-gryt-text tabular-nums outline-none",
3296
2255
  "transition-colors duration-(--gryt-dur-fast) motion-reduce:transition-none",
3297
2256
  "data-filled:border-gryt-accent",
3298
- x
2257
+ b
3299
2258
  )
3300
2259
  },
3301
- d
2260
+ l
3302
2261
  ))
3303
2262
  }
3304
2263
  );
3305
2264
  }
3306
- ), ia = i(
3307
- function({ className: t, sideOffset: r = 8, ...e }, n) {
2265
+ ), mr = s(
2266
+ function({ className: t, sideOffset: e = 8, ...r }, i) {
3308
2267
  return /* @__PURE__ */ o(
3309
- z.Positioner,
2268
+ M.Positioner,
3310
2269
  {
3311
- ref: n,
3312
- sideOffset: r,
3313
- className: s("gryt-preview-card-positioner outline-none", t),
3314
- ...e
2270
+ ref: i,
2271
+ sideOffset: e,
2272
+ className: n("gryt-preview-card-positioner outline-none", t),
2273
+ ...r
3315
2274
  }
3316
2275
  );
3317
2276
  }
3318
- ), da = i(
3319
- function({ className: t, ...r }, e) {
2277
+ ), br = s(
2278
+ function({ className: t, ...e }, r) {
3320
2279
  return /* @__PURE__ */ o(
3321
- z.Popup,
2280
+ M.Popup,
3322
2281
  {
3323
- ref: e,
3324
- className: s(
2282
+ ref: r,
2283
+ className: n(
3325
2284
  "gryt-preview-card w-64 max-w-[calc(100vw-2rem)] p-4 outline-none",
3326
- E,
3327
- H,
2285
+ D,
2286
+ $,
3328
2287
  t
3329
2288
  ),
3330
- ...r
2289
+ ...e
3331
2290
  }
3332
2291
  );
3333
2292
  }
3334
- ), an = {
3335
- Root: z.Root,
3336
- Trigger: z.Trigger,
3337
- Portal: z.Portal,
3338
- Positioner: ia,
3339
- Popup: da,
3340
- Arrow: z.Arrow
3341
- }, la = i(function({ className: t, ...r }, e) {
2293
+ ), aa = {
2294
+ Root: M.Root,
2295
+ Trigger: M.Trigger,
2296
+ Portal: M.Portal,
2297
+ Positioner: mr,
2298
+ Popup: br,
2299
+ Arrow: M.Arrow
2300
+ }, fr = s(function({ className: t, ...e }, r) {
3342
2301
  return /* @__PURE__ */ o(
3343
- B.Root,
2302
+ G.Root,
3344
2303
  {
3345
- ref: e,
3346
- className: s(
2304
+ ref: r,
2305
+ className: n(
3347
2306
  "gryt-toolbar flex items-center gap-1",
3348
2307
  "rounded-(--gryt-radius-full) border border-gryt-border bg-gryt-surface p-1",
3349
2308
  t
3350
2309
  ),
3351
- ...r
2310
+ ...e
3352
2311
  }
3353
2312
  );
3354
- }), ua = i(function({ className: t, ...r }, e) {
2313
+ }), xr = s(function({ className: t, ...e }, r) {
3355
2314
  return /* @__PURE__ */ o(
3356
- B.Separator,
2315
+ G.Separator,
3357
2316
  {
3358
- ref: e,
3359
- className: s("gryt-toolbar-separator mx-1 h-6 w-px bg-gryt-border", t),
3360
- ...r
2317
+ ref: r,
2318
+ className: n("gryt-toolbar-separator mx-1 h-6 w-px bg-gryt-border", t),
2319
+ ...e
3361
2320
  }
3362
2321
  );
3363
- }), on = {
3364
- Root: la,
3365
- Group: B.Group,
3366
- Button: B.Button,
3367
- Link: B.Link,
3368
- Input: B.Input,
3369
- Separator: ua
2322
+ }), na = {
2323
+ Root: fr,
2324
+ Group: G.Group,
2325
+ Button: G.Button,
2326
+ Link: G.Link,
2327
+ Input: G.Input,
2328
+ Separator: xr
3370
2329
  };
3371
2330
  export {
3372
- jo as Accordion,
3373
- Co as Alert,
3374
- Yo as AlertDialog,
2331
+ zo as Accordion,
2332
+ Ao as Alert,
2333
+ Uo as AlertDialog,
3375
2334
  Wo as Autocomplete,
3376
- Ft as Avatar,
3377
- mo as Badge,
3378
- It as Button,
3379
- Lo as Card,
3380
- $o as CardActions,
2335
+ Kt as Avatar,
2336
+ bo as Badge,
2337
+ Et as Button,
2338
+ So as Card,
2339
+ Io as CardActions,
3381
2340
  Ro as CardContent,
3382
- So as CardHeader,
3383
- bo as Checkbox,
3384
- Ko as CheckboxGroup,
3385
- po as Chip,
2341
+ $o as CardHeader,
2342
+ xo as Checkbox,
2343
+ Qo as CheckboxGroup,
2344
+ fo as Chip,
3386
2345
  Jo as Collapsible,
3387
- Xo as Combobox,
3388
- fo as Composer,
3389
- Eo as ContextMenu,
3390
- yo as ConversationItem,
3391
- Ho as Dialog,
3392
- To as Divider,
3393
- Do as Drawer,
3394
- Zo as Fieldset,
3395
- Qo as Form,
3396
- ee as GRYT_HUE_KEYS,
3397
- je as GRYT_NEUTRAL_KEYS,
3398
- fe as GRYT_RADIUS_KEYS,
3399
- Pt as GRYT_THEME_NAME_MAX,
3400
- ao as GrytProvider,
3401
- io as IconButton,
3402
- ie as Menu,
3403
- qo as Menubar,
2346
+ Ko as Combobox,
2347
+ po as Composer,
2348
+ Fo as ContextMenu,
2349
+ mo as ConversationItem,
2350
+ Lo as Dialog,
2351
+ Co as Divider,
2352
+ jo as Drawer,
2353
+ qo as Fieldset,
2354
+ Zo as Form,
2355
+ ca as GRYT_HUE_KEYS,
2356
+ la as GRYT_NEUTRAL_KEYS,
2357
+ da as GRYT_RADIUS_KEYS,
2358
+ ga as GRYT_THEME_NAME_MAX,
2359
+ co as GrytProvider,
2360
+ lo as IconButton,
2361
+ X as Menu,
2362
+ ta as Menubar,
3404
2363
  uo as MessageBubble,
3405
- Oo as Meter,
3406
- en as NavigationMenu,
3407
- tn as NumberField,
3408
- rn as OtpField,
3409
- zo as Popover,
3410
- an as PreviewCard,
3411
- Ao as Progress,
2364
+ Xo as Meter,
2365
+ ea as NavigationMenu,
2366
+ ra as NumberField,
2367
+ oa as OtpField,
2368
+ Eo as Popover,
2369
+ aa as PreviewCard,
2370
+ Do as Progress,
3412
2371
  ho as Radio,
3413
- xo as RadioGroup,
3414
- _o as ScrollArea,
3415
- No as Select,
3416
- Io as Skeleton,
3417
- vo as Slider,
2372
+ wo as RadioGroup,
2373
+ Yo as ScrollArea,
2374
+ Po as Select,
2375
+ Go as Skeleton,
2376
+ No as Slider,
3418
2377
  Mo as Spinner,
3419
- lo as Surface,
3420
- wo as Switch,
3421
- yr as Tab,
3422
- Go as Tabs,
3423
- go as TextField,
3424
- Bo as Toast,
3425
- Vo as Toggle,
3426
- Uo as ToggleGroup,
3427
- on as Toolbar,
3428
- Po as Tooltip,
2378
+ go as Surface,
2379
+ vo as Switch,
2380
+ ve as Tab,
2381
+ Bo as Tabs,
2382
+ yo as TextField,
2383
+ Vo as Toast,
2384
+ Ho as Toggle,
2385
+ Oo as ToggleGroup,
2386
+ na as Toolbar,
2387
+ To as Tooltip,
3429
2388
  ko as TooltipProvider,
3430
- Ee as cloneGrytTheme,
3431
- s as cn,
3432
- eo as contrast,
3433
- vt as createGrytTheme,
3434
- so as decodeGrytTheme,
3435
- no as encodeGrytTheme,
3436
- to as grytAlphaScales,
3437
- ro as grytAlphaScalesLight,
3438
- T as grytLightTokens,
3439
- Ct as grytPresets,
3440
- co as grytPresetsById,
3441
- Pe as grytScales,
3442
- le as grytScalesLight,
3443
- F as grytTheme,
3444
- kt as grytThemeHues,
3445
- oo as grytThemeToOptions,
3446
- u as grytTokens,
3447
- J as hexToOklch,
3448
- Be as isHexColor,
3449
- me as normalizeHexColor,
3450
- ye as normalizeThemeName,
3451
- $ as oklchToHex,
3452
- Zt as useMediaQuery,
3453
- Fo as useToastManager
2389
+ ua as alphaScale,
2390
+ ya as cloneGrytTheme,
2391
+ n as cn,
2392
+ pa as contrast,
2393
+ bt as createGrytTheme,
2394
+ ma as decodeGrytTheme,
2395
+ ba as encodeGrytTheme,
2396
+ fa as grytAlphaScales,
2397
+ xa as grytAlphaScalesLight,
2398
+ ha as grytLightTokens,
2399
+ wa as grytPresets,
2400
+ va as grytPresetsById,
2401
+ Na as grytScales,
2402
+ Pa as grytScalesLight,
2403
+ Ta as grytTheme,
2404
+ ka as grytThemeHues,
2405
+ Ca as grytThemeToOptions,
2406
+ Sa as grytTokens,
2407
+ $a as hexToOklch,
2408
+ Ra as hexToRgb,
2409
+ Ia as hueScale,
2410
+ Aa as hueScaleLight,
2411
+ Da as isHexColor,
2412
+ Ma as neutralScale,
2413
+ Ga as neutralScaleLight,
2414
+ La as normalizeHexColor,
2415
+ ja as normalizeThemeName,
2416
+ Ba as oklchToHex,
2417
+ za as rgbToHex,
2418
+ ne as useMediaQuery,
2419
+ _o as useToastManager
3454
2420
  };
3455
2421
  //# sourceMappingURL=index.js.map