@doscientos/ui 0.1.31 → 0.1.33

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.cjs CHANGED
@@ -35,6 +35,7 @@ __export(index_exports, {
35
35
  AccordionContent: () => AccordionContent,
36
36
  AccordionItem: () => AccordionItem,
37
37
  AccordionTrigger: () => AccordionTrigger,
38
+ ActiveFilters: () => ActiveFilters,
38
39
  Alert: () => Alert,
39
40
  AlertAction: () => AlertAction,
40
41
  AlertDescription: () => AlertDescription,
@@ -56,6 +57,7 @@ __export(index_exports, {
56
57
  AppShellMain: () => AppShellMain,
57
58
  AppShellMobileHeader: () => AppShellMobileHeader,
58
59
  AppShellSidebar: () => AppShellSidebar,
60
+ AsyncBoundary: () => AsyncBoundary,
59
61
  AutocompleteCombobox: () => AutocompleteCombobox,
60
62
  Avatar: () => Avatar,
61
63
  AvatarBadge: () => AvatarBadge,
@@ -97,7 +99,20 @@ __export(index_exports, {
97
99
  CommandItem: () => CommandItem,
98
100
  CommandList: () => CommandList,
99
101
  ConfirmDialog: () => ConfirmDialog,
102
+ CopyButton: () => CopyButton,
100
103
  DangerZone: () => DangerZone,
104
+ DataViewState: () => DataViewState,
105
+ DataViewStateActions: () => DataViewStateActions,
106
+ DataViewStateDescription: () => DataViewStateDescription,
107
+ DataViewStateTitle: () => DataViewStateTitle,
108
+ DescriptionDetails: () => DescriptionDetails,
109
+ DescriptionItem: () => DescriptionItem,
110
+ DescriptionList: () => DescriptionList,
111
+ DescriptionTerm: () => DescriptionTerm,
112
+ DetailDrawer: () => DetailDrawer,
113
+ DetailDrawerBody: () => DetailDrawerBody,
114
+ DetailDrawerFooter: () => DrawerFooter,
115
+ DetailDrawerHeader: () => DrawerHeader,
101
116
  Dialog: () => Dialog,
102
117
  DialogClose: () => DialogClose,
103
118
  DialogContent: () => DialogContent,
@@ -135,6 +150,12 @@ __export(index_exports, {
135
150
  EmptyStateHeader: () => EmptyStateHeader,
136
151
  EmptyStateMedia: () => EmptyStateMedia,
137
152
  EmptyStateTitle: () => EmptyStateTitle,
153
+ ErrorBoundary: () => ErrorBoundary,
154
+ ErrorState: () => ErrorState,
155
+ ErrorStateActions: () => ErrorStateActions,
156
+ ErrorStateDescription: () => ErrorStateDescription,
157
+ ErrorStateIcon: () => ErrorStateIcon,
158
+ ErrorStateTitle: () => ErrorStateTitle,
138
159
  Field: () => Field,
139
160
  FieldContent: () => FieldContent,
140
161
  FieldDescription: () => FieldDescription,
@@ -145,6 +166,9 @@ __export(index_exports, {
145
166
  FieldSeparator: () => FieldSeparator,
146
167
  FieldSet: () => FieldSet,
147
168
  FieldTitle: () => FieldTitle,
169
+ FilterBar: () => FilterBar,
170
+ FilterChip: () => FilterChip,
171
+ FilterGroup: () => FilterGroup,
148
172
  FormFeedback: () => FormFeedback,
149
173
  FormRow: () => FormRow,
150
174
  HighlightMatch: () => HighlightMatch,
@@ -172,6 +196,7 @@ __export(index_exports, {
172
196
  MenuItem: () => MenuItem,
173
197
  MenuTrigger: () => MenuTrigger,
174
198
  MetricCard: () => MetricCard,
199
+ MetricGrid: () => MetricGrid,
175
200
  OtpInput: () => OtpInput2,
176
201
  PageHeader: () => PageHeader,
177
202
  PageHeaderActions: () => PageHeaderActions,
@@ -183,12 +208,18 @@ __export(index_exports, {
183
208
  PopoverContent: () => PopoverContent,
184
209
  PopoverTrigger: () => PopoverTrigger,
185
210
  QuantityInput: () => QuantityInput,
211
+ SectionHeader: () => SectionHeader,
212
+ SectionHeaderActions: () => SectionHeaderActions,
213
+ SectionHeaderDescription: () => SectionHeaderDescription,
214
+ SectionHeaderHeading: () => SectionHeaderHeading,
215
+ SectionHeaderTitle: () => SectionHeaderTitle,
186
216
  Select: () => Select,
187
217
  SelectContent: () => SelectContent,
188
218
  SelectItem: () => SelectItem,
189
219
  SelectList: () => SelectList,
190
220
  SelectTrigger: () => SelectTrigger,
191
221
  SelectValue: () => SelectValue,
222
+ SelectionToolbar: () => SelectionToolbar,
192
223
  Separator: () => Separator,
193
224
  Sheet: () => Sheet,
194
225
  SheetClose: () => SheetClose,
@@ -218,10 +249,13 @@ __export(index_exports, {
218
249
  TableBody: () => TableBody,
219
250
  TableCaption: () => TableCaption,
220
251
  TableCell: () => TableCell,
252
+ TableEmpty: () => TableEmpty,
221
253
  TableFooter: () => TableFooter,
222
254
  TableHead: () => TableHead,
223
255
  TableHeader: () => TableHeader,
256
+ TableLoading: () => TableLoading,
224
257
  TableRow: () => TableRow,
258
+ TableToolbar: () => TableToolbar,
225
259
  Tabs: () => Tabs,
226
260
  TabsContent: () => TabsContent,
227
261
  TabsList: () => TabsList,
@@ -249,8 +283,16 @@ __export(index_exports, {
249
283
  formSnapshot: () => formSnapshot,
250
284
  getTextMatchParts: () => getTextMatchParts,
251
285
  inputGroupAddonVariants: () => inputGroupAddonVariants,
286
+ readSearchParam: () => readSearchParam,
287
+ readSearchParamArray: () => readSearchParamArray,
288
+ readSearchParamEnum: () => readSearchParamEnum,
289
+ readSearchParamInt: () => readSearchParamInt,
290
+ toSearchParams: () => toSearchParams,
252
291
  toast: () => toast,
292
+ updateSearchParams: () => updateSearchParams,
293
+ useAsyncAction: () => useAsyncAction,
253
294
  useAutosave: () => useAutosave,
295
+ useClipboard: () => useClipboard,
254
296
  useDebouncedValue: () => useDebouncedValue,
255
297
  useFormDirty: () => useFormDirty,
256
298
  useFormFeedback: () => useFormFeedback,
@@ -259,8 +301,44 @@ __export(index_exports, {
259
301
  });
260
302
  module.exports = __toCommonJS(index_exports);
261
303
 
262
- // src/hooks/use-autosave.ts
304
+ // src/hooks/use-async-action.ts
263
305
  var import_react = require("react");
306
+ function useAsyncAction(action) {
307
+ const [status, setStatus] = (0, import_react.useState)("idle");
308
+ const [error, setError] = (0, import_react.useState)(null);
309
+ const [data, setData] = (0, import_react.useState)(null);
310
+ const pendingRef = (0, import_react.useRef)(false);
311
+ const run = (0, import_react.useCallback)(
312
+ async (...args) => {
313
+ if (pendingRef.current) return null;
314
+ pendingRef.current = true;
315
+ setStatus("pending");
316
+ setError(null);
317
+ try {
318
+ const result = await action(...args);
319
+ setData(result);
320
+ setStatus("success");
321
+ return result;
322
+ } catch (cause) {
323
+ setError(cause instanceof Error ? cause : new Error("La acci\xF3n no se pudo completar."));
324
+ setStatus("error");
325
+ return null;
326
+ } finally {
327
+ pendingRef.current = false;
328
+ }
329
+ },
330
+ [action]
331
+ );
332
+ const reset = (0, import_react.useCallback)(() => {
333
+ setData(null);
334
+ setError(null);
335
+ setStatus("idle");
336
+ }, []);
337
+ return { data, error, isPending: status === "pending", reset, run, status };
338
+ }
339
+
340
+ // src/hooks/use-autosave.ts
341
+ var import_react2 = require("react");
264
342
  function useAutosave({
265
343
  data,
266
344
  onSave,
@@ -268,28 +346,32 @@ function useAutosave({
268
346
  enabled = true,
269
347
  serialize = JSON.stringify
270
348
  }) {
271
- const [status, setStatus] = (0, import_react.useState)("idle");
272
- const [error, setError] = (0, import_react.useState)(null);
273
- const lastSaved = (0, import_react.useRef)(null);
274
- const saveRef = (0, import_react.useRef)(onSave);
275
- const serializeRef = (0, import_react.useRef)(serialize);
276
- (0, import_react.useEffect)(() => {
349
+ const [status, setStatus] = (0, import_react2.useState)("idle");
350
+ const [error, setError] = (0, import_react2.useState)(null);
351
+ const lastSaved = (0, import_react2.useRef)(null);
352
+ const saveRef = (0, import_react2.useRef)(onSave);
353
+ const serializeRef = (0, import_react2.useRef)(serialize);
354
+ const latestSaveId = (0, import_react2.useRef)(0);
355
+ (0, import_react2.useEffect)(() => {
277
356
  saveRef.current = onSave;
278
357
  serializeRef.current = serialize;
279
358
  }, [onSave, serialize]);
280
- const save = (0, import_react.useCallback)(async (value) => {
359
+ const save = (0, import_react2.useCallback)(async (value) => {
360
+ const saveId = ++latestSaveId.current;
281
361
  setStatus("saving");
282
362
  setError(null);
283
363
  try {
284
364
  await saveRef.current(value);
365
+ if (saveId !== latestSaveId.current) return;
285
366
  lastSaved.current = serializeRef.current(value);
286
367
  setStatus("saved");
287
368
  } catch (cause) {
369
+ if (saveId !== latestSaveId.current) return;
288
370
  setError(cause instanceof Error ? cause : new Error("No se pudo guardar."));
289
371
  setStatus("error");
290
372
  }
291
373
  }, []);
292
- (0, import_react.useEffect)(() => {
374
+ (0, import_react2.useEffect)(() => {
293
375
  if (!enabled) return;
294
376
  const snapshot = serializeRef.current(data);
295
377
  if (lastSaved.current === null) {
@@ -303,11 +385,49 @@ function useAutosave({
303
385
  return { status, error, saveNow: () => save(data) };
304
386
  }
305
387
 
388
+ // src/hooks/use-clipboard.ts
389
+ var import_react3 = require("react");
390
+ function useClipboard({
391
+ resetMs = 1500,
392
+ onError
393
+ } = {}) {
394
+ const [status, setStatus] = (0, import_react3.useState)("idle");
395
+ const [error, setError] = (0, import_react3.useState)(null);
396
+ const timeoutRef = (0, import_react3.useRef)(null);
397
+ (0, import_react3.useEffect)(
398
+ () => () => {
399
+ if (timeoutRef.current) clearTimeout(timeoutRef.current);
400
+ },
401
+ []
402
+ );
403
+ const copy = (0, import_react3.useCallback)(
404
+ async (value) => {
405
+ if (timeoutRef.current) clearTimeout(timeoutRef.current);
406
+ try {
407
+ if (!navigator.clipboard?.writeText) throw new Error("El portapapeles no est\xE1 disponible.");
408
+ await navigator.clipboard.writeText(value);
409
+ setError(null);
410
+ setStatus("copied");
411
+ timeoutRef.current = setTimeout(() => setStatus("idle"), resetMs);
412
+ return true;
413
+ } catch (cause) {
414
+ const nextError = cause instanceof Error ? cause : new Error("No se pudo copiar.");
415
+ setError(nextError);
416
+ setStatus("error");
417
+ onError?.(nextError);
418
+ return false;
419
+ }
420
+ },
421
+ [onError, resetMs]
422
+ );
423
+ return { copy, error, status };
424
+ }
425
+
306
426
  // src/hooks/use-debounced-value.ts
307
- var import_react2 = require("react");
427
+ var import_react4 = require("react");
308
428
  function useDebouncedValue(value, delay = 250) {
309
- const [debouncedValue, setDebouncedValue] = (0, import_react2.useState)(value);
310
- (0, import_react2.useEffect)(() => {
429
+ const [debouncedValue, setDebouncedValue] = (0, import_react4.useState)(value);
430
+ (0, import_react4.useEffect)(() => {
311
431
  const timeout = window.setTimeout(() => setDebouncedValue(value), delay);
312
432
  return () => window.clearTimeout(timeout);
313
433
  }, [delay, value]);
@@ -315,7 +435,7 @@ function useDebouncedValue(value, delay = 250) {
315
435
  }
316
436
 
317
437
  // src/hooks/use-form-dirty.ts
318
- var import_react3 = require("react");
438
+ var import_react5 = require("react");
319
439
  function formSnapshot(form) {
320
440
  const entries = Array.from(new FormData(form), ([key, value]) => [
321
441
  key,
@@ -325,21 +445,21 @@ function formSnapshot(form) {
325
445
  return JSON.stringify(entries);
326
446
  }
327
447
  function useFormDirty() {
328
- const formElement = (0, import_react3.useRef)(null);
329
- const baseline = (0, import_react3.useRef)(null);
330
- const [isDirty, setIsDirty] = (0, import_react3.useState)(false);
331
- const recompute = (0, import_react3.useCallback)(() => {
448
+ const formElement = (0, import_react5.useRef)(null);
449
+ const baseline = (0, import_react5.useRef)(null);
450
+ const [isDirty, setIsDirty] = (0, import_react5.useState)(false);
451
+ const recompute = (0, import_react5.useCallback)(() => {
332
452
  if (formElement.current && baseline.current !== null) {
333
453
  setIsDirty(formSnapshot(formElement.current) !== baseline.current);
334
454
  }
335
455
  }, []);
336
- const reset = (0, import_react3.useCallback)(() => {
456
+ const reset = (0, import_react5.useCallback)(() => {
337
457
  if (formElement.current) {
338
458
  baseline.current = formSnapshot(formElement.current);
339
459
  setIsDirty(false);
340
460
  }
341
461
  }, []);
342
- const formRef = (0, import_react3.useCallback)(
462
+ const formRef = (0, import_react5.useCallback)(
343
463
  (form) => {
344
464
  if (formElement.current) {
345
465
  formElement.current.removeEventListener("input", recompute);
@@ -371,6 +491,52 @@ function cn(...inputs) {
371
491
  return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
372
492
  }
373
493
 
494
+ // src/lib/search-params.ts
495
+ function toSearchParams(input = "") {
496
+ if (typeof input === "string" || input instanceof URLSearchParams)
497
+ return new URLSearchParams(input);
498
+ if (Object.getPrototypeOf(input) === Object.prototype) {
499
+ const params = new URLSearchParams();
500
+ for (const [key, value] of Object.entries(input)) {
501
+ for (const item of Array.isArray(value) ? value : [value]) {
502
+ if (item !== void 0) params.append(key, item);
503
+ }
504
+ }
505
+ return params;
506
+ }
507
+ return new URLSearchParams(input.toString());
508
+ }
509
+ function updateSearchParams(current, updates) {
510
+ const params = toSearchParams(current);
511
+ for (const [key, value] of Object.entries(updates)) {
512
+ params.delete(key);
513
+ if (value === null || value === void 0 || value === "") continue;
514
+ for (const item of Array.isArray(value) ? value : [value]) {
515
+ if (item !== "") params.append(key, String(item));
516
+ }
517
+ }
518
+ return params;
519
+ }
520
+ function readSearchParam(params, key, fallback = "") {
521
+ return toSearchParams(params).get(key)?.trim() || fallback;
522
+ }
523
+ function readSearchParamArray(params, key) {
524
+ return toSearchParams(params).getAll(key).map((value) => value.trim()).filter(Boolean);
525
+ }
526
+ function readSearchParamInt(params, key, fallback = 1, options = {}) {
527
+ const rawValue = readSearchParam(params, key);
528
+ if (!rawValue) return fallback;
529
+ const value = Number(rawValue);
530
+ if (!Number.isSafeInteger(value)) return fallback;
531
+ const min = options.min ?? Number.NEGATIVE_INFINITY;
532
+ const max = options.max ?? Number.POSITIVE_INFINITY;
533
+ return value >= min && value <= max ? value : fallback;
534
+ }
535
+ function readSearchParamEnum(params, key, values, fallback) {
536
+ const value = readSearchParam(params, key);
537
+ return values.includes(value) ? value : fallback;
538
+ }
539
+
374
540
  // src/lib/text-match.ts
375
541
  function normalize(value) {
376
542
  return value.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLocaleLowerCase();
@@ -497,7 +663,7 @@ var React3 = require("react");
497
663
  var import_react_aria_components4 = require("react-aria-components");
498
664
 
499
665
  // src/ui/button/button.tsx
500
- var import_react4 = require("react");
666
+ var import_react6 = require("react");
501
667
  var import_react_aria_components2 = require("react-aria-components");
502
668
 
503
669
  // src/ui/button/button-variants.ts
@@ -551,7 +717,7 @@ function getRipplePosition(event) {
551
717
  };
552
718
  }
553
719
  function useActionRipple(enabled) {
554
- const [ripple, setRipple] = (0, import_react4.useState)(null);
720
+ const [ripple, setRipple] = (0, import_react6.useState)(null);
555
721
  function triggerRipple(event) {
556
722
  if (!enabled) return;
557
723
  const position = getRipplePosition(event);
@@ -1056,7 +1222,7 @@ function AppShellContent({
1056
1222
  }
1057
1223
 
1058
1224
  // src/ui/avatar/avatar.tsx
1059
- var import_react5 = require("react");
1225
+ var import_react7 = require("react");
1060
1226
  var import_jsx_runtime7 = require("react/jsx-runtime");
1061
1227
  var sizes = {
1062
1228
  xs: "size-5 text-[10px]",
@@ -1064,9 +1230,9 @@ var sizes = {
1064
1230
  default: "size-8 text-sm",
1065
1231
  lg: "size-10 text-base"
1066
1232
  };
1067
- var AvatarContext = (0, import_react5.createContext)(null);
1233
+ var AvatarContext = (0, import_react7.createContext)(null);
1068
1234
  function Avatar({ className, size = "default", children, ...props }) {
1069
- const [status, setStatus] = (0, import_react5.useState)("idle");
1235
+ const [status, setStatus] = (0, import_react7.useState)("idle");
1070
1236
  return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(AvatarContext.Provider, { value: { status, setStatus }, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1071
1237
  "div",
1072
1238
  {
@@ -1089,9 +1255,9 @@ function AvatarImage({
1089
1255
  onLoad,
1090
1256
  ...props
1091
1257
  }) {
1092
- const avatar = (0, import_react5.useContext)(AvatarContext);
1093
- const [failed, setFailed] = (0, import_react5.useState)(false);
1094
- (0, import_react5.useEffect)(() => {
1258
+ const avatar = (0, import_react7.useContext)(AvatarContext);
1259
+ const [failed, setFailed] = (0, import_react7.useState)(false);
1260
+ (0, import_react7.useEffect)(() => {
1095
1261
  setFailed(false);
1096
1262
  avatar?.setStatus(src ? "loading" : "idle");
1097
1263
  }, [avatar?.setStatus, src]);
@@ -1117,7 +1283,7 @@ function AvatarImage({
1117
1283
  );
1118
1284
  }
1119
1285
  function AvatarFallback({ className, ...props }) {
1120
- const avatar = (0, import_react5.useContext)(AvatarContext);
1286
+ const avatar = (0, import_react7.useContext)(AvatarContext);
1121
1287
  if (avatar?.status === "loaded") return null;
1122
1288
  return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1123
1289
  "span",
@@ -1478,12 +1644,36 @@ function Checkbox({ className, children, ...props }) {
1478
1644
  ),
1479
1645
  ...props,
1480
1646
  children: (state) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
1481
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1647
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
1482
1648
  "span",
1483
1649
  {
1484
1650
  "aria-hidden": "true",
1485
- className: "border-border bg-background text-primary-foreground group-data-selected:border-primary group-data-selected:bg-primary group-data-focus-visible:ring-ring/50 grid size-4 place-items-center rounded border transition-colors group-data-focus-visible:ring-3",
1486
- children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react3.Check, { className: "size-3 opacity-0 transition-opacity group-data-selected:opacity-100 motion-reduce:transition-none" })
1651
+ className: cn(
1652
+ "border-border bg-background text-primary-foreground group-data-selected:border-primary group-data-selected:bg-primary group-data-focus-visible:ring-ring/50 grid size-4 place-items-center rounded border transition-colors group-data-focus-visible:ring-3",
1653
+ state.isIndeterminate && "border-primary bg-primary"
1654
+ ),
1655
+ children: [
1656
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1657
+ import_lucide_react3.Minus,
1658
+ {
1659
+ "data-slot": "checkbox-indeterminate",
1660
+ className: cn(
1661
+ "size-3 transition-opacity motion-reduce:transition-none",
1662
+ state.isIndeterminate ? "opacity-100" : "opacity-0"
1663
+ )
1664
+ }
1665
+ ),
1666
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1667
+ import_lucide_react3.Check,
1668
+ {
1669
+ "data-slot": "checkbox-check",
1670
+ className: cn(
1671
+ "absolute size-3 transition-opacity motion-reduce:transition-none",
1672
+ state.isSelected && !state.isIndeterminate ? "opacity-100" : "opacity-0"
1673
+ )
1674
+ }
1675
+ )
1676
+ ]
1487
1677
  }
1488
1678
  ),
1489
1679
  typeof children === "function" ? children(state) : children
@@ -1566,8 +1756,13 @@ function CollapsibleContent({ children, ...props }) {
1566
1756
  }
1567
1757
 
1568
1758
  // src/ui/combobox/combobox.tsx
1569
- var import_react6 = require("react");
1759
+ var import_react8 = require("react");
1570
1760
  var import_react_aria_components9 = require("react-aria-components");
1761
+
1762
+ // src/lib/floating-surface.ts
1763
+ var floatingSurfaceClassName = "z-50 max-w-[calc(100vw-2rem)] shadow-lg outline-none motion-safe:data-entering:animate-ui-surface-in motion-safe:data-exiting:animate-ui-surface-out";
1764
+
1765
+ // src/ui/combobox/combobox.tsx
1571
1766
  var import_jsx_runtime15 = require("react/jsx-runtime");
1572
1767
  var Combobox = import_react_aria_components9.ComboBox;
1573
1768
  function ComboboxInput({ className, ...props }) {
@@ -1589,7 +1784,8 @@ function ComboboxContent({ className, ...props }) {
1589
1784
  {
1590
1785
  "data-slot": "combobox-content",
1591
1786
  className: cn(
1592
- "max-h-72 w-(--trigger-width) overflow-hidden rounded-xl border border-border bg-background p-1.5 text-foreground shadow-lg motion-safe:data-entering:animate-ui-surface-in motion-safe:data-exiting:animate-ui-surface-out",
1787
+ floatingSurfaceClassName,
1788
+ "max-h-72 w-(--trigger-width) overflow-hidden rounded-xl border border-border bg-background p-1.5 text-foreground",
1593
1789
  className
1594
1790
  ),
1595
1791
  ...props
@@ -1642,7 +1838,7 @@ function HighlightMatch({
1642
1838
  children: part.text
1643
1839
  },
1644
1840
  `${part.text}-${index}`
1645
- ) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react6.Fragment, { children: part.text }, `${part.text}-${index}`)
1841
+ ) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react8.Fragment, { children: part.text }, `${part.text}-${index}`)
1646
1842
  ) });
1647
1843
  }
1648
1844
  function AutocompleteCombobox({
@@ -1661,21 +1857,21 @@ function AutocompleteCombobox({
1661
1857
  suggestion = true,
1662
1858
  placeholder,
1663
1859
  className,
1664
- onKeyDown: _onKeyDown,
1860
+ onKeyDown,
1665
1861
  ...props
1666
1862
  }) {
1667
- const [internalInputValue, setInternalInputValue] = (0, import_react6.useState)("");
1863
+ const [internalInputValue, setInternalInputValue] = (0, import_react8.useState)("");
1668
1864
  const inputValue = controlledInputValue ?? internalInputValue;
1669
1865
  const setInputValue = (value) => {
1670
1866
  setInternalInputValue(value);
1671
1867
  onInputChange?.(value);
1672
1868
  };
1673
1869
  const normalizedQuery = inputValue.trim().toLocaleLowerCase();
1674
- const filteredItems = (0, import_react6.useMemo)(
1870
+ const filteredItems = (0, import_react8.useMemo)(
1675
1871
  () => normalizedQuery ? items.filter((item) => getItemLabel(item).toLocaleLowerCase().includes(normalizedQuery)) : [...items],
1676
1872
  [getItemLabel, items, normalizedQuery]
1677
1873
  );
1678
- const suggestedItem = (0, import_react6.useMemo)(
1874
+ const suggestedItem = (0, import_react8.useMemo)(
1679
1875
  () => !suggestion || !normalizedQuery ? void 0 : items.find(
1680
1876
  (item) => getItemLabel(item).toLocaleLowerCase().startsWith(normalizedQuery) && getItemLabel(item).length > inputValue.length
1681
1877
  ),
@@ -1689,6 +1885,8 @@ function AutocompleteCombobox({
1689
1885
  return true;
1690
1886
  };
1691
1887
  const handleKeyDown = (event) => {
1888
+ onKeyDown?.(event);
1889
+ if (event.defaultPrevented) return;
1692
1890
  if ((event.key === "Tab" || event.key === "Enter") && acceptSuggestion()) event.preventDefault();
1693
1891
  };
1694
1892
  return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
@@ -1764,7 +1962,8 @@ function CommandContent({ className, ...props }) {
1764
1962
  {
1765
1963
  "data-slot": "command-content",
1766
1964
  className: cn(
1767
- "w-(--trigger-width) overflow-hidden rounded-xl border border-border bg-background p-1.5 shadow-lg outline-none",
1965
+ floatingSurfaceClassName,
1966
+ "max-h-72 w-(--trigger-width) overflow-hidden rounded-xl border border-border bg-background p-1.5 text-foreground",
1768
1967
  className
1769
1968
  ),
1770
1969
  ...props
@@ -1811,30 +2010,72 @@ function ConfirmDialog({
1811
2010
  pending = false,
1812
2011
  onConfirm
1813
2012
  }) {
1814
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(AlertDialog, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(AlertDialogContent, { children: [
1815
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(AlertDialogHeader, { children: [
1816
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(AlertDialogTitle, { children: title }),
1817
- description ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(AlertDialogDescription, { children: description }) : null
1818
- ] }),
1819
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(AlertDialogFooter, { children: [
1820
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Button, { variant: "outline", isDisabled: pending, onPress: () => onOpenChange(false), children: cancelLabel }),
1821
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1822
- Button,
1823
- {
1824
- variant: destructive ? "destructive" : "default",
1825
- isDisabled: pending,
1826
- onPress: onConfirm,
1827
- children: confirmLabel
1828
- }
1829
- )
1830
- ] })
1831
- ] }) });
2013
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2014
+ AlertDialog,
2015
+ {
2016
+ open,
2017
+ onOpenChange: (nextOpen) => {
2018
+ if (!pending || nextOpen) onOpenChange(nextOpen);
2019
+ },
2020
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(AlertDialogContent, { children: [
2021
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(AlertDialogHeader, { children: [
2022
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(AlertDialogTitle, { children: title }),
2023
+ description ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(AlertDialogDescription, { children: description }) : null
2024
+ ] }),
2025
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(AlertDialogFooter, { children: [
2026
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Button, { variant: "outline", isDisabled: pending, onPress: () => onOpenChange(false), children: cancelLabel }),
2027
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2028
+ Button,
2029
+ {
2030
+ variant: destructive ? "destructive" : "default",
2031
+ isDisabled: pending,
2032
+ onPress: onConfirm,
2033
+ children: confirmLabel
2034
+ }
2035
+ )
2036
+ ] })
2037
+ ] })
2038
+ }
2039
+ );
1832
2040
  }
1833
2041
 
1834
- // src/ui/danger-zone/danger-zone.tsx
2042
+ // src/ui/copy-button/copy-button.tsx
1835
2043
  var import_lucide_react4 = require("lucide-react");
1836
- var import_react_aria_components11 = require("react-aria-components");
1837
2044
  var import_jsx_runtime18 = require("react/jsx-runtime");
2045
+ function CopyButton({
2046
+ value,
2047
+ children,
2048
+ copiedLabel = "Copiado",
2049
+ resetMs,
2050
+ onCopied,
2051
+ onCopyError,
2052
+ ...props
2053
+ }) {
2054
+ const { copy, status } = useClipboard({ resetMs, onError: onCopyError });
2055
+ const copied = status === "copied";
2056
+ const label = copied ? copiedLabel : children ?? "Copiar";
2057
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
2058
+ Button,
2059
+ {
2060
+ "aria-label": typeof label === "string" ? label : void 0,
2061
+ onPress: () => {
2062
+ void copy(value).then((wasCopied) => {
2063
+ if (wasCopied) onCopied?.(value);
2064
+ });
2065
+ },
2066
+ ...props,
2067
+ children: [
2068
+ copied ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react4.Check, { "aria-hidden": "true", className: "size-3.5" }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react4.Copy, { "aria-hidden": "true", className: "size-3.5" }),
2069
+ label
2070
+ ]
2071
+ }
2072
+ );
2073
+ }
2074
+
2075
+ // src/ui/danger-zone/danger-zone.tsx
2076
+ var import_lucide_react5 = require("lucide-react");
2077
+ var import_react_aria_components11 = require("react-aria-components");
2078
+ var import_jsx_runtime19 = require("react/jsx-runtime");
1838
2079
  function DangerZone({
1839
2080
  title = "Zona de peligro",
1840
2081
  description = "Acciones irreversibles. \xC1brela solo si est\xE1s seguro.",
@@ -1842,34 +2083,262 @@ function DangerZone({
1842
2083
  className,
1843
2084
  children
1844
2085
  }) {
1845
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_aria_components11.Disclosure, { defaultExpanded: defaultOpen, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Card, { className: cn("border-destructive/30", className), children: [
1846
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_aria_components11.Heading, { className: "flex", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
2086
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_aria_components11.Disclosure, { defaultExpanded: defaultOpen, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Card, { className: cn("border-destructive/30", className), children: [
2087
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_aria_components11.Heading, { className: "flex", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
1847
2088
  import_react_aria_components11.Button,
1848
2089
  {
1849
2090
  slot: "trigger",
1850
2091
  "data-slot": "danger-zone-trigger",
1851
2092
  className: "group/danger focus-visible:ring-ring/50 flex w-full items-center gap-3 px-4 text-left outline-none focus-visible:ring-3",
1852
2093
  children: [
1853
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react4.ShieldAlert, { className: "text-destructive size-4 shrink-0" }),
1854
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { className: "flex flex-1 flex-col gap-0.5", children: [
1855
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "font-heading text-destructive text-base leading-snug font-medium", children: title }),
1856
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-muted-foreground text-xs", children: description })
2094
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react5.ShieldAlert, { className: "text-destructive size-4 shrink-0" }),
2095
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { className: "flex flex-1 flex-col gap-0.5", children: [
2096
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "font-heading text-destructive text-base leading-snug font-medium", children: title }),
2097
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "text-muted-foreground text-xs", children: description })
1857
2098
  ] }),
1858
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react4.ChevronDown, { className: "text-muted-foreground size-4 shrink-0 transition-transform group-aria-expanded/danger:rotate-180" })
2099
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react5.ChevronDown, { className: "text-muted-foreground size-4 shrink-0 transition-transform group-aria-expanded/danger:rotate-180" })
1859
2100
  ]
1860
2101
  }
1861
2102
  ) }),
1862
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_aria_components11.DisclosurePanel, { "data-slot": "danger-zone-content", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(CardContent, { children }) })
2103
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_aria_components11.DisclosurePanel, { "data-slot": "danger-zone-content", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(CardContent, { children }) })
1863
2104
  ] }) });
1864
2105
  }
1865
2106
 
2107
+ // src/ui/data-view-state/data-view-state.tsx
2108
+ var import_jsx_runtime20 = require("react/jsx-runtime");
2109
+ function DataViewState({ className, ...props }) {
2110
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2111
+ "section",
2112
+ {
2113
+ "data-slot": "data-view-state",
2114
+ className: cn(
2115
+ "flex min-h-40 flex-col items-center justify-center gap-3 rounded-xl border p-6 text-center",
2116
+ className
2117
+ ),
2118
+ ...props
2119
+ }
2120
+ );
2121
+ }
2122
+ function DataViewStateTitle({ children, className, ...props }) {
2123
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("h2", { "data-slot": "data-view-state-title", className: cn("font-semibold", className), ...props, children });
2124
+ }
2125
+ function DataViewStateDescription({ className, ...props }) {
2126
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2127
+ "p",
2128
+ {
2129
+ "data-slot": "data-view-state-description",
2130
+ className: cn("text-sm text-muted-foreground", className),
2131
+ ...props
2132
+ }
2133
+ );
2134
+ }
2135
+ function DataViewStateActions({ className, ...props }) {
2136
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2137
+ "div",
2138
+ {
2139
+ "data-slot": "data-view-state-actions",
2140
+ className: cn("flex items-center gap-2", className),
2141
+ ...props
2142
+ }
2143
+ );
2144
+ }
2145
+
2146
+ // src/ui/description-list/description-list.tsx
2147
+ var import_jsx_runtime21 = require("react/jsx-runtime");
2148
+ function DescriptionList({ className, ...props }) {
2149
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2150
+ "dl",
2151
+ {
2152
+ "data-slot": "description-list",
2153
+ className: cn("grid gap-x-6 gap-y-4 sm:grid-cols-2", className),
2154
+ ...props
2155
+ }
2156
+ );
2157
+ }
2158
+ function DescriptionItem({ className, ...props }) {
2159
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { "data-slot": "description-item", className: cn("min-w-0", className), ...props });
2160
+ }
2161
+ function DescriptionTerm({ className, ...props }) {
2162
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2163
+ "dt",
2164
+ {
2165
+ "data-slot": "description-term",
2166
+ className: cn("text-xs font-medium text-muted-foreground", className),
2167
+ ...props
2168
+ }
2169
+ );
2170
+ }
2171
+ function DescriptionDetails({ className, ...props }) {
2172
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2173
+ "dd",
2174
+ {
2175
+ "data-slot": "description-details",
2176
+ className: cn("mt-1 wrap-break-word text-sm", className),
2177
+ ...props
2178
+ }
2179
+ );
2180
+ }
2181
+
2182
+ // src/ui/drawer/drawer.tsx
2183
+ var import_lucide_react6 = require("lucide-react");
2184
+ var import_react_aria_components12 = require("react-aria-components");
2185
+ var import_jsx_runtime22 = require("react/jsx-runtime");
2186
+ function DrawerTrigger({ ...props }) {
2187
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react_aria_components12.DialogTrigger, { "data-slot": "drawer-trigger", ...props });
2188
+ }
2189
+ function DrawerClose({ className, variant = "outline", size = "default", ...props }) {
2190
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2191
+ Button,
2192
+ {
2193
+ slot: "close",
2194
+ "data-slot": "drawer-close",
2195
+ variant,
2196
+ size,
2197
+ className: cn(className),
2198
+ ...props
2199
+ }
2200
+ );
2201
+ }
2202
+ function DrawerOverlay({
2203
+ className,
2204
+ children,
2205
+ ...props
2206
+ }) {
2207
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2208
+ import_react_aria_components12.ModalOverlay,
2209
+ {
2210
+ "data-slot": "drawer-overlay",
2211
+ isDismissable: true,
2212
+ className: cn(
2213
+ "fixed inset-0 z-50 bg-black/10 motion-safe:transition-opacity motion-safe:duration-150 motion-safe:data-entering:opacity-0 motion-safe:data-exiting:opacity-0 motion-reduce:transition-none supports-backdrop-filter:backdrop-blur-xs",
2214
+ className
2215
+ ),
2216
+ ...props,
2217
+ children
2218
+ }
2219
+ );
2220
+ }
2221
+ function DrawerContent({
2222
+ className,
2223
+ children,
2224
+ dialogProps,
2225
+ side = "right",
2226
+ showCloseButton = true,
2227
+ ...props
2228
+ }) {
2229
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DrawerOverlay, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2230
+ import_react_aria_components12.Modal,
2231
+ {
2232
+ "data-slot": "drawer-content",
2233
+ "data-side": side,
2234
+ className: cn(
2235
+ "fixed z-50 flex max-h-svh flex-col gap-4 border-border bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg motion-safe:transition motion-safe:duration-200 motion-safe:ease-in-out motion-safe:data-entering:opacity-0 motion-safe:data-exiting:opacity-0 motion-reduce:transition-none data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:pb-[env(safe-area-inset-bottom)] motion-safe:data-[side=bottom]:data-entering:translate-y-10 motion-safe:data-[side=bottom]:data-exiting:translate-y-10 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 motion-safe:data-[side=left]:data-entering:-translate-x-10 motion-safe:data-[side=left]:data-exiting:-translate-x-10 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 motion-safe:data-[side=right]:data-entering:translate-x-10 motion-safe:data-[side=right]:data-exiting:translate-x-10 data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:pt-[env(safe-area-inset-top)] motion-safe:data-[side=top]:data-entering:-translate-y-10 motion-safe:data-[side=top]:data-exiting:-translate-y-10 data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",
2236
+ className
2237
+ ),
2238
+ children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
2239
+ import_react_aria_components12.Dialog,
2240
+ {
2241
+ "data-slot": "drawer",
2242
+ className: "[display:inherit] h-full max-h-[inherit] [flex-direction:inherit] gap-[inherit] outline-none",
2243
+ ...dialogProps,
2244
+ children: [
2245
+ children,
2246
+ showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(DrawerClose, { variant: "ghost", className: "absolute top-3 right-3", size: "icon-sm", children: [
2247
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react6.XIcon, {}),
2248
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "sr-only", children: "Cerrar" })
2249
+ ] })
2250
+ ]
2251
+ }
2252
+ )
2253
+ }
2254
+ ) });
2255
+ }
2256
+ function Drawer(props) {
2257
+ if (!("trigger" in props)) return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DrawerContent, { ...props });
2258
+ const { children, trigger, triggerProps, defaultOpen, isOpen, onOpenChange, ...contentProps } = props;
2259
+ const triggerElement = typeof trigger === "string" ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Button, { ...triggerProps, children: trigger }) : trigger;
2260
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(DrawerTrigger, { defaultOpen, isOpen, onOpenChange, children: [
2261
+ triggerElement,
2262
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DrawerContent, { ...contentProps, children })
2263
+ ] });
2264
+ }
2265
+ function DrawerHeader({ className, ...props }) {
2266
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2267
+ "div",
2268
+ {
2269
+ "data-slot": "drawer-header",
2270
+ className: cn("flex flex-col gap-0.5 p-4", className),
2271
+ ...props
2272
+ }
2273
+ );
2274
+ }
2275
+ function DrawerFooter({ className, ...props }) {
2276
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2277
+ "div",
2278
+ {
2279
+ "data-slot": "drawer-footer",
2280
+ className: cn("mt-auto flex flex-col gap-2 p-4", className),
2281
+ ...props
2282
+ }
2283
+ );
2284
+ }
2285
+ function DrawerTitle({ className, ...props }) {
2286
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2287
+ import_react_aria_components12.Heading,
2288
+ {
2289
+ slot: "title",
2290
+ "data-slot": "drawer-title",
2291
+ className: cn("text-base font-medium text-foreground", className),
2292
+ ...props
2293
+ }
2294
+ );
2295
+ }
2296
+ function DrawerDescription({
2297
+ className,
2298
+ ...props
2299
+ }) {
2300
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2301
+ import_react_aria_components12.Text,
2302
+ {
2303
+ slot: "description",
2304
+ "data-slot": "drawer-description",
2305
+ className: cn("text-sm text-muted-foreground", className),
2306
+ ...props
2307
+ }
2308
+ );
2309
+ }
2310
+ var Sheet = DrawerContent;
2311
+ var SheetClose = DrawerClose;
2312
+ var SheetContent = DrawerContent;
2313
+ var SheetDescription = DrawerDescription;
2314
+ var SheetFooter = DrawerFooter;
2315
+ var SheetHeader = DrawerHeader;
2316
+ var SheetTitle = DrawerTitle;
2317
+ var SheetTrigger = DrawerTrigger;
2318
+
2319
+ // src/ui/detail-drawer/detail-drawer.tsx
2320
+ var import_jsx_runtime23 = require("react/jsx-runtime");
2321
+ function DetailDrawer({ children, ...props }) {
2322
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(DrawerContent, { ...props, children });
2323
+ }
2324
+ function DetailDrawerBody({ className, ...props }) {
2325
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2326
+ "div",
2327
+ {
2328
+ "data-slot": "detail-drawer-body",
2329
+ className: cn("min-h-0 flex-1 overflow-y-auto px-4", className),
2330
+ ...props
2331
+ }
2332
+ );
2333
+ }
2334
+
1866
2335
  // src/ui/doc-preview/doc-preview.tsx
1867
- var import_lucide_react5 = require("lucide-react");
1868
- var import_jsx_runtime19 = require("react/jsx-runtime");
2336
+ var import_lucide_react7 = require("lucide-react");
2337
+ var import_jsx_runtime24 = require("react/jsx-runtime");
1869
2338
  function DocPreview({ url, mimeType, name }) {
1870
- if (!url) return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Fallback, { mimeType, reason: "no-url" });
2339
+ if (!url) return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Fallback, { mimeType, reason: "no-url" });
1871
2340
  if (mimeType === "application/pdf" || mimeType === "text/plain" || mimeType === "text/csv") {
1872
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2341
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1873
2342
  "iframe",
1874
2343
  {
1875
2344
  src: url,
@@ -1880,32 +2349,32 @@ function DocPreview({ url, mimeType, name }) {
1880
2349
  );
1881
2350
  }
1882
2351
  if (mimeType?.startsWith("image/")) {
1883
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "bg-muted/30 flex justify-center rounded-sm p-6", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("img", { src: url, alt: name, className: "max-h-[75vh] max-w-full rounded object-contain" }) });
2352
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "bg-muted/30 flex justify-center rounded-sm p-6", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("img", { src: url, alt: name, className: "max-h-[75vh] max-w-full rounded object-contain" }) });
1884
2353
  }
1885
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Fallback, { mimeType, reason: "unsupported" });
2354
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Fallback, { mimeType, reason: "unsupported" });
1886
2355
  }
1887
2356
  function Fallback({
1888
2357
  mimeType,
1889
2358
  reason
1890
2359
  }) {
1891
- const Icon = mimeType?.startsWith("image/") ? import_lucide_react5.Image : import_lucide_react5.FileText;
2360
+ const Icon = mimeType?.startsWith("image/") ? import_lucide_react7.Image : import_lucide_react7.FileText;
1892
2361
  const message = reason === "no-url" ? "No se pudo generar la URL de preview." : "Preview no disponible para este tipo de archivo.";
1893
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "text-muted-foreground flex flex-col items-center justify-center gap-2 py-14", children: [
1894
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Icon, { className: "size-9 opacity-30" }),
1895
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "text-sm", children: message }),
1896
- mimeType ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "font-mono text-xs opacity-50", children: mimeType }) : null,
1897
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "text-xs opacity-50", children: "Usa el bot\xF3n Descargar para abrir el archivo." })
2362
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "text-muted-foreground flex flex-col items-center justify-center gap-2 py-14", children: [
2363
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Icon, { className: "size-9 opacity-30" }),
2364
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "text-sm", children: message }),
2365
+ mimeType ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "font-mono text-xs opacity-50", children: mimeType }) : null,
2366
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "text-xs opacity-50", children: "Usa el bot\xF3n Descargar para abrir el archivo." })
1898
2367
  ] });
1899
2368
  }
1900
2369
 
1901
2370
  // src/ui/dropdown-menu/dropdown-menu.tsx
1902
2371
  var import_class_variance_authority6 = require("class-variance-authority");
1903
- var import_lucide_react6 = require("lucide-react");
2372
+ var import_lucide_react8 = require("lucide-react");
1904
2373
  var React5 = require("react");
1905
- var import_react_aria_components12 = require("react-aria-components");
1906
- var import_jsx_runtime20 = require("react/jsx-runtime");
2374
+ var import_react_aria_components13 = require("react-aria-components");
2375
+ var import_jsx_runtime25 = require("react/jsx-runtime");
1907
2376
  function DropdownMenuTrigger({ ...props }) {
1908
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_aria_components12.MenuTrigger, { "data-slot": "dropdown-menu-trigger", ...props });
2377
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_react_aria_components13.MenuTrigger, { "data-slot": "dropdown-menu-trigger", ...props });
1909
2378
  }
1910
2379
  function DropdownMenuContent({
1911
2380
  "data-slot": dataSlot = "dropdown-menu-content",
@@ -1916,19 +2385,20 @@ function DropdownMenuContent({
1916
2385
  children,
1917
2386
  ...props
1918
2387
  }) {
1919
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1920
- import_react_aria_components12.Popover,
2388
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2389
+ import_react_aria_components13.Popover,
1921
2390
  {
1922
2391
  "data-slot": dataSlot,
1923
2392
  placement,
1924
2393
  offset,
1925
2394
  crossOffset,
1926
2395
  className: cn(
1927
- "z-50 w-(--trigger-width) min-w-32 origin-(--trigger-anchor-point) overflow-x-hidden overflow-y-auto rounded-lg border border-border bg-popover p-1 text-popover-foreground shadow-lg outline-none motion-safe:data-entering:animate-ui-surface-in motion-safe:data-exiting:animate-ui-surface-out",
2396
+ floatingSurfaceClassName,
2397
+ "w-(--trigger-width) min-w-32 origin-(--trigger-anchor-point) overflow-x-hidden overflow-y-auto rounded-lg border border-border bg-popover p-1 text-popover-foreground",
1928
2398
  className
1929
2399
  ),
1930
- children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1931
- import_react_aria_components12.Menu,
2400
+ children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2401
+ import_react_aria_components13.Menu,
1932
2402
  {
1933
2403
  className: "max-h-[inherit] overflow-x-hidden overflow-y-auto outline-hidden",
1934
2404
  ...props,
@@ -1939,26 +2409,26 @@ function DropdownMenuContent({
1939
2409
  );
1940
2410
  }
1941
2411
  function DropdownMenu(props) {
1942
- if (!("trigger" in props)) return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(DropdownMenuContent, { ...props });
2412
+ if (!("trigger" in props)) return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(DropdownMenuContent, { ...props });
1943
2413
  const { children, trigger, triggerProps, defaultOpen, isOpen, onOpenChange, ...contentProps } = props;
1944
- const triggerElement = typeof trigger === "string" ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Button, { ...triggerProps, children: trigger }) : trigger;
1945
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(DropdownMenuTrigger, { defaultOpen, isOpen, onOpenChange, children: [
2414
+ const triggerElement = typeof trigger === "string" ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Button, { ...triggerProps, children: trigger }) : trigger;
2415
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(DropdownMenuTrigger, { defaultOpen, isOpen, onOpenChange, children: [
1946
2416
  triggerElement,
1947
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(DropdownMenuContent, { ...contentProps, children })
2417
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(DropdownMenuContent, { ...contentProps, children })
1948
2418
  ] });
1949
2419
  }
1950
2420
  function DropdownMenuGroup({
1951
2421
  ...props
1952
2422
  }) {
1953
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_aria_components12.MenuSection, { "data-slot": "dropdown-menu-group", ...props });
2423
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_react_aria_components13.MenuSection, { "data-slot": "dropdown-menu-group", ...props });
1954
2424
  }
1955
2425
  function DropdownMenuLabel({
1956
2426
  className,
1957
2427
  inset,
1958
2428
  ...props
1959
2429
  }) {
1960
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1961
- import_react_aria_components12.Header,
2430
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2431
+ import_react_aria_components13.Header,
1962
2432
  {
1963
2433
  "data-slot": "dropdown-menu-label",
1964
2434
  "data-inset": inset,
@@ -1989,25 +2459,25 @@ function DropdownMenuItem({
1989
2459
  children,
1990
2460
  ...props
1991
2461
  }) {
1992
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1993
- import_react_aria_components12.MenuItem,
2462
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2463
+ import_react_aria_components13.MenuItem,
1994
2464
  {
1995
2465
  "data-slot": "dropdown-menu-item",
1996
2466
  "data-inset": inset,
1997
2467
  "data-variant": variant,
1998
2468
  textValue: typeof children === "string" ? children : props.textValue,
1999
- className: (0, import_react_aria_components12.composeRenderProps)(
2469
+ className: (0, import_react_aria_components13.composeRenderProps)(
2000
2470
  className,
2001
2471
  (className2, { selectionMode }) => cn(dropdownMenuItemVariants({ selectionMode }), className2)
2002
2472
  ),
2003
2473
  ...props,
2004
- children: (0, import_react_aria_components12.composeRenderProps)(children, (children2, { isSelected, selectionMode }) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
2005
- selectionMode !== "none" ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2474
+ children: (0, import_react_aria_components13.composeRenderProps)(children, (children2, { isSelected, selectionMode }) => /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
2475
+ selectionMode !== "none" ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2006
2476
  "span",
2007
2477
  {
2008
2478
  className: "pointer-events-none absolute right-2 flex items-center justify-center",
2009
2479
  "data-slot": selectionMode === "single" ? "dropdown-menu-radio-item-indicator" : "dropdown-menu-checkbox-item-indicator",
2010
- children: isSelected ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react6.CheckIcon, {}) : null
2480
+ children: isSelected ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react8.CheckIcon, {}) : null
2011
2481
  }
2012
2482
  ) : null,
2013
2483
  children2
@@ -2016,7 +2486,7 @@ function DropdownMenuItem({
2016
2486
  );
2017
2487
  }
2018
2488
  function DropdownMenuSub({ ...props }) {
2019
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_aria_components12.SubmenuTrigger, { "data-slot": "dropdown-menu-sub", ...props });
2489
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_react_aria_components13.SubmenuTrigger, { "data-slot": "dropdown-menu-sub", ...props });
2020
2490
  }
2021
2491
  function DropdownMenuSubTrigger({
2022
2492
  className,
@@ -2024,8 +2494,8 @@ function DropdownMenuSubTrigger({
2024
2494
  children,
2025
2495
  ...props
2026
2496
  }) {
2027
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2028
- import_react_aria_components12.MenuItem,
2497
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2498
+ import_react_aria_components13.MenuItem,
2029
2499
  {
2030
2500
  "data-slot": "dropdown-menu-sub-trigger",
2031
2501
  "data-inset": inset,
@@ -2035,9 +2505,9 @@ function DropdownMenuSubTrigger({
2035
2505
  className
2036
2506
  ),
2037
2507
  ...props,
2038
- children: (0, import_react_aria_components12.composeRenderProps)(children, (children2) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
2508
+ children: (0, import_react_aria_components13.composeRenderProps)(children, (children2) => /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
2039
2509
  children2,
2040
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react6.ChevronRightIcon, { className: "cn-rtl-flip ml-auto" })
2510
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react8.ChevronRightIcon, { className: "cn-rtl-flip ml-auto" })
2041
2511
  ] }))
2042
2512
  }
2043
2513
  );
@@ -2049,7 +2519,7 @@ function DropdownMenuSubContent({
2049
2519
  className,
2050
2520
  ...props
2051
2521
  }) {
2052
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2522
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2053
2523
  DropdownMenuContent,
2054
2524
  {
2055
2525
  "data-slot": "dropdown-menu-sub-content",
@@ -2068,8 +2538,8 @@ function DropdownMenuSeparator({
2068
2538
  className,
2069
2539
  ...props
2070
2540
  }) {
2071
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2072
- import_react_aria_components12.Separator,
2541
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2542
+ import_react_aria_components13.Separator,
2073
2543
  {
2074
2544
  "data-slot": "dropdown-menu-separator",
2075
2545
  className: cn("-mx-1 my-1 h-px bg-border", className),
@@ -2078,7 +2548,7 @@ function DropdownMenuSeparator({
2078
2548
  );
2079
2549
  }
2080
2550
  function DropdownMenuShortcut({ className, ...props }) {
2081
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2551
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2082
2552
  "span",
2083
2553
  {
2084
2554
  "data-slot": "dropdown-menu-shortcut",
@@ -2107,9 +2577,9 @@ var emptyStateMediaVariants = (0, import_class_variance_authority7.cva)(
2107
2577
  );
2108
2578
 
2109
2579
  // src/ui/empty-state/empty-state.tsx
2110
- var import_jsx_runtime21 = require("react/jsx-runtime");
2580
+ var import_jsx_runtime26 = require("react/jsx-runtime");
2111
2581
  function EmptyState({ className, ...props }) {
2112
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2582
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2113
2583
  "div",
2114
2584
  {
2115
2585
  "data-slot": "empty-state",
@@ -2122,7 +2592,7 @@ function EmptyState({ className, ...props }) {
2122
2592
  );
2123
2593
  }
2124
2594
  function EmptyStateHeader({ className, ...props }) {
2125
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2595
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2126
2596
  "div",
2127
2597
  {
2128
2598
  "data-slot": "empty-state-header",
@@ -2136,7 +2606,7 @@ function EmptyStateMedia({
2136
2606
  variant = "default",
2137
2607
  ...props
2138
2608
  }) {
2139
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2609
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2140
2610
  "div",
2141
2611
  {
2142
2612
  "data-slot": "empty-state-media",
@@ -2147,7 +2617,7 @@ function EmptyStateMedia({
2147
2617
  );
2148
2618
  }
2149
2619
  function EmptyStateTitle({ className, children, ...props }) {
2150
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2620
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2151
2621
  "h3",
2152
2622
  {
2153
2623
  "data-slot": "empty-state-title",
@@ -2158,7 +2628,7 @@ function EmptyStateTitle({ className, children, ...props }) {
2158
2628
  );
2159
2629
  }
2160
2630
  function EmptyStateDescription({ className, ...props }) {
2161
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2631
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2162
2632
  "p",
2163
2633
  {
2164
2634
  "data-slot": "empty-state-description",
@@ -2171,7 +2641,7 @@ function EmptyStateDescription({ className, ...props }) {
2171
2641
  );
2172
2642
  }
2173
2643
  function EmptyStateContent({ className, ...props }) {
2174
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2644
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2175
2645
  "div",
2176
2646
  {
2177
2647
  "data-slot": "empty-state-content",
@@ -2184,14 +2654,121 @@ function EmptyStateContent({ className, ...props }) {
2184
2654
  );
2185
2655
  }
2186
2656
 
2657
+ // src/ui/error-boundary/error-boundary.tsx
2658
+ var import_react9 = require("react");
2659
+
2660
+ // src/ui/error-state/error-state.tsx
2661
+ var import_lucide_react9 = require("lucide-react");
2662
+ var import_jsx_runtime27 = require("react/jsx-runtime");
2663
+ function ErrorState({ className, ...props }) {
2664
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2665
+ "section",
2666
+ {
2667
+ "data-slot": "error-state",
2668
+ role: "alert",
2669
+ className: cn(
2670
+ "flex min-h-32 flex-col items-center justify-center gap-3 rounded-xl border border-destructive/30 bg-destructive/5 p-6 text-center",
2671
+ className
2672
+ ),
2673
+ ...props
2674
+ }
2675
+ );
2676
+ }
2677
+ function ErrorStateIcon({
2678
+ className,
2679
+ ...props
2680
+ }) {
2681
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2682
+ import_lucide_react9.AlertCircle,
2683
+ {
2684
+ "data-slot": "error-state-icon",
2685
+ "aria-hidden": "true",
2686
+ className: cn("size-6 text-destructive", className),
2687
+ ...props
2688
+ }
2689
+ );
2690
+ }
2691
+ function ErrorStateTitle({ className, ...props }) {
2692
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2693
+ "h2",
2694
+ {
2695
+ "data-slot": "error-state-title",
2696
+ className: cn("font-semibold text-foreground", className),
2697
+ ...props
2698
+ }
2699
+ );
2700
+ }
2701
+ function ErrorStateDescription({ className, ...props }) {
2702
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2703
+ "p",
2704
+ {
2705
+ "data-slot": "error-state-description",
2706
+ className: cn("max-w-md text-sm text-muted-foreground", className),
2707
+ ...props
2708
+ }
2709
+ );
2710
+ }
2711
+ function ErrorStateActions({ className, ...props }) {
2712
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2713
+ "div",
2714
+ {
2715
+ "data-slot": "error-state-actions",
2716
+ className: cn("flex items-center gap-2", className),
2717
+ ...props
2718
+ }
2719
+ );
2720
+ }
2721
+
2722
+ // src/ui/error-boundary/error-boundary.tsx
2723
+ var import_jsx_runtime28 = require("react/jsx-runtime");
2724
+ function changedResetKeys(previous = [], next = []) {
2725
+ return previous.length !== next.length || previous.some((value, index) => !Object.is(value, next[index]));
2726
+ }
2727
+ var Boundary = class extends import_react9.Component {
2728
+ state = { error: null };
2729
+ static getDerivedStateFromError(error) {
2730
+ return { error };
2731
+ }
2732
+ componentDidCatch(error, info) {
2733
+ this.props.onError?.(error, info);
2734
+ }
2735
+ componentDidUpdate(previousProps) {
2736
+ if (this.state.error && changedResetKeys(previousProps.resetKeys, this.props.resetKeys))
2737
+ this.reset();
2738
+ }
2739
+ reset = () => this.setState({ error: null });
2740
+ render() {
2741
+ const { children, fallback } = this.props;
2742
+ if (!this.state.error) return children;
2743
+ if (typeof fallback === "function")
2744
+ return fallback({ error: this.state.error, reset: this.reset });
2745
+ if (fallback) return fallback;
2746
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(ErrorState, { children: [
2747
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ErrorStateIcon, {}),
2748
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ErrorStateTitle, { children: "No se pudo cargar este contenido" }),
2749
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ErrorStateDescription, { children: "Prueba a cargarlo de nuevo." }),
2750
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ErrorStateActions, { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Button, { onPress: this.reset, children: "Reintentar" }) })
2751
+ ] });
2752
+ }
2753
+ };
2754
+ function ErrorBoundary(props) {
2755
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Boundary, { ...props });
2756
+ }
2757
+ function AsyncBoundary({
2758
+ pending = null,
2759
+ ...props
2760
+ }) {
2761
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ErrorBoundary, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react9.Suspense, { fallback: pending, children: props.children }) });
2762
+ }
2763
+
2187
2764
  // src/ui/label/label.tsx
2188
- var import_react7 = require("react");
2189
- var import_react_aria_components13 = require("react-aria-components");
2190
- var import_jsx_runtime22 = require("react/jsx-runtime");
2191
- var Label2 = (0, import_react7.forwardRef)(
2765
+ var import_react10 = require("react");
2766
+ var import_react_aria_components14 = require("react-aria-components");
2767
+ var import_jsx_runtime29 = require("react/jsx-runtime");
2768
+ var Label2 = (0, import_react10.forwardRef)(
2192
2769
  function Label3({ className, ...props }, ref) {
2193
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2194
- import_react_aria_components13.Label,
2770
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2771
+ import_react_aria_components14.Label,
2195
2772
  {
2196
2773
  ref,
2197
2774
  "data-slot": "label",
@@ -2222,16 +2799,16 @@ var fieldVariants = (0, import_class_variance_authority8.cva)(
2222
2799
  );
2223
2800
 
2224
2801
  // src/ui/field/field.tsx
2225
- var import_jsx_runtime23 = require("react/jsx-runtime");
2802
+ var import_jsx_runtime30 = require("react/jsx-runtime");
2226
2803
  function FieldSet({ className, ...props }) {
2227
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("fieldset", { "data-slot": "field-set", className: cn("flex flex-col gap-4", className), ...props });
2804
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("fieldset", { "data-slot": "field-set", className: cn("flex flex-col gap-4", className), ...props });
2228
2805
  }
2229
2806
  function FieldLegend({
2230
2807
  className,
2231
2808
  variant = "legend",
2232
2809
  ...props
2233
2810
  }) {
2234
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2811
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2235
2812
  "legend",
2236
2813
  {
2237
2814
  "data-slot": "field-legend",
@@ -2245,7 +2822,7 @@ function FieldLegend({
2245
2822
  );
2246
2823
  }
2247
2824
  function FieldGroup({ className, ...props }) {
2248
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2825
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2249
2826
  "div",
2250
2827
  {
2251
2828
  "data-slot": "field-group",
@@ -2260,7 +2837,7 @@ function FieldGroup({ className, ...props }) {
2260
2837
  function Field({ className, orientation = "vertical", ...props }) {
2261
2838
  return (
2262
2839
  // biome-ignore lint/a11y/useSemanticElements: FieldSet provides native fieldset semantics when they are appropriate.
2263
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2840
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2264
2841
  "div",
2265
2842
  {
2266
2843
  role: "group",
@@ -2273,7 +2850,7 @@ function Field({ className, orientation = "vertical", ...props }) {
2273
2850
  );
2274
2851
  }
2275
2852
  function FieldContent({ className, ...props }) {
2276
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2853
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2277
2854
  "div",
2278
2855
  {
2279
2856
  "data-slot": "field-content",
@@ -2283,7 +2860,7 @@ function FieldContent({ className, ...props }) {
2283
2860
  );
2284
2861
  }
2285
2862
  function FieldLabel({ className, ...props }) {
2286
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2863
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2287
2864
  Label2,
2288
2865
  {
2289
2866
  "data-slot": "field-label",
@@ -2296,7 +2873,7 @@ function FieldLabel({ className, ...props }) {
2296
2873
  );
2297
2874
  }
2298
2875
  function FieldTitle({ className, ...props }) {
2299
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2876
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2300
2877
  "div",
2301
2878
  {
2302
2879
  "data-slot": "field-title",
@@ -2306,7 +2883,7 @@ function FieldTitle({ className, ...props }) {
2306
2883
  );
2307
2884
  }
2308
2885
  function FieldDescription({ className, ...props }) {
2309
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2886
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2310
2887
  "p",
2311
2888
  {
2312
2889
  "data-slot": "field-description",
@@ -2319,7 +2896,7 @@ function FieldDescription({ className, ...props }) {
2319
2896
  );
2320
2897
  }
2321
2898
  function FieldSeparator({ className, children, ...props }) {
2322
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
2899
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
2323
2900
  "div",
2324
2901
  {
2325
2902
  "data-slot": "field-separator",
@@ -2327,8 +2904,8 @@ function FieldSeparator({ className, children, ...props }) {
2327
2904
  className: cn("relative -my-2 h-5 text-sm", className),
2328
2905
  ...props,
2329
2906
  children: [
2330
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Separator, { className: "absolute inset-0 top-1/2" }),
2331
- children ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2907
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Separator, { className: "absolute inset-0 top-1/2" }),
2908
+ children ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2332
2909
  "span",
2333
2910
  {
2334
2911
  "data-slot": "field-separator-content",
@@ -2342,9 +2919,9 @@ function FieldSeparator({ className, children, ...props }) {
2342
2919
  }
2343
2920
  function FieldError2({ className, children, errors, ...props }) {
2344
2921
  const messages = [...new Set(errors?.flatMap((error) => error?.message ?? []) ?? [])];
2345
- const content = children ?? (messages.length === 1 ? messages[0] : messages.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("ul", { className: "ml-4 list-disc", children: messages.map((message) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("li", { children: message }, message)) }) : null);
2922
+ const content = children ?? (messages.length === 1 ? messages[0] : messages.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("ul", { className: "ml-4 list-disc", children: messages.map((message) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("li", { children: message }, message)) }) : null);
2346
2923
  if (!content) return null;
2347
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2924
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2348
2925
  "div",
2349
2926
  {
2350
2927
  role: "alert",
@@ -2356,9 +2933,53 @@ function FieldError2({ className, children, errors, ...props }) {
2356
2933
  );
2357
2934
  }
2358
2935
 
2936
+ // src/ui/filter-bar/filter-bar.tsx
2937
+ var import_jsx_runtime31 = require("react/jsx-runtime");
2938
+ function FilterBar({ className, ...props }) {
2939
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2940
+ "div",
2941
+ {
2942
+ "data-slot": "filter-bar",
2943
+ className: cn("flex flex-wrap items-center gap-2", className),
2944
+ ...props
2945
+ }
2946
+ );
2947
+ }
2948
+ function FilterGroup({ className, ...props }) {
2949
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2950
+ "div",
2951
+ {
2952
+ "data-slot": "filter-group",
2953
+ className: cn("flex flex-wrap items-center gap-2", className),
2954
+ ...props
2955
+ }
2956
+ );
2957
+ }
2958
+ function ActiveFilters({ className, ...props }) {
2959
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2960
+ "div",
2961
+ {
2962
+ "data-slot": "active-filters",
2963
+ "aria-label": "Filtros activos",
2964
+ className: cn("flex flex-wrap items-center gap-1.5", className),
2965
+ ...props
2966
+ }
2967
+ );
2968
+ }
2969
+ function FilterChip({
2970
+ children,
2971
+ onRemove,
2972
+ ...props
2973
+ }) {
2974
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(Button, { size: "sm", variant: "outline", onPress: onRemove, ...props, children: [
2975
+ children,
2976
+ " \xD7"
2977
+ ] });
2978
+ }
2979
+
2359
2980
  // src/ui/form-feedback/form-feedback.tsx
2360
- var import_lucide_react7 = require("lucide-react");
2361
- var import_jsx_runtime24 = require("react/jsx-runtime");
2981
+ var import_lucide_react10 = require("lucide-react");
2982
+ var import_jsx_runtime32 = require("react/jsx-runtime");
2362
2983
  function FormFeedback({
2363
2984
  state,
2364
2985
  className,
@@ -2366,14 +2987,14 @@ function FormFeedback({
2366
2987
  successLabel = "Guardado"
2367
2988
  }) {
2368
2989
  if (state.status === "idle")
2369
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { "aria-hidden": "true", className: cn("inline-flex h-5 items-center", className) });
2990
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { "aria-hidden": "true", className: cn("inline-flex h-5 items-center", className) });
2370
2991
  const error = state.status === "error";
2371
2992
  const success = state.status === "success";
2372
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
2993
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
2373
2994
  "span",
2374
2995
  {
2375
2996
  role: error ? "alert" : "status",
2376
- "aria-live": "polite",
2997
+ "aria-live": error ? "assertive" : "polite",
2377
2998
  className: cn(
2378
2999
  "inline-flex h-5 items-center gap-1.5 text-xs",
2379
3000
  error && "text-destructive",
@@ -2382,31 +3003,31 @@ function FormFeedback({
2382
3003
  className
2383
3004
  ),
2384
3005
  children: [
2385
- state.status === "pending" && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react7.LoaderCircle, { "aria-hidden": "true", className: "size-3.5 animate-spin" }),
2386
- success && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react7.CheckCircle, { "aria-hidden": "true", className: "size-3.5" }),
2387
- error && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react7.CircleAlert, { "aria-hidden": "true", className: "size-3.5" }),
2388
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { children: state.status === "pending" ? pendingLabel : success ? state.message ?? successLabel : state.message })
3006
+ state.status === "pending" && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react10.LoaderCircle, { "aria-hidden": "true", className: "size-3.5 animate-spin" }),
3007
+ success && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react10.CheckCircle, { "aria-hidden": "true", className: "size-3.5" }),
3008
+ error && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react10.CircleAlert, { "aria-hidden": "true", className: "size-3.5" }),
3009
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { children: state.status === "pending" ? pendingLabel : success ? state.message ?? successLabel : state.message })
2389
3010
  ]
2390
3011
  }
2391
3012
  );
2392
3013
  }
2393
3014
 
2394
3015
  // src/ui/form-feedback/use-form-feedback.ts
2395
- var import_react8 = require("react");
3016
+ var import_react11 = require("react");
2396
3017
  function useFormFeedback(options) {
2397
3018
  const resetMs = options?.successResetMs ?? 2500;
2398
- const [state, setState] = (0, import_react8.useState)({ status: "idle" });
2399
- const timer = (0, import_react8.useRef)(null);
2400
- const clearTimer = (0, import_react8.useCallback)(() => {
3019
+ const [state, setState] = (0, import_react11.useState)({ status: "idle" });
3020
+ const timer = (0, import_react11.useRef)(null);
3021
+ const clearTimer = (0, import_react11.useCallback)(() => {
2401
3022
  if (timer.current) clearTimeout(timer.current);
2402
3023
  timer.current = null;
2403
3024
  }, []);
2404
- (0, import_react8.useEffect)(() => () => clearTimer(), [clearTimer]);
2405
- const setPending = (0, import_react8.useCallback)(() => {
3025
+ (0, import_react11.useEffect)(() => () => clearTimer(), [clearTimer]);
3026
+ const setPending = (0, import_react11.useCallback)(() => {
2406
3027
  clearTimer();
2407
3028
  setState({ status: "pending" });
2408
3029
  }, [clearTimer]);
2409
- const setSuccess = (0, import_react8.useCallback)(
3030
+ const setSuccess = (0, import_react11.useCallback)(
2410
3031
  (message) => {
2411
3032
  clearTimer();
2412
3033
  setState({ status: "success", message });
@@ -2414,14 +3035,14 @@ function useFormFeedback(options) {
2414
3035
  },
2415
3036
  [clearTimer, resetMs]
2416
3037
  );
2417
- const setError = (0, import_react8.useCallback)(
3038
+ const setError = (0, import_react11.useCallback)(
2418
3039
  (message) => {
2419
3040
  clearTimer();
2420
3041
  setState({ status: "error", message });
2421
3042
  },
2422
3043
  [clearTimer]
2423
3044
  );
2424
- const reset = (0, import_react8.useCallback)(() => {
3045
+ const reset = (0, import_react11.useCallback)(() => {
2425
3046
  clearTimer();
2426
3047
  setState({ status: "idle" });
2427
3048
  }, [clearTimer]);
@@ -2429,7 +3050,7 @@ function useFormFeedback(options) {
2429
3050
  }
2430
3051
 
2431
3052
  // src/ui/form-row/form-row.tsx
2432
- var import_jsx_runtime25 = require("react/jsx-runtime");
3053
+ var import_jsx_runtime33 = require("react/jsx-runtime");
2433
3054
  function FormRow({
2434
3055
  label,
2435
3056
  htmlFor,
@@ -2441,36 +3062,36 @@ function FormRow({
2441
3062
  }) {
2442
3063
  const hintId = hint ? `${htmlFor}-hint` : void 0;
2443
3064
  const errorId = error ? `${htmlFor}-error` : void 0;
2444
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { "data-slot": "form-row", className: cn("flex flex-col gap-1.5", className), children: [
2445
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { htmlFor, className: "text-foreground text-sm font-medium", children: [
3065
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { "data-slot": "form-row", className: cn("flex flex-col gap-1.5", className), children: [
3066
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("label", { htmlFor, className: "text-foreground text-sm font-medium", children: [
2446
3067
  label,
2447
- required && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
2448
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { "aria-hidden": "true", className: "text-destructive ml-0.5", children: "*" }),
2449
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "sr-only", children: " (obligatorio)" })
3068
+ required && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
3069
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { "aria-hidden": "true", className: "text-destructive ml-0.5", children: "*" }),
3070
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "sr-only", children: " (obligatorio)" })
2450
3071
  ] })
2451
3072
  ] }),
2452
3073
  children,
2453
- hint && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { id: hintId, className: "text-muted-foreground text-xs", children: hint }),
2454
- error && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { id: errorId, role: "alert", className: "text-destructive text-xs font-medium", children: error })
3074
+ hint && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { id: hintId, className: "text-muted-foreground text-xs", children: hint }),
3075
+ error && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { id: errorId, role: "alert", className: "text-destructive text-xs font-medium", children: error })
2455
3076
  ] });
2456
3077
  }
2457
3078
 
2458
3079
  // src/ui/icon-button/icon-button.tsx
2459
- var import_react_aria_components15 = require("react-aria-components");
3080
+ var import_react_aria_components16 = require("react-aria-components");
2460
3081
 
2461
3082
  // src/ui/tooltip/tooltip.tsx
2462
- var import_react_aria_components14 = require("react-aria-components");
2463
- var import_jsx_runtime26 = require("react/jsx-runtime");
3083
+ var import_react_aria_components15 = require("react-aria-components");
3084
+ var import_jsx_runtime34 = require("react/jsx-runtime");
2464
3085
  function TooltipTrigger({
2465
3086
  delay = 0,
2466
3087
  ...props
2467
3088
  }) {
2468
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react_aria_components14.TooltipTrigger, { "data-slot": "tooltip-trigger", delay, ...props });
3089
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react_aria_components15.TooltipTrigger, { "data-slot": "tooltip-trigger", delay, ...props });
2469
3090
  }
2470
3091
  function Tooltip({ label, children, delay, ...props }) {
2471
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(TooltipTrigger, { delay, children: [
3092
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(TooltipTrigger, { delay, children: [
2472
3093
  children,
2473
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(TooltipContent, { ...props, children: label })
3094
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(TooltipContent, { ...props, children: label })
2474
3095
  ] });
2475
3096
  }
2476
3097
  function TooltipContent({
@@ -2481,8 +3102,8 @@ function TooltipContent({
2481
3102
  children,
2482
3103
  ...props
2483
3104
  }) {
2484
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
2485
- import_react_aria_components14.Tooltip,
3105
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
3106
+ import_react_aria_components15.Tooltip,
2486
3107
  {
2487
3108
  "data-slot": "tooltip-content",
2488
3109
  placement,
@@ -2495,8 +3116,8 @@ function TooltipContent({
2495
3116
  ...props,
2496
3117
  children: [
2497
3118
  children,
2498
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2499
- import_react_aria_components14.OverlayArrow,
3119
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
3120
+ import_react_aria_components15.OverlayArrow,
2500
3121
  {
2501
3122
  className: "bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-xs",
2502
3123
  style: ({ placement: placement2, defaultStyle }) => ({
@@ -2513,7 +3134,7 @@ function TooltipContent({
2513
3134
  }
2514
3135
 
2515
3136
  // src/ui/icon-button/icon-button.tsx
2516
- var import_jsx_runtime27 = require("react/jsx-runtime");
3137
+ var import_jsx_runtime35 = require("react/jsx-runtime");
2517
3138
  function IconButton({
2518
3139
  label,
2519
3140
  children,
@@ -2523,7 +3144,7 @@ function IconButton({
2523
3144
  ...props
2524
3145
  }) {
2525
3146
  const linkClassName = cn(buttonVariants({ variant, size: "icon" }), className);
2526
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Tooltip, { label, children: href ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react_aria_components15.Link, { "data-slot": "icon-button", "aria-label": label, href, className: linkClassName, children }) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
3147
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Tooltip, { label, children: href ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_aria_components16.Link, { "data-slot": "icon-button", "aria-label": label, href, className: linkClassName, children }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2527
3148
  Button,
2528
3149
  {
2529
3150
  "data-slot": "icon-button",
@@ -2541,12 +3162,12 @@ function IconButton({
2541
3162
  var import_class_variance_authority10 = require("class-variance-authority");
2542
3163
 
2543
3164
  // src/ui/input/input.tsx
2544
- var import_react9 = require("react");
2545
- var import_react_aria_components16 = require("react-aria-components");
2546
- var import_jsx_runtime28 = require("react/jsx-runtime");
2547
- var InputImpl = (0, import_react9.forwardRef)(function Input2({ className, type, ...props }, ref) {
2548
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2549
- import_react_aria_components16.Input,
3165
+ var import_react12 = require("react");
3166
+ var import_react_aria_components17 = require("react-aria-components");
3167
+ var import_jsx_runtime36 = require("react/jsx-runtime");
3168
+ var InputImpl = (0, import_react12.forwardRef)(function Input2({ className, type, ...props }, ref) {
3169
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3170
+ import_react_aria_components17.Input,
2550
3171
  {
2551
3172
  ref,
2552
3173
  type,
@@ -2562,12 +3183,12 @@ var InputImpl = (0, import_react9.forwardRef)(function Input2({ className, type,
2562
3183
  var Input3 = InputImpl;
2563
3184
 
2564
3185
  // src/ui/textarea/textarea.tsx
2565
- var import_react10 = require("react");
2566
- var import_react_aria_components17 = require("react-aria-components");
2567
- var import_jsx_runtime29 = require("react/jsx-runtime");
2568
- var TextareaImpl = (0, import_react10.forwardRef)(function Textarea({ className, ...props }, ref) {
2569
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2570
- import_react_aria_components17.TextArea,
3186
+ var import_react13 = require("react");
3187
+ var import_react_aria_components18 = require("react-aria-components");
3188
+ var import_jsx_runtime37 = require("react/jsx-runtime");
3189
+ var TextareaImpl = (0, import_react13.forwardRef)(function Textarea({ className, ...props }, ref) {
3190
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3191
+ import_react_aria_components18.TextArea,
2571
3192
  {
2572
3193
  ref,
2573
3194
  "data-slot": "textarea",
@@ -2599,12 +3220,12 @@ var inputGroupAddonVariants = (0, import_class_variance_authority9.cva)(
2599
3220
  );
2600
3221
 
2601
3222
  // src/ui/input-group/input-group.tsx
2602
- var import_jsx_runtime30 = (
3223
+ var import_jsx_runtime38 = (
2603
3224
  // biome-ignore lint/a11y/useSemanticElements: fieldset cannot preserve this inline control composition.
2604
3225
  require("react/jsx-runtime")
2605
3226
  );
2606
3227
  function InputGroup({ className, ...props }) {
2607
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
3228
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
2608
3229
  "div",
2609
3230
  {
2610
3231
  role: "group",
@@ -2625,7 +3246,7 @@ function InputGroupAddon({
2625
3246
  }) {
2626
3247
  return (
2627
3248
  // biome-ignore lint/a11y/useSemanticElements: this addon delegates focus to its associated input.
2628
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
3249
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
2629
3250
  "div",
2630
3251
  {
2631
3252
  role: "group",
@@ -2656,7 +3277,7 @@ function InputGroupButton({
2656
3277
  ...props
2657
3278
  }) {
2658
3279
  const buttonSize = size === "icon-xs" || size === "icon-sm" ? size : size;
2659
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
3280
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
2660
3281
  Button,
2661
3282
  {
2662
3283
  "data-slot": "input-group-button",
@@ -2669,7 +3290,7 @@ function InputGroupButton({
2669
3290
  );
2670
3291
  }
2671
3292
  function InputGroupText({ className, ...props }) {
2672
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
3293
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
2673
3294
  "span",
2674
3295
  {
2675
3296
  "data-slot": "input-group-text",
@@ -2682,7 +3303,7 @@ function InputGroupText({ className, ...props }) {
2682
3303
  );
2683
3304
  }
2684
3305
  function InputGroupInput({ className, ...props }) {
2685
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
3306
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
2686
3307
  Input3,
2687
3308
  {
2688
3309
  "data-slot": "input-group-control",
@@ -2695,7 +3316,7 @@ function InputGroupInput({ className, ...props }) {
2695
3316
  );
2696
3317
  }
2697
3318
  function InputGroupTextarea({ className, ...props }) {
2698
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
3319
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
2699
3320
  Textarea2,
2700
3321
  {
2701
3322
  "data-slot": "input-group-control",
@@ -2709,7 +3330,7 @@ function InputGroupTextarea({ className, ...props }) {
2709
3330
  }
2710
3331
 
2711
3332
  // src/ui/kanban/kanban.tsx
2712
- var import_jsx_runtime31 = require("react/jsx-runtime");
3333
+ var import_jsx_runtime39 = require("react/jsx-runtime");
2713
3334
  var columnSize = {
2714
3335
  compact: "w-56",
2715
3336
  default: "w-72",
@@ -2721,13 +3342,13 @@ function KanbanViewport({
2721
3342
  contentClassName,
2722
3343
  ...props
2723
3344
  }) {
2724
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
3345
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
2725
3346
  "div",
2726
3347
  {
2727
3348
  "data-slot": "kanban-viewport",
2728
3349
  className: cn("-mx-1 overflow-x-auto pb-3", className),
2729
3350
  ...props,
2730
- children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
3351
+ children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
2731
3352
  "div",
2732
3353
  {
2733
3354
  "data-slot": "kanban-viewport-content",
@@ -2743,7 +3364,7 @@ function KanbanColumn({
2743
3364
  size = "default",
2744
3365
  ...props
2745
3366
  }) {
2746
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
3367
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
2747
3368
  "section",
2748
3369
  {
2749
3370
  "data-slot": "kanban-column",
@@ -2754,7 +3375,7 @@ function KanbanColumn({
2754
3375
  );
2755
3376
  }
2756
3377
  function KanbanColumnHeader({ className, ...props }) {
2757
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
3378
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
2758
3379
  "header",
2759
3380
  {
2760
3381
  "data-slot": "kanban-column-header",
@@ -2764,7 +3385,7 @@ function KanbanColumnHeader({ className, ...props }) {
2764
3385
  );
2765
3386
  }
2766
3387
  function KanbanColumnTitle({ className, ...props }) {
2767
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
3388
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
2768
3389
  "span",
2769
3390
  {
2770
3391
  "data-slot": "kanban-column-title",
@@ -2777,14 +3398,14 @@ function KanbanColumnTitle({ className, ...props }) {
2777
3398
  );
2778
3399
  }
2779
3400
  function KanbanColumnBody({ className, ...props }) {
2780
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { "data-slot": "kanban-column-body", className: cn("space-y-2", className), ...props });
3401
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { "data-slot": "kanban-column-body", className: cn("space-y-2", className), ...props });
2781
3402
  }
2782
3403
  function KanbanEmpty({
2783
3404
  className,
2784
3405
  compact = false,
2785
3406
  ...props
2786
3407
  }) {
2787
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
3408
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
2788
3409
  "p",
2789
3410
  {
2790
3411
  "data-slot": "kanban-empty",
@@ -2800,9 +3421,9 @@ function KanbanEmpty({
2800
3421
  }
2801
3422
 
2802
3423
  // src/ui/kbd/kbd.tsx
2803
- var import_jsx_runtime32 = require("react/jsx-runtime");
3424
+ var import_jsx_runtime40 = require("react/jsx-runtime");
2804
3425
  function Kbd({ className, ...props }) {
2805
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
3426
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2806
3427
  "kbd",
2807
3428
  {
2808
3429
  "data-slot": "kbd",
@@ -2815,7 +3436,7 @@ function Kbd({ className, ...props }) {
2815
3436
  );
2816
3437
  }
2817
3438
  function KbdGroup({ className, ...props }) {
2818
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
3439
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2819
3440
  "span",
2820
3441
  {
2821
3442
  "data-slot": "kbd-group",
@@ -2826,14 +3447,14 @@ function KbdGroup({ className, ...props }) {
2826
3447
  }
2827
3448
 
2828
3449
  // src/ui/loading-overlay/loading-overlay.tsx
2829
- var import_lucide_react8 = require("lucide-react");
2830
- var import_jsx_runtime33 = require("react/jsx-runtime");
3450
+ var import_lucide_react11 = require("lucide-react");
3451
+ var import_jsx_runtime41 = require("react/jsx-runtime");
2831
3452
  function LoadingOverlay({
2832
3453
  label = "Cargando",
2833
3454
  className,
2834
3455
  ...props
2835
3456
  }) {
2836
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
3457
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
2837
3458
  "output",
2838
3459
  {
2839
3460
  "aria-live": "polite",
@@ -2842,25 +3463,26 @@ function LoadingOverlay({
2842
3463
  className
2843
3464
  ),
2844
3465
  ...props,
2845
- children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "border-border bg-background flex items-center gap-2 rounded-lg border px-3 py-2 text-sm shadow-sm", children: [
2846
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react8.LoaderCircle, { className: "animate-spin", "aria-hidden": "true" }),
2847
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { children: label })
3466
+ children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "border-border bg-background flex items-center gap-2 rounded-lg border px-3 py-2 text-sm shadow-sm", children: [
3467
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_lucide_react11.LoaderCircle, { className: "motion-safe:animate-spin", "aria-hidden": "true" }),
3468
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { children: label })
2848
3469
  ] })
2849
3470
  }
2850
3471
  );
2851
3472
  }
2852
3473
 
2853
3474
  // src/ui/menu/menu.tsx
2854
- var import_react_aria_components18 = require("react-aria-components");
2855
- var import_jsx_runtime34 = require("react/jsx-runtime");
2856
- var MenuTrigger = import_react_aria_components18.MenuTrigger;
3475
+ var import_react_aria_components19 = require("react-aria-components");
3476
+ var import_jsx_runtime42 = require("react/jsx-runtime");
3477
+ var MenuTrigger = import_react_aria_components19.MenuTrigger;
2857
3478
  function MenuContent({ className, ...props }) {
2858
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
2859
- import_react_aria_components18.Popover,
3479
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
3480
+ import_react_aria_components19.Popover,
2860
3481
  {
2861
3482
  "data-slot": "menu-content",
2862
3483
  className: cn(
2863
- "min-w-40 overflow-hidden rounded-xl border border-border bg-background p-1.5 text-foreground shadow-lg motion-safe:data-entering:animate-ui-surface-in motion-safe:data-exiting:animate-ui-surface-out",
3484
+ floatingSurfaceClassName,
3485
+ "min-w-40 overflow-hidden rounded-xl border border-border bg-background p-1.5 text-foreground",
2864
3486
  className
2865
3487
  ),
2866
3488
  ...props
@@ -2868,11 +3490,11 @@ function MenuContent({ className, ...props }) {
2868
3490
  );
2869
3491
  }
2870
3492
  function Menu({ className, ...props }) {
2871
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react_aria_components18.Menu, { "data-slot": "menu", className: cn("outline-none", className), ...props });
3493
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react_aria_components19.Menu, { "data-slot": "menu", className: cn("outline-none", className), ...props });
2872
3494
  }
2873
3495
  function MenuItem({ className, children, ...props }) {
2874
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
2875
- import_react_aria_components18.MenuItem,
3496
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
3497
+ import_react_aria_components19.MenuItem,
2876
3498
  {
2877
3499
  "data-slot": "menu-item",
2878
3500
  className: cn(
@@ -2886,7 +3508,7 @@ function MenuItem({ className, children, ...props }) {
2886
3508
  }
2887
3509
 
2888
3510
  // src/ui/metric-card/metric-card.tsx
2889
- var import_jsx_runtime35 = require("react/jsx-runtime");
3511
+ var import_jsx_runtime43 = require("react/jsx-runtime");
2890
3512
  function MetricCard({
2891
3513
  className,
2892
3514
  label,
@@ -2894,33 +3516,81 @@ function MetricCard({
2894
3516
  description,
2895
3517
  icon,
2896
3518
  tone = "default",
3519
+ trend,
3520
+ delta,
3521
+ loading = false,
3522
+ loadingLabel = "Cargando m\xE9trica",
2897
3523
  ...props
2898
3524
  }) {
2899
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Card, { "data-slot": "metric-card", "data-tone": tone, className: cn("min-w-0", className), ...props, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(CardContent, { className: "flex items-start gap-3", children: [
2900
- icon ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { "data-slot": "metric-card-icon", className: "text-muted-foreground shrink-0", children: icon }) : null,
2901
- /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "min-w-0", children: [
2902
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { "data-slot": "metric-card-label", className: "text-muted-foreground text-sm", children: label }),
2903
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2904
- "strong",
2905
- {
2906
- "data-slot": "metric-card-value",
2907
- className: "mt-1 block text-2xl font-semibold tracking-tight",
2908
- children: value
2909
- }
2910
- ),
2911
- description ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { "data-slot": "metric-card-description", className: "text-muted-foreground mt-1 text-xs", children: description }) : null
2912
- ] })
2913
- ] }) });
3525
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
3526
+ Card,
3527
+ {
3528
+ "data-slot": "metric-card",
3529
+ "data-tone": tone,
3530
+ "data-trend": trend,
3531
+ "aria-busy": loading || void 0,
3532
+ className: cn("min-w-0", className),
3533
+ ...props,
3534
+ children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(CardContent, { className: "flex items-start gap-3", children: [
3535
+ icon ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { "data-slot": "metric-card-icon", className: "text-muted-foreground shrink-0", children: icon }) : null,
3536
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "min-w-0", children: [
3537
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { "data-slot": "metric-card-label", className: "text-muted-foreground text-sm", children: label }),
3538
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
3539
+ "strong",
3540
+ {
3541
+ "data-slot": "metric-card-value",
3542
+ className: "mt-1 block text-2xl font-semibold tracking-tight",
3543
+ children: loading ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
3544
+ "span",
3545
+ {
3546
+ "data-slot": "metric-card-loading",
3547
+ "aria-label": loadingLabel,
3548
+ className: "bg-muted block h-7 w-24 animate-pulse rounded motion-reduce:animate-none"
3549
+ }
3550
+ ) : value
3551
+ }
3552
+ ),
3553
+ delta ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
3554
+ "span",
3555
+ {
3556
+ "data-slot": "metric-card-delta",
3557
+ className: cn(
3558
+ "mt-1 block text-xs",
3559
+ trend === "up" && "text-emerald-600",
3560
+ trend === "down" && "text-destructive",
3561
+ trend === "neutral" && "text-muted-foreground"
3562
+ ),
3563
+ children: delta
3564
+ }
3565
+ ) : null,
3566
+ description ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { "data-slot": "metric-card-description", className: "text-muted-foreground mt-1 text-xs", children: description }) : null
3567
+ ] })
3568
+ ] })
3569
+ }
3570
+ );
3571
+ }
3572
+
3573
+ // src/ui/metric-grid/metric-grid.tsx
3574
+ var import_jsx_runtime44 = require("react/jsx-runtime");
3575
+ function MetricGrid({ className, ...props }) {
3576
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3577
+ "div",
3578
+ {
3579
+ "data-slot": "metric-grid",
3580
+ className: cn("grid gap-4 sm:grid-cols-2 xl:grid-cols-4", className),
3581
+ ...props
3582
+ }
3583
+ );
2914
3584
  }
2915
3585
 
2916
3586
  // src/ui/otp-input/otp-input.tsx
2917
- var import_react11 = require("react");
2918
- var import_react_aria_components19 = require("react-aria-components");
2919
- var import_jsx_runtime36 = require("react/jsx-runtime");
3587
+ var import_react14 = require("react");
3588
+ var import_react_aria_components20 = require("react-aria-components");
3589
+ var import_jsx_runtime45 = require("react/jsx-runtime");
2920
3590
  function normalizeOtp(value, length) {
2921
3591
  return value.replace(/[^0-9]/g, "").slice(0, length);
2922
3592
  }
2923
- var OtpInputImpl = (0, import_react11.forwardRef)(function OtpInput({
3593
+ var OtpInputImpl = (0, import_react14.forwardRef)(function OtpInput({
2924
3594
  length = 6,
2925
3595
  value,
2926
3596
  defaultValue = "",
@@ -2935,17 +3605,17 @@ var OtpInputImpl = (0, import_react11.forwardRef)(function OtpInput({
2935
3605
  onSelect,
2936
3606
  ...props
2937
3607
  }, forwardedRef) {
2938
- const slotCount = Math.max(1, Math.floor(length));
3608
+ const slotCount = Number.isFinite(length) ? Math.max(1, Math.floor(length)) : 6;
2939
3609
  const controlled = value !== void 0;
2940
- const [internalValue, setInternalValue] = (0, import_react11.useState)(() => normalizeOtp(defaultValue, slotCount));
3610
+ const [internalValue, setInternalValue] = (0, import_react14.useState)(() => normalizeOtp(defaultValue, slotCount));
2941
3611
  const code = normalizeOtp(controlled ? value : internalValue, slotCount);
2942
3612
  const slots = Array.from({ length: slotCount }, (_, index) => `otp-slot-${index + 1}`);
2943
- const inputRef = (0, import_react11.useRef)(null);
2944
- const [focused, setFocused] = (0, import_react11.useState)(false);
2945
- const [selectionStart, setSelectionStart] = (0, import_react11.useState)(0);
3613
+ const inputRef = (0, import_react14.useRef)(null);
3614
+ const [focused, setFocused] = (0, import_react14.useState)(false);
3615
+ const [selectionStart, setSelectionStart] = (0, import_react14.useState)(0);
2946
3616
  const invalid = props["aria-invalid"] === true || props["aria-invalid"] === "true";
2947
3617
  const activeIndex = code.length === slotCount ? slotCount - 1 : Math.min(selectionStart, code.length, slotCount - 1);
2948
- (0, import_react11.useImperativeHandle)(forwardedRef, () => inputRef.current);
3618
+ (0, import_react14.useImperativeHandle)(forwardedRef, () => inputRef.current);
2949
3619
  function updateSelection(input) {
2950
3620
  setSelectionStart(input.selectionStart ?? code.length);
2951
3621
  }
@@ -2954,7 +3624,7 @@ var OtpInputImpl = (0, import_react11.forwardRef)(function OtpInput({
2954
3624
  if (!controlled) setInternalValue(nextValue);
2955
3625
  if (nextValue === code) return;
2956
3626
  onChange?.(nextValue);
2957
- if (nextValue.length === slotCount) onComplete?.(nextValue);
3627
+ if (nextValue.length === slotCount && code.length < slotCount) onComplete?.(nextValue);
2958
3628
  }
2959
3629
  function handlePointerDown(event) {
2960
3630
  if (disabled) return;
@@ -2968,7 +3638,7 @@ var OtpInputImpl = (0, import_react11.forwardRef)(function OtpInput({
2968
3638
  input.setSelectionRange(position, position);
2969
3639
  setSelectionStart(position);
2970
3640
  }
2971
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
3641
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
2972
3642
  "div",
2973
3643
  {
2974
3644
  "data-slot": "otp-input",
@@ -2978,8 +3648,8 @@ var OtpInputImpl = (0, import_react11.forwardRef)(function OtpInput({
2978
3648
  style: { gridTemplateColumns: `repeat(${slotCount}, minmax(0, 2.5rem))` },
2979
3649
  onPointerDown: handlePointerDown,
2980
3650
  children: [
2981
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
2982
- import_react_aria_components19.Input,
3651
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
3652
+ import_react_aria_components20.Input,
2983
3653
  {
2984
3654
  ...props,
2985
3655
  ref: inputRef,
@@ -3018,7 +3688,7 @@ var OtpInputImpl = (0, import_react11.forwardRef)(function OtpInput({
3018
3688
  }
3019
3689
  }
3020
3690
  ),
3021
- slots.map((slot, index) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3691
+ slots.map((slot, index) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
3022
3692
  "span",
3023
3693
  {
3024
3694
  "aria-hidden": "true",
@@ -3041,9 +3711,9 @@ var OtpInputImpl = (0, import_react11.forwardRef)(function OtpInput({
3041
3711
  var OtpInput2 = OtpInputImpl;
3042
3712
 
3043
3713
  // src/ui/page-header/page-header.tsx
3044
- var import_jsx_runtime37 = require("react/jsx-runtime");
3714
+ var import_jsx_runtime46 = require("react/jsx-runtime");
3045
3715
  function PageHeader({ className, ...props }) {
3046
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3716
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
3047
3717
  "header",
3048
3718
  {
3049
3719
  "data-slot": "page-header",
@@ -3056,10 +3726,10 @@ function PageHeader({ className, ...props }) {
3056
3726
  );
3057
3727
  }
3058
3728
  function PageHeaderHeading({ className, ...props }) {
3059
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { "data-slot": "page-header-heading", className: cn("min-w-0", className), ...props });
3729
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { "data-slot": "page-header-heading", className: cn("min-w-0", className), ...props });
3060
3730
  }
3061
3731
  function PageHeaderTitle({ className, children, ...props }) {
3062
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3732
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
3063
3733
  "h1",
3064
3734
  {
3065
3735
  "data-slot": "page-header-title",
@@ -3070,7 +3740,7 @@ function PageHeaderTitle({ className, children, ...props }) {
3070
3740
  );
3071
3741
  }
3072
3742
  function PageHeaderDescription({ className, ...props }) {
3073
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3743
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
3074
3744
  "p",
3075
3745
  {
3076
3746
  "data-slot": "page-header-description",
@@ -3080,7 +3750,7 @@ function PageHeaderDescription({ className, ...props }) {
3080
3750
  );
3081
3751
  }
3082
3752
  function PageHeaderActions({ className, ...props }) {
3083
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3753
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
3084
3754
  "div",
3085
3755
  {
3086
3756
  "data-slot": "page-header-actions",
@@ -3089,11 +3759,54 @@ function PageHeaderActions({ className, ...props }) {
3089
3759
  }
3090
3760
  );
3091
3761
  }
3762
+ function SectionHeader({ className, ...props }) {
3763
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
3764
+ "div",
3765
+ {
3766
+ "data-slot": "section-header",
3767
+ className: cn("flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between", className),
3768
+ ...props
3769
+ }
3770
+ );
3771
+ }
3772
+ function SectionHeaderHeading({ className, ...props }) {
3773
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { "data-slot": "section-header-heading", className: cn("min-w-0", className), ...props });
3774
+ }
3775
+ function SectionHeaderTitle({ className, ...props }) {
3776
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
3777
+ "h2",
3778
+ {
3779
+ "data-slot": "section-header-title",
3780
+ className: cn("text-base font-semibold tracking-tight", className),
3781
+ ...props
3782
+ }
3783
+ );
3784
+ }
3785
+ function SectionHeaderDescription({ className, ...props }) {
3786
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
3787
+ "p",
3788
+ {
3789
+ "data-slot": "section-header-description",
3790
+ className: cn("mt-1 text-sm text-muted-foreground", className),
3791
+ ...props
3792
+ }
3793
+ );
3794
+ }
3795
+ function SectionHeaderActions({ className, ...props }) {
3796
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
3797
+ "div",
3798
+ {
3799
+ "data-slot": "section-header-actions",
3800
+ className: cn("flex shrink-0 items-center gap-2", className),
3801
+ ...props
3802
+ }
3803
+ );
3804
+ }
3092
3805
 
3093
3806
  // src/ui/pagination/pagination.tsx
3094
- var import_lucide_react9 = require("lucide-react");
3807
+ var import_lucide_react12 = require("lucide-react");
3095
3808
  var React6 = __toESM(require("react"), 1);
3096
- var import_jsx_runtime38 = require("react/jsx-runtime");
3809
+ var import_jsx_runtime47 = require("react/jsx-runtime");
3097
3810
  function visiblePages(page, pageCount, siblingCount) {
3098
3811
  return [
3099
3812
  .../* @__PURE__ */ new Set([
@@ -3103,6 +3816,13 @@ function visiblePages(page, pageCount, siblingCount) {
3103
3816
  ])
3104
3817
  ].filter((item) => item >= 1 && item <= pageCount).sort((left, right) => left - right);
3105
3818
  }
3819
+ function normalizedPageCount(pageCount) {
3820
+ return Number.isFinite(pageCount) ? Math.max(0, Math.floor(pageCount)) : 0;
3821
+ }
3822
+ function normalizedPage(page, pageCount) {
3823
+ if (!Number.isFinite(page)) return 1;
3824
+ return Math.min(Math.max(1, Math.floor(page)), pageCount);
3825
+ }
3106
3826
  function Pagination({
3107
3827
  page,
3108
3828
  pageCount,
@@ -3112,35 +3832,37 @@ function Pagination({
3112
3832
  siblingCount = 1,
3113
3833
  className
3114
3834
  }) {
3115
- if (pageCount <= 1) return null;
3116
- const pages = visiblePages(page, pageCount, siblingCount);
3117
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
3835
+ const totalPages = normalizedPageCount(pageCount);
3836
+ if (totalPages <= 1) return null;
3837
+ const currentPage = normalizedPage(page, totalPages);
3838
+ const pages = visiblePages(currentPage, totalPages, siblingCount);
3839
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
3118
3840
  "nav",
3119
3841
  {
3120
3842
  "aria-label": ariaLabel,
3121
3843
  className: cn("flex flex-wrap items-center justify-between gap-4", className),
3122
3844
  children: [
3123
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { className: "text-muted-foreground text-sm", children: summary ?? `P\xE1gina ${page} de ${pageCount}` }),
3124
- /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex items-center gap-1", children: [
3125
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3845
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "text-muted-foreground text-sm", children: summary ?? `P\xE1gina ${currentPage} de ${totalPages}` }),
3846
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex items-center gap-1", children: [
3847
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
3126
3848
  Button,
3127
3849
  {
3128
3850
  "aria-label": "P\xE1gina anterior",
3129
- isDisabled: page <= 1,
3130
- onPress: () => onPageChange(page - 1),
3851
+ isDisabled: currentPage <= 1,
3852
+ onPress: () => onPageChange(currentPage - 1),
3131
3853
  size: "icon",
3132
3854
  variant: "ghost",
3133
- children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react9.ChevronLeft, {})
3855
+ children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_lucide_react12.ChevronLeft, {})
3134
3856
  }
3135
3857
  ),
3136
3858
  pages.map((item, index) => {
3137
3859
  const previousPage = pages[index - 1];
3138
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(React6.Fragment, { children: [
3139
- previousPage !== void 0 && item > previousPage + 1 ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { "aria-hidden": "true", className: "text-muted-foreground px-1", children: "\u2026" }) : null,
3140
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3860
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(React6.Fragment, { children: [
3861
+ previousPage !== void 0 && item > previousPage + 1 ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { "aria-hidden": "true", className: "text-muted-foreground px-1", children: "\u2026" }) : null,
3862
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
3141
3863
  Button,
3142
3864
  {
3143
- "aria-current": item === page ? "page" : void 0,
3865
+ "aria-current": item === currentPage ? "page" : void 0,
3144
3866
  "aria-label": `P\xE1gina ${item}`,
3145
3867
  onPress: () => onPageChange(item),
3146
3868
  size: "icon",
@@ -3150,15 +3872,15 @@ function Pagination({
3150
3872
  )
3151
3873
  ] }, item);
3152
3874
  }),
3153
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3875
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
3154
3876
  Button,
3155
3877
  {
3156
3878
  "aria-label": "P\xE1gina siguiente",
3157
- isDisabled: page >= pageCount,
3158
- onPress: () => onPageChange(page + 1),
3879
+ isDisabled: currentPage >= totalPages,
3880
+ onPress: () => onPageChange(currentPage + 1),
3159
3881
  size: "icon",
3160
3882
  variant: "ghost",
3161
- children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react9.ChevronRight, {})
3883
+ children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_lucide_react12.ChevronRight, {})
3162
3884
  }
3163
3885
  )
3164
3886
  ] })
@@ -3168,17 +3890,18 @@ function Pagination({
3168
3890
  }
3169
3891
 
3170
3892
  // src/ui/popover/popover.tsx
3171
- var import_react_aria_components20 = require("react-aria-components");
3172
- var import_jsx_runtime39 = require("react/jsx-runtime");
3173
- var PopoverTrigger = import_react_aria_components20.DialogTrigger;
3893
+ var import_react_aria_components21 = require("react-aria-components");
3894
+ var import_jsx_runtime48 = require("react/jsx-runtime");
3895
+ var PopoverTrigger = import_react_aria_components21.DialogTrigger;
3174
3896
  function PopoverContent({ className, ...props }) {
3175
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
3176
- import_react_aria_components20.Popover,
3897
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
3898
+ import_react_aria_components21.Popover,
3177
3899
  {
3178
3900
  "data-slot": "popover",
3179
3901
  offset: 6,
3180
3902
  className: cn(
3181
- "z-50 min-w-48 rounded-xl border border-border bg-background p-1.5 text-foreground shadow-lg outline-none motion-safe:data-entering:animate-ui-surface-in motion-safe:data-exiting:animate-ui-surface-out",
3903
+ floatingSurfaceClassName,
3904
+ "min-w-48 rounded-xl border border-border bg-background p-1.5 text-foreground",
3182
3905
  className
3183
3906
  ),
3184
3907
  ...props
@@ -3186,19 +3909,19 @@ function PopoverContent({ className, ...props }) {
3186
3909
  );
3187
3910
  }
3188
3911
  function Popover4(props) {
3189
- if (!("trigger" in props)) return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(PopoverContent, { ...props });
3912
+ if (!("trigger" in props)) return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(PopoverContent, { ...props });
3190
3913
  const { children, trigger, triggerProps, defaultOpen, isOpen, onOpenChange, ...contentProps } = props;
3191
- const triggerElement = typeof trigger === "string" ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Button, { ...triggerProps, children: trigger }) : trigger;
3192
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(PopoverTrigger, { defaultOpen, isOpen, onOpenChange, children: [
3914
+ const triggerElement = typeof trigger === "string" ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Button, { ...triggerProps, children: trigger }) : trigger;
3915
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(PopoverTrigger, { defaultOpen, isOpen, onOpenChange, children: [
3193
3916
  triggerElement,
3194
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(PopoverContent, { ...contentProps, children })
3917
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(PopoverContent, { ...contentProps, children })
3195
3918
  ] });
3196
3919
  }
3197
3920
 
3198
3921
  // src/ui/quantity-input/quantity-input.tsx
3199
- var import_lucide_react10 = require("lucide-react");
3200
- var import_react_aria_components21 = require("react-aria-components");
3201
- var import_jsx_runtime40 = require("react/jsx-runtime");
3922
+ var import_lucide_react13 = require("lucide-react");
3923
+ var import_react_aria_components22 = require("react-aria-components");
3924
+ var import_jsx_runtime49 = require("react/jsx-runtime");
3202
3925
  function QuantityInput({
3203
3926
  className,
3204
3927
  inputClassName,
@@ -3208,8 +3931,8 @@ function QuantityInput({
3208
3931
  step = 1,
3209
3932
  ...props
3210
3933
  }) {
3211
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
3212
- import_react_aria_components21.NumberField,
3934
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
3935
+ import_react_aria_components22.NumberField,
3213
3936
  {
3214
3937
  ...props,
3215
3938
  minValue,
@@ -3219,24 +3942,24 @@ function QuantityInput({
3219
3942
  "group/quantity-input inline-flex min-w-0 data-disabled:cursor-not-allowed data-disabled:opacity-50",
3220
3943
  className
3221
3944
  ),
3222
- children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
3223
- import_react_aria_components21.Group,
3945
+ children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
3946
+ import_react_aria_components22.Group,
3224
3947
  {
3225
3948
  "data-slot": "quantity-input-group",
3226
3949
  className: "border-border bg-background text-foreground focus-within:border-ring focus-within:ring-ring/50 group-data-invalid/quantity-input:border-destructive flex h-8 min-w-0 items-stretch overflow-hidden rounded-lg border transition-[border-color,box-shadow] focus-within:ring-3",
3227
3950
  children: [
3228
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
3229
- import_react_aria_components21.Button,
3951
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
3952
+ import_react_aria_components22.Button,
3230
3953
  {
3231
3954
  slot: "decrement",
3232
3955
  "aria-label": decrementAriaLabel,
3233
3956
  "data-slot": "quantity-input-decrement",
3234
3957
  className: "border-border text-muted-foreground hover:bg-muted hover:text-foreground data-focus-visible:bg-muted data-pressed:bg-muted flex size-8 shrink-0 cursor-pointer items-center justify-center border-r transition-colors outline-none data-disabled:pointer-events-none",
3235
- children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react10.Minus, { "aria-hidden": "true", className: "size-4" })
3958
+ children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react13.Minus, { "aria-hidden": "true", className: "size-4" })
3236
3959
  }
3237
3960
  ),
3238
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
3239
- import_react_aria_components21.Input,
3961
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
3962
+ import_react_aria_components22.Input,
3240
3963
  {
3241
3964
  "data-slot": "quantity-input-value",
3242
3965
  className: cn(
@@ -3245,14 +3968,14 @@ function QuantityInput({
3245
3968
  )
3246
3969
  }
3247
3970
  ),
3248
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
3249
- import_react_aria_components21.Button,
3971
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
3972
+ import_react_aria_components22.Button,
3250
3973
  {
3251
3974
  slot: "increment",
3252
3975
  "aria-label": incrementAriaLabel,
3253
3976
  "data-slot": "quantity-input-increment",
3254
3977
  className: "border-border text-muted-foreground hover:bg-muted hover:text-foreground data-focus-visible:bg-muted data-pressed:bg-muted flex size-8 shrink-0 cursor-pointer items-center justify-center border-l transition-colors outline-none data-disabled:pointer-events-none",
3255
- children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react10.Plus, { "aria-hidden": "true", className: "size-4" })
3978
+ children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react13.Plus, { "aria-hidden": "true", className: "size-4" })
3256
3979
  }
3257
3980
  )
3258
3981
  ]
@@ -3263,13 +3986,13 @@ function QuantityInput({
3263
3986
  }
3264
3987
 
3265
3988
  // src/ui/select/select.tsx
3266
- var import_lucide_react11 = require("lucide-react");
3267
- var import_react_aria_components22 = require("react-aria-components");
3268
- var import_jsx_runtime41 = require("react/jsx-runtime");
3269
- var Select = import_react_aria_components22.Select;
3989
+ var import_lucide_react14 = require("lucide-react");
3990
+ var import_react_aria_components23 = require("react-aria-components");
3991
+ var import_jsx_runtime50 = require("react/jsx-runtime");
3992
+ var Select = import_react_aria_components23.Select;
3270
3993
  function SelectTrigger({ className, children, ...props }) {
3271
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
3272
- import_react_aria_components22.Button,
3994
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
3995
+ import_react_aria_components23.Button,
3273
3996
  {
3274
3997
  "data-slot": "select-trigger",
3275
3998
  className: cn(
@@ -3277,10 +4000,10 @@ function SelectTrigger({ className, children, ...props }) {
3277
4000
  className
3278
4001
  ),
3279
4002
  ...props,
3280
- children: (state) => /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
4003
+ children: (state) => /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_jsx_runtime50.Fragment, { children: [
3281
4004
  typeof children === "function" ? children(state) : children,
3282
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
3283
- import_lucide_react11.ChevronDown,
4005
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
4006
+ import_lucide_react14.ChevronDown,
3284
4007
  {
3285
4008
  "aria-hidden": "true",
3286
4009
  className: "text-muted-foreground ml-auto size-4 transition-transform group-data-pressed/select-trigger:rotate-180 motion-reduce:transition-none"
@@ -3291,8 +4014,8 @@ function SelectTrigger({ className, children, ...props }) {
3291
4014
  );
3292
4015
  }
3293
4016
  function SelectValue({ className, ...props }) {
3294
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
3295
- import_react_aria_components22.SelectValue,
4017
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
4018
+ import_react_aria_components23.SelectValue,
3296
4019
  {
3297
4020
  "data-slot": "select-value",
3298
4021
  className: cn("flex-1 truncate data-placeholder:text-muted-foreground", className),
@@ -3301,12 +4024,13 @@ function SelectValue({ className, ...props }) {
3301
4024
  );
3302
4025
  }
3303
4026
  function SelectContent({ className, ...props }) {
3304
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
3305
- import_react_aria_components22.Popover,
4027
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
4028
+ import_react_aria_components23.Popover,
3306
4029
  {
3307
4030
  "data-slot": "select-content",
3308
4031
  className: cn(
3309
- "w-(--trigger-width) overflow-hidden rounded-xl border border-border bg-background p-1.5 text-foreground shadow-lg motion-safe:data-entering:animate-ui-surface-in motion-safe:data-exiting:animate-ui-surface-out",
4032
+ floatingSurfaceClassName,
4033
+ "w-(--trigger-width) overflow-hidden rounded-xl border border-border bg-background p-1.5 text-foreground",
3310
4034
  className
3311
4035
  ),
3312
4036
  ...props
@@ -3314,8 +4038,8 @@ function SelectContent({ className, ...props }) {
3314
4038
  );
3315
4039
  }
3316
4040
  function SelectList({ className, ...props }) {
3317
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
3318
- import_react_aria_components22.ListBox,
4041
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
4042
+ import_react_aria_components23.ListBox,
3319
4043
  {
3320
4044
  "data-slot": "select-list",
3321
4045
  className: cn("max-h-64 overflow-y-auto", className),
@@ -3328,8 +4052,8 @@ function SelectItem({
3328
4052
  children,
3329
4053
  ...props
3330
4054
  }) {
3331
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
3332
- import_react_aria_components22.ListBoxItem,
4055
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
4056
+ import_react_aria_components23.ListBoxItem,
3333
4057
  {
3334
4058
  "data-slot": "select-item",
3335
4059
  className: cn(
@@ -3342,189 +4066,79 @@ function SelectItem({
3342
4066
  );
3343
4067
  }
3344
4068
 
3345
- // src/ui/sheet/sheet.tsx
3346
- var import_lucide_react12 = require("lucide-react");
3347
- var import_react_aria_components23 = require("react-aria-components");
3348
- var import_jsx_runtime42 = require("react/jsx-runtime");
3349
- function SheetTrigger({ ...props }) {
3350
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react_aria_components23.DialogTrigger, { "data-slot": "sheet-trigger", ...props });
3351
- }
3352
- function SheetClose({ className, variant = "outline", size = "default", ...props }) {
3353
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
3354
- Button,
3355
- {
3356
- slot: "close",
3357
- "data-slot": "sheet-close",
3358
- variant,
3359
- size,
3360
- className: cn(className),
3361
- ...props
3362
- }
3363
- );
3364
- }
3365
- function SheetOverlay({
4069
+ // src/ui/selection-toolbar/selection-toolbar.tsx
4070
+ var import_jsx_runtime51 = require("react/jsx-runtime");
4071
+ function SelectionToolbar({
4072
+ count,
3366
4073
  className,
3367
4074
  children,
3368
4075
  ...props
3369
4076
  }) {
3370
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
3371
- import_react_aria_components23.ModalOverlay,
4077
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
4078
+ "div",
3372
4079
  {
3373
- "data-slot": "sheet-overlay",
3374
- isDismissable: true,
4080
+ "data-slot": "selection-toolbar",
3375
4081
  className: cn(
3376
- "fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-entering:opacity-0 data-exiting:opacity-0 supports-backdrop-filter:backdrop-blur-xs",
4082
+ "flex flex-wrap items-center justify-between gap-2 rounded-lg border bg-muted/40 p-2",
3377
4083
  className
3378
4084
  ),
3379
4085
  ...props,
3380
- children
3381
- }
3382
- );
3383
- }
3384
- function Sheet({
3385
- className,
3386
- children,
3387
- side = "right",
3388
- showCloseButton = true,
3389
- ...props
3390
- }) {
3391
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(SheetOverlay, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
3392
- import_react_aria_components23.Modal,
3393
- {
3394
- "data-slot": "sheet-content",
3395
- "data-side": side,
3396
- className: cn(
3397
- "fixed z-50 flex flex-col gap-4 border-border bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-entering:opacity-0 data-exiting: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-entering:translate-y-10 data-[side=bottom]:data-exiting:translate-y-10 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-entering:-translate-x-10 data-[side=left]:data-exiting:-translate-x-10 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-entering:translate-x-10 data-[side=right]:data-exiting:translate-x-10 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-entering:-translate-y-10 data-[side=top]:data-exiting:-translate-y-10 data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",
3398
- className
3399
- ),
3400
- children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
3401
- import_react_aria_components23.Dialog,
3402
- {
3403
- "data-slot": "sheet",
3404
- className: "[display:inherit] h-full max-h-[inherit] [flex-direction:inherit] gap-[inherit] outline-none",
3405
- children: [
3406
- children,
3407
- showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(SheetClose, { variant: "ghost", className: "absolute top-3 right-3", size: "icon-sm", children: [
3408
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react12.XIcon, {}),
3409
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "sr-only", children: "Cerrar" })
3410
- ] })
3411
- ]
3412
- }
3413
- )
3414
- }
3415
- ) });
3416
- }
3417
- function SheetContent({
3418
- className,
3419
- children,
3420
- side = "right",
3421
- showCloseButton = true,
3422
- ...props
3423
- }) {
3424
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Sheet, { className, side, showCloseButton, ...props, children });
3425
- }
3426
- function Drawer({
3427
- children,
3428
- trigger,
3429
- triggerProps,
3430
- defaultOpen,
3431
- isOpen,
3432
- onOpenChange,
3433
- ...contentProps
3434
- }) {
3435
- const triggerElement = typeof trigger === "string" ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Button, { ...triggerProps, children: trigger }) : trigger;
3436
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(SheetTrigger, { defaultOpen, isOpen, onOpenChange, children: [
3437
- triggerElement,
3438
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(SheetContent, { ...contentProps, children })
3439
- ] });
3440
- }
3441
- function SheetHeader({ className, ...props }) {
3442
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
3443
- "div",
3444
- {
3445
- "data-slot": "sheet-header",
3446
- className: cn("flex flex-col gap-0.5 p-4", className),
3447
- ...props
3448
- }
3449
- );
3450
- }
3451
- function SheetFooter({ className, ...props }) {
3452
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
3453
- "div",
3454
- {
3455
- "data-slot": "sheet-footer",
3456
- className: cn("mt-auto flex flex-col gap-2 p-4", className),
3457
- ...props
3458
- }
3459
- );
3460
- }
3461
- function SheetTitle({ className, ...props }) {
3462
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
3463
- import_react_aria_components23.Heading,
3464
- {
3465
- slot: "title",
3466
- "data-slot": "sheet-title",
3467
- className: cn("text-base font-medium text-foreground", className),
3468
- ...props
3469
- }
3470
- );
3471
- }
3472
- function SheetDescription({
3473
- className,
3474
- ...props
3475
- }) {
3476
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
3477
- import_react_aria_components23.Text,
3478
- {
3479
- slot: "description",
3480
- "data-slot": "sheet-description",
3481
- className: cn("text-sm text-muted-foreground", className),
3482
- ...props
4086
+ children: [
4087
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("output", { "aria-live": "polite", className: "text-sm font-medium", children: [
4088
+ count,
4089
+ " seleccionados"
4090
+ ] }),
4091
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "flex items-center gap-2", children })
4092
+ ]
3483
4093
  }
3484
4094
  );
3485
4095
  }
3486
- var DrawerTrigger = SheetTrigger;
3487
- var DrawerContent = SheetContent;
3488
- var DrawerClose = SheetClose;
3489
- var DrawerHeader = SheetHeader;
3490
- var DrawerFooter = SheetFooter;
3491
- var DrawerTitle = SheetTitle;
3492
- var DrawerDescription = SheetDescription;
3493
4096
 
3494
4097
  // src/ui/sidebar/sidebar.tsx
3495
- var import_lucide_react13 = require("lucide-react");
3496
- var import_react13 = require("react");
4098
+ var import_lucide_react15 = require("lucide-react");
4099
+ var import_react16 = require("react");
3497
4100
  var import_react_aria_components24 = require("react-aria-components");
3498
4101
 
3499
4102
  // src/ui/sidebar/sidebar-context.ts
3500
- var import_react12 = require("react");
3501
- var SidebarContext = (0, import_react12.createContext)(null);
4103
+ var import_react15 = require("react");
4104
+ var SidebarContext = (0, import_react15.createContext)(null);
3502
4105
  function useSidebar() {
3503
- const context = (0, import_react12.useContext)(SidebarContext);
4106
+ const context = (0, import_react15.useContext)(SidebarContext);
3504
4107
  if (!context) throw new Error("useSidebar must be used inside SidebarProvider");
3505
4108
  return context;
3506
4109
  }
3507
4110
 
3508
4111
  // src/ui/sidebar/sidebar.tsx
3509
- var import_jsx_runtime43 = require("react/jsx-runtime");
4112
+ var import_jsx_runtime52 = require("react/jsx-runtime");
3510
4113
  function SidebarProvider({
3511
4114
  defaultCollapsed = false,
4115
+ collapsed: controlledCollapsed,
4116
+ onCollapsedChange,
3512
4117
  children
3513
4118
  }) {
3514
- const [collapsed, setCollapsed] = (0, import_react13.useState)(defaultCollapsed);
3515
- const value = (0, import_react13.useMemo)(
4119
+ const [uncontrolledCollapsed, setUncontrolledCollapsed] = (0, import_react16.useState)(defaultCollapsed);
4120
+ const collapsed = controlledCollapsed ?? uncontrolledCollapsed;
4121
+ const setCollapsed = (0, import_react16.useCallback)(
4122
+ (next) => {
4123
+ if (controlledCollapsed === void 0) setUncontrolledCollapsed(next);
4124
+ onCollapsedChange?.(next);
4125
+ },
4126
+ [controlledCollapsed, onCollapsedChange]
4127
+ );
4128
+ const toggle = (0, import_react16.useCallback)(() => setCollapsed(!collapsed), [collapsed, setCollapsed]);
4129
+ const value = (0, import_react16.useMemo)(
3516
4130
  () => ({
3517
4131
  collapsed,
3518
4132
  setCollapsed,
3519
- toggle: () => setCollapsed((current) => !current)
4133
+ toggle
3520
4134
  }),
3521
- [collapsed]
4135
+ [collapsed, setCollapsed, toggle]
3522
4136
  );
3523
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(SidebarContext.Provider, { value, children });
4137
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(SidebarContext.Provider, { value, children });
3524
4138
  }
3525
4139
  function Sidebar({ className, ...props }) {
3526
4140
  const { collapsed } = useSidebar();
3527
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
4141
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
3528
4142
  "aside",
3529
4143
  {
3530
4144
  "data-slot": "sidebar",
@@ -3538,7 +4152,7 @@ function Sidebar({ className, ...props }) {
3538
4152
  );
3539
4153
  }
3540
4154
  function SidebarHeader({ className, ...props }) {
3541
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
4155
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
3542
4156
  "div",
3543
4157
  {
3544
4158
  "data-slot": "sidebar-header",
@@ -3553,7 +4167,7 @@ function SidebarSearch({
3553
4167
  className,
3554
4168
  ...props
3555
4169
  }) {
3556
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
4170
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
3557
4171
  "button",
3558
4172
  {
3559
4173
  type: "button",
@@ -3564,15 +4178,15 @@ function SidebarSearch({
3564
4178
  ),
3565
4179
  ...props,
3566
4180
  children: [
3567
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react13.Search, { className: "size-4 shrink-0" }),
3568
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "flex-1 text-left", children: label }),
3569
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("kbd", { className: "bg-secondary text-muted-foreground rounded px-1.5 py-0.5 font-mono text-[10px]", children: shortcut })
4181
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_lucide_react15.Search, { className: "size-4 shrink-0" }),
4182
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "flex-1 text-left", children: label }),
4183
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("kbd", { className: "bg-secondary text-muted-foreground rounded px-1.5 py-0.5 font-mono text-[10px]", children: shortcut })
3570
4184
  ]
3571
4185
  }
3572
4186
  );
3573
4187
  }
3574
4188
  function SidebarContent({ className, ...props }) {
3575
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
4189
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
3576
4190
  "nav",
3577
4191
  {
3578
4192
  "data-slot": "sidebar-content",
@@ -3583,7 +4197,7 @@ function SidebarContent({ className, ...props }) {
3583
4197
  );
3584
4198
  }
3585
4199
  function SidebarFooter({ className, ...props }) {
3586
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
4200
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
3587
4201
  "div",
3588
4202
  {
3589
4203
  "data-slot": "sidebar-footer",
@@ -3599,8 +4213,8 @@ function SidebarGroup({
3599
4213
  ...props
3600
4214
  }) {
3601
4215
  const { collapsed } = useSidebar();
3602
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("section", { "data-slot": "sidebar-group", className: cn("mb-4 last:mb-0", className), ...props, children: [
3603
- label && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
4216
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("section", { "data-slot": "sidebar-group", className: cn("mb-4 last:mb-0", className), ...props, children: [
4217
+ label && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
3604
4218
  "h2",
3605
4219
  {
3606
4220
  className: cn(
@@ -3624,7 +4238,7 @@ function SidebarItem({
3624
4238
  }) {
3625
4239
  const { collapsed } = useSidebar();
3626
4240
  const content = typeof children === "function" ? label : children ?? label;
3627
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
4241
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
3628
4242
  import_react_aria_components24.Link,
3629
4243
  {
3630
4244
  "data-slot": "sidebar-item",
@@ -3636,16 +4250,16 @@ function SidebarItem({
3636
4250
  typeof className === "function" ? className : className
3637
4251
  ),
3638
4252
  ...props,
3639
- children: (values) => /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
3640
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "flex size-4 shrink-0 items-center justify-center", children: icon }),
3641
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: cn("min-w-0 flex-1 truncate", collapsed && "sr-only"), children: typeof children === "function" ? children(values) : content }),
3642
- badge && !collapsed && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "text-muted-foreground text-xs", children: badge })
4253
+ children: (values) => /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_jsx_runtime52.Fragment, { children: [
4254
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "flex size-4 shrink-0 items-center justify-center", children: icon }),
4255
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: cn("min-w-0 flex-1 truncate", collapsed && "sr-only"), children: typeof children === "function" ? children(values) : content }),
4256
+ badge && !collapsed && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "text-muted-foreground text-xs", children: badge })
3643
4257
  ] })
3644
4258
  }
3645
4259
  );
3646
4260
  }
3647
4261
  function SidebarSeparator({ className, ...props }) {
3648
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
4262
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
3649
4263
  "hr",
3650
4264
  {
3651
4265
  "data-slot": "sidebar-separator",
@@ -3656,37 +4270,45 @@ function SidebarSeparator({ className, ...props }) {
3656
4270
  }
3657
4271
  function SidebarTrigger({ className, ...props }) {
3658
4272
  const { collapsed, toggle } = useSidebar();
3659
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
4273
+ const { onPress, ...buttonProps } = props;
4274
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
3660
4275
  Button,
3661
4276
  {
3662
4277
  "aria-label": collapsed ? "Expandir navegaci\xF3n" : "Colapsar navegaci\xF3n",
3663
- onPress: toggle,
4278
+ onPress: (event) => {
4279
+ onPress?.(event);
4280
+ toggle();
4281
+ },
3664
4282
  size: "icon",
3665
4283
  variant: "ghost",
3666
4284
  className: cn("ml-auto", className),
3667
- ...props,
3668
- children: collapsed ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react13.ChevronRight, {}) : /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react13.ChevronLeft, {})
4285
+ ...buttonProps,
4286
+ children: collapsed ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_lucide_react15.ChevronRight, {}) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_lucide_react15.ChevronLeft, {})
3669
4287
  }
3670
4288
  );
3671
4289
  }
3672
4290
  function SidebarRail({ className, ...props }) {
3673
4291
  const { toggle } = useSidebar();
3674
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
4292
+ const { onClick, ...buttonProps } = props;
4293
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
3675
4294
  "button",
3676
4295
  {
3677
4296
  type: "button",
3678
4297
  "aria-label": "Alternar navegaci\xF3n",
3679
- onClick: toggle,
4298
+ onClick: (event) => {
4299
+ onClick?.(event);
4300
+ if (!event.defaultPrevented) toggle();
4301
+ },
3680
4302
  className: cn(
3681
4303
  "absolute inset-y-0 right-0 z-20 hidden w-1 -translate-x-1/2 cursor-ew-resize bg-transparent transition-colors hover:bg-border lg:block",
3682
4304
  className
3683
4305
  ),
3684
- ...props
4306
+ ...buttonProps
3685
4307
  }
3686
4308
  );
3687
4309
  }
3688
4310
  function SidebarMore({ className, ...props }) {
3689
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
4311
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
3690
4312
  Button,
3691
4313
  {
3692
4314
  "aria-label": "M\xE1s opciones",
@@ -3694,15 +4316,15 @@ function SidebarMore({ className, ...props }) {
3694
4316
  variant: "ghost",
3695
4317
  className: cn("size-7", className),
3696
4318
  ...props,
3697
- children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react13.Ellipsis, {})
4319
+ children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_lucide_react15.Ellipsis, {})
3698
4320
  }
3699
4321
  );
3700
4322
  }
3701
4323
 
3702
4324
  // src/ui/skeleton/skeleton.tsx
3703
- var import_jsx_runtime44 = require("react/jsx-runtime");
4325
+ var import_jsx_runtime53 = require("react/jsx-runtime");
3704
4326
  function Skeleton({ className, ...props }) {
3705
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
4327
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
3706
4328
  "div",
3707
4329
  {
3708
4330
  "aria-hidden": "true",
@@ -3714,10 +4336,10 @@ function Skeleton({ className, ...props }) {
3714
4336
  }
3715
4337
 
3716
4338
  // src/ui/submit-button/submit-button.tsx
3717
- var import_lucide_react14 = require("lucide-react");
3718
- var import_react14 = require("react");
4339
+ var import_lucide_react16 = require("lucide-react");
4340
+ var import_react17 = require("react");
3719
4341
  var import_react_dom = require("react-dom");
3720
- var import_jsx_runtime45 = require("react/jsx-runtime");
4342
+ var import_jsx_runtime54 = require("react/jsx-runtime");
3721
4343
  function assignRef(ref, node) {
3722
4344
  if (typeof ref === "function") {
3723
4345
  ref(node);
@@ -3738,21 +4360,21 @@ function SubmitButton({
3738
4360
  const { pending } = (0, import_react_dom.useFormStatus)();
3739
4361
  const busy = pending || loading;
3740
4362
  const label = loadingLabel ?? pendingLabel ?? "Guardando\u2026";
3741
- const buttonRef = (0, import_react14.useRef)(null);
3742
- const setButtonRef = (0, import_react14.useCallback)(
4363
+ const buttonRef = (0, import_react17.useRef)(null);
4364
+ const setButtonRef = (0, import_react17.useCallback)(
3743
4365
  (node) => {
3744
4366
  buttonRef.current = node;
3745
4367
  assignRef(forwardedRef, node);
3746
4368
  },
3747
4369
  [forwardedRef]
3748
4370
  );
3749
- (0, import_react14.useLayoutEffect)(() => {
4371
+ (0, import_react17.useLayoutEffect)(() => {
3750
4372
  const button = buttonRef.current;
3751
4373
  if (!button) return;
3752
4374
  if (busy) button.setAttribute("aria-busy", "true");
3753
4375
  else button.removeAttribute("aria-busy");
3754
4376
  }, [busy]);
3755
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
4377
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
3756
4378
  Button,
3757
4379
  {
3758
4380
  ref: setButtonRef,
@@ -3761,8 +4383,8 @@ function SubmitButton({
3761
4383
  isDisabled: busy || isDisabled,
3762
4384
  "aria-busy": busy || void 0,
3763
4385
  ...props,
3764
- children: busy ? /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, { children: [
3765
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react14.LoaderCircle, { "aria-hidden": "true", className: "size-3.5 animate-spin" }),
4386
+ children: busy ? /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_jsx_runtime54.Fragment, { children: [
4387
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_lucide_react16.LoaderCircle, { "aria-hidden": "true", className: "size-3.5 motion-safe:animate-spin" }),
3766
4388
  label
3767
4389
  ] }) : children
3768
4390
  }
@@ -3770,9 +4392,9 @@ function SubmitButton({
3770
4392
  }
3771
4393
 
3772
4394
  // src/ui/switch/switch.tsx
3773
- var import_react15 = require("react");
4395
+ var import_react18 = require("react");
3774
4396
  var import_react_aria_components25 = require("react-aria-components");
3775
- var import_jsx_runtime46 = require("react/jsx-runtime");
4397
+ var import_jsx_runtime55 = require("react/jsx-runtime");
3776
4398
  var switchSizes = {
3777
4399
  sm: {
3778
4400
  control: "h-4 w-[1.875rem] p-0.5",
@@ -3812,9 +4434,9 @@ function Switch({
3812
4434
  ...props
3813
4435
  }) {
3814
4436
  const styles = switchSizes[size];
3815
- const fallbackInputRef = (0, import_react15.useRef)(null);
4437
+ const fallbackInputRef = (0, import_react18.useRef)(null);
3816
4438
  const resolvedInputRef = inputRef ?? fallbackInputRef;
3817
- (0, import_react15.useEffect)(() => {
4439
+ (0, import_react18.useEffect)(() => {
3818
4440
  const input = resolvedInputRef.current;
3819
4441
  if (!input) return;
3820
4442
  const handleDirectionalKey = (event) => {
@@ -3829,7 +4451,7 @@ function Switch({
3829
4451
  ownerDocument.addEventListener("keydown", handleDirectionalKey);
3830
4452
  return () => ownerDocument.removeEventListener("keydown", handleDirectionalKey);
3831
4453
  }, [isDisabled, isReadOnly, resolvedInputRef]);
3832
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
4454
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
3833
4455
  import_react_aria_components25.Switch,
3834
4456
  {
3835
4457
  "data-slot": "switch",
@@ -3846,8 +4468,8 @@ function Switch({
3846
4468
  children: (state) => {
3847
4469
  const isThumbPressed = state.isPressed;
3848
4470
  const thumbOffset = state.isSelected ? isThumbPressed ? styles.activeSelectedOffset : styles.selectedOffset : "0";
3849
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
3850
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
4471
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx_runtime55.Fragment, { children: [
4472
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
3851
4473
  "span",
3852
4474
  {
3853
4475
  "aria-hidden": "true",
@@ -3861,7 +4483,7 @@ function Switch({
3861
4483
  "group-data-focus-visible/switch:ring-3 group-data-focus-visible/switch:ring-ring/50",
3862
4484
  styles.control
3863
4485
  ),
3864
- children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
4486
+ children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
3865
4487
  "span",
3866
4488
  {
3867
4489
  "data-slot": "switch-thumb",
@@ -3881,9 +4503,9 @@ function Switch({
3881
4503
  )
3882
4504
  }
3883
4505
  ),
3884
- children || description ? /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("span", { className: "grid gap-0.5 leading-tight", children: [
3885
- children ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { "data-slot": "switch-label", className: "font-medium", children: typeof children === "function" ? children(state) : children }) : null,
3886
- description ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
4506
+ children || description ? /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("span", { className: "grid gap-0.5 leading-tight", children: [
4507
+ children ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { "data-slot": "switch-label", className: "font-medium", children: typeof children === "function" ? children(state) : children }) : null,
4508
+ description ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
3887
4509
  "span",
3888
4510
  {
3889
4511
  "data-slot": "switch-description",
@@ -3899,9 +4521,9 @@ function Switch({
3899
4521
  }
3900
4522
 
3901
4523
  // src/ui/table/table.tsx
3902
- var import_jsx_runtime47 = require("react/jsx-runtime");
4524
+ var import_jsx_runtime56 = require("react/jsx-runtime");
3903
4525
  function Table({ className, ...props }) {
3904
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { "data-slot": "table-container", className: "relative w-full overflow-x-auto", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
4526
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { "data-slot": "table-container", className: "relative w-full overflow-x-auto", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
3905
4527
  "table",
3906
4528
  {
3907
4529
  "data-slot": "table",
@@ -3911,10 +4533,10 @@ function Table({ className, ...props }) {
3911
4533
  ) });
3912
4534
  }
3913
4535
  function TableHeader({ className, ...props }) {
3914
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("thead", { "data-slot": "table-header", className: cn("[&_tr]:border-b", className), ...props });
4536
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("thead", { "data-slot": "table-header", className: cn("[&_tr]:border-b", className), ...props });
3915
4537
  }
3916
4538
  function TableBody({ className, ...props }) {
3917
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
4539
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
3918
4540
  "tbody",
3919
4541
  {
3920
4542
  "data-slot": "table-body",
@@ -3924,7 +4546,7 @@ function TableBody({ className, ...props }) {
3924
4546
  );
3925
4547
  }
3926
4548
  function TableRow({ className, ...props }) {
3927
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
4549
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
3928
4550
  "tr",
3929
4551
  {
3930
4552
  "data-slot": "table-row",
@@ -3937,7 +4559,7 @@ function TableRow({ className, ...props }) {
3937
4559
  );
3938
4560
  }
3939
4561
  function TableHead({ className, ...props }) {
3940
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
4562
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
3941
4563
  "th",
3942
4564
  {
3943
4565
  "data-slot": "table-head",
@@ -3950,7 +4572,7 @@ function TableHead({ className, ...props }) {
3950
4572
  );
3951
4573
  }
3952
4574
  function TableCell({ className, ...props }) {
3953
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
4575
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
3954
4576
  "td",
3955
4577
  {
3956
4578
  "data-slot": "table-cell",
@@ -3960,7 +4582,7 @@ function TableCell({ className, ...props }) {
3960
4582
  );
3961
4583
  }
3962
4584
  function TableCaption({ className, ...props }) {
3963
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
4585
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
3964
4586
  "caption",
3965
4587
  {
3966
4588
  "data-slot": "table-caption",
@@ -3970,7 +4592,7 @@ function TableCaption({ className, ...props }) {
3970
4592
  );
3971
4593
  }
3972
4594
  function TableFooter({ className, ...props }) {
3973
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
4595
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
3974
4596
  "tfoot",
3975
4597
  {
3976
4598
  "data-slot": "table-footer",
@@ -3982,12 +4604,50 @@ function TableFooter({ className, ...props }) {
3982
4604
  }
3983
4605
  );
3984
4606
  }
4607
+ function TableToolbar({ className, ...props }) {
4608
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
4609
+ "div",
4610
+ {
4611
+ "data-slot": "table-toolbar",
4612
+ className: cn("flex flex-wrap items-center justify-between gap-2 py-2", className),
4613
+ ...props
4614
+ }
4615
+ );
4616
+ }
4617
+ function TableEmpty({
4618
+ colSpan = 1,
4619
+ className,
4620
+ children = "No hay resultados."
4621
+ }) {
4622
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(TableRow, { "data-slot": "table-empty", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
4623
+ TableCell,
4624
+ {
4625
+ colSpan,
4626
+ className: cn("h-24 text-center text-muted-foreground", className),
4627
+ children
4628
+ }
4629
+ ) });
4630
+ }
4631
+ function TableLoading({
4632
+ colSpan = 1,
4633
+ className,
4634
+ children = "Cargando\u2026"
4635
+ }) {
4636
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(TableRow, { "data-slot": "table-loading", "aria-busy": "true", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
4637
+ TableCell,
4638
+ {
4639
+ colSpan,
4640
+ className: cn("h-24 text-center text-muted-foreground", className),
4641
+ children
4642
+ }
4643
+ ) });
4644
+ }
3985
4645
 
3986
4646
  // src/ui/tabs/tabs.tsx
3987
4647
  var import_react_aria_components26 = require("react-aria-components");
3988
- var import_jsx_runtime48 = require("react/jsx-runtime");
4648
+ var import_jsx_runtime57 = require("react/jsx-runtime");
3989
4649
  function Tabs({ className, ...props }) {
3990
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
4650
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
3991
4651
  import_react_aria_components26.Tabs,
3992
4652
  {
3993
4653
  "data-slot": "tabs",
@@ -3997,7 +4657,7 @@ function Tabs({ className, ...props }) {
3997
4657
  );
3998
4658
  }
3999
4659
  function TabsList({ className, ...props }) {
4000
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
4660
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
4001
4661
  import_react_aria_components26.TabList,
4002
4662
  {
4003
4663
  "data-slot": "tabs-list",
@@ -4013,7 +4673,7 @@ function TabsList({ className, ...props }) {
4013
4673
  );
4014
4674
  }
4015
4675
  function TabsTrigger({ className, ...props }) {
4016
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
4676
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
4017
4677
  import_react_aria_components26.Tab,
4018
4678
  {
4019
4679
  "data-slot": "tabs-trigger",
@@ -4029,10 +4689,10 @@ function TabsTrigger({ className, ...props }) {
4029
4689
  );
4030
4690
  }
4031
4691
  function TabsPanels({ className, ...props }) {
4032
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react_aria_components26.TabPanels, { "data-slot": "tabs-panels", className: cn("min-w-0", className), ...props });
4692
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_react_aria_components26.TabPanels, { "data-slot": "tabs-panels", className: cn("min-w-0", className), ...props });
4033
4693
  }
4034
4694
  function TabsContent({ className, ...props }) {
4035
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
4695
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
4036
4696
  import_react_aria_components26.TabPanel,
4037
4697
  {
4038
4698
  "data-slot": "tabs-content",
@@ -4046,7 +4706,7 @@ function TabsContent({ className, ...props }) {
4046
4706
  }
4047
4707
 
4048
4708
  // src/ui/toast/toast.tsx
4049
- var import_react16 = require("react");
4709
+ var import_react19 = require("react");
4050
4710
  var import_sileo2 = require("sileo");
4051
4711
 
4052
4712
  // src/ui/toast/toast-store.ts
@@ -4096,15 +4756,15 @@ function useToast() {
4096
4756
  }
4097
4757
 
4098
4758
  // src/ui/toast/toast.tsx
4099
- var import_jsx_runtime49 = require("react/jsx-runtime");
4759
+ var import_jsx_runtime58 = require("react/jsx-runtime");
4100
4760
  function ToastProvider({ children }) {
4101
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
4761
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_jsx_runtime58.Fragment, { children: [
4102
4762
  children,
4103
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Toaster, {})
4763
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Toaster, {})
4104
4764
  ] });
4105
4765
  }
4106
4766
  function Toaster({ position }) {
4107
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_sileo2.Toaster, { position, options: { fill: "var(--ui-secondary)" } });
4767
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_sileo2.Toaster, { position, options: { fill: "var(--ui-secondary)" } });
4108
4768
  }
4109
4769
  function ToastViewport({
4110
4770
  position,
@@ -4113,7 +4773,7 @@ function ToastViewport({
4113
4773
  }) {
4114
4774
  void className;
4115
4775
  if (visiblePosition && visiblePosition !== position) return null;
4116
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Toaster, { position });
4776
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Toaster, { position });
4117
4777
  }
4118
4778
  function Toast({
4119
4779
  id,
@@ -4126,7 +4786,7 @@ function Toast({
4126
4786
  position,
4127
4787
  onDismiss
4128
4788
  }) {
4129
- (0, import_react16.useEffect)(() => {
4789
+ (0, import_react19.useEffect)(() => {
4130
4790
  if (state !== "open") return;
4131
4791
  const toastId = toast({ title, description, variant, action, duration, position });
4132
4792
  return () => {
@@ -4138,9 +4798,9 @@ function Toast({
4138
4798
  }
4139
4799
 
4140
4800
  // src/ui/toolbar/toolbar.tsx
4141
- var import_jsx_runtime50 = require("react/jsx-runtime");
4801
+ var import_jsx_runtime59 = require("react/jsx-runtime");
4142
4802
  function Toolbar({ className, ...props }) {
4143
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
4803
+ return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
4144
4804
  "div",
4145
4805
  {
4146
4806
  role: "toolbar",
@@ -4151,7 +4811,7 @@ function Toolbar({ className, ...props }) {
4151
4811
  );
4152
4812
  }
4153
4813
  function ToolbarGroup({ className, ...props }) {
4154
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
4814
+ return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
4155
4815
  "div",
4156
4816
  {
4157
4817
  "data-slot": "toolbar-group",
@@ -4161,7 +4821,7 @@ function ToolbarGroup({ className, ...props }) {
4161
4821
  );
4162
4822
  }
4163
4823
  function ToolbarSpacer({ className, ...props }) {
4164
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { "aria-hidden": "true", className: cn("hidden flex-1 sm:block", className), ...props });
4824
+ return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { "aria-hidden": "true", className: cn("hidden flex-1 sm:block", className), ...props });
4165
4825
  }
4166
4826
  // Annotate the CommonJS export names for ESM import in node:
4167
4827
  0 && (module.exports = {
@@ -4169,6 +4829,7 @@ function ToolbarSpacer({ className, ...props }) {
4169
4829
  AccordionContent,
4170
4830
  AccordionItem,
4171
4831
  AccordionTrigger,
4832
+ ActiveFilters,
4172
4833
  Alert,
4173
4834
  AlertAction,
4174
4835
  AlertDescription,
@@ -4190,6 +4851,7 @@ function ToolbarSpacer({ className, ...props }) {
4190
4851
  AppShellMain,
4191
4852
  AppShellMobileHeader,
4192
4853
  AppShellSidebar,
4854
+ AsyncBoundary,
4193
4855
  AutocompleteCombobox,
4194
4856
  Avatar,
4195
4857
  AvatarBadge,
@@ -4231,7 +4893,20 @@ function ToolbarSpacer({ className, ...props }) {
4231
4893
  CommandItem,
4232
4894
  CommandList,
4233
4895
  ConfirmDialog,
4896
+ CopyButton,
4234
4897
  DangerZone,
4898
+ DataViewState,
4899
+ DataViewStateActions,
4900
+ DataViewStateDescription,
4901
+ DataViewStateTitle,
4902
+ DescriptionDetails,
4903
+ DescriptionItem,
4904
+ DescriptionList,
4905
+ DescriptionTerm,
4906
+ DetailDrawer,
4907
+ DetailDrawerBody,
4908
+ DetailDrawerFooter,
4909
+ DetailDrawerHeader,
4235
4910
  Dialog,
4236
4911
  DialogClose,
4237
4912
  DialogContent,
@@ -4269,6 +4944,12 @@ function ToolbarSpacer({ className, ...props }) {
4269
4944
  EmptyStateHeader,
4270
4945
  EmptyStateMedia,
4271
4946
  EmptyStateTitle,
4947
+ ErrorBoundary,
4948
+ ErrorState,
4949
+ ErrorStateActions,
4950
+ ErrorStateDescription,
4951
+ ErrorStateIcon,
4952
+ ErrorStateTitle,
4272
4953
  Field,
4273
4954
  FieldContent,
4274
4955
  FieldDescription,
@@ -4279,6 +4960,9 @@ function ToolbarSpacer({ className, ...props }) {
4279
4960
  FieldSeparator,
4280
4961
  FieldSet,
4281
4962
  FieldTitle,
4963
+ FilterBar,
4964
+ FilterChip,
4965
+ FilterGroup,
4282
4966
  FormFeedback,
4283
4967
  FormRow,
4284
4968
  HighlightMatch,
@@ -4306,6 +4990,7 @@ function ToolbarSpacer({ className, ...props }) {
4306
4990
  MenuItem,
4307
4991
  MenuTrigger,
4308
4992
  MetricCard,
4993
+ MetricGrid,
4309
4994
  OtpInput,
4310
4995
  PageHeader,
4311
4996
  PageHeaderActions,
@@ -4317,12 +5002,18 @@ function ToolbarSpacer({ className, ...props }) {
4317
5002
  PopoverContent,
4318
5003
  PopoverTrigger,
4319
5004
  QuantityInput,
5005
+ SectionHeader,
5006
+ SectionHeaderActions,
5007
+ SectionHeaderDescription,
5008
+ SectionHeaderHeading,
5009
+ SectionHeaderTitle,
4320
5010
  Select,
4321
5011
  SelectContent,
4322
5012
  SelectItem,
4323
5013
  SelectList,
4324
5014
  SelectTrigger,
4325
5015
  SelectValue,
5016
+ SelectionToolbar,
4326
5017
  Separator,
4327
5018
  Sheet,
4328
5019
  SheetClose,
@@ -4352,10 +5043,13 @@ function ToolbarSpacer({ className, ...props }) {
4352
5043
  TableBody,
4353
5044
  TableCaption,
4354
5045
  TableCell,
5046
+ TableEmpty,
4355
5047
  TableFooter,
4356
5048
  TableHead,
4357
5049
  TableHeader,
5050
+ TableLoading,
4358
5051
  TableRow,
5052
+ TableToolbar,
4359
5053
  Tabs,
4360
5054
  TabsContent,
4361
5055
  TabsList,
@@ -4383,8 +5077,16 @@ function ToolbarSpacer({ className, ...props }) {
4383
5077
  formSnapshot,
4384
5078
  getTextMatchParts,
4385
5079
  inputGroupAddonVariants,
5080
+ readSearchParam,
5081
+ readSearchParamArray,
5082
+ readSearchParamEnum,
5083
+ readSearchParamInt,
5084
+ toSearchParams,
4386
5085
  toast,
5086
+ updateSearchParams,
5087
+ useAsyncAction,
4387
5088
  useAutosave,
5089
+ useClipboard,
4388
5090
  useDebouncedValue,
4389
5091
  useFormDirty,
4390
5092
  useFormFeedback,