@2urgseui/core 0.1.3 → 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 +491 -291
- package/dist/index.d.cts +39 -1
- package/dist/index.d.ts +39 -1
- package/dist/index.js +488 -289
- 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,
|
|
@@ -3399,7 +3598,7 @@ function FormFieldVariantControl({
|
|
|
3399
3598
|
const pattern = maskInput.pattern;
|
|
3400
3599
|
const rawStored = field.value == null || field.value === "" ? "" : String(field.value);
|
|
3401
3600
|
const displayValue = formFieldMaskFormatDisplay(pattern, rawStored);
|
|
3402
|
-
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)(
|
|
3403
3602
|
Input,
|
|
3404
3603
|
{
|
|
3405
3604
|
...restInputProps,
|
|
@@ -3436,7 +3635,7 @@ function FormFieldVariantControl({
|
|
|
3436
3635
|
useGrouping
|
|
3437
3636
|
);
|
|
3438
3637
|
const defaultInputMode = allowDecimal ? "decimal" : "numeric";
|
|
3439
|
-
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)(
|
|
3440
3639
|
Input,
|
|
3441
3640
|
{
|
|
3442
3641
|
...restInputProps,
|
|
@@ -3460,7 +3659,7 @@ function FormFieldVariantControl({
|
|
|
3460
3659
|
}
|
|
3461
3660
|
) });
|
|
3462
3661
|
}
|
|
3463
|
-
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)(
|
|
3464
3663
|
Input,
|
|
3465
3664
|
{
|
|
3466
3665
|
...restInputProps,
|
|
@@ -3485,9 +3684,9 @@ function FormFieldVariantControl({
|
|
|
3485
3684
|
}
|
|
3486
3685
|
|
|
3487
3686
|
// source/components/primitive/Heading/heading.tsx
|
|
3488
|
-
var
|
|
3687
|
+
var React31 = __toESM(require("react"), 1);
|
|
3489
3688
|
var import_class_variance_authority11 = require("class-variance-authority");
|
|
3490
|
-
var
|
|
3689
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
3491
3690
|
var headingVariants = (0, import_class_variance_authority11.cva)(
|
|
3492
3691
|
"text-foreground tracking-tight",
|
|
3493
3692
|
{
|
|
@@ -3553,7 +3752,7 @@ var headingVariants = (0, import_class_variance_authority11.cva)(
|
|
|
3553
3752
|
}
|
|
3554
3753
|
}
|
|
3555
3754
|
);
|
|
3556
|
-
var Heading =
|
|
3755
|
+
var Heading = React31.forwardRef(
|
|
3557
3756
|
({
|
|
3558
3757
|
level = 1,
|
|
3559
3758
|
size,
|
|
@@ -3566,7 +3765,7 @@ var Heading = React30.forwardRef(
|
|
|
3566
3765
|
...props
|
|
3567
3766
|
}, ref) => {
|
|
3568
3767
|
const Tag = `h${level}`;
|
|
3569
|
-
return /* @__PURE__ */ (0,
|
|
3768
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3570
3769
|
Tag,
|
|
3571
3770
|
{
|
|
3572
3771
|
ref,
|
|
@@ -3582,10 +3781,10 @@ var Heading = React30.forwardRef(
|
|
|
3582
3781
|
Heading.displayName = "Heading";
|
|
3583
3782
|
|
|
3584
3783
|
// source/components/primitive/InputGroup/input-group.tsx
|
|
3585
|
-
var
|
|
3586
|
-
var
|
|
3587
|
-
var InputGroup =
|
|
3588
|
-
({ 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)(
|
|
3589
3788
|
"div",
|
|
3590
3789
|
{
|
|
3591
3790
|
ref,
|
|
@@ -3603,7 +3802,7 @@ var InputGroup = React31.forwardRef(
|
|
|
3603
3802
|
)
|
|
3604
3803
|
);
|
|
3605
3804
|
InputGroup.displayName = "InputGroup";
|
|
3606
|
-
var InputGroupIcon =
|
|
3805
|
+
var InputGroupIcon = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3607
3806
|
"span",
|
|
3608
3807
|
{
|
|
3609
3808
|
ref,
|
|
@@ -3616,8 +3815,8 @@ var InputGroupIcon = React31.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
3616
3815
|
}
|
|
3617
3816
|
));
|
|
3618
3817
|
InputGroupIcon.displayName = "InputGroupIcon";
|
|
3619
|
-
var InputGroupInput =
|
|
3620
|
-
({ className, type, ...props }, ref) => /* @__PURE__ */ (0,
|
|
3818
|
+
var InputGroupInput = React32.forwardRef(
|
|
3819
|
+
({ className, type, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3621
3820
|
"input",
|
|
3622
3821
|
{
|
|
3623
3822
|
ref,
|
|
@@ -3636,10 +3835,10 @@ InputGroupInput.displayName = "InputGroupInput";
|
|
|
3636
3835
|
var inputGroupSelectTriggerTextAlignClass = "pl-12";
|
|
3637
3836
|
|
|
3638
3837
|
// source/components/primitive/Pagination/pagination.tsx
|
|
3639
|
-
var
|
|
3640
|
-
var
|
|
3641
|
-
var
|
|
3642
|
-
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)(
|
|
3643
3842
|
"nav",
|
|
3644
3843
|
{
|
|
3645
3844
|
role: "navigation",
|
|
@@ -3649,7 +3848,7 @@ var Pagination = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_run
|
|
|
3649
3848
|
}
|
|
3650
3849
|
);
|
|
3651
3850
|
Pagination.displayName = "Pagination";
|
|
3652
|
-
var PaginationContent =
|
|
3851
|
+
var PaginationContent = React33.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3653
3852
|
"ul",
|
|
3654
3853
|
{
|
|
3655
3854
|
ref,
|
|
@@ -3658,14 +3857,14 @@ var PaginationContent = React32.forwardRef(({ className, ...props }, ref) => /*
|
|
|
3658
3857
|
}
|
|
3659
3858
|
));
|
|
3660
3859
|
PaginationContent.displayName = "PaginationContent";
|
|
3661
|
-
var PaginationItem =
|
|
3860
|
+
var PaginationItem = React33.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("li", { ref, className: cn("", className), ...props }));
|
|
3662
3861
|
PaginationItem.displayName = "PaginationItem";
|
|
3663
3862
|
var PaginationLink = ({
|
|
3664
3863
|
className,
|
|
3665
3864
|
isActive,
|
|
3666
3865
|
size = "icon",
|
|
3667
3866
|
...props
|
|
3668
|
-
}) => /* @__PURE__ */ (0,
|
|
3867
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3669
3868
|
"a",
|
|
3670
3869
|
{
|
|
3671
3870
|
"aria-current": isActive ? "page" : void 0,
|
|
@@ -3683,7 +3882,7 @@ PaginationLink.displayName = "PaginationLink";
|
|
|
3683
3882
|
var PaginationPrevious = ({
|
|
3684
3883
|
className,
|
|
3685
3884
|
...props
|
|
3686
|
-
}) => /* @__PURE__ */ (0,
|
|
3885
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
3687
3886
|
PaginationLink,
|
|
3688
3887
|
{
|
|
3689
3888
|
"aria-label": "Go to previous page",
|
|
@@ -3691,8 +3890,8 @@ var PaginationPrevious = ({
|
|
|
3691
3890
|
size: "default",
|
|
3692
3891
|
...props,
|
|
3693
3892
|
children: [
|
|
3694
|
-
/* @__PURE__ */ (0,
|
|
3695
|
-
/* @__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" })
|
|
3696
3895
|
]
|
|
3697
3896
|
}
|
|
3698
3897
|
);
|
|
@@ -3700,7 +3899,7 @@ PaginationPrevious.displayName = "PaginationPrevious";
|
|
|
3700
3899
|
var PaginationNext = ({
|
|
3701
3900
|
className,
|
|
3702
3901
|
...props
|
|
3703
|
-
}) => /* @__PURE__ */ (0,
|
|
3902
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
3704
3903
|
PaginationLink,
|
|
3705
3904
|
{
|
|
3706
3905
|
"aria-label": "Go to next page",
|
|
@@ -3708,8 +3907,8 @@ var PaginationNext = ({
|
|
|
3708
3907
|
size: "default",
|
|
3709
3908
|
...props,
|
|
3710
3909
|
children: [
|
|
3711
|
-
/* @__PURE__ */ (0,
|
|
3712
|
-
/* @__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" })
|
|
3713
3912
|
]
|
|
3714
3913
|
}
|
|
3715
3914
|
);
|
|
@@ -3717,31 +3916,31 @@ PaginationNext.displayName = "PaginationNext";
|
|
|
3717
3916
|
var PaginationEllipsis = ({
|
|
3718
3917
|
className,
|
|
3719
3918
|
...props
|
|
3720
|
-
}) => /* @__PURE__ */ (0,
|
|
3919
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
3721
3920
|
"span",
|
|
3722
3921
|
{
|
|
3723
3922
|
"aria-hidden": true,
|
|
3724
3923
|
className: cn("flex h-9 w-9 items-center justify-center", className),
|
|
3725
3924
|
...props,
|
|
3726
3925
|
children: [
|
|
3727
|
-
/* @__PURE__ */ (0,
|
|
3728
|
-
/* @__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" })
|
|
3729
3928
|
]
|
|
3730
3929
|
}
|
|
3731
3930
|
);
|
|
3732
3931
|
PaginationEllipsis.displayName = "PaginationEllipsis";
|
|
3733
3932
|
|
|
3734
3933
|
// source/components/primitive/Progress/progress.tsx
|
|
3735
|
-
var
|
|
3934
|
+
var React34 = __toESM(require("react"), 1);
|
|
3736
3935
|
var ProgressPrimitive = __toESM(require("@radix-ui/react-progress"), 1);
|
|
3737
|
-
var
|
|
3936
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
3738
3937
|
var variantStyles = {
|
|
3739
3938
|
default: "bg-primary",
|
|
3740
3939
|
success: "bg-green-500",
|
|
3741
3940
|
warning: "bg-yellow-500",
|
|
3742
3941
|
error: "bg-red-500"
|
|
3743
3942
|
};
|
|
3744
|
-
var Progress =
|
|
3943
|
+
var Progress = React34.forwardRef(
|
|
3745
3944
|
({
|
|
3746
3945
|
className,
|
|
3747
3946
|
value = 0,
|
|
@@ -3755,15 +3954,15 @@ var Progress = React33.forwardRef(
|
|
|
3755
3954
|
const safeMax = max > 0 ? max : 100;
|
|
3756
3955
|
const safeValue = Math.min(Math.max(value, 0), safeMax);
|
|
3757
3956
|
const percentage = Math.min(safeValue / safeMax * 100, 100);
|
|
3758
|
-
return /* @__PURE__ */ (0,
|
|
3759
|
-
(label || showValue) && /* @__PURE__ */ (0,
|
|
3760
|
-
label && /* @__PURE__ */ (0,
|
|
3761
|
-
showValue && !indeterminate && /* @__PURE__ */ (0,
|
|
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: [
|
|
3762
3961
|
Math.round(percentage),
|
|
3763
3962
|
"%"
|
|
3764
3963
|
] })
|
|
3765
3964
|
] }),
|
|
3766
|
-
/* @__PURE__ */ (0,
|
|
3965
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3767
3966
|
ProgressPrimitive.Root,
|
|
3768
3967
|
{
|
|
3769
3968
|
ref,
|
|
@@ -3776,7 +3975,7 @@ var Progress = React33.forwardRef(
|
|
|
3776
3975
|
"aria-valuemax": safeMax,
|
|
3777
3976
|
"aria-valuenow": indeterminate ? void 0 : safeValue,
|
|
3778
3977
|
...props,
|
|
3779
|
-
children: /* @__PURE__ */ (0,
|
|
3978
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3780
3979
|
ProgressPrimitive.Indicator,
|
|
3781
3980
|
{
|
|
3782
3981
|
className: cn(
|
|
@@ -3797,9 +3996,9 @@ var Progress = React33.forwardRef(
|
|
|
3797
3996
|
Progress.displayName = "Progress";
|
|
3798
3997
|
|
|
3799
3998
|
// source/components/primitive/RichHtml/rich-html.tsx
|
|
3800
|
-
var
|
|
3999
|
+
var React35 = __toESM(require("react"), 1);
|
|
3801
4000
|
var import_dompurify = __toESM(require("dompurify"), 1);
|
|
3802
|
-
var
|
|
4001
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
3803
4002
|
var defaultSanitizeConfig = {
|
|
3804
4003
|
USE_PROFILES: { html: true }
|
|
3805
4004
|
};
|
|
@@ -3822,7 +4021,7 @@ var richHtmlChrome = cn(
|
|
|
3822
4021
|
"[&_code]:rounded [&_code]:bg-muted [&_code]:px-1 [&_code]:py-0.5 [&_code]:text-[0.9em]",
|
|
3823
4022
|
"[&_pre]:my-4 [&_pre]:overflow-x-auto [&_pre]:rounded-md [&_pre]:bg-muted [&_pre]:p-3 [&_pre]:font-mono [&_pre]:text-sm"
|
|
3824
4023
|
);
|
|
3825
|
-
var RichHtml =
|
|
4024
|
+
var RichHtml = React35.forwardRef(
|
|
3826
4025
|
({
|
|
3827
4026
|
html,
|
|
3828
4027
|
sanitize = true,
|
|
@@ -3831,7 +4030,7 @@ var RichHtml = React34.forwardRef(
|
|
|
3831
4030
|
suppressHydrationWarning,
|
|
3832
4031
|
...props
|
|
3833
4032
|
}, ref) => {
|
|
3834
|
-
const markup =
|
|
4033
|
+
const markup = React35.useMemo(() => {
|
|
3835
4034
|
if (html === void 0 || html === null || html === "") {
|
|
3836
4035
|
return "";
|
|
3837
4036
|
}
|
|
@@ -3851,7 +4050,7 @@ var RichHtml = React34.forwardRef(
|
|
|
3851
4050
|
if (html === void 0 || html === null || html === "") {
|
|
3852
4051
|
return null;
|
|
3853
4052
|
}
|
|
3854
|
-
return /* @__PURE__ */ (0,
|
|
4053
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3855
4054
|
"div",
|
|
3856
4055
|
{
|
|
3857
4056
|
ref,
|
|
@@ -3866,24 +4065,24 @@ var RichHtml = React34.forwardRef(
|
|
|
3866
4065
|
RichHtml.displayName = "RichHtml";
|
|
3867
4066
|
|
|
3868
4067
|
// source/components/primitive/ScrollArea/scroll-area.tsx
|
|
3869
|
-
var
|
|
4068
|
+
var React36 = __toESM(require("react"), 1);
|
|
3870
4069
|
var ScrollAreaPrimitive = __toESM(require("@radix-ui/react-scroll-area"), 1);
|
|
3871
|
-
var
|
|
3872
|
-
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)(
|
|
3873
4072
|
ScrollAreaPrimitive.Root,
|
|
3874
4073
|
{
|
|
3875
4074
|
ref,
|
|
3876
4075
|
className: cn("relative overflow-hidden", className),
|
|
3877
4076
|
...props,
|
|
3878
4077
|
children: [
|
|
3879
|
-
/* @__PURE__ */ (0,
|
|
3880
|
-
/* @__PURE__ */ (0,
|
|
3881
|
-
/* @__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, {})
|
|
3882
4081
|
]
|
|
3883
4082
|
}
|
|
3884
4083
|
));
|
|
3885
4084
|
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
|
|
3886
|
-
var ScrollBar =
|
|
4085
|
+
var ScrollBar = React36.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3887
4086
|
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
3888
4087
|
{
|
|
3889
4088
|
ref,
|
|
@@ -3895,16 +4094,16 @@ var ScrollBar = React35.forwardRef(({ className, orientation = "vertical", ...pr
|
|
|
3895
4094
|
className
|
|
3896
4095
|
),
|
|
3897
4096
|
...props,
|
|
3898
|
-
children: /* @__PURE__ */ (0,
|
|
4097
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
|
|
3899
4098
|
}
|
|
3900
4099
|
));
|
|
3901
4100
|
ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
|
|
3902
4101
|
|
|
3903
4102
|
// source/components/primitive/Separator/separator.tsx
|
|
3904
|
-
var
|
|
4103
|
+
var React37 = __toESM(require("react"), 1);
|
|
3905
4104
|
var SeparatorPrimitive = __toESM(require("@radix-ui/react-separator"), 1);
|
|
3906
4105
|
var import_class_variance_authority12 = require("class-variance-authority");
|
|
3907
|
-
var
|
|
4106
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
3908
4107
|
var separatorVariants = (0, import_class_variance_authority12.cva)("shrink-0", {
|
|
3909
4108
|
variants: {
|
|
3910
4109
|
orientation: {
|
|
@@ -3922,7 +4121,7 @@ var separatorVariants = (0, import_class_variance_authority12.cva)("shrink-0", {
|
|
|
3922
4121
|
line: "solid"
|
|
3923
4122
|
}
|
|
3924
4123
|
});
|
|
3925
|
-
var Separator3 =
|
|
4124
|
+
var Separator3 = React37.forwardRef(
|
|
3926
4125
|
({
|
|
3927
4126
|
className,
|
|
3928
4127
|
orientation = "horizontal",
|
|
@@ -3934,13 +4133,13 @@ var Separator3 = React36.forwardRef(
|
|
|
3934
4133
|
}, ref) => {
|
|
3935
4134
|
const line = lineProp ?? variant ?? "solid";
|
|
3936
4135
|
if (label && orientation === "horizontal") {
|
|
3937
|
-
return /* @__PURE__ */ (0,
|
|
4136
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
3938
4137
|
"div",
|
|
3939
4138
|
{
|
|
3940
4139
|
role: "separator",
|
|
3941
4140
|
className: "flex items-center gap-3",
|
|
3942
4141
|
children: [
|
|
3943
|
-
/* @__PURE__ */ (0,
|
|
4142
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3944
4143
|
"div",
|
|
3945
4144
|
{
|
|
3946
4145
|
className: cn(
|
|
@@ -3949,8 +4148,8 @@ var Separator3 = React36.forwardRef(
|
|
|
3949
4148
|
)
|
|
3950
4149
|
}
|
|
3951
4150
|
),
|
|
3952
|
-
/* @__PURE__ */ (0,
|
|
3953
|
-
/* @__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)(
|
|
3954
4153
|
"div",
|
|
3955
4154
|
{
|
|
3956
4155
|
className: cn(
|
|
@@ -3963,7 +4162,7 @@ var Separator3 = React36.forwardRef(
|
|
|
3963
4162
|
}
|
|
3964
4163
|
);
|
|
3965
4164
|
}
|
|
3966
|
-
return /* @__PURE__ */ (0,
|
|
4165
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3967
4166
|
SeparatorPrimitive.Root,
|
|
3968
4167
|
{
|
|
3969
4168
|
ref,
|
|
@@ -3981,16 +4180,16 @@ var Separator3 = React36.forwardRef(
|
|
|
3981
4180
|
Separator3.displayName = "Separator";
|
|
3982
4181
|
|
|
3983
4182
|
// source/components/primitive/Sheet/sheet.tsx
|
|
3984
|
-
var
|
|
4183
|
+
var React38 = __toESM(require("react"), 1);
|
|
3985
4184
|
var SheetPrimitive = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
3986
4185
|
var import_class_variance_authority13 = require("class-variance-authority");
|
|
3987
|
-
var
|
|
3988
|
-
var
|
|
4186
|
+
var import_lucide_react12 = require("lucide-react");
|
|
4187
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
3989
4188
|
var Sheet = SheetPrimitive.Root;
|
|
3990
4189
|
var SheetTrigger = SheetPrimitive.Trigger;
|
|
3991
4190
|
var SheetClose = SheetPrimitive.Close;
|
|
3992
4191
|
var SheetPortal = SheetPrimitive.Portal;
|
|
3993
|
-
var SheetOverlay =
|
|
4192
|
+
var SheetOverlay = React38.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3994
4193
|
SheetPrimitive.Overlay,
|
|
3995
4194
|
{
|
|
3996
4195
|
className: cn(
|
|
@@ -4018,9 +4217,9 @@ var sheetVariants = (0, import_class_variance_authority13.cva)(
|
|
|
4018
4217
|
}
|
|
4019
4218
|
}
|
|
4020
4219
|
);
|
|
4021
|
-
var SheetContent =
|
|
4022
|
-
/* @__PURE__ */ (0,
|
|
4023
|
-
/* @__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)(
|
|
4024
4223
|
SheetPrimitive.Content,
|
|
4025
4224
|
{
|
|
4026
4225
|
ref,
|
|
@@ -4028,9 +4227,9 @@ var SheetContent = React37.forwardRef(({ side = "right", className, children, ..
|
|
|
4028
4227
|
...props,
|
|
4029
4228
|
children: [
|
|
4030
4229
|
children,
|
|
4031
|
-
/* @__PURE__ */ (0,
|
|
4032
|
-
/* @__PURE__ */ (0,
|
|
4033
|
-
/* @__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" })
|
|
4034
4233
|
] })
|
|
4035
4234
|
]
|
|
4036
4235
|
}
|
|
@@ -4040,7 +4239,7 @@ SheetContent.displayName = SheetPrimitive.Content.displayName;
|
|
|
4040
4239
|
var SheetHeader = ({
|
|
4041
4240
|
className,
|
|
4042
4241
|
...props
|
|
4043
|
-
}) => /* @__PURE__ */ (0,
|
|
4242
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
4044
4243
|
"div",
|
|
4045
4244
|
{
|
|
4046
4245
|
className: cn(
|
|
@@ -4054,7 +4253,7 @@ SheetHeader.displayName = "SheetHeader";
|
|
|
4054
4253
|
var SheetFooter = ({
|
|
4055
4254
|
className,
|
|
4056
4255
|
...props
|
|
4057
|
-
}) => /* @__PURE__ */ (0,
|
|
4256
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
4058
4257
|
"div",
|
|
4059
4258
|
{
|
|
4060
4259
|
className: cn(
|
|
@@ -4065,7 +4264,7 @@ var SheetFooter = ({
|
|
|
4065
4264
|
}
|
|
4066
4265
|
);
|
|
4067
4266
|
SheetFooter.displayName = "SheetFooter";
|
|
4068
|
-
var SheetTitle =
|
|
4267
|
+
var SheetTitle = React38.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
4069
4268
|
SheetPrimitive.Title,
|
|
4070
4269
|
{
|
|
4071
4270
|
ref,
|
|
@@ -4074,7 +4273,7 @@ var SheetTitle = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
4074
4273
|
}
|
|
4075
4274
|
));
|
|
4076
4275
|
SheetTitle.displayName = SheetPrimitive.Title.displayName;
|
|
4077
|
-
var SheetDescription =
|
|
4276
|
+
var SheetDescription = React38.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
4078
4277
|
SheetPrimitive.Description,
|
|
4079
4278
|
{
|
|
4080
4279
|
ref,
|
|
@@ -4085,19 +4284,19 @@ var SheetDescription = React37.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
4085
4284
|
SheetDescription.displayName = SheetPrimitive.Description.displayName;
|
|
4086
4285
|
|
|
4087
4286
|
// source/components/primitive/Sidebar/sidebar.tsx
|
|
4088
|
-
var
|
|
4287
|
+
var React42 = __toESM(require("react"), 1);
|
|
4089
4288
|
var import_react_slot3 = require("@radix-ui/react-slot");
|
|
4090
4289
|
var import_class_variance_authority15 = require("class-variance-authority");
|
|
4091
|
-
var
|
|
4290
|
+
var import_lucide_react13 = require("lucide-react");
|
|
4092
4291
|
|
|
4093
4292
|
// source/hooks/use-mobile.ts
|
|
4094
|
-
var
|
|
4293
|
+
var React39 = __toESM(require("react"), 1);
|
|
4095
4294
|
var MOBILE_MAX = 768;
|
|
4096
4295
|
function useIsMobile(breakpoint = MOBILE_MAX) {
|
|
4097
|
-
const [isMobile, setIsMobile] =
|
|
4296
|
+
const [isMobile, setIsMobile] = React39.useState(
|
|
4098
4297
|
() => typeof window !== "undefined" ? window.innerWidth < breakpoint : false
|
|
4099
4298
|
);
|
|
4100
|
-
|
|
4299
|
+
React39.useEffect(() => {
|
|
4101
4300
|
const mq = window.matchMedia(`(max-width: ${breakpoint - 1}px)`);
|
|
4102
4301
|
const onChange = () => setIsMobile(mq.matches);
|
|
4103
4302
|
onChange();
|
|
@@ -4108,9 +4307,9 @@ function useIsMobile(breakpoint = MOBILE_MAX) {
|
|
|
4108
4307
|
}
|
|
4109
4308
|
|
|
4110
4309
|
// source/components/primitive/Skeleton/skeleton.tsx
|
|
4111
|
-
var
|
|
4310
|
+
var React40 = __toESM(require("react"), 1);
|
|
4112
4311
|
var import_class_variance_authority14 = require("class-variance-authority");
|
|
4113
|
-
var
|
|
4312
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
4114
4313
|
var skeletonVariants = (0, import_class_variance_authority14.cva)(
|
|
4115
4314
|
"animate-pulse bg-muted",
|
|
4116
4315
|
{
|
|
@@ -4127,9 +4326,9 @@ var skeletonVariants = (0, import_class_variance_authority14.cva)(
|
|
|
4127
4326
|
}
|
|
4128
4327
|
}
|
|
4129
4328
|
);
|
|
4130
|
-
var Skeleton =
|
|
4329
|
+
var Skeleton = React40.forwardRef(
|
|
4131
4330
|
({ className, rounded, ...props }, ref) => {
|
|
4132
|
-
return /* @__PURE__ */ (0,
|
|
4331
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
4133
4332
|
"div",
|
|
4134
4333
|
{
|
|
4135
4334
|
ref,
|
|
@@ -4144,18 +4343,18 @@ var Skeleton = React39.forwardRef(
|
|
|
4144
4343
|
Skeleton.displayName = "Skeleton";
|
|
4145
4344
|
|
|
4146
4345
|
// source/components/primitive/ToolTip/tooltip.tsx
|
|
4147
|
-
var
|
|
4346
|
+
var React41 = __toESM(require("react"), 1);
|
|
4148
4347
|
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"), 1);
|
|
4149
|
-
var
|
|
4348
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
4150
4349
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
4151
4350
|
var Tooltip = ({ ...props }) => {
|
|
4152
|
-
return /* @__PURE__ */ (0,
|
|
4351
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(TooltipPrimitive.Root, { ...props });
|
|
4153
4352
|
};
|
|
4154
4353
|
Tooltip.displayName = "Tooltip";
|
|
4155
4354
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
4156
4355
|
TooltipTrigger.displayName = "TooltipTrigger";
|
|
4157
|
-
var TooltipContent =
|
|
4158
|
-
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)(
|
|
4159
4358
|
TooltipPrimitive.Content,
|
|
4160
4359
|
{
|
|
4161
4360
|
ref,
|
|
@@ -4173,7 +4372,7 @@ var TooltipContent = React40.forwardRef(({ className, sideOffset = 4, arrow = fa
|
|
|
4173
4372
|
...props,
|
|
4174
4373
|
children: [
|
|
4175
4374
|
children,
|
|
4176
|
-
arrow && /* @__PURE__ */ (0,
|
|
4375
|
+
arrow && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(TooltipPrimitive.Arrow, { className: "fill-popover" })
|
|
4177
4376
|
]
|
|
4178
4377
|
}
|
|
4179
4378
|
) });
|
|
@@ -4181,22 +4380,22 @@ var TooltipContent = React40.forwardRef(({ className, sideOffset = 4, arrow = fa
|
|
|
4181
4380
|
TooltipContent.displayName = "TooltipContent";
|
|
4182
4381
|
|
|
4183
4382
|
// source/components/primitive/Sidebar/sidebar.tsx
|
|
4184
|
-
var
|
|
4383
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
4185
4384
|
var SIDEBAR_COOKIE_NAME = "sidebar:state";
|
|
4186
4385
|
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
4187
4386
|
var SIDEBAR_WIDTH = "16rem";
|
|
4188
4387
|
var SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
4189
4388
|
var SIDEBAR_WIDTH_ICON = "4rem";
|
|
4190
4389
|
var SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
4191
|
-
var SidebarContext =
|
|
4390
|
+
var SidebarContext = React42.createContext(null);
|
|
4192
4391
|
function useSidebar() {
|
|
4193
|
-
const context =
|
|
4392
|
+
const context = React42.useContext(SidebarContext);
|
|
4194
4393
|
if (!context) {
|
|
4195
4394
|
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
4196
4395
|
}
|
|
4197
4396
|
return context;
|
|
4198
4397
|
}
|
|
4199
|
-
var SidebarProvider =
|
|
4398
|
+
var SidebarProvider = React42.forwardRef(
|
|
4200
4399
|
({
|
|
4201
4400
|
defaultOpen = true,
|
|
4202
4401
|
open: openProp,
|
|
@@ -4207,15 +4406,15 @@ var SidebarProvider = React41.forwardRef(
|
|
|
4207
4406
|
...props
|
|
4208
4407
|
}, ref) => {
|
|
4209
4408
|
const isMobile = useIsMobile();
|
|
4210
|
-
const [openMobile, setOpenMobile] =
|
|
4211
|
-
const [_open, _setOpen] =
|
|
4409
|
+
const [openMobile, setOpenMobile] = React42.useState(false);
|
|
4410
|
+
const [_open, _setOpen] = React42.useState(() => {
|
|
4212
4411
|
if (typeof window === "undefined") return defaultOpen;
|
|
4213
4412
|
const cookie = document.cookie.split("; ").find((row) => row.startsWith(`${SIDEBAR_COOKIE_NAME}=`));
|
|
4214
4413
|
if (!cookie) return defaultOpen;
|
|
4215
4414
|
return cookie.split("=")[1] === "true";
|
|
4216
4415
|
});
|
|
4217
4416
|
const open = openProp ?? _open;
|
|
4218
|
-
const setOpen =
|
|
4417
|
+
const setOpen = React42.useCallback(
|
|
4219
4418
|
(value) => {
|
|
4220
4419
|
const openState = typeof value === "function" ? value(open) : value;
|
|
4221
4420
|
if (setOpenProp) {
|
|
@@ -4227,21 +4426,21 @@ var SidebarProvider = React41.forwardRef(
|
|
|
4227
4426
|
},
|
|
4228
4427
|
[setOpenProp, open]
|
|
4229
4428
|
);
|
|
4230
|
-
const toggleSidebar =
|
|
4429
|
+
const toggleSidebar = React42.useCallback(() => {
|
|
4231
4430
|
if (isMobile) {
|
|
4232
4431
|
setOpenMobile((v) => !v);
|
|
4233
4432
|
} else {
|
|
4234
4433
|
setOpen((v) => !v);
|
|
4235
4434
|
}
|
|
4236
4435
|
}, [isMobile, setOpen, setOpenMobile]);
|
|
4237
|
-
|
|
4436
|
+
React42.useEffect(() => {
|
|
4238
4437
|
const cookie = document.cookie.split("; ").find((row) => row.startsWith(`${SIDEBAR_COOKIE_NAME}=`));
|
|
4239
4438
|
if (cookie) {
|
|
4240
4439
|
const value = cookie.split("=")[1];
|
|
4241
4440
|
_setOpen(value === "true");
|
|
4242
4441
|
}
|
|
4243
4442
|
}, []);
|
|
4244
|
-
|
|
4443
|
+
React42.useEffect(() => {
|
|
4245
4444
|
const handleKeyDown = (event) => {
|
|
4246
4445
|
if (event.key === "Escape") {
|
|
4247
4446
|
setOpenMobile(false);
|
|
@@ -4255,7 +4454,7 @@ var SidebarProvider = React41.forwardRef(
|
|
|
4255
4454
|
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
4256
4455
|
}, [toggleSidebar]);
|
|
4257
4456
|
const state = open ? "expanded" : "collapsed";
|
|
4258
|
-
const contextValue =
|
|
4457
|
+
const contextValue = React42.useMemo(
|
|
4259
4458
|
() => ({
|
|
4260
4459
|
state,
|
|
4261
4460
|
open,
|
|
@@ -4267,7 +4466,7 @@ var SidebarProvider = React41.forwardRef(
|
|
|
4267
4466
|
}),
|
|
4268
4467
|
[state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]
|
|
4269
4468
|
);
|
|
4270
|
-
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)(
|
|
4271
4470
|
"div",
|
|
4272
4471
|
{
|
|
4273
4472
|
style: {
|
|
@@ -4287,7 +4486,7 @@ var SidebarProvider = React41.forwardRef(
|
|
|
4287
4486
|
}
|
|
4288
4487
|
);
|
|
4289
4488
|
SidebarProvider.displayName = "SidebarProvider";
|
|
4290
|
-
var Sidebar =
|
|
4489
|
+
var Sidebar = React42.forwardRef(
|
|
4291
4490
|
({
|
|
4292
4491
|
side = "left",
|
|
4293
4492
|
variant = "sidebar",
|
|
@@ -4298,7 +4497,7 @@ var Sidebar = React41.forwardRef(
|
|
|
4298
4497
|
}, ref) => {
|
|
4299
4498
|
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
4300
4499
|
if (collapsible === "none") {
|
|
4301
|
-
return /* @__PURE__ */ (0,
|
|
4500
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4302
4501
|
"div",
|
|
4303
4502
|
{
|
|
4304
4503
|
className: cn(
|
|
@@ -4314,7 +4513,7 @@ var Sidebar = React41.forwardRef(
|
|
|
4314
4513
|
);
|
|
4315
4514
|
}
|
|
4316
4515
|
if (isMobile) {
|
|
4317
|
-
return /* @__PURE__ */ (0,
|
|
4516
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4318
4517
|
SheetContent,
|
|
4319
4518
|
{
|
|
4320
4519
|
"data-sidebar": "sidebar",
|
|
@@ -4324,11 +4523,11 @@ var Sidebar = React41.forwardRef(
|
|
|
4324
4523
|
"--sidebar-width": SIDEBAR_WIDTH_MOBILE
|
|
4325
4524
|
},
|
|
4326
4525
|
side,
|
|
4327
|
-
children: /* @__PURE__ */ (0,
|
|
4526
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "flex h-full w-full flex-col", children })
|
|
4328
4527
|
}
|
|
4329
4528
|
) });
|
|
4330
4529
|
}
|
|
4331
|
-
return /* @__PURE__ */ (0,
|
|
4530
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
4332
4531
|
"div",
|
|
4333
4532
|
{
|
|
4334
4533
|
ref,
|
|
@@ -4338,7 +4537,7 @@ var Sidebar = React41.forwardRef(
|
|
|
4338
4537
|
"data-variant": variant,
|
|
4339
4538
|
"data-side": side,
|
|
4340
4539
|
children: [
|
|
4341
|
-
/* @__PURE__ */ (0,
|
|
4540
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4342
4541
|
"div",
|
|
4343
4542
|
{
|
|
4344
4543
|
className: cn(
|
|
@@ -4349,7 +4548,7 @@ var Sidebar = React41.forwardRef(
|
|
|
4349
4548
|
)
|
|
4350
4549
|
}
|
|
4351
4550
|
),
|
|
4352
|
-
/* @__PURE__ */ (0,
|
|
4551
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4353
4552
|
"div",
|
|
4354
4553
|
{
|
|
4355
4554
|
className: cn(
|
|
@@ -4360,7 +4559,7 @@ var Sidebar = React41.forwardRef(
|
|
|
4360
4559
|
className
|
|
4361
4560
|
),
|
|
4362
4561
|
...props,
|
|
4363
|
-
children: /* @__PURE__ */ (0,
|
|
4562
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4364
4563
|
"div",
|
|
4365
4564
|
{
|
|
4366
4565
|
"data-sidebar": "sidebar",
|
|
@@ -4384,9 +4583,9 @@ var Sidebar = React41.forwardRef(
|
|
|
4384
4583
|
}
|
|
4385
4584
|
);
|
|
4386
4585
|
Sidebar.displayName = "Sidebar";
|
|
4387
|
-
var SidebarTrigger =
|
|
4586
|
+
var SidebarTrigger = React42.forwardRef(({ className, onClick, ...props }, ref) => {
|
|
4388
4587
|
const { toggleSidebar } = useSidebar();
|
|
4389
|
-
return /* @__PURE__ */ (0,
|
|
4588
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
4390
4589
|
Button,
|
|
4391
4590
|
{
|
|
4392
4591
|
ref,
|
|
@@ -4400,16 +4599,16 @@ var SidebarTrigger = React41.forwardRef(({ className, onClick, ...props }, ref)
|
|
|
4400
4599
|
},
|
|
4401
4600
|
...props,
|
|
4402
4601
|
children: [
|
|
4403
|
-
/* @__PURE__ */ (0,
|
|
4404
|
-
/* @__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" })
|
|
4405
4604
|
]
|
|
4406
4605
|
}
|
|
4407
4606
|
);
|
|
4408
4607
|
});
|
|
4409
4608
|
SidebarTrigger.displayName = "SidebarTrigger";
|
|
4410
|
-
var SidebarRail =
|
|
4609
|
+
var SidebarRail = React42.forwardRef(({ className, ...props }, ref) => {
|
|
4411
4610
|
const { toggleSidebar } = useSidebar();
|
|
4412
|
-
return /* @__PURE__ */ (0,
|
|
4611
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4413
4612
|
"button",
|
|
4414
4613
|
{
|
|
4415
4614
|
ref,
|
|
@@ -4432,8 +4631,8 @@ var SidebarRail = React41.forwardRef(({ className, ...props }, ref) => {
|
|
|
4432
4631
|
);
|
|
4433
4632
|
});
|
|
4434
4633
|
SidebarRail.displayName = "SidebarRail";
|
|
4435
|
-
var SidebarInset =
|
|
4436
|
-
return /* @__PURE__ */ (0,
|
|
4634
|
+
var SidebarInset = React42.forwardRef(({ className, ...props }, ref) => {
|
|
4635
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4437
4636
|
"main",
|
|
4438
4637
|
{
|
|
4439
4638
|
ref,
|
|
@@ -4447,8 +4646,8 @@ var SidebarInset = React41.forwardRef(({ className, ...props }, ref) => {
|
|
|
4447
4646
|
);
|
|
4448
4647
|
});
|
|
4449
4648
|
SidebarInset.displayName = "SidebarInset";
|
|
4450
|
-
var SidebarInput =
|
|
4451
|
-
return /* @__PURE__ */ (0,
|
|
4649
|
+
var SidebarInput = React42.forwardRef(({ className, ...props }, ref) => {
|
|
4650
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4452
4651
|
Input,
|
|
4453
4652
|
{
|
|
4454
4653
|
ref,
|
|
@@ -4462,8 +4661,8 @@ var SidebarInput = React41.forwardRef(({ className, ...props }, ref) => {
|
|
|
4462
4661
|
);
|
|
4463
4662
|
});
|
|
4464
4663
|
SidebarInput.displayName = "SidebarInput";
|
|
4465
|
-
var SidebarHeader =
|
|
4466
|
-
return /* @__PURE__ */ (0,
|
|
4664
|
+
var SidebarHeader = React42.forwardRef(({ className, ...props }, ref) => {
|
|
4665
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4467
4666
|
"div",
|
|
4468
4667
|
{
|
|
4469
4668
|
ref,
|
|
@@ -4474,8 +4673,8 @@ var SidebarHeader = React41.forwardRef(({ className, ...props }, ref) => {
|
|
|
4474
4673
|
);
|
|
4475
4674
|
});
|
|
4476
4675
|
SidebarHeader.displayName = "SidebarHeader";
|
|
4477
|
-
var SidebarFooter =
|
|
4478
|
-
return /* @__PURE__ */ (0,
|
|
4676
|
+
var SidebarFooter = React42.forwardRef(({ className, ...props }, ref) => {
|
|
4677
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4479
4678
|
"div",
|
|
4480
4679
|
{
|
|
4481
4680
|
ref,
|
|
@@ -4486,8 +4685,8 @@ var SidebarFooter = React41.forwardRef(({ className, ...props }, ref) => {
|
|
|
4486
4685
|
);
|
|
4487
4686
|
});
|
|
4488
4687
|
SidebarFooter.displayName = "SidebarFooter";
|
|
4489
|
-
var SidebarSeparator =
|
|
4490
|
-
return /* @__PURE__ */ (0,
|
|
4688
|
+
var SidebarSeparator = React42.forwardRef(({ className, ...props }, ref) => {
|
|
4689
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4491
4690
|
Separator3,
|
|
4492
4691
|
{
|
|
4493
4692
|
ref,
|
|
@@ -4498,8 +4697,8 @@ var SidebarSeparator = React41.forwardRef(({ className, ...props }, ref) => {
|
|
|
4498
4697
|
);
|
|
4499
4698
|
});
|
|
4500
4699
|
SidebarSeparator.displayName = "SidebarSeparator";
|
|
4501
|
-
var SidebarContent =
|
|
4502
|
-
return /* @__PURE__ */ (0,
|
|
4700
|
+
var SidebarContent = React42.forwardRef(({ className, ...props }, ref) => {
|
|
4701
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4503
4702
|
"div",
|
|
4504
4703
|
{
|
|
4505
4704
|
ref,
|
|
@@ -4513,8 +4712,8 @@ var SidebarContent = React41.forwardRef(({ className, ...props }, ref) => {
|
|
|
4513
4712
|
);
|
|
4514
4713
|
});
|
|
4515
4714
|
SidebarContent.displayName = "SidebarContent";
|
|
4516
|
-
var SidebarGroup =
|
|
4517
|
-
return /* @__PURE__ */ (0,
|
|
4715
|
+
var SidebarGroup = React42.forwardRef(({ className, ...props }, ref) => {
|
|
4716
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4518
4717
|
"div",
|
|
4519
4718
|
{
|
|
4520
4719
|
ref,
|
|
@@ -4525,10 +4724,10 @@ var SidebarGroup = React41.forwardRef(({ className, ...props }, ref) => {
|
|
|
4525
4724
|
);
|
|
4526
4725
|
});
|
|
4527
4726
|
SidebarGroup.displayName = "SidebarGroup";
|
|
4528
|
-
var SidebarGroupLabel =
|
|
4727
|
+
var SidebarGroupLabel = React42.forwardRef(({ className, asChild = false, showLabel = true, ...props }, ref) => {
|
|
4529
4728
|
if (!showLabel) return null;
|
|
4530
4729
|
const Comp = asChild ? import_react_slot3.Slot : "div";
|
|
4531
|
-
return /* @__PURE__ */ (0,
|
|
4730
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4532
4731
|
Comp,
|
|
4533
4732
|
{
|
|
4534
4733
|
ref,
|
|
@@ -4543,9 +4742,9 @@ var SidebarGroupLabel = React41.forwardRef(({ className, asChild = false, showLa
|
|
|
4543
4742
|
);
|
|
4544
4743
|
});
|
|
4545
4744
|
SidebarGroupLabel.displayName = "SidebarGroupLabel";
|
|
4546
|
-
var SidebarGroupAction =
|
|
4745
|
+
var SidebarGroupAction = React42.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
4547
4746
|
const Comp = asChild ? import_react_slot3.Slot : "button";
|
|
4548
|
-
return /* @__PURE__ */ (0,
|
|
4747
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4549
4748
|
Comp,
|
|
4550
4749
|
{
|
|
4551
4750
|
ref,
|
|
@@ -4562,7 +4761,7 @@ var SidebarGroupAction = React41.forwardRef(({ className, asChild = false, ...pr
|
|
|
4562
4761
|
);
|
|
4563
4762
|
});
|
|
4564
4763
|
SidebarGroupAction.displayName = "SidebarGroupAction";
|
|
4565
|
-
var SidebarGroupContent =
|
|
4764
|
+
var SidebarGroupContent = React42.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4566
4765
|
"div",
|
|
4567
4766
|
{
|
|
4568
4767
|
ref,
|
|
@@ -4572,7 +4771,7 @@ var SidebarGroupContent = React41.forwardRef(({ className, ...props }, ref) => /
|
|
|
4572
4771
|
}
|
|
4573
4772
|
));
|
|
4574
4773
|
SidebarGroupContent.displayName = "SidebarGroupContent";
|
|
4575
|
-
var SidebarMenu =
|
|
4774
|
+
var SidebarMenu = React42.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4576
4775
|
"ul",
|
|
4577
4776
|
{
|
|
4578
4777
|
ref,
|
|
@@ -4582,7 +4781,7 @@ var SidebarMenu = React41.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
4582
4781
|
}
|
|
4583
4782
|
));
|
|
4584
4783
|
SidebarMenu.displayName = "SidebarMenu";
|
|
4585
|
-
var SidebarMenuItem =
|
|
4784
|
+
var SidebarMenuItem = React42.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4586
4785
|
"li",
|
|
4587
4786
|
{
|
|
4588
4787
|
ref,
|
|
@@ -4612,7 +4811,7 @@ var sidebarMenuButtonVariants = (0, import_class_variance_authority15.cva)(
|
|
|
4612
4811
|
}
|
|
4613
4812
|
}
|
|
4614
4813
|
);
|
|
4615
|
-
var SidebarMenuButton =
|
|
4814
|
+
var SidebarMenuButton = React42.forwardRef(
|
|
4616
4815
|
({
|
|
4617
4816
|
asChild = false,
|
|
4618
4817
|
isActive = false,
|
|
@@ -4624,7 +4823,7 @@ var SidebarMenuButton = React41.forwardRef(
|
|
|
4624
4823
|
}, ref) => {
|
|
4625
4824
|
const Comp = asChild ? import_react_slot3.Slot : "button";
|
|
4626
4825
|
const { isMobile, state } = useSidebar();
|
|
4627
|
-
const button = /* @__PURE__ */ (0,
|
|
4826
|
+
const button = /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4628
4827
|
Comp,
|
|
4629
4828
|
{
|
|
4630
4829
|
ref,
|
|
@@ -4643,9 +4842,9 @@ var SidebarMenuButton = React41.forwardRef(
|
|
|
4643
4842
|
children: tooltip
|
|
4644
4843
|
};
|
|
4645
4844
|
}
|
|
4646
|
-
return /* @__PURE__ */ (0,
|
|
4647
|
-
/* @__PURE__ */ (0,
|
|
4648
|
-
/* @__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)(
|
|
4649
4848
|
TooltipContent,
|
|
4650
4849
|
{
|
|
4651
4850
|
side: "right",
|
|
@@ -4658,9 +4857,9 @@ var SidebarMenuButton = React41.forwardRef(
|
|
|
4658
4857
|
}
|
|
4659
4858
|
);
|
|
4660
4859
|
SidebarMenuButton.displayName = "SidebarMenuButton";
|
|
4661
|
-
var SidebarMenuAction =
|
|
4860
|
+
var SidebarMenuAction = React42.forwardRef(({ className, asChild = false, showOnHover = false, ...props }, ref) => {
|
|
4662
4861
|
const Comp = asChild ? import_react_slot3.Slot : "button";
|
|
4663
|
-
return /* @__PURE__ */ (0,
|
|
4862
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4664
4863
|
Comp,
|
|
4665
4864
|
{
|
|
4666
4865
|
ref,
|
|
@@ -4681,7 +4880,7 @@ var SidebarMenuAction = React41.forwardRef(({ className, asChild = false, showOn
|
|
|
4681
4880
|
);
|
|
4682
4881
|
});
|
|
4683
4882
|
SidebarMenuAction.displayName = "SidebarMenuAction";
|
|
4684
|
-
var SidebarMenuBadge =
|
|
4883
|
+
var SidebarMenuBadge = React42.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4685
4884
|
"div",
|
|
4686
4885
|
{
|
|
4687
4886
|
ref,
|
|
@@ -4699,11 +4898,11 @@ var SidebarMenuBadge = React41.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
4699
4898
|
}
|
|
4700
4899
|
));
|
|
4701
4900
|
SidebarMenuBadge.displayName = "SidebarMenuBadge";
|
|
4702
|
-
var SidebarMenuSkeleton =
|
|
4703
|
-
const width =
|
|
4901
|
+
var SidebarMenuSkeleton = React42.forwardRef(({ className, showIcon = false, ...props }, ref) => {
|
|
4902
|
+
const width = React42.useMemo(() => {
|
|
4704
4903
|
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
4705
4904
|
}, []);
|
|
4706
|
-
return /* @__PURE__ */ (0,
|
|
4905
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
4707
4906
|
"div",
|
|
4708
4907
|
{
|
|
4709
4908
|
ref,
|
|
@@ -4711,14 +4910,14 @@ var SidebarMenuSkeleton = React41.forwardRef(({ className, showIcon = false, ...
|
|
|
4711
4910
|
className: cn("rounded-md h-8 flex gap-2 px-2 items-center", className),
|
|
4712
4911
|
...props,
|
|
4713
4912
|
children: [
|
|
4714
|
-
showIcon && /* @__PURE__ */ (0,
|
|
4913
|
+
showIcon && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4715
4914
|
Skeleton,
|
|
4716
4915
|
{
|
|
4717
4916
|
className: "size-4 rounded-md",
|
|
4718
4917
|
"data-sidebar": "menu-skeleton-icon"
|
|
4719
4918
|
}
|
|
4720
4919
|
),
|
|
4721
|
-
/* @__PURE__ */ (0,
|
|
4920
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4722
4921
|
Skeleton,
|
|
4723
4922
|
{
|
|
4724
4923
|
className: "h-4 flex-1 max-w-[--skeleton-width]",
|
|
@@ -4733,7 +4932,7 @@ var SidebarMenuSkeleton = React41.forwardRef(({ className, showIcon = false, ...
|
|
|
4733
4932
|
);
|
|
4734
4933
|
});
|
|
4735
4934
|
SidebarMenuSkeleton.displayName = "SidebarMenuSkeleton";
|
|
4736
|
-
var SidebarMenuSub =
|
|
4935
|
+
var SidebarMenuSub = React42.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4737
4936
|
"ul",
|
|
4738
4937
|
{
|
|
4739
4938
|
ref,
|
|
@@ -4747,11 +4946,11 @@ var SidebarMenuSub = React41.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
4747
4946
|
}
|
|
4748
4947
|
));
|
|
4749
4948
|
SidebarMenuSub.displayName = "SidebarMenuSub";
|
|
4750
|
-
var SidebarMenuSubItem =
|
|
4949
|
+
var SidebarMenuSubItem = React42.forwardRef(({ ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("li", { ref, ...props }));
|
|
4751
4950
|
SidebarMenuSubItem.displayName = "SidebarMenuSubItem";
|
|
4752
|
-
var SidebarMenuSubButton =
|
|
4951
|
+
var SidebarMenuSubButton = React42.forwardRef(({ asChild = false, size = "md", isActive, className, ...props }, ref) => {
|
|
4753
4952
|
const Comp = asChild ? import_react_slot3.Slot : "a";
|
|
4754
|
-
return /* @__PURE__ */ (0,
|
|
4953
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4755
4954
|
Comp,
|
|
4756
4955
|
{
|
|
4757
4956
|
ref,
|
|
@@ -4773,10 +4972,10 @@ var SidebarMenuSubButton = React41.forwardRef(({ asChild = false, size = "md", i
|
|
|
4773
4972
|
SidebarMenuSubButton.displayName = "SidebarMenuSubButton";
|
|
4774
4973
|
|
|
4775
4974
|
// source/components/primitive/Slider/slider.tsx
|
|
4776
|
-
var
|
|
4975
|
+
var React43 = __toESM(require("react"), 1);
|
|
4777
4976
|
var SliderPrimitive = __toESM(require("@radix-ui/react-slider"), 1);
|
|
4778
|
-
var
|
|
4779
|
-
var Slider =
|
|
4977
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
4978
|
+
var Slider = React43.forwardRef(
|
|
4780
4979
|
({
|
|
4781
4980
|
className,
|
|
4782
4981
|
label,
|
|
@@ -4787,16 +4986,16 @@ var Slider = React42.forwardRef(
|
|
|
4787
4986
|
value,
|
|
4788
4987
|
...props
|
|
4789
4988
|
}, ref) => {
|
|
4790
|
-
const [internalValue, setInternalValue] =
|
|
4989
|
+
const [internalValue, setInternalValue] = React43.useState(
|
|
4791
4990
|
value || defaultValue || [0]
|
|
4792
4991
|
);
|
|
4793
4992
|
const currentValue = value ?? internalValue;
|
|
4794
|
-
return /* @__PURE__ */ (0,
|
|
4795
|
-
(label || showValue) && /* @__PURE__ */ (0,
|
|
4796
|
-
label && /* @__PURE__ */ (0,
|
|
4797
|
-
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] })
|
|
4798
4997
|
] }),
|
|
4799
|
-
/* @__PURE__ */ (0,
|
|
4998
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
4800
4999
|
SliderPrimitive.Root,
|
|
4801
5000
|
{
|
|
4802
5001
|
ref,
|
|
@@ -4812,8 +5011,8 @@ var Slider = React42.forwardRef(
|
|
|
4812
5011
|
),
|
|
4813
5012
|
...props,
|
|
4814
5013
|
children: [
|
|
4815
|
-
/* @__PURE__ */ (0,
|
|
4816
|
-
/* @__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)(
|
|
4817
5016
|
SliderPrimitive.Thumb,
|
|
4818
5017
|
{
|
|
4819
5018
|
className: cn(
|
|
@@ -4827,9 +5026,9 @@ var Slider = React42.forwardRef(
|
|
|
4827
5026
|
]
|
|
4828
5027
|
}
|
|
4829
5028
|
),
|
|
4830
|
-
(minLabel || maxLabel) && /* @__PURE__ */ (0,
|
|
4831
|
-
/* @__PURE__ */ (0,
|
|
4832
|
-
/* @__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 })
|
|
4833
5032
|
] })
|
|
4834
5033
|
] });
|
|
4835
5034
|
}
|
|
@@ -4837,9 +5036,9 @@ var Slider = React42.forwardRef(
|
|
|
4837
5036
|
Slider.displayName = "Slider";
|
|
4838
5037
|
|
|
4839
5038
|
// source/components/primitive/Table/table.tsx
|
|
4840
|
-
var
|
|
4841
|
-
var
|
|
4842
|
-
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)(
|
|
4843
5042
|
"table",
|
|
4844
5043
|
{
|
|
4845
5044
|
ref,
|
|
@@ -4848,9 +5047,9 @@ var Table = React43.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
4848
5047
|
}
|
|
4849
5048
|
) }));
|
|
4850
5049
|
Table.displayName = "Table";
|
|
4851
|
-
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 }));
|
|
4852
5051
|
TableHeader.displayName = "TableHeader";
|
|
4853
|
-
var TableBody =
|
|
5052
|
+
var TableBody = React44.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
4854
5053
|
"tbody",
|
|
4855
5054
|
{
|
|
4856
5055
|
ref,
|
|
@@ -4859,7 +5058,7 @@ var TableBody = React43.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
4859
5058
|
}
|
|
4860
5059
|
));
|
|
4861
5060
|
TableBody.displayName = "TableBody";
|
|
4862
|
-
var TableFooter =
|
|
5061
|
+
var TableFooter = React44.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
4863
5062
|
"tfoot",
|
|
4864
5063
|
{
|
|
4865
5064
|
ref,
|
|
@@ -4871,7 +5070,7 @@ var TableFooter = React43.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
4871
5070
|
}
|
|
4872
5071
|
));
|
|
4873
5072
|
TableFooter.displayName = "TableFooter";
|
|
4874
|
-
var TableRow =
|
|
5073
|
+
var TableRow = React44.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
4875
5074
|
"tr",
|
|
4876
5075
|
{
|
|
4877
5076
|
ref,
|
|
@@ -4883,7 +5082,7 @@ var TableRow = React43.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
4883
5082
|
}
|
|
4884
5083
|
));
|
|
4885
5084
|
TableRow.displayName = "TableRow";
|
|
4886
|
-
var TableHead =
|
|
5085
|
+
var TableHead = React44.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
4887
5086
|
"th",
|
|
4888
5087
|
{
|
|
4889
5088
|
ref,
|
|
@@ -4895,7 +5094,7 @@ var TableHead = React43.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
4895
5094
|
}
|
|
4896
5095
|
));
|
|
4897
5096
|
TableHead.displayName = "TableHead";
|
|
4898
|
-
var TableCell =
|
|
5097
|
+
var TableCell = React44.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
4899
5098
|
"td",
|
|
4900
5099
|
{
|
|
4901
5100
|
ref,
|
|
@@ -4904,7 +5103,7 @@ var TableCell = React43.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
4904
5103
|
}
|
|
4905
5104
|
));
|
|
4906
5105
|
TableCell.displayName = "TableCell";
|
|
4907
|
-
var TableCaption =
|
|
5106
|
+
var TableCaption = React44.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
4908
5107
|
"caption",
|
|
4909
5108
|
{
|
|
4910
5109
|
ref,
|
|
@@ -4915,11 +5114,11 @@ var TableCaption = React43.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
4915
5114
|
TableCaption.displayName = "TableCaption";
|
|
4916
5115
|
|
|
4917
5116
|
// source/components/primitive/Tabs/tabs.tsx
|
|
4918
|
-
var
|
|
5117
|
+
var React45 = __toESM(require("react"), 1);
|
|
4919
5118
|
var TabsPrimitive = __toESM(require("@radix-ui/react-tabs"), 1);
|
|
4920
|
-
var
|
|
5119
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
4921
5120
|
var Tabs = TabsPrimitive.Root;
|
|
4922
|
-
var TabsList =
|
|
5121
|
+
var TabsList = React45.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
4923
5122
|
TabsPrimitive.List,
|
|
4924
5123
|
{
|
|
4925
5124
|
ref,
|
|
@@ -4931,7 +5130,7 @@ var TabsList = React44.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
4931
5130
|
}
|
|
4932
5131
|
));
|
|
4933
5132
|
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
4934
|
-
var TabsTrigger =
|
|
5133
|
+
var TabsTrigger = React45.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
4935
5134
|
TabsPrimitive.Trigger,
|
|
4936
5135
|
{
|
|
4937
5136
|
ref,
|
|
@@ -4943,7 +5142,7 @@ var TabsTrigger = React44.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
4943
5142
|
}
|
|
4944
5143
|
));
|
|
4945
5144
|
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
4946
|
-
var TabsContent =
|
|
5145
|
+
var TabsContent = React45.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
4947
5146
|
TabsPrimitive.Content,
|
|
4948
5147
|
{
|
|
4949
5148
|
ref,
|
|
@@ -4957,12 +5156,12 @@ var TabsContent = React44.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
4957
5156
|
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
4958
5157
|
|
|
4959
5158
|
// source/components/primitive/Toast/toast.tsx
|
|
4960
|
-
var
|
|
5159
|
+
var React46 = __toESM(require("react"), 1);
|
|
4961
5160
|
var ToastPrimitive = __toESM(require("@radix-ui/react-toast"), 1);
|
|
4962
5161
|
var import_class_variance_authority16 = require("class-variance-authority");
|
|
4963
|
-
var
|
|
5162
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
4964
5163
|
var ToastProvider = ToastPrimitive.Provider;
|
|
4965
|
-
var ToastViewport =
|
|
5164
|
+
var ToastViewport = React46.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
4966
5165
|
ToastPrimitive.Viewport,
|
|
4967
5166
|
{
|
|
4968
5167
|
ref,
|
|
@@ -5021,7 +5220,7 @@ var toastVariants = (0, import_class_variance_authority16.cva)(
|
|
|
5021
5220
|
}
|
|
5022
5221
|
}
|
|
5023
5222
|
);
|
|
5024
|
-
var Toast =
|
|
5223
|
+
var Toast = React46.forwardRef(({ className, variant, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
5025
5224
|
ToastPrimitive.Root,
|
|
5026
5225
|
{
|
|
5027
5226
|
ref,
|
|
@@ -5030,7 +5229,7 @@ var Toast = React45.forwardRef(({ className, variant, ...props }, ref) => /* @__
|
|
|
5030
5229
|
}
|
|
5031
5230
|
));
|
|
5032
5231
|
Toast.displayName = ToastPrimitive.Root.displayName;
|
|
5033
|
-
var ToastAction =
|
|
5232
|
+
var ToastAction = React46.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
5034
5233
|
ToastPrimitive.Action,
|
|
5035
5234
|
{
|
|
5036
5235
|
ref,
|
|
@@ -5045,7 +5244,7 @@ var ToastAction = React45.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
5045
5244
|
}
|
|
5046
5245
|
));
|
|
5047
5246
|
ToastAction.displayName = ToastPrimitive.Action.displayName;
|
|
5048
|
-
var ToastClose =
|
|
5247
|
+
var ToastClose = React46.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
5049
5248
|
ToastPrimitive.Close,
|
|
5050
5249
|
{
|
|
5051
5250
|
ref,
|
|
@@ -5059,7 +5258,7 @@ var ToastClose = React45.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
5059
5258
|
}
|
|
5060
5259
|
));
|
|
5061
5260
|
ToastClose.displayName = ToastPrimitive.Close.displayName;
|
|
5062
|
-
var ToastTitle =
|
|
5261
|
+
var ToastTitle = React46.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
5063
5262
|
ToastPrimitive.Title,
|
|
5064
5263
|
{
|
|
5065
5264
|
ref,
|
|
@@ -5068,7 +5267,7 @@ var ToastTitle = React45.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
5068
5267
|
}
|
|
5069
5268
|
));
|
|
5070
5269
|
ToastTitle.displayName = ToastPrimitive.Title.displayName;
|
|
5071
|
-
var ToastDescription =
|
|
5270
|
+
var ToastDescription = React46.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
5072
5271
|
ToastPrimitive.Description,
|
|
5073
5272
|
{
|
|
5074
5273
|
ref,
|
|
@@ -5121,11 +5320,11 @@ function getToastSnapshot() {
|
|
|
5121
5320
|
}
|
|
5122
5321
|
|
|
5123
5322
|
// source/components/primitive/Toast/toaster.tsx
|
|
5124
|
-
var
|
|
5125
|
-
var
|
|
5323
|
+
var React47 = __toESM(require("react"), 1);
|
|
5324
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
5126
5325
|
function useToast() {
|
|
5127
|
-
const [toasts, setToasts] =
|
|
5128
|
-
|
|
5326
|
+
const [toasts, setToasts] = React47.useState(() => getToastSnapshot());
|
|
5327
|
+
React47.useEffect(() => subscribeToasts((s) => setToasts([...s])), []);
|
|
5129
5328
|
return {
|
|
5130
5329
|
toasts,
|
|
5131
5330
|
toast,
|
|
@@ -5140,7 +5339,7 @@ function Toaster({
|
|
|
5140
5339
|
...providerProps
|
|
5141
5340
|
}) {
|
|
5142
5341
|
const { toasts } = useToast();
|
|
5143
|
-
return /* @__PURE__ */ (0,
|
|
5342
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
5144
5343
|
ToastProvider,
|
|
5145
5344
|
{
|
|
5146
5345
|
duration,
|
|
@@ -5158,7 +5357,7 @@ function Toaster({
|
|
|
5158
5357
|
action
|
|
5159
5358
|
}) => {
|
|
5160
5359
|
const v = variant ?? "default";
|
|
5161
|
-
return /* @__PURE__ */ (0,
|
|
5360
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
5162
5361
|
Toast,
|
|
5163
5362
|
{
|
|
5164
5363
|
variant,
|
|
@@ -5167,11 +5366,11 @@ function Toaster({
|
|
|
5167
5366
|
if (!open) dismissToast(id);
|
|
5168
5367
|
},
|
|
5169
5368
|
children: [
|
|
5170
|
-
/* @__PURE__ */ (0,
|
|
5171
|
-
title ? /* @__PURE__ */ (0,
|
|
5172
|
-
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
|
|
5173
5372
|
] }),
|
|
5174
|
-
action ? /* @__PURE__ */ (0,
|
|
5373
|
+
action ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
5175
5374
|
ToastAction,
|
|
5176
5375
|
{
|
|
5177
5376
|
altText: action.altText,
|
|
@@ -5182,7 +5381,7 @@ function Toaster({
|
|
|
5182
5381
|
children: action.label
|
|
5183
5382
|
}
|
|
5184
5383
|
) : null,
|
|
5185
|
-
/* @__PURE__ */ (0,
|
|
5384
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ToastClose, { "aria-label": "Dismiss notification", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
5186
5385
|
"span",
|
|
5187
5386
|
{
|
|
5188
5387
|
"aria-hidden": true,
|
|
@@ -5196,7 +5395,7 @@ function Toaster({
|
|
|
5196
5395
|
);
|
|
5197
5396
|
}
|
|
5198
5397
|
),
|
|
5199
|
-
/* @__PURE__ */ (0,
|
|
5398
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ToastViewport, { className: cn(viewportClassName) })
|
|
5200
5399
|
]
|
|
5201
5400
|
}
|
|
5202
5401
|
);
|
|
@@ -5624,6 +5823,7 @@ var typography = {
|
|
|
5624
5823
|
RichTextEditor,
|
|
5625
5824
|
ScrollArea,
|
|
5626
5825
|
ScrollBar,
|
|
5826
|
+
SearchableSelect,
|
|
5627
5827
|
Select,
|
|
5628
5828
|
SelectContent,
|
|
5629
5829
|
SelectGroup,
|