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