@doscientos/ui 0.1.22 → 0.1.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +865 -525
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +239 -33
- package/dist/index.d.ts +239 -33
- package/dist/index.js +797 -464
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -98,7 +98,7 @@ function useFormDirty() {
|
|
|
98
98
|
// src/lib/action-ripple.ts
|
|
99
99
|
import { cva } from "class-variance-authority";
|
|
100
100
|
var actionRipple = cva(
|
|
101
|
-
"relative isolate overflow-hidden
|
|
101
|
+
"relative isolate overflow-hidden"
|
|
102
102
|
);
|
|
103
103
|
|
|
104
104
|
// src/lib/cn.ts
|
|
@@ -238,10 +238,199 @@ function AccordionContent({
|
|
|
238
238
|
);
|
|
239
239
|
}
|
|
240
240
|
|
|
241
|
-
// src/ui/alert/alert.tsx
|
|
241
|
+
// src/ui/alert-dialog/alert-dialog.tsx
|
|
242
|
+
import * as React2 from "react";
|
|
243
|
+
import {
|
|
244
|
+
Dialog as AriaDialog,
|
|
245
|
+
Heading,
|
|
246
|
+
Modal,
|
|
247
|
+
ModalOverlay,
|
|
248
|
+
Text
|
|
249
|
+
} from "react-aria-components";
|
|
250
|
+
|
|
251
|
+
// src/ui/button/button.tsx
|
|
242
252
|
import { cva as cva2 } from "class-variance-authority";
|
|
243
|
-
import {
|
|
244
|
-
|
|
253
|
+
import { useState as useState4 } from "react";
|
|
254
|
+
import {
|
|
255
|
+
Button as ButtonPrimitive,
|
|
256
|
+
Link as LinkPrimitive
|
|
257
|
+
} from "react-aria-components";
|
|
258
|
+
import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
259
|
+
var centeredRipplePosition = { x: "50%", y: "50%" };
|
|
260
|
+
function getRipplePosition(event) {
|
|
261
|
+
if (event.pointerType === "keyboard" || event.pointerType === "virtual") {
|
|
262
|
+
return centeredRipplePosition;
|
|
263
|
+
}
|
|
264
|
+
if (!(event.target instanceof Element) || event.x === void 0 || event.y === void 0) {
|
|
265
|
+
return centeredRipplePosition;
|
|
266
|
+
}
|
|
267
|
+
const bounds = event.target.getBoundingClientRect();
|
|
268
|
+
return {
|
|
269
|
+
x: `${event.x - bounds.left}px`,
|
|
270
|
+
y: `${event.y - bounds.top}px`
|
|
271
|
+
};
|
|
272
|
+
}
|
|
273
|
+
function useActionRipple(enabled) {
|
|
274
|
+
const [ripple, setRipple] = useState4(null);
|
|
275
|
+
function triggerRipple(event) {
|
|
276
|
+
if (!enabled) return;
|
|
277
|
+
const position = getRipplePosition(event);
|
|
278
|
+
setRipple((currentRipple) => ({
|
|
279
|
+
id: (currentRipple?.id ?? 0) + 1,
|
|
280
|
+
position
|
|
281
|
+
}));
|
|
282
|
+
}
|
|
283
|
+
const rippleElement = ripple ? /* @__PURE__ */ jsx2(
|
|
284
|
+
"span",
|
|
285
|
+
{
|
|
286
|
+
"aria-hidden": "true",
|
|
287
|
+
"data-slot": "button-ripple",
|
|
288
|
+
className: "pointer-events-none absolute aspect-square w-full rounded-full bg-current animate-ui-ripple motion-reduce:hidden",
|
|
289
|
+
style: { left: ripple.position.x, top: ripple.position.y },
|
|
290
|
+
onAnimationEnd: () => setRipple((currentRipple) => currentRipple?.id === ripple.id ? null : currentRipple)
|
|
291
|
+
},
|
|
292
|
+
ripple.id
|
|
293
|
+
) : null;
|
|
294
|
+
return { ripple: rippleElement, triggerRipple };
|
|
295
|
+
}
|
|
296
|
+
var buttonVariants = cva2(
|
|
297
|
+
cn(
|
|
298
|
+
"group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
299
|
+
actionRipple()
|
|
300
|
+
),
|
|
301
|
+
{
|
|
302
|
+
variants: {
|
|
303
|
+
variant: {
|
|
304
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/80",
|
|
305
|
+
outline: "border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
|
|
306
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
|
|
307
|
+
ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
|
|
308
|
+
destructive: "bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",
|
|
309
|
+
link: "text-primary underline-offset-4 hover:underline after:hidden"
|
|
310
|
+
},
|
|
311
|
+
size: {
|
|
312
|
+
default: "h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
313
|
+
xs: "h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
|
|
314
|
+
sm: "h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",
|
|
315
|
+
lg: "h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
316
|
+
icon: "size-8",
|
|
317
|
+
"icon-xs": "size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3",
|
|
318
|
+
"icon-sm": "size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg",
|
|
319
|
+
"icon-lg": "size-9"
|
|
320
|
+
}
|
|
321
|
+
},
|
|
322
|
+
defaultVariants: {
|
|
323
|
+
variant: "default",
|
|
324
|
+
size: "default"
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
);
|
|
328
|
+
function Button({ className, variant = "default", size = "default", children, disabled, isDisabled, onClick, onPress, ...props }) {
|
|
329
|
+
const { ripple, triggerRipple } = useActionRipple(variant !== "link");
|
|
330
|
+
return /* @__PURE__ */ jsx2(
|
|
331
|
+
ButtonPrimitive,
|
|
332
|
+
{
|
|
333
|
+
"data-slot": "button",
|
|
334
|
+
"data-variant": variant,
|
|
335
|
+
"data-size": size,
|
|
336
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
337
|
+
onClick,
|
|
338
|
+
isDisabled: isDisabled ?? disabled,
|
|
339
|
+
onPress: (event) => {
|
|
340
|
+
onPress?.(event);
|
|
341
|
+
triggerRipple(event);
|
|
342
|
+
},
|
|
343
|
+
...props,
|
|
344
|
+
children: (renderProps) => /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
345
|
+
typeof children === "function" ? children(renderProps) : children,
|
|
346
|
+
ripple
|
|
347
|
+
] })
|
|
348
|
+
}
|
|
349
|
+
);
|
|
350
|
+
}
|
|
351
|
+
function LinkButton({
|
|
352
|
+
className,
|
|
353
|
+
variant = "default",
|
|
354
|
+
size = "default",
|
|
355
|
+
children,
|
|
356
|
+
onClick,
|
|
357
|
+
onPress,
|
|
358
|
+
...props
|
|
359
|
+
}) {
|
|
360
|
+
const { ripple, triggerRipple } = useActionRipple(variant !== "link");
|
|
361
|
+
return /* @__PURE__ */ jsx2(
|
|
362
|
+
LinkPrimitive,
|
|
363
|
+
{
|
|
364
|
+
"data-slot": "button",
|
|
365
|
+
"data-variant": variant,
|
|
366
|
+
"data-size": size,
|
|
367
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
368
|
+
onClick,
|
|
369
|
+
onPress: (event) => {
|
|
370
|
+
onPress?.(event);
|
|
371
|
+
triggerRipple(event);
|
|
372
|
+
},
|
|
373
|
+
...props,
|
|
374
|
+
children: (renderProps) => /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
375
|
+
typeof children === "function" ? children(renderProps) : children,
|
|
376
|
+
ripple
|
|
377
|
+
] })
|
|
378
|
+
}
|
|
379
|
+
);
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
// src/ui/alert-dialog/alert-dialog.tsx
|
|
383
|
+
import { Fragment as Fragment2, jsx as jsx3 } from "react/jsx-runtime";
|
|
384
|
+
var AlertDialogContext = React2.createContext(null);
|
|
385
|
+
function useAlertDialogContext() {
|
|
386
|
+
const context = React2.useContext(AlertDialogContext);
|
|
387
|
+
if (!context) throw new Error("AlertDialog components must be rendered within AlertDialog.");
|
|
388
|
+
return context;
|
|
389
|
+
}
|
|
390
|
+
function AlertDialog({ children, open, onOpenChange }) {
|
|
391
|
+
return /* @__PURE__ */ jsx3(AlertDialogContext.Provider, { value: { open, setOpen: onOpenChange }, children });
|
|
392
|
+
}
|
|
393
|
+
function AlertDialogPortal({ children }) {
|
|
394
|
+
return /* @__PURE__ */ jsx3(Fragment2, { children });
|
|
395
|
+
}
|
|
396
|
+
function AlertDialogTrigger({ children, ...props }) {
|
|
397
|
+
const { setOpen } = useAlertDialogContext();
|
|
398
|
+
return /* @__PURE__ */ jsx3(Button, { "data-slot": "alert-dialog-trigger", onPress: () => setOpen(true), ...props, children });
|
|
399
|
+
}
|
|
400
|
+
function AlertDialogOverlay({ className, ...props }) {
|
|
401
|
+
const { open, setOpen } = useAlertDialogContext();
|
|
402
|
+
if (!open) return null;
|
|
403
|
+
return /* @__PURE__ */ jsx3(ModalOverlay, { "data-slot": "alert-dialog-overlay", isDismissable: true, isOpen: open, onOpenChange: setOpen, className: cn("fixed inset-0 isolate z-50 grid place-items-center bg-black/10 p-4 backdrop-blur-[1px]", className), ...props });
|
|
404
|
+
}
|
|
405
|
+
function AlertDialogContent({ className, size = "default", children }) {
|
|
406
|
+
const { open, setOpen } = useAlertDialogContext();
|
|
407
|
+
if (!open) return null;
|
|
408
|
+
return /* @__PURE__ */ jsx3(AlertDialogPortal, { children: /* @__PURE__ */ jsx3(ModalOverlay, { isDismissable: true, isOpen: open, onOpenChange: setOpen, className: "fixed inset-0 isolate z-50 grid place-items-center bg-black/10 p-4 backdrop-blur-[1px]", children: /* @__PURE__ */ jsx3(Modal, { className: cn("w-full max-w-[calc(100%-2rem)] outline-none", size === "sm" ? "sm:max-w-xs" : "sm:max-w-sm", className), children: /* @__PURE__ */ jsx3(AriaDialog, { role: "alertdialog", "data-slot": "alert-dialog-content", className: "grid gap-4 rounded-xl bg-background p-4 text-sm text-foreground ring-1 ring-foreground/10 outline-none", children }) }) }) });
|
|
409
|
+
}
|
|
410
|
+
function AlertDialogHeader({ className, ...props }) {
|
|
411
|
+
return /* @__PURE__ */ jsx3("div", { "data-slot": "alert-dialog-header", className: cn("flex flex-col gap-2 text-center sm:text-left", className), ...props });
|
|
412
|
+
}
|
|
413
|
+
function AlertDialogFooter({ className, ...props }) {
|
|
414
|
+
return /* @__PURE__ */ jsx3("div", { "data-slot": "alert-dialog-footer", className: cn("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end", className), ...props });
|
|
415
|
+
}
|
|
416
|
+
function AlertDialogTitle({ className, ...props }) {
|
|
417
|
+
return /* @__PURE__ */ jsx3(Heading, { slot: "title", "data-slot": "alert-dialog-title", className: cn("font-heading text-base font-medium", className), ...props });
|
|
418
|
+
}
|
|
419
|
+
function AlertDialogDescription({ className, ...props }) {
|
|
420
|
+
return /* @__PURE__ */ jsx3(Text, { slot: "description", "data-slot": "alert-dialog-description", className: cn("text-sm text-muted-foreground", className), ...props });
|
|
421
|
+
}
|
|
422
|
+
function AlertDialogAction({ className, ...props }) {
|
|
423
|
+
return /* @__PURE__ */ jsx3(Button, { "data-slot": "alert-dialog-action", className: cn(className), ...props });
|
|
424
|
+
}
|
|
425
|
+
function AlertDialogCancel({ children = "Cancelar", onClick, ...props }) {
|
|
426
|
+
const { setOpen } = useAlertDialogContext();
|
|
427
|
+
return /* @__PURE__ */ jsx3(Button, { "data-slot": "alert-dialog-cancel", variant: "outline", onClick, onPress: () => setOpen(false), ...props, children });
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
// src/ui/alert/alert.tsx
|
|
431
|
+
import { cva as cva3 } from "class-variance-authority";
|
|
432
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
433
|
+
var alertVariants = cva3(
|
|
245
434
|
"group/alert relative grid w-full gap-0.5 rounded-lg border border-border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",
|
|
246
435
|
{
|
|
247
436
|
variants: {
|
|
@@ -259,7 +448,7 @@ var alertVariants = cva2(
|
|
|
259
448
|
}
|
|
260
449
|
);
|
|
261
450
|
function Alert({ className, variant, ...props }) {
|
|
262
|
-
return /* @__PURE__ */
|
|
451
|
+
return /* @__PURE__ */ jsx4(
|
|
263
452
|
"div",
|
|
264
453
|
{
|
|
265
454
|
"data-slot": "alert",
|
|
@@ -270,7 +459,7 @@ function Alert({ className, variant, ...props }) {
|
|
|
270
459
|
);
|
|
271
460
|
}
|
|
272
461
|
function AlertTitle({ className, ...props }) {
|
|
273
|
-
return /* @__PURE__ */
|
|
462
|
+
return /* @__PURE__ */ jsx4(
|
|
274
463
|
"div",
|
|
275
464
|
{
|
|
276
465
|
"data-slot": "alert-title",
|
|
@@ -283,7 +472,7 @@ function AlertTitle({ className, ...props }) {
|
|
|
283
472
|
);
|
|
284
473
|
}
|
|
285
474
|
function AlertDescription({ className, ...props }) {
|
|
286
|
-
return /* @__PURE__ */
|
|
475
|
+
return /* @__PURE__ */ jsx4(
|
|
287
476
|
"div",
|
|
288
477
|
{
|
|
289
478
|
"data-slot": "alert-description",
|
|
@@ -296,17 +485,17 @@ function AlertDescription({ className, ...props }) {
|
|
|
296
485
|
);
|
|
297
486
|
}
|
|
298
487
|
function AlertAction({ className, ...props }) {
|
|
299
|
-
return /* @__PURE__ */
|
|
488
|
+
return /* @__PURE__ */ jsx4("div", { "data-slot": "alert-action", className: cn("absolute top-2 right-2", className), ...props });
|
|
300
489
|
}
|
|
301
490
|
|
|
302
491
|
// src/ui/app-shell/app-shell.tsx
|
|
303
|
-
import { jsx as
|
|
492
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
304
493
|
function AppShell({
|
|
305
494
|
className,
|
|
306
495
|
sidebarBreakpoint = "md",
|
|
307
496
|
...props
|
|
308
497
|
}) {
|
|
309
|
-
return /* @__PURE__ */
|
|
498
|
+
return /* @__PURE__ */ jsx5(
|
|
310
499
|
"div",
|
|
311
500
|
{
|
|
312
501
|
"data-slot": "app-shell",
|
|
@@ -317,7 +506,7 @@ function AppShell({
|
|
|
317
506
|
);
|
|
318
507
|
}
|
|
319
508
|
function AppShellSidebar({ className, ...props }) {
|
|
320
|
-
return /* @__PURE__ */
|
|
509
|
+
return /* @__PURE__ */ jsx5(
|
|
321
510
|
"aside",
|
|
322
511
|
{
|
|
323
512
|
"data-slot": "app-shell-sidebar",
|
|
@@ -327,10 +516,10 @@ function AppShellSidebar({ className, ...props }) {
|
|
|
327
516
|
);
|
|
328
517
|
}
|
|
329
518
|
function AppShellMain({ className, ...props }) {
|
|
330
|
-
return /* @__PURE__ */
|
|
519
|
+
return /* @__PURE__ */ jsx5("main", { "data-slot": "app-shell-main", className: cn("bg-background", className), ...props });
|
|
331
520
|
}
|
|
332
521
|
function AppShellHeader({ className, ...props }) {
|
|
333
|
-
return /* @__PURE__ */
|
|
522
|
+
return /* @__PURE__ */ jsx5(
|
|
334
523
|
"header",
|
|
335
524
|
{
|
|
336
525
|
"data-slot": "app-shell-header",
|
|
@@ -343,7 +532,7 @@ function AppShellMobileHeader({
|
|
|
343
532
|
className,
|
|
344
533
|
...props
|
|
345
534
|
}) {
|
|
346
|
-
return /* @__PURE__ */
|
|
535
|
+
return /* @__PURE__ */ jsx5(
|
|
347
536
|
"header",
|
|
348
537
|
{
|
|
349
538
|
"data-slot": "app-shell-mobile-header",
|
|
@@ -359,7 +548,7 @@ function AppShellContent({
|
|
|
359
548
|
scrollable = true,
|
|
360
549
|
...props
|
|
361
550
|
}) {
|
|
362
|
-
return /* @__PURE__ */
|
|
551
|
+
return /* @__PURE__ */ jsx5(
|
|
363
552
|
"div",
|
|
364
553
|
{
|
|
365
554
|
"data-slot": "app-shell-content",
|
|
@@ -373,23 +562,23 @@ function AppShellContent({
|
|
|
373
562
|
}
|
|
374
563
|
|
|
375
564
|
// src/ui/avatar/avatar.tsx
|
|
376
|
-
import { createContext, useContext, useEffect as useEffect3, useState as
|
|
377
|
-
import { jsx as
|
|
565
|
+
import { createContext as createContext2, useContext as useContext2, useEffect as useEffect3, useState as useState5 } from "react";
|
|
566
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
378
567
|
var sizes = { xs: "size-5 text-[10px]", sm: "size-6 text-xs", default: "size-8 text-sm", lg: "size-10 text-base" };
|
|
379
|
-
var AvatarContext =
|
|
568
|
+
var AvatarContext = createContext2(null);
|
|
380
569
|
function Avatar({ className, size = "default", children, ...props }) {
|
|
381
|
-
const [status, setStatus] =
|
|
382
|
-
return /* @__PURE__ */
|
|
570
|
+
const [status, setStatus] = useState5("idle");
|
|
571
|
+
return /* @__PURE__ */ jsx6(AvatarContext.Provider, { value: { status, setStatus }, children: /* @__PURE__ */ jsx6("div", { "data-slot": "avatar", "data-size": size, className: cn("group/avatar relative flex shrink-0 overflow-hidden rounded-full bg-muted text-muted-foreground", sizes[size], className), ...props, children }) });
|
|
383
572
|
}
|
|
384
573
|
function AvatarImage({ className, src, onError, onLoad, ...props }) {
|
|
385
|
-
const avatar =
|
|
386
|
-
const [failed, setFailed] =
|
|
574
|
+
const avatar = useContext2(AvatarContext);
|
|
575
|
+
const [failed, setFailed] = useState5(false);
|
|
387
576
|
useEffect3(() => {
|
|
388
577
|
setFailed(false);
|
|
389
578
|
avatar?.setStatus(src ? "loading" : "idle");
|
|
390
579
|
}, [avatar?.setStatus, src]);
|
|
391
580
|
if (failed || avatar?.status === "error") return null;
|
|
392
|
-
return /* @__PURE__ */
|
|
581
|
+
return /* @__PURE__ */ jsx6("img", { "data-slot": "avatar-image", src, className: cn("aspect-square size-full object-cover", className), onLoad: (event) => {
|
|
393
582
|
avatar?.setStatus("loaded");
|
|
394
583
|
onLoad?.(event);
|
|
395
584
|
}, onError: (event) => {
|
|
@@ -399,25 +588,25 @@ function AvatarImage({ className, src, onError, onLoad, ...props }) {
|
|
|
399
588
|
}, ...props });
|
|
400
589
|
}
|
|
401
590
|
function AvatarFallback({ className, ...props }) {
|
|
402
|
-
const avatar =
|
|
591
|
+
const avatar = useContext2(AvatarContext);
|
|
403
592
|
if (avatar?.status === "loaded") return null;
|
|
404
|
-
return /* @__PURE__ */
|
|
593
|
+
return /* @__PURE__ */ jsx6("span", { "data-slot": "avatar-fallback", className: cn("flex size-full items-center justify-center font-medium", className), ...props });
|
|
405
594
|
}
|
|
406
595
|
function AvatarBadge({ className, ...props }) {
|
|
407
|
-
return /* @__PURE__ */
|
|
596
|
+
return /* @__PURE__ */ jsx6("span", { "data-slot": "avatar-badge", className: cn("absolute right-0 bottom-0 size-2.5 rounded-full bg-success ring-2 ring-background", className), ...props });
|
|
408
597
|
}
|
|
409
598
|
function AvatarGroup({ className, ...props }) {
|
|
410
|
-
return /* @__PURE__ */
|
|
599
|
+
return /* @__PURE__ */ jsx6("div", { "data-slot": "avatar-group", className: cn("flex -space-x-2 [&>[data-slot=avatar]]:ring-2 [&>[data-slot=avatar]]:ring-background", className), ...props });
|
|
411
600
|
}
|
|
412
601
|
function AvatarGroupCount({ className, ...props }) {
|
|
413
|
-
return /* @__PURE__ */
|
|
602
|
+
return /* @__PURE__ */ jsx6("span", { "data-slot": "avatar-group-count", className: cn("flex size-8 items-center justify-center rounded-full bg-muted text-xs font-medium text-muted-foreground ring-2 ring-background", className), ...props });
|
|
414
603
|
}
|
|
415
604
|
|
|
416
605
|
// src/ui/badge/badge.tsx
|
|
417
|
-
import { cva as
|
|
606
|
+
import { cva as cva4 } from "class-variance-authority";
|
|
418
607
|
import { Link } from "react-aria-components";
|
|
419
|
-
import { jsx as
|
|
420
|
-
var badgeVariants =
|
|
608
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
609
|
+
var badgeVariants = cva4(
|
|
421
610
|
"inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 [&>svg]:pointer-events-none [&>svg]:size-3",
|
|
422
611
|
{
|
|
423
612
|
variants: {
|
|
@@ -439,7 +628,7 @@ var badgeVariants = cva3(
|
|
|
439
628
|
}
|
|
440
629
|
);
|
|
441
630
|
function Badge({ className, variant, ...props }) {
|
|
442
|
-
return /* @__PURE__ */
|
|
631
|
+
return /* @__PURE__ */ jsx7(
|
|
443
632
|
"span",
|
|
444
633
|
{
|
|
445
634
|
"data-slot": "badge",
|
|
@@ -450,7 +639,7 @@ function Badge({ className, variant, ...props }) {
|
|
|
450
639
|
);
|
|
451
640
|
}
|
|
452
641
|
function BadgeLink({ className, variant, ...props }) {
|
|
453
|
-
return /* @__PURE__ */
|
|
642
|
+
return /* @__PURE__ */ jsx7(
|
|
454
643
|
Link,
|
|
455
644
|
{
|
|
456
645
|
"data-slot": "badge",
|
|
@@ -463,31 +652,31 @@ function BadgeLink({ className, variant, ...props }) {
|
|
|
463
652
|
|
|
464
653
|
// src/ui/breadcrumb/breadcrumb.tsx
|
|
465
654
|
import { Breadcrumb as AriaBreadcrumb, Breadcrumbs as AriaBreadcrumbs, Link as AriaLink } from "react-aria-components";
|
|
466
|
-
import { jsx as
|
|
655
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
467
656
|
function Breadcrumbs({ className, ...props }) {
|
|
468
|
-
return /* @__PURE__ */
|
|
657
|
+
return /* @__PURE__ */ jsx8(AriaBreadcrumbs, { "data-slot": "breadcrumbs", className: cn("flex flex-wrap items-center gap-1.5 text-sm text-muted-foreground", className), ...props });
|
|
469
658
|
}
|
|
470
659
|
function Breadcrumb({ className, ...props }) {
|
|
471
|
-
return /* @__PURE__ */
|
|
660
|
+
return /* @__PURE__ */ jsx8(AriaBreadcrumb, { "data-slot": "breadcrumb", className: cn("inline-flex items-center gap-1.5", className), ...props });
|
|
472
661
|
}
|
|
473
662
|
function BreadcrumbLink({ className, ...props }) {
|
|
474
|
-
return /* @__PURE__ */
|
|
663
|
+
return /* @__PURE__ */ jsx8(AriaLink, { "data-slot": "breadcrumb-link", className: cn("transition-colors hover:text-foreground", className), ...props });
|
|
475
664
|
}
|
|
476
665
|
function BreadcrumbPage({ className, ...props }) {
|
|
477
|
-
return /* @__PURE__ */
|
|
666
|
+
return /* @__PURE__ */ jsx8("span", { "data-slot": "breadcrumb-page", "aria-current": "page", className: cn("font-medium text-foreground", className), ...props });
|
|
478
667
|
}
|
|
479
668
|
function BreadcrumbSeparator({ children = "/", className, ...props }) {
|
|
480
|
-
return /* @__PURE__ */
|
|
669
|
+
return /* @__PURE__ */ jsx8("span", { "data-slot": "breadcrumb-separator", "aria-hidden": "true", className: cn("text-muted-foreground/60", className), ...props, children });
|
|
481
670
|
}
|
|
482
671
|
|
|
483
672
|
// src/ui/button-group/button-group.tsx
|
|
484
|
-
import { cva as
|
|
673
|
+
import { cva as cva5 } from "class-variance-authority";
|
|
485
674
|
|
|
486
675
|
// src/ui/separator/separator.tsx
|
|
487
676
|
import { Separator as SeparatorPrimitive } from "react-aria-components";
|
|
488
|
-
import { jsx as
|
|
677
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
489
678
|
function Separator({ className, orientation = "horizontal", ...props }) {
|
|
490
|
-
return /* @__PURE__ */
|
|
679
|
+
return /* @__PURE__ */ jsx9(
|
|
491
680
|
SeparatorPrimitive,
|
|
492
681
|
{
|
|
493
682
|
"data-slot": "separator",
|
|
@@ -502,8 +691,8 @@ function Separator({ className, orientation = "horizontal", ...props }) {
|
|
|
502
691
|
}
|
|
503
692
|
|
|
504
693
|
// src/ui/button-group/button-group.tsx
|
|
505
|
-
import { jsx as
|
|
506
|
-
var buttonGroupVariants =
|
|
694
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
695
|
+
var buttonGroupVariants = cva5(
|
|
507
696
|
"flex w-fit items-stretch *:focus-visible:relative *:focus-visible:z-10 has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-lg [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1",
|
|
508
697
|
{
|
|
509
698
|
variants: {
|
|
@@ -524,7 +713,7 @@ function ButtonGroup({
|
|
|
524
713
|
}) {
|
|
525
714
|
return (
|
|
526
715
|
// biome-ignore lint/a11y/useSemanticElements: fieldset would impose form semantics on a generic action group.
|
|
527
|
-
/* @__PURE__ */
|
|
716
|
+
/* @__PURE__ */ jsx10(
|
|
528
717
|
"div",
|
|
529
718
|
{
|
|
530
719
|
role: "group",
|
|
@@ -552,7 +741,7 @@ function ButtonGroupText({
|
|
|
552
741
|
};
|
|
553
742
|
return render(renderProps);
|
|
554
743
|
}
|
|
555
|
-
return /* @__PURE__ */
|
|
744
|
+
return /* @__PURE__ */ jsx10(
|
|
556
745
|
"div",
|
|
557
746
|
{
|
|
558
747
|
"data-slot": "button-group-text",
|
|
@@ -569,7 +758,7 @@ function ButtonGroupSeparator({
|
|
|
569
758
|
orientation = "vertical",
|
|
570
759
|
...props
|
|
571
760
|
}) {
|
|
572
|
-
return /* @__PURE__ */
|
|
761
|
+
return /* @__PURE__ */ jsx10(
|
|
573
762
|
Separator,
|
|
574
763
|
{
|
|
575
764
|
"data-slot": "button-group-separator",
|
|
@@ -583,79 +772,10 @@ function ButtonGroupSeparator({
|
|
|
583
772
|
);
|
|
584
773
|
}
|
|
585
774
|
|
|
586
|
-
// src/ui/button/button.tsx
|
|
587
|
-
import { cva as cva5 } from "class-variance-authority";
|
|
588
|
-
import {
|
|
589
|
-
Button as ButtonPrimitive,
|
|
590
|
-
Link as LinkPrimitive
|
|
591
|
-
} from "react-aria-components";
|
|
592
|
-
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
593
|
-
var buttonVariants = cva5(
|
|
594
|
-
cn(
|
|
595
|
-
"group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
596
|
-
actionRipple()
|
|
597
|
-
),
|
|
598
|
-
{
|
|
599
|
-
variants: {
|
|
600
|
-
variant: {
|
|
601
|
-
default: "bg-primary text-primary-foreground hover:bg-primary/80",
|
|
602
|
-
outline: "border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
|
|
603
|
-
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
|
|
604
|
-
ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
|
|
605
|
-
destructive: "bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",
|
|
606
|
-
link: "text-primary underline-offset-4 hover:underline after:hidden"
|
|
607
|
-
},
|
|
608
|
-
size: {
|
|
609
|
-
default: "h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
610
|
-
xs: "h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
|
|
611
|
-
sm: "h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",
|
|
612
|
-
lg: "h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
613
|
-
icon: "size-8",
|
|
614
|
-
"icon-xs": "size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3",
|
|
615
|
-
"icon-sm": "size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg",
|
|
616
|
-
"icon-lg": "size-9"
|
|
617
|
-
}
|
|
618
|
-
},
|
|
619
|
-
defaultVariants: {
|
|
620
|
-
variant: "default",
|
|
621
|
-
size: "default"
|
|
622
|
-
}
|
|
623
|
-
}
|
|
624
|
-
);
|
|
625
|
-
function Button({ className, variant = "default", size = "default", ...props }) {
|
|
626
|
-
return /* @__PURE__ */ jsx9(
|
|
627
|
-
ButtonPrimitive,
|
|
628
|
-
{
|
|
629
|
-
"data-slot": "button",
|
|
630
|
-
"data-variant": variant,
|
|
631
|
-
"data-size": size,
|
|
632
|
-
className: cn(buttonVariants({ variant, size, className })),
|
|
633
|
-
...props
|
|
634
|
-
}
|
|
635
|
-
);
|
|
636
|
-
}
|
|
637
|
-
function LinkButton({
|
|
638
|
-
className,
|
|
639
|
-
variant = "default",
|
|
640
|
-
size = "default",
|
|
641
|
-
...props
|
|
642
|
-
}) {
|
|
643
|
-
return /* @__PURE__ */ jsx9(
|
|
644
|
-
LinkPrimitive,
|
|
645
|
-
{
|
|
646
|
-
"data-slot": "button",
|
|
647
|
-
"data-variant": variant,
|
|
648
|
-
"data-size": size,
|
|
649
|
-
className: cn(buttonVariants({ variant, size, className })),
|
|
650
|
-
...props
|
|
651
|
-
}
|
|
652
|
-
);
|
|
653
|
-
}
|
|
654
|
-
|
|
655
775
|
// src/ui/card/card.tsx
|
|
656
|
-
import { jsx as
|
|
776
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
657
777
|
function Card({ className, size = "default", ...props }) {
|
|
658
|
-
return /* @__PURE__ */
|
|
778
|
+
return /* @__PURE__ */ jsx11(
|
|
659
779
|
"div",
|
|
660
780
|
{
|
|
661
781
|
"data-slot": "card",
|
|
@@ -669,7 +789,7 @@ function Card({ className, size = "default", ...props }) {
|
|
|
669
789
|
);
|
|
670
790
|
}
|
|
671
791
|
function CardHeader({ className, ...props }) {
|
|
672
|
-
return /* @__PURE__ */
|
|
792
|
+
return /* @__PURE__ */ jsx11(
|
|
673
793
|
"div",
|
|
674
794
|
{
|
|
675
795
|
"data-slot": "card-header",
|
|
@@ -682,7 +802,7 @@ function CardHeader({ className, ...props }) {
|
|
|
682
802
|
);
|
|
683
803
|
}
|
|
684
804
|
function CardTitle({ className, ...props }) {
|
|
685
|
-
return /* @__PURE__ */
|
|
805
|
+
return /* @__PURE__ */ jsx11(
|
|
686
806
|
"div",
|
|
687
807
|
{
|
|
688
808
|
"data-slot": "card-title",
|
|
@@ -695,7 +815,7 @@ function CardTitle({ className, ...props }) {
|
|
|
695
815
|
);
|
|
696
816
|
}
|
|
697
817
|
function CardDescription({ className, ...props }) {
|
|
698
|
-
return /* @__PURE__ */
|
|
818
|
+
return /* @__PURE__ */ jsx11(
|
|
699
819
|
"div",
|
|
700
820
|
{
|
|
701
821
|
"data-slot": "card-description",
|
|
@@ -705,7 +825,7 @@ function CardDescription({ className, ...props }) {
|
|
|
705
825
|
);
|
|
706
826
|
}
|
|
707
827
|
function CardAction({ className, ...props }) {
|
|
708
|
-
return /* @__PURE__ */
|
|
828
|
+
return /* @__PURE__ */ jsx11(
|
|
709
829
|
"div",
|
|
710
830
|
{
|
|
711
831
|
"data-slot": "card-action",
|
|
@@ -715,10 +835,10 @@ function CardAction({ className, ...props }) {
|
|
|
715
835
|
);
|
|
716
836
|
}
|
|
717
837
|
function CardContent({ className, ...props }) {
|
|
718
|
-
return /* @__PURE__ */
|
|
838
|
+
return /* @__PURE__ */ jsx11("div", { "data-slot": "card-content", className: cn("px-(--card-spacing)", className), ...props });
|
|
719
839
|
}
|
|
720
840
|
function CardFooter({ className, ...props }) {
|
|
721
|
-
return /* @__PURE__ */
|
|
841
|
+
return /* @__PURE__ */ jsx11(
|
|
722
842
|
"div",
|
|
723
843
|
{
|
|
724
844
|
"data-slot": "card-footer",
|
|
@@ -736,9 +856,9 @@ import { Check } from "lucide-react";
|
|
|
736
856
|
import {
|
|
737
857
|
Checkbox as AriaCheckbox
|
|
738
858
|
} from "react-aria-components";
|
|
739
|
-
import { Fragment, jsx as
|
|
859
|
+
import { Fragment as Fragment3, jsx as jsx12, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
740
860
|
function Checkbox({ className, children, ...props }) {
|
|
741
|
-
return /* @__PURE__ */
|
|
861
|
+
return /* @__PURE__ */ jsx12(
|
|
742
862
|
AriaCheckbox,
|
|
743
863
|
{
|
|
744
864
|
"data-slot": "checkbox",
|
|
@@ -747,13 +867,13 @@ function Checkbox({ className, children, ...props }) {
|
|
|
747
867
|
className
|
|
748
868
|
),
|
|
749
869
|
...props,
|
|
750
|
-
children: (state) => /* @__PURE__ */
|
|
751
|
-
/* @__PURE__ */
|
|
870
|
+
children: (state) => /* @__PURE__ */ jsxs3(Fragment3, { children: [
|
|
871
|
+
/* @__PURE__ */ jsx12(
|
|
752
872
|
"span",
|
|
753
873
|
{
|
|
754
874
|
"aria-hidden": "true",
|
|
755
875
|
className: "grid size-4 place-items-center rounded border border-border bg-background text-primary-foreground transition-colors group-data-selected:border-primary group-data-selected:bg-primary group-data-focus-visible:ring-3 group-data-focus-visible:ring-ring/50",
|
|
756
|
-
children: /* @__PURE__ */
|
|
876
|
+
children: /* @__PURE__ */ jsx12(Check, { className: "size-3 opacity-0 transition-opacity group-data-selected:opacity-100 motion-reduce:transition-none" })
|
|
757
877
|
}
|
|
758
878
|
),
|
|
759
879
|
typeof children === "function" ? children(state) : children
|
|
@@ -762,28 +882,96 @@ function Checkbox({ className, children, ...props }) {
|
|
|
762
882
|
);
|
|
763
883
|
}
|
|
764
884
|
|
|
885
|
+
// src/ui/collapsible/collapsible.tsx
|
|
886
|
+
import * as React3 from "react";
|
|
887
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
888
|
+
var CollapsibleContext = React3.createContext(null);
|
|
889
|
+
function useCollapsibleContext() {
|
|
890
|
+
const context = React3.useContext(CollapsibleContext);
|
|
891
|
+
if (!context) throw new Error("Collapsible components must be rendered within Collapsible.");
|
|
892
|
+
return context;
|
|
893
|
+
}
|
|
894
|
+
function Collapsible({
|
|
895
|
+
children,
|
|
896
|
+
defaultOpen = false,
|
|
897
|
+
onOpenChange,
|
|
898
|
+
open: controlledOpen,
|
|
899
|
+
...props
|
|
900
|
+
}) {
|
|
901
|
+
const [uncontrolledOpen, setUncontrolledOpen] = React3.useState(defaultOpen);
|
|
902
|
+
const contentId = React3.useId();
|
|
903
|
+
const open = controlledOpen ?? uncontrolledOpen;
|
|
904
|
+
const setOpen = React3.useCallback(
|
|
905
|
+
(nextOpen) => {
|
|
906
|
+
if (controlledOpen === void 0) setUncontrolledOpen(nextOpen);
|
|
907
|
+
onOpenChange?.(nextOpen);
|
|
908
|
+
},
|
|
909
|
+
[controlledOpen, onOpenChange]
|
|
910
|
+
);
|
|
911
|
+
return /* @__PURE__ */ jsx13(CollapsibleContext.Provider, { value: { contentId, open, setOpen }, children: /* @__PURE__ */ jsx13("div", { "data-slot": "collapsible", "data-state": open ? "open" : "closed", ...props, children }) });
|
|
912
|
+
}
|
|
913
|
+
function CollapsibleTrigger({ asChild = false, children, onClick, ...props }) {
|
|
914
|
+
const { contentId, open, setOpen } = useCollapsibleContext();
|
|
915
|
+
const handleClick = (event) => {
|
|
916
|
+
onClick?.(event);
|
|
917
|
+
if (!event.defaultPrevented) setOpen(!open);
|
|
918
|
+
};
|
|
919
|
+
if (asChild && React3.isValidElement(children)) {
|
|
920
|
+
const child = children;
|
|
921
|
+
return React3.cloneElement(child, {
|
|
922
|
+
...props,
|
|
923
|
+
"aria-controls": contentId,
|
|
924
|
+
"aria-expanded": open,
|
|
925
|
+
"data-slot": "collapsible-trigger",
|
|
926
|
+
"data-state": open ? "open" : "closed",
|
|
927
|
+
onClick: (event) => {
|
|
928
|
+
child.props.onClick?.(event);
|
|
929
|
+
handleClick(event);
|
|
930
|
+
}
|
|
931
|
+
});
|
|
932
|
+
}
|
|
933
|
+
return /* @__PURE__ */ jsx13(
|
|
934
|
+
"button",
|
|
935
|
+
{
|
|
936
|
+
type: "button",
|
|
937
|
+
"data-slot": "collapsible-trigger",
|
|
938
|
+
"data-state": open ? "open" : "closed",
|
|
939
|
+
"aria-controls": contentId,
|
|
940
|
+
"aria-expanded": open,
|
|
941
|
+
onClick: handleClick,
|
|
942
|
+
...props,
|
|
943
|
+
children
|
|
944
|
+
}
|
|
945
|
+
);
|
|
946
|
+
}
|
|
947
|
+
function CollapsibleContent({ children, ...props }) {
|
|
948
|
+
const { contentId, open } = useCollapsibleContext();
|
|
949
|
+
if (!open) return null;
|
|
950
|
+
return /* @__PURE__ */ jsx13("div", { id: contentId, "data-slot": "collapsible-content", "data-state": "open", ...props, children });
|
|
951
|
+
}
|
|
952
|
+
|
|
765
953
|
// src/ui/combobox/combobox.tsx
|
|
766
|
-
import { Fragment as
|
|
767
|
-
import { ComboBox as AriaComboBox, ComboBoxValue, FieldError, Input, Label, ListBox, ListBoxItem, Popover, Text } from "react-aria-components";
|
|
768
|
-
import { jsx as
|
|
954
|
+
import { Fragment as Fragment4, useMemo, useState as useState7 } from "react";
|
|
955
|
+
import { ComboBox as AriaComboBox, ComboBoxValue, FieldError, Input, Label, ListBox, ListBoxItem, Popover, Text as Text2 } from "react-aria-components";
|
|
956
|
+
import { jsx as jsx14, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
769
957
|
var Combobox = AriaComboBox;
|
|
770
958
|
function ComboboxInput({ className, ...props }) {
|
|
771
|
-
return /* @__PURE__ */
|
|
959
|
+
return /* @__PURE__ */ jsx14(Input, { "data-slot": "combobox-input", className: cn("h-9 w-full rounded-lg border border-border bg-background px-2.5 text-sm text-foreground outline-none placeholder:text-muted-foreground focus-visible:ring-3 focus-visible:ring-ring/50", className), ...props });
|
|
772
960
|
}
|
|
773
961
|
function ComboboxContent({ className, ...props }) {
|
|
774
|
-
return /* @__PURE__ */
|
|
962
|
+
return /* @__PURE__ */ jsx14(Popover, { "data-slot": "combobox-content", className: cn("max-h-72 w-(--trigger-width) overflow-hidden rounded-xl border border-border bg-background p-1.5 text-foreground shadow-lg motion-safe:data-entering:animate-ui-surface-in motion-safe:data-exiting:animate-ui-surface-out", className), ...props });
|
|
775
963
|
}
|
|
776
964
|
function ComboboxList({ className, emptyState, ...props }) {
|
|
777
|
-
return /* @__PURE__ */
|
|
965
|
+
return /* @__PURE__ */ jsx14(ListBox, { "data-slot": "combobox-list", className: cn("max-h-64 overflow-y-auto", className), renderEmptyState: emptyState ? () => emptyState : void 0, ...props });
|
|
778
966
|
}
|
|
779
967
|
function ComboboxItem({ className, children, ...props }) {
|
|
780
|
-
return /* @__PURE__ */
|
|
968
|
+
return /* @__PURE__ */ jsx14(ListBoxItem, { "data-slot": "combobox-item", className: cn("flex w-full cursor-default items-center justify-between rounded-md px-2 py-2 text-sm outline-none transition-colors data-focused:bg-muted data-focused:text-foreground data-hovered:bg-muted data-disabled:pointer-events-none data-disabled:opacity-50", className), ...props, children });
|
|
781
969
|
}
|
|
782
970
|
function HighlightMatch({ text, query, className }) {
|
|
783
|
-
return /* @__PURE__ */
|
|
971
|
+
return /* @__PURE__ */ jsx14("span", { className, children: getTextMatchParts(text, query).map((part, index) => part.match ? /* @__PURE__ */ jsx14("mark", { className: "rounded bg-accent px-0.5 text-accent-foreground", children: part.text }, `${part.text}-${index}`) : /* @__PURE__ */ jsx14(Fragment4, { children: part.text }, `${part.text}-${index}`)) });
|
|
784
972
|
}
|
|
785
|
-
function AutocompleteCombobox({ items, getItemKey, getItemLabel, renderItem, inputValue: controlledInputValue, onInputChange, selectedKey, onSelectionChange, label, description, errorMessage, emptyState = /* @__PURE__ */
|
|
786
|
-
const [internalInputValue, setInternalInputValue] =
|
|
973
|
+
function AutocompleteCombobox({ items, getItemKey, getItemLabel, renderItem, inputValue: controlledInputValue, onInputChange, selectedKey, onSelectionChange, label, description, errorMessage, emptyState = /* @__PURE__ */ jsx14("p", { className: "px-3 py-7 text-center text-sm text-muted-foreground", children: "No hay resultados." }), suggestion = true, placeholder, className, onKeyDown: _onKeyDown, ...props }) {
|
|
974
|
+
const [internalInputValue, setInternalInputValue] = useState7("");
|
|
787
975
|
const inputValue = controlledInputValue ?? internalInputValue;
|
|
788
976
|
const setInputValue = (value) => {
|
|
789
977
|
setInternalInputValue(value);
|
|
@@ -802,54 +990,54 @@ function AutocompleteCombobox({ items, getItemKey, getItemLabel, renderItem, inp
|
|
|
802
990
|
const handleKeyDown = (event) => {
|
|
803
991
|
if ((event.key === "Tab" || event.key === "Enter") && acceptSuggestion()) event.preventDefault();
|
|
804
992
|
};
|
|
805
|
-
return /* @__PURE__ */
|
|
993
|
+
return /* @__PURE__ */ jsxs4(AriaComboBox, { ...props, className: cn("group/combobox flex w-full flex-col gap-1.5", className), items: filteredItems, selectedKey, inputValue, onInputChange: setInputValue, onSelectionChange: (key) => {
|
|
806
994
|
const item = filteredItems.find((candidate) => String(getItemKey(candidate)) === String(key));
|
|
807
995
|
if (item) setInputValue(getItemLabel(item));
|
|
808
996
|
onSelectionChange?.(key, item);
|
|
809
997
|
}, children: [
|
|
810
|
-
label && /* @__PURE__ */
|
|
811
|
-
/* @__PURE__ */
|
|
812
|
-
suggestionLabel && /* @__PURE__ */
|
|
813
|
-
/* @__PURE__ */
|
|
998
|
+
label && /* @__PURE__ */ jsx14(Label, { className: "text-sm font-medium text-foreground", children: label }),
|
|
999
|
+
/* @__PURE__ */ jsxs4("div", { className: "relative", children: [
|
|
1000
|
+
suggestionLabel && /* @__PURE__ */ jsxs4("span", { "aria-hidden": "true", className: "pointer-events-none absolute inset-y-0 left-2.5 z-0 flex items-center whitespace-pre text-sm text-muted-foreground/60", children: [
|
|
1001
|
+
/* @__PURE__ */ jsx14("span", { className: "text-transparent", children: inputValue }),
|
|
814
1002
|
suggestionLabel.slice(inputValue.length)
|
|
815
1003
|
] }),
|
|
816
|
-
/* @__PURE__ */
|
|
1004
|
+
/* @__PURE__ */ jsx14(ComboboxInput, { "aria-autocomplete": suggestionLabel ? "both" : "list", placeholder, onKeyDown: handleKeyDown, className: "relative z-10 bg-transparent" })
|
|
817
1005
|
] }),
|
|
818
|
-
description && /* @__PURE__ */
|
|
819
|
-
errorMessage && /* @__PURE__ */
|
|
820
|
-
/* @__PURE__ */
|
|
1006
|
+
description && /* @__PURE__ */ jsx14(Text2, { slot: "description", className: "text-xs text-muted-foreground", children: description }),
|
|
1007
|
+
errorMessage && /* @__PURE__ */ jsx14(FieldError, { className: "text-xs text-destructive", children: errorMessage }),
|
|
1008
|
+
/* @__PURE__ */ jsx14(ComboboxContent, { children: /* @__PURE__ */ jsx14(ComboboxList, { emptyState, children: (item) => /* @__PURE__ */ jsx14(ComboboxItem, { id: getItemKey(item), textValue: getItemLabel(item), children: renderItem ? renderItem(item, inputValue) : /* @__PURE__ */ jsx14(HighlightMatch, { text: getItemLabel(item), query: inputValue }) }) }) })
|
|
821
1009
|
] });
|
|
822
1010
|
}
|
|
823
1011
|
|
|
824
1012
|
// src/ui/command/command.tsx
|
|
825
1013
|
import { ComboBox as AriaComboBox2, Input as AriaInput, ListBox as ListBox2, ListBoxItem as ListBoxItem2, Popover as Popover2 } from "react-aria-components";
|
|
826
|
-
import { jsx as
|
|
1014
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
827
1015
|
function Command({ className, ...props }) {
|
|
828
|
-
return /* @__PURE__ */
|
|
1016
|
+
return /* @__PURE__ */ jsx15(AriaComboBox2, { "data-slot": "command", className: cn("w-full", className), ...props });
|
|
829
1017
|
}
|
|
830
1018
|
function CommandInput({ className, ...props }) {
|
|
831
|
-
return /* @__PURE__ */
|
|
1019
|
+
return /* @__PURE__ */ jsx15(AriaInput, { "data-slot": "command-input", className: cn("h-9 w-full border-0 bg-transparent px-3 text-sm text-foreground outline-none placeholder:text-muted-foreground", className), ...props });
|
|
832
1020
|
}
|
|
833
1021
|
function CommandContent({ className, ...props }) {
|
|
834
|
-
return /* @__PURE__ */
|
|
1022
|
+
return /* @__PURE__ */ jsx15(Popover2, { "data-slot": "command-content", className: cn("w-(--trigger-width) overflow-hidden rounded-xl border border-border bg-background p-1.5 shadow-lg outline-none", className), ...props });
|
|
835
1023
|
}
|
|
836
1024
|
function CommandList({ className, ...props }) {
|
|
837
|
-
return /* @__PURE__ */
|
|
1025
|
+
return /* @__PURE__ */ jsx15(ListBox2, { "data-slot": "command-list", className: cn("max-h-72 overflow-y-auto", className), ...props });
|
|
838
1026
|
}
|
|
839
1027
|
function CommandItem({ className, ...props }) {
|
|
840
|
-
return /* @__PURE__ */
|
|
1028
|
+
return /* @__PURE__ */ jsx15(ListBoxItem2, { "data-slot": "command-item", className: cn("flex cursor-default items-center rounded-md px-2 py-1.5 text-sm outline-none data-focused:bg-muted data-disabled:pointer-events-none data-disabled:opacity-50", className), ...props });
|
|
841
1029
|
}
|
|
842
1030
|
|
|
843
1031
|
// src/ui/modal-dialog/modal-dialog.tsx
|
|
844
1032
|
import { X } from "lucide-react";
|
|
845
1033
|
import {
|
|
846
|
-
Dialog as
|
|
847
|
-
Heading,
|
|
848
|
-
Modal,
|
|
849
|
-
ModalOverlay,
|
|
850
|
-
Text as
|
|
1034
|
+
Dialog as AriaDialog2,
|
|
1035
|
+
Heading as Heading2,
|
|
1036
|
+
Modal as Modal2,
|
|
1037
|
+
ModalOverlay as ModalOverlay2,
|
|
1038
|
+
Text as Text3
|
|
851
1039
|
} from "react-aria-components";
|
|
852
|
-
import { Fragment as
|
|
1040
|
+
import { Fragment as Fragment5, jsx as jsx16, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
853
1041
|
var sizeClasses = {
|
|
854
1042
|
sm: "w-[min(calc(100dvw-2rem),24rem)]",
|
|
855
1043
|
md: "w-[min(calc(100dvw-2rem),28rem)]",
|
|
@@ -869,35 +1057,35 @@ function ModalDialog({
|
|
|
869
1057
|
...props
|
|
870
1058
|
}) {
|
|
871
1059
|
const layoutClass = children ? footer ? "grid-rows-[auto_minmax(0,1fr)_auto]" : "grid-rows-[auto_minmax(0,1fr)]" : "grid-rows-[auto_auto]";
|
|
872
|
-
return /* @__PURE__ */
|
|
873
|
-
|
|
1060
|
+
return /* @__PURE__ */ jsx16(
|
|
1061
|
+
ModalOverlay2,
|
|
874
1062
|
{
|
|
875
1063
|
isOpen: open,
|
|
876
1064
|
onOpenChange,
|
|
877
1065
|
className: "fixed inset-0 z-50 grid place-items-center bg-black/20 p-4 backdrop-blur-[1px] motion-safe:data-entering:animate-ui-overlay-in motion-safe:data-exiting:animate-ui-overlay-out",
|
|
878
1066
|
...props,
|
|
879
|
-
children: /* @__PURE__ */
|
|
880
|
-
|
|
1067
|
+
children: /* @__PURE__ */ jsx16(
|
|
1068
|
+
Modal2,
|
|
881
1069
|
{
|
|
882
1070
|
className: cn(
|
|
883
1071
|
"max-h-[calc(100dvh-2rem)] outline-none motion-safe:data-entering:animate-ui-surface-in motion-safe:data-exiting:animate-ui-surface-out",
|
|
884
1072
|
sizeClasses[size],
|
|
885
1073
|
className
|
|
886
1074
|
),
|
|
887
|
-
children: /* @__PURE__ */
|
|
888
|
-
|
|
1075
|
+
children: /* @__PURE__ */ jsx16(
|
|
1076
|
+
AriaDialog2,
|
|
889
1077
|
{
|
|
890
1078
|
className: cn(
|
|
891
1079
|
"grid max-h-[calc(100dvh-2rem)] overflow-hidden rounded-xl bg-background text-foreground shadow-xl outline-none",
|
|
892
1080
|
layoutClass
|
|
893
1081
|
),
|
|
894
|
-
children: ({ close }) => /* @__PURE__ */
|
|
895
|
-
/* @__PURE__ */
|
|
896
|
-
/* @__PURE__ */
|
|
897
|
-
/* @__PURE__ */
|
|
898
|
-
description ? /* @__PURE__ */
|
|
1082
|
+
children: ({ close }) => /* @__PURE__ */ jsxs5(Fragment5, { children: [
|
|
1083
|
+
/* @__PURE__ */ jsxs5("header", { "data-slot": "modal-dialog-header", className: "flex items-start gap-3 border-b border-border px-5 py-4", children: [
|
|
1084
|
+
/* @__PURE__ */ jsxs5("div", { className: "min-w-0 flex-1", children: [
|
|
1085
|
+
/* @__PURE__ */ jsx16(Heading2, { slot: "title", className: "font-heading text-base leading-none font-medium", children: title }),
|
|
1086
|
+
description ? /* @__PURE__ */ jsx16(Text3, { slot: "description", className: "mt-2 text-sm text-muted-foreground", children: description }) : null
|
|
899
1087
|
] }),
|
|
900
|
-
showCloseButton ? /* @__PURE__ */
|
|
1088
|
+
showCloseButton ? /* @__PURE__ */ jsx16(
|
|
901
1089
|
Button,
|
|
902
1090
|
{
|
|
903
1091
|
"aria-label": "Cerrar di\xE1logo",
|
|
@@ -905,12 +1093,12 @@ function ModalDialog({
|
|
|
905
1093
|
size: "icon",
|
|
906
1094
|
className: "-mr-2 -mt-1",
|
|
907
1095
|
onPress: close,
|
|
908
|
-
children: /* @__PURE__ */
|
|
1096
|
+
children: /* @__PURE__ */ jsx16(X, { "aria-hidden": "true", className: "size-4" })
|
|
909
1097
|
}
|
|
910
1098
|
) : null
|
|
911
1099
|
] }),
|
|
912
|
-
children ? /* @__PURE__ */
|
|
913
|
-
footer ? /* @__PURE__ */
|
|
1100
|
+
children ? /* @__PURE__ */ jsx16("div", { "data-slot": "modal-dialog-body", className: "min-h-0 overflow-y-auto px-5 py-4", children }) : null,
|
|
1101
|
+
footer ? /* @__PURE__ */ jsx16(
|
|
914
1102
|
"footer",
|
|
915
1103
|
{
|
|
916
1104
|
"data-slot": "modal-dialog-footer",
|
|
@@ -931,7 +1119,7 @@ function ModalDialog({
|
|
|
931
1119
|
}
|
|
932
1120
|
|
|
933
1121
|
// src/ui/confirm-dialog/confirm-dialog.tsx
|
|
934
|
-
import { Fragment as
|
|
1122
|
+
import { Fragment as Fragment6, jsx as jsx17, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
935
1123
|
function ConfirmDialog({
|
|
936
1124
|
open,
|
|
937
1125
|
onOpenChange,
|
|
@@ -943,7 +1131,7 @@ function ConfirmDialog({
|
|
|
943
1131
|
pending = false,
|
|
944
1132
|
onConfirm
|
|
945
1133
|
}) {
|
|
946
|
-
return /* @__PURE__ */
|
|
1134
|
+
return /* @__PURE__ */ jsx17(
|
|
947
1135
|
ModalDialog,
|
|
948
1136
|
{
|
|
949
1137
|
open,
|
|
@@ -951,42 +1139,79 @@ function ConfirmDialog({
|
|
|
951
1139
|
title,
|
|
952
1140
|
description,
|
|
953
1141
|
showCloseButton: false,
|
|
954
|
-
footer: /* @__PURE__ */
|
|
955
|
-
/* @__PURE__ */
|
|
956
|
-
/* @__PURE__ */
|
|
1142
|
+
footer: /* @__PURE__ */ jsxs6(Fragment6, { children: [
|
|
1143
|
+
/* @__PURE__ */ jsx17(Button, { variant: "outline", isDisabled: pending, onPress: () => onOpenChange(false), children: cancelLabel }),
|
|
1144
|
+
/* @__PURE__ */ jsx17(Button, { variant: destructive ? "destructive" : "default", isDisabled: pending, onPress: onConfirm, children: confirmLabel })
|
|
957
1145
|
] })
|
|
958
1146
|
}
|
|
959
1147
|
);
|
|
960
1148
|
}
|
|
961
1149
|
|
|
1150
|
+
// src/ui/danger-zone/danger-zone.tsx
|
|
1151
|
+
import { ChevronDown, ShieldAlert } from "lucide-react";
|
|
1152
|
+
import {
|
|
1153
|
+
Button as DisclosureButton,
|
|
1154
|
+
Disclosure,
|
|
1155
|
+
DisclosurePanel,
|
|
1156
|
+
Heading as Heading3
|
|
1157
|
+
} from "react-aria-components";
|
|
1158
|
+
import { jsx as jsx18, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1159
|
+
function DangerZone({
|
|
1160
|
+
title = "Zona de peligro",
|
|
1161
|
+
description = "Acciones irreversibles. \xC1brela solo si est\xE1s seguro.",
|
|
1162
|
+
defaultOpen = false,
|
|
1163
|
+
className,
|
|
1164
|
+
children
|
|
1165
|
+
}) {
|
|
1166
|
+
return /* @__PURE__ */ jsx18(Disclosure, { defaultExpanded: defaultOpen, children: /* @__PURE__ */ jsxs7(Card, { className: cn("border-destructive/30", className), children: [
|
|
1167
|
+
/* @__PURE__ */ jsx18(Heading3, { className: "flex", children: /* @__PURE__ */ jsxs7(
|
|
1168
|
+
DisclosureButton,
|
|
1169
|
+
{
|
|
1170
|
+
slot: "trigger",
|
|
1171
|
+
"data-slot": "danger-zone-trigger",
|
|
1172
|
+
className: "group/danger flex w-full items-center gap-3 px-4 text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50",
|
|
1173
|
+
children: [
|
|
1174
|
+
/* @__PURE__ */ jsx18(ShieldAlert, { className: "size-4 shrink-0 text-destructive" }),
|
|
1175
|
+
/* @__PURE__ */ jsxs7("span", { className: "flex flex-1 flex-col gap-0.5", children: [
|
|
1176
|
+
/* @__PURE__ */ jsx18("span", { className: "font-heading text-base leading-snug font-medium text-destructive", children: title }),
|
|
1177
|
+
/* @__PURE__ */ jsx18("span", { className: "text-xs text-muted-foreground", children: description })
|
|
1178
|
+
] }),
|
|
1179
|
+
/* @__PURE__ */ jsx18(ChevronDown, { className: "size-4 shrink-0 text-muted-foreground transition-transform group-aria-expanded/danger:rotate-180" })
|
|
1180
|
+
]
|
|
1181
|
+
}
|
|
1182
|
+
) }),
|
|
1183
|
+
/* @__PURE__ */ jsx18(DisclosurePanel, { "data-slot": "danger-zone-content", children: /* @__PURE__ */ jsx18(CardContent, { children }) })
|
|
1184
|
+
] }) });
|
|
1185
|
+
}
|
|
1186
|
+
|
|
962
1187
|
// src/ui/dialog/dialog.tsx
|
|
963
1188
|
import { XIcon } from "lucide-react";
|
|
964
|
-
import * as
|
|
1189
|
+
import * as React4 from "react";
|
|
965
1190
|
import {
|
|
966
|
-
Dialog as
|
|
967
|
-
Heading as
|
|
968
|
-
Modal as
|
|
969
|
-
ModalOverlay as
|
|
970
|
-
Text as
|
|
1191
|
+
Dialog as AriaDialog3,
|
|
1192
|
+
Heading as Heading4,
|
|
1193
|
+
Modal as Modal3,
|
|
1194
|
+
ModalOverlay as ModalOverlay3,
|
|
1195
|
+
Text as Text4
|
|
971
1196
|
} from "react-aria-components";
|
|
972
|
-
import { Fragment as
|
|
973
|
-
var DialogContext =
|
|
1197
|
+
import { Fragment as Fragment7, jsx as jsx19, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1198
|
+
var DialogContext = React4.createContext(null);
|
|
974
1199
|
function useDialogContext() {
|
|
975
|
-
const context =
|
|
1200
|
+
const context = React4.useContext(DialogContext);
|
|
976
1201
|
if (!context) throw new Error("Dialog components must be rendered within Dialog.");
|
|
977
1202
|
return context;
|
|
978
1203
|
}
|
|
979
1204
|
function Dialog({ children, defaultOpen = false, onOpenChange, open: controlledOpen }) {
|
|
980
|
-
const [uncontrolledOpen, setUncontrolledOpen] =
|
|
1205
|
+
const [uncontrolledOpen, setUncontrolledOpen] = React4.useState(defaultOpen);
|
|
981
1206
|
const open = controlledOpen ?? uncontrolledOpen;
|
|
982
|
-
const setOpen =
|
|
1207
|
+
const setOpen = React4.useCallback(
|
|
983
1208
|
(nextOpen) => {
|
|
984
1209
|
if (controlledOpen === void 0) setUncontrolledOpen(nextOpen);
|
|
985
1210
|
onOpenChange?.(nextOpen);
|
|
986
1211
|
},
|
|
987
1212
|
[controlledOpen, onOpenChange]
|
|
988
1213
|
);
|
|
989
|
-
return /* @__PURE__ */
|
|
1214
|
+
return /* @__PURE__ */ jsx19(DialogContext.Provider, { value: { open, setOpen }, children });
|
|
990
1215
|
}
|
|
991
1216
|
function DialogTrigger({ asChild = false, children, onClick, ...props }) {
|
|
992
1217
|
const { setOpen } = useDialogContext();
|
|
@@ -994,9 +1219,9 @@ function DialogTrigger({ asChild = false, children, onClick, ...props }) {
|
|
|
994
1219
|
onClick?.(event);
|
|
995
1220
|
if (!event.defaultPrevented) setOpen(true);
|
|
996
1221
|
};
|
|
997
|
-
if (asChild &&
|
|
1222
|
+
if (asChild && React4.isValidElement(children)) {
|
|
998
1223
|
const child = children;
|
|
999
|
-
return
|
|
1224
|
+
return React4.cloneElement(child, {
|
|
1000
1225
|
...props,
|
|
1001
1226
|
"data-slot": "dialog-trigger",
|
|
1002
1227
|
onClick: (event) => {
|
|
@@ -1005,16 +1230,16 @@ function DialogTrigger({ asChild = false, children, onClick, ...props }) {
|
|
|
1005
1230
|
}
|
|
1006
1231
|
});
|
|
1007
1232
|
}
|
|
1008
|
-
return /* @__PURE__ */
|
|
1233
|
+
return /* @__PURE__ */ jsx19(Button, { "data-slot": "dialog-trigger", onPress: () => setOpen(true), ...props, children });
|
|
1009
1234
|
}
|
|
1010
1235
|
function DialogPortal({ children }) {
|
|
1011
|
-
return /* @__PURE__ */
|
|
1236
|
+
return /* @__PURE__ */ jsx19(Fragment7, { children });
|
|
1012
1237
|
}
|
|
1013
1238
|
function DialogOverlay({ children, className, ...props }) {
|
|
1014
1239
|
const { open, setOpen } = useDialogContext();
|
|
1015
1240
|
if (!open) return null;
|
|
1016
|
-
return /* @__PURE__ */
|
|
1017
|
-
|
|
1241
|
+
return /* @__PURE__ */ jsx19(
|
|
1242
|
+
ModalOverlay3,
|
|
1018
1243
|
{
|
|
1019
1244
|
"data-slot": "dialog-overlay",
|
|
1020
1245
|
isDismissable: true,
|
|
@@ -1037,21 +1262,21 @@ function DialogContent({
|
|
|
1037
1262
|
...props
|
|
1038
1263
|
}) {
|
|
1039
1264
|
const { setOpen } = useDialogContext();
|
|
1040
|
-
return /* @__PURE__ */
|
|
1265
|
+
return /* @__PURE__ */ jsx19(DialogPortal, { children: /* @__PURE__ */ jsx19(
|
|
1041
1266
|
DialogOverlay,
|
|
1042
1267
|
{
|
|
1043
1268
|
onClick: (event) => {
|
|
1044
1269
|
if (event.target === event.currentTarget) onOverlayClick?.(event);
|
|
1045
1270
|
},
|
|
1046
|
-
children: /* @__PURE__ */
|
|
1047
|
-
|
|
1271
|
+
children: /* @__PURE__ */ jsx19(
|
|
1272
|
+
Modal3,
|
|
1048
1273
|
{
|
|
1049
1274
|
className: cn(
|
|
1050
1275
|
"w-full max-w-[calc(100%-2rem)] max-h-[calc(100dvh-2rem)] outline-none sm:max-w-sm",
|
|
1051
1276
|
className
|
|
1052
1277
|
),
|
|
1053
|
-
children: /* @__PURE__ */
|
|
1054
|
-
|
|
1278
|
+
children: /* @__PURE__ */ jsxs8(
|
|
1279
|
+
AriaDialog3,
|
|
1055
1280
|
{
|
|
1056
1281
|
"data-slot": "dialog-content",
|
|
1057
1282
|
className: cn(
|
|
@@ -1061,7 +1286,7 @@ function DialogContent({
|
|
|
1061
1286
|
...props,
|
|
1062
1287
|
children: [
|
|
1063
1288
|
children,
|
|
1064
|
-
showCloseButton ? /* @__PURE__ */
|
|
1289
|
+
showCloseButton ? /* @__PURE__ */ jsx19(
|
|
1065
1290
|
Button,
|
|
1066
1291
|
{
|
|
1067
1292
|
"aria-label": "Cerrar di\xE1logo",
|
|
@@ -1070,7 +1295,7 @@ function DialogContent({
|
|
|
1070
1295
|
className: "absolute top-2 right-2",
|
|
1071
1296
|
size: "icon-sm",
|
|
1072
1297
|
onPress: () => setOpen(false),
|
|
1073
|
-
children: /* @__PURE__ */
|
|
1298
|
+
children: /* @__PURE__ */ jsx19(XIcon, {})
|
|
1074
1299
|
}
|
|
1075
1300
|
) : null
|
|
1076
1301
|
]
|
|
@@ -1083,9 +1308,9 @@ function DialogContent({
|
|
|
1083
1308
|
}
|
|
1084
1309
|
function DialogClose({ asChild = false, children, onClick, ...props }) {
|
|
1085
1310
|
const { setOpen } = useDialogContext();
|
|
1086
|
-
if (asChild &&
|
|
1311
|
+
if (asChild && React4.isValidElement(children)) {
|
|
1087
1312
|
const child = children;
|
|
1088
|
-
return
|
|
1313
|
+
return React4.cloneElement(child, {
|
|
1089
1314
|
...props,
|
|
1090
1315
|
"data-slot": "dialog-close",
|
|
1091
1316
|
onClick: (event) => {
|
|
@@ -1094,42 +1319,74 @@ function DialogClose({ asChild = false, children, onClick, ...props }) {
|
|
|
1094
1319
|
}
|
|
1095
1320
|
});
|
|
1096
1321
|
}
|
|
1097
|
-
return /* @__PURE__ */
|
|
1322
|
+
return /* @__PURE__ */ jsx19(Button, { "data-slot": "dialog-close", onPress: () => setOpen(false), ...props, children });
|
|
1098
1323
|
}
|
|
1099
1324
|
function DialogHeader({ className, ...props }) {
|
|
1100
|
-
return /* @__PURE__ */
|
|
1325
|
+
return /* @__PURE__ */ jsx19("div", { "data-slot": "dialog-header", className: cn("flex flex-col gap-2", className), ...props });
|
|
1101
1326
|
}
|
|
1102
1327
|
function DialogFooter({ className, showCloseButton = false, children, ...props }) {
|
|
1103
|
-
return /* @__PURE__ */
|
|
1328
|
+
return /* @__PURE__ */ jsxs8("div", { "data-slot": "dialog-footer", className: cn("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:flex-wrap sm:justify-end", className), ...props, children: [
|
|
1104
1329
|
children,
|
|
1105
|
-
showCloseButton ? /* @__PURE__ */
|
|
1330
|
+
showCloseButton ? /* @__PURE__ */ jsx19(DialogClose, { variant: "outline", children: "Cerrar" }) : null
|
|
1106
1331
|
] });
|
|
1107
1332
|
}
|
|
1108
1333
|
function DialogTitle({ className, ...props }) {
|
|
1109
|
-
return /* @__PURE__ */
|
|
1334
|
+
return /* @__PURE__ */ jsx19(Heading4, { slot: "title", "data-slot": "dialog-title", className: cn("font-heading text-base leading-none font-medium", className), ...props });
|
|
1110
1335
|
}
|
|
1111
1336
|
function DialogDescription({ className, ...props }) {
|
|
1112
|
-
return /* @__PURE__ */
|
|
1337
|
+
return /* @__PURE__ */ jsx19(Text4, { slot: "description", "data-slot": "dialog-description", className: cn("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", className), ...props });
|
|
1338
|
+
}
|
|
1339
|
+
|
|
1340
|
+
// src/ui/doc-preview/doc-preview.tsx
|
|
1341
|
+
import { FileText, Image } from "lucide-react";
|
|
1342
|
+
import { jsx as jsx20, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1343
|
+
function DocPreview({ url, mimeType, name }) {
|
|
1344
|
+
if (!url) return /* @__PURE__ */ jsx20(Fallback, { mimeType, reason: "no-url" });
|
|
1345
|
+
if (mimeType === "application/pdf" || mimeType === "text/plain" || mimeType === "text/csv") {
|
|
1346
|
+
return /* @__PURE__ */ jsx20(
|
|
1347
|
+
"iframe",
|
|
1348
|
+
{
|
|
1349
|
+
src: url,
|
|
1350
|
+
title: name,
|
|
1351
|
+
className: "w-full rounded-sm border-0",
|
|
1352
|
+
style: { height: "75vh", minHeight: 400 }
|
|
1353
|
+
}
|
|
1354
|
+
);
|
|
1355
|
+
}
|
|
1356
|
+
if (mimeType?.startsWith("image/")) {
|
|
1357
|
+
return /* @__PURE__ */ jsx20("div", { className: "flex justify-center rounded-sm bg-muted/30 p-6", children: /* @__PURE__ */ jsx20("img", { src: url, alt: name, className: "max-h-[75vh] max-w-full rounded object-contain" }) });
|
|
1358
|
+
}
|
|
1359
|
+
return /* @__PURE__ */ jsx20(Fallback, { mimeType, reason: "unsupported" });
|
|
1360
|
+
}
|
|
1361
|
+
function Fallback({ mimeType, reason }) {
|
|
1362
|
+
const Icon = mimeType?.startsWith("image/") ? Image : FileText;
|
|
1363
|
+
const message = reason === "no-url" ? "No se pudo generar la URL de preview." : "Preview no disponible para este tipo de archivo.";
|
|
1364
|
+
return /* @__PURE__ */ jsxs9("div", { className: "flex flex-col items-center justify-center gap-2 py-14 text-muted-foreground", children: [
|
|
1365
|
+
/* @__PURE__ */ jsx20(Icon, { className: "size-9 opacity-30" }),
|
|
1366
|
+
/* @__PURE__ */ jsx20("p", { className: "text-sm", children: message }),
|
|
1367
|
+
mimeType ? /* @__PURE__ */ jsx20("p", { className: "font-mono text-xs opacity-50", children: mimeType }) : null,
|
|
1368
|
+
/* @__PURE__ */ jsx20("p", { className: "text-xs opacity-50", children: "Usa el bot\xF3n Descargar para abrir el archivo." })
|
|
1369
|
+
] });
|
|
1113
1370
|
}
|
|
1114
1371
|
|
|
1115
1372
|
// src/ui/drawer/drawer.tsx
|
|
1116
|
-
import { Dialog as
|
|
1117
|
-
import { jsx as
|
|
1373
|
+
import { Dialog as AriaDialog4, Modal as Modal4, ModalOverlay as ModalOverlay4 } from "react-aria-components";
|
|
1374
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
1118
1375
|
var sideStyles = { left: "inset-y-0 left-0 h-full w-[min(22rem,calc(100%-2rem))] data-entering:animate-ui-surface-in", right: "inset-y-0 right-0 h-full w-[min(22rem,calc(100%-2rem))] data-entering:animate-ui-surface-in", bottom: "inset-x-0 bottom-0 max-h-[85vh] w-full data-entering:animate-ui-surface-in" };
|
|
1119
1376
|
function Drawer({ children, side = "right", className, ...props }) {
|
|
1120
|
-
return /* @__PURE__ */
|
|
1377
|
+
return /* @__PURE__ */ jsx21(ModalOverlay4, { isDismissable: true, className: "fixed inset-0 z-50 bg-black/20 backdrop-blur-[1px] motion-safe:data-entering:animate-ui-overlay-in motion-safe:data-exiting:animate-ui-overlay-out", ...props, children: /* @__PURE__ */ jsx21(Modal4, { className: cn("absolute grid gap-4 overflow-y-auto rounded-xl border border-border bg-background p-5 text-foreground shadow-xl outline-none", sideStyles[side], className), children: /* @__PURE__ */ jsx21(AriaDialog4, { "data-slot": "drawer", className: "outline-none", children }) }) });
|
|
1121
1378
|
}
|
|
1122
1379
|
function DrawerHeader({ className, ...props }) {
|
|
1123
|
-
return /* @__PURE__ */
|
|
1380
|
+
return /* @__PURE__ */ jsx21("div", { "data-slot": "drawer-header", className: cn("flex flex-col gap-1.5", className), ...props });
|
|
1124
1381
|
}
|
|
1125
1382
|
function DrawerFooter({ className, ...props }) {
|
|
1126
|
-
return /* @__PURE__ */
|
|
1383
|
+
return /* @__PURE__ */ jsx21("div", { "data-slot": "drawer-footer", className: cn("mt-auto flex flex-col-reverse gap-2 pt-4 sm:flex-row sm:justify-end", className), ...props });
|
|
1127
1384
|
}
|
|
1128
1385
|
function DrawerTitle({ className, ...props }) {
|
|
1129
|
-
return /* @__PURE__ */
|
|
1386
|
+
return /* @__PURE__ */ jsx21("h2", { "data-slot": "drawer-title", className: cn("text-base font-semibold", className), ...props });
|
|
1130
1387
|
}
|
|
1131
1388
|
function DrawerDescription({ className, ...props }) {
|
|
1132
|
-
return /* @__PURE__ */
|
|
1389
|
+
return /* @__PURE__ */ jsx21("p", { "data-slot": "drawer-description", className: cn("text-sm text-muted-foreground", className), ...props });
|
|
1133
1390
|
}
|
|
1134
1391
|
|
|
1135
1392
|
// src/ui/dropdown-menu/dropdown-menu.tsx
|
|
@@ -1147,11 +1404,11 @@ import {
|
|
|
1147
1404
|
Separator as SeparatorPrimitive2,
|
|
1148
1405
|
SubmenuTrigger as SubmenuTriggerPrimitive
|
|
1149
1406
|
} from "react-aria-components";
|
|
1150
|
-
import { Fragment as
|
|
1407
|
+
import { Fragment as Fragment8, jsx as jsx22, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1151
1408
|
function DropdownMenuTrigger({
|
|
1152
1409
|
...props
|
|
1153
1410
|
}) {
|
|
1154
|
-
return /* @__PURE__ */
|
|
1411
|
+
return /* @__PURE__ */ jsx22(MenuTriggerPrimitive, { "data-slot": "dropdown-menu-trigger", ...props });
|
|
1155
1412
|
}
|
|
1156
1413
|
function DropdownMenu({
|
|
1157
1414
|
"data-slot": dataSlot = "dropdown-menu-content",
|
|
@@ -1162,7 +1419,7 @@ function DropdownMenu({
|
|
|
1162
1419
|
children,
|
|
1163
1420
|
...props
|
|
1164
1421
|
}) {
|
|
1165
|
-
return /* @__PURE__ */
|
|
1422
|
+
return /* @__PURE__ */ jsx22(
|
|
1166
1423
|
PopoverPrimitive,
|
|
1167
1424
|
{
|
|
1168
1425
|
"data-slot": dataSlot,
|
|
@@ -1170,7 +1427,7 @@ function DropdownMenu({
|
|
|
1170
1427
|
offset,
|
|
1171
1428
|
crossOffset,
|
|
1172
1429
|
className: cn("z-50 w-(--trigger-width) min-w-32 origin-(--trigger-anchor-point) overflow-x-hidden overflow-y-auto rounded-lg border border-border bg-popover p-1 text-popover-foreground shadow-lg outline-none motion-safe:data-entering:animate-ui-surface-in motion-safe:data-exiting:animate-ui-surface-out", className),
|
|
1173
|
-
children: /* @__PURE__ */
|
|
1430
|
+
children: /* @__PURE__ */ jsx22(
|
|
1174
1431
|
MenuPrimitive,
|
|
1175
1432
|
{
|
|
1176
1433
|
className: "max-h-[inherit] overflow-x-hidden overflow-y-auto outline-hidden",
|
|
@@ -1184,14 +1441,14 @@ function DropdownMenu({
|
|
|
1184
1441
|
function DropdownMenuGroup({
|
|
1185
1442
|
...props
|
|
1186
1443
|
}) {
|
|
1187
|
-
return /* @__PURE__ */
|
|
1444
|
+
return /* @__PURE__ */ jsx22(MenuSectionPrimitive, { "data-slot": "dropdown-menu-group", ...props });
|
|
1188
1445
|
}
|
|
1189
1446
|
function DropdownMenuLabel({
|
|
1190
1447
|
className,
|
|
1191
1448
|
inset,
|
|
1192
1449
|
...props
|
|
1193
1450
|
}) {
|
|
1194
|
-
return /* @__PURE__ */
|
|
1451
|
+
return /* @__PURE__ */ jsx22(
|
|
1195
1452
|
HeaderPrimitive,
|
|
1196
1453
|
{
|
|
1197
1454
|
"data-slot": "dropdown-menu-label",
|
|
@@ -1223,7 +1480,7 @@ function DropdownMenuItem({
|
|
|
1223
1480
|
children,
|
|
1224
1481
|
...props
|
|
1225
1482
|
}) {
|
|
1226
|
-
return /* @__PURE__ */
|
|
1483
|
+
return /* @__PURE__ */ jsx22(
|
|
1227
1484
|
MenuItemPrimitive,
|
|
1228
1485
|
{
|
|
1229
1486
|
"data-slot": "dropdown-menu-item",
|
|
@@ -1237,13 +1494,13 @@ function DropdownMenuItem({
|
|
|
1237
1494
|
...props,
|
|
1238
1495
|
children: composeRenderProps(
|
|
1239
1496
|
children,
|
|
1240
|
-
(children2, { isSelected, selectionMode }) => /* @__PURE__ */
|
|
1241
|
-
selectionMode !== "none" ? /* @__PURE__ */
|
|
1497
|
+
(children2, { isSelected, selectionMode }) => /* @__PURE__ */ jsxs10(Fragment8, { children: [
|
|
1498
|
+
selectionMode !== "none" ? /* @__PURE__ */ jsx22(
|
|
1242
1499
|
"span",
|
|
1243
1500
|
{
|
|
1244
1501
|
className: "pointer-events-none absolute right-2 flex items-center justify-center",
|
|
1245
1502
|
"data-slot": selectionMode === "single" ? "dropdown-menu-radio-item-indicator" : "dropdown-menu-checkbox-item-indicator",
|
|
1246
|
-
children: isSelected ? /* @__PURE__ */
|
|
1503
|
+
children: isSelected ? /* @__PURE__ */ jsx22(CheckIcon, {}) : null
|
|
1247
1504
|
}
|
|
1248
1505
|
) : null,
|
|
1249
1506
|
children2
|
|
@@ -1255,7 +1512,7 @@ function DropdownMenuItem({
|
|
|
1255
1512
|
function DropdownMenuSub({
|
|
1256
1513
|
...props
|
|
1257
1514
|
}) {
|
|
1258
|
-
return /* @__PURE__ */
|
|
1515
|
+
return /* @__PURE__ */ jsx22(SubmenuTriggerPrimitive, { "data-slot": "dropdown-menu-sub", ...props });
|
|
1259
1516
|
}
|
|
1260
1517
|
function DropdownMenuSubTrigger({
|
|
1261
1518
|
className,
|
|
@@ -1263,7 +1520,7 @@ function DropdownMenuSubTrigger({
|
|
|
1263
1520
|
children,
|
|
1264
1521
|
...props
|
|
1265
1522
|
}) {
|
|
1266
|
-
return /* @__PURE__ */
|
|
1523
|
+
return /* @__PURE__ */ jsx22(
|
|
1267
1524
|
MenuItemPrimitive,
|
|
1268
1525
|
{
|
|
1269
1526
|
"data-slot": "dropdown-menu-sub-trigger",
|
|
@@ -1274,9 +1531,9 @@ function DropdownMenuSubTrigger({
|
|
|
1274
1531
|
className
|
|
1275
1532
|
),
|
|
1276
1533
|
...props,
|
|
1277
|
-
children: composeRenderProps(children, (children2) => /* @__PURE__ */
|
|
1534
|
+
children: composeRenderProps(children, (children2) => /* @__PURE__ */ jsxs10(Fragment8, { children: [
|
|
1278
1535
|
children2,
|
|
1279
|
-
/* @__PURE__ */
|
|
1536
|
+
/* @__PURE__ */ jsx22(ChevronRightIcon, { className: "cn-rtl-flip ml-auto" })
|
|
1280
1537
|
] }))
|
|
1281
1538
|
}
|
|
1282
1539
|
);
|
|
@@ -1288,7 +1545,7 @@ function DropdownMenuSubContent({
|
|
|
1288
1545
|
className,
|
|
1289
1546
|
...props
|
|
1290
1547
|
}) {
|
|
1291
|
-
return /* @__PURE__ */
|
|
1548
|
+
return /* @__PURE__ */ jsx22(
|
|
1292
1549
|
DropdownMenu,
|
|
1293
1550
|
{
|
|
1294
1551
|
"data-slot": "dropdown-menu-sub-content",
|
|
@@ -1304,7 +1561,7 @@ function DropdownMenuSeparator({
|
|
|
1304
1561
|
className,
|
|
1305
1562
|
...props
|
|
1306
1563
|
}) {
|
|
1307
|
-
return /* @__PURE__ */
|
|
1564
|
+
return /* @__PURE__ */ jsx22(
|
|
1308
1565
|
SeparatorPrimitive2,
|
|
1309
1566
|
{
|
|
1310
1567
|
"data-slot": "dropdown-menu-separator",
|
|
@@ -1317,7 +1574,7 @@ function DropdownMenuShortcut({
|
|
|
1317
1574
|
className,
|
|
1318
1575
|
...props
|
|
1319
1576
|
}) {
|
|
1320
|
-
return /* @__PURE__ */
|
|
1577
|
+
return /* @__PURE__ */ jsx22(
|
|
1321
1578
|
"span",
|
|
1322
1579
|
{
|
|
1323
1580
|
"data-slot": "dropdown-menu-shortcut",
|
|
@@ -1332,9 +1589,9 @@ function DropdownMenuShortcut({
|
|
|
1332
1589
|
|
|
1333
1590
|
// src/ui/empty-state/empty-state.tsx
|
|
1334
1591
|
import { cva as cva7 } from "class-variance-authority";
|
|
1335
|
-
import { jsx as
|
|
1592
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
1336
1593
|
function EmptyState({ className, ...props }) {
|
|
1337
|
-
return /* @__PURE__ */
|
|
1594
|
+
return /* @__PURE__ */ jsx23(
|
|
1338
1595
|
"div",
|
|
1339
1596
|
{
|
|
1340
1597
|
"data-slot": "empty-state",
|
|
@@ -1347,7 +1604,7 @@ function EmptyState({ className, ...props }) {
|
|
|
1347
1604
|
);
|
|
1348
1605
|
}
|
|
1349
1606
|
function EmptyStateHeader({ className, ...props }) {
|
|
1350
|
-
return /* @__PURE__ */
|
|
1607
|
+
return /* @__PURE__ */ jsx23(
|
|
1351
1608
|
"div",
|
|
1352
1609
|
{
|
|
1353
1610
|
"data-slot": "empty-state-header",
|
|
@@ -1373,7 +1630,7 @@ function EmptyStateMedia({
|
|
|
1373
1630
|
variant = "default",
|
|
1374
1631
|
...props
|
|
1375
1632
|
}) {
|
|
1376
|
-
return /* @__PURE__ */
|
|
1633
|
+
return /* @__PURE__ */ jsx23(
|
|
1377
1634
|
"div",
|
|
1378
1635
|
{
|
|
1379
1636
|
"data-slot": "empty-state-media",
|
|
@@ -1384,7 +1641,7 @@ function EmptyStateMedia({
|
|
|
1384
1641
|
);
|
|
1385
1642
|
}
|
|
1386
1643
|
function EmptyStateTitle({ className, ...props }) {
|
|
1387
|
-
return /* @__PURE__ */
|
|
1644
|
+
return /* @__PURE__ */ jsx23(
|
|
1388
1645
|
"h3",
|
|
1389
1646
|
{
|
|
1390
1647
|
"data-slot": "empty-state-title",
|
|
@@ -1394,7 +1651,7 @@ function EmptyStateTitle({ className, ...props }) {
|
|
|
1394
1651
|
);
|
|
1395
1652
|
}
|
|
1396
1653
|
function EmptyStateDescription({ className, ...props }) {
|
|
1397
|
-
return /* @__PURE__ */
|
|
1654
|
+
return /* @__PURE__ */ jsx23(
|
|
1398
1655
|
"p",
|
|
1399
1656
|
{
|
|
1400
1657
|
"data-slot": "empty-state-description",
|
|
@@ -1407,7 +1664,7 @@ function EmptyStateDescription({ className, ...props }) {
|
|
|
1407
1664
|
);
|
|
1408
1665
|
}
|
|
1409
1666
|
function EmptyStateContent({ className, ...props }) {
|
|
1410
|
-
return /* @__PURE__ */
|
|
1667
|
+
return /* @__PURE__ */ jsx23(
|
|
1411
1668
|
"div",
|
|
1412
1669
|
{
|
|
1413
1670
|
"data-slot": "empty-state-content",
|
|
@@ -1426,22 +1683,22 @@ import { cva as cva8 } from "class-variance-authority";
|
|
|
1426
1683
|
// src/ui/label/label.tsx
|
|
1427
1684
|
import { forwardRef } from "react";
|
|
1428
1685
|
import { Label as LabelPrimitive } from "react-aria-components";
|
|
1429
|
-
import { jsx as
|
|
1686
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
1430
1687
|
var Label2 = forwardRef(function Label3({ className, ...props }, ref) {
|
|
1431
|
-
return /* @__PURE__ */
|
|
1688
|
+
return /* @__PURE__ */ jsx24(LabelPrimitive, { ref, "data-slot": "label", className: cn("flex items-center gap-2 text-sm font-medium leading-none select-none", className), ...props });
|
|
1432
1689
|
});
|
|
1433
1690
|
|
|
1434
1691
|
// src/ui/field/field.tsx
|
|
1435
|
-
import { jsx as
|
|
1692
|
+
import { jsx as jsx25, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1436
1693
|
function FieldSet({ className, ...props }) {
|
|
1437
|
-
return /* @__PURE__ */
|
|
1694
|
+
return /* @__PURE__ */ jsx25("fieldset", { "data-slot": "field-set", className: cn("flex flex-col gap-4", className), ...props });
|
|
1438
1695
|
}
|
|
1439
1696
|
function FieldLegend({
|
|
1440
1697
|
className,
|
|
1441
1698
|
variant = "legend",
|
|
1442
1699
|
...props
|
|
1443
1700
|
}) {
|
|
1444
|
-
return /* @__PURE__ */
|
|
1701
|
+
return /* @__PURE__ */ jsx25(
|
|
1445
1702
|
"legend",
|
|
1446
1703
|
{
|
|
1447
1704
|
"data-slot": "field-legend",
|
|
@@ -1455,7 +1712,7 @@ function FieldLegend({
|
|
|
1455
1712
|
);
|
|
1456
1713
|
}
|
|
1457
1714
|
function FieldGroup({ className, ...props }) {
|
|
1458
|
-
return /* @__PURE__ */
|
|
1715
|
+
return /* @__PURE__ */ jsx25(
|
|
1459
1716
|
"div",
|
|
1460
1717
|
{
|
|
1461
1718
|
"data-slot": "field-group",
|
|
@@ -1483,7 +1740,7 @@ var fieldVariants = cva8(
|
|
|
1483
1740
|
function Field({ className, orientation = "vertical", ...props }) {
|
|
1484
1741
|
return (
|
|
1485
1742
|
// biome-ignore lint/a11y/useSemanticElements: FieldSet provides native fieldset semantics when they are appropriate.
|
|
1486
|
-
/* @__PURE__ */
|
|
1743
|
+
/* @__PURE__ */ jsx25(
|
|
1487
1744
|
"div",
|
|
1488
1745
|
{
|
|
1489
1746
|
role: "group",
|
|
@@ -1496,7 +1753,7 @@ function Field({ className, orientation = "vertical", ...props }) {
|
|
|
1496
1753
|
);
|
|
1497
1754
|
}
|
|
1498
1755
|
function FieldContent({ className, ...props }) {
|
|
1499
|
-
return /* @__PURE__ */
|
|
1756
|
+
return /* @__PURE__ */ jsx25(
|
|
1500
1757
|
"div",
|
|
1501
1758
|
{
|
|
1502
1759
|
"data-slot": "field-content",
|
|
@@ -1506,7 +1763,7 @@ function FieldContent({ className, ...props }) {
|
|
|
1506
1763
|
);
|
|
1507
1764
|
}
|
|
1508
1765
|
function FieldLabel({ className, ...props }) {
|
|
1509
|
-
return /* @__PURE__ */
|
|
1766
|
+
return /* @__PURE__ */ jsx25(
|
|
1510
1767
|
Label2,
|
|
1511
1768
|
{
|
|
1512
1769
|
"data-slot": "field-label",
|
|
@@ -1519,7 +1776,7 @@ function FieldLabel({ className, ...props }) {
|
|
|
1519
1776
|
);
|
|
1520
1777
|
}
|
|
1521
1778
|
function FieldTitle({ className, ...props }) {
|
|
1522
|
-
return /* @__PURE__ */
|
|
1779
|
+
return /* @__PURE__ */ jsx25(
|
|
1523
1780
|
"div",
|
|
1524
1781
|
{
|
|
1525
1782
|
"data-slot": "field-title",
|
|
@@ -1529,7 +1786,7 @@ function FieldTitle({ className, ...props }) {
|
|
|
1529
1786
|
);
|
|
1530
1787
|
}
|
|
1531
1788
|
function FieldDescription({ className, ...props }) {
|
|
1532
|
-
return /* @__PURE__ */
|
|
1789
|
+
return /* @__PURE__ */ jsx25(
|
|
1533
1790
|
"p",
|
|
1534
1791
|
{
|
|
1535
1792
|
"data-slot": "field-description",
|
|
@@ -1542,7 +1799,7 @@ function FieldDescription({ className, ...props }) {
|
|
|
1542
1799
|
);
|
|
1543
1800
|
}
|
|
1544
1801
|
function FieldSeparator({ className, children, ...props }) {
|
|
1545
|
-
return /* @__PURE__ */
|
|
1802
|
+
return /* @__PURE__ */ jsxs11(
|
|
1546
1803
|
"div",
|
|
1547
1804
|
{
|
|
1548
1805
|
"data-slot": "field-separator",
|
|
@@ -1550,8 +1807,8 @@ function FieldSeparator({ className, children, ...props }) {
|
|
|
1550
1807
|
className: cn("relative -my-2 h-5 text-sm", className),
|
|
1551
1808
|
...props,
|
|
1552
1809
|
children: [
|
|
1553
|
-
/* @__PURE__ */
|
|
1554
|
-
children ? /* @__PURE__ */
|
|
1810
|
+
/* @__PURE__ */ jsx25(Separator, { className: "absolute inset-0 top-1/2" }),
|
|
1811
|
+
children ? /* @__PURE__ */ jsx25(
|
|
1555
1812
|
"span",
|
|
1556
1813
|
{
|
|
1557
1814
|
"data-slot": "field-separator-content",
|
|
@@ -1565,9 +1822,9 @@ function FieldSeparator({ className, children, ...props }) {
|
|
|
1565
1822
|
}
|
|
1566
1823
|
function FieldError2({ className, children, errors, ...props }) {
|
|
1567
1824
|
const messages = [...new Set(errors?.flatMap((error) => error?.message ?? []) ?? [])];
|
|
1568
|
-
const content = children ?? (messages.length === 1 ? messages[0] : messages.length > 1 ? /* @__PURE__ */
|
|
1825
|
+
const content = children ?? (messages.length === 1 ? messages[0] : messages.length > 1 ? /* @__PURE__ */ jsx25("ul", { className: "ml-4 list-disc", children: messages.map((message) => /* @__PURE__ */ jsx25("li", { children: message }, message)) }) : null);
|
|
1569
1826
|
if (!content) return null;
|
|
1570
|
-
return /* @__PURE__ */
|
|
1827
|
+
return /* @__PURE__ */ jsx25(
|
|
1571
1828
|
"div",
|
|
1572
1829
|
{
|
|
1573
1830
|
role: "alert",
|
|
@@ -1580,65 +1837,65 @@ function FieldError2({ className, children, errors, ...props }) {
|
|
|
1580
1837
|
}
|
|
1581
1838
|
|
|
1582
1839
|
// src/ui/form-feedback/form-feedback.tsx
|
|
1583
|
-
import { useCallback as
|
|
1840
|
+
import { useCallback as useCallback5, useEffect as useEffect4, useRef as useRef3, useState as useState9 } from "react";
|
|
1584
1841
|
import { CheckCircle, LoaderCircle, CircleAlert } from "lucide-react";
|
|
1585
|
-
import { jsx as
|
|
1842
|
+
import { jsx as jsx26, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1586
1843
|
function useFormFeedback(options) {
|
|
1587
1844
|
const resetMs = options?.successResetMs ?? 2500;
|
|
1588
|
-
const [state, setState] =
|
|
1845
|
+
const [state, setState] = useState9({ status: "idle" });
|
|
1589
1846
|
const timer = useRef3(null);
|
|
1590
|
-
const clearTimer =
|
|
1847
|
+
const clearTimer = useCallback5(() => {
|
|
1591
1848
|
if (timer.current) clearTimeout(timer.current);
|
|
1592
1849
|
timer.current = null;
|
|
1593
1850
|
}, []);
|
|
1594
1851
|
useEffect4(() => () => clearTimer(), [clearTimer]);
|
|
1595
|
-
const setPending =
|
|
1852
|
+
const setPending = useCallback5(() => {
|
|
1596
1853
|
clearTimer();
|
|
1597
1854
|
setState({ status: "pending" });
|
|
1598
1855
|
}, [clearTimer]);
|
|
1599
|
-
const setSuccess =
|
|
1856
|
+
const setSuccess = useCallback5((message) => {
|
|
1600
1857
|
clearTimer();
|
|
1601
1858
|
setState({ status: "success", message });
|
|
1602
1859
|
if (resetMs > 0) timer.current = setTimeout(() => setState({ status: "idle" }), resetMs);
|
|
1603
1860
|
}, [clearTimer, resetMs]);
|
|
1604
|
-
const setError =
|
|
1861
|
+
const setError = useCallback5((message) => {
|
|
1605
1862
|
clearTimer();
|
|
1606
1863
|
setState({ status: "error", message });
|
|
1607
1864
|
}, [clearTimer]);
|
|
1608
|
-
const reset =
|
|
1865
|
+
const reset = useCallback5(() => {
|
|
1609
1866
|
clearTimer();
|
|
1610
1867
|
setState({ status: "idle" });
|
|
1611
1868
|
}, [clearTimer]);
|
|
1612
1869
|
return { state, pending: state.status === "pending", setPending, setSuccess, setError, reset };
|
|
1613
1870
|
}
|
|
1614
1871
|
function FormFeedback({ state, className, pendingLabel = "Guardando\u2026", successLabel = "Guardado" }) {
|
|
1615
|
-
if (state.status === "idle") return /* @__PURE__ */
|
|
1872
|
+
if (state.status === "idle") return /* @__PURE__ */ jsx26("span", { "aria-hidden": "true", className: cn("inline-flex h-5 items-center", className) });
|
|
1616
1873
|
const error = state.status === "error";
|
|
1617
1874
|
const success = state.status === "success";
|
|
1618
|
-
return /* @__PURE__ */
|
|
1619
|
-
state.status === "pending" && /* @__PURE__ */
|
|
1620
|
-
success && /* @__PURE__ */
|
|
1621
|
-
error && /* @__PURE__ */
|
|
1622
|
-
/* @__PURE__ */
|
|
1875
|
+
return /* @__PURE__ */ jsxs12("span", { role: error ? "alert" : "status", "aria-live": "polite", className: cn("inline-flex h-5 items-center gap-1.5 text-xs", error && "text-destructive", success && "text-success", state.status === "pending" && "text-muted-foreground", className), children: [
|
|
1876
|
+
state.status === "pending" && /* @__PURE__ */ jsx26(LoaderCircle, { "aria-hidden": "true", className: "size-3.5 animate-spin" }),
|
|
1877
|
+
success && /* @__PURE__ */ jsx26(CheckCircle, { "aria-hidden": "true", className: "size-3.5" }),
|
|
1878
|
+
error && /* @__PURE__ */ jsx26(CircleAlert, { "aria-hidden": "true", className: "size-3.5" }),
|
|
1879
|
+
/* @__PURE__ */ jsx26("span", { children: state.status === "pending" ? pendingLabel : success ? state.message ?? successLabel : state.message })
|
|
1623
1880
|
] });
|
|
1624
1881
|
}
|
|
1625
1882
|
|
|
1626
1883
|
// src/ui/form-row/form-row.tsx
|
|
1627
|
-
import { Fragment as
|
|
1884
|
+
import { Fragment as Fragment9, jsx as jsx27, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1628
1885
|
function FormRow({ label, htmlFor, required, hint, error, className, children }) {
|
|
1629
1886
|
const hintId = hint ? `${htmlFor}-hint` : void 0;
|
|
1630
1887
|
const errorId = error ? `${htmlFor}-error` : void 0;
|
|
1631
|
-
return /* @__PURE__ */
|
|
1632
|
-
/* @__PURE__ */
|
|
1888
|
+
return /* @__PURE__ */ jsxs13("div", { "data-slot": "form-row", className: cn("flex flex-col gap-1.5", className), children: [
|
|
1889
|
+
/* @__PURE__ */ jsxs13("label", { htmlFor, className: "text-sm font-medium text-foreground", children: [
|
|
1633
1890
|
label,
|
|
1634
|
-
required && /* @__PURE__ */
|
|
1635
|
-
/* @__PURE__ */
|
|
1636
|
-
/* @__PURE__ */
|
|
1891
|
+
required && /* @__PURE__ */ jsxs13(Fragment9, { children: [
|
|
1892
|
+
/* @__PURE__ */ jsx27("span", { "aria-hidden": "true", className: "ml-0.5 text-destructive", children: "*" }),
|
|
1893
|
+
/* @__PURE__ */ jsx27("span", { className: "sr-only", children: " (obligatorio)" })
|
|
1637
1894
|
] })
|
|
1638
1895
|
] }),
|
|
1639
1896
|
children,
|
|
1640
|
-
hint && /* @__PURE__ */
|
|
1641
|
-
error && /* @__PURE__ */
|
|
1897
|
+
hint && /* @__PURE__ */ jsx27("p", { id: hintId, className: "text-xs text-muted-foreground", children: hint }),
|
|
1898
|
+
error && /* @__PURE__ */ jsx27("p", { id: errorId, role: "alert", className: "text-xs font-medium text-destructive", children: error })
|
|
1642
1899
|
] });
|
|
1643
1900
|
}
|
|
1644
1901
|
|
|
@@ -1646,28 +1903,28 @@ function FormRow({ label, htmlFor, required, hint, error, className, children })
|
|
|
1646
1903
|
import { Link as Link2 } from "react-aria-components";
|
|
1647
1904
|
|
|
1648
1905
|
// src/ui/tooltip/tooltip.tsx
|
|
1649
|
-
import * as
|
|
1906
|
+
import * as React6 from "react";
|
|
1650
1907
|
import {
|
|
1651
1908
|
Focusable,
|
|
1652
1909
|
OverlayArrow,
|
|
1653
1910
|
Tooltip as TooltipPrimitive,
|
|
1654
1911
|
TooltipTrigger as TooltipTriggerPrimitive
|
|
1655
1912
|
} from "react-aria-components";
|
|
1656
|
-
import { jsx as
|
|
1913
|
+
import { jsx as jsx28, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1657
1914
|
function TooltipTrigger({
|
|
1658
1915
|
delay = 0,
|
|
1659
1916
|
children,
|
|
1660
1917
|
...props
|
|
1661
1918
|
}) {
|
|
1662
|
-
const [trigger, tooltip] =
|
|
1663
|
-
return /* @__PURE__ */
|
|
1919
|
+
const [trigger, tooltip] = React6.Children.toArray(children);
|
|
1920
|
+
return /* @__PURE__ */ jsxs14(
|
|
1664
1921
|
TooltipTriggerPrimitive,
|
|
1665
1922
|
{
|
|
1666
1923
|
"data-slot": "tooltip-trigger",
|
|
1667
1924
|
delay,
|
|
1668
1925
|
...props,
|
|
1669
1926
|
children: [
|
|
1670
|
-
/* @__PURE__ */
|
|
1927
|
+
/* @__PURE__ */ jsx28(Focusable, { children: trigger }),
|
|
1671
1928
|
tooltip
|
|
1672
1929
|
]
|
|
1673
1930
|
}
|
|
@@ -1681,7 +1938,7 @@ function Tooltip({
|
|
|
1681
1938
|
children,
|
|
1682
1939
|
...props
|
|
1683
1940
|
}) {
|
|
1684
|
-
return /* @__PURE__ */
|
|
1941
|
+
return /* @__PURE__ */ jsxs14(
|
|
1685
1942
|
TooltipPrimitive,
|
|
1686
1943
|
{
|
|
1687
1944
|
"data-slot": "tooltip-content",
|
|
@@ -1695,7 +1952,7 @@ function Tooltip({
|
|
|
1695
1952
|
...props,
|
|
1696
1953
|
children: [
|
|
1697
1954
|
children,
|
|
1698
|
-
/* @__PURE__ */
|
|
1955
|
+
/* @__PURE__ */ jsx28(
|
|
1699
1956
|
OverlayArrow,
|
|
1700
1957
|
{
|
|
1701
1958
|
className: "z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-xs bg-foreground fill-foreground",
|
|
@@ -1713,7 +1970,7 @@ function Tooltip({
|
|
|
1713
1970
|
}
|
|
1714
1971
|
|
|
1715
1972
|
// src/ui/icon-button/icon-button.tsx
|
|
1716
|
-
import { jsx as
|
|
1973
|
+
import { jsx as jsx29, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1717
1974
|
function IconButton({
|
|
1718
1975
|
label,
|
|
1719
1976
|
children,
|
|
@@ -1726,8 +1983,8 @@ function IconButton({
|
|
|
1726
1983
|
buttonVariants({ variant, size: "icon" }),
|
|
1727
1984
|
className
|
|
1728
1985
|
);
|
|
1729
|
-
return /* @__PURE__ */
|
|
1730
|
-
href ? /* @__PURE__ */
|
|
1986
|
+
return /* @__PURE__ */ jsxs15(TooltipTrigger, { children: [
|
|
1987
|
+
href ? /* @__PURE__ */ jsx29(
|
|
1731
1988
|
Link2,
|
|
1732
1989
|
{
|
|
1733
1990
|
"data-slot": "icon-button",
|
|
@@ -1736,7 +1993,7 @@ function IconButton({
|
|
|
1736
1993
|
className: linkClassName,
|
|
1737
1994
|
children
|
|
1738
1995
|
}
|
|
1739
|
-
) : /* @__PURE__ */
|
|
1996
|
+
) : /* @__PURE__ */ jsx29(
|
|
1740
1997
|
Button,
|
|
1741
1998
|
{
|
|
1742
1999
|
"data-slot": "icon-button",
|
|
@@ -1748,7 +2005,7 @@ function IconButton({
|
|
|
1748
2005
|
children
|
|
1749
2006
|
}
|
|
1750
2007
|
),
|
|
1751
|
-
/* @__PURE__ */
|
|
2008
|
+
/* @__PURE__ */ jsx29(Tooltip, { children: label })
|
|
1752
2009
|
] });
|
|
1753
2010
|
}
|
|
1754
2011
|
|
|
@@ -1758,27 +2015,27 @@ import { cva as cva9 } from "class-variance-authority";
|
|
|
1758
2015
|
// src/ui/input/input.tsx
|
|
1759
2016
|
import { forwardRef as forwardRef2 } from "react";
|
|
1760
2017
|
import { Input as AriaInput2 } from "react-aria-components";
|
|
1761
|
-
import { jsx as
|
|
2018
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
1762
2019
|
var InputImpl = forwardRef2(function Input2({ className, type, ...props }, ref) {
|
|
1763
|
-
return /* @__PURE__ */
|
|
2020
|
+
return /* @__PURE__ */ jsx30(AriaInput2, { ref, type, "data-slot": "input", className: cn("h-8 w-full min-w-0 rounded-lg border border-border bg-background px-2.5 py-1 text-sm text-foreground outline-none placeholder:text-muted-foreground focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive", className), ...props });
|
|
1764
2021
|
});
|
|
1765
2022
|
var Input3 = InputImpl;
|
|
1766
2023
|
|
|
1767
2024
|
// src/ui/textarea/textarea.tsx
|
|
1768
2025
|
import { forwardRef as forwardRef3 } from "react";
|
|
1769
2026
|
import { TextArea as AriaTextArea } from "react-aria-components";
|
|
1770
|
-
import { jsx as
|
|
2027
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
1771
2028
|
var TextareaImpl = forwardRef3(function Textarea({ className, ...props }, ref) {
|
|
1772
|
-
return /* @__PURE__ */
|
|
2029
|
+
return /* @__PURE__ */ jsx31(AriaTextArea, { ref, "data-slot": "textarea", className: cn("min-h-20 w-full rounded-lg border border-border bg-background px-2.5 py-2 text-sm text-foreground outline-none placeholder:text-muted-foreground focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive", className), ...props });
|
|
1773
2030
|
});
|
|
1774
2031
|
var Textarea2 = TextareaImpl;
|
|
1775
2032
|
|
|
1776
2033
|
// src/ui/input-group/input-group.tsx
|
|
1777
|
-
import { jsx as
|
|
2034
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
1778
2035
|
function InputGroup({ className, ...props }) {
|
|
1779
2036
|
return (
|
|
1780
2037
|
// biome-ignore lint/a11y/useSemanticElements: fieldset cannot preserve this inline control composition.
|
|
1781
|
-
/* @__PURE__ */
|
|
2038
|
+
/* @__PURE__ */ jsx32(
|
|
1782
2039
|
"div",
|
|
1783
2040
|
{
|
|
1784
2041
|
role: "group",
|
|
@@ -1814,7 +2071,7 @@ function InputGroupAddon({
|
|
|
1814
2071
|
}) {
|
|
1815
2072
|
return (
|
|
1816
2073
|
// biome-ignore lint/a11y/useSemanticElements: this addon delegates focus to its associated input.
|
|
1817
|
-
/* @__PURE__ */
|
|
2074
|
+
/* @__PURE__ */ jsx32(
|
|
1818
2075
|
"div",
|
|
1819
2076
|
{
|
|
1820
2077
|
role: "group",
|
|
@@ -1845,7 +2102,7 @@ function InputGroupButton({
|
|
|
1845
2102
|
...props
|
|
1846
2103
|
}) {
|
|
1847
2104
|
const buttonSize = size === "icon-xs" || size === "icon-sm" ? size : size;
|
|
1848
|
-
return /* @__PURE__ */
|
|
2105
|
+
return /* @__PURE__ */ jsx32(
|
|
1849
2106
|
Button,
|
|
1850
2107
|
{
|
|
1851
2108
|
"data-slot": "input-group-button",
|
|
@@ -1858,7 +2115,7 @@ function InputGroupButton({
|
|
|
1858
2115
|
);
|
|
1859
2116
|
}
|
|
1860
2117
|
function InputGroupText({ className, ...props }) {
|
|
1861
|
-
return /* @__PURE__ */
|
|
2118
|
+
return /* @__PURE__ */ jsx32(
|
|
1862
2119
|
"span",
|
|
1863
2120
|
{
|
|
1864
2121
|
"data-slot": "input-group-text",
|
|
@@ -1871,7 +2128,7 @@ function InputGroupText({ className, ...props }) {
|
|
|
1871
2128
|
);
|
|
1872
2129
|
}
|
|
1873
2130
|
function InputGroupInput({ className, ...props }) {
|
|
1874
|
-
return /* @__PURE__ */
|
|
2131
|
+
return /* @__PURE__ */ jsx32(
|
|
1875
2132
|
Input3,
|
|
1876
2133
|
{
|
|
1877
2134
|
"data-slot": "input-group-control",
|
|
@@ -1884,7 +2141,7 @@ function InputGroupInput({ className, ...props }) {
|
|
|
1884
2141
|
);
|
|
1885
2142
|
}
|
|
1886
2143
|
function InputGroupTextarea({ className, ...props }) {
|
|
1887
|
-
return /* @__PURE__ */
|
|
2144
|
+
return /* @__PURE__ */ jsx32(
|
|
1888
2145
|
Textarea2,
|
|
1889
2146
|
{
|
|
1890
2147
|
"data-slot": "input-group-control",
|
|
@@ -1898,21 +2155,21 @@ function InputGroupTextarea({ className, ...props }) {
|
|
|
1898
2155
|
}
|
|
1899
2156
|
|
|
1900
2157
|
// src/ui/kbd/kbd.tsx
|
|
1901
|
-
import { jsx as
|
|
2158
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
1902
2159
|
function Kbd({ className, ...props }) {
|
|
1903
|
-
return /* @__PURE__ */
|
|
2160
|
+
return /* @__PURE__ */ jsx33("kbd", { "data-slot": "kbd", className: cn("pointer-events-none inline-flex h-5 min-w-5 items-center justify-center gap-1 rounded-sm bg-muted px-1 font-sans text-xs font-medium text-muted-foreground select-none", className), ...props });
|
|
1904
2161
|
}
|
|
1905
2162
|
function KbdGroup({ className, ...props }) {
|
|
1906
|
-
return /* @__PURE__ */
|
|
2163
|
+
return /* @__PURE__ */ jsx33("span", { "data-slot": "kbd-group", className: cn("inline-flex items-center gap-1", className), ...props });
|
|
1907
2164
|
}
|
|
1908
2165
|
|
|
1909
2166
|
// src/ui/loading-overlay/loading-overlay.tsx
|
|
1910
2167
|
import { LoaderCircle as LoaderCircle2 } from "lucide-react";
|
|
1911
|
-
import { jsx as
|
|
2168
|
+
import { jsx as jsx34, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1912
2169
|
function LoadingOverlay({ label = "Cargando", className, ...props }) {
|
|
1913
|
-
return /* @__PURE__ */
|
|
1914
|
-
/* @__PURE__ */
|
|
1915
|
-
/* @__PURE__ */
|
|
2170
|
+
return /* @__PURE__ */ jsx34("div", { role: "status", "aria-live": "polite", className: cn("absolute inset-0 z-10 flex items-center justify-center bg-background/70 backdrop-blur-[2px]", className), ...props, children: /* @__PURE__ */ jsxs16("div", { className: "flex items-center gap-2 rounded-lg border border-border bg-background px-3 py-2 text-sm shadow-sm", children: [
|
|
2171
|
+
/* @__PURE__ */ jsx34(LoaderCircle2, { className: "animate-spin", "aria-hidden": "true" }),
|
|
2172
|
+
/* @__PURE__ */ jsx34("span", { children: label })
|
|
1916
2173
|
] }) });
|
|
1917
2174
|
}
|
|
1918
2175
|
|
|
@@ -1923,16 +2180,37 @@ import {
|
|
|
1923
2180
|
MenuTrigger as AriaMenuTrigger,
|
|
1924
2181
|
Popover as Popover3
|
|
1925
2182
|
} from "react-aria-components";
|
|
1926
|
-
import { jsx as
|
|
2183
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
1927
2184
|
var MenuTrigger = AriaMenuTrigger;
|
|
1928
2185
|
function MenuContent({ className, ...props }) {
|
|
1929
|
-
return /* @__PURE__ */
|
|
2186
|
+
return /* @__PURE__ */ jsx35(Popover3, { "data-slot": "menu-content", className: cn("min-w-40 overflow-hidden rounded-xl border border-border bg-background p-1.5 text-foreground shadow-lg motion-safe:data-entering:animate-ui-surface-in motion-safe:data-exiting:animate-ui-surface-out", className), ...props });
|
|
1930
2187
|
}
|
|
1931
2188
|
function Menu({ className, ...props }) {
|
|
1932
|
-
return /* @__PURE__ */
|
|
2189
|
+
return /* @__PURE__ */ jsx35(AriaMenu, { "data-slot": "menu", className: cn("outline-none", className), ...props });
|
|
1933
2190
|
}
|
|
1934
2191
|
function MenuItem({ className, children, ...props }) {
|
|
1935
|
-
return /* @__PURE__ */
|
|
2192
|
+
return /* @__PURE__ */ jsx35(AriaMenuItem, { "data-slot": "menu-item", className: cn("flex cursor-default items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-none data-focused:bg-muted data-disabled:pointer-events-none data-disabled:opacity-50", className), ...props, children });
|
|
2193
|
+
}
|
|
2194
|
+
|
|
2195
|
+
// src/ui/metric-card/metric-card.tsx
|
|
2196
|
+
import { jsx as jsx36, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2197
|
+
function MetricCard({
|
|
2198
|
+
className,
|
|
2199
|
+
label,
|
|
2200
|
+
value,
|
|
2201
|
+
description,
|
|
2202
|
+
icon,
|
|
2203
|
+
tone = "default",
|
|
2204
|
+
...props
|
|
2205
|
+
}) {
|
|
2206
|
+
return /* @__PURE__ */ jsx36(Card, { "data-slot": "metric-card", "data-tone": tone, className: cn("min-w-0", className), ...props, children: /* @__PURE__ */ jsxs17(CardContent, { className: "flex items-start gap-3", children: [
|
|
2207
|
+
icon ? /* @__PURE__ */ jsx36("div", { "data-slot": "metric-card-icon", className: "shrink-0 text-muted-foreground", children: icon }) : null,
|
|
2208
|
+
/* @__PURE__ */ jsxs17("div", { className: "min-w-0", children: [
|
|
2209
|
+
/* @__PURE__ */ jsx36("p", { "data-slot": "metric-card-label", className: "text-sm text-muted-foreground", children: label }),
|
|
2210
|
+
/* @__PURE__ */ jsx36("strong", { "data-slot": "metric-card-value", className: "mt-1 block text-2xl font-semibold tracking-tight", children: value }),
|
|
2211
|
+
description ? /* @__PURE__ */ jsx36("p", { "data-slot": "metric-card-description", className: "mt-1 text-xs text-muted-foreground", children: description }) : null
|
|
2212
|
+
] })
|
|
2213
|
+
] }) });
|
|
1936
2214
|
}
|
|
1937
2215
|
|
|
1938
2216
|
// src/ui/otp-input/otp-input.tsx
|
|
@@ -1940,10 +2218,10 @@ import {
|
|
|
1940
2218
|
forwardRef as forwardRef4,
|
|
1941
2219
|
useImperativeHandle,
|
|
1942
2220
|
useRef as useRef4,
|
|
1943
|
-
useState as
|
|
2221
|
+
useState as useState10
|
|
1944
2222
|
} from "react";
|
|
1945
2223
|
import { Input as AriaInput3 } from "react-aria-components";
|
|
1946
|
-
import { jsx as
|
|
2224
|
+
import { jsx as jsx37, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1947
2225
|
function normalizeOtp(value, length) {
|
|
1948
2226
|
return value.replace(/[^0-9]/g, "").slice(0, length);
|
|
1949
2227
|
}
|
|
@@ -1964,12 +2242,12 @@ var OtpInputImpl = forwardRef4(function OtpInput({
|
|
|
1964
2242
|
}, forwardedRef) {
|
|
1965
2243
|
const slotCount = Math.max(1, Math.floor(length));
|
|
1966
2244
|
const controlled = value !== void 0;
|
|
1967
|
-
const [internalValue, setInternalValue] =
|
|
2245
|
+
const [internalValue, setInternalValue] = useState10(() => normalizeOtp(defaultValue, slotCount));
|
|
1968
2246
|
const code = normalizeOtp(controlled ? value : internalValue, slotCount);
|
|
1969
2247
|
const slots = Array.from({ length: slotCount }, (_, index) => `otp-slot-${index + 1}`);
|
|
1970
2248
|
const inputRef = useRef4(null);
|
|
1971
|
-
const [focused, setFocused] =
|
|
1972
|
-
const [selectionStart, setSelectionStart] =
|
|
2249
|
+
const [focused, setFocused] = useState10(false);
|
|
2250
|
+
const [selectionStart, setSelectionStart] = useState10(0);
|
|
1973
2251
|
const invalid = props["aria-invalid"] === true || props["aria-invalid"] === "true";
|
|
1974
2252
|
const activeIndex = code.length === slotCount ? slotCount - 1 : Math.min(selectionStart, code.length, slotCount - 1);
|
|
1975
2253
|
useImperativeHandle(forwardedRef, () => inputRef.current);
|
|
@@ -1995,7 +2273,7 @@ var OtpInputImpl = forwardRef4(function OtpInput({
|
|
|
1995
2273
|
input.setSelectionRange(position, position);
|
|
1996
2274
|
setSelectionStart(position);
|
|
1997
2275
|
}
|
|
1998
|
-
return /* @__PURE__ */
|
|
2276
|
+
return /* @__PURE__ */ jsxs18(
|
|
1999
2277
|
"div",
|
|
2000
2278
|
{
|
|
2001
2279
|
"data-slot": "otp-input",
|
|
@@ -2005,7 +2283,7 @@ var OtpInputImpl = forwardRef4(function OtpInput({
|
|
|
2005
2283
|
style: { gridTemplateColumns: `repeat(${slotCount}, minmax(0, 2.5rem))` },
|
|
2006
2284
|
onPointerDown: handlePointerDown,
|
|
2007
2285
|
children: [
|
|
2008
|
-
/* @__PURE__ */
|
|
2286
|
+
/* @__PURE__ */ jsx37(
|
|
2009
2287
|
AriaInput3,
|
|
2010
2288
|
{
|
|
2011
2289
|
...props,
|
|
@@ -2045,7 +2323,7 @@ var OtpInputImpl = forwardRef4(function OtpInput({
|
|
|
2045
2323
|
}
|
|
2046
2324
|
}
|
|
2047
2325
|
),
|
|
2048
|
-
slots.map((slot, index) => /* @__PURE__ */
|
|
2326
|
+
slots.map((slot, index) => /* @__PURE__ */ jsx37(
|
|
2049
2327
|
"span",
|
|
2050
2328
|
{
|
|
2051
2329
|
"aria-hidden": "true",
|
|
@@ -2068,41 +2346,98 @@ var OtpInputImpl = forwardRef4(function OtpInput({
|
|
|
2068
2346
|
var OtpInput2 = OtpInputImpl;
|
|
2069
2347
|
|
|
2070
2348
|
// src/ui/page-header/page-header.tsx
|
|
2071
|
-
import { jsx as
|
|
2349
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
2072
2350
|
function PageHeader({ className, ...props }) {
|
|
2073
|
-
return /* @__PURE__ */
|
|
2351
|
+
return /* @__PURE__ */ jsx38("header", { "data-slot": "page-header", className: cn("flex flex-col gap-4 py-2 sm:flex-row sm:items-center sm:justify-between", className), ...props });
|
|
2074
2352
|
}
|
|
2075
2353
|
function PageHeaderHeading({ className, ...props }) {
|
|
2076
|
-
return /* @__PURE__ */
|
|
2354
|
+
return /* @__PURE__ */ jsx38("div", { "data-slot": "page-header-heading", className: cn("min-w-0", className), ...props });
|
|
2077
2355
|
}
|
|
2078
2356
|
function PageHeaderTitle({ className, ...props }) {
|
|
2079
|
-
return /* @__PURE__ */
|
|
2357
|
+
return /* @__PURE__ */ jsx38("h1", { "data-slot": "page-header-title", className: cn("truncate text-xl font-semibold tracking-tight md:text-2xl", className), ...props });
|
|
2080
2358
|
}
|
|
2081
2359
|
function PageHeaderDescription({ className, ...props }) {
|
|
2082
|
-
return /* @__PURE__ */
|
|
2360
|
+
return /* @__PURE__ */ jsx38("p", { "data-slot": "page-header-description", className: cn("mt-1 text-sm text-muted-foreground", className), ...props });
|
|
2083
2361
|
}
|
|
2084
2362
|
function PageHeaderActions({ className, ...props }) {
|
|
2085
|
-
return /* @__PURE__ */
|
|
2363
|
+
return /* @__PURE__ */ jsx38("div", { "data-slot": "page-header-actions", className: cn("flex shrink-0 items-center gap-2", className), ...props });
|
|
2086
2364
|
}
|
|
2087
2365
|
|
|
2088
2366
|
// src/ui/pagination/pagination.tsx
|
|
2089
2367
|
import { ChevronLeft, ChevronRight } from "lucide-react";
|
|
2090
|
-
import
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
return
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
page,
|
|
2097
|
-
" de ",
|
|
2368
|
+
import * as React7 from "react";
|
|
2369
|
+
import { jsx as jsx39, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2370
|
+
function visiblePages(page, pageCount, siblingCount) {
|
|
2371
|
+
return [
|
|
2372
|
+
.../* @__PURE__ */ new Set([
|
|
2373
|
+
1,
|
|
2374
|
+
...Array.from({ length: siblingCount * 2 + 1 }, (_, index) => page - siblingCount + index),
|
|
2098
2375
|
pageCount
|
|
2099
|
-
]
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2376
|
+
])
|
|
2377
|
+
].filter((item) => item >= 1 && item <= pageCount).sort((left, right) => left - right);
|
|
2378
|
+
}
|
|
2379
|
+
function Pagination({
|
|
2380
|
+
page,
|
|
2381
|
+
pageCount,
|
|
2382
|
+
onPageChange,
|
|
2383
|
+
ariaLabel = "Paginaci\xF3n",
|
|
2384
|
+
summary,
|
|
2385
|
+
siblingCount = 1,
|
|
2386
|
+
className
|
|
2387
|
+
}) {
|
|
2388
|
+
if (pageCount <= 1) return null;
|
|
2389
|
+
const pages = visiblePages(page, pageCount, siblingCount);
|
|
2390
|
+
return /* @__PURE__ */ jsxs19(
|
|
2391
|
+
"nav",
|
|
2392
|
+
{
|
|
2393
|
+
"aria-label": ariaLabel,
|
|
2394
|
+
className: cn("flex flex-wrap items-center justify-between gap-4", className),
|
|
2395
|
+
children: [
|
|
2396
|
+
/* @__PURE__ */ jsx39("p", { className: "text-sm text-muted-foreground", children: summary ?? `P\xE1gina ${page} de ${pageCount}` }),
|
|
2397
|
+
/* @__PURE__ */ jsxs19("div", { className: "flex items-center gap-1", children: [
|
|
2398
|
+
/* @__PURE__ */ jsx39(
|
|
2399
|
+
Button,
|
|
2400
|
+
{
|
|
2401
|
+
"aria-label": "P\xE1gina anterior",
|
|
2402
|
+
isDisabled: page <= 1,
|
|
2403
|
+
onPress: () => onPageChange(page - 1),
|
|
2404
|
+
size: "icon",
|
|
2405
|
+
variant: "ghost",
|
|
2406
|
+
children: /* @__PURE__ */ jsx39(ChevronLeft, {})
|
|
2407
|
+
}
|
|
2408
|
+
),
|
|
2409
|
+
pages.map((item, index) => {
|
|
2410
|
+
const previousPage = pages[index - 1];
|
|
2411
|
+
return /* @__PURE__ */ jsxs19(React7.Fragment, { children: [
|
|
2412
|
+
previousPage !== void 0 && item > previousPage + 1 ? /* @__PURE__ */ jsx39("span", { "aria-hidden": "true", className: "px-1 text-muted-foreground", children: "\u2026" }) : null,
|
|
2413
|
+
/* @__PURE__ */ jsx39(
|
|
2414
|
+
Button,
|
|
2415
|
+
{
|
|
2416
|
+
"aria-current": item === page ? "page" : void 0,
|
|
2417
|
+
"aria-label": `P\xE1gina ${item}`,
|
|
2418
|
+
onPress: () => onPageChange(item),
|
|
2419
|
+
size: "icon",
|
|
2420
|
+
variant: item === page ? "secondary" : "ghost",
|
|
2421
|
+
children: item
|
|
2422
|
+
}
|
|
2423
|
+
)
|
|
2424
|
+
] }, item);
|
|
2425
|
+
}),
|
|
2426
|
+
/* @__PURE__ */ jsx39(
|
|
2427
|
+
Button,
|
|
2428
|
+
{
|
|
2429
|
+
"aria-label": "P\xE1gina siguiente",
|
|
2430
|
+
isDisabled: page >= pageCount,
|
|
2431
|
+
onPress: () => onPageChange(page + 1),
|
|
2432
|
+
size: "icon",
|
|
2433
|
+
variant: "ghost",
|
|
2434
|
+
children: /* @__PURE__ */ jsx39(ChevronRight, {})
|
|
2435
|
+
}
|
|
2436
|
+
)
|
|
2437
|
+
] })
|
|
2438
|
+
]
|
|
2439
|
+
}
|
|
2440
|
+
);
|
|
2106
2441
|
}
|
|
2107
2442
|
|
|
2108
2443
|
// src/ui/popover/popover.tsx
|
|
@@ -2110,10 +2445,10 @@ import {
|
|
|
2110
2445
|
DialogTrigger as AriaDialogTrigger,
|
|
2111
2446
|
Popover as AriaPopover
|
|
2112
2447
|
} from "react-aria-components";
|
|
2113
|
-
import { jsx as
|
|
2448
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
2114
2449
|
var PopoverTrigger = AriaDialogTrigger;
|
|
2115
2450
|
function Popover4({ className, ...props }) {
|
|
2116
|
-
return /* @__PURE__ */
|
|
2451
|
+
return /* @__PURE__ */ jsx40(AriaPopover, { "data-slot": "popover", offset: 6, className: cn("min-w-48 rounded-xl border border-border bg-background p-1.5 text-foreground shadow-lg outline-none motion-safe:data-entering:animate-ui-surface-in motion-safe:data-exiting:animate-ui-surface-out", className), ...props });
|
|
2117
2452
|
}
|
|
2118
2453
|
var PopoverContent = Popover4;
|
|
2119
2454
|
|
|
@@ -2125,7 +2460,7 @@ import {
|
|
|
2125
2460
|
Input as AriaInput4,
|
|
2126
2461
|
NumberField as AriaNumberField
|
|
2127
2462
|
} from "react-aria-components";
|
|
2128
|
-
import { jsx as
|
|
2463
|
+
import { jsx as jsx41, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
2129
2464
|
function QuantityInput({
|
|
2130
2465
|
className,
|
|
2131
2466
|
inputClassName,
|
|
@@ -2135,7 +2470,7 @@ function QuantityInput({
|
|
|
2135
2470
|
step = 1,
|
|
2136
2471
|
...props
|
|
2137
2472
|
}) {
|
|
2138
|
-
return /* @__PURE__ */
|
|
2473
|
+
return /* @__PURE__ */ jsx41(
|
|
2139
2474
|
AriaNumberField,
|
|
2140
2475
|
{
|
|
2141
2476
|
...props,
|
|
@@ -2143,15 +2478,15 @@ function QuantityInput({
|
|
|
2143
2478
|
step,
|
|
2144
2479
|
"data-slot": "quantity-input",
|
|
2145
2480
|
className: cn("group/quantity-input inline-flex min-w-0 data-disabled:cursor-not-allowed data-disabled:opacity-50", className),
|
|
2146
|
-
children: /* @__PURE__ */
|
|
2481
|
+
children: /* @__PURE__ */ jsxs20(
|
|
2147
2482
|
AriaGroup,
|
|
2148
2483
|
{
|
|
2149
2484
|
"data-slot": "quantity-input-group",
|
|
2150
2485
|
className: "flex h-8 min-w-0 items-stretch overflow-hidden rounded-lg border border-border bg-background text-foreground transition-[border-color,box-shadow] focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50 group-data-invalid/quantity-input:border-destructive",
|
|
2151
2486
|
children: [
|
|
2152
|
-
/* @__PURE__ */
|
|
2153
|
-
/* @__PURE__ */
|
|
2154
|
-
/* @__PURE__ */
|
|
2487
|
+
/* @__PURE__ */ jsx41(AriaButton, { slot: "decrement", "aria-label": decrementAriaLabel, "data-slot": "quantity-input-decrement", className: "flex size-8 shrink-0 cursor-pointer items-center justify-center border-r border-border text-muted-foreground outline-none transition-colors hover:bg-muted hover:text-foreground data-focus-visible:bg-muted data-pressed:bg-muted data-disabled:pointer-events-none", children: /* @__PURE__ */ jsx41(Minus, { "aria-hidden": "true", className: "size-4" }) }),
|
|
2488
|
+
/* @__PURE__ */ jsx41(AriaInput4, { "data-slot": "quantity-input-value", className: cn("w-14 min-w-0 bg-transparent px-1 text-center text-sm tabular-nums outline-none", inputClassName) }),
|
|
2489
|
+
/* @__PURE__ */ jsx41(AriaButton, { slot: "increment", "aria-label": incrementAriaLabel, "data-slot": "quantity-input-increment", className: "flex size-8 shrink-0 cursor-pointer items-center justify-center border-l border-border text-muted-foreground outline-none transition-colors hover:bg-muted hover:text-foreground data-focus-visible:bg-muted data-pressed:bg-muted data-disabled:pointer-events-none", children: /* @__PURE__ */ jsx41(Plus, { "aria-hidden": "true", className: "size-4" }) })
|
|
2155
2490
|
]
|
|
2156
2491
|
}
|
|
2157
2492
|
)
|
|
@@ -2159,22 +2494,6 @@ function QuantityInput({
|
|
|
2159
2494
|
);
|
|
2160
2495
|
}
|
|
2161
2496
|
|
|
2162
|
-
// src/ui/search-field/search-field.tsx
|
|
2163
|
-
import {
|
|
2164
|
-
SearchField as AriaSearchField,
|
|
2165
|
-
Button as Button2,
|
|
2166
|
-
Input as Input4
|
|
2167
|
-
} from "react-aria-components";
|
|
2168
|
-
import { X as X2 } from "lucide-react";
|
|
2169
|
-
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
2170
|
-
var SearchField = AriaSearchField;
|
|
2171
|
-
function SearchInput({ className, ...props }) {
|
|
2172
|
-
return /* @__PURE__ */ jsx37(Input4, { "data-slot": "search-input", className: cn("h-8 w-full min-w-0 rounded-lg border border-border bg-background px-2.5 py-1 text-sm text-foreground outline-none placeholder:text-muted-foreground focus-visible:ring-3 focus-visible:ring-ring/50", className), ...props });
|
|
2173
|
-
}
|
|
2174
|
-
function SearchClearButton({ className, children = /* @__PURE__ */ jsx37(X2, { "aria-hidden": "true", className: "size-4" }), ...props }) {
|
|
2175
|
-
return /* @__PURE__ */ jsx37(Button2, { slot: "clear", "data-slot": "search-clear", className: cn("absolute top-1/2 right-1 rounded p-1 text-muted-foreground outline-none hover:bg-muted data-focus-visible:ring-2 data-focus-visible:ring-ring", className), ...props, children });
|
|
2176
|
-
}
|
|
2177
|
-
|
|
2178
2497
|
// src/ui/select/select.tsx
|
|
2179
2498
|
import {
|
|
2180
2499
|
Button as AriaButton2,
|
|
@@ -2184,44 +2503,44 @@ import {
|
|
|
2184
2503
|
ListBoxItem as ListBoxItem3,
|
|
2185
2504
|
Popover as Popover5
|
|
2186
2505
|
} from "react-aria-components";
|
|
2187
|
-
import { ChevronDown } from "lucide-react";
|
|
2188
|
-
import { Fragment as
|
|
2506
|
+
import { ChevronDown as ChevronDown2 } from "lucide-react";
|
|
2507
|
+
import { Fragment as Fragment11, jsx as jsx42, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2189
2508
|
var Select = AriaSelect;
|
|
2190
2509
|
function SelectTrigger({ className, children, ...props }) {
|
|
2191
|
-
return /* @__PURE__ */
|
|
2510
|
+
return /* @__PURE__ */ jsx42(AriaButton2, { "data-slot": "select-trigger", className: cn("group/select-trigger flex h-8 w-full min-w-36 items-center gap-2 rounded-lg border border-border bg-background px-2.5 text-left text-sm text-foreground outline-none data-focus-visible:ring-3 data-focus-visible:ring-ring/50 data-disabled:cursor-not-allowed data-disabled:opacity-50", className), ...props, children: (state) => /* @__PURE__ */ jsxs21(Fragment11, { children: [
|
|
2192
2511
|
typeof children === "function" ? children(state) : children,
|
|
2193
|
-
/* @__PURE__ */
|
|
2512
|
+
/* @__PURE__ */ jsx42(ChevronDown2, { "aria-hidden": "true", className: "ml-auto size-4 text-muted-foreground transition-transform group-data-pressed/select-trigger:rotate-180 motion-reduce:transition-none" })
|
|
2194
2513
|
] }) });
|
|
2195
2514
|
}
|
|
2196
2515
|
function SelectValue({ className, ...props }) {
|
|
2197
|
-
return /* @__PURE__ */
|
|
2516
|
+
return /* @__PURE__ */ jsx42(AriaSelectValue, { "data-slot": "select-value", className: cn("flex-1 truncate data-placeholder:text-muted-foreground", className), ...props });
|
|
2198
2517
|
}
|
|
2199
2518
|
function SelectContent({ className, ...props }) {
|
|
2200
|
-
return /* @__PURE__ */
|
|
2519
|
+
return /* @__PURE__ */ jsx42(Popover5, { "data-slot": "select-content", className: cn("w-(--trigger-width) overflow-hidden rounded-xl border border-border bg-background p-1.5 text-foreground shadow-lg motion-safe:data-entering:animate-ui-surface-in motion-safe:data-exiting:animate-ui-surface-out", className), ...props });
|
|
2201
2520
|
}
|
|
2202
2521
|
function SelectList({ className, ...props }) {
|
|
2203
|
-
return /* @__PURE__ */
|
|
2522
|
+
return /* @__PURE__ */ jsx42(ListBox3, { "data-slot": "select-list", className: cn("max-h-64 overflow-y-auto", className), ...props });
|
|
2204
2523
|
}
|
|
2205
2524
|
function SelectItem({ className, children, ...props }) {
|
|
2206
|
-
return /* @__PURE__ */
|
|
2525
|
+
return /* @__PURE__ */ jsx42(ListBoxItem3, { "data-slot": "select-item", className: cn("flex cursor-default items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-none data-focused:bg-muted data-selected:bg-muted data-disabled:pointer-events-none data-disabled:opacity-50", className), ...props, children });
|
|
2207
2526
|
}
|
|
2208
2527
|
|
|
2209
2528
|
// src/ui/sheet/sheet.tsx
|
|
2210
2529
|
import { XIcon as XIcon2 } from "lucide-react";
|
|
2211
2530
|
import {
|
|
2212
|
-
Heading as
|
|
2531
|
+
Heading as Heading5,
|
|
2213
2532
|
ModalOverlay as ModalOverlayPrimitive,
|
|
2214
2533
|
Modal as ModalPrimitive,
|
|
2215
2534
|
Dialog as SheetPrimitive,
|
|
2216
2535
|
DialogTrigger as SheetTriggerPrimitive,
|
|
2217
|
-
Text as
|
|
2536
|
+
Text as Text5
|
|
2218
2537
|
} from "react-aria-components";
|
|
2219
|
-
import { jsx as
|
|
2538
|
+
import { jsx as jsx43, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2220
2539
|
function SheetTrigger({ ...props }) {
|
|
2221
|
-
return /* @__PURE__ */
|
|
2540
|
+
return /* @__PURE__ */ jsx43(SheetTriggerPrimitive, { "data-slot": "sheet-trigger", ...props });
|
|
2222
2541
|
}
|
|
2223
2542
|
function SheetClose({ className, variant = "outline", size = "default", ...props }) {
|
|
2224
|
-
return /* @__PURE__ */
|
|
2543
|
+
return /* @__PURE__ */ jsx43(
|
|
2225
2544
|
Button,
|
|
2226
2545
|
{
|
|
2227
2546
|
slot: "close",
|
|
@@ -2238,7 +2557,7 @@ function SheetOverlay({
|
|
|
2238
2557
|
children,
|
|
2239
2558
|
...props
|
|
2240
2559
|
}) {
|
|
2241
|
-
return /* @__PURE__ */
|
|
2560
|
+
return /* @__PURE__ */ jsx43(
|
|
2242
2561
|
ModalOverlayPrimitive,
|
|
2243
2562
|
{
|
|
2244
2563
|
"data-slot": "sheet-overlay",
|
|
@@ -2259,7 +2578,7 @@ function Sheet({
|
|
|
2259
2578
|
showCloseButton = true,
|
|
2260
2579
|
...props
|
|
2261
2580
|
}) {
|
|
2262
|
-
return /* @__PURE__ */
|
|
2581
|
+
return /* @__PURE__ */ jsx43(SheetOverlay, { ...props, children: /* @__PURE__ */ jsx43(
|
|
2263
2582
|
ModalPrimitive,
|
|
2264
2583
|
{
|
|
2265
2584
|
"data-slot": "sheet-content",
|
|
@@ -2268,16 +2587,16 @@ function Sheet({
|
|
|
2268
2587
|
"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",
|
|
2269
2588
|
className
|
|
2270
2589
|
),
|
|
2271
|
-
children: /* @__PURE__ */
|
|
2590
|
+
children: /* @__PURE__ */ jsxs22(
|
|
2272
2591
|
SheetPrimitive,
|
|
2273
2592
|
{
|
|
2274
2593
|
"data-slot": "sheet",
|
|
2275
2594
|
className: "[display:inherit] h-full max-h-[inherit] [flex-direction:inherit] gap-[inherit] outline-none",
|
|
2276
2595
|
children: [
|
|
2277
2596
|
children,
|
|
2278
|
-
showCloseButton && /* @__PURE__ */
|
|
2279
|
-
/* @__PURE__ */
|
|
2280
|
-
/* @__PURE__ */
|
|
2597
|
+
showCloseButton && /* @__PURE__ */ jsxs22(SheetClose, { variant: "ghost", className: "absolute top-3 right-3", size: "icon-sm", children: [
|
|
2598
|
+
/* @__PURE__ */ jsx43(XIcon2, {}),
|
|
2599
|
+
/* @__PURE__ */ jsx43("span", { className: "sr-only", children: "Cerrar" })
|
|
2281
2600
|
] })
|
|
2282
2601
|
]
|
|
2283
2602
|
}
|
|
@@ -2292,10 +2611,10 @@ function SheetContent({
|
|
|
2292
2611
|
showCloseButton = true,
|
|
2293
2612
|
...props
|
|
2294
2613
|
}) {
|
|
2295
|
-
return /* @__PURE__ */
|
|
2614
|
+
return /* @__PURE__ */ jsx43(Sheet, { className, side, showCloseButton, ...props, children });
|
|
2296
2615
|
}
|
|
2297
2616
|
function SheetHeader({ className, ...props }) {
|
|
2298
|
-
return /* @__PURE__ */
|
|
2617
|
+
return /* @__PURE__ */ jsx43(
|
|
2299
2618
|
"div",
|
|
2300
2619
|
{
|
|
2301
2620
|
"data-slot": "sheet-header",
|
|
@@ -2305,7 +2624,7 @@ function SheetHeader({ className, ...props }) {
|
|
|
2305
2624
|
);
|
|
2306
2625
|
}
|
|
2307
2626
|
function SheetFooter({ className, ...props }) {
|
|
2308
|
-
return /* @__PURE__ */
|
|
2627
|
+
return /* @__PURE__ */ jsx43(
|
|
2309
2628
|
"div",
|
|
2310
2629
|
{
|
|
2311
2630
|
"data-slot": "sheet-footer",
|
|
@@ -2315,8 +2634,8 @@ function SheetFooter({ className, ...props }) {
|
|
|
2315
2634
|
);
|
|
2316
2635
|
}
|
|
2317
2636
|
function SheetTitle({ className, ...props }) {
|
|
2318
|
-
return /* @__PURE__ */
|
|
2319
|
-
|
|
2637
|
+
return /* @__PURE__ */ jsx43(
|
|
2638
|
+
Heading5,
|
|
2320
2639
|
{
|
|
2321
2640
|
slot: "title",
|
|
2322
2641
|
"data-slot": "sheet-title",
|
|
@@ -2329,8 +2648,8 @@ function SheetDescription({
|
|
|
2329
2648
|
className,
|
|
2330
2649
|
...props
|
|
2331
2650
|
}) {
|
|
2332
|
-
return /* @__PURE__ */
|
|
2333
|
-
|
|
2651
|
+
return /* @__PURE__ */ jsx43(
|
|
2652
|
+
Text5,
|
|
2334
2653
|
{
|
|
2335
2654
|
slot: "description",
|
|
2336
2655
|
"data-slot": "sheet-description",
|
|
@@ -2348,16 +2667,16 @@ import {
|
|
|
2348
2667
|
Search
|
|
2349
2668
|
} from "lucide-react";
|
|
2350
2669
|
import {
|
|
2351
|
-
createContext as
|
|
2352
|
-
useContext as
|
|
2670
|
+
createContext as createContext5,
|
|
2671
|
+
useContext as useContext5,
|
|
2353
2672
|
useMemo as useMemo2,
|
|
2354
|
-
useState as
|
|
2673
|
+
useState as useState11
|
|
2355
2674
|
} from "react";
|
|
2356
2675
|
import { Link as Link3 } from "react-aria-components";
|
|
2357
|
-
import { Fragment as
|
|
2358
|
-
var SidebarContext =
|
|
2676
|
+
import { Fragment as Fragment12, jsx as jsx44, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2677
|
+
var SidebarContext = createContext5(null);
|
|
2359
2678
|
function useSidebar() {
|
|
2360
|
-
const context =
|
|
2679
|
+
const context = useContext5(SidebarContext);
|
|
2361
2680
|
if (!context)
|
|
2362
2681
|
throw new Error("useSidebar must be used inside SidebarProvider");
|
|
2363
2682
|
return context;
|
|
@@ -2366,7 +2685,7 @@ function SidebarProvider({
|
|
|
2366
2685
|
defaultCollapsed = false,
|
|
2367
2686
|
children
|
|
2368
2687
|
}) {
|
|
2369
|
-
const [collapsed, setCollapsed] =
|
|
2688
|
+
const [collapsed, setCollapsed] = useState11(defaultCollapsed);
|
|
2370
2689
|
const value = useMemo2(
|
|
2371
2690
|
() => ({
|
|
2372
2691
|
collapsed,
|
|
@@ -2375,14 +2694,14 @@ function SidebarProvider({
|
|
|
2375
2694
|
}),
|
|
2376
2695
|
[collapsed]
|
|
2377
2696
|
);
|
|
2378
|
-
return /* @__PURE__ */
|
|
2697
|
+
return /* @__PURE__ */ jsx44(SidebarContext.Provider, { value, children });
|
|
2379
2698
|
}
|
|
2380
2699
|
function Sidebar({
|
|
2381
2700
|
className,
|
|
2382
2701
|
...props
|
|
2383
2702
|
}) {
|
|
2384
2703
|
const { collapsed } = useSidebar();
|
|
2385
|
-
return /* @__PURE__ */
|
|
2704
|
+
return /* @__PURE__ */ jsx44(
|
|
2386
2705
|
"aside",
|
|
2387
2706
|
{
|
|
2388
2707
|
"data-slot": "sidebar",
|
|
@@ -2399,7 +2718,7 @@ function SidebarHeader({
|
|
|
2399
2718
|
className,
|
|
2400
2719
|
...props
|
|
2401
2720
|
}) {
|
|
2402
|
-
return /* @__PURE__ */
|
|
2721
|
+
return /* @__PURE__ */ jsx44(
|
|
2403
2722
|
"div",
|
|
2404
2723
|
{
|
|
2405
2724
|
"data-slot": "sidebar-header",
|
|
@@ -2414,7 +2733,7 @@ function SidebarSearch({
|
|
|
2414
2733
|
className,
|
|
2415
2734
|
...props
|
|
2416
2735
|
}) {
|
|
2417
|
-
return /* @__PURE__ */
|
|
2736
|
+
return /* @__PURE__ */ jsxs23(
|
|
2418
2737
|
"button",
|
|
2419
2738
|
{
|
|
2420
2739
|
type: "button",
|
|
@@ -2425,9 +2744,9 @@ function SidebarSearch({
|
|
|
2425
2744
|
),
|
|
2426
2745
|
...props,
|
|
2427
2746
|
children: [
|
|
2428
|
-
/* @__PURE__ */
|
|
2429
|
-
/* @__PURE__ */
|
|
2430
|
-
/* @__PURE__ */
|
|
2747
|
+
/* @__PURE__ */ jsx44(Search, { className: "size-4 shrink-0" }),
|
|
2748
|
+
/* @__PURE__ */ jsx44("span", { className: "flex-1 text-left", children: label }),
|
|
2749
|
+
/* @__PURE__ */ jsx44("kbd", { className: "rounded bg-secondary px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground", children: shortcut })
|
|
2431
2750
|
]
|
|
2432
2751
|
}
|
|
2433
2752
|
);
|
|
@@ -2436,7 +2755,7 @@ function SidebarContent({
|
|
|
2436
2755
|
className,
|
|
2437
2756
|
...props
|
|
2438
2757
|
}) {
|
|
2439
|
-
return /* @__PURE__ */
|
|
2758
|
+
return /* @__PURE__ */ jsx44(
|
|
2440
2759
|
"nav",
|
|
2441
2760
|
{
|
|
2442
2761
|
"data-slot": "sidebar-content",
|
|
@@ -2450,7 +2769,7 @@ function SidebarFooter({
|
|
|
2450
2769
|
className,
|
|
2451
2770
|
...props
|
|
2452
2771
|
}) {
|
|
2453
|
-
return /* @__PURE__ */
|
|
2772
|
+
return /* @__PURE__ */ jsx44(
|
|
2454
2773
|
"div",
|
|
2455
2774
|
{
|
|
2456
2775
|
"data-slot": "sidebar-footer",
|
|
@@ -2469,14 +2788,14 @@ function SidebarGroup({
|
|
|
2469
2788
|
...props
|
|
2470
2789
|
}) {
|
|
2471
2790
|
const { collapsed } = useSidebar();
|
|
2472
|
-
return /* @__PURE__ */
|
|
2791
|
+
return /* @__PURE__ */ jsxs23(
|
|
2473
2792
|
"section",
|
|
2474
2793
|
{
|
|
2475
2794
|
"data-slot": "sidebar-group",
|
|
2476
2795
|
className: cn("mb-4 last:mb-0", className),
|
|
2477
2796
|
...props,
|
|
2478
2797
|
children: [
|
|
2479
|
-
label && /* @__PURE__ */
|
|
2798
|
+
label && /* @__PURE__ */ jsx44(
|
|
2480
2799
|
"h2",
|
|
2481
2800
|
{
|
|
2482
2801
|
className: cn(
|
|
@@ -2502,7 +2821,7 @@ function SidebarItem({
|
|
|
2502
2821
|
}) {
|
|
2503
2822
|
const { collapsed } = useSidebar();
|
|
2504
2823
|
const content = typeof children === "function" ? label : children ?? label;
|
|
2505
|
-
return /* @__PURE__ */
|
|
2824
|
+
return /* @__PURE__ */ jsx44(
|
|
2506
2825
|
Link3,
|
|
2507
2826
|
{
|
|
2508
2827
|
"data-slot": "sidebar-item",
|
|
@@ -2514,16 +2833,16 @@ function SidebarItem({
|
|
|
2514
2833
|
typeof className === "function" ? className : className
|
|
2515
2834
|
),
|
|
2516
2835
|
...props,
|
|
2517
|
-
children: (values) => /* @__PURE__ */
|
|
2518
|
-
/* @__PURE__ */
|
|
2519
|
-
/* @__PURE__ */
|
|
2836
|
+
children: (values) => /* @__PURE__ */ jsxs23(Fragment12, { children: [
|
|
2837
|
+
/* @__PURE__ */ jsx44("span", { className: "flex size-4 shrink-0 items-center justify-center", children: icon }),
|
|
2838
|
+
/* @__PURE__ */ jsx44(
|
|
2520
2839
|
"span",
|
|
2521
2840
|
{
|
|
2522
2841
|
className: cn("min-w-0 flex-1 truncate", collapsed && "sr-only"),
|
|
2523
2842
|
children: typeof children === "function" ? children(values) : content
|
|
2524
2843
|
}
|
|
2525
2844
|
),
|
|
2526
|
-
badge && !collapsed && /* @__PURE__ */
|
|
2845
|
+
badge && !collapsed && /* @__PURE__ */ jsx44("span", { className: "text-xs text-muted-foreground", children: badge })
|
|
2527
2846
|
] })
|
|
2528
2847
|
}
|
|
2529
2848
|
);
|
|
@@ -2532,7 +2851,7 @@ function SidebarSeparator({
|
|
|
2532
2851
|
className,
|
|
2533
2852
|
...props
|
|
2534
2853
|
}) {
|
|
2535
|
-
return /* @__PURE__ */
|
|
2854
|
+
return /* @__PURE__ */ jsx44(
|
|
2536
2855
|
"hr",
|
|
2537
2856
|
{
|
|
2538
2857
|
"data-slot": "sidebar-separator",
|
|
@@ -2543,7 +2862,7 @@ function SidebarSeparator({
|
|
|
2543
2862
|
}
|
|
2544
2863
|
function SidebarTrigger({ className, ...props }) {
|
|
2545
2864
|
const { collapsed, toggle } = useSidebar();
|
|
2546
|
-
return /* @__PURE__ */
|
|
2865
|
+
return /* @__PURE__ */ jsx44(
|
|
2547
2866
|
Button,
|
|
2548
2867
|
{
|
|
2549
2868
|
"aria-label": collapsed ? "Expandir navegaci\xF3n" : "Colapsar navegaci\xF3n",
|
|
@@ -2552,7 +2871,7 @@ function SidebarTrigger({ className, ...props }) {
|
|
|
2552
2871
|
variant: "ghost",
|
|
2553
2872
|
className: cn("ml-auto", className),
|
|
2554
2873
|
...props,
|
|
2555
|
-
children: collapsed ? /* @__PURE__ */
|
|
2874
|
+
children: collapsed ? /* @__PURE__ */ jsx44(ChevronRight2, {}) : /* @__PURE__ */ jsx44(ChevronLeft2, {})
|
|
2556
2875
|
}
|
|
2557
2876
|
);
|
|
2558
2877
|
}
|
|
@@ -2561,7 +2880,7 @@ function SidebarRail({
|
|
|
2561
2880
|
...props
|
|
2562
2881
|
}) {
|
|
2563
2882
|
const { toggle } = useSidebar();
|
|
2564
|
-
return /* @__PURE__ */
|
|
2883
|
+
return /* @__PURE__ */ jsx44(
|
|
2565
2884
|
"button",
|
|
2566
2885
|
{
|
|
2567
2886
|
type: "button",
|
|
@@ -2576,7 +2895,7 @@ function SidebarRail({
|
|
|
2576
2895
|
);
|
|
2577
2896
|
}
|
|
2578
2897
|
function SidebarMore({ className, ...props }) {
|
|
2579
|
-
return /* @__PURE__ */
|
|
2898
|
+
return /* @__PURE__ */ jsx44(
|
|
2580
2899
|
Button,
|
|
2581
2900
|
{
|
|
2582
2901
|
"aria-label": "M\xE1s opciones",
|
|
@@ -2584,26 +2903,26 @@ function SidebarMore({ className, ...props }) {
|
|
|
2584
2903
|
variant: "ghost",
|
|
2585
2904
|
className: cn("size-7", className),
|
|
2586
2905
|
...props,
|
|
2587
|
-
children: /* @__PURE__ */
|
|
2906
|
+
children: /* @__PURE__ */ jsx44(Ellipsis, {})
|
|
2588
2907
|
}
|
|
2589
2908
|
);
|
|
2590
2909
|
}
|
|
2591
2910
|
|
|
2592
2911
|
// src/ui/skeleton/skeleton.tsx
|
|
2593
|
-
import { jsx as
|
|
2912
|
+
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
2594
2913
|
function Skeleton({ className, ...props }) {
|
|
2595
|
-
return /* @__PURE__ */
|
|
2914
|
+
return /* @__PURE__ */ jsx45("div", { "aria-hidden": "true", "data-slot": "skeleton", className: cn("animate-pulse rounded-md bg-muted", className), ...props });
|
|
2596
2915
|
}
|
|
2597
2916
|
|
|
2598
2917
|
// src/ui/submit-button/submit-button.tsx
|
|
2599
2918
|
import { useFormStatus } from "react-dom";
|
|
2600
2919
|
import { LoaderCircle as LoaderCircle3 } from "lucide-react";
|
|
2601
|
-
import { Fragment as
|
|
2920
|
+
import { Fragment as Fragment13, jsx as jsx46, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2602
2921
|
function SubmitButton({ pendingLabel = "Guardando\u2026", loading = false, children, isDisabled, size = "sm", ...props }) {
|
|
2603
2922
|
const { pending } = useFormStatus();
|
|
2604
2923
|
const busy = pending || loading;
|
|
2605
|
-
return /* @__PURE__ */
|
|
2606
|
-
/* @__PURE__ */
|
|
2924
|
+
return /* @__PURE__ */ jsx46(Button, { type: "submit", size, isDisabled: busy || isDisabled, "aria-busy": busy || void 0, ...props, children: busy ? /* @__PURE__ */ jsxs24(Fragment13, { children: [
|
|
2925
|
+
/* @__PURE__ */ jsx46(LoaderCircle3, { "aria-hidden": "true", className: "size-3.5 animate-spin" }),
|
|
2607
2926
|
pendingLabel
|
|
2608
2927
|
] }) : children });
|
|
2609
2928
|
}
|
|
@@ -2613,7 +2932,7 @@ import { useEffect as useEffect5, useRef as useRef5 } from "react";
|
|
|
2613
2932
|
import {
|
|
2614
2933
|
Switch as AriaSwitch
|
|
2615
2934
|
} from "react-aria-components";
|
|
2616
|
-
import { Fragment as
|
|
2935
|
+
import { Fragment as Fragment14, jsx as jsx47, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2617
2936
|
var switchSizes = {
|
|
2618
2937
|
sm: {
|
|
2619
2938
|
control: "h-4 w-[1.875rem] p-0.5",
|
|
@@ -2669,7 +2988,7 @@ function Switch({
|
|
|
2669
2988
|
ownerDocument.addEventListener("keydown", handleDirectionalKey);
|
|
2670
2989
|
return () => ownerDocument.removeEventListener("keydown", handleDirectionalKey);
|
|
2671
2990
|
}, [isDisabled, isReadOnly, resolvedInputRef]);
|
|
2672
|
-
return /* @__PURE__ */
|
|
2991
|
+
return /* @__PURE__ */ jsx47(
|
|
2673
2992
|
AriaSwitch,
|
|
2674
2993
|
{
|
|
2675
2994
|
"data-slot": "switch",
|
|
@@ -2686,8 +3005,8 @@ function Switch({
|
|
|
2686
3005
|
children: (state) => {
|
|
2687
3006
|
const isThumbActive = state.isHovered || state.isPressed;
|
|
2688
3007
|
const thumbOffset = state.isSelected ? isThumbActive ? styles.activeSelectedOffset : styles.selectedOffset : "0";
|
|
2689
|
-
return /* @__PURE__ */
|
|
2690
|
-
/* @__PURE__ */
|
|
3008
|
+
return /* @__PURE__ */ jsxs25(Fragment14, { children: [
|
|
3009
|
+
/* @__PURE__ */ jsx47(
|
|
2691
3010
|
"span",
|
|
2692
3011
|
{
|
|
2693
3012
|
"aria-hidden": "true",
|
|
@@ -2701,7 +3020,7 @@ function Switch({
|
|
|
2701
3020
|
"group-data-focus-visible/switch:ring-3 group-data-focus-visible/switch:ring-ring/50",
|
|
2702
3021
|
styles.control
|
|
2703
3022
|
),
|
|
2704
|
-
children: /* @__PURE__ */
|
|
3023
|
+
children: /* @__PURE__ */ jsx47(
|
|
2705
3024
|
"span",
|
|
2706
3025
|
{
|
|
2707
3026
|
"data-slot": "switch-thumb",
|
|
@@ -2721,9 +3040,9 @@ function Switch({
|
|
|
2721
3040
|
)
|
|
2722
3041
|
}
|
|
2723
3042
|
),
|
|
2724
|
-
children || description ? /* @__PURE__ */
|
|
2725
|
-
children ? /* @__PURE__ */
|
|
2726
|
-
description ? /* @__PURE__ */
|
|
3043
|
+
children || description ? /* @__PURE__ */ jsxs25("span", { className: "grid gap-0.5 leading-tight", children: [
|
|
3044
|
+
children ? /* @__PURE__ */ jsx47("span", { "data-slot": "switch-label", className: "font-medium", children: typeof children === "function" ? children(state) : children }) : null,
|
|
3045
|
+
description ? /* @__PURE__ */ jsx47("span", { "data-slot": "switch-description", className: "text-xs font-normal text-muted-foreground", children: description }) : null
|
|
2727
3046
|
] }) : null
|
|
2728
3047
|
] });
|
|
2729
3048
|
}
|
|
@@ -2732,9 +3051,9 @@ function Switch({
|
|
|
2732
3051
|
}
|
|
2733
3052
|
|
|
2734
3053
|
// src/ui/table/table.tsx
|
|
2735
|
-
import { jsx as
|
|
3054
|
+
import { jsx as jsx48 } from "react/jsx-runtime";
|
|
2736
3055
|
function Table({ className, ...props }) {
|
|
2737
|
-
return /* @__PURE__ */
|
|
3056
|
+
return /* @__PURE__ */ jsx48("div", { "data-slot": "table-container", className: "relative w-full overflow-x-auto", children: /* @__PURE__ */ jsx48(
|
|
2738
3057
|
"table",
|
|
2739
3058
|
{
|
|
2740
3059
|
"data-slot": "table",
|
|
@@ -2744,10 +3063,10 @@ function Table({ className, ...props }) {
|
|
|
2744
3063
|
) });
|
|
2745
3064
|
}
|
|
2746
3065
|
function TableHeader({ className, ...props }) {
|
|
2747
|
-
return /* @__PURE__ */
|
|
3066
|
+
return /* @__PURE__ */ jsx48("thead", { "data-slot": "table-header", className: cn("[&_tr]:border-b", className), ...props });
|
|
2748
3067
|
}
|
|
2749
3068
|
function TableBody({ className, ...props }) {
|
|
2750
|
-
return /* @__PURE__ */
|
|
3069
|
+
return /* @__PURE__ */ jsx48(
|
|
2751
3070
|
"tbody",
|
|
2752
3071
|
{
|
|
2753
3072
|
"data-slot": "table-body",
|
|
@@ -2757,7 +3076,7 @@ function TableBody({ className, ...props }) {
|
|
|
2757
3076
|
);
|
|
2758
3077
|
}
|
|
2759
3078
|
function TableRow({ className, ...props }) {
|
|
2760
|
-
return /* @__PURE__ */
|
|
3079
|
+
return /* @__PURE__ */ jsx48(
|
|
2761
3080
|
"tr",
|
|
2762
3081
|
{
|
|
2763
3082
|
"data-slot": "table-row",
|
|
@@ -2770,7 +3089,7 @@ function TableRow({ className, ...props }) {
|
|
|
2770
3089
|
);
|
|
2771
3090
|
}
|
|
2772
3091
|
function TableHead({ className, ...props }) {
|
|
2773
|
-
return /* @__PURE__ */
|
|
3092
|
+
return /* @__PURE__ */ jsx48(
|
|
2774
3093
|
"th",
|
|
2775
3094
|
{
|
|
2776
3095
|
"data-slot": "table-head",
|
|
@@ -2783,7 +3102,7 @@ function TableHead({ className, ...props }) {
|
|
|
2783
3102
|
);
|
|
2784
3103
|
}
|
|
2785
3104
|
function TableCell({ className, ...props }) {
|
|
2786
|
-
return /* @__PURE__ */
|
|
3105
|
+
return /* @__PURE__ */ jsx48(
|
|
2787
3106
|
"td",
|
|
2788
3107
|
{
|
|
2789
3108
|
"data-slot": "table-cell",
|
|
@@ -2793,7 +3112,7 @@ function TableCell({ className, ...props }) {
|
|
|
2793
3112
|
);
|
|
2794
3113
|
}
|
|
2795
3114
|
function TableCaption({ className, ...props }) {
|
|
2796
|
-
return /* @__PURE__ */
|
|
3115
|
+
return /* @__PURE__ */ jsx48(
|
|
2797
3116
|
"caption",
|
|
2798
3117
|
{
|
|
2799
3118
|
"data-slot": "table-caption",
|
|
@@ -2803,7 +3122,7 @@ function TableCaption({ className, ...props }) {
|
|
|
2803
3122
|
);
|
|
2804
3123
|
}
|
|
2805
3124
|
function TableFooter({ className, ...props }) {
|
|
2806
|
-
return /* @__PURE__ */
|
|
3125
|
+
return /* @__PURE__ */ jsx48(
|
|
2807
3126
|
"tfoot",
|
|
2808
3127
|
{
|
|
2809
3128
|
"data-slot": "table-footer",
|
|
@@ -2822,27 +3141,27 @@ import {
|
|
|
2822
3141
|
Tabs as AriaTabs,
|
|
2823
3142
|
composeRenderProps as composeRenderProps2
|
|
2824
3143
|
} from "react-aria-components";
|
|
2825
|
-
import { jsx as
|
|
3144
|
+
import { jsx as jsx49 } from "react/jsx-runtime";
|
|
2826
3145
|
function Tabs({ className, ...props }) {
|
|
2827
|
-
return /* @__PURE__ */
|
|
3146
|
+
return /* @__PURE__ */ jsx49(AriaTabs, { "data-slot": "tabs", className: composeRenderProps2(className, (value) => cn("flex flex-col gap-2", value)), ...props });
|
|
2828
3147
|
}
|
|
2829
3148
|
function TabsList({ className, ...props }) {
|
|
2830
|
-
return /* @__PURE__ */
|
|
3149
|
+
return /* @__PURE__ */ jsx49(AriaTabList, { "data-slot": "tabs-list", className: composeRenderProps2(className, (value) => cn("inline-flex w-fit items-center gap-1 rounded-lg bg-muted p-1 text-muted-foreground", value)), ...props });
|
|
2831
3150
|
}
|
|
2832
3151
|
function TabsTrigger({ className, ...props }) {
|
|
2833
|
-
return /* @__PURE__ */
|
|
3152
|
+
return /* @__PURE__ */ jsx49(AriaTab, { "data-slot": "tabs-trigger", className: composeRenderProps2(className, (value) => cn("inline-flex h-7 items-center justify-center gap-1.5 rounded-md px-2.5 text-sm font-medium outline-none transition-colors data-hovered:text-foreground data-selected:bg-background data-selected:text-foreground data-selected:shadow-sm data-focus-visible:ring-3 data-focus-visible:ring-ring/50 data-disabled:cursor-not-allowed data-disabled:opacity-50", value)), ...props });
|
|
2834
3153
|
}
|
|
2835
3154
|
function TabsPanels({ className, ...props }) {
|
|
2836
|
-
return /* @__PURE__ */
|
|
3155
|
+
return /* @__PURE__ */ jsx49(AriaTabPanels, { "data-slot": "tabs-panels", className: cn("min-w-0", className), ...props });
|
|
2837
3156
|
}
|
|
2838
3157
|
function TabsContent({ className, ...props }) {
|
|
2839
|
-
return /* @__PURE__ */
|
|
3158
|
+
return /* @__PURE__ */ jsx49(AriaTabPanel, { "data-slot": "tabs-content", className: composeRenderProps2(className, (value) => cn("text-sm outline-none data-focus-visible:ring-3 data-focus-visible:ring-ring/50", value)), ...props });
|
|
2840
3159
|
}
|
|
2841
3160
|
|
|
2842
3161
|
// src/ui/toast/toast.tsx
|
|
2843
3162
|
import { useEffect as useEffect6 } from "react";
|
|
2844
3163
|
import { sileo, Toaster as SileoToaster } from "sileo";
|
|
2845
|
-
import { Fragment as
|
|
3164
|
+
import { Fragment as Fragment15, jsx as jsx50, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2846
3165
|
function toSileoOptions({ title, description, duration, position, action }) {
|
|
2847
3166
|
return {
|
|
2848
3167
|
title,
|
|
@@ -2881,18 +3200,18 @@ function useToast() {
|
|
|
2881
3200
|
return toast;
|
|
2882
3201
|
}
|
|
2883
3202
|
function ToastProvider({ children }) {
|
|
2884
|
-
return /* @__PURE__ */
|
|
3203
|
+
return /* @__PURE__ */ jsxs26(Fragment15, { children: [
|
|
2885
3204
|
children,
|
|
2886
|
-
/* @__PURE__ */
|
|
3205
|
+
/* @__PURE__ */ jsx50(Toaster, {})
|
|
2887
3206
|
] });
|
|
2888
3207
|
}
|
|
2889
3208
|
function Toaster({ position }) {
|
|
2890
|
-
return /* @__PURE__ */
|
|
3209
|
+
return /* @__PURE__ */ jsx50(SileoToaster, { position, options: { fill: "var(--ui-secondary)" } });
|
|
2891
3210
|
}
|
|
2892
3211
|
function ToastViewport({ position, visiblePosition, className }) {
|
|
2893
3212
|
void className;
|
|
2894
3213
|
if (visiblePosition && visiblePosition !== position) return null;
|
|
2895
|
-
return /* @__PURE__ */
|
|
3214
|
+
return /* @__PURE__ */ jsx50(Toaster, { position });
|
|
2896
3215
|
}
|
|
2897
3216
|
function Toast({ id, title, description, variant = "default", action, state = "open", duration = 0, position, onDismiss }) {
|
|
2898
3217
|
useEffect6(() => {
|
|
@@ -2907,15 +3226,15 @@ function Toast({ id, title, description, variant = "default", action, state = "o
|
|
|
2907
3226
|
}
|
|
2908
3227
|
|
|
2909
3228
|
// src/ui/toolbar/toolbar.tsx
|
|
2910
|
-
import { jsx as
|
|
3229
|
+
import { jsx as jsx51 } from "react/jsx-runtime";
|
|
2911
3230
|
function Toolbar({ className, ...props }) {
|
|
2912
|
-
return /* @__PURE__ */
|
|
3231
|
+
return /* @__PURE__ */ jsx51("div", { role: "toolbar", "data-slot": "toolbar", className: cn("flex flex-wrap items-center gap-2", className), ...props });
|
|
2913
3232
|
}
|
|
2914
3233
|
function ToolbarGroup({ className, ...props }) {
|
|
2915
|
-
return /* @__PURE__ */
|
|
3234
|
+
return /* @__PURE__ */ jsx51("div", { "data-slot": "toolbar-group", className: cn("flex items-center gap-2", className), ...props });
|
|
2916
3235
|
}
|
|
2917
3236
|
function ToolbarSpacer({ className, ...props }) {
|
|
2918
|
-
return /* @__PURE__ */
|
|
3237
|
+
return /* @__PURE__ */ jsx51("div", { "aria-hidden": "true", className: cn("hidden flex-1 sm:block", className), ...props });
|
|
2919
3238
|
}
|
|
2920
3239
|
export {
|
|
2921
3240
|
Accordion,
|
|
@@ -2925,6 +3244,17 @@ export {
|
|
|
2925
3244
|
Alert,
|
|
2926
3245
|
AlertAction,
|
|
2927
3246
|
AlertDescription,
|
|
3247
|
+
AlertDialog,
|
|
3248
|
+
AlertDialogAction,
|
|
3249
|
+
AlertDialogCancel,
|
|
3250
|
+
AlertDialogContent,
|
|
3251
|
+
AlertDialogDescription,
|
|
3252
|
+
AlertDialogFooter,
|
|
3253
|
+
AlertDialogHeader,
|
|
3254
|
+
AlertDialogOverlay,
|
|
3255
|
+
AlertDialogPortal,
|
|
3256
|
+
AlertDialogTitle,
|
|
3257
|
+
AlertDialogTrigger,
|
|
2928
3258
|
AlertTitle,
|
|
2929
3259
|
AppShell,
|
|
2930
3260
|
AppShellContent,
|
|
@@ -2958,6 +3288,9 @@ export {
|
|
|
2958
3288
|
CardHeader,
|
|
2959
3289
|
CardTitle,
|
|
2960
3290
|
Checkbox,
|
|
3291
|
+
Collapsible,
|
|
3292
|
+
CollapsibleContent,
|
|
3293
|
+
CollapsibleTrigger,
|
|
2961
3294
|
Combobox,
|
|
2962
3295
|
ComboboxContent,
|
|
2963
3296
|
ComboboxInput,
|
|
@@ -2970,6 +3303,7 @@ export {
|
|
|
2970
3303
|
CommandItem,
|
|
2971
3304
|
CommandList,
|
|
2972
3305
|
ConfirmDialog,
|
|
3306
|
+
DangerZone,
|
|
2973
3307
|
Dialog,
|
|
2974
3308
|
DialogClose,
|
|
2975
3309
|
DialogContent,
|
|
@@ -2980,6 +3314,7 @@ export {
|
|
|
2980
3314
|
DialogPortal,
|
|
2981
3315
|
DialogTitle,
|
|
2982
3316
|
DialogTrigger,
|
|
3317
|
+
DocPreview,
|
|
2983
3318
|
Drawer,
|
|
2984
3319
|
DrawerDescription,
|
|
2985
3320
|
DrawerFooter,
|
|
@@ -3031,6 +3366,7 @@ export {
|
|
|
3031
3366
|
MenuContent,
|
|
3032
3367
|
MenuItem,
|
|
3033
3368
|
MenuTrigger,
|
|
3369
|
+
MetricCard,
|
|
3034
3370
|
ModalDialog,
|
|
3035
3371
|
OtpInput2 as OtpInput,
|
|
3036
3372
|
PageHeader,
|
|
@@ -3043,9 +3379,6 @@ export {
|
|
|
3043
3379
|
PopoverContent,
|
|
3044
3380
|
PopoverTrigger,
|
|
3045
3381
|
QuantityInput,
|
|
3046
|
-
SearchClearButton,
|
|
3047
|
-
SearchField,
|
|
3048
|
-
SearchInput,
|
|
3049
3382
|
Select,
|
|
3050
3383
|
SelectContent,
|
|
3051
3384
|
SelectItem,
|