@gryt/ui 0.13.0 → 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 I } 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 M } from "@base-ui/react/alert-dialog";
31
- import { Autocomplete as h } from "@base-ui/react/autocomplete";
32
- import { Combobox as p } 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 Ie(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 Me([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(Ie), 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 Me([
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
- ], bt = [
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: bt[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 b = n[f], P = r[f];
140
- b > P ? c = Math.max(c, P < 1 ? (b - P) / (1 - P) : 0) : b < P && (c = Math.max(c, P > 0 ? (P - b) / P : 0));
141
- }
142
- if (c < 1e-6) return "transparent";
143
- const d = Me(
144
- n.map((f, b) => Y(r[b] + (f - r[b]) / 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 pt = [
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 pt.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(Ie);
197
- return 0.2126 * t + 0.7152 * r + 0.0722 * e;
198
- }
199
- function qa(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], eo = {
266
- neutral: Q(Pe.neutral, u.color.bg),
267
- accent: Q(Pe.accent, u.color.bg)
268
- }, to = {
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, b) => {
301
- l[`--gryt-${g}-${b + 1}`] = f, l[`--color-gryt-${g}-${b + 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 ro({
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 }) });
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 }) });
366
56
  }
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);
57
+ function n(...a) {
58
+ return Pt(Nt(a));
390
59
  }
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 ao(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 oo(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;
490
- }
491
- function no(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));
497
- }
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
- ], so = 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
- }, It = {
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
- }, Mt = 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
- It[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
- }, co = 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
- ), io = 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
- ), lo = 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
- ), uo = 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 b = /* @__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
- b,
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
- ), go = 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), b = 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), be = parseFloat(re.lineHeight) || 24, pe = parseFloat(re.paddingTop) + parseFloat(re.paddingBottom);
1346
- w.style.height = "auto", w.style.height = `${Math.min(
1347
- Math.max(w.scrollHeight, be * n + pe),
1348
- be * e + pe
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(b, [b, 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: b,
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
- Mt,
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
- }), fo = 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
- }), yo = 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
- }, mo = 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
- ), po = 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
- }), ho = 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
- ), xo = 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 wo({
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 b = d.current;
1662
- if (b === null || n)
619
+ function u(y) {
620
+ const N = l.current;
621
+ if (N === null || i)
1663
622
  return;
1664
- (Math.abs(f.clientX - b.x) > Te || Math.abs(f.clientY - b.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,146 +672,161 @@ function wo({
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 vo({
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(v.Positioner, { sideOffset: 6, className: "outline-none", children: /* @__PURE__ */ o(
1751
- v.Popup,
709
+ /* @__PURE__ */ o(x.Portal, { children: /* @__PURE__ */ o(
710
+ x.Positioner,
1752
711
  {
1753
- className: s("min-w-(--anchor-width) p-1", E, H),
1754
- children: /* @__PURE__ */ o(v.List, { children: r.map((d) => /* @__PURE__ */ m(
1755
- v.Item,
712
+ sideOffset: 6,
713
+ className: "gryt-select-positioner outline-none",
714
+ children: /* @__PURE__ */ o(
715
+ x.Popup,
1756
716
  {
1757
- value: d.value,
1758
- disabled: d.disabled,
1759
- className: s(
1760
- "flex cursor-pointer items-center justify-between gap-2",
1761
- "rounded-(--gryt-radius-md) px-3 py-2 text-sm text-gryt-text",
1762
- "outline-none select-none data-highlighted:bg-gryt-surface-raised",
1763
- "data-disabled:cursor-not-allowed data-disabled:opacity-50"
1764
- ),
1765
- children: [
1766
- /* @__PURE__ */ o(v.ItemText, { children: d.label }),
1767
- /* @__PURE__ */ o(v.ItemIndicator, { className: "text-gryt-accent-11", children: /* @__PURE__ */ o(Ce, { size: 14, weight: "bold" }) })
1768
- ]
1769
- },
1770
- String(d.value)
1771
- )) })
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,
720
+ {
721
+ value: l.value,
722
+ disabled: l.disabled,
723
+ className: n(
724
+ "flex cursor-pointer items-center justify-between gap-2",
725
+ "rounded-(--gryt-radius-md) px-3 py-2 text-sm text-gryt-text",
726
+ "outline-none select-none data-highlighted:bg-gryt-surface-raised",
727
+ "data-disabled:cursor-not-allowed data-disabled:opacity-50"
728
+ ),
729
+ children: [
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" }) })
732
+ ]
733
+ },
734
+ String(l.value)
735
+ )) })
736
+ }
737
+ )
1772
738
  }
1773
- ) }) })
739
+ ) })
1774
740
  ] });
1775
741
  }
1776
- function No({
742
+ function To({
1777
743
  children: a,
1778
744
  className: t,
1779
- side: r = "top",
1780
- sideOffset: e = 8,
1781
- title: n
745
+ side: e = "top",
746
+ sideOffset: r = 8,
747
+ title: i
1782
748
  }) {
1783
- return /* @__PURE__ */ m(G.Root, { children: [
1784
- /* @__PURE__ */ o(G.Trigger, { render: a }),
1785
- /* @__PURE__ */ o(G.Portal, { children: /* @__PURE__ */ o(G.Positioner, { side: r, sideOffset: e, children: /* @__PURE__ */ o(
1786
- G.Popup,
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,
1787
753
  {
1788
- className: s(
1789
- "gryt-tooltip rounded-(--gryt-radius-md) border border-gryt-border bg-gryt-surface-raised",
1790
- "px-2.5 py-1.5 text-xs text-gryt-text",
1791
- H,
1792
- t
1793
- ),
1794
- children: n
754
+ side: e,
755
+ sideOffset: r,
756
+ className: "gryt-tooltip-positioner",
757
+ children: /* @__PURE__ */ o(
758
+ I.Popup,
759
+ {
760
+ className: n(
761
+ "gryt-tooltip rounded-(--gryt-radius-md) border border-gryt-border bg-gryt-surface-raised",
762
+ "px-2.5 py-1.5 text-xs text-gryt-text",
763
+ $,
764
+ t
765
+ ),
766
+ children: i
767
+ }
768
+ )
1795
769
  }
1796
- ) }) })
770
+ ) })
1797
771
  ] });
1798
772
  }
1799
- const Po = G.Provider, ko = i(
1800
- function({ className: t, orientation: r = "horizontal", ...e }, n) {
773
+ const ko = I.Provider, Co = s(
774
+ function({ className: t, orientation: e = "horizontal", ...r }, i) {
1801
775
  return /* @__PURE__ */ o(
1802
- ct,
776
+ At,
1803
777
  {
1804
- ref: n,
1805
- orientation: r,
1806
- className: s(
778
+ ref: i,
779
+ orientation: e,
780
+ className: n(
1807
781
  "gryt-divider bg-gryt-border",
1808
- r === "vertical" ? "h-full w-px" : "h-px w-full",
782
+ e === "vertical" ? "h-full w-px" : "h-px w-full",
1809
783
  t
1810
784
  ),
1811
- ...e
785
+ ...r
1812
786
  }
1813
787
  );
1814
788
  }
1815
- ), To = i(function({ className: t, ...r }, e) {
789
+ ), So = s(function({ className: t, ...e }, r) {
1816
790
  return /* @__PURE__ */ o(
1817
791
  "div",
1818
792
  {
1819
- ref: e,
1820
- className: s(
793
+ ref: r,
794
+ className: n(
1821
795
  "gryt-card rounded-(--gryt-radius-xl) border border-gryt-border bg-gryt-surface text-gryt-text",
1822
796
  t
1823
797
  ),
1824
- ...r
798
+ ...e
1825
799
  }
1826
800
  );
1827
801
  });
1828
- function Lo({
802
+ function $o({
1829
803
  children: a,
1830
804
  className: t,
1831
- subheader: r,
1832
- title: e,
1833
- ...n
805
+ subheader: e,
806
+ title: r,
807
+ ...i
1834
808
  }) {
1835
- return /* @__PURE__ */ m(
809
+ return /* @__PURE__ */ d(
1836
810
  "div",
1837
811
  {
1838
- className: s("gryt-card-header flex flex-col gap-1 p-4", t),
1839
- ...n,
812
+ className: n("gryt-card-header flex flex-col gap-1 p-4", t),
813
+ ...i,
1840
814
  children: [
1841
- e ? /* @__PURE__ */ o("span", { className: "text-base font-semibold text-gryt-text", children: e }) : null,
1842
- 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,
1843
817
  a
1844
818
  ]
1845
819
  }
1846
820
  );
1847
821
  }
1848
- function So({
822
+ function Ro({
1849
823
  className: a,
1850
824
  ...t
1851
825
  }) {
1852
826
  return /* @__PURE__ */ o(
1853
827
  "div",
1854
828
  {
1855
- className: s(
829
+ className: n(
1856
830
  "gryt-card-content px-4 pb-4 text-sm text-gryt-muted",
1857
831
  a
1858
832
  ),
@@ -1860,14 +834,14 @@ function So({
1860
834
  }
1861
835
  );
1862
836
  }
1863
- function Ro({
837
+ function Io({
1864
838
  className: a,
1865
839
  ...t
1866
840
  }) {
1867
841
  return /* @__PURE__ */ o(
1868
842
  "div",
1869
843
  {
1870
- className: s(
844
+ className: n(
1871
845
  "gryt-card-actions flex items-center gap-2 px-4 pb-4",
1872
846
  a
1873
847
  ),
@@ -1875,80 +849,80 @@ function Ro({
1875
849
  }
1876
850
  );
1877
851
  }
1878
- const Ut = {
852
+ const Jt = {
1879
853
  info: "border-gryt-secondary-6 bg-gryt-secondary-3 text-gryt-secondary-11",
1880
854
  success: "border-gryt-success-6 bg-gryt-success-3 text-gryt-success-11",
1881
855
  warning: "border-gryt-warning-6 bg-gryt-warning-3 text-gryt-warning-11",
1882
856
  error: "border-gryt-danger-6 bg-gryt-danger-3 text-gryt-danger-11"
1883
- }, $o = i(function({ className: t, severity: r = "info", ...e }, n) {
857
+ }, Ao = s(function({ className: t, severity: e = "info", ...r }, i) {
1884
858
  return /* @__PURE__ */ o(
1885
859
  "div",
1886
860
  {
1887
- ref: n,
861
+ ref: i,
1888
862
  role: "alert",
1889
- className: s(
863
+ className: n(
1890
864
  "gryt-alert rounded-(--gryt-radius-lg) border px-4 py-3 text-sm",
1891
- Ut[r],
865
+ Jt[e],
1892
866
  t
1893
867
  ),
1894
- ...e
868
+ ...r
1895
869
  }
1896
870
  );
1897
871
  });
1898
- function Co({ className: a, value: t = null, ...r }) {
872
+ function Do({ className: a, value: t = null, ...e }) {
1899
873
  return /* @__PURE__ */ o(
1900
- oe.Root,
874
+ O.Root,
1901
875
  {
1902
876
  value: t,
1903
- className: s("gryt-progress w-full", a),
1904
- ...r,
1905
- 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" }) })
1906
880
  }
1907
881
  );
1908
882
  }
1909
- function Ao({
883
+ function Mo({
1910
884
  className: a,
1911
885
  size: t = 24,
1912
- "aria-label": r = "Loading"
886
+ "aria-label": e = "Loading"
1913
887
  }) {
1914
888
  return /* @__PURE__ */ o(
1915
- rt,
889
+ Ct,
1916
890
  {
1917
891
  role: "status",
1918
- "aria-label": r,
892
+ "aria-label": e,
1919
893
  size: t,
1920
894
  weight: "bold",
1921
- className: s(
895
+ className: n(
1922
896
  "gryt-spinner text-gryt-accent-11 motion-safe:animate-spin",
1923
897
  a
1924
898
  )
1925
899
  }
1926
900
  );
1927
901
  }
1928
- const Ot = {
902
+ const Zt = {
1929
903
  text: "h-4 rounded-(--gryt-radius-sm)",
1930
904
  rounded: "rounded-(--gryt-radius-lg)",
1931
905
  circular: "rounded-(--gryt-radius-full)",
1932
906
  rectangular: "rounded-none"
1933
907
  };
1934
- function Io({
908
+ function Go({
1935
909
  className: a,
1936
910
  height: t,
1937
- style: r,
1938
- variant: e = "text",
1939
- width: n,
911
+ style: e,
912
+ variant: r = "text",
913
+ width: i,
1940
914
  ...c
1941
915
  }) {
1942
- const d = {
1943
- width: n,
916
+ const l = {
917
+ width: i,
1944
918
  height: t,
1945
- ...r
919
+ ...e
1946
920
  };
1947
921
  return /* @__PURE__ */ o(
1948
922
  "div",
1949
923
  {
1950
924
  "aria-hidden": "true",
1951
- className: s(
925
+ className: n(
1952
926
  // Not bg-gryt-surface-raised. #1e2028 against #1a1d24 is four points of
1953
927
  // luminance, which is invisible on a laptop screen at an angle — the
1954
928
  // placeholder that is meant to say "something is coming" said nothing.
@@ -1956,131 +930,131 @@ function Io({
1956
930
  // the surfaces it can land on rather than only the one it was picked
1957
931
  // against, and it dims rather than brightens as it pulses.
1958
932
  "gryt-skeleton bg-white/9 motion-safe:animate-pulse",
1959
- Ot[e],
933
+ Zt[r],
1960
934
  a
1961
935
  ),
1962
- style: d,
936
+ style: l,
1963
937
  ...c
1964
938
  }
1965
939
  );
1966
940
  }
1967
- const Ue = "transition-[opacity,scale,translate] duration-(--gryt-dur-spring) ease-spring motion-reduce:transition-none", Yt = i(
1968
- 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) {
1969
943
  return /* @__PURE__ */ o(
1970
- I.Backdrop,
944
+ C.Backdrop,
1971
945
  {
1972
- ref: e,
1973
- className: s(
946
+ ref: r,
947
+ className: n(
1974
948
  "gryt-dialog-backdrop fixed inset-0 min-h-dvh bg-black/60",
1975
949
  "backdrop-blur-(--gryt-backdrop-blur)",
1976
- Ue,
950
+ yt,
1977
951
  "data-starting-style:opacity-0 data-ending-style:opacity-0",
1978
952
  t
1979
953
  ),
1980
- ...r
954
+ ...e
1981
955
  }
1982
956
  );
1983
957
  }
1984
- ), Xt = i(
1985
- function({ className: t, ...r }, e) {
958
+ ), te = s(
959
+ function({ className: t, ...e }, r) {
1986
960
  return /* @__PURE__ */ o(
1987
- I.Popup,
961
+ C.Popup,
1988
962
  {
1989
- ref: e,
1990
- className: s(
963
+ ref: r,
964
+ className: n(
1991
965
  "gryt-dialog fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2",
1992
966
  "flex w-[32rem] max-w-[calc(100vw-3rem)] flex-col gap-4",
1993
967
  "rounded-(--gryt-radius-lg) border border-gryt-border bg-gryt-surface p-5 text-gryt-text",
1994
- Ue,
968
+ yt,
1995
969
  "data-starting-style:scale-[0.98] data-starting-style:opacity-0",
1996
970
  "data-ending-style:scale-[0.98] data-ending-style:opacity-0",
1997
971
  t
1998
972
  ),
1999
- ...r
973
+ ...e
2000
974
  }
2001
975
  );
2002
976
  }
2003
- ), Wt = i(
2004
- function({ className: t, ...r }, e) {
977
+ ), ee = s(
978
+ function({ className: t, ...e }, r) {
2005
979
  return /* @__PURE__ */ o(
2006
- I.Title,
980
+ C.Title,
2007
981
  {
2008
- ref: e,
2009
- className: s(
982
+ ref: r,
983
+ className: n(
2010
984
  "gryt-dialog-title text-base font-semibold text-gryt-text",
2011
985
  t
2012
986
  ),
2013
- ...r
987
+ ...e
2014
988
  }
2015
989
  );
2016
990
  }
2017
- ), Kt = i(
2018
- function({ className: t, ...r }, e) {
991
+ ), re = s(
992
+ function({ className: t, ...e }, r) {
2019
993
  return /* @__PURE__ */ o(
2020
- I.Description,
994
+ C.Description,
2021
995
  {
2022
- ref: e,
2023
- className: s(
996
+ ref: r,
997
+ className: n(
2024
998
  "gryt-dialog-description text-sm text-gryt-muted",
2025
999
  t
2026
1000
  ),
2027
- ...r
1001
+ ...e
2028
1002
  }
2029
1003
  );
2030
1004
  }
2031
- ), Jt = i(
2032
- function({ className: t, ...r }, e) {
1005
+ ), oe = s(
1006
+ function({ className: t, ...e }, r) {
2033
1007
  return /* @__PURE__ */ o(
2034
1008
  "div",
2035
1009
  {
2036
- ref: e,
2037
- className: s(
1010
+ ref: r,
1011
+ className: n(
2038
1012
  "gryt-dialog-footer flex justify-end gap-3",
2039
1013
  t
2040
1014
  ),
2041
- ...r
1015
+ ...e
2042
1016
  }
2043
1017
  );
2044
1018
  }
2045
- ), Mo = {
2046
- Root: I.Root,
2047
- Trigger: I.Trigger,
2048
- Portal: I.Portal,
2049
- Close: I.Close,
2050
- Backdrop: Yt,
2051
- Popup: Xt,
2052
- Title: Wt,
2053
- Description: Kt,
2054
- Footer: Jt
2055
- }, 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 = () => () => {
2056
1030
  };
2057
- function Zt(a) {
2058
- const t = de(
2059
- (e) => {
2060
- if (typeof window > "u" || !window.matchMedia) return Qt();
2061
- const n = window.matchMedia(a);
2062
- 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);
2063
1037
  },
2064
1038
  [a]
2065
- ), r = de(() => typeof window > "u" || !window.matchMedia ? !1 : window.matchMedia(a).matches, [a]);
2066
- 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);
2067
1041
  }
2068
- const qt = {
1042
+ const ie = {
2069
1043
  left: "left",
2070
1044
  right: "right",
2071
1045
  top: "up",
2072
1046
  bottom: "down"
2073
- }, te = Qe("right"), er = {
1047
+ }, _ = vt("right"), se = {
2074
1048
  left: "items-stretch justify-start",
2075
1049
  right: "items-stretch justify-end",
2076
1050
  top: "items-start justify-center",
2077
1051
  bottom: "items-end justify-center"
2078
- }, tr = {
1052
+ }, ce = {
2079
1053
  left: "rounded-r-(--gryt-radius-xl)",
2080
1054
  right: "rounded-l-(--gryt-radius-xl)",
2081
1055
  top: "rounded-b-(--gryt-radius-xl)",
2082
1056
  bottom: "rounded-t-(--gryt-radius-xl)"
2083
- }, rr = {
1057
+ }, le = {
2084
1058
  left: [
2085
1059
  "h-full w-[calc(20rem+var(--gryt-drawer-bleed))] max-w-[calc(85vw+var(--gryt-drawer-bleed))]",
2086
1060
  "-ml-(--gryt-drawer-bleed) border-r py-5 pr-5 pl-[calc(1.25rem+var(--gryt-drawer-bleed))]",
@@ -2110,41 +1084,41 @@ const qt = {
2110
1084
  "data-ending-style:[transform:translateY(calc(100%-var(--gryt-drawer-bleed)))]"
2111
1085
  ].join(" ")
2112
1086
  };
2113
- function ar({
1087
+ function de({
2114
1088
  side: a = "right",
2115
1089
  sheetOnMobile: t = !0,
2116
- children: r,
2117
- ...e
1090
+ children: e,
1091
+ ...r
2118
1092
  }) {
2119
- const n = Zt("(max-width: 767px)"), c = t && n ? "bottom" : a;
2120
- 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 }) });
2121
1095
  }
2122
- const or = i(
2123
- function({ className: t, ...r }, e) {
2124
- const n = ue(te);
1096
+ const ge = s(
1097
+ function({ className: t, ...e }, r) {
1098
+ const i = K(_);
2125
1099
  return /* @__PURE__ */ o(
2126
- k.Viewport,
1100
+ v.Viewport,
2127
1101
  {
2128
- ref: e,
2129
- className: s(
1102
+ ref: r,
1103
+ className: n(
2130
1104
  // z-50 matters: the popup is no longer positioned itself, so the
2131
1105
  // viewport is what has to sit above the page. Without it a sticky
2132
1106
  // site header renders over the panel.
2133
1107
  "gryt-drawer-viewport fixed inset-0 z-50 flex",
2134
- er[n],
1108
+ se[i],
2135
1109
  t
2136
1110
  ),
2137
- ...r
1111
+ ...e
2138
1112
  }
2139
1113
  );
2140
1114
  }
2141
- ), nr = i(function({ className: t, ...r }, e) {
2142
- const n = ue(te);
1115
+ ), ue = s(function({ className: t, ...e }, r) {
1116
+ const i = K(_);
2143
1117
  return /* @__PURE__ */ o(
2144
- k.Popup,
1118
+ v.Popup,
2145
1119
  {
2146
- ref: e,
2147
- className: s(
1120
+ ref: r,
1121
+ className: n(
2148
1122
  "gryt-drawer flex flex-col gap-4 border-gryt-border bg-gryt-surface text-gryt-text",
2149
1123
  "overflow-y-auto overscroll-contain outline-none",
2150
1124
  "transition-transform duration-(--gryt-dur-spring-soft) ease-spring",
@@ -2152,19 +1126,19 @@ const or = i(
2152
1126
  // duration here turns a drag into a drag plus lag.
2153
1127
  "data-swiping:duration-0 data-swiping:select-none",
2154
1128
  "motion-reduce:transition-none",
2155
- rr[n],
2156
- tr[n],
1129
+ le[i],
1130
+ ce[i],
2157
1131
  t
2158
1132
  ),
2159
- ...r
1133
+ ...e
2160
1134
  }
2161
1135
  );
2162
- }), sr = i(function({ className: t, ...r }, e) {
1136
+ }), ye = s(function({ className: t, ...e }, r) {
2163
1137
  return /* @__PURE__ */ o(
2164
- k.Backdrop,
1138
+ v.Backdrop,
2165
1139
  {
2166
- ref: e,
2167
- className: s(
1140
+ ref: r,
1141
+ className: n(
2168
1142
  "gryt-drawer-backdrop fixed inset-0 z-50 min-h-dvh bg-black/60",
2169
1143
  "backdrop-blur-(--gryt-backdrop-blur)",
2170
1144
  // Lightens as the panel is dragged away, so letting go halfway does not
@@ -2176,17 +1150,17 @@ const or = i(
2176
1150
  "motion-reduce:transition-none",
2177
1151
  t
2178
1152
  ),
2179
- ...r
1153
+ ...e
2180
1154
  }
2181
1155
  );
2182
1156
  });
2183
- function cr({ className: a }) {
2184
- const t = ue(te);
1157
+ function pe({ className: a }) {
1158
+ const t = K(_);
2185
1159
  return t !== "bottom" && t !== "top" ? null : /* @__PURE__ */ o(
2186
1160
  "div",
2187
1161
  {
2188
1162
  "aria-hidden": !0,
2189
- className: s(
1163
+ className: n(
2190
1164
  "gryt-drawer-grabber mx-auto h-1.5 w-10 shrink-0 rounded-(--gryt-radius-full) bg-gryt-border",
2191
1165
  t === "top" && "order-last",
2192
1166
  a
@@ -2194,50 +1168,50 @@ function cr({ className: a }) {
2194
1168
  }
2195
1169
  );
2196
1170
  }
2197
- const Ho = {
2198
- Root: ar,
2199
- Trigger: k.Trigger,
2200
- Portal: k.Portal,
2201
- Backdrop: sr,
2202
- Viewport: or,
2203
- Popup: nr,
2204
- Content: k.Content,
2205
- Grabber: cr,
2206
- Close: k.Close,
2207
- Title: k.Title,
2208
- Description: k.Description
2209
- }, ir = i(
2210
- 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) {
2211
1185
  return /* @__PURE__ */ o(
2212
- j.Positioner,
1186
+ A.Positioner,
2213
1187
  {
2214
- ref: n,
2215
- sideOffset: r,
2216
- className: s("gryt-menu-positioner outline-none", t),
2217
- ...e
1188
+ ref: i,
1189
+ sideOffset: e,
1190
+ className: n("gryt-menu-positioner outline-none", t),
1191
+ ...r
2218
1192
  }
2219
1193
  );
2220
1194
  }
2221
- ), dr = i(function({ className: t, ...r }, e) {
1195
+ ), be = s(function({ className: t, ...e }, r) {
2222
1196
  return /* @__PURE__ */ o(
2223
- j.Popup,
1197
+ A.Popup,
2224
1198
  {
2225
- ref: e,
2226
- className: s(
1199
+ ref: r,
1200
+ className: n(
2227
1201
  "gryt-menu min-w-44 p-1 outline-none",
2228
- E,
2229
- H,
1202
+ D,
1203
+ $,
2230
1204
  t
2231
1205
  ),
2232
- ...r
1206
+ ...e
2233
1207
  }
2234
1208
  );
2235
- }), lr = i(function({ className: t, ...r }, e) {
1209
+ }), fe = s(function({ className: t, ...e }, r) {
2236
1210
  return /* @__PURE__ */ o(
2237
- j.Item,
1211
+ A.Item,
2238
1212
  {
2239
- ref: e,
2240
- className: s(
1213
+ ref: r,
1214
+ className: n(
2241
1215
  "gryt-menu-item flex cursor-pointer items-center gap-2 rounded-(--gryt-radius-md)",
2242
1216
  "px-3 py-2 text-sm text-gryt-text outline-none select-none",
2243
1217
  // Base UI drives keyboard and pointer highlight through the same
@@ -2246,32 +1220,32 @@ const Ho = {
2246
1220
  "data-disabled:cursor-not-allowed data-disabled:opacity-50",
2247
1221
  t
2248
1222
  ),
2249
- ...r
1223
+ ...e
2250
1224
  }
2251
1225
  );
2252
- }), ur = i(function({ className: t, ...r }, e) {
1226
+ }), xe = s(function({ className: t, ...e }, r) {
2253
1227
  return /* @__PURE__ */ o(
2254
- j.Separator,
1228
+ A.Separator,
2255
1229
  {
2256
- ref: e,
2257
- className: s("gryt-menu-separator my-1 h-px bg-gryt-border", t),
2258
- ...r
1230
+ ref: r,
1231
+ className: n("gryt-menu-separator my-1 h-px bg-gryt-border", t),
1232
+ ...e
2259
1233
  }
2260
1234
  );
2261
- }), ie = {
2262
- Root: j.Root,
2263
- Trigger: j.Trigger,
2264
- Portal: j.Portal,
2265
- Positioner: ir,
2266
- Popup: dr,
2267
- Item: lr,
2268
- Separator: ur
2269
- }, 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) {
2270
1244
  return /* @__PURE__ */ o(
2271
- Z.Root,
1245
+ E.Root,
2272
1246
  {
2273
- ref: e,
2274
- className: s(
1247
+ ref: r,
1248
+ className: n(
2275
1249
  "gryt-tabs",
2276
1250
  // Vertical puts the rail and the panel side by side. min-w-0 on the
2277
1251
  // panel does the rest; without the flex here the panel lands under the
@@ -2279,15 +1253,15 @@ const Ho = {
2279
1253
  "data-[orientation=vertical]:flex data-[orientation=vertical]:items-stretch",
2280
1254
  t
2281
1255
  ),
2282
- ...r
1256
+ ...e
2283
1257
  }
2284
1258
  );
2285
- }), fr = i(function({ className: t, ...r }, e) {
1259
+ }), we = s(function({ className: t, ...e }, r) {
2286
1260
  return /* @__PURE__ */ o(
2287
- Z.List,
1261
+ E.List,
2288
1262
  {
2289
- ref: e,
2290
- className: s(
1263
+ ref: r,
1264
+ className: n(
2291
1265
  "gryt-tabs-list relative inline-flex items-center gap-1 rounded-(--gryt-radius-full) bg-gryt-surface-raised p-1",
2292
1266
  // A rail, not a pill: rows are full width and the corner radius drops
2293
1267
  // to lg, because a 999px radius on a tall box bows its short edges.
@@ -2296,15 +1270,15 @@ const Ho = {
2296
1270
  "data-[orientation=vertical]:rounded-(--gryt-radius-lg)",
2297
1271
  t
2298
1272
  ),
2299
- ...r
1273
+ ...e
2300
1274
  }
2301
1275
  );
2302
- }), yr = i(function({ className: t, ...r }, e) {
1276
+ }), ve = s(function({ className: t, ...e }, r) {
2303
1277
  return /* @__PURE__ */ o(
2304
- Z.Tab,
1278
+ E.Tab,
2305
1279
  {
2306
- ref: e,
2307
- className: s(
1280
+ ref: r,
1281
+ className: n(
2308
1282
  "gryt-tab inline-flex min-h-8 cursor-pointer items-center justify-center whitespace-nowrap",
2309
1283
  "rounded-(--gryt-radius-full) border-0 bg-transparent px-4 py-1.5",
2310
1284
  "text-sm font-medium text-gryt-muted select-none",
@@ -2319,20 +1293,20 @@ const Ho = {
2319
1293
  "data-[orientation=vertical]:gap-2.5 data-[orientation=vertical]:px-3",
2320
1294
  "data-[orientation=vertical]:rounded-(--gryt-radius-md)",
2321
1295
  "data-disabled:cursor-not-allowed data-disabled:opacity-50",
2322
- x,
1296
+ b,
2323
1297
  t
2324
1298
  ),
2325
- ...r
1299
+ ...e
2326
1300
  }
2327
1301
  );
2328
- }), mr = i(
2329
- function({ className: t, ...r }, e) {
1302
+ }), Ne = s(
1303
+ function({ className: t, ...e }, r) {
2330
1304
  return /* @__PURE__ */ o(
2331
- Z.Indicator,
1305
+ E.Indicator,
2332
1306
  {
2333
- ref: e,
1307
+ ref: r,
2334
1308
  renderBeforeHydration: !0,
2335
- className: s(
1309
+ className: n(
2336
1310
  "gryt-tabs-indicator absolute top-1 left-0 z-0 h-[calc(100%-0.5rem)]",
2337
1311
  "w-(--active-tab-width) translate-x-(--active-tab-left)",
2338
1312
  "rounded-(--gryt-radius-full) bg-gryt-accent",
@@ -2348,16 +1322,16 @@ const Ho = {
2348
1322
  "[[data-orientation=vertical]_&]:transition-[translate,height]",
2349
1323
  t
2350
1324
  ),
2351
- ...r
1325
+ ...e
2352
1326
  }
2353
1327
  );
2354
1328
  }
2355
- ), br = i(function({ className: t, ...r }, e) {
1329
+ ), Pe = s(function({ className: t, ...e }, r) {
2356
1330
  return /* @__PURE__ */ o(
2357
- Z.Panel,
1331
+ E.Panel,
2358
1332
  {
2359
- ref: e,
2360
- className: s(
1333
+ ref: r,
1334
+ className: n(
2361
1335
  "gryt-tabs-panel pt-3 text-sm text-gryt-text",
2362
1336
  // Beside the rail rather than under it, and allowed to shrink so long
2363
1337
  // content wraps instead of pushing the rail off screen.
@@ -2365,194 +1339,194 @@ const Ho = {
2365
1339
  "data-[orientation=vertical]:pt-0 data-[orientation=vertical]:pl-4",
2366
1340
  t
2367
1341
  ),
2368
- ...r
1342
+ ...e
2369
1343
  }
2370
1344
  );
2371
- }), Do = Object.assign(gr, { List: fr, Tab: yr, Panel: br, Indicator: mr }), pr = 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) {
2372
1346
  return /* @__PURE__ */ o(
2373
- K.Root,
1347
+ F.Root,
2374
1348
  {
2375
- ref: e,
2376
- className: s(
1349
+ ref: r,
1350
+ className: n(
2377
1351
  "gryt-accordion flex w-full flex-col gap-2 rounded-(--gryt-radius-xl) border border-gryt-border bg-gryt-surface p-2",
2378
1352
  t
2379
1353
  ),
2380
- ...r
1354
+ ...e
2381
1355
  }
2382
1356
  );
2383
- }), hr = i(
2384
- function({ className: t, ...r }, e) {
1357
+ }), ke = s(
1358
+ function({ className: t, ...e }, r) {
2385
1359
  return /* @__PURE__ */ o(
2386
- K.Item,
1360
+ F.Item,
2387
1361
  {
2388
- ref: e,
2389
- className: s("gryt-accordion-item", t),
2390
- ...r
1362
+ ref: r,
1363
+ className: n("gryt-accordion-item", t),
1364
+ ...e
2391
1365
  }
2392
1366
  );
2393
1367
  }
2394
- ), xr = i(
2395
- function({ children: t, className: r, expandIcon: e, ...n }, c) {
2396
- return /* @__PURE__ */ o(K.Header, { className: "gryt-accordion-header m-0", children: /* @__PURE__ */ m(
2397
- 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,
2398
1372
  {
2399
1373
  ref: c,
2400
- className: s(
1374
+ className: n(
2401
1375
  "gryt-accordion-trigger flex w-full cursor-pointer items-center justify-between gap-3",
2402
1376
  "rounded-(--gryt-radius-lg) border-0 bg-transparent px-3 py-2.5",
2403
1377
  "text-left text-sm font-medium text-gryt-text select-none",
2404
1378
  "transition-colors duration-150 hover:bg-gryt-surface-raised",
2405
1379
  "data-disabled:cursor-not-allowed data-disabled:opacity-50",
2406
- x,
2407
- r
1380
+ b,
1381
+ e
2408
1382
  ),
2409
- ...n,
1383
+ ...i,
2410
1384
  children: [
2411
1385
  t,
2412
- e === void 0 ? /* @__PURE__ */ o(
2413
- at,
1386
+ r === void 0 ? /* @__PURE__ */ o(
1387
+ St,
2414
1388
  {
2415
1389
  size: 16,
2416
1390
  className: "shrink-0 transition-transform duration-(--gryt-dur-spring) ease-spring data-panel-open:rotate-180 motion-reduce:transition-none"
2417
1391
  }
2418
- ) : e
1392
+ ) : r
2419
1393
  ]
2420
1394
  }
2421
1395
  ) });
2422
1396
  }
2423
- ), wr = i(
2424
- function({ children: t, className: r, ...e }, n) {
1397
+ ), Se = s(
1398
+ function({ children: t, className: e, ...r }, i) {
2425
1399
  return /* @__PURE__ */ o(
2426
- K.Panel,
1400
+ F.Panel,
2427
1401
  {
2428
- ref: n,
2429
- className: s(
1402
+ ref: i,
1403
+ className: n(
2430
1404
  "gryt-accordion-panel overflow-hidden text-sm text-gryt-muted",
2431
1405
  // Base UI measures the panel and exposes the height as a variable,
2432
1406
  // which is what makes a real open and close transition possible.
2433
1407
  "h-[var(--accordion-panel-height)] transition-[height] duration-(--gryt-dur-spring-soft) ease-spring",
2434
1408
  "data-starting-style:h-0 data-ending-style:h-0",
2435
1409
  "motion-reduce:transition-none",
2436
- r
1410
+ e
2437
1411
  ),
2438
- ...e,
1412
+ ...r,
2439
1413
  children: /* @__PURE__ */ o("div", { className: "px-3 pt-1 pb-3", children: t })
2440
1414
  }
2441
1415
  );
2442
1416
  }
2443
- ), Go = Object.assign(pr, { Item: hr, Trigger: xr, Panel: wr }), vr = i(
2444
- 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) {
2445
1419
  return /* @__PURE__ */ o(
2446
- A.Positioner,
1420
+ k.Positioner,
2447
1421
  {
2448
- ref: n,
2449
- sideOffset: r,
2450
- className: s("gryt-context-menu-positioner outline-none", t),
2451
- ...e
1422
+ ref: i,
1423
+ sideOffset: e,
1424
+ className: n("gryt-context-menu-positioner outline-none", t),
1425
+ ...r
2452
1426
  }
2453
1427
  );
2454
1428
  }
2455
- ), jo = {
2456
- Root: A.Root,
2457
- Trigger: A.Trigger,
2458
- Portal: A.Portal,
2459
- Positioner: vr,
2460
- Popup: ie.Popup,
2461
- Item: ie.Item,
2462
- Separator: ie.Separator,
2463
- Group: A.Group,
2464
- GroupLabel: A.GroupLabel,
2465
- SubmenuRoot: A.SubmenuRoot,
2466
- SubmenuTrigger: A.SubmenuTrigger
2467
- }, Nr = i(
2468
- 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) {
2469
1443
  return /* @__PURE__ */ o(
2470
- R.Positioner,
1444
+ P.Positioner,
2471
1445
  {
2472
- ref: n,
2473
- sideOffset: r,
2474
- className: s("gryt-popover-positioner outline-none", t),
2475
- ...e
1446
+ ref: i,
1447
+ sideOffset: e,
1448
+ className: n("gryt-popover-positioner outline-none", t),
1449
+ ...r
2476
1450
  }
2477
1451
  );
2478
1452
  }
2479
- ), Pr = i(
2480
- function({ className: t, ...r }, e) {
1453
+ ), Ie = s(
1454
+ function({ className: t, ...e }, r) {
2481
1455
  return /* @__PURE__ */ o(
2482
- R.Popup,
1456
+ P.Popup,
2483
1457
  {
2484
- ref: e,
2485
- className: s(
1458
+ ref: r,
1459
+ className: n(
2486
1460
  "gryt-popover max-w-[min(20rem,calc(100vw-2rem))] p-4 outline-none",
2487
- E,
2488
- H,
1461
+ D,
1462
+ $,
2489
1463
  t
2490
1464
  ),
2491
- ...r
1465
+ ...e
2492
1466
  }
2493
1467
  );
2494
1468
  }
2495
- ), kr = i(function({ className: t, ...r }, e) {
1469
+ ), Ae = s(function({ className: t, ...e }, r) {
2496
1470
  return /* @__PURE__ */ o(
2497
- R.Title,
1471
+ P.Title,
2498
1472
  {
2499
- ref: e,
2500
- className: s(
1473
+ ref: r,
1474
+ className: n(
2501
1475
  "gryt-popover-title text-sm font-semibold text-gryt-text",
2502
1476
  t
2503
1477
  ),
2504
- ...r
1478
+ ...e
2505
1479
  }
2506
1480
  );
2507
- }), Tr = i(function({ className: t, ...r }, e) {
1481
+ }), De = s(function({ className: t, ...e }, r) {
2508
1482
  return /* @__PURE__ */ o(
2509
- R.Description,
1483
+ P.Description,
2510
1484
  {
2511
- ref: e,
2512
- className: s(
1485
+ ref: r,
1486
+ className: n(
2513
1487
  "gryt-popover-description mt-1 text-sm leading-6 text-gryt-muted",
2514
1488
  t
2515
1489
  ),
2516
- ...r
1490
+ ...e
2517
1491
  }
2518
1492
  );
2519
1493
  }), Eo = {
2520
- Root: R.Root,
2521
- Trigger: R.Trigger,
2522
- Portal: R.Portal,
2523
- Positioner: Nr,
2524
- Popup: Pr,
2525
- Title: kr,
2526
- Description: Tr,
2527
- Close: R.Close,
2528
- Arrow: R.Arrow
2529
- }, Lr = {
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 = {
2530
1504
  neutral: "border-white/8 bg-gryt-surface",
2531
1505
  info: "border-gryt-secondary-6 bg-gryt-secondary-2",
2532
1506
  success: "border-gryt-success-6 bg-gryt-success-2",
2533
1507
  warning: "border-gryt-warning-6 bg-gryt-warning-2",
2534
1508
  danger: "border-gryt-danger-6 bg-gryt-danger-2"
2535
- }, Sr = i(
2536
- function({ className: t, ...r }, e) {
1509
+ }, Ge = s(
1510
+ function({ className: t, ...e }, r) {
2537
1511
  return /* @__PURE__ */ o(
2538
- C.Viewport,
1512
+ T.Viewport,
2539
1513
  {
2540
- ref: e,
2541
- className: s(
1514
+ ref: r,
1515
+ className: n(
2542
1516
  "gryt-toast-viewport fixed right-4 bottom-4 z-50 flex w-[min(22rem,calc(100vw-2rem))]",
2543
1517
  "flex-col gap-2 outline-none",
2544
1518
  t
2545
1519
  ),
2546
- ...r
1520
+ ...e
2547
1521
  }
2548
1522
  );
2549
1523
  }
2550
- ), Rr = i(function({ className: t, severity: r = "neutral", ...e }, n) {
1524
+ ), Le = s(function({ className: t, severity: e = "neutral", ...r }, i) {
2551
1525
  return /* @__PURE__ */ o(
2552
- C.Root,
1526
+ T.Root,
2553
1527
  {
2554
- ref: n,
2555
- className: s(
1528
+ ref: i,
1529
+ className: n(
2556
1530
  "gryt-toast relative flex flex-col p-3 pr-9",
2557
1531
  // Not popupSurface. That border is --gryt-border, a solid slate line
2558
1532
  // that is right for a menu anchored to the thing that opened it and too
@@ -2560,7 +1534,7 @@ const Ho = {
2560
1534
  // white hairline separates it from the page without drawing a box
2561
1535
  // around it.
2562
1536
  "rounded-(--gryt-radius-xl) border text-gryt-text",
2563
- Lr[r],
1537
+ Me[e],
2564
1538
  // Swiping is a pointer gesture, so the toast follows the finger
2565
1539
  // through Base UI's swipe variables before it animates out.
2566
1540
  "transition-[opacity,transform] duration-(--gryt-dur-spring) ease-spring",
@@ -2569,56 +1543,56 @@ const Ho = {
2569
1543
  "motion-reduce:transition-none",
2570
1544
  t
2571
1545
  ),
2572
- ...e
1546
+ ...r
2573
1547
  }
2574
1548
  );
2575
- }), $r = i(function({ className: t, ...r }, e) {
1549
+ }), je = s(function({ className: t, ...e }, r) {
2576
1550
  return /* @__PURE__ */ o(
2577
- C.Title,
1551
+ T.Title,
2578
1552
  {
2579
- ref: e,
2580
- className: s(
1553
+ ref: r,
1554
+ className: n(
2581
1555
  "gryt-toast-title text-sm font-semibold text-gryt-text",
2582
1556
  t
2583
1557
  ),
2584
- ...r
1558
+ ...e
2585
1559
  }
2586
1560
  );
2587
- }), Cr = i(function({ className: t, ...r }, e) {
1561
+ }), Be = s(function({ className: t, ...e }, r) {
2588
1562
  return /* @__PURE__ */ o(
2589
- C.Description,
1563
+ T.Description,
2590
1564
  {
2591
- ref: e,
2592
- className: s(
1565
+ ref: r,
1566
+ className: n(
2593
1567
  "gryt-toast-description mt-0.5 text-sm leading-6 text-gryt-muted",
2594
1568
  t
2595
1569
  ),
2596
- ...r
1570
+ ...e
2597
1571
  }
2598
1572
  );
2599
- }), Ar = i(function({ className: t, children: r, ...e }, n) {
1573
+ }), ze = s(function({ className: t, children: e, ...r }, i) {
2600
1574
  return /* @__PURE__ */ o(
2601
- C.Close,
1575
+ T.Close,
2602
1576
  {
2603
- ref: n,
1577
+ ref: i,
2604
1578
  "aria-label": "Close",
2605
- className: s(
1579
+ className: n(
2606
1580
  "gryt-toast-close absolute top-2.5 right-2.5 inline-flex h-6 w-6 items-center justify-center",
2607
1581
  "rounded-(--gryt-radius-full) border-0 bg-transparent text-gryt-muted",
2608
1582
  "transition-colors hover:bg-white/8 hover:text-gryt-text motion-reduce:transition-none",
2609
1583
  "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gryt-accent-light",
2610
1584
  t
2611
1585
  ),
2612
- ...e,
2613
- children: r ?? /* @__PURE__ */ o($e, { size: 14, weight: "bold" })
1586
+ ...r,
1587
+ children: e ?? /* @__PURE__ */ o(st, { size: 14, weight: "bold" })
2614
1588
  }
2615
1589
  );
2616
- }), Ir = i(function({ className: t, ...r }, e) {
1590
+ }), Fe = s(function({ className: t, ...e }, r) {
2617
1591
  return /* @__PURE__ */ o(
2618
- C.Action,
1592
+ T.Action,
2619
1593
  {
2620
- ref: e,
2621
- className: s(
1594
+ ref: r,
1595
+ className: n(
2622
1596
  "gryt-toast-action mt-2 self-start rounded-(--gryt-radius-full) border-0",
2623
1597
  "bg-gryt-accent px-3 py-1.5 text-sm font-medium text-gryt-on-accent",
2624
1598
  "transition-[scale] duration-(--gryt-dur-spring) ease-spring",
@@ -2626,73 +1600,73 @@ const Ho = {
2626
1600
  "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gryt-accent-light",
2627
1601
  t
2628
1602
  ),
2629
- ...r
1603
+ ...e
2630
1604
  }
2631
1605
  );
2632
- }), zo = {
2633
- Provider: C.Provider,
2634
- Portal: C.Portal,
2635
- Viewport: Sr,
2636
- Root: Rr,
2637
- Title: $r,
2638
- Description: Cr,
2639
- Close: Ar,
2640
- Action: Ir
2641
- }, Bo = C.useToastManager, Mr = i(
2642
- 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) {
2643
1617
  return /* @__PURE__ */ o(
2644
- _.Root,
1618
+ L.Root,
2645
1619
  {
2646
- ref: e,
2647
- className: s("gryt-scroll-area relative", t),
2648
- ...r
1620
+ ref: r,
1621
+ className: n("gryt-scroll-area relative", t),
1622
+ ...e
2649
1623
  }
2650
1624
  );
2651
1625
  }
2652
- ), Hr = i(
2653
- function({ className: t, ...r }, e) {
1626
+ ), Ve = s(
1627
+ function({ className: t, ...e }, r) {
2654
1628
  return /* @__PURE__ */ o(
2655
- _.Viewport,
1629
+ L.Viewport,
2656
1630
  {
2657
- ref: e,
2658
- className: s(
1631
+ ref: r,
1632
+ className: n(
2659
1633
  "gryt-scroll-area-viewport h-full w-full overscroll-contain",
2660
1634
  "focus-visible:outline-2 focus-visible:-outline-offset-1 focus-visible:outline-gryt-accent-light",
2661
1635
  t
2662
1636
  ),
2663
- ...r
1637
+ ...e
2664
1638
  }
2665
1639
  );
2666
1640
  }
2667
- ), Dr = i(
2668
- function({ className: t, orientation: r, ...e }, n) {
1641
+ ), _e = s(
1642
+ function({ className: t, orientation: e, ...r }, i) {
2669
1643
  return /* @__PURE__ */ o(
2670
- _.Scrollbar,
1644
+ L.Scrollbar,
2671
1645
  {
2672
- ref: n,
2673
- orientation: r,
2674
- className: s(
1646
+ ref: i,
1647
+ orientation: e,
1648
+ className: n(
2675
1649
  "gryt-scroll-area-scrollbar flex touch-none p-0.5 select-none",
2676
1650
  // Fades in on hover or while scrolling rather than sitting there
2677
1651
  // permanently — a chat sidebar is mostly not being scrolled.
2678
1652
  "opacity-0 transition-opacity duration-(--gryt-dur-fast)",
2679
1653
  "data-hovering:opacity-100 data-scrolling:opacity-100",
2680
1654
  "motion-reduce:transition-none",
2681
- r === "horizontal" ? "h-2 flex-col" : "w-2",
1655
+ e === "horizontal" ? "h-2 flex-col" : "w-2",
2682
1656
  t
2683
1657
  ),
2684
- ...e,
2685
- 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" })
2686
1660
  }
2687
1661
  );
2688
1662
  }
2689
- ), Fo = {
2690
- Root: Mr,
2691
- Viewport: Hr,
2692
- Scrollbar: Dr,
2693
- Content: _.Content,
2694
- Corner: _.Corner
2695
- }, Gr = {
1663
+ ), Yo = {
1664
+ Root: Ee,
1665
+ Viewport: Ve,
1666
+ Scrollbar: _e,
1667
+ Content: L.Content,
1668
+ Corner: L.Corner
1669
+ }, Ye = {
2696
1670
  primary: [
2697
1671
  "text-gryt-muted hover:not-data-disabled:bg-white/8",
2698
1672
  "data-pressed:bg-gryt-accent data-pressed:text-gryt-on-accent",
@@ -2713,18 +1687,18 @@ const Ho = {
2713
1687
  "data-pressed:bg-gryt-danger data-pressed:text-gryt-on-danger",
2714
1688
  "data-pressed:hover:not-data-disabled:bg-gryt-danger"
2715
1689
  ].join(" ")
2716
- }, jr = {
1690
+ }, He = {
2717
1691
  xsmall: "h-8 min-w-8 px-2 text-xs",
2718
1692
  small: "h-9 min-w-9 px-2.5 text-sm",
2719
1693
  medium: "h-10 min-w-10 px-3 text-sm",
2720
1694
  large: "h-12 min-w-12 px-4 text-base"
2721
- }, _o = i(
2722
- 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) {
2723
1697
  return /* @__PURE__ */ o(
2724
- it,
1698
+ Dt,
2725
1699
  {
2726
1700
  ref: c,
2727
- className: s(
1701
+ className: n(
2728
1702
  "gryt-toggle",
2729
1703
  "inline-flex shrink-0 items-center justify-center gap-2 border-0 bg-transparent",
2730
1704
  "rounded-(--gryt-radius-full) font-medium select-none",
@@ -2732,63 +1706,63 @@ const Ho = {
2732
1706
  "transition-[scale,background-color,color] duration-(--gryt-dur-spring) ease-spring",
2733
1707
  "motion-safe:hover:not-data-disabled:scale-[1.06]",
2734
1708
  "motion-safe:active:not-data-disabled:scale-[0.94]",
2735
- x,
2736
- V,
2737
- jr[r],
2738
- Gr[e],
1709
+ b,
1710
+ j,
1711
+ He[e],
1712
+ Ye[r],
2739
1713
  t
2740
1714
  ),
2741
- ...n
1715
+ ...i
2742
1716
  }
2743
1717
  );
2744
1718
  }
2745
- ), Vo = i(
2746
- function({ className: t, ...r }, e) {
1719
+ ), Oo = s(
1720
+ function({ className: t, ...e }, r) {
2747
1721
  return /* @__PURE__ */ o(
2748
- dt,
1722
+ Mt,
2749
1723
  {
2750
- ref: e,
2751
- className: s(
1724
+ ref: r,
1725
+ className: n(
2752
1726
  "gryt-toggle-group inline-flex items-center gap-1",
2753
1727
  "rounded-(--gryt-radius-full) border border-gryt-border bg-gryt-surface p-1",
2754
1728
  t
2755
1729
  ),
2756
- ...r
1730
+ ...e
2757
1731
  }
2758
1732
  );
2759
1733
  }
2760
- ), Er = {
1734
+ ), Oe = {
2761
1735
  primary: "bg-gryt-accent",
2762
1736
  success: "bg-gryt-success",
2763
1737
  warning: "bg-gryt-warning",
2764
1738
  danger: "bg-gryt-danger"
2765
1739
  };
2766
- function Uo({
1740
+ function Xo({
2767
1741
  className: a,
2768
1742
  value: t,
2769
- label: r,
2770
- showValue: e = !1,
2771
- tone: n = "primary",
1743
+ label: e,
1744
+ showValue: r = !1,
1745
+ tone: i = "primary",
2772
1746
  ...c
2773
1747
  }) {
2774
- return /* @__PURE__ */ m(
2775
- O.Root,
1748
+ return /* @__PURE__ */ d(
1749
+ z.Root,
2776
1750
  {
2777
1751
  value: t,
2778
- 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),
2779
1753
  ...c,
2780
1754
  children: [
2781
- (r || e) && /* @__PURE__ */ m("div", { className: "flex items-baseline justify-between gap-2", children: [
2782
- r ? /* @__PURE__ */ o(O.Label, { className: "text-sm text-gryt-muted", children: r }) : /* @__PURE__ */ o("span", {}),
2783
- 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" })
2784
1758
  ] }),
2785
- /* @__PURE__ */ o(O.Track, { className: "h-1.5 w-full overflow-hidden rounded-(--gryt-radius-full) bg-gryt-surface-raised", children: /* @__PURE__ */ o(
2786
- 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,
2787
1761
  {
2788
- className: s(
1762
+ className: n(
2789
1763
  "h-full rounded-(--gryt-radius-full)",
2790
1764
  "transition-[width] duration-120 ease-out motion-reduce:transition-none",
2791
- Er[n]
1765
+ Oe[i]
2792
1766
  )
2793
1767
  }
2794
1768
  ) })
@@ -2796,13 +1770,13 @@ function Uo({
2796
1770
  }
2797
1771
  );
2798
1772
  }
2799
- const zr = i(
2800
- function({ className: t, ...r }, e) {
1773
+ const Xe = s(
1774
+ function({ className: t, ...e }, r) {
2801
1775
  return /* @__PURE__ */ o(
2802
- M.Popup,
1776
+ S.Popup,
2803
1777
  {
2804
- ref: e,
2805
- className: s(
1778
+ ref: r,
1779
+ className: n(
2806
1780
  "gryt-alert-dialog fixed top-1/2 left-1/2 z-50 -translate-x-1/2 -translate-y-1/2",
2807
1781
  "flex w-[32rem] max-w-[calc(100vw-3rem)] flex-col gap-4",
2808
1782
  "rounded-(--gryt-radius-lg) border border-gryt-border bg-gryt-surface p-5 text-gryt-text",
@@ -2812,59 +1786,59 @@ const zr = i(
2812
1786
  "data-ending-style:scale-[0.98] data-ending-style:opacity-0",
2813
1787
  t
2814
1788
  ),
2815
- ...r
1789
+ ...e
2816
1790
  }
2817
1791
  );
2818
1792
  }
2819
- ), Br = i(function({ className: t, ...r }, e) {
1793
+ ), Ue = s(function({ className: t, ...e }, r) {
2820
1794
  return /* @__PURE__ */ o(
2821
- M.Backdrop,
1795
+ S.Backdrop,
2822
1796
  {
2823
- ref: e,
2824
- className: s(
1797
+ ref: r,
1798
+ className: n(
2825
1799
  "gryt-alert-dialog-backdrop fixed inset-0 z-50 min-h-dvh bg-black/60",
2826
1800
  "backdrop-blur-(--gryt-backdrop-blur)",
2827
1801
  "transition-opacity duration-(--gryt-dur-spring) ease-spring motion-reduce:transition-none",
2828
1802
  "data-starting-style:opacity-0 data-ending-style:opacity-0",
2829
1803
  t
2830
1804
  ),
2831
- ...r
1805
+ ...e
2832
1806
  }
2833
1807
  );
2834
- }), Fr = i(function({ className: t, ...r }, e) {
1808
+ }), Ke = s(function({ className: t, ...e }, r) {
2835
1809
  return /* @__PURE__ */ o(
2836
- M.Title,
1810
+ S.Title,
2837
1811
  {
2838
- ref: e,
2839
- className: s(
1812
+ ref: r,
1813
+ className: n(
2840
1814
  "gryt-alert-dialog-title text-lg font-semibold text-gryt-text",
2841
1815
  t
2842
1816
  ),
2843
- ...r
1817
+ ...e
2844
1818
  }
2845
1819
  );
2846
- }), _r = i(function({ className: t, ...r }, e) {
1820
+ }), We = s(function({ className: t, ...e }, r) {
2847
1821
  return /* @__PURE__ */ o(
2848
- M.Description,
1822
+ S.Description,
2849
1823
  {
2850
- ref: e,
2851
- className: s(
1824
+ ref: r,
1825
+ className: n(
2852
1826
  "gryt-alert-dialog-description text-sm leading-6 text-gryt-muted",
2853
1827
  t
2854
1828
  ),
2855
- ...r
1829
+ ...e
2856
1830
  }
2857
1831
  );
2858
- }), Oo = {
2859
- Root: M.Root,
2860
- Trigger: M.Trigger,
2861
- Portal: M.Portal,
2862
- Backdrop: Br,
2863
- Popup: zr,
2864
- Title: Fr,
2865
- Description: _r,
2866
- Close: M.Close
2867
- }, 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 = [
2868
1842
  "flex cursor-default items-center gap-2 rounded-(--gryt-radius-md)",
2869
1843
  "px-3 py-2 text-sm text-gryt-text outline-none select-none",
2870
1844
  // Base UI drives keyboard and pointer highlight through one attribute, so
@@ -2872,195 +1846,195 @@ const zr = i(
2872
1846
  "data-highlighted:bg-gryt-surface-raised",
2873
1847
  "data-selected:text-gryt-accent-11",
2874
1848
  "data-disabled:cursor-not-allowed data-disabled:opacity-50"
2875
- ].join(" "), Ye = [
2876
- Fe,
2877
- _e.medium,
1849
+ ].join(" "), mt = [
1850
+ dt,
1851
+ gt.medium,
2878
1852
  "border-gryt-border",
2879
- x
2880
- ].join(" "), Vr = i(function({ className: t, ...r }, e) {
1853
+ b
1854
+ ].join(" "), Qe = s(function({ className: t, ...e }, r) {
2881
1855
  return /* @__PURE__ */ o(
2882
- p.Input,
1856
+ g.Input,
2883
1857
  {
2884
- ref: e,
2885
- className: s("gryt-combobox-input", Ye, t),
2886
- ...r
1858
+ ref: r,
1859
+ className: n("gryt-combobox-input", mt, t),
1860
+ ...e
2887
1861
  }
2888
1862
  );
2889
- }), Ur = i(function({ className: t, sideOffset: r = 6, ...e }, n) {
1863
+ }), Je = s(function({ className: t, sideOffset: e = 6, ...r }, i) {
2890
1864
  return /* @__PURE__ */ o(
2891
- p.Positioner,
1865
+ g.Positioner,
2892
1866
  {
2893
- ref: n,
2894
- sideOffset: r,
2895
- className: s("gryt-combobox-positioner outline-none", t),
2896
- ...e
1867
+ ref: i,
1868
+ sideOffset: e,
1869
+ className: n("gryt-combobox-positioner outline-none", t),
1870
+ ...r
2897
1871
  }
2898
1872
  );
2899
- }), Or = i(
2900
- function({ className: t, ...r }, e) {
1873
+ }), Ze = s(
1874
+ function({ className: t, ...e }, r) {
2901
1875
  return /* @__PURE__ */ o(
2902
- p.Popup,
1876
+ g.Popup,
2903
1877
  {
2904
- ref: e,
2905
- className: s(
1878
+ ref: r,
1879
+ className: n(
2906
1880
  "gryt-combobox max-h-64 w-(--anchor-width) overflow-y-auto overscroll-contain p-1 outline-none",
2907
- E,
2908
- H,
1881
+ D,
1882
+ $,
2909
1883
  t
2910
1884
  ),
2911
- ...r
1885
+ ...e
2912
1886
  }
2913
1887
  );
2914
1888
  }
2915
- ), Yr = i(function({ className: t, ...r }, e) {
1889
+ ), qe = s(function({ className: t, ...e }, r) {
2916
1890
  return /* @__PURE__ */ o(
2917
- p.Item,
1891
+ g.Item,
2918
1892
  {
2919
- ref: e,
2920
- className: s("gryt-combobox-item", Oe, t),
2921
- ...r
1893
+ ref: r,
1894
+ className: n("gryt-combobox-item", pt, t),
1895
+ ...e
2922
1896
  }
2923
1897
  );
2924
- }), Xr = i(function({ className: t, ...r }, e) {
1898
+ }), tr = s(function({ className: t, ...e }, r) {
2925
1899
  return /* @__PURE__ */ o(
2926
- p.Empty,
1900
+ g.Empty,
2927
1901
  {
2928
- ref: e,
2929
- className: s(
1902
+ ref: r,
1903
+ className: n(
2930
1904
  "gryt-combobox-empty px-3 py-2 text-sm text-gryt-muted",
2931
1905
  t
2932
1906
  ),
2933
- ...r
1907
+ ...e
2934
1908
  }
2935
1909
  );
2936
- }), Yo = {
2937
- Root: p.Root,
2938
- Input: Vr,
2939
- InputGroup: p.InputGroup,
2940
- Trigger: p.Trigger,
2941
- Icon: p.Icon,
2942
- Clear: p.Clear,
2943
- Value: p.Value,
2944
- Chips: p.Chips,
2945
- Chip: p.Chip,
2946
- ChipRemove: p.ChipRemove,
2947
- Portal: p.Portal,
2948
- Positioner: Ur,
2949
- Popup: Or,
2950
- List: p.List,
2951
- Item: Yr,
2952
- ItemIndicator: p.ItemIndicator,
2953
- Group: p.Group,
2954
- GroupLabel: p.GroupLabel,
2955
- Empty: Xr,
2956
- Separator: p.Separator
2957
- }, 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) {
2958
1932
  return /* @__PURE__ */ o(
2959
- h.Input,
1933
+ m.Input,
2960
1934
  {
2961
- ref: e,
2962
- className: s("gryt-autocomplete-input", Ye, t),
2963
- ...r
1935
+ ref: r,
1936
+ className: n("gryt-autocomplete-input", mt, t),
1937
+ ...e
2964
1938
  }
2965
1939
  );
2966
- }), Kr = i(function({ className: t, sideOffset: r = 6, ...e }, n) {
1940
+ }), rr = s(function({ className: t, sideOffset: e = 6, ...r }, i) {
2967
1941
  return /* @__PURE__ */ o(
2968
- h.Positioner,
1942
+ m.Positioner,
2969
1943
  {
2970
- ref: n,
2971
- sideOffset: r,
2972
- className: s("gryt-autocomplete-positioner outline-none", t),
2973
- ...e
1944
+ ref: i,
1945
+ sideOffset: e,
1946
+ className: n("gryt-autocomplete-positioner outline-none", t),
1947
+ ...r
2974
1948
  }
2975
1949
  );
2976
- }), Jr = i(function({ className: t, ...r }, e) {
1950
+ }), or = s(function({ className: t, ...e }, r) {
2977
1951
  return /* @__PURE__ */ o(
2978
- h.Popup,
1952
+ m.Popup,
2979
1953
  {
2980
- ref: e,
2981
- className: s(
1954
+ ref: r,
1955
+ className: n(
2982
1956
  "gryt-autocomplete max-h-64 w-(--anchor-width) overflow-y-auto overscroll-contain p-1 outline-none",
2983
- E,
2984
- H,
1957
+ D,
1958
+ $,
2985
1959
  t
2986
1960
  ),
2987
- ...r
1961
+ ...e
2988
1962
  }
2989
1963
  );
2990
- }), Qr = i(function({ className: t, ...r }, e) {
1964
+ }), ar = s(function({ className: t, ...e }, r) {
2991
1965
  return /* @__PURE__ */ o(
2992
- h.Item,
1966
+ m.Item,
2993
1967
  {
2994
- ref: e,
2995
- className: s("gryt-autocomplete-item", Oe, t),
2996
- ...r
1968
+ ref: r,
1969
+ className: n("gryt-autocomplete-item", pt, t),
1970
+ ...e
2997
1971
  }
2998
1972
  );
2999
- }), Zr = i(function({ className: t, ...r }, e) {
1973
+ }), nr = s(function({ className: t, ...e }, r) {
3000
1974
  return /* @__PURE__ */ o(
3001
- h.Empty,
1975
+ m.Empty,
3002
1976
  {
3003
- ref: e,
3004
- className: s(
1977
+ ref: r,
1978
+ className: n(
3005
1979
  "gryt-autocomplete-empty px-3 py-2 text-sm text-gryt-muted",
3006
1980
  t
3007
1981
  ),
3008
- ...r
1982
+ ...e
3009
1983
  }
3010
1984
  );
3011
- }), Xo = {
3012
- Root: h.Root,
3013
- Input: Wr,
3014
- InputGroup: h.InputGroup,
3015
- Trigger: h.Trigger,
3016
- Icon: h.Icon,
3017
- Clear: h.Clear,
3018
- Value: h.Value,
3019
- Portal: h.Portal,
3020
- Positioner: Kr,
3021
- Popup: Jr,
3022
- List: h.List,
3023
- Item: Qr,
3024
- Group: h.Group,
3025
- GroupLabel: h.GroupLabel,
3026
- Empty: Zr,
3027
- Separator: h.Separator
3028
- }, Wo = i(
3029
- function({ className: t, ...r }, e) {
1985
+ }), Wo = {
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) {
3030
2004
  return /* @__PURE__ */ o(
3031
- lt,
2005
+ Gt,
3032
2006
  {
3033
- ref: e,
3034
- className: s("gryt-checkbox-group flex flex-col gap-2", t),
3035
- ...r
2007
+ ref: r,
2008
+ className: n("gryt-checkbox-group flex flex-col gap-2", t),
2009
+ ...e
3036
2010
  }
3037
2011
  );
3038
2012
  }
3039
- ), qr = i(
3040
- function({ className: t, ...r }, e) {
2013
+ ), ir = s(
2014
+ function({ className: t, ...e }, r) {
3041
2015
  return /* @__PURE__ */ o(
3042
- ge.Trigger,
2016
+ W.Trigger,
3043
2017
  {
3044
- ref: e,
3045
- className: s(
2018
+ ref: r,
2019
+ className: n(
3046
2020
  "gryt-collapsible-trigger flex w-full items-center justify-between gap-2",
3047
2021
  "rounded-(--gryt-radius-md) border-0 bg-transparent px-2 py-2 text-left",
3048
2022
  "text-sm font-medium text-gryt-text select-none",
3049
2023
  "transition-colors hover:bg-gryt-surface-raised motion-reduce:transition-none",
3050
- x,
2024
+ b,
3051
2025
  t
3052
2026
  ),
3053
- ...r
2027
+ ...e
3054
2028
  }
3055
2029
  );
3056
2030
  }
3057
- ), ea = i(
3058
- function({ className: t, ...r }, e) {
2031
+ ), sr = s(
2032
+ function({ className: t, ...e }, r) {
3059
2033
  return /* @__PURE__ */ o(
3060
- ge.Panel,
2034
+ W.Panel,
3061
2035
  {
3062
- ref: e,
3063
- className: s(
2036
+ ref: r,
2037
+ className: n(
3064
2038
  "gryt-collapsible-panel overflow-hidden",
3065
2039
  // Base UI measures the panel and exposes the height as a variable, so
3066
2040
  // this animates to the content's real height rather than to a guess.
@@ -3069,181 +2043,190 @@ const zr = i(
3069
2043
  "motion-reduce:transition-none",
3070
2044
  t
3071
2045
  ),
3072
- ...r
2046
+ ...e
3073
2047
  }
3074
2048
  );
3075
2049
  }
3076
- ), Ko = {
3077
- Root: ge.Root,
3078
- Trigger: qr,
3079
- Panel: ea
3080
- }, Jo = i(function({ className: t, ...r }, e) {
2050
+ ), Jo = {
2051
+ Root: W.Root,
2052
+ Trigger: ir,
2053
+ Panel: sr
2054
+ }, Zo = s(function({ className: t, ...e }, r) {
3081
2055
  return /* @__PURE__ */ o(
3082
- ut,
2056
+ Lt,
3083
2057
  {
3084
- ref: e,
3085
- className: s("gryt-form flex flex-col gap-(--gryt-space-lg)", t),
3086
- ...r
2058
+ ref: r,
2059
+ className: n("gryt-form flex flex-col gap-(--gryt-space-lg)", t),
2060
+ ...e
3087
2061
  }
3088
2062
  );
3089
- }), ta = i(
3090
- function({ className: t, ...r }, e) {
2063
+ }), cr = s(
2064
+ function({ className: t, ...e }, r) {
3091
2065
  return /* @__PURE__ */ o(
3092
- Ae.Root,
2066
+ lt.Root,
3093
2067
  {
3094
- ref: e,
3095
- className: s(
2068
+ ref: r,
2069
+ className: n(
3096
2070
  "gryt-fieldset flex min-w-0 flex-col gap-3 border-0 p-0",
3097
2071
  t
3098
2072
  ),
3099
- ...r
2073
+ ...e
3100
2074
  }
3101
2075
  );
3102
2076
  }
3103
- ), ra = i(function({ className: t, ...r }, e) {
2077
+ ), lr = s(function({ className: t, ...e }, r) {
3104
2078
  return /* @__PURE__ */ o(
3105
- Ae.Legend,
2079
+ lt.Legend,
3106
2080
  {
3107
- ref: e,
3108
- className: s(
2081
+ ref: r,
2082
+ className: n(
3109
2083
  "gryt-fieldset-legend text-sm font-semibold text-gryt-text",
3110
2084
  t
3111
2085
  ),
3112
- ...r
2086
+ ...e
3113
2087
  }
3114
2088
  );
3115
- }), Qo = { Root: ta, Legend: ra }, Zo = i(
3116
- function({ className: t, ...r }, e) {
2089
+ }), qo = { Root: cr, Legend: lr }, ta = s(
2090
+ function({ className: t, ...e }, r) {
3117
2091
  return /* @__PURE__ */ o(
3118
- gt,
2092
+ jt,
3119
2093
  {
3120
- ref: e,
3121
- className: s(
2094
+ ref: r,
2095
+ className: n(
3122
2096
  "gryt-menubar flex items-center gap-1",
3123
2097
  "rounded-(--gryt-radius-md) border border-gryt-border bg-gryt-surface p-1",
3124
2098
  t
3125
2099
  ),
3126
- ...r
2100
+ ...e
3127
2101
  }
3128
2102
  );
3129
2103
  }
3130
- ), aa = i(function({ className: t, ...r }, e) {
2104
+ ), dr = s(function({ className: t, ...e }, r) {
3131
2105
  return /* @__PURE__ */ o(
3132
- N.Trigger,
2106
+ h.Trigger,
3133
2107
  {
3134
- ref: e,
3135
- className: s(
2108
+ ref: r,
2109
+ className: n(
3136
2110
  "gryt-navigation-menu-trigger flex items-center gap-1.5 rounded-(--gryt-radius-md)",
3137
2111
  "border-0 bg-transparent px-3 py-2 text-sm font-medium text-gryt-text select-none",
3138
2112
  "transition-colors hover:bg-gryt-surface-raised motion-reduce:transition-none",
3139
2113
  "data-popup-open:bg-gryt-surface-raised",
3140
- x,
2114
+ b,
3141
2115
  t
3142
2116
  ),
3143
- ...r
2117
+ ...e
3144
2118
  }
3145
2119
  );
3146
- }), oa = i(function({ className: t, ...r }, e) {
2120
+ }), gr = s(function({ className: t, ...e }, r) {
3147
2121
  return /* @__PURE__ */ o(
3148
- N.Popup,
2122
+ h.Popup,
3149
2123
  {
3150
- ref: e,
3151
- className: s(
2124
+ ref: r,
2125
+ className: n(
3152
2126
  "gryt-navigation-menu-popup outline-none",
3153
- E,
3154
- H,
2127
+ D,
2128
+ $,
3155
2129
  t
3156
2130
  ),
3157
- ...r
2131
+ ...e
3158
2132
  }
3159
2133
  );
3160
- }), na = i(function({ className: t, ...r }, e) {
2134
+ }), ur = s(function({ className: t, ...e }, r) {
3161
2135
  return /* @__PURE__ */ o(
3162
- N.Viewport,
2136
+ h.Positioner,
3163
2137
  {
3164
- ref: e,
3165
- className: s(
2138
+ ref: r,
2139
+ className: n("gryt-navigation-menu-positioner outline-none", t),
2140
+ ...e
2141
+ }
2142
+ );
2143
+ }), yr = s(function({ className: t, ...e }, r) {
2144
+ return /* @__PURE__ */ o(
2145
+ h.Viewport,
2146
+ {
2147
+ ref: r,
2148
+ className: n(
3166
2149
  "gryt-navigation-menu-viewport relative overflow-hidden",
3167
2150
  t
3168
2151
  ),
3169
- ...r
2152
+ ...e
3170
2153
  }
3171
2154
  );
3172
- }), sa = i(function({ className: t, ...r }, e) {
2155
+ }), pr = s(function({ className: t, ...e }, r) {
3173
2156
  return /* @__PURE__ */ o(
3174
- N.Link,
2157
+ h.Link,
3175
2158
  {
3176
- ref: e,
3177
- className: s(
2159
+ ref: r,
2160
+ className: n(
3178
2161
  "gryt-navigation-menu-link block rounded-(--gryt-radius-md) px-3 py-2",
3179
2162
  "text-sm text-gryt-text no-underline outline-none",
3180
2163
  "transition-colors hover:bg-gryt-surface-raised motion-reduce:transition-none",
3181
- x,
2164
+ b,
3182
2165
  t
3183
2166
  ),
3184
- ...r
2167
+ ...e
3185
2168
  }
3186
2169
  );
3187
- }), qo = {
3188
- Root: N.Root,
3189
- List: N.List,
3190
- Item: N.Item,
3191
- Trigger: aa,
3192
- Content: N.Content,
3193
- Portal: N.Portal,
3194
- Positioner: N.Positioner,
3195
- Viewport: na,
3196
- Popup: oa,
3197
- Link: sa,
3198
- Icon: N.Icon,
3199
- Arrow: N.Arrow
3200
- }, 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", en = i(
3201
- function({ className: t, label: r, scrubbable: e = !1, ...n }, c) {
3202
- return /* @__PURE__ */ m(
3203
- 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,
3204
2187
  {
3205
2188
  ref: c,
3206
- className: s("gryt-number-field flex flex-col gap-1.5", t),
3207
- ...n,
2189
+ className: n("gryt-number-field flex flex-col gap-1.5", t),
2190
+ ...i,
3208
2191
  children: [
3209
- r && (e ? /* @__PURE__ */ m(D.ScrubArea, { className: "cursor-ew-resize text-sm text-gryt-muted select-none", children: [
3210
- r,
3211
- /* @__PURE__ */ o(D.ScrubAreaCursor, {})
3212
- ] }) : /* @__PURE__ */ o("span", { className: "text-sm text-gryt-muted", children: r })),
3213
- /* @__PURE__ */ m(
3214
- 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,
3215
2198
  {
3216
- className: s(
2199
+ className: n(
3217
2200
  "flex w-fit items-center overflow-hidden rounded-(--gryt-radius-full)",
3218
2201
  "border border-gryt-border bg-gryt-surface-raised",
3219
2202
  "focus-within:outline-2 focus-within:outline-offset-2 focus-within:outline-gryt-accent-light",
3220
- V
2203
+ j
3221
2204
  ),
3222
2205
  children: [
3223
2206
  /* @__PURE__ */ o(
3224
- D.Decrement,
2207
+ R.Decrement,
3225
2208
  {
3226
2209
  "aria-label": "Decrease",
3227
- className: s(Le, "rounded-l-(--gryt-radius-full)"),
3228
- 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" })
3229
2212
  }
3230
2213
  ),
3231
2214
  /* @__PURE__ */ o(
3232
- D.Input,
2215
+ R.Input,
3233
2216
  {
3234
- className: s(
2217
+ className: n(
3235
2218
  "w-16 border-0 bg-transparent px-1 py-2 text-center",
3236
2219
  "font-mono text-sm text-gryt-text tabular-nums outline-none",
3237
- x
2220
+ b
3238
2221
  )
3239
2222
  }
3240
2223
  ),
3241
2224
  /* @__PURE__ */ o(
3242
- D.Increment,
2225
+ R.Increment,
3243
2226
  {
3244
2227
  "aria-label": "Increase",
3245
- className: s(Le, "rounded-r-(--gryt-radius-full)"),
3246
- 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" })
3247
2230
  }
3248
2231
  )
3249
2232
  ]
@@ -3253,179 +2236,186 @@ const zr = i(
3253
2236
  }
3254
2237
  );
3255
2238
  }
3256
- ), tn = i(
3257
- function({ className: t, length: r = 6, ...e }, n) {
2239
+ ), oa = s(
2240
+ function({ className: t, length: e = 6, ...r }, i) {
3258
2241
  return /* @__PURE__ */ o(
3259
- ve.Root,
2242
+ rt.Root,
3260
2243
  {
3261
- ref: n,
3262
- length: r,
3263
- className: s("gryt-otp-field flex gap-2", t),
3264
- ...e,
3265
- children: Array.from({ length: r }, (c, d) => /* @__PURE__ */ o(
3266
- 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,
3267
2250
  {
3268
- className: s(
2251
+ className: n(
3269
2252
  "gryt-otp-input h-12 w-10 rounded-(--gryt-radius-md) text-center",
3270
2253
  "border border-gryt-border bg-gryt-surface-raised",
3271
2254
  "font-mono text-lg text-gryt-text tabular-nums outline-none",
3272
2255
  "transition-colors duration-(--gryt-dur-fast) motion-reduce:transition-none",
3273
2256
  "data-filled:border-gryt-accent",
3274
- x
2257
+ b
3275
2258
  )
3276
2259
  },
3277
- d
2260
+ l
3278
2261
  ))
3279
2262
  }
3280
2263
  );
3281
2264
  }
3282
- ), ca = i(
3283
- function({ className: t, sideOffset: r = 8, ...e }, n) {
2265
+ ), mr = s(
2266
+ function({ className: t, sideOffset: e = 8, ...r }, i) {
3284
2267
  return /* @__PURE__ */ o(
3285
- z.Positioner,
2268
+ M.Positioner,
3286
2269
  {
3287
- ref: n,
3288
- sideOffset: r,
3289
- className: s("gryt-preview-card-positioner outline-none", t),
3290
- ...e
2270
+ ref: i,
2271
+ sideOffset: e,
2272
+ className: n("gryt-preview-card-positioner outline-none", t),
2273
+ ...r
3291
2274
  }
3292
2275
  );
3293
2276
  }
3294
- ), ia = i(
3295
- function({ className: t, ...r }, e) {
2277
+ ), br = s(
2278
+ function({ className: t, ...e }, r) {
3296
2279
  return /* @__PURE__ */ o(
3297
- z.Popup,
2280
+ M.Popup,
3298
2281
  {
3299
- ref: e,
3300
- className: s(
2282
+ ref: r,
2283
+ className: n(
3301
2284
  "gryt-preview-card w-64 max-w-[calc(100vw-2rem)] p-4 outline-none",
3302
- E,
3303
- H,
2285
+ D,
2286
+ $,
3304
2287
  t
3305
2288
  ),
3306
- ...r
2289
+ ...e
3307
2290
  }
3308
2291
  );
3309
2292
  }
3310
- ), rn = {
3311
- Root: z.Root,
3312
- Trigger: z.Trigger,
3313
- Portal: z.Portal,
3314
- Positioner: ca,
3315
- Popup: ia,
3316
- Arrow: z.Arrow
3317
- }, da = 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) {
3318
2301
  return /* @__PURE__ */ o(
3319
- B.Root,
2302
+ G.Root,
3320
2303
  {
3321
- ref: e,
3322
- className: s(
2304
+ ref: r,
2305
+ className: n(
3323
2306
  "gryt-toolbar flex items-center gap-1",
3324
2307
  "rounded-(--gryt-radius-full) border border-gryt-border bg-gryt-surface p-1",
3325
2308
  t
3326
2309
  ),
3327
- ...r
2310
+ ...e
3328
2311
  }
3329
2312
  );
3330
- }), la = i(function({ className: t, ...r }, e) {
2313
+ }), xr = s(function({ className: t, ...e }, r) {
3331
2314
  return /* @__PURE__ */ o(
3332
- B.Separator,
2315
+ G.Separator,
3333
2316
  {
3334
- ref: e,
3335
- className: s("gryt-toolbar-separator mx-1 h-6 w-px bg-gryt-border", t),
3336
- ...r
2317
+ ref: r,
2318
+ className: n("gryt-toolbar-separator mx-1 h-6 w-px bg-gryt-border", t),
2319
+ ...e
3337
2320
  }
3338
2321
  );
3339
- }), an = {
3340
- Root: da,
3341
- Group: B.Group,
3342
- Button: B.Button,
3343
- Link: B.Link,
3344
- Input: B.Input,
3345
- Separator: la
2322
+ }), na = {
2323
+ Root: fr,
2324
+ Group: G.Group,
2325
+ Button: G.Button,
2326
+ Link: G.Link,
2327
+ Input: G.Input,
2328
+ Separator: xr
3346
2329
  };
3347
2330
  export {
3348
- Go as Accordion,
3349
- $o as Alert,
3350
- Oo as AlertDialog,
3351
- Xo as Autocomplete,
3352
- Ft as Avatar,
3353
- yo as Badge,
3354
- Mt as Button,
3355
- To as Card,
3356
- Ro as CardActions,
3357
- So as CardContent,
3358
- Lo as CardHeader,
3359
- bo as Checkbox,
3360
- Wo as CheckboxGroup,
3361
- mo as Chip,
3362
- Ko as Collapsible,
3363
- Yo as Combobox,
3364
- go as Composer,
3365
- jo as ContextMenu,
3366
- fo as ConversationItem,
3367
- Mo as Dialog,
3368
- ko as Divider,
3369
- Ho as Drawer,
3370
- Qo as Fieldset,
3371
- Jo as Form,
3372
- ee as GRYT_HUE_KEYS,
3373
- je as GRYT_NEUTRAL_KEYS,
3374
- fe as GRYT_RADIUS_KEYS,
3375
- Pt as GRYT_THEME_NAME_MAX,
3376
- ro as GrytProvider,
3377
- co as IconButton,
3378
- ie as Menu,
3379
- Zo as Menubar,
3380
- lo as MessageBubble,
3381
- Uo as Meter,
3382
- qo as NavigationMenu,
3383
- en as NumberField,
3384
- tn as OtpField,
2331
+ zo as Accordion,
2332
+ Ao as Alert,
2333
+ Uo as AlertDialog,
2334
+ Wo as Autocomplete,
2335
+ Kt as Avatar,
2336
+ bo as Badge,
2337
+ Et as Button,
2338
+ So as Card,
2339
+ Io as CardActions,
2340
+ Ro as CardContent,
2341
+ $o as CardHeader,
2342
+ xo as Checkbox,
2343
+ Qo as CheckboxGroup,
2344
+ fo as Chip,
2345
+ Jo as Collapsible,
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,
2363
+ uo as MessageBubble,
2364
+ Xo as Meter,
2365
+ ea as NavigationMenu,
2366
+ ra as NumberField,
2367
+ oa as OtpField,
3385
2368
  Eo as Popover,
3386
- rn as PreviewCard,
3387
- Co as Progress,
3388
- po as Radio,
3389
- ho as RadioGroup,
3390
- Fo as ScrollArea,
3391
- vo as Select,
3392
- Io as Skeleton,
3393
- wo as Slider,
3394
- Ao as Spinner,
3395
- io as Surface,
3396
- xo as Switch,
3397
- yr as Tab,
3398
- Do as Tabs,
3399
- uo as TextField,
3400
- zo as Toast,
3401
- _o as Toggle,
3402
- Vo as ToggleGroup,
3403
- an as Toolbar,
3404
- No as Tooltip,
3405
- Po as TooltipProvider,
3406
- Ee as cloneGrytTheme,
3407
- s as cn,
3408
- qa as contrast,
3409
- vt as createGrytTheme,
3410
- no as decodeGrytTheme,
3411
- oo as encodeGrytTheme,
3412
- eo as grytAlphaScales,
3413
- to as grytAlphaScalesLight,
3414
- T as grytLightTokens,
3415
- Ct as grytPresets,
3416
- so as grytPresetsById,
3417
- Pe as grytScales,
3418
- le as grytScalesLight,
3419
- F as grytTheme,
3420
- kt as grytThemeHues,
3421
- ao as grytThemeToOptions,
3422
- u as grytTokens,
3423
- J as hexToOklch,
3424
- Be as isHexColor,
3425
- me as normalizeHexColor,
3426
- ye as normalizeThemeName,
3427
- $ as oklchToHex,
3428
- Zt as useMediaQuery,
3429
- Bo as useToastManager
2369
+ aa as PreviewCard,
2370
+ Do as Progress,
2371
+ ho as Radio,
2372
+ wo as RadioGroup,
2373
+ Yo as ScrollArea,
2374
+ Po as Select,
2375
+ Go as Skeleton,
2376
+ No as Slider,
2377
+ Mo as Spinner,
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,
2388
+ ko as TooltipProvider,
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
3430
2420
  };
3431
2421
  //# sourceMappingURL=index.js.map