@doscientos/ui 0.1.31 → 0.1.32
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/README.md +30 -0
- package/dist/index.cjs +1385 -698
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +209 -55
- package/dist/index.d.ts +209 -55
- package/dist/index.js +1290 -645
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
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-
|
|
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,
|
|
272
|
-
const [error, setError] = (0,
|
|
273
|
-
const lastSaved = (0,
|
|
274
|
-
const saveRef = (0,
|
|
275
|
-
const serializeRef = (0,
|
|
276
|
-
(0,
|
|
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,
|
|
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,
|
|
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
|
|
427
|
+
var import_react4 = require("react");
|
|
308
428
|
function useDebouncedValue(value, delay = 250) {
|
|
309
|
-
const [debouncedValue, setDebouncedValue] = (0,
|
|
310
|
-
(0,
|
|
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
|
|
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,
|
|
329
|
-
const baseline = (0,
|
|
330
|
-
const [isDirty, setIsDirty] = (0,
|
|
331
|
-
const recompute = (0,
|
|
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,
|
|
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,
|
|
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
|
|
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,
|
|
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
|
|
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,
|
|
1233
|
+
var AvatarContext = (0, import_react7.createContext)(null);
|
|
1068
1234
|
function Avatar({ className, size = "default", children, ...props }) {
|
|
1069
|
-
const [status, setStatus] = (0,
|
|
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,
|
|
1093
|
-
const [failed, setFailed] = (0,
|
|
1094
|
-
(0,
|
|
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,
|
|
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.
|
|
1647
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
1482
1648
|
"span",
|
|
1483
1649
|
{
|
|
1484
1650
|
"aria-hidden": "true",
|
|
1485
|
-
className:
|
|
1486
|
-
|
|
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
|
|
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
|
-
|
|
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)(
|
|
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
|
|
1860
|
+
onKeyDown,
|
|
1665
1861
|
...props
|
|
1666
1862
|
}) {
|
|
1667
|
-
const [internalInputValue, setInternalInputValue] = (0,
|
|
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,
|
|
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,
|
|
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
|
-
|
|
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
|
|
@@ -1798,259 +1997,600 @@ function CommandItem({ className, ...props }) {
|
|
|
1798
1997
|
);
|
|
1799
1998
|
}
|
|
1800
1999
|
|
|
1801
|
-
// src/ui/
|
|
1802
|
-
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1803
|
-
function ConfirmDialog({
|
|
1804
|
-
open,
|
|
1805
|
-
onOpenChange,
|
|
1806
|
-
title,
|
|
1807
|
-
description,
|
|
1808
|
-
confirmLabel = "Confirmar",
|
|
1809
|
-
cancelLabel = "Cancelar",
|
|
1810
|
-
destructive = false,
|
|
1811
|
-
pending = false,
|
|
1812
|
-
onConfirm
|
|
1813
|
-
}) {
|
|
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
|
-
] }) });
|
|
1832
|
-
}
|
|
1833
|
-
|
|
1834
|
-
// src/ui/danger-zone/danger-zone.tsx
|
|
2000
|
+
// src/ui/sheet/sheet.tsx
|
|
1835
2001
|
var import_lucide_react4 = require("lucide-react");
|
|
1836
2002
|
var import_react_aria_components11 = require("react-aria-components");
|
|
1837
|
-
var
|
|
1838
|
-
function
|
|
1839
|
-
|
|
1840
|
-
description = "Acciones irreversibles. \xC1brela solo si est\xE1s seguro.",
|
|
1841
|
-
defaultOpen = false,
|
|
1842
|
-
className,
|
|
1843
|
-
children
|
|
1844
|
-
}) {
|
|
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)(
|
|
1847
|
-
import_react_aria_components11.Button,
|
|
1848
|
-
{
|
|
1849
|
-
slot: "trigger",
|
|
1850
|
-
"data-slot": "danger-zone-trigger",
|
|
1851
|
-
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
|
-
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 })
|
|
1857
|
-
] }),
|
|
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" })
|
|
1859
|
-
]
|
|
1860
|
-
}
|
|
1861
|
-
) }),
|
|
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 }) })
|
|
1863
|
-
] }) });
|
|
2003
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
2004
|
+
function DrawerTrigger({ ...props }) {
|
|
2005
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_aria_components11.DialogTrigger, { "data-slot": "drawer-trigger", ...props });
|
|
1864
2006
|
}
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
className: "w-full rounded-sm border-0",
|
|
1878
|
-
style: { height: "75vh", minHeight: 400 }
|
|
1879
|
-
}
|
|
1880
|
-
);
|
|
1881
|
-
}
|
|
1882
|
-
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" }) });
|
|
1884
|
-
}
|
|
1885
|
-
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Fallback, { mimeType, reason: "unsupported" });
|
|
2007
|
+
function DrawerClose({ className, variant = "outline", size = "default", ...props }) {
|
|
2008
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2009
|
+
Button,
|
|
2010
|
+
{
|
|
2011
|
+
slot: "close",
|
|
2012
|
+
"data-slot": "drawer-close",
|
|
2013
|
+
variant,
|
|
2014
|
+
size,
|
|
2015
|
+
className: cn(className),
|
|
2016
|
+
...props
|
|
2017
|
+
}
|
|
2018
|
+
);
|
|
1886
2019
|
}
|
|
1887
|
-
function
|
|
1888
|
-
|
|
1889
|
-
|
|
2020
|
+
function DrawerOverlay({
|
|
2021
|
+
className,
|
|
2022
|
+
children,
|
|
2023
|
+
...props
|
|
1890
2024
|
}) {
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
var React5 = require("react");
|
|
1905
|
-
var import_react_aria_components12 = require("react-aria-components");
|
|
1906
|
-
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1907
|
-
function DropdownMenuTrigger({ ...props }) {
|
|
1908
|
-
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_aria_components12.MenuTrigger, { "data-slot": "dropdown-menu-trigger", ...props });
|
|
2025
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2026
|
+
import_react_aria_components11.ModalOverlay,
|
|
2027
|
+
{
|
|
2028
|
+
"data-slot": "drawer-overlay",
|
|
2029
|
+
isDismissable: true,
|
|
2030
|
+
className: cn(
|
|
2031
|
+
"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",
|
|
2032
|
+
className
|
|
2033
|
+
),
|
|
2034
|
+
...props,
|
|
2035
|
+
children
|
|
2036
|
+
}
|
|
2037
|
+
);
|
|
1909
2038
|
}
|
|
1910
|
-
function
|
|
1911
|
-
"data-slot": dataSlot = "dropdown-menu-content",
|
|
1912
|
-
placement = "bottom start",
|
|
1913
|
-
offset = 4,
|
|
1914
|
-
crossOffset = 0,
|
|
2039
|
+
function DrawerContent({
|
|
1915
2040
|
className,
|
|
1916
2041
|
children,
|
|
2042
|
+
dialogProps,
|
|
2043
|
+
side = "right",
|
|
2044
|
+
showCloseButton = true,
|
|
1917
2045
|
...props
|
|
1918
2046
|
}) {
|
|
1919
|
-
return /* @__PURE__ */ (0,
|
|
1920
|
-
|
|
2047
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DrawerOverlay, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2048
|
+
import_react_aria_components11.Modal,
|
|
1921
2049
|
{
|
|
1922
|
-
"data-slot":
|
|
1923
|
-
|
|
1924
|
-
offset,
|
|
1925
|
-
crossOffset,
|
|
2050
|
+
"data-slot": "drawer-content",
|
|
2051
|
+
"data-side": side,
|
|
1926
2052
|
className: cn(
|
|
1927
|
-
"z-50
|
|
2053
|
+
"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",
|
|
1928
2054
|
className
|
|
1929
2055
|
),
|
|
1930
|
-
children: /* @__PURE__ */ (0,
|
|
1931
|
-
|
|
2056
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
2057
|
+
import_react_aria_components11.Dialog,
|
|
1932
2058
|
{
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
2059
|
+
"data-slot": "drawer",
|
|
2060
|
+
className: "[display:inherit] h-full max-h-[inherit] [flex-direction:inherit] gap-[inherit] outline-none",
|
|
2061
|
+
...dialogProps,
|
|
2062
|
+
children: [
|
|
2063
|
+
children,
|
|
2064
|
+
showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(DrawerClose, { variant: "ghost", className: "absolute top-3 right-3", size: "icon-sm", children: [
|
|
2065
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react4.XIcon, {}),
|
|
2066
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "sr-only", children: "Cerrar" })
|
|
2067
|
+
] })
|
|
2068
|
+
]
|
|
1936
2069
|
}
|
|
1937
2070
|
)
|
|
1938
2071
|
}
|
|
1939
|
-
);
|
|
2072
|
+
) });
|
|
1940
2073
|
}
|
|
1941
|
-
function
|
|
1942
|
-
if (!("trigger" in props)) return /* @__PURE__ */ (0,
|
|
2074
|
+
function Drawer(props) {
|
|
2075
|
+
if (!("trigger" in props)) return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DrawerContent, { ...props });
|
|
1943
2076
|
const { children, trigger, triggerProps, defaultOpen, isOpen, onOpenChange, ...contentProps } = props;
|
|
1944
|
-
const triggerElement = typeof trigger === "string" ? /* @__PURE__ */ (0,
|
|
1945
|
-
return /* @__PURE__ */ (0,
|
|
2077
|
+
const triggerElement = typeof trigger === "string" ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Button, { ...triggerProps, children: trigger }) : trigger;
|
|
2078
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(DrawerTrigger, { defaultOpen, isOpen, onOpenChange, children: [
|
|
1946
2079
|
triggerElement,
|
|
1947
|
-
/* @__PURE__ */ (0,
|
|
2080
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DrawerContent, { ...contentProps, children })
|
|
1948
2081
|
] });
|
|
1949
2082
|
}
|
|
1950
|
-
function
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_aria_components12.MenuSection, { "data-slot": "dropdown-menu-group", ...props });
|
|
1954
|
-
}
|
|
1955
|
-
function DropdownMenuLabel({
|
|
1956
|
-
className,
|
|
1957
|
-
inset,
|
|
1958
|
-
...props
|
|
1959
|
-
}) {
|
|
1960
|
-
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1961
|
-
import_react_aria_components12.Header,
|
|
2083
|
+
function DrawerHeader({ className, ...props }) {
|
|
2084
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2085
|
+
"div",
|
|
1962
2086
|
{
|
|
1963
|
-
"data-slot": "
|
|
1964
|
-
"
|
|
1965
|
-
className: cn(
|
|
1966
|
-
"px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7",
|
|
1967
|
-
className
|
|
1968
|
-
),
|
|
2087
|
+
"data-slot": "drawer-header",
|
|
2088
|
+
className: cn("flex flex-col gap-0.5 p-4", className),
|
|
1969
2089
|
...props
|
|
1970
2090
|
}
|
|
1971
2091
|
);
|
|
1972
2092
|
}
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
variants: {
|
|
1977
|
-
selectionMode: {
|
|
1978
|
-
none: "gap-1.5 rounded-md px-1.5 py-1 text-sm focus:bg-muted focus:text-foreground not-data-[variant=destructive]:focus:**:text-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",
|
|
1979
|
-
single: "gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm focus:bg-muted focus:text-foreground focus:**:text-foreground data-inset:pl-7 [&_svg:not([class*='size-'])]:size-4",
|
|
1980
|
-
multiple: "gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm focus:bg-muted focus:text-foreground focus:**:text-foreground data-inset:pl-7 [&_svg:not([class*='size-'])]:size-4"
|
|
1981
|
-
}
|
|
1982
|
-
}
|
|
1983
|
-
}
|
|
1984
|
-
);
|
|
1985
|
-
function DropdownMenuItem({
|
|
1986
|
-
className,
|
|
1987
|
-
inset,
|
|
1988
|
-
variant = "default",
|
|
1989
|
-
children,
|
|
1990
|
-
...props
|
|
1991
|
-
}) {
|
|
1992
|
-
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1993
|
-
import_react_aria_components12.MenuItem,
|
|
2093
|
+
function DrawerFooter({ className, ...props }) {
|
|
2094
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2095
|
+
"div",
|
|
1994
2096
|
{
|
|
1995
|
-
"data-slot": "
|
|
1996
|
-
"
|
|
1997
|
-
|
|
1998
|
-
textValue: typeof children === "string" ? children : props.textValue,
|
|
1999
|
-
className: (0, import_react_aria_components12.composeRenderProps)(
|
|
2000
|
-
className,
|
|
2001
|
-
(className2, { selectionMode }) => cn(dropdownMenuItemVariants({ selectionMode }), className2)
|
|
2002
|
-
),
|
|
2003
|
-
...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)(
|
|
2006
|
-
"span",
|
|
2007
|
-
{
|
|
2008
|
-
className: "pointer-events-none absolute right-2 flex items-center justify-center",
|
|
2009
|
-
"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
|
|
2011
|
-
}
|
|
2012
|
-
) : null,
|
|
2013
|
-
children2
|
|
2014
|
-
] }))
|
|
2097
|
+
"data-slot": "drawer-footer",
|
|
2098
|
+
className: cn("mt-auto flex flex-col gap-2 p-4", className),
|
|
2099
|
+
...props
|
|
2015
2100
|
}
|
|
2016
2101
|
);
|
|
2017
2102
|
}
|
|
2018
|
-
function
|
|
2019
|
-
return /* @__PURE__ */ (0,
|
|
2020
|
-
|
|
2021
|
-
function DropdownMenuSubTrigger({
|
|
2022
|
-
className,
|
|
2023
|
-
inset,
|
|
2024
|
-
children,
|
|
2025
|
-
...props
|
|
2026
|
-
}) {
|
|
2027
|
-
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2028
|
-
import_react_aria_components12.MenuItem,
|
|
2103
|
+
function DrawerTitle({ className, ...props }) {
|
|
2104
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2105
|
+
import_react_aria_components11.Heading,
|
|
2029
2106
|
{
|
|
2030
|
-
|
|
2031
|
-
"data-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
"flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-muted focus:text-foreground focus:**:text-foreground data-inset:pl-7 data-open:bg-muted data-open:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
2035
|
-
className
|
|
2036
|
-
),
|
|
2037
|
-
...props,
|
|
2038
|
-
children: (0, import_react_aria_components12.composeRenderProps)(children, (children2) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
|
|
2039
|
-
children2,
|
|
2040
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react6.ChevronRightIcon, { className: "cn-rtl-flip ml-auto" })
|
|
2041
|
-
] }))
|
|
2107
|
+
slot: "title",
|
|
2108
|
+
"data-slot": "drawer-title",
|
|
2109
|
+
className: cn("text-base font-medium text-foreground", className),
|
|
2110
|
+
...props
|
|
2042
2111
|
}
|
|
2043
2112
|
);
|
|
2044
2113
|
}
|
|
2045
|
-
function
|
|
2046
|
-
placement = "end top",
|
|
2047
|
-
crossOffset = -3,
|
|
2048
|
-
offset = 0,
|
|
2114
|
+
function DrawerDescription({
|
|
2049
2115
|
className,
|
|
2050
2116
|
...props
|
|
2051
2117
|
}) {
|
|
2052
|
-
return /* @__PURE__ */ (0,
|
|
2053
|
-
|
|
2118
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2119
|
+
import_react_aria_components11.Text,
|
|
2120
|
+
{
|
|
2121
|
+
slot: "description",
|
|
2122
|
+
"data-slot": "drawer-description",
|
|
2123
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
2124
|
+
...props
|
|
2125
|
+
}
|
|
2126
|
+
);
|
|
2127
|
+
}
|
|
2128
|
+
var Sheet = DrawerContent;
|
|
2129
|
+
var SheetClose = DrawerClose;
|
|
2130
|
+
var SheetContent = DrawerContent;
|
|
2131
|
+
var SheetDescription = DrawerDescription;
|
|
2132
|
+
var SheetFooter = DrawerFooter;
|
|
2133
|
+
var SheetHeader = DrawerHeader;
|
|
2134
|
+
var SheetTitle = DrawerTitle;
|
|
2135
|
+
var SheetTrigger = DrawerTrigger;
|
|
2136
|
+
|
|
2137
|
+
// src/ui/composition/composition.tsx
|
|
2138
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
2139
|
+
function FilterBar({ className, ...props }) {
|
|
2140
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2141
|
+
"div",
|
|
2142
|
+
{
|
|
2143
|
+
"data-slot": "filter-bar",
|
|
2144
|
+
className: cn("flex flex-wrap items-center gap-2", className),
|
|
2145
|
+
...props
|
|
2146
|
+
}
|
|
2147
|
+
);
|
|
2148
|
+
}
|
|
2149
|
+
function FilterGroup({ className, ...props }) {
|
|
2150
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2151
|
+
"div",
|
|
2152
|
+
{
|
|
2153
|
+
"data-slot": "filter-group",
|
|
2154
|
+
className: cn("flex flex-wrap items-center gap-2", className),
|
|
2155
|
+
...props
|
|
2156
|
+
}
|
|
2157
|
+
);
|
|
2158
|
+
}
|
|
2159
|
+
function ActiveFilters({ className, ...props }) {
|
|
2160
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2161
|
+
"div",
|
|
2162
|
+
{
|
|
2163
|
+
"data-slot": "active-filters",
|
|
2164
|
+
"aria-label": "Filtros activos",
|
|
2165
|
+
className: cn("flex flex-wrap items-center gap-1.5", className),
|
|
2166
|
+
...props
|
|
2167
|
+
}
|
|
2168
|
+
);
|
|
2169
|
+
}
|
|
2170
|
+
function FilterChip({
|
|
2171
|
+
children,
|
|
2172
|
+
onRemove,
|
|
2173
|
+
...props
|
|
2174
|
+
}) {
|
|
2175
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Button, { size: "sm", variant: "outline", onPress: onRemove, ...props, children: [
|
|
2176
|
+
children,
|
|
2177
|
+
" \xD7"
|
|
2178
|
+
] });
|
|
2179
|
+
}
|
|
2180
|
+
function SelectionToolbar({
|
|
2181
|
+
count,
|
|
2182
|
+
className,
|
|
2183
|
+
children,
|
|
2184
|
+
...props
|
|
2185
|
+
}) {
|
|
2186
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
2187
|
+
"div",
|
|
2188
|
+
{
|
|
2189
|
+
"data-slot": "selection-toolbar",
|
|
2190
|
+
className: cn(
|
|
2191
|
+
"flex flex-wrap items-center justify-between gap-2 rounded-lg border bg-muted/40 p-2",
|
|
2192
|
+
className
|
|
2193
|
+
),
|
|
2194
|
+
...props,
|
|
2195
|
+
children: [
|
|
2196
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("output", { "aria-live": "polite", className: "text-sm font-medium", children: [
|
|
2197
|
+
count,
|
|
2198
|
+
" seleccionados"
|
|
2199
|
+
] }),
|
|
2200
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "flex items-center gap-2", children })
|
|
2201
|
+
]
|
|
2202
|
+
}
|
|
2203
|
+
);
|
|
2204
|
+
}
|
|
2205
|
+
function DescriptionList({ className, ...props }) {
|
|
2206
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2207
|
+
"dl",
|
|
2208
|
+
{
|
|
2209
|
+
"data-slot": "description-list",
|
|
2210
|
+
className: cn("grid gap-x-6 gap-y-4 sm:grid-cols-2", className),
|
|
2211
|
+
...props
|
|
2212
|
+
}
|
|
2213
|
+
);
|
|
2214
|
+
}
|
|
2215
|
+
function DescriptionItem({ className, ...props }) {
|
|
2216
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { "data-slot": "description-item", className: cn("min-w-0", className), ...props });
|
|
2217
|
+
}
|
|
2218
|
+
function DescriptionTerm({ className, ...props }) {
|
|
2219
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2220
|
+
"dt",
|
|
2221
|
+
{
|
|
2222
|
+
"data-slot": "description-term",
|
|
2223
|
+
className: cn("text-xs font-medium text-muted-foreground", className),
|
|
2224
|
+
...props
|
|
2225
|
+
}
|
|
2226
|
+
);
|
|
2227
|
+
}
|
|
2228
|
+
function DescriptionDetails({ className, ...props }) {
|
|
2229
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2230
|
+
"dd",
|
|
2231
|
+
{
|
|
2232
|
+
"data-slot": "description-details",
|
|
2233
|
+
className: cn("mt-1 wrap-break-word text-sm", className),
|
|
2234
|
+
...props
|
|
2235
|
+
}
|
|
2236
|
+
);
|
|
2237
|
+
}
|
|
2238
|
+
function DataViewState({ className, ...props }) {
|
|
2239
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2240
|
+
"section",
|
|
2241
|
+
{
|
|
2242
|
+
"data-slot": "data-view-state",
|
|
2243
|
+
className: cn(
|
|
2244
|
+
"flex min-h-40 flex-col items-center justify-center gap-3 rounded-xl border p-6 text-center",
|
|
2245
|
+
className
|
|
2246
|
+
),
|
|
2247
|
+
...props
|
|
2248
|
+
}
|
|
2249
|
+
);
|
|
2250
|
+
}
|
|
2251
|
+
function DataViewStateTitle({ children, className, ...props }) {
|
|
2252
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h2", { "data-slot": "data-view-state-title", className: cn("font-semibold", className), ...props, children });
|
|
2253
|
+
}
|
|
2254
|
+
function DataViewStateDescription({ className, ...props }) {
|
|
2255
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2256
|
+
"p",
|
|
2257
|
+
{
|
|
2258
|
+
"data-slot": "data-view-state-description",
|
|
2259
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
2260
|
+
...props
|
|
2261
|
+
}
|
|
2262
|
+
);
|
|
2263
|
+
}
|
|
2264
|
+
function DataViewStateActions({ className, ...props }) {
|
|
2265
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2266
|
+
"div",
|
|
2267
|
+
{
|
|
2268
|
+
"data-slot": "data-view-state-actions",
|
|
2269
|
+
className: cn("flex items-center gap-2", className),
|
|
2270
|
+
...props
|
|
2271
|
+
}
|
|
2272
|
+
);
|
|
2273
|
+
}
|
|
2274
|
+
function MetricGrid({ className, ...props }) {
|
|
2275
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2276
|
+
"div",
|
|
2277
|
+
{
|
|
2278
|
+
"data-slot": "metric-grid",
|
|
2279
|
+
className: cn("grid gap-4 sm:grid-cols-2 xl:grid-cols-4", className),
|
|
2280
|
+
...props
|
|
2281
|
+
}
|
|
2282
|
+
);
|
|
2283
|
+
}
|
|
2284
|
+
function DetailDrawer({ children, ...props }) {
|
|
2285
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(DrawerContent, { ...props, children });
|
|
2286
|
+
}
|
|
2287
|
+
function DetailDrawerBody({ className, ...props }) {
|
|
2288
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2289
|
+
"div",
|
|
2290
|
+
{
|
|
2291
|
+
"data-slot": "detail-drawer-body",
|
|
2292
|
+
className: cn("min-h-0 flex-1 overflow-y-auto px-4", className),
|
|
2293
|
+
...props
|
|
2294
|
+
}
|
|
2295
|
+
);
|
|
2296
|
+
}
|
|
2297
|
+
|
|
2298
|
+
// src/ui/confirm-dialog/confirm-dialog.tsx
|
|
2299
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
2300
|
+
function ConfirmDialog({
|
|
2301
|
+
open,
|
|
2302
|
+
onOpenChange,
|
|
2303
|
+
title,
|
|
2304
|
+
description,
|
|
2305
|
+
confirmLabel = "Confirmar",
|
|
2306
|
+
cancelLabel = "Cancelar",
|
|
2307
|
+
destructive = false,
|
|
2308
|
+
pending = false,
|
|
2309
|
+
onConfirm
|
|
2310
|
+
}) {
|
|
2311
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
2312
|
+
AlertDialog,
|
|
2313
|
+
{
|
|
2314
|
+
open,
|
|
2315
|
+
onOpenChange: (nextOpen) => {
|
|
2316
|
+
if (!pending || nextOpen) onOpenChange(nextOpen);
|
|
2317
|
+
},
|
|
2318
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(AlertDialogContent, { children: [
|
|
2319
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(AlertDialogHeader, { children: [
|
|
2320
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(AlertDialogTitle, { children: title }),
|
|
2321
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(AlertDialogDescription, { children: description }) : null
|
|
2322
|
+
] }),
|
|
2323
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(AlertDialogFooter, { children: [
|
|
2324
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Button, { variant: "outline", isDisabled: pending, onPress: () => onOpenChange(false), children: cancelLabel }),
|
|
2325
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
2326
|
+
Button,
|
|
2327
|
+
{
|
|
2328
|
+
variant: destructive ? "destructive" : "default",
|
|
2329
|
+
isDisabled: pending,
|
|
2330
|
+
onPress: onConfirm,
|
|
2331
|
+
children: confirmLabel
|
|
2332
|
+
}
|
|
2333
|
+
)
|
|
2334
|
+
] })
|
|
2335
|
+
] })
|
|
2336
|
+
}
|
|
2337
|
+
);
|
|
2338
|
+
}
|
|
2339
|
+
|
|
2340
|
+
// src/ui/copy-button/copy-button.tsx
|
|
2341
|
+
var import_lucide_react5 = require("lucide-react");
|
|
2342
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
2343
|
+
function CopyButton({
|
|
2344
|
+
value,
|
|
2345
|
+
children,
|
|
2346
|
+
copiedLabel = "Copiado",
|
|
2347
|
+
resetMs,
|
|
2348
|
+
onCopied,
|
|
2349
|
+
onCopyError,
|
|
2350
|
+
...props
|
|
2351
|
+
}) {
|
|
2352
|
+
const { copy, status } = useClipboard({ resetMs, onError: onCopyError });
|
|
2353
|
+
const copied = status === "copied";
|
|
2354
|
+
const label = copied ? copiedLabel : children ?? "Copiar";
|
|
2355
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
2356
|
+
Button,
|
|
2357
|
+
{
|
|
2358
|
+
"aria-label": typeof label === "string" ? label : void 0,
|
|
2359
|
+
onPress: () => {
|
|
2360
|
+
void copy(value).then((wasCopied) => {
|
|
2361
|
+
if (wasCopied) onCopied?.(value);
|
|
2362
|
+
});
|
|
2363
|
+
},
|
|
2364
|
+
...props,
|
|
2365
|
+
children: [
|
|
2366
|
+
copied ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react5.Check, { "aria-hidden": "true", className: "size-3.5" }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react5.Copy, { "aria-hidden": "true", className: "size-3.5" }),
|
|
2367
|
+
label
|
|
2368
|
+
]
|
|
2369
|
+
}
|
|
2370
|
+
);
|
|
2371
|
+
}
|
|
2372
|
+
|
|
2373
|
+
// src/ui/danger-zone/danger-zone.tsx
|
|
2374
|
+
var import_lucide_react6 = require("lucide-react");
|
|
2375
|
+
var import_react_aria_components12 = require("react-aria-components");
|
|
2376
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
2377
|
+
function DangerZone({
|
|
2378
|
+
title = "Zona de peligro",
|
|
2379
|
+
description = "Acciones irreversibles. \xC1brela solo si est\xE1s seguro.",
|
|
2380
|
+
defaultOpen = false,
|
|
2381
|
+
className,
|
|
2382
|
+
children
|
|
2383
|
+
}) {
|
|
2384
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_aria_components12.Disclosure, { defaultExpanded: defaultOpen, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Card, { className: cn("border-destructive/30", className), children: [
|
|
2385
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_aria_components12.Heading, { className: "flex", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
2386
|
+
import_react_aria_components12.Button,
|
|
2387
|
+
{
|
|
2388
|
+
slot: "trigger",
|
|
2389
|
+
"data-slot": "danger-zone-trigger",
|
|
2390
|
+
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",
|
|
2391
|
+
children: [
|
|
2392
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react6.ShieldAlert, { className: "text-destructive size-4 shrink-0" }),
|
|
2393
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("span", { className: "flex flex-1 flex-col gap-0.5", children: [
|
|
2394
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "font-heading text-destructive text-base leading-snug font-medium", children: title }),
|
|
2395
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "text-muted-foreground text-xs", children: description })
|
|
2396
|
+
] }),
|
|
2397
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react6.ChevronDown, { className: "text-muted-foreground size-4 shrink-0 transition-transform group-aria-expanded/danger:rotate-180" })
|
|
2398
|
+
]
|
|
2399
|
+
}
|
|
2400
|
+
) }),
|
|
2401
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_aria_components12.DisclosurePanel, { "data-slot": "danger-zone-content", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(CardContent, { children }) })
|
|
2402
|
+
] }) });
|
|
2403
|
+
}
|
|
2404
|
+
|
|
2405
|
+
// src/ui/doc-preview/doc-preview.tsx
|
|
2406
|
+
var import_lucide_react7 = require("lucide-react");
|
|
2407
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
2408
|
+
function DocPreview({ url, mimeType, name }) {
|
|
2409
|
+
if (!url) return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Fallback, { mimeType, reason: "no-url" });
|
|
2410
|
+
if (mimeType === "application/pdf" || mimeType === "text/plain" || mimeType === "text/csv") {
|
|
2411
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2412
|
+
"iframe",
|
|
2413
|
+
{
|
|
2414
|
+
src: url,
|
|
2415
|
+
title: name,
|
|
2416
|
+
className: "w-full rounded-sm border-0",
|
|
2417
|
+
style: { height: "75vh", minHeight: 400 }
|
|
2418
|
+
}
|
|
2419
|
+
);
|
|
2420
|
+
}
|
|
2421
|
+
if (mimeType?.startsWith("image/")) {
|
|
2422
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "bg-muted/30 flex justify-center rounded-sm p-6", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("img", { src: url, alt: name, className: "max-h-[75vh] max-w-full rounded object-contain" }) });
|
|
2423
|
+
}
|
|
2424
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Fallback, { mimeType, reason: "unsupported" });
|
|
2425
|
+
}
|
|
2426
|
+
function Fallback({
|
|
2427
|
+
mimeType,
|
|
2428
|
+
reason
|
|
2429
|
+
}) {
|
|
2430
|
+
const Icon = mimeType?.startsWith("image/") ? import_lucide_react7.Image : import_lucide_react7.FileText;
|
|
2431
|
+
const message = reason === "no-url" ? "No se pudo generar la URL de preview." : "Preview no disponible para este tipo de archivo.";
|
|
2432
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "text-muted-foreground flex flex-col items-center justify-center gap-2 py-14", children: [
|
|
2433
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Icon, { className: "size-9 opacity-30" }),
|
|
2434
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "text-sm", children: message }),
|
|
2435
|
+
mimeType ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "font-mono text-xs opacity-50", children: mimeType }) : null,
|
|
2436
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "text-xs opacity-50", children: "Usa el bot\xF3n Descargar para abrir el archivo." })
|
|
2437
|
+
] });
|
|
2438
|
+
}
|
|
2439
|
+
|
|
2440
|
+
// src/ui/dropdown-menu/dropdown-menu.tsx
|
|
2441
|
+
var import_class_variance_authority6 = require("class-variance-authority");
|
|
2442
|
+
var import_lucide_react8 = require("lucide-react");
|
|
2443
|
+
var React5 = require("react");
|
|
2444
|
+
var import_react_aria_components13 = require("react-aria-components");
|
|
2445
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
2446
|
+
function DropdownMenuTrigger({ ...props }) {
|
|
2447
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react_aria_components13.MenuTrigger, { "data-slot": "dropdown-menu-trigger", ...props });
|
|
2448
|
+
}
|
|
2449
|
+
function DropdownMenuContent({
|
|
2450
|
+
"data-slot": dataSlot = "dropdown-menu-content",
|
|
2451
|
+
placement = "bottom start",
|
|
2452
|
+
offset = 4,
|
|
2453
|
+
crossOffset = 0,
|
|
2454
|
+
className,
|
|
2455
|
+
children,
|
|
2456
|
+
...props
|
|
2457
|
+
}) {
|
|
2458
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2459
|
+
import_react_aria_components13.Popover,
|
|
2460
|
+
{
|
|
2461
|
+
"data-slot": dataSlot,
|
|
2462
|
+
placement,
|
|
2463
|
+
offset,
|
|
2464
|
+
crossOffset,
|
|
2465
|
+
className: cn(
|
|
2466
|
+
floatingSurfaceClassName,
|
|
2467
|
+
"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",
|
|
2468
|
+
className
|
|
2469
|
+
),
|
|
2470
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2471
|
+
import_react_aria_components13.Menu,
|
|
2472
|
+
{
|
|
2473
|
+
className: "max-h-[inherit] overflow-x-hidden overflow-y-auto outline-hidden",
|
|
2474
|
+
...props,
|
|
2475
|
+
children
|
|
2476
|
+
}
|
|
2477
|
+
)
|
|
2478
|
+
}
|
|
2479
|
+
);
|
|
2480
|
+
}
|
|
2481
|
+
function DropdownMenu(props) {
|
|
2482
|
+
if (!("trigger" in props)) return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(DropdownMenuContent, { ...props });
|
|
2483
|
+
const { children, trigger, triggerProps, defaultOpen, isOpen, onOpenChange, ...contentProps } = props;
|
|
2484
|
+
const triggerElement = typeof trigger === "string" ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Button, { ...triggerProps, children: trigger }) : trigger;
|
|
2485
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(DropdownMenuTrigger, { defaultOpen, isOpen, onOpenChange, children: [
|
|
2486
|
+
triggerElement,
|
|
2487
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(DropdownMenuContent, { ...contentProps, children })
|
|
2488
|
+
] });
|
|
2489
|
+
}
|
|
2490
|
+
function DropdownMenuGroup({
|
|
2491
|
+
...props
|
|
2492
|
+
}) {
|
|
2493
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react_aria_components13.MenuSection, { "data-slot": "dropdown-menu-group", ...props });
|
|
2494
|
+
}
|
|
2495
|
+
function DropdownMenuLabel({
|
|
2496
|
+
className,
|
|
2497
|
+
inset,
|
|
2498
|
+
...props
|
|
2499
|
+
}) {
|
|
2500
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2501
|
+
import_react_aria_components13.Header,
|
|
2502
|
+
{
|
|
2503
|
+
"data-slot": "dropdown-menu-label",
|
|
2504
|
+
"data-inset": inset,
|
|
2505
|
+
className: cn(
|
|
2506
|
+
"px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7",
|
|
2507
|
+
className
|
|
2508
|
+
),
|
|
2509
|
+
...props
|
|
2510
|
+
}
|
|
2511
|
+
);
|
|
2512
|
+
}
|
|
2513
|
+
var dropdownMenuItemVariants = (0, import_class_variance_authority6.cva)(
|
|
2514
|
+
"group/dropdown-menu-item relative flex cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
2515
|
+
{
|
|
2516
|
+
variants: {
|
|
2517
|
+
selectionMode: {
|
|
2518
|
+
none: "gap-1.5 rounded-md px-1.5 py-1 text-sm focus:bg-muted focus:text-foreground not-data-[variant=destructive]:focus:**:text-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",
|
|
2519
|
+
single: "gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm focus:bg-muted focus:text-foreground focus:**:text-foreground data-inset:pl-7 [&_svg:not([class*='size-'])]:size-4",
|
|
2520
|
+
multiple: "gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm focus:bg-muted focus:text-foreground focus:**:text-foreground data-inset:pl-7 [&_svg:not([class*='size-'])]:size-4"
|
|
2521
|
+
}
|
|
2522
|
+
}
|
|
2523
|
+
}
|
|
2524
|
+
);
|
|
2525
|
+
function DropdownMenuItem({
|
|
2526
|
+
className,
|
|
2527
|
+
inset,
|
|
2528
|
+
variant = "default",
|
|
2529
|
+
children,
|
|
2530
|
+
...props
|
|
2531
|
+
}) {
|
|
2532
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2533
|
+
import_react_aria_components13.MenuItem,
|
|
2534
|
+
{
|
|
2535
|
+
"data-slot": "dropdown-menu-item",
|
|
2536
|
+
"data-inset": inset,
|
|
2537
|
+
"data-variant": variant,
|
|
2538
|
+
textValue: typeof children === "string" ? children : props.textValue,
|
|
2539
|
+
className: (0, import_react_aria_components13.composeRenderProps)(
|
|
2540
|
+
className,
|
|
2541
|
+
(className2, { selectionMode }) => cn(dropdownMenuItemVariants({ selectionMode }), className2)
|
|
2542
|
+
),
|
|
2543
|
+
...props,
|
|
2544
|
+
children: (0, import_react_aria_components13.composeRenderProps)(children, (children2, { isSelected, selectionMode }) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
|
|
2545
|
+
selectionMode !== "none" ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2546
|
+
"span",
|
|
2547
|
+
{
|
|
2548
|
+
className: "pointer-events-none absolute right-2 flex items-center justify-center",
|
|
2549
|
+
"data-slot": selectionMode === "single" ? "dropdown-menu-radio-item-indicator" : "dropdown-menu-checkbox-item-indicator",
|
|
2550
|
+
children: isSelected ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react8.CheckIcon, {}) : null
|
|
2551
|
+
}
|
|
2552
|
+
) : null,
|
|
2553
|
+
children2
|
|
2554
|
+
] }))
|
|
2555
|
+
}
|
|
2556
|
+
);
|
|
2557
|
+
}
|
|
2558
|
+
function DropdownMenuSub({ ...props }) {
|
|
2559
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react_aria_components13.SubmenuTrigger, { "data-slot": "dropdown-menu-sub", ...props });
|
|
2560
|
+
}
|
|
2561
|
+
function DropdownMenuSubTrigger({
|
|
2562
|
+
className,
|
|
2563
|
+
inset,
|
|
2564
|
+
children,
|
|
2565
|
+
...props
|
|
2566
|
+
}) {
|
|
2567
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2568
|
+
import_react_aria_components13.MenuItem,
|
|
2569
|
+
{
|
|
2570
|
+
"data-slot": "dropdown-menu-sub-trigger",
|
|
2571
|
+
"data-inset": inset,
|
|
2572
|
+
textValue: typeof children === "string" ? children : props.textValue,
|
|
2573
|
+
className: cn(
|
|
2574
|
+
"flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-muted focus:text-foreground focus:**:text-foreground data-inset:pl-7 data-open:bg-muted data-open:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
2575
|
+
className
|
|
2576
|
+
),
|
|
2577
|
+
...props,
|
|
2578
|
+
children: (0, import_react_aria_components13.composeRenderProps)(children, (children2) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
|
|
2579
|
+
children2,
|
|
2580
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react8.ChevronRightIcon, { className: "cn-rtl-flip ml-auto" })
|
|
2581
|
+
] }))
|
|
2582
|
+
}
|
|
2583
|
+
);
|
|
2584
|
+
}
|
|
2585
|
+
function DropdownMenuSubContent({
|
|
2586
|
+
placement = "end top",
|
|
2587
|
+
crossOffset = -3,
|
|
2588
|
+
offset = 0,
|
|
2589
|
+
className,
|
|
2590
|
+
...props
|
|
2591
|
+
}) {
|
|
2592
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2593
|
+
DropdownMenuContent,
|
|
2054
2594
|
{
|
|
2055
2595
|
"data-slot": "dropdown-menu-sub-content",
|
|
2056
2596
|
className: cn(
|
|
@@ -2068,8 +2608,8 @@ function DropdownMenuSeparator({
|
|
|
2068
2608
|
className,
|
|
2069
2609
|
...props
|
|
2070
2610
|
}) {
|
|
2071
|
-
return /* @__PURE__ */ (0,
|
|
2072
|
-
|
|
2611
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2612
|
+
import_react_aria_components13.Separator,
|
|
2073
2613
|
{
|
|
2074
2614
|
"data-slot": "dropdown-menu-separator",
|
|
2075
2615
|
className: cn("-mx-1 my-1 h-px bg-border", className),
|
|
@@ -2078,7 +2618,7 @@ function DropdownMenuSeparator({
|
|
|
2078
2618
|
);
|
|
2079
2619
|
}
|
|
2080
2620
|
function DropdownMenuShortcut({ className, ...props }) {
|
|
2081
|
-
return /* @__PURE__ */ (0,
|
|
2621
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2082
2622
|
"span",
|
|
2083
2623
|
{
|
|
2084
2624
|
"data-slot": "dropdown-menu-shortcut",
|
|
@@ -2107,9 +2647,9 @@ var emptyStateMediaVariants = (0, import_class_variance_authority7.cva)(
|
|
|
2107
2647
|
);
|
|
2108
2648
|
|
|
2109
2649
|
// src/ui/empty-state/empty-state.tsx
|
|
2110
|
-
var
|
|
2650
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
2111
2651
|
function EmptyState({ className, ...props }) {
|
|
2112
|
-
return /* @__PURE__ */ (0,
|
|
2652
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2113
2653
|
"div",
|
|
2114
2654
|
{
|
|
2115
2655
|
"data-slot": "empty-state",
|
|
@@ -2122,7 +2662,7 @@ function EmptyState({ className, ...props }) {
|
|
|
2122
2662
|
);
|
|
2123
2663
|
}
|
|
2124
2664
|
function EmptyStateHeader({ className, ...props }) {
|
|
2125
|
-
return /* @__PURE__ */ (0,
|
|
2665
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2126
2666
|
"div",
|
|
2127
2667
|
{
|
|
2128
2668
|
"data-slot": "empty-state-header",
|
|
@@ -2136,7 +2676,7 @@ function EmptyStateMedia({
|
|
|
2136
2676
|
variant = "default",
|
|
2137
2677
|
...props
|
|
2138
2678
|
}) {
|
|
2139
|
-
return /* @__PURE__ */ (0,
|
|
2679
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2140
2680
|
"div",
|
|
2141
2681
|
{
|
|
2142
2682
|
"data-slot": "empty-state-media",
|
|
@@ -2147,7 +2687,7 @@ function EmptyStateMedia({
|
|
|
2147
2687
|
);
|
|
2148
2688
|
}
|
|
2149
2689
|
function EmptyStateTitle({ className, children, ...props }) {
|
|
2150
|
-
return /* @__PURE__ */ (0,
|
|
2690
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2151
2691
|
"h3",
|
|
2152
2692
|
{
|
|
2153
2693
|
"data-slot": "empty-state-title",
|
|
@@ -2158,7 +2698,7 @@ function EmptyStateTitle({ className, children, ...props }) {
|
|
|
2158
2698
|
);
|
|
2159
2699
|
}
|
|
2160
2700
|
function EmptyStateDescription({ className, ...props }) {
|
|
2161
|
-
return /* @__PURE__ */ (0,
|
|
2701
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2162
2702
|
"p",
|
|
2163
2703
|
{
|
|
2164
2704
|
"data-slot": "empty-state-description",
|
|
@@ -2171,7 +2711,7 @@ function EmptyStateDescription({ className, ...props }) {
|
|
|
2171
2711
|
);
|
|
2172
2712
|
}
|
|
2173
2713
|
function EmptyStateContent({ className, ...props }) {
|
|
2174
|
-
return /* @__PURE__ */ (0,
|
|
2714
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2175
2715
|
"div",
|
|
2176
2716
|
{
|
|
2177
2717
|
"data-slot": "empty-state-content",
|
|
@@ -2184,14 +2724,121 @@ function EmptyStateContent({ className, ...props }) {
|
|
|
2184
2724
|
);
|
|
2185
2725
|
}
|
|
2186
2726
|
|
|
2727
|
+
// src/ui/error-boundary/error-boundary.tsx
|
|
2728
|
+
var import_react9 = require("react");
|
|
2729
|
+
|
|
2730
|
+
// src/ui/error-state/error-state.tsx
|
|
2731
|
+
var import_lucide_react9 = require("lucide-react");
|
|
2732
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
2733
|
+
function ErrorState({ className, ...props }) {
|
|
2734
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2735
|
+
"section",
|
|
2736
|
+
{
|
|
2737
|
+
"data-slot": "error-state",
|
|
2738
|
+
role: "alert",
|
|
2739
|
+
className: cn(
|
|
2740
|
+
"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",
|
|
2741
|
+
className
|
|
2742
|
+
),
|
|
2743
|
+
...props
|
|
2744
|
+
}
|
|
2745
|
+
);
|
|
2746
|
+
}
|
|
2747
|
+
function ErrorStateIcon({
|
|
2748
|
+
className,
|
|
2749
|
+
...props
|
|
2750
|
+
}) {
|
|
2751
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2752
|
+
import_lucide_react9.AlertCircle,
|
|
2753
|
+
{
|
|
2754
|
+
"data-slot": "error-state-icon",
|
|
2755
|
+
"aria-hidden": "true",
|
|
2756
|
+
className: cn("size-6 text-destructive", className),
|
|
2757
|
+
...props
|
|
2758
|
+
}
|
|
2759
|
+
);
|
|
2760
|
+
}
|
|
2761
|
+
function ErrorStateTitle({ className, ...props }) {
|
|
2762
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2763
|
+
"h2",
|
|
2764
|
+
{
|
|
2765
|
+
"data-slot": "error-state-title",
|
|
2766
|
+
className: cn("font-semibold text-foreground", className),
|
|
2767
|
+
...props
|
|
2768
|
+
}
|
|
2769
|
+
);
|
|
2770
|
+
}
|
|
2771
|
+
function ErrorStateDescription({ className, ...props }) {
|
|
2772
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2773
|
+
"p",
|
|
2774
|
+
{
|
|
2775
|
+
"data-slot": "error-state-description",
|
|
2776
|
+
className: cn("max-w-md text-sm text-muted-foreground", className),
|
|
2777
|
+
...props
|
|
2778
|
+
}
|
|
2779
|
+
);
|
|
2780
|
+
}
|
|
2781
|
+
function ErrorStateActions({ className, ...props }) {
|
|
2782
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2783
|
+
"div",
|
|
2784
|
+
{
|
|
2785
|
+
"data-slot": "error-state-actions",
|
|
2786
|
+
className: cn("flex items-center gap-2", className),
|
|
2787
|
+
...props
|
|
2788
|
+
}
|
|
2789
|
+
);
|
|
2790
|
+
}
|
|
2791
|
+
|
|
2792
|
+
// src/ui/error-boundary/error-boundary.tsx
|
|
2793
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
2794
|
+
function changedResetKeys(previous = [], next = []) {
|
|
2795
|
+
return previous.length !== next.length || previous.some((value, index) => !Object.is(value, next[index]));
|
|
2796
|
+
}
|
|
2797
|
+
var Boundary = class extends import_react9.Component {
|
|
2798
|
+
state = { error: null };
|
|
2799
|
+
static getDerivedStateFromError(error) {
|
|
2800
|
+
return { error };
|
|
2801
|
+
}
|
|
2802
|
+
componentDidCatch(error, info) {
|
|
2803
|
+
this.props.onError?.(error, info);
|
|
2804
|
+
}
|
|
2805
|
+
componentDidUpdate(previousProps) {
|
|
2806
|
+
if (this.state.error && changedResetKeys(previousProps.resetKeys, this.props.resetKeys))
|
|
2807
|
+
this.reset();
|
|
2808
|
+
}
|
|
2809
|
+
reset = () => this.setState({ error: null });
|
|
2810
|
+
render() {
|
|
2811
|
+
const { children, fallback } = this.props;
|
|
2812
|
+
if (!this.state.error) return children;
|
|
2813
|
+
if (typeof fallback === "function")
|
|
2814
|
+
return fallback({ error: this.state.error, reset: this.reset });
|
|
2815
|
+
if (fallback) return fallback;
|
|
2816
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(ErrorState, { children: [
|
|
2817
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ErrorStateIcon, {}),
|
|
2818
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ErrorStateTitle, { children: "No se pudo cargar este contenido" }),
|
|
2819
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ErrorStateDescription, { children: "Prueba a cargarlo de nuevo." }),
|
|
2820
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ErrorStateActions, { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Button, { onPress: this.reset, children: "Reintentar" }) })
|
|
2821
|
+
] });
|
|
2822
|
+
}
|
|
2823
|
+
};
|
|
2824
|
+
function ErrorBoundary(props) {
|
|
2825
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Boundary, { ...props });
|
|
2826
|
+
}
|
|
2827
|
+
function AsyncBoundary({
|
|
2828
|
+
pending = null,
|
|
2829
|
+
...props
|
|
2830
|
+
}) {
|
|
2831
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ErrorBoundary, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react9.Suspense, { fallback: pending, children: props.children }) });
|
|
2832
|
+
}
|
|
2833
|
+
|
|
2187
2834
|
// src/ui/label/label.tsx
|
|
2188
|
-
var
|
|
2189
|
-
var
|
|
2190
|
-
var
|
|
2191
|
-
var Label2 = (0,
|
|
2835
|
+
var import_react10 = require("react");
|
|
2836
|
+
var import_react_aria_components14 = require("react-aria-components");
|
|
2837
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
2838
|
+
var Label2 = (0, import_react10.forwardRef)(
|
|
2192
2839
|
function Label3({ className, ...props }, ref) {
|
|
2193
|
-
return /* @__PURE__ */ (0,
|
|
2194
|
-
|
|
2840
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2841
|
+
import_react_aria_components14.Label,
|
|
2195
2842
|
{
|
|
2196
2843
|
ref,
|
|
2197
2844
|
"data-slot": "label",
|
|
@@ -2222,16 +2869,16 @@ var fieldVariants = (0, import_class_variance_authority8.cva)(
|
|
|
2222
2869
|
);
|
|
2223
2870
|
|
|
2224
2871
|
// src/ui/field/field.tsx
|
|
2225
|
-
var
|
|
2872
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2226
2873
|
function FieldSet({ className, ...props }) {
|
|
2227
|
-
return /* @__PURE__ */ (0,
|
|
2874
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("fieldset", { "data-slot": "field-set", className: cn("flex flex-col gap-4", className), ...props });
|
|
2228
2875
|
}
|
|
2229
2876
|
function FieldLegend({
|
|
2230
2877
|
className,
|
|
2231
2878
|
variant = "legend",
|
|
2232
2879
|
...props
|
|
2233
2880
|
}) {
|
|
2234
|
-
return /* @__PURE__ */ (0,
|
|
2881
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2235
2882
|
"legend",
|
|
2236
2883
|
{
|
|
2237
2884
|
"data-slot": "field-legend",
|
|
@@ -2245,7 +2892,7 @@ function FieldLegend({
|
|
|
2245
2892
|
);
|
|
2246
2893
|
}
|
|
2247
2894
|
function FieldGroup({ className, ...props }) {
|
|
2248
|
-
return /* @__PURE__ */ (0,
|
|
2895
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2249
2896
|
"div",
|
|
2250
2897
|
{
|
|
2251
2898
|
"data-slot": "field-group",
|
|
@@ -2260,7 +2907,7 @@ function FieldGroup({ className, ...props }) {
|
|
|
2260
2907
|
function Field({ className, orientation = "vertical", ...props }) {
|
|
2261
2908
|
return (
|
|
2262
2909
|
// biome-ignore lint/a11y/useSemanticElements: FieldSet provides native fieldset semantics when they are appropriate.
|
|
2263
|
-
/* @__PURE__ */ (0,
|
|
2910
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2264
2911
|
"div",
|
|
2265
2912
|
{
|
|
2266
2913
|
role: "group",
|
|
@@ -2273,7 +2920,7 @@ function Field({ className, orientation = "vertical", ...props }) {
|
|
|
2273
2920
|
);
|
|
2274
2921
|
}
|
|
2275
2922
|
function FieldContent({ className, ...props }) {
|
|
2276
|
-
return /* @__PURE__ */ (0,
|
|
2923
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2277
2924
|
"div",
|
|
2278
2925
|
{
|
|
2279
2926
|
"data-slot": "field-content",
|
|
@@ -2283,7 +2930,7 @@ function FieldContent({ className, ...props }) {
|
|
|
2283
2930
|
);
|
|
2284
2931
|
}
|
|
2285
2932
|
function FieldLabel({ className, ...props }) {
|
|
2286
|
-
return /* @__PURE__ */ (0,
|
|
2933
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2287
2934
|
Label2,
|
|
2288
2935
|
{
|
|
2289
2936
|
"data-slot": "field-label",
|
|
@@ -2296,7 +2943,7 @@ function FieldLabel({ className, ...props }) {
|
|
|
2296
2943
|
);
|
|
2297
2944
|
}
|
|
2298
2945
|
function FieldTitle({ className, ...props }) {
|
|
2299
|
-
return /* @__PURE__ */ (0,
|
|
2946
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2300
2947
|
"div",
|
|
2301
2948
|
{
|
|
2302
2949
|
"data-slot": "field-title",
|
|
@@ -2306,7 +2953,7 @@ function FieldTitle({ className, ...props }) {
|
|
|
2306
2953
|
);
|
|
2307
2954
|
}
|
|
2308
2955
|
function FieldDescription({ className, ...props }) {
|
|
2309
|
-
return /* @__PURE__ */ (0,
|
|
2956
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2310
2957
|
"p",
|
|
2311
2958
|
{
|
|
2312
2959
|
"data-slot": "field-description",
|
|
@@ -2319,7 +2966,7 @@ function FieldDescription({ className, ...props }) {
|
|
|
2319
2966
|
);
|
|
2320
2967
|
}
|
|
2321
2968
|
function FieldSeparator({ className, children, ...props }) {
|
|
2322
|
-
return /* @__PURE__ */ (0,
|
|
2969
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
2323
2970
|
"div",
|
|
2324
2971
|
{
|
|
2325
2972
|
"data-slot": "field-separator",
|
|
@@ -2327,8 +2974,8 @@ function FieldSeparator({ className, children, ...props }) {
|
|
|
2327
2974
|
className: cn("relative -my-2 h-5 text-sm", className),
|
|
2328
2975
|
...props,
|
|
2329
2976
|
children: [
|
|
2330
|
-
/* @__PURE__ */ (0,
|
|
2331
|
-
children ? /* @__PURE__ */ (0,
|
|
2977
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Separator, { className: "absolute inset-0 top-1/2" }),
|
|
2978
|
+
children ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2332
2979
|
"span",
|
|
2333
2980
|
{
|
|
2334
2981
|
"data-slot": "field-separator-content",
|
|
@@ -2342,9 +2989,9 @@ function FieldSeparator({ className, children, ...props }) {
|
|
|
2342
2989
|
}
|
|
2343
2990
|
function FieldError2({ className, children, errors, ...props }) {
|
|
2344
2991
|
const messages = [...new Set(errors?.flatMap((error) => error?.message ?? []) ?? [])];
|
|
2345
|
-
const content = children ?? (messages.length === 1 ? messages[0] : messages.length > 1 ? /* @__PURE__ */ (0,
|
|
2992
|
+
const content = children ?? (messages.length === 1 ? messages[0] : messages.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("ul", { className: "ml-4 list-disc", children: messages.map((message) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("li", { children: message }, message)) }) : null);
|
|
2346
2993
|
if (!content) return null;
|
|
2347
|
-
return /* @__PURE__ */ (0,
|
|
2994
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2348
2995
|
"div",
|
|
2349
2996
|
{
|
|
2350
2997
|
role: "alert",
|
|
@@ -2357,8 +3004,8 @@ function FieldError2({ className, children, errors, ...props }) {
|
|
|
2357
3004
|
}
|
|
2358
3005
|
|
|
2359
3006
|
// src/ui/form-feedback/form-feedback.tsx
|
|
2360
|
-
var
|
|
2361
|
-
var
|
|
3007
|
+
var import_lucide_react10 = require("lucide-react");
|
|
3008
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2362
3009
|
function FormFeedback({
|
|
2363
3010
|
state,
|
|
2364
3011
|
className,
|
|
@@ -2366,14 +3013,14 @@ function FormFeedback({
|
|
|
2366
3013
|
successLabel = "Guardado"
|
|
2367
3014
|
}) {
|
|
2368
3015
|
if (state.status === "idle")
|
|
2369
|
-
return /* @__PURE__ */ (0,
|
|
3016
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { "aria-hidden": "true", className: cn("inline-flex h-5 items-center", className) });
|
|
2370
3017
|
const error = state.status === "error";
|
|
2371
3018
|
const success = state.status === "success";
|
|
2372
|
-
return /* @__PURE__ */ (0,
|
|
3019
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
2373
3020
|
"span",
|
|
2374
3021
|
{
|
|
2375
3022
|
role: error ? "alert" : "status",
|
|
2376
|
-
"aria-live": "polite",
|
|
3023
|
+
"aria-live": error ? "assertive" : "polite",
|
|
2377
3024
|
className: cn(
|
|
2378
3025
|
"inline-flex h-5 items-center gap-1.5 text-xs",
|
|
2379
3026
|
error && "text-destructive",
|
|
@@ -2382,31 +3029,31 @@ function FormFeedback({
|
|
|
2382
3029
|
className
|
|
2383
3030
|
),
|
|
2384
3031
|
children: [
|
|
2385
|
-
state.status === "pending" && /* @__PURE__ */ (0,
|
|
2386
|
-
success && /* @__PURE__ */ (0,
|
|
2387
|
-
error && /* @__PURE__ */ (0,
|
|
2388
|
-
/* @__PURE__ */ (0,
|
|
3032
|
+
state.status === "pending" && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react10.LoaderCircle, { "aria-hidden": "true", className: "size-3.5 animate-spin" }),
|
|
3033
|
+
success && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react10.CheckCircle, { "aria-hidden": "true", className: "size-3.5" }),
|
|
3034
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react10.CircleAlert, { "aria-hidden": "true", className: "size-3.5" }),
|
|
3035
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { children: state.status === "pending" ? pendingLabel : success ? state.message ?? successLabel : state.message })
|
|
2389
3036
|
]
|
|
2390
3037
|
}
|
|
2391
3038
|
);
|
|
2392
3039
|
}
|
|
2393
3040
|
|
|
2394
3041
|
// src/ui/form-feedback/use-form-feedback.ts
|
|
2395
|
-
var
|
|
3042
|
+
var import_react11 = require("react");
|
|
2396
3043
|
function useFormFeedback(options) {
|
|
2397
3044
|
const resetMs = options?.successResetMs ?? 2500;
|
|
2398
|
-
const [state, setState] = (0,
|
|
2399
|
-
const timer = (0,
|
|
2400
|
-
const clearTimer = (0,
|
|
3045
|
+
const [state, setState] = (0, import_react11.useState)({ status: "idle" });
|
|
3046
|
+
const timer = (0, import_react11.useRef)(null);
|
|
3047
|
+
const clearTimer = (0, import_react11.useCallback)(() => {
|
|
2401
3048
|
if (timer.current) clearTimeout(timer.current);
|
|
2402
3049
|
timer.current = null;
|
|
2403
3050
|
}, []);
|
|
2404
|
-
(0,
|
|
2405
|
-
const setPending = (0,
|
|
3051
|
+
(0, import_react11.useEffect)(() => () => clearTimer(), [clearTimer]);
|
|
3052
|
+
const setPending = (0, import_react11.useCallback)(() => {
|
|
2406
3053
|
clearTimer();
|
|
2407
3054
|
setState({ status: "pending" });
|
|
2408
3055
|
}, [clearTimer]);
|
|
2409
|
-
const setSuccess = (0,
|
|
3056
|
+
const setSuccess = (0, import_react11.useCallback)(
|
|
2410
3057
|
(message) => {
|
|
2411
3058
|
clearTimer();
|
|
2412
3059
|
setState({ status: "success", message });
|
|
@@ -2414,14 +3061,14 @@ function useFormFeedback(options) {
|
|
|
2414
3061
|
},
|
|
2415
3062
|
[clearTimer, resetMs]
|
|
2416
3063
|
);
|
|
2417
|
-
const setError = (0,
|
|
3064
|
+
const setError = (0, import_react11.useCallback)(
|
|
2418
3065
|
(message) => {
|
|
2419
3066
|
clearTimer();
|
|
2420
3067
|
setState({ status: "error", message });
|
|
2421
3068
|
},
|
|
2422
3069
|
[clearTimer]
|
|
2423
3070
|
);
|
|
2424
|
-
const reset = (0,
|
|
3071
|
+
const reset = (0, import_react11.useCallback)(() => {
|
|
2425
3072
|
clearTimer();
|
|
2426
3073
|
setState({ status: "idle" });
|
|
2427
3074
|
}, [clearTimer]);
|
|
@@ -2429,7 +3076,7 @@ function useFormFeedback(options) {
|
|
|
2429
3076
|
}
|
|
2430
3077
|
|
|
2431
3078
|
// src/ui/form-row/form-row.tsx
|
|
2432
|
-
var
|
|
3079
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
2433
3080
|
function FormRow({
|
|
2434
3081
|
label,
|
|
2435
3082
|
htmlFor,
|
|
@@ -2441,36 +3088,36 @@ function FormRow({
|
|
|
2441
3088
|
}) {
|
|
2442
3089
|
const hintId = hint ? `${htmlFor}-hint` : void 0;
|
|
2443
3090
|
const errorId = error ? `${htmlFor}-error` : void 0;
|
|
2444
|
-
return /* @__PURE__ */ (0,
|
|
2445
|
-
/* @__PURE__ */ (0,
|
|
3091
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { "data-slot": "form-row", className: cn("flex flex-col gap-1.5", className), children: [
|
|
3092
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("label", { htmlFor, className: "text-foreground text-sm font-medium", children: [
|
|
2446
3093
|
label,
|
|
2447
|
-
required && /* @__PURE__ */ (0,
|
|
2448
|
-
/* @__PURE__ */ (0,
|
|
2449
|
-
/* @__PURE__ */ (0,
|
|
3094
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_jsx_runtime30.Fragment, { children: [
|
|
3095
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { "aria-hidden": "true", className: "text-destructive ml-0.5", children: "*" }),
|
|
3096
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "sr-only", children: " (obligatorio)" })
|
|
2450
3097
|
] })
|
|
2451
3098
|
] }),
|
|
2452
3099
|
children,
|
|
2453
|
-
hint && /* @__PURE__ */ (0,
|
|
2454
|
-
error && /* @__PURE__ */ (0,
|
|
3100
|
+
hint && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { id: hintId, className: "text-muted-foreground text-xs", children: hint }),
|
|
3101
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { id: errorId, role: "alert", className: "text-destructive text-xs font-medium", children: error })
|
|
2455
3102
|
] });
|
|
2456
3103
|
}
|
|
2457
3104
|
|
|
2458
3105
|
// src/ui/icon-button/icon-button.tsx
|
|
2459
|
-
var
|
|
3106
|
+
var import_react_aria_components16 = require("react-aria-components");
|
|
2460
3107
|
|
|
2461
3108
|
// src/ui/tooltip/tooltip.tsx
|
|
2462
|
-
var
|
|
2463
|
-
var
|
|
3109
|
+
var import_react_aria_components15 = require("react-aria-components");
|
|
3110
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
2464
3111
|
function TooltipTrigger({
|
|
2465
3112
|
delay = 0,
|
|
2466
3113
|
...props
|
|
2467
3114
|
}) {
|
|
2468
|
-
return /* @__PURE__ */ (0,
|
|
3115
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react_aria_components15.TooltipTrigger, { "data-slot": "tooltip-trigger", delay, ...props });
|
|
2469
3116
|
}
|
|
2470
3117
|
function Tooltip({ label, children, delay, ...props }) {
|
|
2471
|
-
return /* @__PURE__ */ (0,
|
|
3118
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(TooltipTrigger, { delay, children: [
|
|
2472
3119
|
children,
|
|
2473
|
-
/* @__PURE__ */ (0,
|
|
3120
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(TooltipContent, { ...props, children: label })
|
|
2474
3121
|
] });
|
|
2475
3122
|
}
|
|
2476
3123
|
function TooltipContent({
|
|
@@ -2481,8 +3128,8 @@ function TooltipContent({
|
|
|
2481
3128
|
children,
|
|
2482
3129
|
...props
|
|
2483
3130
|
}) {
|
|
2484
|
-
return /* @__PURE__ */ (0,
|
|
2485
|
-
|
|
3131
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
3132
|
+
import_react_aria_components15.Tooltip,
|
|
2486
3133
|
{
|
|
2487
3134
|
"data-slot": "tooltip-content",
|
|
2488
3135
|
placement,
|
|
@@ -2495,8 +3142,8 @@ function TooltipContent({
|
|
|
2495
3142
|
...props,
|
|
2496
3143
|
children: [
|
|
2497
3144
|
children,
|
|
2498
|
-
/* @__PURE__ */ (0,
|
|
2499
|
-
|
|
3145
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3146
|
+
import_react_aria_components15.OverlayArrow,
|
|
2500
3147
|
{
|
|
2501
3148
|
className: "bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-xs",
|
|
2502
3149
|
style: ({ placement: placement2, defaultStyle }) => ({
|
|
@@ -2513,7 +3160,7 @@ function TooltipContent({
|
|
|
2513
3160
|
}
|
|
2514
3161
|
|
|
2515
3162
|
// src/ui/icon-button/icon-button.tsx
|
|
2516
|
-
var
|
|
3163
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2517
3164
|
function IconButton({
|
|
2518
3165
|
label,
|
|
2519
3166
|
children,
|
|
@@ -2523,7 +3170,7 @@ function IconButton({
|
|
|
2523
3170
|
...props
|
|
2524
3171
|
}) {
|
|
2525
3172
|
const linkClassName = cn(buttonVariants({ variant, size: "icon" }), className);
|
|
2526
|
-
return /* @__PURE__ */ (0,
|
|
3173
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Tooltip, { label, children: href ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_aria_components16.Link, { "data-slot": "icon-button", "aria-label": label, href, className: linkClassName, children }) : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2527
3174
|
Button,
|
|
2528
3175
|
{
|
|
2529
3176
|
"data-slot": "icon-button",
|
|
@@ -2541,12 +3188,12 @@ function IconButton({
|
|
|
2541
3188
|
var import_class_variance_authority10 = require("class-variance-authority");
|
|
2542
3189
|
|
|
2543
3190
|
// src/ui/input/input.tsx
|
|
2544
|
-
var
|
|
2545
|
-
var
|
|
2546
|
-
var
|
|
2547
|
-
var InputImpl = (0,
|
|
2548
|
-
return /* @__PURE__ */ (0,
|
|
2549
|
-
|
|
3191
|
+
var import_react12 = require("react");
|
|
3192
|
+
var import_react_aria_components17 = require("react-aria-components");
|
|
3193
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
3194
|
+
var InputImpl = (0, import_react12.forwardRef)(function Input2({ className, type, ...props }, ref) {
|
|
3195
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
3196
|
+
import_react_aria_components17.Input,
|
|
2550
3197
|
{
|
|
2551
3198
|
ref,
|
|
2552
3199
|
type,
|
|
@@ -2562,12 +3209,12 @@ var InputImpl = (0, import_react9.forwardRef)(function Input2({ className, type,
|
|
|
2562
3209
|
var Input3 = InputImpl;
|
|
2563
3210
|
|
|
2564
3211
|
// src/ui/textarea/textarea.tsx
|
|
2565
|
-
var
|
|
2566
|
-
var
|
|
2567
|
-
var
|
|
2568
|
-
var TextareaImpl = (0,
|
|
2569
|
-
return /* @__PURE__ */ (0,
|
|
2570
|
-
|
|
3212
|
+
var import_react13 = require("react");
|
|
3213
|
+
var import_react_aria_components18 = require("react-aria-components");
|
|
3214
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
3215
|
+
var TextareaImpl = (0, import_react13.forwardRef)(function Textarea({ className, ...props }, ref) {
|
|
3216
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3217
|
+
import_react_aria_components18.TextArea,
|
|
2571
3218
|
{
|
|
2572
3219
|
ref,
|
|
2573
3220
|
"data-slot": "textarea",
|
|
@@ -2599,12 +3246,12 @@ var inputGroupAddonVariants = (0, import_class_variance_authority9.cva)(
|
|
|
2599
3246
|
);
|
|
2600
3247
|
|
|
2601
3248
|
// src/ui/input-group/input-group.tsx
|
|
2602
|
-
var
|
|
3249
|
+
var import_jsx_runtime35 = (
|
|
2603
3250
|
// biome-ignore lint/a11y/useSemanticElements: fieldset cannot preserve this inline control composition.
|
|
2604
3251
|
require("react/jsx-runtime")
|
|
2605
3252
|
);
|
|
2606
3253
|
function InputGroup({ className, ...props }) {
|
|
2607
|
-
return /* @__PURE__ */ (0,
|
|
3254
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2608
3255
|
"div",
|
|
2609
3256
|
{
|
|
2610
3257
|
role: "group",
|
|
@@ -2625,7 +3272,7 @@ function InputGroupAddon({
|
|
|
2625
3272
|
}) {
|
|
2626
3273
|
return (
|
|
2627
3274
|
// biome-ignore lint/a11y/useSemanticElements: this addon delegates focus to its associated input.
|
|
2628
|
-
/* @__PURE__ */ (0,
|
|
3275
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2629
3276
|
"div",
|
|
2630
3277
|
{
|
|
2631
3278
|
role: "group",
|
|
@@ -2656,7 +3303,7 @@ function InputGroupButton({
|
|
|
2656
3303
|
...props
|
|
2657
3304
|
}) {
|
|
2658
3305
|
const buttonSize = size === "icon-xs" || size === "icon-sm" ? size : size;
|
|
2659
|
-
return /* @__PURE__ */ (0,
|
|
3306
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2660
3307
|
Button,
|
|
2661
3308
|
{
|
|
2662
3309
|
"data-slot": "input-group-button",
|
|
@@ -2669,7 +3316,7 @@ function InputGroupButton({
|
|
|
2669
3316
|
);
|
|
2670
3317
|
}
|
|
2671
3318
|
function InputGroupText({ className, ...props }) {
|
|
2672
|
-
return /* @__PURE__ */ (0,
|
|
3319
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2673
3320
|
"span",
|
|
2674
3321
|
{
|
|
2675
3322
|
"data-slot": "input-group-text",
|
|
@@ -2682,7 +3329,7 @@ function InputGroupText({ className, ...props }) {
|
|
|
2682
3329
|
);
|
|
2683
3330
|
}
|
|
2684
3331
|
function InputGroupInput({ className, ...props }) {
|
|
2685
|
-
return /* @__PURE__ */ (0,
|
|
3332
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2686
3333
|
Input3,
|
|
2687
3334
|
{
|
|
2688
3335
|
"data-slot": "input-group-control",
|
|
@@ -2695,7 +3342,7 @@ function InputGroupInput({ className, ...props }) {
|
|
|
2695
3342
|
);
|
|
2696
3343
|
}
|
|
2697
3344
|
function InputGroupTextarea({ className, ...props }) {
|
|
2698
|
-
return /* @__PURE__ */ (0,
|
|
3345
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2699
3346
|
Textarea2,
|
|
2700
3347
|
{
|
|
2701
3348
|
"data-slot": "input-group-control",
|
|
@@ -2709,7 +3356,7 @@ function InputGroupTextarea({ className, ...props }) {
|
|
|
2709
3356
|
}
|
|
2710
3357
|
|
|
2711
3358
|
// src/ui/kanban/kanban.tsx
|
|
2712
|
-
var
|
|
3359
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
2713
3360
|
var columnSize = {
|
|
2714
3361
|
compact: "w-56",
|
|
2715
3362
|
default: "w-72",
|
|
@@ -2721,13 +3368,13 @@ function KanbanViewport({
|
|
|
2721
3368
|
contentClassName,
|
|
2722
3369
|
...props
|
|
2723
3370
|
}) {
|
|
2724
|
-
return /* @__PURE__ */ (0,
|
|
3371
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2725
3372
|
"div",
|
|
2726
3373
|
{
|
|
2727
3374
|
"data-slot": "kanban-viewport",
|
|
2728
3375
|
className: cn("-mx-1 overflow-x-auto pb-3", className),
|
|
2729
3376
|
...props,
|
|
2730
|
-
children: /* @__PURE__ */ (0,
|
|
3377
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2731
3378
|
"div",
|
|
2732
3379
|
{
|
|
2733
3380
|
"data-slot": "kanban-viewport-content",
|
|
@@ -2743,7 +3390,7 @@ function KanbanColumn({
|
|
|
2743
3390
|
size = "default",
|
|
2744
3391
|
...props
|
|
2745
3392
|
}) {
|
|
2746
|
-
return /* @__PURE__ */ (0,
|
|
3393
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2747
3394
|
"section",
|
|
2748
3395
|
{
|
|
2749
3396
|
"data-slot": "kanban-column",
|
|
@@ -2754,7 +3401,7 @@ function KanbanColumn({
|
|
|
2754
3401
|
);
|
|
2755
3402
|
}
|
|
2756
3403
|
function KanbanColumnHeader({ className, ...props }) {
|
|
2757
|
-
return /* @__PURE__ */ (0,
|
|
3404
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2758
3405
|
"header",
|
|
2759
3406
|
{
|
|
2760
3407
|
"data-slot": "kanban-column-header",
|
|
@@ -2764,7 +3411,7 @@ function KanbanColumnHeader({ className, ...props }) {
|
|
|
2764
3411
|
);
|
|
2765
3412
|
}
|
|
2766
3413
|
function KanbanColumnTitle({ className, ...props }) {
|
|
2767
|
-
return /* @__PURE__ */ (0,
|
|
3414
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2768
3415
|
"span",
|
|
2769
3416
|
{
|
|
2770
3417
|
"data-slot": "kanban-column-title",
|
|
@@ -2777,14 +3424,14 @@ function KanbanColumnTitle({ className, ...props }) {
|
|
|
2777
3424
|
);
|
|
2778
3425
|
}
|
|
2779
3426
|
function KanbanColumnBody({ className, ...props }) {
|
|
2780
|
-
return /* @__PURE__ */ (0,
|
|
3427
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { "data-slot": "kanban-column-body", className: cn("space-y-2", className), ...props });
|
|
2781
3428
|
}
|
|
2782
3429
|
function KanbanEmpty({
|
|
2783
3430
|
className,
|
|
2784
3431
|
compact = false,
|
|
2785
3432
|
...props
|
|
2786
3433
|
}) {
|
|
2787
|
-
return /* @__PURE__ */ (0,
|
|
3434
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2788
3435
|
"p",
|
|
2789
3436
|
{
|
|
2790
3437
|
"data-slot": "kanban-empty",
|
|
@@ -2800,9 +3447,9 @@ function KanbanEmpty({
|
|
|
2800
3447
|
}
|
|
2801
3448
|
|
|
2802
3449
|
// src/ui/kbd/kbd.tsx
|
|
2803
|
-
var
|
|
3450
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
2804
3451
|
function Kbd({ className, ...props }) {
|
|
2805
|
-
return /* @__PURE__ */ (0,
|
|
3452
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
2806
3453
|
"kbd",
|
|
2807
3454
|
{
|
|
2808
3455
|
"data-slot": "kbd",
|
|
@@ -2815,7 +3462,7 @@ function Kbd({ className, ...props }) {
|
|
|
2815
3462
|
);
|
|
2816
3463
|
}
|
|
2817
3464
|
function KbdGroup({ className, ...props }) {
|
|
2818
|
-
return /* @__PURE__ */ (0,
|
|
3465
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
2819
3466
|
"span",
|
|
2820
3467
|
{
|
|
2821
3468
|
"data-slot": "kbd-group",
|
|
@@ -2826,14 +3473,14 @@ function KbdGroup({ className, ...props }) {
|
|
|
2826
3473
|
}
|
|
2827
3474
|
|
|
2828
3475
|
// src/ui/loading-overlay/loading-overlay.tsx
|
|
2829
|
-
var
|
|
2830
|
-
var
|
|
3476
|
+
var import_lucide_react11 = require("lucide-react");
|
|
3477
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
2831
3478
|
function LoadingOverlay({
|
|
2832
3479
|
label = "Cargando",
|
|
2833
3480
|
className,
|
|
2834
3481
|
...props
|
|
2835
3482
|
}) {
|
|
2836
|
-
return /* @__PURE__ */ (0,
|
|
3483
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2837
3484
|
"output",
|
|
2838
3485
|
{
|
|
2839
3486
|
"aria-live": "polite",
|
|
@@ -2842,25 +3489,26 @@ function LoadingOverlay({
|
|
|
2842
3489
|
className
|
|
2843
3490
|
),
|
|
2844
3491
|
...props,
|
|
2845
|
-
children: /* @__PURE__ */ (0,
|
|
2846
|
-
/* @__PURE__ */ (0,
|
|
2847
|
-
/* @__PURE__ */ (0,
|
|
3492
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "border-border bg-background flex items-center gap-2 rounded-lg border px-3 py-2 text-sm shadow-sm", children: [
|
|
3493
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react11.LoaderCircle, { className: "motion-safe:animate-spin", "aria-hidden": "true" }),
|
|
3494
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { children: label })
|
|
2848
3495
|
] })
|
|
2849
3496
|
}
|
|
2850
3497
|
);
|
|
2851
3498
|
}
|
|
2852
3499
|
|
|
2853
3500
|
// src/ui/menu/menu.tsx
|
|
2854
|
-
var
|
|
2855
|
-
var
|
|
2856
|
-
var MenuTrigger =
|
|
3501
|
+
var import_react_aria_components19 = require("react-aria-components");
|
|
3502
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
3503
|
+
var MenuTrigger = import_react_aria_components19.MenuTrigger;
|
|
2857
3504
|
function MenuContent({ className, ...props }) {
|
|
2858
|
-
return /* @__PURE__ */ (0,
|
|
2859
|
-
|
|
3505
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3506
|
+
import_react_aria_components19.Popover,
|
|
2860
3507
|
{
|
|
2861
3508
|
"data-slot": "menu-content",
|
|
2862
3509
|
className: cn(
|
|
2863
|
-
|
|
3510
|
+
floatingSurfaceClassName,
|
|
3511
|
+
"min-w-40 overflow-hidden rounded-xl border border-border bg-background p-1.5 text-foreground",
|
|
2864
3512
|
className
|
|
2865
3513
|
),
|
|
2866
3514
|
...props
|
|
@@ -2868,11 +3516,11 @@ function MenuContent({ className, ...props }) {
|
|
|
2868
3516
|
);
|
|
2869
3517
|
}
|
|
2870
3518
|
function Menu({ className, ...props }) {
|
|
2871
|
-
return /* @__PURE__ */ (0,
|
|
3519
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react_aria_components19.Menu, { "data-slot": "menu", className: cn("outline-none", className), ...props });
|
|
2872
3520
|
}
|
|
2873
3521
|
function MenuItem({ className, children, ...props }) {
|
|
2874
|
-
return /* @__PURE__ */ (0,
|
|
2875
|
-
|
|
3522
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3523
|
+
import_react_aria_components19.MenuItem,
|
|
2876
3524
|
{
|
|
2877
3525
|
"data-slot": "menu-item",
|
|
2878
3526
|
className: cn(
|
|
@@ -2886,7 +3534,7 @@ function MenuItem({ className, children, ...props }) {
|
|
|
2886
3534
|
}
|
|
2887
3535
|
|
|
2888
3536
|
// src/ui/metric-card/metric-card.tsx
|
|
2889
|
-
var
|
|
3537
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
2890
3538
|
function MetricCard({
|
|
2891
3539
|
className,
|
|
2892
3540
|
label,
|
|
@@ -2894,33 +3542,68 @@ function MetricCard({
|
|
|
2894
3542
|
description,
|
|
2895
3543
|
icon,
|
|
2896
3544
|
tone = "default",
|
|
3545
|
+
trend,
|
|
3546
|
+
delta,
|
|
3547
|
+
loading = false,
|
|
3548
|
+
loadingLabel = "Cargando m\xE9trica",
|
|
2897
3549
|
...props
|
|
2898
3550
|
}) {
|
|
2899
|
-
return /* @__PURE__ */ (0,
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
}
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
3551
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3552
|
+
Card,
|
|
3553
|
+
{
|
|
3554
|
+
"data-slot": "metric-card",
|
|
3555
|
+
"data-tone": tone,
|
|
3556
|
+
"data-trend": trend,
|
|
3557
|
+
"aria-busy": loading || void 0,
|
|
3558
|
+
className: cn("min-w-0", className),
|
|
3559
|
+
...props,
|
|
3560
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(CardContent, { className: "flex items-start gap-3", children: [
|
|
3561
|
+
icon ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { "data-slot": "metric-card-icon", className: "text-muted-foreground shrink-0", children: icon }) : null,
|
|
3562
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "min-w-0", children: [
|
|
3563
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("p", { "data-slot": "metric-card-label", className: "text-muted-foreground text-sm", children: label }),
|
|
3564
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3565
|
+
"strong",
|
|
3566
|
+
{
|
|
3567
|
+
"data-slot": "metric-card-value",
|
|
3568
|
+
className: "mt-1 block text-2xl font-semibold tracking-tight",
|
|
3569
|
+
children: loading ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3570
|
+
"span",
|
|
3571
|
+
{
|
|
3572
|
+
"data-slot": "metric-card-loading",
|
|
3573
|
+
"aria-label": loadingLabel,
|
|
3574
|
+
className: "bg-muted block h-7 w-24 animate-pulse rounded motion-reduce:animate-none"
|
|
3575
|
+
}
|
|
3576
|
+
) : value
|
|
3577
|
+
}
|
|
3578
|
+
),
|
|
3579
|
+
delta ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3580
|
+
"span",
|
|
3581
|
+
{
|
|
3582
|
+
"data-slot": "metric-card-delta",
|
|
3583
|
+
className: cn(
|
|
3584
|
+
"mt-1 block text-xs",
|
|
3585
|
+
trend === "up" && "text-emerald-600",
|
|
3586
|
+
trend === "down" && "text-destructive",
|
|
3587
|
+
trend === "neutral" && "text-muted-foreground"
|
|
3588
|
+
),
|
|
3589
|
+
children: delta
|
|
3590
|
+
}
|
|
3591
|
+
) : null,
|
|
3592
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("p", { "data-slot": "metric-card-description", className: "text-muted-foreground mt-1 text-xs", children: description }) : null
|
|
3593
|
+
] })
|
|
3594
|
+
] })
|
|
3595
|
+
}
|
|
3596
|
+
);
|
|
2914
3597
|
}
|
|
2915
3598
|
|
|
2916
3599
|
// src/ui/otp-input/otp-input.tsx
|
|
2917
|
-
var
|
|
2918
|
-
var
|
|
2919
|
-
var
|
|
3600
|
+
var import_react14 = require("react");
|
|
3601
|
+
var import_react_aria_components20 = require("react-aria-components");
|
|
3602
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
2920
3603
|
function normalizeOtp(value, length) {
|
|
2921
3604
|
return value.replace(/[^0-9]/g, "").slice(0, length);
|
|
2922
3605
|
}
|
|
2923
|
-
var OtpInputImpl = (0,
|
|
3606
|
+
var OtpInputImpl = (0, import_react14.forwardRef)(function OtpInput({
|
|
2924
3607
|
length = 6,
|
|
2925
3608
|
value,
|
|
2926
3609
|
defaultValue = "",
|
|
@@ -2935,17 +3618,17 @@ var OtpInputImpl = (0, import_react11.forwardRef)(function OtpInput({
|
|
|
2935
3618
|
onSelect,
|
|
2936
3619
|
...props
|
|
2937
3620
|
}, forwardedRef) {
|
|
2938
|
-
const slotCount = Math.max(1, Math.floor(length));
|
|
3621
|
+
const slotCount = Number.isFinite(length) ? Math.max(1, Math.floor(length)) : 6;
|
|
2939
3622
|
const controlled = value !== void 0;
|
|
2940
|
-
const [internalValue, setInternalValue] = (0,
|
|
3623
|
+
const [internalValue, setInternalValue] = (0, import_react14.useState)(() => normalizeOtp(defaultValue, slotCount));
|
|
2941
3624
|
const code = normalizeOtp(controlled ? value : internalValue, slotCount);
|
|
2942
3625
|
const slots = Array.from({ length: slotCount }, (_, index) => `otp-slot-${index + 1}`);
|
|
2943
|
-
const inputRef = (0,
|
|
2944
|
-
const [focused, setFocused] = (0,
|
|
2945
|
-
const [selectionStart, setSelectionStart] = (0,
|
|
3626
|
+
const inputRef = (0, import_react14.useRef)(null);
|
|
3627
|
+
const [focused, setFocused] = (0, import_react14.useState)(false);
|
|
3628
|
+
const [selectionStart, setSelectionStart] = (0, import_react14.useState)(0);
|
|
2946
3629
|
const invalid = props["aria-invalid"] === true || props["aria-invalid"] === "true";
|
|
2947
3630
|
const activeIndex = code.length === slotCount ? slotCount - 1 : Math.min(selectionStart, code.length, slotCount - 1);
|
|
2948
|
-
(0,
|
|
3631
|
+
(0, import_react14.useImperativeHandle)(forwardedRef, () => inputRef.current);
|
|
2949
3632
|
function updateSelection(input) {
|
|
2950
3633
|
setSelectionStart(input.selectionStart ?? code.length);
|
|
2951
3634
|
}
|
|
@@ -2954,7 +3637,7 @@ var OtpInputImpl = (0, import_react11.forwardRef)(function OtpInput({
|
|
|
2954
3637
|
if (!controlled) setInternalValue(nextValue);
|
|
2955
3638
|
if (nextValue === code) return;
|
|
2956
3639
|
onChange?.(nextValue);
|
|
2957
|
-
if (nextValue.length === slotCount) onComplete?.(nextValue);
|
|
3640
|
+
if (nextValue.length === slotCount && code.length < slotCount) onComplete?.(nextValue);
|
|
2958
3641
|
}
|
|
2959
3642
|
function handlePointerDown(event) {
|
|
2960
3643
|
if (disabled) return;
|
|
@@ -2968,7 +3651,7 @@ var OtpInputImpl = (0, import_react11.forwardRef)(function OtpInput({
|
|
|
2968
3651
|
input.setSelectionRange(position, position);
|
|
2969
3652
|
setSelectionStart(position);
|
|
2970
3653
|
}
|
|
2971
|
-
return /* @__PURE__ */ (0,
|
|
3654
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
2972
3655
|
"div",
|
|
2973
3656
|
{
|
|
2974
3657
|
"data-slot": "otp-input",
|
|
@@ -2978,8 +3661,8 @@ var OtpInputImpl = (0, import_react11.forwardRef)(function OtpInput({
|
|
|
2978
3661
|
style: { gridTemplateColumns: `repeat(${slotCount}, minmax(0, 2.5rem))` },
|
|
2979
3662
|
onPointerDown: handlePointerDown,
|
|
2980
3663
|
children: [
|
|
2981
|
-
/* @__PURE__ */ (0,
|
|
2982
|
-
|
|
3664
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3665
|
+
import_react_aria_components20.Input,
|
|
2983
3666
|
{
|
|
2984
3667
|
...props,
|
|
2985
3668
|
ref: inputRef,
|
|
@@ -3018,7 +3701,7 @@ var OtpInputImpl = (0, import_react11.forwardRef)(function OtpInput({
|
|
|
3018
3701
|
}
|
|
3019
3702
|
}
|
|
3020
3703
|
),
|
|
3021
|
-
slots.map((slot, index) => /* @__PURE__ */ (0,
|
|
3704
|
+
slots.map((slot, index) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3022
3705
|
"span",
|
|
3023
3706
|
{
|
|
3024
3707
|
"aria-hidden": "true",
|
|
@@ -3041,9 +3724,9 @@ var OtpInputImpl = (0, import_react11.forwardRef)(function OtpInput({
|
|
|
3041
3724
|
var OtpInput2 = OtpInputImpl;
|
|
3042
3725
|
|
|
3043
3726
|
// src/ui/page-header/page-header.tsx
|
|
3044
|
-
var
|
|
3727
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
3045
3728
|
function PageHeader({ className, ...props }) {
|
|
3046
|
-
return /* @__PURE__ */ (0,
|
|
3729
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3047
3730
|
"header",
|
|
3048
3731
|
{
|
|
3049
3732
|
"data-slot": "page-header",
|
|
@@ -3056,10 +3739,10 @@ function PageHeader({ className, ...props }) {
|
|
|
3056
3739
|
);
|
|
3057
3740
|
}
|
|
3058
3741
|
function PageHeaderHeading({ className, ...props }) {
|
|
3059
|
-
return /* @__PURE__ */ (0,
|
|
3742
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { "data-slot": "page-header-heading", className: cn("min-w-0", className), ...props });
|
|
3060
3743
|
}
|
|
3061
3744
|
function PageHeaderTitle({ className, children, ...props }) {
|
|
3062
|
-
return /* @__PURE__ */ (0,
|
|
3745
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3063
3746
|
"h1",
|
|
3064
3747
|
{
|
|
3065
3748
|
"data-slot": "page-header-title",
|
|
@@ -3070,7 +3753,7 @@ function PageHeaderTitle({ className, children, ...props }) {
|
|
|
3070
3753
|
);
|
|
3071
3754
|
}
|
|
3072
3755
|
function PageHeaderDescription({ className, ...props }) {
|
|
3073
|
-
return /* @__PURE__ */ (0,
|
|
3756
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3074
3757
|
"p",
|
|
3075
3758
|
{
|
|
3076
3759
|
"data-slot": "page-header-description",
|
|
@@ -3080,7 +3763,7 @@ function PageHeaderDescription({ className, ...props }) {
|
|
|
3080
3763
|
);
|
|
3081
3764
|
}
|
|
3082
3765
|
function PageHeaderActions({ className, ...props }) {
|
|
3083
|
-
return /* @__PURE__ */ (0,
|
|
3766
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3084
3767
|
"div",
|
|
3085
3768
|
{
|
|
3086
3769
|
"data-slot": "page-header-actions",
|
|
@@ -3089,11 +3772,54 @@ function PageHeaderActions({ className, ...props }) {
|
|
|
3089
3772
|
}
|
|
3090
3773
|
);
|
|
3091
3774
|
}
|
|
3775
|
+
function SectionHeader({ className, ...props }) {
|
|
3776
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3777
|
+
"div",
|
|
3778
|
+
{
|
|
3779
|
+
"data-slot": "section-header",
|
|
3780
|
+
className: cn("flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between", className),
|
|
3781
|
+
...props
|
|
3782
|
+
}
|
|
3783
|
+
);
|
|
3784
|
+
}
|
|
3785
|
+
function SectionHeaderHeading({ className, ...props }) {
|
|
3786
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { "data-slot": "section-header-heading", className: cn("min-w-0", className), ...props });
|
|
3787
|
+
}
|
|
3788
|
+
function SectionHeaderTitle({ className, ...props }) {
|
|
3789
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3790
|
+
"h2",
|
|
3791
|
+
{
|
|
3792
|
+
"data-slot": "section-header-title",
|
|
3793
|
+
className: cn("text-base font-semibold tracking-tight", className),
|
|
3794
|
+
...props
|
|
3795
|
+
}
|
|
3796
|
+
);
|
|
3797
|
+
}
|
|
3798
|
+
function SectionHeaderDescription({ className, ...props }) {
|
|
3799
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3800
|
+
"p",
|
|
3801
|
+
{
|
|
3802
|
+
"data-slot": "section-header-description",
|
|
3803
|
+
className: cn("mt-1 text-sm text-muted-foreground", className),
|
|
3804
|
+
...props
|
|
3805
|
+
}
|
|
3806
|
+
);
|
|
3807
|
+
}
|
|
3808
|
+
function SectionHeaderActions({ className, ...props }) {
|
|
3809
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3810
|
+
"div",
|
|
3811
|
+
{
|
|
3812
|
+
"data-slot": "section-header-actions",
|
|
3813
|
+
className: cn("flex shrink-0 items-center gap-2", className),
|
|
3814
|
+
...props
|
|
3815
|
+
}
|
|
3816
|
+
);
|
|
3817
|
+
}
|
|
3092
3818
|
|
|
3093
3819
|
// src/ui/pagination/pagination.tsx
|
|
3094
|
-
var
|
|
3820
|
+
var import_lucide_react12 = require("lucide-react");
|
|
3095
3821
|
var React6 = __toESM(require("react"), 1);
|
|
3096
|
-
var
|
|
3822
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
3097
3823
|
function visiblePages(page, pageCount, siblingCount) {
|
|
3098
3824
|
return [
|
|
3099
3825
|
.../* @__PURE__ */ new Set([
|
|
@@ -3103,6 +3829,13 @@ function visiblePages(page, pageCount, siblingCount) {
|
|
|
3103
3829
|
])
|
|
3104
3830
|
].filter((item) => item >= 1 && item <= pageCount).sort((left, right) => left - right);
|
|
3105
3831
|
}
|
|
3832
|
+
function normalizedPageCount(pageCount) {
|
|
3833
|
+
return Number.isFinite(pageCount) ? Math.max(0, Math.floor(pageCount)) : 0;
|
|
3834
|
+
}
|
|
3835
|
+
function normalizedPage(page, pageCount) {
|
|
3836
|
+
if (!Number.isFinite(page)) return 1;
|
|
3837
|
+
return Math.min(Math.max(1, Math.floor(page)), pageCount);
|
|
3838
|
+
}
|
|
3106
3839
|
function Pagination({
|
|
3107
3840
|
page,
|
|
3108
3841
|
pageCount,
|
|
@@ -3112,35 +3845,37 @@ function Pagination({
|
|
|
3112
3845
|
siblingCount = 1,
|
|
3113
3846
|
className
|
|
3114
3847
|
}) {
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3848
|
+
const totalPages = normalizedPageCount(pageCount);
|
|
3849
|
+
if (totalPages <= 1) return null;
|
|
3850
|
+
const currentPage = normalizedPage(page, totalPages);
|
|
3851
|
+
const pages = visiblePages(currentPage, totalPages, siblingCount);
|
|
3852
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
3118
3853
|
"nav",
|
|
3119
3854
|
{
|
|
3120
3855
|
"aria-label": ariaLabel,
|
|
3121
3856
|
className: cn("flex flex-wrap items-center justify-between gap-4", className),
|
|
3122
3857
|
children: [
|
|
3123
|
-
/* @__PURE__ */ (0,
|
|
3124
|
-
/* @__PURE__ */ (0,
|
|
3125
|
-
/* @__PURE__ */ (0,
|
|
3858
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: "text-muted-foreground text-sm", children: summary ?? `P\xE1gina ${currentPage} de ${totalPages}` }),
|
|
3859
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
3860
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3126
3861
|
Button,
|
|
3127
3862
|
{
|
|
3128
3863
|
"aria-label": "P\xE1gina anterior",
|
|
3129
|
-
isDisabled:
|
|
3130
|
-
onPress: () => onPageChange(
|
|
3864
|
+
isDisabled: currentPage <= 1,
|
|
3865
|
+
onPress: () => onPageChange(currentPage - 1),
|
|
3131
3866
|
size: "icon",
|
|
3132
3867
|
variant: "ghost",
|
|
3133
|
-
children: /* @__PURE__ */ (0,
|
|
3868
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react12.ChevronLeft, {})
|
|
3134
3869
|
}
|
|
3135
3870
|
),
|
|
3136
3871
|
pages.map((item, index) => {
|
|
3137
3872
|
const previousPage = pages[index - 1];
|
|
3138
|
-
return /* @__PURE__ */ (0,
|
|
3139
|
-
previousPage !== void 0 && item > previousPage + 1 ? /* @__PURE__ */ (0,
|
|
3140
|
-
/* @__PURE__ */ (0,
|
|
3873
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(React6.Fragment, { children: [
|
|
3874
|
+
previousPage !== void 0 && item > previousPage + 1 ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { "aria-hidden": "true", className: "text-muted-foreground px-1", children: "\u2026" }) : null,
|
|
3875
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3141
3876
|
Button,
|
|
3142
3877
|
{
|
|
3143
|
-
"aria-current": item ===
|
|
3878
|
+
"aria-current": item === currentPage ? "page" : void 0,
|
|
3144
3879
|
"aria-label": `P\xE1gina ${item}`,
|
|
3145
3880
|
onPress: () => onPageChange(item),
|
|
3146
3881
|
size: "icon",
|
|
@@ -3150,15 +3885,15 @@ function Pagination({
|
|
|
3150
3885
|
)
|
|
3151
3886
|
] }, item);
|
|
3152
3887
|
}),
|
|
3153
|
-
/* @__PURE__ */ (0,
|
|
3888
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3154
3889
|
Button,
|
|
3155
3890
|
{
|
|
3156
3891
|
"aria-label": "P\xE1gina siguiente",
|
|
3157
|
-
isDisabled:
|
|
3158
|
-
onPress: () => onPageChange(
|
|
3892
|
+
isDisabled: currentPage >= totalPages,
|
|
3893
|
+
onPress: () => onPageChange(currentPage + 1),
|
|
3159
3894
|
size: "icon",
|
|
3160
3895
|
variant: "ghost",
|
|
3161
|
-
children: /* @__PURE__ */ (0,
|
|
3896
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react12.ChevronRight, {})
|
|
3162
3897
|
}
|
|
3163
3898
|
)
|
|
3164
3899
|
] })
|
|
@@ -3168,17 +3903,18 @@ function Pagination({
|
|
|
3168
3903
|
}
|
|
3169
3904
|
|
|
3170
3905
|
// src/ui/popover/popover.tsx
|
|
3171
|
-
var
|
|
3172
|
-
var
|
|
3173
|
-
var PopoverTrigger =
|
|
3906
|
+
var import_react_aria_components21 = require("react-aria-components");
|
|
3907
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
3908
|
+
var PopoverTrigger = import_react_aria_components21.DialogTrigger;
|
|
3174
3909
|
function PopoverContent({ className, ...props }) {
|
|
3175
|
-
return /* @__PURE__ */ (0,
|
|
3176
|
-
|
|
3910
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3911
|
+
import_react_aria_components21.Popover,
|
|
3177
3912
|
{
|
|
3178
3913
|
"data-slot": "popover",
|
|
3179
3914
|
offset: 6,
|
|
3180
3915
|
className: cn(
|
|
3181
|
-
|
|
3916
|
+
floatingSurfaceClassName,
|
|
3917
|
+
"min-w-48 rounded-xl border border-border bg-background p-1.5 text-foreground",
|
|
3182
3918
|
className
|
|
3183
3919
|
),
|
|
3184
3920
|
...props
|
|
@@ -3186,19 +3922,19 @@ function PopoverContent({ className, ...props }) {
|
|
|
3186
3922
|
);
|
|
3187
3923
|
}
|
|
3188
3924
|
function Popover4(props) {
|
|
3189
|
-
if (!("trigger" in props)) return /* @__PURE__ */ (0,
|
|
3925
|
+
if (!("trigger" in props)) return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(PopoverContent, { ...props });
|
|
3190
3926
|
const { children, trigger, triggerProps, defaultOpen, isOpen, onOpenChange, ...contentProps } = props;
|
|
3191
|
-
const triggerElement = typeof trigger === "string" ? /* @__PURE__ */ (0,
|
|
3192
|
-
return /* @__PURE__ */ (0,
|
|
3927
|
+
const triggerElement = typeof trigger === "string" ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Button, { ...triggerProps, children: trigger }) : trigger;
|
|
3928
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(PopoverTrigger, { defaultOpen, isOpen, onOpenChange, children: [
|
|
3193
3929
|
triggerElement,
|
|
3194
|
-
/* @__PURE__ */ (0,
|
|
3930
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(PopoverContent, { ...contentProps, children })
|
|
3195
3931
|
] });
|
|
3196
3932
|
}
|
|
3197
3933
|
|
|
3198
3934
|
// src/ui/quantity-input/quantity-input.tsx
|
|
3199
|
-
var
|
|
3200
|
-
var
|
|
3201
|
-
var
|
|
3935
|
+
var import_lucide_react13 = require("lucide-react");
|
|
3936
|
+
var import_react_aria_components22 = require("react-aria-components");
|
|
3937
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
3202
3938
|
function QuantityInput({
|
|
3203
3939
|
className,
|
|
3204
3940
|
inputClassName,
|
|
@@ -3208,8 +3944,8 @@ function QuantityInput({
|
|
|
3208
3944
|
step = 1,
|
|
3209
3945
|
...props
|
|
3210
3946
|
}) {
|
|
3211
|
-
return /* @__PURE__ */ (0,
|
|
3212
|
-
|
|
3947
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
3948
|
+
import_react_aria_components22.NumberField,
|
|
3213
3949
|
{
|
|
3214
3950
|
...props,
|
|
3215
3951
|
minValue,
|
|
@@ -3219,24 +3955,24 @@ function QuantityInput({
|
|
|
3219
3955
|
"group/quantity-input inline-flex min-w-0 data-disabled:cursor-not-allowed data-disabled:opacity-50",
|
|
3220
3956
|
className
|
|
3221
3957
|
),
|
|
3222
|
-
children: /* @__PURE__ */ (0,
|
|
3223
|
-
|
|
3958
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
3959
|
+
import_react_aria_components22.Group,
|
|
3224
3960
|
{
|
|
3225
3961
|
"data-slot": "quantity-input-group",
|
|
3226
3962
|
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
3963
|
children: [
|
|
3228
|
-
/* @__PURE__ */ (0,
|
|
3229
|
-
|
|
3964
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
3965
|
+
import_react_aria_components22.Button,
|
|
3230
3966
|
{
|
|
3231
3967
|
slot: "decrement",
|
|
3232
3968
|
"aria-label": decrementAriaLabel,
|
|
3233
3969
|
"data-slot": "quantity-input-decrement",
|
|
3234
3970
|
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,
|
|
3971
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react13.Minus, { "aria-hidden": "true", className: "size-4" })
|
|
3236
3972
|
}
|
|
3237
3973
|
),
|
|
3238
|
-
/* @__PURE__ */ (0,
|
|
3239
|
-
|
|
3974
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
3975
|
+
import_react_aria_components22.Input,
|
|
3240
3976
|
{
|
|
3241
3977
|
"data-slot": "quantity-input-value",
|
|
3242
3978
|
className: cn(
|
|
@@ -3245,14 +3981,14 @@ function QuantityInput({
|
|
|
3245
3981
|
)
|
|
3246
3982
|
}
|
|
3247
3983
|
),
|
|
3248
|
-
/* @__PURE__ */ (0,
|
|
3249
|
-
|
|
3984
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
3985
|
+
import_react_aria_components22.Button,
|
|
3250
3986
|
{
|
|
3251
3987
|
slot: "increment",
|
|
3252
3988
|
"aria-label": incrementAriaLabel,
|
|
3253
3989
|
"data-slot": "quantity-input-increment",
|
|
3254
3990
|
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,
|
|
3991
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react13.Plus, { "aria-hidden": "true", className: "size-4" })
|
|
3256
3992
|
}
|
|
3257
3993
|
)
|
|
3258
3994
|
]
|
|
@@ -3263,13 +3999,13 @@ function QuantityInput({
|
|
|
3263
3999
|
}
|
|
3264
4000
|
|
|
3265
4001
|
// src/ui/select/select.tsx
|
|
3266
|
-
var
|
|
3267
|
-
var
|
|
3268
|
-
var
|
|
3269
|
-
var Select =
|
|
4002
|
+
var import_lucide_react14 = require("lucide-react");
|
|
4003
|
+
var import_react_aria_components23 = require("react-aria-components");
|
|
4004
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
4005
|
+
var Select = import_react_aria_components23.Select;
|
|
3270
4006
|
function SelectTrigger({ className, children, ...props }) {
|
|
3271
|
-
return /* @__PURE__ */ (0,
|
|
3272
|
-
|
|
4007
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
4008
|
+
import_react_aria_components23.Button,
|
|
3273
4009
|
{
|
|
3274
4010
|
"data-slot": "select-trigger",
|
|
3275
4011
|
className: cn(
|
|
@@ -3277,10 +4013,10 @@ function SelectTrigger({ className, children, ...props }) {
|
|
|
3277
4013
|
className
|
|
3278
4014
|
),
|
|
3279
4015
|
...props,
|
|
3280
|
-
children: (state) => /* @__PURE__ */ (0,
|
|
4016
|
+
children: (state) => /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
|
|
3281
4017
|
typeof children === "function" ? children(state) : children,
|
|
3282
|
-
/* @__PURE__ */ (0,
|
|
3283
|
-
|
|
4018
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
4019
|
+
import_lucide_react14.ChevronDown,
|
|
3284
4020
|
{
|
|
3285
4021
|
"aria-hidden": "true",
|
|
3286
4022
|
className: "text-muted-foreground ml-auto size-4 transition-transform group-data-pressed/select-trigger:rotate-180 motion-reduce:transition-none"
|
|
@@ -3291,8 +4027,8 @@ function SelectTrigger({ className, children, ...props }) {
|
|
|
3291
4027
|
);
|
|
3292
4028
|
}
|
|
3293
4029
|
function SelectValue({ className, ...props }) {
|
|
3294
|
-
return /* @__PURE__ */ (0,
|
|
3295
|
-
|
|
4030
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
4031
|
+
import_react_aria_components23.SelectValue,
|
|
3296
4032
|
{
|
|
3297
4033
|
"data-slot": "select-value",
|
|
3298
4034
|
className: cn("flex-1 truncate data-placeholder:text-muted-foreground", className),
|
|
@@ -3301,12 +4037,13 @@ function SelectValue({ className, ...props }) {
|
|
|
3301
4037
|
);
|
|
3302
4038
|
}
|
|
3303
4039
|
function SelectContent({ className, ...props }) {
|
|
3304
|
-
return /* @__PURE__ */ (0,
|
|
3305
|
-
|
|
4040
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
4041
|
+
import_react_aria_components23.Popover,
|
|
3306
4042
|
{
|
|
3307
4043
|
"data-slot": "select-content",
|
|
3308
4044
|
className: cn(
|
|
3309
|
-
|
|
4045
|
+
floatingSurfaceClassName,
|
|
4046
|
+
"w-(--trigger-width) overflow-hidden rounded-xl border border-border bg-background p-1.5 text-foreground",
|
|
3310
4047
|
className
|
|
3311
4048
|
),
|
|
3312
4049
|
...props
|
|
@@ -3314,8 +4051,8 @@ function SelectContent({ className, ...props }) {
|
|
|
3314
4051
|
);
|
|
3315
4052
|
}
|
|
3316
4053
|
function SelectList({ className, ...props }) {
|
|
3317
|
-
return /* @__PURE__ */ (0,
|
|
3318
|
-
|
|
4054
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
4055
|
+
import_react_aria_components23.ListBox,
|
|
3319
4056
|
{
|
|
3320
4057
|
"data-slot": "select-list",
|
|
3321
4058
|
className: cn("max-h-64 overflow-y-auto", className),
|
|
@@ -3328,8 +4065,8 @@ function SelectItem({
|
|
|
3328
4065
|
children,
|
|
3329
4066
|
...props
|
|
3330
4067
|
}) {
|
|
3331
|
-
return /* @__PURE__ */ (0,
|
|
3332
|
-
|
|
4068
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
4069
|
+
import_react_aria_components23.ListBoxItem,
|
|
3333
4070
|
{
|
|
3334
4071
|
"data-slot": "select-item",
|
|
3335
4072
|
className: cn(
|
|
@@ -3342,189 +4079,51 @@ function SelectItem({
|
|
|
3342
4079
|
);
|
|
3343
4080
|
}
|
|
3344
4081
|
|
|
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({
|
|
3366
|
-
className,
|
|
3367
|
-
children,
|
|
3368
|
-
...props
|
|
3369
|
-
}) {
|
|
3370
|
-
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3371
|
-
import_react_aria_components23.ModalOverlay,
|
|
3372
|
-
{
|
|
3373
|
-
"data-slot": "sheet-overlay",
|
|
3374
|
-
isDismissable: true,
|
|
3375
|
-
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",
|
|
3377
|
-
className
|
|
3378
|
-
),
|
|
3379
|
-
...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
|
|
3483
|
-
}
|
|
3484
|
-
);
|
|
3485
|
-
}
|
|
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
|
-
|
|
3494
4082
|
// src/ui/sidebar/sidebar.tsx
|
|
3495
|
-
var
|
|
3496
|
-
var
|
|
4083
|
+
var import_lucide_react15 = require("lucide-react");
|
|
4084
|
+
var import_react16 = require("react");
|
|
3497
4085
|
var import_react_aria_components24 = require("react-aria-components");
|
|
3498
4086
|
|
|
3499
4087
|
// src/ui/sidebar/sidebar-context.ts
|
|
3500
|
-
var
|
|
3501
|
-
var SidebarContext = (0,
|
|
4088
|
+
var import_react15 = require("react");
|
|
4089
|
+
var SidebarContext = (0, import_react15.createContext)(null);
|
|
3502
4090
|
function useSidebar() {
|
|
3503
|
-
const context = (0,
|
|
4091
|
+
const context = (0, import_react15.useContext)(SidebarContext);
|
|
3504
4092
|
if (!context) throw new Error("useSidebar must be used inside SidebarProvider");
|
|
3505
4093
|
return context;
|
|
3506
4094
|
}
|
|
3507
4095
|
|
|
3508
4096
|
// src/ui/sidebar/sidebar.tsx
|
|
3509
|
-
var
|
|
4097
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
3510
4098
|
function SidebarProvider({
|
|
3511
4099
|
defaultCollapsed = false,
|
|
4100
|
+
collapsed: controlledCollapsed,
|
|
4101
|
+
onCollapsedChange,
|
|
3512
4102
|
children
|
|
3513
4103
|
}) {
|
|
3514
|
-
const [
|
|
3515
|
-
const
|
|
4104
|
+
const [uncontrolledCollapsed, setUncontrolledCollapsed] = (0, import_react16.useState)(defaultCollapsed);
|
|
4105
|
+
const collapsed = controlledCollapsed ?? uncontrolledCollapsed;
|
|
4106
|
+
const setCollapsed = (0, import_react16.useCallback)(
|
|
4107
|
+
(next) => {
|
|
4108
|
+
if (controlledCollapsed === void 0) setUncontrolledCollapsed(next);
|
|
4109
|
+
onCollapsedChange?.(next);
|
|
4110
|
+
},
|
|
4111
|
+
[controlledCollapsed, onCollapsedChange]
|
|
4112
|
+
);
|
|
4113
|
+
const toggle = (0, import_react16.useCallback)(() => setCollapsed(!collapsed), [collapsed, setCollapsed]);
|
|
4114
|
+
const value = (0, import_react16.useMemo)(
|
|
3516
4115
|
() => ({
|
|
3517
4116
|
collapsed,
|
|
3518
4117
|
setCollapsed,
|
|
3519
|
-
toggle
|
|
4118
|
+
toggle
|
|
3520
4119
|
}),
|
|
3521
|
-
[collapsed]
|
|
4120
|
+
[collapsed, setCollapsed, toggle]
|
|
3522
4121
|
);
|
|
3523
|
-
return /* @__PURE__ */ (0,
|
|
4122
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(SidebarContext.Provider, { value, children });
|
|
3524
4123
|
}
|
|
3525
4124
|
function Sidebar({ className, ...props }) {
|
|
3526
4125
|
const { collapsed } = useSidebar();
|
|
3527
|
-
return /* @__PURE__ */ (0,
|
|
4126
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
3528
4127
|
"aside",
|
|
3529
4128
|
{
|
|
3530
4129
|
"data-slot": "sidebar",
|
|
@@ -3538,7 +4137,7 @@ function Sidebar({ className, ...props }) {
|
|
|
3538
4137
|
);
|
|
3539
4138
|
}
|
|
3540
4139
|
function SidebarHeader({ className, ...props }) {
|
|
3541
|
-
return /* @__PURE__ */ (0,
|
|
4140
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
3542
4141
|
"div",
|
|
3543
4142
|
{
|
|
3544
4143
|
"data-slot": "sidebar-header",
|
|
@@ -3553,7 +4152,7 @@ function SidebarSearch({
|
|
|
3553
4152
|
className,
|
|
3554
4153
|
...props
|
|
3555
4154
|
}) {
|
|
3556
|
-
return /* @__PURE__ */ (0,
|
|
4155
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
3557
4156
|
"button",
|
|
3558
4157
|
{
|
|
3559
4158
|
type: "button",
|
|
@@ -3564,15 +4163,15 @@ function SidebarSearch({
|
|
|
3564
4163
|
),
|
|
3565
4164
|
...props,
|
|
3566
4165
|
children: [
|
|
3567
|
-
/* @__PURE__ */ (0,
|
|
3568
|
-
/* @__PURE__ */ (0,
|
|
3569
|
-
/* @__PURE__ */ (0,
|
|
4166
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_lucide_react15.Search, { className: "size-4 shrink-0" }),
|
|
4167
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "flex-1 text-left", children: label }),
|
|
4168
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("kbd", { className: "bg-secondary text-muted-foreground rounded px-1.5 py-0.5 font-mono text-[10px]", children: shortcut })
|
|
3570
4169
|
]
|
|
3571
4170
|
}
|
|
3572
4171
|
);
|
|
3573
4172
|
}
|
|
3574
4173
|
function SidebarContent({ className, ...props }) {
|
|
3575
|
-
return /* @__PURE__ */ (0,
|
|
4174
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
3576
4175
|
"nav",
|
|
3577
4176
|
{
|
|
3578
4177
|
"data-slot": "sidebar-content",
|
|
@@ -3583,7 +4182,7 @@ function SidebarContent({ className, ...props }) {
|
|
|
3583
4182
|
);
|
|
3584
4183
|
}
|
|
3585
4184
|
function SidebarFooter({ className, ...props }) {
|
|
3586
|
-
return /* @__PURE__ */ (0,
|
|
4185
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
3587
4186
|
"div",
|
|
3588
4187
|
{
|
|
3589
4188
|
"data-slot": "sidebar-footer",
|
|
@@ -3599,8 +4198,8 @@ function SidebarGroup({
|
|
|
3599
4198
|
...props
|
|
3600
4199
|
}) {
|
|
3601
4200
|
const { collapsed } = useSidebar();
|
|
3602
|
-
return /* @__PURE__ */ (0,
|
|
3603
|
-
label && /* @__PURE__ */ (0,
|
|
4201
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("section", { "data-slot": "sidebar-group", className: cn("mb-4 last:mb-0", className), ...props, children: [
|
|
4202
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
3604
4203
|
"h2",
|
|
3605
4204
|
{
|
|
3606
4205
|
className: cn(
|
|
@@ -3624,7 +4223,7 @@ function SidebarItem({
|
|
|
3624
4223
|
}) {
|
|
3625
4224
|
const { collapsed } = useSidebar();
|
|
3626
4225
|
const content = typeof children === "function" ? label : children ?? label;
|
|
3627
|
-
return /* @__PURE__ */ (0,
|
|
4226
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
3628
4227
|
import_react_aria_components24.Link,
|
|
3629
4228
|
{
|
|
3630
4229
|
"data-slot": "sidebar-item",
|
|
@@ -3636,16 +4235,16 @@ function SidebarItem({
|
|
|
3636
4235
|
typeof className === "function" ? className : className
|
|
3637
4236
|
),
|
|
3638
4237
|
...props,
|
|
3639
|
-
children: (values) => /* @__PURE__ */ (0,
|
|
3640
|
-
/* @__PURE__ */ (0,
|
|
3641
|
-
/* @__PURE__ */ (0,
|
|
3642
|
-
badge && !collapsed && /* @__PURE__ */ (0,
|
|
4238
|
+
children: (values) => /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
|
|
4239
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "flex size-4 shrink-0 items-center justify-center", children: icon }),
|
|
4240
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: cn("min-w-0 flex-1 truncate", collapsed && "sr-only"), children: typeof children === "function" ? children(values) : content }),
|
|
4241
|
+
badge && !collapsed && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "text-muted-foreground text-xs", children: badge })
|
|
3643
4242
|
] })
|
|
3644
4243
|
}
|
|
3645
4244
|
);
|
|
3646
4245
|
}
|
|
3647
4246
|
function SidebarSeparator({ className, ...props }) {
|
|
3648
|
-
return /* @__PURE__ */ (0,
|
|
4247
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
3649
4248
|
"hr",
|
|
3650
4249
|
{
|
|
3651
4250
|
"data-slot": "sidebar-separator",
|
|
@@ -3656,37 +4255,45 @@ function SidebarSeparator({ className, ...props }) {
|
|
|
3656
4255
|
}
|
|
3657
4256
|
function SidebarTrigger({ className, ...props }) {
|
|
3658
4257
|
const { collapsed, toggle } = useSidebar();
|
|
3659
|
-
|
|
4258
|
+
const { onPress, ...buttonProps } = props;
|
|
4259
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
3660
4260
|
Button,
|
|
3661
4261
|
{
|
|
3662
4262
|
"aria-label": collapsed ? "Expandir navegaci\xF3n" : "Colapsar navegaci\xF3n",
|
|
3663
|
-
onPress:
|
|
4263
|
+
onPress: (event) => {
|
|
4264
|
+
onPress?.(event);
|
|
4265
|
+
toggle();
|
|
4266
|
+
},
|
|
3664
4267
|
size: "icon",
|
|
3665
4268
|
variant: "ghost",
|
|
3666
4269
|
className: cn("ml-auto", className),
|
|
3667
|
-
...
|
|
3668
|
-
children: collapsed ? /* @__PURE__ */ (0,
|
|
4270
|
+
...buttonProps,
|
|
4271
|
+
children: collapsed ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_lucide_react15.ChevronRight, {}) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_lucide_react15.ChevronLeft, {})
|
|
3669
4272
|
}
|
|
3670
4273
|
);
|
|
3671
4274
|
}
|
|
3672
4275
|
function SidebarRail({ className, ...props }) {
|
|
3673
4276
|
const { toggle } = useSidebar();
|
|
3674
|
-
|
|
4277
|
+
const { onClick, ...buttonProps } = props;
|
|
4278
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
3675
4279
|
"button",
|
|
3676
4280
|
{
|
|
3677
4281
|
type: "button",
|
|
3678
4282
|
"aria-label": "Alternar navegaci\xF3n",
|
|
3679
|
-
onClick:
|
|
4283
|
+
onClick: (event) => {
|
|
4284
|
+
onClick?.(event);
|
|
4285
|
+
if (!event.defaultPrevented) toggle();
|
|
4286
|
+
},
|
|
3680
4287
|
className: cn(
|
|
3681
4288
|
"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
4289
|
className
|
|
3683
4290
|
),
|
|
3684
|
-
...
|
|
4291
|
+
...buttonProps
|
|
3685
4292
|
}
|
|
3686
4293
|
);
|
|
3687
4294
|
}
|
|
3688
4295
|
function SidebarMore({ className, ...props }) {
|
|
3689
|
-
return /* @__PURE__ */ (0,
|
|
4296
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
3690
4297
|
Button,
|
|
3691
4298
|
{
|
|
3692
4299
|
"aria-label": "M\xE1s opciones",
|
|
@@ -3694,15 +4301,15 @@ function SidebarMore({ className, ...props }) {
|
|
|
3694
4301
|
variant: "ghost",
|
|
3695
4302
|
className: cn("size-7", className),
|
|
3696
4303
|
...props,
|
|
3697
|
-
children: /* @__PURE__ */ (0,
|
|
4304
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_lucide_react15.Ellipsis, {})
|
|
3698
4305
|
}
|
|
3699
4306
|
);
|
|
3700
4307
|
}
|
|
3701
4308
|
|
|
3702
4309
|
// src/ui/skeleton/skeleton.tsx
|
|
3703
|
-
var
|
|
4310
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
3704
4311
|
function Skeleton({ className, ...props }) {
|
|
3705
|
-
return /* @__PURE__ */ (0,
|
|
4312
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
3706
4313
|
"div",
|
|
3707
4314
|
{
|
|
3708
4315
|
"aria-hidden": "true",
|
|
@@ -3714,10 +4321,10 @@ function Skeleton({ className, ...props }) {
|
|
|
3714
4321
|
}
|
|
3715
4322
|
|
|
3716
4323
|
// src/ui/submit-button/submit-button.tsx
|
|
3717
|
-
var
|
|
3718
|
-
var
|
|
4324
|
+
var import_lucide_react16 = require("lucide-react");
|
|
4325
|
+
var import_react17 = require("react");
|
|
3719
4326
|
var import_react_dom = require("react-dom");
|
|
3720
|
-
var
|
|
4327
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
3721
4328
|
function assignRef(ref, node) {
|
|
3722
4329
|
if (typeof ref === "function") {
|
|
3723
4330
|
ref(node);
|
|
@@ -3738,21 +4345,21 @@ function SubmitButton({
|
|
|
3738
4345
|
const { pending } = (0, import_react_dom.useFormStatus)();
|
|
3739
4346
|
const busy = pending || loading;
|
|
3740
4347
|
const label = loadingLabel ?? pendingLabel ?? "Guardando\u2026";
|
|
3741
|
-
const buttonRef = (0,
|
|
3742
|
-
const setButtonRef = (0,
|
|
4348
|
+
const buttonRef = (0, import_react17.useRef)(null);
|
|
4349
|
+
const setButtonRef = (0, import_react17.useCallback)(
|
|
3743
4350
|
(node) => {
|
|
3744
4351
|
buttonRef.current = node;
|
|
3745
4352
|
assignRef(forwardedRef, node);
|
|
3746
4353
|
},
|
|
3747
4354
|
[forwardedRef]
|
|
3748
4355
|
);
|
|
3749
|
-
(0,
|
|
4356
|
+
(0, import_react17.useLayoutEffect)(() => {
|
|
3750
4357
|
const button = buttonRef.current;
|
|
3751
4358
|
if (!button) return;
|
|
3752
4359
|
if (busy) button.setAttribute("aria-busy", "true");
|
|
3753
4360
|
else button.removeAttribute("aria-busy");
|
|
3754
4361
|
}, [busy]);
|
|
3755
|
-
return /* @__PURE__ */ (0,
|
|
4362
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
3756
4363
|
Button,
|
|
3757
4364
|
{
|
|
3758
4365
|
ref: setButtonRef,
|
|
@@ -3761,8 +4368,8 @@ function SubmitButton({
|
|
|
3761
4368
|
isDisabled: busy || isDisabled,
|
|
3762
4369
|
"aria-busy": busy || void 0,
|
|
3763
4370
|
...props,
|
|
3764
|
-
children: busy ? /* @__PURE__ */ (0,
|
|
3765
|
-
/* @__PURE__ */ (0,
|
|
4371
|
+
children: busy ? /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
|
|
4372
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react16.LoaderCircle, { "aria-hidden": "true", className: "size-3.5 motion-safe:animate-spin" }),
|
|
3766
4373
|
label
|
|
3767
4374
|
] }) : children
|
|
3768
4375
|
}
|
|
@@ -3770,9 +4377,9 @@ function SubmitButton({
|
|
|
3770
4377
|
}
|
|
3771
4378
|
|
|
3772
4379
|
// src/ui/switch/switch.tsx
|
|
3773
|
-
var
|
|
4380
|
+
var import_react18 = require("react");
|
|
3774
4381
|
var import_react_aria_components25 = require("react-aria-components");
|
|
3775
|
-
var
|
|
4382
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
3776
4383
|
var switchSizes = {
|
|
3777
4384
|
sm: {
|
|
3778
4385
|
control: "h-4 w-[1.875rem] p-0.5",
|
|
@@ -3812,9 +4419,9 @@ function Switch({
|
|
|
3812
4419
|
...props
|
|
3813
4420
|
}) {
|
|
3814
4421
|
const styles = switchSizes[size];
|
|
3815
|
-
const fallbackInputRef = (0,
|
|
4422
|
+
const fallbackInputRef = (0, import_react18.useRef)(null);
|
|
3816
4423
|
const resolvedInputRef = inputRef ?? fallbackInputRef;
|
|
3817
|
-
(0,
|
|
4424
|
+
(0, import_react18.useEffect)(() => {
|
|
3818
4425
|
const input = resolvedInputRef.current;
|
|
3819
4426
|
if (!input) return;
|
|
3820
4427
|
const handleDirectionalKey = (event) => {
|
|
@@ -3829,7 +4436,7 @@ function Switch({
|
|
|
3829
4436
|
ownerDocument.addEventListener("keydown", handleDirectionalKey);
|
|
3830
4437
|
return () => ownerDocument.removeEventListener("keydown", handleDirectionalKey);
|
|
3831
4438
|
}, [isDisabled, isReadOnly, resolvedInputRef]);
|
|
3832
|
-
return /* @__PURE__ */ (0,
|
|
4439
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
3833
4440
|
import_react_aria_components25.Switch,
|
|
3834
4441
|
{
|
|
3835
4442
|
"data-slot": "switch",
|
|
@@ -3846,8 +4453,8 @@ function Switch({
|
|
|
3846
4453
|
children: (state) => {
|
|
3847
4454
|
const isThumbPressed = state.isPressed;
|
|
3848
4455
|
const thumbOffset = state.isSelected ? isThumbPressed ? styles.activeSelectedOffset : styles.selectedOffset : "0";
|
|
3849
|
-
return /* @__PURE__ */ (0,
|
|
3850
|
-
/* @__PURE__ */ (0,
|
|
4456
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_jsx_runtime50.Fragment, { children: [
|
|
4457
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
3851
4458
|
"span",
|
|
3852
4459
|
{
|
|
3853
4460
|
"aria-hidden": "true",
|
|
@@ -3861,7 +4468,7 @@ function Switch({
|
|
|
3861
4468
|
"group-data-focus-visible/switch:ring-3 group-data-focus-visible/switch:ring-ring/50",
|
|
3862
4469
|
styles.control
|
|
3863
4470
|
),
|
|
3864
|
-
children: /* @__PURE__ */ (0,
|
|
4471
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
3865
4472
|
"span",
|
|
3866
4473
|
{
|
|
3867
4474
|
"data-slot": "switch-thumb",
|
|
@@ -3881,9 +4488,9 @@ function Switch({
|
|
|
3881
4488
|
)
|
|
3882
4489
|
}
|
|
3883
4490
|
),
|
|
3884
|
-
children || description ? /* @__PURE__ */ (0,
|
|
3885
|
-
children ? /* @__PURE__ */ (0,
|
|
3886
|
-
description ? /* @__PURE__ */ (0,
|
|
4491
|
+
children || description ? /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("span", { className: "grid gap-0.5 leading-tight", children: [
|
|
4492
|
+
children ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { "data-slot": "switch-label", className: "font-medium", children: typeof children === "function" ? children(state) : children }) : null,
|
|
4493
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
3887
4494
|
"span",
|
|
3888
4495
|
{
|
|
3889
4496
|
"data-slot": "switch-description",
|
|
@@ -3899,9 +4506,9 @@ function Switch({
|
|
|
3899
4506
|
}
|
|
3900
4507
|
|
|
3901
4508
|
// src/ui/table/table.tsx
|
|
3902
|
-
var
|
|
4509
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
3903
4510
|
function Table({ className, ...props }) {
|
|
3904
|
-
return /* @__PURE__ */ (0,
|
|
4511
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { "data-slot": "table-container", className: "relative w-full overflow-x-auto", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
3905
4512
|
"table",
|
|
3906
4513
|
{
|
|
3907
4514
|
"data-slot": "table",
|
|
@@ -3911,10 +4518,10 @@ function Table({ className, ...props }) {
|
|
|
3911
4518
|
) });
|
|
3912
4519
|
}
|
|
3913
4520
|
function TableHeader({ className, ...props }) {
|
|
3914
|
-
return /* @__PURE__ */ (0,
|
|
4521
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("thead", { "data-slot": "table-header", className: cn("[&_tr]:border-b", className), ...props });
|
|
3915
4522
|
}
|
|
3916
4523
|
function TableBody({ className, ...props }) {
|
|
3917
|
-
return /* @__PURE__ */ (0,
|
|
4524
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
3918
4525
|
"tbody",
|
|
3919
4526
|
{
|
|
3920
4527
|
"data-slot": "table-body",
|
|
@@ -3924,7 +4531,7 @@ function TableBody({ className, ...props }) {
|
|
|
3924
4531
|
);
|
|
3925
4532
|
}
|
|
3926
4533
|
function TableRow({ className, ...props }) {
|
|
3927
|
-
return /* @__PURE__ */ (0,
|
|
4534
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
3928
4535
|
"tr",
|
|
3929
4536
|
{
|
|
3930
4537
|
"data-slot": "table-row",
|
|
@@ -3937,7 +4544,7 @@ function TableRow({ className, ...props }) {
|
|
|
3937
4544
|
);
|
|
3938
4545
|
}
|
|
3939
4546
|
function TableHead({ className, ...props }) {
|
|
3940
|
-
return /* @__PURE__ */ (0,
|
|
4547
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
3941
4548
|
"th",
|
|
3942
4549
|
{
|
|
3943
4550
|
"data-slot": "table-head",
|
|
@@ -3950,7 +4557,7 @@ function TableHead({ className, ...props }) {
|
|
|
3950
4557
|
);
|
|
3951
4558
|
}
|
|
3952
4559
|
function TableCell({ className, ...props }) {
|
|
3953
|
-
return /* @__PURE__ */ (0,
|
|
4560
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
3954
4561
|
"td",
|
|
3955
4562
|
{
|
|
3956
4563
|
"data-slot": "table-cell",
|
|
@@ -3960,7 +4567,7 @@ function TableCell({ className, ...props }) {
|
|
|
3960
4567
|
);
|
|
3961
4568
|
}
|
|
3962
4569
|
function TableCaption({ className, ...props }) {
|
|
3963
|
-
return /* @__PURE__ */ (0,
|
|
4570
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
3964
4571
|
"caption",
|
|
3965
4572
|
{
|
|
3966
4573
|
"data-slot": "table-caption",
|
|
@@ -3970,7 +4577,7 @@ function TableCaption({ className, ...props }) {
|
|
|
3970
4577
|
);
|
|
3971
4578
|
}
|
|
3972
4579
|
function TableFooter({ className, ...props }) {
|
|
3973
|
-
return /* @__PURE__ */ (0,
|
|
4580
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
3974
4581
|
"tfoot",
|
|
3975
4582
|
{
|
|
3976
4583
|
"data-slot": "table-footer",
|
|
@@ -3982,12 +4589,50 @@ function TableFooter({ className, ...props }) {
|
|
|
3982
4589
|
}
|
|
3983
4590
|
);
|
|
3984
4591
|
}
|
|
4592
|
+
function TableToolbar({ className, ...props }) {
|
|
4593
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
4594
|
+
"div",
|
|
4595
|
+
{
|
|
4596
|
+
"data-slot": "table-toolbar",
|
|
4597
|
+
className: cn("flex flex-wrap items-center justify-between gap-2 py-2", className),
|
|
4598
|
+
...props
|
|
4599
|
+
}
|
|
4600
|
+
);
|
|
4601
|
+
}
|
|
4602
|
+
function TableEmpty({
|
|
4603
|
+
colSpan = 1,
|
|
4604
|
+
className,
|
|
4605
|
+
children = "No hay resultados."
|
|
4606
|
+
}) {
|
|
4607
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(TableRow, { "data-slot": "table-empty", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
4608
|
+
TableCell,
|
|
4609
|
+
{
|
|
4610
|
+
colSpan,
|
|
4611
|
+
className: cn("h-24 text-center text-muted-foreground", className),
|
|
4612
|
+
children
|
|
4613
|
+
}
|
|
4614
|
+
) });
|
|
4615
|
+
}
|
|
4616
|
+
function TableLoading({
|
|
4617
|
+
colSpan = 1,
|
|
4618
|
+
className,
|
|
4619
|
+
children = "Cargando\u2026"
|
|
4620
|
+
}) {
|
|
4621
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(TableRow, { "data-slot": "table-loading", "aria-busy": "true", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
4622
|
+
TableCell,
|
|
4623
|
+
{
|
|
4624
|
+
colSpan,
|
|
4625
|
+
className: cn("h-24 text-center text-muted-foreground", className),
|
|
4626
|
+
children
|
|
4627
|
+
}
|
|
4628
|
+
) });
|
|
4629
|
+
}
|
|
3985
4630
|
|
|
3986
4631
|
// src/ui/tabs/tabs.tsx
|
|
3987
4632
|
var import_react_aria_components26 = require("react-aria-components");
|
|
3988
|
-
var
|
|
4633
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
3989
4634
|
function Tabs({ className, ...props }) {
|
|
3990
|
-
return /* @__PURE__ */ (0,
|
|
4635
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
3991
4636
|
import_react_aria_components26.Tabs,
|
|
3992
4637
|
{
|
|
3993
4638
|
"data-slot": "tabs",
|
|
@@ -3997,7 +4642,7 @@ function Tabs({ className, ...props }) {
|
|
|
3997
4642
|
);
|
|
3998
4643
|
}
|
|
3999
4644
|
function TabsList({ className, ...props }) {
|
|
4000
|
-
return /* @__PURE__ */ (0,
|
|
4645
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
4001
4646
|
import_react_aria_components26.TabList,
|
|
4002
4647
|
{
|
|
4003
4648
|
"data-slot": "tabs-list",
|
|
@@ -4013,7 +4658,7 @@ function TabsList({ className, ...props }) {
|
|
|
4013
4658
|
);
|
|
4014
4659
|
}
|
|
4015
4660
|
function TabsTrigger({ className, ...props }) {
|
|
4016
|
-
return /* @__PURE__ */ (0,
|
|
4661
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
4017
4662
|
import_react_aria_components26.Tab,
|
|
4018
4663
|
{
|
|
4019
4664
|
"data-slot": "tabs-trigger",
|
|
@@ -4029,10 +4674,10 @@ function TabsTrigger({ className, ...props }) {
|
|
|
4029
4674
|
);
|
|
4030
4675
|
}
|
|
4031
4676
|
function TabsPanels({ className, ...props }) {
|
|
4032
|
-
return /* @__PURE__ */ (0,
|
|
4677
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_react_aria_components26.TabPanels, { "data-slot": "tabs-panels", className: cn("min-w-0", className), ...props });
|
|
4033
4678
|
}
|
|
4034
4679
|
function TabsContent({ className, ...props }) {
|
|
4035
|
-
return /* @__PURE__ */ (0,
|
|
4680
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
4036
4681
|
import_react_aria_components26.TabPanel,
|
|
4037
4682
|
{
|
|
4038
4683
|
"data-slot": "tabs-content",
|
|
@@ -4046,7 +4691,7 @@ function TabsContent({ className, ...props }) {
|
|
|
4046
4691
|
}
|
|
4047
4692
|
|
|
4048
4693
|
// src/ui/toast/toast.tsx
|
|
4049
|
-
var
|
|
4694
|
+
var import_react19 = require("react");
|
|
4050
4695
|
var import_sileo2 = require("sileo");
|
|
4051
4696
|
|
|
4052
4697
|
// src/ui/toast/toast-store.ts
|
|
@@ -4096,15 +4741,15 @@ function useToast() {
|
|
|
4096
4741
|
}
|
|
4097
4742
|
|
|
4098
4743
|
// src/ui/toast/toast.tsx
|
|
4099
|
-
var
|
|
4744
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
4100
4745
|
function ToastProvider({ children }) {
|
|
4101
|
-
return /* @__PURE__ */ (0,
|
|
4746
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_jsx_runtime53.Fragment, { children: [
|
|
4102
4747
|
children,
|
|
4103
|
-
/* @__PURE__ */ (0,
|
|
4748
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Toaster, {})
|
|
4104
4749
|
] });
|
|
4105
4750
|
}
|
|
4106
4751
|
function Toaster({ position }) {
|
|
4107
|
-
return /* @__PURE__ */ (0,
|
|
4752
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_sileo2.Toaster, { position, options: { fill: "var(--ui-secondary)" } });
|
|
4108
4753
|
}
|
|
4109
4754
|
function ToastViewport({
|
|
4110
4755
|
position,
|
|
@@ -4113,7 +4758,7 @@ function ToastViewport({
|
|
|
4113
4758
|
}) {
|
|
4114
4759
|
void className;
|
|
4115
4760
|
if (visiblePosition && visiblePosition !== position) return null;
|
|
4116
|
-
return /* @__PURE__ */ (0,
|
|
4761
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Toaster, { position });
|
|
4117
4762
|
}
|
|
4118
4763
|
function Toast({
|
|
4119
4764
|
id,
|
|
@@ -4126,7 +4771,7 @@ function Toast({
|
|
|
4126
4771
|
position,
|
|
4127
4772
|
onDismiss
|
|
4128
4773
|
}) {
|
|
4129
|
-
(0,
|
|
4774
|
+
(0, import_react19.useEffect)(() => {
|
|
4130
4775
|
if (state !== "open") return;
|
|
4131
4776
|
const toastId = toast({ title, description, variant, action, duration, position });
|
|
4132
4777
|
return () => {
|
|
@@ -4138,9 +4783,9 @@ function Toast({
|
|
|
4138
4783
|
}
|
|
4139
4784
|
|
|
4140
4785
|
// src/ui/toolbar/toolbar.tsx
|
|
4141
|
-
var
|
|
4786
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
4142
4787
|
function Toolbar({ className, ...props }) {
|
|
4143
|
-
return /* @__PURE__ */ (0,
|
|
4788
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
4144
4789
|
"div",
|
|
4145
4790
|
{
|
|
4146
4791
|
role: "toolbar",
|
|
@@ -4151,7 +4796,7 @@ function Toolbar({ className, ...props }) {
|
|
|
4151
4796
|
);
|
|
4152
4797
|
}
|
|
4153
4798
|
function ToolbarGroup({ className, ...props }) {
|
|
4154
|
-
return /* @__PURE__ */ (0,
|
|
4799
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
4155
4800
|
"div",
|
|
4156
4801
|
{
|
|
4157
4802
|
"data-slot": "toolbar-group",
|
|
@@ -4161,7 +4806,7 @@ function ToolbarGroup({ className, ...props }) {
|
|
|
4161
4806
|
);
|
|
4162
4807
|
}
|
|
4163
4808
|
function ToolbarSpacer({ className, ...props }) {
|
|
4164
|
-
return /* @__PURE__ */ (0,
|
|
4809
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { "aria-hidden": "true", className: cn("hidden flex-1 sm:block", className), ...props });
|
|
4165
4810
|
}
|
|
4166
4811
|
// Annotate the CommonJS export names for ESM import in node:
|
|
4167
4812
|
0 && (module.exports = {
|
|
@@ -4169,6 +4814,7 @@ function ToolbarSpacer({ className, ...props }) {
|
|
|
4169
4814
|
AccordionContent,
|
|
4170
4815
|
AccordionItem,
|
|
4171
4816
|
AccordionTrigger,
|
|
4817
|
+
ActiveFilters,
|
|
4172
4818
|
Alert,
|
|
4173
4819
|
AlertAction,
|
|
4174
4820
|
AlertDescription,
|
|
@@ -4190,6 +4836,7 @@ function ToolbarSpacer({ className, ...props }) {
|
|
|
4190
4836
|
AppShellMain,
|
|
4191
4837
|
AppShellMobileHeader,
|
|
4192
4838
|
AppShellSidebar,
|
|
4839
|
+
AsyncBoundary,
|
|
4193
4840
|
AutocompleteCombobox,
|
|
4194
4841
|
Avatar,
|
|
4195
4842
|
AvatarBadge,
|
|
@@ -4231,7 +4878,20 @@ function ToolbarSpacer({ className, ...props }) {
|
|
|
4231
4878
|
CommandItem,
|
|
4232
4879
|
CommandList,
|
|
4233
4880
|
ConfirmDialog,
|
|
4881
|
+
CopyButton,
|
|
4234
4882
|
DangerZone,
|
|
4883
|
+
DataViewState,
|
|
4884
|
+
DataViewStateActions,
|
|
4885
|
+
DataViewStateDescription,
|
|
4886
|
+
DataViewStateTitle,
|
|
4887
|
+
DescriptionDetails,
|
|
4888
|
+
DescriptionItem,
|
|
4889
|
+
DescriptionList,
|
|
4890
|
+
DescriptionTerm,
|
|
4891
|
+
DetailDrawer,
|
|
4892
|
+
DetailDrawerBody,
|
|
4893
|
+
DetailDrawerFooter,
|
|
4894
|
+
DetailDrawerHeader,
|
|
4235
4895
|
Dialog,
|
|
4236
4896
|
DialogClose,
|
|
4237
4897
|
DialogContent,
|
|
@@ -4269,6 +4929,12 @@ function ToolbarSpacer({ className, ...props }) {
|
|
|
4269
4929
|
EmptyStateHeader,
|
|
4270
4930
|
EmptyStateMedia,
|
|
4271
4931
|
EmptyStateTitle,
|
|
4932
|
+
ErrorBoundary,
|
|
4933
|
+
ErrorState,
|
|
4934
|
+
ErrorStateActions,
|
|
4935
|
+
ErrorStateDescription,
|
|
4936
|
+
ErrorStateIcon,
|
|
4937
|
+
ErrorStateTitle,
|
|
4272
4938
|
Field,
|
|
4273
4939
|
FieldContent,
|
|
4274
4940
|
FieldDescription,
|
|
@@ -4279,6 +4945,9 @@ function ToolbarSpacer({ className, ...props }) {
|
|
|
4279
4945
|
FieldSeparator,
|
|
4280
4946
|
FieldSet,
|
|
4281
4947
|
FieldTitle,
|
|
4948
|
+
FilterBar,
|
|
4949
|
+
FilterChip,
|
|
4950
|
+
FilterGroup,
|
|
4282
4951
|
FormFeedback,
|
|
4283
4952
|
FormRow,
|
|
4284
4953
|
HighlightMatch,
|
|
@@ -4306,6 +4975,7 @@ function ToolbarSpacer({ className, ...props }) {
|
|
|
4306
4975
|
MenuItem,
|
|
4307
4976
|
MenuTrigger,
|
|
4308
4977
|
MetricCard,
|
|
4978
|
+
MetricGrid,
|
|
4309
4979
|
OtpInput,
|
|
4310
4980
|
PageHeader,
|
|
4311
4981
|
PageHeaderActions,
|
|
@@ -4317,12 +4987,18 @@ function ToolbarSpacer({ className, ...props }) {
|
|
|
4317
4987
|
PopoverContent,
|
|
4318
4988
|
PopoverTrigger,
|
|
4319
4989
|
QuantityInput,
|
|
4990
|
+
SectionHeader,
|
|
4991
|
+
SectionHeaderActions,
|
|
4992
|
+
SectionHeaderDescription,
|
|
4993
|
+
SectionHeaderHeading,
|
|
4994
|
+
SectionHeaderTitle,
|
|
4320
4995
|
Select,
|
|
4321
4996
|
SelectContent,
|
|
4322
4997
|
SelectItem,
|
|
4323
4998
|
SelectList,
|
|
4324
4999
|
SelectTrigger,
|
|
4325
5000
|
SelectValue,
|
|
5001
|
+
SelectionToolbar,
|
|
4326
5002
|
Separator,
|
|
4327
5003
|
Sheet,
|
|
4328
5004
|
SheetClose,
|
|
@@ -4352,10 +5028,13 @@ function ToolbarSpacer({ className, ...props }) {
|
|
|
4352
5028
|
TableBody,
|
|
4353
5029
|
TableCaption,
|
|
4354
5030
|
TableCell,
|
|
5031
|
+
TableEmpty,
|
|
4355
5032
|
TableFooter,
|
|
4356
5033
|
TableHead,
|
|
4357
5034
|
TableHeader,
|
|
5035
|
+
TableLoading,
|
|
4358
5036
|
TableRow,
|
|
5037
|
+
TableToolbar,
|
|
4359
5038
|
Tabs,
|
|
4360
5039
|
TabsContent,
|
|
4361
5040
|
TabsList,
|
|
@@ -4383,8 +5062,16 @@ function ToolbarSpacer({ className, ...props }) {
|
|
|
4383
5062
|
formSnapshot,
|
|
4384
5063
|
getTextMatchParts,
|
|
4385
5064
|
inputGroupAddonVariants,
|
|
5065
|
+
readSearchParam,
|
|
5066
|
+
readSearchParamArray,
|
|
5067
|
+
readSearchParamEnum,
|
|
5068
|
+
readSearchParamInt,
|
|
5069
|
+
toSearchParams,
|
|
4386
5070
|
toast,
|
|
5071
|
+
updateSearchParams,
|
|
5072
|
+
useAsyncAction,
|
|
4387
5073
|
useAutosave,
|
|
5074
|
+
useClipboard,
|
|
4388
5075
|
useDebouncedValue,
|
|
4389
5076
|
useFormDirty,
|
|
4390
5077
|
useFormFeedback,
|