@codapet/design-system 0.6.3 → 0.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +60 -2
- package/dist/index.mjs +959 -342
- 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-[10px]" })
|
|
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",
|
|
@@ -4064,12 +4566,12 @@ function Progress({
|
|
|
4064
4566
|
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
4065
4567
|
import { CircleIcon as CircleIcon4 } from "lucide-react";
|
|
4066
4568
|
import "react";
|
|
4067
|
-
import { jsx as
|
|
4569
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
4068
4570
|
function RadioGroup4({
|
|
4069
4571
|
className,
|
|
4070
4572
|
...props
|
|
4071
4573
|
}) {
|
|
4072
|
-
return /* @__PURE__ */
|
|
4574
|
+
return /* @__PURE__ */ jsx40(
|
|
4073
4575
|
RadioGroupPrimitive.Root,
|
|
4074
4576
|
{
|
|
4075
4577
|
"data-slot": "radio-group",
|
|
@@ -4082,7 +4584,7 @@ function RadioGroupItem({
|
|
|
4082
4584
|
className,
|
|
4083
4585
|
...props
|
|
4084
4586
|
}) {
|
|
4085
|
-
return /* @__PURE__ */
|
|
4587
|
+
return /* @__PURE__ */ jsx40(
|
|
4086
4588
|
RadioGroupPrimitive.Item,
|
|
4087
4589
|
{
|
|
4088
4590
|
"data-slot": "radio-group-item",
|
|
@@ -4091,12 +4593,12 @@ function RadioGroupItem({
|
|
|
4091
4593
|
className
|
|
4092
4594
|
),
|
|
4093
4595
|
...props,
|
|
4094
|
-
children: /* @__PURE__ */
|
|
4596
|
+
children: /* @__PURE__ */ jsx40(
|
|
4095
4597
|
RadioGroupPrimitive.Indicator,
|
|
4096
4598
|
{
|
|
4097
4599
|
"data-slot": "radio-group-indicator",
|
|
4098
4600
|
className: "relative flex items-center justify-center",
|
|
4099
|
-
children: /* @__PURE__ */
|
|
4601
|
+
children: /* @__PURE__ */ jsx40(CircleIcon4, { className: "fill-white absolute top-1/2 left-1/2 size-1.5 -translate-x-1/2 -translate-y-1/2" })
|
|
4100
4602
|
}
|
|
4101
4603
|
)
|
|
4102
4604
|
}
|
|
@@ -4107,12 +4609,12 @@ function RadioGroupItem({
|
|
|
4107
4609
|
import "react";
|
|
4108
4610
|
import { GripVerticalIcon } from "lucide-react";
|
|
4109
4611
|
import * as ResizablePrimitive from "react-resizable-panels";
|
|
4110
|
-
import { jsx as
|
|
4612
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
4111
4613
|
function ResizablePanelGroup({
|
|
4112
4614
|
className,
|
|
4113
4615
|
...props
|
|
4114
4616
|
}) {
|
|
4115
|
-
return /* @__PURE__ */
|
|
4617
|
+
return /* @__PURE__ */ jsx41(
|
|
4116
4618
|
ResizablePrimitive.PanelGroup,
|
|
4117
4619
|
{
|
|
4118
4620
|
"data-slot": "resizable-panel-group",
|
|
@@ -4127,14 +4629,14 @@ function ResizablePanelGroup({
|
|
|
4127
4629
|
function ResizablePanel({
|
|
4128
4630
|
...props
|
|
4129
4631
|
}) {
|
|
4130
|
-
return /* @__PURE__ */
|
|
4632
|
+
return /* @__PURE__ */ jsx41(ResizablePrimitive.Panel, { "data-slot": "resizable-panel", ...props });
|
|
4131
4633
|
}
|
|
4132
4634
|
function ResizableHandle({
|
|
4133
4635
|
withHandle,
|
|
4134
4636
|
className,
|
|
4135
4637
|
...props
|
|
4136
4638
|
}) {
|
|
4137
|
-
return /* @__PURE__ */
|
|
4639
|
+
return /* @__PURE__ */ jsx41(
|
|
4138
4640
|
ResizablePrimitive.PanelResizeHandle,
|
|
4139
4641
|
{
|
|
4140
4642
|
"data-slot": "resizable-handle",
|
|
@@ -4143,7 +4645,7 @@ function ResizableHandle({
|
|
|
4143
4645
|
className
|
|
4144
4646
|
),
|
|
4145
4647
|
...props,
|
|
4146
|
-
children: withHandle && /* @__PURE__ */
|
|
4648
|
+
children: withHandle && /* @__PURE__ */ jsx41("div", { className: "bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border", children: /* @__PURE__ */ jsx41(GripVerticalIcon, { className: "size-2.5" }) })
|
|
4147
4649
|
}
|
|
4148
4650
|
);
|
|
4149
4651
|
}
|
|
@@ -4151,20 +4653,20 @@ function ResizableHandle({
|
|
|
4151
4653
|
// src/components/ui/scroll-area.tsx
|
|
4152
4654
|
import "react";
|
|
4153
4655
|
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
|
4154
|
-
import { jsx as
|
|
4656
|
+
import { jsx as jsx42, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
4155
4657
|
function ScrollArea({
|
|
4156
4658
|
className,
|
|
4157
4659
|
children,
|
|
4158
4660
|
...props
|
|
4159
4661
|
}) {
|
|
4160
|
-
return /* @__PURE__ */
|
|
4662
|
+
return /* @__PURE__ */ jsxs23(
|
|
4161
4663
|
ScrollAreaPrimitive.Root,
|
|
4162
4664
|
{
|
|
4163
4665
|
"data-slot": "scroll-area",
|
|
4164
4666
|
className: cn("relative", className),
|
|
4165
4667
|
...props,
|
|
4166
4668
|
children: [
|
|
4167
|
-
/* @__PURE__ */
|
|
4669
|
+
/* @__PURE__ */ jsx42(
|
|
4168
4670
|
ScrollAreaPrimitive.Viewport,
|
|
4169
4671
|
{
|
|
4170
4672
|
"data-slot": "scroll-area-viewport",
|
|
@@ -4172,8 +4674,8 @@ function ScrollArea({
|
|
|
4172
4674
|
children
|
|
4173
4675
|
}
|
|
4174
4676
|
),
|
|
4175
|
-
/* @__PURE__ */
|
|
4176
|
-
/* @__PURE__ */
|
|
4677
|
+
/* @__PURE__ */ jsx42(ScrollBar, {}),
|
|
4678
|
+
/* @__PURE__ */ jsx42(ScrollAreaPrimitive.Corner, {})
|
|
4177
4679
|
]
|
|
4178
4680
|
}
|
|
4179
4681
|
);
|
|
@@ -4183,7 +4685,7 @@ function ScrollBar({
|
|
|
4183
4685
|
orientation = "vertical",
|
|
4184
4686
|
...props
|
|
4185
4687
|
}) {
|
|
4186
|
-
return /* @__PURE__ */
|
|
4688
|
+
return /* @__PURE__ */ jsx42(
|
|
4187
4689
|
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
4188
4690
|
{
|
|
4189
4691
|
"data-slot": "scroll-area-scrollbar",
|
|
@@ -4195,7 +4697,7 @@ function ScrollBar({
|
|
|
4195
4697
|
className
|
|
4196
4698
|
),
|
|
4197
4699
|
...props,
|
|
4198
|
-
children: /* @__PURE__ */
|
|
4700
|
+
children: /* @__PURE__ */ jsx42(
|
|
4199
4701
|
ScrollAreaPrimitive.ScrollAreaThumb,
|
|
4200
4702
|
{
|
|
4201
4703
|
"data-slot": "scroll-area-thumb",
|
|
@@ -4207,12 +4709,12 @@ function ScrollBar({
|
|
|
4207
4709
|
}
|
|
4208
4710
|
|
|
4209
4711
|
// src/components/ui/searchable-select.tsx
|
|
4210
|
-
import * as
|
|
4712
|
+
import * as React41 from "react";
|
|
4211
4713
|
import { CheckIcon as CheckIcon4, ChevronsUpDown, XIcon as XIcon2 } from "lucide-react";
|
|
4212
|
-
import { jsx as
|
|
4213
|
-
var SearchableSelectContext =
|
|
4714
|
+
import { jsx as jsx43, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
4715
|
+
var SearchableSelectContext = React41.createContext(null);
|
|
4214
4716
|
function useSearchableSelect() {
|
|
4215
|
-
const ctx =
|
|
4717
|
+
const ctx = React41.useContext(SearchableSelectContext);
|
|
4216
4718
|
if (!ctx) {
|
|
4217
4719
|
throw new Error(
|
|
4218
4720
|
"SearchableSelect compound components must be used within <SearchableSelect>"
|
|
@@ -4238,11 +4740,11 @@ function SearchableSelect({
|
|
|
4238
4740
|
onOpenChange,
|
|
4239
4741
|
children
|
|
4240
4742
|
}) {
|
|
4241
|
-
const [internalOpen, setInternalOpen] =
|
|
4242
|
-
const [internalValue, setInternalValue] =
|
|
4243
|
-
const [internalValues, setInternalValues] =
|
|
4743
|
+
const [internalOpen, setInternalOpen] = React41.useState(false);
|
|
4744
|
+
const [internalValue, setInternalValue] = React41.useState(defaultValue);
|
|
4745
|
+
const [internalValues, setInternalValues] = React41.useState(defaultValues);
|
|
4244
4746
|
const open = controlledOpen ?? internalOpen;
|
|
4245
|
-
const setOpen =
|
|
4747
|
+
const setOpen = React41.useCallback(
|
|
4246
4748
|
(next) => {
|
|
4247
4749
|
if (controlledOpen !== void 0) {
|
|
4248
4750
|
onOpenChange?.(next);
|
|
@@ -4254,7 +4756,7 @@ function SearchableSelect({
|
|
|
4254
4756
|
[controlledOpen, onOpenChange]
|
|
4255
4757
|
);
|
|
4256
4758
|
const value = controlledValue ?? internalValue;
|
|
4257
|
-
const setValue =
|
|
4759
|
+
const setValue = React41.useCallback(
|
|
4258
4760
|
(next) => {
|
|
4259
4761
|
if (controlledValue === void 0) {
|
|
4260
4762
|
setInternalValue(next);
|
|
@@ -4264,7 +4766,7 @@ function SearchableSelect({
|
|
|
4264
4766
|
[controlledValue, onValueChange]
|
|
4265
4767
|
);
|
|
4266
4768
|
const values = controlledValues ?? internalValues;
|
|
4267
|
-
const setValues =
|
|
4769
|
+
const setValues = React41.useCallback(
|
|
4268
4770
|
(next) => {
|
|
4269
4771
|
if (controlledValues === void 0) {
|
|
4270
4772
|
setInternalValues(next);
|
|
@@ -4273,14 +4775,14 @@ function SearchableSelect({
|
|
|
4273
4775
|
},
|
|
4274
4776
|
[controlledValues, onValuesChange]
|
|
4275
4777
|
);
|
|
4276
|
-
const optionMap =
|
|
4778
|
+
const optionMap = React41.useMemo(() => {
|
|
4277
4779
|
const map = /* @__PURE__ */ new Map();
|
|
4278
4780
|
for (const opt of options) {
|
|
4279
4781
|
map.set(opt.value, opt.label);
|
|
4280
4782
|
}
|
|
4281
4783
|
return map;
|
|
4282
4784
|
}, [options]);
|
|
4283
|
-
const ctx =
|
|
4785
|
+
const ctx = React41.useMemo(
|
|
4284
4786
|
() => ({
|
|
4285
4787
|
open,
|
|
4286
4788
|
setOpen,
|
|
@@ -4314,7 +4816,7 @@ function SearchableSelect({
|
|
|
4314
4816
|
optionMap
|
|
4315
4817
|
]
|
|
4316
4818
|
);
|
|
4317
|
-
return /* @__PURE__ */
|
|
4819
|
+
return /* @__PURE__ */ jsx43(SearchableSelectContext.Provider, { value: ctx, children: /* @__PURE__ */ jsx43(Popover, { open, onOpenChange: setOpen, children }) });
|
|
4318
4820
|
}
|
|
4319
4821
|
function SearchableSelectTrigger({
|
|
4320
4822
|
className,
|
|
@@ -4327,7 +4829,7 @@ function SearchableSelectTrigger({
|
|
|
4327
4829
|
if (children) return children;
|
|
4328
4830
|
if (ctx.mode === "single") {
|
|
4329
4831
|
const label = ctx.optionMap.get(ctx.value);
|
|
4330
|
-
return /* @__PURE__ */
|
|
4832
|
+
return /* @__PURE__ */ jsx43(
|
|
4331
4833
|
"span",
|
|
4332
4834
|
{
|
|
4333
4835
|
"data-slot": "searchable-select-value",
|
|
@@ -4340,7 +4842,7 @@ function SearchableSelectTrigger({
|
|
|
4340
4842
|
);
|
|
4341
4843
|
}
|
|
4342
4844
|
if (ctx.values.length === 0) {
|
|
4343
|
-
return /* @__PURE__ */
|
|
4845
|
+
return /* @__PURE__ */ jsx43(
|
|
4344
4846
|
"span",
|
|
4345
4847
|
{
|
|
4346
4848
|
"data-slot": "searchable-select-value",
|
|
@@ -4351,20 +4853,20 @@ function SearchableSelectTrigger({
|
|
|
4351
4853
|
}
|
|
4352
4854
|
const visible = ctx.values.slice(0, ctx.maxCount);
|
|
4353
4855
|
const remaining = ctx.values.length - visible.length;
|
|
4354
|
-
return /* @__PURE__ */
|
|
4856
|
+
return /* @__PURE__ */ jsxs24(
|
|
4355
4857
|
"span",
|
|
4356
4858
|
{
|
|
4357
4859
|
"data-slot": "searchable-select-value",
|
|
4358
4860
|
className: "flex flex-wrap items-center gap-1",
|
|
4359
4861
|
children: [
|
|
4360
|
-
visible.map((v) => /* @__PURE__ */
|
|
4862
|
+
visible.map((v) => /* @__PURE__ */ jsxs24(
|
|
4361
4863
|
Badge,
|
|
4362
4864
|
{
|
|
4363
4865
|
variant: "secondary",
|
|
4364
4866
|
className: "gap-1 pr-1",
|
|
4365
4867
|
children: [
|
|
4366
|
-
/* @__PURE__ */
|
|
4367
|
-
/* @__PURE__ */
|
|
4868
|
+
/* @__PURE__ */ jsx43("span", { className: "truncate max-w-[120px]", children: ctx.optionMap.get(v) || v }),
|
|
4869
|
+
/* @__PURE__ */ jsx43(
|
|
4368
4870
|
"span",
|
|
4369
4871
|
{
|
|
4370
4872
|
role: "button",
|
|
@@ -4376,14 +4878,14 @@ function SearchableSelectTrigger({
|
|
|
4376
4878
|
e.stopPropagation();
|
|
4377
4879
|
ctx.setValues(ctx.values.filter((val) => val !== v));
|
|
4378
4880
|
},
|
|
4379
|
-
children: /* @__PURE__ */
|
|
4881
|
+
children: /* @__PURE__ */ jsx43(XIcon2, { className: "size-3" })
|
|
4380
4882
|
}
|
|
4381
4883
|
)
|
|
4382
4884
|
]
|
|
4383
4885
|
},
|
|
4384
4886
|
v
|
|
4385
4887
|
)),
|
|
4386
|
-
remaining > 0 && /* @__PURE__ */
|
|
4888
|
+
remaining > 0 && /* @__PURE__ */ jsxs24(Badge, { variant: "outline", className: "text-muted-foreground", children: [
|
|
4387
4889
|
"+",
|
|
4388
4890
|
remaining,
|
|
4389
4891
|
" more"
|
|
@@ -4392,7 +4894,7 @@ function SearchableSelectTrigger({
|
|
|
4392
4894
|
}
|
|
4393
4895
|
);
|
|
4394
4896
|
};
|
|
4395
|
-
return /* @__PURE__ */
|
|
4897
|
+
return /* @__PURE__ */ jsxs24(
|
|
4396
4898
|
PopoverTrigger,
|
|
4397
4899
|
{
|
|
4398
4900
|
"data-slot": "searchable-select-trigger",
|
|
@@ -4406,7 +4908,7 @@ function SearchableSelectTrigger({
|
|
|
4406
4908
|
...props,
|
|
4407
4909
|
children: [
|
|
4408
4910
|
renderContent(),
|
|
4409
|
-
/* @__PURE__ */
|
|
4911
|
+
/* @__PURE__ */ jsx43(ChevronsUpDown, { className: "size-4 shrink-0 opacity-50" })
|
|
4410
4912
|
]
|
|
4411
4913
|
}
|
|
4412
4914
|
);
|
|
@@ -4418,7 +4920,7 @@ function SearchableSelectContent({
|
|
|
4418
4920
|
...props
|
|
4419
4921
|
}) {
|
|
4420
4922
|
const ctx = useSearchableSelect();
|
|
4421
|
-
const groupedOptions =
|
|
4923
|
+
const groupedOptions = React41.useMemo(() => {
|
|
4422
4924
|
if (ctx.options.length === 0) return null;
|
|
4423
4925
|
const groups = /* @__PURE__ */ new Map();
|
|
4424
4926
|
for (const opt of ctx.options) {
|
|
@@ -4432,7 +4934,7 @@ function SearchableSelectContent({
|
|
|
4432
4934
|
if (!groupedOptions) return null;
|
|
4433
4935
|
const entries = Array.from(groupedOptions.entries());
|
|
4434
4936
|
if (entries.length === 1 && entries[0][0] === "") {
|
|
4435
|
-
return entries[0][1].map((opt) => /* @__PURE__ */
|
|
4937
|
+
return entries[0][1].map((opt) => /* @__PURE__ */ jsx43(
|
|
4436
4938
|
SearchableSelectItem,
|
|
4437
4939
|
{
|
|
4438
4940
|
value: opt.value,
|
|
@@ -4442,7 +4944,7 @@ function SearchableSelectContent({
|
|
|
4442
4944
|
opt.value
|
|
4443
4945
|
));
|
|
4444
4946
|
}
|
|
4445
|
-
return entries.map(([group, opts]) => /* @__PURE__ */
|
|
4947
|
+
return entries.map(([group, opts]) => /* @__PURE__ */ jsx43(SearchableSelectGroup, { heading: group || void 0, children: opts.map((opt) => /* @__PURE__ */ jsx43(
|
|
4446
4948
|
SearchableSelectItem,
|
|
4447
4949
|
{
|
|
4448
4950
|
value: opt.value,
|
|
@@ -4452,17 +4954,17 @@ function SearchableSelectContent({
|
|
|
4452
4954
|
opt.value
|
|
4453
4955
|
)) }, group));
|
|
4454
4956
|
};
|
|
4455
|
-
return /* @__PURE__ */
|
|
4957
|
+
return /* @__PURE__ */ jsx43(
|
|
4456
4958
|
PopoverContent,
|
|
4457
4959
|
{
|
|
4458
4960
|
"data-slot": "searchable-select-content",
|
|
4459
4961
|
className: cn("w-[var(--radix-popover-trigger-width)] p-0", className),
|
|
4460
4962
|
align: "start",
|
|
4461
4963
|
...props,
|
|
4462
|
-
children: /* @__PURE__ */
|
|
4463
|
-
ctx.searchable && /* @__PURE__ */
|
|
4464
|
-
/* @__PURE__ */
|
|
4465
|
-
/* @__PURE__ */
|
|
4964
|
+
children: /* @__PURE__ */ jsxs24(Command, { children: [
|
|
4965
|
+
ctx.searchable && /* @__PURE__ */ jsx43(CommandInput, { placeholder: ctx.searchPlaceholder }),
|
|
4966
|
+
/* @__PURE__ */ jsxs24(CommandList, { children: [
|
|
4967
|
+
/* @__PURE__ */ jsx43(CommandEmpty, { children: emptyText }),
|
|
4466
4968
|
children || renderAutoItems()
|
|
4467
4969
|
] })
|
|
4468
4970
|
] })
|
|
@@ -4489,7 +4991,7 @@ function SearchableSelectItem({
|
|
|
4489
4991
|
);
|
|
4490
4992
|
}
|
|
4491
4993
|
};
|
|
4492
|
-
return /* @__PURE__ */
|
|
4994
|
+
return /* @__PURE__ */ jsxs24(
|
|
4493
4995
|
CommandItem,
|
|
4494
4996
|
{
|
|
4495
4997
|
"data-slot": "searchable-select-item",
|
|
@@ -4502,18 +5004,18 @@ function SearchableSelectItem({
|
|
|
4502
5004
|
"data-disabled": disabled || void 0,
|
|
4503
5005
|
...props,
|
|
4504
5006
|
children: [
|
|
4505
|
-
ctx.mode === "multiple" && /* @__PURE__ */
|
|
5007
|
+
ctx.mode === "multiple" && /* @__PURE__ */ jsx43("span", { className: "absolute left-2 flex size-4 items-center justify-center", children: /* @__PURE__ */ jsx43(
|
|
4506
5008
|
"span",
|
|
4507
5009
|
{
|
|
4508
5010
|
className: cn(
|
|
4509
5011
|
"size-4 rounded-sm border border-primary transition-colors",
|
|
4510
5012
|
isSelected ? "bg-primary text-primary-foreground" : "bg-transparent"
|
|
4511
5013
|
),
|
|
4512
|
-
children: isSelected && /* @__PURE__ */
|
|
5014
|
+
children: isSelected && /* @__PURE__ */ jsx43(CheckIcon4, { className: "size-4 p-0.5" })
|
|
4513
5015
|
}
|
|
4514
5016
|
) }),
|
|
4515
|
-
/* @__PURE__ */
|
|
4516
|
-
ctx.mode === "single" && isSelected && /* @__PURE__ */
|
|
5017
|
+
/* @__PURE__ */ jsx43("span", { className: "flex-1 truncate", children }),
|
|
5018
|
+
ctx.mode === "single" && isSelected && /* @__PURE__ */ jsx43("span", { className: "absolute right-2 flex size-4 items-center justify-center", children: /* @__PURE__ */ jsx43(CheckIcon4, { className: "size-4" }) })
|
|
4517
5019
|
]
|
|
4518
5020
|
}
|
|
4519
5021
|
);
|
|
@@ -4522,7 +5024,7 @@ function SearchableSelectGroup({
|
|
|
4522
5024
|
className,
|
|
4523
5025
|
...props
|
|
4524
5026
|
}) {
|
|
4525
|
-
return /* @__PURE__ */
|
|
5027
|
+
return /* @__PURE__ */ jsx43(
|
|
4526
5028
|
CommandGroup,
|
|
4527
5029
|
{
|
|
4528
5030
|
"data-slot": "searchable-select-group",
|
|
@@ -4536,7 +5038,7 @@ function SearchableSelectEmpty({
|
|
|
4536
5038
|
children = "No results found.",
|
|
4537
5039
|
...props
|
|
4538
5040
|
}) {
|
|
4539
|
-
return /* @__PURE__ */
|
|
5041
|
+
return /* @__PURE__ */ jsx43(
|
|
4540
5042
|
CommandEmpty,
|
|
4541
5043
|
{
|
|
4542
5044
|
"data-slot": "searchable-select-empty",
|
|
@@ -4551,21 +5053,21 @@ function SearchableSelectEmpty({
|
|
|
4551
5053
|
import "react";
|
|
4552
5054
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
4553
5055
|
import { CheckIcon as CheckIcon5, ChevronDownIcon as ChevronDownIcon4, ChevronUpIcon } from "lucide-react";
|
|
4554
|
-
import { jsx as
|
|
5056
|
+
import { jsx as jsx44, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
4555
5057
|
function Select({
|
|
4556
5058
|
...props
|
|
4557
5059
|
}) {
|
|
4558
|
-
return /* @__PURE__ */
|
|
5060
|
+
return /* @__PURE__ */ jsx44(SelectPrimitive.Root, { "data-slot": "select", ...props });
|
|
4559
5061
|
}
|
|
4560
5062
|
function SelectGroup({
|
|
4561
5063
|
...props
|
|
4562
5064
|
}) {
|
|
4563
|
-
return /* @__PURE__ */
|
|
5065
|
+
return /* @__PURE__ */ jsx44(SelectPrimitive.Group, { "data-slot": "select-group", ...props });
|
|
4564
5066
|
}
|
|
4565
5067
|
function SelectValue({
|
|
4566
5068
|
...props
|
|
4567
5069
|
}) {
|
|
4568
|
-
return /* @__PURE__ */
|
|
5070
|
+
return /* @__PURE__ */ jsx44(SelectPrimitive.Value, { "data-slot": "select-value", ...props });
|
|
4569
5071
|
}
|
|
4570
5072
|
function SelectTrigger({
|
|
4571
5073
|
className,
|
|
@@ -4573,7 +5075,7 @@ function SelectTrigger({
|
|
|
4573
5075
|
children,
|
|
4574
5076
|
...props
|
|
4575
5077
|
}) {
|
|
4576
|
-
return /* @__PURE__ */
|
|
5078
|
+
return /* @__PURE__ */ jsxs25(
|
|
4577
5079
|
SelectPrimitive.Trigger,
|
|
4578
5080
|
{
|
|
4579
5081
|
"data-slot": "select-trigger",
|
|
@@ -4585,7 +5087,7 @@ function SelectTrigger({
|
|
|
4585
5087
|
...props,
|
|
4586
5088
|
children: [
|
|
4587
5089
|
children,
|
|
4588
|
-
/* @__PURE__ */
|
|
5090
|
+
/* @__PURE__ */ jsx44(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx44(ChevronDownIcon4, { className: "size-4 opacity-50" }) })
|
|
4589
5091
|
]
|
|
4590
5092
|
}
|
|
4591
5093
|
);
|
|
@@ -4596,7 +5098,7 @@ function SelectContent({
|
|
|
4596
5098
|
position = "popper",
|
|
4597
5099
|
...props
|
|
4598
5100
|
}) {
|
|
4599
|
-
return /* @__PURE__ */
|
|
5101
|
+
return /* @__PURE__ */ jsx44(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs25(
|
|
4600
5102
|
SelectPrimitive.Content,
|
|
4601
5103
|
{
|
|
4602
5104
|
"data-slot": "select-content",
|
|
@@ -4608,8 +5110,8 @@ function SelectContent({
|
|
|
4608
5110
|
position,
|
|
4609
5111
|
...props,
|
|
4610
5112
|
children: [
|
|
4611
|
-
/* @__PURE__ */
|
|
4612
|
-
/* @__PURE__ */
|
|
5113
|
+
/* @__PURE__ */ jsx44(SelectScrollUpButton, {}),
|
|
5114
|
+
/* @__PURE__ */ jsx44(
|
|
4613
5115
|
SelectPrimitive.Viewport,
|
|
4614
5116
|
{
|
|
4615
5117
|
className: cn(
|
|
@@ -4619,7 +5121,7 @@ function SelectContent({
|
|
|
4619
5121
|
children
|
|
4620
5122
|
}
|
|
4621
5123
|
),
|
|
4622
|
-
/* @__PURE__ */
|
|
5124
|
+
/* @__PURE__ */ jsx44(SelectScrollDownButton, {})
|
|
4623
5125
|
]
|
|
4624
5126
|
}
|
|
4625
5127
|
) });
|
|
@@ -4628,7 +5130,7 @@ function SelectLabel({
|
|
|
4628
5130
|
className,
|
|
4629
5131
|
...props
|
|
4630
5132
|
}) {
|
|
4631
|
-
return /* @__PURE__ */
|
|
5133
|
+
return /* @__PURE__ */ jsx44(
|
|
4632
5134
|
SelectPrimitive.Label,
|
|
4633
5135
|
{
|
|
4634
5136
|
"data-slot": "select-label",
|
|
@@ -4642,7 +5144,7 @@ function SelectItem({
|
|
|
4642
5144
|
children,
|
|
4643
5145
|
...props
|
|
4644
5146
|
}) {
|
|
4645
|
-
return /* @__PURE__ */
|
|
5147
|
+
return /* @__PURE__ */ jsxs25(
|
|
4646
5148
|
SelectPrimitive.Item,
|
|
4647
5149
|
{
|
|
4648
5150
|
"data-slot": "select-item",
|
|
@@ -4652,8 +5154,8 @@ function SelectItem({
|
|
|
4652
5154
|
),
|
|
4653
5155
|
...props,
|
|
4654
5156
|
children: [
|
|
4655
|
-
/* @__PURE__ */
|
|
4656
|
-
/* @__PURE__ */
|
|
5157
|
+
/* @__PURE__ */ jsx44("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx44(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx44(CheckIcon5, { className: "size-4" }) }) }),
|
|
5158
|
+
/* @__PURE__ */ jsx44(SelectPrimitive.ItemText, { children })
|
|
4657
5159
|
]
|
|
4658
5160
|
}
|
|
4659
5161
|
);
|
|
@@ -4662,7 +5164,7 @@ function SelectSeparator({
|
|
|
4662
5164
|
className,
|
|
4663
5165
|
...props
|
|
4664
5166
|
}) {
|
|
4665
|
-
return /* @__PURE__ */
|
|
5167
|
+
return /* @__PURE__ */ jsx44(
|
|
4666
5168
|
SelectPrimitive.Separator,
|
|
4667
5169
|
{
|
|
4668
5170
|
"data-slot": "select-separator",
|
|
@@ -4675,7 +5177,7 @@ function SelectScrollUpButton({
|
|
|
4675
5177
|
className,
|
|
4676
5178
|
...props
|
|
4677
5179
|
}) {
|
|
4678
|
-
return /* @__PURE__ */
|
|
5180
|
+
return /* @__PURE__ */ jsx44(
|
|
4679
5181
|
SelectPrimitive.ScrollUpButton,
|
|
4680
5182
|
{
|
|
4681
5183
|
"data-slot": "select-scroll-up-button",
|
|
@@ -4684,7 +5186,7 @@ function SelectScrollUpButton({
|
|
|
4684
5186
|
className
|
|
4685
5187
|
),
|
|
4686
5188
|
...props,
|
|
4687
|
-
children: /* @__PURE__ */
|
|
5189
|
+
children: /* @__PURE__ */ jsx44(ChevronUpIcon, { className: "size-4" })
|
|
4688
5190
|
}
|
|
4689
5191
|
);
|
|
4690
5192
|
}
|
|
@@ -4692,7 +5194,7 @@ function SelectScrollDownButton({
|
|
|
4692
5194
|
className,
|
|
4693
5195
|
...props
|
|
4694
5196
|
}) {
|
|
4695
|
-
return /* @__PURE__ */
|
|
5197
|
+
return /* @__PURE__ */ jsx44(
|
|
4696
5198
|
SelectPrimitive.ScrollDownButton,
|
|
4697
5199
|
{
|
|
4698
5200
|
"data-slot": "select-scroll-down-button",
|
|
@@ -4701,7 +5203,7 @@ function SelectScrollDownButton({
|
|
|
4701
5203
|
className
|
|
4702
5204
|
),
|
|
4703
5205
|
...props,
|
|
4704
|
-
children: /* @__PURE__ */
|
|
5206
|
+
children: /* @__PURE__ */ jsx44(ChevronDownIcon4, { className: "size-4" })
|
|
4705
5207
|
}
|
|
4706
5208
|
);
|
|
4707
5209
|
}
|
|
@@ -4709,14 +5211,14 @@ function SelectScrollDownButton({
|
|
|
4709
5211
|
// src/components/ui/separator.tsx
|
|
4710
5212
|
import "react";
|
|
4711
5213
|
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
4712
|
-
import { jsx as
|
|
5214
|
+
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
4713
5215
|
function Separator5({
|
|
4714
5216
|
className,
|
|
4715
5217
|
orientation = "horizontal",
|
|
4716
5218
|
decorative = true,
|
|
4717
5219
|
...props
|
|
4718
5220
|
}) {
|
|
4719
|
-
return /* @__PURE__ */
|
|
5221
|
+
return /* @__PURE__ */ jsx45(
|
|
4720
5222
|
SeparatorPrimitive.Root,
|
|
4721
5223
|
{
|
|
4722
5224
|
"data-slot": "separator",
|
|
@@ -4735,30 +5237,30 @@ function Separator5({
|
|
|
4735
5237
|
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
4736
5238
|
import { XIcon as XIcon3 } from "lucide-react";
|
|
4737
5239
|
import "react";
|
|
4738
|
-
import { jsx as
|
|
5240
|
+
import { jsx as jsx46, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
4739
5241
|
function Sheet({ ...props }) {
|
|
4740
|
-
return /* @__PURE__ */
|
|
5242
|
+
return /* @__PURE__ */ jsx46(SheetPrimitive.Root, { "data-slot": "sheet", ...props });
|
|
4741
5243
|
}
|
|
4742
5244
|
function SheetTrigger({
|
|
4743
5245
|
...props
|
|
4744
5246
|
}) {
|
|
4745
|
-
return /* @__PURE__ */
|
|
5247
|
+
return /* @__PURE__ */ jsx46(SheetPrimitive.Trigger, { "data-slot": "sheet-trigger", ...props });
|
|
4746
5248
|
}
|
|
4747
5249
|
function SheetClose({
|
|
4748
5250
|
...props
|
|
4749
5251
|
}) {
|
|
4750
|
-
return /* @__PURE__ */
|
|
5252
|
+
return /* @__PURE__ */ jsx46(SheetPrimitive.Close, { "data-slot": "sheet-close", ...props });
|
|
4751
5253
|
}
|
|
4752
5254
|
function SheetPortal({
|
|
4753
5255
|
...props
|
|
4754
5256
|
}) {
|
|
4755
|
-
return /* @__PURE__ */
|
|
5257
|
+
return /* @__PURE__ */ jsx46(SheetPrimitive.Portal, { "data-slot": "sheet-portal", ...props });
|
|
4756
5258
|
}
|
|
4757
5259
|
function SheetOverlay({
|
|
4758
5260
|
className,
|
|
4759
5261
|
...props
|
|
4760
5262
|
}) {
|
|
4761
|
-
return /* @__PURE__ */
|
|
5263
|
+
return /* @__PURE__ */ jsx46(
|
|
4762
5264
|
SheetPrimitive.Overlay,
|
|
4763
5265
|
{
|
|
4764
5266
|
"data-slot": "sheet-overlay",
|
|
@@ -4777,9 +5279,9 @@ function SheetContent({
|
|
|
4777
5279
|
showCloseButton = true,
|
|
4778
5280
|
...props
|
|
4779
5281
|
}) {
|
|
4780
|
-
return /* @__PURE__ */
|
|
4781
|
-
/* @__PURE__ */
|
|
4782
|
-
/* @__PURE__ */
|
|
5282
|
+
return /* @__PURE__ */ jsxs26(SheetPortal, { children: [
|
|
5283
|
+
/* @__PURE__ */ jsx46(SheetOverlay, {}),
|
|
5284
|
+
/* @__PURE__ */ jsxs26(
|
|
4783
5285
|
SheetPrimitive.Content,
|
|
4784
5286
|
{
|
|
4785
5287
|
"data-slot": "sheet-content",
|
|
@@ -4794,9 +5296,9 @@ function SheetContent({
|
|
|
4794
5296
|
...props,
|
|
4795
5297
|
children: [
|
|
4796
5298
|
children,
|
|
4797
|
-
showCloseButton && /* @__PURE__ */
|
|
4798
|
-
/* @__PURE__ */
|
|
4799
|
-
/* @__PURE__ */
|
|
5299
|
+
showCloseButton && /* @__PURE__ */ jsxs26(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: [
|
|
5300
|
+
/* @__PURE__ */ jsx46(XIcon3, { className: "size-4" }),
|
|
5301
|
+
/* @__PURE__ */ jsx46("span", { className: "sr-only", children: "Close" })
|
|
4800
5302
|
] })
|
|
4801
5303
|
]
|
|
4802
5304
|
}
|
|
@@ -4804,7 +5306,7 @@ function SheetContent({
|
|
|
4804
5306
|
] });
|
|
4805
5307
|
}
|
|
4806
5308
|
function SheetHeader({ className, ...props }) {
|
|
4807
|
-
return /* @__PURE__ */
|
|
5309
|
+
return /* @__PURE__ */ jsx46(
|
|
4808
5310
|
"div",
|
|
4809
5311
|
{
|
|
4810
5312
|
"data-slot": "sheet-header",
|
|
@@ -4814,7 +5316,7 @@ function SheetHeader({ className, ...props }) {
|
|
|
4814
5316
|
);
|
|
4815
5317
|
}
|
|
4816
5318
|
function SheetFooter({ className, ...props }) {
|
|
4817
|
-
return /* @__PURE__ */
|
|
5319
|
+
return /* @__PURE__ */ jsx46(
|
|
4818
5320
|
"div",
|
|
4819
5321
|
{
|
|
4820
5322
|
"data-slot": "sheet-footer",
|
|
@@ -4827,7 +5329,7 @@ function SheetTitle({
|
|
|
4827
5329
|
className,
|
|
4828
5330
|
...props
|
|
4829
5331
|
}) {
|
|
4830
|
-
return /* @__PURE__ */
|
|
5332
|
+
return /* @__PURE__ */ jsx46(
|
|
4831
5333
|
SheetPrimitive.Title,
|
|
4832
5334
|
{
|
|
4833
5335
|
"data-slot": "sheet-title",
|
|
@@ -4840,7 +5342,7 @@ function SheetDescription({
|
|
|
4840
5342
|
className,
|
|
4841
5343
|
...props
|
|
4842
5344
|
}) {
|
|
4843
|
-
return /* @__PURE__ */
|
|
5345
|
+
return /* @__PURE__ */ jsx46(
|
|
4844
5346
|
SheetPrimitive.Description,
|
|
4845
5347
|
{
|
|
4846
5348
|
"data-slot": "sheet-description",
|
|
@@ -4854,12 +5356,12 @@ function SheetDescription({
|
|
|
4854
5356
|
import { Slot as Slot6 } from "@radix-ui/react-slot";
|
|
4855
5357
|
import { cva as cva11 } from "class-variance-authority";
|
|
4856
5358
|
import { PanelLeftIcon } from "lucide-react";
|
|
4857
|
-
import * as
|
|
5359
|
+
import * as React47 from "react";
|
|
4858
5360
|
|
|
4859
5361
|
// src/components/ui/skeleton.tsx
|
|
4860
|
-
import { jsx as
|
|
5362
|
+
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
4861
5363
|
function Skeleton({ className, ...props }) {
|
|
4862
|
-
return /* @__PURE__ */
|
|
5364
|
+
return /* @__PURE__ */ jsx47(
|
|
4863
5365
|
"div",
|
|
4864
5366
|
{
|
|
4865
5367
|
"data-slot": "skeleton",
|
|
@@ -4872,13 +5374,13 @@ function Skeleton({ className, ...props }) {
|
|
|
4872
5374
|
// src/components/ui/tooltip.tsx
|
|
4873
5375
|
import "react";
|
|
4874
5376
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
4875
|
-
import { X as
|
|
4876
|
-
import { jsx as
|
|
5377
|
+
import { X as X3 } from "lucide-react";
|
|
5378
|
+
import { jsx as jsx48, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
4877
5379
|
function TooltipProvider({
|
|
4878
5380
|
delayDuration = 0,
|
|
4879
5381
|
...props
|
|
4880
5382
|
}) {
|
|
4881
|
-
return /* @__PURE__ */
|
|
5383
|
+
return /* @__PURE__ */ jsx48(
|
|
4882
5384
|
TooltipPrimitive.Provider,
|
|
4883
5385
|
{
|
|
4884
5386
|
"data-slot": "tooltip-provider",
|
|
@@ -4890,12 +5392,12 @@ function TooltipProvider({
|
|
|
4890
5392
|
function Tooltip2({
|
|
4891
5393
|
...props
|
|
4892
5394
|
}) {
|
|
4893
|
-
return /* @__PURE__ */
|
|
5395
|
+
return /* @__PURE__ */ jsx48(TooltipProvider, { children: /* @__PURE__ */ jsx48(TooltipPrimitive.Root, { "data-slot": "tooltip", ...props }) });
|
|
4894
5396
|
}
|
|
4895
5397
|
function TooltipTrigger({
|
|
4896
5398
|
...props
|
|
4897
5399
|
}) {
|
|
4898
|
-
return /* @__PURE__ */
|
|
5400
|
+
return /* @__PURE__ */ jsx48(TooltipPrimitive.Trigger, { "data-slot": "tooltip-trigger", ...props });
|
|
4899
5401
|
}
|
|
4900
5402
|
function TooltipContent({
|
|
4901
5403
|
className,
|
|
@@ -4903,7 +5405,7 @@ function TooltipContent({
|
|
|
4903
5405
|
children,
|
|
4904
5406
|
...props
|
|
4905
5407
|
}) {
|
|
4906
|
-
return /* @__PURE__ */
|
|
5408
|
+
return /* @__PURE__ */ jsx48(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs27(
|
|
4907
5409
|
TooltipPrimitive.Content,
|
|
4908
5410
|
{
|
|
4909
5411
|
"data-slot": "tooltip-content",
|
|
@@ -4915,7 +5417,7 @@ function TooltipContent({
|
|
|
4915
5417
|
...props,
|
|
4916
5418
|
children: [
|
|
4917
5419
|
children,
|
|
4918
|
-
/* @__PURE__ */
|
|
5420
|
+
/* @__PURE__ */ jsx48(TooltipPrimitive.Arrow, { className: "bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })
|
|
4919
5421
|
]
|
|
4920
5422
|
}
|
|
4921
5423
|
) });
|
|
@@ -4930,7 +5432,7 @@ function RichTooltipContent({
|
|
|
4930
5432
|
children,
|
|
4931
5433
|
...props
|
|
4932
5434
|
}) {
|
|
4933
|
-
return /* @__PURE__ */
|
|
5435
|
+
return /* @__PURE__ */ jsx48(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs27(
|
|
4934
5436
|
TooltipPrimitive.Content,
|
|
4935
5437
|
{
|
|
4936
5438
|
"data-slot": "rich-tooltip-content",
|
|
@@ -4941,24 +5443,24 @@ function RichTooltipContent({
|
|
|
4941
5443
|
),
|
|
4942
5444
|
...props,
|
|
4943
5445
|
children: [
|
|
4944
|
-
/* @__PURE__ */
|
|
4945
|
-
icon && /* @__PURE__ */
|
|
4946
|
-
/* @__PURE__ */
|
|
4947
|
-
heading && /* @__PURE__ */
|
|
4948
|
-
/* @__PURE__ */
|
|
5446
|
+
/* @__PURE__ */ jsxs27("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: [
|
|
5447
|
+
icon && /* @__PURE__ */ jsx48("span", { className: "flex items-center justify-center shrink-0 size-5 text-white [&_svg]:size-5", children: icon }),
|
|
5448
|
+
/* @__PURE__ */ jsxs27("div", { className: "flex flex-1 flex-col gap-2 min-w-0", children: [
|
|
5449
|
+
heading && /* @__PURE__ */ jsx48("p", { className: "font-semibold text-sm leading-5 text-white", children: heading }),
|
|
5450
|
+
/* @__PURE__ */ jsx48("div", { className: "font-normal text-sm leading-5 text-white", children })
|
|
4949
5451
|
] }),
|
|
4950
|
-
dismissible && /* @__PURE__ */
|
|
5452
|
+
dismissible && /* @__PURE__ */ jsx48(
|
|
4951
5453
|
"button",
|
|
4952
5454
|
{
|
|
4953
5455
|
type: "button",
|
|
4954
5456
|
onClick: onDismiss,
|
|
4955
5457
|
className: "flex items-center justify-center shrink-0 size-5 text-white/70 hover:text-white transition-colors cursor-pointer",
|
|
4956
5458
|
"aria-label": "Dismiss",
|
|
4957
|
-
children: /* @__PURE__ */
|
|
5459
|
+
children: /* @__PURE__ */ jsx48(X3, { className: "size-2.5" })
|
|
4958
5460
|
}
|
|
4959
5461
|
)
|
|
4960
5462
|
] }),
|
|
4961
|
-
/* @__PURE__ */
|
|
5463
|
+
/* @__PURE__ */ jsx48(
|
|
4962
5464
|
TooltipPrimitive.Arrow,
|
|
4963
5465
|
{
|
|
4964
5466
|
width: 16,
|
|
@@ -4972,11 +5474,11 @@ function RichTooltipContent({
|
|
|
4972
5474
|
}
|
|
4973
5475
|
|
|
4974
5476
|
// src/hooks/use-mobile.ts
|
|
4975
|
-
import * as
|
|
5477
|
+
import * as React46 from "react";
|
|
4976
5478
|
var MOBILE_BREAKPOINT = 768;
|
|
4977
5479
|
function useIsMobile() {
|
|
4978
|
-
const [isMobile, setIsMobile] =
|
|
4979
|
-
|
|
5480
|
+
const [isMobile, setIsMobile] = React46.useState(void 0);
|
|
5481
|
+
React46.useEffect(() => {
|
|
4980
5482
|
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
4981
5483
|
const onChange = () => {
|
|
4982
5484
|
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
@@ -4989,16 +5491,16 @@ function useIsMobile() {
|
|
|
4989
5491
|
}
|
|
4990
5492
|
|
|
4991
5493
|
// src/components/ui/sidebar.tsx
|
|
4992
|
-
import { jsx as
|
|
5494
|
+
import { jsx as jsx49, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
4993
5495
|
var SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
4994
5496
|
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
4995
5497
|
var SIDEBAR_WIDTH = "18rem";
|
|
4996
5498
|
var SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
4997
5499
|
var SIDEBAR_WIDTH_ICON = "3rem";
|
|
4998
5500
|
var SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
4999
|
-
var SidebarContext =
|
|
5501
|
+
var SidebarContext = React47.createContext(null);
|
|
5000
5502
|
function useSidebar() {
|
|
5001
|
-
const context =
|
|
5503
|
+
const context = React47.useContext(SidebarContext);
|
|
5002
5504
|
if (!context) {
|
|
5003
5505
|
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
5004
5506
|
}
|
|
@@ -5014,10 +5516,10 @@ function SidebarProvider({
|
|
|
5014
5516
|
...props
|
|
5015
5517
|
}) {
|
|
5016
5518
|
const isMobile = useIsMobile();
|
|
5017
|
-
const [openMobile, setOpenMobile] =
|
|
5018
|
-
const [_open, _setOpen] =
|
|
5519
|
+
const [openMobile, setOpenMobile] = React47.useState(false);
|
|
5520
|
+
const [_open, _setOpen] = React47.useState(defaultOpen);
|
|
5019
5521
|
const open = openProp ?? _open;
|
|
5020
|
-
const setOpen =
|
|
5522
|
+
const setOpen = React47.useCallback(
|
|
5021
5523
|
(value) => {
|
|
5022
5524
|
const openState = typeof value === "function" ? value(open) : value;
|
|
5023
5525
|
if (setOpenProp) {
|
|
@@ -5029,10 +5531,10 @@ function SidebarProvider({
|
|
|
5029
5531
|
},
|
|
5030
5532
|
[setOpenProp, open]
|
|
5031
5533
|
);
|
|
5032
|
-
const toggleSidebar =
|
|
5534
|
+
const toggleSidebar = React47.useCallback(() => {
|
|
5033
5535
|
return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
|
|
5034
5536
|
}, [isMobile, setOpen, setOpenMobile]);
|
|
5035
|
-
|
|
5537
|
+
React47.useEffect(() => {
|
|
5036
5538
|
const handleKeyDown = (event) => {
|
|
5037
5539
|
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
5038
5540
|
event.preventDefault();
|
|
@@ -5043,7 +5545,7 @@ function SidebarProvider({
|
|
|
5043
5545
|
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
5044
5546
|
}, [toggleSidebar]);
|
|
5045
5547
|
const state = open ? "expanded" : "collapsed";
|
|
5046
|
-
const contextValue =
|
|
5548
|
+
const contextValue = React47.useMemo(
|
|
5047
5549
|
() => ({
|
|
5048
5550
|
state,
|
|
5049
5551
|
open,
|
|
@@ -5055,7 +5557,7 @@ function SidebarProvider({
|
|
|
5055
5557
|
}),
|
|
5056
5558
|
[state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]
|
|
5057
5559
|
);
|
|
5058
|
-
return /* @__PURE__ */
|
|
5560
|
+
return /* @__PURE__ */ jsx49(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx49(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ jsx49(
|
|
5059
5561
|
"div",
|
|
5060
5562
|
{
|
|
5061
5563
|
"data-slot": "sidebar-wrapper",
|
|
@@ -5083,7 +5585,7 @@ function Sidebar({
|
|
|
5083
5585
|
}) {
|
|
5084
5586
|
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
5085
5587
|
if (collapsible === "none") {
|
|
5086
|
-
return /* @__PURE__ */
|
|
5588
|
+
return /* @__PURE__ */ jsx49(
|
|
5087
5589
|
"div",
|
|
5088
5590
|
{
|
|
5089
5591
|
"data-slot": "sidebar",
|
|
@@ -5097,7 +5599,7 @@ function Sidebar({
|
|
|
5097
5599
|
);
|
|
5098
5600
|
}
|
|
5099
5601
|
if (isMobile) {
|
|
5100
|
-
return /* @__PURE__ */
|
|
5602
|
+
return /* @__PURE__ */ jsx49(Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ jsxs28(
|
|
5101
5603
|
SheetContent,
|
|
5102
5604
|
{
|
|
5103
5605
|
"data-sidebar": "sidebar",
|
|
@@ -5109,16 +5611,16 @@ function Sidebar({
|
|
|
5109
5611
|
},
|
|
5110
5612
|
side,
|
|
5111
5613
|
children: [
|
|
5112
|
-
/* @__PURE__ */
|
|
5113
|
-
/* @__PURE__ */
|
|
5114
|
-
/* @__PURE__ */
|
|
5614
|
+
/* @__PURE__ */ jsxs28(SheetHeader, { className: "sr-only", children: [
|
|
5615
|
+
/* @__PURE__ */ jsx49(SheetTitle, { children: "Sidebar" }),
|
|
5616
|
+
/* @__PURE__ */ jsx49(SheetDescription, { children: "Displays the mobile sidebar." })
|
|
5115
5617
|
] }),
|
|
5116
|
-
/* @__PURE__ */
|
|
5618
|
+
/* @__PURE__ */ jsx49("div", { className: "flex h-full w-full flex-col", children })
|
|
5117
5619
|
]
|
|
5118
5620
|
}
|
|
5119
5621
|
) });
|
|
5120
5622
|
}
|
|
5121
|
-
return /* @__PURE__ */
|
|
5623
|
+
return /* @__PURE__ */ jsxs28(
|
|
5122
5624
|
"div",
|
|
5123
5625
|
{
|
|
5124
5626
|
className: "group peer text-sidebar-foreground hidden md:block",
|
|
@@ -5128,7 +5630,7 @@ function Sidebar({
|
|
|
5128
5630
|
"data-side": side,
|
|
5129
5631
|
"data-slot": "sidebar",
|
|
5130
5632
|
children: [
|
|
5131
|
-
/* @__PURE__ */
|
|
5633
|
+
/* @__PURE__ */ jsx49(
|
|
5132
5634
|
"div",
|
|
5133
5635
|
{
|
|
5134
5636
|
"data-slot": "sidebar-gap",
|
|
@@ -5140,7 +5642,7 @@ function Sidebar({
|
|
|
5140
5642
|
)
|
|
5141
5643
|
}
|
|
5142
5644
|
),
|
|
5143
|
-
/* @__PURE__ */
|
|
5645
|
+
/* @__PURE__ */ jsx49(
|
|
5144
5646
|
"div",
|
|
5145
5647
|
{
|
|
5146
5648
|
"data-slot": "sidebar-container",
|
|
@@ -5152,7 +5654,7 @@ function Sidebar({
|
|
|
5152
5654
|
className
|
|
5153
5655
|
),
|
|
5154
5656
|
...props,
|
|
5155
|
-
children: /* @__PURE__ */
|
|
5657
|
+
children: /* @__PURE__ */ jsx49(
|
|
5156
5658
|
"div",
|
|
5157
5659
|
{
|
|
5158
5660
|
"data-sidebar": "sidebar",
|
|
@@ -5173,7 +5675,7 @@ function SidebarTrigger({
|
|
|
5173
5675
|
...props
|
|
5174
5676
|
}) {
|
|
5175
5677
|
const { toggleSidebar } = useSidebar();
|
|
5176
|
-
return /* @__PURE__ */
|
|
5678
|
+
return /* @__PURE__ */ jsxs28(
|
|
5177
5679
|
Button,
|
|
5178
5680
|
{
|
|
5179
5681
|
"data-sidebar": "trigger",
|
|
@@ -5187,15 +5689,15 @@ function SidebarTrigger({
|
|
|
5187
5689
|
},
|
|
5188
5690
|
...props,
|
|
5189
5691
|
children: [
|
|
5190
|
-
/* @__PURE__ */
|
|
5191
|
-
/* @__PURE__ */
|
|
5692
|
+
/* @__PURE__ */ jsx49(PanelLeftIcon, {}),
|
|
5693
|
+
/* @__PURE__ */ jsx49("span", { className: "sr-only", children: "Toggle Sidebar" })
|
|
5192
5694
|
]
|
|
5193
5695
|
}
|
|
5194
5696
|
);
|
|
5195
5697
|
}
|
|
5196
5698
|
function SidebarRail({ className, ...props }) {
|
|
5197
5699
|
const { toggleSidebar } = useSidebar();
|
|
5198
|
-
return /* @__PURE__ */
|
|
5700
|
+
return /* @__PURE__ */ jsx49(
|
|
5199
5701
|
"button",
|
|
5200
5702
|
{
|
|
5201
5703
|
"data-sidebar": "rail",
|
|
@@ -5218,7 +5720,7 @@ function SidebarRail({ className, ...props }) {
|
|
|
5218
5720
|
);
|
|
5219
5721
|
}
|
|
5220
5722
|
function SidebarInset({ className, ...props }) {
|
|
5221
|
-
return /* @__PURE__ */
|
|
5723
|
+
return /* @__PURE__ */ jsx49(
|
|
5222
5724
|
"main",
|
|
5223
5725
|
{
|
|
5224
5726
|
"data-slot": "sidebar-inset",
|
|
@@ -5235,7 +5737,7 @@ function SidebarInput({
|
|
|
5235
5737
|
className,
|
|
5236
5738
|
...props
|
|
5237
5739
|
}) {
|
|
5238
|
-
return /* @__PURE__ */
|
|
5740
|
+
return /* @__PURE__ */ jsx49(
|
|
5239
5741
|
Input,
|
|
5240
5742
|
{
|
|
5241
5743
|
"data-slot": "sidebar-input",
|
|
@@ -5246,7 +5748,7 @@ function SidebarInput({
|
|
|
5246
5748
|
);
|
|
5247
5749
|
}
|
|
5248
5750
|
function SidebarHeader({ className, ...props }) {
|
|
5249
|
-
return /* @__PURE__ */
|
|
5751
|
+
return /* @__PURE__ */ jsx49(
|
|
5250
5752
|
"div",
|
|
5251
5753
|
{
|
|
5252
5754
|
"data-slot": "sidebar-header",
|
|
@@ -5257,7 +5759,7 @@ function SidebarHeader({ className, ...props }) {
|
|
|
5257
5759
|
);
|
|
5258
5760
|
}
|
|
5259
5761
|
function SidebarFooter({ className, ...props }) {
|
|
5260
|
-
return /* @__PURE__ */
|
|
5762
|
+
return /* @__PURE__ */ jsx49(
|
|
5261
5763
|
"div",
|
|
5262
5764
|
{
|
|
5263
5765
|
"data-slot": "sidebar-footer",
|
|
@@ -5271,7 +5773,7 @@ function SidebarSeparator({
|
|
|
5271
5773
|
className,
|
|
5272
5774
|
...props
|
|
5273
5775
|
}) {
|
|
5274
|
-
return /* @__PURE__ */
|
|
5776
|
+
return /* @__PURE__ */ jsx49(
|
|
5275
5777
|
Separator5,
|
|
5276
5778
|
{
|
|
5277
5779
|
"data-slot": "sidebar-separator",
|
|
@@ -5282,7 +5784,7 @@ function SidebarSeparator({
|
|
|
5282
5784
|
);
|
|
5283
5785
|
}
|
|
5284
5786
|
function SidebarContent({ className, ...props }) {
|
|
5285
|
-
return /* @__PURE__ */
|
|
5787
|
+
return /* @__PURE__ */ jsx49(
|
|
5286
5788
|
"div",
|
|
5287
5789
|
{
|
|
5288
5790
|
"data-slot": "sidebar-content",
|
|
@@ -5296,7 +5798,7 @@ function SidebarContent({ className, ...props }) {
|
|
|
5296
5798
|
);
|
|
5297
5799
|
}
|
|
5298
5800
|
function SidebarGroup({ className, ...props }) {
|
|
5299
|
-
return /* @__PURE__ */
|
|
5801
|
+
return /* @__PURE__ */ jsx49(
|
|
5300
5802
|
"div",
|
|
5301
5803
|
{
|
|
5302
5804
|
"data-slot": "sidebar-group",
|
|
@@ -5312,7 +5814,7 @@ function SidebarGroupLabel({
|
|
|
5312
5814
|
...props
|
|
5313
5815
|
}) {
|
|
5314
5816
|
const Comp = asChild ? Slot6 : "div";
|
|
5315
|
-
return /* @__PURE__ */
|
|
5817
|
+
return /* @__PURE__ */ jsx49(
|
|
5316
5818
|
Comp,
|
|
5317
5819
|
{
|
|
5318
5820
|
"data-slot": "sidebar-group-label",
|
|
@@ -5332,7 +5834,7 @@ function SidebarGroupAction({
|
|
|
5332
5834
|
...props
|
|
5333
5835
|
}) {
|
|
5334
5836
|
const Comp = asChild ? Slot6 : "button";
|
|
5335
|
-
return /* @__PURE__ */
|
|
5837
|
+
return /* @__PURE__ */ jsx49(
|
|
5336
5838
|
Comp,
|
|
5337
5839
|
{
|
|
5338
5840
|
"data-slot": "sidebar-group-action",
|
|
@@ -5352,7 +5854,7 @@ function SidebarGroupContent({
|
|
|
5352
5854
|
className,
|
|
5353
5855
|
...props
|
|
5354
5856
|
}) {
|
|
5355
|
-
return /* @__PURE__ */
|
|
5857
|
+
return /* @__PURE__ */ jsx49(
|
|
5356
5858
|
"div",
|
|
5357
5859
|
{
|
|
5358
5860
|
"data-slot": "sidebar-group-content",
|
|
@@ -5363,7 +5865,7 @@ function SidebarGroupContent({
|
|
|
5363
5865
|
);
|
|
5364
5866
|
}
|
|
5365
5867
|
function SidebarMenu({ className, ...props }) {
|
|
5366
|
-
return /* @__PURE__ */
|
|
5868
|
+
return /* @__PURE__ */ jsx49(
|
|
5367
5869
|
"ul",
|
|
5368
5870
|
{
|
|
5369
5871
|
"data-slot": "sidebar-menu",
|
|
@@ -5374,7 +5876,7 @@ function SidebarMenu({ className, ...props }) {
|
|
|
5374
5876
|
);
|
|
5375
5877
|
}
|
|
5376
5878
|
function SidebarMenuItem({ className, ...props }) {
|
|
5377
|
-
return /* @__PURE__ */
|
|
5879
|
+
return /* @__PURE__ */ jsx49(
|
|
5378
5880
|
"li",
|
|
5379
5881
|
{
|
|
5380
5882
|
"data-slot": "sidebar-menu-item",
|
|
@@ -5415,7 +5917,7 @@ function SidebarMenuButton({
|
|
|
5415
5917
|
}) {
|
|
5416
5918
|
const Comp = asChild ? Slot6 : "button";
|
|
5417
5919
|
const { isMobile, state } = useSidebar();
|
|
5418
|
-
const button = /* @__PURE__ */
|
|
5920
|
+
const button = /* @__PURE__ */ jsx49(
|
|
5419
5921
|
Comp,
|
|
5420
5922
|
{
|
|
5421
5923
|
"data-slot": "sidebar-menu-button",
|
|
@@ -5434,9 +5936,9 @@ function SidebarMenuButton({
|
|
|
5434
5936
|
children: tooltip
|
|
5435
5937
|
};
|
|
5436
5938
|
}
|
|
5437
|
-
return /* @__PURE__ */
|
|
5438
|
-
/* @__PURE__ */
|
|
5439
|
-
/* @__PURE__ */
|
|
5939
|
+
return /* @__PURE__ */ jsxs28(Tooltip2, { children: [
|
|
5940
|
+
/* @__PURE__ */ jsx49(TooltipTrigger, { asChild: true, children: button }),
|
|
5941
|
+
/* @__PURE__ */ jsx49(
|
|
5440
5942
|
TooltipContent,
|
|
5441
5943
|
{
|
|
5442
5944
|
side: "right",
|
|
@@ -5454,7 +5956,7 @@ function SidebarMenuAction({
|
|
|
5454
5956
|
...props
|
|
5455
5957
|
}) {
|
|
5456
5958
|
const Comp = asChild ? Slot6 : "button";
|
|
5457
|
-
return /* @__PURE__ */
|
|
5959
|
+
return /* @__PURE__ */ jsx49(
|
|
5458
5960
|
Comp,
|
|
5459
5961
|
{
|
|
5460
5962
|
"data-slot": "sidebar-menu-action",
|
|
@@ -5478,7 +5980,7 @@ function SidebarMenuBadge({
|
|
|
5478
5980
|
className,
|
|
5479
5981
|
...props
|
|
5480
5982
|
}) {
|
|
5481
|
-
return /* @__PURE__ */
|
|
5983
|
+
return /* @__PURE__ */ jsx49(
|
|
5482
5984
|
"div",
|
|
5483
5985
|
{
|
|
5484
5986
|
"data-slot": "sidebar-menu-badge",
|
|
@@ -5501,10 +6003,10 @@ function SidebarMenuSkeleton({
|
|
|
5501
6003
|
showIcon = false,
|
|
5502
6004
|
...props
|
|
5503
6005
|
}) {
|
|
5504
|
-
const width =
|
|
6006
|
+
const width = React47.useMemo(() => {
|
|
5505
6007
|
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
5506
6008
|
}, []);
|
|
5507
|
-
return /* @__PURE__ */
|
|
6009
|
+
return /* @__PURE__ */ jsxs28(
|
|
5508
6010
|
"div",
|
|
5509
6011
|
{
|
|
5510
6012
|
"data-slot": "sidebar-menu-skeleton",
|
|
@@ -5512,14 +6014,14 @@ function SidebarMenuSkeleton({
|
|
|
5512
6014
|
className: cn("flex h-8 items-center gap-2 rounded-md px-2", className),
|
|
5513
6015
|
...props,
|
|
5514
6016
|
children: [
|
|
5515
|
-
showIcon && /* @__PURE__ */
|
|
6017
|
+
showIcon && /* @__PURE__ */ jsx49(
|
|
5516
6018
|
Skeleton,
|
|
5517
6019
|
{
|
|
5518
6020
|
className: "size-4 rounded-md",
|
|
5519
6021
|
"data-sidebar": "menu-skeleton-icon"
|
|
5520
6022
|
}
|
|
5521
6023
|
),
|
|
5522
|
-
/* @__PURE__ */
|
|
6024
|
+
/* @__PURE__ */ jsx49(
|
|
5523
6025
|
Skeleton,
|
|
5524
6026
|
{
|
|
5525
6027
|
className: "h-4 max-w-(--skeleton-width) flex-1",
|
|
@@ -5534,7 +6036,7 @@ function SidebarMenuSkeleton({
|
|
|
5534
6036
|
);
|
|
5535
6037
|
}
|
|
5536
6038
|
function SidebarMenuSub({ className, ...props }) {
|
|
5537
|
-
return /* @__PURE__ */
|
|
6039
|
+
return /* @__PURE__ */ jsx49(
|
|
5538
6040
|
"ul",
|
|
5539
6041
|
{
|
|
5540
6042
|
"data-slot": "sidebar-menu-sub",
|
|
@@ -5552,7 +6054,7 @@ function SidebarMenuSubItem({
|
|
|
5552
6054
|
className,
|
|
5553
6055
|
...props
|
|
5554
6056
|
}) {
|
|
5555
|
-
return /* @__PURE__ */
|
|
6057
|
+
return /* @__PURE__ */ jsx49(
|
|
5556
6058
|
"li",
|
|
5557
6059
|
{
|
|
5558
6060
|
"data-slot": "sidebar-menu-sub-item",
|
|
@@ -5570,7 +6072,7 @@ function SidebarMenuSubButton({
|
|
|
5570
6072
|
...props
|
|
5571
6073
|
}) {
|
|
5572
6074
|
const Comp = asChild ? Slot6 : "a";
|
|
5573
|
-
return /* @__PURE__ */
|
|
6075
|
+
return /* @__PURE__ */ jsx49(
|
|
5574
6076
|
Comp,
|
|
5575
6077
|
{
|
|
5576
6078
|
"data-slot": "sidebar-menu-sub-button",
|
|
@@ -5591,9 +6093,9 @@ function SidebarMenuSubButton({
|
|
|
5591
6093
|
}
|
|
5592
6094
|
|
|
5593
6095
|
// src/components/ui/slider.tsx
|
|
5594
|
-
import * as
|
|
6096
|
+
import * as React48 from "react";
|
|
5595
6097
|
import * as SliderPrimitive from "@radix-ui/react-slider";
|
|
5596
|
-
import { jsx as
|
|
6098
|
+
import { jsx as jsx50, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
5597
6099
|
function Slider({
|
|
5598
6100
|
className,
|
|
5599
6101
|
defaultValue,
|
|
@@ -5602,11 +6104,11 @@ function Slider({
|
|
|
5602
6104
|
max = 100,
|
|
5603
6105
|
...props
|
|
5604
6106
|
}) {
|
|
5605
|
-
const _values =
|
|
6107
|
+
const _values = React48.useMemo(
|
|
5606
6108
|
() => Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min, max],
|
|
5607
6109
|
[value, defaultValue, min, max]
|
|
5608
6110
|
);
|
|
5609
|
-
return /* @__PURE__ */
|
|
6111
|
+
return /* @__PURE__ */ jsxs29(
|
|
5610
6112
|
SliderPrimitive.Root,
|
|
5611
6113
|
{
|
|
5612
6114
|
"data-slot": "slider",
|
|
@@ -5620,14 +6122,14 @@ function Slider({
|
|
|
5620
6122
|
),
|
|
5621
6123
|
...props,
|
|
5622
6124
|
children: [
|
|
5623
|
-
/* @__PURE__ */
|
|
6125
|
+
/* @__PURE__ */ jsx50(
|
|
5624
6126
|
SliderPrimitive.Track,
|
|
5625
6127
|
{
|
|
5626
6128
|
"data-slot": "slider-track",
|
|
5627
6129
|
className: cn(
|
|
5628
6130
|
"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
6131
|
),
|
|
5630
|
-
children: /* @__PURE__ */
|
|
6132
|
+
children: /* @__PURE__ */ jsx50(
|
|
5631
6133
|
SliderPrimitive.Range,
|
|
5632
6134
|
{
|
|
5633
6135
|
"data-slot": "slider-range",
|
|
@@ -5638,7 +6140,7 @@ function Slider({
|
|
|
5638
6140
|
)
|
|
5639
6141
|
}
|
|
5640
6142
|
),
|
|
5641
|
-
Array.from({ length: _values.length }, (_, index) => /* @__PURE__ */
|
|
6143
|
+
Array.from({ length: _values.length }, (_, index) => /* @__PURE__ */ jsx50(
|
|
5642
6144
|
SliderPrimitive.Thumb,
|
|
5643
6145
|
{
|
|
5644
6146
|
"data-slot": "slider-thumb",
|
|
@@ -5655,7 +6157,7 @@ function Slider({
|
|
|
5655
6157
|
import "react";
|
|
5656
6158
|
|
|
5657
6159
|
// src/components/ui/useMediaQuery.ts
|
|
5658
|
-
import { useEffect as
|
|
6160
|
+
import { useEffect as useEffect8, useState as useState9 } from "react";
|
|
5659
6161
|
function useMediaQuery(query) {
|
|
5660
6162
|
const getMatches = (query2) => {
|
|
5661
6163
|
if (typeof window !== "undefined") {
|
|
@@ -5663,11 +6165,11 @@ function useMediaQuery(query) {
|
|
|
5663
6165
|
}
|
|
5664
6166
|
return false;
|
|
5665
6167
|
};
|
|
5666
|
-
const [matches, setMatches] =
|
|
6168
|
+
const [matches, setMatches] = useState9(getMatches(query));
|
|
5667
6169
|
function handleChange() {
|
|
5668
6170
|
setMatches(getMatches(query));
|
|
5669
6171
|
}
|
|
5670
|
-
|
|
6172
|
+
useEffect8(() => {
|
|
5671
6173
|
const matchMedia = window.matchMedia(query);
|
|
5672
6174
|
handleChange();
|
|
5673
6175
|
if (matchMedia.addListener) {
|
|
@@ -5687,10 +6189,10 @@ function useMediaQuery(query) {
|
|
|
5687
6189
|
}
|
|
5688
6190
|
|
|
5689
6191
|
// src/components/ui/smart-dialog-drawer.tsx
|
|
5690
|
-
import { Fragment as Fragment3, jsx as
|
|
6192
|
+
import { Fragment as Fragment3, jsx as jsx51 } from "react/jsx-runtime";
|
|
5691
6193
|
var SmartDialog = ({ children, ...props }) => {
|
|
5692
6194
|
const isMobile = useMediaQuery("(max-width: 600px)");
|
|
5693
|
-
return isMobile ? /* @__PURE__ */
|
|
6195
|
+
return isMobile ? /* @__PURE__ */ jsx51(Drawer, { ...props, children }) : /* @__PURE__ */ jsx51(Dialog, { ...props, children });
|
|
5694
6196
|
};
|
|
5695
6197
|
var SmartDialogContent = ({
|
|
5696
6198
|
children,
|
|
@@ -5700,14 +6202,14 @@ var SmartDialogContent = ({
|
|
|
5700
6202
|
...props
|
|
5701
6203
|
}) => {
|
|
5702
6204
|
const isMobile = useMediaQuery("(max-width: 600px)");
|
|
5703
|
-
return isMobile ? /* @__PURE__ */
|
|
6205
|
+
return isMobile ? /* @__PURE__ */ jsx51(
|
|
5704
6206
|
DrawerContent,
|
|
5705
6207
|
{
|
|
5706
6208
|
...props,
|
|
5707
6209
|
withCloseButton: withCloseButton ?? showCloseButton ?? true,
|
|
5708
6210
|
children
|
|
5709
6211
|
}
|
|
5710
|
-
) : /* @__PURE__ */
|
|
6212
|
+
) : /* @__PURE__ */ jsx51(
|
|
5711
6213
|
DialogContent,
|
|
5712
6214
|
{
|
|
5713
6215
|
...props,
|
|
@@ -5722,39 +6224,39 @@ var SmartDialogDescription = ({
|
|
|
5722
6224
|
...props
|
|
5723
6225
|
}) => {
|
|
5724
6226
|
const isMobile = useMediaQuery("(max-width: 600px)");
|
|
5725
|
-
return isMobile ? /* @__PURE__ */
|
|
6227
|
+
return isMobile ? /* @__PURE__ */ jsx51(DrawerDescription, { ...props, children }) : /* @__PURE__ */ jsx51(DialogDescription, { ...props, children });
|
|
5726
6228
|
};
|
|
5727
6229
|
var SmartDialogHeader = ({ children, ...props }) => {
|
|
5728
6230
|
const isMobile = useMediaQuery("(max-width: 600px)");
|
|
5729
|
-
return isMobile ? /* @__PURE__ */
|
|
6231
|
+
return isMobile ? /* @__PURE__ */ jsx51(DrawerHeader, { ...props, children }) : /* @__PURE__ */ jsx51(DialogHeader, { ...props, children });
|
|
5730
6232
|
};
|
|
5731
6233
|
var SmartDialogTitle = ({ children, ...props }) => {
|
|
5732
6234
|
const isMobile = useMediaQuery("(max-width: 600px)");
|
|
5733
|
-
return isMobile ? /* @__PURE__ */
|
|
6235
|
+
return isMobile ? /* @__PURE__ */ jsx51(DrawerTitle, { ...props, children }) : /* @__PURE__ */ jsx51(DialogTitle, { ...props, children });
|
|
5734
6236
|
};
|
|
5735
6237
|
var SmartDialogTrigger = ({
|
|
5736
6238
|
children,
|
|
5737
6239
|
...props
|
|
5738
6240
|
}) => {
|
|
5739
6241
|
const isMobile = useMediaQuery("(max-width: 600px)");
|
|
5740
|
-
return isMobile ? /* @__PURE__ */
|
|
6242
|
+
return isMobile ? /* @__PURE__ */ jsx51(DrawerTrigger, { ...props, children }) : /* @__PURE__ */ jsx51(DialogTrigger, { ...props, children });
|
|
5741
6243
|
};
|
|
5742
6244
|
var SmartDialogFooter = ({ children, ...props }) => {
|
|
5743
6245
|
const isMobile = useMediaQuery("(max-width: 600px)");
|
|
5744
|
-
return isMobile ? /* @__PURE__ */
|
|
6246
|
+
return isMobile ? /* @__PURE__ */ jsx51(DrawerFooter, { ...props, children }) : /* @__PURE__ */ jsx51(DialogFooter, { ...props, children });
|
|
5745
6247
|
};
|
|
5746
6248
|
var SmartDialogClose = ({ children, ...props }) => {
|
|
5747
6249
|
const isMobile = useMediaQuery("(max-width: 600px)");
|
|
5748
|
-
return isMobile ? /* @__PURE__ */
|
|
6250
|
+
return isMobile ? /* @__PURE__ */ jsx51(Fragment3, { children: /* @__PURE__ */ jsx51(DrawerClose, { ...props, children }) }) : /* @__PURE__ */ jsx51(DialogClose, { ...props, children });
|
|
5749
6251
|
};
|
|
5750
6252
|
|
|
5751
6253
|
// src/components/ui/sonner.tsx
|
|
5752
6254
|
import { useTheme } from "next-themes";
|
|
5753
6255
|
import { Toaster as Sonner } from "sonner";
|
|
5754
|
-
import { jsx as
|
|
6256
|
+
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
5755
6257
|
var Toaster = ({ ...props }) => {
|
|
5756
6258
|
const { theme = "system" } = useTheme();
|
|
5757
|
-
return /* @__PURE__ */
|
|
6259
|
+
return /* @__PURE__ */ jsx52(
|
|
5758
6260
|
Sonner,
|
|
5759
6261
|
{
|
|
5760
6262
|
theme,
|
|
@@ -5772,12 +6274,12 @@ var Toaster = ({ ...props }) => {
|
|
|
5772
6274
|
// src/components/ui/switch.tsx
|
|
5773
6275
|
import * as SwitchPrimitive from "@radix-ui/react-switch";
|
|
5774
6276
|
import "react";
|
|
5775
|
-
import { jsx as
|
|
6277
|
+
import { jsx as jsx53 } from "react/jsx-runtime";
|
|
5776
6278
|
function Switch({
|
|
5777
6279
|
className,
|
|
5778
6280
|
...props
|
|
5779
6281
|
}) {
|
|
5780
|
-
return /* @__PURE__ */
|
|
6282
|
+
return /* @__PURE__ */ jsx53(
|
|
5781
6283
|
SwitchPrimitive.Root,
|
|
5782
6284
|
{
|
|
5783
6285
|
"data-slot": "switch",
|
|
@@ -5786,7 +6288,7 @@ function Switch({
|
|
|
5786
6288
|
className
|
|
5787
6289
|
),
|
|
5788
6290
|
...props,
|
|
5789
|
-
children: /* @__PURE__ */
|
|
6291
|
+
children: /* @__PURE__ */ jsx53(
|
|
5790
6292
|
SwitchPrimitive.Thumb,
|
|
5791
6293
|
{
|
|
5792
6294
|
"data-slot": "switch-thumb",
|
|
@@ -5801,14 +6303,14 @@ function Switch({
|
|
|
5801
6303
|
|
|
5802
6304
|
// src/components/ui/table.tsx
|
|
5803
6305
|
import "react";
|
|
5804
|
-
import { jsx as
|
|
6306
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
5805
6307
|
function Table({ className, ...props }) {
|
|
5806
|
-
return /* @__PURE__ */
|
|
6308
|
+
return /* @__PURE__ */ jsx54(
|
|
5807
6309
|
"div",
|
|
5808
6310
|
{
|
|
5809
6311
|
"data-slot": "table-container",
|
|
5810
6312
|
className: "relative w-full overflow-x-auto",
|
|
5811
|
-
children: /* @__PURE__ */
|
|
6313
|
+
children: /* @__PURE__ */ jsx54(
|
|
5812
6314
|
"table",
|
|
5813
6315
|
{
|
|
5814
6316
|
"data-slot": "table",
|
|
@@ -5820,7 +6322,7 @@ function Table({ className, ...props }) {
|
|
|
5820
6322
|
);
|
|
5821
6323
|
}
|
|
5822
6324
|
function TableHeader({ className, ...props }) {
|
|
5823
|
-
return /* @__PURE__ */
|
|
6325
|
+
return /* @__PURE__ */ jsx54(
|
|
5824
6326
|
"thead",
|
|
5825
6327
|
{
|
|
5826
6328
|
"data-slot": "table-header",
|
|
@@ -5830,7 +6332,7 @@ function TableHeader({ className, ...props }) {
|
|
|
5830
6332
|
);
|
|
5831
6333
|
}
|
|
5832
6334
|
function TableBody({ className, ...props }) {
|
|
5833
|
-
return /* @__PURE__ */
|
|
6335
|
+
return /* @__PURE__ */ jsx54(
|
|
5834
6336
|
"tbody",
|
|
5835
6337
|
{
|
|
5836
6338
|
"data-slot": "table-body",
|
|
@@ -5840,7 +6342,7 @@ function TableBody({ className, ...props }) {
|
|
|
5840
6342
|
);
|
|
5841
6343
|
}
|
|
5842
6344
|
function TableFooter({ className, ...props }) {
|
|
5843
|
-
return /* @__PURE__ */
|
|
6345
|
+
return /* @__PURE__ */ jsx54(
|
|
5844
6346
|
"tfoot",
|
|
5845
6347
|
{
|
|
5846
6348
|
"data-slot": "table-footer",
|
|
@@ -5853,7 +6355,7 @@ function TableFooter({ className, ...props }) {
|
|
|
5853
6355
|
);
|
|
5854
6356
|
}
|
|
5855
6357
|
function TableRow({ className, ...props }) {
|
|
5856
|
-
return /* @__PURE__ */
|
|
6358
|
+
return /* @__PURE__ */ jsx54(
|
|
5857
6359
|
"tr",
|
|
5858
6360
|
{
|
|
5859
6361
|
"data-slot": "table-row",
|
|
@@ -5866,7 +6368,7 @@ function TableRow({ className, ...props }) {
|
|
|
5866
6368
|
);
|
|
5867
6369
|
}
|
|
5868
6370
|
function TableHead({ className, ...props }) {
|
|
5869
|
-
return /* @__PURE__ */
|
|
6371
|
+
return /* @__PURE__ */ jsx54(
|
|
5870
6372
|
"th",
|
|
5871
6373
|
{
|
|
5872
6374
|
"data-slot": "table-head",
|
|
@@ -5879,7 +6381,7 @@ function TableHead({ className, ...props }) {
|
|
|
5879
6381
|
);
|
|
5880
6382
|
}
|
|
5881
6383
|
function TableCell({ className, ...props }) {
|
|
5882
|
-
return /* @__PURE__ */
|
|
6384
|
+
return /* @__PURE__ */ jsx54(
|
|
5883
6385
|
"td",
|
|
5884
6386
|
{
|
|
5885
6387
|
"data-slot": "table-cell",
|
|
@@ -5895,7 +6397,7 @@ function TableCaption({
|
|
|
5895
6397
|
className,
|
|
5896
6398
|
...props
|
|
5897
6399
|
}) {
|
|
5898
|
-
return /* @__PURE__ */
|
|
6400
|
+
return /* @__PURE__ */ jsx54(
|
|
5899
6401
|
"caption",
|
|
5900
6402
|
{
|
|
5901
6403
|
"data-slot": "table-caption",
|
|
@@ -5908,48 +6410,147 @@ function TableCaption({
|
|
|
5908
6410
|
// src/components/ui/tabs.tsx
|
|
5909
6411
|
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
5910
6412
|
import { cva as cva12 } from "class-variance-authority";
|
|
5911
|
-
import "react";
|
|
5912
|
-
import { jsx as
|
|
6413
|
+
import * as React52 from "react";
|
|
6414
|
+
import { jsx as jsx55, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
6415
|
+
var TabsContext = React52.createContext({
|
|
6416
|
+
orientation: "horizontal"
|
|
6417
|
+
});
|
|
6418
|
+
function useTabIndicator(listRef, orientation) {
|
|
6419
|
+
const [style, setStyle] = React52.useState({
|
|
6420
|
+
position: "absolute",
|
|
6421
|
+
opacity: 0
|
|
6422
|
+
});
|
|
6423
|
+
const isFirstMeasurement = React52.useRef(true);
|
|
6424
|
+
const measure = React52.useCallback(() => {
|
|
6425
|
+
const list = listRef.current;
|
|
6426
|
+
if (!list) return;
|
|
6427
|
+
requestAnimationFrame(() => {
|
|
6428
|
+
const activeEl = list.querySelector(
|
|
6429
|
+
'[data-state="active"]'
|
|
6430
|
+
);
|
|
6431
|
+
if (!activeEl) return;
|
|
6432
|
+
const noTransition = isFirstMeasurement.current;
|
|
6433
|
+
if (orientation === "horizontal") {
|
|
6434
|
+
setStyle({
|
|
6435
|
+
position: "absolute",
|
|
6436
|
+
bottom: 0,
|
|
6437
|
+
left: 0,
|
|
6438
|
+
height: "2px",
|
|
6439
|
+
width: activeEl.offsetWidth,
|
|
6440
|
+
transform: `translateX(${activeEl.offsetLeft}px)`,
|
|
6441
|
+
transition: noTransition ? "none" : "transform 300ms ease-in-out, width 300ms ease-in-out",
|
|
6442
|
+
background: "var(--primary-stroke-default)",
|
|
6443
|
+
opacity: 1
|
|
6444
|
+
});
|
|
6445
|
+
} else {
|
|
6446
|
+
setStyle({
|
|
6447
|
+
position: "absolute",
|
|
6448
|
+
left: 0,
|
|
6449
|
+
top: 0,
|
|
6450
|
+
width: "2px",
|
|
6451
|
+
height: activeEl.offsetHeight,
|
|
6452
|
+
transform: `translateY(${activeEl.offsetTop}px)`,
|
|
6453
|
+
transition: noTransition ? "none" : "transform 300ms ease-in-out, height 300ms ease-in-out",
|
|
6454
|
+
background: "var(--primary-stroke-default)",
|
|
6455
|
+
opacity: 1
|
|
6456
|
+
});
|
|
6457
|
+
}
|
|
6458
|
+
if (noTransition) {
|
|
6459
|
+
isFirstMeasurement.current = false;
|
|
6460
|
+
}
|
|
6461
|
+
});
|
|
6462
|
+
}, [listRef, orientation]);
|
|
6463
|
+
React52.useEffect(() => {
|
|
6464
|
+
const list = listRef.current;
|
|
6465
|
+
if (!list) return;
|
|
6466
|
+
measure();
|
|
6467
|
+
const mutationObserver = new MutationObserver(() => {
|
|
6468
|
+
measure();
|
|
6469
|
+
});
|
|
6470
|
+
mutationObserver.observe(list, {
|
|
6471
|
+
subtree: true,
|
|
6472
|
+
attributes: true,
|
|
6473
|
+
attributeFilter: ["data-state"],
|
|
6474
|
+
childList: true
|
|
6475
|
+
});
|
|
6476
|
+
const resizeObserver = new ResizeObserver(() => {
|
|
6477
|
+
measure();
|
|
6478
|
+
});
|
|
6479
|
+
resizeObserver.observe(list);
|
|
6480
|
+
return () => {
|
|
6481
|
+
mutationObserver.disconnect();
|
|
6482
|
+
resizeObserver.disconnect();
|
|
6483
|
+
};
|
|
6484
|
+
}, [listRef, measure]);
|
|
6485
|
+
return { style };
|
|
6486
|
+
}
|
|
5913
6487
|
function Tabs({
|
|
5914
6488
|
className,
|
|
6489
|
+
orientation = "horizontal",
|
|
5915
6490
|
...props
|
|
5916
6491
|
}) {
|
|
5917
|
-
|
|
6492
|
+
const ctx = React52.useMemo(
|
|
6493
|
+
() => ({ orientation: orientation ?? "horizontal" }),
|
|
6494
|
+
[orientation]
|
|
6495
|
+
);
|
|
6496
|
+
return /* @__PURE__ */ jsx55(TabsContext.Provider, { value: ctx, children: /* @__PURE__ */ jsx55(
|
|
5918
6497
|
TabsPrimitive.Root,
|
|
5919
6498
|
{
|
|
5920
6499
|
"data-slot": "tabs",
|
|
5921
|
-
|
|
6500
|
+
orientation,
|
|
6501
|
+
className: cn(
|
|
6502
|
+
orientation === "vertical" ? "flex flex-row gap-4" : "flex flex-col gap-2",
|
|
6503
|
+
className
|
|
6504
|
+
),
|
|
5922
6505
|
...props
|
|
5923
6506
|
}
|
|
5924
|
-
);
|
|
6507
|
+
) });
|
|
5925
6508
|
}
|
|
5926
6509
|
function TabsList({
|
|
5927
6510
|
className,
|
|
5928
6511
|
...props
|
|
5929
6512
|
}) {
|
|
5930
|
-
|
|
6513
|
+
const listRef = React52.useRef(null);
|
|
6514
|
+
const { orientation } = React52.useContext(TabsContext);
|
|
6515
|
+
const { style: indicatorStyle } = useTabIndicator(listRef, orientation);
|
|
6516
|
+
return /* @__PURE__ */ jsxs30(
|
|
5931
6517
|
TabsPrimitive.List,
|
|
5932
6518
|
{
|
|
6519
|
+
ref: listRef,
|
|
5933
6520
|
"data-slot": "tabs-list",
|
|
5934
6521
|
className: cn(
|
|
5935
|
-
"text-muted-foreground
|
|
6522
|
+
"text-muted-foreground relative",
|
|
6523
|
+
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
6524
|
className
|
|
5937
6525
|
),
|
|
5938
|
-
...props
|
|
6526
|
+
...props,
|
|
6527
|
+
children: [
|
|
6528
|
+
props.children,
|
|
6529
|
+
/* @__PURE__ */ jsx55("span", { "data-slot": "tabs-indicator", style: indicatorStyle })
|
|
6530
|
+
]
|
|
5939
6531
|
}
|
|
5940
6532
|
);
|
|
5941
6533
|
}
|
|
5942
6534
|
var tabsTriggerVariants = cva12(
|
|
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
|
|
6535
|
+
"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
6536
|
{
|
|
5945
6537
|
variants: {
|
|
5946
6538
|
size: {
|
|
5947
|
-
md: "
|
|
5948
|
-
lg: "
|
|
6539
|
+
md: "text-sm leading-5",
|
|
6540
|
+
lg: "text-base leading-6"
|
|
6541
|
+
},
|
|
6542
|
+
orientation: {
|
|
6543
|
+
horizontal: "pb-1 px-2",
|
|
6544
|
+
vertical: "py-1.5 px-3 justify-start text-left w-full"
|
|
5949
6545
|
}
|
|
5950
6546
|
},
|
|
6547
|
+
compoundVariants: [
|
|
6548
|
+
{ orientation: "horizontal", size: "md", class: "min-w-[72px]" },
|
|
6549
|
+
{ orientation: "horizontal", size: "lg", class: "min-w-[88px]" }
|
|
6550
|
+
],
|
|
5951
6551
|
defaultVariants: {
|
|
5952
|
-
size: "md"
|
|
6552
|
+
size: "md",
|
|
6553
|
+
orientation: "horizontal"
|
|
5953
6554
|
}
|
|
5954
6555
|
}
|
|
5955
6556
|
);
|
|
@@ -5959,13 +6560,23 @@ function TabsTrigger({
|
|
|
5959
6560
|
children,
|
|
5960
6561
|
...props
|
|
5961
6562
|
}) {
|
|
5962
|
-
|
|
6563
|
+
const { orientation } = React52.useContext(TabsContext);
|
|
6564
|
+
return /* @__PURE__ */ jsx55(
|
|
5963
6565
|
TabsPrimitive.Trigger,
|
|
5964
6566
|
{
|
|
5965
6567
|
"data-slot": "tabs-trigger",
|
|
5966
|
-
className: cn(tabsTriggerVariants({ size }), className),
|
|
6568
|
+
className: cn(tabsTriggerVariants({ size, orientation }), className),
|
|
5967
6569
|
...props,
|
|
5968
|
-
children: /* @__PURE__ */
|
|
6570
|
+
children: /* @__PURE__ */ jsx55(
|
|
6571
|
+
"span",
|
|
6572
|
+
{
|
|
6573
|
+
className: cn(
|
|
6574
|
+
"inline-flex items-center justify-center gap-1.5 rounded-[6px] hover:bg-gray-surface-light",
|
|
6575
|
+
orientation === "vertical" ? "px-2 py-1.5 w-full" : "px-2 py-1.5"
|
|
6576
|
+
),
|
|
6577
|
+
children
|
|
6578
|
+
}
|
|
6579
|
+
)
|
|
5969
6580
|
}
|
|
5970
6581
|
);
|
|
5971
6582
|
}
|
|
@@ -5973,7 +6584,7 @@ function TabsContent({
|
|
|
5973
6584
|
className,
|
|
5974
6585
|
...props
|
|
5975
6586
|
}) {
|
|
5976
|
-
return /* @__PURE__ */
|
|
6587
|
+
return /* @__PURE__ */ jsx55(
|
|
5977
6588
|
TabsPrimitive.Content,
|
|
5978
6589
|
{
|
|
5979
6590
|
"data-slot": "tabs-content",
|
|
@@ -5987,9 +6598,9 @@ function TabsContent({
|
|
|
5987
6598
|
import {
|
|
5988
6599
|
ThemeProvider as NextThemesProvider
|
|
5989
6600
|
} from "next-themes";
|
|
5990
|
-
import { jsx as
|
|
6601
|
+
import { jsx as jsx56 } from "react/jsx-runtime";
|
|
5991
6602
|
function ThemeProvider({ children, ...props }) {
|
|
5992
|
-
return /* @__PURE__ */
|
|
6603
|
+
return /* @__PURE__ */ jsx56(
|
|
5993
6604
|
NextThemesProvider,
|
|
5994
6605
|
{
|
|
5995
6606
|
attribute: "class",
|
|
@@ -6006,29 +6617,29 @@ function ThemeProvider({ children, ...props }) {
|
|
|
6006
6617
|
import { Monitor, Moon, Sun } from "lucide-react";
|
|
6007
6618
|
import { useTheme as useTheme2 } from "next-themes";
|
|
6008
6619
|
import "react";
|
|
6009
|
-
import { jsx as
|
|
6620
|
+
import { jsx as jsx57, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
6010
6621
|
function ThemeToggle({
|
|
6011
6622
|
className,
|
|
6012
6623
|
...props
|
|
6013
6624
|
}) {
|
|
6014
6625
|
const { setTheme } = useTheme2();
|
|
6015
|
-
return /* @__PURE__ */
|
|
6016
|
-
/* @__PURE__ */
|
|
6017
|
-
/* @__PURE__ */
|
|
6018
|
-
/* @__PURE__ */
|
|
6019
|
-
/* @__PURE__ */
|
|
6626
|
+
return /* @__PURE__ */ jsxs31(DropdownMenu, { children: [
|
|
6627
|
+
/* @__PURE__ */ jsx57(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs31(Button, { variant: "outline", size: "icon", className, ...props, children: [
|
|
6628
|
+
/* @__PURE__ */ jsx57(Sun, { className: "size-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0" }),
|
|
6629
|
+
/* @__PURE__ */ jsx57(Moon, { className: "absolute size-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100" }),
|
|
6630
|
+
/* @__PURE__ */ jsx57("span", { className: "sr-only", children: "Toggle theme" })
|
|
6020
6631
|
] }) }),
|
|
6021
|
-
/* @__PURE__ */
|
|
6022
|
-
/* @__PURE__ */
|
|
6023
|
-
/* @__PURE__ */
|
|
6632
|
+
/* @__PURE__ */ jsxs31(DropdownMenuContent, { align: "end", children: [
|
|
6633
|
+
/* @__PURE__ */ jsxs31(DropdownMenuItem, { onClick: () => setTheme("light"), children: [
|
|
6634
|
+
/* @__PURE__ */ jsx57(Sun, { className: "size-4" }),
|
|
6024
6635
|
"Light"
|
|
6025
6636
|
] }),
|
|
6026
|
-
/* @__PURE__ */
|
|
6027
|
-
/* @__PURE__ */
|
|
6637
|
+
/* @__PURE__ */ jsxs31(DropdownMenuItem, { onClick: () => setTheme("dark"), children: [
|
|
6638
|
+
/* @__PURE__ */ jsx57(Moon, { className: "size-4" }),
|
|
6028
6639
|
"Dark"
|
|
6029
6640
|
] }),
|
|
6030
|
-
/* @__PURE__ */
|
|
6031
|
-
/* @__PURE__ */
|
|
6641
|
+
/* @__PURE__ */ jsxs31(DropdownMenuItem, { onClick: () => setTheme("system"), children: [
|
|
6642
|
+
/* @__PURE__ */ jsx57(Monitor, { className: "size-4" }),
|
|
6032
6643
|
"System"
|
|
6033
6644
|
] })
|
|
6034
6645
|
] })
|
|
@@ -6038,8 +6649,8 @@ function ThemeToggle({
|
|
|
6038
6649
|
// src/components/ui/time-input.tsx
|
|
6039
6650
|
import "class-variance-authority";
|
|
6040
6651
|
import { Clock } from "lucide-react";
|
|
6041
|
-
import * as
|
|
6042
|
-
import { jsx as
|
|
6652
|
+
import * as React54 from "react";
|
|
6653
|
+
import { jsx as jsx58, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
6043
6654
|
var TIME_FORMAT_PLACEHOLDER = {
|
|
6044
6655
|
"12h": "hh:mm AM/PM",
|
|
6045
6656
|
"24h": "HH:mm",
|
|
@@ -6092,16 +6703,16 @@ function TimeInput({
|
|
|
6092
6703
|
formatDisplay
|
|
6093
6704
|
}) {
|
|
6094
6705
|
const resolvedPlaceholder = placeholder ?? TIME_FORMAT_PLACEHOLDER[timeFormat];
|
|
6095
|
-
const displayValue =
|
|
6706
|
+
const displayValue = React54.useMemo(() => {
|
|
6096
6707
|
if (!time) return "";
|
|
6097
6708
|
if (formatDisplay) return formatDisplay(time);
|
|
6098
6709
|
return formatTime(time, timeFormat);
|
|
6099
6710
|
}, [time, formatDisplay, timeFormat]);
|
|
6100
|
-
const [open, setOpen] =
|
|
6101
|
-
const hoursRef =
|
|
6102
|
-
const minutesRef =
|
|
6103
|
-
const periodRef =
|
|
6104
|
-
const scrollToSelected =
|
|
6711
|
+
const [open, setOpen] = React54.useState(false);
|
|
6712
|
+
const hoursRef = React54.useRef(null);
|
|
6713
|
+
const minutesRef = React54.useRef(null);
|
|
6714
|
+
const periodRef = React54.useRef(null);
|
|
6715
|
+
const scrollToSelected = React54.useCallback(() => {
|
|
6105
6716
|
requestAnimationFrame(() => {
|
|
6106
6717
|
for (const ref of [hoursRef, minutesRef, periodRef]) {
|
|
6107
6718
|
const container = ref.current;
|
|
@@ -6113,7 +6724,7 @@ function TimeInput({
|
|
|
6113
6724
|
}
|
|
6114
6725
|
});
|
|
6115
6726
|
}, []);
|
|
6116
|
-
|
|
6727
|
+
React54.useEffect(() => {
|
|
6117
6728
|
if (open) {
|
|
6118
6729
|
scrollToSelected();
|
|
6119
6730
|
}
|
|
@@ -6149,8 +6760,8 @@ function TimeInput({
|
|
|
6149
6760
|
const selectedH12 = time ? getDisplayHour(time.hours, timeFormat) : null;
|
|
6150
6761
|
const selectedMinute = time?.minutes ?? null;
|
|
6151
6762
|
const selectedPeriod = time ? getPeriod(time.hours) : null;
|
|
6152
|
-
return /* @__PURE__ */
|
|
6153
|
-
/* @__PURE__ */
|
|
6763
|
+
return /* @__PURE__ */ jsx58("div", { className: cn("relative flex gap-2", className), children: /* @__PURE__ */ jsxs32(Popover, { open, onOpenChange: setOpen, children: [
|
|
6764
|
+
/* @__PURE__ */ jsx58(PopoverTrigger, { asChild: true, disabled: inputDisabled, children: /* @__PURE__ */ jsxs32(
|
|
6154
6765
|
Button,
|
|
6155
6766
|
{
|
|
6156
6767
|
type: "button",
|
|
@@ -6165,18 +6776,18 @@ function TimeInput({
|
|
|
6165
6776
|
disabled: inputDisabled,
|
|
6166
6777
|
children: [
|
|
6167
6778
|
displayValue || resolvedPlaceholder,
|
|
6168
|
-
icon !== void 0 ? icon : /* @__PURE__ */
|
|
6779
|
+
icon !== void 0 ? icon : /* @__PURE__ */ jsx58(Clock, { className: "h-4 w-4 text-muted-foreground shrink-0" })
|
|
6169
6780
|
]
|
|
6170
6781
|
}
|
|
6171
6782
|
) }),
|
|
6172
|
-
/* @__PURE__ */
|
|
6783
|
+
/* @__PURE__ */ jsx58(
|
|
6173
6784
|
PopoverContent,
|
|
6174
6785
|
{
|
|
6175
6786
|
className: cn("w-auto p-0", popoverContentClassName),
|
|
6176
6787
|
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
6177
6788
|
...popoverContentProps,
|
|
6178
|
-
children: /* @__PURE__ */
|
|
6179
|
-
/* @__PURE__ */
|
|
6789
|
+
children: /* @__PURE__ */ jsxs32("div", { className: "flex divide-x border border-focus-ring rounded-md", children: [
|
|
6790
|
+
/* @__PURE__ */ jsx58("div", { className: "h-56 w-16 overflow-y-auto overscroll-y-contain [-webkit-overflow-scrolling:touch]", children: /* @__PURE__ */ jsx58("div", { ref: hoursRef, className: "flex flex-col p-1 ", children: hoursList.map((h) => /* @__PURE__ */ jsx58(
|
|
6180
6791
|
Button,
|
|
6181
6792
|
{
|
|
6182
6793
|
variant: "ghost",
|
|
@@ -6191,7 +6802,7 @@ function TimeInput({
|
|
|
6191
6802
|
},
|
|
6192
6803
|
h
|
|
6193
6804
|
)) }) }),
|
|
6194
|
-
/* @__PURE__ */
|
|
6805
|
+
/* @__PURE__ */ jsx58("div", { className: "h-56 w-16 overflow-y-auto overscroll-y-contain [-webkit-overflow-scrolling:touch]", children: /* @__PURE__ */ jsx58(
|
|
6195
6806
|
"div",
|
|
6196
6807
|
{
|
|
6197
6808
|
ref: minutesRef,
|
|
@@ -6199,7 +6810,7 @@ function TimeInput({
|
|
|
6199
6810
|
"flex flex-col p-1",
|
|
6200
6811
|
minutesList.length <= 12 && "h-full justify-center"
|
|
6201
6812
|
),
|
|
6202
|
-
children: minutesList.map((m) => /* @__PURE__ */
|
|
6813
|
+
children: minutesList.map((m) => /* @__PURE__ */ jsx58(
|
|
6203
6814
|
Button,
|
|
6204
6815
|
{
|
|
6205
6816
|
variant: "ghost",
|
|
@@ -6216,7 +6827,7 @@ function TimeInput({
|
|
|
6216
6827
|
))
|
|
6217
6828
|
}
|
|
6218
6829
|
) }),
|
|
6219
|
-
!is24HourFormat(timeFormat) && /* @__PURE__ */
|
|
6830
|
+
!is24HourFormat(timeFormat) && /* @__PURE__ */ jsx58("div", { className: "flex flex-col p-1 justify-center gap-1", children: ["AM", "PM"].map((p) => /* @__PURE__ */ jsx58(
|
|
6220
6831
|
Button,
|
|
6221
6832
|
{
|
|
6222
6833
|
variant: "ghost",
|
|
@@ -6241,7 +6852,7 @@ function TimeInput({
|
|
|
6241
6852
|
import "react";
|
|
6242
6853
|
import * as TogglePrimitive from "@radix-ui/react-toggle";
|
|
6243
6854
|
import { cva as cva13 } from "class-variance-authority";
|
|
6244
|
-
import { jsx as
|
|
6855
|
+
import { jsx as jsx59 } from "react/jsx-runtime";
|
|
6245
6856
|
var toggleVariants = cva13(
|
|
6246
6857
|
"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
6858
|
{
|
|
@@ -6268,7 +6879,7 @@ function Toggle({
|
|
|
6268
6879
|
size,
|
|
6269
6880
|
...props
|
|
6270
6881
|
}) {
|
|
6271
|
-
return /* @__PURE__ */
|
|
6882
|
+
return /* @__PURE__ */ jsx59(
|
|
6272
6883
|
TogglePrimitive.Root,
|
|
6273
6884
|
{
|
|
6274
6885
|
"data-slot": "toggle",
|
|
@@ -6279,11 +6890,11 @@ function Toggle({
|
|
|
6279
6890
|
}
|
|
6280
6891
|
|
|
6281
6892
|
// src/components/ui/toggle-group.tsx
|
|
6282
|
-
import * as
|
|
6893
|
+
import * as React56 from "react";
|
|
6283
6894
|
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
|
|
6284
6895
|
import "class-variance-authority";
|
|
6285
|
-
import { jsx as
|
|
6286
|
-
var ToggleGroupContext =
|
|
6896
|
+
import { jsx as jsx60 } from "react/jsx-runtime";
|
|
6897
|
+
var ToggleGroupContext = React56.createContext({
|
|
6287
6898
|
size: "default",
|
|
6288
6899
|
variant: "default"
|
|
6289
6900
|
});
|
|
@@ -6294,7 +6905,7 @@ function ToggleGroup({
|
|
|
6294
6905
|
children,
|
|
6295
6906
|
...props
|
|
6296
6907
|
}) {
|
|
6297
|
-
return /* @__PURE__ */
|
|
6908
|
+
return /* @__PURE__ */ jsx60(
|
|
6298
6909
|
ToggleGroupPrimitive.Root,
|
|
6299
6910
|
{
|
|
6300
6911
|
"data-slot": "toggle-group",
|
|
@@ -6305,7 +6916,7 @@ function ToggleGroup({
|
|
|
6305
6916
|
className
|
|
6306
6917
|
),
|
|
6307
6918
|
...props,
|
|
6308
|
-
children: /* @__PURE__ */
|
|
6919
|
+
children: /* @__PURE__ */ jsx60(ToggleGroupContext.Provider, { value: { variant, size }, children })
|
|
6309
6920
|
}
|
|
6310
6921
|
);
|
|
6311
6922
|
}
|
|
@@ -6316,8 +6927,8 @@ function ToggleGroupItem({
|
|
|
6316
6927
|
size,
|
|
6317
6928
|
...props
|
|
6318
6929
|
}) {
|
|
6319
|
-
const context =
|
|
6320
|
-
return /* @__PURE__ */
|
|
6930
|
+
const context = React56.useContext(ToggleGroupContext);
|
|
6931
|
+
return /* @__PURE__ */ jsx60(
|
|
6321
6932
|
ToggleGroupPrimitive.Item,
|
|
6322
6933
|
{
|
|
6323
6934
|
"data-slot": "toggle-group-item",
|
|
@@ -6341,7 +6952,7 @@ function ToggleGroupItem({
|
|
|
6341
6952
|
import { Slot as Slot7 } from "@radix-ui/react-slot";
|
|
6342
6953
|
import { cva as cva14 } from "class-variance-authority";
|
|
6343
6954
|
import "react";
|
|
6344
|
-
import { jsx as
|
|
6955
|
+
import { jsx as jsx61 } from "react/jsx-runtime";
|
|
6345
6956
|
var displayTextVariants = cva14(
|
|
6346
6957
|
"tracking-normal font-normal leading-none text-brand-dark font-serif italic",
|
|
6347
6958
|
{
|
|
@@ -6364,7 +6975,7 @@ function DisplayHeading({
|
|
|
6364
6975
|
...props
|
|
6365
6976
|
}) {
|
|
6366
6977
|
const Comp = asChild ? Slot7 : "h1";
|
|
6367
|
-
return /* @__PURE__ */
|
|
6978
|
+
return /* @__PURE__ */ jsx61(
|
|
6368
6979
|
Comp,
|
|
6369
6980
|
{
|
|
6370
6981
|
"data-slot": "h1",
|
|
@@ -6393,7 +7004,7 @@ function Body({
|
|
|
6393
7004
|
...props
|
|
6394
7005
|
}) {
|
|
6395
7006
|
const Comp = asChild ? Slot7 : "p";
|
|
6396
|
-
return /* @__PURE__ */
|
|
7007
|
+
return /* @__PURE__ */ jsx61(
|
|
6397
7008
|
Comp,
|
|
6398
7009
|
{
|
|
6399
7010
|
"data-slot": "h1",
|
|
@@ -6408,7 +7019,7 @@ function HeadingXL({
|
|
|
6408
7019
|
...props
|
|
6409
7020
|
}) {
|
|
6410
7021
|
const Comp = asChild ? Slot7 : "h1";
|
|
6411
|
-
return /* @__PURE__ */
|
|
7022
|
+
return /* @__PURE__ */ jsx61(
|
|
6412
7023
|
Comp,
|
|
6413
7024
|
{
|
|
6414
7025
|
"data-slot": "h1",
|
|
@@ -6426,7 +7037,7 @@ function HeadingL({
|
|
|
6426
7037
|
...props
|
|
6427
7038
|
}) {
|
|
6428
7039
|
const Comp = asChild ? Slot7 : "h2";
|
|
6429
|
-
return /* @__PURE__ */
|
|
7040
|
+
return /* @__PURE__ */ jsx61(
|
|
6430
7041
|
Comp,
|
|
6431
7042
|
{
|
|
6432
7043
|
"data-slot": "h2",
|
|
@@ -6444,7 +7055,7 @@ function HeadingM({
|
|
|
6444
7055
|
...props
|
|
6445
7056
|
}) {
|
|
6446
7057
|
const Comp = asChild ? Slot7 : "h3";
|
|
6447
|
-
return /* @__PURE__ */
|
|
7058
|
+
return /* @__PURE__ */ jsx61(
|
|
6448
7059
|
Comp,
|
|
6449
7060
|
{
|
|
6450
7061
|
"data-slot": "h3",
|
|
@@ -6462,7 +7073,7 @@ function HeadingS({
|
|
|
6462
7073
|
...props
|
|
6463
7074
|
}) {
|
|
6464
7075
|
const Comp = asChild ? Slot7 : "h4";
|
|
6465
|
-
return /* @__PURE__ */
|
|
7076
|
+
return /* @__PURE__ */ jsx61(
|
|
6466
7077
|
Comp,
|
|
6467
7078
|
{
|
|
6468
7079
|
"data-slot": "h4",
|
|
@@ -6480,7 +7091,7 @@ function HeadingXS({
|
|
|
6480
7091
|
...props
|
|
6481
7092
|
}) {
|
|
6482
7093
|
const Comp = asChild ? Slot7 : "h5";
|
|
6483
|
-
return /* @__PURE__ */
|
|
7094
|
+
return /* @__PURE__ */ jsx61(
|
|
6484
7095
|
Comp,
|
|
6485
7096
|
{
|
|
6486
7097
|
"data-slot": "h5",
|
|
@@ -6498,7 +7109,7 @@ function HeadingXXS({
|
|
|
6498
7109
|
...props
|
|
6499
7110
|
}) {
|
|
6500
7111
|
const Comp = asChild ? Slot7 : "h6";
|
|
6501
|
-
return /* @__PURE__ */
|
|
7112
|
+
return /* @__PURE__ */ jsx61(
|
|
6502
7113
|
Comp,
|
|
6503
7114
|
{
|
|
6504
7115
|
"data-slot": "h5",
|
|
@@ -6639,6 +7250,11 @@ export {
|
|
|
6639
7250
|
DropdownMenuSubContent,
|
|
6640
7251
|
DropdownMenuSubTrigger,
|
|
6641
7252
|
DropdownMenuTrigger,
|
|
7253
|
+
DropdownSelect,
|
|
7254
|
+
DropdownSelectContent,
|
|
7255
|
+
DropdownSelectLabel,
|
|
7256
|
+
DropdownSelectOption,
|
|
7257
|
+
DropdownSelectTrigger,
|
|
6642
7258
|
Form,
|
|
6643
7259
|
FormControl,
|
|
6644
7260
|
FormDescription,
|
|
@@ -6677,6 +7293,7 @@ export {
|
|
|
6677
7293
|
MenubarSubContent,
|
|
6678
7294
|
MenubarSubTrigger,
|
|
6679
7295
|
MenubarTrigger,
|
|
7296
|
+
MultiSelectFreeText,
|
|
6680
7297
|
NavigationMenu,
|
|
6681
7298
|
NavigationMenuContent,
|
|
6682
7299
|
NavigationMenuIndicator,
|