shadcn-ui-react 0.7.7 → 0.7.9
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/bin/shadcn-ui-react.mjs +1 -1
- package/dist/index.cjs +1542 -1160
- package/dist/index.d.cts +90 -56
- package/dist/index.d.ts +90 -56
- package/dist/index.js +1499 -1117
- package/dist/style.css +136 -22
- package/package.json +20 -19
package/dist/index.js
CHANGED
|
@@ -493,7 +493,7 @@ var BreadcrumbList = React6.forwardRef((_a, ref) => {
|
|
|
493
493
|
__spreadValues({
|
|
494
494
|
ref,
|
|
495
495
|
className: cn(
|
|
496
|
-
"flex flex-wrap items-center gap-1.5 break-
|
|
496
|
+
"flex flex-wrap items-center gap-1.5 wrap-break-word text-sm text-muted-foreground sm:gap-2.5",
|
|
497
497
|
className
|
|
498
498
|
)
|
|
499
499
|
}, props)
|
|
@@ -6298,41 +6298,24 @@ var DropdownMenuShortcut = (_a) => {
|
|
|
6298
6298
|
};
|
|
6299
6299
|
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
6300
6300
|
|
|
6301
|
-
// src/components/Form/form.tsx
|
|
6302
|
-
import
|
|
6303
|
-
|
|
6304
|
-
} from "react-hook-form";
|
|
6305
|
-
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
6306
|
-
function Form({
|
|
6307
|
-
children,
|
|
6308
|
-
methods,
|
|
6309
|
-
onSubmit,
|
|
6310
|
-
onError,
|
|
6311
|
-
formProps
|
|
6312
|
-
}) {
|
|
6313
|
-
const handleSubmit = onSubmit ? methods.handleSubmit(onSubmit, onError) : void 0;
|
|
6314
|
-
return /* @__PURE__ */ jsx18(FormProvider, __spreadProps(__spreadValues({}, methods), { children: /* @__PURE__ */ jsx18("form", __spreadProps(__spreadValues({ noValidate: true, onSubmit: handleSubmit }, formProps), { children })) }));
|
|
6315
|
-
}
|
|
6316
|
-
|
|
6317
|
-
// src/components/Form/form-checkbox.tsx
|
|
6318
|
-
import * as React47 from "react";
|
|
6319
|
-
import { Asterisk as Asterisk2 } from "lucide-react";
|
|
6301
|
+
// src/components/Form/form-component.tsx
|
|
6302
|
+
import * as React44 from "react";
|
|
6303
|
+
import { Slot as Slot4 } from "@radix-ui/react-slot";
|
|
6320
6304
|
import {
|
|
6321
|
-
|
|
6322
|
-
useFormContext as useFormContext2
|
|
6305
|
+
useFormContext
|
|
6323
6306
|
} from "react-hook-form";
|
|
6324
6307
|
|
|
6325
6308
|
// src/components/Label/label.tsx
|
|
6326
6309
|
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
6327
6310
|
import { cva as cva5 } from "class-variance-authority";
|
|
6328
6311
|
import * as React43 from "react";
|
|
6329
|
-
import { jsx as
|
|
6312
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
6330
6313
|
var labelVariants = cva5(
|
|
6331
6314
|
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 text-label"
|
|
6332
6315
|
);
|
|
6333
6316
|
var Label3 = React43.forwardRef((_a, ref) => {
|
|
6334
6317
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
6335
|
-
return /* @__PURE__ */
|
|
6318
|
+
return /* @__PURE__ */ jsx18(
|
|
6336
6319
|
LabelPrimitive.Root,
|
|
6337
6320
|
__spreadValues({
|
|
6338
6321
|
ref,
|
|
@@ -6342,250 +6325,317 @@ var Label3 = React43.forwardRef((_a, ref) => {
|
|
|
6342
6325
|
});
|
|
6343
6326
|
Label3.displayName = LabelPrimitive.Root.displayName;
|
|
6344
6327
|
|
|
6345
|
-
// src/components/Form/form-
|
|
6346
|
-
import
|
|
6347
|
-
|
|
6348
|
-
|
|
6349
|
-
import {
|
|
6350
|
-
Controller,
|
|
6351
|
-
useFormContext
|
|
6352
|
-
} from "react-hook-form";
|
|
6353
|
-
|
|
6354
|
-
// src/components/input.tsx
|
|
6355
|
-
import * as React44 from "react";
|
|
6356
|
-
import { jsx as jsx20, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
6357
|
-
var Input = React44.forwardRef(
|
|
6358
|
-
(_a, ref) => {
|
|
6359
|
-
var _b = _a, {
|
|
6360
|
-
className,
|
|
6361
|
-
variant = "outline",
|
|
6362
|
-
size = "md",
|
|
6363
|
-
leading,
|
|
6364
|
-
trailing,
|
|
6365
|
-
classNameDefault = true,
|
|
6366
|
-
invalid = false,
|
|
6367
|
-
disabled
|
|
6368
|
-
} = _b, props = __objRest(_b, [
|
|
6369
|
-
"className",
|
|
6370
|
-
"variant",
|
|
6371
|
-
"size",
|
|
6372
|
-
"leading",
|
|
6373
|
-
"trailing",
|
|
6374
|
-
"classNameDefault",
|
|
6375
|
-
"invalid",
|
|
6376
|
-
"disabled"
|
|
6377
|
-
]);
|
|
6378
|
-
const base = "block w-full bg-transparent text-foreground placeholder:text-muted-foreground outline-none transition disabled:opacity-50 disabled:cursor-not-allowed";
|
|
6379
|
-
const sizeCls = size === "sm" ? "h-9 px-3 text-sm" : size === "lg" ? "h-11 px-4 text-base" : "h-10 px-3.5 text-sm";
|
|
6380
|
-
const variants3 = {
|
|
6381
|
-
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",
|
|
6382
|
-
soft: "rounded-md border border-transparent bg-muted/60 hover:bg-muted shadow-sm focus:bg-input/80 focus:ring-2 focus:ring-primary/20",
|
|
6383
|
-
ghost: "rounded-md border border-transparent bg-transparent hover:bg-muted/50 focus:ring-2 focus:ring-ring",
|
|
6384
|
-
filled: "rounded-md border border-input bg-muted/70 hover:bg-muted shadow-inner focus:bg-input/70 focus:ring-2 focus:ring-primary/20",
|
|
6385
|
-
flushed: (
|
|
6386
|
-
// sin bordes laterales/superior, solo inferior; sin sombras ni radios
|
|
6387
|
-
"rounded-none border-0 border-b border-input px-0 shadow-none focus:border-b-2 focus:border-primary focus:ring-0"
|
|
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" : "";
|
|
6403
|
-
return /* @__PURE__ */ jsxs11("div", { className: cn("relative", disabled && "opacity-80"), children: [
|
|
6404
|
-
leading ? /* @__PURE__ */ jsx20(
|
|
6405
|
-
"span",
|
|
6406
|
-
{
|
|
6407
|
-
className: cn(
|
|
6408
|
-
"pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 opacity-60",
|
|
6409
|
-
size === "lg" ? "text-[1.15rem]" : "text-[1rem]",
|
|
6410
|
-
variant === "flushed" || variant === "link" ? "hidden" : ""
|
|
6411
|
-
),
|
|
6412
|
-
children: leading
|
|
6413
|
-
}
|
|
6414
|
-
) : null,
|
|
6415
|
-
/* @__PURE__ */ jsx20(
|
|
6416
|
-
"input",
|
|
6417
|
-
__spreadValues({
|
|
6418
|
-
ref,
|
|
6419
|
-
"aria-invalid": invalid || void 0,
|
|
6420
|
-
disabled,
|
|
6421
|
-
className: classNameDefault ? cn(
|
|
6422
|
-
base,
|
|
6423
|
-
variants3[variant],
|
|
6424
|
-
variant === "flushed" ? specialSizeForFlushed : variant === "link" ? specialSizeForLink : sizeCls,
|
|
6425
|
-
errorCls,
|
|
6426
|
-
iconPadLeft,
|
|
6427
|
-
iconPadRight,
|
|
6428
|
-
className
|
|
6429
|
-
) : className,
|
|
6430
|
-
"data-private": true
|
|
6431
|
-
}, props)
|
|
6432
|
-
),
|
|
6433
|
-
trailing ? /* @__PURE__ */ jsx20(
|
|
6434
|
-
"span",
|
|
6435
|
-
{
|
|
6436
|
-
className: cn(
|
|
6437
|
-
"absolute right-3 top-1/2 -translate-y-1/2 opacity-70",
|
|
6438
|
-
size === "lg" ? "text-[1.15rem]" : "text-[1rem]",
|
|
6439
|
-
variant === "flushed" || variant === "link" ? "hidden" : ""
|
|
6440
|
-
),
|
|
6441
|
-
children: trailing
|
|
6442
|
-
}
|
|
6443
|
-
) : null
|
|
6444
|
-
] });
|
|
6445
|
-
}
|
|
6328
|
+
// src/components/Form/form-component.tsx
|
|
6329
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
6330
|
+
var FormFieldContext = React44.createContext(
|
|
6331
|
+
null
|
|
6446
6332
|
);
|
|
6447
|
-
|
|
6448
|
-
|
|
6449
|
-
|
|
6450
|
-
|
|
6451
|
-
|
|
6452
|
-
|
|
6453
|
-
|
|
6454
|
-
|
|
6455
|
-
|
|
6456
|
-
|
|
6457
|
-
|
|
6458
|
-
|
|
6459
|
-
|
|
6460
|
-
|
|
6461
|
-
|
|
6462
|
-
|
|
6463
|
-
|
|
6464
|
-
|
|
6465
|
-
|
|
6466
|
-
|
|
6467
|
-
|
|
6468
|
-
|
|
6469
|
-
|
|
6470
|
-
|
|
6471
|
-
|
|
6472
|
-
|
|
6473
|
-
|
|
6474
|
-
|
|
6475
|
-
|
|
6476
|
-
|
|
6477
|
-
|
|
6478
|
-
|
|
6479
|
-
}
|
|
6480
|
-
|
|
6481
|
-
var
|
|
6333
|
+
function getErrorMessage(error) {
|
|
6334
|
+
const message2 = error == null ? void 0 : error.message;
|
|
6335
|
+
return typeof message2 === "string" ? message2 : void 0;
|
|
6336
|
+
}
|
|
6337
|
+
function normalizeSearchText(value) {
|
|
6338
|
+
return String(value != null ? value : "").normalize("NFD").replace(new RegExp("\\p{Diacritic}", "gu"), "").toLowerCase();
|
|
6339
|
+
}
|
|
6340
|
+
function getDefaultOptionValue(item) {
|
|
6341
|
+
var _a;
|
|
6342
|
+
if (typeof item === "string") return item;
|
|
6343
|
+
if (item && typeof item === "object" && "value" in item) {
|
|
6344
|
+
return String((_a = item.value) != null ? _a : "");
|
|
6345
|
+
}
|
|
6346
|
+
return String(item != null ? item : "");
|
|
6347
|
+
}
|
|
6348
|
+
function getDefaultOptionLabel(item) {
|
|
6349
|
+
if (item && typeof item === "object" && "label" in item) {
|
|
6350
|
+
return item.label;
|
|
6351
|
+
}
|
|
6352
|
+
return getDefaultOptionValue(item);
|
|
6353
|
+
}
|
|
6354
|
+
function getNextEnabledIndex(options, currentIndex, direction) {
|
|
6355
|
+
var _a;
|
|
6356
|
+
if (!options.length) return -1;
|
|
6357
|
+
let nextIndex = currentIndex;
|
|
6358
|
+
for (let index = 0; index < options.length; index += 1) {
|
|
6359
|
+
nextIndex = (nextIndex + direction + options.length) % options.length;
|
|
6360
|
+
if (!((_a = options[nextIndex]) == null ? void 0 : _a.disabled)) {
|
|
6361
|
+
return nextIndex;
|
|
6362
|
+
}
|
|
6363
|
+
}
|
|
6364
|
+
return -1;
|
|
6365
|
+
}
|
|
6366
|
+
var FormItemContext = React44.createContext(null);
|
|
6367
|
+
var FormItem = React44.forwardRef((_a, ref) => {
|
|
6482
6368
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
6483
|
-
|
|
6484
|
-
|
|
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
|
-
);
|
|
6369
|
+
const id = React44.useId();
|
|
6370
|
+
return /* @__PURE__ */ jsx19(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ jsx19("div", __spreadValues({ ref, className: cn("space-y-2", className) }, props)) });
|
|
6495
6371
|
});
|
|
6496
|
-
|
|
6497
|
-
var
|
|
6372
|
+
FormItem.displayName = "FormItem";
|
|
6373
|
+
var useFormField = () => {
|
|
6374
|
+
var _a;
|
|
6375
|
+
const generatedId = React44.useId();
|
|
6376
|
+
const fieldContext = React44.useContext(FormFieldContext);
|
|
6377
|
+
const itemContext = React44.useContext(FormItemContext);
|
|
6378
|
+
const formContext = useFormContext();
|
|
6379
|
+
const id = (_a = itemContext == null ? void 0 : itemContext.id) != null ? _a : generatedId;
|
|
6380
|
+
if (!fieldContext || !formContext) {
|
|
6381
|
+
return {
|
|
6382
|
+
id,
|
|
6383
|
+
formItemId: `${id}-form-item`,
|
|
6384
|
+
formDescriptionId: `${id}-form-item-description`,
|
|
6385
|
+
formMessageId: `${id}-form-item-message`,
|
|
6386
|
+
error: void 0
|
|
6387
|
+
};
|
|
6388
|
+
}
|
|
6389
|
+
const fieldState = formContext.getFieldState(
|
|
6390
|
+
fieldContext.name,
|
|
6391
|
+
formContext.formState
|
|
6392
|
+
);
|
|
6393
|
+
return __spreadValues({
|
|
6394
|
+
id,
|
|
6395
|
+
name: fieldContext.name,
|
|
6396
|
+
formItemId: `${id}-form-item`,
|
|
6397
|
+
formDescriptionId: `${id}-form-item-description`,
|
|
6398
|
+
formMessageId: `${id}-form-item-message`
|
|
6399
|
+
}, fieldState);
|
|
6400
|
+
};
|
|
6401
|
+
var FormLabel = React44.forwardRef((_a, ref) => {
|
|
6498
6402
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
6499
|
-
|
|
6500
|
-
|
|
6501
|
-
|
|
6403
|
+
const { error, formItemId } = useFormField();
|
|
6404
|
+
return /* @__PURE__ */ jsx19(
|
|
6405
|
+
Label3,
|
|
6406
|
+
__spreadValues({
|
|
6502
6407
|
ref,
|
|
6503
|
-
className: cn(
|
|
6504
|
-
|
|
6505
|
-
|
|
6506
|
-
)
|
|
6507
|
-
}, props), {
|
|
6508
|
-
children: /* @__PURE__ */ jsx21(ChevronDownIcon2, {})
|
|
6509
|
-
})
|
|
6408
|
+
className: cn(error && "text-destructive", className),
|
|
6409
|
+
htmlFor: formItemId
|
|
6410
|
+
}, props)
|
|
6510
6411
|
);
|
|
6511
6412
|
});
|
|
6512
|
-
|
|
6513
|
-
var
|
|
6514
|
-
var
|
|
6515
|
-
|
|
6516
|
-
|
|
6517
|
-
|
|
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,
|
|
6413
|
+
FormLabel.displayName = "FormLabel";
|
|
6414
|
+
var FormControl = React44.forwardRef((_a, ref) => {
|
|
6415
|
+
var props = __objRest(_a, []);
|
|
6416
|
+
const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
|
|
6417
|
+
return /* @__PURE__ */ jsx19(
|
|
6418
|
+
Slot4,
|
|
6548
6419
|
__spreadValues({
|
|
6549
6420
|
ref,
|
|
6550
|
-
|
|
6421
|
+
id: formItemId,
|
|
6422
|
+
"aria-describedby": error ? `${formDescriptionId} ${formMessageId}` : formDescriptionId,
|
|
6423
|
+
"aria-invalid": Boolean(error)
|
|
6551
6424
|
}, props)
|
|
6552
6425
|
);
|
|
6553
6426
|
});
|
|
6554
|
-
|
|
6555
|
-
var
|
|
6427
|
+
FormControl.displayName = "FormControl";
|
|
6428
|
+
var FormMessage = React44.forwardRef((_a, ref) => {
|
|
6556
6429
|
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
6557
|
-
|
|
6558
|
-
|
|
6430
|
+
const { error, formMessageId } = useFormField();
|
|
6431
|
+
const body = error ? getErrorMessage(error) : children;
|
|
6432
|
+
if (!body) return null;
|
|
6433
|
+
return /* @__PURE__ */ jsx19(
|
|
6434
|
+
"p",
|
|
6559
6435
|
__spreadProps(__spreadValues({
|
|
6560
6436
|
ref,
|
|
6561
|
-
|
|
6562
|
-
|
|
6563
|
-
className
|
|
6564
|
-
)
|
|
6437
|
+
id: formMessageId,
|
|
6438
|
+
className: cn("text-[0.8rem] font-medium text-destructive", className)
|
|
6565
6439
|
}, 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
|
-
]
|
|
6440
|
+
children: body
|
|
6570
6441
|
})
|
|
6571
6442
|
);
|
|
6572
6443
|
});
|
|
6573
|
-
|
|
6574
|
-
var
|
|
6444
|
+
FormMessage.displayName = "FormMessage";
|
|
6445
|
+
var FormDescription = React44.forwardRef((_a, ref) => {
|
|
6575
6446
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
6576
|
-
|
|
6577
|
-
|
|
6447
|
+
const { formDescriptionId } = useFormField();
|
|
6448
|
+
return /* @__PURE__ */ jsx19(
|
|
6449
|
+
"p",
|
|
6578
6450
|
__spreadValues({
|
|
6579
6451
|
ref,
|
|
6580
|
-
|
|
6452
|
+
id: formDescriptionId,
|
|
6453
|
+
className: cn("text-[0.8rem] text-muted-foreground", className)
|
|
6581
6454
|
}, props)
|
|
6582
6455
|
);
|
|
6583
6456
|
});
|
|
6584
|
-
|
|
6457
|
+
FormDescription.displayName = "FormDescription";
|
|
6458
|
+
|
|
6459
|
+
// src/components/Form/form.tsx
|
|
6460
|
+
import {
|
|
6461
|
+
FormProvider
|
|
6462
|
+
} from "react-hook-form";
|
|
6463
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
6464
|
+
function Form({
|
|
6465
|
+
children,
|
|
6466
|
+
methods,
|
|
6467
|
+
onSubmit,
|
|
6468
|
+
onError,
|
|
6469
|
+
formProps
|
|
6470
|
+
}) {
|
|
6471
|
+
const handleSubmit = onSubmit ? methods.handleSubmit(onSubmit, onError) : void 0;
|
|
6472
|
+
return /* @__PURE__ */ jsx20(FormProvider, __spreadProps(__spreadValues({}, methods), { children: /* @__PURE__ */ jsx20("form", __spreadProps(__spreadValues({ noValidate: true, onSubmit: handleSubmit }, formProps), { children })) }));
|
|
6473
|
+
}
|
|
6474
|
+
|
|
6475
|
+
// src/components/Form/form-checkbox.tsx
|
|
6476
|
+
import * as React45 from "react";
|
|
6477
|
+
import { Asterisk } from "lucide-react";
|
|
6478
|
+
import {
|
|
6479
|
+
Controller,
|
|
6480
|
+
useFormContext as useFormContext2
|
|
6481
|
+
} from "react-hook-form";
|
|
6482
|
+
import { jsx as jsx21, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
6483
|
+
var FormCheckbox = (_a) => {
|
|
6484
|
+
var _b = _a, {
|
|
6485
|
+
name,
|
|
6486
|
+
control,
|
|
6487
|
+
rules,
|
|
6488
|
+
shouldUnregister,
|
|
6489
|
+
defaultValue,
|
|
6490
|
+
label,
|
|
6491
|
+
description,
|
|
6492
|
+
requiredLabel,
|
|
6493
|
+
className,
|
|
6494
|
+
itemClassName,
|
|
6495
|
+
checkboxClassName,
|
|
6496
|
+
labelClassName,
|
|
6497
|
+
descriptionClassName,
|
|
6498
|
+
messageClassName,
|
|
6499
|
+
requiredLabelClassName,
|
|
6500
|
+
onChange
|
|
6501
|
+
} = _b, checkboxProps = __objRest(_b, [
|
|
6502
|
+
"name",
|
|
6503
|
+
"control",
|
|
6504
|
+
"rules",
|
|
6505
|
+
"shouldUnregister",
|
|
6506
|
+
"defaultValue",
|
|
6507
|
+
"label",
|
|
6508
|
+
"description",
|
|
6509
|
+
"requiredLabel",
|
|
6510
|
+
"className",
|
|
6511
|
+
"itemClassName",
|
|
6512
|
+
"checkboxClassName",
|
|
6513
|
+
"labelClassName",
|
|
6514
|
+
"descriptionClassName",
|
|
6515
|
+
"messageClassName",
|
|
6516
|
+
"requiredLabelClassName",
|
|
6517
|
+
"onChange"
|
|
6518
|
+
]);
|
|
6519
|
+
var _a2;
|
|
6520
|
+
const generatedId = React45.useId();
|
|
6521
|
+
const form = useFormContext2();
|
|
6522
|
+
const controllerControl = control != null ? control : form == null ? void 0 : form.control;
|
|
6523
|
+
const checkboxId = (_a2 = checkboxProps.id) != null ? _a2 : `${generatedId}-checkbox`;
|
|
6524
|
+
const descriptionId = `${generatedId}-description`;
|
|
6525
|
+
const messageId = `${generatedId}-message`;
|
|
6526
|
+
return /* @__PURE__ */ jsx21(
|
|
6527
|
+
Controller,
|
|
6528
|
+
{
|
|
6529
|
+
control: controllerControl,
|
|
6530
|
+
name,
|
|
6531
|
+
rules,
|
|
6532
|
+
shouldUnregister,
|
|
6533
|
+
defaultValue,
|
|
6534
|
+
render: ({ field, fieldState }) => {
|
|
6535
|
+
var _a3;
|
|
6536
|
+
const checked = Boolean(field.value);
|
|
6537
|
+
const fieldError = (_a3 = fieldState.error) == null ? void 0 : _a3.message;
|
|
6538
|
+
const hasError = Boolean(fieldError);
|
|
6539
|
+
return /* @__PURE__ */ jsx21(FormItem, { className: cn("space-y-1.5", itemClassName), children: /* @__PURE__ */ jsxs11(
|
|
6540
|
+
"div",
|
|
6541
|
+
{
|
|
6542
|
+
className: cn(
|
|
6543
|
+
"flex items-start gap-3 rounded-lg border border-transparent p-1 transition-colors",
|
|
6544
|
+
hasError && "border-destructive/20 bg-destructive/5",
|
|
6545
|
+
className
|
|
6546
|
+
),
|
|
6547
|
+
children: [
|
|
6548
|
+
/* @__PURE__ */ jsx21(
|
|
6549
|
+
Checkbox,
|
|
6550
|
+
__spreadProps(__spreadValues({}, checkboxProps), {
|
|
6551
|
+
ref: field.ref,
|
|
6552
|
+
id: checkboxId,
|
|
6553
|
+
checked,
|
|
6554
|
+
invalid: hasError || checkboxProps.invalid,
|
|
6555
|
+
"aria-invalid": hasError || checkboxProps.invalid || void 0,
|
|
6556
|
+
"aria-describedby": [
|
|
6557
|
+
description ? descriptionId : void 0,
|
|
6558
|
+
hasError ? messageId : void 0
|
|
6559
|
+
].filter(Boolean).join(" ") || void 0,
|
|
6560
|
+
className: cn("mt-0.5", checkboxClassName),
|
|
6561
|
+
onBlur: field.onBlur,
|
|
6562
|
+
onCheckedChange: (value) => {
|
|
6563
|
+
const nextValue = value === true;
|
|
6564
|
+
field.onChange(nextValue);
|
|
6565
|
+
onChange == null ? void 0 : onChange(nextValue);
|
|
6566
|
+
}
|
|
6567
|
+
})
|
|
6568
|
+
),
|
|
6569
|
+
/* @__PURE__ */ jsxs11("div", { className: "min-w-0 flex-1", children: [
|
|
6570
|
+
label ? /* @__PURE__ */ jsxs11(
|
|
6571
|
+
Label3,
|
|
6572
|
+
{
|
|
6573
|
+
htmlFor: checkboxId,
|
|
6574
|
+
className: cn(
|
|
6575
|
+
"inline-flex cursor-pointer items-start gap-1 text-sm font-medium leading-none text-foreground",
|
|
6576
|
+
checkboxProps.disabled && "cursor-not-allowed text-muted-foreground",
|
|
6577
|
+
hasError && "text-destructive",
|
|
6578
|
+
labelClassName
|
|
6579
|
+
),
|
|
6580
|
+
children: [
|
|
6581
|
+
/* @__PURE__ */ jsx21("span", { children: label }),
|
|
6582
|
+
requiredLabel ? /* @__PURE__ */ jsx21(
|
|
6583
|
+
Asterisk,
|
|
6584
|
+
{
|
|
6585
|
+
"aria-hidden": "true",
|
|
6586
|
+
className: cn(
|
|
6587
|
+
"mt-0.5 h-3 w-3 shrink-0 text-red-500",
|
|
6588
|
+
requiredLabelClassName
|
|
6589
|
+
)
|
|
6590
|
+
}
|
|
6591
|
+
) : null
|
|
6592
|
+
]
|
|
6593
|
+
}
|
|
6594
|
+
) : null,
|
|
6595
|
+
description ? /* @__PURE__ */ jsx21(
|
|
6596
|
+
"p",
|
|
6597
|
+
{
|
|
6598
|
+
id: descriptionId,
|
|
6599
|
+
className: cn(
|
|
6600
|
+
"mt-1 text-sm leading-relaxed text-muted-foreground",
|
|
6601
|
+
descriptionClassName
|
|
6602
|
+
),
|
|
6603
|
+
children: description
|
|
6604
|
+
}
|
|
6605
|
+
) : null,
|
|
6606
|
+
fieldError ? /* @__PURE__ */ jsx21(
|
|
6607
|
+
"p",
|
|
6608
|
+
{
|
|
6609
|
+
id: messageId,
|
|
6610
|
+
className: cn(
|
|
6611
|
+
"mt-1 text-sm font-medium text-destructive",
|
|
6612
|
+
messageClassName
|
|
6613
|
+
),
|
|
6614
|
+
children: fieldError
|
|
6615
|
+
}
|
|
6616
|
+
) : null
|
|
6617
|
+
] })
|
|
6618
|
+
]
|
|
6619
|
+
}
|
|
6620
|
+
) });
|
|
6621
|
+
}
|
|
6622
|
+
}
|
|
6623
|
+
);
|
|
6624
|
+
};
|
|
6625
|
+
FormCheckbox.displayName = "FormCheckbox";
|
|
6585
6626
|
|
|
6586
6627
|
// src/components/Form/form-field.tsx
|
|
6587
|
-
import {
|
|
6588
|
-
|
|
6628
|
+
import { Asterisk as Asterisk2 } from "lucide-react";
|
|
6629
|
+
import {
|
|
6630
|
+
Controller as Controller2,
|
|
6631
|
+
useFormContext as useFormContext3
|
|
6632
|
+
} from "react-hook-form";
|
|
6633
|
+
|
|
6634
|
+
// src/components/input.tsx
|
|
6635
|
+
import * as React46 from "react";
|
|
6636
|
+
|
|
6637
|
+
// src/components/Form/utils/form-utils.ts
|
|
6638
|
+
var formInputVariants = {
|
|
6589
6639
|
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
6640
|
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
6641
|
ghost: "rounded-md border border-transparent bg-transparent hover:bg-muted/50 focus:ring-2 focus:ring-ring",
|
|
@@ -6594,11 +6644,176 @@ var inputVariants = {
|
|
|
6594
6644
|
unstyled: "border-0 shadow-none focus:ring-0",
|
|
6595
6645
|
link: "h-auto border-0 bg-transparent p-0 text-primary shadow-none underline-offset-4 focus:underline focus:ring-0"
|
|
6596
6646
|
};
|
|
6597
|
-
var variants =
|
|
6598
|
-
var
|
|
6599
|
-
|
|
6647
|
+
var variants = formInputVariants;
|
|
6648
|
+
var formSizeVariants = {
|
|
6649
|
+
"2xs": {
|
|
6650
|
+
control: "h-7 px-2 text-xs",
|
|
6651
|
+
flushedControl: "h-7 text-xs",
|
|
6652
|
+
linkControl: "text-xs",
|
|
6653
|
+
selectItem: "h-7 text-xs",
|
|
6654
|
+
searchInput: "h-7 px-2 text-xs",
|
|
6655
|
+
checkbox: "size-3",
|
|
6656
|
+
label: "text-xs",
|
|
6657
|
+
description: "text-xs",
|
|
6658
|
+
message: "text-xs"
|
|
6659
|
+
},
|
|
6660
|
+
xs: {
|
|
6661
|
+
control: "h-8 px-2.5 text-xs",
|
|
6662
|
+
flushedControl: "h-8 text-xs",
|
|
6663
|
+
linkControl: "text-xs",
|
|
6664
|
+
selectItem: "h-8 text-xs",
|
|
6665
|
+
searchInput: "h-8 px-2.5 text-xs",
|
|
6666
|
+
checkbox: "size-3.5",
|
|
6667
|
+
label: "text-xs",
|
|
6668
|
+
description: "text-xs",
|
|
6669
|
+
message: "text-xs"
|
|
6670
|
+
},
|
|
6671
|
+
sm: {
|
|
6672
|
+
control: "h-9 px-3 text-sm",
|
|
6673
|
+
flushedControl: "h-9 text-sm",
|
|
6674
|
+
linkControl: "text-sm",
|
|
6675
|
+
selectItem: "h-8 text-sm",
|
|
6676
|
+
searchInput: "h-9 px-3 text-sm",
|
|
6677
|
+
checkbox: "size-4",
|
|
6678
|
+
label: "text-sm",
|
|
6679
|
+
description: "text-sm",
|
|
6680
|
+
message: "text-sm"
|
|
6681
|
+
},
|
|
6682
|
+
md: {
|
|
6683
|
+
control: "h-10 px-3.5 text-sm",
|
|
6684
|
+
flushedControl: "h-10 text-sm",
|
|
6685
|
+
linkControl: "text-sm",
|
|
6686
|
+
selectItem: "h-9 text-sm",
|
|
6687
|
+
searchInput: "h-10 px-3.5 text-sm",
|
|
6688
|
+
checkbox: "size-4",
|
|
6689
|
+
label: "text-sm",
|
|
6690
|
+
description: "text-sm",
|
|
6691
|
+
message: "text-sm"
|
|
6692
|
+
},
|
|
6693
|
+
lg: {
|
|
6694
|
+
control: "h-11 px-4 text-base",
|
|
6695
|
+
flushedControl: "h-11 text-base",
|
|
6696
|
+
linkControl: "text-base",
|
|
6697
|
+
selectItem: "h-10 text-base",
|
|
6698
|
+
searchInput: "h-11 px-4 text-base",
|
|
6699
|
+
checkbox: "size-5",
|
|
6700
|
+
label: "text-base",
|
|
6701
|
+
description: "text-sm",
|
|
6702
|
+
message: "text-sm"
|
|
6703
|
+
},
|
|
6704
|
+
xl: {
|
|
6705
|
+
control: "h-12 px-4 text-base",
|
|
6706
|
+
flushedControl: "h-12 text-base",
|
|
6707
|
+
linkControl: "text-base",
|
|
6708
|
+
selectItem: "h-11 text-base",
|
|
6709
|
+
searchInput: "h-12 px-4 text-base",
|
|
6710
|
+
checkbox: "size-6",
|
|
6711
|
+
label: "text-base",
|
|
6712
|
+
description: "text-sm",
|
|
6713
|
+
message: "text-sm"
|
|
6714
|
+
},
|
|
6715
|
+
"2xl": {
|
|
6716
|
+
control: "h-14 px-5 text-lg",
|
|
6717
|
+
flushedControl: "h-14 text-lg",
|
|
6718
|
+
linkControl: "text-lg",
|
|
6719
|
+
selectItem: "h-12 text-lg",
|
|
6720
|
+
searchInput: "h-14 px-5 text-lg",
|
|
6721
|
+
checkbox: "size-7",
|
|
6722
|
+
label: "text-lg",
|
|
6723
|
+
description: "text-base",
|
|
6724
|
+
message: "text-base"
|
|
6725
|
+
}
|
|
6726
|
+
};
|
|
6727
|
+
function getFormSizeClasses(size = "md", customSize) {
|
|
6728
|
+
return __spreadValues(__spreadValues({}, formSizeVariants[size]), customSize);
|
|
6729
|
+
}
|
|
6730
|
+
|
|
6731
|
+
// src/components/input.tsx
|
|
6732
|
+
import { jsx as jsx22, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
6733
|
+
var Input = React46.forwardRef(
|
|
6734
|
+
(_a, ref) => {
|
|
6735
|
+
var _b = _a, {
|
|
6736
|
+
className,
|
|
6737
|
+
variant = "outline",
|
|
6738
|
+
size = "md",
|
|
6739
|
+
customSize,
|
|
6740
|
+
leading,
|
|
6741
|
+
trailing,
|
|
6742
|
+
classNameDefault = true,
|
|
6743
|
+
invalid = false,
|
|
6744
|
+
disabled
|
|
6745
|
+
} = _b, props = __objRest(_b, [
|
|
6746
|
+
"className",
|
|
6747
|
+
"variant",
|
|
6748
|
+
"size",
|
|
6749
|
+
"customSize",
|
|
6750
|
+
"leading",
|
|
6751
|
+
"trailing",
|
|
6752
|
+
"classNameDefault",
|
|
6753
|
+
"invalid",
|
|
6754
|
+
"disabled"
|
|
6755
|
+
]);
|
|
6756
|
+
const sizeClasses = getFormSizeClasses(size, customSize);
|
|
6757
|
+
const base = "block w-full bg-transparent text-foreground placeholder:text-muted-foreground outline-none transition disabled:cursor-not-allowed disabled:opacity-50";
|
|
6758
|
+
const inputSizeClass = variant === "flushed" ? sizeClasses.flushedControl : variant === "link" ? sizeClasses.linkControl : sizeClasses.control;
|
|
6759
|
+
const errorClass = invalid ? "border-destructive focus:border-destructive focus:ring-destructive/20" : "";
|
|
6760
|
+
const hasIconPadding = variant !== "flushed" && variant !== "link";
|
|
6761
|
+
const iconPaddingLeft = leading && hasIconPadding ? size === "xl" || size === "2xl" ? "pl-14" : size === "lg" ? "pl-12" : size === "2xs" || size === "xs" ? "pl-8" : "pl-10" : "";
|
|
6762
|
+
const iconPaddingRight = trailing && hasIconPadding ? size === "xl" || size === "2xl" ? "pr-14" : size === "lg" ? "pr-12" : size === "2xs" || size === "xs" ? "pr-8" : "pr-10" : "";
|
|
6763
|
+
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]";
|
|
6764
|
+
const iconPositionClass = size === "2xs" || size === "xs" ? "left-2" : size === "xl" || size === "2xl" ? "left-4" : "left-3";
|
|
6765
|
+
const trailingIconPositionClass = size === "2xs" || size === "xs" ? "right-2" : size === "xl" || size === "2xl" ? "right-4" : "right-3";
|
|
6766
|
+
return /* @__PURE__ */ jsxs12("div", { className: cn("relative", disabled && "opacity-80"), children: [
|
|
6767
|
+
leading ? /* @__PURE__ */ jsx22(
|
|
6768
|
+
"span",
|
|
6769
|
+
{
|
|
6770
|
+
className: cn(
|
|
6771
|
+
"pointer-events-none absolute top-1/2 -translate-y-1/2 opacity-60",
|
|
6772
|
+
iconPositionClass,
|
|
6773
|
+
iconSizeClass,
|
|
6774
|
+
!hasIconPadding && "hidden"
|
|
6775
|
+
),
|
|
6776
|
+
children: leading
|
|
6777
|
+
}
|
|
6778
|
+
) : null,
|
|
6779
|
+
/* @__PURE__ */ jsx22(
|
|
6780
|
+
"input",
|
|
6781
|
+
__spreadValues({
|
|
6782
|
+
ref,
|
|
6783
|
+
"aria-invalid": invalid || void 0,
|
|
6784
|
+
disabled,
|
|
6785
|
+
className: classNameDefault ? cn(
|
|
6786
|
+
base,
|
|
6787
|
+
formInputVariants[variant],
|
|
6788
|
+
inputSizeClass,
|
|
6789
|
+
errorClass,
|
|
6790
|
+
iconPaddingLeft,
|
|
6791
|
+
iconPaddingRight,
|
|
6792
|
+
className
|
|
6793
|
+
) : className,
|
|
6794
|
+
"data-private": true
|
|
6795
|
+
}, props)
|
|
6796
|
+
),
|
|
6797
|
+
trailing ? /* @__PURE__ */ jsx22(
|
|
6798
|
+
"span",
|
|
6799
|
+
{
|
|
6800
|
+
className: cn(
|
|
6801
|
+
"absolute top-1/2 -translate-y-1/2 opacity-70",
|
|
6802
|
+
trailingIconPositionClass,
|
|
6803
|
+
iconSizeClass,
|
|
6804
|
+
!hasIconPadding && "hidden"
|
|
6805
|
+
),
|
|
6806
|
+
children: trailing
|
|
6807
|
+
}
|
|
6808
|
+
) : null
|
|
6809
|
+
] });
|
|
6810
|
+
}
|
|
6600
6811
|
);
|
|
6601
|
-
|
|
6812
|
+
Input.displayName = "Input";
|
|
6813
|
+
|
|
6814
|
+
// src/components/Form/form-field.tsx
|
|
6815
|
+
import { jsx as jsx23, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
6816
|
+
function getErrorMessage2(error) {
|
|
6602
6817
|
const message2 = error == null ? void 0 : error.message;
|
|
6603
6818
|
return typeof message2 === "string" ? message2 : void 0;
|
|
6604
6819
|
}
|
|
@@ -6617,6 +6832,7 @@ var FormField = (_a) => {
|
|
|
6617
6832
|
requiredLabelClassName,
|
|
6618
6833
|
variant = "outline",
|
|
6619
6834
|
size = "md",
|
|
6835
|
+
customSize,
|
|
6620
6836
|
rules,
|
|
6621
6837
|
shouldUnregister,
|
|
6622
6838
|
defaultValue,
|
|
@@ -6638,6 +6854,7 @@ var FormField = (_a) => {
|
|
|
6638
6854
|
"requiredLabelClassName",
|
|
6639
6855
|
"variant",
|
|
6640
6856
|
"size",
|
|
6857
|
+
"customSize",
|
|
6641
6858
|
"rules",
|
|
6642
6859
|
"shouldUnregister",
|
|
6643
6860
|
"defaultValue",
|
|
@@ -6646,10 +6863,10 @@ var FormField = (_a) => {
|
|
|
6646
6863
|
"invalid",
|
|
6647
6864
|
"onChange"
|
|
6648
6865
|
]);
|
|
6649
|
-
const form =
|
|
6866
|
+
const form = useFormContext3();
|
|
6650
6867
|
const controllerControl = control != null ? control : form == null ? void 0 : form.control;
|
|
6651
|
-
return /* @__PURE__ */
|
|
6652
|
-
|
|
6868
|
+
return /* @__PURE__ */ jsx23(FormFieldContext.Provider, { value: { name }, children: /* @__PURE__ */ jsx23(
|
|
6869
|
+
Controller2,
|
|
6653
6870
|
{
|
|
6654
6871
|
control: controllerControl,
|
|
6655
6872
|
name,
|
|
@@ -6658,16 +6875,16 @@ var FormField = (_a) => {
|
|
|
6658
6875
|
defaultValue,
|
|
6659
6876
|
render: ({ field, fieldState }) => {
|
|
6660
6877
|
var _a2;
|
|
6661
|
-
const fieldError =
|
|
6878
|
+
const fieldError = getErrorMessage2(fieldState.error);
|
|
6662
6879
|
return /* @__PURE__ */ jsxs13(FormItem, { className: itemClassName, children: [
|
|
6663
6880
|
label ? /* @__PURE__ */ jsxs13(
|
|
6664
6881
|
FormLabel,
|
|
6665
6882
|
{
|
|
6666
6883
|
className: cn("flex items-center gap-0.5", labelClassName),
|
|
6667
6884
|
children: [
|
|
6668
|
-
/* @__PURE__ */
|
|
6669
|
-
requiredLabel ? /* @__PURE__ */
|
|
6670
|
-
|
|
6885
|
+
/* @__PURE__ */ jsx23("span", { children: label }),
|
|
6886
|
+
requiredLabel ? /* @__PURE__ */ jsx23(
|
|
6887
|
+
Asterisk2,
|
|
6671
6888
|
{
|
|
6672
6889
|
"aria-hidden": "true",
|
|
6673
6890
|
className: cn(
|
|
@@ -6679,7 +6896,7 @@ var FormField = (_a) => {
|
|
|
6679
6896
|
]
|
|
6680
6897
|
}
|
|
6681
6898
|
) : null,
|
|
6682
|
-
/* @__PURE__ */
|
|
6899
|
+
/* @__PURE__ */ jsx23(FormControl, { children: /* @__PURE__ */ jsx23(
|
|
6683
6900
|
Input,
|
|
6684
6901
|
__spreadProps(__spreadValues(__spreadValues({}, field), inputProps), {
|
|
6685
6902
|
value: (_a2 = field.value) != null ? _a2 : "",
|
|
@@ -6698,136 +6915,180 @@ var FormField = (_a) => {
|
|
|
6698
6915
|
invalid: invalid || Boolean(fieldError),
|
|
6699
6916
|
variant,
|
|
6700
6917
|
size,
|
|
6918
|
+
customSize,
|
|
6701
6919
|
placeholder,
|
|
6702
6920
|
className: cn(className),
|
|
6703
6921
|
classNameDefault
|
|
6704
6922
|
})
|
|
6705
6923
|
) }),
|
|
6706
|
-
fieldError ? /* @__PURE__ */
|
|
6924
|
+
fieldError ? /* @__PURE__ */ jsx23(FormMessage, { className: messageClassName, children: fieldError }) : null
|
|
6707
6925
|
] });
|
|
6708
6926
|
}
|
|
6709
6927
|
}
|
|
6710
6928
|
) });
|
|
6711
6929
|
};
|
|
6712
6930
|
FormField.displayName = "FormField";
|
|
6713
|
-
|
|
6714
|
-
|
|
6715
|
-
|
|
6716
|
-
|
|
6717
|
-
|
|
6718
|
-
|
|
6719
|
-
|
|
6720
|
-
|
|
6721
|
-
|
|
6722
|
-
|
|
6723
|
-
|
|
6724
|
-
|
|
6725
|
-
|
|
6726
|
-
|
|
6727
|
-
|
|
6728
|
-
|
|
6729
|
-
|
|
6730
|
-
|
|
6731
|
-
|
|
6732
|
-
|
|
6733
|
-
|
|
6734
|
-
|
|
6735
|
-
|
|
6736
|
-
|
|
6737
|
-
|
|
6738
|
-
|
|
6931
|
+
|
|
6932
|
+
// src/components/Form/form-select.tsx
|
|
6933
|
+
import * as React48 from "react";
|
|
6934
|
+
import { Asterisk as Asterisk3 } from "lucide-react";
|
|
6935
|
+
import {
|
|
6936
|
+
Controller as Controller3,
|
|
6937
|
+
useFormContext as useFormContext4
|
|
6938
|
+
} from "react-hook-form";
|
|
6939
|
+
|
|
6940
|
+
// src/components/select.tsx
|
|
6941
|
+
import {
|
|
6942
|
+
CaretSortIcon,
|
|
6943
|
+
CheckIcon as CheckIcon4,
|
|
6944
|
+
ChevronDownIcon as ChevronDownIcon2,
|
|
6945
|
+
ChevronUpIcon
|
|
6946
|
+
} from "@radix-ui/react-icons";
|
|
6947
|
+
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
6948
|
+
import * as React47 from "react";
|
|
6949
|
+
import { jsx as jsx24, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
6950
|
+
var Select2 = SelectPrimitive.Root;
|
|
6951
|
+
var SelectGroup = SelectPrimitive.Group;
|
|
6952
|
+
var SelectValue = SelectPrimitive.Value;
|
|
6953
|
+
var SelectTrigger = React47.forwardRef((_a, ref) => {
|
|
6954
|
+
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
6955
|
+
return /* @__PURE__ */ jsxs14(
|
|
6956
|
+
SelectPrimitive.Trigger,
|
|
6957
|
+
__spreadProps(__spreadValues({
|
|
6958
|
+
ref,
|
|
6959
|
+
className: cn(
|
|
6960
|
+
"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",
|
|
6961
|
+
className
|
|
6962
|
+
)
|
|
6963
|
+
}, props), {
|
|
6964
|
+
children: [
|
|
6965
|
+
children,
|
|
6966
|
+
/* @__PURE__ */ jsx24(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx24(CaretSortIcon, { className: "h-4 w-4 opacity-50" }) })
|
|
6967
|
+
]
|
|
6968
|
+
})
|
|
6739
6969
|
);
|
|
6740
|
-
|
|
6741
|
-
|
|
6742
|
-
|
|
6743
|
-
formItemId: `${id}-form-item`,
|
|
6744
|
-
formDescriptionId: `${id}-form-item-description`,
|
|
6745
|
-
formMessageId: `${id}-form-item-message`
|
|
6746
|
-
}, fieldState);
|
|
6747
|
-
};
|
|
6748
|
-
var FormLabel = React46.forwardRef((_a, ref) => {
|
|
6970
|
+
});
|
|
6971
|
+
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
6972
|
+
var SelectScrollUpButton = React47.forwardRef((_a, ref) => {
|
|
6749
6973
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
6750
|
-
|
|
6751
|
-
|
|
6752
|
-
|
|
6753
|
-
__spreadValues({
|
|
6974
|
+
return /* @__PURE__ */ jsx24(
|
|
6975
|
+
SelectPrimitive.ScrollUpButton,
|
|
6976
|
+
__spreadProps(__spreadValues({
|
|
6754
6977
|
ref,
|
|
6755
|
-
className: cn(
|
|
6756
|
-
|
|
6757
|
-
|
|
6978
|
+
className: cn(
|
|
6979
|
+
"flex cursor-default items-center justify-center py-1",
|
|
6980
|
+
className
|
|
6981
|
+
)
|
|
6982
|
+
}, props), {
|
|
6983
|
+
children: /* @__PURE__ */ jsx24(ChevronUpIcon, {})
|
|
6984
|
+
})
|
|
6758
6985
|
);
|
|
6759
6986
|
});
|
|
6760
|
-
|
|
6761
|
-
var
|
|
6762
|
-
var props = __objRest(
|
|
6763
|
-
|
|
6764
|
-
|
|
6765
|
-
|
|
6766
|
-
__spreadValues({
|
|
6987
|
+
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
6988
|
+
var SelectScrollDownButton = React47.forwardRef((_a, ref) => {
|
|
6989
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
6990
|
+
return /* @__PURE__ */ jsx24(
|
|
6991
|
+
SelectPrimitive.ScrollDownButton,
|
|
6992
|
+
__spreadProps(__spreadValues({
|
|
6767
6993
|
ref,
|
|
6768
|
-
|
|
6769
|
-
|
|
6770
|
-
|
|
6771
|
-
|
|
6994
|
+
className: cn(
|
|
6995
|
+
"flex cursor-default items-center justify-center py-1",
|
|
6996
|
+
className
|
|
6997
|
+
)
|
|
6998
|
+
}, props), {
|
|
6999
|
+
children: /* @__PURE__ */ jsx24(ChevronDownIcon2, {})
|
|
7000
|
+
})
|
|
6772
7001
|
);
|
|
6773
7002
|
});
|
|
6774
|
-
|
|
6775
|
-
var
|
|
7003
|
+
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
7004
|
+
var SelectContent = React47.forwardRef((_a, ref) => {
|
|
7005
|
+
var _b = _a, { className, children, position = "popper" } = _b, props = __objRest(_b, ["className", "children", "position"]);
|
|
7006
|
+
return /* @__PURE__ */ jsx24(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs14(
|
|
7007
|
+
SelectPrimitive.Content,
|
|
7008
|
+
__spreadProps(__spreadValues({
|
|
7009
|
+
ref,
|
|
7010
|
+
className: cn(
|
|
7011
|
+
"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",
|
|
7012
|
+
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",
|
|
7013
|
+
className
|
|
7014
|
+
),
|
|
7015
|
+
position
|
|
7016
|
+
}, props), {
|
|
7017
|
+
children: [
|
|
7018
|
+
/* @__PURE__ */ jsx24(SelectScrollUpButton, {}),
|
|
7019
|
+
/* @__PURE__ */ jsx24(
|
|
7020
|
+
SelectPrimitive.Viewport,
|
|
7021
|
+
{
|
|
7022
|
+
className: cn(
|
|
7023
|
+
"p-1",
|
|
7024
|
+
position === "popper" && "h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)"
|
|
7025
|
+
),
|
|
7026
|
+
children
|
|
7027
|
+
}
|
|
7028
|
+
),
|
|
7029
|
+
/* @__PURE__ */ jsx24(SelectScrollDownButton, {})
|
|
7030
|
+
]
|
|
7031
|
+
})
|
|
7032
|
+
) });
|
|
7033
|
+
});
|
|
7034
|
+
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
7035
|
+
var SelectLabel = React47.forwardRef((_a, ref) => {
|
|
6776
7036
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
6777
|
-
|
|
6778
|
-
|
|
6779
|
-
"p",
|
|
7037
|
+
return /* @__PURE__ */ jsx24(
|
|
7038
|
+
SelectPrimitive.Label,
|
|
6780
7039
|
__spreadValues({
|
|
6781
7040
|
ref,
|
|
6782
|
-
|
|
6783
|
-
className: cn("text-[0.8rem] text-muted-foreground", className)
|
|
7041
|
+
className: cn("px-2 py-1.5 text-sm font-semibold", className)
|
|
6784
7042
|
}, props)
|
|
6785
7043
|
);
|
|
6786
7044
|
});
|
|
6787
|
-
|
|
6788
|
-
var
|
|
7045
|
+
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
7046
|
+
var SelectItem = React47.forwardRef((_a, ref) => {
|
|
6789
7047
|
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
6790
|
-
|
|
6791
|
-
|
|
6792
|
-
if (!body) return null;
|
|
6793
|
-
return /* @__PURE__ */ jsx22(
|
|
6794
|
-
"p",
|
|
7048
|
+
return /* @__PURE__ */ jsxs14(
|
|
7049
|
+
SelectPrimitive.Item,
|
|
6795
7050
|
__spreadProps(__spreadValues({
|
|
6796
7051
|
ref,
|
|
6797
|
-
|
|
6798
|
-
|
|
7052
|
+
className: cn(
|
|
7053
|
+
"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",
|
|
7054
|
+
className
|
|
7055
|
+
)
|
|
6799
7056
|
}, props), {
|
|
6800
|
-
children:
|
|
7057
|
+
children: [
|
|
7058
|
+
/* @__PURE__ */ jsx24("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx24(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx24(CheckIcon4, { className: "h-4 w-4" }) }) }),
|
|
7059
|
+
/* @__PURE__ */ jsx24(SelectPrimitive.ItemText, { children })
|
|
7060
|
+
]
|
|
6801
7061
|
})
|
|
6802
7062
|
);
|
|
6803
7063
|
});
|
|
6804
|
-
|
|
6805
|
-
var
|
|
6806
|
-
var _a;
|
|
6807
|
-
|
|
6808
|
-
|
|
6809
|
-
|
|
6810
|
-
|
|
6811
|
-
|
|
6812
|
-
}
|
|
6813
|
-
|
|
6814
|
-
|
|
6815
|
-
|
|
6816
|
-
|
|
6817
|
-
|
|
6818
|
-
};
|
|
7064
|
+
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
7065
|
+
var SelectSeparator = React47.forwardRef((_a, ref) => {
|
|
7066
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
7067
|
+
return /* @__PURE__ */ jsx24(
|
|
7068
|
+
SelectPrimitive.Separator,
|
|
7069
|
+
__spreadValues({
|
|
7070
|
+
ref,
|
|
7071
|
+
className: cn("-mx-1 my-1 h-px bg-muted", className)
|
|
7072
|
+
}, props)
|
|
7073
|
+
);
|
|
7074
|
+
});
|
|
7075
|
+
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
7076
|
+
|
|
7077
|
+
// src/components/Form/form-select.tsx
|
|
7078
|
+
import { jsx as jsx25, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
6819
7079
|
var FormSelect = ({
|
|
6820
7080
|
name,
|
|
6821
7081
|
control,
|
|
6822
7082
|
rules,
|
|
6823
7083
|
shouldUnregister,
|
|
6824
7084
|
defaultValue,
|
|
6825
|
-
placeholder,
|
|
7085
|
+
placeholder = "Seleccionar opci\xF3n",
|
|
6826
7086
|
label,
|
|
6827
7087
|
requiredLabel,
|
|
6828
7088
|
className,
|
|
6829
7089
|
itemClassName,
|
|
6830
7090
|
contentClassName,
|
|
7091
|
+
searchInputClassName,
|
|
6831
7092
|
labelClassName,
|
|
6832
7093
|
messageClassName,
|
|
6833
7094
|
requiredLabelClassName,
|
|
@@ -6840,31 +7101,24 @@ var FormSelect = ({
|
|
|
6840
7101
|
children,
|
|
6841
7102
|
onChange,
|
|
6842
7103
|
onChangeItem,
|
|
6843
|
-
disabled,
|
|
6844
|
-
size = "md",
|
|
6845
|
-
|
|
6846
|
-
|
|
6847
|
-
|
|
6848
|
-
|
|
6849
|
-
|
|
6850
|
-
|
|
6851
|
-
|
|
6852
|
-
|
|
6853
|
-
const
|
|
6854
|
-
const
|
|
6855
|
-
const
|
|
6856
|
-
const
|
|
6857
|
-
|
|
6858
|
-
|
|
6859
|
-
|
|
6860
|
-
|
|
6861
|
-
const contentBase = "rounded-md border border-border bg-popover text-popover-foreground shadow-md";
|
|
6862
|
-
const itemSize = {
|
|
6863
|
-
sm: "h-8 text-sm",
|
|
6864
|
-
md: "h-9 text-sm",
|
|
6865
|
-
lg: "h-10 text-base"
|
|
6866
|
-
};
|
|
6867
|
-
const normalizedOptions = React46.useMemo(() => {
|
|
7104
|
+
disabled,
|
|
7105
|
+
size = "md",
|
|
7106
|
+
customSize,
|
|
7107
|
+
variant = "outline",
|
|
7108
|
+
invalid,
|
|
7109
|
+
searchable = false,
|
|
7110
|
+
searchPlaceholder = "Buscar\u2026",
|
|
7111
|
+
emptyText = "No hay resultados",
|
|
7112
|
+
position = "popper"
|
|
7113
|
+
}) => {
|
|
7114
|
+
const form = useFormContext4();
|
|
7115
|
+
const controllerControl = control != null ? control : form == null ? void 0 : form.control;
|
|
7116
|
+
const sizeClasses = getFormSizeClasses(size, customSize);
|
|
7117
|
+
const triggerBase = "relative inline-flex w-full items-center justify-between gap-2 text-foreground outline-none ring-offset-background transition placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50";
|
|
7118
|
+
const triggerSizeClass = variant === "flushed" ? sizeClasses.flushedControl : variant === "link" ? sizeClasses.linkControl : sizeClasses.control;
|
|
7119
|
+
const contentBase = "z-50 rounded-xl border border-border bg-popover text-popover-foreground shadow-xl outline-none";
|
|
7120
|
+
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]";
|
|
7121
|
+
const normalizedOptions = React48.useMemo(() => {
|
|
6868
7122
|
if (options) return options;
|
|
6869
7123
|
return (items != null ? items : []).map((item) => {
|
|
6870
7124
|
var _a;
|
|
@@ -6883,19 +7137,8 @@ var FormSelect = ({
|
|
|
6883
7137
|
items,
|
|
6884
7138
|
options
|
|
6885
7139
|
]);
|
|
6886
|
-
|
|
6887
|
-
|
|
6888
|
-
const normalizedQuery = query.trim().toLowerCase();
|
|
6889
|
-
return normalizedOptions.filter((option) => {
|
|
6890
|
-
var _a;
|
|
6891
|
-
const label2 = typeof option.label === "string" ? option.label : String((_a = option.value) != null ? _a : "");
|
|
6892
|
-
return `${label2} ${option.value}`.toLowerCase().includes(normalizedQuery);
|
|
6893
|
-
});
|
|
6894
|
-
}, [normalizedOptions, query, searchable]);
|
|
6895
|
-
const specialFlushed = variant === "flushed" ? size === "sm" ? "h-9 text-sm" : size === "lg" ? "h-11 text-base" : "h-10 text-sm" : "";
|
|
6896
|
-
const specialLink = variant === "link" ? "text-sm" : "";
|
|
6897
|
-
return /* @__PURE__ */ jsx22(FormFieldContext.Provider, { value: { name }, children: /* @__PURE__ */ jsx22(
|
|
6898
|
-
Controller,
|
|
7140
|
+
return /* @__PURE__ */ jsx25(FormFieldContext.Provider, { value: { name }, children: /* @__PURE__ */ jsx25(
|
|
7141
|
+
Controller3,
|
|
6899
7142
|
{
|
|
6900
7143
|
control: controllerControl,
|
|
6901
7144
|
name,
|
|
@@ -6905,16 +7148,29 @@ var FormSelect = ({
|
|
|
6905
7148
|
render: ({ field, fieldState }) => {
|
|
6906
7149
|
var _a;
|
|
6907
7150
|
const fieldError = getErrorMessage(fieldState.error);
|
|
6908
|
-
const
|
|
6909
|
-
|
|
6910
|
-
|
|
7151
|
+
const hasError = Boolean(invalid || fieldError);
|
|
7152
|
+
const handleValueChange = (value) => {
|
|
7153
|
+
var _a2;
|
|
7154
|
+
const nextOption = normalizedOptions.find(
|
|
7155
|
+
(option) => option.value === value
|
|
7156
|
+
);
|
|
7157
|
+
field.onChange(value);
|
|
7158
|
+
onChange == null ? void 0 : onChange(value);
|
|
7159
|
+
onChangeItem == null ? void 0 : onChangeItem((_a2 = nextOption == null ? void 0 : nextOption.data) != null ? _a2 : null);
|
|
7160
|
+
};
|
|
7161
|
+
return /* @__PURE__ */ jsxs15(FormItem, { children: [
|
|
7162
|
+
label ? /* @__PURE__ */ jsxs15(
|
|
6911
7163
|
FormLabel,
|
|
6912
7164
|
{
|
|
6913
|
-
className: cn(
|
|
7165
|
+
className: cn(
|
|
7166
|
+
"flex items-center gap-0.5",
|
|
7167
|
+
sizeClasses.label,
|
|
7168
|
+
labelClassName
|
|
7169
|
+
),
|
|
6914
7170
|
children: [
|
|
6915
|
-
/* @__PURE__ */
|
|
6916
|
-
requiredLabel ? /* @__PURE__ */
|
|
6917
|
-
|
|
7171
|
+
/* @__PURE__ */ jsx25("span", { children: label }),
|
|
7172
|
+
requiredLabel ? /* @__PURE__ */ jsx25(
|
|
7173
|
+
Asterisk3,
|
|
6918
7174
|
{
|
|
6919
7175
|
"aria-hidden": "true",
|
|
6920
7176
|
className: cn(
|
|
@@ -6926,82 +7182,89 @@ var FormSelect = ({
|
|
|
6926
7182
|
]
|
|
6927
7183
|
}
|
|
6928
7184
|
) : null,
|
|
6929
|
-
/* @__PURE__ */
|
|
7185
|
+
searchable ? /* @__PURE__ */ jsx25(
|
|
7186
|
+
Badge,
|
|
7187
|
+
{
|
|
7188
|
+
variant: "outline",
|
|
7189
|
+
className: cn(
|
|
7190
|
+
"w-full cursor-pointer",
|
|
7191
|
+
hasError && "border-destructive ring-destructive focus:ring-destructive/40",
|
|
7192
|
+
className
|
|
7193
|
+
)
|
|
7194
|
+
}
|
|
7195
|
+
) : /* @__PURE__ */ jsxs15(
|
|
6930
7196
|
Select2,
|
|
6931
7197
|
{
|
|
6932
7198
|
value: (_a = field.value) != null ? _a : "",
|
|
6933
|
-
onValueChange:
|
|
6934
|
-
|
|
6935
|
-
|
|
6936
|
-
(
|
|
6937
|
-
|
|
6938
|
-
field.onChange(value);
|
|
6939
|
-
onChange == null ? void 0 : onChange(value);
|
|
6940
|
-
onChangeItem == null ? void 0 : onChangeItem(
|
|
6941
|
-
(_a2 = selectedOption == null ? void 0 : selectedOption.data) != null ? _a2 : null
|
|
6942
|
-
);
|
|
7199
|
+
onValueChange: handleValueChange,
|
|
7200
|
+
onOpenChange: (nextOpen) => {
|
|
7201
|
+
if (!nextOpen) {
|
|
7202
|
+
field.onBlur();
|
|
7203
|
+
}
|
|
6943
7204
|
},
|
|
6944
7205
|
disabled,
|
|
6945
7206
|
children: [
|
|
6946
|
-
/* @__PURE__ */
|
|
7207
|
+
/* @__PURE__ */ jsx25(FormControl, { children: /* @__PURE__ */ jsx25(
|
|
6947
7208
|
SelectTrigger,
|
|
6948
7209
|
{
|
|
6949
7210
|
className: cn(
|
|
6950
7211
|
triggerBase,
|
|
6951
7212
|
variants[variant],
|
|
6952
|
-
|
|
6953
|
-
|
|
7213
|
+
triggerSizeClass,
|
|
7214
|
+
hasError && "border-destructive ring-destructive focus:ring-destructive/40",
|
|
6954
7215
|
className
|
|
6955
7216
|
),
|
|
6956
|
-
children: /* @__PURE__ */
|
|
7217
|
+
children: /* @__PURE__ */ jsx25(SelectValue, { placeholder })
|
|
6957
7218
|
}
|
|
6958
7219
|
) }),
|
|
6959
|
-
/* @__PURE__ */
|
|
7220
|
+
/* @__PURE__ */ jsx25(
|
|
6960
7221
|
SelectContent,
|
|
6961
7222
|
{
|
|
6962
|
-
|
|
6963
|
-
|
|
6964
|
-
|
|
6965
|
-
|
|
6966
|
-
|
|
6967
|
-
|
|
6968
|
-
|
|
6969
|
-
|
|
7223
|
+
position,
|
|
7224
|
+
sideOffset: 6,
|
|
7225
|
+
className: cn(
|
|
7226
|
+
contentBase,
|
|
7227
|
+
contentViewport,
|
|
7228
|
+
"w-(--radix-select-trigger-width) min-w-(--radix-select-trigger-width) overflow-hidden!",
|
|
7229
|
+
contentClassName
|
|
7230
|
+
),
|
|
7231
|
+
onWheelCapture: (event) => {
|
|
7232
|
+
event.stopPropagation();
|
|
6970
7233
|
},
|
|
6971
|
-
|
|
6972
|
-
|
|
6973
|
-
|
|
6974
|
-
|
|
6975
|
-
|
|
6976
|
-
|
|
6977
|
-
|
|
6978
|
-
|
|
6979
|
-
|
|
6980
|
-
|
|
6981
|
-
|
|
6982
|
-
|
|
6983
|
-
|
|
6984
|
-
|
|
6985
|
-
|
|
6986
|
-
|
|
6987
|
-
|
|
6988
|
-
|
|
6989
|
-
|
|
6990
|
-
|
|
6991
|
-
|
|
6992
|
-
|
|
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
|
-
]
|
|
7234
|
+
onTouchMoveCapture: (event) => {
|
|
7235
|
+
event.stopPropagation();
|
|
7236
|
+
},
|
|
7237
|
+
children: children ? children : normalizedOptions.length > 0 ? normalizedOptions.map((option) => /* @__PURE__ */ jsx25(
|
|
7238
|
+
SelectItem,
|
|
7239
|
+
{
|
|
7240
|
+
value: option.value,
|
|
7241
|
+
disabled: option.disabled,
|
|
7242
|
+
className: cn(sizeClasses.selectItem, itemClassName),
|
|
7243
|
+
children: option.label
|
|
7244
|
+
},
|
|
7245
|
+
option.value
|
|
7246
|
+
)) : /* @__PURE__ */ jsx25(
|
|
7247
|
+
"div",
|
|
7248
|
+
{
|
|
7249
|
+
className: cn(
|
|
7250
|
+
"px-3 py-2 text-muted-foreground",
|
|
7251
|
+
sizeClasses.message
|
|
7252
|
+
),
|
|
7253
|
+
children: emptyText
|
|
7254
|
+
}
|
|
7255
|
+
)
|
|
6999
7256
|
}
|
|
7000
7257
|
)
|
|
7001
7258
|
]
|
|
7002
7259
|
}
|
|
7003
7260
|
),
|
|
7004
|
-
fieldError ? /* @__PURE__ */
|
|
7261
|
+
fieldError ? /* @__PURE__ */ jsx25(
|
|
7262
|
+
FormMessage,
|
|
7263
|
+
{
|
|
7264
|
+
className: cn(sizeClasses.message, messageClassName),
|
|
7265
|
+
children: fieldError
|
|
7266
|
+
}
|
|
7267
|
+
) : null
|
|
7005
7268
|
] });
|
|
7006
7269
|
}
|
|
7007
7270
|
}
|
|
@@ -7009,158 +7272,15 @@ var FormSelect = ({
|
|
|
7009
7272
|
};
|
|
7010
7273
|
FormSelect.displayName = "FormSelect";
|
|
7011
7274
|
|
|
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);
|
|
7094
|
-
}
|
|
7095
|
-
})
|
|
7096
|
-
),
|
|
7097
|
-
/* @__PURE__ */ jsxs14("div", { className: "min-w-0 flex-1", children: [
|
|
7098
|
-
label ? /* @__PURE__ */ jsxs14(
|
|
7099
|
-
Label3,
|
|
7100
|
-
{
|
|
7101
|
-
htmlFor: checkboxId,
|
|
7102
|
-
className: cn(
|
|
7103
|
-
"inline-flex cursor-pointer items-start gap-1 text-sm font-medium leading-none text-foreground",
|
|
7104
|
-
checkboxProps.disabled && "cursor-not-allowed text-muted-foreground",
|
|
7105
|
-
hasError && "text-destructive",
|
|
7106
|
-
labelClassName
|
|
7107
|
-
),
|
|
7108
|
-
children: [
|
|
7109
|
-
/* @__PURE__ */ jsx23("span", { children: label }),
|
|
7110
|
-
requiredLabel ? /* @__PURE__ */ jsx23(
|
|
7111
|
-
Asterisk2,
|
|
7112
|
-
{
|
|
7113
|
-
"aria-hidden": "true",
|
|
7114
|
-
className: cn(
|
|
7115
|
-
"mt-0.5 h-3 w-3 shrink-0 text-red-500",
|
|
7116
|
-
requiredLabelClassName
|
|
7117
|
-
)
|
|
7118
|
-
}
|
|
7119
|
-
) : null
|
|
7120
|
-
]
|
|
7121
|
-
}
|
|
7122
|
-
) : null,
|
|
7123
|
-
description ? /* @__PURE__ */ jsx23(
|
|
7124
|
-
"p",
|
|
7125
|
-
{
|
|
7126
|
-
id: descriptionId,
|
|
7127
|
-
className: cn(
|
|
7128
|
-
"mt-1 text-sm leading-relaxed text-muted-foreground",
|
|
7129
|
-
descriptionClassName
|
|
7130
|
-
),
|
|
7131
|
-
children: description
|
|
7132
|
-
}
|
|
7133
|
-
) : null,
|
|
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
|
-
) });
|
|
7149
|
-
}
|
|
7150
|
-
}
|
|
7151
|
-
);
|
|
7152
|
-
};
|
|
7153
|
-
FormCheckbox.displayName = "FormCheckbox";
|
|
7154
|
-
|
|
7155
7275
|
// src/components/hover-card.tsx
|
|
7156
7276
|
import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
|
|
7157
|
-
import * as
|
|
7158
|
-
import { jsx as
|
|
7277
|
+
import * as React49 from "react";
|
|
7278
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
7159
7279
|
var HoverCard = HoverCardPrimitive.Root;
|
|
7160
7280
|
var HoverCardTrigger = HoverCardPrimitive.Trigger;
|
|
7161
|
-
var HoverCardContent =
|
|
7281
|
+
var HoverCardContent = React49.forwardRef((_a, ref) => {
|
|
7162
7282
|
var _b = _a, { className, align = "center", sideOffset = 4 } = _b, props = __objRest(_b, ["className", "align", "sideOffset"]);
|
|
7163
|
-
return /* @__PURE__ */
|
|
7283
|
+
return /* @__PURE__ */ jsx26(
|
|
7164
7284
|
HoverCardPrimitive.Content,
|
|
7165
7285
|
__spreadValues({
|
|
7166
7286
|
ref,
|
|
@@ -7239,11 +7359,11 @@ var Icons = IconsApp;
|
|
|
7239
7359
|
// src/components/input-otp.tsx
|
|
7240
7360
|
import { DashIcon } from "@radix-ui/react-icons";
|
|
7241
7361
|
import { OTPInput, OTPInputContext } from "input-otp";
|
|
7242
|
-
import * as
|
|
7243
|
-
import { jsx as
|
|
7244
|
-
var InputOTP =
|
|
7362
|
+
import * as React50 from "react";
|
|
7363
|
+
import { jsx as jsx27, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
7364
|
+
var InputOTP = React50.forwardRef((_a, ref) => {
|
|
7245
7365
|
var _b = _a, { className, containerClassName } = _b, props = __objRest(_b, ["className", "containerClassName"]);
|
|
7246
|
-
return /* @__PURE__ */
|
|
7366
|
+
return /* @__PURE__ */ jsx27(
|
|
7247
7367
|
OTPInput,
|
|
7248
7368
|
__spreadValues({
|
|
7249
7369
|
ref,
|
|
@@ -7256,16 +7376,16 @@ var InputOTP = React49.forwardRef((_a, ref) => {
|
|
|
7256
7376
|
);
|
|
7257
7377
|
});
|
|
7258
7378
|
InputOTP.displayName = "InputOTP";
|
|
7259
|
-
var InputOTPGroup =
|
|
7379
|
+
var InputOTPGroup = React50.forwardRef((_a, ref) => {
|
|
7260
7380
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
7261
|
-
return /* @__PURE__ */
|
|
7381
|
+
return /* @__PURE__ */ jsx27("div", __spreadValues({ ref, className: cn("flex items-center", className) }, props));
|
|
7262
7382
|
});
|
|
7263
7383
|
InputOTPGroup.displayName = "InputOTPGroup";
|
|
7264
|
-
var InputOTPSlot =
|
|
7384
|
+
var InputOTPSlot = React50.forwardRef((_a, ref) => {
|
|
7265
7385
|
var _b = _a, { index, className } = _b, props = __objRest(_b, ["index", "className"]);
|
|
7266
|
-
const inputOTPContext =
|
|
7386
|
+
const inputOTPContext = React50.useContext(OTPInputContext);
|
|
7267
7387
|
const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];
|
|
7268
|
-
return /* @__PURE__ */
|
|
7388
|
+
return /* @__PURE__ */ jsxs16(
|
|
7269
7389
|
"div",
|
|
7270
7390
|
__spreadProps(__spreadValues({
|
|
7271
7391
|
ref,
|
|
@@ -7278,15 +7398,15 @@ var InputOTPSlot = React49.forwardRef((_a, ref) => {
|
|
|
7278
7398
|
}, props), {
|
|
7279
7399
|
children: [
|
|
7280
7400
|
char,
|
|
7281
|
-
hasFakeCaret && /* @__PURE__ */
|
|
7401
|
+
hasFakeCaret && /* @__PURE__ */ jsx27("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsx27("div", { className: "animate-caret-blink h-4 w-px bg-foreground duration-1000" }) })
|
|
7282
7402
|
]
|
|
7283
7403
|
})
|
|
7284
7404
|
);
|
|
7285
7405
|
});
|
|
7286
7406
|
InputOTPSlot.displayName = "InputOTPSlot";
|
|
7287
|
-
var InputOTPSeparator =
|
|
7407
|
+
var InputOTPSeparator = React50.forwardRef((_a, ref) => {
|
|
7288
7408
|
var props = __objRest(_a, []);
|
|
7289
|
-
return /* @__PURE__ */
|
|
7409
|
+
return /* @__PURE__ */ jsx27("div", __spreadProps(__spreadValues({ ref, role: "separator" }, props), { children: /* @__PURE__ */ jsx27(DashIcon, {}) }));
|
|
7290
7410
|
});
|
|
7291
7411
|
InputOTPSeparator.displayName = "InputOTPSeparator";
|
|
7292
7412
|
|
|
@@ -7297,16 +7417,16 @@ import {
|
|
|
7297
7417
|
DotFilledIcon as DotFilledIcon3
|
|
7298
7418
|
} from "@radix-ui/react-icons";
|
|
7299
7419
|
import * as MenubarPrimitive from "@radix-ui/react-menubar";
|
|
7300
|
-
import * as
|
|
7301
|
-
import { jsx as
|
|
7420
|
+
import * as React51 from "react";
|
|
7421
|
+
import { jsx as jsx28, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
7302
7422
|
var MenubarMenu = MenubarPrimitive.Menu;
|
|
7303
7423
|
var MenubarGroup = MenubarPrimitive.Group;
|
|
7304
7424
|
var MenubarPortal = MenubarPrimitive.Portal;
|
|
7305
7425
|
var MenubarSub = MenubarPrimitive.Sub;
|
|
7306
7426
|
var MenubarRadioGroup = MenubarPrimitive.RadioGroup;
|
|
7307
|
-
var Menubar =
|
|
7427
|
+
var Menubar = React51.forwardRef((_a, ref) => {
|
|
7308
7428
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
7309
|
-
return /* @__PURE__ */
|
|
7429
|
+
return /* @__PURE__ */ jsx28(
|
|
7310
7430
|
MenubarPrimitive.Root,
|
|
7311
7431
|
__spreadValues({
|
|
7312
7432
|
ref,
|
|
@@ -7318,9 +7438,9 @@ var Menubar = React50.forwardRef((_a, ref) => {
|
|
|
7318
7438
|
);
|
|
7319
7439
|
});
|
|
7320
7440
|
Menubar.displayName = MenubarPrimitive.Root.displayName;
|
|
7321
|
-
var MenubarTrigger =
|
|
7441
|
+
var MenubarTrigger = React51.forwardRef((_a, ref) => {
|
|
7322
7442
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
7323
|
-
return /* @__PURE__ */
|
|
7443
|
+
return /* @__PURE__ */ jsx28(
|
|
7324
7444
|
MenubarPrimitive.Trigger,
|
|
7325
7445
|
__spreadValues({
|
|
7326
7446
|
ref,
|
|
@@ -7332,9 +7452,9 @@ var MenubarTrigger = React50.forwardRef((_a, ref) => {
|
|
|
7332
7452
|
);
|
|
7333
7453
|
});
|
|
7334
7454
|
MenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName;
|
|
7335
|
-
var MenubarSubTrigger =
|
|
7455
|
+
var MenubarSubTrigger = React51.forwardRef((_a, ref) => {
|
|
7336
7456
|
var _b = _a, { className, inset, children } = _b, props = __objRest(_b, ["className", "inset", "children"]);
|
|
7337
|
-
return /* @__PURE__ */
|
|
7457
|
+
return /* @__PURE__ */ jsxs17(
|
|
7338
7458
|
MenubarPrimitive.SubTrigger,
|
|
7339
7459
|
__spreadProps(__spreadValues({
|
|
7340
7460
|
ref,
|
|
@@ -7346,15 +7466,15 @@ var MenubarSubTrigger = React50.forwardRef((_a, ref) => {
|
|
|
7346
7466
|
}, props), {
|
|
7347
7467
|
children: [
|
|
7348
7468
|
children,
|
|
7349
|
-
/* @__PURE__ */
|
|
7469
|
+
/* @__PURE__ */ jsx28(ChevronRightIcon4, { className: "ml-auto h-4 w-4" })
|
|
7350
7470
|
]
|
|
7351
7471
|
})
|
|
7352
7472
|
);
|
|
7353
7473
|
});
|
|
7354
7474
|
MenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName;
|
|
7355
|
-
var MenubarSubContent =
|
|
7475
|
+
var MenubarSubContent = React51.forwardRef((_a, ref) => {
|
|
7356
7476
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
7357
|
-
return /* @__PURE__ */
|
|
7477
|
+
return /* @__PURE__ */ jsx28(
|
|
7358
7478
|
MenubarPrimitive.SubContent,
|
|
7359
7479
|
__spreadValues({
|
|
7360
7480
|
ref,
|
|
@@ -7366,10 +7486,10 @@ var MenubarSubContent = React50.forwardRef((_a, ref) => {
|
|
|
7366
7486
|
);
|
|
7367
7487
|
});
|
|
7368
7488
|
MenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName;
|
|
7369
|
-
var MenubarContent =
|
|
7489
|
+
var MenubarContent = React51.forwardRef(
|
|
7370
7490
|
(_a, ref) => {
|
|
7371
7491
|
var _b = _a, { className, align = "start", alignOffset = -4, sideOffset = 8 } = _b, props = __objRest(_b, ["className", "align", "alignOffset", "sideOffset"]);
|
|
7372
|
-
return /* @__PURE__ */
|
|
7492
|
+
return /* @__PURE__ */ jsx28(MenubarPrimitive.Portal, { children: /* @__PURE__ */ jsx28(
|
|
7373
7493
|
MenubarPrimitive.Content,
|
|
7374
7494
|
__spreadValues({
|
|
7375
7495
|
ref,
|
|
@@ -7385,9 +7505,9 @@ var MenubarContent = React50.forwardRef(
|
|
|
7385
7505
|
}
|
|
7386
7506
|
);
|
|
7387
7507
|
MenubarContent.displayName = MenubarPrimitive.Content.displayName;
|
|
7388
|
-
var MenubarItem =
|
|
7508
|
+
var MenubarItem = React51.forwardRef((_a, ref) => {
|
|
7389
7509
|
var _b = _a, { className, inset } = _b, props = __objRest(_b, ["className", "inset"]);
|
|
7390
|
-
return /* @__PURE__ */
|
|
7510
|
+
return /* @__PURE__ */ jsx28(
|
|
7391
7511
|
MenubarPrimitive.Item,
|
|
7392
7512
|
__spreadValues({
|
|
7393
7513
|
ref,
|
|
@@ -7400,9 +7520,9 @@ var MenubarItem = React50.forwardRef((_a, ref) => {
|
|
|
7400
7520
|
);
|
|
7401
7521
|
});
|
|
7402
7522
|
MenubarItem.displayName = MenubarPrimitive.Item.displayName;
|
|
7403
|
-
var MenubarCheckboxItem =
|
|
7523
|
+
var MenubarCheckboxItem = React51.forwardRef((_a, ref) => {
|
|
7404
7524
|
var _b = _a, { className, children, checked } = _b, props = __objRest(_b, ["className", "children", "checked"]);
|
|
7405
|
-
return /* @__PURE__ */
|
|
7525
|
+
return /* @__PURE__ */ jsxs17(
|
|
7406
7526
|
MenubarPrimitive.CheckboxItem,
|
|
7407
7527
|
__spreadProps(__spreadValues({
|
|
7408
7528
|
ref,
|
|
@@ -7413,16 +7533,16 @@ var MenubarCheckboxItem = React50.forwardRef((_a, ref) => {
|
|
|
7413
7533
|
checked
|
|
7414
7534
|
}, props), {
|
|
7415
7535
|
children: [
|
|
7416
|
-
/* @__PURE__ */
|
|
7536
|
+
/* @__PURE__ */ jsx28("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx28(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx28(CheckIcon5, { className: "h-4 w-4" }) }) }),
|
|
7417
7537
|
children
|
|
7418
7538
|
]
|
|
7419
7539
|
})
|
|
7420
7540
|
);
|
|
7421
7541
|
});
|
|
7422
7542
|
MenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName;
|
|
7423
|
-
var MenubarRadioItem =
|
|
7543
|
+
var MenubarRadioItem = React51.forwardRef((_a, ref) => {
|
|
7424
7544
|
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
7425
|
-
return /* @__PURE__ */
|
|
7545
|
+
return /* @__PURE__ */ jsxs17(
|
|
7426
7546
|
MenubarPrimitive.RadioItem,
|
|
7427
7547
|
__spreadProps(__spreadValues({
|
|
7428
7548
|
ref,
|
|
@@ -7432,16 +7552,16 @@ var MenubarRadioItem = React50.forwardRef((_a, ref) => {
|
|
|
7432
7552
|
)
|
|
7433
7553
|
}, props), {
|
|
7434
7554
|
children: [
|
|
7435
|
-
/* @__PURE__ */
|
|
7555
|
+
/* @__PURE__ */ jsx28("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx28(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx28(DotFilledIcon3, { className: "h-4 w-4 fill-current" }) }) }),
|
|
7436
7556
|
children
|
|
7437
7557
|
]
|
|
7438
7558
|
})
|
|
7439
7559
|
);
|
|
7440
7560
|
});
|
|
7441
7561
|
MenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName;
|
|
7442
|
-
var MenubarLabel =
|
|
7562
|
+
var MenubarLabel = React51.forwardRef((_a, ref) => {
|
|
7443
7563
|
var _b = _a, { className, inset } = _b, props = __objRest(_b, ["className", "inset"]);
|
|
7444
|
-
return /* @__PURE__ */
|
|
7564
|
+
return /* @__PURE__ */ jsx28(
|
|
7445
7565
|
MenubarPrimitive.Label,
|
|
7446
7566
|
__spreadValues({
|
|
7447
7567
|
ref,
|
|
@@ -7454,9 +7574,9 @@ var MenubarLabel = React50.forwardRef((_a, ref) => {
|
|
|
7454
7574
|
);
|
|
7455
7575
|
});
|
|
7456
7576
|
MenubarLabel.displayName = MenubarPrimitive.Label.displayName;
|
|
7457
|
-
var MenubarSeparator =
|
|
7577
|
+
var MenubarSeparator = React51.forwardRef((_a, ref) => {
|
|
7458
7578
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
7459
|
-
return /* @__PURE__ */
|
|
7579
|
+
return /* @__PURE__ */ jsx28(
|
|
7460
7580
|
MenubarPrimitive.Separator,
|
|
7461
7581
|
__spreadValues({
|
|
7462
7582
|
ref,
|
|
@@ -7471,7 +7591,7 @@ var MenubarShortcut = (_a) => {
|
|
|
7471
7591
|
} = _b, props = __objRest(_b, [
|
|
7472
7592
|
"className"
|
|
7473
7593
|
]);
|
|
7474
|
-
return /* @__PURE__ */
|
|
7594
|
+
return /* @__PURE__ */ jsx28(
|
|
7475
7595
|
"span",
|
|
7476
7596
|
__spreadValues({
|
|
7477
7597
|
className: cn(
|
|
@@ -7484,7 +7604,7 @@ var MenubarShortcut = (_a) => {
|
|
|
7484
7604
|
MenubarShortcut.displayname = "MenubarShortcut";
|
|
7485
7605
|
|
|
7486
7606
|
// src/components/modal.tsx
|
|
7487
|
-
import { jsx as
|
|
7607
|
+
import { jsx as jsx29, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
7488
7608
|
var Modal = ({
|
|
7489
7609
|
title,
|
|
7490
7610
|
description,
|
|
@@ -7498,12 +7618,12 @@ var Modal = ({
|
|
|
7498
7618
|
onClose();
|
|
7499
7619
|
}
|
|
7500
7620
|
};
|
|
7501
|
-
return /* @__PURE__ */
|
|
7502
|
-
/* @__PURE__ */
|
|
7503
|
-
/* @__PURE__ */
|
|
7504
|
-
/* @__PURE__ */
|
|
7621
|
+
return /* @__PURE__ */ jsx29(Dialog, { open: isOpen, onOpenChange: onChange, children: /* @__PURE__ */ jsxs18(DialogContent, { className, children: [
|
|
7622
|
+
/* @__PURE__ */ jsxs18(DialogHeader, { children: [
|
|
7623
|
+
/* @__PURE__ */ jsx29(DialogTitle, { children: title }),
|
|
7624
|
+
/* @__PURE__ */ jsx29(DialogDescription, { children: description })
|
|
7505
7625
|
] }),
|
|
7506
|
-
/* @__PURE__ */
|
|
7626
|
+
/* @__PURE__ */ jsx29("div", { children })
|
|
7507
7627
|
] }) });
|
|
7508
7628
|
};
|
|
7509
7629
|
|
|
@@ -7511,11 +7631,11 @@ var Modal = ({
|
|
|
7511
7631
|
import { ChevronDownIcon as ChevronDownIcon3 } from "@radix-ui/react-icons";
|
|
7512
7632
|
import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
|
|
7513
7633
|
import { cva as cva6 } from "class-variance-authority";
|
|
7514
|
-
import * as
|
|
7515
|
-
import { jsx as
|
|
7516
|
-
var NavigationMenu =
|
|
7634
|
+
import * as React52 from "react";
|
|
7635
|
+
import { jsx as jsx30, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
7636
|
+
var NavigationMenu = React52.forwardRef((_a, ref) => {
|
|
7517
7637
|
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
7518
|
-
return /* @__PURE__ */
|
|
7638
|
+
return /* @__PURE__ */ jsxs19(
|
|
7519
7639
|
NavigationMenuPrimitive.Root,
|
|
7520
7640
|
__spreadProps(__spreadValues({
|
|
7521
7641
|
ref,
|
|
@@ -7526,15 +7646,15 @@ var NavigationMenu = React51.forwardRef((_a, ref) => {
|
|
|
7526
7646
|
}, props), {
|
|
7527
7647
|
children: [
|
|
7528
7648
|
children,
|
|
7529
|
-
/* @__PURE__ */
|
|
7649
|
+
/* @__PURE__ */ jsx30(NavigationMenuViewport, {})
|
|
7530
7650
|
]
|
|
7531
7651
|
})
|
|
7532
7652
|
);
|
|
7533
7653
|
});
|
|
7534
7654
|
NavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName;
|
|
7535
|
-
var NavigationMenuList =
|
|
7655
|
+
var NavigationMenuList = React52.forwardRef((_a, ref) => {
|
|
7536
7656
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
7537
|
-
return /* @__PURE__ */
|
|
7657
|
+
return /* @__PURE__ */ jsx30(
|
|
7538
7658
|
NavigationMenuPrimitive.List,
|
|
7539
7659
|
__spreadValues({
|
|
7540
7660
|
ref,
|
|
@@ -7550,9 +7670,9 @@ var NavigationMenuItem = NavigationMenuPrimitive.Item;
|
|
|
7550
7670
|
var navigationMenuTriggerStyle = cva6(
|
|
7551
7671
|
"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
7672
|
);
|
|
7553
|
-
var NavigationMenuTrigger =
|
|
7673
|
+
var NavigationMenuTrigger = React52.forwardRef((_a, ref) => {
|
|
7554
7674
|
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
7555
|
-
return /* @__PURE__ */
|
|
7675
|
+
return /* @__PURE__ */ jsxs19(
|
|
7556
7676
|
NavigationMenuPrimitive.Trigger,
|
|
7557
7677
|
__spreadProps(__spreadValues({
|
|
7558
7678
|
ref,
|
|
@@ -7561,7 +7681,7 @@ var NavigationMenuTrigger = React51.forwardRef((_a, ref) => {
|
|
|
7561
7681
|
children: [
|
|
7562
7682
|
children,
|
|
7563
7683
|
" ",
|
|
7564
|
-
/* @__PURE__ */
|
|
7684
|
+
/* @__PURE__ */ jsx30(
|
|
7565
7685
|
ChevronDownIcon3,
|
|
7566
7686
|
{
|
|
7567
7687
|
className: "relative top-[1px] ml-1 h-3 w-3 transition duration-300 group-data-[state=open]:rotate-180",
|
|
@@ -7573,9 +7693,9 @@ var NavigationMenuTrigger = React51.forwardRef((_a, ref) => {
|
|
|
7573
7693
|
);
|
|
7574
7694
|
});
|
|
7575
7695
|
NavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName;
|
|
7576
|
-
var NavigationMenuContent =
|
|
7696
|
+
var NavigationMenuContent = React52.forwardRef((_a, ref) => {
|
|
7577
7697
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
7578
|
-
return /* @__PURE__ */
|
|
7698
|
+
return /* @__PURE__ */ jsx30(
|
|
7579
7699
|
NavigationMenuPrimitive.Content,
|
|
7580
7700
|
__spreadValues({
|
|
7581
7701
|
ref,
|
|
@@ -7588,9 +7708,9 @@ var NavigationMenuContent = React51.forwardRef((_a, ref) => {
|
|
|
7588
7708
|
});
|
|
7589
7709
|
NavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName;
|
|
7590
7710
|
var NavigationMenuLink = NavigationMenuPrimitive.Link;
|
|
7591
|
-
var NavigationMenuViewport =
|
|
7711
|
+
var NavigationMenuViewport = React52.forwardRef((_a, ref) => {
|
|
7592
7712
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
7593
|
-
return /* @__PURE__ */
|
|
7713
|
+
return /* @__PURE__ */ jsx30("div", { className: cn("absolute left-0 top-full flex justify-center"), children: /* @__PURE__ */ jsx30(
|
|
7594
7714
|
NavigationMenuPrimitive.Viewport,
|
|
7595
7715
|
__spreadValues({
|
|
7596
7716
|
className: cn(
|
|
@@ -7602,9 +7722,9 @@ var NavigationMenuViewport = React51.forwardRef((_a, ref) => {
|
|
|
7602
7722
|
) });
|
|
7603
7723
|
});
|
|
7604
7724
|
NavigationMenuViewport.displayName = NavigationMenuPrimitive.Viewport.displayName;
|
|
7605
|
-
var NavigationMenuIndicator =
|
|
7725
|
+
var NavigationMenuIndicator = React52.forwardRef((_a, ref) => {
|
|
7606
7726
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
7607
|
-
return /* @__PURE__ */
|
|
7727
|
+
return /* @__PURE__ */ jsx30(
|
|
7608
7728
|
NavigationMenuPrimitive.Indicator,
|
|
7609
7729
|
__spreadProps(__spreadValues({
|
|
7610
7730
|
ref,
|
|
@@ -7613,7 +7733,7 @@ var NavigationMenuIndicator = React51.forwardRef((_a, ref) => {
|
|
|
7613
7733
|
className
|
|
7614
7734
|
)
|
|
7615
7735
|
}, props), {
|
|
7616
|
-
children: /* @__PURE__ */
|
|
7736
|
+
children: /* @__PURE__ */ jsx30("div", { className: "relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" })
|
|
7617
7737
|
})
|
|
7618
7738
|
);
|
|
7619
7739
|
});
|
|
@@ -7625,12 +7745,12 @@ import {
|
|
|
7625
7745
|
ChevronRightIcon as ChevronRightIcon5,
|
|
7626
7746
|
DotsHorizontalIcon as DotsHorizontalIcon2
|
|
7627
7747
|
} from "@radix-ui/react-icons";
|
|
7628
|
-
import * as
|
|
7748
|
+
import * as React53 from "react";
|
|
7629
7749
|
import { ChevronLeft as ChevronLeft2, ChevronRight as ChevronRight2 } from "lucide-react";
|
|
7630
|
-
import { jsx as
|
|
7750
|
+
import { jsx as jsx31, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
7631
7751
|
var Pagination = (_a) => {
|
|
7632
7752
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
7633
|
-
return /* @__PURE__ */
|
|
7753
|
+
return /* @__PURE__ */ jsx31(
|
|
7634
7754
|
"nav",
|
|
7635
7755
|
__spreadValues({
|
|
7636
7756
|
role: "navigation",
|
|
@@ -7640,9 +7760,9 @@ var Pagination = (_a) => {
|
|
|
7640
7760
|
);
|
|
7641
7761
|
};
|
|
7642
7762
|
Pagination.displayName = "Pagination";
|
|
7643
|
-
var PaginationContent =
|
|
7763
|
+
var PaginationContent = React53.forwardRef((_a, ref) => {
|
|
7644
7764
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
7645
|
-
return /* @__PURE__ */
|
|
7765
|
+
return /* @__PURE__ */ jsx31(
|
|
7646
7766
|
"ul",
|
|
7647
7767
|
__spreadValues({
|
|
7648
7768
|
ref,
|
|
@@ -7651,9 +7771,9 @@ var PaginationContent = React52.forwardRef((_a, ref) => {
|
|
|
7651
7771
|
);
|
|
7652
7772
|
});
|
|
7653
7773
|
PaginationContent.displayName = "PaginationContent";
|
|
7654
|
-
var PaginationItem =
|
|
7774
|
+
var PaginationItem = React53.forwardRef((_a, ref) => {
|
|
7655
7775
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
7656
|
-
return /* @__PURE__ */
|
|
7776
|
+
return /* @__PURE__ */ jsx31("li", __spreadValues({ ref, className: cn("", className) }, props));
|
|
7657
7777
|
});
|
|
7658
7778
|
PaginationItem.displayName = "PaginationItem";
|
|
7659
7779
|
var PaginationLink = (_a) => {
|
|
@@ -7666,7 +7786,7 @@ var PaginationLink = (_a) => {
|
|
|
7666
7786
|
"isActive",
|
|
7667
7787
|
"size"
|
|
7668
7788
|
]);
|
|
7669
|
-
return /* @__PURE__ */
|
|
7789
|
+
return /* @__PURE__ */ jsx31(
|
|
7670
7790
|
"a",
|
|
7671
7791
|
__spreadValues({
|
|
7672
7792
|
"aria-current": isActive ? "page" : void 0,
|
|
@@ -7687,7 +7807,7 @@ var PaginationPreviousLast = (_a) => {
|
|
|
7687
7807
|
} = _b, props = __objRest(_b, [
|
|
7688
7808
|
"className"
|
|
7689
7809
|
]);
|
|
7690
|
-
return /* @__PURE__ */
|
|
7810
|
+
return /* @__PURE__ */ jsxs20(
|
|
7691
7811
|
PaginationLink,
|
|
7692
7812
|
__spreadProps(__spreadValues({
|
|
7693
7813
|
"aria-label": "Go to previous page",
|
|
@@ -7695,8 +7815,8 @@ var PaginationPreviousLast = (_a) => {
|
|
|
7695
7815
|
className: cn("gap-1 pl-2.5", className)
|
|
7696
7816
|
}, props), {
|
|
7697
7817
|
children: [
|
|
7698
|
-
/* @__PURE__ */
|
|
7699
|
-
/* @__PURE__ */
|
|
7818
|
+
/* @__PURE__ */ jsx31(ChevronLeft2, { className: "h-4 w-4" }),
|
|
7819
|
+
/* @__PURE__ */ jsx31("span", { className: "sr-only", children: "Previous Last" })
|
|
7700
7820
|
]
|
|
7701
7821
|
})
|
|
7702
7822
|
);
|
|
@@ -7708,7 +7828,7 @@ var PaginationPrevious = (_a) => {
|
|
|
7708
7828
|
} = _b, props = __objRest(_b, [
|
|
7709
7829
|
"className"
|
|
7710
7830
|
]);
|
|
7711
|
-
return /* @__PURE__ */
|
|
7831
|
+
return /* @__PURE__ */ jsxs20(
|
|
7712
7832
|
PaginationLink,
|
|
7713
7833
|
__spreadProps(__spreadValues({
|
|
7714
7834
|
"aria-label": "Go to previous page",
|
|
@@ -7716,8 +7836,8 @@ var PaginationPrevious = (_a) => {
|
|
|
7716
7836
|
className: cn("gap-1 pl-2.5", className)
|
|
7717
7837
|
}, props), {
|
|
7718
7838
|
children: [
|
|
7719
|
-
/* @__PURE__ */
|
|
7720
|
-
/* @__PURE__ */
|
|
7839
|
+
/* @__PURE__ */ jsx31(ChevronLeftIcon, { className: "h-4 w-4" }),
|
|
7840
|
+
/* @__PURE__ */ jsx31("span", { children: "Previous" })
|
|
7721
7841
|
]
|
|
7722
7842
|
})
|
|
7723
7843
|
);
|
|
@@ -7729,7 +7849,7 @@ var PaginationNext = (_a) => {
|
|
|
7729
7849
|
} = _b, props = __objRest(_b, [
|
|
7730
7850
|
"className"
|
|
7731
7851
|
]);
|
|
7732
|
-
return /* @__PURE__ */
|
|
7852
|
+
return /* @__PURE__ */ jsxs20(
|
|
7733
7853
|
PaginationLink,
|
|
7734
7854
|
__spreadProps(__spreadValues({
|
|
7735
7855
|
"aria-label": "Go to next page",
|
|
@@ -7737,8 +7857,8 @@ var PaginationNext = (_a) => {
|
|
|
7737
7857
|
className: cn("gap-1 pr-2.5", className)
|
|
7738
7858
|
}, props), {
|
|
7739
7859
|
children: [
|
|
7740
|
-
/* @__PURE__ */
|
|
7741
|
-
/* @__PURE__ */
|
|
7860
|
+
/* @__PURE__ */ jsx31("span", { children: "Next" }),
|
|
7861
|
+
/* @__PURE__ */ jsx31(ChevronRightIcon5, { className: "h-4 w-4" })
|
|
7742
7862
|
]
|
|
7743
7863
|
})
|
|
7744
7864
|
);
|
|
@@ -7750,7 +7870,7 @@ var PaginationNextLast = (_a) => {
|
|
|
7750
7870
|
} = _b, props = __objRest(_b, [
|
|
7751
7871
|
"className"
|
|
7752
7872
|
]);
|
|
7753
|
-
return /* @__PURE__ */
|
|
7873
|
+
return /* @__PURE__ */ jsxs20(
|
|
7754
7874
|
PaginationLink,
|
|
7755
7875
|
__spreadProps(__spreadValues({
|
|
7756
7876
|
"aria-label": "Go to next page",
|
|
@@ -7758,8 +7878,8 @@ var PaginationNextLast = (_a) => {
|
|
|
7758
7878
|
className: cn("gap-1 pr-2.5", className)
|
|
7759
7879
|
}, props), {
|
|
7760
7880
|
children: [
|
|
7761
|
-
/* @__PURE__ */
|
|
7762
|
-
/* @__PURE__ */
|
|
7881
|
+
/* @__PURE__ */ jsx31("span", { className: "sr-only", children: "Next Last" }),
|
|
7882
|
+
/* @__PURE__ */ jsx31(ChevronRight2, { className: "h-4 w-4" })
|
|
7763
7883
|
]
|
|
7764
7884
|
})
|
|
7765
7885
|
);
|
|
@@ -7771,15 +7891,15 @@ var PaginationEllipsis = (_a) => {
|
|
|
7771
7891
|
} = _b, props = __objRest(_b, [
|
|
7772
7892
|
"className"
|
|
7773
7893
|
]);
|
|
7774
|
-
return /* @__PURE__ */
|
|
7894
|
+
return /* @__PURE__ */ jsxs20(
|
|
7775
7895
|
"span",
|
|
7776
7896
|
__spreadProps(__spreadValues({
|
|
7777
7897
|
"aria-hidden": true,
|
|
7778
7898
|
className: cn("flex h-9 w-9 items-center justify-center", className)
|
|
7779
7899
|
}, props), {
|
|
7780
7900
|
children: [
|
|
7781
|
-
/* @__PURE__ */
|
|
7782
|
-
/* @__PURE__ */
|
|
7901
|
+
/* @__PURE__ */ jsx31(DotsHorizontalIcon2, { className: "h-4 w-4" }),
|
|
7902
|
+
/* @__PURE__ */ jsx31("span", { className: "sr-only", children: "More pages" })
|
|
7783
7903
|
]
|
|
7784
7904
|
})
|
|
7785
7905
|
);
|
|
@@ -7788,14 +7908,14 @@ PaginationEllipsis.displayName = "PaginationEllipsis";
|
|
|
7788
7908
|
|
|
7789
7909
|
// src/components/popover.tsx
|
|
7790
7910
|
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
7791
|
-
import * as
|
|
7792
|
-
import { jsx as
|
|
7911
|
+
import * as React54 from "react";
|
|
7912
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
7793
7913
|
var Popover = PopoverPrimitive.Root;
|
|
7794
7914
|
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
7795
7915
|
var PopoverAnchor = PopoverPrimitive.Anchor;
|
|
7796
|
-
var PopoverContent =
|
|
7916
|
+
var PopoverContent = React54.forwardRef((_a, ref) => {
|
|
7797
7917
|
var _b = _a, { className, align = "center", sideOffset = 4 } = _b, props = __objRest(_b, ["className", "align", "sideOffset"]);
|
|
7798
|
-
return /* @__PURE__ */
|
|
7918
|
+
return /* @__PURE__ */ jsx32(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx32(
|
|
7799
7919
|
PopoverPrimitive.Content,
|
|
7800
7920
|
__spreadValues({
|
|
7801
7921
|
ref,
|
|
@@ -7812,11 +7932,11 @@ PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
|
7812
7932
|
|
|
7813
7933
|
// src/components/progress.tsx
|
|
7814
7934
|
import * as ProgressPrimitive from "@radix-ui/react-progress";
|
|
7815
|
-
import * as
|
|
7816
|
-
import { jsx as
|
|
7817
|
-
var Progress =
|
|
7935
|
+
import * as React55 from "react";
|
|
7936
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
7937
|
+
var Progress = React55.forwardRef((_a, ref) => {
|
|
7818
7938
|
var _b = _a, { className, value } = _b, props = __objRest(_b, ["className", "value"]);
|
|
7819
|
-
return /* @__PURE__ */
|
|
7939
|
+
return /* @__PURE__ */ jsx33(
|
|
7820
7940
|
ProgressPrimitive.Root,
|
|
7821
7941
|
__spreadProps(__spreadValues({
|
|
7822
7942
|
ref,
|
|
@@ -7825,7 +7945,7 @@ var Progress = React54.forwardRef((_a, ref) => {
|
|
|
7825
7945
|
className
|
|
7826
7946
|
)
|
|
7827
7947
|
}, props), {
|
|
7828
|
-
children: /* @__PURE__ */
|
|
7948
|
+
children: /* @__PURE__ */ jsx33(
|
|
7829
7949
|
ProgressPrimitive.Indicator,
|
|
7830
7950
|
{
|
|
7831
7951
|
className: "h-full w-full flex-1 bg-primary transition-all",
|
|
@@ -7840,11 +7960,11 @@ Progress.displayName = ProgressPrimitive.Root.displayName;
|
|
|
7840
7960
|
// src/components/radio-group.tsx
|
|
7841
7961
|
import { CheckIcon as CheckIcon6 } from "@radix-ui/react-icons";
|
|
7842
7962
|
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
7843
|
-
import * as
|
|
7844
|
-
import { jsx as
|
|
7845
|
-
var RadioGroup4 =
|
|
7963
|
+
import * as React56 from "react";
|
|
7964
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
7965
|
+
var RadioGroup4 = React56.forwardRef((_a, ref) => {
|
|
7846
7966
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
7847
|
-
return /* @__PURE__ */
|
|
7967
|
+
return /* @__PURE__ */ jsx34(
|
|
7848
7968
|
RadioGroupPrimitive.Root,
|
|
7849
7969
|
__spreadProps(__spreadValues({
|
|
7850
7970
|
className: cn("grid gap-2", className)
|
|
@@ -7854,9 +7974,9 @@ var RadioGroup4 = React55.forwardRef((_a, ref) => {
|
|
|
7854
7974
|
);
|
|
7855
7975
|
});
|
|
7856
7976
|
RadioGroup4.displayName = RadioGroupPrimitive.Root.displayName;
|
|
7857
|
-
var RadioGroupItem =
|
|
7977
|
+
var RadioGroupItem = React56.forwardRef((_a, ref) => {
|
|
7858
7978
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
7859
|
-
return /* @__PURE__ */
|
|
7979
|
+
return /* @__PURE__ */ jsx34(
|
|
7860
7980
|
RadioGroupPrimitive.Item,
|
|
7861
7981
|
__spreadProps(__spreadValues({
|
|
7862
7982
|
ref,
|
|
@@ -7865,7 +7985,7 @@ var RadioGroupItem = React55.forwardRef((_a, ref) => {
|
|
|
7865
7985
|
className
|
|
7866
7986
|
)
|
|
7867
7987
|
}, props), {
|
|
7868
|
-
children: /* @__PURE__ */
|
|
7988
|
+
children: /* @__PURE__ */ jsx34(RadioGroupPrimitive.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx34(CheckIcon6, { className: "h-3.5 w-3.5 fill-primary" }) })
|
|
7869
7989
|
})
|
|
7870
7990
|
);
|
|
7871
7991
|
});
|
|
@@ -7874,14 +7994,14 @@ RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
|
|
|
7874
7994
|
// src/components/resizable.tsx
|
|
7875
7995
|
import { DragHandleDots2Icon } from "@radix-ui/react-icons";
|
|
7876
7996
|
import * as ResizablePrimitive from "react-resizable-panels";
|
|
7877
|
-
import { jsx as
|
|
7997
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
7878
7998
|
var ResizablePanelGroup = (_a) => {
|
|
7879
7999
|
var _b = _a, {
|
|
7880
8000
|
className
|
|
7881
8001
|
} = _b, props = __objRest(_b, [
|
|
7882
8002
|
"className"
|
|
7883
8003
|
]);
|
|
7884
|
-
return /* @__PURE__ */
|
|
8004
|
+
return /* @__PURE__ */ jsx35(
|
|
7885
8005
|
ResizablePrimitive.Group,
|
|
7886
8006
|
__spreadValues({
|
|
7887
8007
|
className: cn("flex h-full w-full aria-[orientation=vertical]:flex-col", className)
|
|
@@ -7897,7 +8017,7 @@ var ResizableHandle = (_a) => {
|
|
|
7897
8017
|
"withHandle",
|
|
7898
8018
|
"className"
|
|
7899
8019
|
]);
|
|
7900
|
-
return /* @__PURE__ */
|
|
8020
|
+
return /* @__PURE__ */ jsx35(
|
|
7901
8021
|
ResizablePrimitive.Separator,
|
|
7902
8022
|
__spreadProps(__spreadValues({
|
|
7903
8023
|
className: cn(
|
|
@@ -7905,35 +8025,35 @@ var ResizableHandle = (_a) => {
|
|
|
7905
8025
|
className
|
|
7906
8026
|
)
|
|
7907
8027
|
}, props), {
|
|
7908
|
-
children: withHandle && /* @__PURE__ */
|
|
8028
|
+
children: withHandle && /* @__PURE__ */ jsx35("div", { className: "z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border", children: /* @__PURE__ */ jsx35(DragHandleDots2Icon, { className: "h-2.5 w-2.5" }) })
|
|
7909
8029
|
})
|
|
7910
8030
|
);
|
|
7911
8031
|
};
|
|
7912
8032
|
|
|
7913
8033
|
// src/components/scroll-area.tsx
|
|
7914
8034
|
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
|
7915
|
-
import * as
|
|
7916
|
-
import { jsx as
|
|
7917
|
-
var ScrollArea =
|
|
8035
|
+
import * as React57 from "react";
|
|
8036
|
+
import { jsx as jsx36, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
8037
|
+
var ScrollArea = React57.forwardRef((_a, ref) => {
|
|
7918
8038
|
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
7919
|
-
return /* @__PURE__ */
|
|
8039
|
+
return /* @__PURE__ */ jsxs21(
|
|
7920
8040
|
ScrollAreaPrimitive.Root,
|
|
7921
8041
|
__spreadProps(__spreadValues({
|
|
7922
8042
|
ref,
|
|
7923
8043
|
className: cn("relative overflow-hidden", className)
|
|
7924
8044
|
}, props), {
|
|
7925
8045
|
children: [
|
|
7926
|
-
/* @__PURE__ */
|
|
7927
|
-
/* @__PURE__ */
|
|
7928
|
-
/* @__PURE__ */
|
|
8046
|
+
/* @__PURE__ */ jsx36(ScrollAreaPrimitive.Viewport, { className: "h-full w-full rounded-[inherit]", children }),
|
|
8047
|
+
/* @__PURE__ */ jsx36(ScrollBar, {}),
|
|
8048
|
+
/* @__PURE__ */ jsx36(ScrollAreaPrimitive.Corner, {})
|
|
7929
8049
|
]
|
|
7930
8050
|
})
|
|
7931
8051
|
);
|
|
7932
8052
|
});
|
|
7933
8053
|
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
|
|
7934
|
-
var ScrollBar =
|
|
8054
|
+
var ScrollBar = React57.forwardRef((_a, ref) => {
|
|
7935
8055
|
var _b = _a, { className, orientation = "vertical" } = _b, props = __objRest(_b, ["className", "orientation"]);
|
|
7936
|
-
return /* @__PURE__ */
|
|
8056
|
+
return /* @__PURE__ */ jsx36(
|
|
7937
8057
|
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
7938
8058
|
__spreadProps(__spreadValues({
|
|
7939
8059
|
ref,
|
|
@@ -7945,208 +8065,465 @@ var ScrollBar = React56.forwardRef((_a, ref) => {
|
|
|
7945
8065
|
className
|
|
7946
8066
|
)
|
|
7947
8067
|
}, props), {
|
|
7948
|
-
children: /* @__PURE__ */
|
|
8068
|
+
children: /* @__PURE__ */ jsx36(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
|
|
7949
8069
|
})
|
|
7950
8070
|
);
|
|
7951
8071
|
});
|
|
7952
8072
|
ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
|
|
7953
8073
|
|
|
7954
8074
|
// src/components/search-input.tsx
|
|
7955
|
-
import
|
|
7956
|
-
import { useDebouncedCallback } from "use-debounce";
|
|
7957
|
-
import { jsx as
|
|
7958
|
-
function
|
|
7959
|
-
|
|
7960
|
-
|
|
7961
|
-
|
|
7962
|
-
|
|
7963
|
-
|
|
7964
|
-
|
|
7965
|
-
}
|
|
7966
|
-
const [searchTerm, setSearchTerm] = React57.useState(value != null ? value : "");
|
|
7967
|
-
const debouncedSearch = useDebouncedCallback((nextValue) => {
|
|
7968
|
-
onSearch(nextValue);
|
|
7969
|
-
}, debounceTime);
|
|
7970
|
-
React57.useEffect(() => {
|
|
7971
|
-
setSearchTerm(value != null ? value : "");
|
|
7972
|
-
}, [value]);
|
|
7973
|
-
const handleChange = (event) => {
|
|
7974
|
-
const nextValue = event.target.value;
|
|
7975
|
-
setSearchTerm(nextValue);
|
|
7976
|
-
debouncedSearch(nextValue);
|
|
7977
|
-
};
|
|
7978
|
-
return /* @__PURE__ */ jsx35(
|
|
7979
|
-
Input,
|
|
7980
|
-
{
|
|
7981
|
-
placeholder: placeholder || "Search...",
|
|
7982
|
-
value: searchTerm,
|
|
7983
|
-
onChange: handleChange,
|
|
7984
|
-
className: cn("w-full md:max-w-sm", className),
|
|
7985
|
-
classNameDefault
|
|
7986
|
-
}
|
|
7987
|
-
);
|
|
8075
|
+
import * as React58 from "react";
|
|
8076
|
+
import { useDebouncedCallback } from "use-debounce";
|
|
8077
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
8078
|
+
function setForwardedRef(ref, value) {
|
|
8079
|
+
if (typeof ref === "function") {
|
|
8080
|
+
ref(value);
|
|
8081
|
+
return;
|
|
8082
|
+
}
|
|
8083
|
+
if (ref) {
|
|
8084
|
+
ref.current = value;
|
|
8085
|
+
}
|
|
7988
8086
|
}
|
|
8087
|
+
var SearchInput = React58.forwardRef(
|
|
8088
|
+
(_a, ref) => {
|
|
8089
|
+
var _b = _a, {
|
|
8090
|
+
value = "",
|
|
8091
|
+
placeholder = "Search...",
|
|
8092
|
+
className,
|
|
8093
|
+
classNameDefault = true,
|
|
8094
|
+
debounceTime = 750,
|
|
8095
|
+
onSearch,
|
|
8096
|
+
onKeyDown,
|
|
8097
|
+
onPointerDown,
|
|
8098
|
+
onMouseDown,
|
|
8099
|
+
onClick,
|
|
8100
|
+
onFocus
|
|
8101
|
+
} = _b, props = __objRest(_b, [
|
|
8102
|
+
"value",
|
|
8103
|
+
"placeholder",
|
|
8104
|
+
"className",
|
|
8105
|
+
"classNameDefault",
|
|
8106
|
+
"debounceTime",
|
|
8107
|
+
"onSearch",
|
|
8108
|
+
"onKeyDown",
|
|
8109
|
+
"onPointerDown",
|
|
8110
|
+
"onMouseDown",
|
|
8111
|
+
"onClick",
|
|
8112
|
+
"onFocus"
|
|
8113
|
+
]);
|
|
8114
|
+
const inputRef = React58.useRef(null);
|
|
8115
|
+
const [searchTerm, setSearchTerm] = React58.useState(value != null ? value : "");
|
|
8116
|
+
const focusInput = React58.useCallback(() => {
|
|
8117
|
+
const input = inputRef.current;
|
|
8118
|
+
if (!input || typeof document === "undefined") return;
|
|
8119
|
+
input.focus({ preventScroll: true });
|
|
8120
|
+
}, []);
|
|
8121
|
+
const composedRef = React58.useCallback(
|
|
8122
|
+
(node) => {
|
|
8123
|
+
inputRef.current = node;
|
|
8124
|
+
setForwardedRef(ref, node);
|
|
8125
|
+
},
|
|
8126
|
+
[ref]
|
|
8127
|
+
);
|
|
8128
|
+
const debouncedSearch = useDebouncedCallback((nextValue) => {
|
|
8129
|
+
onSearch(nextValue);
|
|
8130
|
+
requestAnimationFrame(() => {
|
|
8131
|
+
focusInput();
|
|
8132
|
+
});
|
|
8133
|
+
}, debounceTime);
|
|
8134
|
+
React58.useEffect(() => {
|
|
8135
|
+
setSearchTerm(value != null ? value : "");
|
|
8136
|
+
}, [value]);
|
|
8137
|
+
React58.useEffect(() => {
|
|
8138
|
+
return () => {
|
|
8139
|
+
debouncedSearch.cancel();
|
|
8140
|
+
};
|
|
8141
|
+
}, [debouncedSearch]);
|
|
8142
|
+
const handleChange = (event) => {
|
|
8143
|
+
const nextValue = event.target.value;
|
|
8144
|
+
setSearchTerm(nextValue);
|
|
8145
|
+
if (debounceTime <= 0) {
|
|
8146
|
+
debouncedSearch.cancel();
|
|
8147
|
+
onSearch(nextValue);
|
|
8148
|
+
requestAnimationFrame(() => {
|
|
8149
|
+
focusInput();
|
|
8150
|
+
});
|
|
8151
|
+
return;
|
|
8152
|
+
}
|
|
8153
|
+
debouncedSearch(nextValue);
|
|
8154
|
+
requestAnimationFrame(() => {
|
|
8155
|
+
focusInput();
|
|
8156
|
+
});
|
|
8157
|
+
};
|
|
8158
|
+
return /* @__PURE__ */ jsx37(
|
|
8159
|
+
Input,
|
|
8160
|
+
__spreadValues({
|
|
8161
|
+
ref: composedRef,
|
|
8162
|
+
type: "search",
|
|
8163
|
+
value: searchTerm,
|
|
8164
|
+
placeholder,
|
|
8165
|
+
onChange: handleChange,
|
|
8166
|
+
className: cn("w-full", className),
|
|
8167
|
+
classNameDefault,
|
|
8168
|
+
autoComplete: "off",
|
|
8169
|
+
onKeyDown: (event) => {
|
|
8170
|
+
if (event.key !== "Escape") {
|
|
8171
|
+
event.stopPropagation();
|
|
8172
|
+
}
|
|
8173
|
+
onKeyDown == null ? void 0 : onKeyDown(event);
|
|
8174
|
+
},
|
|
8175
|
+
onPointerDown: (event) => {
|
|
8176
|
+
event.stopPropagation();
|
|
8177
|
+
onPointerDown == null ? void 0 : onPointerDown(event);
|
|
8178
|
+
},
|
|
8179
|
+
onMouseDown: (event) => {
|
|
8180
|
+
event.stopPropagation();
|
|
8181
|
+
onMouseDown == null ? void 0 : onMouseDown(event);
|
|
8182
|
+
},
|
|
8183
|
+
onClick: (event) => {
|
|
8184
|
+
event.stopPropagation();
|
|
8185
|
+
requestAnimationFrame(() => {
|
|
8186
|
+
focusInput();
|
|
8187
|
+
});
|
|
8188
|
+
onClick == null ? void 0 : onClick(event);
|
|
8189
|
+
},
|
|
8190
|
+
onFocus: (event) => {
|
|
8191
|
+
event.stopPropagation();
|
|
8192
|
+
onFocus == null ? void 0 : onFocus(event);
|
|
8193
|
+
}
|
|
8194
|
+
}, props)
|
|
8195
|
+
);
|
|
8196
|
+
}
|
|
8197
|
+
);
|
|
8198
|
+
SearchInput.displayName = "SearchInput";
|
|
7989
8199
|
|
|
7990
8200
|
// src/components/searchable-select.tsx
|
|
7991
|
-
import * as
|
|
7992
|
-
import * as SelectPrimitive2 from "@radix-ui/react-select";
|
|
8201
|
+
import * as React59 from "react";
|
|
7993
8202
|
import { CaretSortIcon as CaretSortIcon2, CheckIcon as CheckIcon7, Cross2Icon as Cross2Icon2 } from "@radix-ui/react-icons";
|
|
7994
|
-
import { jsx as
|
|
8203
|
+
import { jsx as jsx38, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
7995
8204
|
function normalizeText(value) {
|
|
7996
|
-
return String(value != null ? value : "").normalize("NFD").replace(new RegExp("\\p{Diacritic}", "gu"), "").toLowerCase();
|
|
8205
|
+
return String(value != null ? value : "").normalize("NFD").replace(new RegExp("\\p{Diacritic}", "gu"), "").toLowerCase().trim();
|
|
7997
8206
|
}
|
|
7998
|
-
function
|
|
7999
|
-
|
|
8000
|
-
|
|
8001
|
-
|
|
8002
|
-
|
|
8003
|
-
|
|
8004
|
-
|
|
8005
|
-
|
|
8006
|
-
|
|
8007
|
-
|
|
8008
|
-
|
|
8009
|
-
|
|
8010
|
-
|
|
8011
|
-
|
|
8012
|
-
|
|
8013
|
-
|
|
8014
|
-
|
|
8015
|
-
|
|
8016
|
-
|
|
8017
|
-
|
|
8018
|
-
|
|
8019
|
-
|
|
8020
|
-
|
|
8021
|
-
|
|
8022
|
-
|
|
8023
|
-
|
|
8024
|
-
|
|
8025
|
-
|
|
8026
|
-
|
|
8027
|
-
|
|
8028
|
-
|
|
8029
|
-
|
|
8207
|
+
function getLabelText(value) {
|
|
8208
|
+
if (typeof value === "string" || typeof value === "number") {
|
|
8209
|
+
return String(value);
|
|
8210
|
+
}
|
|
8211
|
+
return "";
|
|
8212
|
+
}
|
|
8213
|
+
function getOptionText(item) {
|
|
8214
|
+
if (!item) return "";
|
|
8215
|
+
return getLabelText(item.label) || item.value;
|
|
8216
|
+
}
|
|
8217
|
+
function getNextEnabledIndex2(items, currentIndex, direction) {
|
|
8218
|
+
var _a;
|
|
8219
|
+
if (!items.length) return -1;
|
|
8220
|
+
let nextIndex = currentIndex;
|
|
8221
|
+
for (let index = 0; index < items.length; index += 1) {
|
|
8222
|
+
nextIndex = (nextIndex + direction + items.length) % items.length;
|
|
8223
|
+
if (!((_a = items[nextIndex]) == null ? void 0 : _a.disabled)) {
|
|
8224
|
+
return nextIndex;
|
|
8225
|
+
}
|
|
8226
|
+
}
|
|
8227
|
+
return -1;
|
|
8228
|
+
}
|
|
8229
|
+
function SearchableSelectBase({
|
|
8230
|
+
items,
|
|
8231
|
+
value,
|
|
8232
|
+
defaultValue,
|
|
8233
|
+
onValueChange,
|
|
8234
|
+
placeholder = "Seleccionar opci\xF3n",
|
|
8235
|
+
searchPlaceholder = "Buscar\u2026",
|
|
8236
|
+
emptyText = "No hay resultados",
|
|
8237
|
+
disabled,
|
|
8238
|
+
name,
|
|
8239
|
+
required,
|
|
8240
|
+
triggerClassName,
|
|
8241
|
+
contentClassName,
|
|
8242
|
+
itemClassName,
|
|
8243
|
+
searchInputClassName
|
|
8244
|
+
}) {
|
|
8245
|
+
const rootRef = React59.useRef(null);
|
|
8246
|
+
const inputRef = React59.useRef(null);
|
|
8247
|
+
const listboxId = React59.useId();
|
|
8248
|
+
const isControlled = value !== void 0;
|
|
8249
|
+
const [internalValue, setInternalValue] = React59.useState(defaultValue != null ? defaultValue : "");
|
|
8250
|
+
const currentValue = isControlled ? value != null ? value : "" : internalValue;
|
|
8251
|
+
const selectedItem = React59.useMemo(() => {
|
|
8252
|
+
return items.find((item) => item.value === currentValue);
|
|
8253
|
+
}, [currentValue, items]);
|
|
8254
|
+
const selectedText = React59.useMemo(() => {
|
|
8255
|
+
return getOptionText(selectedItem);
|
|
8256
|
+
}, [selectedItem]);
|
|
8257
|
+
const [open, setOpen] = React59.useState(false);
|
|
8258
|
+
const [inputValue, setInputValue] = React59.useState(selectedText);
|
|
8259
|
+
const [activeIndex, setActiveIndex] = React59.useState(-1);
|
|
8260
|
+
React59.useEffect(() => {
|
|
8261
|
+
if (!open) {
|
|
8262
|
+
setInputValue(selectedText);
|
|
8263
|
+
}
|
|
8264
|
+
}, [open, selectedText]);
|
|
8265
|
+
const filteredItems = React59.useMemo(() => {
|
|
8266
|
+
const query = normalizeText(inputValue);
|
|
8267
|
+
if (!query) return items;
|
|
8030
8268
|
return items.filter((item) => {
|
|
8031
|
-
var
|
|
8269
|
+
var _a;
|
|
8032
8270
|
const haystack = normalizeText(
|
|
8033
|
-
`${(
|
|
8271
|
+
`${getLabelText(item.label)} ${item.value} ${(_a = item.keywords) != null ? _a : ""}`
|
|
8034
8272
|
);
|
|
8035
|
-
return haystack.includes(
|
|
8273
|
+
return haystack.includes(query);
|
|
8036
8274
|
});
|
|
8037
|
-
}, [
|
|
8038
|
-
|
|
8039
|
-
|
|
8040
|
-
|
|
8041
|
-
|
|
8042
|
-
|
|
8043
|
-
|
|
8044
|
-
|
|
8045
|
-
|
|
8046
|
-
|
|
8047
|
-
|
|
8048
|
-
|
|
8049
|
-
|
|
8050
|
-
nextValue,
|
|
8051
|
-
items.find((item) => item.value === nextValue)
|
|
8052
|
-
);
|
|
8053
|
-
setOpen(false);
|
|
8275
|
+
}, [inputValue, items]);
|
|
8276
|
+
React59.useEffect(() => {
|
|
8277
|
+
if (!open) return;
|
|
8278
|
+
const firstEnabledIndex = filteredItems.findIndex((item) => !item.disabled);
|
|
8279
|
+
setActiveIndex(firstEnabledIndex);
|
|
8280
|
+
}, [filteredItems, open]);
|
|
8281
|
+
React59.useEffect(() => {
|
|
8282
|
+
if (!open) return;
|
|
8283
|
+
const handlePointerDown = (event) => {
|
|
8284
|
+
var _a;
|
|
8285
|
+
const target = event.target;
|
|
8286
|
+
if (target && ((_a = rootRef.current) == null ? void 0 : _a.contains(target))) {
|
|
8287
|
+
return;
|
|
8054
8288
|
}
|
|
8055
|
-
|
|
8056
|
-
|
|
8057
|
-
|
|
8058
|
-
|
|
8059
|
-
|
|
8060
|
-
|
|
8061
|
-
|
|
8062
|
-
|
|
8063
|
-
|
|
8064
|
-
|
|
8065
|
-
|
|
8066
|
-
|
|
8067
|
-
|
|
8068
|
-
|
|
8289
|
+
setOpen(false);
|
|
8290
|
+
};
|
|
8291
|
+
document.addEventListener("pointerdown", handlePointerDown, true);
|
|
8292
|
+
return () => {
|
|
8293
|
+
document.removeEventListener("pointerdown", handlePointerDown, true);
|
|
8294
|
+
};
|
|
8295
|
+
}, [open]);
|
|
8296
|
+
const selectItem = React59.useCallback(
|
|
8297
|
+
(item) => {
|
|
8298
|
+
if (item.disabled) return;
|
|
8299
|
+
if (!isControlled) {
|
|
8300
|
+
setInternalValue(item.value);
|
|
8301
|
+
}
|
|
8302
|
+
setInputValue(getOptionText(item));
|
|
8303
|
+
setOpen(false);
|
|
8304
|
+
onValueChange == null ? void 0 : onValueChange(item.value, item);
|
|
8305
|
+
requestAnimationFrame(() => {
|
|
8306
|
+
var _a;
|
|
8307
|
+
(_a = inputRef.current) == null ? void 0 : _a.blur();
|
|
8308
|
+
});
|
|
8309
|
+
},
|
|
8310
|
+
[isControlled, onValueChange]
|
|
8311
|
+
);
|
|
8312
|
+
return /* @__PURE__ */ jsxs22("div", { ref: rootRef, className: "relative w-full", children: [
|
|
8313
|
+
name ? /* @__PURE__ */ jsx38(
|
|
8314
|
+
"input",
|
|
8315
|
+
{
|
|
8316
|
+
type: "hidden",
|
|
8317
|
+
name,
|
|
8318
|
+
value: currentValue,
|
|
8319
|
+
required,
|
|
8320
|
+
disabled
|
|
8321
|
+
}
|
|
8322
|
+
) : null,
|
|
8323
|
+
/* @__PURE__ */ jsxs22(
|
|
8324
|
+
"div",
|
|
8325
|
+
{
|
|
8326
|
+
className: cn(
|
|
8327
|
+
"relative flex h-9 w-full items-center gap-2 rounded-md border border-input bg-background px-3 text-sm shadow-sm transition",
|
|
8328
|
+
"focus-within:border-primary/60 focus-within:ring-2 focus-within:ring-primary/20",
|
|
8329
|
+
disabled && "cursor-not-allowed opacity-50",
|
|
8330
|
+
triggerClassName
|
|
8331
|
+
),
|
|
8332
|
+
onPointerDown: () => {
|
|
8333
|
+
if (disabled) return;
|
|
8334
|
+
setOpen(true);
|
|
8335
|
+
requestAnimationFrame(() => {
|
|
8336
|
+
var _a;
|
|
8337
|
+
(_a = inputRef.current) == null ? void 0 : _a.focus({ preventScroll: true });
|
|
8338
|
+
});
|
|
8339
|
+
},
|
|
8340
|
+
children: [
|
|
8341
|
+
/* @__PURE__ */ jsx38(
|
|
8342
|
+
"input",
|
|
8343
|
+
{
|
|
8344
|
+
ref: inputRef,
|
|
8345
|
+
value: inputValue,
|
|
8346
|
+
role: "combobox",
|
|
8347
|
+
"aria-autocomplete": "list",
|
|
8348
|
+
"aria-expanded": open,
|
|
8349
|
+
"aria-controls": listboxId,
|
|
8350
|
+
"aria-activedescendant": activeIndex >= 0 ? `${listboxId}-option-${activeIndex}` : void 0,
|
|
8351
|
+
placeholder: open ? searchPlaceholder : placeholder,
|
|
8352
|
+
autoComplete: "off",
|
|
8353
|
+
spellCheck: false,
|
|
8354
|
+
disabled,
|
|
8355
|
+
onFocus: () => {
|
|
8356
|
+
setOpen(true);
|
|
8357
|
+
requestAnimationFrame(() => {
|
|
8358
|
+
var _a;
|
|
8359
|
+
(_a = inputRef.current) == null ? void 0 : _a.select();
|
|
8360
|
+
});
|
|
8361
|
+
},
|
|
8362
|
+
onChange: (event) => {
|
|
8363
|
+
setInputValue(event.target.value);
|
|
8364
|
+
setOpen(true);
|
|
8365
|
+
},
|
|
8366
|
+
onKeyDown: (event) => {
|
|
8367
|
+
var _a;
|
|
8368
|
+
if (event.key === "ArrowDown") {
|
|
8369
|
+
event.preventDefault();
|
|
8370
|
+
setOpen(true);
|
|
8371
|
+
setActiveIndex(
|
|
8372
|
+
(currentIndex) => getNextEnabledIndex2(filteredItems, currentIndex, 1)
|
|
8373
|
+
);
|
|
8374
|
+
return;
|
|
8375
|
+
}
|
|
8376
|
+
if (event.key === "ArrowUp") {
|
|
8377
|
+
event.preventDefault();
|
|
8378
|
+
setOpen(true);
|
|
8379
|
+
setActiveIndex(
|
|
8380
|
+
(currentIndex) => getNextEnabledIndex2(filteredItems, currentIndex, -1)
|
|
8381
|
+
);
|
|
8382
|
+
return;
|
|
8383
|
+
}
|
|
8384
|
+
if (event.key === "Enter") {
|
|
8385
|
+
if (!open) return;
|
|
8386
|
+
event.preventDefault();
|
|
8387
|
+
const activeItem = filteredItems[activeIndex];
|
|
8388
|
+
if (activeItem) {
|
|
8389
|
+
selectItem(activeItem);
|
|
8390
|
+
}
|
|
8391
|
+
return;
|
|
8392
|
+
}
|
|
8393
|
+
if (event.key === "Escape") {
|
|
8394
|
+
event.preventDefault();
|
|
8395
|
+
setOpen(false);
|
|
8396
|
+
setInputValue(selectedText);
|
|
8397
|
+
(_a = inputRef.current) == null ? void 0 : _a.blur();
|
|
8398
|
+
}
|
|
8399
|
+
},
|
|
8400
|
+
className: cn(
|
|
8401
|
+
"h-full min-w-0 flex-1 border-0 bg-transparent p-0 text-sm outline-none",
|
|
8402
|
+
"placeholder:text-muted-foreground disabled:cursor-not-allowed",
|
|
8403
|
+
searchInputClassName
|
|
8404
|
+
)
|
|
8405
|
+
}
|
|
8406
|
+
),
|
|
8407
|
+
inputValue && open ? /* @__PURE__ */ jsx38(
|
|
8408
|
+
"button",
|
|
8409
|
+
{
|
|
8410
|
+
type: "button",
|
|
8411
|
+
"aria-label": "Limpiar b\xFAsqueda",
|
|
8412
|
+
tabIndex: -1,
|
|
8413
|
+
onPointerDown: (event) => {
|
|
8414
|
+
event.preventDefault();
|
|
8415
|
+
event.stopPropagation();
|
|
8416
|
+
},
|
|
8417
|
+
onClick: (event) => {
|
|
8418
|
+
event.preventDefault();
|
|
8419
|
+
event.stopPropagation();
|
|
8420
|
+
setInputValue("");
|
|
8421
|
+
requestAnimationFrame(() => {
|
|
8422
|
+
var _a;
|
|
8423
|
+
(_a = inputRef.current) == null ? void 0 : _a.focus({ preventScroll: true });
|
|
8424
|
+
});
|
|
8425
|
+
},
|
|
8426
|
+
className: "inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md text-muted-foreground transition hover:bg-muted hover:text-foreground",
|
|
8427
|
+
children: /* @__PURE__ */ jsx38(Cross2Icon2, { "aria-hidden": "true", className: "h-3.5 w-3.5" })
|
|
8428
|
+
}
|
|
8429
|
+
) : null,
|
|
8430
|
+
/* @__PURE__ */ jsx38(
|
|
8431
|
+
CaretSortIcon2,
|
|
8432
|
+
{
|
|
8433
|
+
"aria-hidden": "true",
|
|
8434
|
+
className: cn(
|
|
8435
|
+
"h-4 w-4 shrink-0 opacity-50 transition-transform",
|
|
8436
|
+
open && "rotate-180"
|
|
8437
|
+
)
|
|
8438
|
+
}
|
|
8439
|
+
)
|
|
8440
|
+
]
|
|
8441
|
+
}
|
|
8442
|
+
),
|
|
8443
|
+
/* @__PURE__ */ jsx38(
|
|
8444
|
+
"div",
|
|
8445
|
+
{
|
|
8446
|
+
className: cn(
|
|
8447
|
+
"absolute left-0 top-full z-50 mt-1 w-full overflow-hidden rounded-xl border border-border bg-popover text-popover-foreground shadow-xl transition",
|
|
8448
|
+
!open && "pointer-events-none invisible opacity-0",
|
|
8449
|
+
open && "visible opacity-100",
|
|
8450
|
+
contentClassName
|
|
8069
8451
|
),
|
|
8070
|
-
|
|
8071
|
-
|
|
8452
|
+
children: /* @__PURE__ */ jsx38(
|
|
8453
|
+
"div",
|
|
8072
8454
|
{
|
|
8073
|
-
|
|
8074
|
-
|
|
8075
|
-
|
|
8076
|
-
|
|
8077
|
-
|
|
8078
|
-
onCloseAutoFocus: (event) => {
|
|
8079
|
-
event.preventDefault();
|
|
8080
|
-
requestAnimationFrame(() => {
|
|
8081
|
-
var _a2;
|
|
8082
|
-
return (_a2 = inputRef.current) == null ? void 0 : _a2.focus();
|
|
8083
|
-
});
|
|
8455
|
+
id: listboxId,
|
|
8456
|
+
role: "listbox",
|
|
8457
|
+
className: "max-h-72 overflow-y-auto overscroll-contain p-1 [scrollbar-gutter:stable]",
|
|
8458
|
+
onWheelCapture: (event) => {
|
|
8459
|
+
event.stopPropagation();
|
|
8084
8460
|
},
|
|
8085
|
-
|
|
8086
|
-
|
|
8087
|
-
|
|
8088
|
-
|
|
8089
|
-
|
|
8090
|
-
|
|
8091
|
-
|
|
8092
|
-
|
|
8093
|
-
onKeyDown: (event) => {
|
|
8094
|
-
if (event.key !== "Escape") event.stopPropagation();
|
|
8095
|
-
},
|
|
8096
|
-
placeholder: searchPlaceholder,
|
|
8097
|
-
className: cn(
|
|
8098
|
-
"h-9 w-full rounded-md border border-input bg-input px-3 pr-8 text-sm outline-none focus:ring-2 focus:ring-primary/20",
|
|
8099
|
-
searchInputClassName
|
|
8100
|
-
)
|
|
8101
|
-
}
|
|
8102
|
-
),
|
|
8103
|
-
query ? /* @__PURE__ */ jsx36(
|
|
8104
|
-
"button",
|
|
8105
|
-
{
|
|
8106
|
-
type: "button",
|
|
8107
|
-
"aria-label": "Limpiar b\xFAsqueda",
|
|
8108
|
-
onClick: () => {
|
|
8109
|
-
var _a2;
|
|
8110
|
-
setQuery("");
|
|
8111
|
-
(_a2 = inputRef.current) == null ? void 0 : _a2.focus();
|
|
8112
|
-
},
|
|
8113
|
-
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__ */ jsx36(Cross2Icon2, { className: "h-3.5 w-3.5" })
|
|
8115
|
-
}
|
|
8116
|
-
) : null
|
|
8117
|
-
] }) }),
|
|
8118
|
-
/* @__PURE__ */ jsx36(SelectPrimitive2.Viewport, { className: "max-h-80 p-1", children: filteredItems.length === 0 ? /* @__PURE__ */ jsx36("div", { className: "px-3 py-2 text-sm text-muted-foreground", children: emptyText }) : filteredItems.map((item) => /* @__PURE__ */ jsxs21(
|
|
8119
|
-
SelectPrimitive2.Item,
|
|
8461
|
+
onTouchMoveCapture: (event) => {
|
|
8462
|
+
event.stopPropagation();
|
|
8463
|
+
},
|
|
8464
|
+
children: filteredItems.length === 0 ? /* @__PURE__ */ jsx38("div", { className: "px-3 py-6 text-center text-sm text-muted-foreground", children: emptyText }) : filteredItems.map((item, index) => {
|
|
8465
|
+
const isSelected = item.value === currentValue;
|
|
8466
|
+
const isActive = index === activeIndex;
|
|
8467
|
+
return /* @__PURE__ */ jsxs22(
|
|
8468
|
+
"div",
|
|
8120
8469
|
{
|
|
8121
|
-
|
|
8122
|
-
|
|
8470
|
+
id: `${listboxId}-option-${index}`,
|
|
8471
|
+
role: "option",
|
|
8472
|
+
"aria-selected": isSelected,
|
|
8473
|
+
"aria-disabled": item.disabled,
|
|
8474
|
+
tabIndex: -1,
|
|
8475
|
+
onMouseMove: () => {
|
|
8476
|
+
if (!item.disabled) {
|
|
8477
|
+
setActiveIndex(index);
|
|
8478
|
+
}
|
|
8479
|
+
},
|
|
8480
|
+
onPointerDown: (event) => {
|
|
8481
|
+
event.preventDefault();
|
|
8482
|
+
event.stopPropagation();
|
|
8483
|
+
if (!item.disabled) {
|
|
8484
|
+
selectItem(item);
|
|
8485
|
+
}
|
|
8486
|
+
},
|
|
8123
8487
|
className: cn(
|
|
8124
|
-
"relative flex w-full
|
|
8488
|
+
"relative flex w-full select-none items-center gap-2 rounded-lg px-3 py-2 text-left text-sm outline-none transition",
|
|
8489
|
+
item.disabled ? "pointer-events-none opacity-50" : "cursor-pointer",
|
|
8490
|
+
isActive && !item.disabled && "bg-accent text-accent-foreground",
|
|
8491
|
+
!isActive && !item.disabled && "hover:bg-accent/70 hover:text-accent-foreground",
|
|
8492
|
+
isSelected && "font-medium",
|
|
8125
8493
|
itemClassName
|
|
8126
8494
|
),
|
|
8127
8495
|
children: [
|
|
8128
|
-
/* @__PURE__ */
|
|
8129
|
-
|
|
8496
|
+
/* @__PURE__ */ jsx38("span", { className: "min-w-0 flex-1 truncate", children: item.label }),
|
|
8497
|
+
isSelected ? /* @__PURE__ */ jsx38(
|
|
8498
|
+
CheckIcon7,
|
|
8499
|
+
{
|
|
8500
|
+
"aria-hidden": "true",
|
|
8501
|
+
className: "h-4 w-4 shrink-0 text-primary"
|
|
8502
|
+
}
|
|
8503
|
+
) : null
|
|
8130
8504
|
]
|
|
8131
8505
|
},
|
|
8132
8506
|
item.value
|
|
8133
|
-
)
|
|
8134
|
-
|
|
8507
|
+
);
|
|
8508
|
+
})
|
|
8135
8509
|
}
|
|
8136
|
-
)
|
|
8137
|
-
|
|
8138
|
-
|
|
8139
|
-
);
|
|
8510
|
+
)
|
|
8511
|
+
}
|
|
8512
|
+
)
|
|
8513
|
+
] });
|
|
8140
8514
|
}
|
|
8515
|
+
var SearchableSelect = React59.memo(
|
|
8516
|
+
SearchableSelectBase
|
|
8517
|
+
);
|
|
8141
8518
|
|
|
8142
8519
|
// src/components/separator.tsx
|
|
8143
8520
|
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
8144
|
-
import * as
|
|
8145
|
-
import { jsx as
|
|
8146
|
-
var Separator6 =
|
|
8521
|
+
import * as React60 from "react";
|
|
8522
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
8523
|
+
var Separator6 = React60.forwardRef(
|
|
8147
8524
|
(_a, ref) => {
|
|
8148
8525
|
var _b = _a, { className, orientation = "horizontal", decorative = true } = _b, props = __objRest(_b, ["className", "orientation", "decorative"]);
|
|
8149
|
-
return /* @__PURE__ */
|
|
8526
|
+
return /* @__PURE__ */ jsx39(
|
|
8150
8527
|
SeparatorPrimitive.Root,
|
|
8151
8528
|
__spreadValues({
|
|
8152
8529
|
ref,
|
|
@@ -8167,15 +8544,15 @@ Separator6.displayName = SeparatorPrimitive.Root.displayName;
|
|
|
8167
8544
|
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
8168
8545
|
import { Cross2Icon as Cross2Icon3 } from "@radix-ui/react-icons";
|
|
8169
8546
|
import { cva as cva7 } from "class-variance-authority";
|
|
8170
|
-
import * as
|
|
8171
|
-
import { jsx as
|
|
8547
|
+
import * as React61 from "react";
|
|
8548
|
+
import { jsx as jsx40, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
8172
8549
|
var Sheet = SheetPrimitive.Root;
|
|
8173
8550
|
var SheetTrigger = SheetPrimitive.Trigger;
|
|
8174
8551
|
var SheetClose = SheetPrimitive.Close;
|
|
8175
8552
|
var SheetPortal = SheetPrimitive.Portal;
|
|
8176
|
-
var SheetOverlay =
|
|
8553
|
+
var SheetOverlay = React61.forwardRef((_a, ref) => {
|
|
8177
8554
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
8178
|
-
return /* @__PURE__ */
|
|
8555
|
+
return /* @__PURE__ */ jsx40(
|
|
8179
8556
|
SheetPrimitive.Overlay,
|
|
8180
8557
|
__spreadProps(__spreadValues({
|
|
8181
8558
|
className: cn(
|
|
@@ -8204,11 +8581,11 @@ var sheetVariants = cva7(
|
|
|
8204
8581
|
}
|
|
8205
8582
|
}
|
|
8206
8583
|
);
|
|
8207
|
-
var SheetContent =
|
|
8584
|
+
var SheetContent = React61.forwardRef((_a, ref) => {
|
|
8208
8585
|
var _b = _a, { side = "right", className, children } = _b, props = __objRest(_b, ["side", "className", "children"]);
|
|
8209
|
-
return /* @__PURE__ */
|
|
8210
|
-
/* @__PURE__ */
|
|
8211
|
-
/* @__PURE__ */
|
|
8586
|
+
return /* @__PURE__ */ jsxs23(SheetPortal, { children: [
|
|
8587
|
+
/* @__PURE__ */ jsx40(SheetOverlay, {}),
|
|
8588
|
+
/* @__PURE__ */ jsxs23(
|
|
8212
8589
|
SheetPrimitive.Content,
|
|
8213
8590
|
__spreadProps(__spreadValues({
|
|
8214
8591
|
ref,
|
|
@@ -8216,9 +8593,9 @@ var SheetContent = React60.forwardRef((_a, ref) => {
|
|
|
8216
8593
|
}, props), {
|
|
8217
8594
|
children: [
|
|
8218
8595
|
children,
|
|
8219
|
-
/* @__PURE__ */
|
|
8220
|
-
/* @__PURE__ */
|
|
8221
|
-
/* @__PURE__ */
|
|
8596
|
+
/* @__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: [
|
|
8597
|
+
/* @__PURE__ */ jsx40(Cross2Icon3, { className: "h-4 w-4" }),
|
|
8598
|
+
/* @__PURE__ */ jsx40("span", { className: "sr-only", children: "Close" })
|
|
8222
8599
|
] })
|
|
8223
8600
|
]
|
|
8224
8601
|
})
|
|
@@ -8232,7 +8609,7 @@ var SheetHeader = (_a) => {
|
|
|
8232
8609
|
} = _b, props = __objRest(_b, [
|
|
8233
8610
|
"className"
|
|
8234
8611
|
]);
|
|
8235
|
-
return /* @__PURE__ */
|
|
8612
|
+
return /* @__PURE__ */ jsx40(
|
|
8236
8613
|
"div",
|
|
8237
8614
|
__spreadValues({
|
|
8238
8615
|
className: cn(
|
|
@@ -8249,7 +8626,7 @@ var SheetFooter = (_a) => {
|
|
|
8249
8626
|
} = _b, props = __objRest(_b, [
|
|
8250
8627
|
"className"
|
|
8251
8628
|
]);
|
|
8252
|
-
return /* @__PURE__ */
|
|
8629
|
+
return /* @__PURE__ */ jsx40(
|
|
8253
8630
|
"div",
|
|
8254
8631
|
__spreadValues({
|
|
8255
8632
|
className: cn(
|
|
@@ -8260,9 +8637,9 @@ var SheetFooter = (_a) => {
|
|
|
8260
8637
|
);
|
|
8261
8638
|
};
|
|
8262
8639
|
SheetFooter.displayName = "SheetFooter";
|
|
8263
|
-
var SheetTitle =
|
|
8640
|
+
var SheetTitle = React61.forwardRef((_a, ref) => {
|
|
8264
8641
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
8265
|
-
return /* @__PURE__ */
|
|
8642
|
+
return /* @__PURE__ */ jsx40(
|
|
8266
8643
|
SheetPrimitive.Title,
|
|
8267
8644
|
__spreadValues({
|
|
8268
8645
|
ref,
|
|
@@ -8271,9 +8648,9 @@ var SheetTitle = React60.forwardRef((_a, ref) => {
|
|
|
8271
8648
|
);
|
|
8272
8649
|
});
|
|
8273
8650
|
SheetTitle.displayName = SheetPrimitive.Title.displayName;
|
|
8274
|
-
var SheetDescription =
|
|
8651
|
+
var SheetDescription = React61.forwardRef((_a, ref) => {
|
|
8275
8652
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
8276
|
-
return /* @__PURE__ */
|
|
8653
|
+
return /* @__PURE__ */ jsx40(
|
|
8277
8654
|
SheetPrimitive.Description,
|
|
8278
8655
|
__spreadValues({
|
|
8279
8656
|
ref,
|
|
@@ -8284,14 +8661,14 @@ var SheetDescription = React60.forwardRef((_a, ref) => {
|
|
|
8284
8661
|
SheetDescription.displayName = SheetPrimitive.Description.displayName;
|
|
8285
8662
|
|
|
8286
8663
|
// src/components/skeleton.tsx
|
|
8287
|
-
import { jsx as
|
|
8664
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
8288
8665
|
function Skeleton(_a) {
|
|
8289
8666
|
var _b = _a, {
|
|
8290
8667
|
className
|
|
8291
8668
|
} = _b, props = __objRest(_b, [
|
|
8292
8669
|
"className"
|
|
8293
8670
|
]);
|
|
8294
|
-
return /* @__PURE__ */
|
|
8671
|
+
return /* @__PURE__ */ jsx41(
|
|
8295
8672
|
"div",
|
|
8296
8673
|
__spreadValues({
|
|
8297
8674
|
className: cn("animate-pulse rounded-md bg-primary/10", className)
|
|
@@ -8301,11 +8678,11 @@ function Skeleton(_a) {
|
|
|
8301
8678
|
|
|
8302
8679
|
// src/components/slider.tsx
|
|
8303
8680
|
import * as SliderPrimitive from "@radix-ui/react-slider";
|
|
8304
|
-
import * as
|
|
8305
|
-
import { jsx as
|
|
8306
|
-
var Slider =
|
|
8681
|
+
import * as React62 from "react";
|
|
8682
|
+
import { jsx as jsx42, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
8683
|
+
var Slider = React62.forwardRef((_a, ref) => {
|
|
8307
8684
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
8308
|
-
return /* @__PURE__ */
|
|
8685
|
+
return /* @__PURE__ */ jsxs24(
|
|
8309
8686
|
SliderPrimitive.Root,
|
|
8310
8687
|
__spreadProps(__spreadValues({
|
|
8311
8688
|
ref,
|
|
@@ -8315,8 +8692,8 @@ var Slider = React61.forwardRef((_a, ref) => {
|
|
|
8315
8692
|
)
|
|
8316
8693
|
}, props), {
|
|
8317
8694
|
children: [
|
|
8318
|
-
/* @__PURE__ */
|
|
8319
|
-
/* @__PURE__ */
|
|
8695
|
+
/* @__PURE__ */ jsx42(SliderPrimitive.Track, { className: "relative h-1.5 w-full grow overflow-hidden rounded-full bg-primary/20", children: /* @__PURE__ */ jsx42(SliderPrimitive.Range, { className: "absolute h-full bg-primary" }) }),
|
|
8696
|
+
/* @__PURE__ */ jsx42(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
8697
|
]
|
|
8321
8698
|
})
|
|
8322
8699
|
);
|
|
@@ -8326,11 +8703,11 @@ Slider.displayName = SliderPrimitive.Root.displayName;
|
|
|
8326
8703
|
// src/components/sonner.tsx
|
|
8327
8704
|
import { useTheme } from "next-themes";
|
|
8328
8705
|
import { Toaster as Sonner } from "sonner";
|
|
8329
|
-
import { jsx as
|
|
8706
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
8330
8707
|
var ToasterSonner = (_a) => {
|
|
8331
8708
|
var props = __objRest(_a, []);
|
|
8332
8709
|
const { theme = "system" } = useTheme();
|
|
8333
|
-
return /* @__PURE__ */
|
|
8710
|
+
return /* @__PURE__ */ jsx43(
|
|
8334
8711
|
Sonner,
|
|
8335
8712
|
__spreadValues({
|
|
8336
8713
|
theme,
|
|
@@ -8349,11 +8726,11 @@ var ToasterSonner = (_a) => {
|
|
|
8349
8726
|
|
|
8350
8727
|
// src/components/switch.tsx
|
|
8351
8728
|
import * as SwitchPrimitives from "@radix-ui/react-switch";
|
|
8352
|
-
import * as
|
|
8353
|
-
import { jsx as
|
|
8354
|
-
var Switch =
|
|
8729
|
+
import * as React63 from "react";
|
|
8730
|
+
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
8731
|
+
var Switch = React63.forwardRef((_a, ref) => {
|
|
8355
8732
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
8356
|
-
return /* @__PURE__ */
|
|
8733
|
+
return /* @__PURE__ */ jsx44(
|
|
8357
8734
|
SwitchPrimitives.Root,
|
|
8358
8735
|
__spreadProps(__spreadValues({
|
|
8359
8736
|
className: cn(
|
|
@@ -8362,7 +8739,7 @@ var Switch = React62.forwardRef((_a, ref) => {
|
|
|
8362
8739
|
)
|
|
8363
8740
|
}, props), {
|
|
8364
8741
|
ref,
|
|
8365
|
-
children: /* @__PURE__ */
|
|
8742
|
+
children: /* @__PURE__ */ jsx44(
|
|
8366
8743
|
SwitchPrimitives.Thumb,
|
|
8367
8744
|
{
|
|
8368
8745
|
className: cn(
|
|
@@ -8376,12 +8753,12 @@ var Switch = React62.forwardRef((_a, ref) => {
|
|
|
8376
8753
|
Switch.displayName = SwitchPrimitives.Root.displayName;
|
|
8377
8754
|
|
|
8378
8755
|
// src/components/table.tsx
|
|
8379
|
-
import * as
|
|
8380
|
-
import { jsx as
|
|
8381
|
-
var Table =
|
|
8756
|
+
import * as React64 from "react";
|
|
8757
|
+
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
8758
|
+
var Table = React64.forwardRef(
|
|
8382
8759
|
(_a, ref) => {
|
|
8383
8760
|
var _b = _a, { className, containerClassName } = _b, props = __objRest(_b, ["className", "containerClassName"]);
|
|
8384
|
-
return /* @__PURE__ */
|
|
8761
|
+
return /* @__PURE__ */ jsx45("div", { className: cn("relative w-full overflow-visible", containerClassName), children: /* @__PURE__ */ jsx45(
|
|
8385
8762
|
"table",
|
|
8386
8763
|
__spreadValues({
|
|
8387
8764
|
ref,
|
|
@@ -8391,14 +8768,14 @@ var Table = React63.forwardRef(
|
|
|
8391
8768
|
}
|
|
8392
8769
|
);
|
|
8393
8770
|
Table.displayName = "Table";
|
|
8394
|
-
var TableHeader =
|
|
8771
|
+
var TableHeader = React64.forwardRef((_a, ref) => {
|
|
8395
8772
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
8396
|
-
return /* @__PURE__ */
|
|
8773
|
+
return /* @__PURE__ */ jsx45("thead", __spreadValues({ ref, className: cn("[&_tr]:border-b", className) }, props));
|
|
8397
8774
|
});
|
|
8398
8775
|
TableHeader.displayName = "TableHeader";
|
|
8399
|
-
var TableBody =
|
|
8776
|
+
var TableBody = React64.forwardRef((_a, ref) => {
|
|
8400
8777
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
8401
|
-
return /* @__PURE__ */
|
|
8778
|
+
return /* @__PURE__ */ jsx45(
|
|
8402
8779
|
"tbody",
|
|
8403
8780
|
__spreadValues({
|
|
8404
8781
|
ref,
|
|
@@ -8407,9 +8784,9 @@ var TableBody = React63.forwardRef((_a, ref) => {
|
|
|
8407
8784
|
);
|
|
8408
8785
|
});
|
|
8409
8786
|
TableBody.displayName = "TableBody";
|
|
8410
|
-
var TableFooter =
|
|
8787
|
+
var TableFooter = React64.forwardRef((_a, ref) => {
|
|
8411
8788
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
8412
|
-
return /* @__PURE__ */
|
|
8789
|
+
return /* @__PURE__ */ jsx45(
|
|
8413
8790
|
"tfoot",
|
|
8414
8791
|
__spreadValues({
|
|
8415
8792
|
ref,
|
|
@@ -8421,9 +8798,9 @@ var TableFooter = React63.forwardRef((_a, ref) => {
|
|
|
8421
8798
|
);
|
|
8422
8799
|
});
|
|
8423
8800
|
TableFooter.displayName = "TableFooter";
|
|
8424
|
-
var TableRow =
|
|
8801
|
+
var TableRow = React64.forwardRef((_a, ref) => {
|
|
8425
8802
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
8426
|
-
return /* @__PURE__ */
|
|
8803
|
+
return /* @__PURE__ */ jsx45(
|
|
8427
8804
|
"tr",
|
|
8428
8805
|
__spreadValues({
|
|
8429
8806
|
ref,
|
|
@@ -8435,9 +8812,9 @@ var TableRow = React63.forwardRef((_a, ref) => {
|
|
|
8435
8812
|
);
|
|
8436
8813
|
});
|
|
8437
8814
|
TableRow.displayName = "TableRow";
|
|
8438
|
-
var TableHead =
|
|
8815
|
+
var TableHead = React64.forwardRef((_a, ref) => {
|
|
8439
8816
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
8440
|
-
return /* @__PURE__ */
|
|
8817
|
+
return /* @__PURE__ */ jsx45(
|
|
8441
8818
|
"th",
|
|
8442
8819
|
__spreadValues({
|
|
8443
8820
|
ref,
|
|
@@ -8449,9 +8826,9 @@ var TableHead = React63.forwardRef((_a, ref) => {
|
|
|
8449
8826
|
);
|
|
8450
8827
|
});
|
|
8451
8828
|
TableHead.displayName = "TableHead";
|
|
8452
|
-
var TableCell =
|
|
8829
|
+
var TableCell = React64.forwardRef((_a, ref) => {
|
|
8453
8830
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
8454
|
-
return /* @__PURE__ */
|
|
8831
|
+
return /* @__PURE__ */ jsx45(
|
|
8455
8832
|
"td",
|
|
8456
8833
|
__spreadValues({
|
|
8457
8834
|
ref,
|
|
@@ -8463,9 +8840,9 @@ var TableCell = React63.forwardRef((_a, ref) => {
|
|
|
8463
8840
|
);
|
|
8464
8841
|
});
|
|
8465
8842
|
TableCell.displayName = "TableCell";
|
|
8466
|
-
var TableCaption =
|
|
8843
|
+
var TableCaption = React64.forwardRef((_a, ref) => {
|
|
8467
8844
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
8468
|
-
return /* @__PURE__ */
|
|
8845
|
+
return /* @__PURE__ */ jsx45(
|
|
8469
8846
|
"caption",
|
|
8470
8847
|
__spreadValues({
|
|
8471
8848
|
ref,
|
|
@@ -8477,12 +8854,12 @@ TableCaption.displayName = "TableCaption";
|
|
|
8477
8854
|
|
|
8478
8855
|
// src/components/tabs.tsx
|
|
8479
8856
|
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
8480
|
-
import * as
|
|
8481
|
-
import { jsx as
|
|
8857
|
+
import * as React65 from "react";
|
|
8858
|
+
import { jsx as jsx46 } from "react/jsx-runtime";
|
|
8482
8859
|
var Tabs = TabsPrimitive.Root;
|
|
8483
|
-
var TabsList =
|
|
8860
|
+
var TabsList = React65.forwardRef((_a, ref) => {
|
|
8484
8861
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
8485
|
-
return /* @__PURE__ */
|
|
8862
|
+
return /* @__PURE__ */ jsx46(
|
|
8486
8863
|
TabsPrimitive.List,
|
|
8487
8864
|
__spreadValues({
|
|
8488
8865
|
ref,
|
|
@@ -8494,9 +8871,9 @@ var TabsList = React64.forwardRef((_a, ref) => {
|
|
|
8494
8871
|
);
|
|
8495
8872
|
});
|
|
8496
8873
|
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
8497
|
-
var TabsTrigger =
|
|
8874
|
+
var TabsTrigger = React65.forwardRef((_a, ref) => {
|
|
8498
8875
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
8499
|
-
return /* @__PURE__ */
|
|
8876
|
+
return /* @__PURE__ */ jsx46(
|
|
8500
8877
|
TabsPrimitive.Trigger,
|
|
8501
8878
|
__spreadValues({
|
|
8502
8879
|
ref,
|
|
@@ -8508,9 +8885,9 @@ var TabsTrigger = React64.forwardRef((_a, ref) => {
|
|
|
8508
8885
|
);
|
|
8509
8886
|
});
|
|
8510
8887
|
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
8511
|
-
var TabsContent =
|
|
8888
|
+
var TabsContent = React65.forwardRef((_a, ref) => {
|
|
8512
8889
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
8513
|
-
return /* @__PURE__ */
|
|
8890
|
+
return /* @__PURE__ */ jsx46(
|
|
8514
8891
|
TabsPrimitive.Content,
|
|
8515
8892
|
__spreadValues({
|
|
8516
8893
|
ref,
|
|
@@ -8524,12 +8901,12 @@ var TabsContent = React64.forwardRef((_a, ref) => {
|
|
|
8524
8901
|
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
8525
8902
|
|
|
8526
8903
|
// src/components/textarea.tsx
|
|
8527
|
-
import * as
|
|
8528
|
-
import { jsx as
|
|
8529
|
-
var Textarea =
|
|
8904
|
+
import * as React66 from "react";
|
|
8905
|
+
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
8906
|
+
var Textarea = React66.forwardRef(
|
|
8530
8907
|
(_a, ref) => {
|
|
8531
8908
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
8532
|
-
return /* @__PURE__ */
|
|
8909
|
+
return /* @__PURE__ */ jsx47(
|
|
8533
8910
|
"textarea",
|
|
8534
8911
|
__spreadValues({
|
|
8535
8912
|
className: cn(
|
|
@@ -8547,12 +8924,12 @@ Textarea.displayName = "Textarea";
|
|
|
8547
8924
|
import { Cross2Icon as Cross2Icon4 } from "@radix-ui/react-icons";
|
|
8548
8925
|
import * as ToastPrimitives from "@radix-ui/react-toast";
|
|
8549
8926
|
import { cva as cva8 } from "class-variance-authority";
|
|
8550
|
-
import * as
|
|
8551
|
-
import { jsx as
|
|
8927
|
+
import * as React67 from "react";
|
|
8928
|
+
import { jsx as jsx48 } from "react/jsx-runtime";
|
|
8552
8929
|
var ToastProvider = ToastPrimitives.Provider;
|
|
8553
|
-
var ToastViewport =
|
|
8930
|
+
var ToastViewport = React67.forwardRef((_a, ref) => {
|
|
8554
8931
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
8555
|
-
return /* @__PURE__ */
|
|
8932
|
+
return /* @__PURE__ */ jsx48(
|
|
8556
8933
|
ToastPrimitives.Viewport,
|
|
8557
8934
|
__spreadValues({
|
|
8558
8935
|
ref,
|
|
@@ -8578,9 +8955,9 @@ var toastVariants = cva8(
|
|
|
8578
8955
|
}
|
|
8579
8956
|
}
|
|
8580
8957
|
);
|
|
8581
|
-
var Toast =
|
|
8958
|
+
var Toast = React67.forwardRef((_a, ref) => {
|
|
8582
8959
|
var _b = _a, { className, variant } = _b, props = __objRest(_b, ["className", "variant"]);
|
|
8583
|
-
return /* @__PURE__ */
|
|
8960
|
+
return /* @__PURE__ */ jsx48(
|
|
8584
8961
|
ToastPrimitives.Root,
|
|
8585
8962
|
__spreadValues({
|
|
8586
8963
|
ref,
|
|
@@ -8589,9 +8966,9 @@ var Toast = React66.forwardRef((_a, ref) => {
|
|
|
8589
8966
|
);
|
|
8590
8967
|
});
|
|
8591
8968
|
Toast.displayName = ToastPrimitives.Root.displayName;
|
|
8592
|
-
var ToastAction =
|
|
8969
|
+
var ToastAction = React67.forwardRef((_a, ref) => {
|
|
8593
8970
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
8594
|
-
return /* @__PURE__ */
|
|
8971
|
+
return /* @__PURE__ */ jsx48(
|
|
8595
8972
|
ToastPrimitives.Action,
|
|
8596
8973
|
__spreadValues({
|
|
8597
8974
|
ref,
|
|
@@ -8603,9 +8980,9 @@ var ToastAction = React66.forwardRef((_a, ref) => {
|
|
|
8603
8980
|
);
|
|
8604
8981
|
});
|
|
8605
8982
|
ToastAction.displayName = ToastPrimitives.Action.displayName;
|
|
8606
|
-
var ToastClose =
|
|
8983
|
+
var ToastClose = React67.forwardRef((_a, ref) => {
|
|
8607
8984
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
8608
|
-
return /* @__PURE__ */
|
|
8985
|
+
return /* @__PURE__ */ jsx48(
|
|
8609
8986
|
ToastPrimitives.Close,
|
|
8610
8987
|
__spreadProps(__spreadValues({
|
|
8611
8988
|
ref,
|
|
@@ -8615,14 +8992,14 @@ var ToastClose = React66.forwardRef((_a, ref) => {
|
|
|
8615
8992
|
),
|
|
8616
8993
|
"toast-close": ""
|
|
8617
8994
|
}, props), {
|
|
8618
|
-
children: /* @__PURE__ */
|
|
8995
|
+
children: /* @__PURE__ */ jsx48(Cross2Icon4, { className: "h-4 w-4" })
|
|
8619
8996
|
})
|
|
8620
8997
|
);
|
|
8621
8998
|
});
|
|
8622
8999
|
ToastClose.displayName = ToastPrimitives.Close.displayName;
|
|
8623
|
-
var ToastTitle =
|
|
9000
|
+
var ToastTitle = React67.forwardRef((_a, ref) => {
|
|
8624
9001
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
8625
|
-
return /* @__PURE__ */
|
|
9002
|
+
return /* @__PURE__ */ jsx48(
|
|
8626
9003
|
ToastPrimitives.Title,
|
|
8627
9004
|
__spreadValues({
|
|
8628
9005
|
ref,
|
|
@@ -8631,9 +9008,9 @@ var ToastTitle = React66.forwardRef((_a, ref) => {
|
|
|
8631
9008
|
);
|
|
8632
9009
|
});
|
|
8633
9010
|
ToastTitle.displayName = ToastPrimitives.Title.displayName;
|
|
8634
|
-
var ToastDescription =
|
|
9011
|
+
var ToastDescription = React67.forwardRef((_a, ref) => {
|
|
8635
9012
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
8636
|
-
return /* @__PURE__ */
|
|
9013
|
+
return /* @__PURE__ */ jsx48(
|
|
8637
9014
|
ToastPrimitives.Description,
|
|
8638
9015
|
__spreadValues({
|
|
8639
9016
|
ref,
|
|
@@ -8644,7 +9021,7 @@ var ToastDescription = React66.forwardRef((_a, ref) => {
|
|
|
8644
9021
|
ToastDescription.displayName = ToastPrimitives.Description.displayName;
|
|
8645
9022
|
|
|
8646
9023
|
// src/components/use-toast.ts
|
|
8647
|
-
import * as
|
|
9024
|
+
import * as React68 from "react";
|
|
8648
9025
|
var TOAST_LIMIT = 1;
|
|
8649
9026
|
var TOAST_REMOVE_DELAY = 1e6;
|
|
8650
9027
|
var count = 0;
|
|
@@ -8739,8 +9116,8 @@ function toast(_a) {
|
|
|
8739
9116
|
};
|
|
8740
9117
|
}
|
|
8741
9118
|
function useToast() {
|
|
8742
|
-
const [state, setState] =
|
|
8743
|
-
|
|
9119
|
+
const [state, setState] = React68.useState(memoryState);
|
|
9120
|
+
React68.useEffect(() => {
|
|
8744
9121
|
listeners.push(setState);
|
|
8745
9122
|
return () => {
|
|
8746
9123
|
const index = listeners.indexOf(setState);
|
|
@@ -8756,30 +9133,30 @@ function useToast() {
|
|
|
8756
9133
|
}
|
|
8757
9134
|
|
|
8758
9135
|
// src/components/toaster.tsx
|
|
8759
|
-
import { jsx as
|
|
9136
|
+
import { jsx as jsx49, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
8760
9137
|
function Toaster() {
|
|
8761
9138
|
const { toasts } = useToast();
|
|
8762
|
-
return /* @__PURE__ */
|
|
9139
|
+
return /* @__PURE__ */ jsxs25(ToastProvider, { children: [
|
|
8763
9140
|
toasts.map(function(_a) {
|
|
8764
9141
|
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__ */
|
|
9142
|
+
return /* @__PURE__ */ jsxs25(Toast, __spreadProps(__spreadValues({}, props), { children: [
|
|
9143
|
+
/* @__PURE__ */ jsxs25("div", { className: "grid gap-1", children: [
|
|
9144
|
+
title && /* @__PURE__ */ jsx49(ToastTitle, { children: title }),
|
|
9145
|
+
description && /* @__PURE__ */ jsx49(ToastDescription, { children: description })
|
|
8769
9146
|
] }),
|
|
8770
9147
|
action,
|
|
8771
|
-
/* @__PURE__ */
|
|
9148
|
+
/* @__PURE__ */ jsx49(ToastClose, {})
|
|
8772
9149
|
] }), id);
|
|
8773
9150
|
}),
|
|
8774
|
-
/* @__PURE__ */
|
|
9151
|
+
/* @__PURE__ */ jsx49(ToastViewport, {})
|
|
8775
9152
|
] });
|
|
8776
9153
|
}
|
|
8777
9154
|
|
|
8778
9155
|
// src/components/toggle.tsx
|
|
8779
9156
|
import * as TogglePrimitive from "@radix-ui/react-toggle";
|
|
8780
9157
|
import { cva as cva9 } from "class-variance-authority";
|
|
8781
|
-
import * as
|
|
8782
|
-
import { jsx as
|
|
9158
|
+
import * as React69 from "react";
|
|
9159
|
+
import { jsx as jsx50 } from "react/jsx-runtime";
|
|
8783
9160
|
var toggleVariants = cva9(
|
|
8784
9161
|
"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
9162
|
{
|
|
@@ -8800,9 +9177,9 @@ var toggleVariants = cva9(
|
|
|
8800
9177
|
}
|
|
8801
9178
|
}
|
|
8802
9179
|
);
|
|
8803
|
-
var Toggle =
|
|
9180
|
+
var Toggle = React69.forwardRef((_a, ref) => {
|
|
8804
9181
|
var _b = _a, { className, variant, size } = _b, props = __objRest(_b, ["className", "variant", "size"]);
|
|
8805
|
-
return /* @__PURE__ */
|
|
9182
|
+
return /* @__PURE__ */ jsx50(
|
|
8806
9183
|
TogglePrimitive.Root,
|
|
8807
9184
|
__spreadValues({
|
|
8808
9185
|
ref,
|
|
@@ -8814,29 +9191,29 @@ Toggle.displayName = TogglePrimitive.Root.displayName;
|
|
|
8814
9191
|
|
|
8815
9192
|
// src/components/toggle-group.tsx
|
|
8816
9193
|
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
|
|
8817
|
-
import * as
|
|
8818
|
-
import { jsx as
|
|
8819
|
-
var ToggleGroupContext =
|
|
9194
|
+
import * as React70 from "react";
|
|
9195
|
+
import { jsx as jsx51 } from "react/jsx-runtime";
|
|
9196
|
+
var ToggleGroupContext = React70.createContext({
|
|
8820
9197
|
size: "default",
|
|
8821
9198
|
variant: "default"
|
|
8822
9199
|
});
|
|
8823
|
-
var ToggleGroup =
|
|
9200
|
+
var ToggleGroup = React70.forwardRef((_a, ref) => {
|
|
8824
9201
|
var _b = _a, { className, variant, size, children } = _b, props = __objRest(_b, ["className", "variant", "size", "children"]);
|
|
8825
|
-
return /* @__PURE__ */
|
|
9202
|
+
return /* @__PURE__ */ jsx51(
|
|
8826
9203
|
ToggleGroupPrimitive.Root,
|
|
8827
9204
|
__spreadProps(__spreadValues({
|
|
8828
9205
|
ref,
|
|
8829
9206
|
className: cn("flex items-center justify-center gap-1", className)
|
|
8830
9207
|
}, props), {
|
|
8831
|
-
children: /* @__PURE__ */
|
|
9208
|
+
children: /* @__PURE__ */ jsx51(ToggleGroupContext.Provider, { value: { variant, size }, children })
|
|
8832
9209
|
})
|
|
8833
9210
|
);
|
|
8834
9211
|
});
|
|
8835
9212
|
ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
|
|
8836
|
-
var ToggleGroupItem =
|
|
9213
|
+
var ToggleGroupItem = React70.forwardRef((_a, ref) => {
|
|
8837
9214
|
var _b = _a, { className, children, variant, size } = _b, props = __objRest(_b, ["className", "children", "variant", "size"]);
|
|
8838
|
-
const context =
|
|
8839
|
-
return /* @__PURE__ */
|
|
9215
|
+
const context = React70.useContext(ToggleGroupContext);
|
|
9216
|
+
return /* @__PURE__ */ jsx51(
|
|
8840
9217
|
ToggleGroupPrimitive.Item,
|
|
8841
9218
|
__spreadProps(__spreadValues({
|
|
8842
9219
|
ref,
|
|
@@ -8856,14 +9233,14 @@ ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
|
|
|
8856
9233
|
|
|
8857
9234
|
// src/components/tooltip.tsx
|
|
8858
9235
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
8859
|
-
import * as
|
|
8860
|
-
import { jsx as
|
|
9236
|
+
import * as React71 from "react";
|
|
9237
|
+
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
8861
9238
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
8862
9239
|
var Tooltip = TooltipPrimitive.Root;
|
|
8863
9240
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
8864
|
-
var TooltipContent =
|
|
9241
|
+
var TooltipContent = React71.forwardRef((_a, ref) => {
|
|
8865
9242
|
var _b = _a, { className, sideOffset = 4 } = _b, props = __objRest(_b, ["className", "sideOffset"]);
|
|
8866
|
-
return /* @__PURE__ */
|
|
9243
|
+
return /* @__PURE__ */ jsx52(
|
|
8867
9244
|
TooltipPrimitive.Content,
|
|
8868
9245
|
__spreadValues({
|
|
8869
9246
|
ref,
|
|
@@ -8878,10 +9255,10 @@ var TooltipContent = React70.forwardRef((_a, ref) => {
|
|
|
8878
9255
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
8879
9256
|
|
|
8880
9257
|
// src/components/ui/input.tsx
|
|
8881
|
-
import * as
|
|
8882
|
-
import { Asterisk as
|
|
8883
|
-
import { jsx as
|
|
8884
|
-
var UiInput =
|
|
9258
|
+
import * as React72 from "react";
|
|
9259
|
+
import { Asterisk as Asterisk4 } from "lucide-react";
|
|
9260
|
+
import { jsx as jsx53, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
9261
|
+
var UiInput = React72.forwardRef(
|
|
8885
9262
|
(_a, ref) => {
|
|
8886
9263
|
var _b = _a, {
|
|
8887
9264
|
label,
|
|
@@ -8906,12 +9283,12 @@ var UiInput = React71.forwardRef(
|
|
|
8906
9283
|
"invalid",
|
|
8907
9284
|
"className"
|
|
8908
9285
|
]);
|
|
8909
|
-
const generatedId =
|
|
9286
|
+
const generatedId = React72.useId();
|
|
8910
9287
|
const inputId = htmlFormItemId != null ? htmlFormItemId : generatedId;
|
|
8911
9288
|
const messageId = `${inputId}-message`;
|
|
8912
9289
|
const hasError = Boolean(errorMessage || invalid);
|
|
8913
|
-
return /* @__PURE__ */
|
|
8914
|
-
label ? /* @__PURE__ */
|
|
9290
|
+
return /* @__PURE__ */ jsxs26("div", { className: cn("w-full space-y-1.5", containerClassName), children: [
|
|
9291
|
+
label ? /* @__PURE__ */ jsxs26(
|
|
8915
9292
|
Label3,
|
|
8916
9293
|
{
|
|
8917
9294
|
className: cn(
|
|
@@ -8921,9 +9298,9 @@ var UiInput = React71.forwardRef(
|
|
|
8921
9298
|
),
|
|
8922
9299
|
htmlFor: inputId,
|
|
8923
9300
|
children: [
|
|
8924
|
-
/* @__PURE__ */
|
|
8925
|
-
requiredLabel ? /* @__PURE__ */
|
|
8926
|
-
|
|
9301
|
+
/* @__PURE__ */ jsx53("span", { children: label }),
|
|
9302
|
+
requiredLabel ? /* @__PURE__ */ jsx53(
|
|
9303
|
+
Asterisk4,
|
|
8927
9304
|
{
|
|
8928
9305
|
"aria-hidden": "true",
|
|
8929
9306
|
className: cn(
|
|
@@ -8935,7 +9312,7 @@ var UiInput = React71.forwardRef(
|
|
|
8935
9312
|
]
|
|
8936
9313
|
}
|
|
8937
9314
|
) : null,
|
|
8938
|
-
/* @__PURE__ */
|
|
9315
|
+
/* @__PURE__ */ jsx53(
|
|
8939
9316
|
Input,
|
|
8940
9317
|
__spreadProps(__spreadValues({}, inputProps), {
|
|
8941
9318
|
ref,
|
|
@@ -8946,7 +9323,7 @@ var UiInput = React71.forwardRef(
|
|
|
8946
9323
|
className
|
|
8947
9324
|
})
|
|
8948
9325
|
),
|
|
8949
|
-
errorMessage ? /* @__PURE__ */
|
|
9326
|
+
errorMessage ? /* @__PURE__ */ jsx53(
|
|
8950
9327
|
"p",
|
|
8951
9328
|
{
|
|
8952
9329
|
id: messageId,
|
|
@@ -8960,8 +9337,8 @@ var UiInput = React71.forwardRef(
|
|
|
8960
9337
|
UiInput.displayName = "UiInput";
|
|
8961
9338
|
|
|
8962
9339
|
// src/components/ui/select.tsx
|
|
8963
|
-
import * as
|
|
8964
|
-
import { Asterisk as
|
|
9340
|
+
import * as React73 from "react";
|
|
9341
|
+
import { Asterisk as Asterisk5 } from "lucide-react";
|
|
8965
9342
|
|
|
8966
9343
|
// src/types/select.ts
|
|
8967
9344
|
var selectVariants = {
|
|
@@ -8976,7 +9353,7 @@ var selectVariants = {
|
|
|
8976
9353
|
var variants2 = selectVariants;
|
|
8977
9354
|
|
|
8978
9355
|
// src/components/ui/select.tsx
|
|
8979
|
-
import { jsx as
|
|
9356
|
+
import { jsx as jsx54, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
8980
9357
|
function UiSelect({
|
|
8981
9358
|
label,
|
|
8982
9359
|
placeholder,
|
|
@@ -8999,7 +9376,7 @@ function UiSelect({
|
|
|
8999
9376
|
errorMessage,
|
|
9000
9377
|
htmlFormItemId
|
|
9001
9378
|
}) {
|
|
9002
|
-
const generatedId =
|
|
9379
|
+
const generatedId = React73.useId();
|
|
9003
9380
|
const triggerId = htmlFormItemId != null ? htmlFormItemId : generatedId;
|
|
9004
9381
|
const messageId = `${triggerId}-message`;
|
|
9005
9382
|
const hasError = Boolean(errorMessage);
|
|
@@ -9016,8 +9393,8 @@ function UiSelect({
|
|
|
9016
9393
|
};
|
|
9017
9394
|
const specialFlushed = variant === "flushed" ? size === "sm" ? "h-9 text-sm" : size === "lg" ? "h-11 text-base" : "h-10 text-sm" : "";
|
|
9018
9395
|
const specialLink = variant === "link" ? "text-sm" : "";
|
|
9019
|
-
return /* @__PURE__ */
|
|
9020
|
-
label ? /* @__PURE__ */
|
|
9396
|
+
return /* @__PURE__ */ jsxs27("div", { className: cn("w-full space-y-1.5", selectClassName), children: [
|
|
9397
|
+
label ? /* @__PURE__ */ jsxs27(
|
|
9021
9398
|
Label3,
|
|
9022
9399
|
{
|
|
9023
9400
|
className: cn(
|
|
@@ -9027,9 +9404,9 @@ function UiSelect({
|
|
|
9027
9404
|
),
|
|
9028
9405
|
htmlFor: triggerId,
|
|
9029
9406
|
children: [
|
|
9030
|
-
/* @__PURE__ */
|
|
9031
|
-
requiredLabel ? /* @__PURE__ */
|
|
9032
|
-
|
|
9407
|
+
/* @__PURE__ */ jsx54("span", { children: label }),
|
|
9408
|
+
requiredLabel ? /* @__PURE__ */ jsx54(
|
|
9409
|
+
Asterisk5,
|
|
9033
9410
|
{
|
|
9034
9411
|
"aria-hidden": "true",
|
|
9035
9412
|
className: cn(
|
|
@@ -9041,7 +9418,7 @@ function UiSelect({
|
|
|
9041
9418
|
]
|
|
9042
9419
|
}
|
|
9043
9420
|
) : null,
|
|
9044
|
-
/* @__PURE__ */
|
|
9421
|
+
/* @__PURE__ */ jsxs27(
|
|
9045
9422
|
Select2,
|
|
9046
9423
|
{
|
|
9047
9424
|
value,
|
|
@@ -9049,7 +9426,7 @@ function UiSelect({
|
|
|
9049
9426
|
onValueChange: onChange,
|
|
9050
9427
|
disabled,
|
|
9051
9428
|
children: [
|
|
9052
|
-
/* @__PURE__ */
|
|
9429
|
+
/* @__PURE__ */ jsx54(
|
|
9053
9430
|
SelectTrigger,
|
|
9054
9431
|
{
|
|
9055
9432
|
id: triggerId,
|
|
@@ -9062,10 +9439,10 @@ function UiSelect({
|
|
|
9062
9439
|
hasError && "border-destructive ring-destructive focus:ring-destructive/40",
|
|
9063
9440
|
className
|
|
9064
9441
|
),
|
|
9065
|
-
children: /* @__PURE__ */
|
|
9442
|
+
children: /* @__PURE__ */ jsx54(SelectValue, { placeholder })
|
|
9066
9443
|
}
|
|
9067
9444
|
),
|
|
9068
|
-
/* @__PURE__ */
|
|
9445
|
+
/* @__PURE__ */ jsx54(SelectContent, { className: contentClassName, children: children != null ? children : items == null ? void 0 : items.map((item) => /* @__PURE__ */ jsx54(
|
|
9069
9446
|
SelectItem,
|
|
9070
9447
|
{
|
|
9071
9448
|
value: item.value,
|
|
@@ -9078,7 +9455,7 @@ function UiSelect({
|
|
|
9078
9455
|
]
|
|
9079
9456
|
}
|
|
9080
9457
|
),
|
|
9081
|
-
errorMessage ? /* @__PURE__ */
|
|
9458
|
+
errorMessage ? /* @__PURE__ */ jsx54(
|
|
9082
9459
|
"p",
|
|
9083
9460
|
{
|
|
9084
9461
|
id: messageId,
|
|
@@ -9090,10 +9467,10 @@ function UiSelect({
|
|
|
9090
9467
|
}
|
|
9091
9468
|
|
|
9092
9469
|
// src/components/ui/ui-checkbox.tsx
|
|
9093
|
-
import * as
|
|
9094
|
-
import { Asterisk as
|
|
9095
|
-
import { jsx as
|
|
9096
|
-
var UiCheckbox =
|
|
9470
|
+
import * as React74 from "react";
|
|
9471
|
+
import { Asterisk as Asterisk6 } from "lucide-react";
|
|
9472
|
+
import { jsx as jsx55, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
9473
|
+
var UiCheckbox = React74.forwardRef(
|
|
9097
9474
|
(_a, ref) => {
|
|
9098
9475
|
var _b = _a, {
|
|
9099
9476
|
label,
|
|
@@ -9125,7 +9502,7 @@ var UiCheckbox = React73.forwardRef(
|
|
|
9125
9502
|
"className"
|
|
9126
9503
|
]);
|
|
9127
9504
|
const hasError = Boolean(errorMessage || invalid);
|
|
9128
|
-
return /* @__PURE__ */
|
|
9505
|
+
return /* @__PURE__ */ jsx55("div", { className: cn("w-full", containerClassName), children: /* @__PURE__ */ jsxs28(
|
|
9129
9506
|
"div",
|
|
9130
9507
|
{
|
|
9131
9508
|
className: cn(
|
|
@@ -9134,7 +9511,7 @@ var UiCheckbox = React73.forwardRef(
|
|
|
9134
9511
|
contentClassName
|
|
9135
9512
|
),
|
|
9136
9513
|
children: [
|
|
9137
|
-
/* @__PURE__ */
|
|
9514
|
+
/* @__PURE__ */ jsx55(
|
|
9138
9515
|
Checkbox,
|
|
9139
9516
|
__spreadValues({
|
|
9140
9517
|
ref,
|
|
@@ -9143,8 +9520,8 @@ var UiCheckbox = React73.forwardRef(
|
|
|
9143
9520
|
className: cn("mt-0.5", className)
|
|
9144
9521
|
}, checkboxProps)
|
|
9145
9522
|
),
|
|
9146
|
-
/* @__PURE__ */
|
|
9147
|
-
label ? /* @__PURE__ */
|
|
9523
|
+
/* @__PURE__ */ jsxs28("div", { className: "min-w-0 flex-1", children: [
|
|
9524
|
+
label ? /* @__PURE__ */ jsxs28(
|
|
9148
9525
|
Label3,
|
|
9149
9526
|
{
|
|
9150
9527
|
htmlFor: htmlFormItemId,
|
|
@@ -9155,9 +9532,9 @@ var UiCheckbox = React73.forwardRef(
|
|
|
9155
9532
|
labelClassName
|
|
9156
9533
|
),
|
|
9157
9534
|
children: [
|
|
9158
|
-
/* @__PURE__ */
|
|
9159
|
-
requiredLabel ? /* @__PURE__ */
|
|
9160
|
-
|
|
9535
|
+
/* @__PURE__ */ jsx55("span", { children: label }),
|
|
9536
|
+
requiredLabel ? /* @__PURE__ */ jsx55(
|
|
9537
|
+
Asterisk6,
|
|
9161
9538
|
{
|
|
9162
9539
|
"aria-hidden": "true",
|
|
9163
9540
|
className: cn(
|
|
@@ -9169,7 +9546,7 @@ var UiCheckbox = React73.forwardRef(
|
|
|
9169
9546
|
]
|
|
9170
9547
|
}
|
|
9171
9548
|
) : null,
|
|
9172
|
-
description ? /* @__PURE__ */
|
|
9549
|
+
description ? /* @__PURE__ */ jsx55(
|
|
9173
9550
|
"p",
|
|
9174
9551
|
{
|
|
9175
9552
|
className: cn(
|
|
@@ -9179,7 +9556,7 @@ var UiCheckbox = React73.forwardRef(
|
|
|
9179
9556
|
children: description
|
|
9180
9557
|
}
|
|
9181
9558
|
) : null,
|
|
9182
|
-
errorMessage ? /* @__PURE__ */
|
|
9559
|
+
errorMessage ? /* @__PURE__ */ jsx55(
|
|
9183
9560
|
"p",
|
|
9184
9561
|
{
|
|
9185
9562
|
className: cn(
|
|
@@ -9199,7 +9576,7 @@ UiCheckbox.displayName = "UiCheckbox";
|
|
|
9199
9576
|
|
|
9200
9577
|
// src/hooks/use-sidebar.tsx
|
|
9201
9578
|
import { createContext as createContext5, useContext as useContext6, useState as useState7 } from "react";
|
|
9202
|
-
import { jsx as
|
|
9579
|
+
import { jsx as jsx56 } from "react/jsx-runtime";
|
|
9203
9580
|
var SidebarContext = createContext5({
|
|
9204
9581
|
isMinimized: false,
|
|
9205
9582
|
toggle: () => {
|
|
@@ -9213,11 +9590,11 @@ var SidebarProvider = ({
|
|
|
9213
9590
|
const toggle = () => {
|
|
9214
9591
|
setIsMinimized(!isMinimized);
|
|
9215
9592
|
};
|
|
9216
|
-
return /* @__PURE__ */
|
|
9593
|
+
return /* @__PURE__ */ jsx56(SidebarContext.Provider, { value: { isMinimized, toggle }, children });
|
|
9217
9594
|
};
|
|
9218
9595
|
|
|
9219
9596
|
// src/shared/alert-modal.tsx
|
|
9220
|
-
import { jsx as
|
|
9597
|
+
import { jsx as jsx57, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
9221
9598
|
var AlertModal = ({
|
|
9222
9599
|
isOpen,
|
|
9223
9600
|
onClose,
|
|
@@ -9230,7 +9607,7 @@ var AlertModal = ({
|
|
|
9230
9607
|
className,
|
|
9231
9608
|
children
|
|
9232
9609
|
}) => {
|
|
9233
|
-
return /* @__PURE__ */
|
|
9610
|
+
return /* @__PURE__ */ jsx57(
|
|
9234
9611
|
Modal,
|
|
9235
9612
|
{
|
|
9236
9613
|
title,
|
|
@@ -9238,9 +9615,9 @@ var AlertModal = ({
|
|
|
9238
9615
|
isOpen,
|
|
9239
9616
|
onClose,
|
|
9240
9617
|
className,
|
|
9241
|
-
children: children ? children : /* @__PURE__ */
|
|
9242
|
-
/* @__PURE__ */
|
|
9243
|
-
/* @__PURE__ */
|
|
9618
|
+
children: children ? children : /* @__PURE__ */ jsxs29("div", { className: "flex w-full items-center justify-end space-x-2 pt-6", children: [
|
|
9619
|
+
/* @__PURE__ */ jsx57(Button, { disabled: loading, variant: "outline", onClick: onClose, children: cancelText }),
|
|
9620
|
+
/* @__PURE__ */ jsx57(
|
|
9244
9621
|
Button,
|
|
9245
9622
|
{
|
|
9246
9623
|
disabled: loading,
|
|
@@ -9258,19 +9635,19 @@ var AlertModal = ({
|
|
|
9258
9635
|
// src/shared/breadcrumbs.tsx
|
|
9259
9636
|
import { Slash } from "lucide-react";
|
|
9260
9637
|
import { Fragment } from "react";
|
|
9261
|
-
import { jsx as
|
|
9638
|
+
import { jsx as jsx58, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
9262
9639
|
function Breadcrumbs({
|
|
9263
9640
|
items,
|
|
9264
9641
|
className,
|
|
9265
9642
|
classNameList,
|
|
9266
|
-
separator = /* @__PURE__ */
|
|
9643
|
+
separator = /* @__PURE__ */ jsx58(Slash, {})
|
|
9267
9644
|
}) {
|
|
9268
|
-
return /* @__PURE__ */
|
|
9645
|
+
return /* @__PURE__ */ jsx58(Breadcrumb, { className, children: /* @__PURE__ */ jsx58(BreadcrumbList, { className: classNameList, children: items.map((item, index) => {
|
|
9269
9646
|
var _a;
|
|
9270
9647
|
const isLast = index === items.length - 1;
|
|
9271
|
-
return /* @__PURE__ */
|
|
9272
|
-
!isLast ? /* @__PURE__ */
|
|
9273
|
-
!isLast ? /* @__PURE__ */
|
|
9648
|
+
return /* @__PURE__ */ jsxs30(Fragment, { children: [
|
|
9649
|
+
!isLast ? /* @__PURE__ */ jsx58(BreadcrumbItem, { className: item.className, children: /* @__PURE__ */ jsx58(BreadcrumbLink, { href: (_a = item.link) != null ? _a : "#", children: item.title }) }) : /* @__PURE__ */ jsx58(BreadcrumbItem, { className: item.className, children: /* @__PURE__ */ jsx58(BreadcrumbPage, { children: item.title }) }),
|
|
9650
|
+
!isLast ? /* @__PURE__ */ jsx58(BreadcrumbSeparator, { children: separator }) : null
|
|
9274
9651
|
] }, `${item.title}-${index}`);
|
|
9275
9652
|
}) }) });
|
|
9276
9653
|
}
|
|
@@ -9289,7 +9666,7 @@ import {
|
|
|
9289
9666
|
useReactTable
|
|
9290
9667
|
} from "@tanstack/react-table";
|
|
9291
9668
|
import { ChevronLeft as ChevronLeft3, ChevronRight as ChevronRight3 } from "lucide-react";
|
|
9292
|
-
import { jsx as
|
|
9669
|
+
import { jsx as jsx59, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
9293
9670
|
var ACCENT_COLOR = {
|
|
9294
9671
|
primary: "var(--primary)",
|
|
9295
9672
|
emerald: "#10b981",
|
|
@@ -9567,16 +9944,16 @@ function DataTable({
|
|
|
9567
9944
|
const accentOn = !!dtAccent;
|
|
9568
9945
|
const dataAccent = accentOn ? "on" : "off";
|
|
9569
9946
|
const headerIsSticky = stickyHeader && !headerScroll;
|
|
9570
|
-
return /* @__PURE__ */
|
|
9947
|
+
return /* @__PURE__ */ jsxs31(
|
|
9571
9948
|
"div",
|
|
9572
9949
|
{
|
|
9573
9950
|
"data-accent": dataAccent,
|
|
9574
9951
|
className: cn(ui.root, heightClassName),
|
|
9575
9952
|
style: accentOn ? { "--dt-accent": dtAccent } : void 0,
|
|
9576
9953
|
children: [
|
|
9577
|
-
/* @__PURE__ */
|
|
9578
|
-
/* @__PURE__ */
|
|
9579
|
-
/* @__PURE__ */
|
|
9954
|
+
/* @__PURE__ */ jsx59("div", { className: "min-h-0 flex-1", children: /* @__PURE__ */ jsxs31(ScrollArea, { className: "h-full", children: [
|
|
9955
|
+
/* @__PURE__ */ jsx59("div", { className: "relative w-max min-w-full", children: /* @__PURE__ */ jsxs31(Table, { className: cn(ui.table), children: [
|
|
9956
|
+
/* @__PURE__ */ jsx59(TableHeader, { className: cn(ui.thead), children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx59(TableRow, { className: cn(ui.trHead), children: headerGroup.headers.map((header) => /* @__PURE__ */ jsx59(
|
|
9580
9957
|
TableHead,
|
|
9581
9958
|
{
|
|
9582
9959
|
className: cn(
|
|
@@ -9590,7 +9967,7 @@ function DataTable({
|
|
|
9590
9967
|
},
|
|
9591
9968
|
header.id
|
|
9592
9969
|
)) }, headerGroup.id)) }),
|
|
9593
|
-
animate ? /* @__PURE__ */
|
|
9970
|
+
animate ? /* @__PURE__ */ jsx59(AnimatePresence, { mode: "wait", initial: false, children: /* @__PURE__ */ jsx59(
|
|
9594
9971
|
motion.tbody,
|
|
9595
9972
|
{
|
|
9596
9973
|
className: cn(ui.tbody),
|
|
@@ -9598,7 +9975,7 @@ function DataTable({
|
|
|
9598
9975
|
animate: { opacity: 1, y: 0 },
|
|
9599
9976
|
exit: { opacity: 0, y: -6 },
|
|
9600
9977
|
transition: { duration: 0.18 },
|
|
9601
|
-
children: table.getRowModel().rows.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */
|
|
9978
|
+
children: table.getRowModel().rows.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ jsx59(
|
|
9602
9979
|
TableRow,
|
|
9603
9980
|
{
|
|
9604
9981
|
"data-accent": dataAccent,
|
|
@@ -9608,13 +9985,13 @@ function DataTable({
|
|
|
9608
9985
|
ui.tr,
|
|
9609
9986
|
clickable ? ui.trClickable : void 0
|
|
9610
9987
|
),
|
|
9611
|
-
children: row.getVisibleCells().map((cell) => /* @__PURE__ */
|
|
9988
|
+
children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx59(TableCell, { className: cn(ui.td), children: flexRender(
|
|
9612
9989
|
cell.column.columnDef.cell,
|
|
9613
9990
|
cell.getContext()
|
|
9614
9991
|
) }, cell.id))
|
|
9615
9992
|
},
|
|
9616
9993
|
row.id
|
|
9617
|
-
)) : emptyData || /* @__PURE__ */
|
|
9994
|
+
)) : emptyData || /* @__PURE__ */ jsx59(TableRow, { "data-accent": dataAccent, children: /* @__PURE__ */ jsx59(
|
|
9618
9995
|
TableCell,
|
|
9619
9996
|
{
|
|
9620
9997
|
colSpan: columns.length,
|
|
@@ -9627,7 +10004,7 @@ function DataTable({
|
|
|
9627
10004
|
) })
|
|
9628
10005
|
},
|
|
9629
10006
|
pageKey
|
|
9630
|
-
) }) : /* @__PURE__ */
|
|
10007
|
+
) }) : /* @__PURE__ */ jsx59(TableBody, { className: cn(ui.tbody), children: table.getRowModel().rows.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ jsx59(
|
|
9631
10008
|
TableRow,
|
|
9632
10009
|
{
|
|
9633
10010
|
"data-accent": dataAccent,
|
|
@@ -9637,13 +10014,13 @@ function DataTable({
|
|
|
9637
10014
|
ui.tr,
|
|
9638
10015
|
clickable ? ui.trClickable : void 0
|
|
9639
10016
|
),
|
|
9640
|
-
children: row.getVisibleCells().map((cell) => /* @__PURE__ */
|
|
10017
|
+
children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx59(TableCell, { className: cn(ui.td), children: flexRender(
|
|
9641
10018
|
cell.column.columnDef.cell,
|
|
9642
10019
|
cell.getContext()
|
|
9643
10020
|
) }, cell.id))
|
|
9644
10021
|
},
|
|
9645
10022
|
row.id
|
|
9646
|
-
)) : emptyData || /* @__PURE__ */
|
|
10023
|
+
)) : emptyData || /* @__PURE__ */ jsx59(TableRow, { "data-accent": dataAccent, children: /* @__PURE__ */ jsx59(
|
|
9647
10024
|
TableCell,
|
|
9648
10025
|
{
|
|
9649
10026
|
colSpan: columns.length,
|
|
@@ -9655,11 +10032,11 @@ function DataTable({
|
|
|
9655
10032
|
}
|
|
9656
10033
|
) }) })
|
|
9657
10034
|
] }) }),
|
|
9658
|
-
/* @__PURE__ */
|
|
10035
|
+
/* @__PURE__ */ jsx59(ScrollBar, { orientation: "horizontal" })
|
|
9659
10036
|
] }) }),
|
|
9660
|
-
/* @__PURE__ */
|
|
9661
|
-
/* @__PURE__ */
|
|
9662
|
-
isRowsSelected && /* @__PURE__ */
|
|
10037
|
+
/* @__PURE__ */ jsx59("div", { className: cn(ui.footer), children: /* @__PURE__ */ jsx59("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: [
|
|
10038
|
+
/* @__PURE__ */ jsxs31("div", { className: cn(ui.metaWrap), children: [
|
|
10039
|
+
isRowsSelected && /* @__PURE__ */ jsxs31("div", { children: [
|
|
9663
10040
|
table.getFilteredSelectedRowModel().rows.length,
|
|
9664
10041
|
" ",
|
|
9665
10042
|
ofLabel,
|
|
@@ -9668,36 +10045,36 @@ function DataTable({
|
|
|
9668
10045
|
" ",
|
|
9669
10046
|
rowsSelectedLabel
|
|
9670
10047
|
] }),
|
|
9671
|
-
typeof totalRows === "number" && /* @__PURE__ */
|
|
10048
|
+
typeof totalRows === "number" && /* @__PURE__ */ jsxs31("div", { children: [
|
|
9672
10049
|
"Total: ",
|
|
9673
10050
|
totalRows,
|
|
9674
10051
|
" registros"
|
|
9675
10052
|
] })
|
|
9676
10053
|
] }),
|
|
9677
|
-
/* @__PURE__ */
|
|
9678
|
-
/* @__PURE__ */
|
|
9679
|
-
/* @__PURE__ */
|
|
9680
|
-
/* @__PURE__ */
|
|
10054
|
+
/* @__PURE__ */ jsxs31("div", { className: cn(ui.controlsWrap), children: [
|
|
10055
|
+
/* @__PURE__ */ jsxs31("div", { className: "flex items-center gap-2", children: [
|
|
10056
|
+
/* @__PURE__ */ jsx59("p", { className: cn(ui.pageSizeLabel), children: rowPerPageLabel }),
|
|
10057
|
+
/* @__PURE__ */ jsxs31(
|
|
9681
10058
|
Select2,
|
|
9682
10059
|
{
|
|
9683
10060
|
value: `${pageSize}`,
|
|
9684
10061
|
onValueChange: (v) => changePageSize(Number(v)),
|
|
9685
10062
|
children: [
|
|
9686
|
-
/* @__PURE__ */
|
|
10063
|
+
/* @__PURE__ */ jsx59(
|
|
9687
10064
|
SelectTrigger,
|
|
9688
10065
|
{
|
|
9689
10066
|
"data-accent": dataAccent,
|
|
9690
10067
|
className: cn(ui.pageSizeTrigger),
|
|
9691
|
-
children: /* @__PURE__ */
|
|
10068
|
+
children: /* @__PURE__ */ jsx59(SelectValue, { placeholder: `${pageSize}` })
|
|
9692
10069
|
}
|
|
9693
10070
|
),
|
|
9694
|
-
/* @__PURE__ */
|
|
10071
|
+
/* @__PURE__ */ jsx59(SelectContent, { side: "top", children: pageSizeOptions.map((size) => /* @__PURE__ */ jsx59(SelectItem, { value: `${size}`, children: size }, size)) })
|
|
9695
10072
|
]
|
|
9696
10073
|
}
|
|
9697
10074
|
)
|
|
9698
10075
|
] }),
|
|
9699
|
-
/* @__PURE__ */
|
|
9700
|
-
/* @__PURE__ */
|
|
10076
|
+
/* @__PURE__ */ jsxs31("div", { className: "flex items-center gap-2", children: [
|
|
10077
|
+
/* @__PURE__ */ jsxs31("div", { className: cn(ui.pageLabel), children: [
|
|
9701
10078
|
pageLabel,
|
|
9702
10079
|
" ",
|
|
9703
10080
|
pageIndex + 1,
|
|
@@ -9706,7 +10083,7 @@ function DataTable({
|
|
|
9706
10083
|
" ",
|
|
9707
10084
|
safePageCount
|
|
9708
10085
|
] }),
|
|
9709
|
-
/* @__PURE__ */
|
|
10086
|
+
/* @__PURE__ */ jsx59(
|
|
9710
10087
|
Button,
|
|
9711
10088
|
{
|
|
9712
10089
|
"data-accent": dataAccent,
|
|
@@ -9715,10 +10092,10 @@ function DataTable({
|
|
|
9715
10092
|
className: cn("hidden lg:flex", ui.navButton),
|
|
9716
10093
|
onClick: () => goToPage(0),
|
|
9717
10094
|
disabled: pageIndex === 0,
|
|
9718
|
-
children: /* @__PURE__ */
|
|
10095
|
+
children: /* @__PURE__ */ jsx59(DoubleArrowLeftIcon, { className: "h-4 w-4" })
|
|
9719
10096
|
}
|
|
9720
10097
|
),
|
|
9721
|
-
/* @__PURE__ */
|
|
10098
|
+
/* @__PURE__ */ jsx59(
|
|
9722
10099
|
Button,
|
|
9723
10100
|
{
|
|
9724
10101
|
"data-accent": dataAccent,
|
|
@@ -9727,10 +10104,10 @@ function DataTable({
|
|
|
9727
10104
|
className: cn(ui.navButton),
|
|
9728
10105
|
onClick: () => goToPage(pageIndex - 1),
|
|
9729
10106
|
disabled: pageIndex === 0,
|
|
9730
|
-
children: /* @__PURE__ */
|
|
10107
|
+
children: /* @__PURE__ */ jsx59(ChevronLeft3, { className: "h-4 w-4" })
|
|
9731
10108
|
}
|
|
9732
10109
|
),
|
|
9733
|
-
/* @__PURE__ */
|
|
10110
|
+
/* @__PURE__ */ jsx59(
|
|
9734
10111
|
Button,
|
|
9735
10112
|
{
|
|
9736
10113
|
"data-accent": dataAccent,
|
|
@@ -9739,10 +10116,10 @@ function DataTable({
|
|
|
9739
10116
|
className: cn(ui.navButton),
|
|
9740
10117
|
onClick: () => goToPage(pageIndex + 1),
|
|
9741
10118
|
disabled: pageIndex + 1 >= safePageCount,
|
|
9742
|
-
children: /* @__PURE__ */
|
|
10119
|
+
children: /* @__PURE__ */ jsx59(ChevronRight3, { className: "h-4 w-4" })
|
|
9743
10120
|
}
|
|
9744
10121
|
),
|
|
9745
|
-
/* @__PURE__ */
|
|
10122
|
+
/* @__PURE__ */ jsx59(
|
|
9746
10123
|
Button,
|
|
9747
10124
|
{
|
|
9748
10125
|
"data-accent": dataAccent,
|
|
@@ -9751,11 +10128,11 @@ function DataTable({
|
|
|
9751
10128
|
className: cn("hidden lg:flex", ui.navButton),
|
|
9752
10129
|
onClick: () => goToPage(safePageCount - 1),
|
|
9753
10130
|
disabled: pageIndex + 1 >= safePageCount,
|
|
9754
|
-
children: /* @__PURE__ */
|
|
10131
|
+
children: /* @__PURE__ */ jsx59(DoubleArrowRightIcon, { className: "h-4 w-4" })
|
|
9755
10132
|
}
|
|
9756
10133
|
)
|
|
9757
10134
|
] }),
|
|
9758
|
-
/* @__PURE__ */
|
|
10135
|
+
/* @__PURE__ */ jsxs31("div", { className: "text-muted-foreground w-full text-center text-xs sm:hidden", children: [
|
|
9759
10136
|
pageLabel,
|
|
9760
10137
|
" ",
|
|
9761
10138
|
pageIndex + 1,
|
|
@@ -9772,7 +10149,7 @@ function DataTable({
|
|
|
9772
10149
|
}
|
|
9773
10150
|
|
|
9774
10151
|
// src/shared/data-table-skeleton.tsx
|
|
9775
|
-
import { jsx as
|
|
10152
|
+
import { jsx as jsx60, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
9776
10153
|
function DataTableSkeleton({
|
|
9777
10154
|
columnCount,
|
|
9778
10155
|
rowCount = 10,
|
|
@@ -9780,31 +10157,31 @@ function DataTableSkeleton({
|
|
|
9780
10157
|
filterableColumnCount = 0,
|
|
9781
10158
|
showViewOptions = true
|
|
9782
10159
|
}) {
|
|
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__ */
|
|
10160
|
+
return /* @__PURE__ */ jsxs32("div", { className: "w-full space-y-3 overflow-auto", children: [
|
|
10161
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex w-full items-center justify-between space-x-2 overflow-auto p-1", children: [
|
|
10162
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex flex-1 items-center space-x-2 space-y-4", children: [
|
|
10163
|
+
searchableColumnCount > 0 ? Array.from({ length: searchableColumnCount }).map((_, i) => /* @__PURE__ */ jsx60(Skeleton, { className: "h-10 w-37.5 lg:w-62.5" }, i)) : null,
|
|
10164
|
+
filterableColumnCount > 0 ? Array.from({ length: filterableColumnCount }).map((_, i) => /* @__PURE__ */ jsx60(Skeleton, { className: "h-10 w-17.5 border-dashed" }, i)) : null
|
|
9788
10165
|
] }),
|
|
9789
|
-
showViewOptions ? /* @__PURE__ */
|
|
10166
|
+
showViewOptions ? /* @__PURE__ */ jsx60(Skeleton, { className: "ml-auto hidden h-7 w-17.5 lg:flex" }) : null
|
|
9790
10167
|
] }),
|
|
9791
|
-
/* @__PURE__ */
|
|
9792
|
-
/* @__PURE__ */
|
|
9793
|
-
/* @__PURE__ */
|
|
10168
|
+
/* @__PURE__ */ jsx60("div", { className: "rounded-md border", children: /* @__PURE__ */ jsxs32(Table, { children: [
|
|
10169
|
+
/* @__PURE__ */ jsx60(TableHeader, { children: Array.from({ length: 1 }).map((_, i) => /* @__PURE__ */ jsx60(TableRow, { className: "hover:bg-transparent", children: Array.from({ length: columnCount }).map((_2, i2) => /* @__PURE__ */ jsx60(TableHead, { children: /* @__PURE__ */ jsx60(Skeleton, { className: "h-6 w-full" }) }, i2)) }, i)) }),
|
|
10170
|
+
/* @__PURE__ */ jsx60(TableBody, { children: Array.from({ length: rowCount }).map((_, i) => /* @__PURE__ */ jsx60(TableRow, { className: "hover:bg-transparent", children: Array.from({ length: columnCount }).map((_2, i2) => /* @__PURE__ */ jsx60(TableCell, { children: /* @__PURE__ */ jsx60(Skeleton, { className: "h-6 w-full" }) }, i2)) }, i)) })
|
|
9794
10171
|
] }) }),
|
|
9795
|
-
/* @__PURE__ */
|
|
9796
|
-
/* @__PURE__ */
|
|
9797
|
-
/* @__PURE__ */
|
|
9798
|
-
/* @__PURE__ */
|
|
9799
|
-
/* @__PURE__ */
|
|
9800
|
-
/* @__PURE__ */
|
|
10172
|
+
/* @__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: [
|
|
10173
|
+
/* @__PURE__ */ jsx60("div", { className: "flex-1", children: /* @__PURE__ */ jsx60(Skeleton, { className: "h-8 w-40" }) }),
|
|
10174
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex flex-col items-center gap-4 sm:flex-row sm:gap-6 lg:gap-8", children: [
|
|
10175
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex items-center space-x-2", children: [
|
|
10176
|
+
/* @__PURE__ */ jsx60(Skeleton, { className: "h-8 w-24" }),
|
|
10177
|
+
/* @__PURE__ */ jsx60(Skeleton, { className: "h-8 w-17.5" })
|
|
9801
10178
|
] }),
|
|
9802
|
-
/* @__PURE__ */
|
|
9803
|
-
/* @__PURE__ */
|
|
9804
|
-
/* @__PURE__ */
|
|
9805
|
-
/* @__PURE__ */
|
|
9806
|
-
/* @__PURE__ */
|
|
9807
|
-
/* @__PURE__ */
|
|
10179
|
+
/* @__PURE__ */ jsx60("div", { className: "flex w-25 items-center justify-center text-sm font-medium", children: /* @__PURE__ */ jsx60(Skeleton, { className: "h-8 w-20" }) }),
|
|
10180
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex items-center space-x-2", children: [
|
|
10181
|
+
/* @__PURE__ */ jsx60(Skeleton, { className: "hidden size-8 lg:block" }),
|
|
10182
|
+
/* @__PURE__ */ jsx60(Skeleton, { className: "size-8" }),
|
|
10183
|
+
/* @__PURE__ */ jsx60(Skeleton, { className: "size-8" }),
|
|
10184
|
+
/* @__PURE__ */ jsx60(Skeleton, { className: "hidden size-8 lg:block" })
|
|
9808
10185
|
] })
|
|
9809
10186
|
] })
|
|
9810
10187
|
] })
|
|
@@ -9813,7 +10190,7 @@ function DataTableSkeleton({
|
|
|
9813
10190
|
|
|
9814
10191
|
// src/shared/dropzone.tsx
|
|
9815
10192
|
import { useDropzone } from "react-dropzone";
|
|
9816
|
-
import { jsx as
|
|
10193
|
+
import { jsx as jsx61, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
9817
10194
|
function Dropzone({
|
|
9818
10195
|
label,
|
|
9819
10196
|
onChange,
|
|
@@ -9836,9 +10213,9 @@ function Dropzone({
|
|
|
9836
10213
|
},
|
|
9837
10214
|
accept
|
|
9838
10215
|
}, options));
|
|
9839
|
-
return /* @__PURE__ */
|
|
9840
|
-
label && /* @__PURE__ */
|
|
9841
|
-
/* @__PURE__ */
|
|
10216
|
+
return /* @__PURE__ */ jsxs33("div", { className: cn("space-y-2", className), children: [
|
|
10217
|
+
label && /* @__PURE__ */ jsx61("p", { className: cn("font-medium", labelClassName), children: label }),
|
|
10218
|
+
/* @__PURE__ */ jsxs33(
|
|
9842
10219
|
"div",
|
|
9843
10220
|
__spreadProps(__spreadValues({}, getRootProps()), {
|
|
9844
10221
|
className: cn(
|
|
@@ -9847,12 +10224,12 @@ function Dropzone({
|
|
|
9847
10224
|
dropzoneClassName
|
|
9848
10225
|
),
|
|
9849
10226
|
children: [
|
|
9850
|
-
/* @__PURE__ */
|
|
9851
|
-
/* @__PURE__ */
|
|
10227
|
+
/* @__PURE__ */ jsx61("input", __spreadValues({}, getInputProps())),
|
|
10228
|
+
/* @__PURE__ */ jsx61("p", { className: cn("text-gray-600", descriptionClassName), children: isDragActive ? descriptionActive : description })
|
|
9852
10229
|
]
|
|
9853
10230
|
})
|
|
9854
10231
|
),
|
|
9855
|
-
value && value.length > 0 && /* @__PURE__ */
|
|
10232
|
+
value && value.length > 0 && /* @__PURE__ */ jsx61("ul", { className: cn("text-sm text-gray-700 space-y-1", valueClassName), children: value.map((file, idx) => /* @__PURE__ */ jsxs33("li", { children: [
|
|
9856
10233
|
"\u2022 ",
|
|
9857
10234
|
file.name
|
|
9858
10235
|
] }, idx)) })
|
|
@@ -9862,9 +10239,9 @@ function Dropzone({
|
|
|
9862
10239
|
// src/shared/fileupload.tsx
|
|
9863
10240
|
import { AvatarIcon } from "@radix-ui/react-icons";
|
|
9864
10241
|
import { CameraIcon } from "lucide-react";
|
|
9865
|
-
import { useEffect as
|
|
10242
|
+
import { useEffect as useEffect6, useState as useState8 } from "react";
|
|
9866
10243
|
import { useDropzone as useDropzone2 } from "react-dropzone";
|
|
9867
|
-
import { jsx as
|
|
10244
|
+
import { jsx as jsx62, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
9868
10245
|
function FileUpload({
|
|
9869
10246
|
onChange,
|
|
9870
10247
|
value = [],
|
|
@@ -9880,18 +10257,18 @@ function FileUpload({
|
|
|
9880
10257
|
onChange(acceptedFiles);
|
|
9881
10258
|
}
|
|
9882
10259
|
}, options));
|
|
9883
|
-
return /* @__PURE__ */
|
|
10260
|
+
return /* @__PURE__ */ jsx62("div", { className: cn("flex items-center justify-center", className), children: /* @__PURE__ */ jsx62(
|
|
9884
10261
|
"div",
|
|
9885
10262
|
{
|
|
9886
10263
|
className: cn(
|
|
9887
10264
|
"relative h-36 w-36 overflow-hidden rounded-full bg-gray-200 shadow-2xl",
|
|
9888
10265
|
classNameContent
|
|
9889
10266
|
),
|
|
9890
|
-
children: /* @__PURE__ */
|
|
9891
|
-
/* @__PURE__ */
|
|
9892
|
-
value.length > 0 ? /* @__PURE__ */
|
|
9893
|
-
/* @__PURE__ */
|
|
9894
|
-
/* @__PURE__ */
|
|
10267
|
+
children: /* @__PURE__ */ jsxs34("div", __spreadProps(__spreadValues({}, getRootProps({ className: "dropzone cursor-pointer" })), { children: [
|
|
10268
|
+
/* @__PURE__ */ jsx62("input", __spreadValues({}, getInputProps())),
|
|
10269
|
+
value.length > 0 ? /* @__PURE__ */ jsx62(ImagePreview, { file: value[0] }) : /* @__PURE__ */ jsx62(AvatarIcon, { className: "h-36 w-36 text-gray-100" }),
|
|
10270
|
+
/* @__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: [
|
|
10271
|
+
/* @__PURE__ */ jsx62(CameraIcon, { className: "h-4 w-4 text-muted-foreground" }),
|
|
9895
10272
|
label
|
|
9896
10273
|
] })
|
|
9897
10274
|
] }))
|
|
@@ -9900,14 +10277,14 @@ function FileUpload({
|
|
|
9900
10277
|
}
|
|
9901
10278
|
function ImagePreview({ file }) {
|
|
9902
10279
|
const [objectUrl, setObjectUrl] = useState8(null);
|
|
9903
|
-
|
|
10280
|
+
useEffect6(() => {
|
|
9904
10281
|
const url = URL.createObjectURL(file);
|
|
9905
10282
|
setObjectUrl(url);
|
|
9906
10283
|
return () => {
|
|
9907
10284
|
URL.revokeObjectURL(url);
|
|
9908
10285
|
};
|
|
9909
10286
|
}, [file]);
|
|
9910
|
-
return objectUrl ? /* @__PURE__ */
|
|
10287
|
+
return objectUrl ? /* @__PURE__ */ jsx62(
|
|
9911
10288
|
"img",
|
|
9912
10289
|
{
|
|
9913
10290
|
src: objectUrl,
|
|
@@ -9918,23 +10295,23 @@ function ImagePreview({ file }) {
|
|
|
9918
10295
|
}
|
|
9919
10296
|
|
|
9920
10297
|
// src/shared/heading.tsx
|
|
9921
|
-
import { jsx as
|
|
10298
|
+
import { jsx as jsx63, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
9922
10299
|
function Heading({ title, description, className }) {
|
|
9923
|
-
return /* @__PURE__ */
|
|
9924
|
-
/* @__PURE__ */
|
|
9925
|
-
/* @__PURE__ */
|
|
10300
|
+
return /* @__PURE__ */ jsxs35("div", { className, children: [
|
|
10301
|
+
/* @__PURE__ */ jsx63("div", { className: "text-lg font-bold tracking-tight text-primary sm:text-3xl", children: title }),
|
|
10302
|
+
/* @__PURE__ */ jsx63("p", { className: "text-sm text-muted-foreground", children: description })
|
|
9926
10303
|
] });
|
|
9927
10304
|
}
|
|
9928
10305
|
|
|
9929
10306
|
// src/shared/page-head.tsx
|
|
9930
10307
|
import { Helmet } from "react-helmet-next";
|
|
9931
|
-
import { jsx as
|
|
10308
|
+
import { jsx as jsx64 } from "react/jsx-runtime";
|
|
9932
10309
|
function PageHead({ title = "shadcn-ui-react" }) {
|
|
9933
|
-
return /* @__PURE__ */
|
|
10310
|
+
return /* @__PURE__ */ jsx64(Helmet, { children: /* @__PURE__ */ jsx64("title", { children: title }) });
|
|
9934
10311
|
}
|
|
9935
10312
|
|
|
9936
10313
|
// src/shared/pagination-section.tsx
|
|
9937
|
-
import { jsx as
|
|
10314
|
+
import { jsx as jsx65, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
9938
10315
|
function PaginationSection({
|
|
9939
10316
|
totalPosts,
|
|
9940
10317
|
postsPerPage,
|
|
@@ -9972,17 +10349,17 @@ function PaginationSection({
|
|
|
9972
10349
|
}
|
|
9973
10350
|
};
|
|
9974
10351
|
const renderPages = () => {
|
|
9975
|
-
const renderedPages = activePages.map((page, idx) => /* @__PURE__ */
|
|
10352
|
+
const renderedPages = activePages.map((page, idx) => /* @__PURE__ */ jsx65(
|
|
9976
10353
|
PaginationItem,
|
|
9977
10354
|
{
|
|
9978
10355
|
className: currentPage === page ? "rounded-md bg-primary" : "",
|
|
9979
|
-
children: /* @__PURE__ */
|
|
10356
|
+
children: /* @__PURE__ */ jsx65(PaginationLink, { onClick: () => setCurrentPage(page), size: void 0, children: page })
|
|
9980
10357
|
},
|
|
9981
10358
|
idx
|
|
9982
10359
|
));
|
|
9983
10360
|
if (activePages[0] > 1) {
|
|
9984
10361
|
renderedPages.unshift(
|
|
9985
|
-
/* @__PURE__ */
|
|
10362
|
+
/* @__PURE__ */ jsx65(
|
|
9986
10363
|
PaginationEllipsis,
|
|
9987
10364
|
{
|
|
9988
10365
|
onClick: () => setCurrentPage(activePages[0] - 1)
|
|
@@ -9993,7 +10370,7 @@ function PaginationSection({
|
|
|
9993
10370
|
}
|
|
9994
10371
|
if (activePages[activePages.length - 1] < pageNumbers.length) {
|
|
9995
10372
|
renderedPages.push(
|
|
9996
|
-
/* @__PURE__ */
|
|
10373
|
+
/* @__PURE__ */ jsx65(
|
|
9997
10374
|
PaginationEllipsis,
|
|
9998
10375
|
{
|
|
9999
10376
|
onClick: () => setCurrentPage(activePages[activePages.length - 1] + 1)
|
|
@@ -10004,21 +10381,21 @@ function PaginationSection({
|
|
|
10004
10381
|
}
|
|
10005
10382
|
return renderedPages;
|
|
10006
10383
|
};
|
|
10007
|
-
return /* @__PURE__ */
|
|
10008
|
-
/* @__PURE__ */
|
|
10009
|
-
/* @__PURE__ */
|
|
10384
|
+
return /* @__PURE__ */ jsx65("div", { className: "p-4", children: /* @__PURE__ */ jsx65(Pagination, { children: /* @__PURE__ */ jsxs36(PaginationContent, { children: [
|
|
10385
|
+
/* @__PURE__ */ jsxs36(PaginationItem, { children: [
|
|
10386
|
+
/* @__PURE__ */ jsx65(
|
|
10010
10387
|
PaginationPreviousLast,
|
|
10011
10388
|
{
|
|
10012
10389
|
onClick: handlePrevPageLast,
|
|
10013
10390
|
size: void 0
|
|
10014
10391
|
}
|
|
10015
10392
|
),
|
|
10016
|
-
/* @__PURE__ */
|
|
10393
|
+
/* @__PURE__ */ jsx65(PaginationPrevious, { onClick: handlePrevPage, size: void 0 })
|
|
10017
10394
|
] }),
|
|
10018
10395
|
renderPages(),
|
|
10019
|
-
/* @__PURE__ */
|
|
10020
|
-
/* @__PURE__ */
|
|
10021
|
-
/* @__PURE__ */
|
|
10396
|
+
/* @__PURE__ */ jsxs36(PaginationItem, { children: [
|
|
10397
|
+
/* @__PURE__ */ jsx65(PaginationNext, { onClick: handleNextPage, size: void 0 }),
|
|
10398
|
+
/* @__PURE__ */ jsx65(PaginationNextLast, { onClick: handleNextPageLast, size: void 0 })
|
|
10022
10399
|
] })
|
|
10023
10400
|
] }) }) });
|
|
10024
10401
|
}
|
|
@@ -10141,7 +10518,9 @@ export {
|
|
|
10141
10518
|
FormControl,
|
|
10142
10519
|
FormDescription,
|
|
10143
10520
|
FormField,
|
|
10521
|
+
FormFieldContext,
|
|
10144
10522
|
FormItem,
|
|
10523
|
+
FormItemContext,
|
|
10145
10524
|
FormLabel,
|
|
10146
10525
|
FormMessage,
|
|
10147
10526
|
FormSelect,
|
|
@@ -10269,14 +10648,17 @@ export {
|
|
|
10269
10648
|
badgeVariants,
|
|
10270
10649
|
buttonVariants,
|
|
10271
10650
|
cn,
|
|
10651
|
+
getDefaultOptionLabel,
|
|
10652
|
+
getDefaultOptionValue,
|
|
10653
|
+
getErrorMessage,
|
|
10654
|
+
getNextEnabledIndex,
|
|
10272
10655
|
iconButtonVariants,
|
|
10273
|
-
inputVariants,
|
|
10274
10656
|
navigationMenuTriggerStyle,
|
|
10657
|
+
normalizeSearchText,
|
|
10275
10658
|
reducer,
|
|
10276
10659
|
toast,
|
|
10277
10660
|
toggleVariants,
|
|
10278
10661
|
useFormField,
|
|
10279
10662
|
useSidebar,
|
|
10280
|
-
useToast
|
|
10281
|
-
variants
|
|
10663
|
+
useToast
|
|
10282
10664
|
};
|