shadcn-ui-react 0.7.7 → 0.7.8
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 +1087 -874
- package/dist/index.d.cts +38 -19
- package/dist/index.d.ts +38 -19
- package/dist/index.js +1089 -871
- package/dist/style.css +67 -3
- package/package.json +6 -5
package/dist/index.js
CHANGED
|
@@ -6315,7 +6315,7 @@ function Form({
|
|
|
6315
6315
|
}
|
|
6316
6316
|
|
|
6317
6317
|
// src/components/Form/form-checkbox.tsx
|
|
6318
|
-
import * as
|
|
6318
|
+
import * as React46 from "react";
|
|
6319
6319
|
import { Asterisk as Asterisk2 } from "lucide-react";
|
|
6320
6320
|
import {
|
|
6321
6321
|
Controller as Controller2,
|
|
@@ -6343,7 +6343,7 @@ var Label3 = React43.forwardRef((_a, ref) => {
|
|
|
6343
6343
|
Label3.displayName = LabelPrimitive.Root.displayName;
|
|
6344
6344
|
|
|
6345
6345
|
// src/components/Form/form-field.tsx
|
|
6346
|
-
import * as
|
|
6346
|
+
import * as React45 from "react";
|
|
6347
6347
|
import { Slot as Slot4 } from "@radix-ui/react-slot";
|
|
6348
6348
|
import { Asterisk } from "lucide-react";
|
|
6349
6349
|
import {
|
|
@@ -6353,6 +6353,102 @@ import {
|
|
|
6353
6353
|
|
|
6354
6354
|
// src/components/input.tsx
|
|
6355
6355
|
import * as React44 from "react";
|
|
6356
|
+
|
|
6357
|
+
// src/components/Form/utils/form-utils.ts
|
|
6358
|
+
var formInputVariants = {
|
|
6359
|
+
outline: "rounded-md border border-input bg-input backdrop-blur-sm shadow-sm hover:border-primary/60 focus:border-primary focus:ring-2 focus:ring-primary/20",
|
|
6360
|
+
soft: "rounded-md border border-transparent bg-muted/60 shadow-sm hover:bg-muted focus:bg-input/80 focus:ring-2 focus:ring-primary/20",
|
|
6361
|
+
ghost: "rounded-md border border-transparent bg-transparent hover:bg-muted/50 focus:ring-2 focus:ring-ring",
|
|
6362
|
+
filled: "rounded-md border border-input bg-muted/70 shadow-inner hover:bg-muted focus:bg-input/70 focus:ring-2 focus:ring-primary/20",
|
|
6363
|
+
flushed: "rounded-none border-0 border-b border-input px-0 shadow-none focus:border-b-2 focus:border-primary focus:ring-0",
|
|
6364
|
+
unstyled: "border-0 shadow-none focus:ring-0",
|
|
6365
|
+
link: "h-auto border-0 bg-transparent p-0 text-primary shadow-none underline-offset-4 focus:underline focus:ring-0"
|
|
6366
|
+
};
|
|
6367
|
+
var variants = formInputVariants;
|
|
6368
|
+
var formSizeVariants = {
|
|
6369
|
+
"2xs": {
|
|
6370
|
+
control: "h-7 px-2 text-xs",
|
|
6371
|
+
flushedControl: "h-7 text-xs",
|
|
6372
|
+
linkControl: "text-xs",
|
|
6373
|
+
selectItem: "h-7 text-xs",
|
|
6374
|
+
searchInput: "h-7 px-2 text-xs",
|
|
6375
|
+
checkbox: "size-3",
|
|
6376
|
+
label: "text-xs",
|
|
6377
|
+
description: "text-xs",
|
|
6378
|
+
message: "text-xs"
|
|
6379
|
+
},
|
|
6380
|
+
xs: {
|
|
6381
|
+
control: "h-8 px-2.5 text-xs",
|
|
6382
|
+
flushedControl: "h-8 text-xs",
|
|
6383
|
+
linkControl: "text-xs",
|
|
6384
|
+
selectItem: "h-8 text-xs",
|
|
6385
|
+
searchInput: "h-8 px-2.5 text-xs",
|
|
6386
|
+
checkbox: "size-3.5",
|
|
6387
|
+
label: "text-xs",
|
|
6388
|
+
description: "text-xs",
|
|
6389
|
+
message: "text-xs"
|
|
6390
|
+
},
|
|
6391
|
+
sm: {
|
|
6392
|
+
control: "h-9 px-3 text-sm",
|
|
6393
|
+
flushedControl: "h-9 text-sm",
|
|
6394
|
+
linkControl: "text-sm",
|
|
6395
|
+
selectItem: "h-8 text-sm",
|
|
6396
|
+
searchInput: "h-9 px-3 text-sm",
|
|
6397
|
+
checkbox: "size-4",
|
|
6398
|
+
label: "text-sm",
|
|
6399
|
+
description: "text-sm",
|
|
6400
|
+
message: "text-sm"
|
|
6401
|
+
},
|
|
6402
|
+
md: {
|
|
6403
|
+
control: "h-10 px-3.5 text-sm",
|
|
6404
|
+
flushedControl: "h-10 text-sm",
|
|
6405
|
+
linkControl: "text-sm",
|
|
6406
|
+
selectItem: "h-9 text-sm",
|
|
6407
|
+
searchInput: "h-10 px-3.5 text-sm",
|
|
6408
|
+
checkbox: "size-4",
|
|
6409
|
+
label: "text-sm",
|
|
6410
|
+
description: "text-sm",
|
|
6411
|
+
message: "text-sm"
|
|
6412
|
+
},
|
|
6413
|
+
lg: {
|
|
6414
|
+
control: "h-11 px-4 text-base",
|
|
6415
|
+
flushedControl: "h-11 text-base",
|
|
6416
|
+
linkControl: "text-base",
|
|
6417
|
+
selectItem: "h-10 text-base",
|
|
6418
|
+
searchInput: "h-11 px-4 text-base",
|
|
6419
|
+
checkbox: "size-5",
|
|
6420
|
+
label: "text-base",
|
|
6421
|
+
description: "text-sm",
|
|
6422
|
+
message: "text-sm"
|
|
6423
|
+
},
|
|
6424
|
+
xl: {
|
|
6425
|
+
control: "h-12 px-4 text-base",
|
|
6426
|
+
flushedControl: "h-12 text-base",
|
|
6427
|
+
linkControl: "text-base",
|
|
6428
|
+
selectItem: "h-11 text-base",
|
|
6429
|
+
searchInput: "h-12 px-4 text-base",
|
|
6430
|
+
checkbox: "size-6",
|
|
6431
|
+
label: "text-base",
|
|
6432
|
+
description: "text-sm",
|
|
6433
|
+
message: "text-sm"
|
|
6434
|
+
},
|
|
6435
|
+
"2xl": {
|
|
6436
|
+
control: "h-14 px-5 text-lg",
|
|
6437
|
+
flushedControl: "h-14 text-lg",
|
|
6438
|
+
linkControl: "text-lg",
|
|
6439
|
+
selectItem: "h-12 text-lg",
|
|
6440
|
+
searchInput: "h-14 px-5 text-lg",
|
|
6441
|
+
checkbox: "size-7",
|
|
6442
|
+
label: "text-lg",
|
|
6443
|
+
description: "text-base",
|
|
6444
|
+
message: "text-base"
|
|
6445
|
+
}
|
|
6446
|
+
};
|
|
6447
|
+
function getFormSizeClasses(size = "md", customSize) {
|
|
6448
|
+
return __spreadValues(__spreadValues({}, formSizeVariants[size]), customSize);
|
|
6449
|
+
}
|
|
6450
|
+
|
|
6451
|
+
// src/components/input.tsx
|
|
6356
6452
|
import { jsx as jsx20, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
6357
6453
|
var Input = React44.forwardRef(
|
|
6358
6454
|
(_a, ref) => {
|
|
@@ -6360,6 +6456,7 @@ var Input = React44.forwardRef(
|
|
|
6360
6456
|
className,
|
|
6361
6457
|
variant = "outline",
|
|
6362
6458
|
size = "md",
|
|
6459
|
+
customSize,
|
|
6363
6460
|
leading,
|
|
6364
6461
|
trailing,
|
|
6365
6462
|
classNameDefault = true,
|
|
@@ -6369,45 +6466,32 @@ var Input = React44.forwardRef(
|
|
|
6369
6466
|
"className",
|
|
6370
6467
|
"variant",
|
|
6371
6468
|
"size",
|
|
6469
|
+
"customSize",
|
|
6372
6470
|
"leading",
|
|
6373
6471
|
"trailing",
|
|
6374
6472
|
"classNameDefault",
|
|
6375
6473
|
"invalid",
|
|
6376
6474
|
"disabled"
|
|
6377
6475
|
]);
|
|
6378
|
-
const
|
|
6379
|
-
const
|
|
6380
|
-
const
|
|
6381
|
-
|
|
6382
|
-
|
|
6383
|
-
|
|
6384
|
-
|
|
6385
|
-
|
|
6386
|
-
|
|
6387
|
-
|
|
6388
|
-
),
|
|
6389
|
-
unstyled: (
|
|
6390
|
-
// sin estilos, útil para inputs embebidos o controles muy custom
|
|
6391
|
-
"border-0 shadow-none focus:ring-0"
|
|
6392
|
-
),
|
|
6393
|
-
link: (
|
|
6394
|
-
// aspecto tipo enlace: inline height-auto, sin paddings ni borde
|
|
6395
|
-
"border-0 p-0 h-auto shadow-none bg-transparent text-primary underline-offset-4 focus:underline focus:ring-0"
|
|
6396
|
-
)
|
|
6397
|
-
};
|
|
6398
|
-
const errorCls = invalid ? "border-destructive focus:border-destructive focus:ring-destructive/20" : "";
|
|
6399
|
-
const iconPadLeft = leading && variant !== "flushed" && variant !== "link" ? size === "lg" ? "pl-12" : "pl-10" : "";
|
|
6400
|
-
const iconPadRight = trailing && variant !== "flushed" && variant !== "link" ? size === "lg" ? "pr-12" : "pr-10" : "";
|
|
6401
|
-
const specialSizeForFlushed = variant === "flushed" ? size === "sm" ? "h-9 text-sm" : size === "lg" ? "h-11 text-base" : "h-10 text-sm" : "";
|
|
6402
|
-
const specialSizeForLink = variant === "link" ? "text-sm" : "";
|
|
6476
|
+
const sizeClasses = getFormSizeClasses(size, customSize);
|
|
6477
|
+
const base = "block w-full bg-transparent text-foreground placeholder:text-muted-foreground outline-none transition disabled:cursor-not-allowed disabled:opacity-50";
|
|
6478
|
+
const inputSizeClass = variant === "flushed" ? sizeClasses.flushedControl : variant === "link" ? sizeClasses.linkControl : sizeClasses.control;
|
|
6479
|
+
const errorClass = invalid ? "border-destructive focus:border-destructive focus:ring-destructive/20" : "";
|
|
6480
|
+
const hasIconPadding = variant !== "flushed" && variant !== "link";
|
|
6481
|
+
const iconPaddingLeft = leading && hasIconPadding ? size === "xl" || size === "2xl" ? "pl-14" : size === "lg" ? "pl-12" : size === "2xs" || size === "xs" ? "pl-8" : "pl-10" : "";
|
|
6482
|
+
const iconPaddingRight = trailing && hasIconPadding ? size === "xl" || size === "2xl" ? "pr-14" : size === "lg" ? "pr-12" : size === "2xs" || size === "xs" ? "pr-8" : "pr-10" : "";
|
|
6483
|
+
const iconSizeClass = size === "2xl" ? "text-[1.3rem]" : size === "xl" ? "text-[1.2rem]" : size === "lg" ? "text-[1.15rem]" : size === "2xs" || size === "xs" ? "text-[0.85rem]" : "text-[1rem]";
|
|
6484
|
+
const iconPositionClass = size === "2xs" || size === "xs" ? "left-2" : size === "xl" || size === "2xl" ? "left-4" : "left-3";
|
|
6485
|
+
const trailingIconPositionClass = size === "2xs" || size === "xs" ? "right-2" : size === "xl" || size === "2xl" ? "right-4" : "right-3";
|
|
6403
6486
|
return /* @__PURE__ */ jsxs11("div", { className: cn("relative", disabled && "opacity-80"), children: [
|
|
6404
6487
|
leading ? /* @__PURE__ */ jsx20(
|
|
6405
6488
|
"span",
|
|
6406
6489
|
{
|
|
6407
6490
|
className: cn(
|
|
6408
|
-
"pointer-events-none absolute
|
|
6409
|
-
|
|
6410
|
-
|
|
6491
|
+
"pointer-events-none absolute top-1/2 -translate-y-1/2 opacity-60",
|
|
6492
|
+
iconPositionClass,
|
|
6493
|
+
iconSizeClass,
|
|
6494
|
+
!hasIconPadding && "hidden"
|
|
6411
6495
|
),
|
|
6412
6496
|
children: leading
|
|
6413
6497
|
}
|
|
@@ -6420,11 +6504,11 @@ var Input = React44.forwardRef(
|
|
|
6420
6504
|
disabled,
|
|
6421
6505
|
className: classNameDefault ? cn(
|
|
6422
6506
|
base,
|
|
6423
|
-
|
|
6424
|
-
|
|
6425
|
-
|
|
6426
|
-
|
|
6427
|
-
|
|
6507
|
+
formInputVariants[variant],
|
|
6508
|
+
inputSizeClass,
|
|
6509
|
+
errorClass,
|
|
6510
|
+
iconPaddingLeft,
|
|
6511
|
+
iconPaddingRight,
|
|
6428
6512
|
className
|
|
6429
6513
|
) : className,
|
|
6430
6514
|
"data-private": true
|
|
@@ -6434,9 +6518,10 @@ var Input = React44.forwardRef(
|
|
|
6434
6518
|
"span",
|
|
6435
6519
|
{
|
|
6436
6520
|
className: cn(
|
|
6437
|
-
"absolute
|
|
6438
|
-
|
|
6439
|
-
|
|
6521
|
+
"absolute top-1/2 -translate-y-1/2 opacity-70",
|
|
6522
|
+
trailingIconPositionClass,
|
|
6523
|
+
iconSizeClass,
|
|
6524
|
+
!hasIconPadding && "hidden"
|
|
6440
6525
|
),
|
|
6441
6526
|
children: trailing
|
|
6442
6527
|
}
|
|
@@ -6446,156 +6531,9 @@ var Input = React44.forwardRef(
|
|
|
6446
6531
|
);
|
|
6447
6532
|
Input.displayName = "Input";
|
|
6448
6533
|
|
|
6449
|
-
// src/components/select.tsx
|
|
6450
|
-
import {
|
|
6451
|
-
CaretSortIcon,
|
|
6452
|
-
CheckIcon as CheckIcon4,
|
|
6453
|
-
ChevronDownIcon as ChevronDownIcon2,
|
|
6454
|
-
ChevronUpIcon
|
|
6455
|
-
} from "@radix-ui/react-icons";
|
|
6456
|
-
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
6457
|
-
import * as React45 from "react";
|
|
6458
|
-
import { jsx as jsx21, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
6459
|
-
var Select2 = SelectPrimitive.Root;
|
|
6460
|
-
var SelectGroup = SelectPrimitive.Group;
|
|
6461
|
-
var SelectValue = SelectPrimitive.Value;
|
|
6462
|
-
var SelectTrigger = React45.forwardRef((_a, ref) => {
|
|
6463
|
-
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
6464
|
-
return /* @__PURE__ */ jsxs12(
|
|
6465
|
-
SelectPrimitive.Trigger,
|
|
6466
|
-
__spreadProps(__spreadValues({
|
|
6467
|
-
ref,
|
|
6468
|
-
className: cn(
|
|
6469
|
-
"flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
|
6470
|
-
className
|
|
6471
|
-
)
|
|
6472
|
-
}, props), {
|
|
6473
|
-
children: [
|
|
6474
|
-
children,
|
|
6475
|
-
/* @__PURE__ */ jsx21(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx21(CaretSortIcon, { className: "h-4 w-4 opacity-50" }) })
|
|
6476
|
-
]
|
|
6477
|
-
})
|
|
6478
|
-
);
|
|
6479
|
-
});
|
|
6480
|
-
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
6481
|
-
var SelectScrollUpButton = React45.forwardRef((_a, ref) => {
|
|
6482
|
-
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
6483
|
-
return /* @__PURE__ */ jsx21(
|
|
6484
|
-
SelectPrimitive.ScrollUpButton,
|
|
6485
|
-
__spreadProps(__spreadValues({
|
|
6486
|
-
ref,
|
|
6487
|
-
className: cn(
|
|
6488
|
-
"flex cursor-default items-center justify-center py-1",
|
|
6489
|
-
className
|
|
6490
|
-
)
|
|
6491
|
-
}, props), {
|
|
6492
|
-
children: /* @__PURE__ */ jsx21(ChevronUpIcon, {})
|
|
6493
|
-
})
|
|
6494
|
-
);
|
|
6495
|
-
});
|
|
6496
|
-
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
6497
|
-
var SelectScrollDownButton = React45.forwardRef((_a, ref) => {
|
|
6498
|
-
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
6499
|
-
return /* @__PURE__ */ jsx21(
|
|
6500
|
-
SelectPrimitive.ScrollDownButton,
|
|
6501
|
-
__spreadProps(__spreadValues({
|
|
6502
|
-
ref,
|
|
6503
|
-
className: cn(
|
|
6504
|
-
"flex cursor-default items-center justify-center py-1",
|
|
6505
|
-
className
|
|
6506
|
-
)
|
|
6507
|
-
}, props), {
|
|
6508
|
-
children: /* @__PURE__ */ jsx21(ChevronDownIcon2, {})
|
|
6509
|
-
})
|
|
6510
|
-
);
|
|
6511
|
-
});
|
|
6512
|
-
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
6513
|
-
var SelectContent = React45.forwardRef((_a, ref) => {
|
|
6514
|
-
var _b = _a, { className, children, position = "popper" } = _b, props = __objRest(_b, ["className", "children", "position"]);
|
|
6515
|
-
return /* @__PURE__ */ jsx21(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs12(
|
|
6516
|
-
SelectPrimitive.Content,
|
|
6517
|
-
__spreadProps(__spreadValues({
|
|
6518
|
-
ref,
|
|
6519
|
-
className: cn(
|
|
6520
|
-
"relative z-50 max-h-96 min-w-32 overflow-hidden bg-popover border border-border text-popover-foreground rounded-md shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
6521
|
-
position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
6522
|
-
className
|
|
6523
|
-
),
|
|
6524
|
-
position
|
|
6525
|
-
}, props), {
|
|
6526
|
-
children: [
|
|
6527
|
-
/* @__PURE__ */ jsx21(SelectScrollUpButton, {}),
|
|
6528
|
-
/* @__PURE__ */ jsx21(
|
|
6529
|
-
SelectPrimitive.Viewport,
|
|
6530
|
-
{
|
|
6531
|
-
className: cn(
|
|
6532
|
-
"p-1",
|
|
6533
|
-
position === "popper" && "h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)"
|
|
6534
|
-
),
|
|
6535
|
-
children
|
|
6536
|
-
}
|
|
6537
|
-
),
|
|
6538
|
-
/* @__PURE__ */ jsx21(SelectScrollDownButton, {})
|
|
6539
|
-
]
|
|
6540
|
-
})
|
|
6541
|
-
) });
|
|
6542
|
-
});
|
|
6543
|
-
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
6544
|
-
var SelectLabel = React45.forwardRef((_a, ref) => {
|
|
6545
|
-
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
6546
|
-
return /* @__PURE__ */ jsx21(
|
|
6547
|
-
SelectPrimitive.Label,
|
|
6548
|
-
__spreadValues({
|
|
6549
|
-
ref,
|
|
6550
|
-
className: cn("px-2 py-1.5 text-sm font-semibold", className)
|
|
6551
|
-
}, props)
|
|
6552
|
-
);
|
|
6553
|
-
});
|
|
6554
|
-
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
6555
|
-
var SelectItem = React45.forwardRef((_a, ref) => {
|
|
6556
|
-
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
6557
|
-
return /* @__PURE__ */ jsxs12(
|
|
6558
|
-
SelectPrimitive.Item,
|
|
6559
|
-
__spreadProps(__spreadValues({
|
|
6560
|
-
ref,
|
|
6561
|
-
className: cn(
|
|
6562
|
-
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",
|
|
6563
|
-
className
|
|
6564
|
-
)
|
|
6565
|
-
}, props), {
|
|
6566
|
-
children: [
|
|
6567
|
-
/* @__PURE__ */ jsx21("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx21(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx21(CheckIcon4, { className: "h-4 w-4" }) }) }),
|
|
6568
|
-
/* @__PURE__ */ jsx21(SelectPrimitive.ItemText, { children })
|
|
6569
|
-
]
|
|
6570
|
-
})
|
|
6571
|
-
);
|
|
6572
|
-
});
|
|
6573
|
-
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
6574
|
-
var SelectSeparator = React45.forwardRef((_a, ref) => {
|
|
6575
|
-
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
6576
|
-
return /* @__PURE__ */ jsx21(
|
|
6577
|
-
SelectPrimitive.Separator,
|
|
6578
|
-
__spreadValues({
|
|
6579
|
-
ref,
|
|
6580
|
-
className: cn("-mx-1 my-1 h-px bg-muted", className)
|
|
6581
|
-
}, props)
|
|
6582
|
-
);
|
|
6583
|
-
});
|
|
6584
|
-
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
6585
|
-
|
|
6586
6534
|
// src/components/Form/form-field.tsx
|
|
6587
|
-
import { jsx as
|
|
6588
|
-
var
|
|
6589
|
-
outline: "rounded-md border border-input bg-input backdrop-blur-sm shadow-sm hover:border-primary/60 focus:border-primary focus:ring-2 focus:ring-primary/20",
|
|
6590
|
-
soft: "rounded-md border border-transparent bg-muted/60 shadow-sm hover:bg-muted focus:bg-input/80 focus:ring-2 focus:ring-primary/20",
|
|
6591
|
-
ghost: "rounded-md border border-transparent bg-transparent hover:bg-muted/50 focus:ring-2 focus:ring-ring",
|
|
6592
|
-
filled: "rounded-md border border-input bg-muted/70 shadow-inner hover:bg-muted focus:bg-input/70 focus:ring-2 focus:ring-primary/20",
|
|
6593
|
-
flushed: "rounded-none border-0 border-b border-input px-0 shadow-none focus:border-b-2 focus:border-primary focus:ring-0",
|
|
6594
|
-
unstyled: "border-0 shadow-none focus:ring-0",
|
|
6595
|
-
link: "h-auto border-0 bg-transparent p-0 text-primary shadow-none underline-offset-4 focus:underline focus:ring-0"
|
|
6596
|
-
};
|
|
6597
|
-
var variants = inputVariants;
|
|
6598
|
-
var FormFieldContext = React46.createContext(
|
|
6535
|
+
import { jsx as jsx21, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
6536
|
+
var FormFieldContext = React45.createContext(
|
|
6599
6537
|
null
|
|
6600
6538
|
);
|
|
6601
6539
|
function getErrorMessage(error) {
|
|
@@ -6617,6 +6555,7 @@ var FormField = (_a) => {
|
|
|
6617
6555
|
requiredLabelClassName,
|
|
6618
6556
|
variant = "outline",
|
|
6619
6557
|
size = "md",
|
|
6558
|
+
customSize,
|
|
6620
6559
|
rules,
|
|
6621
6560
|
shouldUnregister,
|
|
6622
6561
|
defaultValue,
|
|
@@ -6638,6 +6577,7 @@ var FormField = (_a) => {
|
|
|
6638
6577
|
"requiredLabelClassName",
|
|
6639
6578
|
"variant",
|
|
6640
6579
|
"size",
|
|
6580
|
+
"customSize",
|
|
6641
6581
|
"rules",
|
|
6642
6582
|
"shouldUnregister",
|
|
6643
6583
|
"defaultValue",
|
|
@@ -6648,7 +6588,7 @@ var FormField = (_a) => {
|
|
|
6648
6588
|
]);
|
|
6649
6589
|
const form = useFormContext();
|
|
6650
6590
|
const controllerControl = control != null ? control : form == null ? void 0 : form.control;
|
|
6651
|
-
return /* @__PURE__ */
|
|
6591
|
+
return /* @__PURE__ */ jsx21(FormFieldContext.Provider, { value: { name }, children: /* @__PURE__ */ jsx21(
|
|
6652
6592
|
Controller,
|
|
6653
6593
|
{
|
|
6654
6594
|
control: controllerControl,
|
|
@@ -6659,14 +6599,14 @@ var FormField = (_a) => {
|
|
|
6659
6599
|
render: ({ field, fieldState }) => {
|
|
6660
6600
|
var _a2;
|
|
6661
6601
|
const fieldError = getErrorMessage(fieldState.error);
|
|
6662
|
-
return /* @__PURE__ */
|
|
6663
|
-
label ? /* @__PURE__ */
|
|
6602
|
+
return /* @__PURE__ */ jsxs12(FormItem, { className: itemClassName, children: [
|
|
6603
|
+
label ? /* @__PURE__ */ jsxs12(
|
|
6664
6604
|
FormLabel,
|
|
6665
6605
|
{
|
|
6666
6606
|
className: cn("flex items-center gap-0.5", labelClassName),
|
|
6667
6607
|
children: [
|
|
6668
|
-
/* @__PURE__ */
|
|
6669
|
-
requiredLabel ? /* @__PURE__ */
|
|
6608
|
+
/* @__PURE__ */ jsx21("span", { children: label }),
|
|
6609
|
+
requiredLabel ? /* @__PURE__ */ jsx21(
|
|
6670
6610
|
Asterisk,
|
|
6671
6611
|
{
|
|
6672
6612
|
"aria-hidden": "true",
|
|
@@ -6679,7 +6619,7 @@ var FormField = (_a) => {
|
|
|
6679
6619
|
]
|
|
6680
6620
|
}
|
|
6681
6621
|
) : null,
|
|
6682
|
-
/* @__PURE__ */
|
|
6622
|
+
/* @__PURE__ */ jsx21(FormControl, { children: /* @__PURE__ */ jsx21(
|
|
6683
6623
|
Input,
|
|
6684
6624
|
__spreadProps(__spreadValues(__spreadValues({}, field), inputProps), {
|
|
6685
6625
|
value: (_a2 = field.value) != null ? _a2 : "",
|
|
@@ -6698,30 +6638,31 @@ var FormField = (_a) => {
|
|
|
6698
6638
|
invalid: invalid || Boolean(fieldError),
|
|
6699
6639
|
variant,
|
|
6700
6640
|
size,
|
|
6641
|
+
customSize,
|
|
6701
6642
|
placeholder,
|
|
6702
6643
|
className: cn(className),
|
|
6703
6644
|
classNameDefault
|
|
6704
6645
|
})
|
|
6705
6646
|
) }),
|
|
6706
|
-
fieldError ? /* @__PURE__ */
|
|
6647
|
+
fieldError ? /* @__PURE__ */ jsx21(FormMessage, { className: messageClassName, children: fieldError }) : null
|
|
6707
6648
|
] });
|
|
6708
6649
|
}
|
|
6709
6650
|
}
|
|
6710
6651
|
) });
|
|
6711
6652
|
};
|
|
6712
6653
|
FormField.displayName = "FormField";
|
|
6713
|
-
var FormItemContext =
|
|
6714
|
-
var FormItem =
|
|
6654
|
+
var FormItemContext = React45.createContext(null);
|
|
6655
|
+
var FormItem = React45.forwardRef((_a, ref) => {
|
|
6715
6656
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
6716
|
-
const id =
|
|
6717
|
-
return /* @__PURE__ */
|
|
6657
|
+
const id = React45.useId();
|
|
6658
|
+
return /* @__PURE__ */ jsx21(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ jsx21("div", __spreadValues({ ref, className: cn("space-y-2", className) }, props)) });
|
|
6718
6659
|
});
|
|
6719
6660
|
FormItem.displayName = "FormItem";
|
|
6720
6661
|
var useFormField = () => {
|
|
6721
6662
|
var _a;
|
|
6722
|
-
const generatedId =
|
|
6723
|
-
const fieldContext =
|
|
6724
|
-
const itemContext =
|
|
6663
|
+
const generatedId = React45.useId();
|
|
6664
|
+
const fieldContext = React45.useContext(FormFieldContext);
|
|
6665
|
+
const itemContext = React45.useContext(FormItemContext);
|
|
6725
6666
|
const formContext = useFormContext();
|
|
6726
6667
|
const id = (_a = itemContext == null ? void 0 : itemContext.id) != null ? _a : generatedId;
|
|
6727
6668
|
if (!fieldContext || !formContext) {
|
|
@@ -6745,10 +6686,10 @@ var useFormField = () => {
|
|
|
6745
6686
|
formMessageId: `${id}-form-item-message`
|
|
6746
6687
|
}, fieldState);
|
|
6747
6688
|
};
|
|
6748
|
-
var FormLabel =
|
|
6689
|
+
var FormLabel = React45.forwardRef((_a, ref) => {
|
|
6749
6690
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
6750
6691
|
const { error, formItemId } = useFormField();
|
|
6751
|
-
return /* @__PURE__ */
|
|
6692
|
+
return /* @__PURE__ */ jsx21(
|
|
6752
6693
|
Label3,
|
|
6753
6694
|
__spreadValues({
|
|
6754
6695
|
ref,
|
|
@@ -6758,10 +6699,10 @@ var FormLabel = React46.forwardRef((_a, ref) => {
|
|
|
6758
6699
|
);
|
|
6759
6700
|
});
|
|
6760
6701
|
FormLabel.displayName = "FormLabel";
|
|
6761
|
-
var FormControl =
|
|
6702
|
+
var FormControl = React45.forwardRef((_a, ref) => {
|
|
6762
6703
|
var props = __objRest(_a, []);
|
|
6763
6704
|
const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
|
|
6764
|
-
return /* @__PURE__ */
|
|
6705
|
+
return /* @__PURE__ */ jsx21(
|
|
6765
6706
|
Slot4,
|
|
6766
6707
|
__spreadValues({
|
|
6767
6708
|
ref,
|
|
@@ -6772,10 +6713,10 @@ var FormControl = React46.forwardRef((_a, ref) => {
|
|
|
6772
6713
|
);
|
|
6773
6714
|
});
|
|
6774
6715
|
FormControl.displayName = "FormControl";
|
|
6775
|
-
var FormDescription =
|
|
6716
|
+
var FormDescription = React45.forwardRef((_a, ref) => {
|
|
6776
6717
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
6777
6718
|
const { formDescriptionId } = useFormField();
|
|
6778
|
-
return /* @__PURE__ */
|
|
6719
|
+
return /* @__PURE__ */ jsx21(
|
|
6779
6720
|
"p",
|
|
6780
6721
|
__spreadValues({
|
|
6781
6722
|
ref,
|
|
@@ -6785,12 +6726,12 @@ var FormDescription = React46.forwardRef((_a, ref) => {
|
|
|
6785
6726
|
);
|
|
6786
6727
|
});
|
|
6787
6728
|
FormDescription.displayName = "FormDescription";
|
|
6788
|
-
var FormMessage =
|
|
6729
|
+
var FormMessage = React45.forwardRef((_a, ref) => {
|
|
6789
6730
|
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
6790
6731
|
const { error, formMessageId } = useFormField();
|
|
6791
6732
|
const body = error ? getErrorMessage(error) : children;
|
|
6792
6733
|
if (!body) return null;
|
|
6793
|
-
return /* @__PURE__ */
|
|
6734
|
+
return /* @__PURE__ */ jsx21(
|
|
6794
6735
|
"p",
|
|
6795
6736
|
__spreadProps(__spreadValues({
|
|
6796
6737
|
ref,
|
|
@@ -6802,69 +6743,443 @@ var FormMessage = React46.forwardRef((_a, ref) => {
|
|
|
6802
6743
|
);
|
|
6803
6744
|
});
|
|
6804
6745
|
FormMessage.displayName = "FormMessage";
|
|
6805
|
-
|
|
6806
|
-
|
|
6807
|
-
|
|
6808
|
-
|
|
6809
|
-
|
|
6810
|
-
|
|
6811
|
-
|
|
6812
|
-
|
|
6813
|
-
|
|
6814
|
-
|
|
6815
|
-
|
|
6816
|
-
|
|
6817
|
-
|
|
6818
|
-
|
|
6819
|
-
|
|
6820
|
-
|
|
6821
|
-
|
|
6822
|
-
|
|
6823
|
-
|
|
6824
|
-
|
|
6825
|
-
|
|
6826
|
-
|
|
6827
|
-
|
|
6828
|
-
|
|
6829
|
-
|
|
6830
|
-
|
|
6831
|
-
|
|
6832
|
-
|
|
6833
|
-
|
|
6834
|
-
|
|
6835
|
-
|
|
6836
|
-
|
|
6837
|
-
|
|
6838
|
-
|
|
6839
|
-
|
|
6840
|
-
|
|
6841
|
-
|
|
6842
|
-
|
|
6843
|
-
|
|
6844
|
-
|
|
6845
|
-
|
|
6846
|
-
|
|
6847
|
-
searchable = false,
|
|
6848
|
-
searchPlaceholder = "Buscar\u2026",
|
|
6849
|
-
emptyText = "No hay resultados"
|
|
6850
|
-
}) => {
|
|
6851
|
-
const form = useFormContext();
|
|
6746
|
+
|
|
6747
|
+
// src/components/Form/form-checkbox.tsx
|
|
6748
|
+
import { jsx as jsx22, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
6749
|
+
var FormCheckbox = (_a) => {
|
|
6750
|
+
var _b = _a, {
|
|
6751
|
+
name,
|
|
6752
|
+
control,
|
|
6753
|
+
rules,
|
|
6754
|
+
shouldUnregister,
|
|
6755
|
+
defaultValue,
|
|
6756
|
+
label,
|
|
6757
|
+
description,
|
|
6758
|
+
requiredLabel,
|
|
6759
|
+
className,
|
|
6760
|
+
itemClassName,
|
|
6761
|
+
checkboxClassName,
|
|
6762
|
+
labelClassName,
|
|
6763
|
+
descriptionClassName,
|
|
6764
|
+
messageClassName,
|
|
6765
|
+
requiredLabelClassName,
|
|
6766
|
+
onChange
|
|
6767
|
+
} = _b, checkboxProps = __objRest(_b, [
|
|
6768
|
+
"name",
|
|
6769
|
+
"control",
|
|
6770
|
+
"rules",
|
|
6771
|
+
"shouldUnregister",
|
|
6772
|
+
"defaultValue",
|
|
6773
|
+
"label",
|
|
6774
|
+
"description",
|
|
6775
|
+
"requiredLabel",
|
|
6776
|
+
"className",
|
|
6777
|
+
"itemClassName",
|
|
6778
|
+
"checkboxClassName",
|
|
6779
|
+
"labelClassName",
|
|
6780
|
+
"descriptionClassName",
|
|
6781
|
+
"messageClassName",
|
|
6782
|
+
"requiredLabelClassName",
|
|
6783
|
+
"onChange"
|
|
6784
|
+
]);
|
|
6785
|
+
var _a2;
|
|
6786
|
+
const generatedId = React46.useId();
|
|
6787
|
+
const form = useFormContext2();
|
|
6852
6788
|
const controllerControl = control != null ? control : form == null ? void 0 : form.control;
|
|
6853
|
-
const
|
|
6854
|
-
const
|
|
6855
|
-
const
|
|
6856
|
-
|
|
6857
|
-
|
|
6858
|
-
|
|
6859
|
-
|
|
6860
|
-
|
|
6861
|
-
|
|
6862
|
-
|
|
6863
|
-
|
|
6864
|
-
|
|
6865
|
-
|
|
6866
|
-
|
|
6867
|
-
|
|
6789
|
+
const checkboxId = (_a2 = checkboxProps.id) != null ? _a2 : `${generatedId}-checkbox`;
|
|
6790
|
+
const descriptionId = `${generatedId}-description`;
|
|
6791
|
+
const messageId = `${generatedId}-message`;
|
|
6792
|
+
return /* @__PURE__ */ jsx22(
|
|
6793
|
+
Controller2,
|
|
6794
|
+
{
|
|
6795
|
+
control: controllerControl,
|
|
6796
|
+
name,
|
|
6797
|
+
rules,
|
|
6798
|
+
shouldUnregister,
|
|
6799
|
+
defaultValue,
|
|
6800
|
+
render: ({ field, fieldState }) => {
|
|
6801
|
+
var _a3;
|
|
6802
|
+
const checked = Boolean(field.value);
|
|
6803
|
+
const fieldError = (_a3 = fieldState.error) == null ? void 0 : _a3.message;
|
|
6804
|
+
const hasError = Boolean(fieldError);
|
|
6805
|
+
return /* @__PURE__ */ jsx22(FormItem, { className: cn("space-y-1.5", itemClassName), children: /* @__PURE__ */ jsxs13(
|
|
6806
|
+
"div",
|
|
6807
|
+
{
|
|
6808
|
+
className: cn(
|
|
6809
|
+
"flex items-start gap-3 rounded-lg border border-transparent p-1 transition-colors",
|
|
6810
|
+
hasError && "border-destructive/20 bg-destructive/5",
|
|
6811
|
+
className
|
|
6812
|
+
),
|
|
6813
|
+
children: [
|
|
6814
|
+
/* @__PURE__ */ jsx22(
|
|
6815
|
+
Checkbox,
|
|
6816
|
+
__spreadProps(__spreadValues({}, checkboxProps), {
|
|
6817
|
+
ref: field.ref,
|
|
6818
|
+
id: checkboxId,
|
|
6819
|
+
checked,
|
|
6820
|
+
invalid: hasError || checkboxProps.invalid,
|
|
6821
|
+
"aria-invalid": hasError || checkboxProps.invalid || void 0,
|
|
6822
|
+
"aria-describedby": [description ? descriptionId : void 0, hasError ? messageId : void 0].filter(Boolean).join(" ") || void 0,
|
|
6823
|
+
className: cn("mt-0.5", checkboxClassName),
|
|
6824
|
+
onBlur: field.onBlur,
|
|
6825
|
+
onCheckedChange: (value) => {
|
|
6826
|
+
const nextValue = value === true;
|
|
6827
|
+
field.onChange(nextValue);
|
|
6828
|
+
onChange == null ? void 0 : onChange(nextValue);
|
|
6829
|
+
}
|
|
6830
|
+
})
|
|
6831
|
+
),
|
|
6832
|
+
/* @__PURE__ */ jsxs13("div", { className: "min-w-0 flex-1", children: [
|
|
6833
|
+
label ? /* @__PURE__ */ jsxs13(
|
|
6834
|
+
Label3,
|
|
6835
|
+
{
|
|
6836
|
+
htmlFor: checkboxId,
|
|
6837
|
+
className: cn(
|
|
6838
|
+
"inline-flex cursor-pointer items-start gap-1 text-sm font-medium leading-none text-foreground",
|
|
6839
|
+
checkboxProps.disabled && "cursor-not-allowed text-muted-foreground",
|
|
6840
|
+
hasError && "text-destructive",
|
|
6841
|
+
labelClassName
|
|
6842
|
+
),
|
|
6843
|
+
children: [
|
|
6844
|
+
/* @__PURE__ */ jsx22("span", { children: label }),
|
|
6845
|
+
requiredLabel ? /* @__PURE__ */ jsx22(
|
|
6846
|
+
Asterisk2,
|
|
6847
|
+
{
|
|
6848
|
+
"aria-hidden": "true",
|
|
6849
|
+
className: cn(
|
|
6850
|
+
"mt-0.5 h-3 w-3 shrink-0 text-red-500",
|
|
6851
|
+
requiredLabelClassName
|
|
6852
|
+
)
|
|
6853
|
+
}
|
|
6854
|
+
) : null
|
|
6855
|
+
]
|
|
6856
|
+
}
|
|
6857
|
+
) : null,
|
|
6858
|
+
description ? /* @__PURE__ */ jsx22(
|
|
6859
|
+
"p",
|
|
6860
|
+
{
|
|
6861
|
+
id: descriptionId,
|
|
6862
|
+
className: cn(
|
|
6863
|
+
"mt-1 text-sm leading-relaxed text-muted-foreground",
|
|
6864
|
+
descriptionClassName
|
|
6865
|
+
),
|
|
6866
|
+
children: description
|
|
6867
|
+
}
|
|
6868
|
+
) : null,
|
|
6869
|
+
fieldError ? /* @__PURE__ */ jsx22(
|
|
6870
|
+
"p",
|
|
6871
|
+
{
|
|
6872
|
+
id: messageId,
|
|
6873
|
+
className: cn(
|
|
6874
|
+
"mt-1 text-sm font-medium text-destructive",
|
|
6875
|
+
messageClassName
|
|
6876
|
+
),
|
|
6877
|
+
children: fieldError
|
|
6878
|
+
}
|
|
6879
|
+
) : null
|
|
6880
|
+
] })
|
|
6881
|
+
]
|
|
6882
|
+
}
|
|
6883
|
+
) });
|
|
6884
|
+
}
|
|
6885
|
+
}
|
|
6886
|
+
);
|
|
6887
|
+
};
|
|
6888
|
+
FormCheckbox.displayName = "FormCheckbox";
|
|
6889
|
+
|
|
6890
|
+
// src/components/Form/form-select.tsx
|
|
6891
|
+
import * as React48 from "react";
|
|
6892
|
+
import { Slot as Slot5 } from "@radix-ui/react-slot";
|
|
6893
|
+
import { Asterisk as Asterisk3 } from "lucide-react";
|
|
6894
|
+
import {
|
|
6895
|
+
Controller as Controller3,
|
|
6896
|
+
useFormContext as useFormContext3
|
|
6897
|
+
} from "react-hook-form";
|
|
6898
|
+
|
|
6899
|
+
// src/components/select.tsx
|
|
6900
|
+
import {
|
|
6901
|
+
CaretSortIcon,
|
|
6902
|
+
CheckIcon as CheckIcon4,
|
|
6903
|
+
ChevronDownIcon as ChevronDownIcon2,
|
|
6904
|
+
ChevronUpIcon
|
|
6905
|
+
} from "@radix-ui/react-icons";
|
|
6906
|
+
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
6907
|
+
import * as React47 from "react";
|
|
6908
|
+
import { jsx as jsx23, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
6909
|
+
var Select2 = SelectPrimitive.Root;
|
|
6910
|
+
var SelectGroup = SelectPrimitive.Group;
|
|
6911
|
+
var SelectValue = SelectPrimitive.Value;
|
|
6912
|
+
var SelectTrigger = React47.forwardRef((_a, ref) => {
|
|
6913
|
+
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
6914
|
+
return /* @__PURE__ */ jsxs14(
|
|
6915
|
+
SelectPrimitive.Trigger,
|
|
6916
|
+
__spreadProps(__spreadValues({
|
|
6917
|
+
ref,
|
|
6918
|
+
className: cn(
|
|
6919
|
+
"flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
|
6920
|
+
className
|
|
6921
|
+
)
|
|
6922
|
+
}, props), {
|
|
6923
|
+
children: [
|
|
6924
|
+
children,
|
|
6925
|
+
/* @__PURE__ */ jsx23(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx23(CaretSortIcon, { className: "h-4 w-4 opacity-50" }) })
|
|
6926
|
+
]
|
|
6927
|
+
})
|
|
6928
|
+
);
|
|
6929
|
+
});
|
|
6930
|
+
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
6931
|
+
var SelectScrollUpButton = React47.forwardRef((_a, ref) => {
|
|
6932
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
6933
|
+
return /* @__PURE__ */ jsx23(
|
|
6934
|
+
SelectPrimitive.ScrollUpButton,
|
|
6935
|
+
__spreadProps(__spreadValues({
|
|
6936
|
+
ref,
|
|
6937
|
+
className: cn(
|
|
6938
|
+
"flex cursor-default items-center justify-center py-1",
|
|
6939
|
+
className
|
|
6940
|
+
)
|
|
6941
|
+
}, props), {
|
|
6942
|
+
children: /* @__PURE__ */ jsx23(ChevronUpIcon, {})
|
|
6943
|
+
})
|
|
6944
|
+
);
|
|
6945
|
+
});
|
|
6946
|
+
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
6947
|
+
var SelectScrollDownButton = React47.forwardRef((_a, ref) => {
|
|
6948
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
6949
|
+
return /* @__PURE__ */ jsx23(
|
|
6950
|
+
SelectPrimitive.ScrollDownButton,
|
|
6951
|
+
__spreadProps(__spreadValues({
|
|
6952
|
+
ref,
|
|
6953
|
+
className: cn(
|
|
6954
|
+
"flex cursor-default items-center justify-center py-1",
|
|
6955
|
+
className
|
|
6956
|
+
)
|
|
6957
|
+
}, props), {
|
|
6958
|
+
children: /* @__PURE__ */ jsx23(ChevronDownIcon2, {})
|
|
6959
|
+
})
|
|
6960
|
+
);
|
|
6961
|
+
});
|
|
6962
|
+
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
6963
|
+
var SelectContent = React47.forwardRef((_a, ref) => {
|
|
6964
|
+
var _b = _a, { className, children, position = "popper" } = _b, props = __objRest(_b, ["className", "children", "position"]);
|
|
6965
|
+
return /* @__PURE__ */ jsx23(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs14(
|
|
6966
|
+
SelectPrimitive.Content,
|
|
6967
|
+
__spreadProps(__spreadValues({
|
|
6968
|
+
ref,
|
|
6969
|
+
className: cn(
|
|
6970
|
+
"relative z-50 max-h-96 min-w-32 overflow-hidden bg-popover border border-border text-popover-foreground rounded-md shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
6971
|
+
position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
6972
|
+
className
|
|
6973
|
+
),
|
|
6974
|
+
position
|
|
6975
|
+
}, props), {
|
|
6976
|
+
children: [
|
|
6977
|
+
/* @__PURE__ */ jsx23(SelectScrollUpButton, {}),
|
|
6978
|
+
/* @__PURE__ */ jsx23(
|
|
6979
|
+
SelectPrimitive.Viewport,
|
|
6980
|
+
{
|
|
6981
|
+
className: cn(
|
|
6982
|
+
"p-1",
|
|
6983
|
+
position === "popper" && "h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)"
|
|
6984
|
+
),
|
|
6985
|
+
children
|
|
6986
|
+
}
|
|
6987
|
+
),
|
|
6988
|
+
/* @__PURE__ */ jsx23(SelectScrollDownButton, {})
|
|
6989
|
+
]
|
|
6990
|
+
})
|
|
6991
|
+
) });
|
|
6992
|
+
});
|
|
6993
|
+
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
6994
|
+
var SelectLabel = React47.forwardRef((_a, ref) => {
|
|
6995
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
6996
|
+
return /* @__PURE__ */ jsx23(
|
|
6997
|
+
SelectPrimitive.Label,
|
|
6998
|
+
__spreadValues({
|
|
6999
|
+
ref,
|
|
7000
|
+
className: cn("px-2 py-1.5 text-sm font-semibold", className)
|
|
7001
|
+
}, props)
|
|
7002
|
+
);
|
|
7003
|
+
});
|
|
7004
|
+
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
7005
|
+
var SelectItem = React47.forwardRef((_a, ref) => {
|
|
7006
|
+
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
7007
|
+
return /* @__PURE__ */ jsxs14(
|
|
7008
|
+
SelectPrimitive.Item,
|
|
7009
|
+
__spreadProps(__spreadValues({
|
|
7010
|
+
ref,
|
|
7011
|
+
className: cn(
|
|
7012
|
+
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",
|
|
7013
|
+
className
|
|
7014
|
+
)
|
|
7015
|
+
}, props), {
|
|
7016
|
+
children: [
|
|
7017
|
+
/* @__PURE__ */ jsx23("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx23(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx23(CheckIcon4, { className: "h-4 w-4" }) }) }),
|
|
7018
|
+
/* @__PURE__ */ jsx23(SelectPrimitive.ItemText, { children })
|
|
7019
|
+
]
|
|
7020
|
+
})
|
|
7021
|
+
);
|
|
7022
|
+
});
|
|
7023
|
+
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
7024
|
+
var SelectSeparator = React47.forwardRef((_a, ref) => {
|
|
7025
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
7026
|
+
return /* @__PURE__ */ jsx23(
|
|
7027
|
+
SelectPrimitive.Separator,
|
|
7028
|
+
__spreadValues({
|
|
7029
|
+
ref,
|
|
7030
|
+
className: cn("-mx-1 my-1 h-px bg-muted", className)
|
|
7031
|
+
}, props)
|
|
7032
|
+
);
|
|
7033
|
+
});
|
|
7034
|
+
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
7035
|
+
|
|
7036
|
+
// src/components/Form/form-select.tsx
|
|
7037
|
+
import { jsx as jsx24, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
7038
|
+
var FormFieldContext2 = React48.createContext(
|
|
7039
|
+
null
|
|
7040
|
+
);
|
|
7041
|
+
function getErrorMessage2(error) {
|
|
7042
|
+
const message2 = error == null ? void 0 : error.message;
|
|
7043
|
+
return typeof message2 === "string" ? message2 : void 0;
|
|
7044
|
+
}
|
|
7045
|
+
var FormItemContext2 = React48.createContext(null);
|
|
7046
|
+
var FormItem2 = React48.forwardRef((_a, ref) => {
|
|
7047
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
7048
|
+
const id = React48.useId();
|
|
7049
|
+
return /* @__PURE__ */ jsx24(FormItemContext2.Provider, { value: { id }, children: /* @__PURE__ */ jsx24("div", __spreadValues({ ref, className: cn("space-y-2", className) }, props)) });
|
|
7050
|
+
});
|
|
7051
|
+
FormItem2.displayName = "FormItem";
|
|
7052
|
+
var useFormField2 = () => {
|
|
7053
|
+
var _a;
|
|
7054
|
+
const generatedId = React48.useId();
|
|
7055
|
+
const fieldContext = React48.useContext(FormFieldContext2);
|
|
7056
|
+
const itemContext = React48.useContext(FormItemContext2);
|
|
7057
|
+
const formContext = useFormContext3();
|
|
7058
|
+
const id = (_a = itemContext == null ? void 0 : itemContext.id) != null ? _a : generatedId;
|
|
7059
|
+
if (!fieldContext || !formContext) {
|
|
7060
|
+
return {
|
|
7061
|
+
id,
|
|
7062
|
+
formItemId: `${id}-form-item`,
|
|
7063
|
+
formDescriptionId: `${id}-form-item-description`,
|
|
7064
|
+
formMessageId: `${id}-form-item-message`,
|
|
7065
|
+
error: void 0
|
|
7066
|
+
};
|
|
7067
|
+
}
|
|
7068
|
+
const fieldState = formContext.getFieldState(
|
|
7069
|
+
fieldContext.name,
|
|
7070
|
+
formContext.formState
|
|
7071
|
+
);
|
|
7072
|
+
return __spreadValues({
|
|
7073
|
+
id,
|
|
7074
|
+
name: fieldContext.name,
|
|
7075
|
+
formItemId: `${id}-form-item`,
|
|
7076
|
+
formDescriptionId: `${id}-form-item-description`,
|
|
7077
|
+
formMessageId: `${id}-form-item-message`
|
|
7078
|
+
}, fieldState);
|
|
7079
|
+
};
|
|
7080
|
+
var FormLabel2 = React48.forwardRef((_a, ref) => {
|
|
7081
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
7082
|
+
const { error, formItemId } = useFormField2();
|
|
7083
|
+
return /* @__PURE__ */ jsx24(
|
|
7084
|
+
Label3,
|
|
7085
|
+
__spreadValues({
|
|
7086
|
+
ref,
|
|
7087
|
+
className: cn(error && "text-destructive", className),
|
|
7088
|
+
htmlFor: formItemId
|
|
7089
|
+
}, props)
|
|
7090
|
+
);
|
|
7091
|
+
});
|
|
7092
|
+
FormLabel2.displayName = "FormLabel";
|
|
7093
|
+
var FormControl2 = React48.forwardRef((_a, ref) => {
|
|
7094
|
+
var props = __objRest(_a, []);
|
|
7095
|
+
const { error, formItemId, formDescriptionId, formMessageId } = useFormField2();
|
|
7096
|
+
return /* @__PURE__ */ jsx24(
|
|
7097
|
+
Slot5,
|
|
7098
|
+
__spreadValues({
|
|
7099
|
+
ref,
|
|
7100
|
+
id: formItemId,
|
|
7101
|
+
"aria-describedby": error ? `${formDescriptionId} ${formMessageId}` : formDescriptionId,
|
|
7102
|
+
"aria-invalid": Boolean(error)
|
|
7103
|
+
}, props)
|
|
7104
|
+
);
|
|
7105
|
+
});
|
|
7106
|
+
FormControl2.displayName = "FormControl";
|
|
7107
|
+
var FormMessage2 = React48.forwardRef((_a, ref) => {
|
|
7108
|
+
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
7109
|
+
const { error, formMessageId } = useFormField2();
|
|
7110
|
+
const body = error ? getErrorMessage2(error) : children;
|
|
7111
|
+
if (!body) return null;
|
|
7112
|
+
return /* @__PURE__ */ jsx24(
|
|
7113
|
+
"p",
|
|
7114
|
+
__spreadProps(__spreadValues({
|
|
7115
|
+
ref,
|
|
7116
|
+
id: formMessageId,
|
|
7117
|
+
className: cn("text-[0.8rem] font-medium text-destructive", className)
|
|
7118
|
+
}, props), {
|
|
7119
|
+
children: body
|
|
7120
|
+
})
|
|
7121
|
+
);
|
|
7122
|
+
});
|
|
7123
|
+
FormMessage2.displayName = "FormMessage";
|
|
7124
|
+
var getDefaultOptionValue = (item) => {
|
|
7125
|
+
var _a;
|
|
7126
|
+
if (typeof item === "string") return item;
|
|
7127
|
+
if (item && typeof item === "object" && "value" in item) {
|
|
7128
|
+
return String((_a = item.value) != null ? _a : "");
|
|
7129
|
+
}
|
|
7130
|
+
return String(item != null ? item : "");
|
|
7131
|
+
};
|
|
7132
|
+
var getDefaultOptionLabel = (item) => {
|
|
7133
|
+
if (item && typeof item === "object" && "label" in item) {
|
|
7134
|
+
return item.label;
|
|
7135
|
+
}
|
|
7136
|
+
return getDefaultOptionValue(item);
|
|
7137
|
+
};
|
|
7138
|
+
var FormSelect = ({
|
|
7139
|
+
name,
|
|
7140
|
+
control,
|
|
7141
|
+
rules,
|
|
7142
|
+
shouldUnregister,
|
|
7143
|
+
defaultValue,
|
|
7144
|
+
placeholder,
|
|
7145
|
+
label,
|
|
7146
|
+
requiredLabel,
|
|
7147
|
+
className,
|
|
7148
|
+
itemClassName,
|
|
7149
|
+
contentClassName,
|
|
7150
|
+
searchInputClassName,
|
|
7151
|
+
labelClassName,
|
|
7152
|
+
messageClassName,
|
|
7153
|
+
requiredLabelClassName,
|
|
7154
|
+
options,
|
|
7155
|
+
items,
|
|
7156
|
+
getOptionValue = getDefaultOptionValue,
|
|
7157
|
+
getOptionLabel = getDefaultOptionLabel,
|
|
7158
|
+
getOptionDisabled,
|
|
7159
|
+
getOptionData,
|
|
7160
|
+
children,
|
|
7161
|
+
onChange,
|
|
7162
|
+
onChangeItem,
|
|
7163
|
+
disabled,
|
|
7164
|
+
size = "md",
|
|
7165
|
+
customSize,
|
|
7166
|
+
variant = "outline",
|
|
7167
|
+
invalid,
|
|
7168
|
+
searchable = false,
|
|
7169
|
+
searchPlaceholder = "Buscar\u2026",
|
|
7170
|
+
emptyText = "No hay resultados",
|
|
7171
|
+
position = "popper"
|
|
7172
|
+
}) => {
|
|
7173
|
+
const form = useFormContext3();
|
|
7174
|
+
const controllerControl = control != null ? control : form == null ? void 0 : form.control;
|
|
7175
|
+
const [query, setQuery] = React48.useState("");
|
|
7176
|
+
const searchRef = React48.useRef(null);
|
|
7177
|
+
const sizeClasses = getFormSizeClasses(size, customSize);
|
|
7178
|
+
const triggerBase = "relative inline-flex w-full items-center justify-between text-foreground outline-none ring-offset-background transition placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50";
|
|
7179
|
+
const triggerSizeClass = variant === "flushed" ? sizeClasses.flushedControl : variant === "link" ? sizeClasses.linkControl : sizeClasses.control;
|
|
7180
|
+
const contentBase = "z-50 rounded-md border border-border bg-popover text-popover-foreground shadow-md !overflow-hidden";
|
|
7181
|
+
const contentViewport = "[&_[data-radix-select-viewport]]:max-h-72 [&_[data-radix-select-viewport]]:overflow-y-auto [&_[data-radix-select-viewport]]:overscroll-contain [&_[data-radix-select-viewport]]:[scrollbar-gutter:stable]";
|
|
7182
|
+
const normalizedOptions = React48.useMemo(() => {
|
|
6868
7183
|
if (options) return options;
|
|
6869
7184
|
return (items != null ? items : []).map((item) => {
|
|
6870
7185
|
var _a;
|
|
@@ -6883,7 +7198,7 @@ var FormSelect = ({
|
|
|
6883
7198
|
items,
|
|
6884
7199
|
options
|
|
6885
7200
|
]);
|
|
6886
|
-
const filteredOptions =
|
|
7201
|
+
const filteredOptions = React48.useMemo(() => {
|
|
6887
7202
|
if (!searchable || !query.trim()) return normalizedOptions;
|
|
6888
7203
|
const normalizedQuery = query.trim().toLowerCase();
|
|
6889
7204
|
return normalizedOptions.filter((option) => {
|
|
@@ -6892,10 +7207,8 @@ var FormSelect = ({
|
|
|
6892
7207
|
return `${label2} ${option.value}`.toLowerCase().includes(normalizedQuery);
|
|
6893
7208
|
});
|
|
6894
7209
|
}, [normalizedOptions, query, searchable]);
|
|
6895
|
-
|
|
6896
|
-
|
|
6897
|
-
return /* @__PURE__ */ jsx22(FormFieldContext.Provider, { value: { name }, children: /* @__PURE__ */ jsx22(
|
|
6898
|
-
Controller,
|
|
7210
|
+
return /* @__PURE__ */ jsx24(FormFieldContext2.Provider, { value: { name }, children: /* @__PURE__ */ jsx24(
|
|
7211
|
+
Controller3,
|
|
6899
7212
|
{
|
|
6900
7213
|
control: controllerControl,
|
|
6901
7214
|
name,
|
|
@@ -6904,17 +7217,22 @@ var FormSelect = ({
|
|
|
6904
7217
|
defaultValue,
|
|
6905
7218
|
render: ({ field, fieldState }) => {
|
|
6906
7219
|
var _a;
|
|
6907
|
-
const fieldError =
|
|
7220
|
+
const fieldError = getErrorMessage2(fieldState.error);
|
|
7221
|
+
const hasError = Boolean(invalid || fieldError);
|
|
6908
7222
|
const hasOptions = filteredOptions.length > 0;
|
|
6909
|
-
return /* @__PURE__ */
|
|
6910
|
-
label ? /* @__PURE__ */
|
|
6911
|
-
|
|
7223
|
+
return /* @__PURE__ */ jsxs15(FormItem2, { children: [
|
|
7224
|
+
label ? /* @__PURE__ */ jsxs15(
|
|
7225
|
+
FormLabel2,
|
|
6912
7226
|
{
|
|
6913
|
-
className: cn(
|
|
7227
|
+
className: cn(
|
|
7228
|
+
"flex items-center gap-0.5",
|
|
7229
|
+
sizeClasses.label,
|
|
7230
|
+
labelClassName
|
|
7231
|
+
),
|
|
6914
7232
|
children: [
|
|
6915
|
-
/* @__PURE__ */
|
|
6916
|
-
requiredLabel ? /* @__PURE__ */
|
|
6917
|
-
|
|
7233
|
+
/* @__PURE__ */ jsx24("span", { children: label }),
|
|
7234
|
+
requiredLabel ? /* @__PURE__ */ jsx24(
|
|
7235
|
+
Asterisk3,
|
|
6918
7236
|
{
|
|
6919
7237
|
"aria-hidden": "true",
|
|
6920
7238
|
className: cn(
|
|
@@ -6926,7 +7244,7 @@ var FormSelect = ({
|
|
|
6926
7244
|
]
|
|
6927
7245
|
}
|
|
6928
7246
|
) : null,
|
|
6929
|
-
/* @__PURE__ */
|
|
7247
|
+
/* @__PURE__ */ jsxs15(
|
|
6930
7248
|
Select2,
|
|
6931
7249
|
{
|
|
6932
7250
|
value: (_a = field.value) != null ? _a : "",
|
|
@@ -6941,226 +7259,128 @@ var FormSelect = ({
|
|
|
6941
7259
|
(_a2 = selectedOption == null ? void 0 : selectedOption.data) != null ? _a2 : null
|
|
6942
7260
|
);
|
|
6943
7261
|
},
|
|
7262
|
+
onOpenChange: (open) => {
|
|
7263
|
+
if (open && searchable) {
|
|
7264
|
+
requestAnimationFrame(() => {
|
|
7265
|
+
var _a2;
|
|
7266
|
+
(_a2 = searchRef.current) == null ? void 0 : _a2.focus();
|
|
7267
|
+
});
|
|
7268
|
+
}
|
|
7269
|
+
if (!open) {
|
|
7270
|
+
setQuery("");
|
|
7271
|
+
}
|
|
7272
|
+
},
|
|
6944
7273
|
disabled,
|
|
6945
7274
|
children: [
|
|
6946
|
-
/* @__PURE__ */
|
|
7275
|
+
/* @__PURE__ */ jsx24(FormControl2, { children: /* @__PURE__ */ jsx24(
|
|
6947
7276
|
SelectTrigger,
|
|
6948
7277
|
{
|
|
6949
7278
|
className: cn(
|
|
6950
7279
|
triggerBase,
|
|
6951
7280
|
variants[variant],
|
|
6952
|
-
|
|
6953
|
-
|
|
7281
|
+
triggerSizeClass,
|
|
7282
|
+
hasError && "border-destructive ring-destructive focus:ring-destructive/40",
|
|
6954
7283
|
className
|
|
6955
|
-
),
|
|
6956
|
-
children: /* @__PURE__ */
|
|
6957
|
-
}
|
|
6958
|
-
) }),
|
|
6959
|
-
/* @__PURE__ */ jsxs13(
|
|
6960
|
-
SelectContent,
|
|
6961
|
-
{
|
|
6962
|
-
className: cn(contentBase, contentClassName),
|
|
6963
|
-
onCloseAutoFocus: (event) => {
|
|
6964
|
-
if (!searchable) return;
|
|
6965
|
-
event.preventDefault();
|
|
6966
|
-
requestAnimationFrame(() => {
|
|
6967
|
-
var _a2;
|
|
6968
|
-
return (_a2 = searchRef.current) == null ? void 0 : _a2.focus();
|
|
6969
|
-
});
|
|
6970
|
-
},
|
|
6971
|
-
children: [
|
|
6972
|
-
searchable && normalizedOptions.length > 0 ? /* @__PURE__ */ jsx22("div", { className: "sticky top-0 z-10 border-b border-border bg-popover p-2", children: /* @__PURE__ */ jsx22(
|
|
6973
|
-
"input",
|
|
6974
|
-
{
|
|
6975
|
-
ref: searchRef,
|
|
6976
|
-
value: query,
|
|
6977
|
-
onChange: (event) => setQuery(event.target.value),
|
|
6978
|
-
placeholder: searchPlaceholder,
|
|
6979
|
-
className: "w-full rounded-md border border-input bg-input px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-primary/20",
|
|
6980
|
-
onKeyDown: (event) => {
|
|
6981
|
-
if (event.key !== "Escape") event.stopPropagation();
|
|
6982
|
-
},
|
|
6983
|
-
onPointerDown: (event) => event.stopPropagation(),
|
|
6984
|
-
onClick: (event) => event.stopPropagation()
|
|
6985
|
-
}
|
|
6986
|
-
) }) : null,
|
|
6987
|
-
children && !searchable ? children : null,
|
|
6988
|
-
!children || searchable ? hasOptions ? filteredOptions.map((option) => /* @__PURE__ */ jsx22(
|
|
6989
|
-
SelectItem,
|
|
6990
|
-
{
|
|
6991
|
-
value: option.value,
|
|
6992
|
-
disabled: option.disabled,
|
|
6993
|
-
className: cn(itemSize[size], itemClassName),
|
|
6994
|
-
children: option.label
|
|
6995
|
-
},
|
|
6996
|
-
option.value
|
|
6997
|
-
)) : /* @__PURE__ */ jsx22("div", { className: "px-3 py-2 text-sm text-muted-foreground", children: emptyText }) : null
|
|
6998
|
-
]
|
|
6999
|
-
}
|
|
7000
|
-
)
|
|
7001
|
-
]
|
|
7002
|
-
}
|
|
7003
|
-
),
|
|
7004
|
-
fieldError ? /* @__PURE__ */ jsx22(FormMessage, { className: messageClassName, children: fieldError }) : null
|
|
7005
|
-
] });
|
|
7006
|
-
}
|
|
7007
|
-
}
|
|
7008
|
-
) });
|
|
7009
|
-
};
|
|
7010
|
-
FormSelect.displayName = "FormSelect";
|
|
7011
|
-
|
|
7012
|
-
// src/components/Form/form-checkbox.tsx
|
|
7013
|
-
import { jsx as jsx23, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
7014
|
-
var FormCheckbox = (_a) => {
|
|
7015
|
-
var _b = _a, {
|
|
7016
|
-
name,
|
|
7017
|
-
control,
|
|
7018
|
-
rules,
|
|
7019
|
-
shouldUnregister,
|
|
7020
|
-
defaultValue,
|
|
7021
|
-
label,
|
|
7022
|
-
description,
|
|
7023
|
-
requiredLabel,
|
|
7024
|
-
className,
|
|
7025
|
-
itemClassName,
|
|
7026
|
-
checkboxClassName,
|
|
7027
|
-
labelClassName,
|
|
7028
|
-
descriptionClassName,
|
|
7029
|
-
messageClassName,
|
|
7030
|
-
requiredLabelClassName,
|
|
7031
|
-
onChange
|
|
7032
|
-
} = _b, checkboxProps = __objRest(_b, [
|
|
7033
|
-
"name",
|
|
7034
|
-
"control",
|
|
7035
|
-
"rules",
|
|
7036
|
-
"shouldUnregister",
|
|
7037
|
-
"defaultValue",
|
|
7038
|
-
"label",
|
|
7039
|
-
"description",
|
|
7040
|
-
"requiredLabel",
|
|
7041
|
-
"className",
|
|
7042
|
-
"itemClassName",
|
|
7043
|
-
"checkboxClassName",
|
|
7044
|
-
"labelClassName",
|
|
7045
|
-
"descriptionClassName",
|
|
7046
|
-
"messageClassName",
|
|
7047
|
-
"requiredLabelClassName",
|
|
7048
|
-
"onChange"
|
|
7049
|
-
]);
|
|
7050
|
-
var _a2;
|
|
7051
|
-
const generatedId = React47.useId();
|
|
7052
|
-
const form = useFormContext2();
|
|
7053
|
-
const controllerControl = control != null ? control : form == null ? void 0 : form.control;
|
|
7054
|
-
const checkboxId = (_a2 = checkboxProps.id) != null ? _a2 : `${generatedId}-checkbox`;
|
|
7055
|
-
const descriptionId = `${generatedId}-description`;
|
|
7056
|
-
const messageId = `${generatedId}-message`;
|
|
7057
|
-
return /* @__PURE__ */ jsx23(
|
|
7058
|
-
Controller2,
|
|
7059
|
-
{
|
|
7060
|
-
control: controllerControl,
|
|
7061
|
-
name,
|
|
7062
|
-
rules,
|
|
7063
|
-
shouldUnregister,
|
|
7064
|
-
defaultValue,
|
|
7065
|
-
render: ({ field, fieldState }) => {
|
|
7066
|
-
var _a3;
|
|
7067
|
-
const checked = Boolean(field.value);
|
|
7068
|
-
const fieldError = (_a3 = fieldState.error) == null ? void 0 : _a3.message;
|
|
7069
|
-
const hasError = Boolean(fieldError);
|
|
7070
|
-
return /* @__PURE__ */ jsx23(FormItem, { className: cn("space-y-1.5", itemClassName), children: /* @__PURE__ */ jsxs14(
|
|
7071
|
-
"div",
|
|
7072
|
-
{
|
|
7073
|
-
className: cn(
|
|
7074
|
-
"flex items-start gap-3 rounded-lg border border-transparent p-1 transition-colors",
|
|
7075
|
-
hasError && "border-destructive/20 bg-destructive/5",
|
|
7076
|
-
className
|
|
7077
|
-
),
|
|
7078
|
-
children: [
|
|
7079
|
-
/* @__PURE__ */ jsx23(
|
|
7080
|
-
Checkbox,
|
|
7081
|
-
__spreadProps(__spreadValues({}, checkboxProps), {
|
|
7082
|
-
ref: field.ref,
|
|
7083
|
-
id: checkboxId,
|
|
7084
|
-
checked,
|
|
7085
|
-
invalid: hasError || checkboxProps.invalid,
|
|
7086
|
-
"aria-invalid": hasError || checkboxProps.invalid || void 0,
|
|
7087
|
-
"aria-describedby": [description ? descriptionId : void 0, hasError ? messageId : void 0].filter(Boolean).join(" ") || void 0,
|
|
7088
|
-
className: cn("mt-0.5", checkboxClassName),
|
|
7089
|
-
onBlur: field.onBlur,
|
|
7090
|
-
onCheckedChange: (value) => {
|
|
7091
|
-
const nextValue = value === true;
|
|
7092
|
-
field.onChange(nextValue);
|
|
7093
|
-
onChange == null ? void 0 : onChange(nextValue);
|
|
7284
|
+
),
|
|
7285
|
+
children: /* @__PURE__ */ jsx24(SelectValue, { placeholder })
|
|
7094
7286
|
}
|
|
7095
|
-
})
|
|
7096
|
-
|
|
7097
|
-
|
|
7098
|
-
label ? /* @__PURE__ */ jsxs14(
|
|
7099
|
-
Label3,
|
|
7287
|
+
) }),
|
|
7288
|
+
/* @__PURE__ */ jsxs15(
|
|
7289
|
+
SelectContent,
|
|
7100
7290
|
{
|
|
7101
|
-
|
|
7291
|
+
position,
|
|
7292
|
+
sideOffset: 6,
|
|
7102
7293
|
className: cn(
|
|
7103
|
-
|
|
7104
|
-
|
|
7105
|
-
|
|
7106
|
-
|
|
7294
|
+
contentBase,
|
|
7295
|
+
contentViewport,
|
|
7296
|
+
"w-(--radix-select-trigger-width) min-w-(--radix-select-trigger-width)",
|
|
7297
|
+
contentClassName
|
|
7107
7298
|
),
|
|
7299
|
+
onCloseAutoFocus: (event) => {
|
|
7300
|
+
if (searchable) {
|
|
7301
|
+
event.preventDefault();
|
|
7302
|
+
}
|
|
7303
|
+
},
|
|
7304
|
+
onWheelCapture: (event) => {
|
|
7305
|
+
event.stopPropagation();
|
|
7306
|
+
},
|
|
7307
|
+
onTouchMoveCapture: (event) => {
|
|
7308
|
+
event.stopPropagation();
|
|
7309
|
+
},
|
|
7108
7310
|
children: [
|
|
7109
|
-
/* @__PURE__ */
|
|
7110
|
-
|
|
7111
|
-
Asterisk2,
|
|
7311
|
+
searchable && normalizedOptions.length > 0 ? /* @__PURE__ */ jsx24("div", { className: "sticky top-0 z-10 border-b border-border bg-popover p-2", children: /* @__PURE__ */ jsx24(
|
|
7312
|
+
"input",
|
|
7112
7313
|
{
|
|
7113
|
-
|
|
7314
|
+
ref: searchRef,
|
|
7315
|
+
value: query,
|
|
7316
|
+
onChange: (event) => setQuery(event.target.value),
|
|
7317
|
+
placeholder: searchPlaceholder,
|
|
7114
7318
|
className: cn(
|
|
7115
|
-
"
|
|
7116
|
-
|
|
7117
|
-
|
|
7319
|
+
"w-full rounded-md border border-input bg-input outline-none focus:ring-2 focus:ring-primary/20",
|
|
7320
|
+
sizeClasses.searchInput,
|
|
7321
|
+
searchInputClassName
|
|
7322
|
+
),
|
|
7323
|
+
onKeyDown: (event) => {
|
|
7324
|
+
if (event.key !== "Escape") {
|
|
7325
|
+
event.stopPropagation();
|
|
7326
|
+
}
|
|
7327
|
+
},
|
|
7328
|
+
onPointerDown: (event) => event.stopPropagation(),
|
|
7329
|
+
onClick: (event) => event.stopPropagation()
|
|
7330
|
+
}
|
|
7331
|
+
) }) : null,
|
|
7332
|
+
children && !searchable ? children : null,
|
|
7333
|
+
!children || searchable ? hasOptions ? filteredOptions.map((option) => /* @__PURE__ */ jsx24(
|
|
7334
|
+
SelectItem,
|
|
7335
|
+
{
|
|
7336
|
+
value: option.value,
|
|
7337
|
+
disabled: option.disabled,
|
|
7338
|
+
className: cn(
|
|
7339
|
+
sizeClasses.selectItem,
|
|
7340
|
+
itemClassName
|
|
7341
|
+
),
|
|
7342
|
+
children: option.label
|
|
7343
|
+
},
|
|
7344
|
+
option.value
|
|
7345
|
+
)) : /* @__PURE__ */ jsx24(
|
|
7346
|
+
"div",
|
|
7347
|
+
{
|
|
7348
|
+
className: cn(
|
|
7349
|
+
"px-3 py-2 text-muted-foreground",
|
|
7350
|
+
sizeClasses.message
|
|
7351
|
+
),
|
|
7352
|
+
children: emptyText
|
|
7118
7353
|
}
|
|
7119
7354
|
) : null
|
|
7120
7355
|
]
|
|
7121
7356
|
}
|
|
7122
|
-
)
|
|
7123
|
-
|
|
7124
|
-
|
|
7125
|
-
|
|
7126
|
-
|
|
7127
|
-
|
|
7128
|
-
|
|
7129
|
-
|
|
7130
|
-
|
|
7131
|
-
|
|
7132
|
-
|
|
7133
|
-
|
|
7134
|
-
fieldError ? /* @__PURE__ */ jsx23(
|
|
7135
|
-
"p",
|
|
7136
|
-
{
|
|
7137
|
-
id: messageId,
|
|
7138
|
-
className: cn(
|
|
7139
|
-
"mt-1 text-sm font-medium text-destructive",
|
|
7140
|
-
messageClassName
|
|
7141
|
-
),
|
|
7142
|
-
children: fieldError
|
|
7143
|
-
}
|
|
7144
|
-
) : null
|
|
7145
|
-
] })
|
|
7146
|
-
]
|
|
7147
|
-
}
|
|
7148
|
-
) });
|
|
7357
|
+
)
|
|
7358
|
+
]
|
|
7359
|
+
}
|
|
7360
|
+
),
|
|
7361
|
+
fieldError ? /* @__PURE__ */ jsx24(
|
|
7362
|
+
FormMessage2,
|
|
7363
|
+
{
|
|
7364
|
+
className: cn(sizeClasses.message, messageClassName),
|
|
7365
|
+
children: fieldError
|
|
7366
|
+
}
|
|
7367
|
+
) : null
|
|
7368
|
+
] });
|
|
7149
7369
|
}
|
|
7150
7370
|
}
|
|
7151
|
-
);
|
|
7371
|
+
) });
|
|
7152
7372
|
};
|
|
7153
|
-
|
|
7373
|
+
FormSelect.displayName = "FormSelect";
|
|
7154
7374
|
|
|
7155
7375
|
// src/components/hover-card.tsx
|
|
7156
7376
|
import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
|
|
7157
|
-
import * as
|
|
7158
|
-
import { jsx as
|
|
7377
|
+
import * as React49 from "react";
|
|
7378
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
7159
7379
|
var HoverCard = HoverCardPrimitive.Root;
|
|
7160
7380
|
var HoverCardTrigger = HoverCardPrimitive.Trigger;
|
|
7161
|
-
var HoverCardContent =
|
|
7381
|
+
var HoverCardContent = React49.forwardRef((_a, ref) => {
|
|
7162
7382
|
var _b = _a, { className, align = "center", sideOffset = 4 } = _b, props = __objRest(_b, ["className", "align", "sideOffset"]);
|
|
7163
|
-
return /* @__PURE__ */
|
|
7383
|
+
return /* @__PURE__ */ jsx25(
|
|
7164
7384
|
HoverCardPrimitive.Content,
|
|
7165
7385
|
__spreadValues({
|
|
7166
7386
|
ref,
|
|
@@ -7239,11 +7459,11 @@ var Icons = IconsApp;
|
|
|
7239
7459
|
// src/components/input-otp.tsx
|
|
7240
7460
|
import { DashIcon } from "@radix-ui/react-icons";
|
|
7241
7461
|
import { OTPInput, OTPInputContext } from "input-otp";
|
|
7242
|
-
import * as
|
|
7243
|
-
import { jsx as
|
|
7244
|
-
var InputOTP =
|
|
7462
|
+
import * as React50 from "react";
|
|
7463
|
+
import { jsx as jsx26, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
7464
|
+
var InputOTP = React50.forwardRef((_a, ref) => {
|
|
7245
7465
|
var _b = _a, { className, containerClassName } = _b, props = __objRest(_b, ["className", "containerClassName"]);
|
|
7246
|
-
return /* @__PURE__ */
|
|
7466
|
+
return /* @__PURE__ */ jsx26(
|
|
7247
7467
|
OTPInput,
|
|
7248
7468
|
__spreadValues({
|
|
7249
7469
|
ref,
|
|
@@ -7256,16 +7476,16 @@ var InputOTP = React49.forwardRef((_a, ref) => {
|
|
|
7256
7476
|
);
|
|
7257
7477
|
});
|
|
7258
7478
|
InputOTP.displayName = "InputOTP";
|
|
7259
|
-
var InputOTPGroup =
|
|
7479
|
+
var InputOTPGroup = React50.forwardRef((_a, ref) => {
|
|
7260
7480
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
7261
|
-
return /* @__PURE__ */
|
|
7481
|
+
return /* @__PURE__ */ jsx26("div", __spreadValues({ ref, className: cn("flex items-center", className) }, props));
|
|
7262
7482
|
});
|
|
7263
7483
|
InputOTPGroup.displayName = "InputOTPGroup";
|
|
7264
|
-
var InputOTPSlot =
|
|
7484
|
+
var InputOTPSlot = React50.forwardRef((_a, ref) => {
|
|
7265
7485
|
var _b = _a, { index, className } = _b, props = __objRest(_b, ["index", "className"]);
|
|
7266
|
-
const inputOTPContext =
|
|
7486
|
+
const inputOTPContext = React50.useContext(OTPInputContext);
|
|
7267
7487
|
const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];
|
|
7268
|
-
return /* @__PURE__ */
|
|
7488
|
+
return /* @__PURE__ */ jsxs16(
|
|
7269
7489
|
"div",
|
|
7270
7490
|
__spreadProps(__spreadValues({
|
|
7271
7491
|
ref,
|
|
@@ -7278,15 +7498,15 @@ var InputOTPSlot = React49.forwardRef((_a, ref) => {
|
|
|
7278
7498
|
}, props), {
|
|
7279
7499
|
children: [
|
|
7280
7500
|
char,
|
|
7281
|
-
hasFakeCaret && /* @__PURE__ */
|
|
7501
|
+
hasFakeCaret && /* @__PURE__ */ jsx26("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsx26("div", { className: "animate-caret-blink h-4 w-px bg-foreground duration-1000" }) })
|
|
7282
7502
|
]
|
|
7283
7503
|
})
|
|
7284
7504
|
);
|
|
7285
7505
|
});
|
|
7286
7506
|
InputOTPSlot.displayName = "InputOTPSlot";
|
|
7287
|
-
var InputOTPSeparator =
|
|
7507
|
+
var InputOTPSeparator = React50.forwardRef((_a, ref) => {
|
|
7288
7508
|
var props = __objRest(_a, []);
|
|
7289
|
-
return /* @__PURE__ */
|
|
7509
|
+
return /* @__PURE__ */ jsx26("div", __spreadProps(__spreadValues({ ref, role: "separator" }, props), { children: /* @__PURE__ */ jsx26(DashIcon, {}) }));
|
|
7290
7510
|
});
|
|
7291
7511
|
InputOTPSeparator.displayName = "InputOTPSeparator";
|
|
7292
7512
|
|
|
@@ -7297,16 +7517,16 @@ import {
|
|
|
7297
7517
|
DotFilledIcon as DotFilledIcon3
|
|
7298
7518
|
} from "@radix-ui/react-icons";
|
|
7299
7519
|
import * as MenubarPrimitive from "@radix-ui/react-menubar";
|
|
7300
|
-
import * as
|
|
7301
|
-
import { jsx as
|
|
7520
|
+
import * as React51 from "react";
|
|
7521
|
+
import { jsx as jsx27, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
7302
7522
|
var MenubarMenu = MenubarPrimitive.Menu;
|
|
7303
7523
|
var MenubarGroup = MenubarPrimitive.Group;
|
|
7304
7524
|
var MenubarPortal = MenubarPrimitive.Portal;
|
|
7305
7525
|
var MenubarSub = MenubarPrimitive.Sub;
|
|
7306
7526
|
var MenubarRadioGroup = MenubarPrimitive.RadioGroup;
|
|
7307
|
-
var Menubar =
|
|
7527
|
+
var Menubar = React51.forwardRef((_a, ref) => {
|
|
7308
7528
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
7309
|
-
return /* @__PURE__ */
|
|
7529
|
+
return /* @__PURE__ */ jsx27(
|
|
7310
7530
|
MenubarPrimitive.Root,
|
|
7311
7531
|
__spreadValues({
|
|
7312
7532
|
ref,
|
|
@@ -7318,9 +7538,9 @@ var Menubar = React50.forwardRef((_a, ref) => {
|
|
|
7318
7538
|
);
|
|
7319
7539
|
});
|
|
7320
7540
|
Menubar.displayName = MenubarPrimitive.Root.displayName;
|
|
7321
|
-
var MenubarTrigger =
|
|
7541
|
+
var MenubarTrigger = React51.forwardRef((_a, ref) => {
|
|
7322
7542
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
7323
|
-
return /* @__PURE__ */
|
|
7543
|
+
return /* @__PURE__ */ jsx27(
|
|
7324
7544
|
MenubarPrimitive.Trigger,
|
|
7325
7545
|
__spreadValues({
|
|
7326
7546
|
ref,
|
|
@@ -7332,9 +7552,9 @@ var MenubarTrigger = React50.forwardRef((_a, ref) => {
|
|
|
7332
7552
|
);
|
|
7333
7553
|
});
|
|
7334
7554
|
MenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName;
|
|
7335
|
-
var MenubarSubTrigger =
|
|
7555
|
+
var MenubarSubTrigger = React51.forwardRef((_a, ref) => {
|
|
7336
7556
|
var _b = _a, { className, inset, children } = _b, props = __objRest(_b, ["className", "inset", "children"]);
|
|
7337
|
-
return /* @__PURE__ */
|
|
7557
|
+
return /* @__PURE__ */ jsxs17(
|
|
7338
7558
|
MenubarPrimitive.SubTrigger,
|
|
7339
7559
|
__spreadProps(__spreadValues({
|
|
7340
7560
|
ref,
|
|
@@ -7346,15 +7566,15 @@ var MenubarSubTrigger = React50.forwardRef((_a, ref) => {
|
|
|
7346
7566
|
}, props), {
|
|
7347
7567
|
children: [
|
|
7348
7568
|
children,
|
|
7349
|
-
/* @__PURE__ */
|
|
7569
|
+
/* @__PURE__ */ jsx27(ChevronRightIcon4, { className: "ml-auto h-4 w-4" })
|
|
7350
7570
|
]
|
|
7351
7571
|
})
|
|
7352
7572
|
);
|
|
7353
7573
|
});
|
|
7354
7574
|
MenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName;
|
|
7355
|
-
var MenubarSubContent =
|
|
7575
|
+
var MenubarSubContent = React51.forwardRef((_a, ref) => {
|
|
7356
7576
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
7357
|
-
return /* @__PURE__ */
|
|
7577
|
+
return /* @__PURE__ */ jsx27(
|
|
7358
7578
|
MenubarPrimitive.SubContent,
|
|
7359
7579
|
__spreadValues({
|
|
7360
7580
|
ref,
|
|
@@ -7366,10 +7586,10 @@ var MenubarSubContent = React50.forwardRef((_a, ref) => {
|
|
|
7366
7586
|
);
|
|
7367
7587
|
});
|
|
7368
7588
|
MenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName;
|
|
7369
|
-
var MenubarContent =
|
|
7589
|
+
var MenubarContent = React51.forwardRef(
|
|
7370
7590
|
(_a, ref) => {
|
|
7371
7591
|
var _b = _a, { className, align = "start", alignOffset = -4, sideOffset = 8 } = _b, props = __objRest(_b, ["className", "align", "alignOffset", "sideOffset"]);
|
|
7372
|
-
return /* @__PURE__ */
|
|
7592
|
+
return /* @__PURE__ */ jsx27(MenubarPrimitive.Portal, { children: /* @__PURE__ */ jsx27(
|
|
7373
7593
|
MenubarPrimitive.Content,
|
|
7374
7594
|
__spreadValues({
|
|
7375
7595
|
ref,
|
|
@@ -7385,9 +7605,9 @@ var MenubarContent = React50.forwardRef(
|
|
|
7385
7605
|
}
|
|
7386
7606
|
);
|
|
7387
7607
|
MenubarContent.displayName = MenubarPrimitive.Content.displayName;
|
|
7388
|
-
var MenubarItem =
|
|
7608
|
+
var MenubarItem = React51.forwardRef((_a, ref) => {
|
|
7389
7609
|
var _b = _a, { className, inset } = _b, props = __objRest(_b, ["className", "inset"]);
|
|
7390
|
-
return /* @__PURE__ */
|
|
7610
|
+
return /* @__PURE__ */ jsx27(
|
|
7391
7611
|
MenubarPrimitive.Item,
|
|
7392
7612
|
__spreadValues({
|
|
7393
7613
|
ref,
|
|
@@ -7400,9 +7620,9 @@ var MenubarItem = React50.forwardRef((_a, ref) => {
|
|
|
7400
7620
|
);
|
|
7401
7621
|
});
|
|
7402
7622
|
MenubarItem.displayName = MenubarPrimitive.Item.displayName;
|
|
7403
|
-
var MenubarCheckboxItem =
|
|
7623
|
+
var MenubarCheckboxItem = React51.forwardRef((_a, ref) => {
|
|
7404
7624
|
var _b = _a, { className, children, checked } = _b, props = __objRest(_b, ["className", "children", "checked"]);
|
|
7405
|
-
return /* @__PURE__ */
|
|
7625
|
+
return /* @__PURE__ */ jsxs17(
|
|
7406
7626
|
MenubarPrimitive.CheckboxItem,
|
|
7407
7627
|
__spreadProps(__spreadValues({
|
|
7408
7628
|
ref,
|
|
@@ -7413,16 +7633,16 @@ var MenubarCheckboxItem = React50.forwardRef((_a, ref) => {
|
|
|
7413
7633
|
checked
|
|
7414
7634
|
}, props), {
|
|
7415
7635
|
children: [
|
|
7416
|
-
/* @__PURE__ */
|
|
7636
|
+
/* @__PURE__ */ jsx27("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx27(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx27(CheckIcon5, { className: "h-4 w-4" }) }) }),
|
|
7417
7637
|
children
|
|
7418
7638
|
]
|
|
7419
7639
|
})
|
|
7420
7640
|
);
|
|
7421
7641
|
});
|
|
7422
7642
|
MenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName;
|
|
7423
|
-
var MenubarRadioItem =
|
|
7643
|
+
var MenubarRadioItem = React51.forwardRef((_a, ref) => {
|
|
7424
7644
|
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
7425
|
-
return /* @__PURE__ */
|
|
7645
|
+
return /* @__PURE__ */ jsxs17(
|
|
7426
7646
|
MenubarPrimitive.RadioItem,
|
|
7427
7647
|
__spreadProps(__spreadValues({
|
|
7428
7648
|
ref,
|
|
@@ -7432,16 +7652,16 @@ var MenubarRadioItem = React50.forwardRef((_a, ref) => {
|
|
|
7432
7652
|
)
|
|
7433
7653
|
}, props), {
|
|
7434
7654
|
children: [
|
|
7435
|
-
/* @__PURE__ */
|
|
7655
|
+
/* @__PURE__ */ jsx27("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx27(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx27(DotFilledIcon3, { className: "h-4 w-4 fill-current" }) }) }),
|
|
7436
7656
|
children
|
|
7437
7657
|
]
|
|
7438
7658
|
})
|
|
7439
7659
|
);
|
|
7440
7660
|
});
|
|
7441
7661
|
MenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName;
|
|
7442
|
-
var MenubarLabel =
|
|
7662
|
+
var MenubarLabel = React51.forwardRef((_a, ref) => {
|
|
7443
7663
|
var _b = _a, { className, inset } = _b, props = __objRest(_b, ["className", "inset"]);
|
|
7444
|
-
return /* @__PURE__ */
|
|
7664
|
+
return /* @__PURE__ */ jsx27(
|
|
7445
7665
|
MenubarPrimitive.Label,
|
|
7446
7666
|
__spreadValues({
|
|
7447
7667
|
ref,
|
|
@@ -7454,9 +7674,9 @@ var MenubarLabel = React50.forwardRef((_a, ref) => {
|
|
|
7454
7674
|
);
|
|
7455
7675
|
});
|
|
7456
7676
|
MenubarLabel.displayName = MenubarPrimitive.Label.displayName;
|
|
7457
|
-
var MenubarSeparator =
|
|
7677
|
+
var MenubarSeparator = React51.forwardRef((_a, ref) => {
|
|
7458
7678
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
7459
|
-
return /* @__PURE__ */
|
|
7679
|
+
return /* @__PURE__ */ jsx27(
|
|
7460
7680
|
MenubarPrimitive.Separator,
|
|
7461
7681
|
__spreadValues({
|
|
7462
7682
|
ref,
|
|
@@ -7471,7 +7691,7 @@ var MenubarShortcut = (_a) => {
|
|
|
7471
7691
|
} = _b, props = __objRest(_b, [
|
|
7472
7692
|
"className"
|
|
7473
7693
|
]);
|
|
7474
|
-
return /* @__PURE__ */
|
|
7694
|
+
return /* @__PURE__ */ jsx27(
|
|
7475
7695
|
"span",
|
|
7476
7696
|
__spreadValues({
|
|
7477
7697
|
className: cn(
|
|
@@ -7484,7 +7704,7 @@ var MenubarShortcut = (_a) => {
|
|
|
7484
7704
|
MenubarShortcut.displayname = "MenubarShortcut";
|
|
7485
7705
|
|
|
7486
7706
|
// src/components/modal.tsx
|
|
7487
|
-
import { jsx as
|
|
7707
|
+
import { jsx as jsx28, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
7488
7708
|
var Modal = ({
|
|
7489
7709
|
title,
|
|
7490
7710
|
description,
|
|
@@ -7498,12 +7718,12 @@ var Modal = ({
|
|
|
7498
7718
|
onClose();
|
|
7499
7719
|
}
|
|
7500
7720
|
};
|
|
7501
|
-
return /* @__PURE__ */
|
|
7502
|
-
/* @__PURE__ */
|
|
7503
|
-
/* @__PURE__ */
|
|
7504
|
-
/* @__PURE__ */
|
|
7721
|
+
return /* @__PURE__ */ jsx28(Dialog, { open: isOpen, onOpenChange: onChange, children: /* @__PURE__ */ jsxs18(DialogContent, { className, children: [
|
|
7722
|
+
/* @__PURE__ */ jsxs18(DialogHeader, { children: [
|
|
7723
|
+
/* @__PURE__ */ jsx28(DialogTitle, { children: title }),
|
|
7724
|
+
/* @__PURE__ */ jsx28(DialogDescription, { children: description })
|
|
7505
7725
|
] }),
|
|
7506
|
-
/* @__PURE__ */
|
|
7726
|
+
/* @__PURE__ */ jsx28("div", { children })
|
|
7507
7727
|
] }) });
|
|
7508
7728
|
};
|
|
7509
7729
|
|
|
@@ -7511,11 +7731,11 @@ var Modal = ({
|
|
|
7511
7731
|
import { ChevronDownIcon as ChevronDownIcon3 } from "@radix-ui/react-icons";
|
|
7512
7732
|
import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
|
|
7513
7733
|
import { cva as cva6 } from "class-variance-authority";
|
|
7514
|
-
import * as
|
|
7515
|
-
import { jsx as
|
|
7516
|
-
var NavigationMenu =
|
|
7734
|
+
import * as React52 from "react";
|
|
7735
|
+
import { jsx as jsx29, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
7736
|
+
var NavigationMenu = React52.forwardRef((_a, ref) => {
|
|
7517
7737
|
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
7518
|
-
return /* @__PURE__ */
|
|
7738
|
+
return /* @__PURE__ */ jsxs19(
|
|
7519
7739
|
NavigationMenuPrimitive.Root,
|
|
7520
7740
|
__spreadProps(__spreadValues({
|
|
7521
7741
|
ref,
|
|
@@ -7526,15 +7746,15 @@ var NavigationMenu = React51.forwardRef((_a, ref) => {
|
|
|
7526
7746
|
}, props), {
|
|
7527
7747
|
children: [
|
|
7528
7748
|
children,
|
|
7529
|
-
/* @__PURE__ */
|
|
7749
|
+
/* @__PURE__ */ jsx29(NavigationMenuViewport, {})
|
|
7530
7750
|
]
|
|
7531
7751
|
})
|
|
7532
7752
|
);
|
|
7533
7753
|
});
|
|
7534
7754
|
NavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName;
|
|
7535
|
-
var NavigationMenuList =
|
|
7755
|
+
var NavigationMenuList = React52.forwardRef((_a, ref) => {
|
|
7536
7756
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
7537
|
-
return /* @__PURE__ */
|
|
7757
|
+
return /* @__PURE__ */ jsx29(
|
|
7538
7758
|
NavigationMenuPrimitive.List,
|
|
7539
7759
|
__spreadValues({
|
|
7540
7760
|
ref,
|
|
@@ -7550,9 +7770,9 @@ var NavigationMenuItem = NavigationMenuPrimitive.Item;
|
|
|
7550
7770
|
var navigationMenuTriggerStyle = cva6(
|
|
7551
7771
|
"group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50"
|
|
7552
7772
|
);
|
|
7553
|
-
var NavigationMenuTrigger =
|
|
7773
|
+
var NavigationMenuTrigger = React52.forwardRef((_a, ref) => {
|
|
7554
7774
|
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
7555
|
-
return /* @__PURE__ */
|
|
7775
|
+
return /* @__PURE__ */ jsxs19(
|
|
7556
7776
|
NavigationMenuPrimitive.Trigger,
|
|
7557
7777
|
__spreadProps(__spreadValues({
|
|
7558
7778
|
ref,
|
|
@@ -7561,7 +7781,7 @@ var NavigationMenuTrigger = React51.forwardRef((_a, ref) => {
|
|
|
7561
7781
|
children: [
|
|
7562
7782
|
children,
|
|
7563
7783
|
" ",
|
|
7564
|
-
/* @__PURE__ */
|
|
7784
|
+
/* @__PURE__ */ jsx29(
|
|
7565
7785
|
ChevronDownIcon3,
|
|
7566
7786
|
{
|
|
7567
7787
|
className: "relative top-[1px] ml-1 h-3 w-3 transition duration-300 group-data-[state=open]:rotate-180",
|
|
@@ -7573,9 +7793,9 @@ var NavigationMenuTrigger = React51.forwardRef((_a, ref) => {
|
|
|
7573
7793
|
);
|
|
7574
7794
|
});
|
|
7575
7795
|
NavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName;
|
|
7576
|
-
var NavigationMenuContent =
|
|
7796
|
+
var NavigationMenuContent = React52.forwardRef((_a, ref) => {
|
|
7577
7797
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
7578
|
-
return /* @__PURE__ */
|
|
7798
|
+
return /* @__PURE__ */ jsx29(
|
|
7579
7799
|
NavigationMenuPrimitive.Content,
|
|
7580
7800
|
__spreadValues({
|
|
7581
7801
|
ref,
|
|
@@ -7588,9 +7808,9 @@ var NavigationMenuContent = React51.forwardRef((_a, ref) => {
|
|
|
7588
7808
|
});
|
|
7589
7809
|
NavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName;
|
|
7590
7810
|
var NavigationMenuLink = NavigationMenuPrimitive.Link;
|
|
7591
|
-
var NavigationMenuViewport =
|
|
7811
|
+
var NavigationMenuViewport = React52.forwardRef((_a, ref) => {
|
|
7592
7812
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
7593
|
-
return /* @__PURE__ */
|
|
7813
|
+
return /* @__PURE__ */ jsx29("div", { className: cn("absolute left-0 top-full flex justify-center"), children: /* @__PURE__ */ jsx29(
|
|
7594
7814
|
NavigationMenuPrimitive.Viewport,
|
|
7595
7815
|
__spreadValues({
|
|
7596
7816
|
className: cn(
|
|
@@ -7602,9 +7822,9 @@ var NavigationMenuViewport = React51.forwardRef((_a, ref) => {
|
|
|
7602
7822
|
) });
|
|
7603
7823
|
});
|
|
7604
7824
|
NavigationMenuViewport.displayName = NavigationMenuPrimitive.Viewport.displayName;
|
|
7605
|
-
var NavigationMenuIndicator =
|
|
7825
|
+
var NavigationMenuIndicator = React52.forwardRef((_a, ref) => {
|
|
7606
7826
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
7607
|
-
return /* @__PURE__ */
|
|
7827
|
+
return /* @__PURE__ */ jsx29(
|
|
7608
7828
|
NavigationMenuPrimitive.Indicator,
|
|
7609
7829
|
__spreadProps(__spreadValues({
|
|
7610
7830
|
ref,
|
|
@@ -7613,7 +7833,7 @@ var NavigationMenuIndicator = React51.forwardRef((_a, ref) => {
|
|
|
7613
7833
|
className
|
|
7614
7834
|
)
|
|
7615
7835
|
}, props), {
|
|
7616
|
-
children: /* @__PURE__ */
|
|
7836
|
+
children: /* @__PURE__ */ jsx29("div", { className: "relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" })
|
|
7617
7837
|
})
|
|
7618
7838
|
);
|
|
7619
7839
|
});
|
|
@@ -7625,12 +7845,12 @@ import {
|
|
|
7625
7845
|
ChevronRightIcon as ChevronRightIcon5,
|
|
7626
7846
|
DotsHorizontalIcon as DotsHorizontalIcon2
|
|
7627
7847
|
} from "@radix-ui/react-icons";
|
|
7628
|
-
import * as
|
|
7848
|
+
import * as React53 from "react";
|
|
7629
7849
|
import { ChevronLeft as ChevronLeft2, ChevronRight as ChevronRight2 } from "lucide-react";
|
|
7630
|
-
import { jsx as
|
|
7850
|
+
import { jsx as jsx30, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
7631
7851
|
var Pagination = (_a) => {
|
|
7632
7852
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
7633
|
-
return /* @__PURE__ */
|
|
7853
|
+
return /* @__PURE__ */ jsx30(
|
|
7634
7854
|
"nav",
|
|
7635
7855
|
__spreadValues({
|
|
7636
7856
|
role: "navigation",
|
|
@@ -7640,9 +7860,9 @@ var Pagination = (_a) => {
|
|
|
7640
7860
|
);
|
|
7641
7861
|
};
|
|
7642
7862
|
Pagination.displayName = "Pagination";
|
|
7643
|
-
var PaginationContent =
|
|
7863
|
+
var PaginationContent = React53.forwardRef((_a, ref) => {
|
|
7644
7864
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
7645
|
-
return /* @__PURE__ */
|
|
7865
|
+
return /* @__PURE__ */ jsx30(
|
|
7646
7866
|
"ul",
|
|
7647
7867
|
__spreadValues({
|
|
7648
7868
|
ref,
|
|
@@ -7651,9 +7871,9 @@ var PaginationContent = React52.forwardRef((_a, ref) => {
|
|
|
7651
7871
|
);
|
|
7652
7872
|
});
|
|
7653
7873
|
PaginationContent.displayName = "PaginationContent";
|
|
7654
|
-
var PaginationItem =
|
|
7874
|
+
var PaginationItem = React53.forwardRef((_a, ref) => {
|
|
7655
7875
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
7656
|
-
return /* @__PURE__ */
|
|
7876
|
+
return /* @__PURE__ */ jsx30("li", __spreadValues({ ref, className: cn("", className) }, props));
|
|
7657
7877
|
});
|
|
7658
7878
|
PaginationItem.displayName = "PaginationItem";
|
|
7659
7879
|
var PaginationLink = (_a) => {
|
|
@@ -7666,7 +7886,7 @@ var PaginationLink = (_a) => {
|
|
|
7666
7886
|
"isActive",
|
|
7667
7887
|
"size"
|
|
7668
7888
|
]);
|
|
7669
|
-
return /* @__PURE__ */
|
|
7889
|
+
return /* @__PURE__ */ jsx30(
|
|
7670
7890
|
"a",
|
|
7671
7891
|
__spreadValues({
|
|
7672
7892
|
"aria-current": isActive ? "page" : void 0,
|
|
@@ -7687,7 +7907,7 @@ var PaginationPreviousLast = (_a) => {
|
|
|
7687
7907
|
} = _b, props = __objRest(_b, [
|
|
7688
7908
|
"className"
|
|
7689
7909
|
]);
|
|
7690
|
-
return /* @__PURE__ */
|
|
7910
|
+
return /* @__PURE__ */ jsxs20(
|
|
7691
7911
|
PaginationLink,
|
|
7692
7912
|
__spreadProps(__spreadValues({
|
|
7693
7913
|
"aria-label": "Go to previous page",
|
|
@@ -7695,8 +7915,8 @@ var PaginationPreviousLast = (_a) => {
|
|
|
7695
7915
|
className: cn("gap-1 pl-2.5", className)
|
|
7696
7916
|
}, props), {
|
|
7697
7917
|
children: [
|
|
7698
|
-
/* @__PURE__ */
|
|
7699
|
-
/* @__PURE__ */
|
|
7918
|
+
/* @__PURE__ */ jsx30(ChevronLeft2, { className: "h-4 w-4" }),
|
|
7919
|
+
/* @__PURE__ */ jsx30("span", { className: "sr-only", children: "Previous Last" })
|
|
7700
7920
|
]
|
|
7701
7921
|
})
|
|
7702
7922
|
);
|
|
@@ -7708,7 +7928,7 @@ var PaginationPrevious = (_a) => {
|
|
|
7708
7928
|
} = _b, props = __objRest(_b, [
|
|
7709
7929
|
"className"
|
|
7710
7930
|
]);
|
|
7711
|
-
return /* @__PURE__ */
|
|
7931
|
+
return /* @__PURE__ */ jsxs20(
|
|
7712
7932
|
PaginationLink,
|
|
7713
7933
|
__spreadProps(__spreadValues({
|
|
7714
7934
|
"aria-label": "Go to previous page",
|
|
@@ -7716,8 +7936,8 @@ var PaginationPrevious = (_a) => {
|
|
|
7716
7936
|
className: cn("gap-1 pl-2.5", className)
|
|
7717
7937
|
}, props), {
|
|
7718
7938
|
children: [
|
|
7719
|
-
/* @__PURE__ */
|
|
7720
|
-
/* @__PURE__ */
|
|
7939
|
+
/* @__PURE__ */ jsx30(ChevronLeftIcon, { className: "h-4 w-4" }),
|
|
7940
|
+
/* @__PURE__ */ jsx30("span", { children: "Previous" })
|
|
7721
7941
|
]
|
|
7722
7942
|
})
|
|
7723
7943
|
);
|
|
@@ -7729,7 +7949,7 @@ var PaginationNext = (_a) => {
|
|
|
7729
7949
|
} = _b, props = __objRest(_b, [
|
|
7730
7950
|
"className"
|
|
7731
7951
|
]);
|
|
7732
|
-
return /* @__PURE__ */
|
|
7952
|
+
return /* @__PURE__ */ jsxs20(
|
|
7733
7953
|
PaginationLink,
|
|
7734
7954
|
__spreadProps(__spreadValues({
|
|
7735
7955
|
"aria-label": "Go to next page",
|
|
@@ -7737,8 +7957,8 @@ var PaginationNext = (_a) => {
|
|
|
7737
7957
|
className: cn("gap-1 pr-2.5", className)
|
|
7738
7958
|
}, props), {
|
|
7739
7959
|
children: [
|
|
7740
|
-
/* @__PURE__ */
|
|
7741
|
-
/* @__PURE__ */
|
|
7960
|
+
/* @__PURE__ */ jsx30("span", { children: "Next" }),
|
|
7961
|
+
/* @__PURE__ */ jsx30(ChevronRightIcon5, { className: "h-4 w-4" })
|
|
7742
7962
|
]
|
|
7743
7963
|
})
|
|
7744
7964
|
);
|
|
@@ -7750,7 +7970,7 @@ var PaginationNextLast = (_a) => {
|
|
|
7750
7970
|
} = _b, props = __objRest(_b, [
|
|
7751
7971
|
"className"
|
|
7752
7972
|
]);
|
|
7753
|
-
return /* @__PURE__ */
|
|
7973
|
+
return /* @__PURE__ */ jsxs20(
|
|
7754
7974
|
PaginationLink,
|
|
7755
7975
|
__spreadProps(__spreadValues({
|
|
7756
7976
|
"aria-label": "Go to next page",
|
|
@@ -7758,8 +7978,8 @@ var PaginationNextLast = (_a) => {
|
|
|
7758
7978
|
className: cn("gap-1 pr-2.5", className)
|
|
7759
7979
|
}, props), {
|
|
7760
7980
|
children: [
|
|
7761
|
-
/* @__PURE__ */
|
|
7762
|
-
/* @__PURE__ */
|
|
7981
|
+
/* @__PURE__ */ jsx30("span", { className: "sr-only", children: "Next Last" }),
|
|
7982
|
+
/* @__PURE__ */ jsx30(ChevronRight2, { className: "h-4 w-4" })
|
|
7763
7983
|
]
|
|
7764
7984
|
})
|
|
7765
7985
|
);
|
|
@@ -7771,15 +7991,15 @@ var PaginationEllipsis = (_a) => {
|
|
|
7771
7991
|
} = _b, props = __objRest(_b, [
|
|
7772
7992
|
"className"
|
|
7773
7993
|
]);
|
|
7774
|
-
return /* @__PURE__ */
|
|
7994
|
+
return /* @__PURE__ */ jsxs20(
|
|
7775
7995
|
"span",
|
|
7776
7996
|
__spreadProps(__spreadValues({
|
|
7777
7997
|
"aria-hidden": true,
|
|
7778
7998
|
className: cn("flex h-9 w-9 items-center justify-center", className)
|
|
7779
7999
|
}, props), {
|
|
7780
8000
|
children: [
|
|
7781
|
-
/* @__PURE__ */
|
|
7782
|
-
/* @__PURE__ */
|
|
8001
|
+
/* @__PURE__ */ jsx30(DotsHorizontalIcon2, { className: "h-4 w-4" }),
|
|
8002
|
+
/* @__PURE__ */ jsx30("span", { className: "sr-only", children: "More pages" })
|
|
7783
8003
|
]
|
|
7784
8004
|
})
|
|
7785
8005
|
);
|
|
@@ -7788,14 +8008,14 @@ PaginationEllipsis.displayName = "PaginationEllipsis";
|
|
|
7788
8008
|
|
|
7789
8009
|
// src/components/popover.tsx
|
|
7790
8010
|
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
7791
|
-
import * as
|
|
7792
|
-
import { jsx as
|
|
8011
|
+
import * as React54 from "react";
|
|
8012
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
7793
8013
|
var Popover = PopoverPrimitive.Root;
|
|
7794
8014
|
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
7795
8015
|
var PopoverAnchor = PopoverPrimitive.Anchor;
|
|
7796
|
-
var PopoverContent =
|
|
8016
|
+
var PopoverContent = React54.forwardRef((_a, ref) => {
|
|
7797
8017
|
var _b = _a, { className, align = "center", sideOffset = 4 } = _b, props = __objRest(_b, ["className", "align", "sideOffset"]);
|
|
7798
|
-
return /* @__PURE__ */
|
|
8018
|
+
return /* @__PURE__ */ jsx31(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx31(
|
|
7799
8019
|
PopoverPrimitive.Content,
|
|
7800
8020
|
__spreadValues({
|
|
7801
8021
|
ref,
|
|
@@ -7812,11 +8032,11 @@ PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
|
7812
8032
|
|
|
7813
8033
|
// src/components/progress.tsx
|
|
7814
8034
|
import * as ProgressPrimitive from "@radix-ui/react-progress";
|
|
7815
|
-
import * as
|
|
7816
|
-
import { jsx as
|
|
7817
|
-
var Progress =
|
|
8035
|
+
import * as React55 from "react";
|
|
8036
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
8037
|
+
var Progress = React55.forwardRef((_a, ref) => {
|
|
7818
8038
|
var _b = _a, { className, value } = _b, props = __objRest(_b, ["className", "value"]);
|
|
7819
|
-
return /* @__PURE__ */
|
|
8039
|
+
return /* @__PURE__ */ jsx32(
|
|
7820
8040
|
ProgressPrimitive.Root,
|
|
7821
8041
|
__spreadProps(__spreadValues({
|
|
7822
8042
|
ref,
|
|
@@ -7825,7 +8045,7 @@ var Progress = React54.forwardRef((_a, ref) => {
|
|
|
7825
8045
|
className
|
|
7826
8046
|
)
|
|
7827
8047
|
}, props), {
|
|
7828
|
-
children: /* @__PURE__ */
|
|
8048
|
+
children: /* @__PURE__ */ jsx32(
|
|
7829
8049
|
ProgressPrimitive.Indicator,
|
|
7830
8050
|
{
|
|
7831
8051
|
className: "h-full w-full flex-1 bg-primary transition-all",
|
|
@@ -7840,11 +8060,11 @@ Progress.displayName = ProgressPrimitive.Root.displayName;
|
|
|
7840
8060
|
// src/components/radio-group.tsx
|
|
7841
8061
|
import { CheckIcon as CheckIcon6 } from "@radix-ui/react-icons";
|
|
7842
8062
|
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
7843
|
-
import * as
|
|
7844
|
-
import { jsx as
|
|
7845
|
-
var RadioGroup4 =
|
|
8063
|
+
import * as React56 from "react";
|
|
8064
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
8065
|
+
var RadioGroup4 = React56.forwardRef((_a, ref) => {
|
|
7846
8066
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
7847
|
-
return /* @__PURE__ */
|
|
8067
|
+
return /* @__PURE__ */ jsx33(
|
|
7848
8068
|
RadioGroupPrimitive.Root,
|
|
7849
8069
|
__spreadProps(__spreadValues({
|
|
7850
8070
|
className: cn("grid gap-2", className)
|
|
@@ -7854,9 +8074,9 @@ var RadioGroup4 = React55.forwardRef((_a, ref) => {
|
|
|
7854
8074
|
);
|
|
7855
8075
|
});
|
|
7856
8076
|
RadioGroup4.displayName = RadioGroupPrimitive.Root.displayName;
|
|
7857
|
-
var RadioGroupItem =
|
|
8077
|
+
var RadioGroupItem = React56.forwardRef((_a, ref) => {
|
|
7858
8078
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
7859
|
-
return /* @__PURE__ */
|
|
8079
|
+
return /* @__PURE__ */ jsx33(
|
|
7860
8080
|
RadioGroupPrimitive.Item,
|
|
7861
8081
|
__spreadProps(__spreadValues({
|
|
7862
8082
|
ref,
|
|
@@ -7865,7 +8085,7 @@ var RadioGroupItem = React55.forwardRef((_a, ref) => {
|
|
|
7865
8085
|
className
|
|
7866
8086
|
)
|
|
7867
8087
|
}, props), {
|
|
7868
|
-
children: /* @__PURE__ */
|
|
8088
|
+
children: /* @__PURE__ */ jsx33(RadioGroupPrimitive.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx33(CheckIcon6, { className: "h-3.5 w-3.5 fill-primary" }) })
|
|
7869
8089
|
})
|
|
7870
8090
|
);
|
|
7871
8091
|
});
|
|
@@ -7874,14 +8094,14 @@ RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
|
|
|
7874
8094
|
// src/components/resizable.tsx
|
|
7875
8095
|
import { DragHandleDots2Icon } from "@radix-ui/react-icons";
|
|
7876
8096
|
import * as ResizablePrimitive from "react-resizable-panels";
|
|
7877
|
-
import { jsx as
|
|
8097
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
7878
8098
|
var ResizablePanelGroup = (_a) => {
|
|
7879
8099
|
var _b = _a, {
|
|
7880
8100
|
className
|
|
7881
8101
|
} = _b, props = __objRest(_b, [
|
|
7882
8102
|
"className"
|
|
7883
8103
|
]);
|
|
7884
|
-
return /* @__PURE__ */
|
|
8104
|
+
return /* @__PURE__ */ jsx34(
|
|
7885
8105
|
ResizablePrimitive.Group,
|
|
7886
8106
|
__spreadValues({
|
|
7887
8107
|
className: cn("flex h-full w-full aria-[orientation=vertical]:flex-col", className)
|
|
@@ -7897,7 +8117,7 @@ var ResizableHandle = (_a) => {
|
|
|
7897
8117
|
"withHandle",
|
|
7898
8118
|
"className"
|
|
7899
8119
|
]);
|
|
7900
|
-
return /* @__PURE__ */
|
|
8120
|
+
return /* @__PURE__ */ jsx34(
|
|
7901
8121
|
ResizablePrimitive.Separator,
|
|
7902
8122
|
__spreadProps(__spreadValues({
|
|
7903
8123
|
className: cn(
|
|
@@ -7905,35 +8125,35 @@ var ResizableHandle = (_a) => {
|
|
|
7905
8125
|
className
|
|
7906
8126
|
)
|
|
7907
8127
|
}, props), {
|
|
7908
|
-
children: withHandle && /* @__PURE__ */
|
|
8128
|
+
children: withHandle && /* @__PURE__ */ jsx34("div", { className: "z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border", children: /* @__PURE__ */ jsx34(DragHandleDots2Icon, { className: "h-2.5 w-2.5" }) })
|
|
7909
8129
|
})
|
|
7910
8130
|
);
|
|
7911
8131
|
};
|
|
7912
8132
|
|
|
7913
8133
|
// src/components/scroll-area.tsx
|
|
7914
8134
|
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
|
7915
|
-
import * as
|
|
7916
|
-
import { jsx as
|
|
7917
|
-
var ScrollArea =
|
|
8135
|
+
import * as React57 from "react";
|
|
8136
|
+
import { jsx as jsx35, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
8137
|
+
var ScrollArea = React57.forwardRef((_a, ref) => {
|
|
7918
8138
|
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
7919
|
-
return /* @__PURE__ */
|
|
8139
|
+
return /* @__PURE__ */ jsxs21(
|
|
7920
8140
|
ScrollAreaPrimitive.Root,
|
|
7921
8141
|
__spreadProps(__spreadValues({
|
|
7922
8142
|
ref,
|
|
7923
8143
|
className: cn("relative overflow-hidden", className)
|
|
7924
8144
|
}, props), {
|
|
7925
8145
|
children: [
|
|
7926
|
-
/* @__PURE__ */
|
|
7927
|
-
/* @__PURE__ */
|
|
7928
|
-
/* @__PURE__ */
|
|
8146
|
+
/* @__PURE__ */ jsx35(ScrollAreaPrimitive.Viewport, { className: "h-full w-full rounded-[inherit]", children }),
|
|
8147
|
+
/* @__PURE__ */ jsx35(ScrollBar, {}),
|
|
8148
|
+
/* @__PURE__ */ jsx35(ScrollAreaPrimitive.Corner, {})
|
|
7929
8149
|
]
|
|
7930
8150
|
})
|
|
7931
8151
|
);
|
|
7932
8152
|
});
|
|
7933
8153
|
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
|
|
7934
|
-
var ScrollBar =
|
|
8154
|
+
var ScrollBar = React57.forwardRef((_a, ref) => {
|
|
7935
8155
|
var _b = _a, { className, orientation = "vertical" } = _b, props = __objRest(_b, ["className", "orientation"]);
|
|
7936
|
-
return /* @__PURE__ */
|
|
8156
|
+
return /* @__PURE__ */ jsx35(
|
|
7937
8157
|
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
7938
8158
|
__spreadProps(__spreadValues({
|
|
7939
8159
|
ref,
|
|
@@ -7945,16 +8165,16 @@ var ScrollBar = React56.forwardRef((_a, ref) => {
|
|
|
7945
8165
|
className
|
|
7946
8166
|
)
|
|
7947
8167
|
}, props), {
|
|
7948
|
-
children: /* @__PURE__ */
|
|
8168
|
+
children: /* @__PURE__ */ jsx35(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
|
|
7949
8169
|
})
|
|
7950
8170
|
);
|
|
7951
8171
|
});
|
|
7952
8172
|
ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
|
|
7953
8173
|
|
|
7954
8174
|
// src/components/search-input.tsx
|
|
7955
|
-
import
|
|
8175
|
+
import React58 from "react";
|
|
7956
8176
|
import { useDebouncedCallback } from "use-debounce";
|
|
7957
|
-
import { jsx as
|
|
8177
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
7958
8178
|
function SearchInput({
|
|
7959
8179
|
value = "",
|
|
7960
8180
|
placeholder,
|
|
@@ -7963,11 +8183,11 @@ function SearchInput({
|
|
|
7963
8183
|
debounceTime = 750,
|
|
7964
8184
|
onSearch
|
|
7965
8185
|
}) {
|
|
7966
|
-
const [searchTerm, setSearchTerm] =
|
|
8186
|
+
const [searchTerm, setSearchTerm] = React58.useState(value != null ? value : "");
|
|
7967
8187
|
const debouncedSearch = useDebouncedCallback((nextValue) => {
|
|
7968
8188
|
onSearch(nextValue);
|
|
7969
8189
|
}, debounceTime);
|
|
7970
|
-
|
|
8190
|
+
React58.useEffect(() => {
|
|
7971
8191
|
setSearchTerm(value != null ? value : "");
|
|
7972
8192
|
}, [value]);
|
|
7973
8193
|
const handleChange = (event) => {
|
|
@@ -7975,7 +8195,7 @@ function SearchInput({
|
|
|
7975
8195
|
setSearchTerm(nextValue);
|
|
7976
8196
|
debouncedSearch(nextValue);
|
|
7977
8197
|
};
|
|
7978
|
-
return /* @__PURE__ */
|
|
8198
|
+
return /* @__PURE__ */ jsx36(
|
|
7979
8199
|
Input,
|
|
7980
8200
|
{
|
|
7981
8201
|
placeholder: placeholder || "Search...",
|
|
@@ -7988,10 +8208,10 @@ function SearchInput({
|
|
|
7988
8208
|
}
|
|
7989
8209
|
|
|
7990
8210
|
// src/components/searchable-select.tsx
|
|
7991
|
-
import * as
|
|
8211
|
+
import * as React59 from "react";
|
|
7992
8212
|
import * as SelectPrimitive2 from "@radix-ui/react-select";
|
|
7993
8213
|
import { CaretSortIcon as CaretSortIcon2, CheckIcon as CheckIcon7, Cross2Icon as Cross2Icon2 } from "@radix-ui/react-icons";
|
|
7994
|
-
import { jsx as
|
|
8214
|
+
import { jsx as jsx37, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
7995
8215
|
function normalizeText(value) {
|
|
7996
8216
|
return String(value != null ? value : "").normalize("NFD").replace(new RegExp("\\p{Diacritic}", "gu"), "").toLowerCase();
|
|
7997
8217
|
}
|
|
@@ -8021,10 +8241,10 @@ function SearchableSelect(_a) {
|
|
|
8021
8241
|
"itemClassName",
|
|
8022
8242
|
"searchInputClassName"
|
|
8023
8243
|
]);
|
|
8024
|
-
const [open, setOpen] =
|
|
8025
|
-
const [query, setQuery] =
|
|
8026
|
-
const inputRef =
|
|
8027
|
-
const filteredItems =
|
|
8244
|
+
const [open, setOpen] = React59.useState(false);
|
|
8245
|
+
const [query, setQuery] = React59.useState("");
|
|
8246
|
+
const inputRef = React59.useRef(null);
|
|
8247
|
+
const filteredItems = React59.useMemo(() => {
|
|
8028
8248
|
const normalizedQuery = normalizeText(query.trim());
|
|
8029
8249
|
if (!normalizedQuery) return items;
|
|
8030
8250
|
return items.filter((item) => {
|
|
@@ -8035,7 +8255,7 @@ function SearchableSelect(_a) {
|
|
|
8035
8255
|
return haystack.includes(normalizedQuery);
|
|
8036
8256
|
});
|
|
8037
8257
|
}, [items, query]);
|
|
8038
|
-
return /* @__PURE__ */
|
|
8258
|
+
return /* @__PURE__ */ jsxs22(
|
|
8039
8259
|
SelectPrimitive2.Root,
|
|
8040
8260
|
__spreadProps(__spreadValues({
|
|
8041
8261
|
open,
|
|
@@ -8054,7 +8274,7 @@ function SearchableSelect(_a) {
|
|
|
8054
8274
|
}
|
|
8055
8275
|
}, rootProps), {
|
|
8056
8276
|
children: [
|
|
8057
|
-
/* @__PURE__ */
|
|
8277
|
+
/* @__PURE__ */ jsxs22(
|
|
8058
8278
|
SelectPrimitive2.Trigger,
|
|
8059
8279
|
{
|
|
8060
8280
|
className: cn(
|
|
@@ -8062,12 +8282,12 @@ function SearchableSelect(_a) {
|
|
|
8062
8282
|
triggerClassName
|
|
8063
8283
|
),
|
|
8064
8284
|
children: [
|
|
8065
|
-
/* @__PURE__ */
|
|
8066
|
-
/* @__PURE__ */
|
|
8285
|
+
/* @__PURE__ */ jsx37(SelectPrimitive2.Value, { placeholder }),
|
|
8286
|
+
/* @__PURE__ */ jsx37(SelectPrimitive2.Icon, { asChild: true, children: /* @__PURE__ */ jsx37(CaretSortIcon2, { className: "h-4 w-4 opacity-50" }) })
|
|
8067
8287
|
]
|
|
8068
8288
|
}
|
|
8069
8289
|
),
|
|
8070
|
-
/* @__PURE__ */
|
|
8290
|
+
/* @__PURE__ */ jsx37(SelectPrimitive2.Portal, { children: /* @__PURE__ */ jsxs22(
|
|
8071
8291
|
SelectPrimitive2.Content,
|
|
8072
8292
|
{
|
|
8073
8293
|
position: "popper",
|
|
@@ -8083,8 +8303,8 @@ function SearchableSelect(_a) {
|
|
|
8083
8303
|
});
|
|
8084
8304
|
},
|
|
8085
8305
|
children: [
|
|
8086
|
-
/* @__PURE__ */
|
|
8087
|
-
/* @__PURE__ */
|
|
8306
|
+
/* @__PURE__ */ jsx37("div", { className: "border-b border-border bg-popover p-2", children: /* @__PURE__ */ jsxs22("div", { className: "relative", children: [
|
|
8307
|
+
/* @__PURE__ */ jsx37(
|
|
8088
8308
|
"input",
|
|
8089
8309
|
{
|
|
8090
8310
|
ref: inputRef,
|
|
@@ -8100,7 +8320,7 @@ function SearchableSelect(_a) {
|
|
|
8100
8320
|
)
|
|
8101
8321
|
}
|
|
8102
8322
|
),
|
|
8103
|
-
query ? /* @__PURE__ */
|
|
8323
|
+
query ? /* @__PURE__ */ jsx37(
|
|
8104
8324
|
"button",
|
|
8105
8325
|
{
|
|
8106
8326
|
type: "button",
|
|
@@ -8111,11 +8331,11 @@ function SearchableSelect(_a) {
|
|
|
8111
8331
|
(_a2 = inputRef.current) == null ? void 0 : _a2.focus();
|
|
8112
8332
|
},
|
|
8113
8333
|
className: "absolute right-2 top-1/2 -translate-y-1/2 rounded-sm opacity-70 transition hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring/40",
|
|
8114
|
-
children: /* @__PURE__ */
|
|
8334
|
+
children: /* @__PURE__ */ jsx37(Cross2Icon2, { className: "h-3.5 w-3.5" })
|
|
8115
8335
|
}
|
|
8116
8336
|
) : null
|
|
8117
8337
|
] }) }),
|
|
8118
|
-
/* @__PURE__ */
|
|
8338
|
+
/* @__PURE__ */ jsx37(SelectPrimitive2.Viewport, { className: "max-h-80 p-1", children: filteredItems.length === 0 ? /* @__PURE__ */ jsx37("div", { className: "px-3 py-2 text-sm text-muted-foreground", children: emptyText }) : filteredItems.map((item) => /* @__PURE__ */ jsxs22(
|
|
8119
8339
|
SelectPrimitive2.Item,
|
|
8120
8340
|
{
|
|
8121
8341
|
value: item.value,
|
|
@@ -8125,8 +8345,8 @@ function SearchableSelect(_a) {
|
|
|
8125
8345
|
itemClassName
|
|
8126
8346
|
),
|
|
8127
8347
|
children: [
|
|
8128
|
-
/* @__PURE__ */
|
|
8129
|
-
/* @__PURE__ */
|
|
8348
|
+
/* @__PURE__ */ jsx37(SelectPrimitive2.ItemText, { children: item.label }),
|
|
8349
|
+
/* @__PURE__ */ jsx37("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx37(SelectPrimitive2.ItemIndicator, { children: /* @__PURE__ */ jsx37(CheckIcon7, { className: "h-4 w-4" }) }) })
|
|
8130
8350
|
]
|
|
8131
8351
|
},
|
|
8132
8352
|
item.value
|
|
@@ -8141,12 +8361,12 @@ function SearchableSelect(_a) {
|
|
|
8141
8361
|
|
|
8142
8362
|
// src/components/separator.tsx
|
|
8143
8363
|
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
8144
|
-
import * as
|
|
8145
|
-
import { jsx as
|
|
8146
|
-
var Separator6 =
|
|
8364
|
+
import * as React60 from "react";
|
|
8365
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
8366
|
+
var Separator6 = React60.forwardRef(
|
|
8147
8367
|
(_a, ref) => {
|
|
8148
8368
|
var _b = _a, { className, orientation = "horizontal", decorative = true } = _b, props = __objRest(_b, ["className", "orientation", "decorative"]);
|
|
8149
|
-
return /* @__PURE__ */
|
|
8369
|
+
return /* @__PURE__ */ jsx38(
|
|
8150
8370
|
SeparatorPrimitive.Root,
|
|
8151
8371
|
__spreadValues({
|
|
8152
8372
|
ref,
|
|
@@ -8167,15 +8387,15 @@ Separator6.displayName = SeparatorPrimitive.Root.displayName;
|
|
|
8167
8387
|
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
8168
8388
|
import { Cross2Icon as Cross2Icon3 } from "@radix-ui/react-icons";
|
|
8169
8389
|
import { cva as cva7 } from "class-variance-authority";
|
|
8170
|
-
import * as
|
|
8171
|
-
import { jsx as
|
|
8390
|
+
import * as React61 from "react";
|
|
8391
|
+
import { jsx as jsx39, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
8172
8392
|
var Sheet = SheetPrimitive.Root;
|
|
8173
8393
|
var SheetTrigger = SheetPrimitive.Trigger;
|
|
8174
8394
|
var SheetClose = SheetPrimitive.Close;
|
|
8175
8395
|
var SheetPortal = SheetPrimitive.Portal;
|
|
8176
|
-
var SheetOverlay =
|
|
8396
|
+
var SheetOverlay = React61.forwardRef((_a, ref) => {
|
|
8177
8397
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
8178
|
-
return /* @__PURE__ */
|
|
8398
|
+
return /* @__PURE__ */ jsx39(
|
|
8179
8399
|
SheetPrimitive.Overlay,
|
|
8180
8400
|
__spreadProps(__spreadValues({
|
|
8181
8401
|
className: cn(
|
|
@@ -8204,11 +8424,11 @@ var sheetVariants = cva7(
|
|
|
8204
8424
|
}
|
|
8205
8425
|
}
|
|
8206
8426
|
);
|
|
8207
|
-
var SheetContent =
|
|
8427
|
+
var SheetContent = React61.forwardRef((_a, ref) => {
|
|
8208
8428
|
var _b = _a, { side = "right", className, children } = _b, props = __objRest(_b, ["side", "className", "children"]);
|
|
8209
|
-
return /* @__PURE__ */
|
|
8210
|
-
/* @__PURE__ */
|
|
8211
|
-
/* @__PURE__ */
|
|
8429
|
+
return /* @__PURE__ */ jsxs23(SheetPortal, { children: [
|
|
8430
|
+
/* @__PURE__ */ jsx39(SheetOverlay, {}),
|
|
8431
|
+
/* @__PURE__ */ jsxs23(
|
|
8212
8432
|
SheetPrimitive.Content,
|
|
8213
8433
|
__spreadProps(__spreadValues({
|
|
8214
8434
|
ref,
|
|
@@ -8216,9 +8436,9 @@ var SheetContent = React60.forwardRef((_a, ref) => {
|
|
|
8216
8436
|
}, props), {
|
|
8217
8437
|
children: [
|
|
8218
8438
|
children,
|
|
8219
|
-
/* @__PURE__ */
|
|
8220
|
-
/* @__PURE__ */
|
|
8221
|
-
/* @__PURE__ */
|
|
8439
|
+
/* @__PURE__ */ jsxs23(SheetPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
|
|
8440
|
+
/* @__PURE__ */ jsx39(Cross2Icon3, { className: "h-4 w-4" }),
|
|
8441
|
+
/* @__PURE__ */ jsx39("span", { className: "sr-only", children: "Close" })
|
|
8222
8442
|
] })
|
|
8223
8443
|
]
|
|
8224
8444
|
})
|
|
@@ -8232,7 +8452,7 @@ var SheetHeader = (_a) => {
|
|
|
8232
8452
|
} = _b, props = __objRest(_b, [
|
|
8233
8453
|
"className"
|
|
8234
8454
|
]);
|
|
8235
|
-
return /* @__PURE__ */
|
|
8455
|
+
return /* @__PURE__ */ jsx39(
|
|
8236
8456
|
"div",
|
|
8237
8457
|
__spreadValues({
|
|
8238
8458
|
className: cn(
|
|
@@ -8249,7 +8469,7 @@ var SheetFooter = (_a) => {
|
|
|
8249
8469
|
} = _b, props = __objRest(_b, [
|
|
8250
8470
|
"className"
|
|
8251
8471
|
]);
|
|
8252
|
-
return /* @__PURE__ */
|
|
8472
|
+
return /* @__PURE__ */ jsx39(
|
|
8253
8473
|
"div",
|
|
8254
8474
|
__spreadValues({
|
|
8255
8475
|
className: cn(
|
|
@@ -8260,9 +8480,9 @@ var SheetFooter = (_a) => {
|
|
|
8260
8480
|
);
|
|
8261
8481
|
};
|
|
8262
8482
|
SheetFooter.displayName = "SheetFooter";
|
|
8263
|
-
var SheetTitle =
|
|
8483
|
+
var SheetTitle = React61.forwardRef((_a, ref) => {
|
|
8264
8484
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
8265
|
-
return /* @__PURE__ */
|
|
8485
|
+
return /* @__PURE__ */ jsx39(
|
|
8266
8486
|
SheetPrimitive.Title,
|
|
8267
8487
|
__spreadValues({
|
|
8268
8488
|
ref,
|
|
@@ -8271,9 +8491,9 @@ var SheetTitle = React60.forwardRef((_a, ref) => {
|
|
|
8271
8491
|
);
|
|
8272
8492
|
});
|
|
8273
8493
|
SheetTitle.displayName = SheetPrimitive.Title.displayName;
|
|
8274
|
-
var SheetDescription =
|
|
8494
|
+
var SheetDescription = React61.forwardRef((_a, ref) => {
|
|
8275
8495
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
8276
|
-
return /* @__PURE__ */
|
|
8496
|
+
return /* @__PURE__ */ jsx39(
|
|
8277
8497
|
SheetPrimitive.Description,
|
|
8278
8498
|
__spreadValues({
|
|
8279
8499
|
ref,
|
|
@@ -8284,14 +8504,14 @@ var SheetDescription = React60.forwardRef((_a, ref) => {
|
|
|
8284
8504
|
SheetDescription.displayName = SheetPrimitive.Description.displayName;
|
|
8285
8505
|
|
|
8286
8506
|
// src/components/skeleton.tsx
|
|
8287
|
-
import { jsx as
|
|
8507
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
8288
8508
|
function Skeleton(_a) {
|
|
8289
8509
|
var _b = _a, {
|
|
8290
8510
|
className
|
|
8291
8511
|
} = _b, props = __objRest(_b, [
|
|
8292
8512
|
"className"
|
|
8293
8513
|
]);
|
|
8294
|
-
return /* @__PURE__ */
|
|
8514
|
+
return /* @__PURE__ */ jsx40(
|
|
8295
8515
|
"div",
|
|
8296
8516
|
__spreadValues({
|
|
8297
8517
|
className: cn("animate-pulse rounded-md bg-primary/10", className)
|
|
@@ -8301,11 +8521,11 @@ function Skeleton(_a) {
|
|
|
8301
8521
|
|
|
8302
8522
|
// src/components/slider.tsx
|
|
8303
8523
|
import * as SliderPrimitive from "@radix-ui/react-slider";
|
|
8304
|
-
import * as
|
|
8305
|
-
import { jsx as
|
|
8306
|
-
var Slider =
|
|
8524
|
+
import * as React62 from "react";
|
|
8525
|
+
import { jsx as jsx41, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
8526
|
+
var Slider = React62.forwardRef((_a, ref) => {
|
|
8307
8527
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
8308
|
-
return /* @__PURE__ */
|
|
8528
|
+
return /* @__PURE__ */ jsxs24(
|
|
8309
8529
|
SliderPrimitive.Root,
|
|
8310
8530
|
__spreadProps(__spreadValues({
|
|
8311
8531
|
ref,
|
|
@@ -8315,8 +8535,8 @@ var Slider = React61.forwardRef((_a, ref) => {
|
|
|
8315
8535
|
)
|
|
8316
8536
|
}, props), {
|
|
8317
8537
|
children: [
|
|
8318
|
-
/* @__PURE__ */
|
|
8319
|
-
/* @__PURE__ */
|
|
8538
|
+
/* @__PURE__ */ jsx41(SliderPrimitive.Track, { className: "relative h-1.5 w-full grow overflow-hidden rounded-full bg-primary/20", children: /* @__PURE__ */ jsx41(SliderPrimitive.Range, { className: "absolute h-full bg-primary" }) }),
|
|
8539
|
+
/* @__PURE__ */ jsx41(SliderPrimitive.Thumb, { className: "block h-4 w-4 rounded-full border border-primary/50 bg-background shadow transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50" })
|
|
8320
8540
|
]
|
|
8321
8541
|
})
|
|
8322
8542
|
);
|
|
@@ -8326,11 +8546,11 @@ Slider.displayName = SliderPrimitive.Root.displayName;
|
|
|
8326
8546
|
// src/components/sonner.tsx
|
|
8327
8547
|
import { useTheme } from "next-themes";
|
|
8328
8548
|
import { Toaster as Sonner } from "sonner";
|
|
8329
|
-
import { jsx as
|
|
8549
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
8330
8550
|
var ToasterSonner = (_a) => {
|
|
8331
8551
|
var props = __objRest(_a, []);
|
|
8332
8552
|
const { theme = "system" } = useTheme();
|
|
8333
|
-
return /* @__PURE__ */
|
|
8553
|
+
return /* @__PURE__ */ jsx42(
|
|
8334
8554
|
Sonner,
|
|
8335
8555
|
__spreadValues({
|
|
8336
8556
|
theme,
|
|
@@ -8349,11 +8569,11 @@ var ToasterSonner = (_a) => {
|
|
|
8349
8569
|
|
|
8350
8570
|
// src/components/switch.tsx
|
|
8351
8571
|
import * as SwitchPrimitives from "@radix-ui/react-switch";
|
|
8352
|
-
import * as
|
|
8353
|
-
import { jsx as
|
|
8354
|
-
var Switch =
|
|
8572
|
+
import * as React63 from "react";
|
|
8573
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
8574
|
+
var Switch = React63.forwardRef((_a, ref) => {
|
|
8355
8575
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
8356
|
-
return /* @__PURE__ */
|
|
8576
|
+
return /* @__PURE__ */ jsx43(
|
|
8357
8577
|
SwitchPrimitives.Root,
|
|
8358
8578
|
__spreadProps(__spreadValues({
|
|
8359
8579
|
className: cn(
|
|
@@ -8362,7 +8582,7 @@ var Switch = React62.forwardRef((_a, ref) => {
|
|
|
8362
8582
|
)
|
|
8363
8583
|
}, props), {
|
|
8364
8584
|
ref,
|
|
8365
|
-
children: /* @__PURE__ */
|
|
8585
|
+
children: /* @__PURE__ */ jsx43(
|
|
8366
8586
|
SwitchPrimitives.Thumb,
|
|
8367
8587
|
{
|
|
8368
8588
|
className: cn(
|
|
@@ -8376,12 +8596,12 @@ var Switch = React62.forwardRef((_a, ref) => {
|
|
|
8376
8596
|
Switch.displayName = SwitchPrimitives.Root.displayName;
|
|
8377
8597
|
|
|
8378
8598
|
// src/components/table.tsx
|
|
8379
|
-
import * as
|
|
8380
|
-
import { jsx as
|
|
8381
|
-
var Table =
|
|
8599
|
+
import * as React64 from "react";
|
|
8600
|
+
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
8601
|
+
var Table = React64.forwardRef(
|
|
8382
8602
|
(_a, ref) => {
|
|
8383
8603
|
var _b = _a, { className, containerClassName } = _b, props = __objRest(_b, ["className", "containerClassName"]);
|
|
8384
|
-
return /* @__PURE__ */
|
|
8604
|
+
return /* @__PURE__ */ jsx44("div", { className: cn("relative w-full overflow-visible", containerClassName), children: /* @__PURE__ */ jsx44(
|
|
8385
8605
|
"table",
|
|
8386
8606
|
__spreadValues({
|
|
8387
8607
|
ref,
|
|
@@ -8391,14 +8611,14 @@ var Table = React63.forwardRef(
|
|
|
8391
8611
|
}
|
|
8392
8612
|
);
|
|
8393
8613
|
Table.displayName = "Table";
|
|
8394
|
-
var TableHeader =
|
|
8614
|
+
var TableHeader = React64.forwardRef((_a, ref) => {
|
|
8395
8615
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
8396
|
-
return /* @__PURE__ */
|
|
8616
|
+
return /* @__PURE__ */ jsx44("thead", __spreadValues({ ref, className: cn("[&_tr]:border-b", className) }, props));
|
|
8397
8617
|
});
|
|
8398
8618
|
TableHeader.displayName = "TableHeader";
|
|
8399
|
-
var TableBody =
|
|
8619
|
+
var TableBody = React64.forwardRef((_a, ref) => {
|
|
8400
8620
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
8401
|
-
return /* @__PURE__ */
|
|
8621
|
+
return /* @__PURE__ */ jsx44(
|
|
8402
8622
|
"tbody",
|
|
8403
8623
|
__spreadValues({
|
|
8404
8624
|
ref,
|
|
@@ -8407,9 +8627,9 @@ var TableBody = React63.forwardRef((_a, ref) => {
|
|
|
8407
8627
|
);
|
|
8408
8628
|
});
|
|
8409
8629
|
TableBody.displayName = "TableBody";
|
|
8410
|
-
var TableFooter =
|
|
8630
|
+
var TableFooter = React64.forwardRef((_a, ref) => {
|
|
8411
8631
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
8412
|
-
return /* @__PURE__ */
|
|
8632
|
+
return /* @__PURE__ */ jsx44(
|
|
8413
8633
|
"tfoot",
|
|
8414
8634
|
__spreadValues({
|
|
8415
8635
|
ref,
|
|
@@ -8421,9 +8641,9 @@ var TableFooter = React63.forwardRef((_a, ref) => {
|
|
|
8421
8641
|
);
|
|
8422
8642
|
});
|
|
8423
8643
|
TableFooter.displayName = "TableFooter";
|
|
8424
|
-
var TableRow =
|
|
8644
|
+
var TableRow = React64.forwardRef((_a, ref) => {
|
|
8425
8645
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
8426
|
-
return /* @__PURE__ */
|
|
8646
|
+
return /* @__PURE__ */ jsx44(
|
|
8427
8647
|
"tr",
|
|
8428
8648
|
__spreadValues({
|
|
8429
8649
|
ref,
|
|
@@ -8435,9 +8655,9 @@ var TableRow = React63.forwardRef((_a, ref) => {
|
|
|
8435
8655
|
);
|
|
8436
8656
|
});
|
|
8437
8657
|
TableRow.displayName = "TableRow";
|
|
8438
|
-
var TableHead =
|
|
8658
|
+
var TableHead = React64.forwardRef((_a, ref) => {
|
|
8439
8659
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
8440
|
-
return /* @__PURE__ */
|
|
8660
|
+
return /* @__PURE__ */ jsx44(
|
|
8441
8661
|
"th",
|
|
8442
8662
|
__spreadValues({
|
|
8443
8663
|
ref,
|
|
@@ -8449,9 +8669,9 @@ var TableHead = React63.forwardRef((_a, ref) => {
|
|
|
8449
8669
|
);
|
|
8450
8670
|
});
|
|
8451
8671
|
TableHead.displayName = "TableHead";
|
|
8452
|
-
var TableCell =
|
|
8672
|
+
var TableCell = React64.forwardRef((_a, ref) => {
|
|
8453
8673
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
8454
|
-
return /* @__PURE__ */
|
|
8674
|
+
return /* @__PURE__ */ jsx44(
|
|
8455
8675
|
"td",
|
|
8456
8676
|
__spreadValues({
|
|
8457
8677
|
ref,
|
|
@@ -8463,9 +8683,9 @@ var TableCell = React63.forwardRef((_a, ref) => {
|
|
|
8463
8683
|
);
|
|
8464
8684
|
});
|
|
8465
8685
|
TableCell.displayName = "TableCell";
|
|
8466
|
-
var TableCaption =
|
|
8686
|
+
var TableCaption = React64.forwardRef((_a, ref) => {
|
|
8467
8687
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
8468
|
-
return /* @__PURE__ */
|
|
8688
|
+
return /* @__PURE__ */ jsx44(
|
|
8469
8689
|
"caption",
|
|
8470
8690
|
__spreadValues({
|
|
8471
8691
|
ref,
|
|
@@ -8477,12 +8697,12 @@ TableCaption.displayName = "TableCaption";
|
|
|
8477
8697
|
|
|
8478
8698
|
// src/components/tabs.tsx
|
|
8479
8699
|
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
8480
|
-
import * as
|
|
8481
|
-
import { jsx as
|
|
8700
|
+
import * as React65 from "react";
|
|
8701
|
+
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
8482
8702
|
var Tabs = TabsPrimitive.Root;
|
|
8483
|
-
var TabsList =
|
|
8703
|
+
var TabsList = React65.forwardRef((_a, ref) => {
|
|
8484
8704
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
8485
|
-
return /* @__PURE__ */
|
|
8705
|
+
return /* @__PURE__ */ jsx45(
|
|
8486
8706
|
TabsPrimitive.List,
|
|
8487
8707
|
__spreadValues({
|
|
8488
8708
|
ref,
|
|
@@ -8494,9 +8714,9 @@ var TabsList = React64.forwardRef((_a, ref) => {
|
|
|
8494
8714
|
);
|
|
8495
8715
|
});
|
|
8496
8716
|
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
8497
|
-
var TabsTrigger =
|
|
8717
|
+
var TabsTrigger = React65.forwardRef((_a, ref) => {
|
|
8498
8718
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
8499
|
-
return /* @__PURE__ */
|
|
8719
|
+
return /* @__PURE__ */ jsx45(
|
|
8500
8720
|
TabsPrimitive.Trigger,
|
|
8501
8721
|
__spreadValues({
|
|
8502
8722
|
ref,
|
|
@@ -8508,9 +8728,9 @@ var TabsTrigger = React64.forwardRef((_a, ref) => {
|
|
|
8508
8728
|
);
|
|
8509
8729
|
});
|
|
8510
8730
|
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
8511
|
-
var TabsContent =
|
|
8731
|
+
var TabsContent = React65.forwardRef((_a, ref) => {
|
|
8512
8732
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
8513
|
-
return /* @__PURE__ */
|
|
8733
|
+
return /* @__PURE__ */ jsx45(
|
|
8514
8734
|
TabsPrimitive.Content,
|
|
8515
8735
|
__spreadValues({
|
|
8516
8736
|
ref,
|
|
@@ -8524,12 +8744,12 @@ var TabsContent = React64.forwardRef((_a, ref) => {
|
|
|
8524
8744
|
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
8525
8745
|
|
|
8526
8746
|
// src/components/textarea.tsx
|
|
8527
|
-
import * as
|
|
8528
|
-
import { jsx as
|
|
8529
|
-
var Textarea =
|
|
8747
|
+
import * as React66 from "react";
|
|
8748
|
+
import { jsx as jsx46 } from "react/jsx-runtime";
|
|
8749
|
+
var Textarea = React66.forwardRef(
|
|
8530
8750
|
(_a, ref) => {
|
|
8531
8751
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
8532
|
-
return /* @__PURE__ */
|
|
8752
|
+
return /* @__PURE__ */ jsx46(
|
|
8533
8753
|
"textarea",
|
|
8534
8754
|
__spreadValues({
|
|
8535
8755
|
className: cn(
|
|
@@ -8547,12 +8767,12 @@ Textarea.displayName = "Textarea";
|
|
|
8547
8767
|
import { Cross2Icon as Cross2Icon4 } from "@radix-ui/react-icons";
|
|
8548
8768
|
import * as ToastPrimitives from "@radix-ui/react-toast";
|
|
8549
8769
|
import { cva as cva8 } from "class-variance-authority";
|
|
8550
|
-
import * as
|
|
8551
|
-
import { jsx as
|
|
8770
|
+
import * as React67 from "react";
|
|
8771
|
+
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
8552
8772
|
var ToastProvider = ToastPrimitives.Provider;
|
|
8553
|
-
var ToastViewport =
|
|
8773
|
+
var ToastViewport = React67.forwardRef((_a, ref) => {
|
|
8554
8774
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
8555
|
-
return /* @__PURE__ */
|
|
8775
|
+
return /* @__PURE__ */ jsx47(
|
|
8556
8776
|
ToastPrimitives.Viewport,
|
|
8557
8777
|
__spreadValues({
|
|
8558
8778
|
ref,
|
|
@@ -8578,9 +8798,9 @@ var toastVariants = cva8(
|
|
|
8578
8798
|
}
|
|
8579
8799
|
}
|
|
8580
8800
|
);
|
|
8581
|
-
var Toast =
|
|
8801
|
+
var Toast = React67.forwardRef((_a, ref) => {
|
|
8582
8802
|
var _b = _a, { className, variant } = _b, props = __objRest(_b, ["className", "variant"]);
|
|
8583
|
-
return /* @__PURE__ */
|
|
8803
|
+
return /* @__PURE__ */ jsx47(
|
|
8584
8804
|
ToastPrimitives.Root,
|
|
8585
8805
|
__spreadValues({
|
|
8586
8806
|
ref,
|
|
@@ -8589,9 +8809,9 @@ var Toast = React66.forwardRef((_a, ref) => {
|
|
|
8589
8809
|
);
|
|
8590
8810
|
});
|
|
8591
8811
|
Toast.displayName = ToastPrimitives.Root.displayName;
|
|
8592
|
-
var ToastAction =
|
|
8812
|
+
var ToastAction = React67.forwardRef((_a, ref) => {
|
|
8593
8813
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
8594
|
-
return /* @__PURE__ */
|
|
8814
|
+
return /* @__PURE__ */ jsx47(
|
|
8595
8815
|
ToastPrimitives.Action,
|
|
8596
8816
|
__spreadValues({
|
|
8597
8817
|
ref,
|
|
@@ -8603,9 +8823,9 @@ var ToastAction = React66.forwardRef((_a, ref) => {
|
|
|
8603
8823
|
);
|
|
8604
8824
|
});
|
|
8605
8825
|
ToastAction.displayName = ToastPrimitives.Action.displayName;
|
|
8606
|
-
var ToastClose =
|
|
8826
|
+
var ToastClose = React67.forwardRef((_a, ref) => {
|
|
8607
8827
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
8608
|
-
return /* @__PURE__ */
|
|
8828
|
+
return /* @__PURE__ */ jsx47(
|
|
8609
8829
|
ToastPrimitives.Close,
|
|
8610
8830
|
__spreadProps(__spreadValues({
|
|
8611
8831
|
ref,
|
|
@@ -8615,14 +8835,14 @@ var ToastClose = React66.forwardRef((_a, ref) => {
|
|
|
8615
8835
|
),
|
|
8616
8836
|
"toast-close": ""
|
|
8617
8837
|
}, props), {
|
|
8618
|
-
children: /* @__PURE__ */
|
|
8838
|
+
children: /* @__PURE__ */ jsx47(Cross2Icon4, { className: "h-4 w-4" })
|
|
8619
8839
|
})
|
|
8620
8840
|
);
|
|
8621
8841
|
});
|
|
8622
8842
|
ToastClose.displayName = ToastPrimitives.Close.displayName;
|
|
8623
|
-
var ToastTitle =
|
|
8843
|
+
var ToastTitle = React67.forwardRef((_a, ref) => {
|
|
8624
8844
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
8625
|
-
return /* @__PURE__ */
|
|
8845
|
+
return /* @__PURE__ */ jsx47(
|
|
8626
8846
|
ToastPrimitives.Title,
|
|
8627
8847
|
__spreadValues({
|
|
8628
8848
|
ref,
|
|
@@ -8631,9 +8851,9 @@ var ToastTitle = React66.forwardRef((_a, ref) => {
|
|
|
8631
8851
|
);
|
|
8632
8852
|
});
|
|
8633
8853
|
ToastTitle.displayName = ToastPrimitives.Title.displayName;
|
|
8634
|
-
var ToastDescription =
|
|
8854
|
+
var ToastDescription = React67.forwardRef((_a, ref) => {
|
|
8635
8855
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
8636
|
-
return /* @__PURE__ */
|
|
8856
|
+
return /* @__PURE__ */ jsx47(
|
|
8637
8857
|
ToastPrimitives.Description,
|
|
8638
8858
|
__spreadValues({
|
|
8639
8859
|
ref,
|
|
@@ -8644,7 +8864,7 @@ var ToastDescription = React66.forwardRef((_a, ref) => {
|
|
|
8644
8864
|
ToastDescription.displayName = ToastPrimitives.Description.displayName;
|
|
8645
8865
|
|
|
8646
8866
|
// src/components/use-toast.ts
|
|
8647
|
-
import * as
|
|
8867
|
+
import * as React68 from "react";
|
|
8648
8868
|
var TOAST_LIMIT = 1;
|
|
8649
8869
|
var TOAST_REMOVE_DELAY = 1e6;
|
|
8650
8870
|
var count = 0;
|
|
@@ -8739,8 +8959,8 @@ function toast(_a) {
|
|
|
8739
8959
|
};
|
|
8740
8960
|
}
|
|
8741
8961
|
function useToast() {
|
|
8742
|
-
const [state, setState] =
|
|
8743
|
-
|
|
8962
|
+
const [state, setState] = React68.useState(memoryState);
|
|
8963
|
+
React68.useEffect(() => {
|
|
8744
8964
|
listeners.push(setState);
|
|
8745
8965
|
return () => {
|
|
8746
8966
|
const index = listeners.indexOf(setState);
|
|
@@ -8756,30 +8976,30 @@ function useToast() {
|
|
|
8756
8976
|
}
|
|
8757
8977
|
|
|
8758
8978
|
// src/components/toaster.tsx
|
|
8759
|
-
import { jsx as
|
|
8979
|
+
import { jsx as jsx48, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
8760
8980
|
function Toaster() {
|
|
8761
8981
|
const { toasts } = useToast();
|
|
8762
|
-
return /* @__PURE__ */
|
|
8982
|
+
return /* @__PURE__ */ jsxs25(ToastProvider, { children: [
|
|
8763
8983
|
toasts.map(function(_a) {
|
|
8764
8984
|
var _b = _a, { id, title, description, action } = _b, props = __objRest(_b, ["id", "title", "description", "action"]);
|
|
8765
|
-
return /* @__PURE__ */
|
|
8766
|
-
/* @__PURE__ */
|
|
8767
|
-
title && /* @__PURE__ */
|
|
8768
|
-
description && /* @__PURE__ */
|
|
8985
|
+
return /* @__PURE__ */ jsxs25(Toast, __spreadProps(__spreadValues({}, props), { children: [
|
|
8986
|
+
/* @__PURE__ */ jsxs25("div", { className: "grid gap-1", children: [
|
|
8987
|
+
title && /* @__PURE__ */ jsx48(ToastTitle, { children: title }),
|
|
8988
|
+
description && /* @__PURE__ */ jsx48(ToastDescription, { children: description })
|
|
8769
8989
|
] }),
|
|
8770
8990
|
action,
|
|
8771
|
-
/* @__PURE__ */
|
|
8991
|
+
/* @__PURE__ */ jsx48(ToastClose, {})
|
|
8772
8992
|
] }), id);
|
|
8773
8993
|
}),
|
|
8774
|
-
/* @__PURE__ */
|
|
8994
|
+
/* @__PURE__ */ jsx48(ToastViewport, {})
|
|
8775
8995
|
] });
|
|
8776
8996
|
}
|
|
8777
8997
|
|
|
8778
8998
|
// src/components/toggle.tsx
|
|
8779
8999
|
import * as TogglePrimitive from "@radix-ui/react-toggle";
|
|
8780
9000
|
import { cva as cva9 } from "class-variance-authority";
|
|
8781
|
-
import * as
|
|
8782
|
-
import { jsx as
|
|
9001
|
+
import * as React69 from "react";
|
|
9002
|
+
import { jsx as jsx49 } from "react/jsx-runtime";
|
|
8783
9003
|
var toggleVariants = cva9(
|
|
8784
9004
|
"inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",
|
|
8785
9005
|
{
|
|
@@ -8800,9 +9020,9 @@ var toggleVariants = cva9(
|
|
|
8800
9020
|
}
|
|
8801
9021
|
}
|
|
8802
9022
|
);
|
|
8803
|
-
var Toggle =
|
|
9023
|
+
var Toggle = React69.forwardRef((_a, ref) => {
|
|
8804
9024
|
var _b = _a, { className, variant, size } = _b, props = __objRest(_b, ["className", "variant", "size"]);
|
|
8805
|
-
return /* @__PURE__ */
|
|
9025
|
+
return /* @__PURE__ */ jsx49(
|
|
8806
9026
|
TogglePrimitive.Root,
|
|
8807
9027
|
__spreadValues({
|
|
8808
9028
|
ref,
|
|
@@ -8814,29 +9034,29 @@ Toggle.displayName = TogglePrimitive.Root.displayName;
|
|
|
8814
9034
|
|
|
8815
9035
|
// src/components/toggle-group.tsx
|
|
8816
9036
|
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
|
|
8817
|
-
import * as
|
|
8818
|
-
import { jsx as
|
|
8819
|
-
var ToggleGroupContext =
|
|
9037
|
+
import * as React70 from "react";
|
|
9038
|
+
import { jsx as jsx50 } from "react/jsx-runtime";
|
|
9039
|
+
var ToggleGroupContext = React70.createContext({
|
|
8820
9040
|
size: "default",
|
|
8821
9041
|
variant: "default"
|
|
8822
9042
|
});
|
|
8823
|
-
var ToggleGroup =
|
|
9043
|
+
var ToggleGroup = React70.forwardRef((_a, ref) => {
|
|
8824
9044
|
var _b = _a, { className, variant, size, children } = _b, props = __objRest(_b, ["className", "variant", "size", "children"]);
|
|
8825
|
-
return /* @__PURE__ */
|
|
9045
|
+
return /* @__PURE__ */ jsx50(
|
|
8826
9046
|
ToggleGroupPrimitive.Root,
|
|
8827
9047
|
__spreadProps(__spreadValues({
|
|
8828
9048
|
ref,
|
|
8829
9049
|
className: cn("flex items-center justify-center gap-1", className)
|
|
8830
9050
|
}, props), {
|
|
8831
|
-
children: /* @__PURE__ */
|
|
9051
|
+
children: /* @__PURE__ */ jsx50(ToggleGroupContext.Provider, { value: { variant, size }, children })
|
|
8832
9052
|
})
|
|
8833
9053
|
);
|
|
8834
9054
|
});
|
|
8835
9055
|
ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
|
|
8836
|
-
var ToggleGroupItem =
|
|
9056
|
+
var ToggleGroupItem = React70.forwardRef((_a, ref) => {
|
|
8837
9057
|
var _b = _a, { className, children, variant, size } = _b, props = __objRest(_b, ["className", "children", "variant", "size"]);
|
|
8838
|
-
const context =
|
|
8839
|
-
return /* @__PURE__ */
|
|
9058
|
+
const context = React70.useContext(ToggleGroupContext);
|
|
9059
|
+
return /* @__PURE__ */ jsx50(
|
|
8840
9060
|
ToggleGroupPrimitive.Item,
|
|
8841
9061
|
__spreadProps(__spreadValues({
|
|
8842
9062
|
ref,
|
|
@@ -8856,14 +9076,14 @@ ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
|
|
|
8856
9076
|
|
|
8857
9077
|
// src/components/tooltip.tsx
|
|
8858
9078
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
8859
|
-
import * as
|
|
8860
|
-
import { jsx as
|
|
9079
|
+
import * as React71 from "react";
|
|
9080
|
+
import { jsx as jsx51 } from "react/jsx-runtime";
|
|
8861
9081
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
8862
9082
|
var Tooltip = TooltipPrimitive.Root;
|
|
8863
9083
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
8864
|
-
var TooltipContent =
|
|
9084
|
+
var TooltipContent = React71.forwardRef((_a, ref) => {
|
|
8865
9085
|
var _b = _a, { className, sideOffset = 4 } = _b, props = __objRest(_b, ["className", "sideOffset"]);
|
|
8866
|
-
return /* @__PURE__ */
|
|
9086
|
+
return /* @__PURE__ */ jsx51(
|
|
8867
9087
|
TooltipPrimitive.Content,
|
|
8868
9088
|
__spreadValues({
|
|
8869
9089
|
ref,
|
|
@@ -8878,10 +9098,10 @@ var TooltipContent = React70.forwardRef((_a, ref) => {
|
|
|
8878
9098
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
8879
9099
|
|
|
8880
9100
|
// src/components/ui/input.tsx
|
|
8881
|
-
import * as
|
|
8882
|
-
import { Asterisk as
|
|
8883
|
-
import { jsx as
|
|
8884
|
-
var UiInput =
|
|
9101
|
+
import * as React72 from "react";
|
|
9102
|
+
import { Asterisk as Asterisk4 } from "lucide-react";
|
|
9103
|
+
import { jsx as jsx52, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
9104
|
+
var UiInput = React72.forwardRef(
|
|
8885
9105
|
(_a, ref) => {
|
|
8886
9106
|
var _b = _a, {
|
|
8887
9107
|
label,
|
|
@@ -8906,12 +9126,12 @@ var UiInput = React71.forwardRef(
|
|
|
8906
9126
|
"invalid",
|
|
8907
9127
|
"className"
|
|
8908
9128
|
]);
|
|
8909
|
-
const generatedId =
|
|
9129
|
+
const generatedId = React72.useId();
|
|
8910
9130
|
const inputId = htmlFormItemId != null ? htmlFormItemId : generatedId;
|
|
8911
9131
|
const messageId = `${inputId}-message`;
|
|
8912
9132
|
const hasError = Boolean(errorMessage || invalid);
|
|
8913
|
-
return /* @__PURE__ */
|
|
8914
|
-
label ? /* @__PURE__ */
|
|
9133
|
+
return /* @__PURE__ */ jsxs26("div", { className: cn("w-full space-y-1.5", containerClassName), children: [
|
|
9134
|
+
label ? /* @__PURE__ */ jsxs26(
|
|
8915
9135
|
Label3,
|
|
8916
9136
|
{
|
|
8917
9137
|
className: cn(
|
|
@@ -8921,9 +9141,9 @@ var UiInput = React71.forwardRef(
|
|
|
8921
9141
|
),
|
|
8922
9142
|
htmlFor: inputId,
|
|
8923
9143
|
children: [
|
|
8924
|
-
/* @__PURE__ */
|
|
8925
|
-
requiredLabel ? /* @__PURE__ */
|
|
8926
|
-
|
|
9144
|
+
/* @__PURE__ */ jsx52("span", { children: label }),
|
|
9145
|
+
requiredLabel ? /* @__PURE__ */ jsx52(
|
|
9146
|
+
Asterisk4,
|
|
8927
9147
|
{
|
|
8928
9148
|
"aria-hidden": "true",
|
|
8929
9149
|
className: cn(
|
|
@@ -8935,7 +9155,7 @@ var UiInput = React71.forwardRef(
|
|
|
8935
9155
|
]
|
|
8936
9156
|
}
|
|
8937
9157
|
) : null,
|
|
8938
|
-
/* @__PURE__ */
|
|
9158
|
+
/* @__PURE__ */ jsx52(
|
|
8939
9159
|
Input,
|
|
8940
9160
|
__spreadProps(__spreadValues({}, inputProps), {
|
|
8941
9161
|
ref,
|
|
@@ -8946,7 +9166,7 @@ var UiInput = React71.forwardRef(
|
|
|
8946
9166
|
className
|
|
8947
9167
|
})
|
|
8948
9168
|
),
|
|
8949
|
-
errorMessage ? /* @__PURE__ */
|
|
9169
|
+
errorMessage ? /* @__PURE__ */ jsx52(
|
|
8950
9170
|
"p",
|
|
8951
9171
|
{
|
|
8952
9172
|
id: messageId,
|
|
@@ -8960,8 +9180,8 @@ var UiInput = React71.forwardRef(
|
|
|
8960
9180
|
UiInput.displayName = "UiInput";
|
|
8961
9181
|
|
|
8962
9182
|
// src/components/ui/select.tsx
|
|
8963
|
-
import * as
|
|
8964
|
-
import { Asterisk as
|
|
9183
|
+
import * as React73 from "react";
|
|
9184
|
+
import { Asterisk as Asterisk5 } from "lucide-react";
|
|
8965
9185
|
|
|
8966
9186
|
// src/types/select.ts
|
|
8967
9187
|
var selectVariants = {
|
|
@@ -8976,7 +9196,7 @@ var selectVariants = {
|
|
|
8976
9196
|
var variants2 = selectVariants;
|
|
8977
9197
|
|
|
8978
9198
|
// src/components/ui/select.tsx
|
|
8979
|
-
import { jsx as
|
|
9199
|
+
import { jsx as jsx53, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
8980
9200
|
function UiSelect({
|
|
8981
9201
|
label,
|
|
8982
9202
|
placeholder,
|
|
@@ -8999,7 +9219,7 @@ function UiSelect({
|
|
|
8999
9219
|
errorMessage,
|
|
9000
9220
|
htmlFormItemId
|
|
9001
9221
|
}) {
|
|
9002
|
-
const generatedId =
|
|
9222
|
+
const generatedId = React73.useId();
|
|
9003
9223
|
const triggerId = htmlFormItemId != null ? htmlFormItemId : generatedId;
|
|
9004
9224
|
const messageId = `${triggerId}-message`;
|
|
9005
9225
|
const hasError = Boolean(errorMessage);
|
|
@@ -9016,8 +9236,8 @@ function UiSelect({
|
|
|
9016
9236
|
};
|
|
9017
9237
|
const specialFlushed = variant === "flushed" ? size === "sm" ? "h-9 text-sm" : size === "lg" ? "h-11 text-base" : "h-10 text-sm" : "";
|
|
9018
9238
|
const specialLink = variant === "link" ? "text-sm" : "";
|
|
9019
|
-
return /* @__PURE__ */
|
|
9020
|
-
label ? /* @__PURE__ */
|
|
9239
|
+
return /* @__PURE__ */ jsxs27("div", { className: cn("w-full space-y-1.5", selectClassName), children: [
|
|
9240
|
+
label ? /* @__PURE__ */ jsxs27(
|
|
9021
9241
|
Label3,
|
|
9022
9242
|
{
|
|
9023
9243
|
className: cn(
|
|
@@ -9027,9 +9247,9 @@ function UiSelect({
|
|
|
9027
9247
|
),
|
|
9028
9248
|
htmlFor: triggerId,
|
|
9029
9249
|
children: [
|
|
9030
|
-
/* @__PURE__ */
|
|
9031
|
-
requiredLabel ? /* @__PURE__ */
|
|
9032
|
-
|
|
9250
|
+
/* @__PURE__ */ jsx53("span", { children: label }),
|
|
9251
|
+
requiredLabel ? /* @__PURE__ */ jsx53(
|
|
9252
|
+
Asterisk5,
|
|
9033
9253
|
{
|
|
9034
9254
|
"aria-hidden": "true",
|
|
9035
9255
|
className: cn(
|
|
@@ -9041,7 +9261,7 @@ function UiSelect({
|
|
|
9041
9261
|
]
|
|
9042
9262
|
}
|
|
9043
9263
|
) : null,
|
|
9044
|
-
/* @__PURE__ */
|
|
9264
|
+
/* @__PURE__ */ jsxs27(
|
|
9045
9265
|
Select2,
|
|
9046
9266
|
{
|
|
9047
9267
|
value,
|
|
@@ -9049,7 +9269,7 @@ function UiSelect({
|
|
|
9049
9269
|
onValueChange: onChange,
|
|
9050
9270
|
disabled,
|
|
9051
9271
|
children: [
|
|
9052
|
-
/* @__PURE__ */
|
|
9272
|
+
/* @__PURE__ */ jsx53(
|
|
9053
9273
|
SelectTrigger,
|
|
9054
9274
|
{
|
|
9055
9275
|
id: triggerId,
|
|
@@ -9062,10 +9282,10 @@ function UiSelect({
|
|
|
9062
9282
|
hasError && "border-destructive ring-destructive focus:ring-destructive/40",
|
|
9063
9283
|
className
|
|
9064
9284
|
),
|
|
9065
|
-
children: /* @__PURE__ */
|
|
9285
|
+
children: /* @__PURE__ */ jsx53(SelectValue, { placeholder })
|
|
9066
9286
|
}
|
|
9067
9287
|
),
|
|
9068
|
-
/* @__PURE__ */
|
|
9288
|
+
/* @__PURE__ */ jsx53(SelectContent, { className: contentClassName, children: children != null ? children : items == null ? void 0 : items.map((item) => /* @__PURE__ */ jsx53(
|
|
9069
9289
|
SelectItem,
|
|
9070
9290
|
{
|
|
9071
9291
|
value: item.value,
|
|
@@ -9078,7 +9298,7 @@ function UiSelect({
|
|
|
9078
9298
|
]
|
|
9079
9299
|
}
|
|
9080
9300
|
),
|
|
9081
|
-
errorMessage ? /* @__PURE__ */
|
|
9301
|
+
errorMessage ? /* @__PURE__ */ jsx53(
|
|
9082
9302
|
"p",
|
|
9083
9303
|
{
|
|
9084
9304
|
id: messageId,
|
|
@@ -9090,10 +9310,10 @@ function UiSelect({
|
|
|
9090
9310
|
}
|
|
9091
9311
|
|
|
9092
9312
|
// src/components/ui/ui-checkbox.tsx
|
|
9093
|
-
import * as
|
|
9094
|
-
import { Asterisk as
|
|
9095
|
-
import { jsx as
|
|
9096
|
-
var UiCheckbox =
|
|
9313
|
+
import * as React74 from "react";
|
|
9314
|
+
import { Asterisk as Asterisk6 } from "lucide-react";
|
|
9315
|
+
import { jsx as jsx54, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
9316
|
+
var UiCheckbox = React74.forwardRef(
|
|
9097
9317
|
(_a, ref) => {
|
|
9098
9318
|
var _b = _a, {
|
|
9099
9319
|
label,
|
|
@@ -9125,7 +9345,7 @@ var UiCheckbox = React73.forwardRef(
|
|
|
9125
9345
|
"className"
|
|
9126
9346
|
]);
|
|
9127
9347
|
const hasError = Boolean(errorMessage || invalid);
|
|
9128
|
-
return /* @__PURE__ */
|
|
9348
|
+
return /* @__PURE__ */ jsx54("div", { className: cn("w-full", containerClassName), children: /* @__PURE__ */ jsxs28(
|
|
9129
9349
|
"div",
|
|
9130
9350
|
{
|
|
9131
9351
|
className: cn(
|
|
@@ -9134,7 +9354,7 @@ var UiCheckbox = React73.forwardRef(
|
|
|
9134
9354
|
contentClassName
|
|
9135
9355
|
),
|
|
9136
9356
|
children: [
|
|
9137
|
-
/* @__PURE__ */
|
|
9357
|
+
/* @__PURE__ */ jsx54(
|
|
9138
9358
|
Checkbox,
|
|
9139
9359
|
__spreadValues({
|
|
9140
9360
|
ref,
|
|
@@ -9143,8 +9363,8 @@ var UiCheckbox = React73.forwardRef(
|
|
|
9143
9363
|
className: cn("mt-0.5", className)
|
|
9144
9364
|
}, checkboxProps)
|
|
9145
9365
|
),
|
|
9146
|
-
/* @__PURE__ */
|
|
9147
|
-
label ? /* @__PURE__ */
|
|
9366
|
+
/* @__PURE__ */ jsxs28("div", { className: "min-w-0 flex-1", children: [
|
|
9367
|
+
label ? /* @__PURE__ */ jsxs28(
|
|
9148
9368
|
Label3,
|
|
9149
9369
|
{
|
|
9150
9370
|
htmlFor: htmlFormItemId,
|
|
@@ -9155,9 +9375,9 @@ var UiCheckbox = React73.forwardRef(
|
|
|
9155
9375
|
labelClassName
|
|
9156
9376
|
),
|
|
9157
9377
|
children: [
|
|
9158
|
-
/* @__PURE__ */
|
|
9159
|
-
requiredLabel ? /* @__PURE__ */
|
|
9160
|
-
|
|
9378
|
+
/* @__PURE__ */ jsx54("span", { children: label }),
|
|
9379
|
+
requiredLabel ? /* @__PURE__ */ jsx54(
|
|
9380
|
+
Asterisk6,
|
|
9161
9381
|
{
|
|
9162
9382
|
"aria-hidden": "true",
|
|
9163
9383
|
className: cn(
|
|
@@ -9169,7 +9389,7 @@ var UiCheckbox = React73.forwardRef(
|
|
|
9169
9389
|
]
|
|
9170
9390
|
}
|
|
9171
9391
|
) : null,
|
|
9172
|
-
description ? /* @__PURE__ */
|
|
9392
|
+
description ? /* @__PURE__ */ jsx54(
|
|
9173
9393
|
"p",
|
|
9174
9394
|
{
|
|
9175
9395
|
className: cn(
|
|
@@ -9179,7 +9399,7 @@ var UiCheckbox = React73.forwardRef(
|
|
|
9179
9399
|
children: description
|
|
9180
9400
|
}
|
|
9181
9401
|
) : null,
|
|
9182
|
-
errorMessage ? /* @__PURE__ */
|
|
9402
|
+
errorMessage ? /* @__PURE__ */ jsx54(
|
|
9183
9403
|
"p",
|
|
9184
9404
|
{
|
|
9185
9405
|
className: cn(
|
|
@@ -9198,14 +9418,14 @@ var UiCheckbox = React73.forwardRef(
|
|
|
9198
9418
|
UiCheckbox.displayName = "UiCheckbox";
|
|
9199
9419
|
|
|
9200
9420
|
// src/hooks/use-sidebar.tsx
|
|
9201
|
-
import { createContext as
|
|
9202
|
-
import { jsx as
|
|
9203
|
-
var SidebarContext =
|
|
9421
|
+
import { createContext as createContext6, useContext as useContext7, useState as useState7 } from "react";
|
|
9422
|
+
import { jsx as jsx55 } from "react/jsx-runtime";
|
|
9423
|
+
var SidebarContext = createContext6({
|
|
9204
9424
|
isMinimized: false,
|
|
9205
9425
|
toggle: () => {
|
|
9206
9426
|
}
|
|
9207
9427
|
});
|
|
9208
|
-
var useSidebar = () =>
|
|
9428
|
+
var useSidebar = () => useContext7(SidebarContext);
|
|
9209
9429
|
var SidebarProvider = ({
|
|
9210
9430
|
children
|
|
9211
9431
|
}) => {
|
|
@@ -9213,11 +9433,11 @@ var SidebarProvider = ({
|
|
|
9213
9433
|
const toggle = () => {
|
|
9214
9434
|
setIsMinimized(!isMinimized);
|
|
9215
9435
|
};
|
|
9216
|
-
return /* @__PURE__ */
|
|
9436
|
+
return /* @__PURE__ */ jsx55(SidebarContext.Provider, { value: { isMinimized, toggle }, children });
|
|
9217
9437
|
};
|
|
9218
9438
|
|
|
9219
9439
|
// src/shared/alert-modal.tsx
|
|
9220
|
-
import { jsx as
|
|
9440
|
+
import { jsx as jsx56, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
9221
9441
|
var AlertModal = ({
|
|
9222
9442
|
isOpen,
|
|
9223
9443
|
onClose,
|
|
@@ -9230,7 +9450,7 @@ var AlertModal = ({
|
|
|
9230
9450
|
className,
|
|
9231
9451
|
children
|
|
9232
9452
|
}) => {
|
|
9233
|
-
return /* @__PURE__ */
|
|
9453
|
+
return /* @__PURE__ */ jsx56(
|
|
9234
9454
|
Modal,
|
|
9235
9455
|
{
|
|
9236
9456
|
title,
|
|
@@ -9238,9 +9458,9 @@ var AlertModal = ({
|
|
|
9238
9458
|
isOpen,
|
|
9239
9459
|
onClose,
|
|
9240
9460
|
className,
|
|
9241
|
-
children: children ? children : /* @__PURE__ */
|
|
9242
|
-
/* @__PURE__ */
|
|
9243
|
-
/* @__PURE__ */
|
|
9461
|
+
children: children ? children : /* @__PURE__ */ jsxs29("div", { className: "flex w-full items-center justify-end space-x-2 pt-6", children: [
|
|
9462
|
+
/* @__PURE__ */ jsx56(Button, { disabled: loading, variant: "outline", onClick: onClose, children: cancelText }),
|
|
9463
|
+
/* @__PURE__ */ jsx56(
|
|
9244
9464
|
Button,
|
|
9245
9465
|
{
|
|
9246
9466
|
disabled: loading,
|
|
@@ -9258,19 +9478,19 @@ var AlertModal = ({
|
|
|
9258
9478
|
// src/shared/breadcrumbs.tsx
|
|
9259
9479
|
import { Slash } from "lucide-react";
|
|
9260
9480
|
import { Fragment } from "react";
|
|
9261
|
-
import { jsx as
|
|
9481
|
+
import { jsx as jsx57, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
9262
9482
|
function Breadcrumbs({
|
|
9263
9483
|
items,
|
|
9264
9484
|
className,
|
|
9265
9485
|
classNameList,
|
|
9266
|
-
separator = /* @__PURE__ */
|
|
9486
|
+
separator = /* @__PURE__ */ jsx57(Slash, {})
|
|
9267
9487
|
}) {
|
|
9268
|
-
return /* @__PURE__ */
|
|
9488
|
+
return /* @__PURE__ */ jsx57(Breadcrumb, { className, children: /* @__PURE__ */ jsx57(BreadcrumbList, { className: classNameList, children: items.map((item, index) => {
|
|
9269
9489
|
var _a;
|
|
9270
9490
|
const isLast = index === items.length - 1;
|
|
9271
|
-
return /* @__PURE__ */
|
|
9272
|
-
!isLast ? /* @__PURE__ */
|
|
9273
|
-
!isLast ? /* @__PURE__ */
|
|
9491
|
+
return /* @__PURE__ */ jsxs30(Fragment, { children: [
|
|
9492
|
+
!isLast ? /* @__PURE__ */ jsx57(BreadcrumbItem, { className: item.className, children: /* @__PURE__ */ jsx57(BreadcrumbLink, { href: (_a = item.link) != null ? _a : "#", children: item.title }) }) : /* @__PURE__ */ jsx57(BreadcrumbItem, { className: item.className, children: /* @__PURE__ */ jsx57(BreadcrumbPage, { children: item.title }) }),
|
|
9493
|
+
!isLast ? /* @__PURE__ */ jsx57(BreadcrumbSeparator, { children: separator }) : null
|
|
9274
9494
|
] }, `${item.title}-${index}`);
|
|
9275
9495
|
}) }) });
|
|
9276
9496
|
}
|
|
@@ -9289,7 +9509,7 @@ import {
|
|
|
9289
9509
|
useReactTable
|
|
9290
9510
|
} from "@tanstack/react-table";
|
|
9291
9511
|
import { ChevronLeft as ChevronLeft3, ChevronRight as ChevronRight3 } from "lucide-react";
|
|
9292
|
-
import { jsx as
|
|
9512
|
+
import { jsx as jsx58, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
9293
9513
|
var ACCENT_COLOR = {
|
|
9294
9514
|
primary: "var(--primary)",
|
|
9295
9515
|
emerald: "#10b981",
|
|
@@ -9567,16 +9787,16 @@ function DataTable({
|
|
|
9567
9787
|
const accentOn = !!dtAccent;
|
|
9568
9788
|
const dataAccent = accentOn ? "on" : "off";
|
|
9569
9789
|
const headerIsSticky = stickyHeader && !headerScroll;
|
|
9570
|
-
return /* @__PURE__ */
|
|
9790
|
+
return /* @__PURE__ */ jsxs31(
|
|
9571
9791
|
"div",
|
|
9572
9792
|
{
|
|
9573
9793
|
"data-accent": dataAccent,
|
|
9574
9794
|
className: cn(ui.root, heightClassName),
|
|
9575
9795
|
style: accentOn ? { "--dt-accent": dtAccent } : void 0,
|
|
9576
9796
|
children: [
|
|
9577
|
-
/* @__PURE__ */
|
|
9578
|
-
/* @__PURE__ */
|
|
9579
|
-
/* @__PURE__ */
|
|
9797
|
+
/* @__PURE__ */ jsx58("div", { className: "min-h-0 flex-1", children: /* @__PURE__ */ jsxs31(ScrollArea, { className: "h-full", children: [
|
|
9798
|
+
/* @__PURE__ */ jsx58("div", { className: "relative w-max min-w-full", children: /* @__PURE__ */ jsxs31(Table, { className: cn(ui.table), children: [
|
|
9799
|
+
/* @__PURE__ */ jsx58(TableHeader, { className: cn(ui.thead), children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx58(TableRow, { className: cn(ui.trHead), children: headerGroup.headers.map((header) => /* @__PURE__ */ jsx58(
|
|
9580
9800
|
TableHead,
|
|
9581
9801
|
{
|
|
9582
9802
|
className: cn(
|
|
@@ -9590,7 +9810,7 @@ function DataTable({
|
|
|
9590
9810
|
},
|
|
9591
9811
|
header.id
|
|
9592
9812
|
)) }, headerGroup.id)) }),
|
|
9593
|
-
animate ? /* @__PURE__ */
|
|
9813
|
+
animate ? /* @__PURE__ */ jsx58(AnimatePresence, { mode: "wait", initial: false, children: /* @__PURE__ */ jsx58(
|
|
9594
9814
|
motion.tbody,
|
|
9595
9815
|
{
|
|
9596
9816
|
className: cn(ui.tbody),
|
|
@@ -9598,7 +9818,7 @@ function DataTable({
|
|
|
9598
9818
|
animate: { opacity: 1, y: 0 },
|
|
9599
9819
|
exit: { opacity: 0, y: -6 },
|
|
9600
9820
|
transition: { duration: 0.18 },
|
|
9601
|
-
children: table.getRowModel().rows.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */
|
|
9821
|
+
children: table.getRowModel().rows.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ jsx58(
|
|
9602
9822
|
TableRow,
|
|
9603
9823
|
{
|
|
9604
9824
|
"data-accent": dataAccent,
|
|
@@ -9608,13 +9828,13 @@ function DataTable({
|
|
|
9608
9828
|
ui.tr,
|
|
9609
9829
|
clickable ? ui.trClickable : void 0
|
|
9610
9830
|
),
|
|
9611
|
-
children: row.getVisibleCells().map((cell) => /* @__PURE__ */
|
|
9831
|
+
children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx58(TableCell, { className: cn(ui.td), children: flexRender(
|
|
9612
9832
|
cell.column.columnDef.cell,
|
|
9613
9833
|
cell.getContext()
|
|
9614
9834
|
) }, cell.id))
|
|
9615
9835
|
},
|
|
9616
9836
|
row.id
|
|
9617
|
-
)) : emptyData || /* @__PURE__ */
|
|
9837
|
+
)) : emptyData || /* @__PURE__ */ jsx58(TableRow, { "data-accent": dataAccent, children: /* @__PURE__ */ jsx58(
|
|
9618
9838
|
TableCell,
|
|
9619
9839
|
{
|
|
9620
9840
|
colSpan: columns.length,
|
|
@@ -9627,7 +9847,7 @@ function DataTable({
|
|
|
9627
9847
|
) })
|
|
9628
9848
|
},
|
|
9629
9849
|
pageKey
|
|
9630
|
-
) }) : /* @__PURE__ */
|
|
9850
|
+
) }) : /* @__PURE__ */ jsx58(TableBody, { className: cn(ui.tbody), children: table.getRowModel().rows.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ jsx58(
|
|
9631
9851
|
TableRow,
|
|
9632
9852
|
{
|
|
9633
9853
|
"data-accent": dataAccent,
|
|
@@ -9637,13 +9857,13 @@ function DataTable({
|
|
|
9637
9857
|
ui.tr,
|
|
9638
9858
|
clickable ? ui.trClickable : void 0
|
|
9639
9859
|
),
|
|
9640
|
-
children: row.getVisibleCells().map((cell) => /* @__PURE__ */
|
|
9860
|
+
children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx58(TableCell, { className: cn(ui.td), children: flexRender(
|
|
9641
9861
|
cell.column.columnDef.cell,
|
|
9642
9862
|
cell.getContext()
|
|
9643
9863
|
) }, cell.id))
|
|
9644
9864
|
},
|
|
9645
9865
|
row.id
|
|
9646
|
-
)) : emptyData || /* @__PURE__ */
|
|
9866
|
+
)) : emptyData || /* @__PURE__ */ jsx58(TableRow, { "data-accent": dataAccent, children: /* @__PURE__ */ jsx58(
|
|
9647
9867
|
TableCell,
|
|
9648
9868
|
{
|
|
9649
9869
|
colSpan: columns.length,
|
|
@@ -9655,11 +9875,11 @@ function DataTable({
|
|
|
9655
9875
|
}
|
|
9656
9876
|
) }) })
|
|
9657
9877
|
] }) }),
|
|
9658
|
-
/* @__PURE__ */
|
|
9878
|
+
/* @__PURE__ */ jsx58(ScrollBar, { orientation: "horizontal" })
|
|
9659
9879
|
] }) }),
|
|
9660
|
-
/* @__PURE__ */
|
|
9661
|
-
/* @__PURE__ */
|
|
9662
|
-
isRowsSelected && /* @__PURE__ */
|
|
9880
|
+
/* @__PURE__ */ jsx58("div", { className: cn(ui.footer), children: /* @__PURE__ */ jsx58("div", { className: cn(ui.footerInner), children: /* @__PURE__ */ jsxs31("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-[1fr_auto] sm:items-center", children: [
|
|
9881
|
+
/* @__PURE__ */ jsxs31("div", { className: cn(ui.metaWrap), children: [
|
|
9882
|
+
isRowsSelected && /* @__PURE__ */ jsxs31("div", { children: [
|
|
9663
9883
|
table.getFilteredSelectedRowModel().rows.length,
|
|
9664
9884
|
" ",
|
|
9665
9885
|
ofLabel,
|
|
@@ -9668,36 +9888,36 @@ function DataTable({
|
|
|
9668
9888
|
" ",
|
|
9669
9889
|
rowsSelectedLabel
|
|
9670
9890
|
] }),
|
|
9671
|
-
typeof totalRows === "number" && /* @__PURE__ */
|
|
9891
|
+
typeof totalRows === "number" && /* @__PURE__ */ jsxs31("div", { children: [
|
|
9672
9892
|
"Total: ",
|
|
9673
9893
|
totalRows,
|
|
9674
9894
|
" registros"
|
|
9675
9895
|
] })
|
|
9676
9896
|
] }),
|
|
9677
|
-
/* @__PURE__ */
|
|
9678
|
-
/* @__PURE__ */
|
|
9679
|
-
/* @__PURE__ */
|
|
9680
|
-
/* @__PURE__ */
|
|
9897
|
+
/* @__PURE__ */ jsxs31("div", { className: cn(ui.controlsWrap), children: [
|
|
9898
|
+
/* @__PURE__ */ jsxs31("div", { className: "flex items-center gap-2", children: [
|
|
9899
|
+
/* @__PURE__ */ jsx58("p", { className: cn(ui.pageSizeLabel), children: rowPerPageLabel }),
|
|
9900
|
+
/* @__PURE__ */ jsxs31(
|
|
9681
9901
|
Select2,
|
|
9682
9902
|
{
|
|
9683
9903
|
value: `${pageSize}`,
|
|
9684
9904
|
onValueChange: (v) => changePageSize(Number(v)),
|
|
9685
9905
|
children: [
|
|
9686
|
-
/* @__PURE__ */
|
|
9906
|
+
/* @__PURE__ */ jsx58(
|
|
9687
9907
|
SelectTrigger,
|
|
9688
9908
|
{
|
|
9689
9909
|
"data-accent": dataAccent,
|
|
9690
9910
|
className: cn(ui.pageSizeTrigger),
|
|
9691
|
-
children: /* @__PURE__ */
|
|
9911
|
+
children: /* @__PURE__ */ jsx58(SelectValue, { placeholder: `${pageSize}` })
|
|
9692
9912
|
}
|
|
9693
9913
|
),
|
|
9694
|
-
/* @__PURE__ */
|
|
9914
|
+
/* @__PURE__ */ jsx58(SelectContent, { side: "top", children: pageSizeOptions.map((size) => /* @__PURE__ */ jsx58(SelectItem, { value: `${size}`, children: size }, size)) })
|
|
9695
9915
|
]
|
|
9696
9916
|
}
|
|
9697
9917
|
)
|
|
9698
9918
|
] }),
|
|
9699
|
-
/* @__PURE__ */
|
|
9700
|
-
/* @__PURE__ */
|
|
9919
|
+
/* @__PURE__ */ jsxs31("div", { className: "flex items-center gap-2", children: [
|
|
9920
|
+
/* @__PURE__ */ jsxs31("div", { className: cn(ui.pageLabel), children: [
|
|
9701
9921
|
pageLabel,
|
|
9702
9922
|
" ",
|
|
9703
9923
|
pageIndex + 1,
|
|
@@ -9706,7 +9926,7 @@ function DataTable({
|
|
|
9706
9926
|
" ",
|
|
9707
9927
|
safePageCount
|
|
9708
9928
|
] }),
|
|
9709
|
-
/* @__PURE__ */
|
|
9929
|
+
/* @__PURE__ */ jsx58(
|
|
9710
9930
|
Button,
|
|
9711
9931
|
{
|
|
9712
9932
|
"data-accent": dataAccent,
|
|
@@ -9715,10 +9935,10 @@ function DataTable({
|
|
|
9715
9935
|
className: cn("hidden lg:flex", ui.navButton),
|
|
9716
9936
|
onClick: () => goToPage(0),
|
|
9717
9937
|
disabled: pageIndex === 0,
|
|
9718
|
-
children: /* @__PURE__ */
|
|
9938
|
+
children: /* @__PURE__ */ jsx58(DoubleArrowLeftIcon, { className: "h-4 w-4" })
|
|
9719
9939
|
}
|
|
9720
9940
|
),
|
|
9721
|
-
/* @__PURE__ */
|
|
9941
|
+
/* @__PURE__ */ jsx58(
|
|
9722
9942
|
Button,
|
|
9723
9943
|
{
|
|
9724
9944
|
"data-accent": dataAccent,
|
|
@@ -9727,10 +9947,10 @@ function DataTable({
|
|
|
9727
9947
|
className: cn(ui.navButton),
|
|
9728
9948
|
onClick: () => goToPage(pageIndex - 1),
|
|
9729
9949
|
disabled: pageIndex === 0,
|
|
9730
|
-
children: /* @__PURE__ */
|
|
9950
|
+
children: /* @__PURE__ */ jsx58(ChevronLeft3, { className: "h-4 w-4" })
|
|
9731
9951
|
}
|
|
9732
9952
|
),
|
|
9733
|
-
/* @__PURE__ */
|
|
9953
|
+
/* @__PURE__ */ jsx58(
|
|
9734
9954
|
Button,
|
|
9735
9955
|
{
|
|
9736
9956
|
"data-accent": dataAccent,
|
|
@@ -9739,10 +9959,10 @@ function DataTable({
|
|
|
9739
9959
|
className: cn(ui.navButton),
|
|
9740
9960
|
onClick: () => goToPage(pageIndex + 1),
|
|
9741
9961
|
disabled: pageIndex + 1 >= safePageCount,
|
|
9742
|
-
children: /* @__PURE__ */
|
|
9962
|
+
children: /* @__PURE__ */ jsx58(ChevronRight3, { className: "h-4 w-4" })
|
|
9743
9963
|
}
|
|
9744
9964
|
),
|
|
9745
|
-
/* @__PURE__ */
|
|
9965
|
+
/* @__PURE__ */ jsx58(
|
|
9746
9966
|
Button,
|
|
9747
9967
|
{
|
|
9748
9968
|
"data-accent": dataAccent,
|
|
@@ -9751,11 +9971,11 @@ function DataTable({
|
|
|
9751
9971
|
className: cn("hidden lg:flex", ui.navButton),
|
|
9752
9972
|
onClick: () => goToPage(safePageCount - 1),
|
|
9753
9973
|
disabled: pageIndex + 1 >= safePageCount,
|
|
9754
|
-
children: /* @__PURE__ */
|
|
9974
|
+
children: /* @__PURE__ */ jsx58(DoubleArrowRightIcon, { className: "h-4 w-4" })
|
|
9755
9975
|
}
|
|
9756
9976
|
)
|
|
9757
9977
|
] }),
|
|
9758
|
-
/* @__PURE__ */
|
|
9978
|
+
/* @__PURE__ */ jsxs31("div", { className: "text-muted-foreground w-full text-center text-xs sm:hidden", children: [
|
|
9759
9979
|
pageLabel,
|
|
9760
9980
|
" ",
|
|
9761
9981
|
pageIndex + 1,
|
|
@@ -9772,7 +9992,7 @@ function DataTable({
|
|
|
9772
9992
|
}
|
|
9773
9993
|
|
|
9774
9994
|
// src/shared/data-table-skeleton.tsx
|
|
9775
|
-
import { jsx as
|
|
9995
|
+
import { jsx as jsx59, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
9776
9996
|
function DataTableSkeleton({
|
|
9777
9997
|
columnCount,
|
|
9778
9998
|
rowCount = 10,
|
|
@@ -9780,31 +10000,31 @@ function DataTableSkeleton({
|
|
|
9780
10000
|
filterableColumnCount = 0,
|
|
9781
10001
|
showViewOptions = true
|
|
9782
10002
|
}) {
|
|
9783
|
-
return /* @__PURE__ */
|
|
9784
|
-
/* @__PURE__ */
|
|
9785
|
-
/* @__PURE__ */
|
|
9786
|
-
searchableColumnCount > 0 ? Array.from({ length: searchableColumnCount }).map((_, i) => /* @__PURE__ */
|
|
9787
|
-
filterableColumnCount > 0 ? Array.from({ length: filterableColumnCount }).map((_, i) => /* @__PURE__ */
|
|
10003
|
+
return /* @__PURE__ */ jsxs32("div", { className: "w-full space-y-3 overflow-auto", children: [
|
|
10004
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex w-full items-center justify-between space-x-2 overflow-auto p-1", children: [
|
|
10005
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex flex-1 items-center space-x-2 space-y-4", children: [
|
|
10006
|
+
searchableColumnCount > 0 ? Array.from({ length: searchableColumnCount }).map((_, i) => /* @__PURE__ */ jsx59(Skeleton, { className: "h-10 w-37.5 lg:w-62.5" }, i)) : null,
|
|
10007
|
+
filterableColumnCount > 0 ? Array.from({ length: filterableColumnCount }).map((_, i) => /* @__PURE__ */ jsx59(Skeleton, { className: "h-10 w-17.5 border-dashed" }, i)) : null
|
|
9788
10008
|
] }),
|
|
9789
|
-
showViewOptions ? /* @__PURE__ */
|
|
10009
|
+
showViewOptions ? /* @__PURE__ */ jsx59(Skeleton, { className: "ml-auto hidden h-7 w-17.5 lg:flex" }) : null
|
|
9790
10010
|
] }),
|
|
9791
|
-
/* @__PURE__ */
|
|
9792
|
-
/* @__PURE__ */
|
|
9793
|
-
/* @__PURE__ */
|
|
10011
|
+
/* @__PURE__ */ jsx59("div", { className: "rounded-md border", children: /* @__PURE__ */ jsxs32(Table, { children: [
|
|
10012
|
+
/* @__PURE__ */ jsx59(TableHeader, { children: Array.from({ length: 1 }).map((_, i) => /* @__PURE__ */ jsx59(TableRow, { className: "hover:bg-transparent", children: Array.from({ length: columnCount }).map((_2, i2) => /* @__PURE__ */ jsx59(TableHead, { children: /* @__PURE__ */ jsx59(Skeleton, { className: "h-6 w-full" }) }, i2)) }, i)) }),
|
|
10013
|
+
/* @__PURE__ */ jsx59(TableBody, { children: Array.from({ length: rowCount }).map((_, i) => /* @__PURE__ */ jsx59(TableRow, { className: "hover:bg-transparent", children: Array.from({ length: columnCount }).map((_2, i2) => /* @__PURE__ */ jsx59(TableCell, { children: /* @__PURE__ */ jsx59(Skeleton, { className: "h-6 w-full" }) }, i2)) }, i)) })
|
|
9794
10014
|
] }) }),
|
|
9795
|
-
/* @__PURE__ */
|
|
9796
|
-
/* @__PURE__ */
|
|
9797
|
-
/* @__PURE__ */
|
|
9798
|
-
/* @__PURE__ */
|
|
9799
|
-
/* @__PURE__ */
|
|
9800
|
-
/* @__PURE__ */
|
|
10015
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex w-full flex-col items-center justify-between gap-4 overflow-auto px-2 py-1 sm:flex-row sm:gap-8", children: [
|
|
10016
|
+
/* @__PURE__ */ jsx59("div", { className: "flex-1", children: /* @__PURE__ */ jsx59(Skeleton, { className: "h-8 w-40" }) }),
|
|
10017
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex flex-col items-center gap-4 sm:flex-row sm:gap-6 lg:gap-8", children: [
|
|
10018
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex items-center space-x-2", children: [
|
|
10019
|
+
/* @__PURE__ */ jsx59(Skeleton, { className: "h-8 w-24" }),
|
|
10020
|
+
/* @__PURE__ */ jsx59(Skeleton, { className: "h-8 w-17.5" })
|
|
9801
10021
|
] }),
|
|
9802
|
-
/* @__PURE__ */
|
|
9803
|
-
/* @__PURE__ */
|
|
9804
|
-
/* @__PURE__ */
|
|
9805
|
-
/* @__PURE__ */
|
|
9806
|
-
/* @__PURE__ */
|
|
9807
|
-
/* @__PURE__ */
|
|
10022
|
+
/* @__PURE__ */ jsx59("div", { className: "flex w-25 items-center justify-center text-sm font-medium", children: /* @__PURE__ */ jsx59(Skeleton, { className: "h-8 w-20" }) }),
|
|
10023
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex items-center space-x-2", children: [
|
|
10024
|
+
/* @__PURE__ */ jsx59(Skeleton, { className: "hidden size-8 lg:block" }),
|
|
10025
|
+
/* @__PURE__ */ jsx59(Skeleton, { className: "size-8" }),
|
|
10026
|
+
/* @__PURE__ */ jsx59(Skeleton, { className: "size-8" }),
|
|
10027
|
+
/* @__PURE__ */ jsx59(Skeleton, { className: "hidden size-8 lg:block" })
|
|
9808
10028
|
] })
|
|
9809
10029
|
] })
|
|
9810
10030
|
] })
|
|
@@ -9813,7 +10033,7 @@ function DataTableSkeleton({
|
|
|
9813
10033
|
|
|
9814
10034
|
// src/shared/dropzone.tsx
|
|
9815
10035
|
import { useDropzone } from "react-dropzone";
|
|
9816
|
-
import { jsx as
|
|
10036
|
+
import { jsx as jsx60, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
9817
10037
|
function Dropzone({
|
|
9818
10038
|
label,
|
|
9819
10039
|
onChange,
|
|
@@ -9836,9 +10056,9 @@ function Dropzone({
|
|
|
9836
10056
|
},
|
|
9837
10057
|
accept
|
|
9838
10058
|
}, options));
|
|
9839
|
-
return /* @__PURE__ */
|
|
9840
|
-
label && /* @__PURE__ */
|
|
9841
|
-
/* @__PURE__ */
|
|
10059
|
+
return /* @__PURE__ */ jsxs33("div", { className: cn("space-y-2", className), children: [
|
|
10060
|
+
label && /* @__PURE__ */ jsx60("p", { className: cn("font-medium", labelClassName), children: label }),
|
|
10061
|
+
/* @__PURE__ */ jsxs33(
|
|
9842
10062
|
"div",
|
|
9843
10063
|
__spreadProps(__spreadValues({}, getRootProps()), {
|
|
9844
10064
|
className: cn(
|
|
@@ -9847,12 +10067,12 @@ function Dropzone({
|
|
|
9847
10067
|
dropzoneClassName
|
|
9848
10068
|
),
|
|
9849
10069
|
children: [
|
|
9850
|
-
/* @__PURE__ */
|
|
9851
|
-
/* @__PURE__ */
|
|
10070
|
+
/* @__PURE__ */ jsx60("input", __spreadValues({}, getInputProps())),
|
|
10071
|
+
/* @__PURE__ */ jsx60("p", { className: cn("text-gray-600", descriptionClassName), children: isDragActive ? descriptionActive : description })
|
|
9852
10072
|
]
|
|
9853
10073
|
})
|
|
9854
10074
|
),
|
|
9855
|
-
value && value.length > 0 && /* @__PURE__ */
|
|
10075
|
+
value && value.length > 0 && /* @__PURE__ */ jsx60("ul", { className: cn("text-sm text-gray-700 space-y-1", valueClassName), children: value.map((file, idx) => /* @__PURE__ */ jsxs33("li", { children: [
|
|
9856
10076
|
"\u2022 ",
|
|
9857
10077
|
file.name
|
|
9858
10078
|
] }, idx)) })
|
|
@@ -9864,7 +10084,7 @@ import { AvatarIcon } from "@radix-ui/react-icons";
|
|
|
9864
10084
|
import { CameraIcon } from "lucide-react";
|
|
9865
10085
|
import { useEffect as useEffect4, useState as useState8 } from "react";
|
|
9866
10086
|
import { useDropzone as useDropzone2 } from "react-dropzone";
|
|
9867
|
-
import { jsx as
|
|
10087
|
+
import { jsx as jsx61, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
9868
10088
|
function FileUpload({
|
|
9869
10089
|
onChange,
|
|
9870
10090
|
value = [],
|
|
@@ -9880,18 +10100,18 @@ function FileUpload({
|
|
|
9880
10100
|
onChange(acceptedFiles);
|
|
9881
10101
|
}
|
|
9882
10102
|
}, options));
|
|
9883
|
-
return /* @__PURE__ */
|
|
10103
|
+
return /* @__PURE__ */ jsx61("div", { className: cn("flex items-center justify-center", className), children: /* @__PURE__ */ jsx61(
|
|
9884
10104
|
"div",
|
|
9885
10105
|
{
|
|
9886
10106
|
className: cn(
|
|
9887
10107
|
"relative h-36 w-36 overflow-hidden rounded-full bg-gray-200 shadow-2xl",
|
|
9888
10108
|
classNameContent
|
|
9889
10109
|
),
|
|
9890
|
-
children: /* @__PURE__ */
|
|
9891
|
-
/* @__PURE__ */
|
|
9892
|
-
value.length > 0 ? /* @__PURE__ */
|
|
9893
|
-
/* @__PURE__ */
|
|
9894
|
-
/* @__PURE__ */
|
|
10110
|
+
children: /* @__PURE__ */ jsxs34("div", __spreadProps(__spreadValues({}, getRootProps({ className: "dropzone cursor-pointer" })), { children: [
|
|
10111
|
+
/* @__PURE__ */ jsx61("input", __spreadValues({}, getInputProps())),
|
|
10112
|
+
value.length > 0 ? /* @__PURE__ */ jsx61(ImagePreview, { file: value[0] }) : /* @__PURE__ */ jsx61(AvatarIcon, { className: "h-36 w-36 text-gray-100" }),
|
|
10113
|
+
/* @__PURE__ */ jsxs34("p", { className: "absolute -bottom-5 left-1/2 flex w-full -translate-x-1/2 -translate-y-1/2 transform flex-col items-center justify-center bg-gray-300 bg-opacity-50 py-1 text-xs font-normal text-muted-foreground", children: [
|
|
10114
|
+
/* @__PURE__ */ jsx61(CameraIcon, { className: "h-4 w-4 text-muted-foreground" }),
|
|
9895
10115
|
label
|
|
9896
10116
|
] })
|
|
9897
10117
|
] }))
|
|
@@ -9907,7 +10127,7 @@ function ImagePreview({ file }) {
|
|
|
9907
10127
|
URL.revokeObjectURL(url);
|
|
9908
10128
|
};
|
|
9909
10129
|
}, [file]);
|
|
9910
|
-
return objectUrl ? /* @__PURE__ */
|
|
10130
|
+
return objectUrl ? /* @__PURE__ */ jsx61(
|
|
9911
10131
|
"img",
|
|
9912
10132
|
{
|
|
9913
10133
|
src: objectUrl,
|
|
@@ -9918,23 +10138,23 @@ function ImagePreview({ file }) {
|
|
|
9918
10138
|
}
|
|
9919
10139
|
|
|
9920
10140
|
// src/shared/heading.tsx
|
|
9921
|
-
import { jsx as
|
|
10141
|
+
import { jsx as jsx62, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
9922
10142
|
function Heading({ title, description, className }) {
|
|
9923
|
-
return /* @__PURE__ */
|
|
9924
|
-
/* @__PURE__ */
|
|
9925
|
-
/* @__PURE__ */
|
|
10143
|
+
return /* @__PURE__ */ jsxs35("div", { className, children: [
|
|
10144
|
+
/* @__PURE__ */ jsx62("div", { className: "text-lg font-bold tracking-tight text-primary sm:text-3xl", children: title }),
|
|
10145
|
+
/* @__PURE__ */ jsx62("p", { className: "text-sm text-muted-foreground", children: description })
|
|
9926
10146
|
] });
|
|
9927
10147
|
}
|
|
9928
10148
|
|
|
9929
10149
|
// src/shared/page-head.tsx
|
|
9930
10150
|
import { Helmet } from "react-helmet-next";
|
|
9931
|
-
import { jsx as
|
|
10151
|
+
import { jsx as jsx63 } from "react/jsx-runtime";
|
|
9932
10152
|
function PageHead({ title = "shadcn-ui-react" }) {
|
|
9933
|
-
return /* @__PURE__ */
|
|
10153
|
+
return /* @__PURE__ */ jsx63(Helmet, { children: /* @__PURE__ */ jsx63("title", { children: title }) });
|
|
9934
10154
|
}
|
|
9935
10155
|
|
|
9936
10156
|
// src/shared/pagination-section.tsx
|
|
9937
|
-
import { jsx as
|
|
10157
|
+
import { jsx as jsx64, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
9938
10158
|
function PaginationSection({
|
|
9939
10159
|
totalPosts,
|
|
9940
10160
|
postsPerPage,
|
|
@@ -9972,17 +10192,17 @@ function PaginationSection({
|
|
|
9972
10192
|
}
|
|
9973
10193
|
};
|
|
9974
10194
|
const renderPages = () => {
|
|
9975
|
-
const renderedPages = activePages.map((page, idx) => /* @__PURE__ */
|
|
10195
|
+
const renderedPages = activePages.map((page, idx) => /* @__PURE__ */ jsx64(
|
|
9976
10196
|
PaginationItem,
|
|
9977
10197
|
{
|
|
9978
10198
|
className: currentPage === page ? "rounded-md bg-primary" : "",
|
|
9979
|
-
children: /* @__PURE__ */
|
|
10199
|
+
children: /* @__PURE__ */ jsx64(PaginationLink, { onClick: () => setCurrentPage(page), size: void 0, children: page })
|
|
9980
10200
|
},
|
|
9981
10201
|
idx
|
|
9982
10202
|
));
|
|
9983
10203
|
if (activePages[0] > 1) {
|
|
9984
10204
|
renderedPages.unshift(
|
|
9985
|
-
/* @__PURE__ */
|
|
10205
|
+
/* @__PURE__ */ jsx64(
|
|
9986
10206
|
PaginationEllipsis,
|
|
9987
10207
|
{
|
|
9988
10208
|
onClick: () => setCurrentPage(activePages[0] - 1)
|
|
@@ -9993,7 +10213,7 @@ function PaginationSection({
|
|
|
9993
10213
|
}
|
|
9994
10214
|
if (activePages[activePages.length - 1] < pageNumbers.length) {
|
|
9995
10215
|
renderedPages.push(
|
|
9996
|
-
/* @__PURE__ */
|
|
10216
|
+
/* @__PURE__ */ jsx64(
|
|
9997
10217
|
PaginationEllipsis,
|
|
9998
10218
|
{
|
|
9999
10219
|
onClick: () => setCurrentPage(activePages[activePages.length - 1] + 1)
|
|
@@ -10004,21 +10224,21 @@ function PaginationSection({
|
|
|
10004
10224
|
}
|
|
10005
10225
|
return renderedPages;
|
|
10006
10226
|
};
|
|
10007
|
-
return /* @__PURE__ */
|
|
10008
|
-
/* @__PURE__ */
|
|
10009
|
-
/* @__PURE__ */
|
|
10227
|
+
return /* @__PURE__ */ jsx64("div", { className: "p-4", children: /* @__PURE__ */ jsx64(Pagination, { children: /* @__PURE__ */ jsxs36(PaginationContent, { children: [
|
|
10228
|
+
/* @__PURE__ */ jsxs36(PaginationItem, { children: [
|
|
10229
|
+
/* @__PURE__ */ jsx64(
|
|
10010
10230
|
PaginationPreviousLast,
|
|
10011
10231
|
{
|
|
10012
10232
|
onClick: handlePrevPageLast,
|
|
10013
10233
|
size: void 0
|
|
10014
10234
|
}
|
|
10015
10235
|
),
|
|
10016
|
-
/* @__PURE__ */
|
|
10236
|
+
/* @__PURE__ */ jsx64(PaginationPrevious, { onClick: handlePrevPage, size: void 0 })
|
|
10017
10237
|
] }),
|
|
10018
10238
|
renderPages(),
|
|
10019
|
-
/* @__PURE__ */
|
|
10020
|
-
/* @__PURE__ */
|
|
10021
|
-
/* @__PURE__ */
|
|
10239
|
+
/* @__PURE__ */ jsxs36(PaginationItem, { children: [
|
|
10240
|
+
/* @__PURE__ */ jsx64(PaginationNext, { onClick: handleNextPage, size: void 0 }),
|
|
10241
|
+
/* @__PURE__ */ jsx64(PaginationNextLast, { onClick: handleNextPageLast, size: void 0 })
|
|
10022
10242
|
] })
|
|
10023
10243
|
] }) }) });
|
|
10024
10244
|
}
|
|
@@ -10270,13 +10490,11 @@ export {
|
|
|
10270
10490
|
buttonVariants,
|
|
10271
10491
|
cn,
|
|
10272
10492
|
iconButtonVariants,
|
|
10273
|
-
inputVariants,
|
|
10274
10493
|
navigationMenuTriggerStyle,
|
|
10275
10494
|
reducer,
|
|
10276
10495
|
toast,
|
|
10277
10496
|
toggleVariants,
|
|
10278
10497
|
useFormField,
|
|
10279
10498
|
useSidebar,
|
|
10280
|
-
useToast
|
|
10281
|
-
variants
|
|
10499
|
+
useToast
|
|
10282
10500
|
};
|