@gryt/ui 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/dist/components/AlertDialog/AlertDialog.d.ts +14 -0
  2. package/dist/components/AlertDialog/AlertDialog.d.ts.map +1 -0
  3. package/dist/components/Autocomplete/Autocomplete.d.ts +20 -0
  4. package/dist/components/Autocomplete/Autocomplete.d.ts.map +1 -0
  5. package/dist/components/Checkbox/CheckboxGroup.d.ts +13 -0
  6. package/dist/components/Checkbox/CheckboxGroup.d.ts.map +1 -0
  7. package/dist/components/Collapsible/Collapsible.d.ts +10 -0
  8. package/dist/components/Collapsible/Collapsible.d.ts.map +1 -0
  9. package/dist/components/Combobox/Combobox.d.ts +40 -0
  10. package/dist/components/Combobox/Combobox.d.ts.map +1 -0
  11. package/dist/components/ContextMenu/ContextMenu.d.ts +17 -0
  12. package/dist/components/ContextMenu/ContextMenu.d.ts.map +1 -0
  13. package/dist/components/Drawer/Drawer.d.ts +41 -14
  14. package/dist/components/Drawer/Drawer.d.ts.map +1 -1
  15. package/dist/components/Form/Form.d.ts +20 -0
  16. package/dist/components/Form/Form.d.ts.map +1 -0
  17. package/dist/components/Meter/Meter.d.ts +26 -0
  18. package/dist/components/Meter/Meter.d.ts.map +1 -0
  19. package/dist/components/NavigationMenu/NavigationMenu.d.ts +27 -0
  20. package/dist/components/NavigationMenu/NavigationMenu.d.ts.map +1 -0
  21. package/dist/components/NumberField/NumberField.d.ts +16 -0
  22. package/dist/components/NumberField/NumberField.d.ts.map +1 -0
  23. package/dist/components/OtpField/OtpField.d.ts +16 -0
  24. package/dist/components/OtpField/OtpField.d.ts.map +1 -0
  25. package/dist/components/Popover/Popover.d.ts +16 -0
  26. package/dist/components/Popover/Popover.d.ts.map +1 -0
  27. package/dist/components/PreviewCard/PreviewCard.d.ts +13 -0
  28. package/dist/components/PreviewCard/PreviewCard.d.ts.map +1 -0
  29. package/dist/components/ScrollArea/ScrollArea.d.ts +13 -0
  30. package/dist/components/ScrollArea/ScrollArea.d.ts.map +1 -0
  31. package/dist/components/Toast/Toast.d.ts +23 -0
  32. package/dist/components/Toast/Toast.d.ts.map +1 -0
  33. package/dist/components/Toggle/Toggle.d.ts +17 -0
  34. package/dist/components/Toggle/Toggle.d.ts.map +1 -0
  35. package/dist/components/Toolbar/Toolbar.d.ts +12 -0
  36. package/dist/components/Toolbar/Toolbar.d.ts.map +1 -0
  37. package/dist/components/utils/useMediaQuery.d.ts +14 -0
  38. package/dist/components/utils/useMediaQuery.d.ts.map +1 -0
  39. package/dist/index.cjs +1 -1
  40. package/dist/index.cjs.map +1 -1
  41. package/dist/index.d.cts +35 -1
  42. package/dist/index.d.ts +35 -1
  43. package/dist/index.d.ts.map +1 -1
  44. package/dist/index.js +1547 -504
  45. package/dist/index.js.map +1 -1
  46. package/dist/styles.css +1 -1
  47. package/dist/theme.css +101 -0
  48. package/package.json +2 -1
package/dist/index.js CHANGED
@@ -1,25 +1,46 @@
1
- import { jsx as a, jsxs as g } from "react/jsx-runtime";
2
- import { Tooltip as h } from "@base-ui/react/tooltip";
3
- import { Button as M } from "@base-ui/react/button";
4
- import { forwardRef as c, useRef as V, useCallback as E, useLayoutEffect as W } from "react";
5
- import { clsx as X } from "clsx";
6
- import { twMerge as q } from "tailwind-merge";
7
- import { Field as S } from "@base-ui/react/field";
8
- import { PaperPlaneTilt as J, X as K, Check as F, CaretUpDown as Q, CircleNotch as Y, CaretDown as Z } from "@phosphor-icons/react";
9
- import { Avatar as $ } from "@base-ui/react/avatar";
10
- import { Checkbox as z } from "@base-ui/react/checkbox";
11
- import { Radio as j } from "@base-ui/react/radio";
12
- import { RadioGroup as _ } from "@base-ui/react/radio-group";
13
- import { Switch as A } from "@base-ui/react/switch";
14
- import { Slider as k } from "@base-ui/react/slider";
15
- import { Select as b } from "@base-ui/react/select";
16
- import { Separator as tt } from "@base-ui/react/separator";
17
- import { Progress as C } from "@base-ui/react/progress";
18
- import { Dialog as l } from "@base-ui/react/dialog";
19
- import { Menu as x } from "@base-ui/react/menu";
20
- import { Tabs as P } from "@base-ui/react/tabs";
21
- import { Accordion as N } from "@base-ui/react/accordion";
22
- const L = {
1
+ import { jsx as o, jsxs as d } from "react/jsx-runtime";
2
+ import { Tooltip as R } from "@base-ui/react/tooltip";
3
+ import { Button as at } from "@base-ui/react/button";
4
+ import { forwardRef as s, useRef as yt, useCallback as Q, useLayoutEffect as mt, useSyncExternalStore as pt, useContext as W, createContext as bt } from "react";
5
+ import { clsx as ft } from "clsx";
6
+ import { twMerge as xt } from "tailwind-merge";
7
+ import { Field as E } from "@base-ui/react/field";
8
+ import { PaperPlaneTilt as ht, X as nt, Check as st, CaretUpDown as wt, CircleNotch as vt, CaretDown as Nt, Minus as Pt, Plus as kt } from "@phosphor-icons/react";
9
+ import { Avatar as X } from "@base-ui/react/avatar";
10
+ import { Checkbox as Z } from "@base-ui/react/checkbox";
11
+ import { Radio as q } from "@base-ui/react/radio";
12
+ import { RadioGroup as Tt } from "@base-ui/react/radio-group";
13
+ import { Switch as tt } from "@base-ui/react/switch";
14
+ import { Slider as B } from "@base-ui/react/slider";
15
+ import { Select as f } from "@base-ui/react/select";
16
+ import { Separator as $t } from "@base-ui/react/separator";
17
+ import { Progress as Y } from "@base-ui/react/progress";
18
+ import { Dialog as k } from "@base-ui/react/dialog";
19
+ import { Drawer as h } from "@base-ui/react/drawer";
20
+ import { Menu as I } from "@base-ui/react/menu";
21
+ import { Tabs as V } from "@base-ui/react/tabs";
22
+ import { Accordion as F } from "@base-ui/react/accordion";
23
+ import { ContextMenu as P } from "@base-ui/react/context-menu";
24
+ import { Popover as w } from "@base-ui/react/popover";
25
+ import { Toast as v } from "@base-ui/react/toast";
26
+ import { ScrollArea as L } from "@base-ui/react/scroll-area";
27
+ import { Toggle as Ct } from "@base-ui/react/toggle";
28
+ import { ToggleGroup as St } from "@base-ui/react/toggle-group";
29
+ import { Meter as z } from "@base-ui/react/meter";
30
+ import { AlertDialog as T } from "@base-ui/react/alert-dialog";
31
+ import { Autocomplete as u } from "@base-ui/react/autocomplete";
32
+ import { Combobox as g } from "@base-ui/react/combobox";
33
+ import { CheckboxGroup as Rt } from "@base-ui/react/checkbox-group";
34
+ import { Collapsible as _ } from "@base-ui/react/collapsible";
35
+ import { Form as It } from "@base-ui/react/form";
36
+ import { Fieldset as it } from "@base-ui/react/fieldset";
37
+ import { Menubar as At } from "@base-ui/react/menubar";
38
+ import { NavigationMenu as x } from "@base-ui/react/navigation-menu";
39
+ import { NumberField as S } from "@base-ui/react/number-field";
40
+ import { OTPField as et } from "@base-ui/react/otp-field";
41
+ import { PreviewCard as D } from "@base-ui/react/preview-card";
42
+ import { Toolbar as M } from "@base-ui/react/toolbar";
43
+ const rt = {
23
44
  color: {
24
45
  bg: "#111318",
25
46
  surface: "#1a1d24",
@@ -48,8 +69,8 @@ const L = {
48
69
  full: 999
49
70
  }
50
71
  };
51
- function et(n = {}) {
52
- const t = { ...L.color, ...n.color }, e = { ...L.radius, ...n.radius };
72
+ function Dt(a = {}) {
73
+ const t = { ...rt.color, ...a.color }, e = { ...rt.radius, ...a.radius };
53
74
  return {
54
75
  "--gryt-bg": t.bg,
55
76
  "--gryt-surface": t.surface,
@@ -97,47 +118,47 @@ function et(n = {}) {
97
118
  "--gryt-radius-full": `${e.full}px`
98
119
  };
99
120
  }
100
- function rt(n) {
101
- return Object.keys(n).some((t) => t.startsWith("--"));
121
+ function Mt(a) {
122
+ return Object.keys(a).some((t) => t.startsWith("--"));
102
123
  }
103
- function se({
104
- children: n,
124
+ function eo({
125
+ children: a,
105
126
  className: t,
106
127
  theme: e,
107
128
  tooltipDelay: r = 400
108
129
  }) {
109
- const s = e && rt(e) ? e : et(e ?? {});
110
- return /* @__PURE__ */ a("div", { className: t, style: s, children: /* @__PURE__ */ a(h.Provider, { delay: r, children: n }) });
130
+ const i = e && Mt(e) ? e : Dt(e ?? {});
131
+ return /* @__PURE__ */ o("div", { className: t, style: i, children: /* @__PURE__ */ o(R.Provider, { delay: r, children: a }) });
111
132
  }
112
- function o(...n) {
113
- return q(X(n));
133
+ function n(...a) {
134
+ return xt(ft(a));
114
135
  }
115
- const at = {
136
+ const Lt = {
116
137
  primary: "bg-gryt-accent text-gryt-on-accent hover:not-data-disabled:bg-gryt-accent-light",
117
138
  secondary: "bg-gryt-secondary text-gryt-on-secondary hover:not-data-disabled:bg-gryt-secondary-light",
118
139
  neutral: "bg-gryt-surface-raised text-gryt-text hover:not-data-disabled:bg-gryt-surface-hover",
119
140
  danger: "bg-gryt-danger text-gryt-on-danger hover:not-data-disabled:bg-gryt-danger-light",
120
141
  ghost: "bg-transparent text-gryt-muted hover:not-data-disabled:bg-white/8 hover:not-data-disabled:text-gryt-text"
121
- }, nt = {
142
+ }, jt = {
122
143
  xsmall: "min-h-8 px-3 text-xs",
123
144
  small: "min-h-9 px-4 text-sm",
124
145
  medium: "min-h-10 px-5 text-sm",
125
146
  large: "min-h-12 px-6 text-base"
126
- }, ot = c(
147
+ }, Gt = s(
127
148
  function({
128
149
  children: t,
129
150
  className: e,
130
151
  endIcon: r,
131
- size: s = "medium",
132
- startIcon: i,
133
- tone: d = "primary",
134
- ...y
135
- }, u) {
136
- return /* @__PURE__ */ g(
137
- M,
152
+ size: i = "medium",
153
+ startIcon: c,
154
+ tone: l = "primary",
155
+ ...p
156
+ }, m) {
157
+ return /* @__PURE__ */ d(
158
+ at,
138
159
  {
139
- ref: u,
140
- className: o(
160
+ ref: m,
161
+ className: n(
141
162
  "gryt-button",
142
163
  "inline-flex items-center justify-center gap-2 border-0 shadow-none",
143
164
  "rounded-(--gryt-radius-full) font-semibold whitespace-nowrap select-none",
@@ -152,72 +173,72 @@ const at = {
152
173
  "motion-safe:active:not-data-disabled:scale-[0.96]",
153
174
  "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gryt-accent-light",
154
175
  "data-disabled:cursor-not-allowed data-disabled:opacity-50",
155
- nt[s],
156
- at[d],
176
+ jt[i],
177
+ Lt[l],
157
178
  e
158
179
  ),
159
- ...y,
180
+ ...p,
160
181
  children: [
161
- i,
182
+ c,
162
183
  t,
163
184
  r
164
185
  ]
165
186
  }
166
187
  );
167
188
  }
168
- ), f = "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gryt-accent-light", H = "rounded-(--gryt-radius-xl) border border-gryt-border bg-gryt-surface text-gryt-text", I = [
189
+ ), y = "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gryt-accent-light", $ = "rounded-(--gryt-radius-xl) border border-gryt-border bg-gryt-surface text-gryt-text", C = [
169
190
  // scale and translate are named explicitly because Tailwind v4 sets them as
170
191
  // standalone CSS properties rather than folding them into `transform`, so
171
192
  // transitioning `transform` would leave the popup snapping into place.
172
193
  "transition-[opacity,scale,translate] duration-(--gryt-dur-spring) ease-spring motion-reduce:transition-none",
173
194
  "data-starting-style:scale-[0.98] data-starting-style:opacity-0",
174
195
  "data-ending-style:scale-[0.98] data-ending-style:opacity-0"
175
- ].join(" "), T = "data-disabled:cursor-not-allowed data-disabled:opacity-50", st = {
196
+ ].join(" "), j = "data-disabled:cursor-not-allowed data-disabled:opacity-50", Bt = {
176
197
  primary: "data-checked:bg-gryt-accent data-checked:text-gryt-on-accent",
177
198
  secondary: "data-checked:bg-gryt-secondary data-checked:text-gryt-on-secondary",
178
199
  neutral: "data-checked:bg-gryt-surface-hover data-checked:text-gryt-text",
179
200
  danger: "data-checked:bg-gryt-danger data-checked:text-gryt-on-danger",
180
201
  success: "data-checked:bg-gryt-success data-checked:text-gryt-on-accent",
181
202
  warning: "data-checked:bg-gryt-warning data-checked:text-gryt-on-accent"
182
- }, G = {
203
+ }, ct = {
183
204
  primary: "bg-gryt-accent",
184
205
  secondary: "bg-gryt-secondary",
185
206
  neutral: "bg-gryt-surface-hover",
186
207
  danger: "bg-gryt-danger",
187
208
  success: "bg-gryt-success",
188
209
  warning: "bg-gryt-warning"
189
- }, ct = {
210
+ }, zt = {
190
211
  primary: "data-checked:border-gryt-accent",
191
212
  secondary: "data-checked:border-gryt-secondary",
192
213
  neutral: "data-checked:border-gryt-muted",
193
214
  danger: "data-checked:border-gryt-danger",
194
215
  success: "data-checked:border-gryt-success",
195
216
  warning: "data-checked:border-gryt-warning"
196
- }, it = {
217
+ }, Ft = {
197
218
  primary: "data-checked:bg-gryt-accent",
198
219
  secondary: "data-checked:bg-gryt-secondary",
199
220
  neutral: "data-checked:bg-gryt-surface-hover",
200
221
  danger: "data-checked:bg-gryt-danger",
201
222
  success: "data-checked:bg-gryt-success",
202
223
  warning: "data-checked:bg-gryt-warning"
203
- }, dt = {
224
+ }, Vt = {
204
225
  primary: "text-gryt-accent hover:not-data-disabled:bg-gryt-accent/10",
205
226
  secondary: "text-gryt-secondary hover:not-data-disabled:bg-gryt-secondary/10",
206
227
  neutral: "text-gryt-muted hover:not-data-disabled:bg-white/8 hover:not-data-disabled:text-gryt-text",
207
228
  danger: "text-gryt-danger hover:not-data-disabled:bg-gryt-danger/10",
208
229
  ghost: "text-gryt-muted hover:not-data-disabled:bg-white/8 hover:not-data-disabled:text-gryt-text"
209
- }, lt = {
230
+ }, Et = {
210
231
  xsmall: "h-8 w-8",
211
232
  small: "h-9 w-9",
212
233
  medium: "h-10 w-10",
213
234
  large: "h-12 w-12"
214
- }, ce = c(
215
- function({ className: t, size: e = "medium", tone: r = "neutral", ...s }, i) {
216
- return /* @__PURE__ */ a(
217
- M,
235
+ }, ro = s(
236
+ function({ className: t, size: e = "medium", tone: r = "neutral", ...i }, c) {
237
+ return /* @__PURE__ */ o(
238
+ at,
218
239
  {
219
- ref: i,
220
- className: o(
240
+ ref: c,
241
+ className: n(
221
242
  "gryt-icon-button",
222
243
  "inline-flex shrink-0 items-center justify-center border-0 bg-transparent p-0",
223
244
  "rounded-(--gryt-radius-full) select-none",
@@ -225,23 +246,23 @@ const at = {
225
246
  "transition-[scale,background-color,color] duration-(--gryt-dur-spring) ease-spring",
226
247
  "motion-safe:hover:not-data-disabled:scale-[1.06]",
227
248
  "motion-safe:active:not-data-disabled:scale-[0.94]",
228
- f,
229
- T,
230
- lt[e],
231
- dt[r],
249
+ y,
250
+ j,
251
+ Et[e],
252
+ Vt[r],
232
253
  t
233
254
  ),
234
- ...s
255
+ ...i
235
256
  }
236
257
  );
237
258
  }
238
- ), ie = c(
239
- function({ className: t, elevated: e = !1, ...r }, s) {
240
- return /* @__PURE__ */ a(
259
+ ), oo = s(
260
+ function({ className: t, elevated: e = !1, ...r }, i) {
261
+ return /* @__PURE__ */ o(
241
262
  "div",
242
263
  {
243
- ref: s,
244
- className: o(
264
+ ref: i,
265
+ className: n(
245
266
  "gryt-surface rounded-(--gryt-radius-lg) border border-gryt-border p-4 text-gryt-text",
246
267
  e ? "bg-gryt-surface-raised" : "bg-gryt-surface",
247
268
  t
@@ -250,276 +271,276 @@ const at = {
250
271
  }
251
272
  );
252
273
  }
253
- ), de = c(
254
- function({ children: t, className: e, from: r = "assistant", ...s }, i) {
255
- return /* @__PURE__ */ a(
274
+ ), ao = s(
275
+ function({ children: t, className: e, from: r = "assistant", ...i }, c) {
276
+ return /* @__PURE__ */ o(
256
277
  "div",
257
278
  {
258
- ref: i,
259
- className: o(
279
+ ref: c,
280
+ className: n(
260
281
  "gryt-message-bubble",
261
282
  r === "user" && "ml-auto bg-gryt-accent text-gryt-on-accent",
262
283
  r === "assistant" && "mr-auto border border-gryt-border bg-gryt-surface text-gryt-text",
263
284
  r === "system" && "mx-auto border border-dashed border-gryt-border bg-transparent text-gryt-muted",
264
285
  e
265
286
  ),
266
- ...s,
287
+ ...i,
267
288
  children: t
268
289
  }
269
290
  );
270
291
  }
271
- ), gt = {
292
+ ), Ht = {
272
293
  small: "min-h-9 px-3 py-1.5 text-sm",
273
294
  medium: "min-h-11 px-4 py-2.5 text-sm"
274
- }, le = c(
295
+ }, no = s(
275
296
  function({
276
297
  className: t,
277
298
  error: e = !1,
278
299
  fieldClassName: r,
279
- helperText: s,
280
- label: i,
281
- minRows: d = 3,
282
- multiline: y = !1,
283
- size: u = "medium",
284
- ...p
285
- }, w) {
286
- const v = /* @__PURE__ */ a(
287
- S.Control,
300
+ helperText: i,
301
+ label: c,
302
+ minRows: l = 3,
303
+ multiline: p = !1,
304
+ size: m = "medium",
305
+ ...N
306
+ }, A) {
307
+ const G = /* @__PURE__ */ o(
308
+ E.Control,
288
309
  {
289
- ref: w,
290
- render: y ? /* @__PURE__ */ a("textarea", { rows: d }) : void 0,
291
- className: o(
310
+ ref: A,
311
+ render: p ? /* @__PURE__ */ o("textarea", { rows: l }) : void 0,
312
+ className: n(
292
313
  "gryt-text-field-control w-full rounded-(--gryt-radius-xl) border bg-gryt-surface-raised",
293
314
  "text-gryt-text outline-none placeholder:text-gryt-muted",
294
315
  "transition-colors duration-150",
295
316
  "hover:border-gryt-accent-light focus:border-gryt-accent",
296
317
  "disabled:cursor-not-allowed disabled:opacity-60",
297
- y && "resize-y leading-6",
318
+ p && "resize-y leading-6",
298
319
  e ? "border-gryt-danger" : "border-gryt-border",
299
- gt[u],
320
+ Ht[m],
300
321
  t
301
322
  ),
302
- ...p
323
+ ...N
303
324
  }
304
325
  );
305
- return /* @__PURE__ */ g(
306
- S.Root,
326
+ return /* @__PURE__ */ d(
327
+ E.Root,
307
328
  {
308
- className: o(
329
+ className: n(
309
330
  "gryt-text-field flex w-full flex-col gap-1.5",
310
331
  r
311
332
  ),
312
333
  children: [
313
- i ? /* @__PURE__ */ a(S.Label, { className: "text-xs font-medium text-gryt-muted", children: i }) : null,
314
- v,
315
- s ? /* @__PURE__ */ a(
316
- S.Description,
334
+ c ? /* @__PURE__ */ o(E.Label, { className: "text-xs font-medium text-gryt-muted", children: c }) : null,
335
+ G,
336
+ i ? /* @__PURE__ */ o(
337
+ E.Description,
317
338
  {
318
- className: o(
339
+ className: n(
319
340
  "text-xs",
320
341
  e ? "text-gryt-danger" : "text-gryt-muted"
321
342
  ),
322
- children: s
343
+ children: i
323
344
  }
324
345
  ) : null
325
346
  ]
326
347
  }
327
348
  );
328
349
  }
329
- ), ge = c(
350
+ ), so = s(
330
351
  function({
331
352
  className: t,
332
353
  disabled: e = !1,
333
354
  maxRows: r = 8,
334
- minRows: s = 1,
335
- onSubmit: i,
336
- placeholder: d = "Message Gryt",
337
- submitLabel: y = "Send",
338
- ...u
339
- }, p) {
340
- const w = V(null), v = E(() => {
341
- const m = w.current;
342
- if (!m)
355
+ minRows: i = 1,
356
+ onSubmit: c,
357
+ placeholder: l = "Message Gryt",
358
+ submitLabel: p = "Send",
359
+ ...m
360
+ }, N) {
361
+ const A = yt(null), G = Q(() => {
362
+ const b = A.current;
363
+ if (!b)
343
364
  return;
344
- const R = window.getComputedStyle(m), D = parseFloat(R.lineHeight) || 24, B = parseFloat(R.paddingTop) + parseFloat(R.paddingBottom);
345
- m.style.height = "auto", m.style.height = `${Math.min(
346
- Math.max(m.scrollHeight, D * s + B),
347
- D * r + B
365
+ const O = window.getComputedStyle(b), J = parseFloat(O.lineHeight) || 24, K = parseFloat(O.paddingTop) + parseFloat(O.paddingBottom);
366
+ b.style.height = "auto", b.style.height = `${Math.min(
367
+ Math.max(b.scrollHeight, J * i + K),
368
+ J * r + K
348
369
  )}px`;
349
- }, [r, s]);
350
- W(v, [v, u.value]);
351
- function U(m) {
352
- if (!i) {
353
- m.preventDefault();
370
+ }, [r, i]);
371
+ mt(G, [G, m.value]);
372
+ function ut(b) {
373
+ if (!c) {
374
+ b.preventDefault();
354
375
  return;
355
376
  }
356
- i(m);
377
+ c(b);
357
378
  }
358
- return /* @__PURE__ */ g("form", { className: o("gryt-composer", t), onSubmit: U, children: [
359
- /* @__PURE__ */ a(
379
+ return /* @__PURE__ */ d("form", { className: n("gryt-composer", t), onSubmit: ut, children: [
380
+ /* @__PURE__ */ o(
360
381
  "textarea",
361
382
  {
362
- ref: (m) => {
363
- w.current = m, typeof p == "function" ? p(m) : p && (p.current = m);
383
+ ref: (b) => {
384
+ A.current = b, typeof N == "function" ? N(b) : N && (N.current = b);
364
385
  },
365
- rows: s,
386
+ rows: i,
366
387
  disabled: e,
367
- placeholder: d,
368
- onInput: v,
388
+ placeholder: l,
389
+ onInput: G,
369
390
  className: "gryt-composer-textarea disabled:cursor-not-allowed disabled:opacity-60",
370
- ...u
391
+ ...m
371
392
  }
372
393
  ),
373
- /* @__PURE__ */ a(
374
- ot,
394
+ /* @__PURE__ */ o(
395
+ Gt,
375
396
  {
376
397
  type: "submit",
377
398
  disabled: e,
378
399
  size: "small",
379
- endIcon: /* @__PURE__ */ a(J, { size: 14, weight: "fill" }),
380
- children: y
400
+ endIcon: /* @__PURE__ */ o(ht, { size: 14, weight: "fill" }),
401
+ children: p
381
402
  }
382
403
  )
383
404
  ] });
384
405
  }
385
- ), ut = {
406
+ ), Ot = {
386
407
  small: "h-8 w-8 text-xs",
387
408
  medium: "h-10 w-10 text-sm",
388
409
  large: "h-12 w-12 text-base"
389
- }, yt = c(function({ alt: t, children: e, className: r, fallback: s, size: i = "medium", src: d, ...y }, u) {
390
- return /* @__PURE__ */ g(
391
- $.Root,
410
+ }, Xt = s(function({ alt: t, children: e, className: r, fallback: i, size: c = "medium", src: l, ...p }, m) {
411
+ return /* @__PURE__ */ d(
412
+ X.Root,
392
413
  {
393
- ref: u,
394
- className: o(
414
+ ref: m,
415
+ className: n(
395
416
  "gryt-avatar inline-flex shrink-0 items-center justify-center overflow-hidden align-middle select-none",
396
417
  "rounded-(--gryt-radius-full) bg-gryt-surface-raised font-medium text-gryt-text ring-1 ring-gryt-border",
397
- ut[i],
418
+ Ot[c],
398
419
  r
399
420
  ),
400
- ...y,
421
+ ...p,
401
422
  children: [
402
- d ? /* @__PURE__ */ a(
403
- $.Image,
423
+ l ? /* @__PURE__ */ o(
424
+ X.Image,
404
425
  {
405
- src: d,
426
+ src: l,
406
427
  alt: t,
407
428
  className: "h-full w-full object-cover"
408
429
  }
409
430
  ) : null,
410
- /* @__PURE__ */ a($.Fallback, { className: "flex h-full w-full items-center justify-center", children: s ?? e })
431
+ /* @__PURE__ */ o(X.Fallback, { className: "flex h-full w-full items-center justify-center", children: i ?? e })
411
432
  ]
412
433
  }
413
434
  );
414
- }), ue = c(function({ active: t = !1, avatar: e, className: r, subtitle: s, title: i, ...d }, y) {
415
- return /* @__PURE__ */ g(
435
+ }), io = s(function({ active: t = !1, avatar: e, className: r, subtitle: i, title: c, ...l }, p) {
436
+ return /* @__PURE__ */ d(
416
437
  "button",
417
438
  {
418
- ref: y,
439
+ ref: p,
419
440
  type: "button",
420
- className: o(
441
+ className: n(
421
442
  "gryt-conversation-item",
422
443
  t ? "bg-gryt-accent text-gryt-on-accent" : "text-gryt-text hover:bg-white/5",
423
444
  r
424
445
  ),
425
- ...d,
446
+ ...l,
426
447
  children: [
427
- e ?? /* @__PURE__ */ a(
428
- yt,
448
+ e ?? /* @__PURE__ */ o(
449
+ Xt,
429
450
  {
430
451
  size: "small",
431
- className: o(
452
+ className: n(
432
453
  t ? "bg-gryt-on-accent text-gryt-accent ring-transparent" : "bg-gryt-surface-raised text-gryt-text"
433
454
  ),
434
- children: i.slice(0, 1).toUpperCase()
455
+ children: c.slice(0, 1).toUpperCase()
435
456
  }
436
457
  ),
437
- /* @__PURE__ */ g("span", { className: "min-w-0 flex-1", children: [
438
- /* @__PURE__ */ a("span", { className: "block truncate text-sm font-semibold", children: i }),
439
- s ? /* @__PURE__ */ a(
458
+ /* @__PURE__ */ d("span", { className: "min-w-0 flex-1", children: [
459
+ /* @__PURE__ */ o("span", { className: "block truncate text-sm font-semibold", children: c }),
460
+ i ? /* @__PURE__ */ o(
440
461
  "span",
441
462
  {
442
- className: o(
463
+ className: n(
443
464
  "block truncate text-xs",
444
465
  t ? "text-gryt-on-accent/70" : "text-gryt-muted"
445
466
  ),
446
- children: s
467
+ children: i
447
468
  }
448
469
  ) : null
449
470
  ] })
450
471
  ]
451
472
  }
452
473
  );
453
- }), ye = c(function({ badgeContent: t, children: e, className: r, max: s = 99, showZero: i = !1, ...d }, y) {
454
- const u = typeof t == "number" ? t : null, p = u !== null && u === 0 && !i, w = u !== null && u > s ? `${s}+` : t;
455
- return /* @__PURE__ */ g(
474
+ }), co = s(function({ badgeContent: t, children: e, className: r, max: i = 99, showZero: c = !1, ...l }, p) {
475
+ const m = typeof t == "number" ? t : null, N = m !== null && m === 0 && !c, A = m !== null && m > i ? `${i}+` : t;
476
+ return /* @__PURE__ */ d(
456
477
  "span",
457
478
  {
458
- ref: y,
459
- className: o("gryt-badge relative inline-flex", r),
460
- ...d,
479
+ ref: p,
480
+ className: n("gryt-badge relative inline-flex", r),
481
+ ...l,
461
482
  children: [
462
483
  e,
463
- t !== void 0 && !p ? /* @__PURE__ */ a(
484
+ t !== void 0 && !N ? /* @__PURE__ */ o(
464
485
  "span",
465
486
  {
466
- className: o(
487
+ className: n(
467
488
  "gryt-badge-dot absolute -top-1 -right-1 z-10 inline-flex items-center justify-center",
468
489
  "min-w-5 rounded-(--gryt-radius-full) px-1.5 py-0.5",
469
490
  "bg-gryt-accent text-[0.65rem] leading-none font-semibold text-gryt-on-accent",
470
491
  "ring-2 ring-gryt-bg"
471
492
  ),
472
- children: w
493
+ children: A
473
494
  }
474
495
  ) : null
475
496
  ]
476
497
  }
477
498
  );
478
- }), mt = {
499
+ }), Yt = {
479
500
  neutral: "border-gryt-border bg-gryt-surface-raised text-gryt-text",
480
501
  primary: "border-gryt-accent/40 bg-gryt-accent/12 text-gryt-accent",
481
502
  secondary: "border-gryt-secondary/40 bg-gryt-secondary/12 text-gryt-secondary",
482
503
  success: "border-gryt-success/40 bg-gryt-success/12 text-gryt-success",
483
504
  warning: "border-gryt-warning/40 bg-gryt-warning/12 text-gryt-warning",
484
505
  danger: "border-gryt-danger/40 bg-gryt-danger/12 text-gryt-danger"
485
- }, me = c(function({ children: t, className: e, icon: r, label: s, onDelete: i, tone: d = "neutral", ...y }, u) {
486
- return /* @__PURE__ */ g(
506
+ }, lo = s(function({ children: t, className: e, icon: r, label: i, onDelete: c, tone: l = "neutral", ...p }, m) {
507
+ return /* @__PURE__ */ d(
487
508
  "span",
488
509
  {
489
- ref: u,
490
- className: o(
510
+ ref: m,
511
+ className: n(
491
512
  "gryt-chip inline-flex items-center gap-1.5 rounded-(--gryt-radius-full) border px-3 py-1 text-xs font-medium",
492
- mt[d],
513
+ Yt[l],
493
514
  e
494
515
  ),
495
- ...y,
516
+ ...p,
496
517
  children: [
497
518
  r,
498
- s ?? t,
499
- i ? /* @__PURE__ */ a(
519
+ i ?? t,
520
+ c ? /* @__PURE__ */ o(
500
521
  "button",
501
522
  {
502
523
  type: "button",
503
524
  "aria-label": "Remove",
504
- onClick: i,
505
- className: o(
525
+ onClick: c,
526
+ className: n(
506
527
  "-mr-1 inline-flex h-4 w-4 items-center justify-center rounded-(--gryt-radius-full)",
507
528
  "opacity-70 transition-opacity hover:opacity-100",
508
- f
529
+ y
509
530
  ),
510
- children: /* @__PURE__ */ a(K, { size: 10, weight: "bold", "aria-hidden": "true" })
531
+ children: /* @__PURE__ */ o(nt, { size: 10, weight: "bold", "aria-hidden": "true" })
511
532
  }
512
533
  ) : null
513
534
  ]
514
535
  }
515
536
  );
516
- }), be = c(
517
- function({ className: t, tone: e = "primary", ...r }, s) {
518
- return /* @__PURE__ */ a(
519
- z.Root,
537
+ }), go = s(
538
+ function({ className: t, tone: e = "primary", ...r }, i) {
539
+ return /* @__PURE__ */ o(
540
+ Z.Root,
520
541
  {
521
- ref: s,
522
- className: o(
542
+ ref: i,
543
+ className: n(
523
544
  "gryt-checkbox flex h-5 w-5 shrink-0 items-center justify-center",
524
545
  "rounded-(--gryt-radius-sm) border border-gryt-border bg-gryt-surface-raised",
525
546
  "transition-[scale,background-color,border-color] duration-(--gryt-dur-spring) ease-spring",
@@ -529,18 +550,18 @@ const at = {
529
550
  "hover:not-data-disabled:border-gryt-accent-light",
530
551
  "motion-safe:hover:not-data-disabled:scale-[1.08]",
531
552
  "motion-safe:active:not-data-disabled:scale-[0.92]",
532
- f,
533
- T,
553
+ y,
554
+ j,
534
555
  // Unchecked stays a neutral outline; the tone only paints once checked.
535
- st[e],
556
+ Bt[e],
536
557
  t
537
558
  ),
538
559
  ...r,
539
- children: /* @__PURE__ */ a(
540
- z.Indicator,
560
+ children: /* @__PURE__ */ o(
561
+ Z.Indicator,
541
562
  {
542
563
  keepMounted: !0,
543
- className: o(
564
+ className: n(
544
565
  "flex origin-center",
545
566
  "transition-[scale,opacity] duration-(--gryt-dur-spring) ease-spring",
546
567
  // Scaling from 0 rather than from something near 1 is deliberate.
@@ -550,65 +571,65 @@ const at = {
550
571
  "data-unchecked:scale-0 data-unchecked:opacity-0",
551
572
  "motion-reduce:transition-none"
552
573
  ),
553
- children: /* @__PURE__ */ a(F, { size: 12, weight: "bold" })
574
+ children: /* @__PURE__ */ o(st, { size: 12, weight: "bold" })
554
575
  }
555
576
  )
556
577
  }
557
578
  );
558
579
  }
559
- ), fe = c(function({ className: t, tone: e = "primary", ...r }, s) {
560
- return /* @__PURE__ */ a(
561
- j.Root,
580
+ ), uo = s(function({ className: t, tone: e = "primary", ...r }, i) {
581
+ return /* @__PURE__ */ o(
582
+ q.Root,
562
583
  {
563
- ref: s,
564
- className: o(
584
+ ref: i,
585
+ className: n(
565
586
  "gryt-radio flex h-5 w-5 shrink-0 items-center justify-center",
566
587
  "rounded-(--gryt-radius-full) border border-gryt-border bg-gryt-surface-raised",
567
588
  "transition-[scale,background-color,border-color] duration-(--gryt-dur-spring) ease-spring",
568
589
  "hover:not-data-disabled:border-gryt-accent-light",
569
590
  "motion-safe:hover:not-data-disabled:scale-[1.08]",
570
591
  "motion-safe:active:not-data-disabled:scale-[0.92]",
571
- f,
572
- T,
592
+ y,
593
+ j,
573
594
  // Border takes the tone when selected; the dot inside carries the fill.
574
- ct[e],
595
+ zt[e],
575
596
  t
576
597
  ),
577
598
  ...r,
578
- children: /* @__PURE__ */ a(
579
- j.Indicator,
599
+ children: /* @__PURE__ */ o(
600
+ q.Indicator,
580
601
  {
581
602
  keepMounted: !0,
582
- className: o(
603
+ className: n(
583
604
  "h-2.5 w-2.5 origin-center rounded-(--gryt-radius-full)",
584
605
  "transition-[scale,opacity] duration-(--gryt-dur-spring) ease-spring",
585
606
  // From 0, for the same reason as the Checkbox tick — see the note there.
586
607
  "data-unchecked:scale-0 data-unchecked:opacity-0",
587
608
  "motion-reduce:transition-none",
588
- G[e]
609
+ ct[e]
589
610
  )
590
611
  }
591
612
  )
592
613
  }
593
614
  );
594
- }), pe = c(
615
+ }), yo = s(
595
616
  function({ className: t, ...e }, r) {
596
- return /* @__PURE__ */ a(
597
- _,
617
+ return /* @__PURE__ */ o(
618
+ Tt,
598
619
  {
599
620
  ref: r,
600
- className: o("gryt-radio-group flex flex-col gap-2", t),
621
+ className: n("gryt-radio-group flex flex-col gap-2", t),
601
622
  ...e
602
623
  }
603
624
  );
604
625
  }
605
- ), he = c(
606
- function({ className: t, tone: e = "primary", ...r }, s) {
607
- return /* @__PURE__ */ a(
608
- A.Root,
626
+ ), mo = s(
627
+ function({ className: t, tone: e = "primary", ...r }, i) {
628
+ return /* @__PURE__ */ o(
629
+ tt.Root,
609
630
  {
610
- ref: s,
611
- className: o(
631
+ ref: i,
632
+ className: n(
612
633
  "gryt-switch relative inline-flex h-6 w-10 shrink-0 items-center",
613
634
  "rounded-(--gryt-radius-full) border border-gryt-border bg-gryt-surface-raised p-0.5",
614
635
  "transition-[scale,background-color,border-color] duration-(--gryt-dur-spring) ease-spring",
@@ -616,16 +637,16 @@ const at = {
616
637
  "hover:not-data-disabled:border-gryt-accent-light",
617
638
  "motion-safe:hover:not-data-disabled:scale-[1.05]",
618
639
  "motion-safe:active:not-data-disabled:scale-[0.95]",
619
- f,
620
- T,
621
- it[e],
640
+ y,
641
+ j,
642
+ Ft[e],
622
643
  t
623
644
  ),
624
645
  ...r,
625
- children: /* @__PURE__ */ a(
626
- A.Thumb,
646
+ children: /* @__PURE__ */ o(
647
+ tt.Thumb,
627
648
  {
628
- className: o(
649
+ className: n(
629
650
  "h-4.5 w-4.5 rounded-(--gryt-radius-full) bg-gryt-text",
630
651
  "transition-transform duration-(--gryt-dur-spring) ease-spring motion-reduce:transition-none",
631
652
  "data-checked:translate-x-4 data-checked:bg-gryt-bg"
@@ -636,36 +657,36 @@ const at = {
636
657
  );
637
658
  }
638
659
  );
639
- function xe({
640
- className: n,
660
+ function po({
661
+ className: a,
641
662
  tone: t = "primary",
642
663
  "aria-label": e,
643
664
  ...r
644
665
  }) {
645
- return /* @__PURE__ */ a(
646
- k.Root,
666
+ return /* @__PURE__ */ o(
667
+ B.Root,
647
668
  {
648
- className: o("gryt-slider w-full", n),
669
+ className: n("gryt-slider w-full", a),
649
670
  ...r,
650
- children: /* @__PURE__ */ a(k.Control, { className: "flex w-full touch-none items-center py-2 select-none", children: /* @__PURE__ */ g(k.Track, { className: "h-1.5 w-full rounded-(--gryt-radius-full) bg-gryt-surface-raised select-none", children: [
651
- /* @__PURE__ */ a(
652
- k.Indicator,
671
+ children: /* @__PURE__ */ o(B.Control, { className: "flex w-full touch-none items-center py-2 select-none", children: /* @__PURE__ */ d(B.Track, { className: "h-1.5 w-full rounded-(--gryt-radius-full) bg-gryt-surface-raised select-none", children: [
672
+ /* @__PURE__ */ o(
673
+ B.Indicator,
653
674
  {
654
- className: o(
675
+ className: n(
655
676
  "h-full rounded-(--gryt-radius-full) select-none",
656
- G[t]
677
+ ct[t]
657
678
  )
658
679
  }
659
680
  ),
660
- /* @__PURE__ */ a(
661
- k.Thumb,
681
+ /* @__PURE__ */ o(
682
+ B.Thumb,
662
683
  {
663
684
  "aria-label": e,
664
- className: o(
685
+ className: n(
665
686
  "h-4 w-4 rounded-(--gryt-radius-full) bg-gryt-text select-none",
666
687
  "transition-transform duration-(--gryt-dur-spring) ease-spring motion-reduce:transition-none",
667
688
  "motion-safe:hover:scale-[1.12] motion-safe:active:scale-[0.94]",
668
- f
689
+ y
669
690
  )
670
691
  }
671
692
  )
@@ -673,97 +694,97 @@ function xe({
673
694
  }
674
695
  );
675
696
  }
676
- const bt = {
697
+ const Ut = {
677
698
  small: "min-h-9 px-3 text-sm",
678
699
  medium: "min-h-11 px-4 text-sm"
679
700
  };
680
- function we({
681
- className: n,
701
+ function bo({
702
+ className: a,
682
703
  label: t,
683
704
  options: e = [],
684
705
  placeholder: r = "Select",
685
- size: s = "medium",
686
- ...i
706
+ size: i = "medium",
707
+ ...c
687
708
  }) {
688
- return /* @__PURE__ */ g(b.Root, { items: e, ...i, children: [
689
- /* @__PURE__ */ g("div", { className: o("gryt-select flex w-full flex-col gap-1.5", n), children: [
690
- t ? /* @__PURE__ */ a(b.Label, { className: "text-xs font-medium text-gryt-muted", children: t }) : null,
691
- /* @__PURE__ */ g(
692
- b.Trigger,
709
+ return /* @__PURE__ */ d(f.Root, { items: e, ...c, children: [
710
+ /* @__PURE__ */ d("div", { className: n("gryt-select flex w-full flex-col gap-1.5", a), children: [
711
+ t ? /* @__PURE__ */ o(f.Label, { className: "text-xs font-medium text-gryt-muted", children: t }) : null,
712
+ /* @__PURE__ */ d(
713
+ f.Trigger,
693
714
  {
694
- className: o(
715
+ className: n(
695
716
  "flex w-full items-center justify-between gap-2",
696
717
  "rounded-(--gryt-radius-xl) border border-gryt-border bg-gryt-surface-raised",
697
718
  "text-gryt-text select-none",
698
719
  "transition-colors duration-150 hover:border-gryt-accent-light",
699
720
  "data-disabled:cursor-not-allowed data-disabled:opacity-60",
700
- f,
701
- bt[s]
721
+ y,
722
+ Ut[i]
702
723
  ),
703
724
  children: [
704
- /* @__PURE__ */ a(b.Value, { placeholder: r }),
705
- /* @__PURE__ */ a(b.Icon, { className: "shrink-0 text-gryt-muted", children: /* @__PURE__ */ a(Q, { size: 16 }) })
725
+ /* @__PURE__ */ o(f.Value, { placeholder: r }),
726
+ /* @__PURE__ */ o(f.Icon, { className: "shrink-0 text-gryt-muted", children: /* @__PURE__ */ o(wt, { size: 16 }) })
706
727
  ]
707
728
  }
708
729
  )
709
730
  ] }),
710
- /* @__PURE__ */ a(b.Portal, { children: /* @__PURE__ */ a(b.Positioner, { sideOffset: 6, className: "outline-none", children: /* @__PURE__ */ a(
711
- b.Popup,
731
+ /* @__PURE__ */ o(f.Portal, { children: /* @__PURE__ */ o(f.Positioner, { sideOffset: 6, className: "outline-none", children: /* @__PURE__ */ o(
732
+ f.Popup,
712
733
  {
713
- className: o("min-w-(--anchor-width) p-1", H, I),
714
- children: /* @__PURE__ */ a(b.List, { children: e.map((d) => /* @__PURE__ */ g(
715
- b.Item,
734
+ className: n("min-w-(--anchor-width) p-1", $, C),
735
+ children: /* @__PURE__ */ o(f.List, { children: e.map((l) => /* @__PURE__ */ d(
736
+ f.Item,
716
737
  {
717
- value: d.value,
718
- disabled: d.disabled,
719
- className: o(
738
+ value: l.value,
739
+ disabled: l.disabled,
740
+ className: n(
720
741
  "flex cursor-default items-center justify-between gap-2",
721
742
  "rounded-(--gryt-radius-md) px-3 py-2 text-sm text-gryt-text",
722
743
  "outline-none select-none data-highlighted:bg-gryt-surface-raised",
723
744
  "data-disabled:cursor-not-allowed data-disabled:opacity-50"
724
745
  ),
725
746
  children: [
726
- /* @__PURE__ */ a(b.ItemText, { children: d.label }),
727
- /* @__PURE__ */ a(b.ItemIndicator, { className: "text-gryt-accent", children: /* @__PURE__ */ a(F, { size: 14, weight: "bold" }) })
747
+ /* @__PURE__ */ o(f.ItemText, { children: l.label }),
748
+ /* @__PURE__ */ o(f.ItemIndicator, { className: "text-gryt-accent", children: /* @__PURE__ */ o(st, { size: 14, weight: "bold" }) })
728
749
  ]
729
750
  },
730
- String(d.value)
751
+ String(l.value)
731
752
  )) })
732
753
  }
733
754
  ) }) })
734
755
  ] });
735
756
  }
736
- function ve({
737
- children: n,
757
+ function fo({
758
+ children: a,
738
759
  className: t,
739
760
  side: e = "top",
740
761
  sideOffset: r = 8,
741
- title: s
762
+ title: i
742
763
  }) {
743
- return /* @__PURE__ */ g(h.Root, { children: [
744
- /* @__PURE__ */ a(h.Trigger, { render: n }),
745
- /* @__PURE__ */ a(h.Portal, { children: /* @__PURE__ */ a(h.Positioner, { side: e, sideOffset: r, children: /* @__PURE__ */ a(
746
- h.Popup,
764
+ return /* @__PURE__ */ d(R.Root, { children: [
765
+ /* @__PURE__ */ o(R.Trigger, { render: a }),
766
+ /* @__PURE__ */ o(R.Portal, { children: /* @__PURE__ */ o(R.Positioner, { side: e, sideOffset: r, children: /* @__PURE__ */ o(
767
+ R.Popup,
747
768
  {
748
- className: o(
769
+ className: n(
749
770
  "gryt-tooltip rounded-(--gryt-radius-md) border border-gryt-border bg-gryt-surface-raised",
750
771
  "px-2.5 py-1.5 text-xs text-gryt-text",
751
- I,
772
+ C,
752
773
  t
753
774
  ),
754
- children: s
775
+ children: i
755
776
  }
756
777
  ) }) })
757
778
  ] });
758
779
  }
759
- const ke = h.Provider, Ne = c(
760
- function({ className: t, orientation: e = "horizontal", ...r }, s) {
761
- return /* @__PURE__ */ a(
762
- tt,
780
+ const xo = R.Provider, ho = s(
781
+ function({ className: t, orientation: e = "horizontal", ...r }, i) {
782
+ return /* @__PURE__ */ o(
783
+ $t,
763
784
  {
764
- ref: s,
785
+ ref: i,
765
786
  orientation: e,
766
- className: o(
787
+ className: n(
767
788
  "gryt-divider bg-gryt-border",
768
789
  e === "vertical" ? "h-full w-px" : "h-px w-full",
769
790
  t
@@ -772,12 +793,12 @@ const ke = h.Provider, Ne = c(
772
793
  }
773
794
  );
774
795
  }
775
- ), Pe = c(function({ className: t, ...e }, r) {
776
- return /* @__PURE__ */ a(
796
+ ), wo = s(function({ className: t, ...e }, r) {
797
+ return /* @__PURE__ */ o(
777
798
  "div",
778
799
  {
779
800
  ref: r,
780
- className: o(
801
+ className: n(
781
802
  "gryt-card rounded-(--gryt-radius-xl) border border-gryt-border bg-gryt-surface text-gryt-text",
782
803
  t
783
804
  ),
@@ -785,149 +806,149 @@ const ke = h.Provider, Ne = c(
785
806
  }
786
807
  );
787
808
  });
788
- function Se({
789
- children: n,
809
+ function vo({
810
+ children: a,
790
811
  className: t,
791
812
  subheader: e,
792
813
  title: r,
793
- ...s
814
+ ...i
794
815
  }) {
795
- return /* @__PURE__ */ g(
816
+ return /* @__PURE__ */ d(
796
817
  "div",
797
818
  {
798
- className: o("gryt-card-header flex flex-col gap-1 p-4", t),
799
- ...s,
819
+ className: n("gryt-card-header flex flex-col gap-1 p-4", t),
820
+ ...i,
800
821
  children: [
801
- r ? /* @__PURE__ */ a("span", { className: "text-base font-semibold text-gryt-text", children: r }) : null,
802
- e ? /* @__PURE__ */ a("span", { className: "text-sm text-gryt-muted", children: e }) : null,
803
- n
822
+ r ? /* @__PURE__ */ o("span", { className: "text-base font-semibold text-gryt-text", children: r }) : null,
823
+ e ? /* @__PURE__ */ o("span", { className: "text-sm text-gryt-muted", children: e }) : null,
824
+ a
804
825
  ]
805
826
  }
806
827
  );
807
828
  }
808
- function Te({
809
- className: n,
829
+ function No({
830
+ className: a,
810
831
  ...t
811
832
  }) {
812
- return /* @__PURE__ */ a(
833
+ return /* @__PURE__ */ o(
813
834
  "div",
814
835
  {
815
- className: o(
836
+ className: n(
816
837
  "gryt-card-content px-4 pb-4 text-sm text-gryt-muted",
817
- n
838
+ a
818
839
  ),
819
840
  ...t
820
841
  }
821
842
  );
822
843
  }
823
- function Re({
824
- className: n,
844
+ function Po({
845
+ className: a,
825
846
  ...t
826
847
  }) {
827
- return /* @__PURE__ */ a(
848
+ return /* @__PURE__ */ o(
828
849
  "div",
829
850
  {
830
- className: o(
851
+ className: n(
831
852
  "gryt-card-actions flex items-center gap-2 px-4 pb-4",
832
- n
853
+ a
833
854
  ),
834
855
  ...t
835
856
  }
836
857
  );
837
858
  }
838
- const ft = {
859
+ const Qt = {
839
860
  info: "border-gryt-secondary/40 bg-gryt-secondary/10 text-gryt-secondary",
840
861
  success: "border-gryt-success/40 bg-gryt-success/10 text-gryt-success",
841
862
  warning: "border-gryt-warning/40 bg-gryt-warning/10 text-gryt-warning",
842
863
  error: "border-gryt-danger/40 bg-gryt-danger/10 text-gryt-danger"
843
- }, $e = c(function({ className: t, severity: e = "info", ...r }, s) {
844
- return /* @__PURE__ */ a(
864
+ }, ko = s(function({ className: t, severity: e = "info", ...r }, i) {
865
+ return /* @__PURE__ */ o(
845
866
  "div",
846
867
  {
847
- ref: s,
868
+ ref: i,
848
869
  role: "alert",
849
- className: o(
870
+ className: n(
850
871
  "gryt-alert rounded-(--gryt-radius-lg) border px-4 py-3 text-sm",
851
- ft[e],
872
+ Qt[e],
852
873
  t
853
874
  ),
854
875
  ...r
855
876
  }
856
877
  );
857
878
  });
858
- function Ce({ className: n, value: t = null, ...e }) {
859
- return /* @__PURE__ */ a(
860
- C.Root,
879
+ function To({ className: a, value: t = null, ...e }) {
880
+ return /* @__PURE__ */ o(
881
+ Y.Root,
861
882
  {
862
883
  value: t,
863
- className: o("gryt-progress w-full", n),
884
+ className: n("gryt-progress w-full", a),
864
885
  ...e,
865
- children: /* @__PURE__ */ a(C.Track, { className: "h-1.5 w-full overflow-hidden rounded-(--gryt-radius-full) bg-gryt-surface-raised", children: /* @__PURE__ */ a(C.Indicator, { className: "h-full rounded-(--gryt-radius-full) bg-gryt-accent transition-[width] duration-(--gryt-dur-spring-soft) ease-spring motion-reduce:transition-none" }) })
886
+ children: /* @__PURE__ */ o(Y.Track, { className: "h-1.5 w-full overflow-hidden rounded-(--gryt-radius-full) bg-gryt-surface-raised", children: /* @__PURE__ */ o(Y.Indicator, { className: "h-full rounded-(--gryt-radius-full) bg-gryt-accent transition-[width] duration-(--gryt-dur-spring-soft) ease-spring motion-reduce:transition-none" }) })
866
887
  }
867
888
  );
868
889
  }
869
- function Ie({
870
- className: n,
890
+ function $o({
891
+ className: a,
871
892
  size: t = 24,
872
893
  "aria-label": e = "Loading"
873
894
  }) {
874
- return /* @__PURE__ */ a(
875
- Y,
895
+ return /* @__PURE__ */ o(
896
+ vt,
876
897
  {
877
898
  role: "status",
878
899
  "aria-label": e,
879
900
  size: t,
880
901
  weight: "bold",
881
- className: o(
902
+ className: n(
882
903
  "gryt-spinner text-gryt-accent motion-safe:animate-spin",
883
- n
904
+ a
884
905
  )
885
906
  }
886
907
  );
887
908
  }
888
- const pt = {
909
+ const Wt = {
889
910
  text: "h-4 rounded-(--gryt-radius-sm)",
890
911
  rounded: "rounded-(--gryt-radius-lg)",
891
912
  circular: "rounded-(--gryt-radius-full)",
892
913
  rectangular: "rounded-none"
893
914
  };
894
- function De({
895
- className: n,
915
+ function Co({
916
+ className: a,
896
917
  height: t,
897
918
  style: e,
898
919
  variant: r = "text",
899
- width: s,
900
- ...i
920
+ width: i,
921
+ ...c
901
922
  }) {
902
- const d = {
903
- width: s,
923
+ const l = {
924
+ width: i,
904
925
  height: t,
905
926
  ...e
906
927
  };
907
- return /* @__PURE__ */ a(
928
+ return /* @__PURE__ */ o(
908
929
  "div",
909
930
  {
910
931
  "aria-hidden": "true",
911
- className: o(
932
+ className: n(
912
933
  "gryt-skeleton bg-gryt-surface-raised motion-safe:animate-pulse",
913
- pt[r],
914
- n
934
+ Wt[r],
935
+ a
915
936
  ),
916
- style: d,
917
- ...i
937
+ style: l,
938
+ ...c
918
939
  }
919
940
  );
920
941
  }
921
- const O = "transition-[opacity,scale,translate] duration-(--gryt-dur-spring) ease-spring motion-reduce:transition-none", ht = c(
942
+ const lt = "transition-[opacity,scale,translate] duration-(--gryt-dur-spring) ease-spring motion-reduce:transition-none", _t = s(
922
943
  function({ className: t, ...e }, r) {
923
- return /* @__PURE__ */ a(
924
- l.Backdrop,
944
+ return /* @__PURE__ */ o(
945
+ k.Backdrop,
925
946
  {
926
947
  ref: r,
927
- className: o(
948
+ className: n(
928
949
  "gryt-dialog-backdrop fixed inset-0 min-h-dvh bg-black/60",
929
950
  "backdrop-blur-(--gryt-backdrop-blur)",
930
- O,
951
+ lt,
931
952
  "data-starting-style:opacity-0 data-ending-style:opacity-0",
932
953
  t
933
954
  ),
@@ -935,17 +956,17 @@ const O = "transition-[opacity,scale,translate] duration-(--gryt-dur-spring) eas
935
956
  }
936
957
  );
937
958
  }
938
- ), xt = c(
959
+ ), Jt = s(
939
960
  function({ className: t, ...e }, r) {
940
- return /* @__PURE__ */ a(
941
- l.Popup,
961
+ return /* @__PURE__ */ o(
962
+ k.Popup,
942
963
  {
943
964
  ref: r,
944
- className: o(
965
+ className: n(
945
966
  "gryt-dialog fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2",
946
967
  "flex w-96 max-w-[calc(100vw-3rem)] flex-col gap-4",
947
968
  "rounded-(--gryt-radius-lg) border border-gryt-border bg-gryt-surface p-5 text-gryt-text",
948
- O,
969
+ lt,
949
970
  "data-starting-style:scale-[0.98] data-starting-style:opacity-0",
950
971
  "data-ending-style:scale-[0.98] data-ending-style:opacity-0",
951
972
  t
@@ -954,13 +975,13 @@ const O = "transition-[opacity,scale,translate] duration-(--gryt-dur-spring) eas
954
975
  }
955
976
  );
956
977
  }
957
- ), wt = c(
978
+ ), Kt = s(
958
979
  function({ className: t, ...e }, r) {
959
- return /* @__PURE__ */ a(
960
- l.Title,
980
+ return /* @__PURE__ */ o(
981
+ k.Title,
961
982
  {
962
983
  ref: r,
963
- className: o(
984
+ className: n(
964
985
  "gryt-dialog-title text-base font-semibold text-gryt-text",
965
986
  t
966
987
  ),
@@ -968,13 +989,13 @@ const O = "transition-[opacity,scale,translate] duration-(--gryt-dur-spring) eas
968
989
  }
969
990
  );
970
991
  }
971
- ), vt = c(
992
+ ), Zt = s(
972
993
  function({ className: t, ...e }, r) {
973
- return /* @__PURE__ */ a(
974
- l.Description,
994
+ return /* @__PURE__ */ o(
995
+ k.Description,
975
996
  {
976
997
  ref: r,
977
- className: o(
998
+ className: n(
978
999
  "gryt-dialog-description text-sm text-gryt-muted",
979
1000
  t
980
1001
  ),
@@ -982,13 +1003,13 @@ const O = "transition-[opacity,scale,translate] duration-(--gryt-dur-spring) eas
982
1003
  }
983
1004
  );
984
1005
  }
985
- ), kt = c(
1006
+ ), qt = s(
986
1007
  function({ className: t, ...e }, r) {
987
- return /* @__PURE__ */ a(
1008
+ return /* @__PURE__ */ o(
988
1009
  "div",
989
1010
  {
990
1011
  ref: r,
991
- className: o(
1012
+ className: n(
992
1013
  "gryt-dialog-footer flex justify-end gap-3",
993
1014
  t
994
1015
  ),
@@ -996,91 +1017,202 @@ const O = "transition-[opacity,scale,translate] duration-(--gryt-dur-spring) eas
996
1017
  }
997
1018
  );
998
1019
  }
999
- ), Be = {
1000
- Root: l.Root,
1001
- Trigger: l.Trigger,
1002
- Portal: l.Portal,
1003
- Close: l.Close,
1004
- Backdrop: ht,
1005
- Popup: xt,
1006
- Title: wt,
1007
- Description: vt,
1008
- Footer: kt
1009
- }, Nt = {
1010
- left: "inset-y-0 -left-(--gryt-drawer-bleed) h-full w-[calc(20rem+var(--gryt-drawer-bleed))] max-w-[calc(85vw+var(--gryt-drawer-bleed))] border-r py-5 pr-5 pl-[calc(1.25rem+var(--gryt-drawer-bleed))] data-starting-style:-translate-x-full data-ending-style:-translate-x-full",
1011
- right: "inset-y-0 -right-(--gryt-drawer-bleed) h-full w-[calc(20rem+var(--gryt-drawer-bleed))] max-w-[calc(85vw+var(--gryt-drawer-bleed))] border-l py-5 pl-5 pr-[calc(1.25rem+var(--gryt-drawer-bleed))] data-starting-style:translate-x-full data-ending-style:translate-x-full",
1012
- top: "inset-x-0 -top-(--gryt-drawer-bleed) h-auto max-h-[calc(85vh+var(--gryt-drawer-bleed))] w-full border-b px-5 pb-5 pt-[calc(1.25rem+var(--gryt-drawer-bleed))] data-starting-style:-translate-y-full data-ending-style:-translate-y-full",
1013
- bottom: "inset-x-0 -bottom-(--gryt-drawer-bleed) h-auto max-h-[calc(85vh+var(--gryt-drawer-bleed))] w-full border-t px-5 pt-5 pb-[calc(1.25rem+var(--gryt-drawer-bleed))] data-starting-style:translate-y-full data-ending-style:translate-y-full"
1014
- }, Pt = c(function({ className: t, side: e = "right", ...r }, s) {
1015
- return /* @__PURE__ */ a(
1016
- l.Popup,
1020
+ ), So = {
1021
+ Root: k.Root,
1022
+ Trigger: k.Trigger,
1023
+ Portal: k.Portal,
1024
+ Close: k.Close,
1025
+ Backdrop: _t,
1026
+ Popup: Jt,
1027
+ Title: Kt,
1028
+ Description: Zt,
1029
+ Footer: qt
1030
+ }, te = () => () => {
1031
+ };
1032
+ function ee(a) {
1033
+ const t = Q(
1034
+ (r) => {
1035
+ if (typeof window > "u" || !window.matchMedia) return te();
1036
+ const i = window.matchMedia(a);
1037
+ return i.addEventListener("change", r), () => i.removeEventListener("change", r);
1038
+ },
1039
+ [a]
1040
+ ), e = Q(() => typeof window > "u" || !window.matchMedia ? !1 : window.matchMedia(a).matches, [a]);
1041
+ return pt(t, e, () => !1);
1042
+ }
1043
+ const re = {
1044
+ left: "left",
1045
+ right: "right",
1046
+ top: "up",
1047
+ bottom: "down"
1048
+ }, H = bt("right"), oe = {
1049
+ left: "items-stretch justify-start",
1050
+ right: "items-stretch justify-end",
1051
+ top: "items-start justify-center",
1052
+ bottom: "items-end justify-center"
1053
+ }, ae = {
1054
+ left: "rounded-r-(--gryt-radius-xl)",
1055
+ right: "rounded-l-(--gryt-radius-xl)",
1056
+ top: "rounded-b-(--gryt-radius-xl)",
1057
+ bottom: "rounded-t-(--gryt-radius-xl)"
1058
+ }, ne = {
1059
+ left: [
1060
+ "h-full w-[calc(20rem+var(--gryt-drawer-bleed))] max-w-[calc(85vw+var(--gryt-drawer-bleed))]",
1061
+ "-ml-(--gryt-drawer-bleed) border-r py-5 pr-5 pl-[calc(1.25rem+var(--gryt-drawer-bleed))]",
1062
+ "[transform:translateX(var(--drawer-swipe-movement-x))]",
1063
+ "data-starting-style:[transform:translateX(calc(-100%+var(--gryt-drawer-bleed)))]",
1064
+ "data-ending-style:[transform:translateX(calc(-100%+var(--gryt-drawer-bleed)))]"
1065
+ ].join(" "),
1066
+ right: [
1067
+ "h-full w-[calc(20rem+var(--gryt-drawer-bleed))] max-w-[calc(85vw+var(--gryt-drawer-bleed))]",
1068
+ "-mr-(--gryt-drawer-bleed) border-l py-5 pl-5 pr-[calc(1.25rem+var(--gryt-drawer-bleed))]",
1069
+ "[transform:translateX(var(--drawer-swipe-movement-x))]",
1070
+ "data-starting-style:[transform:translateX(calc(100%-var(--gryt-drawer-bleed)))]",
1071
+ "data-ending-style:[transform:translateX(calc(100%-var(--gryt-drawer-bleed)))]"
1072
+ ].join(" "),
1073
+ top: [
1074
+ "w-full max-h-[calc(85vh+var(--gryt-drawer-bleed))]",
1075
+ "-mt-(--gryt-drawer-bleed) border-b px-5 pb-5 pt-[calc(1.25rem+var(--gryt-drawer-bleed))]",
1076
+ "[transform:translateY(var(--drawer-swipe-movement-y))]",
1077
+ "data-starting-style:[transform:translateY(calc(-100%+var(--gryt-drawer-bleed)))]",
1078
+ "data-ending-style:[transform:translateY(calc(-100%+var(--gryt-drawer-bleed)))]"
1079
+ ].join(" "),
1080
+ bottom: [
1081
+ "w-full max-h-[calc(85vh+var(--gryt-drawer-bleed))]",
1082
+ "-mb-(--gryt-drawer-bleed) border-t px-5 pt-5 pb-[calc(1.25rem+var(--gryt-drawer-bleed))]",
1083
+ "[transform:translateY(var(--drawer-swipe-movement-y))]",
1084
+ "data-starting-style:[transform:translateY(calc(100%-var(--gryt-drawer-bleed)))]",
1085
+ "data-ending-style:[transform:translateY(calc(100%-var(--gryt-drawer-bleed)))]"
1086
+ ].join(" ")
1087
+ };
1088
+ function se({
1089
+ side: a = "right",
1090
+ sheetOnMobile: t = !0,
1091
+ children: e,
1092
+ ...r
1093
+ }) {
1094
+ const i = ee("(max-width: 767px)"), c = t && i ? "bottom" : a;
1095
+ return /* @__PURE__ */ o(H.Provider, { value: c, children: /* @__PURE__ */ o(h.Root, { swipeDirection: re[c], ...r, children: e }) });
1096
+ }
1097
+ const ie = s(
1098
+ function({ className: t, ...e }, r) {
1099
+ const i = W(H);
1100
+ return /* @__PURE__ */ o(
1101
+ h.Viewport,
1102
+ {
1103
+ ref: r,
1104
+ className: n(
1105
+ // z-50 matters: the popup is no longer positioned itself, so the
1106
+ // viewport is what has to sit above the page. Without it a sticky
1107
+ // site header renders over the panel.
1108
+ "gryt-drawer-viewport fixed inset-0 z-50 flex",
1109
+ oe[i],
1110
+ t
1111
+ ),
1112
+ ...e
1113
+ }
1114
+ );
1115
+ }
1116
+ ), ce = s(function({ className: t, ...e }, r) {
1117
+ const i = W(H);
1118
+ return /* @__PURE__ */ o(
1119
+ h.Popup,
1017
1120
  {
1018
- ref: s,
1019
- className: o(
1020
- "gryt-drawer fixed z-50 flex flex-col gap-4 border-gryt-border bg-gryt-surface text-gryt-text",
1021
- "transition-transform duration-(--gryt-dur-spring-soft) ease-spring motion-reduce:transition-none",
1022
- Nt[e],
1121
+ ref: r,
1122
+ className: n(
1123
+ "gryt-drawer flex flex-col gap-4 border-gryt-border bg-gryt-surface text-gryt-text",
1124
+ "overflow-y-auto overscroll-contain outline-none",
1125
+ "transition-transform duration-(--gryt-dur-spring-soft) ease-spring",
1126
+ // While the finger is down the panel must track it exactly. Any
1127
+ // duration here turns a drag into a drag plus lag.
1128
+ "data-swiping:duration-0 data-swiping:select-none",
1129
+ "motion-reduce:transition-none",
1130
+ ne[i],
1131
+ ae[i],
1023
1132
  t
1024
1133
  ),
1025
- ...r
1134
+ ...e
1026
1135
  }
1027
1136
  );
1028
- }), St = c(function({ className: t, ...e }, r) {
1029
- return /* @__PURE__ */ a(
1030
- l.Backdrop,
1137
+ }), le = s(function({ className: t, ...e }, r) {
1138
+ return /* @__PURE__ */ o(
1139
+ h.Backdrop,
1031
1140
  {
1032
1141
  ref: r,
1033
- className: o(
1034
- "gryt-drawer-backdrop fixed inset-0 min-h-dvh bg-black/60",
1142
+ className: n(
1143
+ "gryt-drawer-backdrop fixed inset-0 z-50 min-h-dvh bg-black/60",
1035
1144
  "backdrop-blur-(--gryt-backdrop-blur)",
1036
- "transition-opacity duration-(--gryt-dur-spring-soft) ease-spring motion-reduce:transition-none",
1145
+ // Lightens as the panel is dragged away, so letting go halfway does not
1146
+ // leave a full-strength scrim over a half-gone sheet.
1147
+ "[opacity:calc(1-var(--drawer-swipe-progress,0))]",
1148
+ "transition-opacity duration-(--gryt-dur-spring-soft) ease-spring",
1149
+ "data-swiping:duration-0",
1037
1150
  "data-starting-style:opacity-0 data-ending-style:opacity-0",
1151
+ "motion-reduce:transition-none",
1038
1152
  t
1039
1153
  ),
1040
1154
  ...e
1041
1155
  }
1042
1156
  );
1043
- }), ze = {
1044
- Root: l.Root,
1045
- Trigger: l.Trigger,
1046
- Portal: l.Portal,
1047
- Close: l.Close,
1048
- Title: l.Title,
1049
- Description: l.Description,
1050
- Backdrop: St,
1051
- Popup: Pt
1052
- }, Tt = c(
1053
- function({ className: t, sideOffset: e = 8, ...r }, s) {
1054
- return /* @__PURE__ */ a(
1055
- x.Positioner,
1157
+ });
1158
+ function de({ className: a }) {
1159
+ const t = W(H);
1160
+ return t !== "bottom" && t !== "top" ? null : /* @__PURE__ */ o(
1161
+ "div",
1162
+ {
1163
+ "aria-hidden": !0,
1164
+ className: n(
1165
+ "gryt-drawer-grabber mx-auto h-1.5 w-10 shrink-0 rounded-(--gryt-radius-full) bg-gryt-border",
1166
+ t === "top" && "order-last",
1167
+ a
1168
+ )
1169
+ }
1170
+ );
1171
+ }
1172
+ const Ro = {
1173
+ Root: se,
1174
+ Trigger: h.Trigger,
1175
+ Portal: h.Portal,
1176
+ Backdrop: le,
1177
+ Viewport: ie,
1178
+ Popup: ce,
1179
+ Content: h.Content,
1180
+ Grabber: de,
1181
+ Close: h.Close,
1182
+ Title: h.Title,
1183
+ Description: h.Description
1184
+ }, ge = s(
1185
+ function({ className: t, sideOffset: e = 8, ...r }, i) {
1186
+ return /* @__PURE__ */ o(
1187
+ I.Positioner,
1056
1188
  {
1057
- ref: s,
1189
+ ref: i,
1058
1190
  sideOffset: e,
1059
- className: o("gryt-menu-positioner outline-none", t),
1191
+ className: n("gryt-menu-positioner outline-none", t),
1060
1192
  ...r
1061
1193
  }
1062
1194
  );
1063
1195
  }
1064
- ), Rt = c(function({ className: t, ...e }, r) {
1065
- return /* @__PURE__ */ a(
1066
- x.Popup,
1196
+ ), ue = s(function({ className: t, ...e }, r) {
1197
+ return /* @__PURE__ */ o(
1198
+ I.Popup,
1067
1199
  {
1068
1200
  ref: r,
1069
- className: o(
1201
+ className: n(
1070
1202
  "gryt-menu min-w-44 p-1 outline-none",
1071
- H,
1072
- I,
1203
+ $,
1204
+ C,
1073
1205
  t
1074
1206
  ),
1075
1207
  ...e
1076
1208
  }
1077
1209
  );
1078
- }), $t = c(function({ className: t, ...e }, r) {
1079
- return /* @__PURE__ */ a(
1080
- x.Item,
1210
+ }), ye = s(function({ className: t, ...e }, r) {
1211
+ return /* @__PURE__ */ o(
1212
+ I.Item,
1081
1213
  {
1082
1214
  ref: r,
1083
- className: o(
1215
+ className: n(
1084
1216
  "gryt-menu-item flex cursor-default items-center gap-2 rounded-(--gryt-radius-md)",
1085
1217
  "px-3 py-2 text-sm text-gryt-text outline-none select-none",
1086
1218
  // Base UI drives keyboard and pointer highlight through the same
@@ -1092,50 +1224,50 @@ const O = "transition-[opacity,scale,translate] duration-(--gryt-dur-spring) eas
1092
1224
  ...e
1093
1225
  }
1094
1226
  );
1095
- }), Ct = c(function({ className: t, ...e }, r) {
1096
- return /* @__PURE__ */ a(
1097
- x.Separator,
1227
+ }), me = s(function({ className: t, ...e }, r) {
1228
+ return /* @__PURE__ */ o(
1229
+ I.Separator,
1098
1230
  {
1099
1231
  ref: r,
1100
- className: o("gryt-menu-separator my-1 h-px bg-gryt-border", t),
1232
+ className: n("gryt-menu-separator my-1 h-px bg-gryt-border", t),
1101
1233
  ...e
1102
1234
  }
1103
1235
  );
1104
- }), je = {
1105
- Root: x.Root,
1106
- Trigger: x.Trigger,
1107
- Portal: x.Portal,
1108
- Positioner: Tt,
1109
- Popup: Rt,
1110
- Item: $t,
1111
- Separator: Ct
1112
- }, It = c(function({ className: t, ...e }, r) {
1113
- return /* @__PURE__ */ a(
1114
- P.Root,
1236
+ }), U = {
1237
+ Root: I.Root,
1238
+ Trigger: I.Trigger,
1239
+ Portal: I.Portal,
1240
+ Positioner: ge,
1241
+ Popup: ue,
1242
+ Item: ye,
1243
+ Separator: me
1244
+ }, pe = s(function({ className: t, ...e }, r) {
1245
+ return /* @__PURE__ */ o(
1246
+ V.Root,
1115
1247
  {
1116
1248
  ref: r,
1117
- className: o("gryt-tabs", t),
1249
+ className: n("gryt-tabs", t),
1118
1250
  ...e
1119
1251
  }
1120
1252
  );
1121
- }), Dt = c(function({ className: t, ...e }, r) {
1122
- return /* @__PURE__ */ a(
1123
- P.List,
1253
+ }), be = s(function({ className: t, ...e }, r) {
1254
+ return /* @__PURE__ */ o(
1255
+ V.List,
1124
1256
  {
1125
1257
  ref: r,
1126
- className: o(
1258
+ className: n(
1127
1259
  "gryt-tabs-list relative inline-flex items-center gap-1 rounded-(--gryt-radius-full) bg-gryt-surface-raised p-1",
1128
1260
  t
1129
1261
  ),
1130
1262
  ...e
1131
1263
  }
1132
1264
  );
1133
- }), Bt = c(function({ className: t, ...e }, r) {
1134
- return /* @__PURE__ */ a(
1135
- P.Tab,
1265
+ }), fe = s(function({ className: t, ...e }, r) {
1266
+ return /* @__PURE__ */ o(
1267
+ V.Tab,
1136
1268
  {
1137
1269
  ref: r,
1138
- className: o(
1270
+ className: n(
1139
1271
  "gryt-tab inline-flex min-h-8 items-center justify-center whitespace-nowrap",
1140
1272
  "rounded-(--gryt-radius-full) border-0 bg-transparent px-4 py-1.5",
1141
1273
  "text-sm font-medium text-gryt-muted select-none",
@@ -1144,20 +1276,20 @@ const O = "transition-[opacity,scale,translate] duration-(--gryt-dur-spring) eas
1144
1276
  // The fill moved to Indicator so it can travel between tabs; the tab
1145
1277
  // itself only changes its text colour.
1146
1278
  "data-active:text-gryt-on-accent",
1147
- f,
1279
+ y,
1148
1280
  t
1149
1281
  ),
1150
1282
  ...e
1151
1283
  }
1152
1284
  );
1153
- }), zt = c(
1285
+ }), xe = s(
1154
1286
  function({ className: t, ...e }, r) {
1155
- return /* @__PURE__ */ a(
1156
- P.Indicator,
1287
+ return /* @__PURE__ */ o(
1288
+ V.Indicator,
1157
1289
  {
1158
1290
  ref: r,
1159
1291
  renderBeforeHydration: !0,
1160
- className: o(
1292
+ className: n(
1161
1293
  "gryt-tabs-indicator absolute top-1 left-0 z-0 h-[calc(100%-0.5rem)]",
1162
1294
  "w-(--active-tab-width) translate-x-(--active-tab-left)",
1163
1295
  "rounded-(--gryt-radius-full) bg-gryt-accent",
@@ -1169,57 +1301,57 @@ const O = "transition-[opacity,scale,translate] duration-(--gryt-dur-spring) eas
1169
1301
  }
1170
1302
  );
1171
1303
  }
1172
- ), jt = c(function({ className: t, ...e }, r) {
1173
- return /* @__PURE__ */ a(
1174
- P.Panel,
1304
+ ), he = s(function({ className: t, ...e }, r) {
1305
+ return /* @__PURE__ */ o(
1306
+ V.Panel,
1175
1307
  {
1176
1308
  ref: r,
1177
- className: o("gryt-tabs-panel pt-3 text-sm text-gryt-text", t),
1309
+ className: n("gryt-tabs-panel pt-3 text-sm text-gryt-text", t),
1178
1310
  ...e
1179
1311
  }
1180
1312
  );
1181
- }), Ae = Object.assign(It, { List: Dt, Tab: Bt, Panel: jt, Indicator: zt }), At = c(function({ className: t, ...e }, r) {
1182
- return /* @__PURE__ */ a(
1183
- N.Root,
1313
+ }), Io = Object.assign(pe, { List: be, Tab: fe, Panel: he, Indicator: xe }), we = s(function({ className: t, ...e }, r) {
1314
+ return /* @__PURE__ */ o(
1315
+ F.Root,
1184
1316
  {
1185
1317
  ref: r,
1186
- className: o(
1318
+ className: n(
1187
1319
  "gryt-accordion flex w-full flex-col gap-2 rounded-(--gryt-radius-xl) border border-gryt-border bg-gryt-surface p-2",
1188
1320
  t
1189
1321
  ),
1190
1322
  ...e
1191
1323
  }
1192
1324
  );
1193
- }), Lt = c(
1325
+ }), ve = s(
1194
1326
  function({ className: t, ...e }, r) {
1195
- return /* @__PURE__ */ a(
1196
- N.Item,
1327
+ return /* @__PURE__ */ o(
1328
+ F.Item,
1197
1329
  {
1198
1330
  ref: r,
1199
- className: o("gryt-accordion-item", t),
1331
+ className: n("gryt-accordion-item", t),
1200
1332
  ...e
1201
1333
  }
1202
1334
  );
1203
1335
  }
1204
- ), Mt = c(
1205
- function({ children: t, className: e, expandIcon: r, ...s }, i) {
1206
- return /* @__PURE__ */ a(N.Header, { className: "gryt-accordion-header m-0", children: /* @__PURE__ */ g(
1207
- N.Trigger,
1336
+ ), Ne = s(
1337
+ function({ children: t, className: e, expandIcon: r, ...i }, c) {
1338
+ return /* @__PURE__ */ o(F.Header, { className: "gryt-accordion-header m-0", children: /* @__PURE__ */ d(
1339
+ F.Trigger,
1208
1340
  {
1209
- ref: i,
1210
- className: o(
1341
+ ref: c,
1342
+ className: n(
1211
1343
  "gryt-accordion-trigger flex w-full items-center justify-between gap-3",
1212
1344
  "rounded-(--gryt-radius-lg) border-0 bg-transparent px-3 py-2.5",
1213
1345
  "text-left text-sm font-medium text-gryt-text select-none",
1214
1346
  "transition-colors duration-150 hover:bg-gryt-surface-raised",
1215
- f,
1347
+ y,
1216
1348
  e
1217
1349
  ),
1218
- ...s,
1350
+ ...i,
1219
1351
  children: [
1220
1352
  t,
1221
- r === void 0 ? /* @__PURE__ */ a(
1222
- Z,
1353
+ r === void 0 ? /* @__PURE__ */ o(
1354
+ Nt,
1223
1355
  {
1224
1356
  size: 16,
1225
1357
  className: "shrink-0 transition-transform duration-(--gryt-dur-spring) ease-spring data-panel-open:rotate-180 motion-reduce:transition-none"
@@ -1229,13 +1361,13 @@ const O = "transition-[opacity,scale,translate] duration-(--gryt-dur-spring) eas
1229
1361
  }
1230
1362
  ) });
1231
1363
  }
1232
- ), Ft = c(
1233
- function({ children: t, className: e, ...r }, s) {
1234
- return /* @__PURE__ */ a(
1235
- N.Panel,
1364
+ ), Pe = s(
1365
+ function({ children: t, className: e, ...r }, i) {
1366
+ return /* @__PURE__ */ o(
1367
+ F.Panel,
1236
1368
  {
1237
- ref: s,
1238
- className: o(
1369
+ ref: i,
1370
+ className: n(
1239
1371
  "gryt-accordion-panel overflow-hidden text-sm text-gryt-muted",
1240
1372
  // Base UI measures the panel and exposes the height as a variable,
1241
1373
  // which is what makes a real open and close transition possible.
@@ -1245,48 +1377,959 @@ const O = "transition-[opacity,scale,translate] duration-(--gryt-dur-spring) eas
1245
1377
  e
1246
1378
  ),
1247
1379
  ...r,
1248
- children: /* @__PURE__ */ a("div", { className: "px-3 pt-1 pb-3", children: t })
1380
+ children: /* @__PURE__ */ o("div", { className: "px-3 pt-1 pb-3", children: t })
1381
+ }
1382
+ );
1383
+ }
1384
+ ), Ao = Object.assign(we, { Item: ve, Trigger: Ne, Panel: Pe }), ke = s(
1385
+ function({ className: t, sideOffset: e = 2, ...r }, i) {
1386
+ return /* @__PURE__ */ o(
1387
+ P.Positioner,
1388
+ {
1389
+ ref: i,
1390
+ sideOffset: e,
1391
+ className: n("gryt-context-menu-positioner outline-none", t),
1392
+ ...r
1393
+ }
1394
+ );
1395
+ }
1396
+ ), Do = {
1397
+ Root: P.Root,
1398
+ Trigger: P.Trigger,
1399
+ Portal: P.Portal,
1400
+ Positioner: ke,
1401
+ Popup: U.Popup,
1402
+ Item: U.Item,
1403
+ Separator: U.Separator,
1404
+ Group: P.Group,
1405
+ GroupLabel: P.GroupLabel,
1406
+ SubmenuRoot: P.SubmenuRoot,
1407
+ SubmenuTrigger: P.SubmenuTrigger
1408
+ }, Te = s(
1409
+ function({ className: t, sideOffset: e = 8, ...r }, i) {
1410
+ return /* @__PURE__ */ o(
1411
+ w.Positioner,
1412
+ {
1413
+ ref: i,
1414
+ sideOffset: e,
1415
+ className: n("gryt-popover-positioner outline-none", t),
1416
+ ...r
1417
+ }
1418
+ );
1419
+ }
1420
+ ), $e = s(
1421
+ function({ className: t, ...e }, r) {
1422
+ return /* @__PURE__ */ o(
1423
+ w.Popup,
1424
+ {
1425
+ ref: r,
1426
+ className: n(
1427
+ "gryt-popover max-w-[min(20rem,calc(100vw-2rem))] p-4 outline-none",
1428
+ $,
1429
+ C,
1430
+ t
1431
+ ),
1432
+ ...e
1433
+ }
1434
+ );
1435
+ }
1436
+ ), Ce = s(function({ className: t, ...e }, r) {
1437
+ return /* @__PURE__ */ o(
1438
+ w.Title,
1439
+ {
1440
+ ref: r,
1441
+ className: n(
1442
+ "gryt-popover-title text-sm font-semibold text-gryt-text",
1443
+ t
1444
+ ),
1445
+ ...e
1446
+ }
1447
+ );
1448
+ }), Se = s(function({ className: t, ...e }, r) {
1449
+ return /* @__PURE__ */ o(
1450
+ w.Description,
1451
+ {
1452
+ ref: r,
1453
+ className: n(
1454
+ "gryt-popover-description mt-1 text-sm leading-6 text-gryt-muted",
1455
+ t
1456
+ ),
1457
+ ...e
1458
+ }
1459
+ );
1460
+ }), Mo = {
1461
+ Root: w.Root,
1462
+ Trigger: w.Trigger,
1463
+ Portal: w.Portal,
1464
+ Positioner: Te,
1465
+ Popup: $e,
1466
+ Title: Ce,
1467
+ Description: Se,
1468
+ Close: w.Close,
1469
+ Arrow: w.Arrow
1470
+ }, Re = s(
1471
+ function({ className: t, ...e }, r) {
1472
+ return /* @__PURE__ */ o(
1473
+ v.Viewport,
1474
+ {
1475
+ ref: r,
1476
+ className: n(
1477
+ "gryt-toast-viewport fixed right-4 bottom-4 z-50 flex w-[min(22rem,calc(100vw-2rem))]",
1478
+ "flex-col gap-2 outline-none",
1479
+ t
1480
+ ),
1481
+ ...e
1482
+ }
1483
+ );
1484
+ }
1485
+ ), Ie = s(function({ className: t, ...e }, r) {
1486
+ return /* @__PURE__ */ o(
1487
+ v.Root,
1488
+ {
1489
+ ref: r,
1490
+ className: n(
1491
+ "gryt-toast relative flex flex-col p-3 pr-9",
1492
+ $,
1493
+ // Swiping is a pointer gesture, so the toast follows the finger
1494
+ // through Base UI's swipe variables before it animates out.
1495
+ "transition-[opacity,transform] duration-(--gryt-dur-spring) ease-spring",
1496
+ "data-starting-style:translate-y-2 data-starting-style:opacity-0",
1497
+ "data-ending-style:translate-y-2 data-ending-style:opacity-0",
1498
+ "motion-reduce:transition-none",
1499
+ t
1500
+ ),
1501
+ ...e
1502
+ }
1503
+ );
1504
+ }), Ae = s(function({ className: t, ...e }, r) {
1505
+ return /* @__PURE__ */ o(
1506
+ v.Title,
1507
+ {
1508
+ ref: r,
1509
+ className: n(
1510
+ "gryt-toast-title text-sm font-semibold text-gryt-text",
1511
+ t
1512
+ ),
1513
+ ...e
1514
+ }
1515
+ );
1516
+ }), De = s(function({ className: t, ...e }, r) {
1517
+ return /* @__PURE__ */ o(
1518
+ v.Description,
1519
+ {
1520
+ ref: r,
1521
+ className: n(
1522
+ "gryt-toast-description mt-0.5 text-sm leading-6 text-gryt-muted",
1523
+ t
1524
+ ),
1525
+ ...e
1526
+ }
1527
+ );
1528
+ }), Me = s(function({ className: t, children: e, ...r }, i) {
1529
+ return /* @__PURE__ */ o(
1530
+ v.Close,
1531
+ {
1532
+ ref: i,
1533
+ "aria-label": "Close",
1534
+ className: n(
1535
+ "gryt-toast-close absolute top-2.5 right-2.5 inline-flex h-6 w-6 items-center justify-center",
1536
+ "rounded-(--gryt-radius-full) border-0 bg-transparent text-gryt-muted",
1537
+ "transition-colors hover:bg-white/8 hover:text-gryt-text motion-reduce:transition-none",
1538
+ "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gryt-accent-light",
1539
+ t
1540
+ ),
1541
+ ...r,
1542
+ children: e ?? /* @__PURE__ */ o(nt, { size: 14, weight: "bold" })
1543
+ }
1544
+ );
1545
+ }), Le = s(function({ className: t, ...e }, r) {
1546
+ return /* @__PURE__ */ o(
1547
+ v.Action,
1548
+ {
1549
+ ref: r,
1550
+ className: n(
1551
+ "gryt-toast-action mt-2 self-start rounded-(--gryt-radius-full) border-0",
1552
+ "bg-gryt-accent px-3 py-1.5 text-sm font-medium text-gryt-on-accent",
1553
+ "transition-[scale] duration-(--gryt-dur-spring) ease-spring",
1554
+ "motion-safe:hover:scale-[1.04] motion-safe:active:scale-[0.96]",
1555
+ "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gryt-accent-light",
1556
+ t
1557
+ ),
1558
+ ...e
1559
+ }
1560
+ );
1561
+ }), Lo = {
1562
+ Provider: v.Provider,
1563
+ Portal: v.Portal,
1564
+ Viewport: Re,
1565
+ Root: Ie,
1566
+ Title: Ae,
1567
+ Description: De,
1568
+ Close: Me,
1569
+ Action: Le
1570
+ }, jo = v.useToastManager, je = s(
1571
+ function({ className: t, ...e }, r) {
1572
+ return /* @__PURE__ */ o(
1573
+ L.Root,
1574
+ {
1575
+ ref: r,
1576
+ className: n("gryt-scroll-area relative", t),
1577
+ ...e
1578
+ }
1579
+ );
1580
+ }
1581
+ ), Ge = s(
1582
+ function({ className: t, ...e }, r) {
1583
+ return /* @__PURE__ */ o(
1584
+ L.Viewport,
1585
+ {
1586
+ ref: r,
1587
+ className: n(
1588
+ "gryt-scroll-area-viewport h-full w-full overscroll-contain",
1589
+ "focus-visible:outline-2 focus-visible:-outline-offset-1 focus-visible:outline-gryt-accent-light",
1590
+ t
1591
+ ),
1592
+ ...e
1593
+ }
1594
+ );
1595
+ }
1596
+ ), Be = s(
1597
+ function({ className: t, orientation: e, ...r }, i) {
1598
+ return /* @__PURE__ */ o(
1599
+ L.Scrollbar,
1600
+ {
1601
+ ref: i,
1602
+ orientation: e,
1603
+ className: n(
1604
+ "gryt-scroll-area-scrollbar flex touch-none p-0.5 select-none",
1605
+ // Fades in on hover or while scrolling rather than sitting there
1606
+ // permanently — a chat sidebar is mostly not being scrolled.
1607
+ "opacity-0 transition-opacity duration-(--gryt-dur-fast)",
1608
+ "data-hovering:opacity-100 data-scrolling:opacity-100",
1609
+ "motion-reduce:transition-none",
1610
+ e === "horizontal" ? "h-2 flex-col" : "w-2",
1611
+ t
1612
+ ),
1613
+ ...r,
1614
+ 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" })
1249
1615
  }
1250
1616
  );
1251
1617
  }
1252
- ), Le = Object.assign(At, { Item: Lt, Trigger: Mt, Panel: Ft });
1618
+ ), Go = {
1619
+ Root: je,
1620
+ Viewport: Ge,
1621
+ Scrollbar: Be,
1622
+ Content: L.Content,
1623
+ Corner: L.Corner
1624
+ }, ze = {
1625
+ primary: [
1626
+ "text-gryt-muted hover:not-data-disabled:bg-white/8",
1627
+ "data-pressed:bg-gryt-accent data-pressed:text-gryt-on-accent",
1628
+ "data-pressed:hover:not-data-disabled:bg-gryt-accent"
1629
+ ].join(" "),
1630
+ secondary: [
1631
+ "text-gryt-muted hover:not-data-disabled:bg-white/8",
1632
+ "data-pressed:bg-gryt-secondary data-pressed:text-gryt-on-secondary",
1633
+ "data-pressed:hover:not-data-disabled:bg-gryt-secondary"
1634
+ ].join(" "),
1635
+ neutral: [
1636
+ "text-gryt-muted hover:not-data-disabled:bg-white/8",
1637
+ "data-pressed:bg-gryt-surface-hover data-pressed:text-gryt-text"
1638
+ ].join(" "),
1639
+ // For destructive-while-active controls: mic muted, camera off.
1640
+ danger: [
1641
+ "text-gryt-muted hover:not-data-disabled:bg-white/8",
1642
+ "data-pressed:bg-gryt-danger data-pressed:text-gryt-on-danger",
1643
+ "data-pressed:hover:not-data-disabled:bg-gryt-danger"
1644
+ ].join(" ")
1645
+ }, Fe = {
1646
+ xsmall: "h-8 min-w-8 px-2 text-xs",
1647
+ small: "h-9 min-w-9 px-2.5 text-sm",
1648
+ medium: "h-10 min-w-10 px-3 text-sm",
1649
+ large: "h-12 min-w-12 px-4 text-base"
1650
+ }, Bo = s(
1651
+ function({ className: t, size: e = "medium", tone: r = "primary", ...i }, c) {
1652
+ return /* @__PURE__ */ o(
1653
+ Ct,
1654
+ {
1655
+ ref: c,
1656
+ className: n(
1657
+ "gryt-toggle",
1658
+ "inline-flex shrink-0 items-center justify-center gap-2 border-0 bg-transparent",
1659
+ "rounded-(--gryt-radius-full) font-medium select-none",
1660
+ // scale rather than transform — see the note in Button.
1661
+ "transition-[scale,background-color,color] duration-(--gryt-dur-spring) ease-spring",
1662
+ "motion-safe:hover:not-data-disabled:scale-[1.06]",
1663
+ "motion-safe:active:not-data-disabled:scale-[0.94]",
1664
+ y,
1665
+ j,
1666
+ Fe[e],
1667
+ ze[r],
1668
+ t
1669
+ ),
1670
+ ...i
1671
+ }
1672
+ );
1673
+ }
1674
+ ), zo = s(
1675
+ function({ className: t, ...e }, r) {
1676
+ return /* @__PURE__ */ o(
1677
+ St,
1678
+ {
1679
+ ref: r,
1680
+ className: n(
1681
+ "gryt-toggle-group inline-flex items-center gap-1",
1682
+ "rounded-(--gryt-radius-full) border border-gryt-border bg-gryt-surface p-1",
1683
+ t
1684
+ ),
1685
+ ...e
1686
+ }
1687
+ );
1688
+ }
1689
+ ), Ve = {
1690
+ primary: "bg-gryt-accent",
1691
+ success: "bg-gryt-success",
1692
+ warning: "bg-gryt-warning",
1693
+ danger: "bg-gryt-danger"
1694
+ };
1695
+ function Fo({
1696
+ className: a,
1697
+ value: t,
1698
+ label: e,
1699
+ showValue: r = !1,
1700
+ tone: i = "primary",
1701
+ ...c
1702
+ }) {
1703
+ return /* @__PURE__ */ d(
1704
+ z.Root,
1705
+ {
1706
+ value: t,
1707
+ className: n("gryt-meter flex w-full flex-col gap-1.5", a),
1708
+ ...c,
1709
+ children: [
1710
+ (e || r) && /* @__PURE__ */ d("div", { className: "flex items-baseline justify-between gap-2", children: [
1711
+ e ? /* @__PURE__ */ o(z.Label, { className: "text-sm text-gryt-muted", children: e }) : /* @__PURE__ */ o("span", {}),
1712
+ r && /* @__PURE__ */ o(z.Value, { className: "font-mono text-xs text-gryt-muted tabular-nums" })
1713
+ ] }),
1714
+ /* @__PURE__ */ o(z.Track, { className: "h-1.5 w-full overflow-hidden rounded-(--gryt-radius-full) bg-gryt-surface-raised", children: /* @__PURE__ */ o(
1715
+ z.Indicator,
1716
+ {
1717
+ className: n(
1718
+ "h-full rounded-(--gryt-radius-full)",
1719
+ Ve[i]
1720
+ )
1721
+ }
1722
+ ) })
1723
+ ]
1724
+ }
1725
+ );
1726
+ }
1727
+ const Ee = s(
1728
+ function({ className: t, ...e }, r) {
1729
+ return /* @__PURE__ */ o(
1730
+ T.Popup,
1731
+ {
1732
+ ref: r,
1733
+ className: n(
1734
+ "gryt-alert-dialog fixed top-1/2 left-1/2 z-50 -translate-x-1/2 -translate-y-1/2",
1735
+ "flex w-96 max-w-[calc(100vw-3rem)] flex-col gap-4",
1736
+ "rounded-(--gryt-radius-lg) border border-gryt-border bg-gryt-surface p-5 text-gryt-text",
1737
+ "outline-none",
1738
+ "transition-[opacity,scale] duration-(--gryt-dur-spring) ease-spring motion-reduce:transition-none",
1739
+ "data-starting-style:scale-[0.98] data-starting-style:opacity-0",
1740
+ "data-ending-style:scale-[0.98] data-ending-style:opacity-0",
1741
+ t
1742
+ ),
1743
+ ...e
1744
+ }
1745
+ );
1746
+ }
1747
+ ), He = s(function({ className: t, ...e }, r) {
1748
+ return /* @__PURE__ */ o(
1749
+ T.Backdrop,
1750
+ {
1751
+ ref: r,
1752
+ className: n(
1753
+ "gryt-alert-dialog-backdrop fixed inset-0 z-50 min-h-dvh bg-black/60",
1754
+ "backdrop-blur-(--gryt-backdrop-blur)",
1755
+ "transition-opacity duration-(--gryt-dur-spring) ease-spring motion-reduce:transition-none",
1756
+ "data-starting-style:opacity-0 data-ending-style:opacity-0",
1757
+ t
1758
+ ),
1759
+ ...e
1760
+ }
1761
+ );
1762
+ }), Oe = s(function({ className: t, ...e }, r) {
1763
+ return /* @__PURE__ */ o(
1764
+ T.Title,
1765
+ {
1766
+ ref: r,
1767
+ className: n(
1768
+ "gryt-alert-dialog-title text-lg font-semibold text-gryt-text",
1769
+ t
1770
+ ),
1771
+ ...e
1772
+ }
1773
+ );
1774
+ }), Xe = s(function({ className: t, ...e }, r) {
1775
+ return /* @__PURE__ */ o(
1776
+ T.Description,
1777
+ {
1778
+ ref: r,
1779
+ className: n(
1780
+ "gryt-alert-dialog-description text-sm leading-6 text-gryt-muted",
1781
+ t
1782
+ ),
1783
+ ...e
1784
+ }
1785
+ );
1786
+ }), Vo = {
1787
+ Root: T.Root,
1788
+ Trigger: T.Trigger,
1789
+ Portal: T.Portal,
1790
+ Backdrop: He,
1791
+ Popup: Ee,
1792
+ Title: Oe,
1793
+ Description: Xe,
1794
+ Close: T.Close
1795
+ }, dt = [
1796
+ "flex cursor-default items-center gap-2 rounded-(--gryt-radius-md)",
1797
+ "px-3 py-2 text-sm text-gryt-text outline-none select-none",
1798
+ // Base UI drives keyboard and pointer highlight through one attribute, so
1799
+ // arrow keys and the mouse land on identical styling.
1800
+ "data-highlighted:bg-gryt-surface-raised",
1801
+ "data-selected:text-gryt-accent",
1802
+ "data-disabled:cursor-not-allowed data-disabled:opacity-50"
1803
+ ].join(" "), gt = [
1804
+ "w-full rounded-(--gryt-radius-input) border border-gryt-border bg-gryt-surface-raised",
1805
+ "px-3 py-2 text-sm text-gryt-text outline-none placeholder:text-gryt-muted",
1806
+ y
1807
+ ].join(" "), Ye = s(function({ className: t, ...e }, r) {
1808
+ return /* @__PURE__ */ o(
1809
+ g.Input,
1810
+ {
1811
+ ref: r,
1812
+ className: n("gryt-combobox-input", gt, t),
1813
+ ...e
1814
+ }
1815
+ );
1816
+ }), Ue = s(function({ className: t, sideOffset: e = 6, ...r }, i) {
1817
+ return /* @__PURE__ */ o(
1818
+ g.Positioner,
1819
+ {
1820
+ ref: i,
1821
+ sideOffset: e,
1822
+ className: n("gryt-combobox-positioner outline-none", t),
1823
+ ...r
1824
+ }
1825
+ );
1826
+ }), Qe = s(
1827
+ function({ className: t, ...e }, r) {
1828
+ return /* @__PURE__ */ o(
1829
+ g.Popup,
1830
+ {
1831
+ ref: r,
1832
+ className: n(
1833
+ "gryt-combobox max-h-64 w-(--anchor-width) overflow-y-auto overscroll-contain p-1 outline-none",
1834
+ $,
1835
+ C,
1836
+ t
1837
+ ),
1838
+ ...e
1839
+ }
1840
+ );
1841
+ }
1842
+ ), We = s(function({ className: t, ...e }, r) {
1843
+ return /* @__PURE__ */ o(
1844
+ g.Item,
1845
+ {
1846
+ ref: r,
1847
+ className: n("gryt-combobox-item", dt, t),
1848
+ ...e
1849
+ }
1850
+ );
1851
+ }), _e = s(function({ className: t, ...e }, r) {
1852
+ return /* @__PURE__ */ o(
1853
+ g.Empty,
1854
+ {
1855
+ ref: r,
1856
+ className: n(
1857
+ "gryt-combobox-empty px-3 py-2 text-sm text-gryt-muted",
1858
+ t
1859
+ ),
1860
+ ...e
1861
+ }
1862
+ );
1863
+ }), Eo = {
1864
+ Root: g.Root,
1865
+ Input: Ye,
1866
+ InputGroup: g.InputGroup,
1867
+ Trigger: g.Trigger,
1868
+ Icon: g.Icon,
1869
+ Clear: g.Clear,
1870
+ Value: g.Value,
1871
+ Chips: g.Chips,
1872
+ Chip: g.Chip,
1873
+ ChipRemove: g.ChipRemove,
1874
+ Portal: g.Portal,
1875
+ Positioner: Ue,
1876
+ Popup: Qe,
1877
+ List: g.List,
1878
+ Item: We,
1879
+ ItemIndicator: g.ItemIndicator,
1880
+ Group: g.Group,
1881
+ GroupLabel: g.GroupLabel,
1882
+ Empty: _e,
1883
+ Separator: g.Separator
1884
+ }, Je = s(function({ className: t, ...e }, r) {
1885
+ return /* @__PURE__ */ o(
1886
+ u.Input,
1887
+ {
1888
+ ref: r,
1889
+ className: n("gryt-autocomplete-input", gt, t),
1890
+ ...e
1891
+ }
1892
+ );
1893
+ }), Ke = s(function({ className: t, sideOffset: e = 6, ...r }, i) {
1894
+ return /* @__PURE__ */ o(
1895
+ u.Positioner,
1896
+ {
1897
+ ref: i,
1898
+ sideOffset: e,
1899
+ className: n("gryt-autocomplete-positioner outline-none", t),
1900
+ ...r
1901
+ }
1902
+ );
1903
+ }), Ze = s(function({ className: t, ...e }, r) {
1904
+ return /* @__PURE__ */ o(
1905
+ u.Popup,
1906
+ {
1907
+ ref: r,
1908
+ className: n(
1909
+ "gryt-autocomplete max-h-64 w-(--anchor-width) overflow-y-auto overscroll-contain p-1 outline-none",
1910
+ $,
1911
+ C,
1912
+ t
1913
+ ),
1914
+ ...e
1915
+ }
1916
+ );
1917
+ }), qe = s(function({ className: t, ...e }, r) {
1918
+ return /* @__PURE__ */ o(
1919
+ u.Item,
1920
+ {
1921
+ ref: r,
1922
+ className: n("gryt-autocomplete-item", dt, t),
1923
+ ...e
1924
+ }
1925
+ );
1926
+ }), tr = s(function({ className: t, ...e }, r) {
1927
+ return /* @__PURE__ */ o(
1928
+ u.Empty,
1929
+ {
1930
+ ref: r,
1931
+ className: n(
1932
+ "gryt-autocomplete-empty px-3 py-2 text-sm text-gryt-muted",
1933
+ t
1934
+ ),
1935
+ ...e
1936
+ }
1937
+ );
1938
+ }), Ho = {
1939
+ Root: u.Root,
1940
+ Input: Je,
1941
+ InputGroup: u.InputGroup,
1942
+ Trigger: u.Trigger,
1943
+ Icon: u.Icon,
1944
+ Clear: u.Clear,
1945
+ Value: u.Value,
1946
+ Portal: u.Portal,
1947
+ Positioner: Ke,
1948
+ Popup: Ze,
1949
+ List: u.List,
1950
+ Item: qe,
1951
+ Group: u.Group,
1952
+ GroupLabel: u.GroupLabel,
1953
+ Empty: tr,
1954
+ Separator: u.Separator
1955
+ }, Oo = s(
1956
+ function({ className: t, ...e }, r) {
1957
+ return /* @__PURE__ */ o(
1958
+ Rt,
1959
+ {
1960
+ ref: r,
1961
+ className: n("gryt-checkbox-group flex flex-col gap-2", t),
1962
+ ...e
1963
+ }
1964
+ );
1965
+ }
1966
+ ), er = s(
1967
+ function({ className: t, ...e }, r) {
1968
+ return /* @__PURE__ */ o(
1969
+ _.Trigger,
1970
+ {
1971
+ ref: r,
1972
+ className: n(
1973
+ "gryt-collapsible-trigger flex w-full items-center justify-between gap-2",
1974
+ "rounded-(--gryt-radius-md) border-0 bg-transparent px-2 py-2 text-left",
1975
+ "text-sm font-medium text-gryt-text select-none",
1976
+ "transition-colors hover:bg-gryt-surface-raised motion-reduce:transition-none",
1977
+ y,
1978
+ t
1979
+ ),
1980
+ ...e
1981
+ }
1982
+ );
1983
+ }
1984
+ ), rr = s(
1985
+ function({ className: t, ...e }, r) {
1986
+ return /* @__PURE__ */ o(
1987
+ _.Panel,
1988
+ {
1989
+ ref: r,
1990
+ className: n(
1991
+ "gryt-collapsible-panel overflow-hidden",
1992
+ // Base UI measures the panel and exposes the height as a variable, so
1993
+ // this animates to the content's real height rather than to a guess.
1994
+ "h-(--collapsible-panel-height) transition-[height] duration-(--gryt-dur-spring) ease-spring",
1995
+ "data-starting-style:h-0 data-ending-style:h-0",
1996
+ "motion-reduce:transition-none",
1997
+ t
1998
+ ),
1999
+ ...e
2000
+ }
2001
+ );
2002
+ }
2003
+ ), Xo = {
2004
+ Root: _.Root,
2005
+ Trigger: er,
2006
+ Panel: rr
2007
+ }, Yo = s(function({ className: t, ...e }, r) {
2008
+ return /* @__PURE__ */ o(
2009
+ It,
2010
+ {
2011
+ ref: r,
2012
+ className: n("gryt-form flex flex-col gap-(--gryt-space-lg)", t),
2013
+ ...e
2014
+ }
2015
+ );
2016
+ }), or = s(
2017
+ function({ className: t, ...e }, r) {
2018
+ return /* @__PURE__ */ o(
2019
+ it.Root,
2020
+ {
2021
+ ref: r,
2022
+ className: n(
2023
+ "gryt-fieldset flex min-w-0 flex-col gap-3 border-0 p-0",
2024
+ t
2025
+ ),
2026
+ ...e
2027
+ }
2028
+ );
2029
+ }
2030
+ ), ar = s(function({ className: t, ...e }, r) {
2031
+ return /* @__PURE__ */ o(
2032
+ it.Legend,
2033
+ {
2034
+ ref: r,
2035
+ className: n(
2036
+ "gryt-fieldset-legend text-sm font-semibold text-gryt-text",
2037
+ t
2038
+ ),
2039
+ ...e
2040
+ }
2041
+ );
2042
+ }), Uo = { Root: or, Legend: ar }, Qo = s(
2043
+ function({ className: t, ...e }, r) {
2044
+ return /* @__PURE__ */ o(
2045
+ At,
2046
+ {
2047
+ ref: r,
2048
+ className: n(
2049
+ "gryt-menubar flex items-center gap-1",
2050
+ "rounded-(--gryt-radius-md) border border-gryt-border bg-gryt-surface p-1",
2051
+ t
2052
+ ),
2053
+ ...e
2054
+ }
2055
+ );
2056
+ }
2057
+ ), nr = s(function({ className: t, ...e }, r) {
2058
+ return /* @__PURE__ */ o(
2059
+ x.Trigger,
2060
+ {
2061
+ ref: r,
2062
+ className: n(
2063
+ "gryt-navigation-menu-trigger flex items-center gap-1.5 rounded-(--gryt-radius-md)",
2064
+ "border-0 bg-transparent px-3 py-2 text-sm font-medium text-gryt-text select-none",
2065
+ "transition-colors hover:bg-gryt-surface-raised motion-reduce:transition-none",
2066
+ "data-popup-open:bg-gryt-surface-raised",
2067
+ y,
2068
+ t
2069
+ ),
2070
+ ...e
2071
+ }
2072
+ );
2073
+ }), sr = s(function({ className: t, ...e }, r) {
2074
+ return /* @__PURE__ */ o(
2075
+ x.Popup,
2076
+ {
2077
+ ref: r,
2078
+ className: n(
2079
+ "gryt-navigation-menu-popup outline-none",
2080
+ $,
2081
+ C,
2082
+ t
2083
+ ),
2084
+ ...e
2085
+ }
2086
+ );
2087
+ }), ir = s(function({ className: t, ...e }, r) {
2088
+ return /* @__PURE__ */ o(
2089
+ x.Viewport,
2090
+ {
2091
+ ref: r,
2092
+ className: n(
2093
+ "gryt-navigation-menu-viewport relative overflow-hidden",
2094
+ t
2095
+ ),
2096
+ ...e
2097
+ }
2098
+ );
2099
+ }), cr = s(function({ className: t, ...e }, r) {
2100
+ return /* @__PURE__ */ o(
2101
+ x.Link,
2102
+ {
2103
+ ref: r,
2104
+ className: n(
2105
+ "gryt-navigation-menu-link block rounded-(--gryt-radius-md) px-3 py-2",
2106
+ "text-sm text-gryt-text no-underline outline-none",
2107
+ "transition-colors hover:bg-gryt-surface-raised motion-reduce:transition-none",
2108
+ y,
2109
+ t
2110
+ ),
2111
+ ...e
2112
+ }
2113
+ );
2114
+ }), Wo = {
2115
+ Root: x.Root,
2116
+ List: x.List,
2117
+ Item: x.Item,
2118
+ Trigger: nr,
2119
+ Content: x.Content,
2120
+ Portal: x.Portal,
2121
+ Positioner: x.Positioner,
2122
+ Viewport: ir,
2123
+ Popup: sr,
2124
+ Link: cr,
2125
+ Icon: x.Icon,
2126
+ Arrow: x.Arrow
2127
+ }, ot = "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", _o = s(
2128
+ function({ className: t, label: e, scrubbable: r = !1, ...i }, c) {
2129
+ return /* @__PURE__ */ d(
2130
+ S.Root,
2131
+ {
2132
+ ref: c,
2133
+ className: n("gryt-number-field flex flex-col gap-1.5", t),
2134
+ ...i,
2135
+ children: [
2136
+ e && (r ? /* @__PURE__ */ d(S.ScrubArea, { className: "cursor-ew-resize text-sm text-gryt-muted select-none", children: [
2137
+ e,
2138
+ /* @__PURE__ */ o(S.ScrubAreaCursor, {})
2139
+ ] }) : /* @__PURE__ */ o("span", { className: "text-sm text-gryt-muted", children: e })),
2140
+ /* @__PURE__ */ d(
2141
+ S.Group,
2142
+ {
2143
+ className: n(
2144
+ "flex w-fit items-center overflow-hidden rounded-(--gryt-radius-full)",
2145
+ "border border-gryt-border bg-gryt-surface-raised",
2146
+ "focus-within:outline-2 focus-within:outline-offset-2 focus-within:outline-gryt-accent-light",
2147
+ j
2148
+ ),
2149
+ children: [
2150
+ /* @__PURE__ */ o(
2151
+ S.Decrement,
2152
+ {
2153
+ "aria-label": "Decrease",
2154
+ className: n(ot, "rounded-l-(--gryt-radius-full)"),
2155
+ children: /* @__PURE__ */ o(Pt, { size: 14, weight: "bold" })
2156
+ }
2157
+ ),
2158
+ /* @__PURE__ */ o(
2159
+ S.Input,
2160
+ {
2161
+ className: n(
2162
+ "w-16 border-0 bg-transparent px-1 py-2 text-center",
2163
+ "font-mono text-sm text-gryt-text tabular-nums outline-none",
2164
+ y
2165
+ )
2166
+ }
2167
+ ),
2168
+ /* @__PURE__ */ o(
2169
+ S.Increment,
2170
+ {
2171
+ "aria-label": "Increase",
2172
+ className: n(ot, "rounded-r-(--gryt-radius-full)"),
2173
+ children: /* @__PURE__ */ o(kt, { size: 14, weight: "bold" })
2174
+ }
2175
+ )
2176
+ ]
2177
+ }
2178
+ )
2179
+ ]
2180
+ }
2181
+ );
2182
+ }
2183
+ ), Jo = s(
2184
+ function({ className: t, length: e = 6, ...r }, i) {
2185
+ return /* @__PURE__ */ o(
2186
+ et.Root,
2187
+ {
2188
+ ref: i,
2189
+ length: e,
2190
+ className: n("gryt-otp-field flex gap-2", t),
2191
+ ...r,
2192
+ children: Array.from({ length: e }, (c, l) => /* @__PURE__ */ o(
2193
+ et.Input,
2194
+ {
2195
+ className: n(
2196
+ "gryt-otp-input h-12 w-10 rounded-(--gryt-radius-md) text-center",
2197
+ "border border-gryt-border bg-gryt-surface-raised",
2198
+ "font-mono text-lg text-gryt-text tabular-nums outline-none",
2199
+ "transition-colors duration-(--gryt-dur-fast) motion-reduce:transition-none",
2200
+ "data-filled:border-gryt-accent",
2201
+ y
2202
+ )
2203
+ },
2204
+ l
2205
+ ))
2206
+ }
2207
+ );
2208
+ }
2209
+ ), lr = s(
2210
+ function({ className: t, sideOffset: e = 8, ...r }, i) {
2211
+ return /* @__PURE__ */ o(
2212
+ D.Positioner,
2213
+ {
2214
+ ref: i,
2215
+ sideOffset: e,
2216
+ className: n("gryt-preview-card-positioner outline-none", t),
2217
+ ...r
2218
+ }
2219
+ );
2220
+ }
2221
+ ), dr = s(
2222
+ function({ className: t, ...e }, r) {
2223
+ return /* @__PURE__ */ o(
2224
+ D.Popup,
2225
+ {
2226
+ ref: r,
2227
+ className: n(
2228
+ "gryt-preview-card w-64 max-w-[calc(100vw-2rem)] p-4 outline-none",
2229
+ $,
2230
+ C,
2231
+ t
2232
+ ),
2233
+ ...e
2234
+ }
2235
+ );
2236
+ }
2237
+ ), Ko = {
2238
+ Root: D.Root,
2239
+ Trigger: D.Trigger,
2240
+ Portal: D.Portal,
2241
+ Positioner: lr,
2242
+ Popup: dr,
2243
+ Arrow: D.Arrow
2244
+ }, gr = s(function({ className: t, ...e }, r) {
2245
+ return /* @__PURE__ */ o(
2246
+ M.Root,
2247
+ {
2248
+ ref: r,
2249
+ className: n(
2250
+ "gryt-toolbar flex items-center gap-1",
2251
+ "rounded-(--gryt-radius-full) border border-gryt-border bg-gryt-surface p-1",
2252
+ t
2253
+ ),
2254
+ ...e
2255
+ }
2256
+ );
2257
+ }), ur = s(function({ className: t, ...e }, r) {
2258
+ return /* @__PURE__ */ o(
2259
+ M.Separator,
2260
+ {
2261
+ ref: r,
2262
+ className: n("gryt-toolbar-separator mx-1 h-6 w-px bg-gryt-border", t),
2263
+ ...e
2264
+ }
2265
+ );
2266
+ }), Zo = {
2267
+ Root: gr,
2268
+ Group: M.Group,
2269
+ Button: M.Button,
2270
+ Link: M.Link,
2271
+ Input: M.Input,
2272
+ Separator: ur
2273
+ };
1253
2274
  export {
1254
- Le as Accordion,
1255
- $e as Alert,
1256
- yt as Avatar,
1257
- ye as Badge,
1258
- ot as Button,
1259
- Pe as Card,
1260
- Re as CardActions,
1261
- Te as CardContent,
1262
- Se as CardHeader,
1263
- be as Checkbox,
1264
- me as Chip,
1265
- ge as Composer,
1266
- ue as ConversationItem,
1267
- Be as Dialog,
1268
- Ne as Divider,
1269
- ze as Drawer,
1270
- se as GrytProvider,
1271
- ce as IconButton,
1272
- je as Menu,
1273
- de as MessageBubble,
1274
- Ce as Progress,
1275
- fe as Radio,
1276
- pe as RadioGroup,
1277
- we as Select,
1278
- De as Skeleton,
1279
- xe as Slider,
1280
- Ie as Spinner,
1281
- ie as Surface,
1282
- he as Switch,
1283
- Bt as Tab,
1284
- Ae as Tabs,
1285
- le as TextField,
1286
- ve as Tooltip,
1287
- ke as TooltipProvider,
1288
- o as cn,
1289
- et as createGrytTheme,
1290
- L as grytTokens
2275
+ Ao as Accordion,
2276
+ ko as Alert,
2277
+ Vo as AlertDialog,
2278
+ Ho as Autocomplete,
2279
+ Xt as Avatar,
2280
+ co as Badge,
2281
+ Gt as Button,
2282
+ wo as Card,
2283
+ Po as CardActions,
2284
+ No as CardContent,
2285
+ vo as CardHeader,
2286
+ go as Checkbox,
2287
+ Oo as CheckboxGroup,
2288
+ lo as Chip,
2289
+ Xo as Collapsible,
2290
+ Eo as Combobox,
2291
+ so as Composer,
2292
+ Do as ContextMenu,
2293
+ io as ConversationItem,
2294
+ So as Dialog,
2295
+ ho as Divider,
2296
+ Ro as Drawer,
2297
+ Uo as Fieldset,
2298
+ Yo as Form,
2299
+ eo as GrytProvider,
2300
+ ro as IconButton,
2301
+ U as Menu,
2302
+ Qo as Menubar,
2303
+ ao as MessageBubble,
2304
+ Fo as Meter,
2305
+ Wo as NavigationMenu,
2306
+ _o as NumberField,
2307
+ Jo as OtpField,
2308
+ Mo as Popover,
2309
+ Ko as PreviewCard,
2310
+ To as Progress,
2311
+ uo as Radio,
2312
+ yo as RadioGroup,
2313
+ Go as ScrollArea,
2314
+ bo as Select,
2315
+ Co as Skeleton,
2316
+ po as Slider,
2317
+ $o as Spinner,
2318
+ oo as Surface,
2319
+ mo as Switch,
2320
+ fe as Tab,
2321
+ Io as Tabs,
2322
+ no as TextField,
2323
+ Lo as Toast,
2324
+ Bo as Toggle,
2325
+ zo as ToggleGroup,
2326
+ Zo as Toolbar,
2327
+ fo as Tooltip,
2328
+ xo as TooltipProvider,
2329
+ n as cn,
2330
+ Dt as createGrytTheme,
2331
+ rt as grytTokens,
2332
+ ee as useMediaQuery,
2333
+ jo as useToastManager
1291
2334
  };
1292
2335
  //# sourceMappingURL=index.js.map