@aircall/ds 0.11.0 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,12 +1,13 @@
1
+ import * as React from "react";
2
+ import { createContext, useCallback, useContext, useSyncExternalStore } from "react";
1
3
  import { Accordion as Accordion$1 } from "@base-ui/react/accordion";
2
4
  import { clsx } from "clsx";
3
5
  import { extendTailwindMerge } from "tailwind-merge";
4
6
  import { ArrowDownToLine, ArrowLeft, ArrowRight, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ChevronsUpDownIcon, CircleAlert, CircleAlertIcon, CircleCheck, FLAGS, FlagUs, Info, Loader2Icon, MinusIcon, MoreHorizontalIcon, PanelLeftIcon, Search, Smile, TriangleAlertIcon, XIcon } from "@aircall/react-icons";
5
7
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
- import * as React$1 from "react";
7
- import React, { createContext, useContext, useMemo } from "react";
8
8
  import { Button as Button$1 } from "@base-ui/react/button";
9
9
  import { cva } from "class-variance-authority";
10
+ import i18next from "i18next";
10
11
  import { AlertDialog as AlertDialog$1 } from "@base-ui/react/alert-dialog";
11
12
  import { Avatar as Avatar$1 } from "@base-ui/react/avatar";
12
13
  import { mergeProps } from "@base-ui/react/merge-props";
@@ -21,6 +22,9 @@ import { Combobox as Combobox$1 } from "@base-ui/react";
21
22
  import { Command as Command$1 } from "cmdk";
22
23
  import { Dialog as Dialog$1 } from "@base-ui/react/dialog";
23
24
  import { flexRender, getCoreRowModel, useReactTable } from "@tanstack/react-table";
25
+ import { checkboxesFeature, hotkeysCoreFeature, selectionFeature, syncDataLoaderFeature } from "@headless-tree/core";
26
+ import { useTree } from "@headless-tree/react";
27
+ import { useControllableState } from "@aircall/hooks";
24
28
  import { Drawer as DrawerPrimitive } from "@base-ui/react/drawer";
25
29
  import { Radio } from "@base-ui/react/radio";
26
30
  import { RadioGroup as RadioGroup$1 } from "@base-ui/react/radio-group";
@@ -34,7 +38,6 @@ import { Select as Select$1 } from "@base-ui/react/select";
34
38
  import { Tooltip as Tooltip$1 } from "@base-ui/react/tooltip";
35
39
  import { Slider as Slider$1 } from "@base-ui/react/slider";
36
40
  import { Toaster as Toaster$1, toast } from "sonner";
37
- import { useControllableState } from "@aircall/hooks";
38
41
  import { Switch as Switch$1 } from "@base-ui/react/switch";
39
42
  import { Tabs as Tabs$1 } from "@base-ui/react/tabs";
40
43
  import { Toggle as Toggle$1 } from "@base-ui/react/toggle";
@@ -103,24 +106,32 @@ function cn(...inputs) {
103
106
 
104
107
  //#endregion
105
108
  //#region src/components/accordion.tsx
106
- function Accordion({ className, ...props }) {
109
+ const Accordion = React.forwardRef((componentProps, forwardRef) => {
110
+ const { className, ...props } = componentProps;
107
111
  return /* @__PURE__ */ jsx(Accordion$1.Root, {
112
+ ref: forwardRef,
108
113
  "data-slot": "accordion",
109
114
  className: cn("flex w-full flex-col", className),
110
115
  ...props
111
116
  });
112
- }
113
- function AccordionItem({ className, ...props }) {
117
+ });
118
+ Accordion.displayName = "Accordion";
119
+ const AccordionItem = React.forwardRef((componentProps, forwardRef) => {
120
+ const { className, ...props } = componentProps;
114
121
  return /* @__PURE__ */ jsx(Accordion$1.Item, {
122
+ ref: forwardRef,
115
123
  "data-slot": "accordion-item",
116
124
  className: cn("not-last:border-b", className),
117
125
  ...props
118
126
  });
119
- }
120
- function AccordionTrigger({ className, children, ...props }) {
127
+ });
128
+ AccordionItem.displayName = "AccordionItem";
129
+ const AccordionTrigger = React.forwardRef((componentProps, forwardRef) => {
130
+ const { className, children, ...props } = componentProps;
121
131
  return /* @__PURE__ */ jsx(Accordion$1.Header, {
122
132
  className: "flex",
123
133
  children: /* @__PURE__ */ jsxs(Accordion$1.Trigger, {
134
+ ref: forwardRef,
124
135
  "data-slot": "accordion-trigger",
125
136
  className: cn("group/accordion-trigger relative flex flex-1 items-start justify-between rounded-md border border-transparent py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:after:border-ring aria-disabled:pointer-events-none aria-disabled:opacity-50 **:data-[slot=accordion-trigger-icon]:ml-auto **:data-[slot=accordion-trigger-icon]:size-4 **:data-[slot=accordion-trigger-icon]:text-muted-foreground", className),
126
137
  ...props,
@@ -137,9 +148,12 @@ function AccordionTrigger({ className, children, ...props }) {
137
148
  ]
138
149
  })
139
150
  });
140
- }
141
- function AccordionContent({ className, children, ...props }) {
151
+ });
152
+ AccordionTrigger.displayName = "AccordionTrigger";
153
+ const AccordionContent = React.forwardRef((componentProps, forwardRef) => {
154
+ const { className, children, ...props } = componentProps;
142
155
  return /* @__PURE__ */ jsx(Accordion$1.Panel, {
156
+ ref: forwardRef,
143
157
  "data-slot": "accordion-content",
144
158
  className: "overflow-hidden text-sm data-open:animate-accordion-down data-closed:animate-accordion-up",
145
159
  ...props,
@@ -148,7 +162,8 @@ function AccordionContent({ className, children, ...props }) {
148
162
  children
149
163
  })
150
164
  });
151
- }
165
+ });
166
+ AccordionContent.displayName = "AccordionContent";
152
167
 
153
168
  //#endregion
154
169
  //#region src/components/button.tsx
@@ -178,7 +193,7 @@ const buttonVariants = cva("group/button inline-flex shrink-0 cursor-pointer ite
178
193
  block: false
179
194
  }
180
195
  });
181
- const Button = React$1.forwardRef((componentProps, forwardRef) => {
196
+ const Button = React.forwardRef((componentProps, forwardRef) => {
182
197
  const { className, variant = "default", size = "default", block = false, ...props } = componentProps;
183
198
  return /* @__PURE__ */ jsx(Button$1, {
184
199
  ref: forwardRef,
@@ -195,6 +210,194 @@ const Button = React$1.forwardRef((componentProps, forwardRef) => {
195
210
  });
196
211
  Button.displayName = "Button";
197
212
 
213
+ //#endregion
214
+ //#region src/i18n/locales/de.ts
215
+ const de = {
216
+ "spinner.loading": "Laden",
217
+ "pagination.label": "Seitennavigation",
218
+ "pagination.previousPage": "Zur vorherigen Seite",
219
+ "pagination.nextPage": "Zur nächsten Seite",
220
+ "dataTable.selectAllRows": "Alle Zeilen auswählen",
221
+ "dataTable.selectRow": "Zeile auswählen",
222
+ "tree.collapse": "Minimieren",
223
+ "tree.expand": "Erweitern",
224
+ "multiselect.remove": "Entfernen",
225
+ "multiselect.clearAll": "Alles löschen",
226
+ "sidebar.toggle": "Seitenleiste umschalten",
227
+ "drawer.close": "Schließen",
228
+ "emojiPicker.emoji": "Emoji",
229
+ "emojiPicker.choose": "Emoji auswählen",
230
+ "actionBar.selectionActions": "Auswahlaktionen",
231
+ "pagination.previous": "Zurück",
232
+ "pagination.next": "Weiter",
233
+ "actionBar.clearSelection": "Auswahl aufheben",
234
+ "actionBar.itemsSelected": "{{count}} Elemente ausgewählt."
235
+ };
236
+ var de_default = de;
237
+
238
+ //#endregion
239
+ //#region src/i18n/locales/en.ts
240
+ const en = {
241
+ "spinner.loading": "Loading",
242
+ "pagination.label": "pagination",
243
+ "pagination.previousPage": "Go to previous page",
244
+ "pagination.nextPage": "Go to next page",
245
+ "dataTable.selectAllRows": "Select all rows",
246
+ "dataTable.selectRow": "Select row",
247
+ "tree.collapse": "Collapse",
248
+ "tree.expand": "Expand",
249
+ "multiselect.remove": "Remove",
250
+ "multiselect.clearAll": "Clear all",
251
+ "sidebar.toggle": "Toggle Sidebar",
252
+ "drawer.close": "Close",
253
+ "emojiPicker.emoji": "Emoji",
254
+ "emojiPicker.choose": "Choose an emoji",
255
+ "actionBar.selectionActions": "Selection actions",
256
+ "pagination.previous": "Previous",
257
+ "pagination.next": "Next",
258
+ "actionBar.clearSelection": "Clear selection",
259
+ "actionBar.itemsSelected": "{{count}} items selected."
260
+ };
261
+ var en_default = en;
262
+
263
+ //#endregion
264
+ //#region src/i18n/locales/es.ts
265
+ const es = {
266
+ "spinner.loading": "Cargando",
267
+ "pagination.label": "paginación",
268
+ "pagination.previousPage": "Ir a la página anterior",
269
+ "pagination.nextPage": "Ir a la página siguiente",
270
+ "dataTable.selectAllRows": "Seleccionar todas las filas",
271
+ "dataTable.selectRow": "Seleccionar fila",
272
+ "tree.collapse": "Minimizar",
273
+ "tree.expand": "Ampliar",
274
+ "multiselect.remove": "Eliminar",
275
+ "multiselect.clearAll": "Borrar todo",
276
+ "sidebar.toggle": "Alternar barra lateral",
277
+ "drawer.close": "Cerrar",
278
+ "emojiPicker.emoji": "Emoji",
279
+ "emojiPicker.choose": "Elegir un emoji",
280
+ "actionBar.selectionActions": "Acciones de selección",
281
+ "pagination.previous": "Anterior",
282
+ "pagination.next": "Siguiente",
283
+ "actionBar.clearSelection": "Borrar selección",
284
+ "actionBar.itemsSelected": "{{count}} elementos seleccionados."
285
+ };
286
+ var es_default = es;
287
+
288
+ //#endregion
289
+ //#region src/i18n/locales/fr.ts
290
+ const fr = {
291
+ "spinner.loading": "Chargement",
292
+ "pagination.label": "pagination",
293
+ "pagination.previousPage": "Aller à la page précédente",
294
+ "pagination.nextPage": "Aller à la page suivante",
295
+ "dataTable.selectAllRows": "Sélectionner toutes les lignes",
296
+ "dataTable.selectRow": "Sélectionner la ligne",
297
+ "tree.collapse": "Réduire",
298
+ "tree.expand": "Développer",
299
+ "multiselect.remove": "Supprimer",
300
+ "multiselect.clearAll": "Tout effacer",
301
+ "sidebar.toggle": "Basculer la barre latérale",
302
+ "drawer.close": "Fermer",
303
+ "emojiPicker.emoji": "Émoji",
304
+ "emojiPicker.choose": "Choisir un émoji",
305
+ "actionBar.selectionActions": "Actions de sélection",
306
+ "pagination.previous": "Précédent",
307
+ "pagination.next": "Suivant",
308
+ "actionBar.clearSelection": "Effacer la sélection",
309
+ "actionBar.itemsSelected": "{{count}} éléments sélectionnés."
310
+ };
311
+ var fr_default = fr;
312
+
313
+ //#endregion
314
+ //#region src/i18n/locales/it.ts
315
+ const it = {
316
+ "spinner.loading": "Caricamento",
317
+ "pagination.label": "paginazione",
318
+ "pagination.nextPage": "Vai alla pagina successiva",
319
+ "pagination.previousPage": "Vai alla pagina precedente",
320
+ "dataTable.selectAllRows": "Seleziona tutte le righe",
321
+ "dataTable.selectRow": "Seleziona riga",
322
+ "tree.collapse": "Ridurre",
323
+ "tree.expand": "Espandi",
324
+ "multiselect.remove": "Rimuovi",
325
+ "multiselect.clearAll": "Cancella tutto",
326
+ "sidebar.toggle": "Attiva/disattiva barra laterale",
327
+ "drawer.close": "Chiudi",
328
+ "emojiPicker.emoji": "Emoji",
329
+ "emojiPicker.choose": "Scegli un emoji",
330
+ "actionBar.selectionActions": "Azioni di selezione",
331
+ "pagination.previous": "Precedente",
332
+ "pagination.next": "Successivo",
333
+ "actionBar.clearSelection": "Cancella selezione",
334
+ "actionBar.itemsSelected": "{{count}} elementi selezionati."
335
+ };
336
+ var it_default = it;
337
+
338
+ //#endregion
339
+ //#region src/i18n/instance.ts
340
+ const SUPPORTED_LANGUAGES = [
341
+ "en",
342
+ "fr",
343
+ "es",
344
+ "de",
345
+ "it"
346
+ ];
347
+ const FALLBACK_LANGUAGE = "en";
348
+ /** Resolve the initial language from the environment, falling back to English. */
349
+ function detectInitialLanguage() {
350
+ if (typeof navigator === "undefined" || !navigator.language) return FALLBACK_LANGUAGE;
351
+ const base = navigator.language.split("-")[0];
352
+ return SUPPORTED_LANGUAGES.includes(base) ? base : FALLBACK_LANGUAGE;
353
+ }
354
+ /** The single private i18next instance owned by @aircall/ds. Isolated from any consumer instance. */
355
+ const dsI18n = i18next.createInstance();
356
+ dsI18n.init({
357
+ lng: detectInitialLanguage(),
358
+ fallbackLng: FALLBACK_LANGUAGE,
359
+ supportedLngs: [...SUPPORTED_LANGUAGES],
360
+ load: "languageOnly",
361
+ ns: ["ds"],
362
+ defaultNS: "ds",
363
+ resources: {
364
+ en: { ds: en_default },
365
+ fr: { ds: fr_default },
366
+ es: { ds: es_default },
367
+ de: { ds: de_default },
368
+ it: { ds: it_default }
369
+ },
370
+ interpolation: { escapeValue: false },
371
+ keySeparator: false,
372
+ returnNull: false,
373
+ initImmediate: false
374
+ });
375
+ /** Register an additional namespace's resources into the shared instance (used by @aircall/blocks). */
376
+ function registerI18nNamespace(ns, resources) {
377
+ for (const [lng, bundle] of Object.entries(resources)) dsI18n.addResourceBundle(lng, ns, bundle, true, true);
378
+ }
379
+
380
+ //#endregion
381
+ //#region src/i18n/use-ds-translation.ts
382
+ function subscribe(onChange) {
383
+ dsI18n.on("languageChanged", onChange);
384
+ return () => dsI18n.off("languageChanged", onChange);
385
+ }
386
+ function getLanguageSnapshot() {
387
+ return dsI18n.language;
388
+ }
389
+ /**
390
+ * @internal
391
+ * Reads translations from the shared ds instance and re-renders on language change.
392
+ * Used by @aircall/ds and @aircall/blocks components only — not part of the consumer contract.
393
+ */
394
+ function useDsTranslation(ns) {
395
+ return useCallback((key, opts) => dsI18n.t(key, {
396
+ ns,
397
+ ...opts
398
+ }), [ns, useSyncExternalStore(subscribe, getLanguageSnapshot, getLanguageSnapshot)]);
399
+ }
400
+
198
401
  //#endregion
199
402
  //#region src/components/action-bar.tsx
200
403
  /** Fixed height of the ActionBar (px). Single source of truth — the bar uses it
@@ -206,22 +409,28 @@ const ActionBarHeight = 48;
206
409
  * Explicit `count`/`onClear` props on `ActionBar` always take precedence, so the
207
410
  * component still works standalone. Mirrors React Spectrum's `ActionBarContext`.
208
411
  */
209
- const ActionBarContext = React$1.createContext(null);
210
- const ActionBarButton = React$1.forwardRef(({ size = "default", ...props }, ref) => /* @__PURE__ */ jsx(Button, {
211
- ref,
212
- variant: "ghost",
213
- size,
214
- ...props
215
- }));
412
+ const ActionBarContext = React.createContext(null);
413
+ const ActionBarButton = React.forwardRef((componentProps, forwardRef) => {
414
+ const { size = "default", ...props } = componentProps;
415
+ return /* @__PURE__ */ jsx(Button, {
416
+ ref: forwardRef,
417
+ variant: "ghost",
418
+ size,
419
+ ...props
420
+ });
421
+ });
216
422
  ActionBarButton.displayName = "ActionBarButton";
217
- const ActionBar = React$1.forwardRef(({ className, count, onClear, children, label, clearLabel = "Clear selection", style, ...props }, ref) => {
218
- const ctx = React$1.useContext(ActionBarContext);
423
+ const ActionBar = React.forwardRef((componentProps, forwardRef) => {
424
+ const { className, count, onClear, children, label, clearLabel, style, ...props } = componentProps;
425
+ const t = useDsTranslation("ds");
426
+ const ctx = React.useContext(ActionBarContext);
219
427
  const resolvedCount = count ?? ctx?.count ?? 0;
220
428
  const resolvedOnClear = onClear ?? ctx?.onClear;
429
+ const resolvedClearLabel = clearLabel ?? t("actionBar.clearSelection");
221
430
  return /* @__PURE__ */ jsxs("div", {
222
- ref,
431
+ ref: forwardRef,
223
432
  role: "toolbar",
224
- "aria-label": "Selection actions",
433
+ "aria-label": t("actionBar.selectionActions"),
225
434
  "data-slot": "action-bar",
226
435
  className: cn("relative flex w-full items-center gap-2 rounded-md border border-border bg-popover px-2 text-popover-foreground shadow-lg", className),
227
436
  style: {
@@ -233,12 +442,12 @@ const ActionBar = React$1.forwardRef(({ className, count, onClear, children, lab
233
442
  resolvedOnClear ? /* @__PURE__ */ jsx(ActionBarButton, {
234
443
  size: "icon",
235
444
  onClick: resolvedOnClear,
236
- "aria-label": clearLabel,
445
+ "aria-label": resolvedClearLabel,
237
446
  children: /* @__PURE__ */ jsx(XIcon, {})
238
447
  }) : null,
239
448
  /* @__PURE__ */ jsx("span", {
240
449
  className: "flex-1 truncate text-sm",
241
- children: label ? label(resolvedCount) : `${resolvedCount} items selected.`
450
+ children: label ? label(resolvedCount) : t("actionBar.itemsSelected", { count: resolvedCount })
242
451
  }),
243
452
  children ? /* @__PURE__ */ jsx("div", {
244
453
  className: "flex shrink-0 items-center gap-2",
@@ -251,83 +460,112 @@ ActionBar.displayName = "ActionBar";
251
460
 
252
461
  //#endregion
253
462
  //#region src/components/alert-dialog.tsx
254
- function AlertDialog({ ...props }) {
463
+ function AlertDialog(componentProps) {
255
464
  return /* @__PURE__ */ jsx(AlertDialog$1.Root, {
256
465
  "data-slot": "alert-dialog",
257
- ...props
466
+ ...componentProps
258
467
  });
259
468
  }
260
- function AlertDialogTrigger({ ...props }) {
469
+ const AlertDialogTrigger = React.forwardRef((componentProps, forwardRef) => {
470
+ const { ...props } = componentProps;
261
471
  return /* @__PURE__ */ jsx(AlertDialog$1.Trigger, {
472
+ ref: forwardRef,
262
473
  "data-slot": "alert-dialog-trigger",
263
474
  ...props
264
475
  });
265
- }
266
- function AlertDialogPortal({ ...props }) {
476
+ });
477
+ AlertDialogTrigger.displayName = "AlertDialogTrigger";
478
+ function AlertDialogPortal(componentProps) {
267
479
  return /* @__PURE__ */ jsx(AlertDialog$1.Portal, {
268
480
  "data-slot": "alert-dialog-portal",
269
- ...props
481
+ ...componentProps
270
482
  });
271
483
  }
272
- function AlertDialogOverlay({ className, ...props }) {
484
+ const AlertDialogOverlay = React.forwardRef((componentProps, forwardRef) => {
485
+ const { className, ...props } = componentProps;
273
486
  return /* @__PURE__ */ jsx(AlertDialog$1.Backdrop, {
487
+ ref: forwardRef,
274
488
  "data-slot": "alert-dialog-overlay",
275
489
  className: cn("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0", className),
276
490
  ...props
277
491
  });
278
- }
279
- function AlertDialogContent({ className, size = "default", ...props }) {
492
+ });
493
+ AlertDialogOverlay.displayName = "AlertDialogOverlay";
494
+ const AlertDialogContent = React.forwardRef((componentProps, forwardRef) => {
495
+ const { className, size = "default", ...props } = componentProps;
280
496
  return /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [/* @__PURE__ */ jsx(AlertDialogOverlay, {}), /* @__PURE__ */ jsx(AlertDialog$1.Popup, {
497
+ ref: forwardRef,
281
498
  "data-slot": "alert-dialog-content",
282
499
  "data-size": size,
283
500
  className: cn("group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
284
501
  ...props
285
502
  })] });
286
- }
287
- function AlertDialogHeader({ className, ...props }) {
503
+ });
504
+ AlertDialogContent.displayName = "AlertDialogContent";
505
+ const AlertDialogHeader = React.forwardRef((componentProps, forwardRef) => {
506
+ const { className, ...props } = componentProps;
288
507
  return /* @__PURE__ */ jsx("div", {
508
+ ref: forwardRef,
289
509
  "data-slot": "alert-dialog-header",
290
510
  className: cn("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]", className),
291
511
  ...props
292
512
  });
293
- }
294
- function AlertDialogFooter({ className, ...props }) {
513
+ });
514
+ AlertDialogHeader.displayName = "AlertDialogHeader";
515
+ const AlertDialogFooter = React.forwardRef((componentProps, forwardRef) => {
516
+ const { className, ...props } = componentProps;
295
517
  return /* @__PURE__ */ jsx("div", {
518
+ ref: forwardRef,
296
519
  "data-slot": "alert-dialog-footer",
297
520
  className: cn("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end", className),
298
521
  ...props
299
522
  });
300
- }
301
- function AlertDialogMedia({ className, ...props }) {
523
+ });
524
+ AlertDialogFooter.displayName = "AlertDialogFooter";
525
+ const AlertDialogMedia = React.forwardRef((componentProps, forwardRef) => {
526
+ const { className, ...props } = componentProps;
302
527
  return /* @__PURE__ */ jsx("div", {
528
+ ref: forwardRef,
303
529
  "data-slot": "alert-dialog-media",
304
530
  className: cn("mb-2 inline-flex size-10 items-center justify-center rounded-md bg-muted sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-6", className),
305
531
  ...props
306
532
  });
307
- }
308
- function AlertDialogTitle({ className, ...props }) {
533
+ });
534
+ AlertDialogMedia.displayName = "AlertDialogMedia";
535
+ const AlertDialogTitle = React.forwardRef((componentProps, forwardRef) => {
536
+ const { className, ...props } = componentProps;
309
537
  return /* @__PURE__ */ jsx(AlertDialog$1.Title, {
538
+ ref: forwardRef,
310
539
  "data-slot": "alert-dialog-title",
311
540
  className: cn("text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2", className),
312
541
  ...props
313
542
  });
314
- }
315
- function AlertDialogDescription({ className, ...props }) {
543
+ });
544
+ AlertDialogTitle.displayName = "AlertDialogTitle";
545
+ const AlertDialogDescription = React.forwardRef((componentProps, forwardRef) => {
546
+ const { className, ...props } = componentProps;
316
547
  return /* @__PURE__ */ jsx(AlertDialog$1.Description, {
548
+ ref: forwardRef,
317
549
  "data-slot": "alert-dialog-description",
318
550
  className: cn("text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", className),
319
551
  ...props
320
552
  });
321
- }
322
- function AlertDialogAction({ className, ...props }) {
553
+ });
554
+ AlertDialogDescription.displayName = "AlertDialogDescription";
555
+ const AlertDialogAction = React.forwardRef((componentProps, forwardRef) => {
556
+ const { className, ...props } = componentProps;
323
557
  return /* @__PURE__ */ jsx(Button, {
558
+ ref: forwardRef,
324
559
  "data-slot": "alert-dialog-action",
325
560
  className: cn(className),
326
561
  ...props
327
562
  });
328
- }
329
- function AlertDialogCancel({ className, variant = "outline", size = "default", ...props }) {
563
+ });
564
+ AlertDialogAction.displayName = "AlertDialogAction";
565
+ const AlertDialogCancel = React.forwardRef((componentProps, forwardRef) => {
566
+ const { className, variant = "outline", size = "default", ...props } = componentProps;
330
567
  return /* @__PURE__ */ jsx(AlertDialog$1.Close, {
568
+ ref: forwardRef,
331
569
  "data-slot": "alert-dialog-cancel",
332
570
  className: cn(className),
333
571
  render: /* @__PURE__ */ jsx(Button, {
@@ -336,7 +574,8 @@ function AlertDialogCancel({ className, variant = "outline", size = "default", .
336
574
  }),
337
575
  ...props
338
576
  });
339
- }
577
+ });
578
+ AlertDialogCancel.displayName = "AlertDialogCancel";
340
579
 
341
580
  //#endregion
342
581
  //#region src/components/alert.tsx
@@ -350,41 +589,54 @@ const alertVariants = cva("relative grid w-full items-start gap-x-2 gap-y-0.5 ro
350
589
  warning: "bg-warning-background border-warning/35 [&>svg]:text-warning"
351
590
  } }
352
591
  });
353
- function Alert({ className, variant, ...props }) {
592
+ const Alert = React.forwardRef((componentProps, forwardRef) => {
593
+ const { className, variant, ...props } = componentProps;
354
594
  return /* @__PURE__ */ jsx("div", {
595
+ ref: forwardRef,
355
596
  className: cn(alertVariants({ variant }), className),
356
597
  "data-slot": "alert",
357
598
  role: "alert",
358
599
  ...props
359
600
  });
360
- }
361
- function AlertTitle({ className, ...props }) {
601
+ });
602
+ Alert.displayName = "Alert";
603
+ const AlertTitle = React.forwardRef((componentProps, forwardRef) => {
604
+ const { className, ...props } = componentProps;
362
605
  return /* @__PURE__ */ jsx("div", {
606
+ ref: forwardRef,
363
607
  className: cn("font-medium leading-6 [svg~&]:col-start-2", className),
364
608
  "data-slot": "alert-title",
365
609
  ...props
366
610
  });
367
- }
368
- function AlertDescription({ className, ...props }) {
611
+ });
612
+ AlertTitle.displayName = "AlertTitle";
613
+ const AlertDescription = React.forwardRef((componentProps, forwardRef) => {
614
+ const { className, ...props } = componentProps;
369
615
  return /* @__PURE__ */ jsx("div", {
616
+ ref: forwardRef,
370
617
  className: cn("flex flex-col gap-2.5 text-muted-foreground [svg~&]:col-start-2", className),
371
618
  "data-slot": "alert-description",
372
619
  ...props
373
620
  });
374
- }
375
- function AlertAction({ className, ...props }) {
621
+ });
622
+ AlertDescription.displayName = "AlertDescription";
623
+ const AlertAction = React.forwardRef((componentProps, forwardRef) => {
624
+ const { className, ...props } = componentProps;
376
625
  return /* @__PURE__ */ jsx("div", {
626
+ ref: forwardRef,
377
627
  className: cn("flex gap-1 max-sm:col-start-2 max-sm:mt-2 sm:row-start-1 sm:row-end-3 sm:self-center sm:[[data-slot=alert-description]~&]:col-start-2 sm:[[data-slot=alert-title]~&]:col-start-2 sm:[svg~&]:col-start-2 sm:[svg~[data-slot=alert-description]~&]:col-start-3 sm:[svg~[data-slot=alert-title]~&]:col-start-3", className),
378
628
  "data-slot": "alert-action",
379
629
  ...props
380
630
  });
381
- }
631
+ });
632
+ AlertAction.displayName = "AlertAction";
382
633
 
383
634
  //#endregion
384
635
  //#region src/components/avatar.tsx
385
- const Avatar = React$1.forwardRef(({ className, size = "default", ...props }, ref) => {
636
+ const Avatar = React.forwardRef((componentProps, forwardRef) => {
637
+ const { className, size = "default", ...props } = componentProps;
386
638
  return /* @__PURE__ */ jsx(Avatar$1.Root, {
387
- ref,
639
+ ref: forwardRef,
388
640
  "data-slot": "avatar",
389
641
  "data-size": size,
390
642
  className: cn("group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken data-[size=xs]:size-5 data-[size=sm]:size-6 data-[size=lg]:size-10 data-[size=xl]:size-12 dark:after:mix-blend-lighten", className),
@@ -392,41 +644,56 @@ const Avatar = React$1.forwardRef(({ className, size = "default", ...props }, re
392
644
  });
393
645
  });
394
646
  Avatar.displayName = "Avatar";
395
- function AvatarImage({ className, ...props }) {
647
+ const AvatarImage = React.forwardRef((componentProps, forwardRef) => {
648
+ const { className, ...props } = componentProps;
396
649
  return /* @__PURE__ */ jsx(Avatar$1.Image, {
650
+ ref: forwardRef,
397
651
  "data-slot": "avatar-image",
398
652
  className: cn("aspect-square size-full rounded-full object-cover", className),
399
653
  ...props
400
654
  });
401
- }
402
- function AvatarFallback({ className, ...props }) {
655
+ });
656
+ AvatarImage.displayName = "AvatarImage";
657
+ const AvatarFallback = React.forwardRef((componentProps, forwardRef) => {
658
+ const { className, ...props } = componentProps;
403
659
  return /* @__PURE__ */ jsx(Avatar$1.Fallback, {
660
+ ref: forwardRef,
404
661
  "data-slot": "avatar-fallback",
405
662
  className: cn("flex size-full items-center justify-center rounded-full bg-background text-sm text-foreground group-data-[size=xs]/avatar:text-xs group-data-[size=sm]/avatar:text-xs group-data-[size=xl]/avatar:text-base", className),
406
663
  ...props
407
664
  });
408
- }
409
- function AvatarBadge({ className, ...props }) {
665
+ });
666
+ AvatarFallback.displayName = "AvatarFallback";
667
+ const AvatarBadge = React.forwardRef((componentProps, forwardRef) => {
668
+ const { className, ...props } = componentProps;
410
669
  return /* @__PURE__ */ jsx("span", {
670
+ ref: forwardRef,
411
671
  "data-slot": "avatar-badge",
412
672
  className: cn("absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full bg-blend-color ring-2 ring-background select-none", "group-data-[size=xs]/avatar:size-2 group-data-[size=xs]/avatar:[&>svg]:hidden", "group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden", "group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2", "group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2", "group-data-[size=xl]/avatar:size-3 group-data-[size=xl]/avatar:[&>svg]:size-2", className),
413
673
  ...props
414
674
  });
415
- }
416
- function AvatarGroup({ className, ...props }) {
675
+ });
676
+ AvatarBadge.displayName = "AvatarBadge";
677
+ const AvatarGroup = React.forwardRef((componentProps, forwardRef) => {
678
+ const { className, ...props } = componentProps;
417
679
  return /* @__PURE__ */ jsx("div", {
680
+ ref: forwardRef,
418
681
  "data-slot": "avatar-group",
419
682
  className: cn("group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2 *:data-[slot=avatar]:ring-background", className),
420
683
  ...props
421
684
  });
422
- }
423
- function AvatarGroupCount({ className, ...props }) {
685
+ });
686
+ AvatarGroup.displayName = "AvatarGroup";
687
+ const AvatarGroupCount = React.forwardRef((componentProps, forwardRef) => {
688
+ const { className, ...props } = componentProps;
424
689
  return /* @__PURE__ */ jsx("div", {
690
+ ref: forwardRef,
425
691
  "data-slot": "avatar-group-count",
426
692
  className: cn("relative flex size-8 shrink-0 items-center justify-center rounded-full bg-muted text-sm text-muted-foreground ring-2 ring-background group-has-data-[size=xs]/avatar-group:size-5 group-has-data-[size=sm]/avatar-group:size-6 group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=xl]/avatar-group:size-12 [&>svg]:size-4 group-has-data-[size=xs]/avatar-group:[&>svg]:size-3 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=xl]/avatar-group:[&>svg]:size-6", className),
427
693
  ...props
428
694
  });
429
- }
695
+ });
696
+ AvatarGroupCount.displayName = "AvatarGroupCount";
430
697
 
431
698
  //#endregion
432
699
  //#region src/components/counter-badge.tsx
@@ -438,12 +705,13 @@ const counterBadgeVariants = cva("group/counter-badge inline-flex h-5 min-w-5 sh
438
705
  } },
439
706
  defaultVariants: { variant: "default" }
440
707
  });
441
- const CounterBadge = React$1.forwardRef(({ className, variant = "default", render, ...props }, ref) => {
708
+ const CounterBadge = React.forwardRef((componentProps, forwardRef) => {
709
+ const { className, variant = "default", render, ...props } = componentProps;
442
710
  return useRender({
443
711
  defaultTagName: "span",
444
712
  props: mergeProps({
445
713
  className: cn(counterBadgeVariants({ variant }), className),
446
- ref
714
+ ref: forwardRef
447
715
  }, props),
448
716
  render,
449
717
  state: {
@@ -636,13 +904,13 @@ const badgeVariants = cva("group/badge inline-flex w-fit max-w-36 shrink-0 items
636
904
  * `charcoal` / `light` — or pass a stored hex via `legacyColor`. Icons are
637
905
  * composed as children (auto-sized per `size`).
638
906
  */
639
- const Badge = React$1.forwardRef((componentProps, forwardRef) => {
907
+ const Badge = React.forwardRef((componentProps, forwardRef) => {
640
908
  const { className, size = "default", color, tone, legacyColor, render, children, ...props } = componentProps;
641
909
  const resolved = legacyColor ? resolveTagColor(legacyColor) : {
642
910
  color,
643
911
  tone
644
912
  };
645
- const content = React$1.Children.map(children, (child) => typeof child === "string" || typeof child === "number" ? /* @__PURE__ */ jsx("span", {
913
+ const content = React.Children.map(children, (child) => typeof child === "string" || typeof child === "number" ? /* @__PURE__ */ jsx("span", {
646
914
  className: "min-w-0 truncate",
647
915
  children: child
648
916
  }) : child);
@@ -665,7 +933,7 @@ const Badge = React$1.forwardRef((componentProps, forwardRef) => {
665
933
  });
666
934
  });
667
935
  Badge.displayName = "Badge";
668
- const BadgeGroup = React$1.forwardRef((componentProps, forwardRef) => {
936
+ const BadgeGroup = React.forwardRef((componentProps, forwardRef) => {
669
937
  const { className, ...props } = componentProps;
670
938
  return /* @__PURE__ */ jsx("div", {
671
939
  ref: forwardRef,
@@ -682,7 +950,7 @@ const badgeGroupCountVariants = cva("rounded-md", {
682
950
  } },
683
951
  defaultVariants: { size: "default" }
684
952
  });
685
- const BadgeGroupCount = React$1.forwardRef((componentProps, forwardRef) => {
953
+ const BadgeGroupCount = React.forwardRef((componentProps, forwardRef) => {
686
954
  const { className, size = "default", ...props } = componentProps;
687
955
  return /* @__PURE__ */ jsx(CounterBadge, {
688
956
  ref: forwardRef,
@@ -775,8 +1043,10 @@ const bannerVariants = cva("relative grid w-full items-start gap-x-2 gap-y-0.5 p
775
1043
  }
776
1044
  }
777
1045
  });
778
- function Banner({ className, variant, borderDirection, ...props }) {
1046
+ const Banner = React.forwardRef((componentProps, forwardRef) => {
1047
+ const { className, variant, borderDirection, ...props } = componentProps;
779
1048
  return /* @__PURE__ */ jsx("div", {
1049
+ ref: forwardRef,
780
1050
  className: cn(bannerVariants({
781
1051
  variant,
782
1052
  borderDirection
@@ -785,7 +1055,8 @@ function Banner({ className, variant, borderDirection, ...props }) {
785
1055
  role: "alert",
786
1056
  ...props
787
1057
  });
788
- }
1058
+ });
1059
+ Banner.displayName = "Banner";
789
1060
 
790
1061
  //#endregion
791
1062
  //#region src/components/notification-queue.tsx
@@ -796,9 +1067,9 @@ const PRIORITY_WEIGHT = {
796
1067
  info: 10,
797
1068
  promotional: 1
798
1069
  };
799
- const NotificationQueueContext = React$1.createContext(null);
1070
+ const NotificationQueueContext = React.createContext(null);
800
1071
  function useNotificationQueueContext() {
801
- const ctx = React$1.useContext(NotificationQueueContext);
1072
+ const ctx = React.useContext(NotificationQueueContext);
802
1073
  if (!ctx) throw new Error("useNotification* hooks must be used inside <NotificationQueueProvider>");
803
1074
  return ctx;
804
1075
  }
@@ -851,12 +1122,13 @@ function getSlotQueue(state, slot) {
851
1122
  return diff !== 0 ? diff : b.registeredAt - a.registeredAt;
852
1123
  });
853
1124
  }
854
- function NotificationQueueProvider({ children }) {
855
- const [state, dispatch] = React$1.useReducer(reducer, {
1125
+ function NotificationQueueProvider(componentProps) {
1126
+ const { children } = componentProps;
1127
+ const [state, dispatch] = React.useReducer(reducer, {
856
1128
  entries: [],
857
1129
  dismissed: /* @__PURE__ */ new Set()
858
1130
  });
859
- const value = React$1.useMemo(() => ({
1131
+ const value = React.useMemo(() => ({
860
1132
  state,
861
1133
  dispatch
862
1134
  }), [state]);
@@ -868,7 +1140,7 @@ function NotificationQueueProvider({ children }) {
868
1140
  function useNotificationQueue() {
869
1141
  const { dispatch } = useNotificationQueueContext();
870
1142
  return {
871
- push: React$1.useCallback(({ id, slot, priority, render }) => {
1143
+ push: React.useCallback(({ id, slot, priority, render }) => {
872
1144
  const dismiss = () => dispatch({
873
1145
  type: "DISMISS",
874
1146
  id,
@@ -886,7 +1158,7 @@ function useNotificationQueue() {
886
1158
  });
887
1159
  return { dismiss };
888
1160
  }, [dispatch]),
889
- dismiss: React$1.useCallback((id, slot) => dispatch({
1161
+ dismiss: React.useCallback((id, slot) => dispatch({
890
1162
  type: "DISMISS",
891
1163
  id,
892
1164
  slot
@@ -895,7 +1167,7 @@ function useNotificationQueue() {
895
1167
  }
896
1168
  function useNotification({ id, slot, priority, render }) {
897
1169
  const { dispatch } = useNotificationQueueContext();
898
- const dismiss = React$1.useCallback(() => dispatch({
1170
+ const dismiss = React.useCallback(() => dispatch({
899
1171
  type: "DISMISS",
900
1172
  id,
901
1173
  slot
@@ -904,11 +1176,11 @@ function useNotification({ id, slot, priority, render }) {
904
1176
  slot,
905
1177
  dispatch
906
1178
  ]);
907
- const renderRef = React$1.useRef(render);
1179
+ const renderRef = React.useRef(render);
908
1180
  renderRef.current = render;
909
- const contentRef = React$1.useRef(null);
1181
+ const contentRef = React.useRef(null);
910
1182
  contentRef.current = renderRef.current({ dismiss });
911
- React$1.useEffect(() => {
1183
+ React.useEffect(() => {
912
1184
  dispatch({
913
1185
  type: "REGISTER",
914
1186
  entry: {
@@ -932,28 +1204,34 @@ function useNotification({ id, slot, priority, render }) {
932
1204
  ]);
933
1205
  return { dismiss };
934
1206
  }
935
- function NotificationSlot({ slot, className }) {
1207
+ const NotificationSlot = React.forwardRef((componentProps, forwardRef) => {
1208
+ const { slot, className } = componentProps;
936
1209
  const { state } = useNotificationQueueContext();
937
1210
  const active = getSlotQueue(state, slot)[0];
938
1211
  if (!active) return null;
939
1212
  return /* @__PURE__ */ jsx("div", {
1213
+ ref: forwardRef,
940
1214
  "data-slot": "notification-slot",
941
1215
  className: cn(className),
942
1216
  children: active.contentRef.current
943
1217
  });
944
- }
1218
+ });
1219
+ NotificationSlot.displayName = "NotificationSlot";
945
1220
 
946
1221
  //#endregion
947
1222
  //#region src/components/separator.tsx
948
- function Separator({ className, orientation = "horizontal", ...props }) {
1223
+ const Separator = React.forwardRef((componentProps, forwardRef) => {
1224
+ const { className, orientation = "horizontal", ...props } = componentProps;
949
1225
  return /* @__PURE__ */ jsx(Separator$1, {
1226
+ ref: forwardRef,
950
1227
  "data-slot": "separator",
951
1228
  "data-orientation": orientation,
952
1229
  orientation,
953
1230
  className: cn("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px data-[orientation=vertical]:self-stretch", className),
954
1231
  ...props
955
1232
  });
956
- }
1233
+ });
1234
+ Separator.displayName = "Separator";
957
1235
 
958
1236
  //#endregion
959
1237
  //#region src/components/button-group.tsx
@@ -964,31 +1242,42 @@ const buttonGroupVariants = cva("flex w-fit items-stretch *:focus-visible:relati
964
1242
  } },
965
1243
  defaultVariants: { orientation: "horizontal" }
966
1244
  });
967
- function ButtonGroup({ className, orientation, ...props }) {
1245
+ const ButtonGroup = React.forwardRef((componentProps, forwardRef) => {
1246
+ const { className, orientation, ...props } = componentProps;
968
1247
  return /* @__PURE__ */ jsx("div", {
1248
+ ref: forwardRef,
969
1249
  role: "group",
970
1250
  "data-slot": "button-group",
971
1251
  "data-orientation": orientation,
972
1252
  className: cn(buttonGroupVariants({ orientation }), className),
973
1253
  ...props
974
1254
  });
975
- }
976
- function ButtonGroupText({ className, render, ...props }) {
1255
+ });
1256
+ ButtonGroup.displayName = "ButtonGroup";
1257
+ const ButtonGroupText = React.forwardRef((componentProps, forwardRef) => {
1258
+ const { className, render, ...props } = componentProps;
977
1259
  return useRender({
978
1260
  defaultTagName: "div",
979
- props: mergeProps({ className: cn("flex items-center gap-2 rounded-md border bg-muted px-2.5 text-sm font-medium [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", className) }, props),
1261
+ props: mergeProps({
1262
+ className: cn("flex items-center gap-2 rounded-md border bg-muted px-2.5 text-sm font-medium [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", className),
1263
+ ref: forwardRef
1264
+ }, props),
980
1265
  render,
981
1266
  state: { slot: "button-group-text" }
982
1267
  });
983
- }
984
- function ButtonGroupSeparator({ className, orientation = "vertical", ...props }) {
1268
+ });
1269
+ ButtonGroupText.displayName = "ButtonGroupText";
1270
+ const ButtonGroupSeparator = React.forwardRef((componentProps, forwardRef) => {
1271
+ const { className, orientation = "vertical", ...props } = componentProps;
985
1272
  return /* @__PURE__ */ jsx(Separator, {
1273
+ ref: forwardRef,
986
1274
  "data-slot": "button-group-separator",
987
1275
  orientation,
988
1276
  className: cn("relative self-stretch bg-input data-[orientation=horizontal]:mx-px data-[orientation=horizontal]:w-auto data-[orientation=vertical]:my-px data-[orientation=vertical]:h-auto", className),
989
1277
  ...props
990
1278
  });
991
- }
1279
+ });
1280
+ ButtonGroupSeparator.displayName = "ButtonGroupSeparator";
992
1281
 
993
1282
  //#endregion
994
1283
  //#region src/components/calendar.tsx
@@ -1074,8 +1363,8 @@ function Calendar({ className, classNames, showOutsideDays = true, captionLayout
1074
1363
  }
1075
1364
  function CalendarDayButton({ className: dayClassName, day, modifiers, locale, ...props }) {
1076
1365
  const defaultClassNames = getDefaultClassNames();
1077
- const ref = React$1.useRef(null);
1078
- React$1.useEffect(() => {
1366
+ const ref = React.useRef(null);
1367
+ React.useEffect(() => {
1079
1368
  if (modifiers.focused) ref.current?.focus();
1080
1369
  }, [modifiers.focused]);
1081
1370
  return /* @__PURE__ */ jsx(Button, {
@@ -1094,84 +1383,106 @@ function CalendarDayButton({ className: dayClassName, day, modifiers, locale, ..
1094
1383
 
1095
1384
  //#endregion
1096
1385
  //#region src/components/card.tsx
1097
- function Card({ className, size = "default", ...props }) {
1386
+ const Card = React.forwardRef((componentProps, forwardRef) => {
1387
+ const { className, size = "default", ...props } = componentProps;
1098
1388
  return /* @__PURE__ */ jsx("div", {
1389
+ ref: forwardRef,
1099
1390
  "data-slot": "card",
1100
1391
  "data-size": size,
1101
1392
  className: cn("group/card flex flex-col gap-4 overflow-hidden rounded-xl border bg-card py-4 text-sm text-card-foreground has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl", className),
1102
1393
  ...props
1103
1394
  });
1104
- }
1105
- function CardHeader({ className, ...props }) {
1395
+ });
1396
+ Card.displayName = "Card";
1397
+ const CardHeader = React.forwardRef((componentProps, forwardRef) => {
1398
+ const { className, ...props } = componentProps;
1106
1399
  return /* @__PURE__ */ jsx("div", {
1400
+ ref: forwardRef,
1107
1401
  "data-slot": "card-header",
1108
1402
  className: cn("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-4 group-data-[size=sm]/card:px-3 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3", className),
1109
1403
  ...props
1110
1404
  });
1111
- }
1112
- function CardTitle({ className, ...props }) {
1405
+ });
1406
+ CardHeader.displayName = "CardHeader";
1407
+ const CardTitle = React.forwardRef((componentProps, forwardRef) => {
1408
+ const { className, ...props } = componentProps;
1113
1409
  return /* @__PURE__ */ jsx("div", {
1410
+ ref: forwardRef,
1114
1411
  "data-slot": "card-title",
1115
1412
  className: cn("text-base leading-snug font-medium group-data-[size=sm]/card:text-sm", className),
1116
1413
  ...props
1117
1414
  });
1118
- }
1119
- function CardDescription({ className, ...props }) {
1415
+ });
1416
+ CardTitle.displayName = "CardTitle";
1417
+ const CardDescription = React.forwardRef((componentProps, forwardRef) => {
1418
+ const { className, ...props } = componentProps;
1120
1419
  return /* @__PURE__ */ jsx("div", {
1420
+ ref: forwardRef,
1121
1421
  "data-slot": "card-description",
1122
1422
  className: cn("text-sm text-muted-foreground", className),
1123
1423
  ...props
1124
1424
  });
1125
- }
1126
- function CardAction({ className, ...props }) {
1425
+ });
1426
+ CardDescription.displayName = "CardDescription";
1427
+ const CardAction = React.forwardRef((componentProps, forwardRef) => {
1428
+ const { className, ...props } = componentProps;
1127
1429
  return /* @__PURE__ */ jsx("div", {
1430
+ ref: forwardRef,
1128
1431
  "data-slot": "card-action",
1129
1432
  className: cn("col-start-2 row-span-2 row-start-1 self-start justify-self-end", className),
1130
1433
  ...props
1131
1434
  });
1132
- }
1133
- function CardContent({ className, ...props }) {
1435
+ });
1436
+ CardAction.displayName = "CardAction";
1437
+ const CardContent = React.forwardRef((componentProps, forwardRef) => {
1438
+ const { className, ...props } = componentProps;
1134
1439
  return /* @__PURE__ */ jsx("div", {
1440
+ ref: forwardRef,
1135
1441
  "data-slot": "card-content",
1136
1442
  className: cn("px-4 group-data-[size=sm]/card:px-3", className),
1137
1443
  ...props
1138
1444
  });
1139
- }
1140
- function CardFooter({ className, ...props }) {
1445
+ });
1446
+ CardContent.displayName = "CardContent";
1447
+ const CardFooter = React.forwardRef((componentProps, forwardRef) => {
1448
+ const { className, ...props } = componentProps;
1141
1449
  return /* @__PURE__ */ jsx("div", {
1450
+ ref: forwardRef,
1142
1451
  "data-slot": "card-footer",
1143
1452
  className: cn("flex items-center rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/card:p-3", className),
1144
1453
  ...props
1145
1454
  });
1146
- }
1455
+ });
1456
+ CardFooter.displayName = "CardFooter";
1147
1457
 
1148
1458
  //#endregion
1149
1459
  //#region src/components/carousel.tsx
1150
- const CarouselContext = React$1.createContext(null);
1460
+ const CarouselContext = React.createContext(null);
1151
1461
  function useCarousel() {
1152
- const context = React$1.useContext(CarouselContext);
1462
+ const context = React.useContext(CarouselContext);
1153
1463
  if (!context) throw new Error("useCarousel must be used within a <Carousel />");
1154
1464
  return context;
1155
1465
  }
1156
- function Carousel({ orientation = "horizontal", opts, setApi, plugins, className, children, ...props }) {
1466
+ const Carousel = React.forwardRef((componentProps, forwardRef) => {
1467
+ const { orientation = "horizontal", opts, setApi, plugins, className, children, ...props } = componentProps;
1157
1468
  const [carouselRef, api] = useEmblaCarousel({
1158
1469
  ...opts,
1159
1470
  axis: orientation === "horizontal" ? "x" : "y"
1160
1471
  }, plugins);
1161
- const [canScrollPrev, setCanScrollPrev] = React$1.useState(false);
1162
- const [canScrollNext, setCanScrollNext] = React$1.useState(false);
1163
- const onSelect = React$1.useCallback((api$1) => {
1472
+ const [canScrollPrev, setCanScrollPrev] = React.useState(false);
1473
+ const [canScrollNext, setCanScrollNext] = React.useState(false);
1474
+ const onSelect = React.useCallback((api$1) => {
1164
1475
  if (!api$1) return;
1165
1476
  setCanScrollPrev(api$1.canScrollPrev());
1166
1477
  setCanScrollNext(api$1.canScrollNext());
1167
1478
  }, []);
1168
- const scrollPrev = React$1.useCallback(() => {
1479
+ const scrollPrev = React.useCallback(() => {
1169
1480
  api?.scrollPrev();
1170
1481
  }, [api]);
1171
- const scrollNext = React$1.useCallback(() => {
1482
+ const scrollNext = React.useCallback(() => {
1172
1483
  api?.scrollNext();
1173
1484
  }, [api]);
1174
- const handleKeyDown = React$1.useCallback((event) => {
1485
+ const handleKeyDown = React.useCallback((event) => {
1175
1486
  if (event.key === "ArrowLeft") {
1176
1487
  event.preventDefault();
1177
1488
  scrollPrev();
@@ -1180,11 +1491,11 @@ function Carousel({ orientation = "horizontal", opts, setApi, plugins, className
1180
1491
  scrollNext();
1181
1492
  }
1182
1493
  }, [scrollPrev, scrollNext]);
1183
- React$1.useEffect(() => {
1494
+ React.useEffect(() => {
1184
1495
  if (!api || !setApi) return;
1185
1496
  setApi(api);
1186
1497
  }, [api, setApi]);
1187
- React$1.useEffect(() => {
1498
+ React.useEffect(() => {
1188
1499
  if (!api) return;
1189
1500
  onSelect(api);
1190
1501
  api.on("reInit", onSelect);
@@ -1205,6 +1516,7 @@ function Carousel({ orientation = "horizontal", opts, setApi, plugins, className
1205
1516
  canScrollNext
1206
1517
  },
1207
1518
  children: /* @__PURE__ */ jsx("div", {
1519
+ ref: forwardRef,
1208
1520
  onKeyDownCapture: handleKeyDown,
1209
1521
  className: cn("relative", className),
1210
1522
  role: "region",
@@ -1214,32 +1526,41 @@ function Carousel({ orientation = "horizontal", opts, setApi, plugins, className
1214
1526
  children
1215
1527
  })
1216
1528
  });
1217
- }
1218
- function CarouselContent({ className, ...props }) {
1529
+ });
1530
+ Carousel.displayName = "Carousel";
1531
+ const CarouselContent = React.forwardRef((componentProps, forwardRef) => {
1532
+ const { className, ...props } = componentProps;
1219
1533
  const { carouselRef, orientation } = useCarousel();
1220
1534
  return /* @__PURE__ */ jsx("div", {
1221
1535
  ref: carouselRef,
1222
1536
  className: "overflow-hidden",
1223
1537
  "data-slot": "carousel-content",
1224
1538
  children: /* @__PURE__ */ jsx("div", {
1539
+ ref: forwardRef,
1225
1540
  className: cn("flex", orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col", className),
1226
1541
  ...props
1227
1542
  })
1228
1543
  });
1229
- }
1230
- function CarouselItem({ className, ...props }) {
1544
+ });
1545
+ CarouselContent.displayName = "CarouselContent";
1546
+ const CarouselItem = React.forwardRef((componentProps, forwardRef) => {
1547
+ const { className, ...props } = componentProps;
1231
1548
  const { orientation } = useCarousel();
1232
1549
  return /* @__PURE__ */ jsx("div", {
1550
+ ref: forwardRef,
1233
1551
  role: "group",
1234
1552
  "aria-roledescription": "slide",
1235
1553
  "data-slot": "carousel-item",
1236
1554
  className: cn("min-w-0 shrink-0 grow-0 basis-full", orientation === "horizontal" ? "pl-4" : "pt-4", className),
1237
1555
  ...props
1238
1556
  });
1239
- }
1240
- function CarouselPrevious({ className, variant = "outline", size = "sm", ...props }) {
1557
+ });
1558
+ CarouselItem.displayName = "CarouselItem";
1559
+ const CarouselPrevious = React.forwardRef((componentProps, forwardRef) => {
1560
+ const { className, variant = "outline", size = "sm", ...props } = componentProps;
1241
1561
  const { orientation, scrollPrev, canScrollPrev } = useCarousel();
1242
1562
  return /* @__PURE__ */ jsxs(Button, {
1563
+ ref: forwardRef,
1243
1564
  "data-slot": "carousel-previous",
1244
1565
  variant,
1245
1566
  size,
@@ -1252,10 +1573,13 @@ function CarouselPrevious({ className, variant = "outline", size = "sm", ...prop
1252
1573
  children: "Previous slide"
1253
1574
  })]
1254
1575
  });
1255
- }
1256
- function CarouselNext({ className, variant = "outline", size = "sm", ...props }) {
1576
+ });
1577
+ CarouselPrevious.displayName = "CarouselPrevious";
1578
+ const CarouselNext = React.forwardRef((componentProps, forwardRef) => {
1579
+ const { className, variant = "outline", size = "sm", ...props } = componentProps;
1257
1580
  const { orientation, scrollNext, canScrollNext } = useCarousel();
1258
1581
  return /* @__PURE__ */ jsxs(Button, {
1582
+ ref: forwardRef,
1259
1583
  "data-slot": "carousel-next",
1260
1584
  variant,
1261
1585
  size,
@@ -1268,13 +1592,15 @@ function CarouselNext({ className, variant = "outline", size = "sm", ...props })
1268
1592
  children: "Next slide"
1269
1593
  })]
1270
1594
  });
1271
- }
1595
+ });
1596
+ CarouselNext.displayName = "CarouselNext";
1272
1597
 
1273
1598
  //#endregion
1274
1599
  //#region src/components/checkbox.tsx
1275
- const Checkbox = React$1.forwardRef(({ className, ...props }, ref) => {
1600
+ const Checkbox = React.forwardRef((componentProps, forwardRef) => {
1601
+ const { className, ...props } = componentProps;
1276
1602
  return /* @__PURE__ */ jsx(Checkbox$1.Root, {
1277
- ref,
1603
+ ref: forwardRef,
1278
1604
  "data-slot": "checkbox",
1279
1605
  className: cn("peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input transition-[color,box-shadow,opacity] outline-none active:opacity-60 group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 dark:disabled:bg-input/80 aria-invalid:border-destructive focus-visible:aria-invalid:ring-3 focus-visible:aria-invalid:ring-destructive/20 hover:aria-invalid:data-unchecked:bg-destructive-background focus-visible:aria-invalid:data-unchecked:bg-destructive-background dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:focus-visible:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground data-indeterminate:border-primary data-indeterminate:bg-primary data-indeterminate:text-primary-foreground aria-invalid:data-checked:border-destructive aria-invalid:data-checked:bg-destructive aria-invalid:data-indeterminate:border-destructive aria-invalid:data-indeterminate:bg-destructive dark:data-checked:bg-primary dark:data-indeterminate:bg-primary", className),
1280
1606
  ...props,
@@ -1353,7 +1679,7 @@ const chipGlowVariants = cva("", {
1353
1679
  * inherits the chip's text color and brightens on hover. Exported so the
1354
1680
  * combobox can reuse the exact treatment for its Base-UI-bound chips.
1355
1681
  */
1356
- const ChipRemove = React$1.forwardRef((componentProps, forwardRef) => {
1682
+ const ChipRemove = React.forwardRef((componentProps, forwardRef) => {
1357
1683
  const { className, children, ...props } = componentProps;
1358
1684
  return /* @__PURE__ */ jsx(Button, {
1359
1685
  ref: forwardRef,
@@ -1373,7 +1699,7 @@ ChipRemove.displayName = "ChipRemove";
1373
1699
  * non-interactive — only the X reacts to hover. For combobox-bound chips that
1374
1700
  * must drive Base UI's selection state, see `ComboboxChip`.
1375
1701
  */
1376
- const Chip = React$1.forwardRef((componentProps, forwardRef) => {
1702
+ const Chip = React.forwardRef((componentProps, forwardRef) => {
1377
1703
  const { className, children, color, tone, legacyColor, glow, ...props } = componentProps;
1378
1704
  const glowColor = legacyColor ? resolveTagColor(legacyColor).color : color;
1379
1705
  return /* @__PURE__ */ jsx(Badge, {
@@ -1395,8 +1721,10 @@ Chip.displayName = "Chip";
1395
1721
 
1396
1722
  //#endregion
1397
1723
  //#region src/components/scroll-area.tsx
1398
- function ScrollArea({ className, children, scrollFade = false, scrollbarGutter = false, ...props }) {
1724
+ const ScrollArea = React.forwardRef((componentProps, forwardRef) => {
1725
+ const { className, children, scrollFade = false, scrollbarGutter = false, ...props } = componentProps;
1399
1726
  return /* @__PURE__ */ jsxs(ScrollAreaPrimitive.Root, {
1727
+ ref: forwardRef,
1400
1728
  className: cn("size-full min-h-0", className),
1401
1729
  ...props,
1402
1730
  children: [
@@ -1410,9 +1738,12 @@ function ScrollArea({ className, children, scrollFade = false, scrollbarGutter =
1410
1738
  /* @__PURE__ */ jsx(ScrollAreaPrimitive.Corner, { "data-slot": "scroll-area-corner" })
1411
1739
  ]
1412
1740
  });
1413
- }
1414
- function ScrollBar({ className, orientation = "vertical", ...props }) {
1741
+ });
1742
+ ScrollArea.displayName = "ScrollArea";
1743
+ const ScrollBar = React.forwardRef((componentProps, forwardRef) => {
1744
+ const { className, orientation = "vertical", ...props } = componentProps;
1415
1745
  return /* @__PURE__ */ jsx(ScrollAreaPrimitive.Scrollbar, {
1746
+ ref: forwardRef,
1416
1747
  className: cn("m-1 flex opacity-0 transition-opacity delay-300 data-[orientation=horizontal]:h-1.5 data-[orientation=vertical]:w-1.5 data-[orientation=horizontal]:flex-col data-hovering:opacity-100 data-scrolling:opacity-100 data-hovering:delay-0 data-scrolling:delay-0 data-hovering:duration-100 data-scrolling:duration-100", className),
1417
1748
  "data-slot": "scroll-area-scrollbar",
1418
1749
  orientation,
@@ -1422,7 +1753,8 @@ function ScrollBar({ className, orientation = "vertical", ...props }) {
1422
1753
  "data-slot": "scroll-area-thumb"
1423
1754
  })
1424
1755
  });
1425
- }
1756
+ });
1757
+ ScrollBar.displayName = "ScrollBar";
1426
1758
 
1427
1759
  //#endregion
1428
1760
  //#region src/components/filter.tsx
@@ -1434,7 +1766,7 @@ function ScrollBar({ className, orientation = "vertical", ...props }) {
1434
1766
  * `max-w-36` (144px). Compose inside a `FilterGroup` with a trailing
1435
1767
  * `FilterClearAllButton` (see the FilterBar story).
1436
1768
  */
1437
- const Filter = React$1.forwardRef((componentProps, forwardRef) => {
1769
+ const Filter = React.forwardRef((componentProps, forwardRef) => {
1438
1770
  const { className, children, onRemove, removeLabel = "Remove filter" } = componentProps;
1439
1771
  return /* @__PURE__ */ jsxs(Chip, {
1440
1772
  ref: forwardRef,
@@ -1454,7 +1786,7 @@ Filter.displayName = "Filter";
1454
1786
  * horizontal `ScrollArea` (inset scroll + edge fade) — it does not wrap onto
1455
1787
  * multiple lines.
1456
1788
  */
1457
- const FilterGroup = React$1.forwardRef((componentProps, forwardRef) => {
1789
+ const FilterGroup = React.forwardRef((componentProps, forwardRef) => {
1458
1790
  const { className, children, ...props } = componentProps;
1459
1791
  return /* @__PURE__ */ jsx("div", {
1460
1792
  "data-slot": "filter-group",
@@ -1478,7 +1810,7 @@ FilterGroup.displayName = "FilterGroup";
1478
1810
  * small `Button` with the styling pinned. Provide `onClick`; the label
1479
1811
  * defaults to "Clear all filters" (pass translated `children` to override).
1480
1812
  */
1481
- const FilterClearAllButton = React$1.forwardRef((componentProps, forwardRef) => {
1813
+ const FilterClearAllButton = React.forwardRef((componentProps, forwardRef) => {
1482
1814
  const { className, children = "Clear all filters", ...props } = componentProps;
1483
1815
  return /* @__PURE__ */ jsx(Button, {
1484
1816
  ref: forwardRef,
@@ -1495,29 +1827,36 @@ FilterClearAllButton.displayName = "FilterClearAllButton";
1495
1827
 
1496
1828
  //#endregion
1497
1829
  //#region src/components/collapsible.tsx
1498
- function Collapsible({ ...props }) {
1830
+ const Collapsible = React.forwardRef((componentProps, forwardRef) => {
1499
1831
  return /* @__PURE__ */ jsx(Collapsible$1.Root, {
1832
+ ref: forwardRef,
1500
1833
  "data-slot": "collapsible",
1501
- ...props
1834
+ ...componentProps
1502
1835
  });
1503
- }
1504
- function CollapsibleTrigger({ ...props }) {
1836
+ });
1837
+ Collapsible.displayName = "Collapsible";
1838
+ const CollapsibleTrigger = React.forwardRef((componentProps, forwardRef) => {
1505
1839
  return /* @__PURE__ */ jsx(Collapsible$1.Trigger, {
1840
+ ref: forwardRef,
1506
1841
  "data-slot": "collapsible-trigger",
1507
- ...props
1842
+ ...componentProps
1508
1843
  });
1509
- }
1510
- function CollapsibleContent({ ...props }) {
1844
+ });
1845
+ CollapsibleTrigger.displayName = "CollapsibleTrigger";
1846
+ const CollapsibleContent = React.forwardRef((componentProps, forwardRef) => {
1511
1847
  return /* @__PURE__ */ jsx(Collapsible$1.Panel, {
1848
+ ref: forwardRef,
1512
1849
  "data-slot": "collapsible-content",
1513
- ...props
1850
+ ...componentProps
1514
1851
  });
1515
- }
1852
+ });
1853
+ CollapsibleContent.displayName = "CollapsibleContent";
1516
1854
 
1517
1855
  //#endregion
1518
1856
  //#region src/components/input.tsx
1519
1857
  const inputVariants = cva("text-foreground file:text-foreground placeholder:text-muted-foreground dark:bg-input/30 border-input flex h-10 w-full min-w-0 rounded-md border bg-transparent px-3 py-2 text-base transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium hover:border-ring hover:aria-invalid:border-destructive disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 dark:disabled:bg-input/80 md:text-sm focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3 aria-invalid:border-destructive focus-visible:aria-invalid:ring-destructive/20 focus-visible:aria-invalid:ring-3 dark:focus-visible:aria-invalid:ring-destructive/40", { variants: { block: { true: "w-full" } } });
1520
- const Input = React$1.forwardRef(({ className, type, block, ...props }, forwardedRef) => {
1858
+ const Input = React.forwardRef((componentProps, forwardRef) => {
1859
+ const { className, type, block, ...props } = componentProps;
1521
1860
  return /* @__PURE__ */ jsx("input", {
1522
1861
  type,
1523
1862
  "data-slot": "input",
@@ -1526,29 +1865,36 @@ const Input = React$1.forwardRef(({ className, type, block, ...props }, forwarde
1526
1865
  className
1527
1866
  })),
1528
1867
  ...props,
1529
- ref: forwardedRef
1868
+ ref: forwardRef
1530
1869
  });
1531
1870
  });
1871
+ Input.displayName = "Input";
1532
1872
 
1533
1873
  //#endregion
1534
1874
  //#region src/components/textarea.tsx
1535
- function Textarea({ className, ...props }) {
1875
+ const Textarea = React.forwardRef((componentProps, forwardRef) => {
1876
+ const { className, ...props } = componentProps;
1536
1877
  return /* @__PURE__ */ jsx("textarea", {
1878
+ ref: forwardRef,
1537
1879
  "data-slot": "textarea",
1538
1880
  className: cn("border-input placeholder:text-muted-foreground hover:border-ring hover:aria-invalid:border-destructive focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3 aria-invalid:border-destructive focus-visible:aria-invalid:ring-destructive/20 focus-visible:aria-invalid:ring-3 dark:focus-visible:aria-invalid:ring-destructive/40 dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 dark:disabled:bg-input/80 md:text-sm", className),
1539
1881
  ...props
1540
1882
  });
1541
- }
1883
+ });
1884
+ Textarea.displayName = "Textarea";
1542
1885
 
1543
1886
  //#endregion
1544
1887
  //#region src/components/input-group.tsx
1545
- const InputGroup = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", {
1546
- ref,
1547
- "data-slot": "input-group",
1548
- role: "group",
1549
- className: cn("group/input-group border-input dark:bg-input/30 relative flex h-10 w-full items-center rounded-md border transition-[color,box-shadow] outline-none has-[>textarea]:h-auto", "not-has-[input:disabled]:not-has-[textarea:disabled]:not-has-[[data-slot][aria-invalid=true]]:hover:border-ring", "has-[input:disabled]:bg-input/50 has-[textarea:disabled]:bg-input/50 has-[input:disabled]:opacity-50 has-[textarea:disabled]:opacity-50 dark:has-[input:disabled]:bg-input/80 dark:has-[textarea:disabled]:bg-input/80", "has-[>[data-align=inline-start]]:[&>input]:pl-2", "has-[>[data-align=inline-end]]:[&>input]:pr-2", "has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3", "has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3", "has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot=input-group-control]:focus-visible]:ring-3", "has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]:focus-visible]:ring-destructive/20 dark:has-[[data-slot][aria-invalid=true]:focus-visible]:ring-destructive/40", className),
1550
- ...props
1551
- }));
1888
+ const InputGroup = React.forwardRef((componentProps, forwardRef) => {
1889
+ const { className, ...props } = componentProps;
1890
+ return /* @__PURE__ */ jsx("div", {
1891
+ ref: forwardRef,
1892
+ "data-slot": "input-group",
1893
+ role: "group",
1894
+ className: cn("group/input-group border-input dark:bg-input/30 relative flex h-10 w-full items-center rounded-md border transition-[color,box-shadow] outline-none has-[>textarea]:h-auto", "not-has-[input:disabled]:not-has-[textarea:disabled]:not-has-[[data-slot][aria-invalid=true]]:hover:border-ring", "has-[input:disabled]:bg-input/50 has-[textarea:disabled]:bg-input/50 has-[input:disabled]:opacity-50 has-[textarea:disabled]:opacity-50 dark:has-[input:disabled]:bg-input/80 dark:has-[textarea:disabled]:bg-input/80", "has-[>[data-align=inline-start]]:[&>input]:pl-2", "has-[>[data-align=inline-end]]:[&>input]:pr-2", "has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3", "has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3", "has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot=input-group-control]:focus-visible]:ring-3", "has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]:focus-visible]:ring-destructive/20 dark:has-[[data-slot][aria-invalid=true]:focus-visible]:ring-destructive/40", className),
1895
+ ...props
1896
+ });
1897
+ });
1552
1898
  InputGroup.displayName = "InputGroup";
1553
1899
  const inputGroupAddonVariants = cva("text-muted-foreground flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium select-none [&>svg:not([class*='size-'])]:size-4 [&>kbd]:rounded-[calc(var(--radius)-5px)] group-data-[disabled=true]/input-group:opacity-50", {
1554
1900
  variants: { align: {
@@ -1559,8 +1905,10 @@ const inputGroupAddonVariants = cva("text-muted-foreground flex h-auto cursor-te
1559
1905
  } },
1560
1906
  defaultVariants: { align: "inline-start" }
1561
1907
  });
1562
- function InputGroupAddon({ className, align = "inline-start", ...props }) {
1908
+ const InputGroupAddon = React.forwardRef((componentProps, forwardRef) => {
1909
+ const { className, align = "inline-start", ...props } = componentProps;
1563
1910
  return /* @__PURE__ */ jsx("div", {
1911
+ ref: forwardRef,
1564
1912
  role: "group",
1565
1913
  "data-slot": "input-group-addon",
1566
1914
  "data-align": align,
@@ -1571,10 +1919,12 @@ function InputGroupAddon({ className, align = "inline-start", ...props }) {
1571
1919
  },
1572
1920
  ...props
1573
1921
  });
1574
- }
1575
- const InputGroupButton = React$1.forwardRef(({ className, type = "button", variant = "ghost", size = "sm", ...props }, ref) => {
1922
+ });
1923
+ InputGroupAddon.displayName = "InputGroupAddon";
1924
+ const InputGroupButton = React.forwardRef((componentProps, forwardRef) => {
1925
+ const { className, type = "button", variant = "ghost", size = "sm", ...props } = componentProps;
1576
1926
  return /* @__PURE__ */ jsx(Button, {
1577
- ref,
1927
+ ref: forwardRef,
1578
1928
  type,
1579
1929
  variant,
1580
1930
  size,
@@ -1583,27 +1933,35 @@ const InputGroupButton = React$1.forwardRef(({ className, type = "button", varia
1583
1933
  });
1584
1934
  });
1585
1935
  InputGroupButton.displayName = "InputGroupButton";
1586
- function InputGroupText({ className, ...props }) {
1936
+ const InputGroupText = React.forwardRef((componentProps, forwardRef) => {
1937
+ const { className, ...props } = componentProps;
1587
1938
  return /* @__PURE__ */ jsx("span", {
1939
+ ref: forwardRef,
1588
1940
  className: cn("text-muted-foreground flex items-center gap-2 text-sm [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", className),
1589
1941
  ...props
1590
1942
  });
1591
- }
1592
- const InputGroupInput = React$1.forwardRef(({ className, ...props }, forwardedRef) => {
1943
+ });
1944
+ InputGroupText.displayName = "InputGroupText";
1945
+ const InputGroupInput = React.forwardRef((componentProps, forwardRef) => {
1946
+ const { className, ...props } = componentProps;
1593
1947
  return /* @__PURE__ */ jsx(Input, {
1594
1948
  "data-slot": "input-group-control",
1595
1949
  className: cn("flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 aria-invalid:ring-0 focus-visible:aria-invalid:!ring-0 disabled:bg-transparent disabled:opacity-100 dark:bg-transparent dark:disabled:bg-transparent", className),
1596
1950
  ...props,
1597
- ref: forwardedRef
1951
+ ref: forwardRef
1598
1952
  });
1599
1953
  });
1600
- function InputGroupTextarea({ className, ...props }) {
1954
+ InputGroupInput.displayName = "InputGroupInput";
1955
+ const InputGroupTextarea = React.forwardRef((componentProps, forwardRef) => {
1956
+ const { className, ...props } = componentProps;
1601
1957
  return /* @__PURE__ */ jsx(Textarea, {
1958
+ ref: forwardRef,
1602
1959
  "data-slot": "input-group-control",
1603
1960
  className: cn("flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent", className),
1604
1961
  ...props
1605
1962
  });
1606
- }
1963
+ });
1964
+ InputGroupTextarea.displayName = "InputGroupTextarea";
1607
1965
 
1608
1966
  //#endregion
1609
1967
  //#region src/components/combobox.tsx
@@ -1614,7 +1972,7 @@ function ComboboxValue(componentProps) {
1614
1972
  ...componentProps
1615
1973
  });
1616
1974
  }
1617
- const ComboboxTrigger = React$1.forwardRef((componentProps, forwardRef) => {
1975
+ const ComboboxTrigger = React.forwardRef((componentProps, forwardRef) => {
1618
1976
  const { className, children, ...props } = componentProps;
1619
1977
  return /* @__PURE__ */ jsxs(Combobox$1.Trigger, {
1620
1978
  ref: forwardRef,
@@ -1625,7 +1983,7 @@ const ComboboxTrigger = React$1.forwardRef((componentProps, forwardRef) => {
1625
1983
  });
1626
1984
  });
1627
1985
  ComboboxTrigger.displayName = "ComboboxTrigger";
1628
- const ComboboxClear = React$1.forwardRef((componentProps, forwardRef) => {
1986
+ const ComboboxClear = React.forwardRef((componentProps, forwardRef) => {
1629
1987
  const { className, ...props } = componentProps;
1630
1988
  return /* @__PURE__ */ jsx(Combobox$1.Clear, {
1631
1989
  ref: forwardRef,
@@ -1640,7 +1998,7 @@ const ComboboxClear = React$1.forwardRef((componentProps, forwardRef) => {
1640
1998
  });
1641
1999
  });
1642
2000
  ComboboxClear.displayName = "ComboboxClear";
1643
- const ComboboxInput = React$1.forwardRef((componentProps, forwardRef) => {
2001
+ const ComboboxInput = React.forwardRef((componentProps, forwardRef) => {
1644
2002
  const { className, children, disabled = false, showTrigger = true, showClear = false, ...props } = componentProps;
1645
2003
  return /* @__PURE__ */ jsxs(InputGroup, {
1646
2004
  ref: forwardRef,
@@ -1666,7 +2024,7 @@ const ComboboxInput = React$1.forwardRef((componentProps, forwardRef) => {
1666
2024
  });
1667
2025
  });
1668
2026
  ComboboxInput.displayName = "ComboboxInput";
1669
- const ComboboxContent = React$1.forwardRef((componentProps, forwardRef) => {
2027
+ const ComboboxContent = React.forwardRef((componentProps, forwardRef) => {
1670
2028
  const { className, side = "bottom", sideOffset = 6, align = "start", alignOffset = 0, anchor, ...props } = componentProps;
1671
2029
  return /* @__PURE__ */ jsx(Combobox$1.Portal, { children: /* @__PURE__ */ jsx(Combobox$1.Positioner, {
1672
2030
  side,
@@ -1685,7 +2043,7 @@ const ComboboxContent = React$1.forwardRef((componentProps, forwardRef) => {
1685
2043
  }) });
1686
2044
  });
1687
2045
  ComboboxContent.displayName = "ComboboxContent";
1688
- const ComboboxList = React$1.forwardRef((componentProps, forwardRef) => {
2046
+ const ComboboxList = React.forwardRef((componentProps, forwardRef) => {
1689
2047
  const { className, ...props } = componentProps;
1690
2048
  return /* @__PURE__ */ jsx(Combobox$1.List, {
1691
2049
  ref: forwardRef,
@@ -1695,7 +2053,7 @@ const ComboboxList = React$1.forwardRef((componentProps, forwardRef) => {
1695
2053
  });
1696
2054
  });
1697
2055
  ComboboxList.displayName = "ComboboxList";
1698
- const ComboboxItem = React$1.forwardRef((componentProps, forwardRef) => {
2056
+ const ComboboxItem = React.forwardRef((componentProps, forwardRef) => {
1699
2057
  const { className, children, ...props } = componentProps;
1700
2058
  return /* @__PURE__ */ jsxs(Combobox$1.Item, {
1701
2059
  ref: forwardRef,
@@ -1710,7 +2068,7 @@ const ComboboxItem = React$1.forwardRef((componentProps, forwardRef) => {
1710
2068
  });
1711
2069
  });
1712
2070
  ComboboxItem.displayName = "ComboboxItem";
1713
- const ComboboxGroup = React$1.forwardRef((componentProps, forwardRef) => {
2071
+ const ComboboxGroup = React.forwardRef((componentProps, forwardRef) => {
1714
2072
  const { className, ...props } = componentProps;
1715
2073
  return /* @__PURE__ */ jsx(Combobox$1.Group, {
1716
2074
  ref: forwardRef,
@@ -1720,7 +2078,7 @@ const ComboboxGroup = React$1.forwardRef((componentProps, forwardRef) => {
1720
2078
  });
1721
2079
  });
1722
2080
  ComboboxGroup.displayName = "ComboboxGroup";
1723
- const ComboboxLabel = React$1.forwardRef((componentProps, forwardRef) => {
2081
+ const ComboboxLabel = React.forwardRef((componentProps, forwardRef) => {
1724
2082
  const { className, ...props } = componentProps;
1725
2083
  return /* @__PURE__ */ jsx(Combobox$1.GroupLabel, {
1726
2084
  ref: forwardRef,
@@ -1736,7 +2094,7 @@ function ComboboxCollection(componentProps) {
1736
2094
  ...componentProps
1737
2095
  });
1738
2096
  }
1739
- const ComboboxEmpty = React$1.forwardRef((componentProps, forwardRef) => {
2097
+ const ComboboxEmpty = React.forwardRef((componentProps, forwardRef) => {
1740
2098
  const { className, ...props } = componentProps;
1741
2099
  return /* @__PURE__ */ jsx(Combobox$1.Empty, {
1742
2100
  ref: forwardRef,
@@ -1746,7 +2104,7 @@ const ComboboxEmpty = React$1.forwardRef((componentProps, forwardRef) => {
1746
2104
  });
1747
2105
  });
1748
2106
  ComboboxEmpty.displayName = "ComboboxEmpty";
1749
- const ComboboxSeparator = React$1.forwardRef((componentProps, forwardRef) => {
2107
+ const ComboboxSeparator = React.forwardRef((componentProps, forwardRef) => {
1750
2108
  const { className, ...props } = componentProps;
1751
2109
  return /* @__PURE__ */ jsx(Combobox$1.Separator, {
1752
2110
  ref: forwardRef,
@@ -1756,7 +2114,7 @@ const ComboboxSeparator = React$1.forwardRef((componentProps, forwardRef) => {
1756
2114
  });
1757
2115
  });
1758
2116
  ComboboxSeparator.displayName = "ComboboxSeparator";
1759
- const ComboboxChips = React$1.forwardRef((componentProps, forwardRef) => {
2117
+ const ComboboxChips = React.forwardRef((componentProps, forwardRef) => {
1760
2118
  const { className, ...props } = componentProps;
1761
2119
  return /* @__PURE__ */ jsx(Combobox$1.Chips, {
1762
2120
  ref: forwardRef,
@@ -1766,7 +2124,7 @@ const ComboboxChips = React$1.forwardRef((componentProps, forwardRef) => {
1766
2124
  });
1767
2125
  });
1768
2126
  ComboboxChips.displayName = "ComboboxChips";
1769
- const ComboboxChip = React$1.forwardRef(function ComboboxChip(componentProps, forwardRef) {
2127
+ const ComboboxChip = React.forwardRef(function ComboboxChip(componentProps, forwardRef) {
1770
2128
  const { className, children, showRemove = true, color, tone, legacyColor, ...props } = componentProps;
1771
2129
  return /* @__PURE__ */ jsxs(Combobox$1.Chip, {
1772
2130
  ref: forwardRef,
@@ -1780,7 +2138,7 @@ const ComboboxChip = React$1.forwardRef(function ComboboxChip(componentProps, fo
1780
2138
  children: [children, showRemove && /* @__PURE__ */ jsx(Combobox$1.ChipRemove, { render: /* @__PURE__ */ jsx(ChipRemove, {}) })]
1781
2139
  });
1782
2140
  });
1783
- const ComboboxChipsInput = React$1.forwardRef(function ComboboxChipsInput(componentProps, forwardRef) {
2141
+ const ComboboxChipsInput = React.forwardRef(function ComboboxChipsInput(componentProps, forwardRef) {
1784
2142
  const { className, ...props } = componentProps;
1785
2143
  return /* @__PURE__ */ jsx(Combobox$1.Input, {
1786
2144
  ref: forwardRef,
@@ -1791,44 +2149,55 @@ const ComboboxChipsInput = React$1.forwardRef(function ComboboxChipsInput(compon
1791
2149
  });
1792
2150
  ComboboxChipsInput.displayName = "ComboboxChipsInput";
1793
2151
  function useComboboxAnchor() {
1794
- return React$1.useRef(null);
2152
+ return React.useRef(null);
1795
2153
  }
1796
2154
 
1797
2155
  //#endregion
1798
2156
  //#region src/components/dialog.tsx
1799
- function Dialog({ ...props }) {
2157
+ function Dialog(componentProps) {
1800
2158
  return /* @__PURE__ */ jsx(Dialog$1.Root, {
1801
2159
  "data-slot": "dialog",
1802
- ...props
2160
+ ...componentProps
1803
2161
  });
1804
2162
  }
1805
- function DialogTrigger({ ...props }) {
2163
+ const DialogTrigger = React.forwardRef((componentProps, forwardRef) => {
2164
+ const { ...props } = componentProps;
1806
2165
  return /* @__PURE__ */ jsx(Dialog$1.Trigger, {
2166
+ ref: forwardRef,
1807
2167
  "data-slot": "dialog-trigger",
1808
2168
  ...props
1809
2169
  });
1810
- }
1811
- function DialogPortal({ ...props }) {
2170
+ });
2171
+ DialogTrigger.displayName = "DialogTrigger";
2172
+ function DialogPortal(componentProps) {
1812
2173
  return /* @__PURE__ */ jsx(Dialog$1.Portal, {
1813
2174
  "data-slot": "dialog-portal",
1814
- ...props
2175
+ ...componentProps
1815
2176
  });
1816
2177
  }
1817
- function DialogClose({ ...props }) {
2178
+ const DialogClose = React.forwardRef((componentProps, forwardRef) => {
2179
+ const { ...props } = componentProps;
1818
2180
  return /* @__PURE__ */ jsx(Dialog$1.Close, {
2181
+ ref: forwardRef,
1819
2182
  "data-slot": "dialog-close",
1820
2183
  ...props
1821
2184
  });
1822
- }
1823
- function DialogOverlay({ className, ...props }) {
2185
+ });
2186
+ DialogClose.displayName = "DialogClose";
2187
+ const DialogOverlay = React.forwardRef((componentProps, forwardRef) => {
2188
+ const { className, ...props } = componentProps;
1824
2189
  return /* @__PURE__ */ jsx(Dialog$1.Backdrop, {
2190
+ ref: forwardRef,
1825
2191
  "data-slot": "dialog-overlay",
1826
2192
  className: cn("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0", className),
1827
2193
  ...props
1828
2194
  });
1829
- }
1830
- function DialogContent({ className, children, showCloseButton = true, ...props }) {
2195
+ });
2196
+ DialogOverlay.displayName = "DialogOverlay";
2197
+ const DialogContent = React.forwardRef((componentProps, forwardRef) => {
2198
+ const { className, children, showCloseButton = true, ...props } = componentProps;
1831
2199
  return /* @__PURE__ */ jsxs(DialogPortal, { children: [/* @__PURE__ */ jsx(DialogOverlay, {}), /* @__PURE__ */ jsxs(Dialog$1.Popup, {
2200
+ ref: forwardRef,
1832
2201
  "data-slot": "dialog-content",
1833
2202
  className: cn("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl ring-1 ring-foreground/10 bg-background px-6 py-4 text-sm duration-100 outline-none sm:max-w-md data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
1834
2203
  ...props,
@@ -1845,16 +2214,22 @@ function DialogContent({ className, children, showCloseButton = true, ...props }
1845
2214
  })]
1846
2215
  })]
1847
2216
  })] });
1848
- }
1849
- function DialogHeader({ className, ...props }) {
2217
+ });
2218
+ DialogContent.displayName = "DialogContent";
2219
+ const DialogHeader = React.forwardRef((componentProps, forwardRef) => {
2220
+ const { className, ...props } = componentProps;
1850
2221
  return /* @__PURE__ */ jsx("div", {
2222
+ ref: forwardRef,
1851
2223
  "data-slot": "dialog-header",
1852
2224
  className: cn("flex flex-col gap-2", className),
1853
2225
  ...props
1854
2226
  });
1855
- }
1856
- function DialogFooter({ className, showCloseButton = false, children, ...props }) {
2227
+ });
2228
+ DialogHeader.displayName = "DialogHeader";
2229
+ const DialogFooter = React.forwardRef((componentProps, forwardRef) => {
2230
+ const { className, showCloseButton = false, children, ...props } = componentProps;
1857
2231
  return /* @__PURE__ */ jsxs("div", {
2232
+ ref: forwardRef,
1858
2233
  "data-slot": "dialog-footer",
1859
2234
  className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
1860
2235
  ...props,
@@ -1863,32 +2238,43 @@ function DialogFooter({ className, showCloseButton = false, children, ...props }
1863
2238
  children: "Close"
1864
2239
  })]
1865
2240
  });
1866
- }
1867
- function DialogTitle({ className, ...props }) {
2241
+ });
2242
+ DialogFooter.displayName = "DialogFooter";
2243
+ const DialogTitle = React.forwardRef((componentProps, forwardRef) => {
2244
+ const { className, ...props } = componentProps;
1868
2245
  return /* @__PURE__ */ jsx(Dialog$1.Title, {
2246
+ ref: forwardRef,
1869
2247
  "data-slot": "dialog-title",
1870
2248
  className: cn("text-lg font-bold leading-normal", className),
1871
2249
  ...props
1872
2250
  });
1873
- }
1874
- function DialogDescription({ className, ...props }) {
2251
+ });
2252
+ DialogTitle.displayName = "DialogTitle";
2253
+ const DialogDescription = React.forwardRef((componentProps, forwardRef) => {
2254
+ const { className, ...props } = componentProps;
1875
2255
  return /* @__PURE__ */ jsx(Dialog$1.Description, {
2256
+ ref: forwardRef,
1876
2257
  "data-slot": "dialog-description",
1877
2258
  className: cn("text-sm leading-normal text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", className),
1878
2259
  ...props
1879
2260
  });
1880
- }
2261
+ });
2262
+ DialogDescription.displayName = "DialogDescription";
1881
2263
 
1882
2264
  //#endregion
1883
2265
  //#region src/components/command.tsx
1884
- function Command({ className, ...props }) {
2266
+ const Command = React.forwardRef((componentProps, forwardRef) => {
2267
+ const { className, ...props } = componentProps;
1885
2268
  return /* @__PURE__ */ jsx(Command$1, {
2269
+ ref: forwardRef,
1886
2270
  "data-slot": "command",
1887
2271
  className: cn("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md", className),
1888
2272
  ...props
1889
2273
  });
1890
- }
1891
- function CommandDialog({ title = "Command Palette", description = "Search for a command to run...", children, ...props }) {
2274
+ });
2275
+ Command.displayName = "Command";
2276
+ function CommandDialog(componentProps) {
2277
+ const { title = "Command Palette", description = "Search for a command to run...", children, ...props } = componentProps;
1892
2278
  return /* @__PURE__ */ jsxs(Dialog, {
1893
2279
  ...props,
1894
2280
  children: [/* @__PURE__ */ jsxs(DialogHeader, {
@@ -1903,59 +2289,80 @@ function CommandDialog({ title = "Command Palette", description = "Search for a
1903
2289
  })]
1904
2290
  });
1905
2291
  }
1906
- function CommandInput({ className, ...props }) {
2292
+ const CommandInput = React.forwardRef((componentProps, forwardRef) => {
2293
+ const { className, ...props } = componentProps;
1907
2294
  return /* @__PURE__ */ jsxs("div", {
1908
2295
  "data-slot": "command-input-wrapper",
1909
2296
  className: "flex h-9 items-center gap-2 border-b px-3",
1910
2297
  children: [/* @__PURE__ */ jsx(Search, { className: "size-4 shrink-0 opacity-50" }), /* @__PURE__ */ jsx(Command$1.Input, {
2298
+ ref: forwardRef,
1911
2299
  "data-slot": "command-input",
1912
2300
  className: cn("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50", className),
1913
2301
  ...props
1914
2302
  })]
1915
2303
  });
1916
- }
1917
- function CommandList({ className, ...props }) {
2304
+ });
2305
+ CommandInput.displayName = "CommandInput";
2306
+ const CommandList = React.forwardRef((componentProps, forwardRef) => {
2307
+ const { className, ...props } = componentProps;
1918
2308
  return /* @__PURE__ */ jsx(Command$1.List, {
2309
+ ref: forwardRef,
1919
2310
  "data-slot": "command-list",
1920
2311
  className: cn("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto", className),
1921
2312
  ...props
1922
2313
  });
1923
- }
1924
- function CommandEmpty({ ...props }) {
2314
+ });
2315
+ CommandList.displayName = "CommandList";
2316
+ const CommandEmpty = React.forwardRef((componentProps, forwardRef) => {
2317
+ const { ...props } = componentProps;
1925
2318
  return /* @__PURE__ */ jsx(Command$1.Empty, {
2319
+ ref: forwardRef,
1926
2320
  "data-slot": "command-empty",
1927
2321
  className: "py-6 text-center text-sm",
1928
2322
  ...props
1929
2323
  });
1930
- }
1931
- function CommandGroup({ className, ...props }) {
2324
+ });
2325
+ CommandEmpty.displayName = "CommandEmpty";
2326
+ const CommandGroup = React.forwardRef((componentProps, forwardRef) => {
2327
+ const { className, ...props } = componentProps;
1932
2328
  return /* @__PURE__ */ jsx(Command$1.Group, {
2329
+ ref: forwardRef,
1933
2330
  "data-slot": "command-group",
1934
2331
  className: cn("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium", className),
1935
2332
  ...props
1936
2333
  });
1937
- }
1938
- function CommandSeparator({ className, ...props }) {
2334
+ });
2335
+ CommandGroup.displayName = "CommandGroup";
2336
+ const CommandSeparator = React.forwardRef((componentProps, forwardRef) => {
2337
+ const { className, ...props } = componentProps;
1939
2338
  return /* @__PURE__ */ jsx(Command$1.Separator, {
2339
+ ref: forwardRef,
1940
2340
  "data-slot": "command-separator",
1941
2341
  className: cn("bg-border -mx-1 h-px", className),
1942
2342
  ...props
1943
2343
  });
1944
- }
1945
- function CommandItem({ className, ...props }) {
2344
+ });
2345
+ CommandSeparator.displayName = "CommandSeparator";
2346
+ const CommandItem = React.forwardRef((componentProps, forwardRef) => {
2347
+ const { className, ...props } = componentProps;
1946
2348
  return /* @__PURE__ */ jsx(Command$1.Item, {
2349
+ ref: forwardRef,
1947
2350
  "data-slot": "command-item",
1948
2351
  className: cn("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
1949
2352
  ...props
1950
2353
  });
1951
- }
1952
- function CommandShortcut({ className, ...props }) {
2354
+ });
2355
+ CommandItem.displayName = "CommandItem";
2356
+ const CommandShortcut = React.forwardRef((componentProps, forwardRef) => {
2357
+ const { className, ...props } = componentProps;
1953
2358
  return /* @__PURE__ */ jsx("span", {
2359
+ ref: forwardRef,
1954
2360
  "data-slot": "command-shortcut",
1955
2361
  className: cn("text-muted-foreground ml-auto text-xs tracking-widest", className),
1956
2362
  ...props
1957
2363
  });
1958
- }
2364
+ });
2365
+ CommandShortcut.displayName = "CommandShortcut";
1959
2366
 
1960
2367
  //#endregion
1961
2368
  //#region src/components/country-flag.tsx
@@ -1965,22 +2372,28 @@ const sizeMap = {
1965
2372
  lg: "size-5",
1966
2373
  xl: "size-6"
1967
2374
  };
1968
- const CountryFlag = ({ countryIsoCode, size = "xl", className, ...otherProps }) => {
2375
+ const CountryFlag = React.forwardRef((componentProps, forwardRef) => {
2376
+ const { countryIsoCode, size = "xl", className, ...otherProps } = componentProps;
1969
2377
  return /* @__PURE__ */ jsx(FLAGS[countryIsoCode.toLowerCase()] ?? FlagUs, {
2378
+ ref: forwardRef,
1970
2379
  className: cn("flex-none", sizeMap[size], className),
1971
2380
  ...otherProps
1972
2381
  });
1973
- };
2382
+ });
2383
+ CountryFlag.displayName = "CountryFlag";
1974
2384
 
1975
2385
  //#endregion
1976
2386
  //#region src/components/skeleton.tsx
1977
- function Skeleton({ className, ...props }) {
2387
+ const Skeleton = React.forwardRef((componentProps, forwardRef) => {
2388
+ const { className, ...props } = componentProps;
1978
2389
  return /* @__PURE__ */ jsx("div", {
2390
+ ref: forwardRef,
1979
2391
  "data-slot": "skeleton",
1980
2392
  className: cn("animate-pulse rounded-md bg-muted", className),
1981
2393
  ...props
1982
2394
  });
1983
- }
2395
+ });
2396
+ Skeleton.displayName = "Skeleton";
1984
2397
 
1985
2398
  //#endregion
1986
2399
  //#region src/components/spinner.tsx
@@ -1993,81 +2406,107 @@ const spinnerVariants = cva("animate-spin text-current", {
1993
2406
  } },
1994
2407
  defaultVariants: { size: "default" }
1995
2408
  });
1996
- function Spinner({ className, size, ...props }) {
2409
+ const Spinner = React.forwardRef((componentProps, forwardRef) => {
2410
+ const { className, size, ...props } = componentProps;
2411
+ const t = useDsTranslation("ds");
1997
2412
  return /* @__PURE__ */ jsx(Loader2Icon, {
2413
+ ref: forwardRef,
1998
2414
  "data-slot": "spinner",
1999
2415
  role: "status",
2000
- "aria-label": "Loading",
2416
+ "aria-label": t("spinner.loading"),
2001
2417
  className: cn(spinnerVariants({ size }), className),
2002
2418
  ...props
2003
2419
  });
2004
- }
2420
+ });
2421
+ Spinner.displayName = "Spinner";
2005
2422
 
2006
2423
  //#endregion
2007
2424
  //#region src/components/table.tsx
2008
- const Table = React$1.forwardRef(({ className, containerClassName, containerStyle, ...props }, ref) => /* @__PURE__ */ jsx("div", {
2009
- "data-slot": "table-container",
2010
- style: containerStyle,
2011
- className: cn("relative w-full overflow-x-auto rounded-lg border border-border", containerClassName),
2012
- children: /* @__PURE__ */ jsx("table", {
2013
- ref,
2014
- "data-slot": "table",
2015
- className: cn("w-full caption-bottom text-sm [&_tbody_tr:last-child]:border-b-0", className),
2016
- ...props
2017
- })
2018
- }));
2425
+ const Table = React.forwardRef((componentProps, forwardRef) => {
2426
+ const { className, containerClassName, containerStyle, ...props } = componentProps;
2427
+ return /* @__PURE__ */ jsx("div", {
2428
+ "data-slot": "table-container",
2429
+ style: containerStyle,
2430
+ className: cn("relative w-full overflow-x-auto rounded-lg border border-border", containerClassName),
2431
+ children: /* @__PURE__ */ jsx("table", {
2432
+ ref: forwardRef,
2433
+ "data-slot": "table",
2434
+ className: cn("w-full caption-bottom text-sm [&_tbody_tr:last-child]:border-b-0", className),
2435
+ ...props
2436
+ })
2437
+ });
2438
+ });
2019
2439
  Table.displayName = "Table";
2020
- const TableHeader = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("thead", {
2021
- ref,
2022
- "data-slot": "table-header",
2023
- className: cn("[&_tr]:border-b [&_tr]:hover:bg-transparent", className),
2024
- ...props
2025
- }));
2440
+ const TableHeader = React.forwardRef((componentProps, forwardRef) => {
2441
+ const { className, ...props } = componentProps;
2442
+ return /* @__PURE__ */ jsx("thead", {
2443
+ ref: forwardRef,
2444
+ "data-slot": "table-header",
2445
+ className: cn("[&_tr]:border-b [&_tr]:hover:bg-transparent", className),
2446
+ ...props
2447
+ });
2448
+ });
2026
2449
  TableHeader.displayName = "TableHeader";
2027
- const TableBody = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("tbody", {
2028
- ref,
2029
- "data-slot": "table-body",
2030
- className: cn("[&_tr:last-child]:border-0", className),
2031
- ...props
2032
- }));
2450
+ const TableBody = React.forwardRef((componentProps, forwardRef) => {
2451
+ const { className, ...props } = componentProps;
2452
+ return /* @__PURE__ */ jsx("tbody", {
2453
+ ref: forwardRef,
2454
+ "data-slot": "table-body",
2455
+ className: cn("[&_tr:last-child]:border-0", className),
2456
+ ...props
2457
+ });
2458
+ });
2033
2459
  TableBody.displayName = "TableBody";
2034
- const TableFooter = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("tfoot", {
2035
- ref,
2036
- "data-slot": "table-footer",
2037
- className: cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0 [&>tr]:hover:bg-transparent", className),
2038
- ...props
2039
- }));
2460
+ const TableFooter = React.forwardRef((componentProps, forwardRef) => {
2461
+ const { className, ...props } = componentProps;
2462
+ return /* @__PURE__ */ jsx("tfoot", {
2463
+ ref: forwardRef,
2464
+ "data-slot": "table-footer",
2465
+ className: cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0 [&>tr]:hover:bg-transparent", className),
2466
+ ...props
2467
+ });
2468
+ });
2040
2469
  TableFooter.displayName = "TableFooter";
2041
- const TableRow = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("tr", {
2042
- ref,
2043
- "data-slot": "table-row",
2044
- className: cn("border-b transition-colors hover:bg-accent/30 data-[state=selected]:bg-accent/50", className),
2045
- ...props
2046
- }));
2470
+ const TableRow = React.forwardRef((componentProps, forwardRef) => {
2471
+ const { className, ...props } = componentProps;
2472
+ return /* @__PURE__ */ jsx("tr", {
2473
+ ref: forwardRef,
2474
+ "data-slot": "table-row",
2475
+ className: cn("border-b transition-colors hover:bg-accent/30 data-[state=selected]:bg-accent/50", className),
2476
+ ...props
2477
+ });
2478
+ });
2047
2479
  TableRow.displayName = "TableRow";
2048
- const TableHead = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("th", {
2049
- ref,
2050
- "data-slot": "table-head",
2051
- className: cn("h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0", className),
2052
- ...props
2053
- }));
2480
+ const TableHead = React.forwardRef((componentProps, forwardRef) => {
2481
+ const { className, ...props } = componentProps;
2482
+ return /* @__PURE__ */ jsx("th", {
2483
+ ref: forwardRef,
2484
+ "data-slot": "table-head",
2485
+ className: cn("h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0", className),
2486
+ ...props
2487
+ });
2488
+ });
2054
2489
  TableHead.displayName = "TableHead";
2055
- const TableCell = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("td", {
2056
- ref,
2057
- "data-slot": "table-cell",
2058
- className: cn("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0", className),
2059
- ...props
2060
- }));
2490
+ const TableCell = React.forwardRef((componentProps, forwardRef) => {
2491
+ const { className, ...props } = componentProps;
2492
+ return /* @__PURE__ */ jsx("td", {
2493
+ ref: forwardRef,
2494
+ "data-slot": "table-cell",
2495
+ className: cn("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0", className),
2496
+ ...props
2497
+ });
2498
+ });
2061
2499
  TableCell.displayName = "TableCell";
2062
2500
 
2063
2501
  //#endregion
2064
2502
  //#region src/components/data-table.tsx
2065
2503
  const SELECT_COLUMN_ID = "__select";
2066
2504
  const DEFAULT_SKELETON_COUNT = 5;
2067
- function DataTable({ columns, data, getRowId, loadingState = "idle", skeletonCount = DEFAULT_SKELETON_COUNT, emptyState, sorting, onSortingChange, enableRowSelection, rowSelection, onRowSelectionChange, actionBar, onFetchMore, hasMore = false, enableColumnResizing = false, fillHeight = false, onRowClick, className }) {
2505
+ function DataTable(componentProps) {
2506
+ const { columns, data, getRowId, loadingState = "idle", skeletonCount = DEFAULT_SKELETON_COUNT, emptyState, sorting, onSortingChange, enableRowSelection, rowSelection, onRowSelectionChange, actionBar, onFetchMore, hasMore = false, enableColumnResizing = false, fillHeight = false, onRowClick, className } = componentProps;
2068
2507
  const sortingEnabled = !!onSortingChange;
2069
2508
  const selectionEnabled = !!enableRowSelection;
2070
- const finalColumns = React$1.useMemo(() => {
2509
+ const finalColumns = React.useMemo(() => {
2071
2510
  if (!selectionEnabled) return columns;
2072
2511
  return [makeSelectColumn(), ...columns];
2073
2512
  }, [columns, selectionEnabled]);
@@ -2201,29 +2640,35 @@ function DataTable({ columns, data, getRowId, loadingState = "idle", skeletonCou
2201
2640
  ]
2202
2641
  });
2203
2642
  }
2643
+ function SelectAllHeader({ table }) {
2644
+ const t = useDsTranslation("ds");
2645
+ const allSelected = table.getIsAllRowsSelected();
2646
+ const someSelected = table.getIsSomeRowsSelected();
2647
+ return /* @__PURE__ */ jsx(Checkbox, {
2648
+ checked: allSelected,
2649
+ indeterminate: !allSelected && someSelected,
2650
+ onCheckedChange: (value) => table.toggleAllRowsSelected(value === true),
2651
+ "aria-label": t("dataTable.selectAllRows")
2652
+ });
2653
+ }
2654
+ function SelectRowCell({ row }) {
2655
+ const t = useDsTranslation("ds");
2656
+ return /* @__PURE__ */ jsx("span", {
2657
+ className: "contents",
2658
+ onClick: (e) => e.stopPropagation(),
2659
+ children: /* @__PURE__ */ jsx(Checkbox, {
2660
+ checked: row.getIsSelected(),
2661
+ disabled: !row.getCanSelect(),
2662
+ onCheckedChange: (value) => row.toggleSelected(value === true),
2663
+ "aria-label": t("dataTable.selectRow")
2664
+ })
2665
+ });
2666
+ }
2204
2667
  function makeSelectColumn() {
2205
2668
  return {
2206
2669
  id: SELECT_COLUMN_ID,
2207
- header: ({ table }) => {
2208
- const allSelected = table.getIsAllRowsSelected();
2209
- const someSelected = table.getIsSomeRowsSelected();
2210
- return /* @__PURE__ */ jsx(Checkbox, {
2211
- checked: allSelected,
2212
- indeterminate: !allSelected && someSelected,
2213
- onCheckedChange: (value) => table.toggleAllRowsSelected(value === true),
2214
- "aria-label": "Select all rows"
2215
- });
2216
- },
2217
- cell: ({ row }) => /* @__PURE__ */ jsx("span", {
2218
- className: "contents",
2219
- onClick: (e) => e.stopPropagation(),
2220
- children: /* @__PURE__ */ jsx(Checkbox, {
2221
- checked: row.getIsSelected(),
2222
- disabled: !row.getCanSelect(),
2223
- onCheckedChange: (value) => row.toggleSelected(value === true),
2224
- "aria-label": "Select row"
2225
- })
2226
- }),
2670
+ header: ({ table }) => /* @__PURE__ */ jsx(SelectAllHeader, { table }),
2671
+ cell: ({ row }) => /* @__PURE__ */ jsx(SelectRowCell, { row }),
2227
2672
  enableSorting: false,
2228
2673
  enableHiding: false,
2229
2674
  enableResizing: false,
@@ -2268,12 +2713,12 @@ function SkeletonRows({ columns, count }) {
2268
2713
  * page never triggers duplicate fetches; the sentinel remounts for the next page.
2269
2714
  */
2270
2715
  function useFetchMoreSentinel(onFetchMore, fillHeight, resetKey) {
2271
- const onFetchMoreRef = React$1.useRef(onFetchMore);
2716
+ const onFetchMoreRef = React.useRef(onFetchMore);
2272
2717
  onFetchMoreRef.current = onFetchMore;
2273
- const observerRef = React$1.useRef(null);
2274
- const nodeRef = React$1.useRef(null);
2275
- const armedRef = React$1.useRef(true);
2276
- const observe = React$1.useCallback(() => {
2718
+ const observerRef = React.useRef(null);
2719
+ const nodeRef = React.useRef(null);
2720
+ const armedRef = React.useRef(true);
2721
+ const observe = React.useCallback(() => {
2277
2722
  observerRef.current?.disconnect();
2278
2723
  observerRef.current = null;
2279
2724
  const node = nodeRef.current;
@@ -2293,16 +2738,270 @@ function useFetchMoreSentinel(onFetchMore, fillHeight, resetKey) {
2293
2738
  observer.observe(node);
2294
2739
  observerRef.current = observer;
2295
2740
  }, [fillHeight]);
2296
- React$1.useEffect(() => {
2741
+ React.useEffect(() => {
2297
2742
  armedRef.current = true;
2298
2743
  observe();
2299
2744
  }, [resetKey, observe]);
2300
- return React$1.useCallback((node) => {
2745
+ return React.useCallback((node) => {
2301
2746
  nodeRef.current = node;
2302
2747
  observe();
2303
2748
  }, [observe]);
2304
2749
  }
2305
2750
 
2751
+ //#endregion
2752
+ //#region src/components/tree.tsx
2753
+ const TreeContext = React.createContext({
2754
+ currentItem: void 0,
2755
+ indent: 20,
2756
+ tree: void 0
2757
+ });
2758
+ function useTreeContext() {
2759
+ return React.useContext(TreeContext);
2760
+ }
2761
+ function Tree({ indent = 20, tree, className, ...props }) {
2762
+ const containerProps = tree && typeof tree.getContainerProps === "function" ? tree.getContainerProps() : {};
2763
+ const { style: propStyle, ...otherProps } = {
2764
+ ...props,
2765
+ ...containerProps
2766
+ };
2767
+ const mergedStyle = {
2768
+ ...propStyle,
2769
+ "--tree-indent": `${indent}px`
2770
+ };
2771
+ return /* @__PURE__ */ jsx(TreeContext.Provider, {
2772
+ value: {
2773
+ indent,
2774
+ tree
2775
+ },
2776
+ children: /* @__PURE__ */ jsx("div", {
2777
+ className: cn("flex flex-col", className),
2778
+ "data-slot": "tree",
2779
+ style: mergedStyle,
2780
+ ...otherProps
2781
+ })
2782
+ });
2783
+ }
2784
+ const ACTIVATION_KEYS = new Set([
2785
+ "Enter",
2786
+ " ",
2787
+ "Spacebar"
2788
+ ]);
2789
+ function TreeItem({ item, className, children, onActivate, onClick: userOnClick, onKeyDown: userOnKeyDown, style: userStyle, ...props }) {
2790
+ const { indent } = useTreeContext();
2791
+ const { style: itemStyle, onClick: _headlessOnClick, ...restItemProps } = typeof item.getProps === "function" ? item.getProps() : {};
2792
+ const activate = () => {
2793
+ if (typeof item.setFocused === "function") item.setFocused();
2794
+ if (onActivate) onActivate(item);
2795
+ else {
2796
+ if (typeof item.primaryAction === "function") item.primaryAction();
2797
+ if (typeof item.isFolder === "function" && item.isFolder()) item.isExpanded() ? item.collapse() : item.expand();
2798
+ }
2799
+ };
2800
+ const handleClick = (event) => {
2801
+ userOnClick?.(event);
2802
+ if (event.defaultPrevented) return;
2803
+ if (event.target.closest("button, [role=\"checkbox\"], input, a")) return;
2804
+ activate();
2805
+ };
2806
+ const handleKeyDown = (event) => {
2807
+ userOnKeyDown?.(event);
2808
+ if (event.defaultPrevented) return;
2809
+ if (event.target !== event.currentTarget) return;
2810
+ if (ACTIVATION_KEYS.has(event.key)) {
2811
+ event.preventDefault();
2812
+ activate();
2813
+ }
2814
+ };
2815
+ const mergedStyle = {
2816
+ ...userStyle,
2817
+ ...itemStyle,
2818
+ "--tree-padding": `${item.getItemMeta().level * indent}px`
2819
+ };
2820
+ return /* @__PURE__ */ jsx(TreeContext.Provider, {
2821
+ value: {
2822
+ currentItem: item,
2823
+ indent
2824
+ },
2825
+ children: /* @__PURE__ */ jsx("div", {
2826
+ role: "treeitem",
2827
+ className: cn("relative z-10 flex w-full cursor-pointer items-center gap-1.5 rounded-sm px-2 py-1.5 text-start text-sm transition-colors not-last:mb-0.5 outline-hidden select-none hover:bg-accent/50 focus:z-20 focus-visible:ring-[3px] focus-visible:ring-ring/50 data-[drag-target=true]:bg-accent data-[search-match=true]:bg-blue-400/20! data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0", className),
2828
+ "data-drag-target": typeof item.isDragTarget === "function" ? item.isDragTarget() || false : void 0,
2829
+ "data-focus": typeof item.isFocused === "function" ? item.isFocused() || false : void 0,
2830
+ "data-folder": typeof item.isFolder === "function" ? item.isFolder() || false : void 0,
2831
+ "data-search-match": typeof item.isMatchingSearch === "function" ? item.isMatchingSearch() || false : void 0,
2832
+ "data-selected": typeof item.isSelected === "function" ? item.isSelected() || false : void 0,
2833
+ "data-slot": "tree-item",
2834
+ style: mergedStyle,
2835
+ ...restItemProps,
2836
+ onClick: handleClick,
2837
+ onKeyDown: handleKeyDown,
2838
+ ...props,
2839
+ children
2840
+ })
2841
+ });
2842
+ }
2843
+ function TreeItemLabel({ item: propItem, children, className, ...props }) {
2844
+ const { currentItem } = useTreeContext();
2845
+ const t = useDsTranslation("ds");
2846
+ const item = propItem || currentItem;
2847
+ if (!item) {
2848
+ console.warn("TreeItemLabel: No item provided via props or context");
2849
+ return null;
2850
+ }
2851
+ const isFolder = typeof item.isFolder === "function" && item.isFolder();
2852
+ const isExpanded = typeof item.isExpanded === "function" && item.isExpanded();
2853
+ return /* @__PURE__ */ jsxs("span", {
2854
+ className: cn("flex flex-1 items-center gap-1 ps-(--tree-padding) text-start", className),
2855
+ "data-slot": "tree-item-label",
2856
+ ...props,
2857
+ children: [isFolder ? /* @__PURE__ */ jsx(Button, {
2858
+ "aria-label": isExpanded ? t("tree.collapse") : t("tree.expand"),
2859
+ className: "shrink-0 text-muted-foreground",
2860
+ onClick: (event) => {
2861
+ event.stopPropagation();
2862
+ if (isExpanded) item.collapse();
2863
+ else item.expand();
2864
+ },
2865
+ size: "icon-sm",
2866
+ tabIndex: -1,
2867
+ variant: "ghost",
2868
+ children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: cn("size-4", !isExpanded && "-rotate-90") })
2869
+ }) : /* @__PURE__ */ jsx("span", {
2870
+ "aria-hidden": "true",
2871
+ className: "size-6 shrink-0"
2872
+ }), children || (typeof item.getItemName === "function" ? item.getItemName() : null)]
2873
+ });
2874
+ }
2875
+ function TreeDragLine({ className, ...props }) {
2876
+ const { tree } = useTreeContext();
2877
+ if (!tree || typeof tree.getDragLineStyle !== "function") {
2878
+ console.warn("TreeDragLine: No tree provided via context or tree does not have getDragLineStyle method");
2879
+ return null;
2880
+ }
2881
+ const dragLine = tree.getDragLineStyle();
2882
+ return /* @__PURE__ */ jsx("div", {
2883
+ className: cn("-mt-px absolute z-30 h-0.5 w-[unset] bg-primary before:absolute before:-top-[3px] before:left-0 before:size-2 before:rounded-full before:border-2 before:border-primary before:bg-background", className),
2884
+ style: dragLine,
2885
+ ...props
2886
+ });
2887
+ }
2888
+
2889
+ //#endregion
2890
+ //#region src/components/data-tree.tsx
2891
+ const ROOT_ID = "__data_tree_root__";
2892
+ /** Bridges headless-tree's `SetStateFn` (value-or-updater) onto a plain setter. */
2893
+ function applyUpdater(updaterOrValue, prev) {
2894
+ return typeof updaterOrValue === "function" ? updaterOrValue(prev) : updaterOrValue;
2895
+ }
2896
+ function buildIndex(items, getKey, getChildren) {
2897
+ const data = /* @__PURE__ */ new Map();
2898
+ const children = /* @__PURE__ */ new Map();
2899
+ const walk = (nodes) => {
2900
+ const ids = [];
2901
+ for (const node of nodes) {
2902
+ const key = getKey(node);
2903
+ data.set(key, node);
2904
+ ids.push(key);
2905
+ const kids = getChildren?.(node);
2906
+ if (kids && kids.length > 0) children.set(key, walk(kids));
2907
+ }
2908
+ return ids;
2909
+ };
2910
+ return {
2911
+ data,
2912
+ children,
2913
+ roots: walk(items)
2914
+ };
2915
+ }
2916
+ function DataTree(componentProps) {
2917
+ const { items, getKey, getLabel, getChildren, getIcon, getTextValue, selectionMode = "none", selectedKeys, defaultSelectedKeys = [], onSelectionChange, expandedKeys, defaultExpandedKeys = [], onExpandedChange, indent = 20, className, "aria-label": ariaLabel } = componentProps;
2918
+ const selectable = selectionMode !== "none";
2919
+ const multiple = selectionMode === "multiple";
2920
+ const index = React.useMemo(() => buildIndex(items, getKey, getChildren), [
2921
+ items,
2922
+ getKey,
2923
+ getChildren
2924
+ ]);
2925
+ const [expandedItems = [], setExpandedState] = useControllableState({
2926
+ prop: expandedKeys,
2927
+ defaultProp: defaultExpandedKeys,
2928
+ onChange: onExpandedChange
2929
+ });
2930
+ const [selectedItems = [], setSelectedState] = useControllableState({
2931
+ prop: selectedKeys,
2932
+ defaultProp: defaultSelectedKeys,
2933
+ onChange: onSelectionChange
2934
+ });
2935
+ const setExpandedItems = (next) => setExpandedState((prev) => applyUpdater(next, prev ?? []));
2936
+ const setSelectedItems = (next) => setSelectedState((prev) => applyUpdater(next, prev ?? []));
2937
+ const tree = useTree({
2938
+ rootItemId: ROOT_ID,
2939
+ getItemName: (item) => {
2940
+ const id = item.getId();
2941
+ if (id === ROOT_ID) return "";
2942
+ const node = index.data.get(id);
2943
+ if (!node) return id;
2944
+ if (getTextValue) return getTextValue(node);
2945
+ const label = getLabel(node);
2946
+ return typeof label === "string" ? label : id;
2947
+ },
2948
+ isItemFolder: (item) => (index.children.get(item.getId())?.length ?? 0) > 0,
2949
+ dataLoader: {
2950
+ getItem: (id) => id === ROOT_ID ? void 0 : index.data.get(id),
2951
+ getChildren: (id) => id === ROOT_ID ? index.roots : index.children.get(id) ?? []
2952
+ },
2953
+ indent,
2954
+ state: {
2955
+ expandedItems,
2956
+ ...multiple ? { checkedItems: selectedItems } : selectable ? { selectedItems } : {}
2957
+ },
2958
+ setExpandedItems,
2959
+ ...multiple ? { setCheckedItems: setSelectedItems } : selectable ? { setSelectedItems } : {},
2960
+ features: [
2961
+ syncDataLoaderFeature,
2962
+ ...selectable ? [selectionFeature] : [],
2963
+ ...multiple ? [checkboxesFeature] : [],
2964
+ hotkeysCoreFeature
2965
+ ]
2966
+ });
2967
+ const renderLabel = (item) => {
2968
+ const node = index.data.get(item.getId());
2969
+ if (!node) return /* @__PURE__ */ jsx(TreeItemLabel, {});
2970
+ const label = getLabel(node);
2971
+ if (!getIcon) return /* @__PURE__ */ jsx(TreeItemLabel, { children: label });
2972
+ return /* @__PURE__ */ jsx(TreeItemLabel, { children: /* @__PURE__ */ jsxs("span", {
2973
+ className: "flex items-center gap-2",
2974
+ children: [getIcon(node, {
2975
+ isFolder: item.isFolder(),
2976
+ isExpanded: item.isExpanded()
2977
+ }) ?? /* @__PURE__ */ jsx("span", {
2978
+ "aria-hidden": "true",
2979
+ className: "size-4 shrink-0"
2980
+ }), label]
2981
+ }) });
2982
+ };
2983
+ return /* @__PURE__ */ jsx(Tree, {
2984
+ "aria-label": ariaLabel,
2985
+ className,
2986
+ indent,
2987
+ tree,
2988
+ children: tree.getItems().map((item) => {
2989
+ const checkedState = multiple ? item.getCheckedState() : void 0;
2990
+ return /* @__PURE__ */ jsxs(TreeItem, {
2991
+ item,
2992
+ onActivate: multiple ? () => item.toggleCheckedState() : selectable ? () => item.select() : void 0,
2993
+ children: [multiple ? /* @__PURE__ */ jsx(Checkbox, {
2994
+ "aria-label": item.getItemName(),
2995
+ checked: checkedState === "checked",
2996
+ indeterminate: checkedState === "indeterminate",
2997
+ onClick: (event) => event.stopPropagation(),
2998
+ onCheckedChange: (checked) => item.getCheckboxProps().onChange?.({ target: { checked } })
2999
+ }) : null, renderLabel(item)]
3000
+ }, item.getId());
3001
+ })
3002
+ });
3003
+ }
3004
+
2306
3005
  //#endregion
2307
3006
  //#region src/components/drawer.tsx
2308
3007
  const DrawerContext = createContext({ position: "bottom" });
@@ -2323,42 +3022,57 @@ function Drawer({ swipeDirection, position = "bottom", ...props }) {
2323
3022
  });
2324
3023
  }
2325
3024
  const DrawerPortal = DrawerPrimitive.Portal;
2326
- function DrawerTrigger(props) {
3025
+ const DrawerTrigger = React.forwardRef((componentProps, forwardRef) => {
2327
3026
  return /* @__PURE__ */ jsx(DrawerPrimitive.Trigger, {
3027
+ ref: forwardRef,
2328
3028
  "data-slot": "drawer-trigger",
2329
- ...props
3029
+ ...componentProps
2330
3030
  });
2331
- }
2332
- function DrawerClose(props) {
3031
+ });
3032
+ DrawerTrigger.displayName = "DrawerTrigger";
3033
+ const DrawerClose = React.forwardRef((componentProps, forwardRef) => {
2333
3034
  return /* @__PURE__ */ jsx(DrawerPrimitive.Close, {
3035
+ ref: forwardRef,
2334
3036
  "data-slot": "drawer-close",
2335
- ...props
3037
+ ...componentProps
2336
3038
  });
2337
- }
2338
- function DrawerSwipeArea({ className, position: positionProp, ...props }) {
3039
+ });
3040
+ DrawerClose.displayName = "DrawerClose";
3041
+ const DrawerSwipeArea = React.forwardRef((componentProps, forwardRef) => {
3042
+ const { className, position: positionProp, ...props } = componentProps;
2339
3043
  const { position: contextPosition } = useContext(DrawerContext);
2340
3044
  const position = positionProp ?? contextPosition;
2341
3045
  return /* @__PURE__ */ jsx(DrawerPrimitive.SwipeArea, {
3046
+ ref: forwardRef,
2342
3047
  className: cn("fixed z-50 touch-none", position === "bottom" && "inset-x-0 bottom-0 h-8", position === "top" && "inset-x-0 top-0 h-8", position === "left" && "inset-y-0 left-0 w-8", position === "right" && "inset-y-0 right-0 w-8", className),
2343
3048
  "data-slot": "drawer-swipe-area",
2344
3049
  ...props
2345
3050
  });
2346
- }
2347
- function DrawerBackdrop({ className, inContainer, ...props }) {
3051
+ });
3052
+ DrawerSwipeArea.displayName = "DrawerSwipeArea";
3053
+ const DrawerBackdrop = React.forwardRef((componentProps, forwardRef) => {
3054
+ const { className, inContainer, ...props } = componentProps;
2348
3055
  return /* @__PURE__ */ jsx(DrawerPrimitive.Backdrop, {
3056
+ ref: forwardRef,
2349
3057
  className: cn("inset-0 z-50 bg-black/10 opacity-[calc(1-var(--drawer-swipe-progress))] backdrop-blur-sm transition-opacity duration-450 ease-[cubic-bezier(0.32,0.72,0,1)] data-ending-style:opacity-0 data-starting-style:opacity-0 data-ending-style:duration-[calc(var(--drawer-swipe-strength)*400ms)] data-swiping:duration-0 supports-[-webkit-touch-callout:none]:absolute", inContainer ? "absolute" : "fixed", className),
2350
3058
  "data-slot": "drawer-backdrop",
2351
3059
  ...props
2352
3060
  });
2353
- }
2354
- function DrawerViewport({ className, position, variant = "default", inContainer, ...props }) {
3061
+ });
3062
+ DrawerBackdrop.displayName = "DrawerBackdrop";
3063
+ const DrawerViewport = React.forwardRef((componentProps, forwardRef) => {
3064
+ const { className, position, variant = "default", inContainer, ...props } = componentProps;
2355
3065
  return /* @__PURE__ */ jsx(DrawerPrimitive.Viewport, {
3066
+ ref: forwardRef,
2356
3067
  className: cn("inset-0 z-50 [--bleed:--spacing(12)] [--inset:--spacing(0)]", inContainer ? "absolute" : "fixed", "touch-none", position === "bottom" && "grid grid-rows-[1fr_auto] pt-12", position === "top" && "grid grid-rows-[auto_1fr] pb-12", position === "left" && "flex justify-start", position === "right" && "flex justify-end", variant === "inset" && "px-(--inset) sm:[--inset:--spacing(4)]", variant === "inset" && position !== "bottom" && "pt-(--inset)", variant === "inset" && position !== "top" && "pb-(--inset)", className),
2357
3068
  "data-slot": "drawer-viewport",
2358
3069
  ...props
2359
3070
  });
2360
- }
2361
- function DrawerPopup({ className, children, showCloseButton = false, position: positionProp, variant = "default", showBar = false, container, ...props }) {
3071
+ });
3072
+ DrawerViewport.displayName = "DrawerViewport";
3073
+ const DrawerPopup = React.forwardRef((componentProps, forwardRef) => {
3074
+ const { className, children, showCloseButton = false, position: positionProp, variant = "default", showBar = false, container, ...props } = componentProps;
3075
+ const t = useDsTranslation("ds");
2362
3076
  const { position: contextPosition } = useContext(DrawerContext);
2363
3077
  const position = positionProp ?? contextPosition;
2364
3078
  const inContainer = !!container;
@@ -2369,13 +3083,14 @@ function DrawerPopup({ className, children, showCloseButton = false, position: p
2369
3083
  variant,
2370
3084
  inContainer,
2371
3085
  children: /* @__PURE__ */ jsxs(DrawerPrimitive.Popup, {
3086
+ ref: forwardRef,
2372
3087
  className: cn("relative flex max-h-full min-h-0 w-full min-w-0 flex-col bg-popover not-dark:bg-clip-padding text-popover-foreground shadow-lg/5 outline-none transition-[transform,box-shadow,height,background-color] duration-450 ease-[cubic-bezier(0.32,0.72,0,1)] will-change-transform [--peek:calc(--spacing(6)-1px)] [--scale-base:calc(max(0,1-(var(--nested-drawers)*var(--stack-step))))] [--scale:clamp(0,calc(var(--scale-base)+(var(--stack-step)*var(--stack-progress))),1)] [--shrink:calc(1-var(--scale))] [--stack-peek-offset:max(0px,calc((var(--nested-drawers)-var(--stack-progress))*var(--peek)))] [--stack-progress:clamp(0,var(--drawer-swipe-progress),1)] [--stack-step:0.05] before:pointer-events-none before:absolute before:inset-0 before:shadow-[0_1px_--theme(--color-black/4%)] after:pointer-events-none after:absolute after:bg-popover data-swiping:select-none data-nested-drawer-open:overflow-hidden data-nested-drawer-open:bg-[color-mix(in_srgb,var(--popover),var(--color-black)_calc(2%*(var(--nested-drawers)-var(--stack-progress))))] data-ending-style:shadow-transparent data-starting-style:shadow-transparent data-ending-style:duration-[calc(var(--drawer-swipe-strength)*400ms)] dark:data-nested-drawer-open:bg-[color-mix(in_srgb,var(--popover),var(--color-black)_calc(6%*(var(--nested-drawers)-var(--stack-progress))))] dark:before:shadow-[0_-1px_--theme(--color-white/6%)]", "touch-none", position === "bottom" && "transform-[translateY(calc(var(--drawer-snap-point-offset)+var(--drawer-swipe-movement-y)))] data-ending-style:transform-[translateY(calc(100%+env(safe-area-inset-bottom,0px)+var(--inset)))] data-starting-style:transform-[translateY(calc(100%+env(safe-area-inset-bottom,0px)+var(--inset)))] row-start-2 -mb-[max(0px,calc(var(--drawer-snap-point-offset,0px)+clamp(0,1,var(--drawer-snap-point-offset,0px)/1px)*var(--drawer-swipe-movement-y,0px)))] border-t pb-[max(0px,calc(env(safe-area-inset-bottom,0px)+var(--drawer-snap-point-offset,0px)+clamp(0,1,var(--drawer-snap-point-offset,0px)/1px)*var(--drawer-swipe-movement-y,0px)))] not-data-starting-style:not-data-ending-style:transition-[transform,box-shadow,height,background-color,margin,padding] after:inset-x-0 after:top-full after:h-(--bleed) has-data-[slot=drawer-bar]:pt-2 data-ending-style:mb-0 data-starting-style:mb-0 data-ending-style:pb-0 data-starting-style:pb-0", position === "top" && "data-starting-style:transform-[translateY(calc(-100%-var(--inset)))] data-ending-style:transform-[translateY(calc(-100%-var(--inset)))] transform-[translateY(var(--drawer-swipe-movement-y))] border-b after:inset-x-0 after:bottom-full after:h-(--bleed) has-data-[slot=drawer-bar]:pb-2", position === "left" && "data-starting-style:transform-[translateX(calc(-100%-var(--inset)))] data-ending-style:transform-[translateX(calc(-100%-var(--inset)))] transform-[translateX(var(--drawer-swipe-movement-x))] w-[calc(100%-(--spacing(12)))] max-w-md border-e after:inset-y-0 after:end-full after:w-(--bleed) has-data-[slot=drawer-bar]:pe-2", position === "right" && "transform-[translateX(var(--drawer-swipe-movement-x))] data-ending-style:transform-[translateX(calc(100%+var(--inset)))] data-starting-style:transform-[translateX(calc(100%+var(--inset)))] col-start-2 w-[calc(100%-(--spacing(12)))] max-w-md border-s after:inset-y-0 after:start-full after:w-(--bleed) has-data-[slot=drawer-bar]:ps-2", variant !== "straight" && cn(position === "bottom" && "rounded-t-2xl", position === "top" && "rounded-b-2xl **:data-[slot=drawer-footer]:rounded-b-[calc(var(--radius-2xl)-1px)]", position === "left" && "rounded-e-2xl **:data-[slot=drawer-footer]:rounded-ee-[calc(var(--radius-2xl)-1px)]", position === "right" && "rounded-s-2xl **:data-[slot=drawer-footer]:rounded-es-[calc(var(--radius-2xl)-1px)]"), variant === "default" && cn(position === "bottom" && "before:rounded-t-[calc(var(--radius-2xl)-1px)]", position === "top" && "before:rounded-b-[calc(var(--radius-2xl)-1px)]", position === "left" && "before:rounded-e-[calc(var(--radius-2xl)-1px)]", position === "right" && "before:rounded-s-[calc(var(--radius-2xl)-1px)]"), variant === "inset" && "before:hidden sm:rounded-2xl sm:border sm:after:bg-transparent sm:before:rounded-[calc(var(--radius-2xl)-1px)] sm:**:data-[slot=drawer-footer]:rounded-b-[calc(var(--radius-2xl)-1px)]", variant === "straight" && "[--stack-step:0]", (position === "bottom" || position === "top") && "h-(--drawer-height,auto) [--height:max(0px,calc(var(--drawer-frontmost-height,var(--drawer-height))))] data-nested-drawer-open:h-(--height)", position === "bottom" && "data-nested-drawer-open:transform-[translateY(calc(var(--drawer-swipe-movement-y)-var(--stack-peek-offset)-(var(--shrink)*var(--height))))_scale(var(--scale))] origin-[50%_calc(100%-var(--inset))]", position === "top" && "data-nested-drawer-open:transform-[translateY(calc(var(--drawer-swipe-movement-y)+var(--stack-peek-offset)+(var(--shrink)*var(--height))))_scale(var(--scale))] origin-[50%_var(--inset)]", position === "left" && "data-nested-drawer-open:transform-[translateX(calc(var(--drawer-swipe-movement-x)+var(--stack-peek-offset)))_scale(var(--scale))] origin-right", position === "right" && "data-nested-drawer-open:transform-[translateX(calc(var(--drawer-swipe-movement-x)-var(--stack-peek-offset)))_scale(var(--scale))] origin-left", className),
2373
3088
  "data-slot": "drawer-popup",
2374
3089
  ...props,
2375
3090
  children: [
2376
3091
  children,
2377
3092
  showCloseButton && /* @__PURE__ */ jsx(DrawerPrimitive.Close, {
2378
- "aria-label": "Close",
3093
+ "aria-label": t("drawer.close"),
2379
3094
  className: "absolute end-2 top-2",
2380
3095
  render: /* @__PURE__ */ jsx(Button, {
2381
3096
  size: "icon",
@@ -2388,46 +3103,61 @@ function DrawerPopup({ className, children, showCloseButton = false, position: p
2388
3103
  })
2389
3104
  })]
2390
3105
  });
2391
- }
2392
- function DrawerHeader({ className, allowSelection = false, render, ...props }) {
3106
+ });
3107
+ DrawerPopup.displayName = "DrawerPopup";
3108
+ const DrawerHeader = React.forwardRef((componentProps, forwardRef) => {
3109
+ const { className, allowSelection = false, render, ...props } = componentProps;
2393
3110
  return useRender({
2394
3111
  defaultTagName: "div",
2395
3112
  props: mergeProps({
2396
3113
  className: cn("flex flex-col gap-2 p-6 in-[[data-slot=drawer-popup]:has([data-slot=drawer-panel])]:pb-3 max-sm:pb-4", !allowSelection && "cursor-default", className),
3114
+ ref: forwardRef,
2397
3115
  "data-slot": "drawer-header"
2398
3116
  }, props),
2399
3117
  render: allowSelection ? /* @__PURE__ */ jsx(DrawerContent, { render }) : render
2400
3118
  });
2401
- }
2402
- function DrawerFooter({ className, variant = "default", allowSelection = true, render, ...props }) {
3119
+ });
3120
+ DrawerHeader.displayName = "DrawerHeader";
3121
+ const DrawerFooter = React.forwardRef((componentProps, forwardRef) => {
3122
+ const { className, variant = "default", allowSelection = true, render, ...props } = componentProps;
2403
3123
  return useRender({
2404
3124
  defaultTagName: "div",
2405
3125
  props: mergeProps({
2406
3126
  className: cn("flex flex-col-reverse gap-2 px-6 pb-(--safe-area-inset-bottom,0px) sm:flex-row sm:justify-end", !allowSelection && "cursor-default", variant === "default" && "border-t bg-muted/72 pt-4 pb-[calc(env(safe-area-inset-bottom,0px)+--spacing(4))]", variant === "bare" && "in-[[data-slot=drawer-popup]:has([data-slot=drawer-panel])]:pt-3 pt-4 pb-[calc(env(safe-area-inset-bottom,0px)+--spacing(6))]", className),
3127
+ ref: forwardRef,
2407
3128
  "data-slot": "drawer-footer"
2408
3129
  }, props),
2409
3130
  render: allowSelection ? /* @__PURE__ */ jsx(DrawerContent, { render }) : render
2410
3131
  });
2411
- }
2412
- function DrawerTitle({ className, ...props }) {
3132
+ });
3133
+ DrawerFooter.displayName = "DrawerFooter";
3134
+ const DrawerTitle = React.forwardRef((componentProps, forwardRef) => {
3135
+ const { className, ...props } = componentProps;
2413
3136
  return /* @__PURE__ */ jsx(DrawerPrimitive.Title, {
3137
+ ref: forwardRef,
2414
3138
  className: cn("font-heading font-semibold text-xl leading-none", className),
2415
3139
  "data-slot": "drawer-title",
2416
3140
  ...props
2417
3141
  });
2418
- }
2419
- function DrawerDescription({ className, ...props }) {
3142
+ });
3143
+ DrawerTitle.displayName = "DrawerTitle";
3144
+ const DrawerDescription = React.forwardRef((componentProps, forwardRef) => {
3145
+ const { className, ...props } = componentProps;
2420
3146
  return /* @__PURE__ */ jsx(DrawerPrimitive.Description, {
3147
+ ref: forwardRef,
2421
3148
  className: cn("text-muted-foreground text-sm", className),
2422
3149
  "data-slot": "drawer-description",
2423
3150
  ...props
2424
3151
  });
2425
- }
2426
- function DrawerPanel({ className, scrollFade = true, scrollable = true, allowSelection = true, render, ...props }) {
3152
+ });
3153
+ DrawerDescription.displayName = "DrawerDescription";
3154
+ const DrawerPanel = React.forwardRef((componentProps, forwardRef) => {
3155
+ const { className, scrollFade = true, scrollable = true, allowSelection = true, render, ...props } = componentProps;
2427
3156
  const content = useRender({
2428
3157
  defaultTagName: "div",
2429
3158
  props: mergeProps({
2430
3159
  className: cn("p-6 in-[[data-slot=drawer-popup]:has([data-slot=drawer-header])]:pt-1 in-[[data-slot=drawer-popup]:has([data-slot=drawer-footer]:not(.border-t))]:pb-1", !allowSelection && "cursor-default", className),
3160
+ ref: forwardRef,
2431
3161
  "data-slot": "drawer-panel"
2432
3162
  }, props),
2433
3163
  render: allowSelection ? /* @__PURE__ */ jsx(DrawerContent, { render }) : render
@@ -2438,8 +3168,10 @@ function DrawerPanel({ className, scrollFade = true, scrollable = true, allowSel
2438
3168
  children: content
2439
3169
  });
2440
3170
  return content;
2441
- }
2442
- function DrawerBar({ className, position: positionProp, render, ...props }) {
3171
+ });
3172
+ DrawerPanel.displayName = "DrawerPanel";
3173
+ const DrawerBar = React.forwardRef((componentProps, forwardRef) => {
3174
+ const { className, position: positionProp, render, ...props } = componentProps;
2443
3175
  const { position: contextPosition } = useContext(DrawerContext);
2444
3176
  const position = positionProp ?? contextPosition;
2445
3177
  const horizontal = position === "left" || position === "right";
@@ -2448,27 +3180,34 @@ function DrawerBar({ className, position: positionProp, render, ...props }) {
2448
3180
  props: mergeProps({
2449
3181
  "aria-hidden": true,
2450
3182
  className: cn("absolute flex touch-none items-center justify-center p-3 before:rounded-full before:bg-input", horizontal ? "inset-y-0 before:h-12 before:w-1" : "inset-x-0 before:h-1 before:w-12", position === "top" && "bottom-0", position === "bottom" && "top-0", position === "left" && "right-0", position === "right" && "left-0", className),
3183
+ ref: forwardRef,
2451
3184
  "data-slot": "drawer-bar"
2452
3185
  }, props),
2453
3186
  render
2454
3187
  });
2455
- }
3188
+ });
3189
+ DrawerBar.displayName = "DrawerBar";
2456
3190
  const DrawerContent = DrawerPrimitive.Content;
2457
- function DrawerMenu({ className, render, ...props }) {
3191
+ const DrawerMenu = React.forwardRef((componentProps, forwardRef) => {
3192
+ const { className, render, ...props } = componentProps;
2458
3193
  return useRender({
2459
3194
  defaultTagName: "nav",
2460
3195
  props: mergeProps({
2461
3196
  className: cn("-m-2 flex flex-col", className),
3197
+ ref: forwardRef,
2462
3198
  "data-slot": "drawer-menu"
2463
3199
  }, props),
2464
3200
  render
2465
3201
  });
2466
- }
2467
- function DrawerMenuItem({ className, variant = "default", render, disabled, ...props }) {
3202
+ });
3203
+ DrawerMenu.displayName = "DrawerMenu";
3204
+ const DrawerMenuItem = React.forwardRef((componentProps, forwardRef) => {
3205
+ const { className, variant = "default", render, disabled, ...props } = componentProps;
2468
3206
  return useRender({
2469
3207
  defaultTagName: "button",
2470
3208
  props: mergeProps({
2471
3209
  className: cn("flex min-h-9 w-full cursor-default select-none items-center gap-2 rounded-sm px-2 py-1 text-base text-foreground outline-none hover:bg-accent hover:text-accent-foreground disabled:pointer-events-none disabled:opacity-64 data-[variant=destructive]:text-destructive-foreground sm:min-h-8 sm:text-sm [&>svg:not([class*='opacity-'])]:opacity-80 [&>svg:not([class*='size-'])]:size-4.5 sm:[&>svg:not([class*='size-'])]:size-4 [&>svg]:pointer-events-none [&>svg]:-mx-0.5 [&>svg]:shrink-0", className),
3210
+ ref: forwardRef,
2472
3211
  "data-slot": "drawer-menu-item",
2473
3212
  "data-variant": variant,
2474
3213
  disabled,
@@ -2476,47 +3215,62 @@ function DrawerMenuItem({ className, variant = "default", render, disabled, ...p
2476
3215
  }, props),
2477
3216
  render
2478
3217
  });
2479
- }
2480
- function DrawerMenuSeparator({ className, render, ...props }) {
3218
+ });
3219
+ DrawerMenuItem.displayName = "DrawerMenuItem";
3220
+ const DrawerMenuSeparator = React.forwardRef((componentProps, forwardRef) => {
3221
+ const { className, render, ...props } = componentProps;
2481
3222
  return useRender({
2482
3223
  defaultTagName: "div",
2483
3224
  props: mergeProps({
2484
3225
  className: cn("mx-2 my-1 h-px bg-border", className),
3226
+ ref: forwardRef,
2485
3227
  "data-slot": "drawer-menu-separator"
2486
3228
  }, props),
2487
3229
  render
2488
3230
  });
2489
- }
2490
- function DrawerMenuGroup({ className, render, ...props }) {
3231
+ });
3232
+ DrawerMenuSeparator.displayName = "DrawerMenuSeparator";
3233
+ const DrawerMenuGroup = React.forwardRef((componentProps, forwardRef) => {
3234
+ const { className, render, ...props } = componentProps;
2491
3235
  return useRender({
2492
3236
  defaultTagName: "div",
2493
3237
  props: mergeProps({
2494
3238
  className: cn("flex flex-col", className),
3239
+ ref: forwardRef,
2495
3240
  "data-slot": "drawer-menu-group"
2496
3241
  }, props),
2497
3242
  render
2498
3243
  });
2499
- }
2500
- function DrawerMenuGroupLabel({ className, render, ...props }) {
3244
+ });
3245
+ DrawerMenuGroup.displayName = "DrawerMenuGroup";
3246
+ const DrawerMenuGroupLabel = React.forwardRef((componentProps, forwardRef) => {
3247
+ const { className, render, ...props } = componentProps;
2501
3248
  return useRender({
2502
3249
  defaultTagName: "div",
2503
3250
  props: mergeProps({
2504
3251
  className: cn("px-2 py-1.5 font-medium text-muted-foreground text-xs", className),
3252
+ ref: forwardRef,
2505
3253
  "data-slot": "drawer-menu-group-label"
2506
3254
  }, props),
2507
3255
  render
2508
3256
  });
2509
- }
2510
- function DrawerMenuTrigger({ className, children, ...props }) {
3257
+ });
3258
+ DrawerMenuGroupLabel.displayName = "DrawerMenuGroupLabel";
3259
+ const DrawerMenuTrigger = React.forwardRef((componentProps, forwardRef) => {
3260
+ const { className, children, ...props } = componentProps;
2511
3261
  return /* @__PURE__ */ jsxs(DrawerTrigger, {
3262
+ ref: forwardRef,
2512
3263
  className: cn("flex min-h-9 w-full cursor-default select-none items-center gap-2 rounded-sm px-2 py-1 text-base text-foreground outline-none hover:bg-accent hover:text-accent-foreground sm:min-h-8 sm:text-sm [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0", className),
2513
3264
  "data-slot": "drawer-menu-trigger",
2514
3265
  ...props,
2515
3266
  children: [children, /* @__PURE__ */ jsx(ChevronRightIcon, { className: "ms-auto -me-0.5 opacity-80" })]
2516
3267
  });
2517
- }
2518
- function DrawerMenuCheckboxItem({ className, children, checked, defaultChecked, onCheckedChange, variant = "default", disabled, render, ...props }) {
3268
+ });
3269
+ DrawerMenuTrigger.displayName = "DrawerMenuTrigger";
3270
+ const DrawerMenuCheckboxItem = React.forwardRef((componentProps, forwardRef) => {
3271
+ const { className, children, checked, defaultChecked, onCheckedChange, variant = "default", disabled, render, ...props } = componentProps;
2519
3272
  return /* @__PURE__ */ jsx(Checkbox$1.Root, {
3273
+ ref: forwardRef,
2520
3274
  checked,
2521
3275
  className: cn("grid min-h-9 w-full cursor-default select-none items-center gap-2 rounded-sm px-2 py-1 text-base text-foreground outline-none hover:bg-accent hover:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-64 sm:min-h-8 sm:text-sm [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:-mx-0.5 [&_svg]:shrink-0", variant === "switch" ? "grid-cols-[1fr_auto] gap-4 pe-1.5" : "grid-cols-[1rem_1fr] pe-4", className),
2522
3276
  "data-slot": "drawer-menu-checkbox-item",
@@ -2551,16 +3305,22 @@ function DrawerMenuCheckboxItem({ className, children, checked, defaultChecked,
2551
3305
  children
2552
3306
  })] })
2553
3307
  });
2554
- }
2555
- function DrawerMenuRadioGroup({ className, ...props }) {
3308
+ });
3309
+ DrawerMenuCheckboxItem.displayName = "DrawerMenuCheckboxItem";
3310
+ const DrawerMenuRadioGroup = React.forwardRef((componentProps, forwardRef) => {
3311
+ const { className, ...props } = componentProps;
2556
3312
  return /* @__PURE__ */ jsx(RadioGroup$1, {
3313
+ ref: forwardRef,
2557
3314
  className: cn("flex flex-col", className),
2558
3315
  "data-slot": "drawer-menu-radio-group",
2559
3316
  ...props
2560
3317
  });
2561
- }
2562
- function DrawerMenuRadioItem({ className, children, value, disabled, render, ...props }) {
3318
+ });
3319
+ DrawerMenuRadioGroup.displayName = "DrawerMenuRadioGroup";
3320
+ const DrawerMenuRadioItem = React.forwardRef((componentProps, forwardRef) => {
3321
+ const { className, children, value, disabled, render, ...props } = componentProps;
2563
3322
  return /* @__PURE__ */ jsxs(Radio.Root, {
3323
+ ref: forwardRef,
2564
3324
  className: cn("grid min-h-9 w-full cursor-default select-none items-center gap-2 rounded-sm px-2 py-1 text-base text-foreground outline-none hover:bg-accent hover:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-64 sm:min-h-8 sm:text-sm [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:-mx-0.5 [&_svg]:shrink-0", "grid-cols-[1rem_1fr] items-center pe-4", className),
2565
3325
  "data-slot": "drawer-menu-radio-item",
2566
3326
  disabled,
@@ -2586,29 +3346,34 @@ function DrawerMenuRadioItem({ className, children, value, disabled, render, ...
2586
3346
  children
2587
3347
  })]
2588
3348
  });
2589
- }
3349
+ });
3350
+ DrawerMenuRadioItem.displayName = "DrawerMenuRadioItem";
2590
3351
 
2591
3352
  //#endregion
2592
3353
  //#region src/components/dropdown-menu.tsx
2593
- function DropdownMenu({ ...props }) {
3354
+ function DropdownMenu(componentProps) {
2594
3355
  return /* @__PURE__ */ jsx(Menu.Root, {
2595
3356
  "data-slot": "dropdown-menu",
2596
- ...props
3357
+ ...componentProps
2597
3358
  });
2598
3359
  }
2599
- function DropdownMenuPortal({ ...props }) {
3360
+ function DropdownMenuPortal(componentProps) {
2600
3361
  return /* @__PURE__ */ jsx(Menu.Portal, {
2601
3362
  "data-slot": "dropdown-menu-portal",
2602
- ...props
3363
+ ...componentProps
2603
3364
  });
2604
3365
  }
2605
- function DropdownMenuTrigger({ ...props }) {
3366
+ const DropdownMenuTrigger = React.forwardRef((componentProps, forwardRef) => {
3367
+ const { ...props } = componentProps;
2606
3368
  return /* @__PURE__ */ jsx(Menu.Trigger, {
3369
+ ref: forwardRef,
2607
3370
  "data-slot": "dropdown-menu-trigger",
2608
3371
  ...props
2609
3372
  });
2610
- }
2611
- function DropdownMenuContent({ align = "start", alignOffset = 0, side = "bottom", sideOffset = 4, className, container, ...props }) {
3373
+ });
3374
+ DropdownMenuTrigger.displayName = "DropdownMenuTrigger";
3375
+ const DropdownMenuContent = React.forwardRef((componentProps, forwardRef) => {
3376
+ const { align = "start", alignOffset = 0, side = "bottom", sideOffset = 4, className, container, ...props } = componentProps;
2612
3377
  return /* @__PURE__ */ jsx(Menu.Portal, {
2613
3378
  container,
2614
3379
  children: /* @__PURE__ */ jsx(Menu.Positioner, {
@@ -2618,53 +3383,69 @@ function DropdownMenuContent({ align = "start", alignOffset = 0, side = "bottom"
2618
3383
  side,
2619
3384
  sideOffset,
2620
3385
  children: /* @__PURE__ */ jsx(Menu.Popup, {
3386
+ ref: forwardRef,
2621
3387
  "data-slot": "dropdown-menu-content",
2622
3388
  className: cn("z-50 max-h-(--available-height) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95", className),
2623
3389
  ...props
2624
3390
  })
2625
3391
  })
2626
3392
  });
2627
- }
2628
- function DropdownMenuGroup({ ...props }) {
3393
+ });
3394
+ DropdownMenuContent.displayName = "DropdownMenuContent";
3395
+ const DropdownMenuGroup = React.forwardRef((componentProps, forwardRef) => {
3396
+ const { ...props } = componentProps;
2629
3397
  return /* @__PURE__ */ jsx(Menu.Group, {
3398
+ ref: forwardRef,
2630
3399
  "data-slot": "dropdown-menu-group",
2631
3400
  ...props
2632
3401
  });
2633
- }
2634
- function DropdownMenuLabel({ className, inset, ...props }) {
3402
+ });
3403
+ DropdownMenuGroup.displayName = "DropdownMenuGroup";
3404
+ const DropdownMenuLabel = React.forwardRef((componentProps, forwardRef) => {
3405
+ const { className, inset, ...props } = componentProps;
2635
3406
  return /* @__PURE__ */ jsx(Menu.GroupLabel, {
3407
+ ref: forwardRef,
2636
3408
  "data-slot": "dropdown-menu-label",
2637
3409
  "data-inset": inset,
2638
3410
  className: cn("px-2 py-1.5 text-xs font-medium text-muted-foreground data-inset:pl-8", className),
2639
3411
  ...props
2640
3412
  });
2641
- }
2642
- function DropdownMenuItem({ className, inset, variant = "default", ...props }) {
3413
+ });
3414
+ DropdownMenuLabel.displayName = "DropdownMenuLabel";
3415
+ const DropdownMenuItem = React.forwardRef((componentProps, forwardRef) => {
3416
+ const { className, inset, variant = "default", ...props } = componentProps;
2643
3417
  return /* @__PURE__ */ jsx(Menu.Item, {
3418
+ ref: forwardRef,
2644
3419
  "data-slot": "dropdown-menu-item",
2645
3420
  "data-inset": inset,
2646
3421
  "data-variant": variant,
2647
3422
  className: cn("group/dropdown-menu-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive", className),
2648
3423
  ...props
2649
3424
  });
2650
- }
2651
- function DropdownMenuSub({ ...props }) {
3425
+ });
3426
+ DropdownMenuItem.displayName = "DropdownMenuItem";
3427
+ function DropdownMenuSub(componentProps) {
2652
3428
  return /* @__PURE__ */ jsx(Menu.SubmenuRoot, {
2653
3429
  "data-slot": "dropdown-menu-sub",
2654
- ...props
3430
+ ...componentProps
2655
3431
  });
2656
3432
  }
2657
- function DropdownMenuSubTrigger({ className, inset, children, ...props }) {
3433
+ const DropdownMenuSubTrigger = React.forwardRef((componentProps, forwardRef) => {
3434
+ const { className, inset, children, ...props } = componentProps;
2658
3435
  return /* @__PURE__ */ jsxs(Menu.SubmenuTrigger, {
3436
+ ref: forwardRef,
2659
3437
  "data-slot": "dropdown-menu-sub-trigger",
2660
3438
  "data-inset": inset,
2661
3439
  className: cn("flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-8 data-popup-open:bg-accent data-popup-open:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
2662
3440
  ...props,
2663
3441
  children: [children, /* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto" })]
2664
3442
  });
2665
- }
2666
- function DropdownMenuSubContent({ align = "start", alignOffset = -3, side = "right", sideOffset = 0, className, ...props }) {
3443
+ });
3444
+ DropdownMenuSubTrigger.displayName = "DropdownMenuSubTrigger";
3445
+ const DropdownMenuSubContent = React.forwardRef((componentProps, forwardRef) => {
3446
+ const { align = "start", alignOffset = -3, side = "right", sideOffset = 0, className, ...props } = componentProps;
2667
3447
  return /* @__PURE__ */ jsx(DropdownMenuContent, {
3448
+ ref: forwardRef,
2668
3449
  "data-slot": "dropdown-menu-sub-content",
2669
3450
  className: cn("w-auto min-w-[96px] rounded-md bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
2670
3451
  align,
@@ -2673,9 +3454,12 @@ function DropdownMenuSubContent({ align = "start", alignOffset = -3, side = "rig
2673
3454
  sideOffset,
2674
3455
  ...props
2675
3456
  });
2676
- }
2677
- function DropdownMenuCheckboxItem({ className, children, checked, inset, ...props }) {
3457
+ });
3458
+ DropdownMenuSubContent.displayName = "DropdownMenuSubContent";
3459
+ const DropdownMenuCheckboxItem = React.forwardRef((componentProps, forwardRef) => {
3460
+ const { className, children, checked, inset, ...props } = componentProps;
2678
3461
  return /* @__PURE__ */ jsxs(Menu.CheckboxItem, {
3462
+ ref: forwardRef,
2679
3463
  "data-slot": "dropdown-menu-checkbox-item",
2680
3464
  "data-inset": inset,
2681
3465
  className: cn("relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-8 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
@@ -2687,15 +3471,21 @@ function DropdownMenuCheckboxItem({ className, children, checked, inset, ...prop
2687
3471
  children: /* @__PURE__ */ jsx(Menu.CheckboxItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, {}) })
2688
3472
  }), children]
2689
3473
  });
2690
- }
2691
- function DropdownMenuRadioGroup({ ...props }) {
3474
+ });
3475
+ DropdownMenuCheckboxItem.displayName = "DropdownMenuCheckboxItem";
3476
+ const DropdownMenuRadioGroup = React.forwardRef((componentProps, forwardRef) => {
3477
+ const { ...props } = componentProps;
2692
3478
  return /* @__PURE__ */ jsx(Menu.RadioGroup, {
3479
+ ref: forwardRef,
2693
3480
  "data-slot": "dropdown-menu-radio-group",
2694
3481
  ...props
2695
3482
  });
2696
- }
2697
- function DropdownMenuRadioItem({ className, children, inset, ...props }) {
3483
+ });
3484
+ DropdownMenuRadioGroup.displayName = "DropdownMenuRadioGroup";
3485
+ const DropdownMenuRadioItem = React.forwardRef((componentProps, forwardRef) => {
3486
+ const { className, children, inset, ...props } = componentProps;
2698
3487
  return /* @__PURE__ */ jsxs(Menu.RadioItem, {
3488
+ ref: forwardRef,
2699
3489
  "data-slot": "dropdown-menu-radio-item",
2700
3490
  "data-inset": inset,
2701
3491
  className: cn("relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-8 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
@@ -2706,45 +3496,61 @@ function DropdownMenuRadioItem({ className, children, inset, ...props }) {
2706
3496
  children: /* @__PURE__ */ jsx(Menu.RadioItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, {}) })
2707
3497
  }), children]
2708
3498
  });
2709
- }
2710
- function DropdownMenuSeparator({ className, ...props }) {
3499
+ });
3500
+ DropdownMenuRadioItem.displayName = "DropdownMenuRadioItem";
3501
+ const DropdownMenuSeparator = React.forwardRef((componentProps, forwardRef) => {
3502
+ const { className, ...props } = componentProps;
2711
3503
  return /* @__PURE__ */ jsx(Menu.Separator, {
3504
+ ref: forwardRef,
2712
3505
  "data-slot": "dropdown-menu-separator",
2713
3506
  className: cn("-mx-1 my-1 h-px bg-border", className),
2714
3507
  ...props
2715
3508
  });
2716
- }
2717
- function DropdownMenuShortcut({ className, ...props }) {
3509
+ });
3510
+ DropdownMenuSeparator.displayName = "DropdownMenuSeparator";
3511
+ const DropdownMenuShortcut = React.forwardRef((componentProps, forwardRef) => {
3512
+ const { className, ...props } = componentProps;
2718
3513
  return /* @__PURE__ */ jsx("span", {
3514
+ ref: forwardRef,
2719
3515
  "data-slot": "dropdown-menu-shortcut",
2720
3516
  className: cn("ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground", className),
2721
3517
  ...props
2722
3518
  });
2723
- }
2724
- function DropdownMenuAddon({ className, ...props }) {
3519
+ });
3520
+ DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
3521
+ const DropdownMenuAddon = React.forwardRef((componentProps, forwardRef) => {
3522
+ const { className, ...props } = componentProps;
2725
3523
  return /* @__PURE__ */ jsx("span", {
3524
+ ref: forwardRef,
2726
3525
  "data-slot": "dropdown-menu-addon",
2727
3526
  className: cn("ml-auto shrink-0 inline-flex items-center", className),
2728
3527
  ...props
2729
3528
  });
2730
- }
3529
+ });
3530
+ DropdownMenuAddon.displayName = "DropdownMenuAddon";
2731
3531
 
2732
3532
  //#endregion
2733
3533
  //#region src/components/empty.tsx
2734
- function Empty({ className, ...props }) {
3534
+ const Empty = React.forwardRef((componentProps, forwardRef) => {
3535
+ const { className, ...props } = componentProps;
2735
3536
  return /* @__PURE__ */ jsx("div", {
3537
+ ref: forwardRef,
2736
3538
  "data-slot": "empty",
2737
3539
  className: cn("flex min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-lg p-6 text-center text-balance md:p-12", className),
2738
3540
  ...props
2739
3541
  });
2740
- }
2741
- function EmptyHeader({ className, ...props }) {
3542
+ });
3543
+ Empty.displayName = "Empty";
3544
+ const EmptyHeader = React.forwardRef((componentProps, forwardRef) => {
3545
+ const { className, ...props } = componentProps;
2742
3546
  return /* @__PURE__ */ jsx("div", {
3547
+ ref: forwardRef,
2743
3548
  "data-slot": "empty-header",
2744
3549
  className: cn("flex max-w-sm flex-col items-center gap-2 text-center", className),
2745
3550
  ...props
2746
3551
  });
2747
- }
3552
+ });
3553
+ EmptyHeader.displayName = "EmptyHeader";
2748
3554
  const emptyMediaVariants = cva("flex shrink-0 items-center justify-center mb-2 [&_svg]:pointer-events-none [&_svg]:shrink-0", {
2749
3555
  variants: { variant: {
2750
3556
  default: "bg-transparent",
@@ -2752,8 +3558,10 @@ const emptyMediaVariants = cva("flex shrink-0 items-center justify-center mb-2 [
2752
3558
  } },
2753
3559
  defaultVariants: { variant: "default" }
2754
3560
  });
2755
- function EmptyMedia({ className, variant = "default", ...props }) {
3561
+ const EmptyMedia = React.forwardRef((componentProps, forwardRef) => {
3562
+ const { className, variant = "default", ...props } = componentProps;
2756
3563
  return /* @__PURE__ */ jsx("div", {
3564
+ ref: forwardRef,
2757
3565
  "data-slot": "empty-icon",
2758
3566
  "data-variant": variant,
2759
3567
  className: cn(emptyMediaVariants({
@@ -2762,34 +3570,44 @@ function EmptyMedia({ className, variant = "default", ...props }) {
2762
3570
  })),
2763
3571
  ...props
2764
3572
  });
2765
- }
2766
- function EmptyTitle({ className, ...props }) {
3573
+ });
3574
+ EmptyMedia.displayName = "EmptyMedia";
3575
+ const EmptyTitle = React.forwardRef((componentProps, forwardRef) => {
3576
+ const { className, ...props } = componentProps;
2767
3577
  return /* @__PURE__ */ jsx("div", {
3578
+ ref: forwardRef,
2768
3579
  "data-slot": "empty-title",
2769
3580
  className: cn("text-sm font-medium tracking-tight", className),
2770
3581
  ...props
2771
3582
  });
2772
- }
2773
- function EmptyDescription({ className, ...props }) {
3583
+ });
3584
+ EmptyTitle.displayName = "EmptyTitle";
3585
+ const EmptyDescription = React.forwardRef((componentProps, forwardRef) => {
3586
+ const { className, ...props } = componentProps;
2774
3587
  return /* @__PURE__ */ jsx("div", {
3588
+ ref: forwardRef,
2775
3589
  "data-slot": "empty-description",
2776
3590
  className: cn("text-muted-foreground [&>a:hover]:text-primary text-sm [&>a]:underline [&>a]:underline-offset-4", className),
2777
3591
  ...props
2778
3592
  });
2779
- }
2780
- function EmptyContent({ className, ...props }) {
3593
+ });
3594
+ EmptyDescription.displayName = "EmptyDescription";
3595
+ const EmptyContent = React.forwardRef((componentProps, forwardRef) => {
3596
+ const { className, ...props } = componentProps;
2781
3597
  return /* @__PURE__ */ jsx("div", {
3598
+ ref: forwardRef,
2782
3599
  "data-slot": "empty-content",
2783
3600
  className: cn("flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm text-balance", className),
2784
3601
  ...props
2785
3602
  });
2786
- }
3603
+ });
3604
+ EmptyContent.displayName = "EmptyContent";
2787
3605
 
2788
3606
  //#endregion
2789
3607
  //#region src/components/dropzone.tsx
2790
- const DropzoneContext = React$1.createContext(null);
3608
+ const DropzoneContext = React.createContext(null);
2791
3609
  function useDropzoneContext() {
2792
- const ctx = React$1.useContext(DropzoneContext);
3610
+ const ctx = React.useContext(DropzoneContext);
2793
3611
  if (!ctx) throw new Error("Dropzone subcomponents must be rendered inside <Dropzone>.");
2794
3612
  return ctx;
2795
3613
  }
@@ -2867,17 +3685,18 @@ function validateFiles(files, options) {
2867
3685
  * standard dashed-border look, or compose around any other control (textarea,
2868
3686
  * etc.) for file-drop on an arbitrary surface.
2869
3687
  */
2870
- const Dropzone = React$1.forwardRef(({ className, children, onFiles, onError, accept, multiple = false, maxFiles, maxSize, minSize, disabled = false, hoverMessage = "Drop your file here to upload", dragRejectMessage, onDragEnter, onDragLeave, onDragOver, ...props }, ref) => {
2871
- const inputRef = React$1.useRef(null);
2872
- const [isDragging, setIsDragging] = React$1.useState(false);
2873
- const [isDragReject, setIsDragReject] = React$1.useState(false);
2874
- const dragCounterRef = React$1.useRef(0);
2875
- const acceptPatterns = React$1.useMemo(() => parseAccept(accept), [accept]);
2876
- const open = React$1.useCallback(() => {
3688
+ const Dropzone = React.forwardRef((componentProps, forwardRef) => {
3689
+ const { className, children, onFiles, onError, accept, multiple = false, maxFiles, maxSize, minSize, disabled = false, hoverMessage = "Drop your file here to upload", dragRejectMessage, onDragEnter, onDragLeave, onDragOver, ...props } = componentProps;
3690
+ const inputRef = React.useRef(null);
3691
+ const [isDragging, setIsDragging] = React.useState(false);
3692
+ const [isDragReject, setIsDragReject] = React.useState(false);
3693
+ const dragCounterRef = React.useRef(0);
3694
+ const acceptPatterns = React.useMemo(() => parseAccept(accept), [accept]);
3695
+ const open = React.useCallback(() => {
2877
3696
  if (disabled) return;
2878
3697
  inputRef.current?.click();
2879
3698
  }, [disabled]);
2880
- const ctx = React$1.useMemo(() => ({
3699
+ const ctx = React.useMemo(() => ({
2881
3700
  inputRef,
2882
3701
  disabled,
2883
3702
  open
@@ -2938,7 +3757,7 @@ const Dropzone = React$1.forwardRef(({ className, children, onFiles, onError, ac
2938
3757
  return /* @__PURE__ */ jsx(DropzoneContext.Provider, {
2939
3758
  value: ctx,
2940
3759
  children: /* @__PURE__ */ jsxs("div", {
2941
- ref,
3760
+ ref: forwardRef,
2942
3761
  "data-slot": "dropzone",
2943
3762
  "data-state": overlayState,
2944
3763
  "data-disabled": disabled || void 0,
@@ -2983,10 +3802,11 @@ Dropzone.displayName = "Dropzone";
2983
3802
  * Space / Enter open the picker. Omit it (and use `<DropzoneTrigger>`)
2984
3803
  * when you want file-drop on an existing surface instead.
2985
3804
  */
2986
- const DropzoneContent = React$1.forwardRef(({ className, error = false, onClick, onKeyDown, ...props }, ref) => {
3805
+ const DropzoneContent = React.forwardRef((componentProps, forwardRef) => {
3806
+ const { className, error = false, onClick, onKeyDown, ...props } = componentProps;
2987
3807
  const { open, disabled } = useDropzoneContext();
2988
3808
  return /* @__PURE__ */ jsx("div", {
2989
- ref,
3809
+ ref: forwardRef,
2990
3810
  role: "button",
2991
3811
  tabIndex: disabled ? -1 : 0,
2992
3812
  "aria-disabled": disabled || void 0,
@@ -3011,45 +3831,57 @@ const DropzoneContent = React$1.forwardRef(({ className, error = false, onClick,
3011
3831
  });
3012
3832
  DropzoneContent.displayName = "DropzoneContent";
3013
3833
  /** `<EmptyMedia>` with `variant="icon"` baked in. */
3014
- function DropzoneIcon({ variant = "icon", ...props }) {
3834
+ const DropzoneIcon = React.forwardRef((componentProps, forwardRef) => {
3835
+ const { variant = "icon", ...props } = componentProps;
3015
3836
  return /* @__PURE__ */ jsx(EmptyMedia, {
3837
+ ref: forwardRef,
3016
3838
  "data-slot": "dropzone-icon",
3017
3839
  variant,
3018
3840
  ...props
3019
3841
  });
3020
- }
3021
- function DropzoneTitle({ className, ...props }) {
3842
+ });
3843
+ DropzoneIcon.displayName = "DropzoneIcon";
3844
+ const DropzoneTitle = React.forwardRef((componentProps, forwardRef) => {
3845
+ const { className, ...props } = componentProps;
3022
3846
  return /* @__PURE__ */ jsx(EmptyTitle, {
3847
+ ref: forwardRef,
3023
3848
  "data-slot": "dropzone-title",
3024
3849
  className: cn("text-foreground", className),
3025
3850
  ...props
3026
3851
  });
3027
- }
3028
- function DropzoneDescription(props) {
3852
+ });
3853
+ DropzoneTitle.displayName = "DropzoneTitle";
3854
+ const DropzoneDescription = React.forwardRef((componentProps, forwardRef) => {
3029
3855
  return /* @__PURE__ */ jsx(EmptyDescription, {
3856
+ ref: forwardRef,
3030
3857
  "data-slot": "dropzone-description",
3031
- ...props
3858
+ ...componentProps
3032
3859
  });
3033
- }
3034
- function DropzoneActions({ className, ...props }) {
3860
+ });
3861
+ DropzoneDescription.displayName = "DropzoneDescription";
3862
+ const DropzoneActions = React.forwardRef((componentProps, forwardRef) => {
3863
+ const { className, ...props } = componentProps;
3035
3864
  return /* @__PURE__ */ jsx("div", {
3865
+ ref: forwardRef,
3036
3866
  "data-slot": "dropzone-actions",
3037
3867
  className: cn("mt-2 flex items-center gap-2", className),
3038
3868
  onClick: (event) => event.stopPropagation(),
3039
3869
  onKeyDown: (event) => event.stopPropagation(),
3040
3870
  ...props
3041
3871
  });
3042
- }
3872
+ });
3873
+ DropzoneActions.displayName = "DropzoneActions";
3043
3874
  /**
3044
3875
  * Opens the file picker on click. Default-renders a DS `<Button>`; pass
3045
3876
  * `render` (Base UI convention) to substitute another element.
3046
3877
  */
3047
- const DropzoneTrigger = React$1.forwardRef(({ render, onClick, ...props }, ref) => {
3878
+ const DropzoneTrigger = React.forwardRef((componentProps, forwardRef) => {
3879
+ const { render, onClick, ...props } = componentProps;
3048
3880
  const { open, disabled } = useDropzoneContext();
3049
3881
  return useRender({
3050
3882
  defaultTagName: "button",
3051
3883
  props: mergeProps({
3052
- ref,
3884
+ ref: forwardRef,
3053
3885
  type: "button",
3054
3886
  "data-slot": "dropzone-trigger",
3055
3887
  disabled,
@@ -3066,21 +3898,23 @@ DropzoneTrigger.displayName = "DropzoneTrigger";
3066
3898
 
3067
3899
  //#endregion
3068
3900
  //#region src/components/popover.tsx
3069
- function Popover({ ...props }) {
3901
+ function Popover(componentProps) {
3902
+ const { ...props } = componentProps;
3070
3903
  return /* @__PURE__ */ jsx(Popover$1.Root, {
3071
3904
  "data-slot": "popover",
3072
3905
  ...props
3073
3906
  });
3074
3907
  }
3075
- const PopoverTrigger = React$1.forwardRef((props, ref) => {
3908
+ const PopoverTrigger = React.forwardRef((componentProps, forwardRef) => {
3076
3909
  return /* @__PURE__ */ jsx(Popover$1.Trigger, {
3077
3910
  "data-slot": "popover-trigger",
3078
- ref,
3079
- ...props
3911
+ ref: forwardRef,
3912
+ ...componentProps
3080
3913
  });
3081
3914
  });
3082
3915
  PopoverTrigger.displayName = "PopoverTrigger";
3083
- function PopoverContent({ className, align = "center", alignOffset = 0, side = "bottom", sideOffset = 4, ...props }) {
3916
+ const PopoverContent = React.forwardRef((componentProps, forwardRef) => {
3917
+ const { className, align = "center", alignOffset = 0, side = "bottom", sideOffset = 4, ...props } = componentProps;
3084
3918
  return /* @__PURE__ */ jsx(Popover$1.Portal, { children: /* @__PURE__ */ jsx(Popover$1.Positioner, {
3085
3919
  align,
3086
3920
  alignOffset,
@@ -3088,37 +3922,49 @@ function PopoverContent({ className, align = "center", alignOffset = 0, side = "
3088
3922
  sideOffset,
3089
3923
  className: "isolate z-50",
3090
3924
  children: /* @__PURE__ */ jsx(Popover$1.Popup, {
3925
+ ref: forwardRef,
3091
3926
  "data-slot": "popover-content",
3092
3927
  className: cn("z-50 flex w-72 origin-(--transform-origin) flex-col gap-4 rounded-md bg-popover p-4 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
3093
3928
  ...props
3094
3929
  })
3095
3930
  }) });
3096
- }
3097
- function PopoverHeader({ className, ...props }) {
3931
+ });
3932
+ PopoverContent.displayName = "PopoverContent";
3933
+ const PopoverHeader = React.forwardRef((componentProps, forwardRef) => {
3934
+ const { className, ...props } = componentProps;
3098
3935
  return /* @__PURE__ */ jsx("div", {
3936
+ ref: forwardRef,
3099
3937
  "data-slot": "popover-header",
3100
3938
  className: cn("flex flex-col gap-0.5 text-sm", className),
3101
3939
  ...props
3102
3940
  });
3103
- }
3104
- function PopoverTitle({ className, ...props }) {
3941
+ });
3942
+ PopoverHeader.displayName = "PopoverHeader";
3943
+ const PopoverTitle = React.forwardRef((componentProps, forwardRef) => {
3944
+ const { className, ...props } = componentProps;
3105
3945
  return /* @__PURE__ */ jsx(Popover$1.Title, {
3946
+ ref: forwardRef,
3106
3947
  "data-slot": "popover-title",
3107
3948
  className: cn("font-bold", className),
3108
3949
  ...props
3109
3950
  });
3110
- }
3111
- function PopoverDescription({ className, ...props }) {
3951
+ });
3952
+ PopoverTitle.displayName = "PopoverTitle";
3953
+ const PopoverDescription = React.forwardRef((componentProps, forwardRef) => {
3954
+ const { className, ...props } = componentProps;
3112
3955
  return /* @__PURE__ */ jsx(Popover$1.Description, {
3956
+ ref: forwardRef,
3113
3957
  "data-slot": "popover-description",
3114
3958
  className: cn("text-muted-foreground", className),
3115
3959
  ...props
3116
3960
  });
3117
- }
3961
+ });
3962
+ PopoverDescription.displayName = "PopoverDescription";
3118
3963
 
3119
3964
  //#endregion
3120
3965
  //#region src/components/theme-provider.tsx
3121
- function ThemeProvider({ children, ...props }) {
3966
+ function ThemeProvider(componentProps) {
3967
+ const { children, ...props } = componentProps;
3122
3968
  return /* @__PURE__ */ jsx(ThemeProvider$1, {
3123
3969
  attribute: "data-theme",
3124
3970
  defaultTheme: "system",
@@ -3142,19 +3988,19 @@ const EmojiPickerCategories = {
3142
3988
  SYMBOLS: Categories.SYMBOLS,
3143
3989
  FLAGS: Categories.FLAGS
3144
3990
  };
3145
- const EmojiPickerContext = React$1.createContext(null);
3991
+ const EmojiPickerContext = React.createContext(null);
3146
3992
  function useEmojiPickerContext() {
3147
- const context = React$1.useContext(EmojiPickerContext);
3993
+ const context = React.useContext(EmojiPickerContext);
3148
3994
  if (!context) throw new Error("EmojiPicker compound components must be used inside <EmojiPicker>");
3149
3995
  return context;
3150
3996
  }
3151
3997
  function EmojiPicker({ onEmojiSelect, children }) {
3152
- const [open, setOpen] = React$1.useState(false);
3153
- const onSelect = React$1.useCallback((emoji) => {
3998
+ const [open, setOpen] = React.useState(false);
3999
+ const onSelect = React.useCallback((emoji) => {
3154
4000
  onEmojiSelect?.(emoji);
3155
4001
  setOpen(false);
3156
4002
  }, [onEmojiSelect]);
3157
- const contextValue = React$1.useMemo(() => ({ onSelect }), [onSelect]);
4003
+ const contextValue = React.useMemo(() => ({ onSelect }), [onSelect]);
3158
4004
  return /* @__PURE__ */ jsx(EmojiPickerContext.Provider, {
3159
4005
  value: contextValue,
3160
4006
  children: /* @__PURE__ */ jsx(Popover, {
@@ -3164,24 +4010,29 @@ function EmojiPicker({ onEmojiSelect, children }) {
3164
4010
  })
3165
4011
  });
3166
4012
  }
3167
- const EmojiPickerTrigger = React$1.forwardRef(({ render, children, ...props }, ref) => /* @__PURE__ */ jsx(PopoverTrigger, {
3168
- ref,
3169
- "aria-label": "Emoji",
3170
- render: render ?? /* @__PURE__ */ jsx(Button, {
3171
- variant: "outline",
3172
- size: "icon"
3173
- }),
3174
- ...props,
3175
- children: children ?? /* @__PURE__ */ jsx(Smile, { "aria-hidden": "true" })
3176
- }));
4013
+ const EmojiPickerTrigger = React.forwardRef((componentProps, forwardRef) => {
4014
+ const { render, children, ...props } = componentProps;
4015
+ const t = useDsTranslation("ds");
4016
+ return /* @__PURE__ */ jsx(PopoverTrigger, {
4017
+ ref: forwardRef,
4018
+ "aria-label": t("emojiPicker.emoji"),
4019
+ render: render ?? /* @__PURE__ */ jsx(Button, {
4020
+ variant: "outline",
4021
+ size: "icon"
4022
+ }),
4023
+ ...props,
4024
+ children: children ?? /* @__PURE__ */ jsx(Smile, { "aria-hidden": "true" })
4025
+ });
4026
+ });
3177
4027
  EmojiPickerTrigger.displayName = "EmojiPickerTrigger";
3178
4028
  function EmojiPickerContent({ className, align = "start", searchPlaceholder, categories, width = 300, suggestedEmojisMode = SuggestionMode.RECENT, ...props }) {
3179
4029
  const { onSelect } = useEmojiPickerContext();
3180
4030
  const { resolvedTheme } = useTheme();
4031
+ const t = useDsTranslation("ds");
3181
4032
  const pickerTheme = resolvedTheme === "dark" ? Theme.DARK : Theme.LIGHT;
3182
- const handleClick = React$1.useCallback((emojiData) => onSelect(emojiData.emoji), [onSelect]);
4033
+ const handleClick = React.useCallback((emojiData) => onSelect(emojiData.emoji), [onSelect]);
3183
4034
  return /* @__PURE__ */ jsx(PopoverContent, {
3184
- "aria-label": "Choose an emoji",
4035
+ "aria-label": t("emojiPicker.choose"),
3185
4036
  className: cn("p-0 w-auto overflow-hidden ring-foreground/5", className),
3186
4037
  align,
3187
4038
  ...props,
@@ -3220,9 +4071,10 @@ const fabVariants = cva("group/fab inline-flex shrink-0 items-center justify-cen
3220
4071
  size: "icon-lg"
3221
4072
  }
3222
4073
  });
3223
- const FAB = React$1.forwardRef(({ className, variant, size, ...props }, ref) => {
4074
+ const FAB = React.forwardRef((componentProps, forwardRef) => {
4075
+ const { className, variant, size, ...props } = componentProps;
3224
4076
  return /* @__PURE__ */ jsx(Button$1, {
3225
- ref,
4077
+ ref: forwardRef,
3226
4078
  "data-slot": "fab",
3227
4079
  className: cn(fabVariants({
3228
4080
  variant,
@@ -3236,38 +4088,50 @@ FAB.displayName = "FAB";
3236
4088
 
3237
4089
  //#endregion
3238
4090
  //#region src/components/label.tsx
3239
- function Label({ className, ...props }) {
4091
+ const Label = React.forwardRef((componentProps, forwardRef) => {
4092
+ const { className, ...props } = componentProps;
3240
4093
  return /* @__PURE__ */ jsx("label", {
4094
+ ref: forwardRef,
3241
4095
  "data-slot": "label",
3242
4096
  className: cn("flex items-center gap-2 text-sm leading-normal font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50 peer-data-disabled:opacity-50", className),
3243
4097
  ...props
3244
4098
  });
3245
- }
4099
+ });
4100
+ Label.displayName = "Label";
3246
4101
 
3247
4102
  //#endregion
3248
4103
  //#region src/components/field.tsx
3249
- function FieldSet({ className, ...props }) {
4104
+ const FieldSet = React.forwardRef((componentProps, forwardRef) => {
4105
+ const { className, ...props } = componentProps;
3250
4106
  return /* @__PURE__ */ jsx("fieldset", {
4107
+ ref: forwardRef,
3251
4108
  "data-slot": "field-set",
3252
4109
  className: cn("flex flex-col gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3", className),
3253
4110
  ...props
3254
4111
  });
3255
- }
3256
- function FieldLegend({ className, variant = "legend", ...props }) {
4112
+ });
4113
+ FieldSet.displayName = "FieldSet";
4114
+ const FieldLegend = React.forwardRef((componentProps, forwardRef) => {
4115
+ const { className, variant = "legend", ...props } = componentProps;
3257
4116
  return /* @__PURE__ */ jsx("legend", {
4117
+ ref: forwardRef,
3258
4118
  "data-slot": "field-legend",
3259
4119
  "data-variant": variant,
3260
4120
  className: cn("mb-1.5 font-medium leading-normal data-[variant=label]:text-sm data-[variant=legend]:text-base", className),
3261
4121
  ...props
3262
4122
  });
3263
- }
3264
- function FieldGroup({ className, ...props }) {
4123
+ });
4124
+ FieldLegend.displayName = "FieldLegend";
4125
+ const FieldGroup = React.forwardRef((componentProps, forwardRef) => {
4126
+ const { className, ...props } = componentProps;
3265
4127
  return /* @__PURE__ */ jsx("div", {
4128
+ ref: forwardRef,
3266
4129
  "data-slot": "field-group",
3267
4130
  className: cn("group/field-group @container/field-group flex w-full flex-col gap-6 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4", className),
3268
4131
  ...props
3269
4132
  });
3270
- }
4133
+ });
4134
+ FieldGroup.displayName = "FieldGroup";
3271
4135
  const fieldVariants = cva("group/field flex w-full gap-2 data-[invalid=true]:text-destructive", {
3272
4136
  variants: { orientation: {
3273
4137
  vertical: "flex-col *:w-full [&>.sr-only]:w-auto",
@@ -3276,45 +4140,62 @@ const fieldVariants = cva("group/field flex w-full gap-2 data-[invalid=true]:tex
3276
4140
  } },
3277
4141
  defaultVariants: { orientation: "vertical" }
3278
4142
  });
3279
- function Field({ className, orientation = "vertical", ...props }) {
4143
+ const Field = React.forwardRef((componentProps, forwardRef) => {
4144
+ const { className, orientation = "vertical", ...props } = componentProps;
3280
4145
  return /* @__PURE__ */ jsx("div", {
4146
+ ref: forwardRef,
3281
4147
  role: "group",
3282
4148
  "data-slot": "field",
3283
4149
  "data-orientation": orientation,
3284
4150
  className: cn(fieldVariants({ orientation }), className),
3285
4151
  ...props
3286
4152
  });
3287
- }
3288
- function FieldContent({ className, ...props }) {
4153
+ });
4154
+ Field.displayName = "Field";
4155
+ const FieldContent = React.forwardRef((componentProps, forwardRef) => {
4156
+ const { className, ...props } = componentProps;
3289
4157
  return /* @__PURE__ */ jsx("div", {
4158
+ ref: forwardRef,
3290
4159
  "data-slot": "field-content",
3291
4160
  className: cn("group/field-content flex flex-1 flex-col gap-2 leading-normal", className),
3292
4161
  ...props
3293
4162
  });
3294
- }
3295
- function FieldLabel({ className, ...props }) {
4163
+ });
4164
+ FieldContent.displayName = "FieldContent";
4165
+ const FieldLabel = React.forwardRef((componentProps, forwardRef) => {
4166
+ const { className, ...props } = componentProps;
3296
4167
  return /* @__PURE__ */ jsx(Label, {
4168
+ ref: forwardRef,
3297
4169
  "data-slot": "field-label",
3298
4170
  className: cn("group/field-label peer/field-label flex w-fit gap-2 leading-normal group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border *:data-[slot=field]:p-4 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10", "has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col", className),
3299
4171
  ...props
3300
4172
  });
3301
- }
3302
- function FieldTitle({ className, ...props }) {
4173
+ });
4174
+ FieldLabel.displayName = "FieldLabel";
4175
+ const FieldTitle = React.forwardRef((componentProps, forwardRef) => {
4176
+ const { className, ...props } = componentProps;
3303
4177
  return /* @__PURE__ */ jsx("div", {
4178
+ ref: forwardRef,
3304
4179
  "data-slot": "field-label",
3305
4180
  className: cn("flex w-fit items-center gap-2 text-sm leading-normal font-medium group-data-[disabled=true]/field:opacity-50", className),
3306
4181
  ...props
3307
4182
  });
3308
- }
3309
- function FieldDescription({ className, ...props }) {
4183
+ });
4184
+ FieldTitle.displayName = "FieldTitle";
4185
+ const FieldDescription = React.forwardRef((componentProps, forwardRef) => {
4186
+ const { className, ...props } = componentProps;
3310
4187
  return /* @__PURE__ */ jsx("p", {
4188
+ ref: forwardRef,
3311
4189
  "data-slot": "field-description",
3312
4190
  className: cn("text-left text-sm leading-normal font-normal text-muted-foreground group-has-[[data-orientation=horizontal]]/field:text-balance [[data-variant=legend]+&]:-mt-1.5", "last:mt-0 nth-last-2:-mt-1", "[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", className),
3313
4191
  ...props
3314
4192
  });
3315
- }
3316
- function FieldSeparator({ children, className, ...props }) {
4193
+ });
4194
+ FieldDescription.displayName = "FieldDescription";
4195
+ const FieldSeparator = React.forwardRef((componentProps, forwardRef) => {
4196
+ const { children, className, ...props } = componentProps;
3317
4197
  return /* @__PURE__ */ jsxs("div", {
4198
+ ref: forwardRef,
3318
4199
  "data-slot": "field-separator",
3319
4200
  "data-content": !!children,
3320
4201
  className: cn("relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2", className),
@@ -3325,9 +4206,11 @@ function FieldSeparator({ children, className, ...props }) {
3325
4206
  children
3326
4207
  })]
3327
4208
  });
3328
- }
3329
- function FieldError({ className, children, errors, ...props }) {
3330
- const content = useMemo(() => {
4209
+ });
4210
+ FieldSeparator.displayName = "FieldSeparator";
4211
+ const FieldError = React.forwardRef((componentProps, forwardRef) => {
4212
+ const { className, children, errors, ...props } = componentProps;
4213
+ const content = React.useMemo(() => {
3331
4214
  if (children) return children;
3332
4215
  if (!errors?.length) return null;
3333
4216
  const uniqueErrors = [...new Map(errors.map((error) => [error?.message, error])).values()];
@@ -3339,13 +4222,15 @@ function FieldError({ className, children, errors, ...props }) {
3339
4222
  }, [children, errors]);
3340
4223
  if (!content) return null;
3341
4224
  return /* @__PURE__ */ jsx("div", {
4225
+ ref: forwardRef,
3342
4226
  role: "alert",
3343
4227
  "data-slot": "field-error",
3344
4228
  className: cn("text-sm leading-normal font-normal text-destructive", className),
3345
4229
  ...props,
3346
4230
  children: content
3347
4231
  });
3348
- }
4232
+ });
4233
+ FieldError.displayName = "FieldError";
3349
4234
 
3350
4235
  //#endregion
3351
4236
  //#region src/components/gauge.tsx
@@ -3358,9 +4243,11 @@ function getSegmentState(index, value) {
3358
4243
  if (distanceFromHead === 1) return "trailing";
3359
4244
  return "filled";
3360
4245
  }
3361
- function Gauge({ className, value, ...props }) {
4246
+ const Gauge = React.forwardRef((componentProps, forwardRef) => {
4247
+ const { className, value, ...props } = componentProps;
3362
4248
  const clampedValue = Math.max(0, Math.min(value, GAUGES));
3363
4249
  return /* @__PURE__ */ jsx("div", {
4250
+ ref: forwardRef,
3364
4251
  role: "meter",
3365
4252
  "aria-valuenow": clampedValue,
3366
4253
  "aria-valuemin": 0,
@@ -3382,28 +4269,37 @@ function Gauge({ className, value, ...props }) {
3382
4269
  }, index);
3383
4270
  })
3384
4271
  });
3385
- }
4272
+ });
4273
+ Gauge.displayName = "Gauge";
3386
4274
 
3387
4275
  //#endregion
3388
4276
  //#region src/components/input-otp.tsx
3389
- function InputOTP({ className, containerClassName, ...props }) {
4277
+ const InputOTP = React.forwardRef((componentProps, forwardRef) => {
4278
+ const { className, containerClassName, ...props } = componentProps;
3390
4279
  return /* @__PURE__ */ jsx(OTPInput, {
4280
+ ref: forwardRef,
3391
4281
  "data-slot": "input-otp",
3392
4282
  containerClassName: cn("flex items-center gap-2 has-disabled:opacity-50 **:data-[slot=input-otp-slot]:h-12 **:data-[slot=input-otp-slot]:w-12 has-[input[aria-invalid=true]]:**:data-[slot=input-otp-slot]:border-destructive has-[input[aria-invalid=true]]:**:data-[slot=input-otp-slot]:data-[active=true]:ring-destructive/20 dark:has-[input[aria-invalid=true]]:**:data-[slot=input-otp-slot]:data-[active=true]:ring-destructive/40", containerClassName),
3393
4283
  className: cn("disabled:cursor-not-allowed", className),
3394
4284
  ...props
3395
4285
  });
3396
- }
3397
- function InputOTPGroup({ className, ...props }) {
4286
+ });
4287
+ InputOTP.displayName = "InputOTP";
4288
+ const InputOTPGroup = React.forwardRef((componentProps, forwardRef) => {
4289
+ const { className, ...props } = componentProps;
3398
4290
  return /* @__PURE__ */ jsx("div", {
4291
+ ref: forwardRef,
3399
4292
  "data-slot": "input-otp-group",
3400
4293
  className: cn("flex items-center", className),
3401
4294
  ...props
3402
4295
  });
3403
- }
3404
- function InputOTPSlot({ index, className, ...props }) {
3405
- const { char, hasFakeCaret, isActive } = React$1.useContext(OTPInputContext)?.slots[index] ?? {};
4296
+ });
4297
+ InputOTPGroup.displayName = "InputOTPGroup";
4298
+ const InputOTPSlot = React.forwardRef((componentProps, forwardRef) => {
4299
+ const { index, className, ...props } = componentProps;
4300
+ const { char, hasFakeCaret, isActive } = React.useContext(OTPInputContext)?.slots[index] ?? {};
3406
4301
  return /* @__PURE__ */ jsxs("div", {
4302
+ ref: forwardRef,
3407
4303
  "data-slot": "input-otp-slot",
3408
4304
  "data-active": isActive,
3409
4305
  className: cn("data-[active=true]:border-ring data-[active=true]:ring-ring/50 dark:bg-input/30 border-input relative flex items-center justify-center border-y border-r text-sm transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-3", className),
@@ -3413,21 +4309,26 @@ function InputOTPSlot({ index, className, ...props }) {
3413
4309
  children: /* @__PURE__ */ jsx("div", { className: "animate-caret-blink bg-foreground h-4 w-px duration-1000" })
3414
4310
  })]
3415
4311
  });
3416
- }
3417
- function InputOTPSeparator({ ...props }) {
4312
+ });
4313
+ InputOTPSlot.displayName = "InputOTPSlot";
4314
+ const InputOTPSeparator = React.forwardRef((componentProps, forwardRef) => {
4315
+ const { ...props } = componentProps;
3418
4316
  return /* @__PURE__ */ jsx("div", {
4317
+ ref: forwardRef,
3419
4318
  "data-slot": "input-otp-separator",
3420
4319
  role: "separator",
3421
4320
  ...props,
3422
4321
  children: /* @__PURE__ */ jsx(MinusIcon, {})
3423
4322
  });
3424
- }
4323
+ });
4324
+ InputOTPSeparator.displayName = "InputOTPSeparator";
3425
4325
 
3426
4326
  //#endregion
3427
4327
  //#region src/components/item.tsx
3428
- const ItemGroup = React$1.forwardRef(({ className, stackedItems = false, ...props }, ref) => {
4328
+ const ItemGroup = React.forwardRef((componentProps, forwardRef) => {
4329
+ const { className, stackedItems = false, ...props } = componentProps;
3429
4330
  return /* @__PURE__ */ jsx("div", {
3430
- ref,
4331
+ ref: forwardRef,
3431
4332
  role: "list",
3432
4333
  "data-slot": "item-group",
3433
4334
  "data-stacked": stackedItems ? "" : void 0,
@@ -3436,14 +4337,17 @@ const ItemGroup = React$1.forwardRef(({ className, stackedItems = false, ...prop
3436
4337
  });
3437
4338
  });
3438
4339
  ItemGroup.displayName = "ItemGroup";
3439
- function ItemSeparator({ className, ...props }) {
4340
+ const ItemSeparator = React.forwardRef((componentProps, forwardRef) => {
4341
+ const { className, ...props } = componentProps;
3440
4342
  return /* @__PURE__ */ jsx(Separator, {
4343
+ ref: forwardRef,
3441
4344
  "data-slot": "item-separator",
3442
4345
  orientation: "horizontal",
3443
4346
  className: cn("my-2", className),
3444
4347
  ...props
3445
4348
  });
3446
- }
4349
+ });
4350
+ ItemSeparator.displayName = "ItemSeparator";
3447
4351
  const itemVariants = cva("group/item flex w-full flex-wrap items-center rounded-md border text-sm transition-colors duration-100 outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 [a]:transition-colors [a]:hover:bg-muted", {
3448
4352
  variants: {
3449
4353
  variant: {
@@ -3462,7 +4366,8 @@ const itemVariants = cva("group/item flex w-full flex-wrap items-center rounded-
3462
4366
  size: "default"
3463
4367
  }
3464
4368
  });
3465
- const Item = React$1.forwardRef(({ className, variant = "default", size = "default", render, ...props }, ref) => {
4369
+ const Item = React.forwardRef((componentProps, forwardRef) => {
4370
+ const { className, variant = "default", size = "default", render, ...props } = componentProps;
3466
4371
  return useRender({
3467
4372
  defaultTagName: "div",
3468
4373
  props: mergeProps({
@@ -3471,7 +4376,7 @@ const Item = React$1.forwardRef(({ className, variant = "default", size = "defau
3471
4376
  size,
3472
4377
  className
3473
4378
  })),
3474
- ref
4379
+ ref: forwardRef
3475
4380
  }, props),
3476
4381
  render,
3477
4382
  state: {
@@ -3490,9 +4395,10 @@ const itemMediaVariants = cva("flex shrink-0 items-center justify-center gap-2 g
3490
4395
  } },
3491
4396
  defaultVariants: { variant: "default" }
3492
4397
  });
3493
- const ItemMedia = React$1.forwardRef(({ className, variant = "default", ...props }, ref) => {
4398
+ const ItemMedia = React.forwardRef((componentProps, forwardRef) => {
4399
+ const { className, variant = "default", ...props } = componentProps;
3494
4400
  return /* @__PURE__ */ jsx("div", {
3495
- ref,
4401
+ ref: forwardRef,
3496
4402
  "data-slot": "item-media",
3497
4403
  "data-variant": variant,
3498
4404
  className: cn(itemMediaVariants({
@@ -3503,54 +4409,60 @@ const ItemMedia = React$1.forwardRef(({ className, variant = "default", ...props
3503
4409
  });
3504
4410
  });
3505
4411
  ItemMedia.displayName = "ItemMedia";
3506
- const ItemContent = React$1.forwardRef(({ className, ...props }, ref) => {
4412
+ const ItemContent = React.forwardRef((componentProps, forwardRef) => {
4413
+ const { className, ...props } = componentProps;
3507
4414
  return /* @__PURE__ */ jsx("div", {
3508
- ref,
4415
+ ref: forwardRef,
3509
4416
  "data-slot": "item-content",
3510
4417
  className: cn("flex flex-1 flex-col gap-1 group-data-[size=xs]/item:gap-0 [&+[data-slot=item-content]]:flex-none", className),
3511
4418
  ...props
3512
4419
  });
3513
4420
  });
3514
4421
  ItemContent.displayName = "ItemContent";
3515
- const ItemTitle = React$1.forwardRef(({ className, ...props }, ref) => {
4422
+ const ItemTitle = React.forwardRef((componentProps, forwardRef) => {
4423
+ const { className, ...props } = componentProps;
3516
4424
  return /* @__PURE__ */ jsx("div", {
3517
- ref,
4425
+ ref: forwardRef,
3518
4426
  "data-slot": "item-title",
3519
4427
  className: cn("line-clamp-1 flex w-fit items-center gap-2 text-sm leading-snug font-medium underline-offset-4", className),
3520
4428
  ...props
3521
4429
  });
3522
4430
  });
3523
4431
  ItemTitle.displayName = "ItemTitle";
3524
- const ItemDescription = React$1.forwardRef(({ className, ...props }, ref) => {
4432
+ const ItemDescription = React.forwardRef((componentProps, forwardRef) => {
4433
+ const { className, ...props } = componentProps;
3525
4434
  return /* @__PURE__ */ jsx("p", {
3526
- ref,
4435
+ ref: forwardRef,
3527
4436
  "data-slot": "item-description",
3528
4437
  className: cn("line-clamp-2 text-left text-sm leading-normal font-normal text-muted-foreground group-data-[size=xs]/item:text-xs [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", className),
3529
4438
  ...props
3530
4439
  });
3531
4440
  });
3532
4441
  ItemDescription.displayName = "ItemDescription";
3533
- const ItemActions = React$1.forwardRef(({ className, ...props }, ref) => {
4442
+ const ItemActions = React.forwardRef((componentProps, forwardRef) => {
4443
+ const { className, ...props } = componentProps;
3534
4444
  return /* @__PURE__ */ jsx("div", {
3535
- ref,
4445
+ ref: forwardRef,
3536
4446
  "data-slot": "item-actions",
3537
4447
  className: cn("flex items-center gap-2", className),
3538
4448
  ...props
3539
4449
  });
3540
4450
  });
3541
4451
  ItemActions.displayName = "ItemActions";
3542
- const ItemHeader = React$1.forwardRef(({ className, ...props }, ref) => {
4452
+ const ItemHeader = React.forwardRef((componentProps, forwardRef) => {
4453
+ const { className, ...props } = componentProps;
3543
4454
  return /* @__PURE__ */ jsx("div", {
3544
- ref,
4455
+ ref: forwardRef,
3545
4456
  "data-slot": "item-header",
3546
4457
  className: cn("flex basis-full items-center justify-between gap-2", className),
3547
4458
  ...props
3548
4459
  });
3549
4460
  });
3550
4461
  ItemHeader.displayName = "ItemHeader";
3551
- const ItemFooter = React$1.forwardRef(({ className, ...props }, ref) => {
4462
+ const ItemFooter = React.forwardRef((componentProps, forwardRef) => {
4463
+ const { className, ...props } = componentProps;
3552
4464
  return /* @__PURE__ */ jsx("div", {
3553
- ref,
4465
+ ref: forwardRef,
3554
4466
  "data-slot": "item-footer",
3555
4467
  className: cn("flex basis-full items-center justify-between gap-2", className),
3556
4468
  ...props
@@ -3560,55 +4472,75 @@ ItemFooter.displayName = "ItemFooter";
3560
4472
 
3561
4473
  //#endregion
3562
4474
  //#region src/components/list.tsx
3563
- const List = ({ children, className, ...props }) => {
4475
+ const List = React.forwardRef((componentProps, forwardRef) => {
4476
+ const { children, className, ...props } = componentProps;
3564
4477
  return /* @__PURE__ */ jsx("div", {
4478
+ ref: forwardRef,
3565
4479
  className: cn("flex flex-col", className),
3566
4480
  ...props,
3567
4481
  children
3568
4482
  });
3569
- };
3570
- const ListRow = React$1.forwardRef(({ children, className, ...props }, ref) => {
4483
+ });
4484
+ List.displayName = "List";
4485
+ const ListRow = React.forwardRef((componentProps, forwardRef) => {
4486
+ const { children, className, ...props } = componentProps;
3571
4487
  return /* @__PURE__ */ jsx("div", {
3572
- ref,
4488
+ ref: forwardRef,
3573
4489
  className: cn("grid grid-flow-col gap-x-2.5 gap-y-2 p-3 relative rounded-lg", "grid-cols-[minmax(0,auto)_1fr]", className),
3574
4490
  ...props,
3575
4491
  children
3576
4492
  });
3577
4493
  });
3578
- const ListCol = ({ grow, wrap, children, className, ...props }) => {
4494
+ ListRow.displayName = "ListRow";
4495
+ const ListCol = React.forwardRef((componentProps, forwardRef) => {
4496
+ const { grow, wrap, children, className, ...props } = componentProps;
3579
4497
  return /* @__PURE__ */ jsx("div", {
4498
+ ref: forwardRef,
3580
4499
  className: cn(!wrap && "row-start-1", className),
3581
4500
  ...props,
3582
4501
  children
3583
4502
  });
3584
- };
4503
+ });
4504
+ ListCol.displayName = "ListCol";
3585
4505
 
3586
4506
  //#endregion
3587
4507
  //#region src/components/pagination.tsx
3588
- function Pagination({ className, ...props }) {
4508
+ const Pagination = React.forwardRef((componentProps, forwardRef) => {
4509
+ const { className, ...props } = componentProps;
4510
+ const t = useDsTranslation("ds");
3589
4511
  return /* @__PURE__ */ jsx("nav", {
4512
+ ref: forwardRef,
3590
4513
  role: "navigation",
3591
- "aria-label": "pagination",
4514
+ "aria-label": t("pagination.label"),
3592
4515
  "data-slot": "pagination",
3593
4516
  className: cn("mx-auto flex w-full justify-center", className),
3594
4517
  ...props
3595
4518
  });
3596
- }
3597
- function PaginationContent({ className, ...props }) {
4519
+ });
4520
+ Pagination.displayName = "Pagination";
4521
+ const PaginationContent = React.forwardRef((componentProps, forwardRef) => {
4522
+ const { className, ...props } = componentProps;
3598
4523
  return /* @__PURE__ */ jsx("ul", {
4524
+ ref: forwardRef,
3599
4525
  "data-slot": "pagination-content",
3600
4526
  className: cn("flex items-center gap-1", className),
3601
4527
  ...props
3602
4528
  });
3603
- }
3604
- function PaginationItem({ ...props }) {
4529
+ });
4530
+ PaginationContent.displayName = "PaginationContent";
4531
+ const PaginationItem = React.forwardRef((componentProps, forwardRef) => {
4532
+ const { ...props } = componentProps;
3605
4533
  return /* @__PURE__ */ jsx("li", {
4534
+ ref: forwardRef,
3606
4535
  "data-slot": "pagination-item",
3607
4536
  ...props
3608
4537
  });
3609
- }
3610
- function PaginationLink({ className, isActive, size = "icon", ...props }) {
4538
+ });
4539
+ PaginationItem.displayName = "PaginationItem";
4540
+ const PaginationLink = React.forwardRef((componentProps, forwardRef) => {
4541
+ const { className, isActive, size = "icon", ...props } = componentProps;
3611
4542
  return /* @__PURE__ */ jsx(Button, {
4543
+ ref: forwardRef,
3612
4544
  variant: isActive ? "outline" : "ghost",
3613
4545
  size,
3614
4546
  className: cn(className),
@@ -3620,33 +4552,46 @@ function PaginationLink({ className, isActive, size = "icon", ...props }) {
3620
4552
  ...props
3621
4553
  })
3622
4554
  });
3623
- }
3624
- function PaginationPrevious({ className, text = "Previous", ...props }) {
4555
+ });
4556
+ PaginationLink.displayName = "PaginationLink";
4557
+ const PaginationPrevious = React.forwardRef((componentProps, forwardRef) => {
4558
+ const { className, text, ...props } = componentProps;
4559
+ const t = useDsTranslation("ds");
4560
+ const resolvedText = text ?? t("pagination.previous");
3625
4561
  return /* @__PURE__ */ jsxs(PaginationLink, {
3626
- "aria-label": "Go to previous page",
4562
+ ref: forwardRef,
4563
+ "aria-label": t("pagination.previousPage"),
3627
4564
  size: "default",
3628
4565
  className: cn("pl-2!", className),
3629
4566
  ...props,
3630
4567
  children: [/* @__PURE__ */ jsx(ChevronLeftIcon, { "data-icon": "inline-start" }), /* @__PURE__ */ jsx("span", {
3631
4568
  className: "hidden sm:block",
3632
- children: text
4569
+ children: resolvedText
3633
4570
  })]
3634
4571
  });
3635
- }
3636
- function PaginationNext({ className, text = "Next", ...props }) {
4572
+ });
4573
+ PaginationPrevious.displayName = "PaginationPrevious";
4574
+ const PaginationNext = React.forwardRef((componentProps, forwardRef) => {
4575
+ const { className, text, ...props } = componentProps;
4576
+ const t = useDsTranslation("ds");
4577
+ const resolvedText = text ?? t("pagination.next");
3637
4578
  return /* @__PURE__ */ jsxs(PaginationLink, {
3638
- "aria-label": "Go to next page",
4579
+ ref: forwardRef,
4580
+ "aria-label": t("pagination.nextPage"),
3639
4581
  size: "default",
3640
4582
  className: cn("pr-2!", className),
3641
4583
  ...props,
3642
4584
  children: [/* @__PURE__ */ jsx("span", {
3643
4585
  className: "hidden sm:block",
3644
- children: text
4586
+ children: resolvedText
3645
4587
  }), /* @__PURE__ */ jsx(ChevronRightIcon, { "data-icon": "inline-end" })]
3646
4588
  });
3647
- }
3648
- function PaginationEllipsis({ className, ...props }) {
4589
+ });
4590
+ PaginationNext.displayName = "PaginationNext";
4591
+ const PaginationEllipsis = React.forwardRef((componentProps, forwardRef) => {
4592
+ const { className, ...props } = componentProps;
3649
4593
  return /* @__PURE__ */ jsxs("span", {
4594
+ ref: forwardRef,
3650
4595
  "aria-hidden": true,
3651
4596
  "data-slot": "pagination-ellipsis",
3652
4597
  className: cn("flex size-9 items-center justify-center [&_svg:not([class*='size-'])]:size-4", className),
@@ -3656,59 +4601,80 @@ function PaginationEllipsis({ className, ...props }) {
3656
4601
  children: "More pages"
3657
4602
  })]
3658
4603
  });
3659
- }
4604
+ });
4605
+ PaginationEllipsis.displayName = "PaginationEllipsis";
3660
4606
 
3661
4607
  //#endregion
3662
4608
  //#region src/components/progress.tsx
3663
- function Progress({ className, children, value, ...props }) {
4609
+ const Progress = React.forwardRef((componentProps, forwardRef) => {
4610
+ const { className, children, value, ...props } = componentProps;
3664
4611
  return /* @__PURE__ */ jsxs(Progress$1.Root, {
4612
+ ref: forwardRef,
3665
4613
  value,
3666
4614
  "data-slot": "progress",
3667
4615
  className: cn("flex flex-wrap gap-3", className),
3668
4616
  ...props,
3669
4617
  children: [children, /* @__PURE__ */ jsx(ProgressTrack, { children: /* @__PURE__ */ jsx(ProgressIndicator, {}) })]
3670
4618
  });
3671
- }
3672
- function ProgressTrack({ className, ...props }) {
4619
+ });
4620
+ Progress.displayName = "Progress";
4621
+ const ProgressTrack = React.forwardRef((componentProps, forwardRef) => {
4622
+ const { className, ...props } = componentProps;
3673
4623
  return /* @__PURE__ */ jsx(Progress$1.Track, {
4624
+ ref: forwardRef,
3674
4625
  className: cn("relative flex h-1 w-full items-center overflow-x-hidden rounded-full bg-muted", className),
3675
4626
  "data-slot": "progress-track",
3676
4627
  ...props
3677
4628
  });
3678
- }
3679
- function ProgressIndicator({ className, ...props }) {
4629
+ });
4630
+ ProgressTrack.displayName = "ProgressTrack";
4631
+ const ProgressIndicator = React.forwardRef((componentProps, forwardRef) => {
4632
+ const { className, ...props } = componentProps;
3680
4633
  return /* @__PURE__ */ jsx(Progress$1.Indicator, {
4634
+ ref: forwardRef,
3681
4635
  "data-slot": "progress-indicator",
3682
4636
  className: cn("h-full bg-primary transition-all", className),
3683
4637
  ...props
3684
4638
  });
3685
- }
3686
- function ProgressLabel({ className, ...props }) {
4639
+ });
4640
+ ProgressIndicator.displayName = "ProgressIndicator";
4641
+ const ProgressLabel = React.forwardRef((componentProps, forwardRef) => {
4642
+ const { className, ...props } = componentProps;
3687
4643
  return /* @__PURE__ */ jsx(Progress$1.Label, {
4644
+ ref: forwardRef,
3688
4645
  className: cn("text-sm font-medium", className),
3689
4646
  "data-slot": "progress-label",
3690
4647
  ...props
3691
4648
  });
3692
- }
3693
- function ProgressValue({ className, ...props }) {
4649
+ });
4650
+ ProgressLabel.displayName = "ProgressLabel";
4651
+ const ProgressValue = React.forwardRef((componentProps, forwardRef) => {
4652
+ const { className, ...props } = componentProps;
3694
4653
  return /* @__PURE__ */ jsx(Progress$1.Value, {
4654
+ ref: forwardRef,
3695
4655
  className: cn("ml-auto text-sm text-muted-foreground tabular-nums", className),
3696
4656
  "data-slot": "progress-value",
3697
4657
  ...props
3698
4658
  });
3699
- }
4659
+ });
4660
+ ProgressValue.displayName = "ProgressValue";
3700
4661
 
3701
4662
  //#endregion
3702
4663
  //#region src/components/radio-group.tsx
3703
- function RadioGroup({ className, ...props }) {
4664
+ const RadioGroup = React.forwardRef((componentProps, forwardRef) => {
4665
+ const { className, ...props } = componentProps;
3704
4666
  return /* @__PURE__ */ jsx(RadioGroup$1, {
4667
+ ref: forwardRef,
3705
4668
  "data-slot": "radio-group",
3706
4669
  className: cn("grid w-full gap-3", className),
3707
4670
  ...props
3708
4671
  });
3709
- }
3710
- function RadioGroupItem({ className, ...props }) {
4672
+ });
4673
+ RadioGroup.displayName = "RadioGroup";
4674
+ const RadioGroupItem = React.forwardRef((componentProps, forwardRef) => {
4675
+ const { className, ...props } = componentProps;
3711
4676
  return /* @__PURE__ */ jsx(Radio.Root, {
4677
+ ref: forwardRef,
3712
4678
  "data-slot": "radio-group-item",
3713
4679
  className: cn("group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-input outline-none transition-[color,box-shadow,opacity] active:opacity-60 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 data-disabled:pointer-events-none data-disabled:cursor-not-allowed data-disabled:opacity-50 aria-invalid:border-destructive focus-visible:aria-invalid:ring-3 focus-visible:aria-invalid:ring-destructive/20 dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:focus-visible:aria-invalid:ring-destructive/40 data-checked:border-primary aria-invalid:data-checked:border-destructive", className),
3714
4680
  ...props,
@@ -3718,7 +4684,8 @@ function RadioGroupItem({ className, ...props }) {
3718
4684
  children: /* @__PURE__ */ jsx("span", { className: "size-2 rounded-full bg-primary group-aria-invalid/radio-group-item:bg-destructive" })
3719
4685
  })
3720
4686
  });
3721
- }
4687
+ });
4688
+ RadioGroupItem.displayName = "RadioGroupItem";
3722
4689
 
3723
4690
  //#endregion
3724
4691
  //#region src/components/select.tsx
@@ -3730,30 +4697,38 @@ const selectTriggerVariants = cva("flex w-fit items-center justify-between round
3730
4697
  defaultVariants: { size: "default" }
3731
4698
  });
3732
4699
  const Select = Select$1.Root;
3733
- function SelectGroup({ className, ...props }) {
4700
+ const SelectGroup = React.forwardRef((componentProps, forwardRef) => {
4701
+ const { className, ...props } = componentProps;
3734
4702
  return /* @__PURE__ */ jsx(Select$1.Group, {
4703
+ ref: forwardRef,
3735
4704
  "data-slot": "select-group",
3736
4705
  className: cn("scroll-my-1", className),
3737
4706
  ...props
3738
4707
  });
3739
- }
3740
- function SelectValue({ className, ...props }) {
4708
+ });
4709
+ SelectGroup.displayName = "SelectGroup";
4710
+ function SelectValue(componentProps) {
4711
+ const { className, ...props } = componentProps;
3741
4712
  return /* @__PURE__ */ jsx(Select$1.Value, {
3742
4713
  "data-slot": "select-value",
3743
4714
  className: cn("flex flex-1 text-left", className),
3744
4715
  ...props
3745
4716
  });
3746
4717
  }
3747
- function SelectTrigger({ className, size = "default", children, ...props }) {
4718
+ const SelectTrigger = React.forwardRef((componentProps, forwardRef) => {
4719
+ const { className, size = "default", children, ...props } = componentProps;
3748
4720
  return /* @__PURE__ */ jsxs(Select$1.Trigger, {
4721
+ ref: forwardRef,
3749
4722
  "data-slot": "select-trigger",
3750
4723
  "data-size": size,
3751
4724
  className: cn(selectTriggerVariants({ size }), className),
3752
4725
  ...props,
3753
4726
  children: [children, /* @__PURE__ */ jsx(Select$1.Icon, { render: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "pointer-events-none size-4 text-muted-foreground" }) })]
3754
4727
  });
3755
- }
3756
- function SelectContent({ className, children, side = "bottom", sideOffset = 4, align = "start", alignOffset = 0, alignItemWithTrigger = false, ...props }) {
4728
+ });
4729
+ SelectTrigger.displayName = "SelectTrigger";
4730
+ const SelectContent = React.forwardRef((componentProps, forwardRef) => {
4731
+ const { className, children, side = "bottom", sideOffset = 4, align = "start", alignOffset = 0, alignItemWithTrigger = false, ...props } = componentProps;
3757
4732
  return /* @__PURE__ */ jsx(Select$1.Portal, { children: /* @__PURE__ */ jsx(Select$1.Positioner, {
3758
4733
  side,
3759
4734
  sideOffset,
@@ -3762,9 +4737,10 @@ function SelectContent({ className, children, side = "bottom", sideOffset = 4, a
3762
4737
  alignItemWithTrigger,
3763
4738
  className: "isolate z-50",
3764
4739
  children: /* @__PURE__ */ jsxs(Select$1.Popup, {
4740
+ ref: forwardRef,
3765
4741
  "data-slot": "select-content",
3766
4742
  "data-align-trigger": alignItemWithTrigger,
3767
- className: cn("relative isolate z-50 max-h-(--available-height) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md p-1 bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
4743
+ className: cn("relative isolate z-50 max-h-(--available-height) min-w-36 min-w-(--anchor-width) origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md p-1 bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
3768
4744
  ...props,
3769
4745
  children: [
3770
4746
  /* @__PURE__ */ jsx(SelectScrollUpButton, {}),
@@ -3773,16 +4749,22 @@ function SelectContent({ className, children, side = "bottom", sideOffset = 4, a
3773
4749
  ]
3774
4750
  })
3775
4751
  }) });
3776
- }
3777
- function SelectLabel({ className, ...props }) {
4752
+ });
4753
+ SelectContent.displayName = "SelectContent";
4754
+ const SelectLabel = React.forwardRef((componentProps, forwardRef) => {
4755
+ const { className, ...props } = componentProps;
3778
4756
  return /* @__PURE__ */ jsx(Select$1.GroupLabel, {
4757
+ ref: forwardRef,
3779
4758
  "data-slot": "select-label",
3780
4759
  className: cn("p-2 text-xs text-muted-foreground", className),
3781
4760
  ...props
3782
4761
  });
3783
- }
3784
- function SelectItem({ className, children, ...props }) {
4762
+ });
4763
+ SelectLabel.displayName = "SelectLabel";
4764
+ const SelectItem = React.forwardRef((componentProps, forwardRef) => {
4765
+ const { className, children, ...props } = componentProps;
3785
4766
  return /* @__PURE__ */ jsxs(Select$1.Item, {
4767
+ ref: forwardRef,
3786
4768
  "data-slot": "select-item",
3787
4769
  className: cn("relative flex w-full cursor-default items-center gap-2 rounded-md p-2 pr-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:cursor-not-allowed data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", className),
3788
4770
  ...props,
@@ -3795,70 +4777,89 @@ function SelectItem({ className, children, ...props }) {
3795
4777
  children: /* @__PURE__ */ jsx(CheckIcon, { className: "pointer-events-none" })
3796
4778
  })]
3797
4779
  });
3798
- }
3799
- function SelectSeparator({ className, ...props }) {
4780
+ });
4781
+ SelectItem.displayName = "SelectItem";
4782
+ const SelectSeparator = React.forwardRef((componentProps, forwardRef) => {
4783
+ const { className, ...props } = componentProps;
3800
4784
  return /* @__PURE__ */ jsx(Select$1.Separator, {
4785
+ ref: forwardRef,
3801
4786
  "data-slot": "select-separator",
3802
4787
  className: cn("pointer-events-none -mx-1 my-1 h-px bg-border", className),
3803
4788
  ...props
3804
4789
  });
3805
- }
3806
- function SelectScrollUpButton({ className, ...props }) {
4790
+ });
4791
+ SelectSeparator.displayName = "SelectSeparator";
4792
+ const SelectScrollUpButton = React.forwardRef((componentProps, forwardRef) => {
4793
+ const { className, ...props } = componentProps;
3807
4794
  return /* @__PURE__ */ jsx(Select$1.ScrollUpArrow, {
4795
+ ref: forwardRef,
3808
4796
  "data-slot": "select-scroll-up-button",
3809
4797
  className: cn("top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4", className),
3810
4798
  ...props,
3811
4799
  children: /* @__PURE__ */ jsx(ChevronUpIcon, {})
3812
4800
  });
3813
- }
3814
- function SelectScrollDownButton({ className, ...props }) {
4801
+ });
4802
+ SelectScrollUpButton.displayName = "SelectScrollUpButton";
4803
+ const SelectScrollDownButton = React.forwardRef((componentProps, forwardRef) => {
4804
+ const { className, ...props } = componentProps;
3815
4805
  return /* @__PURE__ */ jsx(Select$1.ScrollDownArrow, {
4806
+ ref: forwardRef,
3816
4807
  "data-slot": "select-scroll-down-button",
3817
4808
  className: cn("bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4", className),
3818
4809
  ...props,
3819
4810
  children: /* @__PURE__ */ jsx(ChevronDownIcon, {})
3820
4811
  });
3821
- }
4812
+ });
4813
+ SelectScrollDownButton.displayName = "SelectScrollDownButton";
3822
4814
 
3823
4815
  //#endregion
3824
4816
  //#region src/components/sheet.tsx
3825
- function Sheet({ ...props }) {
4817
+ function Sheet(componentProps) {
3826
4818
  return /* @__PURE__ */ jsx(Dialog$1.Root, {
3827
4819
  "data-slot": "sheet",
3828
- ...props
4820
+ ...componentProps
3829
4821
  });
3830
4822
  }
3831
- function SheetTrigger({ ...props }) {
4823
+ const SheetTrigger = React.forwardRef((componentProps, forwardRef) => {
4824
+ const { ...props } = componentProps;
3832
4825
  return /* @__PURE__ */ jsx(Dialog$1.Trigger, {
4826
+ ref: forwardRef,
3833
4827
  "data-slot": "sheet-trigger",
3834
4828
  ...props
3835
4829
  });
3836
- }
3837
- function SheetClose({ ...props }) {
4830
+ });
4831
+ SheetTrigger.displayName = "SheetTrigger";
4832
+ const SheetClose = React.forwardRef((componentProps, forwardRef) => {
4833
+ const { ...props } = componentProps;
3838
4834
  return /* @__PURE__ */ jsx(Dialog$1.Close, {
4835
+ ref: forwardRef,
3839
4836
  "data-slot": "sheet-close",
3840
4837
  ...props
3841
4838
  });
3842
- }
3843
- function SheetPortal({ ...props }) {
4839
+ });
4840
+ SheetClose.displayName = "SheetClose";
4841
+ function SheetPortal(componentProps) {
3844
4842
  return /* @__PURE__ */ jsx(Dialog$1.Portal, {
3845
4843
  "data-slot": "sheet-portal",
3846
- ...props
4844
+ ...componentProps
3847
4845
  });
3848
4846
  }
3849
- const SheetOverlay = React$1.forwardRef(({ className, ...props }, ref) => {
4847
+ const SheetOverlay = React.forwardRef((componentProps, forwardRef) => {
4848
+ const { className, ...props } = componentProps;
3850
4849
  return /* @__PURE__ */ jsx(Dialog$1.Backdrop, {
3851
4850
  "data-slot": "sheet-overlay",
3852
4851
  className: cn("fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs", className),
3853
4852
  ...props,
3854
- ref
4853
+ ref: forwardRef
3855
4854
  });
3856
4855
  });
3857
4856
  SheetOverlay.displayName = "SheetOverlay";
3858
- function SheetContent({ className, children, side = "right", showCloseButton = true, container, ...props }) {
4857
+ const SheetContent = React.forwardRef((componentProps, forwardRef) => {
4858
+ const { className, children, side = "right", showCloseButton = true, container, ...props } = componentProps;
3859
4859
  return /* @__PURE__ */ jsxs(SheetPortal, {
3860
4860
  container,
3861
4861
  children: [/* @__PURE__ */ jsx(SheetOverlay, {}), /* @__PURE__ */ jsxs(Dialog$1.Popup, {
4862
+ ref: forwardRef,
3862
4863
  "data-slot": "sheet-content",
3863
4864
  "data-side": side,
3864
4865
  className: cn("fixed z-50 flex flex-col gap-4 bg-background bg-clip-padding text-sm shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm", className),
@@ -3877,58 +4878,77 @@ function SheetContent({ className, children, side = "right", showCloseButton = t
3877
4878
  })]
3878
4879
  })]
3879
4880
  });
3880
- }
3881
- function SheetHeader({ className, ...props }) {
4881
+ });
4882
+ SheetContent.displayName = "SheetContent";
4883
+ const SheetHeader = React.forwardRef((componentProps, forwardRef) => {
4884
+ const { className, ...props } = componentProps;
3882
4885
  return /* @__PURE__ */ jsx("div", {
4886
+ ref: forwardRef,
3883
4887
  "data-slot": "sheet-header",
3884
4888
  className: cn("flex flex-col gap-1.5 p-4", className),
3885
4889
  ...props
3886
4890
  });
3887
- }
3888
- function SheetFooter({ className, ...props }) {
4891
+ });
4892
+ SheetHeader.displayName = "SheetHeader";
4893
+ const SheetFooter = React.forwardRef((componentProps, forwardRef) => {
4894
+ const { className, ...props } = componentProps;
3889
4895
  return /* @__PURE__ */ jsx("div", {
4896
+ ref: forwardRef,
3890
4897
  "data-slot": "sheet-footer",
3891
4898
  className: cn("mt-auto flex flex-col gap-2 p-4", className),
3892
4899
  ...props
3893
4900
  });
3894
- }
3895
- function SheetTitle({ className, ...props }) {
4901
+ });
4902
+ SheetFooter.displayName = "SheetFooter";
4903
+ const SheetTitle = React.forwardRef((componentProps, forwardRef) => {
4904
+ const { className, ...props } = componentProps;
3896
4905
  return /* @__PURE__ */ jsx(Dialog$1.Title, {
4906
+ ref: forwardRef,
3897
4907
  "data-slot": "sheet-title",
3898
4908
  className: cn("font-medium text-foreground", className),
3899
4909
  ...props
3900
4910
  });
3901
- }
3902
- function SheetDescription({ className, ...props }) {
4911
+ });
4912
+ SheetTitle.displayName = "SheetTitle";
4913
+ const SheetDescription = React.forwardRef((componentProps, forwardRef) => {
4914
+ const { className, ...props } = componentProps;
3903
4915
  return /* @__PURE__ */ jsx(Dialog$1.Description, {
4916
+ ref: forwardRef,
3904
4917
  "data-slot": "sheet-description",
3905
4918
  className: cn("text-sm text-muted-foreground", className),
3906
4919
  ...props
3907
4920
  });
3908
- }
4921
+ });
4922
+ SheetDescription.displayName = "SheetDescription";
3909
4923
 
3910
4924
  //#endregion
3911
4925
  //#region src/components/tooltip.tsx
3912
- function TooltipProvider({ delay = 0, ...props }) {
4926
+ function TooltipProvider(componentProps) {
4927
+ const { delay = 0, ...props } = componentProps;
3913
4928
  return /* @__PURE__ */ jsx(Tooltip$1.Provider, {
3914
4929
  "data-slot": "tooltip-provider",
3915
4930
  delay,
3916
4931
  ...props
3917
4932
  });
3918
4933
  }
3919
- function Tooltip({ ...props }) {
4934
+ function Tooltip(componentProps) {
4935
+ const { ...props } = componentProps;
3920
4936
  return /* @__PURE__ */ jsx(Tooltip$1.Root, {
3921
4937
  "data-slot": "tooltip",
3922
4938
  ...props
3923
4939
  });
3924
4940
  }
3925
- function TooltipTrigger({ ...props }) {
4941
+ const TooltipTrigger = React.forwardRef((componentProps, forwardRef) => {
4942
+ const { ...props } = componentProps;
3926
4943
  return /* @__PURE__ */ jsx(Tooltip$1.Trigger, {
4944
+ ref: forwardRef,
3927
4945
  "data-slot": "tooltip-trigger",
3928
4946
  ...props
3929
4947
  });
3930
- }
3931
- const TooltipContent = React$1.forwardRef(({ className, side = "top", sideOffset = 4, align = "center", alignOffset = 0, children, ...props }, ref) => {
4948
+ });
4949
+ TooltipTrigger.displayName = "TooltipTrigger";
4950
+ const TooltipContent = React.forwardRef((componentProps, forwardRef) => {
4951
+ const { className, side = "top", sideOffset = 4, align = "center", alignOffset = 0, children, ...props } = componentProps;
3932
4952
  return /* @__PURE__ */ jsx(Tooltip$1.Portal, { children: /* @__PURE__ */ jsx(Tooltip$1.Positioner, {
3933
4953
  align,
3934
4954
  alignOffset,
@@ -3936,7 +4956,7 @@ const TooltipContent = React$1.forwardRef(({ className, side = "top", sideOffset
3936
4956
  sideOffset,
3937
4957
  className: "isolate z-50",
3938
4958
  children: /* @__PURE__ */ jsxs(Tooltip$1.Popup, {
3939
- ref,
4959
+ ref: forwardRef,
3940
4960
  "data-slot": "tooltip-content",
3941
4961
  className: cn("z-50 inline-flex w-fit max-w-sm origin-(--transform-origin) items-center gap-2 rounded-md bg-accent-foreground p-2 text-sm font-medium text-primary-foreground has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
3942
4962
  ...props,
@@ -3950,8 +4970,8 @@ TooltipContent.displayName = "TooltipContent";
3950
4970
  //#region src/hooks/use-mobile.ts
3951
4971
  const MOBILE_BREAKPOINT = 768;
3952
4972
  function useIsMobile() {
3953
- const [isMobile, setIsMobile] = React$1.useState(void 0);
3954
- React$1.useEffect(() => {
4973
+ const [isMobile, setIsMobile] = React.useState(void 0);
4974
+ React.useEffect(() => {
3955
4975
  const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
3956
4976
  const onChange = () => {
3957
4977
  setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
@@ -3971,31 +4991,32 @@ const SIDEBAR_WIDTH = "16rem";
3971
4991
  const SIDEBAR_WIDTH_MOBILE = "18rem";
3972
4992
  const SIDEBAR_WIDTH_ICON = "3rem";
3973
4993
  const SIDEBAR_KEYBOARD_SHORTCUT = "b";
3974
- const SidebarContext = React$1.createContext(null);
4994
+ const SidebarContext = React.createContext(null);
3975
4995
  function useSidebar() {
3976
- const context = React$1.useContext(SidebarContext);
4996
+ const context = React.useContext(SidebarContext);
3977
4997
  if (!context) throw new Error("useSidebar must be used within a SidebarProvider.");
3978
4998
  return context;
3979
4999
  }
3980
- function SidebarProvider({ defaultOpen = true, open: openProp, onOpenChange: setOpenProp, className, style, children, ...props }) {
5000
+ const SidebarProvider = React.forwardRef((componentProps, forwardRef) => {
5001
+ const { defaultOpen = true, open: openProp, onOpenChange: setOpenProp, className, style, children, ...props } = componentProps;
3981
5002
  const isMobile = useIsMobile();
3982
- const [openMobile, setOpenMobile] = React$1.useState(false);
3983
- const [_open, _setOpen] = React$1.useState(defaultOpen);
5003
+ const [openMobile, setOpenMobile] = React.useState(false);
5004
+ const [_open, _setOpen] = React.useState(defaultOpen);
3984
5005
  const open = openProp ?? _open;
3985
- const setOpen = React$1.useCallback((value) => {
5006
+ const setOpen = React.useCallback((value) => {
3986
5007
  const openState = typeof value === "function" ? value(open) : value;
3987
5008
  if (setOpenProp) setOpenProp(openState);
3988
5009
  else _setOpen(openState);
3989
5010
  document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
3990
5011
  }, [setOpenProp, open]);
3991
- const toggleSidebar = React$1.useCallback(() => {
5012
+ const toggleSidebar = React.useCallback(() => {
3992
5013
  return isMobile ? setOpenMobile((open$1) => !open$1) : setOpen((open$1) => !open$1);
3993
5014
  }, [
3994
5015
  isMobile,
3995
5016
  setOpen,
3996
5017
  setOpenMobile
3997
5018
  ]);
3998
- React$1.useEffect(() => {
5019
+ React.useEffect(() => {
3999
5020
  const handleKeyDown = (event) => {
4000
5021
  if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
4001
5022
  event.preventDefault();
@@ -4006,7 +5027,7 @@ function SidebarProvider({ defaultOpen = true, open: openProp, onOpenChange: set
4006
5027
  return () => window.removeEventListener("keydown", handleKeyDown);
4007
5028
  }, [toggleSidebar]);
4008
5029
  const state = open ? "expanded" : "collapsed";
4009
- const contextValue = React$1.useMemo(() => ({
5030
+ const contextValue = React.useMemo(() => ({
4010
5031
  state,
4011
5032
  open,
4012
5033
  setOpen,
@@ -4026,6 +5047,7 @@ function SidebarProvider({ defaultOpen = true, open: openProp, onOpenChange: set
4026
5047
  return /* @__PURE__ */ jsx(SidebarContext.Provider, {
4027
5048
  value: contextValue,
4028
5049
  children: /* @__PURE__ */ jsx("div", {
5050
+ ref: forwardRef,
4029
5051
  "data-slot": "sidebar-wrapper",
4030
5052
  style: {
4031
5053
  "--sidebar-width": SIDEBAR_WIDTH,
@@ -4037,10 +5059,13 @@ function SidebarProvider({ defaultOpen = true, open: openProp, onOpenChange: set
4037
5059
  children
4038
5060
  })
4039
5061
  });
4040
- }
4041
- function Sidebar({ side = "left", variant = "sidebar", collapsible = "offcanvas", className, children, dir, ...props }) {
5062
+ });
5063
+ SidebarProvider.displayName = "SidebarProvider";
5064
+ const Sidebar = React.forwardRef((componentProps, forwardRef) => {
5065
+ const { side = "left", variant = "sidebar", collapsible = "offcanvas", className, children, dir, ...props } = componentProps;
4042
5066
  const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
4043
5067
  if (collapsible === "none") return /* @__PURE__ */ jsx("div", {
5068
+ ref: forwardRef,
4044
5069
  "data-slot": "sidebar",
4045
5070
  className: cn("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground", className),
4046
5071
  ...props,
@@ -4078,6 +5103,7 @@ function Sidebar({ side = "left", variant = "sidebar", collapsible = "offcanvas"
4078
5103
  "data-slot": "sidebar-gap",
4079
5104
  className: cn("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear", "group-data-[collapsible=offcanvas]:w-0", "group-data-[side=right]:rotate-180", variant === "floating" || variant === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)")
4080
5105
  }), /* @__PURE__ */ jsx("div", {
5106
+ ref: forwardRef,
4081
5107
  "data-slot": "sidebar-container",
4082
5108
  "data-side": side,
4083
5109
  className: cn("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex", variant === "floating" || variant === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l", className),
@@ -4090,10 +5116,14 @@ function Sidebar({ side = "left", variant = "sidebar", collapsible = "offcanvas"
4090
5116
  })
4091
5117
  })]
4092
5118
  });
4093
- }
4094
- function SidebarTrigger({ className, onClick, ...props }) {
5119
+ });
5120
+ Sidebar.displayName = "Sidebar";
5121
+ const SidebarTrigger = React.forwardRef((componentProps, forwardRef) => {
5122
+ const { className, onClick, ...props } = componentProps;
4095
5123
  const { toggleSidebar } = useSidebar();
5124
+ const t = useDsTranslation("ds");
4096
5125
  return /* @__PURE__ */ jsxs(Button, {
5126
+ ref: forwardRef,
4097
5127
  "data-sidebar": "trigger",
4098
5128
  "data-slot": "sidebar-trigger",
4099
5129
  variant: "ghost",
@@ -4106,124 +5136,169 @@ function SidebarTrigger({ className, onClick, ...props }) {
4106
5136
  ...props,
4107
5137
  children: [/* @__PURE__ */ jsx(PanelLeftIcon, {}), /* @__PURE__ */ jsx("span", {
4108
5138
  className: "sr-only",
4109
- children: "Toggle Sidebar"
5139
+ children: t("sidebar.toggle")
4110
5140
  })]
4111
5141
  });
4112
- }
4113
- function SidebarRail({ className, ...props }) {
5142
+ });
5143
+ SidebarTrigger.displayName = "SidebarTrigger";
5144
+ const SidebarRail = React.forwardRef((componentProps, forwardRef) => {
5145
+ const { className, ...props } = componentProps;
4114
5146
  const { toggleSidebar } = useSidebar();
5147
+ const t = useDsTranslation("ds");
4115
5148
  return /* @__PURE__ */ jsx("button", {
5149
+ ref: forwardRef,
4116
5150
  "data-sidebar": "rail",
4117
5151
  "data-slot": "sidebar-rail",
4118
- "aria-label": "Toggle Sidebar",
5152
+ "aria-label": t("sidebar.toggle"),
4119
5153
  tabIndex: -1,
4120
5154
  onClick: toggleSidebar,
4121
- title: "Toggle Sidebar",
5155
+ title: t("sidebar.toggle"),
4122
5156
  className: cn("absolute inset-y-0 z-20 hidden w-4 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:start-1/2 after:w-[2px] hover:after:bg-sidebar-border sm:flex ltr:-translate-x-1/2 rtl:-translate-x-1/2", "in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize", "[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize", "group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full hover:group-data-[collapsible=offcanvas]:bg-sidebar", "[[data-side=left][data-collapsible=offcanvas]_&]:-right-2", "[[data-side=right][data-collapsible=offcanvas]_&]:-left-2", className),
4123
5157
  ...props
4124
5158
  });
4125
- }
4126
- function SidebarInset({ className, ...props }) {
5159
+ });
5160
+ SidebarRail.displayName = "SidebarRail";
5161
+ const SidebarInset = React.forwardRef((componentProps, forwardRef) => {
5162
+ const { className, ...props } = componentProps;
4127
5163
  return /* @__PURE__ */ jsx("main", {
5164
+ ref: forwardRef,
4128
5165
  "data-slot": "sidebar-inset",
4129
5166
  className: cn("relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2", className),
4130
5167
  ...props
4131
5168
  });
4132
- }
4133
- function SidebarInput({ className, ...props }) {
5169
+ });
5170
+ SidebarInset.displayName = "SidebarInset";
5171
+ const SidebarInput = React.forwardRef((componentProps, forwardRef) => {
5172
+ const { className, ...props } = componentProps;
4134
5173
  return /* @__PURE__ */ jsx(Input, {
5174
+ ref: forwardRef,
4135
5175
  "data-slot": "sidebar-input",
4136
5176
  "data-sidebar": "input",
4137
5177
  className: cn("h-8 w-full bg-background shadow-none", className),
4138
5178
  ...props
4139
5179
  });
4140
- }
4141
- function SidebarHeader({ className, ...props }) {
5180
+ });
5181
+ SidebarInput.displayName = "SidebarInput";
5182
+ const SidebarHeader = React.forwardRef((componentProps, forwardRef) => {
5183
+ const { className, ...props } = componentProps;
4142
5184
  return /* @__PURE__ */ jsx("div", {
5185
+ ref: forwardRef,
4143
5186
  "data-slot": "sidebar-header",
4144
5187
  "data-sidebar": "header",
4145
5188
  className: cn("flex flex-col gap-2 p-2", className),
4146
5189
  ...props
4147
5190
  });
4148
- }
4149
- function SidebarFooter({ className, ...props }) {
5191
+ });
5192
+ SidebarHeader.displayName = "SidebarHeader";
5193
+ const SidebarFooter = React.forwardRef((componentProps, forwardRef) => {
5194
+ const { className, ...props } = componentProps;
4150
5195
  return /* @__PURE__ */ jsx("div", {
5196
+ ref: forwardRef,
4151
5197
  "data-slot": "sidebar-footer",
4152
5198
  "data-sidebar": "footer",
4153
5199
  className: cn("flex flex-col gap-2 p-2", className),
4154
5200
  ...props
4155
5201
  });
4156
- }
4157
- function SidebarSeparator({ className, ...props }) {
5202
+ });
5203
+ SidebarFooter.displayName = "SidebarFooter";
5204
+ const SidebarSeparator = React.forwardRef((componentProps, forwardRef) => {
5205
+ const { className, ...props } = componentProps;
4158
5206
  return /* @__PURE__ */ jsx(Separator, {
5207
+ ref: forwardRef,
4159
5208
  "data-slot": "sidebar-separator",
4160
5209
  "data-sidebar": "separator",
4161
5210
  className: cn("mx-2 w-auto bg-sidebar-border", className),
4162
5211
  ...props
4163
5212
  });
4164
- }
4165
- function SidebarContent({ className, ...props }) {
5213
+ });
5214
+ SidebarSeparator.displayName = "SidebarSeparator";
5215
+ const SidebarContent = React.forwardRef((componentProps, forwardRef) => {
5216
+ const { className, ...props } = componentProps;
4166
5217
  return /* @__PURE__ */ jsx("div", {
5218
+ ref: forwardRef,
4167
5219
  "data-slot": "sidebar-content",
4168
5220
  "data-sidebar": "content",
4169
5221
  className: cn("no-scrollbar flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden", className),
4170
5222
  ...props
4171
5223
  });
4172
- }
4173
- function SidebarGroup({ className, ...props }) {
5224
+ });
5225
+ SidebarContent.displayName = "SidebarContent";
5226
+ const SidebarGroup = React.forwardRef((componentProps, forwardRef) => {
5227
+ const { className, ...props } = componentProps;
4174
5228
  return /* @__PURE__ */ jsx("div", {
5229
+ ref: forwardRef,
4175
5230
  "data-slot": "sidebar-group",
4176
5231
  "data-sidebar": "group",
4177
5232
  className: cn("relative flex w-full min-w-0 flex-col p-2", className),
4178
5233
  ...props
4179
5234
  });
4180
- }
4181
- function SidebarGroupLabel({ className, render, ...props }) {
5235
+ });
5236
+ SidebarGroup.displayName = "SidebarGroup";
5237
+ const SidebarGroupLabel = React.forwardRef((componentProps, forwardRef) => {
5238
+ const { className, render, ...props } = componentProps;
4182
5239
  return useRender({
4183
5240
  defaultTagName: "div",
4184
- props: mergeProps({ className: cn("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0", className) }, props),
5241
+ props: mergeProps({
5242
+ className: cn("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0", className),
5243
+ ref: forwardRef
5244
+ }, props),
4185
5245
  render,
4186
5246
  state: {
4187
5247
  slot: "sidebar-group-label",
4188
5248
  sidebar: "group-label"
4189
5249
  }
4190
5250
  });
4191
- }
4192
- function SidebarGroupAction({ className, render, ...props }) {
5251
+ });
5252
+ SidebarGroupLabel.displayName = "SidebarGroupLabel";
5253
+ const SidebarGroupAction = React.forwardRef((componentProps, forwardRef) => {
5254
+ const { className, render, ...props } = componentProps;
4193
5255
  return useRender({
4194
5256
  defaultTagName: "button",
4195
- props: mergeProps({ className: cn("absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0", className) }, props),
5257
+ props: mergeProps({
5258
+ className: cn("absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0", className),
5259
+ ref: forwardRef
5260
+ }, props),
4196
5261
  render,
4197
5262
  state: {
4198
5263
  slot: "sidebar-group-action",
4199
5264
  sidebar: "group-action"
4200
5265
  }
4201
5266
  });
4202
- }
4203
- function SidebarGroupContent({ className, ...props }) {
5267
+ });
5268
+ SidebarGroupAction.displayName = "SidebarGroupAction";
5269
+ const SidebarGroupContent = React.forwardRef((componentProps, forwardRef) => {
5270
+ const { className, ...props } = componentProps;
4204
5271
  return /* @__PURE__ */ jsx("div", {
5272
+ ref: forwardRef,
4205
5273
  "data-slot": "sidebar-group-content",
4206
5274
  "data-sidebar": "group-content",
4207
5275
  className: cn("w-full text-sm", className),
4208
5276
  ...props
4209
5277
  });
4210
- }
4211
- function SidebarMenu({ className, ...props }) {
5278
+ });
5279
+ SidebarGroupContent.displayName = "SidebarGroupContent";
5280
+ const SidebarMenu = React.forwardRef((componentProps, forwardRef) => {
5281
+ const { className, ...props } = componentProps;
4212
5282
  return /* @__PURE__ */ jsx("ul", {
5283
+ ref: forwardRef,
4213
5284
  "data-slot": "sidebar-menu",
4214
5285
  "data-sidebar": "menu",
4215
5286
  className: cn("flex w-full min-w-0 flex-col gap-1", className),
4216
5287
  ...props
4217
5288
  });
4218
- }
4219
- function SidebarMenuItem({ className, ...props }) {
5289
+ });
5290
+ SidebarMenu.displayName = "SidebarMenu";
5291
+ const SidebarMenuItem = React.forwardRef((componentProps, forwardRef) => {
5292
+ const { className, ...props } = componentProps;
4220
5293
  return /* @__PURE__ */ jsx("li", {
5294
+ ref: forwardRef,
4221
5295
  "data-slot": "sidebar-menu-item",
4222
5296
  "data-sidebar": "menu-item",
4223
5297
  className: cn("group/menu-item relative", className),
4224
5298
  ...props
4225
5299
  });
4226
- }
5300
+ });
5301
+ SidebarMenuItem.displayName = "SidebarMenuItem";
4227
5302
  const sidebarMenuButtonVariants = cva("peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate", {
4228
5303
  variants: {
4229
5304
  variant: {
@@ -4241,7 +5316,9 @@ const sidebarMenuButtonVariants = cva("peer/menu-button group/menu-button flex w
4241
5316
  size: "default"
4242
5317
  }
4243
5318
  });
4244
- const SidebarMenuButton = React$1.forwardRef(({ render, isActive = false, variant = "default", size = "default", tooltip, className, ...props }, ref) => {
5319
+ const SidebarMenuButton = React.forwardRef((componentProps, forwardRef) => {
5320
+ const { render, isActive = false, variant = "default", size = "default", tooltip: tooltipProp, className, ...props } = componentProps;
5321
+ let tooltip = tooltipProp;
4245
5322
  const { isMobile, state } = useSidebar();
4246
5323
  const comp = useRender({
4247
5324
  defaultTagName: "button",
@@ -4250,7 +5327,7 @@ const SidebarMenuButton = React$1.forwardRef(({ render, isActive = false, varian
4250
5327
  variant,
4251
5328
  size
4252
5329
  }), className),
4253
- ref
5330
+ ref: forwardRef
4254
5331
  }, props),
4255
5332
  render: !tooltip ? render : /* @__PURE__ */ jsx(TooltipTrigger, { render }),
4256
5333
  state: {
@@ -4270,12 +5347,13 @@ const SidebarMenuButton = React$1.forwardRef(({ render, isActive = false, varian
4270
5347
  })] });
4271
5348
  });
4272
5349
  SidebarMenuButton.displayName = "SidebarMenuButton";
4273
- const SidebarMenuAction = React$1.forwardRef(({ className, render, showOnHover = false, ...props }, ref) => {
5350
+ const SidebarMenuAction = React.forwardRef((componentProps, forwardRef) => {
5351
+ const { className, render, showOnHover = false, ...props } = componentProps;
4274
5352
  return useRender({
4275
5353
  defaultTagName: "button",
4276
5354
  props: mergeProps({
4277
5355
  className: cn("absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0", showOnHover && "group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 peer-data-active/menu-button:text-sidebar-accent-foreground aria-expanded:opacity-100 md:opacity-0", className),
4278
- ref
5356
+ ref: forwardRef
4279
5357
  }, props),
4280
5358
  render,
4281
5359
  state: {
@@ -4285,20 +5363,25 @@ const SidebarMenuAction = React$1.forwardRef(({ className, render, showOnHover =
4285
5363
  });
4286
5364
  });
4287
5365
  SidebarMenuAction.displayName = "SidebarMenuAction";
4288
- function SidebarMenuBadge({ className, ...props }) {
5366
+ const SidebarMenuBadge = React.forwardRef((componentProps, forwardRef) => {
5367
+ const { className, ...props } = componentProps;
4289
5368
  return /* @__PURE__ */ jsx("div", {
5369
+ ref: forwardRef,
4290
5370
  "data-slot": "sidebar-menu-badge",
4291
5371
  "data-sidebar": "menu-badge",
4292
5372
  className: cn("pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium text-sidebar-foreground tabular-nums select-none group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 peer-data-active/menu-button:text-sidebar-accent-foreground", className),
4293
5373
  ...props
4294
5374
  });
4295
- }
4296
- function SidebarMenuSkeleton({ className, showIcon = false, width: widthProp, ...props }) {
4297
- const [fallbackWidth] = React$1.useState(() => {
5375
+ });
5376
+ SidebarMenuBadge.displayName = "SidebarMenuBadge";
5377
+ const SidebarMenuSkeleton = React.forwardRef((componentProps, forwardRef) => {
5378
+ const { className, showIcon = false, width: widthProp, ...props } = componentProps;
5379
+ const [fallbackWidth] = React.useState(() => {
4298
5380
  return `${Math.floor(Math.random() * 40) + 50}%`;
4299
5381
  });
4300
5382
  const width = widthProp ?? fallbackWidth;
4301
5383
  return /* @__PURE__ */ jsxs("div", {
5384
+ ref: forwardRef,
4302
5385
  "data-slot": "sidebar-menu-skeleton",
4303
5386
  "data-sidebar": "menu-skeleton",
4304
5387
  className: cn("flex h-8 items-center gap-2 rounded-md px-2", className),
@@ -4312,27 +5395,38 @@ function SidebarMenuSkeleton({ className, showIcon = false, width: widthProp, ..
4312
5395
  style: { "--skeleton-width": width }
4313
5396
  })]
4314
5397
  });
4315
- }
4316
- function SidebarMenuSub({ className, ...props }) {
5398
+ });
5399
+ SidebarMenuSkeleton.displayName = "SidebarMenuSkeleton";
5400
+ const SidebarMenuSub = React.forwardRef((componentProps, forwardRef) => {
5401
+ const { className, ...props } = componentProps;
4317
5402
  return /* @__PURE__ */ jsx("ul", {
5403
+ ref: forwardRef,
4318
5404
  "data-slot": "sidebar-menu-sub",
4319
5405
  "data-sidebar": "menu-sub",
4320
5406
  className: cn("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5 group-data-[collapsible=icon]:hidden", className),
4321
5407
  ...props
4322
5408
  });
4323
- }
4324
- function SidebarMenuSubItem({ className, ...props }) {
5409
+ });
5410
+ SidebarMenuSub.displayName = "SidebarMenuSub";
5411
+ const SidebarMenuSubItem = React.forwardRef((componentProps, forwardRef) => {
5412
+ const { className, ...props } = componentProps;
4325
5413
  return /* @__PURE__ */ jsx("li", {
5414
+ ref: forwardRef,
4326
5415
  "data-slot": "sidebar-menu-sub-item",
4327
5416
  "data-sidebar": "menu-sub-item",
4328
5417
  className: cn("group/menu-sub-item relative", className),
4329
5418
  ...props
4330
5419
  });
4331
- }
4332
- function SidebarMenuSubButton({ render, size = "md", isActive = false, className, ...props }) {
5420
+ });
5421
+ SidebarMenuSubItem.displayName = "SidebarMenuSubItem";
5422
+ const SidebarMenuSubButton = React.forwardRef((componentProps, forwardRef) => {
5423
+ const { render, size = "md", isActive = false, className, ...props } = componentProps;
4333
5424
  return useRender({
4334
5425
  defaultTagName: "a",
4335
- props: mergeProps({ className: cn("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground ring-sidebar-ring outline-hidden group-data-[collapsible=icon]:hidden hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[size=md]:text-sm data-[size=sm]:text-xs data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground", className) }, props),
5426
+ props: mergeProps({
5427
+ className: cn("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground ring-sidebar-ring outline-hidden group-data-[collapsible=icon]:hidden hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[size=md]:text-sm data-[size=sm]:text-xs data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground", className),
5428
+ ref: forwardRef
5429
+ }, props),
4336
5430
  render,
4337
5431
  state: {
4338
5432
  slot: "sidebar-menu-sub-button",
@@ -4341,18 +5435,21 @@ function SidebarMenuSubButton({ render, size = "md", isActive = false, className
4341
5435
  active: isActive
4342
5436
  }
4343
5437
  });
4344
- }
5438
+ });
5439
+ SidebarMenuSubButton.displayName = "SidebarMenuSubButton";
4345
5440
 
4346
5441
  //#endregion
4347
5442
  //#region src/components/slider.tsx
4348
- function Slider({ className, defaultValue, value, min = 0, max = 100, orientation = "horizontal", ...props }) {
4349
- const _values = React$1.useMemo(() => Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min, max], [
5443
+ const Slider = React.forwardRef((componentProps, forwardRef) => {
5444
+ const { className, defaultValue, value, min = 0, max = 100, orientation = "horizontal", ...props } = componentProps;
5445
+ const _values = React.useMemo(() => Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min, max], [
4350
5446
  value,
4351
5447
  defaultValue,
4352
5448
  min,
4353
5449
  max
4354
5450
  ]);
4355
5451
  return /* @__PURE__ */ jsx(Slider$1.Root, {
5452
+ ref: forwardRef,
4356
5453
  className: cn("data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full", className),
4357
5454
  "data-slot": "slider",
4358
5455
  "data-orientation": orientation,
@@ -4381,11 +5478,13 @@ function Slider({ className, defaultValue, value, min = 0, max = 100, orientatio
4381
5478
  }, index))]
4382
5479
  })
4383
5480
  });
4384
- }
5481
+ });
5482
+ Slider.displayName = "Slider";
4385
5483
 
4386
5484
  //#endregion
4387
5485
  //#region src/components/sonner.tsx
4388
- const Toaster = ({ ...props }) => {
5486
+ const Toaster = (componentProps) => {
5487
+ const { ...props } = componentProps;
4389
5488
  const { theme = "system" } = useTheme$1();
4390
5489
  return /* @__PURE__ */ jsx(Toaster$1, {
4391
5490
  theme,
@@ -4418,22 +5517,22 @@ const Toaster = ({ ...props }) => {
4418
5517
 
4419
5518
  //#endregion
4420
5519
  //#region src/components/stepper.tsx
4421
- const StepperContext = React$1.createContext(void 0);
5520
+ const StepperContext = React.createContext(void 0);
4422
5521
  function useStepper() {
4423
- const ctx = React$1.useContext(StepperContext);
5522
+ const ctx = React.useContext(StepperContext);
4424
5523
  if (!ctx) throw new Error("useStepper must be used within a Stepper");
4425
5524
  return ctx;
4426
5525
  }
4427
- const Stepper = React$1.forwardRef((componentProps, forwardRef) => {
5526
+ const Stepper = React.forwardRef((componentProps, forwardRef) => {
4428
5527
  const { steps, defaultValue, className, children, value, onValueChange, ...props } = componentProps;
4429
5528
  const [activeId = "", setActiveId] = useControllableState({
4430
5529
  prop: value,
4431
5530
  defaultProp: defaultValue ?? steps[0]?.id,
4432
5531
  onChange: onValueChange
4433
5532
  });
4434
- const goTo = React$1.useCallback((id) => setActiveId(id), [setActiveId]);
4435
- const getIndex = React$1.useCallback((id) => steps.findIndex((s) => s.id === id), [steps]);
4436
- const contextValue = React$1.useMemo(() => ({
5533
+ const goTo = React.useCallback((id) => setActiveId(id), [setActiveId]);
5534
+ const getIndex = React.useCallback((id) => steps.findIndex((s) => s.id === id), [steps]);
5535
+ const contextValue = React.useMemo(() => ({
4437
5536
  activeId,
4438
5537
  goTo,
4439
5538
  getIndex,
@@ -4456,7 +5555,7 @@ const Stepper = React$1.forwardRef((componentProps, forwardRef) => {
4456
5555
  });
4457
5556
  });
4458
5557
  Stepper.displayName = "Stepper";
4459
- const StepperProgress = React$1.forwardRef((componentProps, forwardRef) => {
5558
+ const StepperProgress = React.forwardRef((componentProps, forwardRef) => {
4460
5559
  const { steps: stepIds, className, ...props } = componentProps;
4461
5560
  const { activeId, getIndex, steps } = useStepper();
4462
5561
  const ids = stepIds ?? steps.map((s) => s.id);
@@ -4479,7 +5578,7 @@ const StepperProgress = React$1.forwardRef((componentProps, forwardRef) => {
4479
5578
  });
4480
5579
  });
4481
5580
  StepperProgress.displayName = "StepperProgress";
4482
- const StepperCounter = React$1.forwardRef((componentProps, forwardRef) => {
5581
+ const StepperCounter = React.forwardRef((componentProps, forwardRef) => {
4483
5582
  const { steps: stepIds, className, children, ...props } = componentProps;
4484
5583
  const { activeId, steps } = useStepper();
4485
5584
  const ids = stepIds ?? steps.map((s) => s.id);
@@ -4499,7 +5598,7 @@ const StepperCounter = React$1.forwardRef((componentProps, forwardRef) => {
4499
5598
  });
4500
5599
  });
4501
5600
  StepperCounter.displayName = "StepperCounter";
4502
- const StepperPanel = React$1.forwardRef((componentProps, forwardRef) => {
5601
+ const StepperPanel = React.forwardRef((componentProps, forwardRef) => {
4503
5602
  const { className, ...props } = componentProps;
4504
5603
  const { activeId } = useStepper();
4505
5604
  return /* @__PURE__ */ jsx("div", {
@@ -4511,7 +5610,7 @@ const StepperPanel = React$1.forwardRef((componentProps, forwardRef) => {
4511
5610
  });
4512
5611
  });
4513
5612
  StepperPanel.displayName = "StepperPanel";
4514
- const StepperContent = React$1.forwardRef((componentProps, forwardRef) => {
5613
+ const StepperContent = React.forwardRef((componentProps, forwardRef) => {
4515
5614
  const { value, forceMount, className, ...props } = componentProps;
4516
5615
  const { activeId } = useStepper();
4517
5616
  const isActive = value === activeId;
@@ -4529,8 +5628,10 @@ StepperContent.displayName = "StepperContent";
4529
5628
 
4530
5629
  //#endregion
4531
5630
  //#region src/components/switch.tsx
4532
- function Switch({ className, ...props }) {
5631
+ const Switch = React.forwardRef((componentProps, forwardRef) => {
5632
+ const { className, ...props } = componentProps;
4533
5633
  return /* @__PURE__ */ jsx(Switch$1.Root, {
5634
+ ref: forwardRef,
4534
5635
  "data-slot": "switch",
4535
5636
  className: cn("peer relative inline-flex h-6 w-10 shrink-0 items-center rounded-full border border-transparent p-1 transition-all outline-none active:opacity-60 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive focus-visible:aria-invalid:ring-3 focus-visible:aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:focus-visible:aria-invalid:ring-destructive/40 data-checked:bg-primary aria-invalid:data-checked:bg-destructive data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50", className),
4536
5637
  ...props,
@@ -4539,39 +5640,52 @@ function Switch({ className, ...props }) {
4539
5640
  className: "pointer-events-none block size-4 rounded-full bg-background ring-0 transition-transform data-unchecked:translate-x-0 data-checked:translate-x-4 dark:data-checked:bg-primary-foreground dark:data-unchecked:bg-foreground"
4540
5641
  })
4541
5642
  });
4542
- }
5643
+ });
5644
+ Switch.displayName = "Switch";
4543
5645
 
4544
5646
  //#endregion
4545
5647
  //#region src/components/tabs.tsx
4546
- function Tabs({ className, orientation = "horizontal", ...props }) {
5648
+ const Tabs = React.forwardRef((componentProps, forwardRef) => {
5649
+ const { className, orientation = "horizontal", ...props } = componentProps;
4547
5650
  return /* @__PURE__ */ jsx(Tabs$1.Root, {
5651
+ ref: forwardRef,
4548
5652
  "data-slot": "tabs",
4549
5653
  "data-orientation": orientation,
4550
5654
  className: cn("group/tabs flex gap-2 data-[orientation=horizontal]:flex-col", className),
4551
5655
  ...props
4552
5656
  });
4553
- }
4554
- function TabsList({ className, ...props }) {
5657
+ });
5658
+ Tabs.displayName = "Tabs";
5659
+ const TabsList = React.forwardRef((componentProps, forwardRef) => {
5660
+ const { className, ...props } = componentProps;
4555
5661
  return /* @__PURE__ */ jsx(Tabs$1.List, {
5662
+ ref: forwardRef,
4556
5663
  "data-slot": "tabs-list",
4557
5664
  className: cn("group/tabs-list inline-flex w-fit items-center justify-center gap-4 text-muted-foreground group-data-[orientation=horizontal]/tabs:h-9 group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col", className),
4558
5665
  ...props
4559
5666
  });
4560
- }
4561
- function TabsTrigger({ className, ...props }) {
5667
+ });
5668
+ TabsList.displayName = "TabsList";
5669
+ const TabsTrigger = React.forwardRef((componentProps, forwardRef) => {
5670
+ const { className, ...props } = componentProps;
4562
5671
  return /* @__PURE__ */ jsx(Tabs$1.Tab, {
5672
+ ref: forwardRef,
4563
5673
  "data-slot": "tabs-trigger",
4564
5674
  className: cn("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground data-active:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", "after:absolute after:rounded-full after:bg-foreground after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-1.5 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0.5 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 data-active:after:opacity-100", className),
4565
5675
  ...props
4566
5676
  });
4567
- }
4568
- function TabsContent({ className, ...props }) {
5677
+ });
5678
+ TabsTrigger.displayName = "TabsTrigger";
5679
+ const TabsContent = React.forwardRef((componentProps, forwardRef) => {
5680
+ const { className, ...props } = componentProps;
4569
5681
  return /* @__PURE__ */ jsx(Tabs$1.Panel, {
5682
+ ref: forwardRef,
4570
5683
  "data-slot": "tabs-content",
4571
5684
  className: cn("flex-1 text-sm outline-none", className),
4572
5685
  ...props
4573
5686
  });
4574
- }
5687
+ });
5688
+ TabsContent.displayName = "TabsContent";
4575
5689
 
4576
5690
  //#endregion
4577
5691
  //#region src/components/toggle.tsx
@@ -4592,8 +5706,10 @@ const toggleVariants = cva("group/toggle inline-flex items-center justify-center
4592
5706
  size: "default"
4593
5707
  }
4594
5708
  });
4595
- function Toggle({ className, variant = "default", size = "default", ...props }) {
5709
+ const Toggle = React.forwardRef((componentProps, forwardRef) => {
5710
+ const { className, variant = "default", size = "default", ...props } = componentProps;
4596
5711
  return /* @__PURE__ */ jsx(Toggle$1, {
5712
+ ref: forwardRef,
4597
5713
  "data-slot": "toggle",
4598
5714
  className: cn(toggleVariants({
4599
5715
  variant,
@@ -4602,19 +5718,22 @@ function Toggle({ className, variant = "default", size = "default", ...props })
4602
5718
  })),
4603
5719
  ...props
4604
5720
  });
4605
- }
5721
+ });
5722
+ Toggle.displayName = "Toggle";
4606
5723
 
4607
5724
  //#endregion
4608
5725
  //#region src/components/toggle-group.tsx
4609
- const ToggleGroupContext = React$1.createContext({
5726
+ const ToggleGroupContext = React.createContext({
4610
5727
  size: "default",
4611
5728
  variant: "default",
4612
5729
  spacing: 0,
4613
5730
  orientation: "horizontal",
4614
5731
  block: false
4615
5732
  });
4616
- function ToggleGroup({ className, variant, size, spacing = 0, orientation = "horizontal", block = false, children, ...props }) {
5733
+ const ToggleGroup = React.forwardRef((componentProps, forwardRef) => {
5734
+ const { className, variant, size, spacing = 0, orientation = "horizontal", block = false, children, ...props } = componentProps;
4617
5735
  return /* @__PURE__ */ jsx(ToggleGroup$1, {
5736
+ ref: forwardRef,
4618
5737
  "data-slot": "toggle-group",
4619
5738
  "data-variant": variant,
4620
5739
  "data-size": size,
@@ -4635,10 +5754,13 @@ function ToggleGroup({ className, variant, size, spacing = 0, orientation = "hor
4635
5754
  children
4636
5755
  })
4637
5756
  });
4638
- }
4639
- function ToggleGroupItem({ className, children, variant = "default", size = "default", ...props }) {
4640
- const context = React$1.useContext(ToggleGroupContext);
5757
+ });
5758
+ ToggleGroup.displayName = "ToggleGroup";
5759
+ const ToggleGroupItem = React.forwardRef((componentProps, forwardRef) => {
5760
+ const { className, children, variant = "default", size = "default", ...props } = componentProps;
5761
+ const context = React.useContext(ToggleGroupContext);
4641
5762
  return /* @__PURE__ */ jsx(Toggle$1, {
5763
+ ref: forwardRef,
4642
5764
  "data-slot": "toggle-group-item",
4643
5765
  "data-variant": context.variant || variant,
4644
5766
  "data-size": context.size || size,
@@ -4650,6 +5772,48 @@ function ToggleGroupItem({ className, children, variant = "default", size = "def
4650
5772
  ...props,
4651
5773
  children
4652
5774
  });
5775
+ });
5776
+ ToggleGroupItem.displayName = "ToggleGroupItem";
5777
+
5778
+ //#endregion
5779
+ //#region src/components/ds-i18n-provider.tsx
5780
+ /**
5781
+ * Drives the language of the shared `dsI18n` singleton from React.
5782
+ *
5783
+ * PRODUCTION INVARIANT — mount EXACTLY ONE `DsI18nProvider` at the app root, as an
5784
+ * ancestor of all DS components. This is NOT a context provider: it mutates the single
5785
+ * shared `dsI18n` singleton inside an effect. Therefore NEVER nest two providers with
5786
+ * differing languages — they are competing singleton mutators, and because React runs
5787
+ * effects inside-out, the OUTERMOST provider's effect runs last and wins, silently
5788
+ * overriding the inner one. DS apps are single-locale, so one root provider is correct.
5789
+ *
5790
+ * Use either `DsI18nProvider` (React apps) OR `syncDsLanguage` (non-React startup) — not
5791
+ * both, for the same reason: each mutates the same singleton and they would compete.
5792
+ */
5793
+ function DsI18nProvider(componentProps) {
5794
+ const { language, children } = componentProps;
5795
+ React.useEffect(() => {
5796
+ const target = language ?? detectInitialLanguage();
5797
+ if (dsI18n.language !== target) dsI18n.changeLanguage(target);
5798
+ }, [language]);
5799
+ return children;
5800
+ }
5801
+ /**
5802
+ * Escape hatch for non-React / global-instance startup (e.g. the browser extension).
5803
+ * Mirrors `instance`'s current language onto the ds instance and follows its changes.
5804
+ * Returns an unsubscribe function.
5805
+ *
5806
+ * PRODUCTION INVARIANT — call this OR mount `DsI18nProvider`, never both. Both mutate the
5807
+ * same `dsI18n` singleton, so running them together makes them compete (last writer wins).
5808
+ * Like the provider, the singleton is single-locale: drive it from exactly one source.
5809
+ */
5810
+ function syncDsLanguage(instance) {
5811
+ if (instance.language && dsI18n.language !== instance.language) dsI18n.changeLanguage(instance.language);
5812
+ const handler = (lng) => {
5813
+ dsI18n.changeLanguage(lng);
5814
+ };
5815
+ instance.on("languageChanged", handler);
5816
+ return () => instance.off("languageChanged", handler);
4653
5817
  }
4654
5818
 
4655
5819
  //#endregion
@@ -4674,11 +5838,11 @@ function ToggleGroupItem({ className, children, variant = "default", size = "def
4674
5838
  */
4675
5839
  function useAudioGauge(options = {}) {
4676
5840
  const { intervalMs = 16, fftSize = 32, smoothing = .3, gain = 2 } = options;
4677
- const [value, setValue] = React$1.useState(0);
4678
- const [error, setError] = React$1.useState(null);
4679
- const gainRef = React$1.useRef(gain);
5841
+ const [value, setValue] = React.useState(0);
5842
+ const [error, setError] = React.useState(null);
5843
+ const gainRef = React.useRef(gain);
4680
5844
  gainRef.current = gain;
4681
- React$1.useEffect(() => {
5845
+ React.useEffect(() => {
4682
5846
  let cancelled = false;
4683
5847
  let stream;
4684
5848
  let ctx;
@@ -4727,4 +5891,4 @@ function useAudioGauge(options = {}) {
4727
5891
  }
4728
5892
 
4729
5893
  //#endregion
4730
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActionBar, ActionBarButton, ActionBarContext, ActionBarHeight, Alert, AlertAction, AlertAction as BannerAction, AlertDescription, AlertDescription as BannerDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AlertTitle as BannerTitle, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, BadgeGroup, BadgeGroupCount, Banner, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Calendar, CalendarDayButton, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, Chip, ChipRemove, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, CounterBadge, CountryFlag, DataTable, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerBackdrop, DrawerBar, DrawerClose, DrawerContent, DrawerCreateHandle, DrawerDescription, DrawerFooter, DrawerHeader, DrawerMenu, DrawerMenuCheckboxItem, DrawerMenuGroup, DrawerMenuGroupLabel, DrawerMenuItem, DrawerMenuRadioGroup, DrawerMenuRadioItem, DrawerMenuSeparator, DrawerMenuTrigger, DrawerPanel, DrawerPopup, DrawerPortal, DrawerPrimitive, DrawerSwipeArea, DrawerTitle, DrawerTrigger, DrawerViewport, DropdownMenu, DropdownMenuAddon, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Dropzone, DropzoneActions, DropzoneContent, DropzoneDescription, DropzoneIcon, DropzoneTitle, DropzoneTrigger, EmojiPicker, EmojiPickerCategories, EmojiPickerContent, EmojiPickerTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, FAB, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, Filter, FilterClearAllButton, FilterGroup, Gauge, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Label, List, ListCol, ListRow, NotificationQueueProvider, NotificationSlot, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, Progress, ProgressIndicator, ProgressLabel, ProgressTrack, ProgressValue, RadioGroup, RadioGroupItem, ScrollArea, ScrollAreaPrimitive, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Spinner, Stepper, StepperContent, StepperCounter, StepperPanel, StepperProgress, Switch, Table, TableBody, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThemeProvider, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, alertVariants, bannerVariants, buttonGroupVariants, buttonVariants, cn, counterBadgeVariants, fabVariants, selectTriggerVariants, spinnerVariants, toast, toggleVariants, useAudioGauge, useComboboxAnchor, useNotification, useNotificationQueue, useSidebar, useStepper, useTheme };
5894
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActionBar, ActionBarButton, ActionBarContext, ActionBarHeight, Alert, AlertAction, AlertAction as BannerAction, AlertDescription, AlertDescription as BannerDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AlertTitle as BannerTitle, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, BadgeGroup, BadgeGroupCount, Banner, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Calendar, CalendarDayButton, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, Chip, ChipRemove, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, CounterBadge, CountryFlag, DataTable, DataTree, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerBackdrop, DrawerBar, DrawerClose, DrawerContent, DrawerCreateHandle, DrawerDescription, DrawerFooter, DrawerHeader, DrawerMenu, DrawerMenuCheckboxItem, DrawerMenuGroup, DrawerMenuGroupLabel, DrawerMenuItem, DrawerMenuRadioGroup, DrawerMenuRadioItem, DrawerMenuSeparator, DrawerMenuTrigger, DrawerPanel, DrawerPopup, DrawerPortal, DrawerPrimitive, DrawerSwipeArea, DrawerTitle, DrawerTrigger, DrawerViewport, DropdownMenu, DropdownMenuAddon, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Dropzone, DropzoneActions, DropzoneContent, DropzoneDescription, DropzoneIcon, DropzoneTitle, DropzoneTrigger, DsI18nProvider, EmojiPicker, EmojiPickerCategories, EmojiPickerContent, EmojiPickerTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, FAB, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, Filter, FilterClearAllButton, FilterGroup, Gauge, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Label, List, ListCol, ListRow, NotificationQueueProvider, NotificationSlot, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, Progress, ProgressIndicator, ProgressLabel, ProgressTrack, ProgressValue, RadioGroup, RadioGroupItem, SUPPORTED_LANGUAGES, ScrollArea, ScrollAreaPrimitive, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Spinner, Stepper, StepperContent, StepperCounter, StepperPanel, StepperProgress, Switch, Table, TableBody, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThemeProvider, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Tree, TreeDragLine, TreeItem, TreeItemLabel, alertVariants, bannerVariants, buttonGroupVariants, buttonVariants, cn, counterBadgeVariants, detectInitialLanguage, fabVariants, registerI18nNamespace, selectTriggerVariants, spinnerVariants, syncDsLanguage, toast, toggleVariants, useAudioGauge, useComboboxAnchor, useDsTranslation, useNotification, useNotificationQueue, useSidebar, useStepper, useTheme };