@codapet/design-system 0.5.9 → 0.6.2
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 +45 -1
- package/dist/index.mjs +607 -202
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +80 -2
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -153,17 +153,17 @@ var buttonVariants = cva2(
|
|
|
153
153
|
{
|
|
154
154
|
variants: {
|
|
155
155
|
variant: {
|
|
156
|
-
primary: "bg-primary text-primary-foreground hover:bg-brand-dark active:bg-
|
|
156
|
+
primary: "bg-primary text-primary-foreground hover:bg-brand-dark active:bg-active-primary",
|
|
157
157
|
secondary: "bg-brand-subtle text-brand-vibrant hover:bg-primary-surface-light border border-brand-light active:bg-icon-disabled hover:border-transparent active:border-transparent",
|
|
158
|
-
tertiary: "bg-gray-surface-light text-
|
|
159
|
-
outline: "text-
|
|
160
|
-
ghost: "text-brand-vibrant hover:bg-primary-surface-subtle
|
|
161
|
-
"ghost-secondary": "text-
|
|
162
|
-
"ghost-destructive": "bg-transparent
|
|
163
|
-
link: "text-
|
|
164
|
-
destructive: "bg-error-surface-default text-
|
|
165
|
-
"destructive-secondary": "bg-error-surface-light
|
|
166
|
-
"destructive-tertiary": "bg-transparent border border-error-stroke-light text-
|
|
158
|
+
tertiary: "bg-gray-surface-light text-foreground-secondary hover:bg-gray-surface-default border border-gray-stroke-light active:bg-gray-surface-default",
|
|
159
|
+
outline: "text-foreground-secondary border border-gray-surface-default bg-background hover:bg-gray-surface-light hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 active:bg-gray-surface-default",
|
|
160
|
+
ghost: "text-brand-vibrant hover:bg-primary-surface-subtle dark:hover:bg-accent/50 active:bg-primary-surface-light",
|
|
161
|
+
"ghost-secondary": "text-foreground-secondary hover:bg-gray-surface-light hover:text-accent-foreground dark:hover:bg-accent/50 active:bg-gray-surface-default",
|
|
162
|
+
"ghost-destructive": "bg-transparent text-destructive-text hover:bg-destructive-hover focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 active:bg-destructive-active",
|
|
163
|
+
link: "text-foreground-secondary underline-offset-4 underline hover:bg-none active:bg-none hover:text-brand-vibrant",
|
|
164
|
+
destructive: "bg-error-surface-default text-primary-foreground hover:bg-destructive-bg-deep focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 active:bg-error-surface-dark",
|
|
165
|
+
"destructive-secondary": "bg-error-surface-light border border-error-stroke-light text-destructive-text hover:border-error-surface-default focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 active:bg-destructive-active",
|
|
166
|
+
"destructive-tertiary": "bg-transparent border border-error-stroke-light text-destructive-text hover:bg-destructive-hover focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 active:bg-destructive-active"
|
|
167
167
|
},
|
|
168
168
|
size: {
|
|
169
169
|
md: "h-10 px-4 py-2 has-[>svg]:px-3 text-lg",
|
|
@@ -353,10 +353,10 @@ var textareaBaseStyles = [
|
|
|
353
353
|
// Responsive text size
|
|
354
354
|
"md:text-sm",
|
|
355
355
|
// Default state
|
|
356
|
-
"border-
|
|
356
|
+
"border-border-default bg-background",
|
|
357
357
|
// Hover/Focus/Active states
|
|
358
358
|
"hover:border-brand-normal",
|
|
359
|
-
"focus:border-
|
|
359
|
+
"focus:border-focus-ring",
|
|
360
360
|
"active:border-brand-normal",
|
|
361
361
|
// Textarea specific
|
|
362
362
|
"field-sizing-content min-h-16 resize-y px-3 py-2"
|
|
@@ -508,7 +508,7 @@ var badgeVariants = cva3(
|
|
|
508
508
|
variant: {
|
|
509
509
|
default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
|
|
510
510
|
secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
|
|
511
|
-
destructive: "border-transparent bg-destructive text-
|
|
511
|
+
destructive: "border-transparent bg-destructive text-primary-foreground [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40",
|
|
512
512
|
outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"
|
|
513
513
|
}
|
|
514
514
|
},
|
|
@@ -712,7 +712,7 @@ function Calendar({
|
|
|
712
712
|
classNames?.weekdays
|
|
713
713
|
),
|
|
714
714
|
weekday: cn(
|
|
715
|
-
"text-
|
|
715
|
+
"text-muted-foreground font-medium rounded-full md:flex-1 size-6 mx-1 font-normal text-[0.8rem] select-none",
|
|
716
716
|
classNames?.weekday
|
|
717
717
|
),
|
|
718
718
|
week: cn(
|
|
@@ -805,7 +805,7 @@ function CalendarDayButton({
|
|
|
805
805
|
"data-range-end": modifiers.range_end,
|
|
806
806
|
"data-range-middle": modifiers.range_middle,
|
|
807
807
|
className: cn(
|
|
808
|
-
"data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-
|
|
808
|
+
"data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-range-middle-bg data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 dark:hover:text-accent-foreground flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none md:font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] [&>span]:text-xs [&>span]:opacity-70 md:p-0 rounded-full md:text-base text-sm font-medium text-foreground data-[range-middle=true]:rounded-md",
|
|
809
809
|
className
|
|
810
810
|
),
|
|
811
811
|
...props
|
|
@@ -1898,7 +1898,7 @@ import { jsx as jsx20, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
|
1898
1898
|
var inputVariants = cva4(
|
|
1899
1899
|
[
|
|
1900
1900
|
// Base styles
|
|
1901
|
-
"file:text-
|
|
1901
|
+
"file:text-foreground-secondary placeholder:text-gray-subtle selection:bg-primary selection:text-primary-foreground",
|
|
1902
1902
|
"flex w-full min-w-0 rounded-md border bg-transparent text-base transition-all duration-400",
|
|
1903
1903
|
"outline-none font-sans",
|
|
1904
1904
|
// File input styles
|
|
@@ -1908,11 +1908,11 @@ var inputVariants = cva4(
|
|
|
1908
1908
|
// Responsive text size
|
|
1909
1909
|
"md:text-sm",
|
|
1910
1910
|
// Default state
|
|
1911
|
-
"border-
|
|
1911
|
+
"border-border-default bg-background",
|
|
1912
1912
|
// Hover state
|
|
1913
1913
|
"hover:border-primary-stroke-default",
|
|
1914
1914
|
// Focus state
|
|
1915
|
-
"focus:border-
|
|
1915
|
+
"focus:border-focus-ring",
|
|
1916
1916
|
"active:border-brand-normal"
|
|
1917
1917
|
],
|
|
1918
1918
|
{
|
|
@@ -1973,7 +1973,7 @@ var Input = React18.forwardRef(
|
|
|
1973
1973
|
className: cn(
|
|
1974
1974
|
"pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 flex items-center justify-center",
|
|
1975
1975
|
"transition-colors stroke-[1.5px]",
|
|
1976
|
-
error ? "text-destructive peer-hover:text-destructive peer-focus:text-destructive peer-active:text-destructive" : "text-muted-foreground peer-hover:text-brand-normal peer-focus:text-
|
|
1976
|
+
error ? "text-destructive peer-hover:text-destructive peer-focus:text-destructive peer-active:text-destructive" : "text-muted-foreground peer-hover:text-brand-normal peer-focus:text-focus-ring peer-active:text-brand-normal",
|
|
1977
1977
|
leftIconClassName
|
|
1978
1978
|
),
|
|
1979
1979
|
children: React18.isValidElement(leftIcon) ? (() => {
|
|
@@ -1993,7 +1993,7 @@ var Input = React18.forwardRef(
|
|
|
1993
1993
|
className: cn(
|
|
1994
1994
|
"absolute right-3 top-1/2 -translate-y-1/2 flex items-center justify-center",
|
|
1995
1995
|
"h-6 w-6 rounded-sm transition-colors",
|
|
1996
|
-
error ? "text-destructive hover:text-destructive focus:text-destructive" : "text-muted-foreground hover:text-brand-normal focus:text-
|
|
1996
|
+
error ? "text-destructive hover:text-destructive focus:text-destructive" : "text-muted-foreground hover:text-brand-normal focus:text-focus-ring",
|
|
1997
1997
|
rightIconClassName
|
|
1998
1998
|
),
|
|
1999
1999
|
"aria-label": "Input action",
|
|
@@ -2358,7 +2358,7 @@ function DateInput({
|
|
|
2358
2358
|
placeholder: resolvedPlaceholder,
|
|
2359
2359
|
className: cn(
|
|
2360
2360
|
"bg-background cursor-pointer",
|
|
2361
|
-
"group-data-[state=open]:border-
|
|
2361
|
+
"group-data-[state=open]:border-focus-ring group-data-[state=open]:hover:border-focus-ring",
|
|
2362
2362
|
inputClassName
|
|
2363
2363
|
),
|
|
2364
2364
|
onChange: handleInputChange,
|
|
@@ -2384,7 +2384,7 @@ function DateInput({
|
|
|
2384
2384
|
popoverContentClassName
|
|
2385
2385
|
),
|
|
2386
2386
|
...popoverContentProps,
|
|
2387
|
-
children: /* @__PURE__ */ jsx22("div", { className: "border border-
|
|
2387
|
+
children: /* @__PURE__ */ jsx22("div", { className: "border border-focus-ring h-full w-full rounded-md", children: /* @__PURE__ */ jsx22(Calendar, { ...resolvedCalendarProps }) })
|
|
2388
2388
|
}
|
|
2389
2389
|
)
|
|
2390
2390
|
] }) });
|
|
@@ -2581,7 +2581,7 @@ function DateRangeInput({
|
|
|
2581
2581
|
className: cn(
|
|
2582
2582
|
inputVariants({ size }),
|
|
2583
2583
|
"bg-background cursor-pointer w-full text-left flex items-center justify-between gap-2 font-normal",
|
|
2584
|
-
"data-[state=open]:border-
|
|
2584
|
+
"data-[state=open]:border-focus-ring data-[state=open]:hover:border-focus-ring",
|
|
2585
2585
|
isInputDisabled && "pointer-events-none cursor-not-allowed opacity-50",
|
|
2586
2586
|
inputClassName
|
|
2587
2587
|
),
|
|
@@ -2600,7 +2600,7 @@ function DateRangeInput({
|
|
|
2600
2600
|
popoverContentClassName
|
|
2601
2601
|
),
|
|
2602
2602
|
...popoverContentProps,
|
|
2603
|
-
children: /* @__PURE__ */ jsxs11("div", { className: "border border-
|
|
2603
|
+
children: /* @__PURE__ */ jsxs11("div", { className: "border border-focus-ring h-full w-full rounded-md flex flex-col overflow-y-auto justify-between", children: [
|
|
2604
2604
|
/* @__PURE__ */ jsx23(Calendar, { ...resolvedCalendarProps }),
|
|
2605
2605
|
/* @__PURE__ */ jsxs11("div", { className: "flex flex-col gap-2 px-2 pb-1 shrink-0", children: [
|
|
2606
2606
|
/* @__PURE__ */ jsx23(
|
|
@@ -3896,25 +3896,366 @@ function ScrollBar({
|
|
|
3896
3896
|
);
|
|
3897
3897
|
}
|
|
3898
3898
|
|
|
3899
|
+
// src/components/ui/searchable-select.tsx
|
|
3900
|
+
import * as React35 from "react";
|
|
3901
|
+
import { CheckIcon as CheckIcon4, ChevronsUpDown, XIcon as XIcon2 } from "lucide-react";
|
|
3902
|
+
import { jsx as jsx37, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
3903
|
+
var SearchableSelectContext = React35.createContext(null);
|
|
3904
|
+
function useSearchableSelect() {
|
|
3905
|
+
const ctx = React35.useContext(SearchableSelectContext);
|
|
3906
|
+
if (!ctx) {
|
|
3907
|
+
throw new Error(
|
|
3908
|
+
"SearchableSelect compound components must be used within <SearchableSelect>"
|
|
3909
|
+
);
|
|
3910
|
+
}
|
|
3911
|
+
return ctx;
|
|
3912
|
+
}
|
|
3913
|
+
function SearchableSelect({
|
|
3914
|
+
mode = "single",
|
|
3915
|
+
value: controlledValue,
|
|
3916
|
+
defaultValue = "",
|
|
3917
|
+
onValueChange,
|
|
3918
|
+
values: controlledValues,
|
|
3919
|
+
defaultValues = [],
|
|
3920
|
+
onValuesChange,
|
|
3921
|
+
searchable = true,
|
|
3922
|
+
searchPlaceholder = "Search...",
|
|
3923
|
+
placeholder = "Select...",
|
|
3924
|
+
disabled = false,
|
|
3925
|
+
maxCount = Infinity,
|
|
3926
|
+
options = [],
|
|
3927
|
+
open: controlledOpen,
|
|
3928
|
+
onOpenChange,
|
|
3929
|
+
children
|
|
3930
|
+
}) {
|
|
3931
|
+
const [internalOpen, setInternalOpen] = React35.useState(false);
|
|
3932
|
+
const [internalValue, setInternalValue] = React35.useState(defaultValue);
|
|
3933
|
+
const [internalValues, setInternalValues] = React35.useState(defaultValues);
|
|
3934
|
+
const open = controlledOpen ?? internalOpen;
|
|
3935
|
+
const setOpen = React35.useCallback(
|
|
3936
|
+
(next) => {
|
|
3937
|
+
if (controlledOpen !== void 0) {
|
|
3938
|
+
onOpenChange?.(next);
|
|
3939
|
+
} else {
|
|
3940
|
+
setInternalOpen(next);
|
|
3941
|
+
onOpenChange?.(next);
|
|
3942
|
+
}
|
|
3943
|
+
},
|
|
3944
|
+
[controlledOpen, onOpenChange]
|
|
3945
|
+
);
|
|
3946
|
+
const value = controlledValue ?? internalValue;
|
|
3947
|
+
const setValue = React35.useCallback(
|
|
3948
|
+
(next) => {
|
|
3949
|
+
if (controlledValue === void 0) {
|
|
3950
|
+
setInternalValue(next);
|
|
3951
|
+
}
|
|
3952
|
+
onValueChange?.(next);
|
|
3953
|
+
},
|
|
3954
|
+
[controlledValue, onValueChange]
|
|
3955
|
+
);
|
|
3956
|
+
const values = controlledValues ?? internalValues;
|
|
3957
|
+
const setValues = React35.useCallback(
|
|
3958
|
+
(next) => {
|
|
3959
|
+
if (controlledValues === void 0) {
|
|
3960
|
+
setInternalValues(next);
|
|
3961
|
+
}
|
|
3962
|
+
onValuesChange?.(next);
|
|
3963
|
+
},
|
|
3964
|
+
[controlledValues, onValuesChange]
|
|
3965
|
+
);
|
|
3966
|
+
const optionMap = React35.useMemo(() => {
|
|
3967
|
+
const map = /* @__PURE__ */ new Map();
|
|
3968
|
+
for (const opt of options) {
|
|
3969
|
+
map.set(opt.value, opt.label);
|
|
3970
|
+
}
|
|
3971
|
+
return map;
|
|
3972
|
+
}, [options]);
|
|
3973
|
+
const ctx = React35.useMemo(
|
|
3974
|
+
() => ({
|
|
3975
|
+
open,
|
|
3976
|
+
setOpen,
|
|
3977
|
+
mode,
|
|
3978
|
+
value,
|
|
3979
|
+
setValue,
|
|
3980
|
+
values,
|
|
3981
|
+
setValues,
|
|
3982
|
+
searchable,
|
|
3983
|
+
searchPlaceholder,
|
|
3984
|
+
placeholder,
|
|
3985
|
+
disabled,
|
|
3986
|
+
maxCount,
|
|
3987
|
+
options,
|
|
3988
|
+
optionMap
|
|
3989
|
+
}),
|
|
3990
|
+
[
|
|
3991
|
+
open,
|
|
3992
|
+
setOpen,
|
|
3993
|
+
mode,
|
|
3994
|
+
value,
|
|
3995
|
+
setValue,
|
|
3996
|
+
values,
|
|
3997
|
+
setValues,
|
|
3998
|
+
searchable,
|
|
3999
|
+
searchPlaceholder,
|
|
4000
|
+
placeholder,
|
|
4001
|
+
disabled,
|
|
4002
|
+
maxCount,
|
|
4003
|
+
options,
|
|
4004
|
+
optionMap
|
|
4005
|
+
]
|
|
4006
|
+
);
|
|
4007
|
+
return /* @__PURE__ */ jsx37(SearchableSelectContext.Provider, { value: ctx, children: /* @__PURE__ */ jsx37(Popover, { open, onOpenChange: setOpen, children }) });
|
|
4008
|
+
}
|
|
4009
|
+
function SearchableSelectTrigger({
|
|
4010
|
+
className,
|
|
4011
|
+
size = "default",
|
|
4012
|
+
children,
|
|
4013
|
+
...props
|
|
4014
|
+
}) {
|
|
4015
|
+
const ctx = useSearchableSelect();
|
|
4016
|
+
const renderContent = () => {
|
|
4017
|
+
if (children) return children;
|
|
4018
|
+
if (ctx.mode === "single") {
|
|
4019
|
+
const label = ctx.optionMap.get(ctx.value);
|
|
4020
|
+
return /* @__PURE__ */ jsx37(
|
|
4021
|
+
"span",
|
|
4022
|
+
{
|
|
4023
|
+
"data-slot": "searchable-select-value",
|
|
4024
|
+
className: cn(
|
|
4025
|
+
"truncate",
|
|
4026
|
+
!label && "text-muted-foreground"
|
|
4027
|
+
),
|
|
4028
|
+
children: label || ctx.placeholder
|
|
4029
|
+
}
|
|
4030
|
+
);
|
|
4031
|
+
}
|
|
4032
|
+
if (ctx.values.length === 0) {
|
|
4033
|
+
return /* @__PURE__ */ jsx37(
|
|
4034
|
+
"span",
|
|
4035
|
+
{
|
|
4036
|
+
"data-slot": "searchable-select-value",
|
|
4037
|
+
className: "text-muted-foreground",
|
|
4038
|
+
children: ctx.placeholder
|
|
4039
|
+
}
|
|
4040
|
+
);
|
|
4041
|
+
}
|
|
4042
|
+
const visible = ctx.values.slice(0, ctx.maxCount);
|
|
4043
|
+
const remaining = ctx.values.length - visible.length;
|
|
4044
|
+
return /* @__PURE__ */ jsxs19(
|
|
4045
|
+
"span",
|
|
4046
|
+
{
|
|
4047
|
+
"data-slot": "searchable-select-value",
|
|
4048
|
+
className: "flex flex-wrap items-center gap-1",
|
|
4049
|
+
children: [
|
|
4050
|
+
visible.map((v) => /* @__PURE__ */ jsxs19(
|
|
4051
|
+
Badge,
|
|
4052
|
+
{
|
|
4053
|
+
variant: "secondary",
|
|
4054
|
+
className: "gap-1 pr-1",
|
|
4055
|
+
children: [
|
|
4056
|
+
/* @__PURE__ */ jsx37("span", { className: "truncate max-w-[120px]", children: ctx.optionMap.get(v) || v }),
|
|
4057
|
+
/* @__PURE__ */ jsx37(
|
|
4058
|
+
"span",
|
|
4059
|
+
{
|
|
4060
|
+
role: "button",
|
|
4061
|
+
tabIndex: -1,
|
|
4062
|
+
"aria-label": `Remove ${ctx.optionMap.get(v) || v}`,
|
|
4063
|
+
className: "rounded-sm hover:bg-muted cursor-pointer",
|
|
4064
|
+
onPointerDown: (e) => e.preventDefault(),
|
|
4065
|
+
onClick: (e) => {
|
|
4066
|
+
e.stopPropagation();
|
|
4067
|
+
ctx.setValues(ctx.values.filter((val) => val !== v));
|
|
4068
|
+
},
|
|
4069
|
+
children: /* @__PURE__ */ jsx37(XIcon2, { className: "size-3" })
|
|
4070
|
+
}
|
|
4071
|
+
)
|
|
4072
|
+
]
|
|
4073
|
+
},
|
|
4074
|
+
v
|
|
4075
|
+
)),
|
|
4076
|
+
remaining > 0 && /* @__PURE__ */ jsxs19(Badge, { variant: "outline", className: "text-muted-foreground", children: [
|
|
4077
|
+
"+",
|
|
4078
|
+
remaining,
|
|
4079
|
+
" more"
|
|
4080
|
+
] })
|
|
4081
|
+
]
|
|
4082
|
+
}
|
|
4083
|
+
);
|
|
4084
|
+
};
|
|
4085
|
+
return /* @__PURE__ */ jsxs19(
|
|
4086
|
+
PopoverTrigger,
|
|
4087
|
+
{
|
|
4088
|
+
"data-slot": "searchable-select-trigger",
|
|
4089
|
+
"data-size": size,
|
|
4090
|
+
disabled: ctx.disabled,
|
|
4091
|
+
className: cn(
|
|
4092
|
+
"border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:min-h-9 data-[size=sm]:min-h-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
4093
|
+
ctx.mode === "multiple" && "h-auto flex-wrap whitespace-normal",
|
|
4094
|
+
className
|
|
4095
|
+
),
|
|
4096
|
+
...props,
|
|
4097
|
+
children: [
|
|
4098
|
+
renderContent(),
|
|
4099
|
+
/* @__PURE__ */ jsx37(ChevronsUpDown, { className: "size-4 shrink-0 opacity-50" })
|
|
4100
|
+
]
|
|
4101
|
+
}
|
|
4102
|
+
);
|
|
4103
|
+
}
|
|
4104
|
+
function SearchableSelectContent({
|
|
4105
|
+
className,
|
|
4106
|
+
children,
|
|
4107
|
+
emptyText = "No results found.",
|
|
4108
|
+
...props
|
|
4109
|
+
}) {
|
|
4110
|
+
const ctx = useSearchableSelect();
|
|
4111
|
+
const groupedOptions = React35.useMemo(() => {
|
|
4112
|
+
if (ctx.options.length === 0) return null;
|
|
4113
|
+
const groups = /* @__PURE__ */ new Map();
|
|
4114
|
+
for (const opt of ctx.options) {
|
|
4115
|
+
const key = opt.group || "";
|
|
4116
|
+
if (!groups.has(key)) groups.set(key, []);
|
|
4117
|
+
groups.get(key).push(opt);
|
|
4118
|
+
}
|
|
4119
|
+
return groups;
|
|
4120
|
+
}, [ctx.options]);
|
|
4121
|
+
const renderAutoItems = () => {
|
|
4122
|
+
if (!groupedOptions) return null;
|
|
4123
|
+
const entries = Array.from(groupedOptions.entries());
|
|
4124
|
+
if (entries.length === 1 && entries[0][0] === "") {
|
|
4125
|
+
return entries[0][1].map((opt) => /* @__PURE__ */ jsx37(
|
|
4126
|
+
SearchableSelectItem,
|
|
4127
|
+
{
|
|
4128
|
+
value: opt.value,
|
|
4129
|
+
disabled: opt.disabled,
|
|
4130
|
+
children: opt.label
|
|
4131
|
+
},
|
|
4132
|
+
opt.value
|
|
4133
|
+
));
|
|
4134
|
+
}
|
|
4135
|
+
return entries.map(([group, opts]) => /* @__PURE__ */ jsx37(SearchableSelectGroup, { heading: group || void 0, children: opts.map((opt) => /* @__PURE__ */ jsx37(
|
|
4136
|
+
SearchableSelectItem,
|
|
4137
|
+
{
|
|
4138
|
+
value: opt.value,
|
|
4139
|
+
disabled: opt.disabled,
|
|
4140
|
+
children: opt.label
|
|
4141
|
+
},
|
|
4142
|
+
opt.value
|
|
4143
|
+
)) }, group));
|
|
4144
|
+
};
|
|
4145
|
+
return /* @__PURE__ */ jsx37(
|
|
4146
|
+
PopoverContent,
|
|
4147
|
+
{
|
|
4148
|
+
"data-slot": "searchable-select-content",
|
|
4149
|
+
className: cn("w-[var(--radix-popover-trigger-width)] p-0", className),
|
|
4150
|
+
align: "start",
|
|
4151
|
+
...props,
|
|
4152
|
+
children: /* @__PURE__ */ jsxs19(Command, { children: [
|
|
4153
|
+
ctx.searchable && /* @__PURE__ */ jsx37(CommandInput, { placeholder: ctx.searchPlaceholder }),
|
|
4154
|
+
/* @__PURE__ */ jsxs19(CommandList, { children: [
|
|
4155
|
+
/* @__PURE__ */ jsx37(CommandEmpty, { children: emptyText }),
|
|
4156
|
+
children || renderAutoItems()
|
|
4157
|
+
] })
|
|
4158
|
+
] })
|
|
4159
|
+
}
|
|
4160
|
+
);
|
|
4161
|
+
}
|
|
4162
|
+
function SearchableSelectItem({
|
|
4163
|
+
className,
|
|
4164
|
+
value,
|
|
4165
|
+
children,
|
|
4166
|
+
disabled,
|
|
4167
|
+
...props
|
|
4168
|
+
}) {
|
|
4169
|
+
const ctx = useSearchableSelect();
|
|
4170
|
+
const isSelected = ctx.mode === "single" ? ctx.value === value : ctx.values.includes(value);
|
|
4171
|
+
const handleSelect = () => {
|
|
4172
|
+
if (disabled) return;
|
|
4173
|
+
if (ctx.mode === "single") {
|
|
4174
|
+
ctx.setValue(value === ctx.value ? "" : value);
|
|
4175
|
+
ctx.setOpen(false);
|
|
4176
|
+
} else {
|
|
4177
|
+
ctx.setValues(
|
|
4178
|
+
isSelected ? ctx.values.filter((v) => v !== value) : [...ctx.values, value]
|
|
4179
|
+
);
|
|
4180
|
+
}
|
|
4181
|
+
};
|
|
4182
|
+
return /* @__PURE__ */ jsxs19(
|
|
4183
|
+
CommandItem,
|
|
4184
|
+
{
|
|
4185
|
+
"data-slot": "searchable-select-item",
|
|
4186
|
+
className: cn(
|
|
4187
|
+
"relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none",
|
|
4188
|
+
ctx.mode === "multiple" && "pl-8",
|
|
4189
|
+
className
|
|
4190
|
+
),
|
|
4191
|
+
onSelect: handleSelect,
|
|
4192
|
+
"data-disabled": disabled || void 0,
|
|
4193
|
+
...props,
|
|
4194
|
+
children: [
|
|
4195
|
+
ctx.mode === "multiple" && /* @__PURE__ */ jsx37("span", { className: "absolute left-2 flex size-4 items-center justify-center", children: /* @__PURE__ */ jsx37(
|
|
4196
|
+
"span",
|
|
4197
|
+
{
|
|
4198
|
+
className: cn(
|
|
4199
|
+
"size-4 rounded-sm border border-primary transition-colors",
|
|
4200
|
+
isSelected ? "bg-primary text-primary-foreground" : "bg-transparent"
|
|
4201
|
+
),
|
|
4202
|
+
children: isSelected && /* @__PURE__ */ jsx37(CheckIcon4, { className: "size-4 p-0.5" })
|
|
4203
|
+
}
|
|
4204
|
+
) }),
|
|
4205
|
+
/* @__PURE__ */ jsx37("span", { className: "flex-1 truncate", children }),
|
|
4206
|
+
ctx.mode === "single" && isSelected && /* @__PURE__ */ jsx37("span", { className: "absolute right-2 flex size-4 items-center justify-center", children: /* @__PURE__ */ jsx37(CheckIcon4, { className: "size-4" }) })
|
|
4207
|
+
]
|
|
4208
|
+
}
|
|
4209
|
+
);
|
|
4210
|
+
}
|
|
4211
|
+
function SearchableSelectGroup({
|
|
4212
|
+
className,
|
|
4213
|
+
...props
|
|
4214
|
+
}) {
|
|
4215
|
+
return /* @__PURE__ */ jsx37(
|
|
4216
|
+
CommandGroup,
|
|
4217
|
+
{
|
|
4218
|
+
"data-slot": "searchable-select-group",
|
|
4219
|
+
className: cn(className),
|
|
4220
|
+
...props
|
|
4221
|
+
}
|
|
4222
|
+
);
|
|
4223
|
+
}
|
|
4224
|
+
function SearchableSelectEmpty({
|
|
4225
|
+
className,
|
|
4226
|
+
children = "No results found.",
|
|
4227
|
+
...props
|
|
4228
|
+
}) {
|
|
4229
|
+
return /* @__PURE__ */ jsx37(
|
|
4230
|
+
CommandEmpty,
|
|
4231
|
+
{
|
|
4232
|
+
"data-slot": "searchable-select-empty",
|
|
4233
|
+
className: cn(className),
|
|
4234
|
+
...props,
|
|
4235
|
+
children
|
|
4236
|
+
}
|
|
4237
|
+
);
|
|
4238
|
+
}
|
|
4239
|
+
|
|
3899
4240
|
// src/components/ui/select.tsx
|
|
3900
4241
|
import "react";
|
|
3901
4242
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
3902
|
-
import { CheckIcon as
|
|
3903
|
-
import { jsx as
|
|
4243
|
+
import { CheckIcon as CheckIcon5, ChevronDownIcon as ChevronDownIcon4, ChevronUpIcon } from "lucide-react";
|
|
4244
|
+
import { jsx as jsx38, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
3904
4245
|
function Select({
|
|
3905
4246
|
...props
|
|
3906
4247
|
}) {
|
|
3907
|
-
return /* @__PURE__ */
|
|
4248
|
+
return /* @__PURE__ */ jsx38(SelectPrimitive.Root, { "data-slot": "select", ...props });
|
|
3908
4249
|
}
|
|
3909
4250
|
function SelectGroup({
|
|
3910
4251
|
...props
|
|
3911
4252
|
}) {
|
|
3912
|
-
return /* @__PURE__ */
|
|
4253
|
+
return /* @__PURE__ */ jsx38(SelectPrimitive.Group, { "data-slot": "select-group", ...props });
|
|
3913
4254
|
}
|
|
3914
4255
|
function SelectValue({
|
|
3915
4256
|
...props
|
|
3916
4257
|
}) {
|
|
3917
|
-
return /* @__PURE__ */
|
|
4258
|
+
return /* @__PURE__ */ jsx38(SelectPrimitive.Value, { "data-slot": "select-value", ...props });
|
|
3918
4259
|
}
|
|
3919
4260
|
function SelectTrigger({
|
|
3920
4261
|
className,
|
|
@@ -3922,7 +4263,7 @@ function SelectTrigger({
|
|
|
3922
4263
|
children,
|
|
3923
4264
|
...props
|
|
3924
4265
|
}) {
|
|
3925
|
-
return /* @__PURE__ */
|
|
4266
|
+
return /* @__PURE__ */ jsxs20(
|
|
3926
4267
|
SelectPrimitive.Trigger,
|
|
3927
4268
|
{
|
|
3928
4269
|
"data-slot": "select-trigger",
|
|
@@ -3934,7 +4275,7 @@ function SelectTrigger({
|
|
|
3934
4275
|
...props,
|
|
3935
4276
|
children: [
|
|
3936
4277
|
children,
|
|
3937
|
-
/* @__PURE__ */
|
|
4278
|
+
/* @__PURE__ */ jsx38(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx38(ChevronDownIcon4, { className: "size-4 opacity-50" }) })
|
|
3938
4279
|
]
|
|
3939
4280
|
}
|
|
3940
4281
|
);
|
|
@@ -3945,7 +4286,7 @@ function SelectContent({
|
|
|
3945
4286
|
position = "popper",
|
|
3946
4287
|
...props
|
|
3947
4288
|
}) {
|
|
3948
|
-
return /* @__PURE__ */
|
|
4289
|
+
return /* @__PURE__ */ jsx38(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs20(
|
|
3949
4290
|
SelectPrimitive.Content,
|
|
3950
4291
|
{
|
|
3951
4292
|
"data-slot": "select-content",
|
|
@@ -3957,8 +4298,8 @@ function SelectContent({
|
|
|
3957
4298
|
position,
|
|
3958
4299
|
...props,
|
|
3959
4300
|
children: [
|
|
3960
|
-
/* @__PURE__ */
|
|
3961
|
-
/* @__PURE__ */
|
|
4301
|
+
/* @__PURE__ */ jsx38(SelectScrollUpButton, {}),
|
|
4302
|
+
/* @__PURE__ */ jsx38(
|
|
3962
4303
|
SelectPrimitive.Viewport,
|
|
3963
4304
|
{
|
|
3964
4305
|
className: cn(
|
|
@@ -3968,7 +4309,7 @@ function SelectContent({
|
|
|
3968
4309
|
children
|
|
3969
4310
|
}
|
|
3970
4311
|
),
|
|
3971
|
-
/* @__PURE__ */
|
|
4312
|
+
/* @__PURE__ */ jsx38(SelectScrollDownButton, {})
|
|
3972
4313
|
]
|
|
3973
4314
|
}
|
|
3974
4315
|
) });
|
|
@@ -3977,7 +4318,7 @@ function SelectLabel({
|
|
|
3977
4318
|
className,
|
|
3978
4319
|
...props
|
|
3979
4320
|
}) {
|
|
3980
|
-
return /* @__PURE__ */
|
|
4321
|
+
return /* @__PURE__ */ jsx38(
|
|
3981
4322
|
SelectPrimitive.Label,
|
|
3982
4323
|
{
|
|
3983
4324
|
"data-slot": "select-label",
|
|
@@ -3991,7 +4332,7 @@ function SelectItem({
|
|
|
3991
4332
|
children,
|
|
3992
4333
|
...props
|
|
3993
4334
|
}) {
|
|
3994
|
-
return /* @__PURE__ */
|
|
4335
|
+
return /* @__PURE__ */ jsxs20(
|
|
3995
4336
|
SelectPrimitive.Item,
|
|
3996
4337
|
{
|
|
3997
4338
|
"data-slot": "select-item",
|
|
@@ -4001,8 +4342,8 @@ function SelectItem({
|
|
|
4001
4342
|
),
|
|
4002
4343
|
...props,
|
|
4003
4344
|
children: [
|
|
4004
|
-
/* @__PURE__ */
|
|
4005
|
-
/* @__PURE__ */
|
|
4345
|
+
/* @__PURE__ */ jsx38("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx38(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx38(CheckIcon5, { className: "size-4" }) }) }),
|
|
4346
|
+
/* @__PURE__ */ jsx38(SelectPrimitive.ItemText, { children })
|
|
4006
4347
|
]
|
|
4007
4348
|
}
|
|
4008
4349
|
);
|
|
@@ -4011,7 +4352,7 @@ function SelectSeparator({
|
|
|
4011
4352
|
className,
|
|
4012
4353
|
...props
|
|
4013
4354
|
}) {
|
|
4014
|
-
return /* @__PURE__ */
|
|
4355
|
+
return /* @__PURE__ */ jsx38(
|
|
4015
4356
|
SelectPrimitive.Separator,
|
|
4016
4357
|
{
|
|
4017
4358
|
"data-slot": "select-separator",
|
|
@@ -4024,7 +4365,7 @@ function SelectScrollUpButton({
|
|
|
4024
4365
|
className,
|
|
4025
4366
|
...props
|
|
4026
4367
|
}) {
|
|
4027
|
-
return /* @__PURE__ */
|
|
4368
|
+
return /* @__PURE__ */ jsx38(
|
|
4028
4369
|
SelectPrimitive.ScrollUpButton,
|
|
4029
4370
|
{
|
|
4030
4371
|
"data-slot": "select-scroll-up-button",
|
|
@@ -4033,7 +4374,7 @@ function SelectScrollUpButton({
|
|
|
4033
4374
|
className
|
|
4034
4375
|
),
|
|
4035
4376
|
...props,
|
|
4036
|
-
children: /* @__PURE__ */
|
|
4377
|
+
children: /* @__PURE__ */ jsx38(ChevronUpIcon, { className: "size-4" })
|
|
4037
4378
|
}
|
|
4038
4379
|
);
|
|
4039
4380
|
}
|
|
@@ -4041,7 +4382,7 @@ function SelectScrollDownButton({
|
|
|
4041
4382
|
className,
|
|
4042
4383
|
...props
|
|
4043
4384
|
}) {
|
|
4044
|
-
return /* @__PURE__ */
|
|
4385
|
+
return /* @__PURE__ */ jsx38(
|
|
4045
4386
|
SelectPrimitive.ScrollDownButton,
|
|
4046
4387
|
{
|
|
4047
4388
|
"data-slot": "select-scroll-down-button",
|
|
@@ -4050,7 +4391,7 @@ function SelectScrollDownButton({
|
|
|
4050
4391
|
className
|
|
4051
4392
|
),
|
|
4052
4393
|
...props,
|
|
4053
|
-
children: /* @__PURE__ */
|
|
4394
|
+
children: /* @__PURE__ */ jsx38(ChevronDownIcon4, { className: "size-4" })
|
|
4054
4395
|
}
|
|
4055
4396
|
);
|
|
4056
4397
|
}
|
|
@@ -4058,14 +4399,14 @@ function SelectScrollDownButton({
|
|
|
4058
4399
|
// src/components/ui/separator.tsx
|
|
4059
4400
|
import "react";
|
|
4060
4401
|
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
4061
|
-
import { jsx as
|
|
4402
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
4062
4403
|
function Separator5({
|
|
4063
4404
|
className,
|
|
4064
4405
|
orientation = "horizontal",
|
|
4065
4406
|
decorative = true,
|
|
4066
4407
|
...props
|
|
4067
4408
|
}) {
|
|
4068
|
-
return /* @__PURE__ */
|
|
4409
|
+
return /* @__PURE__ */ jsx39(
|
|
4069
4410
|
SeparatorPrimitive.Root,
|
|
4070
4411
|
{
|
|
4071
4412
|
"data-slot": "separator",
|
|
@@ -4082,32 +4423,32 @@ function Separator5({
|
|
|
4082
4423
|
|
|
4083
4424
|
// src/components/ui/sheet.tsx
|
|
4084
4425
|
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
4085
|
-
import { XIcon as
|
|
4426
|
+
import { XIcon as XIcon3 } from "lucide-react";
|
|
4086
4427
|
import "react";
|
|
4087
|
-
import { jsx as
|
|
4428
|
+
import { jsx as jsx40, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
4088
4429
|
function Sheet({ ...props }) {
|
|
4089
|
-
return /* @__PURE__ */
|
|
4430
|
+
return /* @__PURE__ */ jsx40(SheetPrimitive.Root, { "data-slot": "sheet", ...props });
|
|
4090
4431
|
}
|
|
4091
4432
|
function SheetTrigger({
|
|
4092
4433
|
...props
|
|
4093
4434
|
}) {
|
|
4094
|
-
return /* @__PURE__ */
|
|
4435
|
+
return /* @__PURE__ */ jsx40(SheetPrimitive.Trigger, { "data-slot": "sheet-trigger", ...props });
|
|
4095
4436
|
}
|
|
4096
4437
|
function SheetClose({
|
|
4097
4438
|
...props
|
|
4098
4439
|
}) {
|
|
4099
|
-
return /* @__PURE__ */
|
|
4440
|
+
return /* @__PURE__ */ jsx40(SheetPrimitive.Close, { "data-slot": "sheet-close", ...props });
|
|
4100
4441
|
}
|
|
4101
4442
|
function SheetPortal({
|
|
4102
4443
|
...props
|
|
4103
4444
|
}) {
|
|
4104
|
-
return /* @__PURE__ */
|
|
4445
|
+
return /* @__PURE__ */ jsx40(SheetPrimitive.Portal, { "data-slot": "sheet-portal", ...props });
|
|
4105
4446
|
}
|
|
4106
4447
|
function SheetOverlay({
|
|
4107
4448
|
className,
|
|
4108
4449
|
...props
|
|
4109
4450
|
}) {
|
|
4110
|
-
return /* @__PURE__ */
|
|
4451
|
+
return /* @__PURE__ */ jsx40(
|
|
4111
4452
|
SheetPrimitive.Overlay,
|
|
4112
4453
|
{
|
|
4113
4454
|
"data-slot": "sheet-overlay",
|
|
@@ -4126,9 +4467,9 @@ function SheetContent({
|
|
|
4126
4467
|
showCloseButton = true,
|
|
4127
4468
|
...props
|
|
4128
4469
|
}) {
|
|
4129
|
-
return /* @__PURE__ */
|
|
4130
|
-
/* @__PURE__ */
|
|
4131
|
-
/* @__PURE__ */
|
|
4470
|
+
return /* @__PURE__ */ jsxs21(SheetPortal, { children: [
|
|
4471
|
+
/* @__PURE__ */ jsx40(SheetOverlay, {}),
|
|
4472
|
+
/* @__PURE__ */ jsxs21(
|
|
4132
4473
|
SheetPrimitive.Content,
|
|
4133
4474
|
{
|
|
4134
4475
|
"data-slot": "sheet-content",
|
|
@@ -4143,9 +4484,9 @@ function SheetContent({
|
|
|
4143
4484
|
...props,
|
|
4144
4485
|
children: [
|
|
4145
4486
|
children,
|
|
4146
|
-
showCloseButton && /* @__PURE__ */
|
|
4147
|
-
/* @__PURE__ */
|
|
4148
|
-
/* @__PURE__ */
|
|
4487
|
+
showCloseButton && /* @__PURE__ */ jsxs21(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: [
|
|
4488
|
+
/* @__PURE__ */ jsx40(XIcon3, { className: "size-4" }),
|
|
4489
|
+
/* @__PURE__ */ jsx40("span", { className: "sr-only", children: "Close" })
|
|
4149
4490
|
] })
|
|
4150
4491
|
]
|
|
4151
4492
|
}
|
|
@@ -4153,7 +4494,7 @@ function SheetContent({
|
|
|
4153
4494
|
] });
|
|
4154
4495
|
}
|
|
4155
4496
|
function SheetHeader({ className, ...props }) {
|
|
4156
|
-
return /* @__PURE__ */
|
|
4497
|
+
return /* @__PURE__ */ jsx40(
|
|
4157
4498
|
"div",
|
|
4158
4499
|
{
|
|
4159
4500
|
"data-slot": "sheet-header",
|
|
@@ -4163,7 +4504,7 @@ function SheetHeader({ className, ...props }) {
|
|
|
4163
4504
|
);
|
|
4164
4505
|
}
|
|
4165
4506
|
function SheetFooter({ className, ...props }) {
|
|
4166
|
-
return /* @__PURE__ */
|
|
4507
|
+
return /* @__PURE__ */ jsx40(
|
|
4167
4508
|
"div",
|
|
4168
4509
|
{
|
|
4169
4510
|
"data-slot": "sheet-footer",
|
|
@@ -4176,7 +4517,7 @@ function SheetTitle({
|
|
|
4176
4517
|
className,
|
|
4177
4518
|
...props
|
|
4178
4519
|
}) {
|
|
4179
|
-
return /* @__PURE__ */
|
|
4520
|
+
return /* @__PURE__ */ jsx40(
|
|
4180
4521
|
SheetPrimitive.Title,
|
|
4181
4522
|
{
|
|
4182
4523
|
"data-slot": "sheet-title",
|
|
@@ -4189,7 +4530,7 @@ function SheetDescription({
|
|
|
4189
4530
|
className,
|
|
4190
4531
|
...props
|
|
4191
4532
|
}) {
|
|
4192
|
-
return /* @__PURE__ */
|
|
4533
|
+
return /* @__PURE__ */ jsx40(
|
|
4193
4534
|
SheetPrimitive.Description,
|
|
4194
4535
|
{
|
|
4195
4536
|
"data-slot": "sheet-description",
|
|
@@ -4203,12 +4544,12 @@ function SheetDescription({
|
|
|
4203
4544
|
import { Slot as Slot6 } from "@radix-ui/react-slot";
|
|
4204
4545
|
import { cva as cva7 } from "class-variance-authority";
|
|
4205
4546
|
import { PanelLeftIcon } from "lucide-react";
|
|
4206
|
-
import * as
|
|
4547
|
+
import * as React41 from "react";
|
|
4207
4548
|
|
|
4208
4549
|
// src/components/ui/skeleton.tsx
|
|
4209
|
-
import { jsx as
|
|
4550
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
4210
4551
|
function Skeleton({ className, ...props }) {
|
|
4211
|
-
return /* @__PURE__ */
|
|
4552
|
+
return /* @__PURE__ */ jsx41(
|
|
4212
4553
|
"div",
|
|
4213
4554
|
{
|
|
4214
4555
|
"data-slot": "skeleton",
|
|
@@ -4221,12 +4562,12 @@ function Skeleton({ className, ...props }) {
|
|
|
4221
4562
|
// src/components/ui/tooltip.tsx
|
|
4222
4563
|
import "react";
|
|
4223
4564
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
4224
|
-
import { jsx as
|
|
4565
|
+
import { jsx as jsx42, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
4225
4566
|
function TooltipProvider({
|
|
4226
4567
|
delayDuration = 0,
|
|
4227
4568
|
...props
|
|
4228
4569
|
}) {
|
|
4229
|
-
return /* @__PURE__ */
|
|
4570
|
+
return /* @__PURE__ */ jsx42(
|
|
4230
4571
|
TooltipPrimitive.Provider,
|
|
4231
4572
|
{
|
|
4232
4573
|
"data-slot": "tooltip-provider",
|
|
@@ -4238,12 +4579,12 @@ function TooltipProvider({
|
|
|
4238
4579
|
function Tooltip2({
|
|
4239
4580
|
...props
|
|
4240
4581
|
}) {
|
|
4241
|
-
return /* @__PURE__ */
|
|
4582
|
+
return /* @__PURE__ */ jsx42(TooltipProvider, { children: /* @__PURE__ */ jsx42(TooltipPrimitive.Root, { "data-slot": "tooltip", ...props }) });
|
|
4242
4583
|
}
|
|
4243
4584
|
function TooltipTrigger({
|
|
4244
4585
|
...props
|
|
4245
4586
|
}) {
|
|
4246
|
-
return /* @__PURE__ */
|
|
4587
|
+
return /* @__PURE__ */ jsx42(TooltipPrimitive.Trigger, { "data-slot": "tooltip-trigger", ...props });
|
|
4247
4588
|
}
|
|
4248
4589
|
function TooltipContent({
|
|
4249
4590
|
className,
|
|
@@ -4251,7 +4592,7 @@ function TooltipContent({
|
|
|
4251
4592
|
children,
|
|
4252
4593
|
...props
|
|
4253
4594
|
}) {
|
|
4254
|
-
return /* @__PURE__ */
|
|
4595
|
+
return /* @__PURE__ */ jsx42(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs22(
|
|
4255
4596
|
TooltipPrimitive.Content,
|
|
4256
4597
|
{
|
|
4257
4598
|
"data-slot": "tooltip-content",
|
|
@@ -4263,18 +4604,18 @@ function TooltipContent({
|
|
|
4263
4604
|
...props,
|
|
4264
4605
|
children: [
|
|
4265
4606
|
children,
|
|
4266
|
-
/* @__PURE__ */
|
|
4607
|
+
/* @__PURE__ */ jsx42(TooltipPrimitive.Arrow, { className: "bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })
|
|
4267
4608
|
]
|
|
4268
4609
|
}
|
|
4269
4610
|
) });
|
|
4270
4611
|
}
|
|
4271
4612
|
|
|
4272
4613
|
// src/hooks/use-mobile.ts
|
|
4273
|
-
import * as
|
|
4614
|
+
import * as React40 from "react";
|
|
4274
4615
|
var MOBILE_BREAKPOINT = 768;
|
|
4275
4616
|
function useIsMobile() {
|
|
4276
|
-
const [isMobile, setIsMobile] =
|
|
4277
|
-
|
|
4617
|
+
const [isMobile, setIsMobile] = React40.useState(void 0);
|
|
4618
|
+
React40.useEffect(() => {
|
|
4278
4619
|
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
4279
4620
|
const onChange = () => {
|
|
4280
4621
|
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
@@ -4287,16 +4628,16 @@ function useIsMobile() {
|
|
|
4287
4628
|
}
|
|
4288
4629
|
|
|
4289
4630
|
// src/components/ui/sidebar.tsx
|
|
4290
|
-
import { jsx as
|
|
4631
|
+
import { jsx as jsx43, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
4291
4632
|
var SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
4292
4633
|
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
4293
4634
|
var SIDEBAR_WIDTH = "18rem";
|
|
4294
4635
|
var SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
4295
4636
|
var SIDEBAR_WIDTH_ICON = "3rem";
|
|
4296
4637
|
var SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
4297
|
-
var SidebarContext =
|
|
4638
|
+
var SidebarContext = React41.createContext(null);
|
|
4298
4639
|
function useSidebar() {
|
|
4299
|
-
const context =
|
|
4640
|
+
const context = React41.useContext(SidebarContext);
|
|
4300
4641
|
if (!context) {
|
|
4301
4642
|
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
4302
4643
|
}
|
|
@@ -4312,10 +4653,10 @@ function SidebarProvider({
|
|
|
4312
4653
|
...props
|
|
4313
4654
|
}) {
|
|
4314
4655
|
const isMobile = useIsMobile();
|
|
4315
|
-
const [openMobile, setOpenMobile] =
|
|
4316
|
-
const [_open, _setOpen] =
|
|
4656
|
+
const [openMobile, setOpenMobile] = React41.useState(false);
|
|
4657
|
+
const [_open, _setOpen] = React41.useState(defaultOpen);
|
|
4317
4658
|
const open = openProp ?? _open;
|
|
4318
|
-
const setOpen =
|
|
4659
|
+
const setOpen = React41.useCallback(
|
|
4319
4660
|
(value) => {
|
|
4320
4661
|
const openState = typeof value === "function" ? value(open) : value;
|
|
4321
4662
|
if (setOpenProp) {
|
|
@@ -4327,10 +4668,10 @@ function SidebarProvider({
|
|
|
4327
4668
|
},
|
|
4328
4669
|
[setOpenProp, open]
|
|
4329
4670
|
);
|
|
4330
|
-
const toggleSidebar =
|
|
4671
|
+
const toggleSidebar = React41.useCallback(() => {
|
|
4331
4672
|
return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
|
|
4332
4673
|
}, [isMobile, setOpen, setOpenMobile]);
|
|
4333
|
-
|
|
4674
|
+
React41.useEffect(() => {
|
|
4334
4675
|
const handleKeyDown = (event) => {
|
|
4335
4676
|
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
4336
4677
|
event.preventDefault();
|
|
@@ -4341,7 +4682,7 @@ function SidebarProvider({
|
|
|
4341
4682
|
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
4342
4683
|
}, [toggleSidebar]);
|
|
4343
4684
|
const state = open ? "expanded" : "collapsed";
|
|
4344
|
-
const contextValue =
|
|
4685
|
+
const contextValue = React41.useMemo(
|
|
4345
4686
|
() => ({
|
|
4346
4687
|
state,
|
|
4347
4688
|
open,
|
|
@@ -4353,7 +4694,7 @@ function SidebarProvider({
|
|
|
4353
4694
|
}),
|
|
4354
4695
|
[state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]
|
|
4355
4696
|
);
|
|
4356
|
-
return /* @__PURE__ */
|
|
4697
|
+
return /* @__PURE__ */ jsx43(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx43(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ jsx43(
|
|
4357
4698
|
"div",
|
|
4358
4699
|
{
|
|
4359
4700
|
"data-slot": "sidebar-wrapper",
|
|
@@ -4381,7 +4722,7 @@ function Sidebar({
|
|
|
4381
4722
|
}) {
|
|
4382
4723
|
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
4383
4724
|
if (collapsible === "none") {
|
|
4384
|
-
return /* @__PURE__ */
|
|
4725
|
+
return /* @__PURE__ */ jsx43(
|
|
4385
4726
|
"div",
|
|
4386
4727
|
{
|
|
4387
4728
|
"data-slot": "sidebar",
|
|
@@ -4395,7 +4736,7 @@ function Sidebar({
|
|
|
4395
4736
|
);
|
|
4396
4737
|
}
|
|
4397
4738
|
if (isMobile) {
|
|
4398
|
-
return /* @__PURE__ */
|
|
4739
|
+
return /* @__PURE__ */ jsx43(Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ jsxs23(
|
|
4399
4740
|
SheetContent,
|
|
4400
4741
|
{
|
|
4401
4742
|
"data-sidebar": "sidebar",
|
|
@@ -4407,16 +4748,16 @@ function Sidebar({
|
|
|
4407
4748
|
},
|
|
4408
4749
|
side,
|
|
4409
4750
|
children: [
|
|
4410
|
-
/* @__PURE__ */
|
|
4411
|
-
/* @__PURE__ */
|
|
4412
|
-
/* @__PURE__ */
|
|
4751
|
+
/* @__PURE__ */ jsxs23(SheetHeader, { className: "sr-only", children: [
|
|
4752
|
+
/* @__PURE__ */ jsx43(SheetTitle, { children: "Sidebar" }),
|
|
4753
|
+
/* @__PURE__ */ jsx43(SheetDescription, { children: "Displays the mobile sidebar." })
|
|
4413
4754
|
] }),
|
|
4414
|
-
/* @__PURE__ */
|
|
4755
|
+
/* @__PURE__ */ jsx43("div", { className: "flex h-full w-full flex-col", children })
|
|
4415
4756
|
]
|
|
4416
4757
|
}
|
|
4417
4758
|
) });
|
|
4418
4759
|
}
|
|
4419
|
-
return /* @__PURE__ */
|
|
4760
|
+
return /* @__PURE__ */ jsxs23(
|
|
4420
4761
|
"div",
|
|
4421
4762
|
{
|
|
4422
4763
|
className: "group peer text-sidebar-foreground hidden md:block",
|
|
@@ -4426,7 +4767,7 @@ function Sidebar({
|
|
|
4426
4767
|
"data-side": side,
|
|
4427
4768
|
"data-slot": "sidebar",
|
|
4428
4769
|
children: [
|
|
4429
|
-
/* @__PURE__ */
|
|
4770
|
+
/* @__PURE__ */ jsx43(
|
|
4430
4771
|
"div",
|
|
4431
4772
|
{
|
|
4432
4773
|
"data-slot": "sidebar-gap",
|
|
@@ -4438,7 +4779,7 @@ function Sidebar({
|
|
|
4438
4779
|
)
|
|
4439
4780
|
}
|
|
4440
4781
|
),
|
|
4441
|
-
/* @__PURE__ */
|
|
4782
|
+
/* @__PURE__ */ jsx43(
|
|
4442
4783
|
"div",
|
|
4443
4784
|
{
|
|
4444
4785
|
"data-slot": "sidebar-container",
|
|
@@ -4450,7 +4791,7 @@ function Sidebar({
|
|
|
4450
4791
|
className
|
|
4451
4792
|
),
|
|
4452
4793
|
...props,
|
|
4453
|
-
children: /* @__PURE__ */
|
|
4794
|
+
children: /* @__PURE__ */ jsx43(
|
|
4454
4795
|
"div",
|
|
4455
4796
|
{
|
|
4456
4797
|
"data-sidebar": "sidebar",
|
|
@@ -4471,7 +4812,7 @@ function SidebarTrigger({
|
|
|
4471
4812
|
...props
|
|
4472
4813
|
}) {
|
|
4473
4814
|
const { toggleSidebar } = useSidebar();
|
|
4474
|
-
return /* @__PURE__ */
|
|
4815
|
+
return /* @__PURE__ */ jsxs23(
|
|
4475
4816
|
Button,
|
|
4476
4817
|
{
|
|
4477
4818
|
"data-sidebar": "trigger",
|
|
@@ -4485,15 +4826,15 @@ function SidebarTrigger({
|
|
|
4485
4826
|
},
|
|
4486
4827
|
...props,
|
|
4487
4828
|
children: [
|
|
4488
|
-
/* @__PURE__ */
|
|
4489
|
-
/* @__PURE__ */
|
|
4829
|
+
/* @__PURE__ */ jsx43(PanelLeftIcon, {}),
|
|
4830
|
+
/* @__PURE__ */ jsx43("span", { className: "sr-only", children: "Toggle Sidebar" })
|
|
4490
4831
|
]
|
|
4491
4832
|
}
|
|
4492
4833
|
);
|
|
4493
4834
|
}
|
|
4494
4835
|
function SidebarRail({ className, ...props }) {
|
|
4495
4836
|
const { toggleSidebar } = useSidebar();
|
|
4496
|
-
return /* @__PURE__ */
|
|
4837
|
+
return /* @__PURE__ */ jsx43(
|
|
4497
4838
|
"button",
|
|
4498
4839
|
{
|
|
4499
4840
|
"data-sidebar": "rail",
|
|
@@ -4516,7 +4857,7 @@ function SidebarRail({ className, ...props }) {
|
|
|
4516
4857
|
);
|
|
4517
4858
|
}
|
|
4518
4859
|
function SidebarInset({ className, ...props }) {
|
|
4519
|
-
return /* @__PURE__ */
|
|
4860
|
+
return /* @__PURE__ */ jsx43(
|
|
4520
4861
|
"main",
|
|
4521
4862
|
{
|
|
4522
4863
|
"data-slot": "sidebar-inset",
|
|
@@ -4533,7 +4874,7 @@ function SidebarInput({
|
|
|
4533
4874
|
className,
|
|
4534
4875
|
...props
|
|
4535
4876
|
}) {
|
|
4536
|
-
return /* @__PURE__ */
|
|
4877
|
+
return /* @__PURE__ */ jsx43(
|
|
4537
4878
|
Input,
|
|
4538
4879
|
{
|
|
4539
4880
|
"data-slot": "sidebar-input",
|
|
@@ -4544,7 +4885,7 @@ function SidebarInput({
|
|
|
4544
4885
|
);
|
|
4545
4886
|
}
|
|
4546
4887
|
function SidebarHeader({ className, ...props }) {
|
|
4547
|
-
return /* @__PURE__ */
|
|
4888
|
+
return /* @__PURE__ */ jsx43(
|
|
4548
4889
|
"div",
|
|
4549
4890
|
{
|
|
4550
4891
|
"data-slot": "sidebar-header",
|
|
@@ -4555,7 +4896,7 @@ function SidebarHeader({ className, ...props }) {
|
|
|
4555
4896
|
);
|
|
4556
4897
|
}
|
|
4557
4898
|
function SidebarFooter({ className, ...props }) {
|
|
4558
|
-
return /* @__PURE__ */
|
|
4899
|
+
return /* @__PURE__ */ jsx43(
|
|
4559
4900
|
"div",
|
|
4560
4901
|
{
|
|
4561
4902
|
"data-slot": "sidebar-footer",
|
|
@@ -4569,7 +4910,7 @@ function SidebarSeparator({
|
|
|
4569
4910
|
className,
|
|
4570
4911
|
...props
|
|
4571
4912
|
}) {
|
|
4572
|
-
return /* @__PURE__ */
|
|
4913
|
+
return /* @__PURE__ */ jsx43(
|
|
4573
4914
|
Separator5,
|
|
4574
4915
|
{
|
|
4575
4916
|
"data-slot": "sidebar-separator",
|
|
@@ -4580,7 +4921,7 @@ function SidebarSeparator({
|
|
|
4580
4921
|
);
|
|
4581
4922
|
}
|
|
4582
4923
|
function SidebarContent({ className, ...props }) {
|
|
4583
|
-
return /* @__PURE__ */
|
|
4924
|
+
return /* @__PURE__ */ jsx43(
|
|
4584
4925
|
"div",
|
|
4585
4926
|
{
|
|
4586
4927
|
"data-slot": "sidebar-content",
|
|
@@ -4594,7 +4935,7 @@ function SidebarContent({ className, ...props }) {
|
|
|
4594
4935
|
);
|
|
4595
4936
|
}
|
|
4596
4937
|
function SidebarGroup({ className, ...props }) {
|
|
4597
|
-
return /* @__PURE__ */
|
|
4938
|
+
return /* @__PURE__ */ jsx43(
|
|
4598
4939
|
"div",
|
|
4599
4940
|
{
|
|
4600
4941
|
"data-slot": "sidebar-group",
|
|
@@ -4610,7 +4951,7 @@ function SidebarGroupLabel({
|
|
|
4610
4951
|
...props
|
|
4611
4952
|
}) {
|
|
4612
4953
|
const Comp = asChild ? Slot6 : "div";
|
|
4613
|
-
return /* @__PURE__ */
|
|
4954
|
+
return /* @__PURE__ */ jsx43(
|
|
4614
4955
|
Comp,
|
|
4615
4956
|
{
|
|
4616
4957
|
"data-slot": "sidebar-group-label",
|
|
@@ -4630,7 +4971,7 @@ function SidebarGroupAction({
|
|
|
4630
4971
|
...props
|
|
4631
4972
|
}) {
|
|
4632
4973
|
const Comp = asChild ? Slot6 : "button";
|
|
4633
|
-
return /* @__PURE__ */
|
|
4974
|
+
return /* @__PURE__ */ jsx43(
|
|
4634
4975
|
Comp,
|
|
4635
4976
|
{
|
|
4636
4977
|
"data-slot": "sidebar-group-action",
|
|
@@ -4650,7 +4991,7 @@ function SidebarGroupContent({
|
|
|
4650
4991
|
className,
|
|
4651
4992
|
...props
|
|
4652
4993
|
}) {
|
|
4653
|
-
return /* @__PURE__ */
|
|
4994
|
+
return /* @__PURE__ */ jsx43(
|
|
4654
4995
|
"div",
|
|
4655
4996
|
{
|
|
4656
4997
|
"data-slot": "sidebar-group-content",
|
|
@@ -4661,7 +5002,7 @@ function SidebarGroupContent({
|
|
|
4661
5002
|
);
|
|
4662
5003
|
}
|
|
4663
5004
|
function SidebarMenu({ className, ...props }) {
|
|
4664
|
-
return /* @__PURE__ */
|
|
5005
|
+
return /* @__PURE__ */ jsx43(
|
|
4665
5006
|
"ul",
|
|
4666
5007
|
{
|
|
4667
5008
|
"data-slot": "sidebar-menu",
|
|
@@ -4672,7 +5013,7 @@ function SidebarMenu({ className, ...props }) {
|
|
|
4672
5013
|
);
|
|
4673
5014
|
}
|
|
4674
5015
|
function SidebarMenuItem({ className, ...props }) {
|
|
4675
|
-
return /* @__PURE__ */
|
|
5016
|
+
return /* @__PURE__ */ jsx43(
|
|
4676
5017
|
"li",
|
|
4677
5018
|
{
|
|
4678
5019
|
"data-slot": "sidebar-menu-item",
|
|
@@ -4713,7 +5054,7 @@ function SidebarMenuButton({
|
|
|
4713
5054
|
}) {
|
|
4714
5055
|
const Comp = asChild ? Slot6 : "button";
|
|
4715
5056
|
const { isMobile, state } = useSidebar();
|
|
4716
|
-
const button = /* @__PURE__ */
|
|
5057
|
+
const button = /* @__PURE__ */ jsx43(
|
|
4717
5058
|
Comp,
|
|
4718
5059
|
{
|
|
4719
5060
|
"data-slot": "sidebar-menu-button",
|
|
@@ -4732,9 +5073,9 @@ function SidebarMenuButton({
|
|
|
4732
5073
|
children: tooltip
|
|
4733
5074
|
};
|
|
4734
5075
|
}
|
|
4735
|
-
return /* @__PURE__ */
|
|
4736
|
-
/* @__PURE__ */
|
|
4737
|
-
/* @__PURE__ */
|
|
5076
|
+
return /* @__PURE__ */ jsxs23(Tooltip2, { children: [
|
|
5077
|
+
/* @__PURE__ */ jsx43(TooltipTrigger, { asChild: true, children: button }),
|
|
5078
|
+
/* @__PURE__ */ jsx43(
|
|
4738
5079
|
TooltipContent,
|
|
4739
5080
|
{
|
|
4740
5081
|
side: "right",
|
|
@@ -4752,7 +5093,7 @@ function SidebarMenuAction({
|
|
|
4752
5093
|
...props
|
|
4753
5094
|
}) {
|
|
4754
5095
|
const Comp = asChild ? Slot6 : "button";
|
|
4755
|
-
return /* @__PURE__ */
|
|
5096
|
+
return /* @__PURE__ */ jsx43(
|
|
4756
5097
|
Comp,
|
|
4757
5098
|
{
|
|
4758
5099
|
"data-slot": "sidebar-menu-action",
|
|
@@ -4776,7 +5117,7 @@ function SidebarMenuBadge({
|
|
|
4776
5117
|
className,
|
|
4777
5118
|
...props
|
|
4778
5119
|
}) {
|
|
4779
|
-
return /* @__PURE__ */
|
|
5120
|
+
return /* @__PURE__ */ jsx43(
|
|
4780
5121
|
"div",
|
|
4781
5122
|
{
|
|
4782
5123
|
"data-slot": "sidebar-menu-badge",
|
|
@@ -4799,10 +5140,10 @@ function SidebarMenuSkeleton({
|
|
|
4799
5140
|
showIcon = false,
|
|
4800
5141
|
...props
|
|
4801
5142
|
}) {
|
|
4802
|
-
const width =
|
|
5143
|
+
const width = React41.useMemo(() => {
|
|
4803
5144
|
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
4804
5145
|
}, []);
|
|
4805
|
-
return /* @__PURE__ */
|
|
5146
|
+
return /* @__PURE__ */ jsxs23(
|
|
4806
5147
|
"div",
|
|
4807
5148
|
{
|
|
4808
5149
|
"data-slot": "sidebar-menu-skeleton",
|
|
@@ -4810,14 +5151,14 @@ function SidebarMenuSkeleton({
|
|
|
4810
5151
|
className: cn("flex h-8 items-center gap-2 rounded-md px-2", className),
|
|
4811
5152
|
...props,
|
|
4812
5153
|
children: [
|
|
4813
|
-
showIcon && /* @__PURE__ */
|
|
5154
|
+
showIcon && /* @__PURE__ */ jsx43(
|
|
4814
5155
|
Skeleton,
|
|
4815
5156
|
{
|
|
4816
5157
|
className: "size-4 rounded-md",
|
|
4817
5158
|
"data-sidebar": "menu-skeleton-icon"
|
|
4818
5159
|
}
|
|
4819
5160
|
),
|
|
4820
|
-
/* @__PURE__ */
|
|
5161
|
+
/* @__PURE__ */ jsx43(
|
|
4821
5162
|
Skeleton,
|
|
4822
5163
|
{
|
|
4823
5164
|
className: "h-4 max-w-(--skeleton-width) flex-1",
|
|
@@ -4832,7 +5173,7 @@ function SidebarMenuSkeleton({
|
|
|
4832
5173
|
);
|
|
4833
5174
|
}
|
|
4834
5175
|
function SidebarMenuSub({ className, ...props }) {
|
|
4835
|
-
return /* @__PURE__ */
|
|
5176
|
+
return /* @__PURE__ */ jsx43(
|
|
4836
5177
|
"ul",
|
|
4837
5178
|
{
|
|
4838
5179
|
"data-slot": "sidebar-menu-sub",
|
|
@@ -4850,7 +5191,7 @@ function SidebarMenuSubItem({
|
|
|
4850
5191
|
className,
|
|
4851
5192
|
...props
|
|
4852
5193
|
}) {
|
|
4853
|
-
return /* @__PURE__ */
|
|
5194
|
+
return /* @__PURE__ */ jsx43(
|
|
4854
5195
|
"li",
|
|
4855
5196
|
{
|
|
4856
5197
|
"data-slot": "sidebar-menu-sub-item",
|
|
@@ -4868,7 +5209,7 @@ function SidebarMenuSubButton({
|
|
|
4868
5209
|
...props
|
|
4869
5210
|
}) {
|
|
4870
5211
|
const Comp = asChild ? Slot6 : "a";
|
|
4871
|
-
return /* @__PURE__ */
|
|
5212
|
+
return /* @__PURE__ */ jsx43(
|
|
4872
5213
|
Comp,
|
|
4873
5214
|
{
|
|
4874
5215
|
"data-slot": "sidebar-menu-sub-button",
|
|
@@ -4889,9 +5230,9 @@ function SidebarMenuSubButton({
|
|
|
4889
5230
|
}
|
|
4890
5231
|
|
|
4891
5232
|
// src/components/ui/slider.tsx
|
|
4892
|
-
import * as
|
|
5233
|
+
import * as React42 from "react";
|
|
4893
5234
|
import * as SliderPrimitive from "@radix-ui/react-slider";
|
|
4894
|
-
import { jsx as
|
|
5235
|
+
import { jsx as jsx44, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
4895
5236
|
function Slider({
|
|
4896
5237
|
className,
|
|
4897
5238
|
defaultValue,
|
|
@@ -4900,11 +5241,11 @@ function Slider({
|
|
|
4900
5241
|
max = 100,
|
|
4901
5242
|
...props
|
|
4902
5243
|
}) {
|
|
4903
|
-
const _values =
|
|
5244
|
+
const _values = React42.useMemo(
|
|
4904
5245
|
() => Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min, max],
|
|
4905
5246
|
[value, defaultValue, min, max]
|
|
4906
5247
|
);
|
|
4907
|
-
return /* @__PURE__ */
|
|
5248
|
+
return /* @__PURE__ */ jsxs24(
|
|
4908
5249
|
SliderPrimitive.Root,
|
|
4909
5250
|
{
|
|
4910
5251
|
"data-slot": "slider",
|
|
@@ -4918,14 +5259,14 @@ function Slider({
|
|
|
4918
5259
|
),
|
|
4919
5260
|
...props,
|
|
4920
5261
|
children: [
|
|
4921
|
-
/* @__PURE__ */
|
|
5262
|
+
/* @__PURE__ */ jsx44(
|
|
4922
5263
|
SliderPrimitive.Track,
|
|
4923
5264
|
{
|
|
4924
5265
|
"data-slot": "slider-track",
|
|
4925
5266
|
className: cn(
|
|
4926
5267
|
"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"
|
|
4927
5268
|
),
|
|
4928
|
-
children: /* @__PURE__ */
|
|
5269
|
+
children: /* @__PURE__ */ jsx44(
|
|
4929
5270
|
SliderPrimitive.Range,
|
|
4930
5271
|
{
|
|
4931
5272
|
"data-slot": "slider-range",
|
|
@@ -4936,7 +5277,7 @@ function Slider({
|
|
|
4936
5277
|
)
|
|
4937
5278
|
}
|
|
4938
5279
|
),
|
|
4939
|
-
Array.from({ length: _values.length }, (_, index) => /* @__PURE__ */
|
|
5280
|
+
Array.from({ length: _values.length }, (_, index) => /* @__PURE__ */ jsx44(
|
|
4940
5281
|
SliderPrimitive.Thumb,
|
|
4941
5282
|
{
|
|
4942
5283
|
"data-slot": "slider-thumb",
|
|
@@ -4953,7 +5294,7 @@ function Slider({
|
|
|
4953
5294
|
import "react";
|
|
4954
5295
|
|
|
4955
5296
|
// src/components/ui/useMediaQuery.ts
|
|
4956
|
-
import { useEffect as useEffect7, useState as
|
|
5297
|
+
import { useEffect as useEffect7, useState as useState7 } from "react";
|
|
4957
5298
|
function useMediaQuery(query) {
|
|
4958
5299
|
const getMatches = (query2) => {
|
|
4959
5300
|
if (typeof window !== "undefined") {
|
|
@@ -4961,7 +5302,7 @@ function useMediaQuery(query) {
|
|
|
4961
5302
|
}
|
|
4962
5303
|
return false;
|
|
4963
5304
|
};
|
|
4964
|
-
const [matches, setMatches] =
|
|
5305
|
+
const [matches, setMatches] = useState7(getMatches(query));
|
|
4965
5306
|
function handleChange() {
|
|
4966
5307
|
setMatches(getMatches(query));
|
|
4967
5308
|
}
|
|
@@ -4985,10 +5326,10 @@ function useMediaQuery(query) {
|
|
|
4985
5326
|
}
|
|
4986
5327
|
|
|
4987
5328
|
// src/components/ui/smart-dialog-drawer.tsx
|
|
4988
|
-
import { Fragment as Fragment3, jsx as
|
|
5329
|
+
import { Fragment as Fragment3, jsx as jsx45 } from "react/jsx-runtime";
|
|
4989
5330
|
var SmartDialog = ({ children, ...props }) => {
|
|
4990
5331
|
const isMobile = useMediaQuery("(max-width: 600px)");
|
|
4991
|
-
return isMobile ? /* @__PURE__ */
|
|
5332
|
+
return isMobile ? /* @__PURE__ */ jsx45(Drawer, { ...props, children }) : /* @__PURE__ */ jsx45(Dialog, { ...props, children });
|
|
4992
5333
|
};
|
|
4993
5334
|
var SmartDialogContent = ({
|
|
4994
5335
|
children,
|
|
@@ -4998,14 +5339,14 @@ var SmartDialogContent = ({
|
|
|
4998
5339
|
...props
|
|
4999
5340
|
}) => {
|
|
5000
5341
|
const isMobile = useMediaQuery("(max-width: 600px)");
|
|
5001
|
-
return isMobile ? /* @__PURE__ */
|
|
5342
|
+
return isMobile ? /* @__PURE__ */ jsx45(
|
|
5002
5343
|
DrawerContent,
|
|
5003
5344
|
{
|
|
5004
5345
|
...props,
|
|
5005
5346
|
withCloseButton: withCloseButton ?? showCloseButton ?? true,
|
|
5006
5347
|
children
|
|
5007
5348
|
}
|
|
5008
|
-
) : /* @__PURE__ */
|
|
5349
|
+
) : /* @__PURE__ */ jsx45(
|
|
5009
5350
|
DialogContent,
|
|
5010
5351
|
{
|
|
5011
5352
|
...props,
|
|
@@ -5020,39 +5361,39 @@ var SmartDialogDescription = ({
|
|
|
5020
5361
|
...props
|
|
5021
5362
|
}) => {
|
|
5022
5363
|
const isMobile = useMediaQuery("(max-width: 600px)");
|
|
5023
|
-
return isMobile ? /* @__PURE__ */
|
|
5364
|
+
return isMobile ? /* @__PURE__ */ jsx45(DrawerDescription, { ...props, children }) : /* @__PURE__ */ jsx45(DialogDescription, { ...props, children });
|
|
5024
5365
|
};
|
|
5025
5366
|
var SmartDialogHeader = ({ children, ...props }) => {
|
|
5026
5367
|
const isMobile = useMediaQuery("(max-width: 600px)");
|
|
5027
|
-
return isMobile ? /* @__PURE__ */
|
|
5368
|
+
return isMobile ? /* @__PURE__ */ jsx45(DrawerHeader, { ...props, children }) : /* @__PURE__ */ jsx45(DialogHeader, { ...props, children });
|
|
5028
5369
|
};
|
|
5029
5370
|
var SmartDialogTitle = ({ children, ...props }) => {
|
|
5030
5371
|
const isMobile = useMediaQuery("(max-width: 600px)");
|
|
5031
|
-
return isMobile ? /* @__PURE__ */
|
|
5372
|
+
return isMobile ? /* @__PURE__ */ jsx45(DrawerTitle, { ...props, children }) : /* @__PURE__ */ jsx45(DialogTitle, { ...props, children });
|
|
5032
5373
|
};
|
|
5033
5374
|
var SmartDialogTrigger = ({
|
|
5034
5375
|
children,
|
|
5035
5376
|
...props
|
|
5036
5377
|
}) => {
|
|
5037
5378
|
const isMobile = useMediaQuery("(max-width: 600px)");
|
|
5038
|
-
return isMobile ? /* @__PURE__ */
|
|
5379
|
+
return isMobile ? /* @__PURE__ */ jsx45(DrawerTrigger, { ...props, children }) : /* @__PURE__ */ jsx45(DialogTrigger, { ...props, children });
|
|
5039
5380
|
};
|
|
5040
5381
|
var SmartDialogFooter = ({ children, ...props }) => {
|
|
5041
5382
|
const isMobile = useMediaQuery("(max-width: 600px)");
|
|
5042
|
-
return isMobile ? /* @__PURE__ */
|
|
5383
|
+
return isMobile ? /* @__PURE__ */ jsx45(DrawerFooter, { ...props, children }) : /* @__PURE__ */ jsx45(DialogFooter, { ...props, children });
|
|
5043
5384
|
};
|
|
5044
5385
|
var SmartDialogClose = ({ children, ...props }) => {
|
|
5045
5386
|
const isMobile = useMediaQuery("(max-width: 600px)");
|
|
5046
|
-
return isMobile ? /* @__PURE__ */
|
|
5387
|
+
return isMobile ? /* @__PURE__ */ jsx45(Fragment3, { children: /* @__PURE__ */ jsx45(DrawerClose, { ...props, children }) }) : /* @__PURE__ */ jsx45(DialogClose, { ...props, children });
|
|
5047
5388
|
};
|
|
5048
5389
|
|
|
5049
5390
|
// src/components/ui/sonner.tsx
|
|
5050
5391
|
import { useTheme } from "next-themes";
|
|
5051
5392
|
import { Toaster as Sonner } from "sonner";
|
|
5052
|
-
import { jsx as
|
|
5393
|
+
import { jsx as jsx46 } from "react/jsx-runtime";
|
|
5053
5394
|
var Toaster = ({ ...props }) => {
|
|
5054
5395
|
const { theme = "system" } = useTheme();
|
|
5055
|
-
return /* @__PURE__ */
|
|
5396
|
+
return /* @__PURE__ */ jsx46(
|
|
5056
5397
|
Sonner,
|
|
5057
5398
|
{
|
|
5058
5399
|
theme,
|
|
@@ -5070,12 +5411,12 @@ var Toaster = ({ ...props }) => {
|
|
|
5070
5411
|
// src/components/ui/switch.tsx
|
|
5071
5412
|
import * as SwitchPrimitive from "@radix-ui/react-switch";
|
|
5072
5413
|
import "react";
|
|
5073
|
-
import { jsx as
|
|
5414
|
+
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
5074
5415
|
function Switch({
|
|
5075
5416
|
className,
|
|
5076
5417
|
...props
|
|
5077
5418
|
}) {
|
|
5078
|
-
return /* @__PURE__ */
|
|
5419
|
+
return /* @__PURE__ */ jsx47(
|
|
5079
5420
|
SwitchPrimitive.Root,
|
|
5080
5421
|
{
|
|
5081
5422
|
"data-slot": "switch",
|
|
@@ -5084,7 +5425,7 @@ function Switch({
|
|
|
5084
5425
|
className
|
|
5085
5426
|
),
|
|
5086
5427
|
...props,
|
|
5087
|
-
children: /* @__PURE__ */
|
|
5428
|
+
children: /* @__PURE__ */ jsx47(
|
|
5088
5429
|
SwitchPrimitive.Thumb,
|
|
5089
5430
|
{
|
|
5090
5431
|
"data-slot": "switch-thumb",
|
|
@@ -5099,14 +5440,14 @@ function Switch({
|
|
|
5099
5440
|
|
|
5100
5441
|
// src/components/ui/table.tsx
|
|
5101
5442
|
import "react";
|
|
5102
|
-
import { jsx as
|
|
5443
|
+
import { jsx as jsx48 } from "react/jsx-runtime";
|
|
5103
5444
|
function Table({ className, ...props }) {
|
|
5104
|
-
return /* @__PURE__ */
|
|
5445
|
+
return /* @__PURE__ */ jsx48(
|
|
5105
5446
|
"div",
|
|
5106
5447
|
{
|
|
5107
5448
|
"data-slot": "table-container",
|
|
5108
5449
|
className: "relative w-full overflow-x-auto",
|
|
5109
|
-
children: /* @__PURE__ */
|
|
5450
|
+
children: /* @__PURE__ */ jsx48(
|
|
5110
5451
|
"table",
|
|
5111
5452
|
{
|
|
5112
5453
|
"data-slot": "table",
|
|
@@ -5118,7 +5459,7 @@ function Table({ className, ...props }) {
|
|
|
5118
5459
|
);
|
|
5119
5460
|
}
|
|
5120
5461
|
function TableHeader({ className, ...props }) {
|
|
5121
|
-
return /* @__PURE__ */
|
|
5462
|
+
return /* @__PURE__ */ jsx48(
|
|
5122
5463
|
"thead",
|
|
5123
5464
|
{
|
|
5124
5465
|
"data-slot": "table-header",
|
|
@@ -5128,7 +5469,7 @@ function TableHeader({ className, ...props }) {
|
|
|
5128
5469
|
);
|
|
5129
5470
|
}
|
|
5130
5471
|
function TableBody({ className, ...props }) {
|
|
5131
|
-
return /* @__PURE__ */
|
|
5472
|
+
return /* @__PURE__ */ jsx48(
|
|
5132
5473
|
"tbody",
|
|
5133
5474
|
{
|
|
5134
5475
|
"data-slot": "table-body",
|
|
@@ -5138,7 +5479,7 @@ function TableBody({ className, ...props }) {
|
|
|
5138
5479
|
);
|
|
5139
5480
|
}
|
|
5140
5481
|
function TableFooter({ className, ...props }) {
|
|
5141
|
-
return /* @__PURE__ */
|
|
5482
|
+
return /* @__PURE__ */ jsx48(
|
|
5142
5483
|
"tfoot",
|
|
5143
5484
|
{
|
|
5144
5485
|
"data-slot": "table-footer",
|
|
@@ -5151,7 +5492,7 @@ function TableFooter({ className, ...props }) {
|
|
|
5151
5492
|
);
|
|
5152
5493
|
}
|
|
5153
5494
|
function TableRow({ className, ...props }) {
|
|
5154
|
-
return /* @__PURE__ */
|
|
5495
|
+
return /* @__PURE__ */ jsx48(
|
|
5155
5496
|
"tr",
|
|
5156
5497
|
{
|
|
5157
5498
|
"data-slot": "table-row",
|
|
@@ -5164,7 +5505,7 @@ function TableRow({ className, ...props }) {
|
|
|
5164
5505
|
);
|
|
5165
5506
|
}
|
|
5166
5507
|
function TableHead({ className, ...props }) {
|
|
5167
|
-
return /* @__PURE__ */
|
|
5508
|
+
return /* @__PURE__ */ jsx48(
|
|
5168
5509
|
"th",
|
|
5169
5510
|
{
|
|
5170
5511
|
"data-slot": "table-head",
|
|
@@ -5177,7 +5518,7 @@ function TableHead({ className, ...props }) {
|
|
|
5177
5518
|
);
|
|
5178
5519
|
}
|
|
5179
5520
|
function TableCell({ className, ...props }) {
|
|
5180
|
-
return /* @__PURE__ */
|
|
5521
|
+
return /* @__PURE__ */ jsx48(
|
|
5181
5522
|
"td",
|
|
5182
5523
|
{
|
|
5183
5524
|
"data-slot": "table-cell",
|
|
@@ -5193,7 +5534,7 @@ function TableCaption({
|
|
|
5193
5534
|
className,
|
|
5194
5535
|
...props
|
|
5195
5536
|
}) {
|
|
5196
|
-
return /* @__PURE__ */
|
|
5537
|
+
return /* @__PURE__ */ jsx48(
|
|
5197
5538
|
"caption",
|
|
5198
5539
|
{
|
|
5199
5540
|
"data-slot": "table-caption",
|
|
@@ -5206,12 +5547,12 @@ function TableCaption({
|
|
|
5206
5547
|
// src/components/ui/tabs.tsx
|
|
5207
5548
|
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
5208
5549
|
import "react";
|
|
5209
|
-
import { jsx as
|
|
5550
|
+
import { jsx as jsx49 } from "react/jsx-runtime";
|
|
5210
5551
|
function Tabs({
|
|
5211
5552
|
className,
|
|
5212
5553
|
...props
|
|
5213
5554
|
}) {
|
|
5214
|
-
return /* @__PURE__ */
|
|
5555
|
+
return /* @__PURE__ */ jsx49(
|
|
5215
5556
|
TabsPrimitive.Root,
|
|
5216
5557
|
{
|
|
5217
5558
|
"data-slot": "tabs",
|
|
@@ -5224,7 +5565,7 @@ function TabsList({
|
|
|
5224
5565
|
className,
|
|
5225
5566
|
...props
|
|
5226
5567
|
}) {
|
|
5227
|
-
return /* @__PURE__ */
|
|
5568
|
+
return /* @__PURE__ */ jsx49(
|
|
5228
5569
|
TabsPrimitive.List,
|
|
5229
5570
|
{
|
|
5230
5571
|
"data-slot": "tabs-list",
|
|
@@ -5240,12 +5581,12 @@ function TabsTrigger({
|
|
|
5240
5581
|
className,
|
|
5241
5582
|
...props
|
|
5242
5583
|
}) {
|
|
5243
|
-
return /* @__PURE__ */
|
|
5584
|
+
return /* @__PURE__ */ jsx49(
|
|
5244
5585
|
TabsPrimitive.Trigger,
|
|
5245
5586
|
{
|
|
5246
5587
|
"data-slot": "tabs-trigger",
|
|
5247
5588
|
className: cn(
|
|
5248
|
-
"cursor-pointer data-[state=active]:border-b-2 data-[state=active]:border-brand-normal border-0 border-t-0 rounded-none data-[state=active]:text-
|
|
5589
|
+
"cursor-pointer data-[state=active]:border-b-2 data-[state=active]:border-brand-normal border-0 border-t-0 rounded-none data-[state=active]:text-foreground data-[state=active]:font-semibold data-[state=active]:bg-background dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring inline-flex h-[calc(100%-1px)] shrink-0 items-center justify-center gap-1.5 px-2 py-[6px] font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 text-muted-foreground font-sans border-b-1 border-b-gray-stroke-light text-sm",
|
|
5249
5590
|
className
|
|
5250
5591
|
),
|
|
5251
5592
|
...props
|
|
@@ -5256,7 +5597,7 @@ function TabsContent({
|
|
|
5256
5597
|
className,
|
|
5257
5598
|
...props
|
|
5258
5599
|
}) {
|
|
5259
|
-
return /* @__PURE__ */
|
|
5600
|
+
return /* @__PURE__ */ jsx49(
|
|
5260
5601
|
TabsPrimitive.Content,
|
|
5261
5602
|
{
|
|
5262
5603
|
"data-slot": "tabs-content",
|
|
@@ -5266,11 +5607,63 @@ function TabsContent({
|
|
|
5266
5607
|
);
|
|
5267
5608
|
}
|
|
5268
5609
|
|
|
5610
|
+
// src/components/ui/theme-provider.tsx
|
|
5611
|
+
import {
|
|
5612
|
+
ThemeProvider as NextThemesProvider
|
|
5613
|
+
} from "next-themes";
|
|
5614
|
+
import { jsx as jsx50 } from "react/jsx-runtime";
|
|
5615
|
+
function ThemeProvider({ children, ...props }) {
|
|
5616
|
+
return /* @__PURE__ */ jsx50(
|
|
5617
|
+
NextThemesProvider,
|
|
5618
|
+
{
|
|
5619
|
+
attribute: "class",
|
|
5620
|
+
defaultTheme: "light",
|
|
5621
|
+
enableSystem: true,
|
|
5622
|
+
disableTransitionOnChange: true,
|
|
5623
|
+
...props,
|
|
5624
|
+
children
|
|
5625
|
+
}
|
|
5626
|
+
);
|
|
5627
|
+
}
|
|
5628
|
+
|
|
5629
|
+
// src/components/ui/theme-toggle.tsx
|
|
5630
|
+
import { Monitor, Moon, Sun } from "lucide-react";
|
|
5631
|
+
import { useTheme as useTheme2 } from "next-themes";
|
|
5632
|
+
import "react";
|
|
5633
|
+
import { jsx as jsx51, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
5634
|
+
function ThemeToggle({
|
|
5635
|
+
className,
|
|
5636
|
+
...props
|
|
5637
|
+
}) {
|
|
5638
|
+
const { setTheme } = useTheme2();
|
|
5639
|
+
return /* @__PURE__ */ jsxs25(DropdownMenu, { children: [
|
|
5640
|
+
/* @__PURE__ */ jsx51(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs25(Button, { variant: "outline", size: "icon", className, ...props, children: [
|
|
5641
|
+
/* @__PURE__ */ jsx51(Sun, { className: "size-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0" }),
|
|
5642
|
+
/* @__PURE__ */ jsx51(Moon, { className: "absolute size-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100" }),
|
|
5643
|
+
/* @__PURE__ */ jsx51("span", { className: "sr-only", children: "Toggle theme" })
|
|
5644
|
+
] }) }),
|
|
5645
|
+
/* @__PURE__ */ jsxs25(DropdownMenuContent, { align: "end", children: [
|
|
5646
|
+
/* @__PURE__ */ jsxs25(DropdownMenuItem, { onClick: () => setTheme("light"), children: [
|
|
5647
|
+
/* @__PURE__ */ jsx51(Sun, { className: "size-4" }),
|
|
5648
|
+
"Light"
|
|
5649
|
+
] }),
|
|
5650
|
+
/* @__PURE__ */ jsxs25(DropdownMenuItem, { onClick: () => setTheme("dark"), children: [
|
|
5651
|
+
/* @__PURE__ */ jsx51(Moon, { className: "size-4" }),
|
|
5652
|
+
"Dark"
|
|
5653
|
+
] }),
|
|
5654
|
+
/* @__PURE__ */ jsxs25(DropdownMenuItem, { onClick: () => setTheme("system"), children: [
|
|
5655
|
+
/* @__PURE__ */ jsx51(Monitor, { className: "size-4" }),
|
|
5656
|
+
"System"
|
|
5657
|
+
] })
|
|
5658
|
+
] })
|
|
5659
|
+
] });
|
|
5660
|
+
}
|
|
5661
|
+
|
|
5269
5662
|
// src/components/ui/time-input.tsx
|
|
5270
5663
|
import "class-variance-authority";
|
|
5271
5664
|
import { Clock } from "lucide-react";
|
|
5272
|
-
import * as
|
|
5273
|
-
import { jsx as
|
|
5665
|
+
import * as React48 from "react";
|
|
5666
|
+
import { jsx as jsx52, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
5274
5667
|
var TIME_FORMAT_PLACEHOLDER = {
|
|
5275
5668
|
"12h": "hh:mm AM/PM",
|
|
5276
5669
|
"24h": "HH:mm",
|
|
@@ -5323,16 +5716,16 @@ function TimeInput({
|
|
|
5323
5716
|
formatDisplay
|
|
5324
5717
|
}) {
|
|
5325
5718
|
const resolvedPlaceholder = placeholder ?? TIME_FORMAT_PLACEHOLDER[timeFormat];
|
|
5326
|
-
const displayValue =
|
|
5719
|
+
const displayValue = React48.useMemo(() => {
|
|
5327
5720
|
if (!time) return "";
|
|
5328
5721
|
if (formatDisplay) return formatDisplay(time);
|
|
5329
5722
|
return formatTime(time, timeFormat);
|
|
5330
5723
|
}, [time, formatDisplay, timeFormat]);
|
|
5331
|
-
const [open, setOpen] =
|
|
5332
|
-
const hoursRef =
|
|
5333
|
-
const minutesRef =
|
|
5334
|
-
const periodRef =
|
|
5335
|
-
const scrollToSelected =
|
|
5724
|
+
const [open, setOpen] = React48.useState(false);
|
|
5725
|
+
const hoursRef = React48.useRef(null);
|
|
5726
|
+
const minutesRef = React48.useRef(null);
|
|
5727
|
+
const periodRef = React48.useRef(null);
|
|
5728
|
+
const scrollToSelected = React48.useCallback(() => {
|
|
5336
5729
|
requestAnimationFrame(() => {
|
|
5337
5730
|
for (const ref of [hoursRef, minutesRef, periodRef]) {
|
|
5338
5731
|
const container = ref.current;
|
|
@@ -5344,7 +5737,7 @@ function TimeInput({
|
|
|
5344
5737
|
}
|
|
5345
5738
|
});
|
|
5346
5739
|
}, []);
|
|
5347
|
-
|
|
5740
|
+
React48.useEffect(() => {
|
|
5348
5741
|
if (open) {
|
|
5349
5742
|
scrollToSelected();
|
|
5350
5743
|
}
|
|
@@ -5380,8 +5773,8 @@ function TimeInput({
|
|
|
5380
5773
|
const selectedH12 = time ? getDisplayHour(time.hours, timeFormat) : null;
|
|
5381
5774
|
const selectedMinute = time?.minutes ?? null;
|
|
5382
5775
|
const selectedPeriod = time ? getPeriod(time.hours) : null;
|
|
5383
|
-
return /* @__PURE__ */
|
|
5384
|
-
/* @__PURE__ */
|
|
5776
|
+
return /* @__PURE__ */ jsx52("div", { className: cn("relative flex gap-2", className), children: /* @__PURE__ */ jsxs26(Popover, { open, onOpenChange: setOpen, children: [
|
|
5777
|
+
/* @__PURE__ */ jsx52(PopoverTrigger, { asChild: true, disabled: inputDisabled, children: /* @__PURE__ */ jsxs26(
|
|
5385
5778
|
Button,
|
|
5386
5779
|
{
|
|
5387
5780
|
type: "button",
|
|
@@ -5389,25 +5782,25 @@ function TimeInput({
|
|
|
5389
5782
|
className: cn(
|
|
5390
5783
|
inputVariants({ size }),
|
|
5391
5784
|
"bg-background cursor-pointer w-full text-left flex items-center justify-between gap-2 font-normal",
|
|
5392
|
-
"data-[state=open]:border-
|
|
5785
|
+
"data-[state=open]:border-focus-ring data-[state=open]:hover:border-focus-ring",
|
|
5393
5786
|
inputDisabled && "pointer-events-none cursor-not-allowed opacity-50",
|
|
5394
5787
|
inputClassName
|
|
5395
5788
|
),
|
|
5396
5789
|
disabled: inputDisabled,
|
|
5397
5790
|
children: [
|
|
5398
5791
|
displayValue || resolvedPlaceholder,
|
|
5399
|
-
icon !== void 0 ? icon : /* @__PURE__ */
|
|
5792
|
+
icon !== void 0 ? icon : /* @__PURE__ */ jsx52(Clock, { className: "h-4 w-4 text-muted-foreground shrink-0" })
|
|
5400
5793
|
]
|
|
5401
5794
|
}
|
|
5402
5795
|
) }),
|
|
5403
|
-
/* @__PURE__ */
|
|
5796
|
+
/* @__PURE__ */ jsx52(
|
|
5404
5797
|
PopoverContent,
|
|
5405
5798
|
{
|
|
5406
5799
|
className: cn("w-auto p-0", popoverContentClassName),
|
|
5407
5800
|
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
5408
5801
|
...popoverContentProps,
|
|
5409
|
-
children: /* @__PURE__ */
|
|
5410
|
-
/* @__PURE__ */
|
|
5802
|
+
children: /* @__PURE__ */ jsxs26("div", { className: "flex divide-x border border-focus-ring rounded-md", children: [
|
|
5803
|
+
/* @__PURE__ */ jsx52("div", { className: "h-56 w-16 overflow-y-auto overscroll-y-contain [-webkit-overflow-scrolling:touch]", children: /* @__PURE__ */ jsx52("div", { ref: hoursRef, className: "flex flex-col p-1 ", children: hoursList.map((h) => /* @__PURE__ */ jsx52(
|
|
5411
5804
|
Button,
|
|
5412
5805
|
{
|
|
5413
5806
|
variant: "ghost",
|
|
@@ -5422,7 +5815,7 @@ function TimeInput({
|
|
|
5422
5815
|
},
|
|
5423
5816
|
h
|
|
5424
5817
|
)) }) }),
|
|
5425
|
-
/* @__PURE__ */
|
|
5818
|
+
/* @__PURE__ */ jsx52("div", { className: "h-56 w-16 overflow-y-auto overscroll-y-contain [-webkit-overflow-scrolling:touch]", children: /* @__PURE__ */ jsx52(
|
|
5426
5819
|
"div",
|
|
5427
5820
|
{
|
|
5428
5821
|
ref: minutesRef,
|
|
@@ -5430,7 +5823,7 @@ function TimeInput({
|
|
|
5430
5823
|
"flex flex-col p-1",
|
|
5431
5824
|
minutesList.length <= 12 && "h-full justify-center"
|
|
5432
5825
|
),
|
|
5433
|
-
children: minutesList.map((m) => /* @__PURE__ */
|
|
5826
|
+
children: minutesList.map((m) => /* @__PURE__ */ jsx52(
|
|
5434
5827
|
Button,
|
|
5435
5828
|
{
|
|
5436
5829
|
variant: "ghost",
|
|
@@ -5447,7 +5840,7 @@ function TimeInput({
|
|
|
5447
5840
|
))
|
|
5448
5841
|
}
|
|
5449
5842
|
) }),
|
|
5450
|
-
!is24HourFormat(timeFormat) && /* @__PURE__ */
|
|
5843
|
+
!is24HourFormat(timeFormat) && /* @__PURE__ */ jsx52("div", { className: "flex flex-col p-1 justify-center gap-1", children: ["AM", "PM"].map((p) => /* @__PURE__ */ jsx52(
|
|
5451
5844
|
Button,
|
|
5452
5845
|
{
|
|
5453
5846
|
variant: "ghost",
|
|
@@ -5472,7 +5865,7 @@ function TimeInput({
|
|
|
5472
5865
|
import "react";
|
|
5473
5866
|
import * as TogglePrimitive from "@radix-ui/react-toggle";
|
|
5474
5867
|
import { cva as cva8 } from "class-variance-authority";
|
|
5475
|
-
import { jsx as
|
|
5868
|
+
import { jsx as jsx53 } from "react/jsx-runtime";
|
|
5476
5869
|
var toggleVariants = cva8(
|
|
5477
5870
|
"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",
|
|
5478
5871
|
{
|
|
@@ -5499,7 +5892,7 @@ function Toggle({
|
|
|
5499
5892
|
size,
|
|
5500
5893
|
...props
|
|
5501
5894
|
}) {
|
|
5502
|
-
return /* @__PURE__ */
|
|
5895
|
+
return /* @__PURE__ */ jsx53(
|
|
5503
5896
|
TogglePrimitive.Root,
|
|
5504
5897
|
{
|
|
5505
5898
|
"data-slot": "toggle",
|
|
@@ -5510,11 +5903,11 @@ function Toggle({
|
|
|
5510
5903
|
}
|
|
5511
5904
|
|
|
5512
5905
|
// src/components/ui/toggle-group.tsx
|
|
5513
|
-
import * as
|
|
5906
|
+
import * as React50 from "react";
|
|
5514
5907
|
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
|
|
5515
5908
|
import "class-variance-authority";
|
|
5516
|
-
import { jsx as
|
|
5517
|
-
var ToggleGroupContext =
|
|
5909
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
5910
|
+
var ToggleGroupContext = React50.createContext({
|
|
5518
5911
|
size: "default",
|
|
5519
5912
|
variant: "default"
|
|
5520
5913
|
});
|
|
@@ -5525,7 +5918,7 @@ function ToggleGroup({
|
|
|
5525
5918
|
children,
|
|
5526
5919
|
...props
|
|
5527
5920
|
}) {
|
|
5528
|
-
return /* @__PURE__ */
|
|
5921
|
+
return /* @__PURE__ */ jsx54(
|
|
5529
5922
|
ToggleGroupPrimitive.Root,
|
|
5530
5923
|
{
|
|
5531
5924
|
"data-slot": "toggle-group",
|
|
@@ -5536,7 +5929,7 @@ function ToggleGroup({
|
|
|
5536
5929
|
className
|
|
5537
5930
|
),
|
|
5538
5931
|
...props,
|
|
5539
|
-
children: /* @__PURE__ */
|
|
5932
|
+
children: /* @__PURE__ */ jsx54(ToggleGroupContext.Provider, { value: { variant, size }, children })
|
|
5540
5933
|
}
|
|
5541
5934
|
);
|
|
5542
5935
|
}
|
|
@@ -5547,8 +5940,8 @@ function ToggleGroupItem({
|
|
|
5547
5940
|
size,
|
|
5548
5941
|
...props
|
|
5549
5942
|
}) {
|
|
5550
|
-
const context =
|
|
5551
|
-
return /* @__PURE__ */
|
|
5943
|
+
const context = React50.useContext(ToggleGroupContext);
|
|
5944
|
+
return /* @__PURE__ */ jsx54(
|
|
5552
5945
|
ToggleGroupPrimitive.Item,
|
|
5553
5946
|
{
|
|
5554
5947
|
"data-slot": "toggle-group-item",
|
|
@@ -5572,7 +5965,7 @@ function ToggleGroupItem({
|
|
|
5572
5965
|
import { Slot as Slot7 } from "@radix-ui/react-slot";
|
|
5573
5966
|
import { cva as cva9 } from "class-variance-authority";
|
|
5574
5967
|
import "react";
|
|
5575
|
-
import { jsx as
|
|
5968
|
+
import { jsx as jsx55 } from "react/jsx-runtime";
|
|
5576
5969
|
var displayTextVariants = cva9(
|
|
5577
5970
|
"tracking-normal font-normal leading-none text-brand-dark font-serif italic",
|
|
5578
5971
|
{
|
|
@@ -5595,7 +5988,7 @@ function DisplayHeading({
|
|
|
5595
5988
|
...props
|
|
5596
5989
|
}) {
|
|
5597
5990
|
const Comp = asChild ? Slot7 : "h1";
|
|
5598
|
-
return /* @__PURE__ */
|
|
5991
|
+
return /* @__PURE__ */ jsx55(
|
|
5599
5992
|
Comp,
|
|
5600
5993
|
{
|
|
5601
5994
|
"data-slot": "h1",
|
|
@@ -5624,7 +6017,7 @@ function Body({
|
|
|
5624
6017
|
...props
|
|
5625
6018
|
}) {
|
|
5626
6019
|
const Comp = asChild ? Slot7 : "p";
|
|
5627
|
-
return /* @__PURE__ */
|
|
6020
|
+
return /* @__PURE__ */ jsx55(
|
|
5628
6021
|
Comp,
|
|
5629
6022
|
{
|
|
5630
6023
|
"data-slot": "h1",
|
|
@@ -5639,7 +6032,7 @@ function HeadingXL({
|
|
|
5639
6032
|
...props
|
|
5640
6033
|
}) {
|
|
5641
6034
|
const Comp = asChild ? Slot7 : "h1";
|
|
5642
|
-
return /* @__PURE__ */
|
|
6035
|
+
return /* @__PURE__ */ jsx55(
|
|
5643
6036
|
Comp,
|
|
5644
6037
|
{
|
|
5645
6038
|
"data-slot": "h1",
|
|
@@ -5657,7 +6050,7 @@ function HeadingL({
|
|
|
5657
6050
|
...props
|
|
5658
6051
|
}) {
|
|
5659
6052
|
const Comp = asChild ? Slot7 : "h2";
|
|
5660
|
-
return /* @__PURE__ */
|
|
6053
|
+
return /* @__PURE__ */ jsx55(
|
|
5661
6054
|
Comp,
|
|
5662
6055
|
{
|
|
5663
6056
|
"data-slot": "h2",
|
|
@@ -5675,7 +6068,7 @@ function HeadingM({
|
|
|
5675
6068
|
...props
|
|
5676
6069
|
}) {
|
|
5677
6070
|
const Comp = asChild ? Slot7 : "h3";
|
|
5678
|
-
return /* @__PURE__ */
|
|
6071
|
+
return /* @__PURE__ */ jsx55(
|
|
5679
6072
|
Comp,
|
|
5680
6073
|
{
|
|
5681
6074
|
"data-slot": "h3",
|
|
@@ -5693,7 +6086,7 @@ function HeadingS({
|
|
|
5693
6086
|
...props
|
|
5694
6087
|
}) {
|
|
5695
6088
|
const Comp = asChild ? Slot7 : "h4";
|
|
5696
|
-
return /* @__PURE__ */
|
|
6089
|
+
return /* @__PURE__ */ jsx55(
|
|
5697
6090
|
Comp,
|
|
5698
6091
|
{
|
|
5699
6092
|
"data-slot": "h4",
|
|
@@ -5711,7 +6104,7 @@ function HeadingXS({
|
|
|
5711
6104
|
...props
|
|
5712
6105
|
}) {
|
|
5713
6106
|
const Comp = asChild ? Slot7 : "h5";
|
|
5714
|
-
return /* @__PURE__ */
|
|
6107
|
+
return /* @__PURE__ */ jsx55(
|
|
5715
6108
|
Comp,
|
|
5716
6109
|
{
|
|
5717
6110
|
"data-slot": "h5",
|
|
@@ -5729,7 +6122,7 @@ function HeadingXXS({
|
|
|
5729
6122
|
...props
|
|
5730
6123
|
}) {
|
|
5731
6124
|
const Comp = asChild ? Slot7 : "h6";
|
|
5732
|
-
return /* @__PURE__ */
|
|
6125
|
+
return /* @__PURE__ */ jsx55(
|
|
5733
6126
|
Comp,
|
|
5734
6127
|
{
|
|
5735
6128
|
"data-slot": "h5",
|
|
@@ -5741,6 +6134,9 @@ function HeadingXXS({
|
|
|
5741
6134
|
}
|
|
5742
6135
|
);
|
|
5743
6136
|
}
|
|
6137
|
+
|
|
6138
|
+
// src/hooks/use-theme.ts
|
|
6139
|
+
import { useTheme as useTheme3 } from "next-themes";
|
|
5744
6140
|
export {
|
|
5745
6141
|
Accordion,
|
|
5746
6142
|
AccordionContent,
|
|
@@ -5926,6 +6322,12 @@ export {
|
|
|
5926
6322
|
ResizablePanelGroup,
|
|
5927
6323
|
ScrollArea,
|
|
5928
6324
|
ScrollBar,
|
|
6325
|
+
SearchableSelect,
|
|
6326
|
+
SearchableSelectContent,
|
|
6327
|
+
SearchableSelectEmpty,
|
|
6328
|
+
SearchableSelectGroup,
|
|
6329
|
+
SearchableSelectItem,
|
|
6330
|
+
SearchableSelectTrigger,
|
|
5929
6331
|
Select,
|
|
5930
6332
|
SelectContent,
|
|
5931
6333
|
SelectGroup,
|
|
@@ -5992,6 +6394,8 @@ export {
|
|
|
5992
6394
|
TabsList,
|
|
5993
6395
|
TabsTrigger,
|
|
5994
6396
|
Textarea,
|
|
6397
|
+
ThemeProvider,
|
|
6398
|
+
ThemeToggle,
|
|
5995
6399
|
TimeInput,
|
|
5996
6400
|
Toaster,
|
|
5997
6401
|
Toggle,
|
|
@@ -6012,6 +6416,7 @@ export {
|
|
|
6012
6416
|
toggleVariants,
|
|
6013
6417
|
useFormField,
|
|
6014
6418
|
useIsMobile,
|
|
6015
|
-
useSidebar
|
|
6419
|
+
useSidebar,
|
|
6420
|
+
useTheme3 as useTheme
|
|
6016
6421
|
};
|
|
6017
6422
|
//# sourceMappingURL=index.mjs.map
|