@codapet/design-system 0.5.9 → 0.6.0
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 +39 -1
- package/dist/index.mjs +522 -175
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -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,7 +5581,7 @@ 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",
|
|
@@ -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",
|
|
@@ -5269,8 +5610,8 @@ function TabsContent({
|
|
|
5269
5610
|
// src/components/ui/time-input.tsx
|
|
5270
5611
|
import "class-variance-authority";
|
|
5271
5612
|
import { Clock } from "lucide-react";
|
|
5272
|
-
import * as
|
|
5273
|
-
import { jsx as
|
|
5613
|
+
import * as React47 from "react";
|
|
5614
|
+
import { jsx as jsx50, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
5274
5615
|
var TIME_FORMAT_PLACEHOLDER = {
|
|
5275
5616
|
"12h": "hh:mm AM/PM",
|
|
5276
5617
|
"24h": "HH:mm",
|
|
@@ -5323,16 +5664,16 @@ function TimeInput({
|
|
|
5323
5664
|
formatDisplay
|
|
5324
5665
|
}) {
|
|
5325
5666
|
const resolvedPlaceholder = placeholder ?? TIME_FORMAT_PLACEHOLDER[timeFormat];
|
|
5326
|
-
const displayValue =
|
|
5667
|
+
const displayValue = React47.useMemo(() => {
|
|
5327
5668
|
if (!time) return "";
|
|
5328
5669
|
if (formatDisplay) return formatDisplay(time);
|
|
5329
5670
|
return formatTime(time, timeFormat);
|
|
5330
5671
|
}, [time, formatDisplay, timeFormat]);
|
|
5331
|
-
const [open, setOpen] =
|
|
5332
|
-
const hoursRef =
|
|
5333
|
-
const minutesRef =
|
|
5334
|
-
const periodRef =
|
|
5335
|
-
const scrollToSelected =
|
|
5672
|
+
const [open, setOpen] = React47.useState(false);
|
|
5673
|
+
const hoursRef = React47.useRef(null);
|
|
5674
|
+
const minutesRef = React47.useRef(null);
|
|
5675
|
+
const periodRef = React47.useRef(null);
|
|
5676
|
+
const scrollToSelected = React47.useCallback(() => {
|
|
5336
5677
|
requestAnimationFrame(() => {
|
|
5337
5678
|
for (const ref of [hoursRef, minutesRef, periodRef]) {
|
|
5338
5679
|
const container = ref.current;
|
|
@@ -5344,7 +5685,7 @@ function TimeInput({
|
|
|
5344
5685
|
}
|
|
5345
5686
|
});
|
|
5346
5687
|
}, []);
|
|
5347
|
-
|
|
5688
|
+
React47.useEffect(() => {
|
|
5348
5689
|
if (open) {
|
|
5349
5690
|
scrollToSelected();
|
|
5350
5691
|
}
|
|
@@ -5380,8 +5721,8 @@ function TimeInput({
|
|
|
5380
5721
|
const selectedH12 = time ? getDisplayHour(time.hours, timeFormat) : null;
|
|
5381
5722
|
const selectedMinute = time?.minutes ?? null;
|
|
5382
5723
|
const selectedPeriod = time ? getPeriod(time.hours) : null;
|
|
5383
|
-
return /* @__PURE__ */
|
|
5384
|
-
/* @__PURE__ */
|
|
5724
|
+
return /* @__PURE__ */ jsx50("div", { className: cn("relative flex gap-2", className), children: /* @__PURE__ */ jsxs25(Popover, { open, onOpenChange: setOpen, children: [
|
|
5725
|
+
/* @__PURE__ */ jsx50(PopoverTrigger, { asChild: true, disabled: inputDisabled, children: /* @__PURE__ */ jsxs25(
|
|
5385
5726
|
Button,
|
|
5386
5727
|
{
|
|
5387
5728
|
type: "button",
|
|
@@ -5396,18 +5737,18 @@ function TimeInput({
|
|
|
5396
5737
|
disabled: inputDisabled,
|
|
5397
5738
|
children: [
|
|
5398
5739
|
displayValue || resolvedPlaceholder,
|
|
5399
|
-
icon !== void 0 ? icon : /* @__PURE__ */
|
|
5740
|
+
icon !== void 0 ? icon : /* @__PURE__ */ jsx50(Clock, { className: "h-4 w-4 text-muted-foreground shrink-0" })
|
|
5400
5741
|
]
|
|
5401
5742
|
}
|
|
5402
5743
|
) }),
|
|
5403
|
-
/* @__PURE__ */
|
|
5744
|
+
/* @__PURE__ */ jsx50(
|
|
5404
5745
|
PopoverContent,
|
|
5405
5746
|
{
|
|
5406
5747
|
className: cn("w-auto p-0", popoverContentClassName),
|
|
5407
5748
|
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
5408
5749
|
...popoverContentProps,
|
|
5409
|
-
children: /* @__PURE__ */
|
|
5410
|
-
/* @__PURE__ */
|
|
5750
|
+
children: /* @__PURE__ */ jsxs25("div", { className: "flex divide-x border border-blue-500 rounded-md", children: [
|
|
5751
|
+
/* @__PURE__ */ jsx50("div", { className: "h-56 w-16 overflow-y-auto overscroll-y-contain [-webkit-overflow-scrolling:touch]", children: /* @__PURE__ */ jsx50("div", { ref: hoursRef, className: "flex flex-col p-1 ", children: hoursList.map((h) => /* @__PURE__ */ jsx50(
|
|
5411
5752
|
Button,
|
|
5412
5753
|
{
|
|
5413
5754
|
variant: "ghost",
|
|
@@ -5422,7 +5763,7 @@ function TimeInput({
|
|
|
5422
5763
|
},
|
|
5423
5764
|
h
|
|
5424
5765
|
)) }) }),
|
|
5425
|
-
/* @__PURE__ */
|
|
5766
|
+
/* @__PURE__ */ jsx50("div", { className: "h-56 w-16 overflow-y-auto overscroll-y-contain [-webkit-overflow-scrolling:touch]", children: /* @__PURE__ */ jsx50(
|
|
5426
5767
|
"div",
|
|
5427
5768
|
{
|
|
5428
5769
|
ref: minutesRef,
|
|
@@ -5430,7 +5771,7 @@ function TimeInput({
|
|
|
5430
5771
|
"flex flex-col p-1",
|
|
5431
5772
|
minutesList.length <= 12 && "h-full justify-center"
|
|
5432
5773
|
),
|
|
5433
|
-
children: minutesList.map((m) => /* @__PURE__ */
|
|
5774
|
+
children: minutesList.map((m) => /* @__PURE__ */ jsx50(
|
|
5434
5775
|
Button,
|
|
5435
5776
|
{
|
|
5436
5777
|
variant: "ghost",
|
|
@@ -5447,7 +5788,7 @@ function TimeInput({
|
|
|
5447
5788
|
))
|
|
5448
5789
|
}
|
|
5449
5790
|
) }),
|
|
5450
|
-
!is24HourFormat(timeFormat) && /* @__PURE__ */
|
|
5791
|
+
!is24HourFormat(timeFormat) && /* @__PURE__ */ jsx50("div", { className: "flex flex-col p-1 justify-center gap-1", children: ["AM", "PM"].map((p) => /* @__PURE__ */ jsx50(
|
|
5451
5792
|
Button,
|
|
5452
5793
|
{
|
|
5453
5794
|
variant: "ghost",
|
|
@@ -5472,7 +5813,7 @@ function TimeInput({
|
|
|
5472
5813
|
import "react";
|
|
5473
5814
|
import * as TogglePrimitive from "@radix-ui/react-toggle";
|
|
5474
5815
|
import { cva as cva8 } from "class-variance-authority";
|
|
5475
|
-
import { jsx as
|
|
5816
|
+
import { jsx as jsx51 } from "react/jsx-runtime";
|
|
5476
5817
|
var toggleVariants = cva8(
|
|
5477
5818
|
"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
5819
|
{
|
|
@@ -5499,7 +5840,7 @@ function Toggle({
|
|
|
5499
5840
|
size,
|
|
5500
5841
|
...props
|
|
5501
5842
|
}) {
|
|
5502
|
-
return /* @__PURE__ */
|
|
5843
|
+
return /* @__PURE__ */ jsx51(
|
|
5503
5844
|
TogglePrimitive.Root,
|
|
5504
5845
|
{
|
|
5505
5846
|
"data-slot": "toggle",
|
|
@@ -5510,11 +5851,11 @@ function Toggle({
|
|
|
5510
5851
|
}
|
|
5511
5852
|
|
|
5512
5853
|
// src/components/ui/toggle-group.tsx
|
|
5513
|
-
import * as
|
|
5854
|
+
import * as React49 from "react";
|
|
5514
5855
|
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
|
|
5515
5856
|
import "class-variance-authority";
|
|
5516
|
-
import { jsx as
|
|
5517
|
-
var ToggleGroupContext =
|
|
5857
|
+
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
5858
|
+
var ToggleGroupContext = React49.createContext({
|
|
5518
5859
|
size: "default",
|
|
5519
5860
|
variant: "default"
|
|
5520
5861
|
});
|
|
@@ -5525,7 +5866,7 @@ function ToggleGroup({
|
|
|
5525
5866
|
children,
|
|
5526
5867
|
...props
|
|
5527
5868
|
}) {
|
|
5528
|
-
return /* @__PURE__ */
|
|
5869
|
+
return /* @__PURE__ */ jsx52(
|
|
5529
5870
|
ToggleGroupPrimitive.Root,
|
|
5530
5871
|
{
|
|
5531
5872
|
"data-slot": "toggle-group",
|
|
@@ -5536,7 +5877,7 @@ function ToggleGroup({
|
|
|
5536
5877
|
className
|
|
5537
5878
|
),
|
|
5538
5879
|
...props,
|
|
5539
|
-
children: /* @__PURE__ */
|
|
5880
|
+
children: /* @__PURE__ */ jsx52(ToggleGroupContext.Provider, { value: { variant, size }, children })
|
|
5540
5881
|
}
|
|
5541
5882
|
);
|
|
5542
5883
|
}
|
|
@@ -5547,8 +5888,8 @@ function ToggleGroupItem({
|
|
|
5547
5888
|
size,
|
|
5548
5889
|
...props
|
|
5549
5890
|
}) {
|
|
5550
|
-
const context =
|
|
5551
|
-
return /* @__PURE__ */
|
|
5891
|
+
const context = React49.useContext(ToggleGroupContext);
|
|
5892
|
+
return /* @__PURE__ */ jsx52(
|
|
5552
5893
|
ToggleGroupPrimitive.Item,
|
|
5553
5894
|
{
|
|
5554
5895
|
"data-slot": "toggle-group-item",
|
|
@@ -5572,7 +5913,7 @@ function ToggleGroupItem({
|
|
|
5572
5913
|
import { Slot as Slot7 } from "@radix-ui/react-slot";
|
|
5573
5914
|
import { cva as cva9 } from "class-variance-authority";
|
|
5574
5915
|
import "react";
|
|
5575
|
-
import { jsx as
|
|
5916
|
+
import { jsx as jsx53 } from "react/jsx-runtime";
|
|
5576
5917
|
var displayTextVariants = cva9(
|
|
5577
5918
|
"tracking-normal font-normal leading-none text-brand-dark font-serif italic",
|
|
5578
5919
|
{
|
|
@@ -5595,7 +5936,7 @@ function DisplayHeading({
|
|
|
5595
5936
|
...props
|
|
5596
5937
|
}) {
|
|
5597
5938
|
const Comp = asChild ? Slot7 : "h1";
|
|
5598
|
-
return /* @__PURE__ */
|
|
5939
|
+
return /* @__PURE__ */ jsx53(
|
|
5599
5940
|
Comp,
|
|
5600
5941
|
{
|
|
5601
5942
|
"data-slot": "h1",
|
|
@@ -5624,7 +5965,7 @@ function Body({
|
|
|
5624
5965
|
...props
|
|
5625
5966
|
}) {
|
|
5626
5967
|
const Comp = asChild ? Slot7 : "p";
|
|
5627
|
-
return /* @__PURE__ */
|
|
5968
|
+
return /* @__PURE__ */ jsx53(
|
|
5628
5969
|
Comp,
|
|
5629
5970
|
{
|
|
5630
5971
|
"data-slot": "h1",
|
|
@@ -5639,7 +5980,7 @@ function HeadingXL({
|
|
|
5639
5980
|
...props
|
|
5640
5981
|
}) {
|
|
5641
5982
|
const Comp = asChild ? Slot7 : "h1";
|
|
5642
|
-
return /* @__PURE__ */
|
|
5983
|
+
return /* @__PURE__ */ jsx53(
|
|
5643
5984
|
Comp,
|
|
5644
5985
|
{
|
|
5645
5986
|
"data-slot": "h1",
|
|
@@ -5657,7 +5998,7 @@ function HeadingL({
|
|
|
5657
5998
|
...props
|
|
5658
5999
|
}) {
|
|
5659
6000
|
const Comp = asChild ? Slot7 : "h2";
|
|
5660
|
-
return /* @__PURE__ */
|
|
6001
|
+
return /* @__PURE__ */ jsx53(
|
|
5661
6002
|
Comp,
|
|
5662
6003
|
{
|
|
5663
6004
|
"data-slot": "h2",
|
|
@@ -5675,7 +6016,7 @@ function HeadingM({
|
|
|
5675
6016
|
...props
|
|
5676
6017
|
}) {
|
|
5677
6018
|
const Comp = asChild ? Slot7 : "h3";
|
|
5678
|
-
return /* @__PURE__ */
|
|
6019
|
+
return /* @__PURE__ */ jsx53(
|
|
5679
6020
|
Comp,
|
|
5680
6021
|
{
|
|
5681
6022
|
"data-slot": "h3",
|
|
@@ -5693,7 +6034,7 @@ function HeadingS({
|
|
|
5693
6034
|
...props
|
|
5694
6035
|
}) {
|
|
5695
6036
|
const Comp = asChild ? Slot7 : "h4";
|
|
5696
|
-
return /* @__PURE__ */
|
|
6037
|
+
return /* @__PURE__ */ jsx53(
|
|
5697
6038
|
Comp,
|
|
5698
6039
|
{
|
|
5699
6040
|
"data-slot": "h4",
|
|
@@ -5711,7 +6052,7 @@ function HeadingXS({
|
|
|
5711
6052
|
...props
|
|
5712
6053
|
}) {
|
|
5713
6054
|
const Comp = asChild ? Slot7 : "h5";
|
|
5714
|
-
return /* @__PURE__ */
|
|
6055
|
+
return /* @__PURE__ */ jsx53(
|
|
5715
6056
|
Comp,
|
|
5716
6057
|
{
|
|
5717
6058
|
"data-slot": "h5",
|
|
@@ -5729,7 +6070,7 @@ function HeadingXXS({
|
|
|
5729
6070
|
...props
|
|
5730
6071
|
}) {
|
|
5731
6072
|
const Comp = asChild ? Slot7 : "h6";
|
|
5732
|
-
return /* @__PURE__ */
|
|
6073
|
+
return /* @__PURE__ */ jsx53(
|
|
5733
6074
|
Comp,
|
|
5734
6075
|
{
|
|
5735
6076
|
"data-slot": "h5",
|
|
@@ -5926,6 +6267,12 @@ export {
|
|
|
5926
6267
|
ResizablePanelGroup,
|
|
5927
6268
|
ScrollArea,
|
|
5928
6269
|
ScrollBar,
|
|
6270
|
+
SearchableSelect,
|
|
6271
|
+
SearchableSelectContent,
|
|
6272
|
+
SearchableSelectEmpty,
|
|
6273
|
+
SearchableSelectGroup,
|
|
6274
|
+
SearchableSelectItem,
|
|
6275
|
+
SearchableSelectTrigger,
|
|
5929
6276
|
Select,
|
|
5930
6277
|
SelectContent,
|
|
5931
6278
|
SelectGroup,
|