@codapet/design-system 0.6.3 → 0.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +111 -2
- package/dist/index.mjs +1241 -351
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3275,8 +3275,260 @@ function DropdownMenuSubContent({
|
|
|
3275
3275
|
);
|
|
3276
3276
|
}
|
|
3277
3277
|
|
|
3278
|
+
// src/components/ui/dropdown-select.tsx
|
|
3279
|
+
import * as React28 from "react";
|
|
3280
|
+
import * as PopoverPrimitive2 from "@radix-ui/react-popover";
|
|
3281
|
+
import { ChevronDown } from "lucide-react";
|
|
3282
|
+
import { jsx as jsx30, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
3283
|
+
var DropdownSelectContext = React28.createContext(null);
|
|
3284
|
+
function useDropdownSelect() {
|
|
3285
|
+
const ctx = React28.useContext(DropdownSelectContext);
|
|
3286
|
+
if (!ctx) throw new Error("DropdownSelect compound components must be used within <DropdownSelect>");
|
|
3287
|
+
return ctx;
|
|
3288
|
+
}
|
|
3289
|
+
function DropdownSelect({
|
|
3290
|
+
children,
|
|
3291
|
+
value: valueProp,
|
|
3292
|
+
defaultValue = "",
|
|
3293
|
+
onValueChange,
|
|
3294
|
+
open: openProp,
|
|
3295
|
+
defaultOpen = false,
|
|
3296
|
+
onOpenChange,
|
|
3297
|
+
disabled = false,
|
|
3298
|
+
error = false,
|
|
3299
|
+
placeholder = "Select",
|
|
3300
|
+
icon
|
|
3301
|
+
}) {
|
|
3302
|
+
const [internalValue, setInternalValue] = React28.useState(defaultValue);
|
|
3303
|
+
const [internalOpen, setInternalOpen] = React28.useState(defaultOpen);
|
|
3304
|
+
const [options, setOptions] = React28.useState([]);
|
|
3305
|
+
const [highlightedIndex, setHighlightedIndex] = React28.useState(-1);
|
|
3306
|
+
const isControlledValue = valueProp !== void 0;
|
|
3307
|
+
const isControlledOpen = openProp !== void 0;
|
|
3308
|
+
const value = isControlledValue ? valueProp : internalValue;
|
|
3309
|
+
const open = isControlledOpen ? openProp : internalOpen;
|
|
3310
|
+
const setOpen = React28.useCallback(
|
|
3311
|
+
(next) => {
|
|
3312
|
+
if (!isControlledOpen) setInternalOpen(next);
|
|
3313
|
+
onOpenChange?.(next);
|
|
3314
|
+
},
|
|
3315
|
+
[isControlledOpen, onOpenChange]
|
|
3316
|
+
);
|
|
3317
|
+
const handleValueChange = React28.useCallback(
|
|
3318
|
+
(next) => {
|
|
3319
|
+
if (!isControlledValue) setInternalValue(next);
|
|
3320
|
+
onValueChange?.(next);
|
|
3321
|
+
setOpen(false);
|
|
3322
|
+
},
|
|
3323
|
+
[isControlledValue, onValueChange, setOpen]
|
|
3324
|
+
);
|
|
3325
|
+
const registerOption = React28.useCallback((val, label) => {
|
|
3326
|
+
setOptions((prev) => {
|
|
3327
|
+
if (prev.some((o) => o.value === val)) return prev;
|
|
3328
|
+
return [...prev, { value: val, label }];
|
|
3329
|
+
});
|
|
3330
|
+
}, []);
|
|
3331
|
+
const displayLabel = React28.useMemo(() => {
|
|
3332
|
+
const match = options.find((o) => o.value === value);
|
|
3333
|
+
return match?.label ?? "";
|
|
3334
|
+
}, [options, value]);
|
|
3335
|
+
const ctx = React28.useMemo(
|
|
3336
|
+
() => ({
|
|
3337
|
+
open,
|
|
3338
|
+
setOpen,
|
|
3339
|
+
value,
|
|
3340
|
+
onValueChange: handleValueChange,
|
|
3341
|
+
disabled,
|
|
3342
|
+
error,
|
|
3343
|
+
placeholder,
|
|
3344
|
+
icon,
|
|
3345
|
+
displayLabel,
|
|
3346
|
+
options,
|
|
3347
|
+
registerOption,
|
|
3348
|
+
highlightedIndex,
|
|
3349
|
+
setHighlightedIndex
|
|
3350
|
+
}),
|
|
3351
|
+
[open, setOpen, value, handleValueChange, disabled, error, placeholder, icon, displayLabel, options, registerOption, highlightedIndex, setHighlightedIndex]
|
|
3352
|
+
);
|
|
3353
|
+
return /* @__PURE__ */ jsx30(DropdownSelectContext.Provider, { value: ctx, children: /* @__PURE__ */ jsx30(PopoverPrimitive2.Root, { open, onOpenChange: disabled ? void 0 : setOpen, children }) });
|
|
3354
|
+
}
|
|
3355
|
+
function DropdownSelectLabel({
|
|
3356
|
+
className,
|
|
3357
|
+
children,
|
|
3358
|
+
mandatory = false,
|
|
3359
|
+
...props
|
|
3360
|
+
}) {
|
|
3361
|
+
return /* @__PURE__ */ jsxs17(
|
|
3362
|
+
"div",
|
|
3363
|
+
{
|
|
3364
|
+
"data-slot": "dropdown-select-label",
|
|
3365
|
+
className: cn(
|
|
3366
|
+
"flex items-center font-sans font-medium text-[14px] leading-[20px] text-vibrant-text-details",
|
|
3367
|
+
className
|
|
3368
|
+
),
|
|
3369
|
+
...props,
|
|
3370
|
+
children: [
|
|
3371
|
+
children,
|
|
3372
|
+
mandatory && /* @__PURE__ */ jsx30("span", { className: "text-error-surface-default ml-0.5 text-[14px] leading-[20px]", children: "*" })
|
|
3373
|
+
]
|
|
3374
|
+
}
|
|
3375
|
+
);
|
|
3376
|
+
}
|
|
3377
|
+
function DropdownSelectTrigger({ className, ...props }) {
|
|
3378
|
+
const { value, displayLabel, placeholder, icon, disabled, error, open, options, setOpen, onValueChange, highlightedIndex, setHighlightedIndex } = useDropdownSelect();
|
|
3379
|
+
const handleKeyDown = React28.useCallback(
|
|
3380
|
+
(e) => {
|
|
3381
|
+
if (disabled) return;
|
|
3382
|
+
if (e.key === "ArrowDown" || e.key === "ArrowUp") {
|
|
3383
|
+
e.preventDefault();
|
|
3384
|
+
if (!open) {
|
|
3385
|
+
setOpen(true);
|
|
3386
|
+
return;
|
|
3387
|
+
}
|
|
3388
|
+
const len = options.length;
|
|
3389
|
+
if (len === 0) return;
|
|
3390
|
+
if (e.key === "ArrowDown") {
|
|
3391
|
+
setHighlightedIndex(highlightedIndex < len - 1 ? highlightedIndex + 1 : 0);
|
|
3392
|
+
} else {
|
|
3393
|
+
setHighlightedIndex(highlightedIndex > 0 ? highlightedIndex - 1 : len - 1);
|
|
3394
|
+
}
|
|
3395
|
+
} else if (e.key === "Enter" && open && highlightedIndex >= 0) {
|
|
3396
|
+
e.preventDefault();
|
|
3397
|
+
const opt = options[highlightedIndex];
|
|
3398
|
+
if (opt) onValueChange(opt.value);
|
|
3399
|
+
} else if (e.key === "Escape" && open) {
|
|
3400
|
+
e.preventDefault();
|
|
3401
|
+
setOpen(false);
|
|
3402
|
+
}
|
|
3403
|
+
},
|
|
3404
|
+
[disabled, open, setOpen, options, highlightedIndex, setHighlightedIndex, onValueChange]
|
|
3405
|
+
);
|
|
3406
|
+
const hasValue = value !== "" && displayLabel !== "";
|
|
3407
|
+
return /* @__PURE__ */ jsx30(PopoverPrimitive2.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs17(
|
|
3408
|
+
"button",
|
|
3409
|
+
{
|
|
3410
|
+
type: "button",
|
|
3411
|
+
"data-slot": "dropdown-select-trigger",
|
|
3412
|
+
disabled,
|
|
3413
|
+
"aria-expanded": open,
|
|
3414
|
+
"aria-haspopup": "listbox",
|
|
3415
|
+
onKeyDown: handleKeyDown,
|
|
3416
|
+
className: cn(
|
|
3417
|
+
// Base
|
|
3418
|
+
"flex w-full items-center gap-2 h-[48px] rounded-[8px] px-[12px] py-[8px] font-sans font-medium text-[16px] leading-[24px] outline-none transition-colors cursor-pointer",
|
|
3419
|
+
// Default state
|
|
3420
|
+
"border border-gray-stroke-default bg-white dark:bg-background",
|
|
3421
|
+
// Placeholder vs selected text
|
|
3422
|
+
hasValue ? "text-vibrant-text-heading" : "text-muted-foreground",
|
|
3423
|
+
// Hover
|
|
3424
|
+
!disabled && !error && "hover:border-focus-ring",
|
|
3425
|
+
// Focus
|
|
3426
|
+
!disabled && !error && "focus-visible:border-focus-ring focus-visible:border-2 focus-visible:px-[11px] focus-visible:py-[7px]",
|
|
3427
|
+
// Open/Active
|
|
3428
|
+
open && !error && "border-focus-ring",
|
|
3429
|
+
// Error
|
|
3430
|
+
error && "border-error-stroke-light bg-error-surface-light",
|
|
3431
|
+
// Disabled
|
|
3432
|
+
disabled && "opacity-60 cursor-not-allowed",
|
|
3433
|
+
className
|
|
3434
|
+
),
|
|
3435
|
+
...props,
|
|
3436
|
+
children: [
|
|
3437
|
+
icon && /* @__PURE__ */ jsx30("span", { className: "flex items-center justify-center shrink-0 size-[20px] [&_svg]:size-[20px] text-muted-foreground", children: icon }),
|
|
3438
|
+
/* @__PURE__ */ jsx30("span", { className: "flex-1 text-left truncate", children: hasValue ? displayLabel : placeholder }),
|
|
3439
|
+
/* @__PURE__ */ jsx30(
|
|
3440
|
+
ChevronDown,
|
|
3441
|
+
{
|
|
3442
|
+
className: cn(
|
|
3443
|
+
"shrink-0 size-[20px] text-muted-foreground transition-transform",
|
|
3444
|
+
open && "rotate-180"
|
|
3445
|
+
)
|
|
3446
|
+
}
|
|
3447
|
+
)
|
|
3448
|
+
]
|
|
3449
|
+
}
|
|
3450
|
+
) });
|
|
3451
|
+
}
|
|
3452
|
+
function DropdownSelectContent({
|
|
3453
|
+
className,
|
|
3454
|
+
children,
|
|
3455
|
+
...props
|
|
3456
|
+
}) {
|
|
3457
|
+
const { setHighlightedIndex } = useDropdownSelect();
|
|
3458
|
+
return /* @__PURE__ */ jsx30(PopoverPrimitive2.Portal, { children: /* @__PURE__ */ jsx30(
|
|
3459
|
+
PopoverPrimitive2.Content,
|
|
3460
|
+
{
|
|
3461
|
+
"data-slot": "dropdown-select-content",
|
|
3462
|
+
sideOffset: 8,
|
|
3463
|
+
align: "start",
|
|
3464
|
+
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
3465
|
+
onCloseAutoFocus: (e) => e.preventDefault(),
|
|
3466
|
+
onPointerDownOutside: () => setHighlightedIndex(-1),
|
|
3467
|
+
className: cn(
|
|
3468
|
+
"z-50 w-[var(--radix-popover-trigger-width)] rounded-[8px] border border-gray-stroke-light bg-white dark:bg-card p-[12px] shadow-[0px_4px_24px_0px_rgba(0,0,0,0.05)]",
|
|
3469
|
+
"max-h-[300px] overflow-y-auto overflow-x-hidden",
|
|
3470
|
+
// Custom scrollbar
|
|
3471
|
+
"[&::-webkit-scrollbar]:w-[5px] [&::-webkit-scrollbar-track]:rounded-[3px] [&::-webkit-scrollbar-track]:bg-gray-surface-light [&::-webkit-scrollbar-thumb]:rounded-[3px] [&::-webkit-scrollbar-thumb]:bg-gray-surface-default",
|
|
3472
|
+
// Animations
|
|
3473
|
+
"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2",
|
|
3474
|
+
className
|
|
3475
|
+
),
|
|
3476
|
+
...props,
|
|
3477
|
+
children: /* @__PURE__ */ jsx30("div", { role: "listbox", className: "flex flex-col", children })
|
|
3478
|
+
}
|
|
3479
|
+
) });
|
|
3480
|
+
}
|
|
3481
|
+
function DropdownSelectOption({
|
|
3482
|
+
className,
|
|
3483
|
+
value: optionValue,
|
|
3484
|
+
label,
|
|
3485
|
+
disabled: optionDisabled = false,
|
|
3486
|
+
children,
|
|
3487
|
+
...props
|
|
3488
|
+
}) {
|
|
3489
|
+
const { value, onValueChange, registerOption, options, highlightedIndex, setHighlightedIndex } = useDropdownSelect();
|
|
3490
|
+
const displayText = label ?? (typeof children === "string" ? children : "");
|
|
3491
|
+
React28.useEffect(() => {
|
|
3492
|
+
if (displayText) {
|
|
3493
|
+
registerOption(optionValue, displayText);
|
|
3494
|
+
}
|
|
3495
|
+
}, [optionValue, displayText, registerOption]);
|
|
3496
|
+
const isSelected = value === optionValue;
|
|
3497
|
+
const index = options.findIndex((o) => o.value === optionValue);
|
|
3498
|
+
const isHighlighted = highlightedIndex === index;
|
|
3499
|
+
return /* @__PURE__ */ jsx30(
|
|
3500
|
+
"div",
|
|
3501
|
+
{
|
|
3502
|
+
role: "option",
|
|
3503
|
+
"aria-selected": isSelected,
|
|
3504
|
+
"aria-disabled": optionDisabled,
|
|
3505
|
+
"data-slot": "dropdown-select-option",
|
|
3506
|
+
"data-highlighted": isHighlighted || void 0,
|
|
3507
|
+
"data-selected": isSelected || void 0,
|
|
3508
|
+
onClick: () => {
|
|
3509
|
+
if (!optionDisabled) onValueChange(optionValue);
|
|
3510
|
+
},
|
|
3511
|
+
onMouseEnter: () => setHighlightedIndex(index),
|
|
3512
|
+
onMouseLeave: () => setHighlightedIndex(-1),
|
|
3513
|
+
className: cn(
|
|
3514
|
+
"flex items-center h-[48px] px-[8px] rounded-[8px] font-sans font-medium text-[16px] leading-[24px] text-vibrant-text-heading cursor-pointer select-none transition-colors",
|
|
3515
|
+
// Hover/highlighted
|
|
3516
|
+
"hover:bg-gray-surface-light hover:font-semibold",
|
|
3517
|
+
isHighlighted && "bg-gray-surface-light font-semibold",
|
|
3518
|
+
// Selected
|
|
3519
|
+
isSelected && "font-semibold",
|
|
3520
|
+
// Disabled
|
|
3521
|
+
optionDisabled && "opacity-50 cursor-not-allowed",
|
|
3522
|
+
className
|
|
3523
|
+
),
|
|
3524
|
+
...props,
|
|
3525
|
+
children: children ?? displayText
|
|
3526
|
+
}
|
|
3527
|
+
);
|
|
3528
|
+
}
|
|
3529
|
+
|
|
3278
3530
|
// src/components/ui/form.tsx
|
|
3279
|
-
import * as
|
|
3531
|
+
import * as React30 from "react";
|
|
3280
3532
|
import "@radix-ui/react-label";
|
|
3281
3533
|
import { Slot as Slot5 } from "@radix-ui/react-slot";
|
|
3282
3534
|
import {
|
|
@@ -3290,7 +3542,7 @@ import {
|
|
|
3290
3542
|
import { Slot as Slot4 } from "@radix-ui/react-slot";
|
|
3291
3543
|
import { cva as cva9 } from "class-variance-authority";
|
|
3292
3544
|
import "react";
|
|
3293
|
-
import { jsx as
|
|
3545
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
3294
3546
|
var labelTextVariants = cva9("font-sans font-semibold ", {
|
|
3295
3547
|
variants: {
|
|
3296
3548
|
size: {
|
|
@@ -3311,7 +3563,7 @@ function Label3({
|
|
|
3311
3563
|
...props
|
|
3312
3564
|
}) {
|
|
3313
3565
|
const Comp = asChild ? Slot4 : "label";
|
|
3314
|
-
return /* @__PURE__ */
|
|
3566
|
+
return /* @__PURE__ */ jsx31(
|
|
3315
3567
|
Comp,
|
|
3316
3568
|
{
|
|
3317
3569
|
"data-slot": "label",
|
|
@@ -3322,19 +3574,19 @@ function Label3({
|
|
|
3322
3574
|
}
|
|
3323
3575
|
|
|
3324
3576
|
// src/components/ui/form.tsx
|
|
3325
|
-
import { jsx as
|
|
3577
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
3326
3578
|
var Form = FormProvider;
|
|
3327
|
-
var FormFieldContext =
|
|
3579
|
+
var FormFieldContext = React30.createContext(
|
|
3328
3580
|
{}
|
|
3329
3581
|
);
|
|
3330
3582
|
var FormField = ({
|
|
3331
3583
|
...props
|
|
3332
3584
|
}) => {
|
|
3333
|
-
return /* @__PURE__ */
|
|
3585
|
+
return /* @__PURE__ */ jsx32(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsx32(Controller, { ...props }) });
|
|
3334
3586
|
};
|
|
3335
3587
|
var useFormField = () => {
|
|
3336
|
-
const fieldContext =
|
|
3337
|
-
const itemContext =
|
|
3588
|
+
const fieldContext = React30.useContext(FormFieldContext);
|
|
3589
|
+
const itemContext = React30.useContext(FormItemContext);
|
|
3338
3590
|
const { getFieldState } = useFormContext();
|
|
3339
3591
|
const formState = useFormState({ name: fieldContext.name });
|
|
3340
3592
|
const fieldState = getFieldState(fieldContext.name, formState);
|
|
@@ -3351,12 +3603,12 @@ var useFormField = () => {
|
|
|
3351
3603
|
...fieldState
|
|
3352
3604
|
};
|
|
3353
3605
|
};
|
|
3354
|
-
var FormItemContext =
|
|
3606
|
+
var FormItemContext = React30.createContext(
|
|
3355
3607
|
{}
|
|
3356
3608
|
);
|
|
3357
3609
|
function FormItem({ className, ...props }) {
|
|
3358
|
-
const id =
|
|
3359
|
-
return /* @__PURE__ */
|
|
3610
|
+
const id = React30.useId();
|
|
3611
|
+
return /* @__PURE__ */ jsx32(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ jsx32(
|
|
3360
3612
|
"div",
|
|
3361
3613
|
{
|
|
3362
3614
|
"data-slot": "form-item",
|
|
@@ -3370,7 +3622,7 @@ function FormLabel({
|
|
|
3370
3622
|
...props
|
|
3371
3623
|
}) {
|
|
3372
3624
|
const { error, formItemId } = useFormField();
|
|
3373
|
-
return /* @__PURE__ */
|
|
3625
|
+
return /* @__PURE__ */ jsx32(
|
|
3374
3626
|
Label3,
|
|
3375
3627
|
{
|
|
3376
3628
|
"data-slot": "form-label",
|
|
@@ -3383,7 +3635,7 @@ function FormLabel({
|
|
|
3383
3635
|
}
|
|
3384
3636
|
function FormControl({ ...props }) {
|
|
3385
3637
|
const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
|
|
3386
|
-
return /* @__PURE__ */
|
|
3638
|
+
return /* @__PURE__ */ jsx32(
|
|
3387
3639
|
Slot5,
|
|
3388
3640
|
{
|
|
3389
3641
|
"data-slot": "form-control",
|
|
@@ -3396,7 +3648,7 @@ function FormControl({ ...props }) {
|
|
|
3396
3648
|
}
|
|
3397
3649
|
function FormDescription({ className, ...props }) {
|
|
3398
3650
|
const { formDescriptionId } = useFormField();
|
|
3399
|
-
return /* @__PURE__ */
|
|
3651
|
+
return /* @__PURE__ */ jsx32(
|
|
3400
3652
|
"p",
|
|
3401
3653
|
{
|
|
3402
3654
|
"data-slot": "form-description",
|
|
@@ -3412,7 +3664,7 @@ function FormMessage({ className, ...props }) {
|
|
|
3412
3664
|
if (!body) {
|
|
3413
3665
|
return null;
|
|
3414
3666
|
}
|
|
3415
|
-
return /* @__PURE__ */
|
|
3667
|
+
return /* @__PURE__ */ jsx32(
|
|
3416
3668
|
"p",
|
|
3417
3669
|
{
|
|
3418
3670
|
"data-slot": "form-message",
|
|
@@ -3427,16 +3679,16 @@ function FormMessage({ className, ...props }) {
|
|
|
3427
3679
|
// src/components/ui/hover-card.tsx
|
|
3428
3680
|
import "react";
|
|
3429
3681
|
import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
|
|
3430
|
-
import { jsx as
|
|
3682
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
3431
3683
|
function HoverCard({
|
|
3432
3684
|
...props
|
|
3433
3685
|
}) {
|
|
3434
|
-
return /* @__PURE__ */
|
|
3686
|
+
return /* @__PURE__ */ jsx33(HoverCardPrimitive.Root, { "data-slot": "hover-card", ...props });
|
|
3435
3687
|
}
|
|
3436
3688
|
function HoverCardTrigger({
|
|
3437
3689
|
...props
|
|
3438
3690
|
}) {
|
|
3439
|
-
return /* @__PURE__ */
|
|
3691
|
+
return /* @__PURE__ */ jsx33(HoverCardPrimitive.Trigger, { "data-slot": "hover-card-trigger", ...props });
|
|
3440
3692
|
}
|
|
3441
3693
|
function HoverCardContent({
|
|
3442
3694
|
className,
|
|
@@ -3444,7 +3696,7 @@ function HoverCardContent({
|
|
|
3444
3696
|
sideOffset = 4,
|
|
3445
3697
|
...props
|
|
3446
3698
|
}) {
|
|
3447
|
-
return /* @__PURE__ */
|
|
3699
|
+
return /* @__PURE__ */ jsx33(HoverCardPrimitive.Portal, { "data-slot": "hover-card-portal", children: /* @__PURE__ */ jsx33(
|
|
3448
3700
|
HoverCardPrimitive.Content,
|
|
3449
3701
|
{
|
|
3450
3702
|
"data-slot": "hover-card-content",
|
|
@@ -3460,16 +3712,16 @@ function HoverCardContent({
|
|
|
3460
3712
|
}
|
|
3461
3713
|
|
|
3462
3714
|
// src/components/ui/input-otp.tsx
|
|
3463
|
-
import * as
|
|
3715
|
+
import * as React32 from "react";
|
|
3464
3716
|
import { OTPInput, OTPInputContext } from "input-otp";
|
|
3465
3717
|
import { MinusIcon } from "lucide-react";
|
|
3466
|
-
import { jsx as
|
|
3718
|
+
import { jsx as jsx34, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
3467
3719
|
function InputOTP({
|
|
3468
3720
|
className,
|
|
3469
3721
|
containerClassName,
|
|
3470
3722
|
...props
|
|
3471
3723
|
}) {
|
|
3472
|
-
return /* @__PURE__ */
|
|
3724
|
+
return /* @__PURE__ */ jsx34(
|
|
3473
3725
|
OTPInput,
|
|
3474
3726
|
{
|
|
3475
3727
|
"data-slot": "input-otp",
|
|
@@ -3483,7 +3735,7 @@ function InputOTP({
|
|
|
3483
3735
|
);
|
|
3484
3736
|
}
|
|
3485
3737
|
function InputOTPGroup({ className, ...props }) {
|
|
3486
|
-
return /* @__PURE__ */
|
|
3738
|
+
return /* @__PURE__ */ jsx34(
|
|
3487
3739
|
"div",
|
|
3488
3740
|
{
|
|
3489
3741
|
"data-slot": "input-otp-group",
|
|
@@ -3497,9 +3749,9 @@ function InputOTPSlot({
|
|
|
3497
3749
|
className,
|
|
3498
3750
|
...props
|
|
3499
3751
|
}) {
|
|
3500
|
-
const inputOTPContext =
|
|
3752
|
+
const inputOTPContext = React32.useContext(OTPInputContext);
|
|
3501
3753
|
const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {};
|
|
3502
|
-
return /* @__PURE__ */
|
|
3754
|
+
return /* @__PURE__ */ jsxs18(
|
|
3503
3755
|
"div",
|
|
3504
3756
|
{
|
|
3505
3757
|
"data-slot": "input-otp-slot",
|
|
@@ -3511,25 +3763,25 @@ function InputOTPSlot({
|
|
|
3511
3763
|
...props,
|
|
3512
3764
|
children: [
|
|
3513
3765
|
char,
|
|
3514
|
-
hasFakeCaret && /* @__PURE__ */
|
|
3766
|
+
hasFakeCaret && /* @__PURE__ */ jsx34("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsx34("div", { className: "animate-caret-blink bg-foreground h-4 w-px duration-1000" }) })
|
|
3515
3767
|
]
|
|
3516
3768
|
}
|
|
3517
3769
|
);
|
|
3518
3770
|
}
|
|
3519
3771
|
function InputOTPSeparator({ ...props }) {
|
|
3520
|
-
return /* @__PURE__ */
|
|
3772
|
+
return /* @__PURE__ */ jsx34("div", { "data-slot": "input-otp-separator", role: "separator", ...props, children: /* @__PURE__ */ jsx34(MinusIcon, {}) });
|
|
3521
3773
|
}
|
|
3522
3774
|
|
|
3523
3775
|
// src/components/ui/menubar.tsx
|
|
3524
3776
|
import "react";
|
|
3525
3777
|
import * as MenubarPrimitive from "@radix-ui/react-menubar";
|
|
3526
3778
|
import { CheckIcon as CheckIcon3, ChevronRightIcon as ChevronRightIcon4, CircleIcon as CircleIcon3 } from "lucide-react";
|
|
3527
|
-
import { jsx as
|
|
3779
|
+
import { jsx as jsx35, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
3528
3780
|
function Menubar({
|
|
3529
3781
|
className,
|
|
3530
3782
|
...props
|
|
3531
3783
|
}) {
|
|
3532
|
-
return /* @__PURE__ */
|
|
3784
|
+
return /* @__PURE__ */ jsx35(
|
|
3533
3785
|
MenubarPrimitive.Root,
|
|
3534
3786
|
{
|
|
3535
3787
|
"data-slot": "menubar",
|
|
@@ -3544,28 +3796,28 @@ function Menubar({
|
|
|
3544
3796
|
function MenubarMenu({
|
|
3545
3797
|
...props
|
|
3546
3798
|
}) {
|
|
3547
|
-
return /* @__PURE__ */
|
|
3799
|
+
return /* @__PURE__ */ jsx35(MenubarPrimitive.Menu, { "data-slot": "menubar-menu", ...props });
|
|
3548
3800
|
}
|
|
3549
3801
|
function MenubarGroup({
|
|
3550
3802
|
...props
|
|
3551
3803
|
}) {
|
|
3552
|
-
return /* @__PURE__ */
|
|
3804
|
+
return /* @__PURE__ */ jsx35(MenubarPrimitive.Group, { "data-slot": "menubar-group", ...props });
|
|
3553
3805
|
}
|
|
3554
3806
|
function MenubarPortal({
|
|
3555
3807
|
...props
|
|
3556
3808
|
}) {
|
|
3557
|
-
return /* @__PURE__ */
|
|
3809
|
+
return /* @__PURE__ */ jsx35(MenubarPrimitive.Portal, { "data-slot": "menubar-portal", ...props });
|
|
3558
3810
|
}
|
|
3559
3811
|
function MenubarRadioGroup({
|
|
3560
3812
|
...props
|
|
3561
3813
|
}) {
|
|
3562
|
-
return /* @__PURE__ */
|
|
3814
|
+
return /* @__PURE__ */ jsx35(MenubarPrimitive.RadioGroup, { "data-slot": "menubar-radio-group", ...props });
|
|
3563
3815
|
}
|
|
3564
3816
|
function MenubarTrigger({
|
|
3565
3817
|
className,
|
|
3566
3818
|
...props
|
|
3567
3819
|
}) {
|
|
3568
|
-
return /* @__PURE__ */
|
|
3820
|
+
return /* @__PURE__ */ jsx35(
|
|
3569
3821
|
MenubarPrimitive.Trigger,
|
|
3570
3822
|
{
|
|
3571
3823
|
"data-slot": "menubar-trigger",
|
|
@@ -3584,7 +3836,7 @@ function MenubarContent({
|
|
|
3584
3836
|
sideOffset = 8,
|
|
3585
3837
|
...props
|
|
3586
3838
|
}) {
|
|
3587
|
-
return /* @__PURE__ */
|
|
3839
|
+
return /* @__PURE__ */ jsx35(MenubarPortal, { children: /* @__PURE__ */ jsx35(
|
|
3588
3840
|
MenubarPrimitive.Content,
|
|
3589
3841
|
{
|
|
3590
3842
|
"data-slot": "menubar-content",
|
|
@@ -3605,7 +3857,7 @@ function MenubarItem({
|
|
|
3605
3857
|
variant = "default",
|
|
3606
3858
|
...props
|
|
3607
3859
|
}) {
|
|
3608
|
-
return /* @__PURE__ */
|
|
3860
|
+
return /* @__PURE__ */ jsx35(
|
|
3609
3861
|
MenubarPrimitive.Item,
|
|
3610
3862
|
{
|
|
3611
3863
|
"data-slot": "menubar-item",
|
|
@@ -3625,7 +3877,7 @@ function MenubarCheckboxItem({
|
|
|
3625
3877
|
checked,
|
|
3626
3878
|
...props
|
|
3627
3879
|
}) {
|
|
3628
|
-
return /* @__PURE__ */
|
|
3880
|
+
return /* @__PURE__ */ jsxs19(
|
|
3629
3881
|
MenubarPrimitive.CheckboxItem,
|
|
3630
3882
|
{
|
|
3631
3883
|
"data-slot": "menubar-checkbox-item",
|
|
@@ -3636,7 +3888,7 @@ function MenubarCheckboxItem({
|
|
|
3636
3888
|
checked,
|
|
3637
3889
|
...props,
|
|
3638
3890
|
children: [
|
|
3639
|
-
/* @__PURE__ */
|
|
3891
|
+
/* @__PURE__ */ jsx35("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx35(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx35(CheckIcon3, { className: "size-4" }) }) }),
|
|
3640
3892
|
children
|
|
3641
3893
|
]
|
|
3642
3894
|
}
|
|
@@ -3647,7 +3899,7 @@ function MenubarRadioItem({
|
|
|
3647
3899
|
children,
|
|
3648
3900
|
...props
|
|
3649
3901
|
}) {
|
|
3650
|
-
return /* @__PURE__ */
|
|
3902
|
+
return /* @__PURE__ */ jsxs19(
|
|
3651
3903
|
MenubarPrimitive.RadioItem,
|
|
3652
3904
|
{
|
|
3653
3905
|
"data-slot": "menubar-radio-item",
|
|
@@ -3657,7 +3909,7 @@ function MenubarRadioItem({
|
|
|
3657
3909
|
),
|
|
3658
3910
|
...props,
|
|
3659
3911
|
children: [
|
|
3660
|
-
/* @__PURE__ */
|
|
3912
|
+
/* @__PURE__ */ jsx35("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx35(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx35(CircleIcon3, { className: "size-2 fill-current" }) }) }),
|
|
3661
3913
|
children
|
|
3662
3914
|
]
|
|
3663
3915
|
}
|
|
@@ -3668,7 +3920,7 @@ function MenubarLabel({
|
|
|
3668
3920
|
inset,
|
|
3669
3921
|
...props
|
|
3670
3922
|
}) {
|
|
3671
|
-
return /* @__PURE__ */
|
|
3923
|
+
return /* @__PURE__ */ jsx35(
|
|
3672
3924
|
MenubarPrimitive.Label,
|
|
3673
3925
|
{
|
|
3674
3926
|
"data-slot": "menubar-label",
|
|
@@ -3685,7 +3937,7 @@ function MenubarSeparator({
|
|
|
3685
3937
|
className,
|
|
3686
3938
|
...props
|
|
3687
3939
|
}) {
|
|
3688
|
-
return /* @__PURE__ */
|
|
3940
|
+
return /* @__PURE__ */ jsx35(
|
|
3689
3941
|
MenubarPrimitive.Separator,
|
|
3690
3942
|
{
|
|
3691
3943
|
"data-slot": "menubar-separator",
|
|
@@ -3698,7 +3950,7 @@ function MenubarShortcut({
|
|
|
3698
3950
|
className,
|
|
3699
3951
|
...props
|
|
3700
3952
|
}) {
|
|
3701
|
-
return /* @__PURE__ */
|
|
3953
|
+
return /* @__PURE__ */ jsx35(
|
|
3702
3954
|
"span",
|
|
3703
3955
|
{
|
|
3704
3956
|
"data-slot": "menubar-shortcut",
|
|
@@ -3713,7 +3965,7 @@ function MenubarShortcut({
|
|
|
3713
3965
|
function MenubarSub({
|
|
3714
3966
|
...props
|
|
3715
3967
|
}) {
|
|
3716
|
-
return /* @__PURE__ */
|
|
3968
|
+
return /* @__PURE__ */ jsx35(MenubarPrimitive.Sub, { "data-slot": "menubar-sub", ...props });
|
|
3717
3969
|
}
|
|
3718
3970
|
function MenubarSubTrigger({
|
|
3719
3971
|
className,
|
|
@@ -3721,7 +3973,7 @@ function MenubarSubTrigger({
|
|
|
3721
3973
|
children,
|
|
3722
3974
|
...props
|
|
3723
3975
|
}) {
|
|
3724
|
-
return /* @__PURE__ */
|
|
3976
|
+
return /* @__PURE__ */ jsxs19(
|
|
3725
3977
|
MenubarPrimitive.SubTrigger,
|
|
3726
3978
|
{
|
|
3727
3979
|
"data-slot": "menubar-sub-trigger",
|
|
@@ -3733,7 +3985,7 @@ function MenubarSubTrigger({
|
|
|
3733
3985
|
...props,
|
|
3734
3986
|
children: [
|
|
3735
3987
|
children,
|
|
3736
|
-
/* @__PURE__ */
|
|
3988
|
+
/* @__PURE__ */ jsx35(ChevronRightIcon4, { className: "ml-auto h-4 w-4" })
|
|
3737
3989
|
]
|
|
3738
3990
|
}
|
|
3739
3991
|
);
|
|
@@ -3742,7 +3994,7 @@ function MenubarSubContent({
|
|
|
3742
3994
|
className,
|
|
3743
3995
|
...props
|
|
3744
3996
|
}) {
|
|
3745
|
-
return /* @__PURE__ */
|
|
3997
|
+
return /* @__PURE__ */ jsx35(
|
|
3746
3998
|
MenubarPrimitive.SubContent,
|
|
3747
3999
|
{
|
|
3748
4000
|
"data-slot": "menubar-sub-content",
|
|
@@ -3755,19 +4007,269 @@ function MenubarSubContent({
|
|
|
3755
4007
|
);
|
|
3756
4008
|
}
|
|
3757
4009
|
|
|
4010
|
+
// src/components/ui/multi-select-free-text.tsx
|
|
4011
|
+
import * as React34 from "react";
|
|
4012
|
+
import * as PopoverPrimitive3 from "@radix-ui/react-popover";
|
|
4013
|
+
import { ChevronDown as ChevronDown2, X as X2 } from "lucide-react";
|
|
4014
|
+
import { jsx as jsx36, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
4015
|
+
function Tag({ label, onRemove }) {
|
|
4016
|
+
return /* @__PURE__ */ jsxs20(
|
|
4017
|
+
"span",
|
|
4018
|
+
{
|
|
4019
|
+
"data-slot": "multi-select-tag",
|
|
4020
|
+
className: "inline-flex items-center gap-[8px] h-[32px] px-[12px] py-[8px] rounded-[8px] bg-primary-surface-subtle font-sans font-medium text-[14px] leading-[20px] text-primary-stroke-default shrink-0",
|
|
4021
|
+
children: [
|
|
4022
|
+
label,
|
|
4023
|
+
/* @__PURE__ */ jsx36(
|
|
4024
|
+
"button",
|
|
4025
|
+
{
|
|
4026
|
+
type: "button",
|
|
4027
|
+
onClick: (e) => {
|
|
4028
|
+
e.stopPropagation();
|
|
4029
|
+
onRemove();
|
|
4030
|
+
},
|
|
4031
|
+
className: "flex items-center justify-center size-[20px] text-primary-stroke-default hover:text-primary-surface-default transition-colors cursor-pointer",
|
|
4032
|
+
"aria-label": `Remove ${label}`,
|
|
4033
|
+
children: /* @__PURE__ */ jsx36(X2, { className: "size-[16px]" })
|
|
4034
|
+
}
|
|
4035
|
+
)
|
|
4036
|
+
]
|
|
4037
|
+
}
|
|
4038
|
+
);
|
|
4039
|
+
}
|
|
4040
|
+
function MultiSelectFreeText({
|
|
4041
|
+
values: valuesProp,
|
|
4042
|
+
defaultValues = [],
|
|
4043
|
+
onValuesChange,
|
|
4044
|
+
options = [],
|
|
4045
|
+
placeholder = "Placeholder text",
|
|
4046
|
+
icon,
|
|
4047
|
+
label,
|
|
4048
|
+
mandatory = false,
|
|
4049
|
+
disabled = false,
|
|
4050
|
+
className
|
|
4051
|
+
}) {
|
|
4052
|
+
const [internalValues, setInternalValues] = React34.useState(defaultValues);
|
|
4053
|
+
const [inputValue, setInputValue] = React34.useState("");
|
|
4054
|
+
const [open, setOpen] = React34.useState(false);
|
|
4055
|
+
const [highlightedIndex, setHighlightedIndex] = React34.useState(-1);
|
|
4056
|
+
const inputRef = React34.useRef(null);
|
|
4057
|
+
const triggerRef = React34.useRef(null);
|
|
4058
|
+
const isControlled = valuesProp !== void 0;
|
|
4059
|
+
const values = isControlled ? valuesProp : internalValues;
|
|
4060
|
+
const updateValues = React34.useCallback(
|
|
4061
|
+
(next) => {
|
|
4062
|
+
if (!isControlled) setInternalValues(next);
|
|
4063
|
+
onValuesChange?.(next);
|
|
4064
|
+
},
|
|
4065
|
+
[isControlled, onValuesChange]
|
|
4066
|
+
);
|
|
4067
|
+
const addTag = React34.useCallback(
|
|
4068
|
+
(tag) => {
|
|
4069
|
+
const trimmed = tag.trim();
|
|
4070
|
+
if (!trimmed || values.includes(trimmed)) return;
|
|
4071
|
+
updateValues([...values, trimmed]);
|
|
4072
|
+
setInputValue("");
|
|
4073
|
+
setHighlightedIndex(-1);
|
|
4074
|
+
},
|
|
4075
|
+
[values, updateValues]
|
|
4076
|
+
);
|
|
4077
|
+
const removeTag = React34.useCallback(
|
|
4078
|
+
(tag) => {
|
|
4079
|
+
updateValues(values.filter((v) => v !== tag));
|
|
4080
|
+
},
|
|
4081
|
+
[values, updateValues]
|
|
4082
|
+
);
|
|
4083
|
+
const filteredOptions = React34.useMemo(() => {
|
|
4084
|
+
const lower = inputValue.toLowerCase();
|
|
4085
|
+
return options.filter(
|
|
4086
|
+
(opt) => !values.includes(opt.value) && (lower === "" || opt.label.toLowerCase().includes(lower))
|
|
4087
|
+
);
|
|
4088
|
+
}, [options, inputValue, values]);
|
|
4089
|
+
const handleKeyDown = React34.useCallback(
|
|
4090
|
+
(e) => {
|
|
4091
|
+
if (e.key === "Enter") {
|
|
4092
|
+
e.preventDefault();
|
|
4093
|
+
if (highlightedIndex >= 0 && filteredOptions[highlightedIndex]) {
|
|
4094
|
+
addTag(filteredOptions[highlightedIndex].value);
|
|
4095
|
+
} else if (inputValue.trim()) {
|
|
4096
|
+
addTag(inputValue);
|
|
4097
|
+
}
|
|
4098
|
+
} else if (e.key === "Backspace" && inputValue === "" && values.length > 0) {
|
|
4099
|
+
removeTag(values[values.length - 1]);
|
|
4100
|
+
} else if (e.key === "ArrowDown") {
|
|
4101
|
+
e.preventDefault();
|
|
4102
|
+
if (!open) {
|
|
4103
|
+
setOpen(true);
|
|
4104
|
+
return;
|
|
4105
|
+
}
|
|
4106
|
+
setHighlightedIndex(
|
|
4107
|
+
(prev) => prev < filteredOptions.length - 1 ? prev + 1 : 0
|
|
4108
|
+
);
|
|
4109
|
+
} else if (e.key === "ArrowUp") {
|
|
4110
|
+
e.preventDefault();
|
|
4111
|
+
setHighlightedIndex(
|
|
4112
|
+
(prev) => prev > 0 ? prev - 1 : filteredOptions.length - 1
|
|
4113
|
+
);
|
|
4114
|
+
} else if (e.key === "Escape") {
|
|
4115
|
+
setOpen(false);
|
|
4116
|
+
setHighlightedIndex(-1);
|
|
4117
|
+
}
|
|
4118
|
+
},
|
|
4119
|
+
[highlightedIndex, filteredOptions, inputValue, values, addTag, removeTag, open]
|
|
4120
|
+
);
|
|
4121
|
+
const handleInputChange = React34.useCallback(
|
|
4122
|
+
(e) => {
|
|
4123
|
+
setInputValue(e.target.value);
|
|
4124
|
+
if (!open) setOpen(true);
|
|
4125
|
+
setHighlightedIndex(-1);
|
|
4126
|
+
},
|
|
4127
|
+
[open]
|
|
4128
|
+
);
|
|
4129
|
+
const handleOptionClick = React34.useCallback(
|
|
4130
|
+
(optValue) => {
|
|
4131
|
+
addTag(optValue);
|
|
4132
|
+
inputRef.current?.focus();
|
|
4133
|
+
},
|
|
4134
|
+
[addTag]
|
|
4135
|
+
);
|
|
4136
|
+
const handleTriggerClick = React34.useCallback(() => {
|
|
4137
|
+
if (disabled) return;
|
|
4138
|
+
inputRef.current?.focus();
|
|
4139
|
+
if (!open) setOpen(true);
|
|
4140
|
+
}, [disabled, open]);
|
|
4141
|
+
const isFocused = open;
|
|
4142
|
+
return /* @__PURE__ */ jsx36(PopoverPrimitive3.Root, { open, onOpenChange: disabled ? void 0 : setOpen, children: /* @__PURE__ */ jsxs20(
|
|
4143
|
+
"div",
|
|
4144
|
+
{
|
|
4145
|
+
"data-slot": "multi-select-free-text",
|
|
4146
|
+
className: cn("flex flex-col gap-[8px] items-start w-full", className),
|
|
4147
|
+
children: [
|
|
4148
|
+
label && /* @__PURE__ */ jsxs20("div", { className: "flex items-center font-sans font-medium text-[14px] leading-[20px] text-vibrant-text-details", children: [
|
|
4149
|
+
label,
|
|
4150
|
+
mandatory && /* @__PURE__ */ jsx36("span", { className: "text-error-surface-default ml-0.5 text-[14px] leading-[20px]", children: "*" })
|
|
4151
|
+
] }),
|
|
4152
|
+
/* @__PURE__ */ jsx36(PopoverPrimitive3.Anchor, { asChild: true, children: /* @__PURE__ */ jsxs20(
|
|
4153
|
+
"div",
|
|
4154
|
+
{
|
|
4155
|
+
ref: triggerRef,
|
|
4156
|
+
onClick: handleTriggerClick,
|
|
4157
|
+
className: cn(
|
|
4158
|
+
"flex flex-wrap items-center gap-[8px] w-full min-h-[48px] rounded-[8px] px-[12px] py-[8px] border bg-white dark:bg-background transition-colors cursor-text",
|
|
4159
|
+
isFocused && !disabled ? "border-focus-ring" : "border-gray-stroke-default",
|
|
4160
|
+
!disabled && !isFocused && "hover:border-focus-ring",
|
|
4161
|
+
disabled && "opacity-60 cursor-not-allowed"
|
|
4162
|
+
),
|
|
4163
|
+
children: [
|
|
4164
|
+
icon && /* @__PURE__ */ jsx36("span", { className: "flex items-center justify-center shrink-0 size-[20px] [&_svg]:size-[20px] text-muted-foreground", children: icon }),
|
|
4165
|
+
/* @__PURE__ */ jsxs20("div", { className: "flex flex-wrap items-center gap-[8px] flex-1 min-w-0", children: [
|
|
4166
|
+
values.map((tag) => /* @__PURE__ */ jsx36(Tag, { label: tag, onRemove: () => removeTag(tag) }, tag)),
|
|
4167
|
+
/* @__PURE__ */ jsx36(
|
|
4168
|
+
"input",
|
|
4169
|
+
{
|
|
4170
|
+
ref: inputRef,
|
|
4171
|
+
type: "text",
|
|
4172
|
+
value: inputValue,
|
|
4173
|
+
onChange: handleInputChange,
|
|
4174
|
+
onKeyDown: handleKeyDown,
|
|
4175
|
+
onFocus: () => {
|
|
4176
|
+
if (!open && !disabled) setOpen(true);
|
|
4177
|
+
},
|
|
4178
|
+
disabled,
|
|
4179
|
+
placeholder: values.length === 0 ? placeholder : "",
|
|
4180
|
+
className: cn(
|
|
4181
|
+
"flex-1 min-w-[80px] bg-transparent outline-none font-sans font-medium text-[16px] leading-[24px] text-vibrant-text-heading placeholder:text-muted-foreground",
|
|
4182
|
+
disabled && "cursor-not-allowed"
|
|
4183
|
+
)
|
|
4184
|
+
}
|
|
4185
|
+
)
|
|
4186
|
+
] }),
|
|
4187
|
+
/* @__PURE__ */ jsx36(
|
|
4188
|
+
ChevronDown2,
|
|
4189
|
+
{
|
|
4190
|
+
className: cn(
|
|
4191
|
+
"shrink-0 size-[20px] text-muted-foreground transition-transform",
|
|
4192
|
+
open && "rotate-180"
|
|
4193
|
+
)
|
|
4194
|
+
}
|
|
4195
|
+
)
|
|
4196
|
+
]
|
|
4197
|
+
}
|
|
4198
|
+
) }),
|
|
4199
|
+
/* @__PURE__ */ jsx36(PopoverPrimitive3.Portal, { children: /* @__PURE__ */ jsx36(
|
|
4200
|
+
PopoverPrimitive3.Content,
|
|
4201
|
+
{
|
|
4202
|
+
"data-slot": "multi-select-free-text-content",
|
|
4203
|
+
sideOffset: 8,
|
|
4204
|
+
align: "start",
|
|
4205
|
+
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
4206
|
+
onCloseAutoFocus: (e) => e.preventDefault(),
|
|
4207
|
+
className: cn(
|
|
4208
|
+
"z-50 w-[var(--radix-popover-trigger-width)] rounded-[8px] border border-gray-stroke-light bg-white dark:bg-card p-[12px] shadow-[0px_4px_24px_0px_rgba(0,0,0,0.05)]",
|
|
4209
|
+
"max-h-[300px] overflow-y-auto overflow-x-hidden",
|
|
4210
|
+
"[&::-webkit-scrollbar]:w-[5px] [&::-webkit-scrollbar-track]:rounded-[3px] [&::-webkit-scrollbar-track]:bg-gray-surface-light [&::-webkit-scrollbar-thumb]:rounded-[3px] [&::-webkit-scrollbar-thumb]:bg-gray-surface-default",
|
|
4211
|
+
"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2"
|
|
4212
|
+
),
|
|
4213
|
+
children: /* @__PURE__ */ jsxs20("div", { role: "listbox", className: "flex flex-col", children: [
|
|
4214
|
+
inputValue.trim() !== "" && !options.some(
|
|
4215
|
+
(o) => o.label.toLowerCase() === inputValue.toLowerCase()
|
|
4216
|
+
) && /* @__PURE__ */ jsx36(
|
|
4217
|
+
"div",
|
|
4218
|
+
{
|
|
4219
|
+
role: "option",
|
|
4220
|
+
"aria-selected": false,
|
|
4221
|
+
"data-slot": "multi-select-free-text-option",
|
|
4222
|
+
onClick: () => addTag(inputValue.trim()),
|
|
4223
|
+
onMouseEnter: () => setHighlightedIndex(-2),
|
|
4224
|
+
onMouseLeave: () => setHighlightedIndex(-1),
|
|
4225
|
+
className: cn(
|
|
4226
|
+
"flex items-center h-[48px] px-[8px] rounded-[8px] font-sans font-medium text-[16px] leading-[24px] text-vibrant-text-heading cursor-pointer select-none transition-colors",
|
|
4227
|
+
"hover:bg-gray-surface-light hover:font-semibold",
|
|
4228
|
+
highlightedIndex === -2 && "bg-gray-surface-light font-semibold"
|
|
4229
|
+
),
|
|
4230
|
+
children: inputValue.trim()
|
|
4231
|
+
}
|
|
4232
|
+
),
|
|
4233
|
+
filteredOptions.map((opt, idx) => /* @__PURE__ */ jsx36(
|
|
4234
|
+
"div",
|
|
4235
|
+
{
|
|
4236
|
+
role: "option",
|
|
4237
|
+
"aria-selected": values.includes(opt.value),
|
|
4238
|
+
"data-slot": "multi-select-free-text-option",
|
|
4239
|
+
onClick: () => handleOptionClick(opt.value),
|
|
4240
|
+
onMouseEnter: () => setHighlightedIndex(idx),
|
|
4241
|
+
onMouseLeave: () => setHighlightedIndex(-1),
|
|
4242
|
+
className: cn(
|
|
4243
|
+
"flex items-center h-[48px] px-[8px] rounded-[8px] font-sans font-medium text-[16px] leading-[24px] text-vibrant-text-heading cursor-pointer select-none transition-colors",
|
|
4244
|
+
"hover:bg-gray-surface-light hover:font-semibold",
|
|
4245
|
+
highlightedIndex === idx && "bg-gray-surface-light font-semibold"
|
|
4246
|
+
),
|
|
4247
|
+
children: opt.label
|
|
4248
|
+
},
|
|
4249
|
+
opt.value
|
|
4250
|
+
)),
|
|
4251
|
+
filteredOptions.length === 0 && inputValue.trim() === "" && /* @__PURE__ */ jsx36("div", { className: "flex items-center h-[48px] px-[8px] font-sans font-medium text-[14px] leading-[20px] text-muted-foreground", children: "No options available" })
|
|
4252
|
+
] })
|
|
4253
|
+
}
|
|
4254
|
+
) })
|
|
4255
|
+
]
|
|
4256
|
+
}
|
|
4257
|
+
) });
|
|
4258
|
+
}
|
|
4259
|
+
|
|
3758
4260
|
// src/components/ui/navigation-menu.tsx
|
|
3759
4261
|
import "react";
|
|
3760
4262
|
import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
|
|
3761
4263
|
import { cva as cva10 } from "class-variance-authority";
|
|
3762
4264
|
import { ChevronDownIcon as ChevronDownIcon3 } from "lucide-react";
|
|
3763
|
-
import { jsx as
|
|
4265
|
+
import { jsx as jsx37, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
3764
4266
|
function NavigationMenu({
|
|
3765
4267
|
className,
|
|
3766
4268
|
children,
|
|
3767
4269
|
viewport = true,
|
|
3768
4270
|
...props
|
|
3769
4271
|
}) {
|
|
3770
|
-
return /* @__PURE__ */
|
|
4272
|
+
return /* @__PURE__ */ jsxs21(
|
|
3771
4273
|
NavigationMenuPrimitive.Root,
|
|
3772
4274
|
{
|
|
3773
4275
|
"data-slot": "navigation-menu",
|
|
@@ -3779,7 +4281,7 @@ function NavigationMenu({
|
|
|
3779
4281
|
...props,
|
|
3780
4282
|
children: [
|
|
3781
4283
|
children,
|
|
3782
|
-
viewport && /* @__PURE__ */
|
|
4284
|
+
viewport && /* @__PURE__ */ jsx37(NavigationMenuViewport, {})
|
|
3783
4285
|
]
|
|
3784
4286
|
}
|
|
3785
4287
|
);
|
|
@@ -3788,7 +4290,7 @@ function NavigationMenuList({
|
|
|
3788
4290
|
className,
|
|
3789
4291
|
...props
|
|
3790
4292
|
}) {
|
|
3791
|
-
return /* @__PURE__ */
|
|
4293
|
+
return /* @__PURE__ */ jsx37(
|
|
3792
4294
|
NavigationMenuPrimitive.List,
|
|
3793
4295
|
{
|
|
3794
4296
|
"data-slot": "navigation-menu-list",
|
|
@@ -3804,7 +4306,7 @@ function NavigationMenuItem({
|
|
|
3804
4306
|
className,
|
|
3805
4307
|
...props
|
|
3806
4308
|
}) {
|
|
3807
|
-
return /* @__PURE__ */
|
|
4309
|
+
return /* @__PURE__ */ jsx37(
|
|
3808
4310
|
NavigationMenuPrimitive.Item,
|
|
3809
4311
|
{
|
|
3810
4312
|
"data-slot": "navigation-menu-item",
|
|
@@ -3821,7 +4323,7 @@ function NavigationMenuTrigger({
|
|
|
3821
4323
|
children,
|
|
3822
4324
|
...props
|
|
3823
4325
|
}) {
|
|
3824
|
-
return /* @__PURE__ */
|
|
4326
|
+
return /* @__PURE__ */ jsxs21(
|
|
3825
4327
|
NavigationMenuPrimitive.Trigger,
|
|
3826
4328
|
{
|
|
3827
4329
|
"data-slot": "navigation-menu-trigger",
|
|
@@ -3830,7 +4332,7 @@ function NavigationMenuTrigger({
|
|
|
3830
4332
|
children: [
|
|
3831
4333
|
children,
|
|
3832
4334
|
" ",
|
|
3833
|
-
/* @__PURE__ */
|
|
4335
|
+
/* @__PURE__ */ jsx37(
|
|
3834
4336
|
ChevronDownIcon3,
|
|
3835
4337
|
{
|
|
3836
4338
|
className: "relative top-[1px] ml-1 size-3 transition duration-400 group-data-[state=open]:rotate-180",
|
|
@@ -3845,7 +4347,7 @@ function NavigationMenuContent({
|
|
|
3845
4347
|
className,
|
|
3846
4348
|
...props
|
|
3847
4349
|
}) {
|
|
3848
|
-
return /* @__PURE__ */
|
|
4350
|
+
return /* @__PURE__ */ jsx37(
|
|
3849
4351
|
NavigationMenuPrimitive.Content,
|
|
3850
4352
|
{
|
|
3851
4353
|
"data-slot": "navigation-menu-content",
|
|
@@ -3862,13 +4364,13 @@ function NavigationMenuViewport({
|
|
|
3862
4364
|
className,
|
|
3863
4365
|
...props
|
|
3864
4366
|
}) {
|
|
3865
|
-
return /* @__PURE__ */
|
|
4367
|
+
return /* @__PURE__ */ jsx37(
|
|
3866
4368
|
"div",
|
|
3867
4369
|
{
|
|
3868
4370
|
className: cn(
|
|
3869
4371
|
"absolute top-full left-0 isolate z-50 flex justify-center"
|
|
3870
4372
|
),
|
|
3871
|
-
children: /* @__PURE__ */
|
|
4373
|
+
children: /* @__PURE__ */ jsx37(
|
|
3872
4374
|
NavigationMenuPrimitive.Viewport,
|
|
3873
4375
|
{
|
|
3874
4376
|
"data-slot": "navigation-menu-viewport",
|
|
@@ -3886,7 +4388,7 @@ function NavigationMenuLink({
|
|
|
3886
4388
|
className,
|
|
3887
4389
|
...props
|
|
3888
4390
|
}) {
|
|
3889
|
-
return /* @__PURE__ */
|
|
4391
|
+
return /* @__PURE__ */ jsx37(
|
|
3890
4392
|
NavigationMenuPrimitive.Link,
|
|
3891
4393
|
{
|
|
3892
4394
|
"data-slot": "navigation-menu-link",
|
|
@@ -3902,7 +4404,7 @@ function NavigationMenuIndicator({
|
|
|
3902
4404
|
className,
|
|
3903
4405
|
...props
|
|
3904
4406
|
}) {
|
|
3905
|
-
return /* @__PURE__ */
|
|
4407
|
+
return /* @__PURE__ */ jsx37(
|
|
3906
4408
|
NavigationMenuPrimitive.Indicator,
|
|
3907
4409
|
{
|
|
3908
4410
|
"data-slot": "navigation-menu-indicator",
|
|
@@ -3911,7 +4413,7 @@ function NavigationMenuIndicator({
|
|
|
3911
4413
|
className
|
|
3912
4414
|
),
|
|
3913
4415
|
...props,
|
|
3914
|
-
children: /* @__PURE__ */
|
|
4416
|
+
children: /* @__PURE__ */ jsx37("div", { className: "bg-border relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm shadow-md" })
|
|
3915
4417
|
}
|
|
3916
4418
|
);
|
|
3917
4419
|
}
|
|
@@ -3923,9 +4425,9 @@ import {
|
|
|
3923
4425
|
ChevronRightIcon as ChevronRightIcon5,
|
|
3924
4426
|
MoreHorizontalIcon
|
|
3925
4427
|
} from "lucide-react";
|
|
3926
|
-
import { jsx as
|
|
4428
|
+
import { jsx as jsx38, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
3927
4429
|
function Pagination({ className, ...props }) {
|
|
3928
|
-
return /* @__PURE__ */
|
|
4430
|
+
return /* @__PURE__ */ jsx38(
|
|
3929
4431
|
"nav",
|
|
3930
4432
|
{
|
|
3931
4433
|
role: "navigation",
|
|
@@ -3940,7 +4442,7 @@ function PaginationContent({
|
|
|
3940
4442
|
className,
|
|
3941
4443
|
...props
|
|
3942
4444
|
}) {
|
|
3943
|
-
return /* @__PURE__ */
|
|
4445
|
+
return /* @__PURE__ */ jsx38(
|
|
3944
4446
|
"ul",
|
|
3945
4447
|
{
|
|
3946
4448
|
"data-slot": "pagination-content",
|
|
@@ -3950,7 +4452,7 @@ function PaginationContent({
|
|
|
3950
4452
|
);
|
|
3951
4453
|
}
|
|
3952
4454
|
function PaginationItem({ ...props }) {
|
|
3953
|
-
return /* @__PURE__ */
|
|
4455
|
+
return /* @__PURE__ */ jsx38("li", { "data-slot": "pagination-item", ...props });
|
|
3954
4456
|
}
|
|
3955
4457
|
function PaginationLink({
|
|
3956
4458
|
className,
|
|
@@ -3958,7 +4460,7 @@ function PaginationLink({
|
|
|
3958
4460
|
size = "icon",
|
|
3959
4461
|
...props
|
|
3960
4462
|
}) {
|
|
3961
|
-
return /* @__PURE__ */
|
|
4463
|
+
return /* @__PURE__ */ jsx38(
|
|
3962
4464
|
"a",
|
|
3963
4465
|
{
|
|
3964
4466
|
"aria-current": isActive ? "page" : void 0,
|
|
@@ -3979,7 +4481,7 @@ function PaginationPrevious({
|
|
|
3979
4481
|
className,
|
|
3980
4482
|
...props
|
|
3981
4483
|
}) {
|
|
3982
|
-
return /* @__PURE__ */
|
|
4484
|
+
return /* @__PURE__ */ jsxs22(
|
|
3983
4485
|
PaginationLink,
|
|
3984
4486
|
{
|
|
3985
4487
|
"aria-label": "Go to previous page",
|
|
@@ -3987,8 +4489,8 @@ function PaginationPrevious({
|
|
|
3987
4489
|
className: cn("gap-1 px-2.5 sm:pl-2.5", className),
|
|
3988
4490
|
...props,
|
|
3989
4491
|
children: [
|
|
3990
|
-
/* @__PURE__ */
|
|
3991
|
-
/* @__PURE__ */
|
|
4492
|
+
/* @__PURE__ */ jsx38(ChevronLeftIcon2, {}),
|
|
4493
|
+
/* @__PURE__ */ jsx38("span", { className: "hidden sm:block", children: "Previous" })
|
|
3992
4494
|
]
|
|
3993
4495
|
}
|
|
3994
4496
|
);
|
|
@@ -3997,7 +4499,7 @@ function PaginationNext({
|
|
|
3997
4499
|
className,
|
|
3998
4500
|
...props
|
|
3999
4501
|
}) {
|
|
4000
|
-
return /* @__PURE__ */
|
|
4502
|
+
return /* @__PURE__ */ jsxs22(
|
|
4001
4503
|
PaginationLink,
|
|
4002
4504
|
{
|
|
4003
4505
|
"aria-label": "Go to next page",
|
|
@@ -4005,8 +4507,8 @@ function PaginationNext({
|
|
|
4005
4507
|
className: cn("gap-1 px-2.5 sm:pr-2.5", className),
|
|
4006
4508
|
...props,
|
|
4007
4509
|
children: [
|
|
4008
|
-
/* @__PURE__ */
|
|
4009
|
-
/* @__PURE__ */
|
|
4510
|
+
/* @__PURE__ */ jsx38("span", { className: "hidden sm:block", children: "Next" }),
|
|
4511
|
+
/* @__PURE__ */ jsx38(ChevronRightIcon5, {})
|
|
4010
4512
|
]
|
|
4011
4513
|
}
|
|
4012
4514
|
);
|
|
@@ -4015,7 +4517,7 @@ function PaginationEllipsis({
|
|
|
4015
4517
|
className,
|
|
4016
4518
|
...props
|
|
4017
4519
|
}) {
|
|
4018
|
-
return /* @__PURE__ */
|
|
4520
|
+
return /* @__PURE__ */ jsxs22(
|
|
4019
4521
|
"span",
|
|
4020
4522
|
{
|
|
4021
4523
|
"aria-hidden": true,
|
|
@@ -4023,8 +4525,8 @@ function PaginationEllipsis({
|
|
|
4023
4525
|
className: cn("flex size-9 items-center justify-center", className),
|
|
4024
4526
|
...props,
|
|
4025
4527
|
children: [
|
|
4026
|
-
/* @__PURE__ */
|
|
4027
|
-
/* @__PURE__ */
|
|
4528
|
+
/* @__PURE__ */ jsx38(MoreHorizontalIcon, { className: "size-4" }),
|
|
4529
|
+
/* @__PURE__ */ jsx38("span", { className: "sr-only", children: "More pages" })
|
|
4028
4530
|
]
|
|
4029
4531
|
}
|
|
4030
4532
|
);
|
|
@@ -4033,13 +4535,13 @@ function PaginationEllipsis({
|
|
|
4033
4535
|
// src/components/ui/progress.tsx
|
|
4034
4536
|
import * as ProgressPrimitive from "@radix-ui/react-progress";
|
|
4035
4537
|
import "react";
|
|
4036
|
-
import { jsx as
|
|
4538
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
4037
4539
|
function Progress({
|
|
4038
4540
|
className,
|
|
4039
4541
|
value,
|
|
4040
4542
|
...props
|
|
4041
4543
|
}) {
|
|
4042
|
-
return /* @__PURE__ */
|
|
4544
|
+
return /* @__PURE__ */ jsx39(
|
|
4043
4545
|
ProgressPrimitive.Root,
|
|
4044
4546
|
{
|
|
4045
4547
|
"data-slot": "progress",
|
|
@@ -4048,7 +4550,7 @@ function Progress({
|
|
|
4048
4550
|
className
|
|
4049
4551
|
),
|
|
4050
4552
|
...props,
|
|
4051
|
-
children: /* @__PURE__ */
|
|
4553
|
+
children: /* @__PURE__ */ jsx39(
|
|
4052
4554
|
ProgressPrimitive.Indicator,
|
|
4053
4555
|
{
|
|
4054
4556
|
"data-slot": "progress-indicator",
|
|
@@ -4060,16 +4562,65 @@ function Progress({
|
|
|
4060
4562
|
);
|
|
4061
4563
|
}
|
|
4062
4564
|
|
|
4565
|
+
// src/components/ui/progress-bar.tsx
|
|
4566
|
+
import { cva as cva11 } from "class-variance-authority";
|
|
4567
|
+
import "react";
|
|
4568
|
+
import { jsx as jsx40, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
4569
|
+
var progressBarVariants = cva11("relative overflow-hidden rounded-[8px]", {
|
|
4570
|
+
variants: {
|
|
4571
|
+
device: {
|
|
4572
|
+
desktop: "w-[360px] h-[4px]",
|
|
4573
|
+
mobile: "w-[342px] h-[4px]"
|
|
4574
|
+
}
|
|
4575
|
+
},
|
|
4576
|
+
defaultVariants: {
|
|
4577
|
+
device: "desktop"
|
|
4578
|
+
}
|
|
4579
|
+
});
|
|
4580
|
+
function ProgressBar({
|
|
4581
|
+
className,
|
|
4582
|
+
device,
|
|
4583
|
+
currentStep = 1,
|
|
4584
|
+
totalSteps = 7,
|
|
4585
|
+
value,
|
|
4586
|
+
...props
|
|
4587
|
+
}) {
|
|
4588
|
+
const percentage = value !== void 0 ? Math.min(100, Math.max(0, value)) : Math.min(100, Math.max(0, currentStep / totalSteps * 100));
|
|
4589
|
+
return /* @__PURE__ */ jsxs23(
|
|
4590
|
+
"div",
|
|
4591
|
+
{
|
|
4592
|
+
"data-slot": "progress-bar",
|
|
4593
|
+
className: cn(progressBarVariants({ device }), className),
|
|
4594
|
+
role: "progressbar",
|
|
4595
|
+
"aria-valuenow": Math.round(percentage),
|
|
4596
|
+
"aria-valuemin": 0,
|
|
4597
|
+
"aria-valuemax": 100,
|
|
4598
|
+
...props,
|
|
4599
|
+
children: [
|
|
4600
|
+
/* @__PURE__ */ jsx40("div", { className: "absolute inset-0 rounded-[8px] bg-primary-surface-light" }),
|
|
4601
|
+
/* @__PURE__ */ jsx40(
|
|
4602
|
+
"div",
|
|
4603
|
+
{
|
|
4604
|
+
"data-slot": "progress-bar-fill",
|
|
4605
|
+
className: "absolute inset-y-0 left-0 rounded-[8px] bg-primary-surface-default transition-[width] duration-300 ease-in-out",
|
|
4606
|
+
style: { width: `${percentage}%` }
|
|
4607
|
+
}
|
|
4608
|
+
)
|
|
4609
|
+
]
|
|
4610
|
+
}
|
|
4611
|
+
);
|
|
4612
|
+
}
|
|
4613
|
+
|
|
4063
4614
|
// src/components/ui/radio-group.tsx
|
|
4064
4615
|
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
4065
4616
|
import { CircleIcon as CircleIcon4 } from "lucide-react";
|
|
4066
4617
|
import "react";
|
|
4067
|
-
import { jsx as
|
|
4618
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
4068
4619
|
function RadioGroup4({
|
|
4069
4620
|
className,
|
|
4070
4621
|
...props
|
|
4071
4622
|
}) {
|
|
4072
|
-
return /* @__PURE__ */
|
|
4623
|
+
return /* @__PURE__ */ jsx41(
|
|
4073
4624
|
RadioGroupPrimitive.Root,
|
|
4074
4625
|
{
|
|
4075
4626
|
"data-slot": "radio-group",
|
|
@@ -4082,7 +4633,7 @@ function RadioGroupItem({
|
|
|
4082
4633
|
className,
|
|
4083
4634
|
...props
|
|
4084
4635
|
}) {
|
|
4085
|
-
return /* @__PURE__ */
|
|
4636
|
+
return /* @__PURE__ */ jsx41(
|
|
4086
4637
|
RadioGroupPrimitive.Item,
|
|
4087
4638
|
{
|
|
4088
4639
|
"data-slot": "radio-group-item",
|
|
@@ -4091,12 +4642,12 @@ function RadioGroupItem({
|
|
|
4091
4642
|
className
|
|
4092
4643
|
),
|
|
4093
4644
|
...props,
|
|
4094
|
-
children: /* @__PURE__ */
|
|
4645
|
+
children: /* @__PURE__ */ jsx41(
|
|
4095
4646
|
RadioGroupPrimitive.Indicator,
|
|
4096
4647
|
{
|
|
4097
4648
|
"data-slot": "radio-group-indicator",
|
|
4098
4649
|
className: "relative flex items-center justify-center",
|
|
4099
|
-
children: /* @__PURE__ */
|
|
4650
|
+
children: /* @__PURE__ */ jsx41(CircleIcon4, { className: "fill-white absolute top-1/2 left-1/2 size-1.5 -translate-x-1/2 -translate-y-1/2" })
|
|
4100
4651
|
}
|
|
4101
4652
|
)
|
|
4102
4653
|
}
|
|
@@ -4107,12 +4658,12 @@ function RadioGroupItem({
|
|
|
4107
4658
|
import "react";
|
|
4108
4659
|
import { GripVerticalIcon } from "lucide-react";
|
|
4109
4660
|
import * as ResizablePrimitive from "react-resizable-panels";
|
|
4110
|
-
import { jsx as
|
|
4661
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
4111
4662
|
function ResizablePanelGroup({
|
|
4112
4663
|
className,
|
|
4113
4664
|
...props
|
|
4114
4665
|
}) {
|
|
4115
|
-
return /* @__PURE__ */
|
|
4666
|
+
return /* @__PURE__ */ jsx42(
|
|
4116
4667
|
ResizablePrimitive.PanelGroup,
|
|
4117
4668
|
{
|
|
4118
4669
|
"data-slot": "resizable-panel-group",
|
|
@@ -4127,14 +4678,14 @@ function ResizablePanelGroup({
|
|
|
4127
4678
|
function ResizablePanel({
|
|
4128
4679
|
...props
|
|
4129
4680
|
}) {
|
|
4130
|
-
return /* @__PURE__ */
|
|
4681
|
+
return /* @__PURE__ */ jsx42(ResizablePrimitive.Panel, { "data-slot": "resizable-panel", ...props });
|
|
4131
4682
|
}
|
|
4132
4683
|
function ResizableHandle({
|
|
4133
4684
|
withHandle,
|
|
4134
4685
|
className,
|
|
4135
4686
|
...props
|
|
4136
4687
|
}) {
|
|
4137
|
-
return /* @__PURE__ */
|
|
4688
|
+
return /* @__PURE__ */ jsx42(
|
|
4138
4689
|
ResizablePrimitive.PanelResizeHandle,
|
|
4139
4690
|
{
|
|
4140
4691
|
"data-slot": "resizable-handle",
|
|
@@ -4143,7 +4694,7 @@ function ResizableHandle({
|
|
|
4143
4694
|
className
|
|
4144
4695
|
),
|
|
4145
4696
|
...props,
|
|
4146
|
-
children: withHandle && /* @__PURE__ */
|
|
4697
|
+
children: withHandle && /* @__PURE__ */ jsx42("div", { className: "bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border", children: /* @__PURE__ */ jsx42(GripVerticalIcon, { className: "size-2.5" }) })
|
|
4147
4698
|
}
|
|
4148
4699
|
);
|
|
4149
4700
|
}
|
|
@@ -4151,20 +4702,20 @@ function ResizableHandle({
|
|
|
4151
4702
|
// src/components/ui/scroll-area.tsx
|
|
4152
4703
|
import "react";
|
|
4153
4704
|
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
|
4154
|
-
import { jsx as
|
|
4705
|
+
import { jsx as jsx43, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
4155
4706
|
function ScrollArea({
|
|
4156
4707
|
className,
|
|
4157
4708
|
children,
|
|
4158
4709
|
...props
|
|
4159
4710
|
}) {
|
|
4160
|
-
return /* @__PURE__ */
|
|
4711
|
+
return /* @__PURE__ */ jsxs24(
|
|
4161
4712
|
ScrollAreaPrimitive.Root,
|
|
4162
4713
|
{
|
|
4163
4714
|
"data-slot": "scroll-area",
|
|
4164
4715
|
className: cn("relative", className),
|
|
4165
4716
|
...props,
|
|
4166
4717
|
children: [
|
|
4167
|
-
/* @__PURE__ */
|
|
4718
|
+
/* @__PURE__ */ jsx43(
|
|
4168
4719
|
ScrollAreaPrimitive.Viewport,
|
|
4169
4720
|
{
|
|
4170
4721
|
"data-slot": "scroll-area-viewport",
|
|
@@ -4172,8 +4723,8 @@ function ScrollArea({
|
|
|
4172
4723
|
children
|
|
4173
4724
|
}
|
|
4174
4725
|
),
|
|
4175
|
-
/* @__PURE__ */
|
|
4176
|
-
/* @__PURE__ */
|
|
4726
|
+
/* @__PURE__ */ jsx43(ScrollBar, {}),
|
|
4727
|
+
/* @__PURE__ */ jsx43(ScrollAreaPrimitive.Corner, {})
|
|
4177
4728
|
]
|
|
4178
4729
|
}
|
|
4179
4730
|
);
|
|
@@ -4183,7 +4734,7 @@ function ScrollBar({
|
|
|
4183
4734
|
orientation = "vertical",
|
|
4184
4735
|
...props
|
|
4185
4736
|
}) {
|
|
4186
|
-
return /* @__PURE__ */
|
|
4737
|
+
return /* @__PURE__ */ jsx43(
|
|
4187
4738
|
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
4188
4739
|
{
|
|
4189
4740
|
"data-slot": "scroll-area-scrollbar",
|
|
@@ -4195,7 +4746,7 @@ function ScrollBar({
|
|
|
4195
4746
|
className
|
|
4196
4747
|
),
|
|
4197
4748
|
...props,
|
|
4198
|
-
children: /* @__PURE__ */
|
|
4749
|
+
children: /* @__PURE__ */ jsx43(
|
|
4199
4750
|
ScrollAreaPrimitive.ScrollAreaThumb,
|
|
4200
4751
|
{
|
|
4201
4752
|
"data-slot": "scroll-area-thumb",
|
|
@@ -4206,13 +4757,234 @@ function ScrollBar({
|
|
|
4206
4757
|
);
|
|
4207
4758
|
}
|
|
4208
4759
|
|
|
4760
|
+
// src/components/ui/search-input.tsx
|
|
4761
|
+
import * as React42 from "react";
|
|
4762
|
+
import { Search, X as X3 } from "lucide-react";
|
|
4763
|
+
import { jsx as jsx44, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
4764
|
+
function SearchInput({
|
|
4765
|
+
variant = "icon",
|
|
4766
|
+
value: valueProp,
|
|
4767
|
+
defaultValue = "",
|
|
4768
|
+
onValueChange,
|
|
4769
|
+
onSearch,
|
|
4770
|
+
onClear,
|
|
4771
|
+
placeholder = "Placeholder",
|
|
4772
|
+
label,
|
|
4773
|
+
helperText,
|
|
4774
|
+
icon,
|
|
4775
|
+
error = false,
|
|
4776
|
+
errorMessage,
|
|
4777
|
+
disabled = false,
|
|
4778
|
+
suggestions = [],
|
|
4779
|
+
onSuggestionClick,
|
|
4780
|
+
className
|
|
4781
|
+
}) {
|
|
4782
|
+
const [internalValue, setInternalValue] = React42.useState(defaultValue);
|
|
4783
|
+
const [isFocused, setIsFocused] = React42.useState(false);
|
|
4784
|
+
const [showSuggestions, setShowSuggestions] = React42.useState(false);
|
|
4785
|
+
const inputRef = React42.useRef(null);
|
|
4786
|
+
const containerRef = React42.useRef(null);
|
|
4787
|
+
const isControlled = valueProp !== void 0;
|
|
4788
|
+
const currentValue = isControlled ? valueProp : internalValue;
|
|
4789
|
+
const hasValue = currentValue.trim().length > 0;
|
|
4790
|
+
const isFilledEdit = hasValue && !isFocused && !error;
|
|
4791
|
+
const updateValue = React42.useCallback(
|
|
4792
|
+
(next) => {
|
|
4793
|
+
if (!isControlled) setInternalValue(next);
|
|
4794
|
+
onValueChange?.(next);
|
|
4795
|
+
},
|
|
4796
|
+
[isControlled, onValueChange]
|
|
4797
|
+
);
|
|
4798
|
+
const handleInputChange = React42.useCallback(
|
|
4799
|
+
(e) => {
|
|
4800
|
+
updateValue(e.target.value);
|
|
4801
|
+
if (e.target.value.trim().length > 0 && suggestions.length > 0) {
|
|
4802
|
+
setShowSuggestions(true);
|
|
4803
|
+
} else {
|
|
4804
|
+
setShowSuggestions(false);
|
|
4805
|
+
}
|
|
4806
|
+
},
|
|
4807
|
+
[updateValue, suggestions.length]
|
|
4808
|
+
);
|
|
4809
|
+
const handleKeyDown = React42.useCallback(
|
|
4810
|
+
(e) => {
|
|
4811
|
+
if (e.key === "Enter") {
|
|
4812
|
+
e.preventDefault();
|
|
4813
|
+
onSearch?.(currentValue);
|
|
4814
|
+
setShowSuggestions(false);
|
|
4815
|
+
} else if (e.key === "Escape") {
|
|
4816
|
+
setShowSuggestions(false);
|
|
4817
|
+
inputRef.current?.blur();
|
|
4818
|
+
}
|
|
4819
|
+
},
|
|
4820
|
+
[currentValue, onSearch]
|
|
4821
|
+
);
|
|
4822
|
+
const handleClear = React42.useCallback(() => {
|
|
4823
|
+
updateValue("");
|
|
4824
|
+
onClear?.();
|
|
4825
|
+
inputRef.current?.focus();
|
|
4826
|
+
}, [updateValue, onClear]);
|
|
4827
|
+
const handleSearchClick = React42.useCallback(() => {
|
|
4828
|
+
onSearch?.(currentValue);
|
|
4829
|
+
setShowSuggestions(false);
|
|
4830
|
+
}, [currentValue, onSearch]);
|
|
4831
|
+
const handleSuggestionClick = React42.useCallback(
|
|
4832
|
+
(label2) => {
|
|
4833
|
+
updateValue(label2);
|
|
4834
|
+
onSuggestionClick?.(label2);
|
|
4835
|
+
setShowSuggestions(false);
|
|
4836
|
+
inputRef.current?.focus();
|
|
4837
|
+
},
|
|
4838
|
+
[updateValue, onSuggestionClick]
|
|
4839
|
+
);
|
|
4840
|
+
const handleFocus = React42.useCallback(() => {
|
|
4841
|
+
if (disabled) return;
|
|
4842
|
+
setIsFocused(true);
|
|
4843
|
+
if (currentValue.trim().length > 0 && suggestions.length > 0) {
|
|
4844
|
+
setShowSuggestions(true);
|
|
4845
|
+
}
|
|
4846
|
+
}, [disabled, currentValue, suggestions.length]);
|
|
4847
|
+
const handleBlur = React42.useCallback(
|
|
4848
|
+
(e) => {
|
|
4849
|
+
if (containerRef.current?.contains(e.relatedTarget)) return;
|
|
4850
|
+
setIsFocused(false);
|
|
4851
|
+
setShowSuggestions(false);
|
|
4852
|
+
},
|
|
4853
|
+
[]
|
|
4854
|
+
);
|
|
4855
|
+
const displayHelperText = error && errorMessage ? errorMessage : helperText;
|
|
4856
|
+
const showClearButton = (isFilledEdit || error) && hasValue;
|
|
4857
|
+
return /* @__PURE__ */ jsxs25(
|
|
4858
|
+
"div",
|
|
4859
|
+
{
|
|
4860
|
+
ref: containerRef,
|
|
4861
|
+
"data-slot": "search-input",
|
|
4862
|
+
className: cn("flex flex-col gap-[8px] items-start w-full", className),
|
|
4863
|
+
onBlur: handleBlur,
|
|
4864
|
+
children: [
|
|
4865
|
+
label && /* @__PURE__ */ jsx44("div", { className: "flex items-center font-sans font-medium text-[14px] leading-[20px] text-vibrant-text-details", children: label }),
|
|
4866
|
+
/* @__PURE__ */ jsxs25(
|
|
4867
|
+
"div",
|
|
4868
|
+
{
|
|
4869
|
+
className: cn(
|
|
4870
|
+
"flex items-center w-full h-[48px] rounded-[8px] overflow-hidden transition-colors",
|
|
4871
|
+
// Border + background
|
|
4872
|
+
error ? "border border-error-stroke-light bg-error-surface-light" : isFocused ? "border-2 border-focus-ring bg-white dark:bg-background" : "border border-gray-stroke-default bg-white dark:bg-background",
|
|
4873
|
+
// Hover (only when not focused, not error, not disabled)
|
|
4874
|
+
!isFocused && !error && !disabled && "hover:border-focus-ring",
|
|
4875
|
+
// Padding - adjust for 2px border on focus to prevent layout shift
|
|
4876
|
+
error ? "pl-[12px] pr-[12px] py-[8px]" : isFocused ? "pl-[11px] pr-[7px] py-[7px]" : "pl-[12px] pr-[8px] py-[8px]",
|
|
4877
|
+
// Gap
|
|
4878
|
+
"gap-[8px]",
|
|
4879
|
+
// Disabled
|
|
4880
|
+
disabled && "opacity-60 cursor-not-allowed"
|
|
4881
|
+
),
|
|
4882
|
+
children: [
|
|
4883
|
+
icon && /* @__PURE__ */ jsx44(
|
|
4884
|
+
"span",
|
|
4885
|
+
{
|
|
4886
|
+
className: cn(
|
|
4887
|
+
"flex items-center justify-center shrink-0 size-[20px] [&_svg]:size-[20px]",
|
|
4888
|
+
error ? "text-error-surface-default" : isFocused ? "text-focus-ring" : "text-muted-foreground"
|
|
4889
|
+
),
|
|
4890
|
+
children: icon
|
|
4891
|
+
}
|
|
4892
|
+
),
|
|
4893
|
+
/* @__PURE__ */ jsx44(
|
|
4894
|
+
"input",
|
|
4895
|
+
{
|
|
4896
|
+
ref: inputRef,
|
|
4897
|
+
type: "text",
|
|
4898
|
+
value: currentValue,
|
|
4899
|
+
onChange: handleInputChange,
|
|
4900
|
+
onKeyDown: handleKeyDown,
|
|
4901
|
+
onFocus: handleFocus,
|
|
4902
|
+
disabled,
|
|
4903
|
+
placeholder,
|
|
4904
|
+
className: cn(
|
|
4905
|
+
"flex-1 min-w-0 bg-transparent outline-none font-sans font-medium text-[16px] leading-[24px] text-vibrant-text-heading placeholder:text-muted-foreground",
|
|
4906
|
+
disabled && "cursor-not-allowed"
|
|
4907
|
+
)
|
|
4908
|
+
}
|
|
4909
|
+
),
|
|
4910
|
+
showClearButton ? /* @__PURE__ */ jsx44(
|
|
4911
|
+
"button",
|
|
4912
|
+
{
|
|
4913
|
+
type: "button",
|
|
4914
|
+
onClick: handleClear,
|
|
4915
|
+
className: "flex items-center justify-center shrink-0 size-[20px] text-muted-foreground hover:text-vibrant-text-heading transition-colors cursor-pointer",
|
|
4916
|
+
"aria-label": "Clear search",
|
|
4917
|
+
tabIndex: -1,
|
|
4918
|
+
children: /* @__PURE__ */ jsx44(X3, { className: "size-[16px]" })
|
|
4919
|
+
}
|
|
4920
|
+
) : variant === "button" ? /* @__PURE__ */ jsx44(
|
|
4921
|
+
"button",
|
|
4922
|
+
{
|
|
4923
|
+
type: "button",
|
|
4924
|
+
onClick: handleSearchClick,
|
|
4925
|
+
disabled,
|
|
4926
|
+
className: "flex items-center justify-center shrink-0 h-[36px] min-w-[100px] px-[16px] py-[8px] rounded-[6px] bg-primary-surface-default font-sans font-semibold text-[16px] leading-[24px] text-white cursor-pointer disabled:cursor-not-allowed transition-colors",
|
|
4927
|
+
tabIndex: -1,
|
|
4928
|
+
children: "Search"
|
|
4929
|
+
}
|
|
4930
|
+
) : /* @__PURE__ */ jsx44(
|
|
4931
|
+
"button",
|
|
4932
|
+
{
|
|
4933
|
+
type: "button",
|
|
4934
|
+
onClick: handleSearchClick,
|
|
4935
|
+
disabled,
|
|
4936
|
+
className: "flex items-center justify-center shrink-0 size-[36px] rounded-[6px] bg-primary-surface-default cursor-pointer disabled:cursor-not-allowed transition-colors",
|
|
4937
|
+
"aria-label": "Search",
|
|
4938
|
+
tabIndex: -1,
|
|
4939
|
+
children: /* @__PURE__ */ jsx44(Search, { className: "size-[20px] text-white" })
|
|
4940
|
+
}
|
|
4941
|
+
)
|
|
4942
|
+
]
|
|
4943
|
+
}
|
|
4944
|
+
),
|
|
4945
|
+
displayHelperText && /* @__PURE__ */ jsx44(
|
|
4946
|
+
"p",
|
|
4947
|
+
{
|
|
4948
|
+
className: cn(
|
|
4949
|
+
"font-sans font-normal text-[12px] leading-[16px] w-full",
|
|
4950
|
+
error ? "text-error-surface-default" : "text-vibrant-text-details"
|
|
4951
|
+
),
|
|
4952
|
+
children: displayHelperText
|
|
4953
|
+
}
|
|
4954
|
+
),
|
|
4955
|
+
showSuggestions && suggestions.length > 0 && /* @__PURE__ */ jsx44(
|
|
4956
|
+
"div",
|
|
4957
|
+
{
|
|
4958
|
+
"data-slot": "search-input-suggestions",
|
|
4959
|
+
className: "w-full rounded-[8px] border border-gray-stroke-light bg-white dark:bg-card p-[12px] shadow-[0px_4px_24px_0px_rgba(0,0,0,0.05)] flex flex-col gap-[16px]",
|
|
4960
|
+
children: suggestions.map((suggestion, idx) => /* @__PURE__ */ jsxs25(
|
|
4961
|
+
"button",
|
|
4962
|
+
{
|
|
4963
|
+
type: "button",
|
|
4964
|
+
onClick: () => handleSuggestionClick(suggestion.label),
|
|
4965
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
4966
|
+
className: "flex items-center gap-[13px] h-[40px] pr-[12px] rounded-[8px] w-full text-left hover:bg-gray-surface-light transition-colors cursor-pointer",
|
|
4967
|
+
children: [
|
|
4968
|
+
suggestion.icon && /* @__PURE__ */ jsx44("span", { className: "flex items-center justify-center shrink-0 size-[40px] rounded-[8px] bg-gray-surface-light [&_svg]:size-[20px] text-muted-foreground", children: suggestion.icon }),
|
|
4969
|
+
/* @__PURE__ */ jsx44("span", { className: "flex-1 min-w-0 font-sans font-medium text-[16px] leading-[24px] text-vibrant-text-heading truncate", children: suggestion.label })
|
|
4970
|
+
]
|
|
4971
|
+
},
|
|
4972
|
+
`${suggestion.label}-${idx}`
|
|
4973
|
+
))
|
|
4974
|
+
}
|
|
4975
|
+
)
|
|
4976
|
+
]
|
|
4977
|
+
}
|
|
4978
|
+
);
|
|
4979
|
+
}
|
|
4980
|
+
|
|
4209
4981
|
// src/components/ui/searchable-select.tsx
|
|
4210
|
-
import * as
|
|
4982
|
+
import * as React43 from "react";
|
|
4211
4983
|
import { CheckIcon as CheckIcon4, ChevronsUpDown, XIcon as XIcon2 } from "lucide-react";
|
|
4212
|
-
import { jsx as
|
|
4213
|
-
var SearchableSelectContext =
|
|
4984
|
+
import { jsx as jsx45, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
4985
|
+
var SearchableSelectContext = React43.createContext(null);
|
|
4214
4986
|
function useSearchableSelect() {
|
|
4215
|
-
const ctx =
|
|
4987
|
+
const ctx = React43.useContext(SearchableSelectContext);
|
|
4216
4988
|
if (!ctx) {
|
|
4217
4989
|
throw new Error(
|
|
4218
4990
|
"SearchableSelect compound components must be used within <SearchableSelect>"
|
|
@@ -4238,11 +5010,11 @@ function SearchableSelect({
|
|
|
4238
5010
|
onOpenChange,
|
|
4239
5011
|
children
|
|
4240
5012
|
}) {
|
|
4241
|
-
const [internalOpen, setInternalOpen] =
|
|
4242
|
-
const [internalValue, setInternalValue] =
|
|
4243
|
-
const [internalValues, setInternalValues] =
|
|
5013
|
+
const [internalOpen, setInternalOpen] = React43.useState(false);
|
|
5014
|
+
const [internalValue, setInternalValue] = React43.useState(defaultValue);
|
|
5015
|
+
const [internalValues, setInternalValues] = React43.useState(defaultValues);
|
|
4244
5016
|
const open = controlledOpen ?? internalOpen;
|
|
4245
|
-
const setOpen =
|
|
5017
|
+
const setOpen = React43.useCallback(
|
|
4246
5018
|
(next) => {
|
|
4247
5019
|
if (controlledOpen !== void 0) {
|
|
4248
5020
|
onOpenChange?.(next);
|
|
@@ -4254,7 +5026,7 @@ function SearchableSelect({
|
|
|
4254
5026
|
[controlledOpen, onOpenChange]
|
|
4255
5027
|
);
|
|
4256
5028
|
const value = controlledValue ?? internalValue;
|
|
4257
|
-
const setValue =
|
|
5029
|
+
const setValue = React43.useCallback(
|
|
4258
5030
|
(next) => {
|
|
4259
5031
|
if (controlledValue === void 0) {
|
|
4260
5032
|
setInternalValue(next);
|
|
@@ -4264,7 +5036,7 @@ function SearchableSelect({
|
|
|
4264
5036
|
[controlledValue, onValueChange]
|
|
4265
5037
|
);
|
|
4266
5038
|
const values = controlledValues ?? internalValues;
|
|
4267
|
-
const setValues =
|
|
5039
|
+
const setValues = React43.useCallback(
|
|
4268
5040
|
(next) => {
|
|
4269
5041
|
if (controlledValues === void 0) {
|
|
4270
5042
|
setInternalValues(next);
|
|
@@ -4273,14 +5045,14 @@ function SearchableSelect({
|
|
|
4273
5045
|
},
|
|
4274
5046
|
[controlledValues, onValuesChange]
|
|
4275
5047
|
);
|
|
4276
|
-
const optionMap =
|
|
5048
|
+
const optionMap = React43.useMemo(() => {
|
|
4277
5049
|
const map = /* @__PURE__ */ new Map();
|
|
4278
5050
|
for (const opt of options) {
|
|
4279
5051
|
map.set(opt.value, opt.label);
|
|
4280
5052
|
}
|
|
4281
5053
|
return map;
|
|
4282
5054
|
}, [options]);
|
|
4283
|
-
const ctx =
|
|
5055
|
+
const ctx = React43.useMemo(
|
|
4284
5056
|
() => ({
|
|
4285
5057
|
open,
|
|
4286
5058
|
setOpen,
|
|
@@ -4314,7 +5086,7 @@ function SearchableSelect({
|
|
|
4314
5086
|
optionMap
|
|
4315
5087
|
]
|
|
4316
5088
|
);
|
|
4317
|
-
return /* @__PURE__ */
|
|
5089
|
+
return /* @__PURE__ */ jsx45(SearchableSelectContext.Provider, { value: ctx, children: /* @__PURE__ */ jsx45(Popover, { open, onOpenChange: setOpen, children }) });
|
|
4318
5090
|
}
|
|
4319
5091
|
function SearchableSelectTrigger({
|
|
4320
5092
|
className,
|
|
@@ -4327,7 +5099,7 @@ function SearchableSelectTrigger({
|
|
|
4327
5099
|
if (children) return children;
|
|
4328
5100
|
if (ctx.mode === "single") {
|
|
4329
5101
|
const label = ctx.optionMap.get(ctx.value);
|
|
4330
|
-
return /* @__PURE__ */
|
|
5102
|
+
return /* @__PURE__ */ jsx45(
|
|
4331
5103
|
"span",
|
|
4332
5104
|
{
|
|
4333
5105
|
"data-slot": "searchable-select-value",
|
|
@@ -4340,7 +5112,7 @@ function SearchableSelectTrigger({
|
|
|
4340
5112
|
);
|
|
4341
5113
|
}
|
|
4342
5114
|
if (ctx.values.length === 0) {
|
|
4343
|
-
return /* @__PURE__ */
|
|
5115
|
+
return /* @__PURE__ */ jsx45(
|
|
4344
5116
|
"span",
|
|
4345
5117
|
{
|
|
4346
5118
|
"data-slot": "searchable-select-value",
|
|
@@ -4351,20 +5123,20 @@ function SearchableSelectTrigger({
|
|
|
4351
5123
|
}
|
|
4352
5124
|
const visible = ctx.values.slice(0, ctx.maxCount);
|
|
4353
5125
|
const remaining = ctx.values.length - visible.length;
|
|
4354
|
-
return /* @__PURE__ */
|
|
5126
|
+
return /* @__PURE__ */ jsxs26(
|
|
4355
5127
|
"span",
|
|
4356
5128
|
{
|
|
4357
5129
|
"data-slot": "searchable-select-value",
|
|
4358
5130
|
className: "flex flex-wrap items-center gap-1",
|
|
4359
5131
|
children: [
|
|
4360
|
-
visible.map((v) => /* @__PURE__ */
|
|
5132
|
+
visible.map((v) => /* @__PURE__ */ jsxs26(
|
|
4361
5133
|
Badge,
|
|
4362
5134
|
{
|
|
4363
5135
|
variant: "secondary",
|
|
4364
5136
|
className: "gap-1 pr-1",
|
|
4365
5137
|
children: [
|
|
4366
|
-
/* @__PURE__ */
|
|
4367
|
-
/* @__PURE__ */
|
|
5138
|
+
/* @__PURE__ */ jsx45("span", { className: "truncate max-w-[120px]", children: ctx.optionMap.get(v) || v }),
|
|
5139
|
+
/* @__PURE__ */ jsx45(
|
|
4368
5140
|
"span",
|
|
4369
5141
|
{
|
|
4370
5142
|
role: "button",
|
|
@@ -4376,14 +5148,14 @@ function SearchableSelectTrigger({
|
|
|
4376
5148
|
e.stopPropagation();
|
|
4377
5149
|
ctx.setValues(ctx.values.filter((val) => val !== v));
|
|
4378
5150
|
},
|
|
4379
|
-
children: /* @__PURE__ */
|
|
5151
|
+
children: /* @__PURE__ */ jsx45(XIcon2, { className: "size-3" })
|
|
4380
5152
|
}
|
|
4381
5153
|
)
|
|
4382
5154
|
]
|
|
4383
5155
|
},
|
|
4384
5156
|
v
|
|
4385
5157
|
)),
|
|
4386
|
-
remaining > 0 && /* @__PURE__ */
|
|
5158
|
+
remaining > 0 && /* @__PURE__ */ jsxs26(Badge, { variant: "outline", className: "text-muted-foreground", children: [
|
|
4387
5159
|
"+",
|
|
4388
5160
|
remaining,
|
|
4389
5161
|
" more"
|
|
@@ -4392,7 +5164,7 @@ function SearchableSelectTrigger({
|
|
|
4392
5164
|
}
|
|
4393
5165
|
);
|
|
4394
5166
|
};
|
|
4395
|
-
return /* @__PURE__ */
|
|
5167
|
+
return /* @__PURE__ */ jsxs26(
|
|
4396
5168
|
PopoverTrigger,
|
|
4397
5169
|
{
|
|
4398
5170
|
"data-slot": "searchable-select-trigger",
|
|
@@ -4406,7 +5178,7 @@ function SearchableSelectTrigger({
|
|
|
4406
5178
|
...props,
|
|
4407
5179
|
children: [
|
|
4408
5180
|
renderContent(),
|
|
4409
|
-
/* @__PURE__ */
|
|
5181
|
+
/* @__PURE__ */ jsx45(ChevronsUpDown, { className: "size-4 shrink-0 opacity-50" })
|
|
4410
5182
|
]
|
|
4411
5183
|
}
|
|
4412
5184
|
);
|
|
@@ -4418,7 +5190,7 @@ function SearchableSelectContent({
|
|
|
4418
5190
|
...props
|
|
4419
5191
|
}) {
|
|
4420
5192
|
const ctx = useSearchableSelect();
|
|
4421
|
-
const groupedOptions =
|
|
5193
|
+
const groupedOptions = React43.useMemo(() => {
|
|
4422
5194
|
if (ctx.options.length === 0) return null;
|
|
4423
5195
|
const groups = /* @__PURE__ */ new Map();
|
|
4424
5196
|
for (const opt of ctx.options) {
|
|
@@ -4432,7 +5204,7 @@ function SearchableSelectContent({
|
|
|
4432
5204
|
if (!groupedOptions) return null;
|
|
4433
5205
|
const entries = Array.from(groupedOptions.entries());
|
|
4434
5206
|
if (entries.length === 1 && entries[0][0] === "") {
|
|
4435
|
-
return entries[0][1].map((opt) => /* @__PURE__ */
|
|
5207
|
+
return entries[0][1].map((opt) => /* @__PURE__ */ jsx45(
|
|
4436
5208
|
SearchableSelectItem,
|
|
4437
5209
|
{
|
|
4438
5210
|
value: opt.value,
|
|
@@ -4442,7 +5214,7 @@ function SearchableSelectContent({
|
|
|
4442
5214
|
opt.value
|
|
4443
5215
|
));
|
|
4444
5216
|
}
|
|
4445
|
-
return entries.map(([group, opts]) => /* @__PURE__ */
|
|
5217
|
+
return entries.map(([group, opts]) => /* @__PURE__ */ jsx45(SearchableSelectGroup, { heading: group || void 0, children: opts.map((opt) => /* @__PURE__ */ jsx45(
|
|
4446
5218
|
SearchableSelectItem,
|
|
4447
5219
|
{
|
|
4448
5220
|
value: opt.value,
|
|
@@ -4452,17 +5224,17 @@ function SearchableSelectContent({
|
|
|
4452
5224
|
opt.value
|
|
4453
5225
|
)) }, group));
|
|
4454
5226
|
};
|
|
4455
|
-
return /* @__PURE__ */
|
|
5227
|
+
return /* @__PURE__ */ jsx45(
|
|
4456
5228
|
PopoverContent,
|
|
4457
5229
|
{
|
|
4458
5230
|
"data-slot": "searchable-select-content",
|
|
4459
5231
|
className: cn("w-[var(--radix-popover-trigger-width)] p-0", className),
|
|
4460
5232
|
align: "start",
|
|
4461
5233
|
...props,
|
|
4462
|
-
children: /* @__PURE__ */
|
|
4463
|
-
ctx.searchable && /* @__PURE__ */
|
|
4464
|
-
/* @__PURE__ */
|
|
4465
|
-
/* @__PURE__ */
|
|
5234
|
+
children: /* @__PURE__ */ jsxs26(Command, { children: [
|
|
5235
|
+
ctx.searchable && /* @__PURE__ */ jsx45(CommandInput, { placeholder: ctx.searchPlaceholder }),
|
|
5236
|
+
/* @__PURE__ */ jsxs26(CommandList, { children: [
|
|
5237
|
+
/* @__PURE__ */ jsx45(CommandEmpty, { children: emptyText }),
|
|
4466
5238
|
children || renderAutoItems()
|
|
4467
5239
|
] })
|
|
4468
5240
|
] })
|
|
@@ -4489,7 +5261,7 @@ function SearchableSelectItem({
|
|
|
4489
5261
|
);
|
|
4490
5262
|
}
|
|
4491
5263
|
};
|
|
4492
|
-
return /* @__PURE__ */
|
|
5264
|
+
return /* @__PURE__ */ jsxs26(
|
|
4493
5265
|
CommandItem,
|
|
4494
5266
|
{
|
|
4495
5267
|
"data-slot": "searchable-select-item",
|
|
@@ -4502,18 +5274,18 @@ function SearchableSelectItem({
|
|
|
4502
5274
|
"data-disabled": disabled || void 0,
|
|
4503
5275
|
...props,
|
|
4504
5276
|
children: [
|
|
4505
|
-
ctx.mode === "multiple" && /* @__PURE__ */
|
|
5277
|
+
ctx.mode === "multiple" && /* @__PURE__ */ jsx45("span", { className: "absolute left-2 flex size-4 items-center justify-center", children: /* @__PURE__ */ jsx45(
|
|
4506
5278
|
"span",
|
|
4507
5279
|
{
|
|
4508
5280
|
className: cn(
|
|
4509
5281
|
"size-4 rounded-sm border border-primary transition-colors",
|
|
4510
5282
|
isSelected ? "bg-primary text-primary-foreground" : "bg-transparent"
|
|
4511
5283
|
),
|
|
4512
|
-
children: isSelected && /* @__PURE__ */
|
|
5284
|
+
children: isSelected && /* @__PURE__ */ jsx45(CheckIcon4, { className: "size-4 p-0.5" })
|
|
4513
5285
|
}
|
|
4514
5286
|
) }),
|
|
4515
|
-
/* @__PURE__ */
|
|
4516
|
-
ctx.mode === "single" && isSelected && /* @__PURE__ */
|
|
5287
|
+
/* @__PURE__ */ jsx45("span", { className: "flex-1 truncate", children }),
|
|
5288
|
+
ctx.mode === "single" && isSelected && /* @__PURE__ */ jsx45("span", { className: "absolute right-2 flex size-4 items-center justify-center", children: /* @__PURE__ */ jsx45(CheckIcon4, { className: "size-4" }) })
|
|
4517
5289
|
]
|
|
4518
5290
|
}
|
|
4519
5291
|
);
|
|
@@ -4522,7 +5294,7 @@ function SearchableSelectGroup({
|
|
|
4522
5294
|
className,
|
|
4523
5295
|
...props
|
|
4524
5296
|
}) {
|
|
4525
|
-
return /* @__PURE__ */
|
|
5297
|
+
return /* @__PURE__ */ jsx45(
|
|
4526
5298
|
CommandGroup,
|
|
4527
5299
|
{
|
|
4528
5300
|
"data-slot": "searchable-select-group",
|
|
@@ -4536,7 +5308,7 @@ function SearchableSelectEmpty({
|
|
|
4536
5308
|
children = "No results found.",
|
|
4537
5309
|
...props
|
|
4538
5310
|
}) {
|
|
4539
|
-
return /* @__PURE__ */
|
|
5311
|
+
return /* @__PURE__ */ jsx45(
|
|
4540
5312
|
CommandEmpty,
|
|
4541
5313
|
{
|
|
4542
5314
|
"data-slot": "searchable-select-empty",
|
|
@@ -4551,21 +5323,21 @@ function SearchableSelectEmpty({
|
|
|
4551
5323
|
import "react";
|
|
4552
5324
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
4553
5325
|
import { CheckIcon as CheckIcon5, ChevronDownIcon as ChevronDownIcon4, ChevronUpIcon } from "lucide-react";
|
|
4554
|
-
import { jsx as
|
|
5326
|
+
import { jsx as jsx46, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
4555
5327
|
function Select({
|
|
4556
5328
|
...props
|
|
4557
5329
|
}) {
|
|
4558
|
-
return /* @__PURE__ */
|
|
5330
|
+
return /* @__PURE__ */ jsx46(SelectPrimitive.Root, { "data-slot": "select", ...props });
|
|
4559
5331
|
}
|
|
4560
5332
|
function SelectGroup({
|
|
4561
5333
|
...props
|
|
4562
5334
|
}) {
|
|
4563
|
-
return /* @__PURE__ */
|
|
5335
|
+
return /* @__PURE__ */ jsx46(SelectPrimitive.Group, { "data-slot": "select-group", ...props });
|
|
4564
5336
|
}
|
|
4565
5337
|
function SelectValue({
|
|
4566
5338
|
...props
|
|
4567
5339
|
}) {
|
|
4568
|
-
return /* @__PURE__ */
|
|
5340
|
+
return /* @__PURE__ */ jsx46(SelectPrimitive.Value, { "data-slot": "select-value", ...props });
|
|
4569
5341
|
}
|
|
4570
5342
|
function SelectTrigger({
|
|
4571
5343
|
className,
|
|
@@ -4573,7 +5345,7 @@ function SelectTrigger({
|
|
|
4573
5345
|
children,
|
|
4574
5346
|
...props
|
|
4575
5347
|
}) {
|
|
4576
|
-
return /* @__PURE__ */
|
|
5348
|
+
return /* @__PURE__ */ jsxs27(
|
|
4577
5349
|
SelectPrimitive.Trigger,
|
|
4578
5350
|
{
|
|
4579
5351
|
"data-slot": "select-trigger",
|
|
@@ -4585,7 +5357,7 @@ function SelectTrigger({
|
|
|
4585
5357
|
...props,
|
|
4586
5358
|
children: [
|
|
4587
5359
|
children,
|
|
4588
|
-
/* @__PURE__ */
|
|
5360
|
+
/* @__PURE__ */ jsx46(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx46(ChevronDownIcon4, { className: "size-4 opacity-50" }) })
|
|
4589
5361
|
]
|
|
4590
5362
|
}
|
|
4591
5363
|
);
|
|
@@ -4596,7 +5368,7 @@ function SelectContent({
|
|
|
4596
5368
|
position = "popper",
|
|
4597
5369
|
...props
|
|
4598
5370
|
}) {
|
|
4599
|
-
return /* @__PURE__ */
|
|
5371
|
+
return /* @__PURE__ */ jsx46(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs27(
|
|
4600
5372
|
SelectPrimitive.Content,
|
|
4601
5373
|
{
|
|
4602
5374
|
"data-slot": "select-content",
|
|
@@ -4608,8 +5380,8 @@ function SelectContent({
|
|
|
4608
5380
|
position,
|
|
4609
5381
|
...props,
|
|
4610
5382
|
children: [
|
|
4611
|
-
/* @__PURE__ */
|
|
4612
|
-
/* @__PURE__ */
|
|
5383
|
+
/* @__PURE__ */ jsx46(SelectScrollUpButton, {}),
|
|
5384
|
+
/* @__PURE__ */ jsx46(
|
|
4613
5385
|
SelectPrimitive.Viewport,
|
|
4614
5386
|
{
|
|
4615
5387
|
className: cn(
|
|
@@ -4619,7 +5391,7 @@ function SelectContent({
|
|
|
4619
5391
|
children
|
|
4620
5392
|
}
|
|
4621
5393
|
),
|
|
4622
|
-
/* @__PURE__ */
|
|
5394
|
+
/* @__PURE__ */ jsx46(SelectScrollDownButton, {})
|
|
4623
5395
|
]
|
|
4624
5396
|
}
|
|
4625
5397
|
) });
|
|
@@ -4628,7 +5400,7 @@ function SelectLabel({
|
|
|
4628
5400
|
className,
|
|
4629
5401
|
...props
|
|
4630
5402
|
}) {
|
|
4631
|
-
return /* @__PURE__ */
|
|
5403
|
+
return /* @__PURE__ */ jsx46(
|
|
4632
5404
|
SelectPrimitive.Label,
|
|
4633
5405
|
{
|
|
4634
5406
|
"data-slot": "select-label",
|
|
@@ -4642,7 +5414,7 @@ function SelectItem({
|
|
|
4642
5414
|
children,
|
|
4643
5415
|
...props
|
|
4644
5416
|
}) {
|
|
4645
|
-
return /* @__PURE__ */
|
|
5417
|
+
return /* @__PURE__ */ jsxs27(
|
|
4646
5418
|
SelectPrimitive.Item,
|
|
4647
5419
|
{
|
|
4648
5420
|
"data-slot": "select-item",
|
|
@@ -4652,8 +5424,8 @@ function SelectItem({
|
|
|
4652
5424
|
),
|
|
4653
5425
|
...props,
|
|
4654
5426
|
children: [
|
|
4655
|
-
/* @__PURE__ */
|
|
4656
|
-
/* @__PURE__ */
|
|
5427
|
+
/* @__PURE__ */ jsx46("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx46(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx46(CheckIcon5, { className: "size-4" }) }) }),
|
|
5428
|
+
/* @__PURE__ */ jsx46(SelectPrimitive.ItemText, { children })
|
|
4657
5429
|
]
|
|
4658
5430
|
}
|
|
4659
5431
|
);
|
|
@@ -4662,7 +5434,7 @@ function SelectSeparator({
|
|
|
4662
5434
|
className,
|
|
4663
5435
|
...props
|
|
4664
5436
|
}) {
|
|
4665
|
-
return /* @__PURE__ */
|
|
5437
|
+
return /* @__PURE__ */ jsx46(
|
|
4666
5438
|
SelectPrimitive.Separator,
|
|
4667
5439
|
{
|
|
4668
5440
|
"data-slot": "select-separator",
|
|
@@ -4675,7 +5447,7 @@ function SelectScrollUpButton({
|
|
|
4675
5447
|
className,
|
|
4676
5448
|
...props
|
|
4677
5449
|
}) {
|
|
4678
|
-
return /* @__PURE__ */
|
|
5450
|
+
return /* @__PURE__ */ jsx46(
|
|
4679
5451
|
SelectPrimitive.ScrollUpButton,
|
|
4680
5452
|
{
|
|
4681
5453
|
"data-slot": "select-scroll-up-button",
|
|
@@ -4684,7 +5456,7 @@ function SelectScrollUpButton({
|
|
|
4684
5456
|
className
|
|
4685
5457
|
),
|
|
4686
5458
|
...props,
|
|
4687
|
-
children: /* @__PURE__ */
|
|
5459
|
+
children: /* @__PURE__ */ jsx46(ChevronUpIcon, { className: "size-4" })
|
|
4688
5460
|
}
|
|
4689
5461
|
);
|
|
4690
5462
|
}
|
|
@@ -4692,7 +5464,7 @@ function SelectScrollDownButton({
|
|
|
4692
5464
|
className,
|
|
4693
5465
|
...props
|
|
4694
5466
|
}) {
|
|
4695
|
-
return /* @__PURE__ */
|
|
5467
|
+
return /* @__PURE__ */ jsx46(
|
|
4696
5468
|
SelectPrimitive.ScrollDownButton,
|
|
4697
5469
|
{
|
|
4698
5470
|
"data-slot": "select-scroll-down-button",
|
|
@@ -4701,7 +5473,7 @@ function SelectScrollDownButton({
|
|
|
4701
5473
|
className
|
|
4702
5474
|
),
|
|
4703
5475
|
...props,
|
|
4704
|
-
children: /* @__PURE__ */
|
|
5476
|
+
children: /* @__PURE__ */ jsx46(ChevronDownIcon4, { className: "size-4" })
|
|
4705
5477
|
}
|
|
4706
5478
|
);
|
|
4707
5479
|
}
|
|
@@ -4709,14 +5481,14 @@ function SelectScrollDownButton({
|
|
|
4709
5481
|
// src/components/ui/separator.tsx
|
|
4710
5482
|
import "react";
|
|
4711
5483
|
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
4712
|
-
import { jsx as
|
|
5484
|
+
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
4713
5485
|
function Separator5({
|
|
4714
5486
|
className,
|
|
4715
5487
|
orientation = "horizontal",
|
|
4716
5488
|
decorative = true,
|
|
4717
5489
|
...props
|
|
4718
5490
|
}) {
|
|
4719
|
-
return /* @__PURE__ */
|
|
5491
|
+
return /* @__PURE__ */ jsx47(
|
|
4720
5492
|
SeparatorPrimitive.Root,
|
|
4721
5493
|
{
|
|
4722
5494
|
"data-slot": "separator",
|
|
@@ -4735,30 +5507,30 @@ function Separator5({
|
|
|
4735
5507
|
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
4736
5508
|
import { XIcon as XIcon3 } from "lucide-react";
|
|
4737
5509
|
import "react";
|
|
4738
|
-
import { jsx as
|
|
5510
|
+
import { jsx as jsx48, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
4739
5511
|
function Sheet({ ...props }) {
|
|
4740
|
-
return /* @__PURE__ */
|
|
5512
|
+
return /* @__PURE__ */ jsx48(SheetPrimitive.Root, { "data-slot": "sheet", ...props });
|
|
4741
5513
|
}
|
|
4742
5514
|
function SheetTrigger({
|
|
4743
5515
|
...props
|
|
4744
5516
|
}) {
|
|
4745
|
-
return /* @__PURE__ */
|
|
5517
|
+
return /* @__PURE__ */ jsx48(SheetPrimitive.Trigger, { "data-slot": "sheet-trigger", ...props });
|
|
4746
5518
|
}
|
|
4747
5519
|
function SheetClose({
|
|
4748
5520
|
...props
|
|
4749
5521
|
}) {
|
|
4750
|
-
return /* @__PURE__ */
|
|
5522
|
+
return /* @__PURE__ */ jsx48(SheetPrimitive.Close, { "data-slot": "sheet-close", ...props });
|
|
4751
5523
|
}
|
|
4752
5524
|
function SheetPortal({
|
|
4753
5525
|
...props
|
|
4754
5526
|
}) {
|
|
4755
|
-
return /* @__PURE__ */
|
|
5527
|
+
return /* @__PURE__ */ jsx48(SheetPrimitive.Portal, { "data-slot": "sheet-portal", ...props });
|
|
4756
5528
|
}
|
|
4757
5529
|
function SheetOverlay({
|
|
4758
5530
|
className,
|
|
4759
5531
|
...props
|
|
4760
5532
|
}) {
|
|
4761
|
-
return /* @__PURE__ */
|
|
5533
|
+
return /* @__PURE__ */ jsx48(
|
|
4762
5534
|
SheetPrimitive.Overlay,
|
|
4763
5535
|
{
|
|
4764
5536
|
"data-slot": "sheet-overlay",
|
|
@@ -4777,9 +5549,9 @@ function SheetContent({
|
|
|
4777
5549
|
showCloseButton = true,
|
|
4778
5550
|
...props
|
|
4779
5551
|
}) {
|
|
4780
|
-
return /* @__PURE__ */
|
|
4781
|
-
/* @__PURE__ */
|
|
4782
|
-
/* @__PURE__ */
|
|
5552
|
+
return /* @__PURE__ */ jsxs28(SheetPortal, { children: [
|
|
5553
|
+
/* @__PURE__ */ jsx48(SheetOverlay, {}),
|
|
5554
|
+
/* @__PURE__ */ jsxs28(
|
|
4783
5555
|
SheetPrimitive.Content,
|
|
4784
5556
|
{
|
|
4785
5557
|
"data-slot": "sheet-content",
|
|
@@ -4794,9 +5566,9 @@ function SheetContent({
|
|
|
4794
5566
|
...props,
|
|
4795
5567
|
children: [
|
|
4796
5568
|
children,
|
|
4797
|
-
showCloseButton && /* @__PURE__ */
|
|
4798
|
-
/* @__PURE__ */
|
|
4799
|
-
/* @__PURE__ */
|
|
5569
|
+
showCloseButton && /* @__PURE__ */ jsxs28(SheetPrimitive.Close, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none", children: [
|
|
5570
|
+
/* @__PURE__ */ jsx48(XIcon3, { className: "size-4" }),
|
|
5571
|
+
/* @__PURE__ */ jsx48("span", { className: "sr-only", children: "Close" })
|
|
4800
5572
|
] })
|
|
4801
5573
|
]
|
|
4802
5574
|
}
|
|
@@ -4804,7 +5576,7 @@ function SheetContent({
|
|
|
4804
5576
|
] });
|
|
4805
5577
|
}
|
|
4806
5578
|
function SheetHeader({ className, ...props }) {
|
|
4807
|
-
return /* @__PURE__ */
|
|
5579
|
+
return /* @__PURE__ */ jsx48(
|
|
4808
5580
|
"div",
|
|
4809
5581
|
{
|
|
4810
5582
|
"data-slot": "sheet-header",
|
|
@@ -4814,7 +5586,7 @@ function SheetHeader({ className, ...props }) {
|
|
|
4814
5586
|
);
|
|
4815
5587
|
}
|
|
4816
5588
|
function SheetFooter({ className, ...props }) {
|
|
4817
|
-
return /* @__PURE__ */
|
|
5589
|
+
return /* @__PURE__ */ jsx48(
|
|
4818
5590
|
"div",
|
|
4819
5591
|
{
|
|
4820
5592
|
"data-slot": "sheet-footer",
|
|
@@ -4827,7 +5599,7 @@ function SheetTitle({
|
|
|
4827
5599
|
className,
|
|
4828
5600
|
...props
|
|
4829
5601
|
}) {
|
|
4830
|
-
return /* @__PURE__ */
|
|
5602
|
+
return /* @__PURE__ */ jsx48(
|
|
4831
5603
|
SheetPrimitive.Title,
|
|
4832
5604
|
{
|
|
4833
5605
|
"data-slot": "sheet-title",
|
|
@@ -4840,7 +5612,7 @@ function SheetDescription({
|
|
|
4840
5612
|
className,
|
|
4841
5613
|
...props
|
|
4842
5614
|
}) {
|
|
4843
|
-
return /* @__PURE__ */
|
|
5615
|
+
return /* @__PURE__ */ jsx48(
|
|
4844
5616
|
SheetPrimitive.Description,
|
|
4845
5617
|
{
|
|
4846
5618
|
"data-slot": "sheet-description",
|
|
@@ -4852,14 +5624,14 @@ function SheetDescription({
|
|
|
4852
5624
|
|
|
4853
5625
|
// src/components/ui/sidebar.tsx
|
|
4854
5626
|
import { Slot as Slot6 } from "@radix-ui/react-slot";
|
|
4855
|
-
import { cva as
|
|
5627
|
+
import { cva as cva12 } from "class-variance-authority";
|
|
4856
5628
|
import { PanelLeftIcon } from "lucide-react";
|
|
4857
|
-
import * as
|
|
5629
|
+
import * as React49 from "react";
|
|
4858
5630
|
|
|
4859
5631
|
// src/components/ui/skeleton.tsx
|
|
4860
|
-
import { jsx as
|
|
5632
|
+
import { jsx as jsx49 } from "react/jsx-runtime";
|
|
4861
5633
|
function Skeleton({ className, ...props }) {
|
|
4862
|
-
return /* @__PURE__ */
|
|
5634
|
+
return /* @__PURE__ */ jsx49(
|
|
4863
5635
|
"div",
|
|
4864
5636
|
{
|
|
4865
5637
|
"data-slot": "skeleton",
|
|
@@ -4872,13 +5644,13 @@ function Skeleton({ className, ...props }) {
|
|
|
4872
5644
|
// src/components/ui/tooltip.tsx
|
|
4873
5645
|
import "react";
|
|
4874
5646
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
4875
|
-
import { X as
|
|
4876
|
-
import { jsx as
|
|
5647
|
+
import { X as X4 } from "lucide-react";
|
|
5648
|
+
import { jsx as jsx50, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
4877
5649
|
function TooltipProvider({
|
|
4878
5650
|
delayDuration = 0,
|
|
4879
5651
|
...props
|
|
4880
5652
|
}) {
|
|
4881
|
-
return /* @__PURE__ */
|
|
5653
|
+
return /* @__PURE__ */ jsx50(
|
|
4882
5654
|
TooltipPrimitive.Provider,
|
|
4883
5655
|
{
|
|
4884
5656
|
"data-slot": "tooltip-provider",
|
|
@@ -4890,12 +5662,12 @@ function TooltipProvider({
|
|
|
4890
5662
|
function Tooltip2({
|
|
4891
5663
|
...props
|
|
4892
5664
|
}) {
|
|
4893
|
-
return /* @__PURE__ */
|
|
5665
|
+
return /* @__PURE__ */ jsx50(TooltipProvider, { children: /* @__PURE__ */ jsx50(TooltipPrimitive.Root, { "data-slot": "tooltip", ...props }) });
|
|
4894
5666
|
}
|
|
4895
5667
|
function TooltipTrigger({
|
|
4896
5668
|
...props
|
|
4897
5669
|
}) {
|
|
4898
|
-
return /* @__PURE__ */
|
|
5670
|
+
return /* @__PURE__ */ jsx50(TooltipPrimitive.Trigger, { "data-slot": "tooltip-trigger", ...props });
|
|
4899
5671
|
}
|
|
4900
5672
|
function TooltipContent({
|
|
4901
5673
|
className,
|
|
@@ -4903,7 +5675,7 @@ function TooltipContent({
|
|
|
4903
5675
|
children,
|
|
4904
5676
|
...props
|
|
4905
5677
|
}) {
|
|
4906
|
-
return /* @__PURE__ */
|
|
5678
|
+
return /* @__PURE__ */ jsx50(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs29(
|
|
4907
5679
|
TooltipPrimitive.Content,
|
|
4908
5680
|
{
|
|
4909
5681
|
"data-slot": "tooltip-content",
|
|
@@ -4915,7 +5687,7 @@ function TooltipContent({
|
|
|
4915
5687
|
...props,
|
|
4916
5688
|
children: [
|
|
4917
5689
|
children,
|
|
4918
|
-
/* @__PURE__ */
|
|
5690
|
+
/* @__PURE__ */ jsx50(TooltipPrimitive.Arrow, { className: "bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })
|
|
4919
5691
|
]
|
|
4920
5692
|
}
|
|
4921
5693
|
) });
|
|
@@ -4930,7 +5702,7 @@ function RichTooltipContent({
|
|
|
4930
5702
|
children,
|
|
4931
5703
|
...props
|
|
4932
5704
|
}) {
|
|
4933
|
-
return /* @__PURE__ */
|
|
5705
|
+
return /* @__PURE__ */ jsx50(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs29(
|
|
4934
5706
|
TooltipPrimitive.Content,
|
|
4935
5707
|
{
|
|
4936
5708
|
"data-slot": "rich-tooltip-content",
|
|
@@ -4941,24 +5713,24 @@ function RichTooltipContent({
|
|
|
4941
5713
|
),
|
|
4942
5714
|
...props,
|
|
4943
5715
|
children: [
|
|
4944
|
-
/* @__PURE__ */
|
|
4945
|
-
icon && /* @__PURE__ */
|
|
4946
|
-
/* @__PURE__ */
|
|
4947
|
-
heading && /* @__PURE__ */
|
|
4948
|
-
/* @__PURE__ */
|
|
5716
|
+
/* @__PURE__ */ jsxs29("div", { className: "flex items-start gap-3 bg-gray-surface-dark rounded-[12px] px-3 py-4 text-sm leading-5 max-w-sm", children: [
|
|
5717
|
+
icon && /* @__PURE__ */ jsx50("span", { className: "flex items-center justify-center shrink-0 size-5 text-white [&_svg]:size-5", children: icon }),
|
|
5718
|
+
/* @__PURE__ */ jsxs29("div", { className: "flex flex-1 flex-col gap-2 min-w-0", children: [
|
|
5719
|
+
heading && /* @__PURE__ */ jsx50("p", { className: "font-semibold text-sm leading-5 text-white", children: heading }),
|
|
5720
|
+
/* @__PURE__ */ jsx50("div", { className: "font-normal text-sm leading-5 text-white", children })
|
|
4949
5721
|
] }),
|
|
4950
|
-
dismissible && /* @__PURE__ */
|
|
5722
|
+
dismissible && /* @__PURE__ */ jsx50(
|
|
4951
5723
|
"button",
|
|
4952
5724
|
{
|
|
4953
5725
|
type: "button",
|
|
4954
5726
|
onClick: onDismiss,
|
|
4955
5727
|
className: "flex items-center justify-center shrink-0 size-5 text-white/70 hover:text-white transition-colors cursor-pointer",
|
|
4956
5728
|
"aria-label": "Dismiss",
|
|
4957
|
-
children: /* @__PURE__ */
|
|
5729
|
+
children: /* @__PURE__ */ jsx50(X4, { className: "size-2.5" })
|
|
4958
5730
|
}
|
|
4959
5731
|
)
|
|
4960
5732
|
] }),
|
|
4961
|
-
/* @__PURE__ */
|
|
5733
|
+
/* @__PURE__ */ jsx50(
|
|
4962
5734
|
TooltipPrimitive.Arrow,
|
|
4963
5735
|
{
|
|
4964
5736
|
width: 16,
|
|
@@ -4972,11 +5744,11 @@ function RichTooltipContent({
|
|
|
4972
5744
|
}
|
|
4973
5745
|
|
|
4974
5746
|
// src/hooks/use-mobile.ts
|
|
4975
|
-
import * as
|
|
5747
|
+
import * as React48 from "react";
|
|
4976
5748
|
var MOBILE_BREAKPOINT = 768;
|
|
4977
5749
|
function useIsMobile() {
|
|
4978
|
-
const [isMobile, setIsMobile] =
|
|
4979
|
-
|
|
5750
|
+
const [isMobile, setIsMobile] = React48.useState(void 0);
|
|
5751
|
+
React48.useEffect(() => {
|
|
4980
5752
|
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
4981
5753
|
const onChange = () => {
|
|
4982
5754
|
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
@@ -4989,16 +5761,16 @@ function useIsMobile() {
|
|
|
4989
5761
|
}
|
|
4990
5762
|
|
|
4991
5763
|
// src/components/ui/sidebar.tsx
|
|
4992
|
-
import { jsx as
|
|
5764
|
+
import { jsx as jsx51, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
4993
5765
|
var SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
4994
5766
|
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
4995
5767
|
var SIDEBAR_WIDTH = "18rem";
|
|
4996
5768
|
var SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
4997
5769
|
var SIDEBAR_WIDTH_ICON = "3rem";
|
|
4998
5770
|
var SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
4999
|
-
var SidebarContext =
|
|
5771
|
+
var SidebarContext = React49.createContext(null);
|
|
5000
5772
|
function useSidebar() {
|
|
5001
|
-
const context =
|
|
5773
|
+
const context = React49.useContext(SidebarContext);
|
|
5002
5774
|
if (!context) {
|
|
5003
5775
|
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
5004
5776
|
}
|
|
@@ -5014,10 +5786,10 @@ function SidebarProvider({
|
|
|
5014
5786
|
...props
|
|
5015
5787
|
}) {
|
|
5016
5788
|
const isMobile = useIsMobile();
|
|
5017
|
-
const [openMobile, setOpenMobile] =
|
|
5018
|
-
const [_open, _setOpen] =
|
|
5789
|
+
const [openMobile, setOpenMobile] = React49.useState(false);
|
|
5790
|
+
const [_open, _setOpen] = React49.useState(defaultOpen);
|
|
5019
5791
|
const open = openProp ?? _open;
|
|
5020
|
-
const setOpen =
|
|
5792
|
+
const setOpen = React49.useCallback(
|
|
5021
5793
|
(value) => {
|
|
5022
5794
|
const openState = typeof value === "function" ? value(open) : value;
|
|
5023
5795
|
if (setOpenProp) {
|
|
@@ -5029,10 +5801,10 @@ function SidebarProvider({
|
|
|
5029
5801
|
},
|
|
5030
5802
|
[setOpenProp, open]
|
|
5031
5803
|
);
|
|
5032
|
-
const toggleSidebar =
|
|
5804
|
+
const toggleSidebar = React49.useCallback(() => {
|
|
5033
5805
|
return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
|
|
5034
5806
|
}, [isMobile, setOpen, setOpenMobile]);
|
|
5035
|
-
|
|
5807
|
+
React49.useEffect(() => {
|
|
5036
5808
|
const handleKeyDown = (event) => {
|
|
5037
5809
|
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
5038
5810
|
event.preventDefault();
|
|
@@ -5043,7 +5815,7 @@ function SidebarProvider({
|
|
|
5043
5815
|
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
5044
5816
|
}, [toggleSidebar]);
|
|
5045
5817
|
const state = open ? "expanded" : "collapsed";
|
|
5046
|
-
const contextValue =
|
|
5818
|
+
const contextValue = React49.useMemo(
|
|
5047
5819
|
() => ({
|
|
5048
5820
|
state,
|
|
5049
5821
|
open,
|
|
@@ -5055,7 +5827,7 @@ function SidebarProvider({
|
|
|
5055
5827
|
}),
|
|
5056
5828
|
[state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]
|
|
5057
5829
|
);
|
|
5058
|
-
return /* @__PURE__ */
|
|
5830
|
+
return /* @__PURE__ */ jsx51(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx51(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ jsx51(
|
|
5059
5831
|
"div",
|
|
5060
5832
|
{
|
|
5061
5833
|
"data-slot": "sidebar-wrapper",
|
|
@@ -5083,7 +5855,7 @@ function Sidebar({
|
|
|
5083
5855
|
}) {
|
|
5084
5856
|
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
5085
5857
|
if (collapsible === "none") {
|
|
5086
|
-
return /* @__PURE__ */
|
|
5858
|
+
return /* @__PURE__ */ jsx51(
|
|
5087
5859
|
"div",
|
|
5088
5860
|
{
|
|
5089
5861
|
"data-slot": "sidebar",
|
|
@@ -5097,7 +5869,7 @@ function Sidebar({
|
|
|
5097
5869
|
);
|
|
5098
5870
|
}
|
|
5099
5871
|
if (isMobile) {
|
|
5100
|
-
return /* @__PURE__ */
|
|
5872
|
+
return /* @__PURE__ */ jsx51(Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ jsxs30(
|
|
5101
5873
|
SheetContent,
|
|
5102
5874
|
{
|
|
5103
5875
|
"data-sidebar": "sidebar",
|
|
@@ -5109,16 +5881,16 @@ function Sidebar({
|
|
|
5109
5881
|
},
|
|
5110
5882
|
side,
|
|
5111
5883
|
children: [
|
|
5112
|
-
/* @__PURE__ */
|
|
5113
|
-
/* @__PURE__ */
|
|
5114
|
-
/* @__PURE__ */
|
|
5884
|
+
/* @__PURE__ */ jsxs30(SheetHeader, { className: "sr-only", children: [
|
|
5885
|
+
/* @__PURE__ */ jsx51(SheetTitle, { children: "Sidebar" }),
|
|
5886
|
+
/* @__PURE__ */ jsx51(SheetDescription, { children: "Displays the mobile sidebar." })
|
|
5115
5887
|
] }),
|
|
5116
|
-
/* @__PURE__ */
|
|
5888
|
+
/* @__PURE__ */ jsx51("div", { className: "flex h-full w-full flex-col", children })
|
|
5117
5889
|
]
|
|
5118
5890
|
}
|
|
5119
5891
|
) });
|
|
5120
5892
|
}
|
|
5121
|
-
return /* @__PURE__ */
|
|
5893
|
+
return /* @__PURE__ */ jsxs30(
|
|
5122
5894
|
"div",
|
|
5123
5895
|
{
|
|
5124
5896
|
className: "group peer text-sidebar-foreground hidden md:block",
|
|
@@ -5128,7 +5900,7 @@ function Sidebar({
|
|
|
5128
5900
|
"data-side": side,
|
|
5129
5901
|
"data-slot": "sidebar",
|
|
5130
5902
|
children: [
|
|
5131
|
-
/* @__PURE__ */
|
|
5903
|
+
/* @__PURE__ */ jsx51(
|
|
5132
5904
|
"div",
|
|
5133
5905
|
{
|
|
5134
5906
|
"data-slot": "sidebar-gap",
|
|
@@ -5140,7 +5912,7 @@ function Sidebar({
|
|
|
5140
5912
|
)
|
|
5141
5913
|
}
|
|
5142
5914
|
),
|
|
5143
|
-
/* @__PURE__ */
|
|
5915
|
+
/* @__PURE__ */ jsx51(
|
|
5144
5916
|
"div",
|
|
5145
5917
|
{
|
|
5146
5918
|
"data-slot": "sidebar-container",
|
|
@@ -5152,7 +5924,7 @@ function Sidebar({
|
|
|
5152
5924
|
className
|
|
5153
5925
|
),
|
|
5154
5926
|
...props,
|
|
5155
|
-
children: /* @__PURE__ */
|
|
5927
|
+
children: /* @__PURE__ */ jsx51(
|
|
5156
5928
|
"div",
|
|
5157
5929
|
{
|
|
5158
5930
|
"data-sidebar": "sidebar",
|
|
@@ -5173,7 +5945,7 @@ function SidebarTrigger({
|
|
|
5173
5945
|
...props
|
|
5174
5946
|
}) {
|
|
5175
5947
|
const { toggleSidebar } = useSidebar();
|
|
5176
|
-
return /* @__PURE__ */
|
|
5948
|
+
return /* @__PURE__ */ jsxs30(
|
|
5177
5949
|
Button,
|
|
5178
5950
|
{
|
|
5179
5951
|
"data-sidebar": "trigger",
|
|
@@ -5187,15 +5959,15 @@ function SidebarTrigger({
|
|
|
5187
5959
|
},
|
|
5188
5960
|
...props,
|
|
5189
5961
|
children: [
|
|
5190
|
-
/* @__PURE__ */
|
|
5191
|
-
/* @__PURE__ */
|
|
5962
|
+
/* @__PURE__ */ jsx51(PanelLeftIcon, {}),
|
|
5963
|
+
/* @__PURE__ */ jsx51("span", { className: "sr-only", children: "Toggle Sidebar" })
|
|
5192
5964
|
]
|
|
5193
5965
|
}
|
|
5194
5966
|
);
|
|
5195
5967
|
}
|
|
5196
5968
|
function SidebarRail({ className, ...props }) {
|
|
5197
5969
|
const { toggleSidebar } = useSidebar();
|
|
5198
|
-
return /* @__PURE__ */
|
|
5970
|
+
return /* @__PURE__ */ jsx51(
|
|
5199
5971
|
"button",
|
|
5200
5972
|
{
|
|
5201
5973
|
"data-sidebar": "rail",
|
|
@@ -5218,7 +5990,7 @@ function SidebarRail({ className, ...props }) {
|
|
|
5218
5990
|
);
|
|
5219
5991
|
}
|
|
5220
5992
|
function SidebarInset({ className, ...props }) {
|
|
5221
|
-
return /* @__PURE__ */
|
|
5993
|
+
return /* @__PURE__ */ jsx51(
|
|
5222
5994
|
"main",
|
|
5223
5995
|
{
|
|
5224
5996
|
"data-slot": "sidebar-inset",
|
|
@@ -5235,7 +6007,7 @@ function SidebarInput({
|
|
|
5235
6007
|
className,
|
|
5236
6008
|
...props
|
|
5237
6009
|
}) {
|
|
5238
|
-
return /* @__PURE__ */
|
|
6010
|
+
return /* @__PURE__ */ jsx51(
|
|
5239
6011
|
Input,
|
|
5240
6012
|
{
|
|
5241
6013
|
"data-slot": "sidebar-input",
|
|
@@ -5246,7 +6018,7 @@ function SidebarInput({
|
|
|
5246
6018
|
);
|
|
5247
6019
|
}
|
|
5248
6020
|
function SidebarHeader({ className, ...props }) {
|
|
5249
|
-
return /* @__PURE__ */
|
|
6021
|
+
return /* @__PURE__ */ jsx51(
|
|
5250
6022
|
"div",
|
|
5251
6023
|
{
|
|
5252
6024
|
"data-slot": "sidebar-header",
|
|
@@ -5257,7 +6029,7 @@ function SidebarHeader({ className, ...props }) {
|
|
|
5257
6029
|
);
|
|
5258
6030
|
}
|
|
5259
6031
|
function SidebarFooter({ className, ...props }) {
|
|
5260
|
-
return /* @__PURE__ */
|
|
6032
|
+
return /* @__PURE__ */ jsx51(
|
|
5261
6033
|
"div",
|
|
5262
6034
|
{
|
|
5263
6035
|
"data-slot": "sidebar-footer",
|
|
@@ -5271,7 +6043,7 @@ function SidebarSeparator({
|
|
|
5271
6043
|
className,
|
|
5272
6044
|
...props
|
|
5273
6045
|
}) {
|
|
5274
|
-
return /* @__PURE__ */
|
|
6046
|
+
return /* @__PURE__ */ jsx51(
|
|
5275
6047
|
Separator5,
|
|
5276
6048
|
{
|
|
5277
6049
|
"data-slot": "sidebar-separator",
|
|
@@ -5282,7 +6054,7 @@ function SidebarSeparator({
|
|
|
5282
6054
|
);
|
|
5283
6055
|
}
|
|
5284
6056
|
function SidebarContent({ className, ...props }) {
|
|
5285
|
-
return /* @__PURE__ */
|
|
6057
|
+
return /* @__PURE__ */ jsx51(
|
|
5286
6058
|
"div",
|
|
5287
6059
|
{
|
|
5288
6060
|
"data-slot": "sidebar-content",
|
|
@@ -5296,7 +6068,7 @@ function SidebarContent({ className, ...props }) {
|
|
|
5296
6068
|
);
|
|
5297
6069
|
}
|
|
5298
6070
|
function SidebarGroup({ className, ...props }) {
|
|
5299
|
-
return /* @__PURE__ */
|
|
6071
|
+
return /* @__PURE__ */ jsx51(
|
|
5300
6072
|
"div",
|
|
5301
6073
|
{
|
|
5302
6074
|
"data-slot": "sidebar-group",
|
|
@@ -5312,7 +6084,7 @@ function SidebarGroupLabel({
|
|
|
5312
6084
|
...props
|
|
5313
6085
|
}) {
|
|
5314
6086
|
const Comp = asChild ? Slot6 : "div";
|
|
5315
|
-
return /* @__PURE__ */
|
|
6087
|
+
return /* @__PURE__ */ jsx51(
|
|
5316
6088
|
Comp,
|
|
5317
6089
|
{
|
|
5318
6090
|
"data-slot": "sidebar-group-label",
|
|
@@ -5332,7 +6104,7 @@ function SidebarGroupAction({
|
|
|
5332
6104
|
...props
|
|
5333
6105
|
}) {
|
|
5334
6106
|
const Comp = asChild ? Slot6 : "button";
|
|
5335
|
-
return /* @__PURE__ */
|
|
6107
|
+
return /* @__PURE__ */ jsx51(
|
|
5336
6108
|
Comp,
|
|
5337
6109
|
{
|
|
5338
6110
|
"data-slot": "sidebar-group-action",
|
|
@@ -5352,7 +6124,7 @@ function SidebarGroupContent({
|
|
|
5352
6124
|
className,
|
|
5353
6125
|
...props
|
|
5354
6126
|
}) {
|
|
5355
|
-
return /* @__PURE__ */
|
|
6127
|
+
return /* @__PURE__ */ jsx51(
|
|
5356
6128
|
"div",
|
|
5357
6129
|
{
|
|
5358
6130
|
"data-slot": "sidebar-group-content",
|
|
@@ -5363,7 +6135,7 @@ function SidebarGroupContent({
|
|
|
5363
6135
|
);
|
|
5364
6136
|
}
|
|
5365
6137
|
function SidebarMenu({ className, ...props }) {
|
|
5366
|
-
return /* @__PURE__ */
|
|
6138
|
+
return /* @__PURE__ */ jsx51(
|
|
5367
6139
|
"ul",
|
|
5368
6140
|
{
|
|
5369
6141
|
"data-slot": "sidebar-menu",
|
|
@@ -5374,7 +6146,7 @@ function SidebarMenu({ className, ...props }) {
|
|
|
5374
6146
|
);
|
|
5375
6147
|
}
|
|
5376
6148
|
function SidebarMenuItem({ className, ...props }) {
|
|
5377
|
-
return /* @__PURE__ */
|
|
6149
|
+
return /* @__PURE__ */ jsx51(
|
|
5378
6150
|
"li",
|
|
5379
6151
|
{
|
|
5380
6152
|
"data-slot": "sidebar-menu-item",
|
|
@@ -5384,7 +6156,7 @@ function SidebarMenuItem({ className, ...props }) {
|
|
|
5384
6156
|
}
|
|
5385
6157
|
);
|
|
5386
6158
|
}
|
|
5387
|
-
var sidebarMenuButtonVariants =
|
|
6159
|
+
var sidebarMenuButtonVariants = cva12(
|
|
5388
6160
|
"peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
|
|
5389
6161
|
{
|
|
5390
6162
|
variants: {
|
|
@@ -5415,7 +6187,7 @@ function SidebarMenuButton({
|
|
|
5415
6187
|
}) {
|
|
5416
6188
|
const Comp = asChild ? Slot6 : "button";
|
|
5417
6189
|
const { isMobile, state } = useSidebar();
|
|
5418
|
-
const button = /* @__PURE__ */
|
|
6190
|
+
const button = /* @__PURE__ */ jsx51(
|
|
5419
6191
|
Comp,
|
|
5420
6192
|
{
|
|
5421
6193
|
"data-slot": "sidebar-menu-button",
|
|
@@ -5434,9 +6206,9 @@ function SidebarMenuButton({
|
|
|
5434
6206
|
children: tooltip
|
|
5435
6207
|
};
|
|
5436
6208
|
}
|
|
5437
|
-
return /* @__PURE__ */
|
|
5438
|
-
/* @__PURE__ */
|
|
5439
|
-
/* @__PURE__ */
|
|
6209
|
+
return /* @__PURE__ */ jsxs30(Tooltip2, { children: [
|
|
6210
|
+
/* @__PURE__ */ jsx51(TooltipTrigger, { asChild: true, children: button }),
|
|
6211
|
+
/* @__PURE__ */ jsx51(
|
|
5440
6212
|
TooltipContent,
|
|
5441
6213
|
{
|
|
5442
6214
|
side: "right",
|
|
@@ -5454,7 +6226,7 @@ function SidebarMenuAction({
|
|
|
5454
6226
|
...props
|
|
5455
6227
|
}) {
|
|
5456
6228
|
const Comp = asChild ? Slot6 : "button";
|
|
5457
|
-
return /* @__PURE__ */
|
|
6229
|
+
return /* @__PURE__ */ jsx51(
|
|
5458
6230
|
Comp,
|
|
5459
6231
|
{
|
|
5460
6232
|
"data-slot": "sidebar-menu-action",
|
|
@@ -5478,7 +6250,7 @@ function SidebarMenuBadge({
|
|
|
5478
6250
|
className,
|
|
5479
6251
|
...props
|
|
5480
6252
|
}) {
|
|
5481
|
-
return /* @__PURE__ */
|
|
6253
|
+
return /* @__PURE__ */ jsx51(
|
|
5482
6254
|
"div",
|
|
5483
6255
|
{
|
|
5484
6256
|
"data-slot": "sidebar-menu-badge",
|
|
@@ -5501,10 +6273,10 @@ function SidebarMenuSkeleton({
|
|
|
5501
6273
|
showIcon = false,
|
|
5502
6274
|
...props
|
|
5503
6275
|
}) {
|
|
5504
|
-
const width =
|
|
6276
|
+
const width = React49.useMemo(() => {
|
|
5505
6277
|
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
5506
6278
|
}, []);
|
|
5507
|
-
return /* @__PURE__ */
|
|
6279
|
+
return /* @__PURE__ */ jsxs30(
|
|
5508
6280
|
"div",
|
|
5509
6281
|
{
|
|
5510
6282
|
"data-slot": "sidebar-menu-skeleton",
|
|
@@ -5512,14 +6284,14 @@ function SidebarMenuSkeleton({
|
|
|
5512
6284
|
className: cn("flex h-8 items-center gap-2 rounded-md px-2", className),
|
|
5513
6285
|
...props,
|
|
5514
6286
|
children: [
|
|
5515
|
-
showIcon && /* @__PURE__ */
|
|
6287
|
+
showIcon && /* @__PURE__ */ jsx51(
|
|
5516
6288
|
Skeleton,
|
|
5517
6289
|
{
|
|
5518
6290
|
className: "size-4 rounded-md",
|
|
5519
6291
|
"data-sidebar": "menu-skeleton-icon"
|
|
5520
6292
|
}
|
|
5521
6293
|
),
|
|
5522
|
-
/* @__PURE__ */
|
|
6294
|
+
/* @__PURE__ */ jsx51(
|
|
5523
6295
|
Skeleton,
|
|
5524
6296
|
{
|
|
5525
6297
|
className: "h-4 max-w-(--skeleton-width) flex-1",
|
|
@@ -5534,7 +6306,7 @@ function SidebarMenuSkeleton({
|
|
|
5534
6306
|
);
|
|
5535
6307
|
}
|
|
5536
6308
|
function SidebarMenuSub({ className, ...props }) {
|
|
5537
|
-
return /* @__PURE__ */
|
|
6309
|
+
return /* @__PURE__ */ jsx51(
|
|
5538
6310
|
"ul",
|
|
5539
6311
|
{
|
|
5540
6312
|
"data-slot": "sidebar-menu-sub",
|
|
@@ -5552,7 +6324,7 @@ function SidebarMenuSubItem({
|
|
|
5552
6324
|
className,
|
|
5553
6325
|
...props
|
|
5554
6326
|
}) {
|
|
5555
|
-
return /* @__PURE__ */
|
|
6327
|
+
return /* @__PURE__ */ jsx51(
|
|
5556
6328
|
"li",
|
|
5557
6329
|
{
|
|
5558
6330
|
"data-slot": "sidebar-menu-sub-item",
|
|
@@ -5570,7 +6342,7 @@ function SidebarMenuSubButton({
|
|
|
5570
6342
|
...props
|
|
5571
6343
|
}) {
|
|
5572
6344
|
const Comp = asChild ? Slot6 : "a";
|
|
5573
|
-
return /* @__PURE__ */
|
|
6345
|
+
return /* @__PURE__ */ jsx51(
|
|
5574
6346
|
Comp,
|
|
5575
6347
|
{
|
|
5576
6348
|
"data-slot": "sidebar-menu-sub-button",
|
|
@@ -5591,9 +6363,9 @@ function SidebarMenuSubButton({
|
|
|
5591
6363
|
}
|
|
5592
6364
|
|
|
5593
6365
|
// src/components/ui/slider.tsx
|
|
5594
|
-
import * as
|
|
6366
|
+
import * as React50 from "react";
|
|
5595
6367
|
import * as SliderPrimitive from "@radix-ui/react-slider";
|
|
5596
|
-
import { jsx as
|
|
6368
|
+
import { jsx as jsx52, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
5597
6369
|
function Slider({
|
|
5598
6370
|
className,
|
|
5599
6371
|
defaultValue,
|
|
@@ -5602,11 +6374,11 @@ function Slider({
|
|
|
5602
6374
|
max = 100,
|
|
5603
6375
|
...props
|
|
5604
6376
|
}) {
|
|
5605
|
-
const _values =
|
|
6377
|
+
const _values = React50.useMemo(
|
|
5606
6378
|
() => Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min, max],
|
|
5607
6379
|
[value, defaultValue, min, max]
|
|
5608
6380
|
);
|
|
5609
|
-
return /* @__PURE__ */
|
|
6381
|
+
return /* @__PURE__ */ jsxs31(
|
|
5610
6382
|
SliderPrimitive.Root,
|
|
5611
6383
|
{
|
|
5612
6384
|
"data-slot": "slider",
|
|
@@ -5620,14 +6392,14 @@ function Slider({
|
|
|
5620
6392
|
),
|
|
5621
6393
|
...props,
|
|
5622
6394
|
children: [
|
|
5623
|
-
/* @__PURE__ */
|
|
6395
|
+
/* @__PURE__ */ jsx52(
|
|
5624
6396
|
SliderPrimitive.Track,
|
|
5625
6397
|
{
|
|
5626
6398
|
"data-slot": "slider-track",
|
|
5627
6399
|
className: cn(
|
|
5628
6400
|
"bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"
|
|
5629
6401
|
),
|
|
5630
|
-
children: /* @__PURE__ */
|
|
6402
|
+
children: /* @__PURE__ */ jsx52(
|
|
5631
6403
|
SliderPrimitive.Range,
|
|
5632
6404
|
{
|
|
5633
6405
|
"data-slot": "slider-range",
|
|
@@ -5638,7 +6410,7 @@ function Slider({
|
|
|
5638
6410
|
)
|
|
5639
6411
|
}
|
|
5640
6412
|
),
|
|
5641
|
-
Array.from({ length: _values.length }, (_, index) => /* @__PURE__ */
|
|
6413
|
+
Array.from({ length: _values.length }, (_, index) => /* @__PURE__ */ jsx52(
|
|
5642
6414
|
SliderPrimitive.Thumb,
|
|
5643
6415
|
{
|
|
5644
6416
|
"data-slot": "slider-thumb",
|
|
@@ -5655,7 +6427,7 @@ function Slider({
|
|
|
5655
6427
|
import "react";
|
|
5656
6428
|
|
|
5657
6429
|
// src/components/ui/useMediaQuery.ts
|
|
5658
|
-
import { useEffect as
|
|
6430
|
+
import { useEffect as useEffect8, useState as useState10 } from "react";
|
|
5659
6431
|
function useMediaQuery(query) {
|
|
5660
6432
|
const getMatches = (query2) => {
|
|
5661
6433
|
if (typeof window !== "undefined") {
|
|
@@ -5663,11 +6435,11 @@ function useMediaQuery(query) {
|
|
|
5663
6435
|
}
|
|
5664
6436
|
return false;
|
|
5665
6437
|
};
|
|
5666
|
-
const [matches, setMatches] =
|
|
6438
|
+
const [matches, setMatches] = useState10(getMatches(query));
|
|
5667
6439
|
function handleChange() {
|
|
5668
6440
|
setMatches(getMatches(query));
|
|
5669
6441
|
}
|
|
5670
|
-
|
|
6442
|
+
useEffect8(() => {
|
|
5671
6443
|
const matchMedia = window.matchMedia(query);
|
|
5672
6444
|
handleChange();
|
|
5673
6445
|
if (matchMedia.addListener) {
|
|
@@ -5687,10 +6459,10 @@ function useMediaQuery(query) {
|
|
|
5687
6459
|
}
|
|
5688
6460
|
|
|
5689
6461
|
// src/components/ui/smart-dialog-drawer.tsx
|
|
5690
|
-
import { Fragment as Fragment3, jsx as
|
|
6462
|
+
import { Fragment as Fragment3, jsx as jsx53 } from "react/jsx-runtime";
|
|
5691
6463
|
var SmartDialog = ({ children, ...props }) => {
|
|
5692
6464
|
const isMobile = useMediaQuery("(max-width: 600px)");
|
|
5693
|
-
return isMobile ? /* @__PURE__ */
|
|
6465
|
+
return isMobile ? /* @__PURE__ */ jsx53(Drawer, { ...props, children }) : /* @__PURE__ */ jsx53(Dialog, { ...props, children });
|
|
5694
6466
|
};
|
|
5695
6467
|
var SmartDialogContent = ({
|
|
5696
6468
|
children,
|
|
@@ -5700,14 +6472,14 @@ var SmartDialogContent = ({
|
|
|
5700
6472
|
...props
|
|
5701
6473
|
}) => {
|
|
5702
6474
|
const isMobile = useMediaQuery("(max-width: 600px)");
|
|
5703
|
-
return isMobile ? /* @__PURE__ */
|
|
6475
|
+
return isMobile ? /* @__PURE__ */ jsx53(
|
|
5704
6476
|
DrawerContent,
|
|
5705
6477
|
{
|
|
5706
6478
|
...props,
|
|
5707
6479
|
withCloseButton: withCloseButton ?? showCloseButton ?? true,
|
|
5708
6480
|
children
|
|
5709
6481
|
}
|
|
5710
|
-
) : /* @__PURE__ */
|
|
6482
|
+
) : /* @__PURE__ */ jsx53(
|
|
5711
6483
|
DialogContent,
|
|
5712
6484
|
{
|
|
5713
6485
|
...props,
|
|
@@ -5722,39 +6494,39 @@ var SmartDialogDescription = ({
|
|
|
5722
6494
|
...props
|
|
5723
6495
|
}) => {
|
|
5724
6496
|
const isMobile = useMediaQuery("(max-width: 600px)");
|
|
5725
|
-
return isMobile ? /* @__PURE__ */
|
|
6497
|
+
return isMobile ? /* @__PURE__ */ jsx53(DrawerDescription, { ...props, children }) : /* @__PURE__ */ jsx53(DialogDescription, { ...props, children });
|
|
5726
6498
|
};
|
|
5727
6499
|
var SmartDialogHeader = ({ children, ...props }) => {
|
|
5728
6500
|
const isMobile = useMediaQuery("(max-width: 600px)");
|
|
5729
|
-
return isMobile ? /* @__PURE__ */
|
|
6501
|
+
return isMobile ? /* @__PURE__ */ jsx53(DrawerHeader, { ...props, children }) : /* @__PURE__ */ jsx53(DialogHeader, { ...props, children });
|
|
5730
6502
|
};
|
|
5731
6503
|
var SmartDialogTitle = ({ children, ...props }) => {
|
|
5732
6504
|
const isMobile = useMediaQuery("(max-width: 600px)");
|
|
5733
|
-
return isMobile ? /* @__PURE__ */
|
|
6505
|
+
return isMobile ? /* @__PURE__ */ jsx53(DrawerTitle, { ...props, children }) : /* @__PURE__ */ jsx53(DialogTitle, { ...props, children });
|
|
5734
6506
|
};
|
|
5735
6507
|
var SmartDialogTrigger = ({
|
|
5736
6508
|
children,
|
|
5737
6509
|
...props
|
|
5738
6510
|
}) => {
|
|
5739
6511
|
const isMobile = useMediaQuery("(max-width: 600px)");
|
|
5740
|
-
return isMobile ? /* @__PURE__ */
|
|
6512
|
+
return isMobile ? /* @__PURE__ */ jsx53(DrawerTrigger, { ...props, children }) : /* @__PURE__ */ jsx53(DialogTrigger, { ...props, children });
|
|
5741
6513
|
};
|
|
5742
6514
|
var SmartDialogFooter = ({ children, ...props }) => {
|
|
5743
6515
|
const isMobile = useMediaQuery("(max-width: 600px)");
|
|
5744
|
-
return isMobile ? /* @__PURE__ */
|
|
6516
|
+
return isMobile ? /* @__PURE__ */ jsx53(DrawerFooter, { ...props, children }) : /* @__PURE__ */ jsx53(DialogFooter, { ...props, children });
|
|
5745
6517
|
};
|
|
5746
6518
|
var SmartDialogClose = ({ children, ...props }) => {
|
|
5747
6519
|
const isMobile = useMediaQuery("(max-width: 600px)");
|
|
5748
|
-
return isMobile ? /* @__PURE__ */
|
|
6520
|
+
return isMobile ? /* @__PURE__ */ jsx53(Fragment3, { children: /* @__PURE__ */ jsx53(DrawerClose, { ...props, children }) }) : /* @__PURE__ */ jsx53(DialogClose, { ...props, children });
|
|
5749
6521
|
};
|
|
5750
6522
|
|
|
5751
6523
|
// src/components/ui/sonner.tsx
|
|
5752
6524
|
import { useTheme } from "next-themes";
|
|
5753
6525
|
import { Toaster as Sonner } from "sonner";
|
|
5754
|
-
import { jsx as
|
|
6526
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
5755
6527
|
var Toaster = ({ ...props }) => {
|
|
5756
6528
|
const { theme = "system" } = useTheme();
|
|
5757
|
-
return /* @__PURE__ */
|
|
6529
|
+
return /* @__PURE__ */ jsx54(
|
|
5758
6530
|
Sonner,
|
|
5759
6531
|
{
|
|
5760
6532
|
theme,
|
|
@@ -5772,12 +6544,12 @@ var Toaster = ({ ...props }) => {
|
|
|
5772
6544
|
// src/components/ui/switch.tsx
|
|
5773
6545
|
import * as SwitchPrimitive from "@radix-ui/react-switch";
|
|
5774
6546
|
import "react";
|
|
5775
|
-
import { jsx as
|
|
6547
|
+
import { jsx as jsx55 } from "react/jsx-runtime";
|
|
5776
6548
|
function Switch({
|
|
5777
6549
|
className,
|
|
5778
6550
|
...props
|
|
5779
6551
|
}) {
|
|
5780
|
-
return /* @__PURE__ */
|
|
6552
|
+
return /* @__PURE__ */ jsx55(
|
|
5781
6553
|
SwitchPrimitive.Root,
|
|
5782
6554
|
{
|
|
5783
6555
|
"data-slot": "switch",
|
|
@@ -5786,7 +6558,7 @@ function Switch({
|
|
|
5786
6558
|
className
|
|
5787
6559
|
),
|
|
5788
6560
|
...props,
|
|
5789
|
-
children: /* @__PURE__ */
|
|
6561
|
+
children: /* @__PURE__ */ jsx55(
|
|
5790
6562
|
SwitchPrimitive.Thumb,
|
|
5791
6563
|
{
|
|
5792
6564
|
"data-slot": "switch-thumb",
|
|
@@ -5801,14 +6573,14 @@ function Switch({
|
|
|
5801
6573
|
|
|
5802
6574
|
// src/components/ui/table.tsx
|
|
5803
6575
|
import "react";
|
|
5804
|
-
import { jsx as
|
|
6576
|
+
import { jsx as jsx56 } from "react/jsx-runtime";
|
|
5805
6577
|
function Table({ className, ...props }) {
|
|
5806
|
-
return /* @__PURE__ */
|
|
6578
|
+
return /* @__PURE__ */ jsx56(
|
|
5807
6579
|
"div",
|
|
5808
6580
|
{
|
|
5809
6581
|
"data-slot": "table-container",
|
|
5810
6582
|
className: "relative w-full overflow-x-auto",
|
|
5811
|
-
children: /* @__PURE__ */
|
|
6583
|
+
children: /* @__PURE__ */ jsx56(
|
|
5812
6584
|
"table",
|
|
5813
6585
|
{
|
|
5814
6586
|
"data-slot": "table",
|
|
@@ -5820,7 +6592,7 @@ function Table({ className, ...props }) {
|
|
|
5820
6592
|
);
|
|
5821
6593
|
}
|
|
5822
6594
|
function TableHeader({ className, ...props }) {
|
|
5823
|
-
return /* @__PURE__ */
|
|
6595
|
+
return /* @__PURE__ */ jsx56(
|
|
5824
6596
|
"thead",
|
|
5825
6597
|
{
|
|
5826
6598
|
"data-slot": "table-header",
|
|
@@ -5830,7 +6602,7 @@ function TableHeader({ className, ...props }) {
|
|
|
5830
6602
|
);
|
|
5831
6603
|
}
|
|
5832
6604
|
function TableBody({ className, ...props }) {
|
|
5833
|
-
return /* @__PURE__ */
|
|
6605
|
+
return /* @__PURE__ */ jsx56(
|
|
5834
6606
|
"tbody",
|
|
5835
6607
|
{
|
|
5836
6608
|
"data-slot": "table-body",
|
|
@@ -5840,7 +6612,7 @@ function TableBody({ className, ...props }) {
|
|
|
5840
6612
|
);
|
|
5841
6613
|
}
|
|
5842
6614
|
function TableFooter({ className, ...props }) {
|
|
5843
|
-
return /* @__PURE__ */
|
|
6615
|
+
return /* @__PURE__ */ jsx56(
|
|
5844
6616
|
"tfoot",
|
|
5845
6617
|
{
|
|
5846
6618
|
"data-slot": "table-footer",
|
|
@@ -5853,7 +6625,7 @@ function TableFooter({ className, ...props }) {
|
|
|
5853
6625
|
);
|
|
5854
6626
|
}
|
|
5855
6627
|
function TableRow({ className, ...props }) {
|
|
5856
|
-
return /* @__PURE__ */
|
|
6628
|
+
return /* @__PURE__ */ jsx56(
|
|
5857
6629
|
"tr",
|
|
5858
6630
|
{
|
|
5859
6631
|
"data-slot": "table-row",
|
|
@@ -5866,7 +6638,7 @@ function TableRow({ className, ...props }) {
|
|
|
5866
6638
|
);
|
|
5867
6639
|
}
|
|
5868
6640
|
function TableHead({ className, ...props }) {
|
|
5869
|
-
return /* @__PURE__ */
|
|
6641
|
+
return /* @__PURE__ */ jsx56(
|
|
5870
6642
|
"th",
|
|
5871
6643
|
{
|
|
5872
6644
|
"data-slot": "table-head",
|
|
@@ -5879,7 +6651,7 @@ function TableHead({ className, ...props }) {
|
|
|
5879
6651
|
);
|
|
5880
6652
|
}
|
|
5881
6653
|
function TableCell({ className, ...props }) {
|
|
5882
|
-
return /* @__PURE__ */
|
|
6654
|
+
return /* @__PURE__ */ jsx56(
|
|
5883
6655
|
"td",
|
|
5884
6656
|
{
|
|
5885
6657
|
"data-slot": "table-cell",
|
|
@@ -5895,7 +6667,7 @@ function TableCaption({
|
|
|
5895
6667
|
className,
|
|
5896
6668
|
...props
|
|
5897
6669
|
}) {
|
|
5898
|
-
return /* @__PURE__ */
|
|
6670
|
+
return /* @__PURE__ */ jsx56(
|
|
5899
6671
|
"caption",
|
|
5900
6672
|
{
|
|
5901
6673
|
"data-slot": "table-caption",
|
|
@@ -5907,49 +6679,148 @@ function TableCaption({
|
|
|
5907
6679
|
|
|
5908
6680
|
// src/components/ui/tabs.tsx
|
|
5909
6681
|
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
5910
|
-
import { cva as
|
|
5911
|
-
import "react";
|
|
5912
|
-
import { jsx as
|
|
6682
|
+
import { cva as cva13 } from "class-variance-authority";
|
|
6683
|
+
import * as React54 from "react";
|
|
6684
|
+
import { jsx as jsx57, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
6685
|
+
var TabsContext = React54.createContext({
|
|
6686
|
+
orientation: "horizontal"
|
|
6687
|
+
});
|
|
6688
|
+
function useTabIndicator(listRef, orientation) {
|
|
6689
|
+
const [style, setStyle] = React54.useState({
|
|
6690
|
+
position: "absolute",
|
|
6691
|
+
opacity: 0
|
|
6692
|
+
});
|
|
6693
|
+
const isFirstMeasurement = React54.useRef(true);
|
|
6694
|
+
const measure = React54.useCallback(() => {
|
|
6695
|
+
const list = listRef.current;
|
|
6696
|
+
if (!list) return;
|
|
6697
|
+
requestAnimationFrame(() => {
|
|
6698
|
+
const activeEl = list.querySelector(
|
|
6699
|
+
'[data-state="active"]'
|
|
6700
|
+
);
|
|
6701
|
+
if (!activeEl) return;
|
|
6702
|
+
const noTransition = isFirstMeasurement.current;
|
|
6703
|
+
if (orientation === "horizontal") {
|
|
6704
|
+
setStyle({
|
|
6705
|
+
position: "absolute",
|
|
6706
|
+
bottom: 0,
|
|
6707
|
+
left: 0,
|
|
6708
|
+
height: "2px",
|
|
6709
|
+
width: activeEl.offsetWidth,
|
|
6710
|
+
transform: `translateX(${activeEl.offsetLeft}px)`,
|
|
6711
|
+
transition: noTransition ? "none" : "transform 300ms ease-in-out, width 300ms ease-in-out",
|
|
6712
|
+
background: "var(--primary-stroke-default)",
|
|
6713
|
+
opacity: 1
|
|
6714
|
+
});
|
|
6715
|
+
} else {
|
|
6716
|
+
setStyle({
|
|
6717
|
+
position: "absolute",
|
|
6718
|
+
left: 0,
|
|
6719
|
+
top: 0,
|
|
6720
|
+
width: "2px",
|
|
6721
|
+
height: activeEl.offsetHeight,
|
|
6722
|
+
transform: `translateY(${activeEl.offsetTop}px)`,
|
|
6723
|
+
transition: noTransition ? "none" : "transform 300ms ease-in-out, height 300ms ease-in-out",
|
|
6724
|
+
background: "var(--primary-stroke-default)",
|
|
6725
|
+
opacity: 1
|
|
6726
|
+
});
|
|
6727
|
+
}
|
|
6728
|
+
if (noTransition) {
|
|
6729
|
+
isFirstMeasurement.current = false;
|
|
6730
|
+
}
|
|
6731
|
+
});
|
|
6732
|
+
}, [listRef, orientation]);
|
|
6733
|
+
React54.useEffect(() => {
|
|
6734
|
+
const list = listRef.current;
|
|
6735
|
+
if (!list) return;
|
|
6736
|
+
measure();
|
|
6737
|
+
const mutationObserver = new MutationObserver(() => {
|
|
6738
|
+
measure();
|
|
6739
|
+
});
|
|
6740
|
+
mutationObserver.observe(list, {
|
|
6741
|
+
subtree: true,
|
|
6742
|
+
attributes: true,
|
|
6743
|
+
attributeFilter: ["data-state"],
|
|
6744
|
+
childList: true
|
|
6745
|
+
});
|
|
6746
|
+
const resizeObserver = new ResizeObserver(() => {
|
|
6747
|
+
measure();
|
|
6748
|
+
});
|
|
6749
|
+
resizeObserver.observe(list);
|
|
6750
|
+
return () => {
|
|
6751
|
+
mutationObserver.disconnect();
|
|
6752
|
+
resizeObserver.disconnect();
|
|
6753
|
+
};
|
|
6754
|
+
}, [listRef, measure]);
|
|
6755
|
+
return { style };
|
|
6756
|
+
}
|
|
5913
6757
|
function Tabs({
|
|
5914
6758
|
className,
|
|
6759
|
+
orientation = "horizontal",
|
|
5915
6760
|
...props
|
|
5916
6761
|
}) {
|
|
5917
|
-
|
|
6762
|
+
const ctx = React54.useMemo(
|
|
6763
|
+
() => ({ orientation: orientation ?? "horizontal" }),
|
|
6764
|
+
[orientation]
|
|
6765
|
+
);
|
|
6766
|
+
return /* @__PURE__ */ jsx57(TabsContext.Provider, { value: ctx, children: /* @__PURE__ */ jsx57(
|
|
5918
6767
|
TabsPrimitive.Root,
|
|
5919
6768
|
{
|
|
5920
6769
|
"data-slot": "tabs",
|
|
5921
|
-
|
|
6770
|
+
orientation,
|
|
6771
|
+
className: cn(
|
|
6772
|
+
orientation === "vertical" ? "flex flex-row gap-4" : "flex flex-col gap-2",
|
|
6773
|
+
className
|
|
6774
|
+
),
|
|
5922
6775
|
...props
|
|
5923
6776
|
}
|
|
5924
|
-
);
|
|
6777
|
+
) });
|
|
5925
6778
|
}
|
|
5926
6779
|
function TabsList({
|
|
5927
6780
|
className,
|
|
5928
6781
|
...props
|
|
5929
6782
|
}) {
|
|
5930
|
-
|
|
6783
|
+
const listRef = React54.useRef(null);
|
|
6784
|
+
const { orientation } = React54.useContext(TabsContext);
|
|
6785
|
+
const { style: indicatorStyle } = useTabIndicator(listRef, orientation);
|
|
6786
|
+
return /* @__PURE__ */ jsxs32(
|
|
5931
6787
|
TabsPrimitive.List,
|
|
5932
6788
|
{
|
|
6789
|
+
ref: listRef,
|
|
5933
6790
|
"data-slot": "tabs-list",
|
|
5934
6791
|
className: cn(
|
|
5935
|
-
"text-muted-foreground
|
|
6792
|
+
"text-muted-foreground relative",
|
|
6793
|
+
orientation === "vertical" ? "flex flex-col border-l border-l-gray-stroke-default" : "flex w-fit items-center overflow-x-auto border-b border-b-gray-stroke-default",
|
|
5936
6794
|
className
|
|
5937
6795
|
),
|
|
5938
|
-
...props
|
|
6796
|
+
...props,
|
|
6797
|
+
children: [
|
|
6798
|
+
props.children,
|
|
6799
|
+
/* @__PURE__ */ jsx57("span", { "data-slot": "tabs-indicator", style: indicatorStyle })
|
|
6800
|
+
]
|
|
5939
6801
|
}
|
|
5940
6802
|
);
|
|
5941
6803
|
}
|
|
5942
|
-
var tabsTriggerVariants =
|
|
5943
|
-
"cursor-pointer inline-flex shrink-0 items-center justify-center font-sans font-medium whitespace-nowrap transition-[color,box-shadow] text-vibrant-text-details
|
|
6804
|
+
var tabsTriggerVariants = cva13(
|
|
6805
|
+
"cursor-pointer inline-flex shrink-0 items-center justify-center font-sans font-medium whitespace-nowrap transition-[color,box-shadow] text-vibrant-text-details data-[state=active]:font-semibold data-[state=active]:text-vibrant-text-heading disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-4",
|
|
5944
6806
|
{
|
|
5945
6807
|
variants: {
|
|
5946
6808
|
size: {
|
|
5947
|
-
md: "
|
|
5948
|
-
lg: "
|
|
6809
|
+
md: "text-sm leading-5",
|
|
6810
|
+
lg: "text-base leading-6"
|
|
6811
|
+
},
|
|
6812
|
+
orientation: {
|
|
6813
|
+
horizontal: "pb-1 px-2",
|
|
6814
|
+
vertical: "py-1.5 px-3 justify-start text-left w-full"
|
|
5949
6815
|
}
|
|
5950
6816
|
},
|
|
6817
|
+
compoundVariants: [
|
|
6818
|
+
{ orientation: "horizontal", size: "md", class: "min-w-[72px]" },
|
|
6819
|
+
{ orientation: "horizontal", size: "lg", class: "min-w-[88px]" }
|
|
6820
|
+
],
|
|
5951
6821
|
defaultVariants: {
|
|
5952
|
-
size: "md"
|
|
6822
|
+
size: "md",
|
|
6823
|
+
orientation: "horizontal"
|
|
5953
6824
|
}
|
|
5954
6825
|
}
|
|
5955
6826
|
);
|
|
@@ -5959,13 +6830,23 @@ function TabsTrigger({
|
|
|
5959
6830
|
children,
|
|
5960
6831
|
...props
|
|
5961
6832
|
}) {
|
|
5962
|
-
|
|
6833
|
+
const { orientation } = React54.useContext(TabsContext);
|
|
6834
|
+
return /* @__PURE__ */ jsx57(
|
|
5963
6835
|
TabsPrimitive.Trigger,
|
|
5964
6836
|
{
|
|
5965
6837
|
"data-slot": "tabs-trigger",
|
|
5966
|
-
className: cn(tabsTriggerVariants({ size }), className),
|
|
6838
|
+
className: cn(tabsTriggerVariants({ size, orientation }), className),
|
|
5967
6839
|
...props,
|
|
5968
|
-
children: /* @__PURE__ */
|
|
6840
|
+
children: /* @__PURE__ */ jsx57(
|
|
6841
|
+
"span",
|
|
6842
|
+
{
|
|
6843
|
+
className: cn(
|
|
6844
|
+
"inline-flex items-center justify-center gap-1.5 rounded-[6px] hover:bg-gray-surface-light",
|
|
6845
|
+
orientation === "vertical" ? "px-2 py-1.5 w-full" : "px-2 py-1.5"
|
|
6846
|
+
),
|
|
6847
|
+
children
|
|
6848
|
+
}
|
|
6849
|
+
)
|
|
5969
6850
|
}
|
|
5970
6851
|
);
|
|
5971
6852
|
}
|
|
@@ -5973,7 +6854,7 @@ function TabsContent({
|
|
|
5973
6854
|
className,
|
|
5974
6855
|
...props
|
|
5975
6856
|
}) {
|
|
5976
|
-
return /* @__PURE__ */
|
|
6857
|
+
return /* @__PURE__ */ jsx57(
|
|
5977
6858
|
TabsPrimitive.Content,
|
|
5978
6859
|
{
|
|
5979
6860
|
"data-slot": "tabs-content",
|
|
@@ -5987,9 +6868,9 @@ function TabsContent({
|
|
|
5987
6868
|
import {
|
|
5988
6869
|
ThemeProvider as NextThemesProvider
|
|
5989
6870
|
} from "next-themes";
|
|
5990
|
-
import { jsx as
|
|
6871
|
+
import { jsx as jsx58 } from "react/jsx-runtime";
|
|
5991
6872
|
function ThemeProvider({ children, ...props }) {
|
|
5992
|
-
return /* @__PURE__ */
|
|
6873
|
+
return /* @__PURE__ */ jsx58(
|
|
5993
6874
|
NextThemesProvider,
|
|
5994
6875
|
{
|
|
5995
6876
|
attribute: "class",
|
|
@@ -6006,29 +6887,29 @@ function ThemeProvider({ children, ...props }) {
|
|
|
6006
6887
|
import { Monitor, Moon, Sun } from "lucide-react";
|
|
6007
6888
|
import { useTheme as useTheme2 } from "next-themes";
|
|
6008
6889
|
import "react";
|
|
6009
|
-
import { jsx as
|
|
6890
|
+
import { jsx as jsx59, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
6010
6891
|
function ThemeToggle({
|
|
6011
6892
|
className,
|
|
6012
6893
|
...props
|
|
6013
6894
|
}) {
|
|
6014
6895
|
const { setTheme } = useTheme2();
|
|
6015
|
-
return /* @__PURE__ */
|
|
6016
|
-
/* @__PURE__ */
|
|
6017
|
-
/* @__PURE__ */
|
|
6018
|
-
/* @__PURE__ */
|
|
6019
|
-
/* @__PURE__ */
|
|
6896
|
+
return /* @__PURE__ */ jsxs33(DropdownMenu, { children: [
|
|
6897
|
+
/* @__PURE__ */ jsx59(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs33(Button, { variant: "outline", size: "icon", className, ...props, children: [
|
|
6898
|
+
/* @__PURE__ */ jsx59(Sun, { className: "size-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0" }),
|
|
6899
|
+
/* @__PURE__ */ jsx59(Moon, { className: "absolute size-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100" }),
|
|
6900
|
+
/* @__PURE__ */ jsx59("span", { className: "sr-only", children: "Toggle theme" })
|
|
6020
6901
|
] }) }),
|
|
6021
|
-
/* @__PURE__ */
|
|
6022
|
-
/* @__PURE__ */
|
|
6023
|
-
/* @__PURE__ */
|
|
6902
|
+
/* @__PURE__ */ jsxs33(DropdownMenuContent, { align: "end", children: [
|
|
6903
|
+
/* @__PURE__ */ jsxs33(DropdownMenuItem, { onClick: () => setTheme("light"), children: [
|
|
6904
|
+
/* @__PURE__ */ jsx59(Sun, { className: "size-4" }),
|
|
6024
6905
|
"Light"
|
|
6025
6906
|
] }),
|
|
6026
|
-
/* @__PURE__ */
|
|
6027
|
-
/* @__PURE__ */
|
|
6907
|
+
/* @__PURE__ */ jsxs33(DropdownMenuItem, { onClick: () => setTheme("dark"), children: [
|
|
6908
|
+
/* @__PURE__ */ jsx59(Moon, { className: "size-4" }),
|
|
6028
6909
|
"Dark"
|
|
6029
6910
|
] }),
|
|
6030
|
-
/* @__PURE__ */
|
|
6031
|
-
/* @__PURE__ */
|
|
6911
|
+
/* @__PURE__ */ jsxs33(DropdownMenuItem, { onClick: () => setTheme("system"), children: [
|
|
6912
|
+
/* @__PURE__ */ jsx59(Monitor, { className: "size-4" }),
|
|
6032
6913
|
"System"
|
|
6033
6914
|
] })
|
|
6034
6915
|
] })
|
|
@@ -6038,8 +6919,8 @@ function ThemeToggle({
|
|
|
6038
6919
|
// src/components/ui/time-input.tsx
|
|
6039
6920
|
import "class-variance-authority";
|
|
6040
6921
|
import { Clock } from "lucide-react";
|
|
6041
|
-
import * as
|
|
6042
|
-
import { jsx as
|
|
6922
|
+
import * as React56 from "react";
|
|
6923
|
+
import { jsx as jsx60, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
6043
6924
|
var TIME_FORMAT_PLACEHOLDER = {
|
|
6044
6925
|
"12h": "hh:mm AM/PM",
|
|
6045
6926
|
"24h": "HH:mm",
|
|
@@ -6092,16 +6973,16 @@ function TimeInput({
|
|
|
6092
6973
|
formatDisplay
|
|
6093
6974
|
}) {
|
|
6094
6975
|
const resolvedPlaceholder = placeholder ?? TIME_FORMAT_PLACEHOLDER[timeFormat];
|
|
6095
|
-
const displayValue =
|
|
6976
|
+
const displayValue = React56.useMemo(() => {
|
|
6096
6977
|
if (!time) return "";
|
|
6097
6978
|
if (formatDisplay) return formatDisplay(time);
|
|
6098
6979
|
return formatTime(time, timeFormat);
|
|
6099
6980
|
}, [time, formatDisplay, timeFormat]);
|
|
6100
|
-
const [open, setOpen] =
|
|
6101
|
-
const hoursRef =
|
|
6102
|
-
const minutesRef =
|
|
6103
|
-
const periodRef =
|
|
6104
|
-
const scrollToSelected =
|
|
6981
|
+
const [open, setOpen] = React56.useState(false);
|
|
6982
|
+
const hoursRef = React56.useRef(null);
|
|
6983
|
+
const minutesRef = React56.useRef(null);
|
|
6984
|
+
const periodRef = React56.useRef(null);
|
|
6985
|
+
const scrollToSelected = React56.useCallback(() => {
|
|
6105
6986
|
requestAnimationFrame(() => {
|
|
6106
6987
|
for (const ref of [hoursRef, minutesRef, periodRef]) {
|
|
6107
6988
|
const container = ref.current;
|
|
@@ -6113,7 +6994,7 @@ function TimeInput({
|
|
|
6113
6994
|
}
|
|
6114
6995
|
});
|
|
6115
6996
|
}, []);
|
|
6116
|
-
|
|
6997
|
+
React56.useEffect(() => {
|
|
6117
6998
|
if (open) {
|
|
6118
6999
|
scrollToSelected();
|
|
6119
7000
|
}
|
|
@@ -6149,8 +7030,8 @@ function TimeInput({
|
|
|
6149
7030
|
const selectedH12 = time ? getDisplayHour(time.hours, timeFormat) : null;
|
|
6150
7031
|
const selectedMinute = time?.minutes ?? null;
|
|
6151
7032
|
const selectedPeriod = time ? getPeriod(time.hours) : null;
|
|
6152
|
-
return /* @__PURE__ */
|
|
6153
|
-
/* @__PURE__ */
|
|
7033
|
+
return /* @__PURE__ */ jsx60("div", { className: cn("relative flex gap-2", className), children: /* @__PURE__ */ jsxs34(Popover, { open, onOpenChange: setOpen, children: [
|
|
7034
|
+
/* @__PURE__ */ jsx60(PopoverTrigger, { asChild: true, disabled: inputDisabled, children: /* @__PURE__ */ jsxs34(
|
|
6154
7035
|
Button,
|
|
6155
7036
|
{
|
|
6156
7037
|
type: "button",
|
|
@@ -6165,18 +7046,18 @@ function TimeInput({
|
|
|
6165
7046
|
disabled: inputDisabled,
|
|
6166
7047
|
children: [
|
|
6167
7048
|
displayValue || resolvedPlaceholder,
|
|
6168
|
-
icon !== void 0 ? icon : /* @__PURE__ */
|
|
7049
|
+
icon !== void 0 ? icon : /* @__PURE__ */ jsx60(Clock, { className: "h-4 w-4 text-muted-foreground shrink-0" })
|
|
6169
7050
|
]
|
|
6170
7051
|
}
|
|
6171
7052
|
) }),
|
|
6172
|
-
/* @__PURE__ */
|
|
7053
|
+
/* @__PURE__ */ jsx60(
|
|
6173
7054
|
PopoverContent,
|
|
6174
7055
|
{
|
|
6175
7056
|
className: cn("w-auto p-0", popoverContentClassName),
|
|
6176
7057
|
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
6177
7058
|
...popoverContentProps,
|
|
6178
|
-
children: /* @__PURE__ */
|
|
6179
|
-
/* @__PURE__ */
|
|
7059
|
+
children: /* @__PURE__ */ jsxs34("div", { className: "flex divide-x border border-focus-ring rounded-md", children: [
|
|
7060
|
+
/* @__PURE__ */ jsx60("div", { className: "h-56 w-16 overflow-y-auto overscroll-y-contain [-webkit-overflow-scrolling:touch]", children: /* @__PURE__ */ jsx60("div", { ref: hoursRef, className: "flex flex-col p-1 ", children: hoursList.map((h) => /* @__PURE__ */ jsx60(
|
|
6180
7061
|
Button,
|
|
6181
7062
|
{
|
|
6182
7063
|
variant: "ghost",
|
|
@@ -6191,7 +7072,7 @@ function TimeInput({
|
|
|
6191
7072
|
},
|
|
6192
7073
|
h
|
|
6193
7074
|
)) }) }),
|
|
6194
|
-
/* @__PURE__ */
|
|
7075
|
+
/* @__PURE__ */ jsx60("div", { className: "h-56 w-16 overflow-y-auto overscroll-y-contain [-webkit-overflow-scrolling:touch]", children: /* @__PURE__ */ jsx60(
|
|
6195
7076
|
"div",
|
|
6196
7077
|
{
|
|
6197
7078
|
ref: minutesRef,
|
|
@@ -6199,7 +7080,7 @@ function TimeInput({
|
|
|
6199
7080
|
"flex flex-col p-1",
|
|
6200
7081
|
minutesList.length <= 12 && "h-full justify-center"
|
|
6201
7082
|
),
|
|
6202
|
-
children: minutesList.map((m) => /* @__PURE__ */
|
|
7083
|
+
children: minutesList.map((m) => /* @__PURE__ */ jsx60(
|
|
6203
7084
|
Button,
|
|
6204
7085
|
{
|
|
6205
7086
|
variant: "ghost",
|
|
@@ -6216,7 +7097,7 @@ function TimeInput({
|
|
|
6216
7097
|
))
|
|
6217
7098
|
}
|
|
6218
7099
|
) }),
|
|
6219
|
-
!is24HourFormat(timeFormat) && /* @__PURE__ */
|
|
7100
|
+
!is24HourFormat(timeFormat) && /* @__PURE__ */ jsx60("div", { className: "flex flex-col p-1 justify-center gap-1", children: ["AM", "PM"].map((p) => /* @__PURE__ */ jsx60(
|
|
6220
7101
|
Button,
|
|
6221
7102
|
{
|
|
6222
7103
|
variant: "ghost",
|
|
@@ -6240,9 +7121,9 @@ function TimeInput({
|
|
|
6240
7121
|
// src/components/ui/toggle.tsx
|
|
6241
7122
|
import "react";
|
|
6242
7123
|
import * as TogglePrimitive from "@radix-ui/react-toggle";
|
|
6243
|
-
import { cva as
|
|
6244
|
-
import { jsx as
|
|
6245
|
-
var toggleVariants =
|
|
7124
|
+
import { cva as cva14 } from "class-variance-authority";
|
|
7125
|
+
import { jsx as jsx61 } from "react/jsx-runtime";
|
|
7126
|
+
var toggleVariants = cva14(
|
|
6246
7127
|
"inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",
|
|
6247
7128
|
{
|
|
6248
7129
|
variants: {
|
|
@@ -6268,7 +7149,7 @@ function Toggle({
|
|
|
6268
7149
|
size,
|
|
6269
7150
|
...props
|
|
6270
7151
|
}) {
|
|
6271
|
-
return /* @__PURE__ */
|
|
7152
|
+
return /* @__PURE__ */ jsx61(
|
|
6272
7153
|
TogglePrimitive.Root,
|
|
6273
7154
|
{
|
|
6274
7155
|
"data-slot": "toggle",
|
|
@@ -6279,11 +7160,11 @@ function Toggle({
|
|
|
6279
7160
|
}
|
|
6280
7161
|
|
|
6281
7162
|
// src/components/ui/toggle-group.tsx
|
|
6282
|
-
import * as
|
|
7163
|
+
import * as React58 from "react";
|
|
6283
7164
|
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
|
|
6284
7165
|
import "class-variance-authority";
|
|
6285
|
-
import { jsx as
|
|
6286
|
-
var ToggleGroupContext =
|
|
7166
|
+
import { jsx as jsx62 } from "react/jsx-runtime";
|
|
7167
|
+
var ToggleGroupContext = React58.createContext({
|
|
6287
7168
|
size: "default",
|
|
6288
7169
|
variant: "default"
|
|
6289
7170
|
});
|
|
@@ -6294,7 +7175,7 @@ function ToggleGroup({
|
|
|
6294
7175
|
children,
|
|
6295
7176
|
...props
|
|
6296
7177
|
}) {
|
|
6297
|
-
return /* @__PURE__ */
|
|
7178
|
+
return /* @__PURE__ */ jsx62(
|
|
6298
7179
|
ToggleGroupPrimitive.Root,
|
|
6299
7180
|
{
|
|
6300
7181
|
"data-slot": "toggle-group",
|
|
@@ -6305,7 +7186,7 @@ function ToggleGroup({
|
|
|
6305
7186
|
className
|
|
6306
7187
|
),
|
|
6307
7188
|
...props,
|
|
6308
|
-
children: /* @__PURE__ */
|
|
7189
|
+
children: /* @__PURE__ */ jsx62(ToggleGroupContext.Provider, { value: { variant, size }, children })
|
|
6309
7190
|
}
|
|
6310
7191
|
);
|
|
6311
7192
|
}
|
|
@@ -6316,8 +7197,8 @@ function ToggleGroupItem({
|
|
|
6316
7197
|
size,
|
|
6317
7198
|
...props
|
|
6318
7199
|
}) {
|
|
6319
|
-
const context =
|
|
6320
|
-
return /* @__PURE__ */
|
|
7200
|
+
const context = React58.useContext(ToggleGroupContext);
|
|
7201
|
+
return /* @__PURE__ */ jsx62(
|
|
6321
7202
|
ToggleGroupPrimitive.Item,
|
|
6322
7203
|
{
|
|
6323
7204
|
"data-slot": "toggle-group-item",
|
|
@@ -6339,10 +7220,10 @@ function ToggleGroupItem({
|
|
|
6339
7220
|
|
|
6340
7221
|
// src/components/ui/typography.tsx
|
|
6341
7222
|
import { Slot as Slot7 } from "@radix-ui/react-slot";
|
|
6342
|
-
import { cva as
|
|
7223
|
+
import { cva as cva15 } from "class-variance-authority";
|
|
6343
7224
|
import "react";
|
|
6344
|
-
import { jsx as
|
|
6345
|
-
var displayTextVariants =
|
|
7225
|
+
import { jsx as jsx63 } from "react/jsx-runtime";
|
|
7226
|
+
var displayTextVariants = cva15(
|
|
6346
7227
|
"tracking-normal font-normal leading-none text-brand-dark font-serif italic",
|
|
6347
7228
|
{
|
|
6348
7229
|
variants: {
|
|
@@ -6364,7 +7245,7 @@ function DisplayHeading({
|
|
|
6364
7245
|
...props
|
|
6365
7246
|
}) {
|
|
6366
7247
|
const Comp = asChild ? Slot7 : "h1";
|
|
6367
|
-
return /* @__PURE__ */
|
|
7248
|
+
return /* @__PURE__ */ jsx63(
|
|
6368
7249
|
Comp,
|
|
6369
7250
|
{
|
|
6370
7251
|
"data-slot": "h1",
|
|
@@ -6373,7 +7254,7 @@ function DisplayHeading({
|
|
|
6373
7254
|
}
|
|
6374
7255
|
);
|
|
6375
7256
|
}
|
|
6376
|
-
var bodyTextVariants =
|
|
7257
|
+
var bodyTextVariants = cva15("font-sans ", {
|
|
6377
7258
|
variants: {
|
|
6378
7259
|
size: {
|
|
6379
7260
|
lg: "text-lg md:text-xl leading-[1.625rem] md:leading-[1.75rem]",
|
|
@@ -6393,7 +7274,7 @@ function Body({
|
|
|
6393
7274
|
...props
|
|
6394
7275
|
}) {
|
|
6395
7276
|
const Comp = asChild ? Slot7 : "p";
|
|
6396
|
-
return /* @__PURE__ */
|
|
7277
|
+
return /* @__PURE__ */ jsx63(
|
|
6397
7278
|
Comp,
|
|
6398
7279
|
{
|
|
6399
7280
|
"data-slot": "h1",
|
|
@@ -6408,7 +7289,7 @@ function HeadingXL({
|
|
|
6408
7289
|
...props
|
|
6409
7290
|
}) {
|
|
6410
7291
|
const Comp = asChild ? Slot7 : "h1";
|
|
6411
|
-
return /* @__PURE__ */
|
|
7292
|
+
return /* @__PURE__ */ jsx63(
|
|
6412
7293
|
Comp,
|
|
6413
7294
|
{
|
|
6414
7295
|
"data-slot": "h1",
|
|
@@ -6426,7 +7307,7 @@ function HeadingL({
|
|
|
6426
7307
|
...props
|
|
6427
7308
|
}) {
|
|
6428
7309
|
const Comp = asChild ? Slot7 : "h2";
|
|
6429
|
-
return /* @__PURE__ */
|
|
7310
|
+
return /* @__PURE__ */ jsx63(
|
|
6430
7311
|
Comp,
|
|
6431
7312
|
{
|
|
6432
7313
|
"data-slot": "h2",
|
|
@@ -6444,7 +7325,7 @@ function HeadingM({
|
|
|
6444
7325
|
...props
|
|
6445
7326
|
}) {
|
|
6446
7327
|
const Comp = asChild ? Slot7 : "h3";
|
|
6447
|
-
return /* @__PURE__ */
|
|
7328
|
+
return /* @__PURE__ */ jsx63(
|
|
6448
7329
|
Comp,
|
|
6449
7330
|
{
|
|
6450
7331
|
"data-slot": "h3",
|
|
@@ -6462,7 +7343,7 @@ function HeadingS({
|
|
|
6462
7343
|
...props
|
|
6463
7344
|
}) {
|
|
6464
7345
|
const Comp = asChild ? Slot7 : "h4";
|
|
6465
|
-
return /* @__PURE__ */
|
|
7346
|
+
return /* @__PURE__ */ jsx63(
|
|
6466
7347
|
Comp,
|
|
6467
7348
|
{
|
|
6468
7349
|
"data-slot": "h4",
|
|
@@ -6480,7 +7361,7 @@ function HeadingXS({
|
|
|
6480
7361
|
...props
|
|
6481
7362
|
}) {
|
|
6482
7363
|
const Comp = asChild ? Slot7 : "h5";
|
|
6483
|
-
return /* @__PURE__ */
|
|
7364
|
+
return /* @__PURE__ */ jsx63(
|
|
6484
7365
|
Comp,
|
|
6485
7366
|
{
|
|
6486
7367
|
"data-slot": "h5",
|
|
@@ -6498,7 +7379,7 @@ function HeadingXXS({
|
|
|
6498
7379
|
...props
|
|
6499
7380
|
}) {
|
|
6500
7381
|
const Comp = asChild ? Slot7 : "h6";
|
|
6501
|
-
return /* @__PURE__ */
|
|
7382
|
+
return /* @__PURE__ */ jsx63(
|
|
6502
7383
|
Comp,
|
|
6503
7384
|
{
|
|
6504
7385
|
"data-slot": "h5",
|
|
@@ -6639,6 +7520,11 @@ export {
|
|
|
6639
7520
|
DropdownMenuSubContent,
|
|
6640
7521
|
DropdownMenuSubTrigger,
|
|
6641
7522
|
DropdownMenuTrigger,
|
|
7523
|
+
DropdownSelect,
|
|
7524
|
+
DropdownSelectContent,
|
|
7525
|
+
DropdownSelectLabel,
|
|
7526
|
+
DropdownSelectOption,
|
|
7527
|
+
DropdownSelectTrigger,
|
|
6642
7528
|
Form,
|
|
6643
7529
|
FormControl,
|
|
6644
7530
|
FormDescription,
|
|
@@ -6677,6 +7563,7 @@ export {
|
|
|
6677
7563
|
MenubarSubContent,
|
|
6678
7564
|
MenubarSubTrigger,
|
|
6679
7565
|
MenubarTrigger,
|
|
7566
|
+
MultiSelectFreeText,
|
|
6680
7567
|
NavigationMenu,
|
|
6681
7568
|
NavigationMenuContent,
|
|
6682
7569
|
NavigationMenuIndicator,
|
|
@@ -6697,6 +7584,7 @@ export {
|
|
|
6697
7584
|
PopoverContent,
|
|
6698
7585
|
PopoverTrigger,
|
|
6699
7586
|
Progress,
|
|
7587
|
+
ProgressBar,
|
|
6700
7588
|
RadioGroup4 as RadioGroup,
|
|
6701
7589
|
RadioGroupItem,
|
|
6702
7590
|
ResizableHandle,
|
|
@@ -6705,6 +7593,7 @@ export {
|
|
|
6705
7593
|
RichTooltipContent,
|
|
6706
7594
|
ScrollArea,
|
|
6707
7595
|
ScrollBar,
|
|
7596
|
+
SearchInput,
|
|
6708
7597
|
SearchableSelect,
|
|
6709
7598
|
SearchableSelectContent,
|
|
6710
7599
|
SearchableSelectEmpty,
|
|
@@ -6800,6 +7689,7 @@ export {
|
|
|
6800
7689
|
inputVariants,
|
|
6801
7690
|
labelTextVariants,
|
|
6802
7691
|
navigationMenuTriggerStyle,
|
|
7692
|
+
progressBarVariants,
|
|
6803
7693
|
tabsTriggerVariants,
|
|
6804
7694
|
toggleVariants,
|
|
6805
7695
|
useFormField,
|