@2urgseui/core 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +495 -296
- package/dist/index.d.cts +39 -1
- package/dist/index.d.ts +39 -1
- package/dist/index.js +492 -294
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -143,6 +143,7 @@ __export(index_exports, {
|
|
|
143
143
|
RichTextEditor: () => RichTextEditor,
|
|
144
144
|
ScrollArea: () => ScrollArea,
|
|
145
145
|
ScrollBar: () => ScrollBar,
|
|
146
|
+
SearchableSelect: () => SearchableSelect,
|
|
146
147
|
Select: () => Select,
|
|
147
148
|
SelectContent: () => SelectContent,
|
|
148
149
|
SelectGroup: () => SelectGroup,
|
|
@@ -795,9 +796,9 @@ function AsyncSelectInner(props) {
|
|
|
795
796
|
setSelectedItem(null);
|
|
796
797
|
};
|
|
797
798
|
const triggerLabel = selectedItem ? resolveLabel(selectedItem, labelKey) : value?.label ? value.label : null;
|
|
798
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Popover, { open, onOpenChange: setOpen, children: [
|
|
799
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "w-full min-w-0", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Popover, { open, onOpenChange: setOpen, children: [
|
|
799
800
|
name && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("input", { type: "hidden", name, value: value?.value ?? "" }),
|
|
800
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
801
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverTrigger, { asChild: true, className: "w-full", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
801
802
|
"button",
|
|
802
803
|
{
|
|
803
804
|
ref: innerRef,
|
|
@@ -807,10 +808,9 @@ function AsyncSelectInner(props) {
|
|
|
807
808
|
"aria-expanded": open,
|
|
808
809
|
disabled,
|
|
809
810
|
className: cn(
|
|
810
|
-
"flex h-11 w-full appearance-none items-center justify-between gap-2 px-4 text-base md:text-sm",
|
|
811
|
+
"flex min-h-11 w-full min-w-0 appearance-none items-center justify-between gap-2 px-4 py-2 text-base md:text-sm",
|
|
811
812
|
inputSurfaceField,
|
|
812
813
|
inputSurfaceFieldDisabled,
|
|
813
|
-
"[&>span]:line-clamp-1 [&>span]:text-inherit [&_svg]:text-slate-500 dark:[&_svg]:text-slate-400",
|
|
814
814
|
error2 && inputSurfaceFieldInvalid,
|
|
815
815
|
className
|
|
816
816
|
),
|
|
@@ -818,11 +818,14 @@ function AsyncSelectInner(props) {
|
|
|
818
818
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
819
819
|
"span",
|
|
820
820
|
{
|
|
821
|
-
className: cn(
|
|
821
|
+
className: cn(
|
|
822
|
+
"min-w-0 flex-1 text-left whitespace-normal break-words",
|
|
823
|
+
!triggerLabel && "text-slate-500 dark:text-slate-400"
|
|
824
|
+
),
|
|
822
825
|
children: triggerLabel ?? placeholder
|
|
823
826
|
}
|
|
824
827
|
),
|
|
825
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "flex shrink-0 items-center gap-1", children: [
|
|
828
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "ml-auto flex shrink-0 items-center gap-1", children: [
|
|
826
829
|
clearable && value?.value && !disabled && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
827
830
|
"span",
|
|
828
831
|
{
|
|
@@ -846,7 +849,7 @@ function AsyncSelectInner(props) {
|
|
|
846
849
|
PopoverContent,
|
|
847
850
|
{
|
|
848
851
|
align: "start",
|
|
849
|
-
className: "w-[--radix-popover-trigger-width] p-0",
|
|
852
|
+
className: "w-[var(--radix-popover-trigger-width)] min-w-[var(--radix-popover-trigger-width)] max-w-[var(--radix-popover-content-available-width)] p-0",
|
|
850
853
|
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
851
854
|
children: [
|
|
852
855
|
searchable && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-center gap-2 border-b px-3 py-2", children: [
|
|
@@ -879,14 +882,14 @@ function AsyncSelectInner(props) {
|
|
|
879
882
|
"aria-selected": isSelected,
|
|
880
883
|
onClick: () => handleSelect(item),
|
|
881
884
|
className: cn(
|
|
882
|
-
"relative flex w-full cursor-default select-none items-
|
|
885
|
+
"relative flex w-full cursor-default select-none items-start rounded-sm py-1.5 pl-8 pr-2 text-sm text-left outline-none",
|
|
883
886
|
"hover:bg-accent hover:text-accent-foreground",
|
|
884
887
|
"focus-visible:bg-accent focus-visible:text-accent-foreground",
|
|
885
888
|
isSelected && "bg-accent/50"
|
|
886
889
|
),
|
|
887
890
|
children: [
|
|
888
891
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: isSelected && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_lucide_react2.Check, { className: "h-4 w-4" }) }),
|
|
889
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "
|
|
892
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "min-w-0 flex-1 whitespace-normal break-words", children: resolveLabel(item, labelKey) })
|
|
890
893
|
]
|
|
891
894
|
},
|
|
892
895
|
itemValue
|
|
@@ -904,7 +907,7 @@ function AsyncSelectInner(props) {
|
|
|
904
907
|
]
|
|
905
908
|
}
|
|
906
909
|
)
|
|
907
|
-
] });
|
|
910
|
+
] }) });
|
|
908
911
|
}
|
|
909
912
|
var AsyncSelect = React6.forwardRef(
|
|
910
913
|
(props, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AsyncSelectInner, { ...props, innerRef: ref })
|
|
@@ -2157,7 +2160,7 @@ var FileDropzone = React20.forwardRef(
|
|
|
2157
2160
|
FileDropzone.displayName = "FileDropzone";
|
|
2158
2161
|
|
|
2159
2162
|
// source/components/primitive/FormField/form-field.tsx
|
|
2160
|
-
var
|
|
2163
|
+
var React30 = __toESM(require("react"), 1);
|
|
2161
2164
|
var import_react_hook_form = require("react-hook-form");
|
|
2162
2165
|
|
|
2163
2166
|
// source/components/primitive/InputOtp/input-otp.tsx
|
|
@@ -2412,30 +2415,195 @@ var RichTextEditor = ({
|
|
|
2412
2415
|
);
|
|
2413
2416
|
};
|
|
2414
2417
|
|
|
2415
|
-
// source/components/primitive/
|
|
2418
|
+
// source/components/primitive/SearchableSelect/searchable-select.tsx
|
|
2416
2419
|
var React25 = __toESM(require("react"), 1);
|
|
2417
|
-
var SelectPrimitive = __toESM(require("@radix-ui/react-select"), 1);
|
|
2418
2420
|
var import_lucide_react9 = require("lucide-react");
|
|
2419
2421
|
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2422
|
+
function reactNodeToLabelString2(node) {
|
|
2423
|
+
if (node == null || typeof node === "boolean") return "";
|
|
2424
|
+
if (typeof node === "string" || typeof node === "number") return String(node);
|
|
2425
|
+
if (Array.isArray(node)) return node.map(reactNodeToLabelString2).join("");
|
|
2426
|
+
return "";
|
|
2427
|
+
}
|
|
2428
|
+
function defaultFilterItem(item, search) {
|
|
2429
|
+
const q = search.trim().toLowerCase();
|
|
2430
|
+
if (!q) return true;
|
|
2431
|
+
return reactNodeToLabelString2(item.label).toLowerCase().includes(q);
|
|
2432
|
+
}
|
|
2433
|
+
function SearchableSelectInner({
|
|
2434
|
+
items,
|
|
2435
|
+
value,
|
|
2436
|
+
onValueChange,
|
|
2437
|
+
placeholder = "Select\u2026",
|
|
2438
|
+
searchPlaceholder = "Search\u2026",
|
|
2439
|
+
clearable = false,
|
|
2440
|
+
disabled = false,
|
|
2441
|
+
error: error2 = false,
|
|
2442
|
+
name,
|
|
2443
|
+
id,
|
|
2444
|
+
className,
|
|
2445
|
+
filterItem = defaultFilterItem,
|
|
2446
|
+
onBlur,
|
|
2447
|
+
"aria-describedby": ariaDescribedBy,
|
|
2448
|
+
"aria-invalid": ariaInvalid,
|
|
2449
|
+
innerRef
|
|
2450
|
+
}) {
|
|
2451
|
+
const [open, setOpen] = React25.useState(false);
|
|
2452
|
+
const [search, setSearch] = React25.useState("");
|
|
2453
|
+
const searchInputRef = React25.useRef(null);
|
|
2454
|
+
const filteredItems = items.filter((item) => filterItem(item, search));
|
|
2455
|
+
const selectedItem = items.find((item) => item.value === value);
|
|
2456
|
+
React25.useEffect(() => {
|
|
2457
|
+
if (open) {
|
|
2458
|
+
setTimeout(() => searchInputRef.current?.focus(), 0);
|
|
2459
|
+
} else {
|
|
2460
|
+
setSearch("");
|
|
2461
|
+
}
|
|
2462
|
+
}, [open]);
|
|
2463
|
+
const handleSelect = (item) => {
|
|
2464
|
+
if (item.disabled) return;
|
|
2465
|
+
if (clearable && item.value === value) {
|
|
2466
|
+
onValueChange?.("");
|
|
2467
|
+
} else {
|
|
2468
|
+
onValueChange?.(item.value);
|
|
2469
|
+
}
|
|
2470
|
+
setOpen(false);
|
|
2471
|
+
};
|
|
2472
|
+
const handleClear = (e) => {
|
|
2473
|
+
e.stopPropagation();
|
|
2474
|
+
onValueChange?.("");
|
|
2475
|
+
};
|
|
2476
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "w-full min-w-0", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Popover, { open, onOpenChange: setOpen, children: [
|
|
2477
|
+
name && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("input", { type: "hidden", name, value: value ?? "" }),
|
|
2478
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(PopoverTrigger, { asChild: true, className: "w-full", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
2479
|
+
"button",
|
|
2480
|
+
{
|
|
2481
|
+
ref: innerRef,
|
|
2482
|
+
id,
|
|
2483
|
+
type: "button",
|
|
2484
|
+
role: "combobox",
|
|
2485
|
+
"aria-expanded": open,
|
|
2486
|
+
"aria-describedby": ariaDescribedBy,
|
|
2487
|
+
"aria-invalid": ariaInvalid,
|
|
2488
|
+
disabled,
|
|
2489
|
+
onBlur,
|
|
2490
|
+
className: cn(
|
|
2491
|
+
"flex min-h-11 w-full min-w-0 appearance-none items-center justify-between gap-2 px-4 py-2 text-base md:text-sm",
|
|
2492
|
+
inputSurfaceField,
|
|
2493
|
+
inputSurfaceFieldDisabled,
|
|
2494
|
+
error2 && inputSurfaceFieldInvalid,
|
|
2495
|
+
className
|
|
2496
|
+
),
|
|
2497
|
+
children: [
|
|
2498
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2499
|
+
"span",
|
|
2500
|
+
{
|
|
2501
|
+
className: cn(
|
|
2502
|
+
"min-w-0 flex-1 text-left whitespace-normal break-words",
|
|
2503
|
+
!selectedItem && "text-slate-500 dark:text-slate-400"
|
|
2504
|
+
),
|
|
2505
|
+
children: selectedItem?.label ?? placeholder
|
|
2506
|
+
}
|
|
2507
|
+
),
|
|
2508
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("span", { className: "ml-auto flex shrink-0 items-center gap-1", children: [
|
|
2509
|
+
clearable && value && !disabled && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2510
|
+
"span",
|
|
2511
|
+
{
|
|
2512
|
+
role: "button",
|
|
2513
|
+
tabIndex: -1,
|
|
2514
|
+
"aria-label": "Clear selection",
|
|
2515
|
+
onClick: handleClear,
|
|
2516
|
+
onKeyDown: (e) => {
|
|
2517
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
2518
|
+
handleClear(e);
|
|
2519
|
+
}
|
|
2520
|
+
},
|
|
2521
|
+
className: "rounded-sm p-0.5 text-muted-foreground hover:text-foreground",
|
|
2522
|
+
children: "\xD7"
|
|
2523
|
+
}
|
|
2524
|
+
),
|
|
2525
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react9.ChevronDown, { "aria-hidden": true, className: "h-4 w-4 shrink-0 text-slate-500 dark:text-slate-400" })
|
|
2526
|
+
] })
|
|
2527
|
+
]
|
|
2528
|
+
}
|
|
2529
|
+
) }),
|
|
2530
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
2531
|
+
PopoverContent,
|
|
2532
|
+
{
|
|
2533
|
+
align: "start",
|
|
2534
|
+
className: "w-[--radix-popover-trigger-width] min-w-[var(--radix-popover-trigger-width)] max-w-[var(--radix-popover-content-available-width)] p-0",
|
|
2535
|
+
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
2536
|
+
children: [
|
|
2537
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex items-center gap-2 border-b px-3 py-2", children: [
|
|
2538
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react9.Search, { className: "h-4 w-4 shrink-0 text-muted-foreground" }),
|
|
2539
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2540
|
+
"input",
|
|
2541
|
+
{
|
|
2542
|
+
ref: searchInputRef,
|
|
2543
|
+
value: search,
|
|
2544
|
+
onChange: (e) => setSearch(e.target.value),
|
|
2545
|
+
placeholder: searchPlaceholder,
|
|
2546
|
+
className: "h-8 w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground"
|
|
2547
|
+
}
|
|
2548
|
+
)
|
|
2549
|
+
] }),
|
|
2550
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "max-h-60 overflow-y-auto p-1", children: filteredItems.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "px-3 py-6 text-center text-sm text-muted-foreground", children: "No results found." }) : filteredItems.map((item) => {
|
|
2551
|
+
const isSelected = item.value === value;
|
|
2552
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
2553
|
+
"button",
|
|
2554
|
+
{
|
|
2555
|
+
type: "button",
|
|
2556
|
+
role: "option",
|
|
2557
|
+
"aria-selected": isSelected,
|
|
2558
|
+
disabled: item.disabled,
|
|
2559
|
+
onClick: () => handleSelect(item),
|
|
2560
|
+
className: cn(
|
|
2561
|
+
"relative flex w-full cursor-default select-none items-start rounded-sm py-1.5 pl-8 pr-2 text-sm text-left outline-none",
|
|
2562
|
+
"hover:bg-accent hover:text-accent-foreground",
|
|
2563
|
+
"focus-visible:bg-accent focus-visible:text-accent-foreground",
|
|
2564
|
+
"disabled:pointer-events-none disabled:opacity-50",
|
|
2565
|
+
isSelected && "bg-accent/50"
|
|
2566
|
+
),
|
|
2567
|
+
children: [
|
|
2568
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: isSelected && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react9.Check, { className: "h-4 w-4" }) }),
|
|
2569
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "min-w-0 flex-1 whitespace-normal break-words", children: item.label })
|
|
2570
|
+
]
|
|
2571
|
+
},
|
|
2572
|
+
item.value
|
|
2573
|
+
);
|
|
2574
|
+
}) })
|
|
2575
|
+
]
|
|
2576
|
+
}
|
|
2577
|
+
)
|
|
2578
|
+
] }) });
|
|
2579
|
+
}
|
|
2580
|
+
var SearchableSelect = React25.forwardRef((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SearchableSelectInner, { ...props, innerRef: ref }));
|
|
2581
|
+
SearchableSelect.displayName = "SearchableSelect";
|
|
2582
|
+
|
|
2583
|
+
// source/components/primitive/Select/select.tsx
|
|
2584
|
+
var React26 = __toESM(require("react"), 1);
|
|
2585
|
+
var SelectPrimitive = __toESM(require("@radix-ui/react-select"), 1);
|
|
2586
|
+
var import_lucide_react10 = require("lucide-react");
|
|
2587
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
2420
2588
|
var Select = SelectPrimitive.Root;
|
|
2421
2589
|
var SelectGroup = SelectPrimitive.Group;
|
|
2422
2590
|
var SelectValue = SelectPrimitive.Value;
|
|
2423
|
-
var SelectTrigger =
|
|
2591
|
+
var SelectTrigger = React26.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
2424
2592
|
SelectPrimitive.Trigger,
|
|
2425
2593
|
{
|
|
2426
2594
|
ref,
|
|
2427
2595
|
className: cn(
|
|
2428
|
-
"flex h-11 w-full appearance-none items-center justify-between gap-2 px-4 text-base md:text-sm",
|
|
2596
|
+
"flex min-h-11 w-full appearance-none items-center justify-between gap-2 px-4 py-2 text-base md:text-sm",
|
|
2429
2597
|
inputSurfaceField,
|
|
2430
2598
|
inputSurfaceFieldDisabled,
|
|
2431
|
-
"[&>span]:
|
|
2599
|
+
"[&>span]:min-w-0 [&>span]:flex-1 [&>span]:text-left [&>span]:whitespace-normal [&>span]:break-words [&>span]:text-inherit [&_svg]:text-slate-500 dark:[&_svg]:text-slate-400",
|
|
2432
2600
|
className
|
|
2433
2601
|
),
|
|
2434
2602
|
...props,
|
|
2435
2603
|
children: [
|
|
2436
2604
|
children,
|
|
2437
|
-
/* @__PURE__ */ (0,
|
|
2438
|
-
|
|
2605
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2606
|
+
import_lucide_react10.ChevronDown,
|
|
2439
2607
|
{
|
|
2440
2608
|
"aria-hidden": "true",
|
|
2441
2609
|
className: "h-4 w-4 shrink-0"
|
|
@@ -2445,7 +2613,7 @@ var SelectTrigger = React25.forwardRef(({ className, children, ...props }, ref)
|
|
|
2445
2613
|
}
|
|
2446
2614
|
));
|
|
2447
2615
|
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
2448
|
-
var SelectScrollUpButton =
|
|
2616
|
+
var SelectScrollUpButton = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2449
2617
|
SelectPrimitive.ScrollUpButton,
|
|
2450
2618
|
{
|
|
2451
2619
|
ref,
|
|
@@ -2454,11 +2622,11 @@ var SelectScrollUpButton = React25.forwardRef(({ className, ...props }, ref) =>
|
|
|
2454
2622
|
className
|
|
2455
2623
|
),
|
|
2456
2624
|
...props,
|
|
2457
|
-
children: /* @__PURE__ */ (0,
|
|
2625
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react10.ChevronUp, { className: "h-4 w-4" })
|
|
2458
2626
|
}
|
|
2459
2627
|
));
|
|
2460
2628
|
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
2461
|
-
var SelectScrollDownButton =
|
|
2629
|
+
var SelectScrollDownButton = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2462
2630
|
SelectPrimitive.ScrollDownButton,
|
|
2463
2631
|
{
|
|
2464
2632
|
ref,
|
|
@@ -2467,39 +2635,39 @@ var SelectScrollDownButton = React25.forwardRef(({ className, ...props }, ref) =
|
|
|
2467
2635
|
className
|
|
2468
2636
|
),
|
|
2469
2637
|
...props,
|
|
2470
|
-
children: /* @__PURE__ */ (0,
|
|
2638
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react10.ChevronDown, { className: "h-4 w-4" })
|
|
2471
2639
|
}
|
|
2472
2640
|
));
|
|
2473
2641
|
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
2474
|
-
var SelectContent =
|
|
2642
|
+
var SelectContent = React26.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(SelectPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
2475
2643
|
SelectPrimitive.Content,
|
|
2476
2644
|
{
|
|
2477
2645
|
ref,
|
|
2478
2646
|
className: cn(
|
|
2479
|
-
"relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto
|
|
2480
|
-
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",
|
|
2647
|
+
"relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto rounded-md border bg-popover text-popover-foreground 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 origin-[--radix-select-content-transform-origin]",
|
|
2648
|
+
position === "popper" && "min-w-[var(--radix-select-trigger-width)] max-w-[var(--radix-select-content-available-width)] data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
2481
2649
|
className
|
|
2482
2650
|
),
|
|
2483
2651
|
position,
|
|
2484
2652
|
...props,
|
|
2485
2653
|
children: [
|
|
2486
|
-
/* @__PURE__ */ (0,
|
|
2487
|
-
/* @__PURE__ */ (0,
|
|
2654
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(SelectScrollUpButton, {}),
|
|
2655
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2488
2656
|
SelectPrimitive.Viewport,
|
|
2489
2657
|
{
|
|
2490
2658
|
className: cn(
|
|
2491
2659
|
"p-1",
|
|
2492
|
-
position === "popper" && "
|
|
2660
|
+
position === "popper" && "w-full min-w-[var(--radix-select-trigger-width)]"
|
|
2493
2661
|
),
|
|
2494
2662
|
children
|
|
2495
2663
|
}
|
|
2496
2664
|
),
|
|
2497
|
-
/* @__PURE__ */ (0,
|
|
2665
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(SelectScrollDownButton, {})
|
|
2498
2666
|
]
|
|
2499
2667
|
}
|
|
2500
2668
|
) }));
|
|
2501
2669
|
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
2502
|
-
var SelectLabel =
|
|
2670
|
+
var SelectLabel = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2503
2671
|
SelectPrimitive.Label,
|
|
2504
2672
|
{
|
|
2505
2673
|
ref,
|
|
@@ -2508,31 +2676,31 @@ var SelectLabel = React25.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
2508
2676
|
}
|
|
2509
2677
|
));
|
|
2510
2678
|
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
2511
|
-
var SelectItem =
|
|
2679
|
+
var SelectItem = React26.forwardRef(({ value, className, children, ...props }, ref) => {
|
|
2512
2680
|
if (value === "") {
|
|
2513
2681
|
throw new Error(
|
|
2514
2682
|
'SelectItem: `value` must not be an empty string \u2014 Radix uses "" to reset the Select and show the placeholder. Omit that option and use `<SelectValue placeholder="\u2026">`, or assign a sentinel value such as `"none"`.'
|
|
2515
2683
|
);
|
|
2516
2684
|
}
|
|
2517
|
-
return /* @__PURE__ */ (0,
|
|
2685
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
2518
2686
|
SelectPrimitive.Item,
|
|
2519
2687
|
{
|
|
2520
2688
|
ref,
|
|
2521
2689
|
value,
|
|
2522
2690
|
className: cn(
|
|
2523
|
-
"relative flex w-full cursor-default select-none items-
|
|
2691
|
+
"relative flex w-full cursor-default select-none items-start rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
2524
2692
|
className
|
|
2525
2693
|
),
|
|
2526
2694
|
...props,
|
|
2527
2695
|
children: [
|
|
2528
|
-
/* @__PURE__ */ (0,
|
|
2529
|
-
/* @__PURE__ */ (0,
|
|
2696
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react10.Check, { className: "h-4 w-4" }) }) }),
|
|
2697
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(SelectPrimitive.ItemText, { className: "whitespace-normal break-words", children })
|
|
2530
2698
|
]
|
|
2531
2699
|
}
|
|
2532
2700
|
);
|
|
2533
2701
|
});
|
|
2534
2702
|
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
2535
|
-
var SelectSeparator =
|
|
2703
|
+
var SelectSeparator = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2536
2704
|
SelectPrimitive.Separator,
|
|
2537
2705
|
{
|
|
2538
2706
|
ref,
|
|
@@ -2543,10 +2711,10 @@ var SelectSeparator = React25.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
2543
2711
|
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
2544
2712
|
|
|
2545
2713
|
// source/components/primitive/Switch/switch.tsx
|
|
2546
|
-
var
|
|
2714
|
+
var React27 = __toESM(require("react"), 1);
|
|
2547
2715
|
var SwitchPrimitives = __toESM(require("@radix-ui/react-switch"), 1);
|
|
2548
2716
|
var import_class_variance_authority9 = require("class-variance-authority");
|
|
2549
|
-
var
|
|
2717
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
2550
2718
|
var switchRootVariants = (0, import_class_variance_authority9.cva)(
|
|
2551
2719
|
[
|
|
2552
2720
|
"peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors",
|
|
@@ -2580,14 +2748,14 @@ var switchThumbVariants = (0, import_class_variance_authority9.cva)(
|
|
|
2580
2748
|
}
|
|
2581
2749
|
}
|
|
2582
2750
|
);
|
|
2583
|
-
var Switch =
|
|
2751
|
+
var Switch = React27.forwardRef(
|
|
2584
2752
|
({ className, label, description, error: error2, size, id: idProp, ...props }, ref) => {
|
|
2585
|
-
const generatedId =
|
|
2753
|
+
const generatedId = React27.useId();
|
|
2586
2754
|
const id = idProp ?? generatedId;
|
|
2587
2755
|
const descriptionId = description ? `${id}-description` : void 0;
|
|
2588
2756
|
const errorId = error2 ? `${id}-error` : void 0;
|
|
2589
|
-
return /* @__PURE__ */ (0,
|
|
2590
|
-
/* @__PURE__ */ (0,
|
|
2757
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex items-start gap-3", children: [
|
|
2758
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2591
2759
|
SwitchPrimitives.Root,
|
|
2592
2760
|
{
|
|
2593
2761
|
ref,
|
|
@@ -2600,7 +2768,7 @@ var Switch = React26.forwardRef(
|
|
|
2600
2768
|
className
|
|
2601
2769
|
),
|
|
2602
2770
|
...props,
|
|
2603
|
-
children: /* @__PURE__ */ (0,
|
|
2771
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2604
2772
|
SwitchPrimitives.Thumb,
|
|
2605
2773
|
{
|
|
2606
2774
|
className: cn(switchThumbVariants({ size }))
|
|
@@ -2608,8 +2776,8 @@ var Switch = React26.forwardRef(
|
|
|
2608
2776
|
)
|
|
2609
2777
|
}
|
|
2610
2778
|
),
|
|
2611
|
-
(label || description || error2) && /* @__PURE__ */ (0,
|
|
2612
|
-
label && /* @__PURE__ */ (0,
|
|
2779
|
+
(label || description || error2) && /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex flex-col leading-tight", children: [
|
|
2780
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2613
2781
|
"label",
|
|
2614
2782
|
{
|
|
2615
2783
|
htmlFor: id,
|
|
@@ -2617,7 +2785,7 @@ var Switch = React26.forwardRef(
|
|
|
2617
2785
|
children: label
|
|
2618
2786
|
}
|
|
2619
2787
|
),
|
|
2620
|
-
description && /* @__PURE__ */ (0,
|
|
2788
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2621
2789
|
"p",
|
|
2622
2790
|
{
|
|
2623
2791
|
id: descriptionId,
|
|
@@ -2625,7 +2793,7 @@ var Switch = React26.forwardRef(
|
|
|
2625
2793
|
children: description
|
|
2626
2794
|
}
|
|
2627
2795
|
),
|
|
2628
|
-
error2 && /* @__PURE__ */ (0,
|
|
2796
|
+
error2 && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2629
2797
|
"p",
|
|
2630
2798
|
{
|
|
2631
2799
|
id: errorId,
|
|
@@ -2640,9 +2808,9 @@ var Switch = React26.forwardRef(
|
|
|
2640
2808
|
Switch.displayName = "Switch";
|
|
2641
2809
|
|
|
2642
2810
|
// source/components/primitive/Text/text.tsx
|
|
2643
|
-
var
|
|
2811
|
+
var React28 = __toESM(require("react"), 1);
|
|
2644
2812
|
var import_class_variance_authority10 = require("class-variance-authority");
|
|
2645
|
-
var
|
|
2813
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2646
2814
|
var textVariants = (0, import_class_variance_authority10.cva)("text-foreground", {
|
|
2647
2815
|
variants: {
|
|
2648
2816
|
element: {
|
|
@@ -2691,7 +2859,7 @@ var textVariants = (0, import_class_variance_authority10.cva)("text-foreground",
|
|
|
2691
2859
|
tone: "default"
|
|
2692
2860
|
}
|
|
2693
2861
|
});
|
|
2694
|
-
var Text =
|
|
2862
|
+
var Text = React28.forwardRef(
|
|
2695
2863
|
({
|
|
2696
2864
|
element = "p",
|
|
2697
2865
|
size,
|
|
@@ -2704,7 +2872,7 @@ var Text = React27.forwardRef(
|
|
|
2704
2872
|
}, ref) => {
|
|
2705
2873
|
const Comp = element;
|
|
2706
2874
|
const variantElement = element === "div" ? "p" : element;
|
|
2707
|
-
return /* @__PURE__ */ (0,
|
|
2875
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2708
2876
|
Comp,
|
|
2709
2877
|
{
|
|
2710
2878
|
ref,
|
|
@@ -2727,8 +2895,8 @@ var Text = React27.forwardRef(
|
|
|
2727
2895
|
Text.displayName = "Text";
|
|
2728
2896
|
|
|
2729
2897
|
// source/components/primitive/TextArea/textarea.tsx
|
|
2730
|
-
var
|
|
2731
|
-
var
|
|
2898
|
+
var React29 = __toESM(require("react"), 1);
|
|
2899
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2732
2900
|
var resizeClasses = {
|
|
2733
2901
|
none: "resize-none",
|
|
2734
2902
|
vertical: "resize-y",
|
|
@@ -2736,9 +2904,9 @@ var resizeClasses = {
|
|
|
2736
2904
|
both: "resize"
|
|
2737
2905
|
};
|
|
2738
2906
|
var layout = "block min-h-[120px] w-full min-w-0 px-4 py-2 text-sm md:text-base";
|
|
2739
|
-
var Textarea =
|
|
2907
|
+
var Textarea = React29.forwardRef(
|
|
2740
2908
|
({ className, error: error2, resize = "vertical", ...props }, ref) => {
|
|
2741
|
-
return /* @__PURE__ */ (0,
|
|
2909
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2742
2910
|
"textarea",
|
|
2743
2911
|
{
|
|
2744
2912
|
ref,
|
|
@@ -2760,7 +2928,7 @@ var Textarea = React28.forwardRef(
|
|
|
2760
2928
|
Textarea.displayName = "Textarea";
|
|
2761
2929
|
|
|
2762
2930
|
// source/components/primitive/FormField/form-field.tsx
|
|
2763
|
-
var
|
|
2931
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2764
2932
|
function stripThousands(s) {
|
|
2765
2933
|
return s.replace(/,/g, "");
|
|
2766
2934
|
}
|
|
@@ -2904,7 +3072,7 @@ function FormField({
|
|
|
2904
3072
|
className,
|
|
2905
3073
|
renderInput
|
|
2906
3074
|
}) {
|
|
2907
|
-
const generatedId =
|
|
3075
|
+
const generatedId = React30.useId();
|
|
2908
3076
|
const inputId = `field-${generatedId}`;
|
|
2909
3077
|
const descriptionId = description ? `${inputId}-description` : void 0;
|
|
2910
3078
|
const externalError = error2 ? String(error2) : void 0;
|
|
@@ -2947,7 +3115,7 @@ function FormField({
|
|
|
2947
3115
|
);
|
|
2948
3116
|
}
|
|
2949
3117
|
if (control) {
|
|
2950
|
-
return /* @__PURE__ */ (0,
|
|
3118
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2951
3119
|
import_react_hook_form.Controller,
|
|
2952
3120
|
{
|
|
2953
3121
|
name,
|
|
@@ -2974,7 +3142,7 @@ function FormField({
|
|
|
2974
3142
|
onChange: field.onChange,
|
|
2975
3143
|
onBlur: field.onBlur,
|
|
2976
3144
|
ref: field.ref
|
|
2977
|
-
}) : /* @__PURE__ */ (0,
|
|
3145
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2978
3146
|
FormFieldVariantControl,
|
|
2979
3147
|
{
|
|
2980
3148
|
variant,
|
|
@@ -2999,7 +3167,7 @@ function FormField({
|
|
|
2999
3167
|
maskInput: renderInput ? void 0 : maskInput
|
|
3000
3168
|
}
|
|
3001
3169
|
);
|
|
3002
|
-
const labelBlock = isCheckboxInline || !hasFieldLabel2 ? null : /* @__PURE__ */ (0,
|
|
3170
|
+
const labelBlock = isCheckboxInline || !hasFieldLabel2 ? null : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3003
3171
|
Label2,
|
|
3004
3172
|
{
|
|
3005
3173
|
id: variant === "radio" || variant === "richtext" ? legendId : void 0,
|
|
@@ -3009,8 +3177,8 @@ function FormField({
|
|
|
3009
3177
|
children: label
|
|
3010
3178
|
}
|
|
3011
3179
|
);
|
|
3012
|
-
const checkboxInline = isCheckboxInline ? hasFieldLabel2 ? /* @__PURE__ */ (0,
|
|
3013
|
-
/* @__PURE__ */ (0,
|
|
3180
|
+
const checkboxInline = isCheckboxInline ? hasFieldLabel2 ? /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex w-full min-w-0 items-start gap-2", children: [
|
|
3181
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3014
3182
|
Checkbox,
|
|
3015
3183
|
{
|
|
3016
3184
|
...checkboxProps,
|
|
@@ -3025,7 +3193,7 @@ function FormField({
|
|
|
3025
3193
|
"aria-invalid": hasError || void 0
|
|
3026
3194
|
}
|
|
3027
3195
|
),
|
|
3028
|
-
/* @__PURE__ */ (0,
|
|
3196
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3029
3197
|
Label2,
|
|
3030
3198
|
{
|
|
3031
3199
|
htmlFor: inputId,
|
|
@@ -3035,7 +3203,7 @@ function FormField({
|
|
|
3035
3203
|
children: label
|
|
3036
3204
|
}
|
|
3037
3205
|
)
|
|
3038
|
-
] }) : /* @__PURE__ */ (0,
|
|
3206
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3039
3207
|
Checkbox,
|
|
3040
3208
|
{
|
|
3041
3209
|
...checkboxProps,
|
|
@@ -3050,7 +3218,7 @@ function FormField({
|
|
|
3050
3218
|
"aria-invalid": hasError || void 0
|
|
3051
3219
|
}
|
|
3052
3220
|
) : null;
|
|
3053
|
-
return /* @__PURE__ */ (0,
|
|
3221
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
3054
3222
|
"div",
|
|
3055
3223
|
{
|
|
3056
3224
|
className: cn(
|
|
@@ -3058,12 +3226,12 @@ function FormField({
|
|
|
3058
3226
|
className
|
|
3059
3227
|
),
|
|
3060
3228
|
children: [
|
|
3061
|
-
isCheckboxInline ? checkboxInline : /* @__PURE__ */ (0,
|
|
3229
|
+
isCheckboxInline ? checkboxInline : /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex w-full min-w-0 flex-col gap-1.5", children: [
|
|
3062
3230
|
labelBlock,
|
|
3063
3231
|
controlNode
|
|
3064
3232
|
] }),
|
|
3065
|
-
description && /* @__PURE__ */ (0,
|
|
3066
|
-
message && /* @__PURE__ */ (0,
|
|
3233
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { id: descriptionId, size: "sm", tone: "muted", children: description }),
|
|
3234
|
+
message && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { id: errorId, size: "sm", tone: "destructive", children: message })
|
|
3067
3235
|
]
|
|
3068
3236
|
}
|
|
3069
3237
|
);
|
|
@@ -3088,7 +3256,7 @@ function FormField({
|
|
|
3088
3256
|
"aria-describedby": describedBy,
|
|
3089
3257
|
error: Boolean(externalError),
|
|
3090
3258
|
...registered
|
|
3091
|
-
}) : variant === "textarea" ? /* @__PURE__ */ (0,
|
|
3259
|
+
}) : variant === "textarea" ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3092
3260
|
Textarea,
|
|
3093
3261
|
{
|
|
3094
3262
|
id: inputId,
|
|
@@ -3097,7 +3265,7 @@ function FormField({
|
|
|
3097
3265
|
...textareaProps,
|
|
3098
3266
|
...registered
|
|
3099
3267
|
}
|
|
3100
|
-
) : /* @__PURE__ */ (0,
|
|
3268
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3101
3269
|
Input,
|
|
3102
3270
|
{
|
|
3103
3271
|
id: inputId,
|
|
@@ -3107,13 +3275,13 @@ function FormField({
|
|
|
3107
3275
|
...registered
|
|
3108
3276
|
}
|
|
3109
3277
|
);
|
|
3110
|
-
return /* @__PURE__ */ (0,
|
|
3111
|
-
hasFieldLabel ? /* @__PURE__ */ (0,
|
|
3112
|
-
/* @__PURE__ */ (0,
|
|
3278
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: cn("mt-4 flex w-full min-w-0 flex-col gap-2", className), children: [
|
|
3279
|
+
hasFieldLabel ? /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex w-full min-w-0 flex-col gap-1.5", children: [
|
|
3280
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Label2, { htmlFor: inputId, required, size: "sm", children: label }),
|
|
3113
3281
|
registeredControl
|
|
3114
|
-
] }) : /* @__PURE__ */ (0,
|
|
3115
|
-
description && /* @__PURE__ */ (0,
|
|
3116
|
-
externalError && /* @__PURE__ */ (0,
|
|
3282
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "w-full min-w-0", children: registeredControl }),
|
|
3283
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { id: descriptionId, size: "sm", tone: "muted", children: description }),
|
|
3284
|
+
externalError && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { id: `${inputId}-error`, size: "sm", tone: "destructive", children: externalError })
|
|
3117
3285
|
] });
|
|
3118
3286
|
}
|
|
3119
3287
|
function formValueToAsyncSelectOption(v) {
|
|
@@ -3151,7 +3319,7 @@ function FormFieldVariantControl({
|
|
|
3151
3319
|
}) {
|
|
3152
3320
|
switch (variant) {
|
|
3153
3321
|
case "textarea":
|
|
3154
|
-
return /* @__PURE__ */ (0,
|
|
3322
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "w-full min-w-0", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3155
3323
|
Textarea,
|
|
3156
3324
|
{
|
|
3157
3325
|
...textareaProps,
|
|
@@ -3169,7 +3337,7 @@ function FormFieldVariantControl({
|
|
|
3169
3337
|
case "checkbox":
|
|
3170
3338
|
return null;
|
|
3171
3339
|
case "switch":
|
|
3172
|
-
return /* @__PURE__ */ (0,
|
|
3340
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "w-full min-w-0", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3173
3341
|
Switch,
|
|
3174
3342
|
{
|
|
3175
3343
|
...switchProps,
|
|
@@ -3193,6 +3361,10 @@ function FormFieldVariantControl({
|
|
|
3193
3361
|
items,
|
|
3194
3362
|
triggerClassName,
|
|
3195
3363
|
contentClassName,
|
|
3364
|
+
searchable,
|
|
3365
|
+
searchPlaceholder,
|
|
3366
|
+
clearable,
|
|
3367
|
+
filterItem,
|
|
3196
3368
|
...selectRootRest
|
|
3197
3369
|
} = selectProps;
|
|
3198
3370
|
const emptyValueItems = items.filter((item) => item.value === "");
|
|
@@ -3202,7 +3374,33 @@ function FormFieldVariantControl({
|
|
|
3202
3374
|
);
|
|
3203
3375
|
}
|
|
3204
3376
|
const value = field.value == null || field.value === "" ? void 0 : String(field.value);
|
|
3205
|
-
|
|
3377
|
+
if (searchable) {
|
|
3378
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "w-full min-w-0", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3379
|
+
SearchableSelect,
|
|
3380
|
+
{
|
|
3381
|
+
items,
|
|
3382
|
+
value,
|
|
3383
|
+
onValueChange: field.onChange,
|
|
3384
|
+
onBlur: field.onBlur,
|
|
3385
|
+
placeholder,
|
|
3386
|
+
searchPlaceholder,
|
|
3387
|
+
clearable,
|
|
3388
|
+
filterItem,
|
|
3389
|
+
disabled: field.disabled,
|
|
3390
|
+
error: hasError,
|
|
3391
|
+
name: field.name,
|
|
3392
|
+
id: inputId,
|
|
3393
|
+
ref: field.ref,
|
|
3394
|
+
className: cn(
|
|
3395
|
+
hasError && inputSurfaceFieldInvalid,
|
|
3396
|
+
triggerClassName
|
|
3397
|
+
),
|
|
3398
|
+
"aria-describedby": describedBy,
|
|
3399
|
+
"aria-invalid": hasError || void 0
|
|
3400
|
+
}
|
|
3401
|
+
) });
|
|
3402
|
+
}
|
|
3403
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "w-full min-w-0", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
3206
3404
|
Select,
|
|
3207
3405
|
{
|
|
3208
3406
|
...selectRootRest,
|
|
@@ -3211,7 +3409,7 @@ function FormFieldVariantControl({
|
|
|
3211
3409
|
disabled: field.disabled,
|
|
3212
3410
|
name: field.name,
|
|
3213
3411
|
children: [
|
|
3214
|
-
/* @__PURE__ */ (0,
|
|
3412
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3215
3413
|
SelectTrigger,
|
|
3216
3414
|
{
|
|
3217
3415
|
id: inputId,
|
|
@@ -3223,10 +3421,10 @@ function FormFieldVariantControl({
|
|
|
3223
3421
|
triggerClassName
|
|
3224
3422
|
),
|
|
3225
3423
|
onBlur: field.onBlur,
|
|
3226
|
-
children: /* @__PURE__ */ (0,
|
|
3424
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(SelectValue, { placeholder })
|
|
3227
3425
|
}
|
|
3228
3426
|
),
|
|
3229
|
-
/* @__PURE__ */ (0,
|
|
3427
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(SelectContent, { className: contentClassName, children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3230
3428
|
SelectItem,
|
|
3231
3429
|
{
|
|
3232
3430
|
value: item.value,
|
|
@@ -3249,7 +3447,7 @@ function FormFieldVariantControl({
|
|
|
3249
3447
|
if (!asyncSelectProps?.labelKey) {
|
|
3250
3448
|
throw new Error('FormField variant "async-select" requires asyncSelectProps.labelKey.');
|
|
3251
3449
|
}
|
|
3252
|
-
return /* @__PURE__ */ (0,
|
|
3450
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "w-full min-w-0", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3253
3451
|
AsyncSelect,
|
|
3254
3452
|
{
|
|
3255
3453
|
...asyncSelectProps,
|
|
@@ -3273,7 +3471,7 @@ function FormFieldVariantControl({
|
|
|
3273
3471
|
className: radioClassName,
|
|
3274
3472
|
...radioGroupRest
|
|
3275
3473
|
} = radioProps;
|
|
3276
|
-
return /* @__PURE__ */ (0,
|
|
3474
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3277
3475
|
RadioGroup2,
|
|
3278
3476
|
{
|
|
3279
3477
|
...radioGroupRest,
|
|
@@ -3288,8 +3486,8 @@ function FormFieldVariantControl({
|
|
|
3288
3486
|
"aria-describedby": describedBy,
|
|
3289
3487
|
"aria-invalid": hasError || void 0,
|
|
3290
3488
|
ref: field.ref,
|
|
3291
|
-
children: options.map((opt) => /* @__PURE__ */ (0,
|
|
3292
|
-
/* @__PURE__ */ (0,
|
|
3489
|
+
children: options.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
3490
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3293
3491
|
RadioGroupItem,
|
|
3294
3492
|
{
|
|
3295
3493
|
value: opt.value,
|
|
@@ -3297,7 +3495,7 @@ function FormFieldVariantControl({
|
|
|
3297
3495
|
disabled: opt.disabled
|
|
3298
3496
|
}
|
|
3299
3497
|
),
|
|
3300
|
-
/* @__PURE__ */ (0,
|
|
3498
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3301
3499
|
Label2,
|
|
3302
3500
|
{
|
|
3303
3501
|
htmlFor: opt.id ?? `${inputId}-${opt.value}`,
|
|
@@ -3316,7 +3514,7 @@ function FormFieldVariantControl({
|
|
|
3316
3514
|
}
|
|
3317
3515
|
const { maxLength, groups, containerClassName, ...otpRest } = otpProps;
|
|
3318
3516
|
const slotGroups = groups?.length ? groups : defaultOtpGroups(maxLength);
|
|
3319
|
-
return /* @__PURE__ */ (0,
|
|
3517
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "w-full min-w-0", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3320
3518
|
InputOTP,
|
|
3321
3519
|
{
|
|
3322
3520
|
...otpRest,
|
|
@@ -3335,15 +3533,15 @@ function FormFieldVariantControl({
|
|
|
3335
3533
|
hasError && inputOtpContainerInvalid,
|
|
3336
3534
|
containerClassName
|
|
3337
3535
|
),
|
|
3338
|
-
children: slotGroups.map((indices, gi) => /* @__PURE__ */ (0,
|
|
3339
|
-
gi > 0 ? /* @__PURE__ */ (0,
|
|
3340
|
-
/* @__PURE__ */ (0,
|
|
3536
|
+
children: slotGroups.map((indices, gi) => /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(React30.Fragment, { children: [
|
|
3537
|
+
gi > 0 ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(InputOTPSeparator, {}) : null,
|
|
3538
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(InputOTPGroup, { children: indices.map((index) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(InputOTPSlot, { index }, index)) })
|
|
3341
3539
|
] }, gi))
|
|
3342
3540
|
}
|
|
3343
3541
|
) });
|
|
3344
3542
|
}
|
|
3345
3543
|
case "richtext":
|
|
3346
|
-
return /* @__PURE__ */ (0,
|
|
3544
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3347
3545
|
"div",
|
|
3348
3546
|
{
|
|
3349
3547
|
className: "w-full min-w-0",
|
|
@@ -3353,7 +3551,7 @@ function FormFieldVariantControl({
|
|
|
3353
3551
|
"aria-describedby": describedBy,
|
|
3354
3552
|
"aria-invalid": hasError || void 0,
|
|
3355
3553
|
onBlur: field.onBlur,
|
|
3356
|
-
children: /* @__PURE__ */ (0,
|
|
3554
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3357
3555
|
RichTextEditor,
|
|
3358
3556
|
{
|
|
3359
3557
|
value: field.value ?? "",
|
|
@@ -3365,7 +3563,7 @@ function FormFieldVariantControl({
|
|
|
3365
3563
|
}
|
|
3366
3564
|
);
|
|
3367
3565
|
case "dropzone":
|
|
3368
|
-
return /* @__PURE__ */ (0,
|
|
3566
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "w-full min-w-0", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3369
3567
|
FileDropzone,
|
|
3370
3568
|
{
|
|
3371
3569
|
...dropzoneProps,
|
|
@@ -3399,7 +3597,7 @@ function FormFieldVariantControl({
|
|
|
3399
3597
|
const pattern = maskInput.pattern;
|
|
3400
3598
|
const rawStored = field.value == null || field.value === "" ? "" : String(field.value);
|
|
3401
3599
|
const displayValue = formFieldMaskFormatDisplay(pattern, rawStored);
|
|
3402
|
-
return /* @__PURE__ */ (0,
|
|
3600
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "w-full min-w-0", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3403
3601
|
Input,
|
|
3404
3602
|
{
|
|
3405
3603
|
...restInputProps,
|
|
@@ -3436,7 +3634,7 @@ function FormFieldVariantControl({
|
|
|
3436
3634
|
useGrouping
|
|
3437
3635
|
);
|
|
3438
3636
|
const defaultInputMode = allowDecimal ? "decimal" : "numeric";
|
|
3439
|
-
return /* @__PURE__ */ (0,
|
|
3637
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "w-full min-w-0", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3440
3638
|
Input,
|
|
3441
3639
|
{
|
|
3442
3640
|
...restInputProps,
|
|
@@ -3460,7 +3658,7 @@ function FormFieldVariantControl({
|
|
|
3460
3658
|
}
|
|
3461
3659
|
) });
|
|
3462
3660
|
}
|
|
3463
|
-
return /* @__PURE__ */ (0,
|
|
3661
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "w-full min-w-0", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3464
3662
|
Input,
|
|
3465
3663
|
{
|
|
3466
3664
|
...restInputProps,
|
|
@@ -3485,9 +3683,9 @@ function FormFieldVariantControl({
|
|
|
3485
3683
|
}
|
|
3486
3684
|
|
|
3487
3685
|
// source/components/primitive/Heading/heading.tsx
|
|
3488
|
-
var
|
|
3686
|
+
var React31 = __toESM(require("react"), 1);
|
|
3489
3687
|
var import_class_variance_authority11 = require("class-variance-authority");
|
|
3490
|
-
var
|
|
3688
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
3491
3689
|
var headingVariants = (0, import_class_variance_authority11.cva)(
|
|
3492
3690
|
"text-foreground tracking-tight",
|
|
3493
3691
|
{
|
|
@@ -3553,7 +3751,7 @@ var headingVariants = (0, import_class_variance_authority11.cva)(
|
|
|
3553
3751
|
}
|
|
3554
3752
|
}
|
|
3555
3753
|
);
|
|
3556
|
-
var Heading =
|
|
3754
|
+
var Heading = React31.forwardRef(
|
|
3557
3755
|
({
|
|
3558
3756
|
level = 1,
|
|
3559
3757
|
size,
|
|
@@ -3566,7 +3764,7 @@ var Heading = React30.forwardRef(
|
|
|
3566
3764
|
...props
|
|
3567
3765
|
}, ref) => {
|
|
3568
3766
|
const Tag = `h${level}`;
|
|
3569
|
-
return /* @__PURE__ */ (0,
|
|
3767
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3570
3768
|
Tag,
|
|
3571
3769
|
{
|
|
3572
3770
|
ref,
|
|
@@ -3582,10 +3780,10 @@ var Heading = React30.forwardRef(
|
|
|
3582
3780
|
Heading.displayName = "Heading";
|
|
3583
3781
|
|
|
3584
3782
|
// source/components/primitive/InputGroup/input-group.tsx
|
|
3585
|
-
var
|
|
3586
|
-
var
|
|
3587
|
-
var InputGroup =
|
|
3588
|
-
({ className, error: error2, children, ...props }, ref) => /* @__PURE__ */ (0,
|
|
3783
|
+
var React32 = __toESM(require("react"), 1);
|
|
3784
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
3785
|
+
var InputGroup = React32.forwardRef(
|
|
3786
|
+
({ className, error: error2, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3589
3787
|
"div",
|
|
3590
3788
|
{
|
|
3591
3789
|
ref,
|
|
@@ -3603,7 +3801,7 @@ var InputGroup = React31.forwardRef(
|
|
|
3603
3801
|
)
|
|
3604
3802
|
);
|
|
3605
3803
|
InputGroup.displayName = "InputGroup";
|
|
3606
|
-
var InputGroupIcon =
|
|
3804
|
+
var InputGroupIcon = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3607
3805
|
"span",
|
|
3608
3806
|
{
|
|
3609
3807
|
ref,
|
|
@@ -3616,8 +3814,8 @@ var InputGroupIcon = React31.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
3616
3814
|
}
|
|
3617
3815
|
));
|
|
3618
3816
|
InputGroupIcon.displayName = "InputGroupIcon";
|
|
3619
|
-
var InputGroupInput =
|
|
3620
|
-
({ className, type, ...props }, ref) => /* @__PURE__ */ (0,
|
|
3817
|
+
var InputGroupInput = React32.forwardRef(
|
|
3818
|
+
({ className, type, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3621
3819
|
"input",
|
|
3622
3820
|
{
|
|
3623
3821
|
ref,
|
|
@@ -3636,10 +3834,10 @@ InputGroupInput.displayName = "InputGroupInput";
|
|
|
3636
3834
|
var inputGroupSelectTriggerTextAlignClass = "pl-12";
|
|
3637
3835
|
|
|
3638
3836
|
// source/components/primitive/Pagination/pagination.tsx
|
|
3639
|
-
var
|
|
3640
|
-
var
|
|
3641
|
-
var
|
|
3642
|
-
var Pagination = ({ className, ...props }) => /* @__PURE__ */ (0,
|
|
3837
|
+
var React33 = __toESM(require("react"), 1);
|
|
3838
|
+
var import_lucide_react11 = require("lucide-react");
|
|
3839
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
3840
|
+
var Pagination = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3643
3841
|
"nav",
|
|
3644
3842
|
{
|
|
3645
3843
|
role: "navigation",
|
|
@@ -3649,7 +3847,7 @@ var Pagination = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_run
|
|
|
3649
3847
|
}
|
|
3650
3848
|
);
|
|
3651
3849
|
Pagination.displayName = "Pagination";
|
|
3652
|
-
var PaginationContent =
|
|
3850
|
+
var PaginationContent = React33.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3653
3851
|
"ul",
|
|
3654
3852
|
{
|
|
3655
3853
|
ref,
|
|
@@ -3658,14 +3856,14 @@ var PaginationContent = React32.forwardRef(({ className, ...props }, ref) => /*
|
|
|
3658
3856
|
}
|
|
3659
3857
|
));
|
|
3660
3858
|
PaginationContent.displayName = "PaginationContent";
|
|
3661
|
-
var PaginationItem =
|
|
3859
|
+
var PaginationItem = React33.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("li", { ref, className: cn("", className), ...props }));
|
|
3662
3860
|
PaginationItem.displayName = "PaginationItem";
|
|
3663
3861
|
var PaginationLink = ({
|
|
3664
3862
|
className,
|
|
3665
3863
|
isActive,
|
|
3666
3864
|
size = "icon",
|
|
3667
3865
|
...props
|
|
3668
|
-
}) => /* @__PURE__ */ (0,
|
|
3866
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3669
3867
|
"a",
|
|
3670
3868
|
{
|
|
3671
3869
|
"aria-current": isActive ? "page" : void 0,
|
|
@@ -3683,7 +3881,7 @@ PaginationLink.displayName = "PaginationLink";
|
|
|
3683
3881
|
var PaginationPrevious = ({
|
|
3684
3882
|
className,
|
|
3685
3883
|
...props
|
|
3686
|
-
}) => /* @__PURE__ */ (0,
|
|
3884
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
3687
3885
|
PaginationLink,
|
|
3688
3886
|
{
|
|
3689
3887
|
"aria-label": "Go to previous page",
|
|
@@ -3691,8 +3889,8 @@ var PaginationPrevious = ({
|
|
|
3691
3889
|
size: "default",
|
|
3692
3890
|
...props,
|
|
3693
3891
|
children: [
|
|
3694
|
-
/* @__PURE__ */ (0,
|
|
3695
|
-
/* @__PURE__ */ (0,
|
|
3892
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_lucide_react11.ChevronLeft, { className: "h-4 w-4" }),
|
|
3893
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { children: "Previous" })
|
|
3696
3894
|
]
|
|
3697
3895
|
}
|
|
3698
3896
|
);
|
|
@@ -3700,7 +3898,7 @@ PaginationPrevious.displayName = "PaginationPrevious";
|
|
|
3700
3898
|
var PaginationNext = ({
|
|
3701
3899
|
className,
|
|
3702
3900
|
...props
|
|
3703
|
-
}) => /* @__PURE__ */ (0,
|
|
3901
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
3704
3902
|
PaginationLink,
|
|
3705
3903
|
{
|
|
3706
3904
|
"aria-label": "Go to next page",
|
|
@@ -3708,8 +3906,8 @@ var PaginationNext = ({
|
|
|
3708
3906
|
size: "default",
|
|
3709
3907
|
...props,
|
|
3710
3908
|
children: [
|
|
3711
|
-
/* @__PURE__ */ (0,
|
|
3712
|
-
/* @__PURE__ */ (0,
|
|
3909
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { children: "Next" }),
|
|
3910
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_lucide_react11.ChevronRight, { className: "h-4 w-4" })
|
|
3713
3911
|
]
|
|
3714
3912
|
}
|
|
3715
3913
|
);
|
|
@@ -3717,31 +3915,31 @@ PaginationNext.displayName = "PaginationNext";
|
|
|
3717
3915
|
var PaginationEllipsis = ({
|
|
3718
3916
|
className,
|
|
3719
3917
|
...props
|
|
3720
|
-
}) => /* @__PURE__ */ (0,
|
|
3918
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
3721
3919
|
"span",
|
|
3722
3920
|
{
|
|
3723
3921
|
"aria-hidden": true,
|
|
3724
3922
|
className: cn("flex h-9 w-9 items-center justify-center", className),
|
|
3725
3923
|
...props,
|
|
3726
3924
|
children: [
|
|
3727
|
-
/* @__PURE__ */ (0,
|
|
3728
|
-
/* @__PURE__ */ (0,
|
|
3925
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_lucide_react11.MoreHorizontal, { className: "h-4 w-4" }),
|
|
3926
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "sr-only", children: "More pages" })
|
|
3729
3927
|
]
|
|
3730
3928
|
}
|
|
3731
3929
|
);
|
|
3732
3930
|
PaginationEllipsis.displayName = "PaginationEllipsis";
|
|
3733
3931
|
|
|
3734
3932
|
// source/components/primitive/Progress/progress.tsx
|
|
3735
|
-
var
|
|
3933
|
+
var React34 = __toESM(require("react"), 1);
|
|
3736
3934
|
var ProgressPrimitive = __toESM(require("@radix-ui/react-progress"), 1);
|
|
3737
|
-
var
|
|
3935
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
3738
3936
|
var variantStyles = {
|
|
3739
3937
|
default: "bg-primary",
|
|
3740
3938
|
success: "bg-green-500",
|
|
3741
3939
|
warning: "bg-yellow-500",
|
|
3742
3940
|
error: "bg-red-500"
|
|
3743
3941
|
};
|
|
3744
|
-
var Progress =
|
|
3942
|
+
var Progress = React34.forwardRef(
|
|
3745
3943
|
({
|
|
3746
3944
|
className,
|
|
3747
3945
|
value = 0,
|
|
@@ -3755,15 +3953,15 @@ var Progress = React33.forwardRef(
|
|
|
3755
3953
|
const safeMax = max > 0 ? max : 100;
|
|
3756
3954
|
const safeValue = Math.min(Math.max(value, 0), safeMax);
|
|
3757
3955
|
const percentage = Math.min(safeValue / safeMax * 100, 100);
|
|
3758
|
-
return /* @__PURE__ */ (0,
|
|
3759
|
-
(label || showValue) && /* @__PURE__ */ (0,
|
|
3760
|
-
label && /* @__PURE__ */ (0,
|
|
3761
|
-
showValue && !indeterminate && /* @__PURE__ */ (0,
|
|
3956
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex flex-col gap-1", children: [
|
|
3957
|
+
(label || showValue) && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
3958
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "text-sm font-medium", children: label }),
|
|
3959
|
+
showValue && !indeterminate && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("span", { className: "text-xs text-muted-foreground", children: [
|
|
3762
3960
|
Math.round(percentage),
|
|
3763
3961
|
"%"
|
|
3764
3962
|
] })
|
|
3765
3963
|
] }),
|
|
3766
|
-
/* @__PURE__ */ (0,
|
|
3964
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3767
3965
|
ProgressPrimitive.Root,
|
|
3768
3966
|
{
|
|
3769
3967
|
ref,
|
|
@@ -3776,7 +3974,7 @@ var Progress = React33.forwardRef(
|
|
|
3776
3974
|
"aria-valuemax": safeMax,
|
|
3777
3975
|
"aria-valuenow": indeterminate ? void 0 : safeValue,
|
|
3778
3976
|
...props,
|
|
3779
|
-
children: /* @__PURE__ */ (0,
|
|
3977
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3780
3978
|
ProgressPrimitive.Indicator,
|
|
3781
3979
|
{
|
|
3782
3980
|
className: cn(
|
|
@@ -3797,9 +3995,9 @@ var Progress = React33.forwardRef(
|
|
|
3797
3995
|
Progress.displayName = "Progress";
|
|
3798
3996
|
|
|
3799
3997
|
// source/components/primitive/RichHtml/rich-html.tsx
|
|
3800
|
-
var
|
|
3998
|
+
var React35 = __toESM(require("react"), 1);
|
|
3801
3999
|
var import_dompurify = __toESM(require("dompurify"), 1);
|
|
3802
|
-
var
|
|
4000
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
3803
4001
|
var defaultSanitizeConfig = {
|
|
3804
4002
|
USE_PROFILES: { html: true }
|
|
3805
4003
|
};
|
|
@@ -3822,7 +4020,7 @@ var richHtmlChrome = cn(
|
|
|
3822
4020
|
"[&_code]:rounded [&_code]:bg-muted [&_code]:px-1 [&_code]:py-0.5 [&_code]:text-[0.9em]",
|
|
3823
4021
|
"[&_pre]:my-4 [&_pre]:overflow-x-auto [&_pre]:rounded-md [&_pre]:bg-muted [&_pre]:p-3 [&_pre]:font-mono [&_pre]:text-sm"
|
|
3824
4022
|
);
|
|
3825
|
-
var RichHtml =
|
|
4023
|
+
var RichHtml = React35.forwardRef(
|
|
3826
4024
|
({
|
|
3827
4025
|
html,
|
|
3828
4026
|
sanitize = true,
|
|
@@ -3831,7 +4029,7 @@ var RichHtml = React34.forwardRef(
|
|
|
3831
4029
|
suppressHydrationWarning,
|
|
3832
4030
|
...props
|
|
3833
4031
|
}, ref) => {
|
|
3834
|
-
const markup =
|
|
4032
|
+
const markup = React35.useMemo(() => {
|
|
3835
4033
|
if (html === void 0 || html === null || html === "") {
|
|
3836
4034
|
return "";
|
|
3837
4035
|
}
|
|
@@ -3851,7 +4049,7 @@ var RichHtml = React34.forwardRef(
|
|
|
3851
4049
|
if (html === void 0 || html === null || html === "") {
|
|
3852
4050
|
return null;
|
|
3853
4051
|
}
|
|
3854
|
-
return /* @__PURE__ */ (0,
|
|
4052
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3855
4053
|
"div",
|
|
3856
4054
|
{
|
|
3857
4055
|
ref,
|
|
@@ -3866,24 +4064,24 @@ var RichHtml = React34.forwardRef(
|
|
|
3866
4064
|
RichHtml.displayName = "RichHtml";
|
|
3867
4065
|
|
|
3868
4066
|
// source/components/primitive/ScrollArea/scroll-area.tsx
|
|
3869
|
-
var
|
|
4067
|
+
var React36 = __toESM(require("react"), 1);
|
|
3870
4068
|
var ScrollAreaPrimitive = __toESM(require("@radix-ui/react-scroll-area"), 1);
|
|
3871
|
-
var
|
|
3872
|
-
var ScrollArea =
|
|
4069
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
4070
|
+
var ScrollArea = React36.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
3873
4071
|
ScrollAreaPrimitive.Root,
|
|
3874
4072
|
{
|
|
3875
4073
|
ref,
|
|
3876
4074
|
className: cn("relative overflow-hidden", className),
|
|
3877
4075
|
...props,
|
|
3878
4076
|
children: [
|
|
3879
|
-
/* @__PURE__ */ (0,
|
|
3880
|
-
/* @__PURE__ */ (0,
|
|
3881
|
-
/* @__PURE__ */ (0,
|
|
4077
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(ScrollAreaPrimitive.Viewport, { className: "h-full w-full rounded-[inherit]", children }),
|
|
4078
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(ScrollBar, {}),
|
|
4079
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(ScrollAreaPrimitive.Corner, {})
|
|
3882
4080
|
]
|
|
3883
4081
|
}
|
|
3884
4082
|
));
|
|
3885
4083
|
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
|
|
3886
|
-
var ScrollBar =
|
|
4084
|
+
var ScrollBar = React36.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3887
4085
|
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
3888
4086
|
{
|
|
3889
4087
|
ref,
|
|
@@ -3895,16 +4093,16 @@ var ScrollBar = React35.forwardRef(({ className, orientation = "vertical", ...pr
|
|
|
3895
4093
|
className
|
|
3896
4094
|
),
|
|
3897
4095
|
...props,
|
|
3898
|
-
children: /* @__PURE__ */ (0,
|
|
4096
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
|
|
3899
4097
|
}
|
|
3900
4098
|
));
|
|
3901
4099
|
ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
|
|
3902
4100
|
|
|
3903
4101
|
// source/components/primitive/Separator/separator.tsx
|
|
3904
|
-
var
|
|
4102
|
+
var React37 = __toESM(require("react"), 1);
|
|
3905
4103
|
var SeparatorPrimitive = __toESM(require("@radix-ui/react-separator"), 1);
|
|
3906
4104
|
var import_class_variance_authority12 = require("class-variance-authority");
|
|
3907
|
-
var
|
|
4105
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
3908
4106
|
var separatorVariants = (0, import_class_variance_authority12.cva)("shrink-0", {
|
|
3909
4107
|
variants: {
|
|
3910
4108
|
orientation: {
|
|
@@ -3922,7 +4120,7 @@ var separatorVariants = (0, import_class_variance_authority12.cva)("shrink-0", {
|
|
|
3922
4120
|
line: "solid"
|
|
3923
4121
|
}
|
|
3924
4122
|
});
|
|
3925
|
-
var Separator3 =
|
|
4123
|
+
var Separator3 = React37.forwardRef(
|
|
3926
4124
|
({
|
|
3927
4125
|
className,
|
|
3928
4126
|
orientation = "horizontal",
|
|
@@ -3934,13 +4132,13 @@ var Separator3 = React36.forwardRef(
|
|
|
3934
4132
|
}, ref) => {
|
|
3935
4133
|
const line = lineProp ?? variant ?? "solid";
|
|
3936
4134
|
if (label && orientation === "horizontal") {
|
|
3937
|
-
return /* @__PURE__ */ (0,
|
|
4135
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
3938
4136
|
"div",
|
|
3939
4137
|
{
|
|
3940
4138
|
role: "separator",
|
|
3941
4139
|
className: "flex items-center gap-3",
|
|
3942
4140
|
children: [
|
|
3943
|
-
/* @__PURE__ */ (0,
|
|
4141
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3944
4142
|
"div",
|
|
3945
4143
|
{
|
|
3946
4144
|
className: cn(
|
|
@@ -3949,8 +4147,8 @@ var Separator3 = React36.forwardRef(
|
|
|
3949
4147
|
)
|
|
3950
4148
|
}
|
|
3951
4149
|
),
|
|
3952
|
-
/* @__PURE__ */ (0,
|
|
3953
|
-
/* @__PURE__ */ (0,
|
|
4150
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "text-xs text-muted-foreground whitespace-nowrap", children: label }),
|
|
4151
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3954
4152
|
"div",
|
|
3955
4153
|
{
|
|
3956
4154
|
className: cn(
|
|
@@ -3963,7 +4161,7 @@ var Separator3 = React36.forwardRef(
|
|
|
3963
4161
|
}
|
|
3964
4162
|
);
|
|
3965
4163
|
}
|
|
3966
|
-
return /* @__PURE__ */ (0,
|
|
4164
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3967
4165
|
SeparatorPrimitive.Root,
|
|
3968
4166
|
{
|
|
3969
4167
|
ref,
|
|
@@ -3981,16 +4179,16 @@ var Separator3 = React36.forwardRef(
|
|
|
3981
4179
|
Separator3.displayName = "Separator";
|
|
3982
4180
|
|
|
3983
4181
|
// source/components/primitive/Sheet/sheet.tsx
|
|
3984
|
-
var
|
|
4182
|
+
var React38 = __toESM(require("react"), 1);
|
|
3985
4183
|
var SheetPrimitive = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
3986
4184
|
var import_class_variance_authority13 = require("class-variance-authority");
|
|
3987
|
-
var
|
|
3988
|
-
var
|
|
4185
|
+
var import_lucide_react12 = require("lucide-react");
|
|
4186
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
3989
4187
|
var Sheet = SheetPrimitive.Root;
|
|
3990
4188
|
var SheetTrigger = SheetPrimitive.Trigger;
|
|
3991
4189
|
var SheetClose = SheetPrimitive.Close;
|
|
3992
4190
|
var SheetPortal = SheetPrimitive.Portal;
|
|
3993
|
-
var SheetOverlay =
|
|
4191
|
+
var SheetOverlay = React38.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3994
4192
|
SheetPrimitive.Overlay,
|
|
3995
4193
|
{
|
|
3996
4194
|
className: cn(
|
|
@@ -4018,9 +4216,9 @@ var sheetVariants = (0, import_class_variance_authority13.cva)(
|
|
|
4018
4216
|
}
|
|
4019
4217
|
}
|
|
4020
4218
|
);
|
|
4021
|
-
var SheetContent =
|
|
4022
|
-
/* @__PURE__ */ (0,
|
|
4023
|
-
/* @__PURE__ */ (0,
|
|
4219
|
+
var SheetContent = React38.forwardRef(({ side = "right", className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(SheetPortal, { children: [
|
|
4220
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(SheetOverlay, {}),
|
|
4221
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
4024
4222
|
SheetPrimitive.Content,
|
|
4025
4223
|
{
|
|
4026
4224
|
ref,
|
|
@@ -4028,9 +4226,9 @@ var SheetContent = React37.forwardRef(({ side = "right", className, children, ..
|
|
|
4028
4226
|
...props,
|
|
4029
4227
|
children: [
|
|
4030
4228
|
children,
|
|
4031
|
-
/* @__PURE__ */ (0,
|
|
4032
|
-
/* @__PURE__ */ (0,
|
|
4033
|
-
/* @__PURE__ */ (0,
|
|
4229
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(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: [
|
|
4230
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react12.X, { className: "h-4 w-4" }),
|
|
4231
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "sr-only", children: "Close" })
|
|
4034
4232
|
] })
|
|
4035
4233
|
]
|
|
4036
4234
|
}
|
|
@@ -4040,7 +4238,7 @@ SheetContent.displayName = SheetPrimitive.Content.displayName;
|
|
|
4040
4238
|
var SheetHeader = ({
|
|
4041
4239
|
className,
|
|
4042
4240
|
...props
|
|
4043
|
-
}) => /* @__PURE__ */ (0,
|
|
4241
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
4044
4242
|
"div",
|
|
4045
4243
|
{
|
|
4046
4244
|
className: cn(
|
|
@@ -4054,7 +4252,7 @@ SheetHeader.displayName = "SheetHeader";
|
|
|
4054
4252
|
var SheetFooter = ({
|
|
4055
4253
|
className,
|
|
4056
4254
|
...props
|
|
4057
|
-
}) => /* @__PURE__ */ (0,
|
|
4255
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
4058
4256
|
"div",
|
|
4059
4257
|
{
|
|
4060
4258
|
className: cn(
|
|
@@ -4065,7 +4263,7 @@ var SheetFooter = ({
|
|
|
4065
4263
|
}
|
|
4066
4264
|
);
|
|
4067
4265
|
SheetFooter.displayName = "SheetFooter";
|
|
4068
|
-
var SheetTitle =
|
|
4266
|
+
var SheetTitle = React38.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
4069
4267
|
SheetPrimitive.Title,
|
|
4070
4268
|
{
|
|
4071
4269
|
ref,
|
|
@@ -4074,7 +4272,7 @@ var SheetTitle = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
4074
4272
|
}
|
|
4075
4273
|
));
|
|
4076
4274
|
SheetTitle.displayName = SheetPrimitive.Title.displayName;
|
|
4077
|
-
var SheetDescription =
|
|
4275
|
+
var SheetDescription = React38.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
4078
4276
|
SheetPrimitive.Description,
|
|
4079
4277
|
{
|
|
4080
4278
|
ref,
|
|
@@ -4085,19 +4283,19 @@ var SheetDescription = React37.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
4085
4283
|
SheetDescription.displayName = SheetPrimitive.Description.displayName;
|
|
4086
4284
|
|
|
4087
4285
|
// source/components/primitive/Sidebar/sidebar.tsx
|
|
4088
|
-
var
|
|
4286
|
+
var React42 = __toESM(require("react"), 1);
|
|
4089
4287
|
var import_react_slot3 = require("@radix-ui/react-slot");
|
|
4090
4288
|
var import_class_variance_authority15 = require("class-variance-authority");
|
|
4091
|
-
var
|
|
4289
|
+
var import_lucide_react13 = require("lucide-react");
|
|
4092
4290
|
|
|
4093
4291
|
// source/hooks/use-mobile.ts
|
|
4094
|
-
var
|
|
4292
|
+
var React39 = __toESM(require("react"), 1);
|
|
4095
4293
|
var MOBILE_MAX = 768;
|
|
4096
4294
|
function useIsMobile(breakpoint = MOBILE_MAX) {
|
|
4097
|
-
const [isMobile, setIsMobile] =
|
|
4295
|
+
const [isMobile, setIsMobile] = React39.useState(
|
|
4098
4296
|
() => typeof window !== "undefined" ? window.innerWidth < breakpoint : false
|
|
4099
4297
|
);
|
|
4100
|
-
|
|
4298
|
+
React39.useEffect(() => {
|
|
4101
4299
|
const mq = window.matchMedia(`(max-width: ${breakpoint - 1}px)`);
|
|
4102
4300
|
const onChange = () => setIsMobile(mq.matches);
|
|
4103
4301
|
onChange();
|
|
@@ -4108,9 +4306,9 @@ function useIsMobile(breakpoint = MOBILE_MAX) {
|
|
|
4108
4306
|
}
|
|
4109
4307
|
|
|
4110
4308
|
// source/components/primitive/Skeleton/skeleton.tsx
|
|
4111
|
-
var
|
|
4309
|
+
var React40 = __toESM(require("react"), 1);
|
|
4112
4310
|
var import_class_variance_authority14 = require("class-variance-authority");
|
|
4113
|
-
var
|
|
4311
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
4114
4312
|
var skeletonVariants = (0, import_class_variance_authority14.cva)(
|
|
4115
4313
|
"animate-pulse bg-muted",
|
|
4116
4314
|
{
|
|
@@ -4127,9 +4325,9 @@ var skeletonVariants = (0, import_class_variance_authority14.cva)(
|
|
|
4127
4325
|
}
|
|
4128
4326
|
}
|
|
4129
4327
|
);
|
|
4130
|
-
var Skeleton =
|
|
4328
|
+
var Skeleton = React40.forwardRef(
|
|
4131
4329
|
({ className, rounded, ...props }, ref) => {
|
|
4132
|
-
return /* @__PURE__ */ (0,
|
|
4330
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
4133
4331
|
"div",
|
|
4134
4332
|
{
|
|
4135
4333
|
ref,
|
|
@@ -4144,18 +4342,18 @@ var Skeleton = React39.forwardRef(
|
|
|
4144
4342
|
Skeleton.displayName = "Skeleton";
|
|
4145
4343
|
|
|
4146
4344
|
// source/components/primitive/ToolTip/tooltip.tsx
|
|
4147
|
-
var
|
|
4345
|
+
var React41 = __toESM(require("react"), 1);
|
|
4148
4346
|
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"), 1);
|
|
4149
|
-
var
|
|
4347
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
4150
4348
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
4151
4349
|
var Tooltip = ({ ...props }) => {
|
|
4152
|
-
return /* @__PURE__ */ (0,
|
|
4350
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(TooltipPrimitive.Root, { ...props });
|
|
4153
4351
|
};
|
|
4154
4352
|
Tooltip.displayName = "Tooltip";
|
|
4155
4353
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
4156
4354
|
TooltipTrigger.displayName = "TooltipTrigger";
|
|
4157
|
-
var TooltipContent =
|
|
4158
|
-
return /* @__PURE__ */ (0,
|
|
4355
|
+
var TooltipContent = React41.forwardRef(({ className, sideOffset = 4, arrow = false, children, ...props }, ref) => {
|
|
4356
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(TooltipPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
4159
4357
|
TooltipPrimitive.Content,
|
|
4160
4358
|
{
|
|
4161
4359
|
ref,
|
|
@@ -4173,7 +4371,7 @@ var TooltipContent = React40.forwardRef(({ className, sideOffset = 4, arrow = fa
|
|
|
4173
4371
|
...props,
|
|
4174
4372
|
children: [
|
|
4175
4373
|
children,
|
|
4176
|
-
arrow && /* @__PURE__ */ (0,
|
|
4374
|
+
arrow && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(TooltipPrimitive.Arrow, { className: "fill-popover" })
|
|
4177
4375
|
]
|
|
4178
4376
|
}
|
|
4179
4377
|
) });
|
|
@@ -4181,22 +4379,22 @@ var TooltipContent = React40.forwardRef(({ className, sideOffset = 4, arrow = fa
|
|
|
4181
4379
|
TooltipContent.displayName = "TooltipContent";
|
|
4182
4380
|
|
|
4183
4381
|
// source/components/primitive/Sidebar/sidebar.tsx
|
|
4184
|
-
var
|
|
4382
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
4185
4383
|
var SIDEBAR_COOKIE_NAME = "sidebar:state";
|
|
4186
4384
|
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
4187
4385
|
var SIDEBAR_WIDTH = "16rem";
|
|
4188
4386
|
var SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
4189
4387
|
var SIDEBAR_WIDTH_ICON = "4rem";
|
|
4190
4388
|
var SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
4191
|
-
var SidebarContext =
|
|
4389
|
+
var SidebarContext = React42.createContext(null);
|
|
4192
4390
|
function useSidebar() {
|
|
4193
|
-
const context =
|
|
4391
|
+
const context = React42.useContext(SidebarContext);
|
|
4194
4392
|
if (!context) {
|
|
4195
4393
|
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
4196
4394
|
}
|
|
4197
4395
|
return context;
|
|
4198
4396
|
}
|
|
4199
|
-
var SidebarProvider =
|
|
4397
|
+
var SidebarProvider = React42.forwardRef(
|
|
4200
4398
|
({
|
|
4201
4399
|
defaultOpen = true,
|
|
4202
4400
|
open: openProp,
|
|
@@ -4207,15 +4405,15 @@ var SidebarProvider = React41.forwardRef(
|
|
|
4207
4405
|
...props
|
|
4208
4406
|
}, ref) => {
|
|
4209
4407
|
const isMobile = useIsMobile();
|
|
4210
|
-
const [openMobile, setOpenMobile] =
|
|
4211
|
-
const [_open, _setOpen] =
|
|
4408
|
+
const [openMobile, setOpenMobile] = React42.useState(false);
|
|
4409
|
+
const [_open, _setOpen] = React42.useState(() => {
|
|
4212
4410
|
if (typeof window === "undefined") return defaultOpen;
|
|
4213
4411
|
const cookie = document.cookie.split("; ").find((row) => row.startsWith(`${SIDEBAR_COOKIE_NAME}=`));
|
|
4214
4412
|
if (!cookie) return defaultOpen;
|
|
4215
4413
|
return cookie.split("=")[1] === "true";
|
|
4216
4414
|
});
|
|
4217
4415
|
const open = openProp ?? _open;
|
|
4218
|
-
const setOpen =
|
|
4416
|
+
const setOpen = React42.useCallback(
|
|
4219
4417
|
(value) => {
|
|
4220
4418
|
const openState = typeof value === "function" ? value(open) : value;
|
|
4221
4419
|
if (setOpenProp) {
|
|
@@ -4227,21 +4425,21 @@ var SidebarProvider = React41.forwardRef(
|
|
|
4227
4425
|
},
|
|
4228
4426
|
[setOpenProp, open]
|
|
4229
4427
|
);
|
|
4230
|
-
const toggleSidebar =
|
|
4428
|
+
const toggleSidebar = React42.useCallback(() => {
|
|
4231
4429
|
if (isMobile) {
|
|
4232
4430
|
setOpenMobile((v) => !v);
|
|
4233
4431
|
} else {
|
|
4234
4432
|
setOpen((v) => !v);
|
|
4235
4433
|
}
|
|
4236
4434
|
}, [isMobile, setOpen, setOpenMobile]);
|
|
4237
|
-
|
|
4435
|
+
React42.useEffect(() => {
|
|
4238
4436
|
const cookie = document.cookie.split("; ").find((row) => row.startsWith(`${SIDEBAR_COOKIE_NAME}=`));
|
|
4239
4437
|
if (cookie) {
|
|
4240
4438
|
const value = cookie.split("=")[1];
|
|
4241
4439
|
_setOpen(value === "true");
|
|
4242
4440
|
}
|
|
4243
4441
|
}, []);
|
|
4244
|
-
|
|
4442
|
+
React42.useEffect(() => {
|
|
4245
4443
|
const handleKeyDown = (event) => {
|
|
4246
4444
|
if (event.key === "Escape") {
|
|
4247
4445
|
setOpenMobile(false);
|
|
@@ -4255,7 +4453,7 @@ var SidebarProvider = React41.forwardRef(
|
|
|
4255
4453
|
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
4256
4454
|
}, [toggleSidebar]);
|
|
4257
4455
|
const state = open ? "expanded" : "collapsed";
|
|
4258
|
-
const contextValue =
|
|
4456
|
+
const contextValue = React42.useMemo(
|
|
4259
4457
|
() => ({
|
|
4260
4458
|
state,
|
|
4261
4459
|
open,
|
|
@@ -4267,7 +4465,7 @@ var SidebarProvider = React41.forwardRef(
|
|
|
4267
4465
|
}),
|
|
4268
4466
|
[state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]
|
|
4269
4467
|
);
|
|
4270
|
-
return /* @__PURE__ */ (0,
|
|
4468
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4271
4469
|
"div",
|
|
4272
4470
|
{
|
|
4273
4471
|
style: {
|
|
@@ -4287,7 +4485,7 @@ var SidebarProvider = React41.forwardRef(
|
|
|
4287
4485
|
}
|
|
4288
4486
|
);
|
|
4289
4487
|
SidebarProvider.displayName = "SidebarProvider";
|
|
4290
|
-
var Sidebar =
|
|
4488
|
+
var Sidebar = React42.forwardRef(
|
|
4291
4489
|
({
|
|
4292
4490
|
side = "left",
|
|
4293
4491
|
variant = "sidebar",
|
|
@@ -4298,7 +4496,7 @@ var Sidebar = React41.forwardRef(
|
|
|
4298
4496
|
}, ref) => {
|
|
4299
4497
|
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
4300
4498
|
if (collapsible === "none") {
|
|
4301
|
-
return /* @__PURE__ */ (0,
|
|
4499
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4302
4500
|
"div",
|
|
4303
4501
|
{
|
|
4304
4502
|
className: cn(
|
|
@@ -4314,7 +4512,7 @@ var Sidebar = React41.forwardRef(
|
|
|
4314
4512
|
);
|
|
4315
4513
|
}
|
|
4316
4514
|
if (isMobile) {
|
|
4317
|
-
return /* @__PURE__ */ (0,
|
|
4515
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4318
4516
|
SheetContent,
|
|
4319
4517
|
{
|
|
4320
4518
|
"data-sidebar": "sidebar",
|
|
@@ -4324,11 +4522,11 @@ var Sidebar = React41.forwardRef(
|
|
|
4324
4522
|
"--sidebar-width": SIDEBAR_WIDTH_MOBILE
|
|
4325
4523
|
},
|
|
4326
4524
|
side,
|
|
4327
|
-
children: /* @__PURE__ */ (0,
|
|
4525
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "flex h-full w-full flex-col", children })
|
|
4328
4526
|
}
|
|
4329
4527
|
) });
|
|
4330
4528
|
}
|
|
4331
|
-
return /* @__PURE__ */ (0,
|
|
4529
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
4332
4530
|
"div",
|
|
4333
4531
|
{
|
|
4334
4532
|
ref,
|
|
@@ -4338,7 +4536,7 @@ var Sidebar = React41.forwardRef(
|
|
|
4338
4536
|
"data-variant": variant,
|
|
4339
4537
|
"data-side": side,
|
|
4340
4538
|
children: [
|
|
4341
|
-
/* @__PURE__ */ (0,
|
|
4539
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4342
4540
|
"div",
|
|
4343
4541
|
{
|
|
4344
4542
|
className: cn(
|
|
@@ -4349,7 +4547,7 @@ var Sidebar = React41.forwardRef(
|
|
|
4349
4547
|
)
|
|
4350
4548
|
}
|
|
4351
4549
|
),
|
|
4352
|
-
/* @__PURE__ */ (0,
|
|
4550
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4353
4551
|
"div",
|
|
4354
4552
|
{
|
|
4355
4553
|
className: cn(
|
|
@@ -4360,7 +4558,7 @@ var Sidebar = React41.forwardRef(
|
|
|
4360
4558
|
className
|
|
4361
4559
|
),
|
|
4362
4560
|
...props,
|
|
4363
|
-
children: /* @__PURE__ */ (0,
|
|
4561
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4364
4562
|
"div",
|
|
4365
4563
|
{
|
|
4366
4564
|
"data-sidebar": "sidebar",
|
|
@@ -4384,9 +4582,9 @@ var Sidebar = React41.forwardRef(
|
|
|
4384
4582
|
}
|
|
4385
4583
|
);
|
|
4386
4584
|
Sidebar.displayName = "Sidebar";
|
|
4387
|
-
var SidebarTrigger =
|
|
4585
|
+
var SidebarTrigger = React42.forwardRef(({ className, onClick, ...props }, ref) => {
|
|
4388
4586
|
const { toggleSidebar } = useSidebar();
|
|
4389
|
-
return /* @__PURE__ */ (0,
|
|
4587
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
4390
4588
|
Button,
|
|
4391
4589
|
{
|
|
4392
4590
|
ref,
|
|
@@ -4400,16 +4598,16 @@ var SidebarTrigger = React41.forwardRef(({ className, onClick, ...props }, ref)
|
|
|
4400
4598
|
},
|
|
4401
4599
|
...props,
|
|
4402
4600
|
children: [
|
|
4403
|
-
/* @__PURE__ */ (0,
|
|
4404
|
-
/* @__PURE__ */ (0,
|
|
4601
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react13.PanelLeft, {}),
|
|
4602
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "sr-only", children: "Toggle Sidebar" })
|
|
4405
4603
|
]
|
|
4406
4604
|
}
|
|
4407
4605
|
);
|
|
4408
4606
|
});
|
|
4409
4607
|
SidebarTrigger.displayName = "SidebarTrigger";
|
|
4410
|
-
var SidebarRail =
|
|
4608
|
+
var SidebarRail = React42.forwardRef(({ className, ...props }, ref) => {
|
|
4411
4609
|
const { toggleSidebar } = useSidebar();
|
|
4412
|
-
return /* @__PURE__ */ (0,
|
|
4610
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4413
4611
|
"button",
|
|
4414
4612
|
{
|
|
4415
4613
|
ref,
|
|
@@ -4432,8 +4630,8 @@ var SidebarRail = React41.forwardRef(({ className, ...props }, ref) => {
|
|
|
4432
4630
|
);
|
|
4433
4631
|
});
|
|
4434
4632
|
SidebarRail.displayName = "SidebarRail";
|
|
4435
|
-
var SidebarInset =
|
|
4436
|
-
return /* @__PURE__ */ (0,
|
|
4633
|
+
var SidebarInset = React42.forwardRef(({ className, ...props }, ref) => {
|
|
4634
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4437
4635
|
"main",
|
|
4438
4636
|
{
|
|
4439
4637
|
ref,
|
|
@@ -4447,8 +4645,8 @@ var SidebarInset = React41.forwardRef(({ className, ...props }, ref) => {
|
|
|
4447
4645
|
);
|
|
4448
4646
|
});
|
|
4449
4647
|
SidebarInset.displayName = "SidebarInset";
|
|
4450
|
-
var SidebarInput =
|
|
4451
|
-
return /* @__PURE__ */ (0,
|
|
4648
|
+
var SidebarInput = React42.forwardRef(({ className, ...props }, ref) => {
|
|
4649
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4452
4650
|
Input,
|
|
4453
4651
|
{
|
|
4454
4652
|
ref,
|
|
@@ -4462,8 +4660,8 @@ var SidebarInput = React41.forwardRef(({ className, ...props }, ref) => {
|
|
|
4462
4660
|
);
|
|
4463
4661
|
});
|
|
4464
4662
|
SidebarInput.displayName = "SidebarInput";
|
|
4465
|
-
var SidebarHeader =
|
|
4466
|
-
return /* @__PURE__ */ (0,
|
|
4663
|
+
var SidebarHeader = React42.forwardRef(({ className, ...props }, ref) => {
|
|
4664
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4467
4665
|
"div",
|
|
4468
4666
|
{
|
|
4469
4667
|
ref,
|
|
@@ -4474,8 +4672,8 @@ var SidebarHeader = React41.forwardRef(({ className, ...props }, ref) => {
|
|
|
4474
4672
|
);
|
|
4475
4673
|
});
|
|
4476
4674
|
SidebarHeader.displayName = "SidebarHeader";
|
|
4477
|
-
var SidebarFooter =
|
|
4478
|
-
return /* @__PURE__ */ (0,
|
|
4675
|
+
var SidebarFooter = React42.forwardRef(({ className, ...props }, ref) => {
|
|
4676
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4479
4677
|
"div",
|
|
4480
4678
|
{
|
|
4481
4679
|
ref,
|
|
@@ -4486,8 +4684,8 @@ var SidebarFooter = React41.forwardRef(({ className, ...props }, ref) => {
|
|
|
4486
4684
|
);
|
|
4487
4685
|
});
|
|
4488
4686
|
SidebarFooter.displayName = "SidebarFooter";
|
|
4489
|
-
var SidebarSeparator =
|
|
4490
|
-
return /* @__PURE__ */ (0,
|
|
4687
|
+
var SidebarSeparator = React42.forwardRef(({ className, ...props }, ref) => {
|
|
4688
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4491
4689
|
Separator3,
|
|
4492
4690
|
{
|
|
4493
4691
|
ref,
|
|
@@ -4498,8 +4696,8 @@ var SidebarSeparator = React41.forwardRef(({ className, ...props }, ref) => {
|
|
|
4498
4696
|
);
|
|
4499
4697
|
});
|
|
4500
4698
|
SidebarSeparator.displayName = "SidebarSeparator";
|
|
4501
|
-
var SidebarContent =
|
|
4502
|
-
return /* @__PURE__ */ (0,
|
|
4699
|
+
var SidebarContent = React42.forwardRef(({ className, ...props }, ref) => {
|
|
4700
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4503
4701
|
"div",
|
|
4504
4702
|
{
|
|
4505
4703
|
ref,
|
|
@@ -4513,8 +4711,8 @@ var SidebarContent = React41.forwardRef(({ className, ...props }, ref) => {
|
|
|
4513
4711
|
);
|
|
4514
4712
|
});
|
|
4515
4713
|
SidebarContent.displayName = "SidebarContent";
|
|
4516
|
-
var SidebarGroup =
|
|
4517
|
-
return /* @__PURE__ */ (0,
|
|
4714
|
+
var SidebarGroup = React42.forwardRef(({ className, ...props }, ref) => {
|
|
4715
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4518
4716
|
"div",
|
|
4519
4717
|
{
|
|
4520
4718
|
ref,
|
|
@@ -4525,10 +4723,10 @@ var SidebarGroup = React41.forwardRef(({ className, ...props }, ref) => {
|
|
|
4525
4723
|
);
|
|
4526
4724
|
});
|
|
4527
4725
|
SidebarGroup.displayName = "SidebarGroup";
|
|
4528
|
-
var SidebarGroupLabel =
|
|
4726
|
+
var SidebarGroupLabel = React42.forwardRef(({ className, asChild = false, showLabel = true, ...props }, ref) => {
|
|
4529
4727
|
if (!showLabel) return null;
|
|
4530
4728
|
const Comp = asChild ? import_react_slot3.Slot : "div";
|
|
4531
|
-
return /* @__PURE__ */ (0,
|
|
4729
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4532
4730
|
Comp,
|
|
4533
4731
|
{
|
|
4534
4732
|
ref,
|
|
@@ -4543,9 +4741,9 @@ var SidebarGroupLabel = React41.forwardRef(({ className, asChild = false, showLa
|
|
|
4543
4741
|
);
|
|
4544
4742
|
});
|
|
4545
4743
|
SidebarGroupLabel.displayName = "SidebarGroupLabel";
|
|
4546
|
-
var SidebarGroupAction =
|
|
4744
|
+
var SidebarGroupAction = React42.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
4547
4745
|
const Comp = asChild ? import_react_slot3.Slot : "button";
|
|
4548
|
-
return /* @__PURE__ */ (0,
|
|
4746
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4549
4747
|
Comp,
|
|
4550
4748
|
{
|
|
4551
4749
|
ref,
|
|
@@ -4562,7 +4760,7 @@ var SidebarGroupAction = React41.forwardRef(({ className, asChild = false, ...pr
|
|
|
4562
4760
|
);
|
|
4563
4761
|
});
|
|
4564
4762
|
SidebarGroupAction.displayName = "SidebarGroupAction";
|
|
4565
|
-
var SidebarGroupContent =
|
|
4763
|
+
var SidebarGroupContent = React42.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4566
4764
|
"div",
|
|
4567
4765
|
{
|
|
4568
4766
|
ref,
|
|
@@ -4572,7 +4770,7 @@ var SidebarGroupContent = React41.forwardRef(({ className, ...props }, ref) => /
|
|
|
4572
4770
|
}
|
|
4573
4771
|
));
|
|
4574
4772
|
SidebarGroupContent.displayName = "SidebarGroupContent";
|
|
4575
|
-
var SidebarMenu =
|
|
4773
|
+
var SidebarMenu = React42.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4576
4774
|
"ul",
|
|
4577
4775
|
{
|
|
4578
4776
|
ref,
|
|
@@ -4582,7 +4780,7 @@ var SidebarMenu = React41.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
4582
4780
|
}
|
|
4583
4781
|
));
|
|
4584
4782
|
SidebarMenu.displayName = "SidebarMenu";
|
|
4585
|
-
var SidebarMenuItem =
|
|
4783
|
+
var SidebarMenuItem = React42.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4586
4784
|
"li",
|
|
4587
4785
|
{
|
|
4588
4786
|
ref,
|
|
@@ -4612,7 +4810,7 @@ var sidebarMenuButtonVariants = (0, import_class_variance_authority15.cva)(
|
|
|
4612
4810
|
}
|
|
4613
4811
|
}
|
|
4614
4812
|
);
|
|
4615
|
-
var SidebarMenuButton =
|
|
4813
|
+
var SidebarMenuButton = React42.forwardRef(
|
|
4616
4814
|
({
|
|
4617
4815
|
asChild = false,
|
|
4618
4816
|
isActive = false,
|
|
@@ -4624,7 +4822,7 @@ var SidebarMenuButton = React41.forwardRef(
|
|
|
4624
4822
|
}, ref) => {
|
|
4625
4823
|
const Comp = asChild ? import_react_slot3.Slot : "button";
|
|
4626
4824
|
const { isMobile, state } = useSidebar();
|
|
4627
|
-
const button = /* @__PURE__ */ (0,
|
|
4825
|
+
const button = /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4628
4826
|
Comp,
|
|
4629
4827
|
{
|
|
4630
4828
|
ref,
|
|
@@ -4643,9 +4841,9 @@ var SidebarMenuButton = React41.forwardRef(
|
|
|
4643
4841
|
children: tooltip
|
|
4644
4842
|
};
|
|
4645
4843
|
}
|
|
4646
|
-
return /* @__PURE__ */ (0,
|
|
4647
|
-
/* @__PURE__ */ (0,
|
|
4648
|
-
/* @__PURE__ */ (0,
|
|
4844
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(Tooltip, { children: [
|
|
4845
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(TooltipTrigger, { asChild: true, children: button }),
|
|
4846
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4649
4847
|
TooltipContent,
|
|
4650
4848
|
{
|
|
4651
4849
|
side: "right",
|
|
@@ -4658,9 +4856,9 @@ var SidebarMenuButton = React41.forwardRef(
|
|
|
4658
4856
|
}
|
|
4659
4857
|
);
|
|
4660
4858
|
SidebarMenuButton.displayName = "SidebarMenuButton";
|
|
4661
|
-
var SidebarMenuAction =
|
|
4859
|
+
var SidebarMenuAction = React42.forwardRef(({ className, asChild = false, showOnHover = false, ...props }, ref) => {
|
|
4662
4860
|
const Comp = asChild ? import_react_slot3.Slot : "button";
|
|
4663
|
-
return /* @__PURE__ */ (0,
|
|
4861
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4664
4862
|
Comp,
|
|
4665
4863
|
{
|
|
4666
4864
|
ref,
|
|
@@ -4681,7 +4879,7 @@ var SidebarMenuAction = React41.forwardRef(({ className, asChild = false, showOn
|
|
|
4681
4879
|
);
|
|
4682
4880
|
});
|
|
4683
4881
|
SidebarMenuAction.displayName = "SidebarMenuAction";
|
|
4684
|
-
var SidebarMenuBadge =
|
|
4882
|
+
var SidebarMenuBadge = React42.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4685
4883
|
"div",
|
|
4686
4884
|
{
|
|
4687
4885
|
ref,
|
|
@@ -4699,11 +4897,11 @@ var SidebarMenuBadge = React41.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
4699
4897
|
}
|
|
4700
4898
|
));
|
|
4701
4899
|
SidebarMenuBadge.displayName = "SidebarMenuBadge";
|
|
4702
|
-
var SidebarMenuSkeleton =
|
|
4703
|
-
const width =
|
|
4900
|
+
var SidebarMenuSkeleton = React42.forwardRef(({ className, showIcon = false, ...props }, ref) => {
|
|
4901
|
+
const width = React42.useMemo(() => {
|
|
4704
4902
|
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
4705
4903
|
}, []);
|
|
4706
|
-
return /* @__PURE__ */ (0,
|
|
4904
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
4707
4905
|
"div",
|
|
4708
4906
|
{
|
|
4709
4907
|
ref,
|
|
@@ -4711,14 +4909,14 @@ var SidebarMenuSkeleton = React41.forwardRef(({ className, showIcon = false, ...
|
|
|
4711
4909
|
className: cn("rounded-md h-8 flex gap-2 px-2 items-center", className),
|
|
4712
4910
|
...props,
|
|
4713
4911
|
children: [
|
|
4714
|
-
showIcon && /* @__PURE__ */ (0,
|
|
4912
|
+
showIcon && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4715
4913
|
Skeleton,
|
|
4716
4914
|
{
|
|
4717
4915
|
className: "size-4 rounded-md",
|
|
4718
4916
|
"data-sidebar": "menu-skeleton-icon"
|
|
4719
4917
|
}
|
|
4720
4918
|
),
|
|
4721
|
-
/* @__PURE__ */ (0,
|
|
4919
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4722
4920
|
Skeleton,
|
|
4723
4921
|
{
|
|
4724
4922
|
className: "h-4 flex-1 max-w-[--skeleton-width]",
|
|
@@ -4733,7 +4931,7 @@ var SidebarMenuSkeleton = React41.forwardRef(({ className, showIcon = false, ...
|
|
|
4733
4931
|
);
|
|
4734
4932
|
});
|
|
4735
4933
|
SidebarMenuSkeleton.displayName = "SidebarMenuSkeleton";
|
|
4736
|
-
var SidebarMenuSub =
|
|
4934
|
+
var SidebarMenuSub = React42.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4737
4935
|
"ul",
|
|
4738
4936
|
{
|
|
4739
4937
|
ref,
|
|
@@ -4747,11 +4945,11 @@ var SidebarMenuSub = React41.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
4747
4945
|
}
|
|
4748
4946
|
));
|
|
4749
4947
|
SidebarMenuSub.displayName = "SidebarMenuSub";
|
|
4750
|
-
var SidebarMenuSubItem =
|
|
4948
|
+
var SidebarMenuSubItem = React42.forwardRef(({ ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("li", { ref, ...props }));
|
|
4751
4949
|
SidebarMenuSubItem.displayName = "SidebarMenuSubItem";
|
|
4752
|
-
var SidebarMenuSubButton =
|
|
4950
|
+
var SidebarMenuSubButton = React42.forwardRef(({ asChild = false, size = "md", isActive, className, ...props }, ref) => {
|
|
4753
4951
|
const Comp = asChild ? import_react_slot3.Slot : "a";
|
|
4754
|
-
return /* @__PURE__ */ (0,
|
|
4952
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4755
4953
|
Comp,
|
|
4756
4954
|
{
|
|
4757
4955
|
ref,
|
|
@@ -4773,10 +4971,10 @@ var SidebarMenuSubButton = React41.forwardRef(({ asChild = false, size = "md", i
|
|
|
4773
4971
|
SidebarMenuSubButton.displayName = "SidebarMenuSubButton";
|
|
4774
4972
|
|
|
4775
4973
|
// source/components/primitive/Slider/slider.tsx
|
|
4776
|
-
var
|
|
4974
|
+
var React43 = __toESM(require("react"), 1);
|
|
4777
4975
|
var SliderPrimitive = __toESM(require("@radix-ui/react-slider"), 1);
|
|
4778
|
-
var
|
|
4779
|
-
var Slider =
|
|
4976
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
4977
|
+
var Slider = React43.forwardRef(
|
|
4780
4978
|
({
|
|
4781
4979
|
className,
|
|
4782
4980
|
label,
|
|
@@ -4787,16 +4985,16 @@ var Slider = React42.forwardRef(
|
|
|
4787
4985
|
value,
|
|
4788
4986
|
...props
|
|
4789
4987
|
}, ref) => {
|
|
4790
|
-
const [internalValue, setInternalValue] =
|
|
4988
|
+
const [internalValue, setInternalValue] = React43.useState(
|
|
4791
4989
|
value || defaultValue || [0]
|
|
4792
4990
|
);
|
|
4793
4991
|
const currentValue = value ?? internalValue;
|
|
4794
|
-
return /* @__PURE__ */ (0,
|
|
4795
|
-
(label || showValue) && /* @__PURE__ */ (0,
|
|
4796
|
-
label && /* @__PURE__ */ (0,
|
|
4797
|
-
showValue && /* @__PURE__ */ (0,
|
|
4992
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex w-full flex-col gap-2", children: [
|
|
4993
|
+
(label || showValue) && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
4994
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("label", { className: "text-sm font-medium", children: label }),
|
|
4995
|
+
showValue && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "text-sm text-muted-foreground", children: currentValue?.[0] })
|
|
4798
4996
|
] }),
|
|
4799
|
-
/* @__PURE__ */ (0,
|
|
4997
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
4800
4998
|
SliderPrimitive.Root,
|
|
4801
4999
|
{
|
|
4802
5000
|
ref,
|
|
@@ -4812,8 +5010,8 @@ var Slider = React42.forwardRef(
|
|
|
4812
5010
|
),
|
|
4813
5011
|
...props,
|
|
4814
5012
|
children: [
|
|
4815
|
-
/* @__PURE__ */ (0,
|
|
4816
|
-
/* @__PURE__ */ (0,
|
|
5013
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(SliderPrimitive.Track, { className: "relative h-2 w-full grow overflow-hidden rounded-full bg-secondary", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(SliderPrimitive.Range, { className: "absolute h-full bg-primary" }) }),
|
|
5014
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
4817
5015
|
SliderPrimitive.Thumb,
|
|
4818
5016
|
{
|
|
4819
5017
|
className: cn(
|
|
@@ -4827,9 +5025,9 @@ var Slider = React42.forwardRef(
|
|
|
4827
5025
|
]
|
|
4828
5026
|
}
|
|
4829
5027
|
),
|
|
4830
|
-
(minLabel || maxLabel) && /* @__PURE__ */ (0,
|
|
4831
|
-
/* @__PURE__ */ (0,
|
|
4832
|
-
/* @__PURE__ */ (0,
|
|
5028
|
+
(minLabel || maxLabel) && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex justify-between text-xs text-muted-foreground", children: [
|
|
5029
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { children: minLabel }),
|
|
5030
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { children: maxLabel })
|
|
4833
5031
|
] })
|
|
4834
5032
|
] });
|
|
4835
5033
|
}
|
|
@@ -4837,9 +5035,9 @@ var Slider = React42.forwardRef(
|
|
|
4837
5035
|
Slider.displayName = "Slider";
|
|
4838
5036
|
|
|
4839
5037
|
// source/components/primitive/Table/table.tsx
|
|
4840
|
-
var
|
|
4841
|
-
var
|
|
4842
|
-
var Table =
|
|
5038
|
+
var React44 = __toESM(require("react"), 1);
|
|
5039
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
5040
|
+
var Table = React44.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
4843
5041
|
"table",
|
|
4844
5042
|
{
|
|
4845
5043
|
ref,
|
|
@@ -4848,9 +5046,9 @@ var Table = React43.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
4848
5046
|
}
|
|
4849
5047
|
) }));
|
|
4850
5048
|
Table.displayName = "Table";
|
|
4851
|
-
var TableHeader =
|
|
5049
|
+
var TableHeader = React44.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("thead", { ref, className: cn("[&_tr]:border-b", className), ...props }));
|
|
4852
5050
|
TableHeader.displayName = "TableHeader";
|
|
4853
|
-
var TableBody =
|
|
5051
|
+
var TableBody = React44.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
4854
5052
|
"tbody",
|
|
4855
5053
|
{
|
|
4856
5054
|
ref,
|
|
@@ -4859,7 +5057,7 @@ var TableBody = React43.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
4859
5057
|
}
|
|
4860
5058
|
));
|
|
4861
5059
|
TableBody.displayName = "TableBody";
|
|
4862
|
-
var TableFooter =
|
|
5060
|
+
var TableFooter = React44.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
4863
5061
|
"tfoot",
|
|
4864
5062
|
{
|
|
4865
5063
|
ref,
|
|
@@ -4871,7 +5069,7 @@ var TableFooter = React43.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
4871
5069
|
}
|
|
4872
5070
|
));
|
|
4873
5071
|
TableFooter.displayName = "TableFooter";
|
|
4874
|
-
var TableRow =
|
|
5072
|
+
var TableRow = React44.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
4875
5073
|
"tr",
|
|
4876
5074
|
{
|
|
4877
5075
|
ref,
|
|
@@ -4883,7 +5081,7 @@ var TableRow = React43.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
4883
5081
|
}
|
|
4884
5082
|
));
|
|
4885
5083
|
TableRow.displayName = "TableRow";
|
|
4886
|
-
var TableHead =
|
|
5084
|
+
var TableHead = React44.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
4887
5085
|
"th",
|
|
4888
5086
|
{
|
|
4889
5087
|
ref,
|
|
@@ -4895,7 +5093,7 @@ var TableHead = React43.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
4895
5093
|
}
|
|
4896
5094
|
));
|
|
4897
5095
|
TableHead.displayName = "TableHead";
|
|
4898
|
-
var TableCell =
|
|
5096
|
+
var TableCell = React44.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
4899
5097
|
"td",
|
|
4900
5098
|
{
|
|
4901
5099
|
ref,
|
|
@@ -4904,7 +5102,7 @@ var TableCell = React43.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
4904
5102
|
}
|
|
4905
5103
|
));
|
|
4906
5104
|
TableCell.displayName = "TableCell";
|
|
4907
|
-
var TableCaption =
|
|
5105
|
+
var TableCaption = React44.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
4908
5106
|
"caption",
|
|
4909
5107
|
{
|
|
4910
5108
|
ref,
|
|
@@ -4915,11 +5113,11 @@ var TableCaption = React43.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
4915
5113
|
TableCaption.displayName = "TableCaption";
|
|
4916
5114
|
|
|
4917
5115
|
// source/components/primitive/Tabs/tabs.tsx
|
|
4918
|
-
var
|
|
5116
|
+
var React45 = __toESM(require("react"), 1);
|
|
4919
5117
|
var TabsPrimitive = __toESM(require("@radix-ui/react-tabs"), 1);
|
|
4920
|
-
var
|
|
5118
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
4921
5119
|
var Tabs = TabsPrimitive.Root;
|
|
4922
|
-
var TabsList =
|
|
5120
|
+
var TabsList = React45.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
4923
5121
|
TabsPrimitive.List,
|
|
4924
5122
|
{
|
|
4925
5123
|
ref,
|
|
@@ -4931,7 +5129,7 @@ var TabsList = React44.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
4931
5129
|
}
|
|
4932
5130
|
));
|
|
4933
5131
|
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
4934
|
-
var TabsTrigger =
|
|
5132
|
+
var TabsTrigger = React45.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
4935
5133
|
TabsPrimitive.Trigger,
|
|
4936
5134
|
{
|
|
4937
5135
|
ref,
|
|
@@ -4943,7 +5141,7 @@ var TabsTrigger = React44.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
4943
5141
|
}
|
|
4944
5142
|
));
|
|
4945
5143
|
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
4946
|
-
var TabsContent =
|
|
5144
|
+
var TabsContent = React45.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
4947
5145
|
TabsPrimitive.Content,
|
|
4948
5146
|
{
|
|
4949
5147
|
ref,
|
|
@@ -4957,12 +5155,12 @@ var TabsContent = React44.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
4957
5155
|
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
4958
5156
|
|
|
4959
5157
|
// source/components/primitive/Toast/toast.tsx
|
|
4960
|
-
var
|
|
5158
|
+
var React46 = __toESM(require("react"), 1);
|
|
4961
5159
|
var ToastPrimitive = __toESM(require("@radix-ui/react-toast"), 1);
|
|
4962
5160
|
var import_class_variance_authority16 = require("class-variance-authority");
|
|
4963
|
-
var
|
|
5161
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
4964
5162
|
var ToastProvider = ToastPrimitive.Provider;
|
|
4965
|
-
var ToastViewport =
|
|
5163
|
+
var ToastViewport = React46.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
4966
5164
|
ToastPrimitive.Viewport,
|
|
4967
5165
|
{
|
|
4968
5166
|
ref,
|
|
@@ -5021,7 +5219,7 @@ var toastVariants = (0, import_class_variance_authority16.cva)(
|
|
|
5021
5219
|
}
|
|
5022
5220
|
}
|
|
5023
5221
|
);
|
|
5024
|
-
var Toast =
|
|
5222
|
+
var Toast = React46.forwardRef(({ className, variant, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
5025
5223
|
ToastPrimitive.Root,
|
|
5026
5224
|
{
|
|
5027
5225
|
ref,
|
|
@@ -5030,7 +5228,7 @@ var Toast = React45.forwardRef(({ className, variant, ...props }, ref) => /* @__
|
|
|
5030
5228
|
}
|
|
5031
5229
|
));
|
|
5032
5230
|
Toast.displayName = ToastPrimitive.Root.displayName;
|
|
5033
|
-
var ToastAction =
|
|
5231
|
+
var ToastAction = React46.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
5034
5232
|
ToastPrimitive.Action,
|
|
5035
5233
|
{
|
|
5036
5234
|
ref,
|
|
@@ -5045,7 +5243,7 @@ var ToastAction = React45.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
5045
5243
|
}
|
|
5046
5244
|
));
|
|
5047
5245
|
ToastAction.displayName = ToastPrimitive.Action.displayName;
|
|
5048
|
-
var ToastClose =
|
|
5246
|
+
var ToastClose = React46.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
5049
5247
|
ToastPrimitive.Close,
|
|
5050
5248
|
{
|
|
5051
5249
|
ref,
|
|
@@ -5059,7 +5257,7 @@ var ToastClose = React45.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
5059
5257
|
}
|
|
5060
5258
|
));
|
|
5061
5259
|
ToastClose.displayName = ToastPrimitive.Close.displayName;
|
|
5062
|
-
var ToastTitle =
|
|
5260
|
+
var ToastTitle = React46.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
5063
5261
|
ToastPrimitive.Title,
|
|
5064
5262
|
{
|
|
5065
5263
|
ref,
|
|
@@ -5068,7 +5266,7 @@ var ToastTitle = React45.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
5068
5266
|
}
|
|
5069
5267
|
));
|
|
5070
5268
|
ToastTitle.displayName = ToastPrimitive.Title.displayName;
|
|
5071
|
-
var ToastDescription =
|
|
5269
|
+
var ToastDescription = React46.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
5072
5270
|
ToastPrimitive.Description,
|
|
5073
5271
|
{
|
|
5074
5272
|
ref,
|
|
@@ -5121,11 +5319,11 @@ function getToastSnapshot() {
|
|
|
5121
5319
|
}
|
|
5122
5320
|
|
|
5123
5321
|
// source/components/primitive/Toast/toaster.tsx
|
|
5124
|
-
var
|
|
5125
|
-
var
|
|
5322
|
+
var React47 = __toESM(require("react"), 1);
|
|
5323
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
5126
5324
|
function useToast() {
|
|
5127
|
-
const [toasts, setToasts] =
|
|
5128
|
-
|
|
5325
|
+
const [toasts, setToasts] = React47.useState(() => getToastSnapshot());
|
|
5326
|
+
React47.useEffect(() => subscribeToasts((s) => setToasts([...s])), []);
|
|
5129
5327
|
return {
|
|
5130
5328
|
toasts,
|
|
5131
5329
|
toast,
|
|
@@ -5140,7 +5338,7 @@ function Toaster({
|
|
|
5140
5338
|
...providerProps
|
|
5141
5339
|
}) {
|
|
5142
5340
|
const { toasts } = useToast();
|
|
5143
|
-
return /* @__PURE__ */ (0,
|
|
5341
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
5144
5342
|
ToastProvider,
|
|
5145
5343
|
{
|
|
5146
5344
|
duration,
|
|
@@ -5158,7 +5356,7 @@ function Toaster({
|
|
|
5158
5356
|
action
|
|
5159
5357
|
}) => {
|
|
5160
5358
|
const v = variant ?? "default";
|
|
5161
|
-
return /* @__PURE__ */ (0,
|
|
5359
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
5162
5360
|
Toast,
|
|
5163
5361
|
{
|
|
5164
5362
|
variant,
|
|
@@ -5167,11 +5365,11 @@ function Toaster({
|
|
|
5167
5365
|
if (!open) dismissToast(id);
|
|
5168
5366
|
},
|
|
5169
5367
|
children: [
|
|
5170
|
-
/* @__PURE__ */ (0,
|
|
5171
|
-
title ? /* @__PURE__ */ (0,
|
|
5172
|
-
description ? /* @__PURE__ */ (0,
|
|
5368
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "grid flex-1 gap-1 pl-1", children: [
|
|
5369
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ToastTitle, { children: title }) : null,
|
|
5370
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ToastDescription, { children: description }) : null
|
|
5173
5371
|
] }),
|
|
5174
|
-
action ? /* @__PURE__ */ (0,
|
|
5372
|
+
action ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
5175
5373
|
ToastAction,
|
|
5176
5374
|
{
|
|
5177
5375
|
altText: action.altText,
|
|
@@ -5182,7 +5380,7 @@ function Toaster({
|
|
|
5182
5380
|
children: action.label
|
|
5183
5381
|
}
|
|
5184
5382
|
) : null,
|
|
5185
|
-
/* @__PURE__ */ (0,
|
|
5383
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ToastClose, { "aria-label": "Dismiss notification", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
5186
5384
|
"span",
|
|
5187
5385
|
{
|
|
5188
5386
|
"aria-hidden": true,
|
|
@@ -5196,7 +5394,7 @@ function Toaster({
|
|
|
5196
5394
|
);
|
|
5197
5395
|
}
|
|
5198
5396
|
),
|
|
5199
|
-
/* @__PURE__ */ (0,
|
|
5397
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ToastViewport, { className: cn(viewportClassName) })
|
|
5200
5398
|
]
|
|
5201
5399
|
}
|
|
5202
5400
|
);
|
|
@@ -5624,6 +5822,7 @@ var typography = {
|
|
|
5624
5822
|
RichTextEditor,
|
|
5625
5823
|
ScrollArea,
|
|
5626
5824
|
ScrollBar,
|
|
5825
|
+
SearchableSelect,
|
|
5627
5826
|
Select,
|
|
5628
5827
|
SelectContent,
|
|
5629
5828
|
SelectGroup,
|