@pulog/ui 0.0.0-stage → 0.1.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/README.md +95 -2
- package/dist/button-Cne9rSSH.d.ts +16 -0
- package/dist/carousel.d.ts +34 -0
- package/dist/carousel.js +196 -0
- package/dist/carousel.js.map +1 -0
- package/dist/chart.d.ts +48 -0
- package/dist/chart.js +248 -0
- package/dist/chart.js.map +1 -0
- package/dist/chunk-JYU5CUA4.js +11 -0
- package/dist/chunk-JYU5CUA4.js.map +1 -0
- package/dist/chunk-LIIDSNMG.js +61 -0
- package/dist/chunk-LIIDSNMG.js.map +1 -0
- package/dist/drawer.d.ts +16 -0
- package/dist/drawer.js +120 -0
- package/dist/drawer.js.map +1 -0
- package/dist/index.d.ts +513 -0
- package/dist/index.js +4281 -0
- package/dist/index.js.map +1 -0
- package/dist/input-otp.d.ts +14 -0
- package/dist/input-otp.js +82 -0
- package/dist/input-otp.js.map +1 -0
- package/dist/resizable.d.ts +10 -0
- package/dist/resizable.js +46 -0
- package/dist/resizable.js.map +1 -0
- package/dist/sonner.d.ts +6 -0
- package/dist/sonner.js +39 -0
- package/dist/sonner.js.map +1 -0
- package/package.json +105 -4
package/dist/index.js
ADDED
|
@@ -0,0 +1,4281 @@
|
|
|
1
|
+
import { buttonVariants, Button } from './chunk-LIIDSNMG.js';
|
|
2
|
+
export { Button, buttonVariants } from './chunk-LIIDSNMG.js';
|
|
3
|
+
import { usePortalContainer } from './chunk-JYU5CUA4.js';
|
|
4
|
+
export { PortalContainerContext, usePortalContainer } from './chunk-JYU5CUA4.js';
|
|
5
|
+
import { cn } from '@pulog/utils';
|
|
6
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
7
|
+
import * as React4 from 'react';
|
|
8
|
+
import { useMemo } from 'react';
|
|
9
|
+
import { Checkbox as Checkbox$1, Popover as Popover$1, Slot, Select as Select$1, DropdownMenu as DropdownMenu$1, Dialog as Dialog$1, Accordion as Accordion$1, AlertDialog as AlertDialog$1, AspectRatio as AspectRatio$1, Avatar as Avatar$1, Separator as Separator$1, Collapsible as Collapsible$1, ContextMenu as ContextMenu$1, Label as Label$1, HoverCard as HoverCard$1, Menubar as Menubar$1, NavigationMenu as NavigationMenu$1, Progress as Progress$1, RadioGroup as RadioGroup$1, ScrollArea as ScrollArea$1, Slider as Slider$1, Switch as Switch$1, Tabs as Tabs$1, Toggle as Toggle$1, ToggleGroup as ToggleGroup$1, Tooltip as Tooltip$1 } from 'radix-ui';
|
|
10
|
+
import { CheckIcon, ChevronLeftIcon, ChevronRightIcon, ChevronDownIcon, ChevronUpIcon, ShieldAlert, XIcon, SearchIcon, ChevronsUpDown, Loader2, MoreHorizontalIcon, ChevronLeft, ChevronRight, Loader2Icon } from 'lucide-react';
|
|
11
|
+
import { getDefaultClassNames, DayPicker } from 'react-day-picker';
|
|
12
|
+
import { cva } from 'class-variance-authority';
|
|
13
|
+
import { Command as Command$1 } from 'cmdk';
|
|
14
|
+
|
|
15
|
+
function Input({ className, type, ...props }) {
|
|
16
|
+
return /* @__PURE__ */ jsx(
|
|
17
|
+
"input",
|
|
18
|
+
{
|
|
19
|
+
type,
|
|
20
|
+
"data-slot": "input",
|
|
21
|
+
className: cn(
|
|
22
|
+
"h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-2.5 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground/60 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
|
|
23
|
+
className
|
|
24
|
+
),
|
|
25
|
+
...props
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
var Checkbox = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
30
|
+
Checkbox$1.Root,
|
|
31
|
+
{
|
|
32
|
+
ref,
|
|
33
|
+
"data-slot": "checkbox",
|
|
34
|
+
className: cn(
|
|
35
|
+
"peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input shadow-xs transition-shadow outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary",
|
|
36
|
+
className
|
|
37
|
+
),
|
|
38
|
+
...props,
|
|
39
|
+
children: /* @__PURE__ */ jsx(
|
|
40
|
+
Checkbox$1.Indicator,
|
|
41
|
+
{
|
|
42
|
+
"data-slot": "checkbox-indicator",
|
|
43
|
+
className: "grid place-content-center text-current transition-none [&>svg]:size-3.5",
|
|
44
|
+
children: /* @__PURE__ */ jsx(
|
|
45
|
+
CheckIcon,
|
|
46
|
+
{}
|
|
47
|
+
)
|
|
48
|
+
}
|
|
49
|
+
)
|
|
50
|
+
}
|
|
51
|
+
));
|
|
52
|
+
Checkbox.displayName = Checkbox$1.Root.displayName;
|
|
53
|
+
function Popover({
|
|
54
|
+
...props
|
|
55
|
+
}) {
|
|
56
|
+
return /* @__PURE__ */ jsx(Popover$1.Root, { "data-slot": "popover", ...props });
|
|
57
|
+
}
|
|
58
|
+
function PopoverTrigger({
|
|
59
|
+
...props
|
|
60
|
+
}) {
|
|
61
|
+
return /* @__PURE__ */ jsx(Popover$1.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
62
|
+
}
|
|
63
|
+
function PopoverContent({
|
|
64
|
+
className,
|
|
65
|
+
align = "center",
|
|
66
|
+
sideOffset = 4,
|
|
67
|
+
...props
|
|
68
|
+
}) {
|
|
69
|
+
const portalContainer = usePortalContainer();
|
|
70
|
+
return /* @__PURE__ */ jsx(Popover$1.Portal, { container: portalContainer ?? void 0, children: /* @__PURE__ */ jsx(
|
|
71
|
+
Popover$1.Content,
|
|
72
|
+
{
|
|
73
|
+
"data-slot": "popover-content",
|
|
74
|
+
align,
|
|
75
|
+
sideOffset,
|
|
76
|
+
className: cn(
|
|
77
|
+
"z-50 flex w-72 origin-(--radix-popover-content-transform-origin) flex-col gap-4 rounded-md bg-popover p-4 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
78
|
+
className
|
|
79
|
+
),
|
|
80
|
+
...props
|
|
81
|
+
}
|
|
82
|
+
) });
|
|
83
|
+
}
|
|
84
|
+
function PopoverAnchor({
|
|
85
|
+
...props
|
|
86
|
+
}) {
|
|
87
|
+
return /* @__PURE__ */ jsx(Popover$1.Anchor, { "data-slot": "popover-anchor", ...props });
|
|
88
|
+
}
|
|
89
|
+
function PopoverHeader({ className, ...props }) {
|
|
90
|
+
return /* @__PURE__ */ jsx(
|
|
91
|
+
"div",
|
|
92
|
+
{
|
|
93
|
+
"data-slot": "popover-header",
|
|
94
|
+
className: cn("flex flex-col gap-1 text-sm", className),
|
|
95
|
+
...props
|
|
96
|
+
}
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
function PopoverTitle({ className, ...props }) {
|
|
100
|
+
return /* @__PURE__ */ jsx(
|
|
101
|
+
"div",
|
|
102
|
+
{
|
|
103
|
+
"data-slot": "popover-title",
|
|
104
|
+
className: cn("font-medium", className),
|
|
105
|
+
...props
|
|
106
|
+
}
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
function PopoverDescription({
|
|
110
|
+
className,
|
|
111
|
+
...props
|
|
112
|
+
}) {
|
|
113
|
+
return /* @__PURE__ */ jsx(
|
|
114
|
+
"p",
|
|
115
|
+
{
|
|
116
|
+
"data-slot": "popover-description",
|
|
117
|
+
className: cn("text-muted-foreground", className),
|
|
118
|
+
...props
|
|
119
|
+
}
|
|
120
|
+
);
|
|
121
|
+
}
|
|
122
|
+
function Calendar({
|
|
123
|
+
className,
|
|
124
|
+
classNames,
|
|
125
|
+
showOutsideDays = true,
|
|
126
|
+
captionLayout = "label",
|
|
127
|
+
buttonVariant = "ghost",
|
|
128
|
+
locale,
|
|
129
|
+
formatters,
|
|
130
|
+
components,
|
|
131
|
+
...props
|
|
132
|
+
}) {
|
|
133
|
+
const defaultClassNames = getDefaultClassNames();
|
|
134
|
+
return /* @__PURE__ */ jsx(
|
|
135
|
+
DayPicker,
|
|
136
|
+
{
|
|
137
|
+
showOutsideDays,
|
|
138
|
+
className: cn(
|
|
139
|
+
"group/calendar bg-background p-3 [--cell-radius:var(--radius-md)] [--cell-size:--spacing(8)] in-data-[slot=card-content]:bg-transparent in-data-[slot=popover-content]:bg-transparent",
|
|
140
|
+
String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
|
|
141
|
+
String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
|
|
142
|
+
className
|
|
143
|
+
),
|
|
144
|
+
captionLayout,
|
|
145
|
+
locale,
|
|
146
|
+
formatters: {
|
|
147
|
+
formatMonthDropdown: (date) => date.toLocaleString(locale?.code, { month: "short" }),
|
|
148
|
+
...formatters
|
|
149
|
+
},
|
|
150
|
+
classNames: {
|
|
151
|
+
root: cn("w-fit", defaultClassNames.root),
|
|
152
|
+
months: cn(
|
|
153
|
+
"relative flex flex-col gap-4 md:flex-row",
|
|
154
|
+
defaultClassNames.months
|
|
155
|
+
),
|
|
156
|
+
month: cn("flex w-full flex-col gap-4", defaultClassNames.month),
|
|
157
|
+
nav: cn(
|
|
158
|
+
"absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",
|
|
159
|
+
defaultClassNames.nav
|
|
160
|
+
),
|
|
161
|
+
button_previous: cn(
|
|
162
|
+
buttonVariants({ variant: buttonVariant }),
|
|
163
|
+
"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
|
|
164
|
+
defaultClassNames.button_previous
|
|
165
|
+
),
|
|
166
|
+
button_next: cn(
|
|
167
|
+
buttonVariants({ variant: buttonVariant }),
|
|
168
|
+
"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
|
|
169
|
+
defaultClassNames.button_next
|
|
170
|
+
),
|
|
171
|
+
month_caption: cn(
|
|
172
|
+
"flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)",
|
|
173
|
+
defaultClassNames.month_caption
|
|
174
|
+
),
|
|
175
|
+
dropdowns: cn(
|
|
176
|
+
"flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium",
|
|
177
|
+
defaultClassNames.dropdowns
|
|
178
|
+
),
|
|
179
|
+
dropdown_root: cn(
|
|
180
|
+
"relative rounded-(--cell-radius)",
|
|
181
|
+
defaultClassNames.dropdown_root
|
|
182
|
+
),
|
|
183
|
+
dropdown: cn(
|
|
184
|
+
"absolute inset-0 bg-popover opacity-0",
|
|
185
|
+
defaultClassNames.dropdown
|
|
186
|
+
),
|
|
187
|
+
caption_label: cn(
|
|
188
|
+
"font-medium select-none",
|
|
189
|
+
captionLayout === "label" ? "text-sm" : "flex items-center gap-1 rounded-(--cell-radius) text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground",
|
|
190
|
+
defaultClassNames.caption_label
|
|
191
|
+
),
|
|
192
|
+
// @ts-expect-error legacy key (react-day-picker v8 name), kept to leave rendered output untouched
|
|
193
|
+
table: "w-full border-collapse",
|
|
194
|
+
weekdays: cn("flex", defaultClassNames.weekdays),
|
|
195
|
+
weekday: cn(
|
|
196
|
+
"flex-1 rounded-(--cell-radius) text-[0.8rem] font-normal text-muted-foreground select-none",
|
|
197
|
+
defaultClassNames.weekday
|
|
198
|
+
),
|
|
199
|
+
week: cn("mt-2 flex w-full", defaultClassNames.week),
|
|
200
|
+
week_number_header: cn(
|
|
201
|
+
"w-(--cell-size) select-none",
|
|
202
|
+
defaultClassNames.week_number_header
|
|
203
|
+
),
|
|
204
|
+
week_number: cn(
|
|
205
|
+
"text-[0.8rem] text-muted-foreground select-none",
|
|
206
|
+
defaultClassNames.week_number
|
|
207
|
+
),
|
|
208
|
+
day: cn(
|
|
209
|
+
"group/day relative aspect-square h-full w-full rounded-(--cell-radius) p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-(--cell-radius)",
|
|
210
|
+
props.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-(--cell-radius)" : "[&:first-child[data-selected=true]_button]:rounded-l-(--cell-radius)",
|
|
211
|
+
defaultClassNames.day
|
|
212
|
+
),
|
|
213
|
+
range_start: cn(
|
|
214
|
+
"relative isolate z-0 rounded-l-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:right-0 after:w-4 after:bg-muted",
|
|
215
|
+
defaultClassNames.range_start
|
|
216
|
+
),
|
|
217
|
+
range_middle: cn("rounded-none", defaultClassNames.range_middle),
|
|
218
|
+
range_end: cn(
|
|
219
|
+
"relative isolate z-0 rounded-r-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:left-0 after:w-4 after:bg-muted",
|
|
220
|
+
defaultClassNames.range_end
|
|
221
|
+
),
|
|
222
|
+
today: cn(
|
|
223
|
+
"rounded-(--cell-radius) bg-muted text-foreground data-[selected=true]:rounded-none",
|
|
224
|
+
defaultClassNames.today
|
|
225
|
+
),
|
|
226
|
+
outside: cn(
|
|
227
|
+
"text-muted-foreground aria-selected:text-muted-foreground",
|
|
228
|
+
defaultClassNames.outside
|
|
229
|
+
),
|
|
230
|
+
disabled: cn(
|
|
231
|
+
"text-muted-foreground opacity-50",
|
|
232
|
+
defaultClassNames.disabled
|
|
233
|
+
),
|
|
234
|
+
hidden: cn("invisible", defaultClassNames.hidden),
|
|
235
|
+
...classNames
|
|
236
|
+
},
|
|
237
|
+
components: {
|
|
238
|
+
Root: ({ className: className2, rootRef, ...props2 }) => {
|
|
239
|
+
return /* @__PURE__ */ jsx(
|
|
240
|
+
"div",
|
|
241
|
+
{
|
|
242
|
+
"data-slot": "calendar",
|
|
243
|
+
ref: rootRef,
|
|
244
|
+
className: cn(className2),
|
|
245
|
+
...props2
|
|
246
|
+
}
|
|
247
|
+
);
|
|
248
|
+
},
|
|
249
|
+
Chevron: ({ className: className2, orientation, ...props2 }) => {
|
|
250
|
+
if (orientation === "left") {
|
|
251
|
+
return /* @__PURE__ */ jsx(ChevronLeftIcon, { className: cn("size-4", className2), ...props2 });
|
|
252
|
+
}
|
|
253
|
+
if (orientation === "right") {
|
|
254
|
+
return /* @__PURE__ */ jsx(ChevronRightIcon, { className: cn("size-4", className2), ...props2 });
|
|
255
|
+
}
|
|
256
|
+
return /* @__PURE__ */ jsx(ChevronDownIcon, { className: cn("size-4", className2), ...props2 });
|
|
257
|
+
},
|
|
258
|
+
DayButton: ({ ...props2 }) => /* @__PURE__ */ jsx(CalendarDayButton, { locale, ...props2 }),
|
|
259
|
+
WeekNumber: ({ children, ...props2 }) => {
|
|
260
|
+
return /* @__PURE__ */ jsx("td", { ...props2, children: /* @__PURE__ */ jsx("div", { className: "flex size-(--cell-size) items-center justify-center text-center", children }) });
|
|
261
|
+
},
|
|
262
|
+
...components
|
|
263
|
+
},
|
|
264
|
+
...props
|
|
265
|
+
}
|
|
266
|
+
);
|
|
267
|
+
}
|
|
268
|
+
function CalendarDayButton({
|
|
269
|
+
className,
|
|
270
|
+
day,
|
|
271
|
+
modifiers,
|
|
272
|
+
locale,
|
|
273
|
+
...props
|
|
274
|
+
}) {
|
|
275
|
+
const defaultClassNames = getDefaultClassNames();
|
|
276
|
+
const ref = React4.useRef(null);
|
|
277
|
+
React4.useEffect(() => {
|
|
278
|
+
if (modifiers.focused) ref.current?.focus();
|
|
279
|
+
}, [modifiers.focused]);
|
|
280
|
+
return /* @__PURE__ */ jsx(
|
|
281
|
+
Button,
|
|
282
|
+
{
|
|
283
|
+
ref,
|
|
284
|
+
variant: "ghost",
|
|
285
|
+
size: "icon",
|
|
286
|
+
"data-day": day.date.toLocaleDateString(locale?.code),
|
|
287
|
+
"data-selected-single": modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle,
|
|
288
|
+
"data-range-start": modifiers.range_start,
|
|
289
|
+
"data-range-end": modifiers.range_end,
|
|
290
|
+
"data-range-middle": modifiers.range_middle,
|
|
291
|
+
className: cn(
|
|
292
|
+
"relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 border-0 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-(--cell-radius) data-[range-end=true]:rounded-r-(--cell-radius) data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-muted data-[range-middle=true]:text-foreground data-[range-start=true]:rounded-(--cell-radius) data-[range-start=true]:rounded-l-(--cell-radius) data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-foreground [&>span]:text-xs [&>span]:opacity-70",
|
|
293
|
+
defaultClassNames.day,
|
|
294
|
+
className
|
|
295
|
+
),
|
|
296
|
+
...props
|
|
297
|
+
}
|
|
298
|
+
);
|
|
299
|
+
}
|
|
300
|
+
var badgeVariants = cva(
|
|
301
|
+
"group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",
|
|
302
|
+
{
|
|
303
|
+
variants: {
|
|
304
|
+
variant: {
|
|
305
|
+
default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
|
|
306
|
+
secondary: "bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",
|
|
307
|
+
destructive: "bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",
|
|
308
|
+
outline: "border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",
|
|
309
|
+
warning: "bg-amber-500/10 text-amber-700 dark:text-amber-400",
|
|
310
|
+
info: "bg-info/10 text-info",
|
|
311
|
+
ghost: "hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",
|
|
312
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
313
|
+
}
|
|
314
|
+
},
|
|
315
|
+
defaultVariants: {
|
|
316
|
+
variant: "default"
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
);
|
|
320
|
+
function Badge({
|
|
321
|
+
className,
|
|
322
|
+
variant = "default",
|
|
323
|
+
asChild = false,
|
|
324
|
+
...props
|
|
325
|
+
}) {
|
|
326
|
+
const Comp = asChild ? Slot.Root : "span";
|
|
327
|
+
return /* @__PURE__ */ jsx(
|
|
328
|
+
Comp,
|
|
329
|
+
{
|
|
330
|
+
"data-slot": "badge",
|
|
331
|
+
"data-variant": variant,
|
|
332
|
+
className: cn(badgeVariants({ variant }), className),
|
|
333
|
+
...props
|
|
334
|
+
}
|
|
335
|
+
);
|
|
336
|
+
}
|
|
337
|
+
var Table = React4.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
338
|
+
"div",
|
|
339
|
+
{
|
|
340
|
+
"data-slot": "table-container",
|
|
341
|
+
className: cn("relative w-full overflow-x-auto tms-scroll", containerClassName),
|
|
342
|
+
children: /* @__PURE__ */ jsx(
|
|
343
|
+
"table",
|
|
344
|
+
{
|
|
345
|
+
ref,
|
|
346
|
+
"data-slot": "table",
|
|
347
|
+
className: cn("min-w-full caption-bottom text-sm", className),
|
|
348
|
+
...props
|
|
349
|
+
}
|
|
350
|
+
)
|
|
351
|
+
}
|
|
352
|
+
));
|
|
353
|
+
Table.displayName = "Table";
|
|
354
|
+
var TableHeader = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
355
|
+
"thead",
|
|
356
|
+
{
|
|
357
|
+
ref,
|
|
358
|
+
"data-slot": "table-header",
|
|
359
|
+
className: cn("[&_tr]:border-b", className),
|
|
360
|
+
...props
|
|
361
|
+
}
|
|
362
|
+
));
|
|
363
|
+
TableHeader.displayName = "TableHeader";
|
|
364
|
+
var TableBody = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
365
|
+
"tbody",
|
|
366
|
+
{
|
|
367
|
+
ref,
|
|
368
|
+
"data-slot": "table-body",
|
|
369
|
+
className: cn(className),
|
|
370
|
+
...props
|
|
371
|
+
}
|
|
372
|
+
));
|
|
373
|
+
TableBody.displayName = "TableBody";
|
|
374
|
+
var TableFooter = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
375
|
+
"tfoot",
|
|
376
|
+
{
|
|
377
|
+
ref,
|
|
378
|
+
"data-slot": "table-footer",
|
|
379
|
+
className: cn(
|
|
380
|
+
"border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",
|
|
381
|
+
className
|
|
382
|
+
),
|
|
383
|
+
...props
|
|
384
|
+
}
|
|
385
|
+
));
|
|
386
|
+
TableFooter.displayName = "TableFooter";
|
|
387
|
+
var TableRow = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
388
|
+
"tr",
|
|
389
|
+
{
|
|
390
|
+
ref,
|
|
391
|
+
"data-slot": "table-row",
|
|
392
|
+
className: cn(
|
|
393
|
+
"border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted",
|
|
394
|
+
className
|
|
395
|
+
),
|
|
396
|
+
...props
|
|
397
|
+
}
|
|
398
|
+
));
|
|
399
|
+
TableRow.displayName = "TableRow";
|
|
400
|
+
var TableHead = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
401
|
+
"th",
|
|
402
|
+
{
|
|
403
|
+
ref,
|
|
404
|
+
"data-slot": "table-head",
|
|
405
|
+
className: cn(
|
|
406
|
+
"h-10 px-3 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0",
|
|
407
|
+
className
|
|
408
|
+
),
|
|
409
|
+
...props
|
|
410
|
+
}
|
|
411
|
+
));
|
|
412
|
+
TableHead.displayName = "TableHead";
|
|
413
|
+
var TableCell = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
414
|
+
"td",
|
|
415
|
+
{
|
|
416
|
+
ref,
|
|
417
|
+
"data-slot": "table-cell",
|
|
418
|
+
className: cn(
|
|
419
|
+
"p-3 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0",
|
|
420
|
+
className
|
|
421
|
+
),
|
|
422
|
+
...props
|
|
423
|
+
}
|
|
424
|
+
));
|
|
425
|
+
TableCell.displayName = "TableCell";
|
|
426
|
+
var TableCaption = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
427
|
+
"caption",
|
|
428
|
+
{
|
|
429
|
+
ref,
|
|
430
|
+
"data-slot": "table-caption",
|
|
431
|
+
className: cn("mt-4 text-sm text-muted-foreground", className),
|
|
432
|
+
...props
|
|
433
|
+
}
|
|
434
|
+
));
|
|
435
|
+
TableCaption.displayName = "TableCaption";
|
|
436
|
+
function Skeleton({ className, ...props }) {
|
|
437
|
+
return /* @__PURE__ */ jsx(
|
|
438
|
+
"div",
|
|
439
|
+
{
|
|
440
|
+
"data-slot": "skeleton",
|
|
441
|
+
className: cn("animate-pulse rounded-md bg-muted", className),
|
|
442
|
+
...props
|
|
443
|
+
}
|
|
444
|
+
);
|
|
445
|
+
}
|
|
446
|
+
function Select({
|
|
447
|
+
...props
|
|
448
|
+
}) {
|
|
449
|
+
return /* @__PURE__ */ jsx(Select$1.Root, { "data-slot": "select", ...props });
|
|
450
|
+
}
|
|
451
|
+
function SelectGroup({
|
|
452
|
+
className,
|
|
453
|
+
...props
|
|
454
|
+
}) {
|
|
455
|
+
return /* @__PURE__ */ jsx(
|
|
456
|
+
Select$1.Group,
|
|
457
|
+
{
|
|
458
|
+
"data-slot": "select-group",
|
|
459
|
+
className: cn("scroll-my-1 p-1", className),
|
|
460
|
+
...props
|
|
461
|
+
}
|
|
462
|
+
);
|
|
463
|
+
}
|
|
464
|
+
function SelectValue({
|
|
465
|
+
...props
|
|
466
|
+
}) {
|
|
467
|
+
return /* @__PURE__ */ jsx(Select$1.Value, { "data-slot": "select-value", ...props });
|
|
468
|
+
}
|
|
469
|
+
function SelectTrigger({
|
|
470
|
+
className,
|
|
471
|
+
size = "default",
|
|
472
|
+
children,
|
|
473
|
+
...props
|
|
474
|
+
}) {
|
|
475
|
+
return /* @__PURE__ */ jsxs(
|
|
476
|
+
Select$1.Trigger,
|
|
477
|
+
{
|
|
478
|
+
"data-slot": "select-trigger",
|
|
479
|
+
"data-size": size,
|
|
480
|
+
className: cn(
|
|
481
|
+
"flex w-fit items-center justify-between gap-1.5 rounded-md border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground/60 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
482
|
+
className
|
|
483
|
+
),
|
|
484
|
+
...props,
|
|
485
|
+
children: [
|
|
486
|
+
children,
|
|
487
|
+
/* @__PURE__ */ jsx(Select$1.Icon, { asChild: true, children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "pointer-events-none size-4 text-muted-foreground" }) })
|
|
488
|
+
]
|
|
489
|
+
}
|
|
490
|
+
);
|
|
491
|
+
}
|
|
492
|
+
function SelectContent({
|
|
493
|
+
className,
|
|
494
|
+
children,
|
|
495
|
+
position = "item-aligned",
|
|
496
|
+
align = "center",
|
|
497
|
+
...props
|
|
498
|
+
}) {
|
|
499
|
+
const portalContainer = usePortalContainer();
|
|
500
|
+
return /* @__PURE__ */ jsx(Select$1.Portal, { container: portalContainer ?? void 0, children: /* @__PURE__ */ jsxs(
|
|
501
|
+
Select$1.Content,
|
|
502
|
+
{
|
|
503
|
+
"data-slot": "select-content",
|
|
504
|
+
"data-align-trigger": position === "item-aligned",
|
|
505
|
+
className: cn("relative z-[90] max-h-(--radix-select-content-available-height) min-w-36 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", className),
|
|
506
|
+
position,
|
|
507
|
+
align,
|
|
508
|
+
...props,
|
|
509
|
+
children: [
|
|
510
|
+
/* @__PURE__ */ jsx(SelectScrollUpButton, {}),
|
|
511
|
+
/* @__PURE__ */ jsx(
|
|
512
|
+
Select$1.Viewport,
|
|
513
|
+
{
|
|
514
|
+
"data-position": position,
|
|
515
|
+
className: cn(
|
|
516
|
+
"data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)",
|
|
517
|
+
position === "popper" && ""
|
|
518
|
+
),
|
|
519
|
+
children
|
|
520
|
+
}
|
|
521
|
+
),
|
|
522
|
+
/* @__PURE__ */ jsx(SelectScrollDownButton, {})
|
|
523
|
+
]
|
|
524
|
+
}
|
|
525
|
+
) });
|
|
526
|
+
}
|
|
527
|
+
function SelectLabel({
|
|
528
|
+
className,
|
|
529
|
+
...props
|
|
530
|
+
}) {
|
|
531
|
+
return /* @__PURE__ */ jsx(
|
|
532
|
+
Select$1.Label,
|
|
533
|
+
{
|
|
534
|
+
"data-slot": "select-label",
|
|
535
|
+
className: cn("px-2 py-1.5 text-xs text-muted-foreground", className),
|
|
536
|
+
...props
|
|
537
|
+
}
|
|
538
|
+
);
|
|
539
|
+
}
|
|
540
|
+
function SelectItem({
|
|
541
|
+
className,
|
|
542
|
+
children,
|
|
543
|
+
...props
|
|
544
|
+
}) {
|
|
545
|
+
return /* @__PURE__ */ jsxs(
|
|
546
|
+
Select$1.Item,
|
|
547
|
+
{
|
|
548
|
+
"data-slot": "select-item",
|
|
549
|
+
className: cn(
|
|
550
|
+
"relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
|
|
551
|
+
className
|
|
552
|
+
),
|
|
553
|
+
...props,
|
|
554
|
+
children: [
|
|
555
|
+
/* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center", children: /* @__PURE__ */ jsx(Select$1.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "pointer-events-none" }) }) }),
|
|
556
|
+
/* @__PURE__ */ jsx(Select$1.ItemText, { children })
|
|
557
|
+
]
|
|
558
|
+
}
|
|
559
|
+
);
|
|
560
|
+
}
|
|
561
|
+
function SelectSeparator({
|
|
562
|
+
className,
|
|
563
|
+
...props
|
|
564
|
+
}) {
|
|
565
|
+
return /* @__PURE__ */ jsx(
|
|
566
|
+
Select$1.Separator,
|
|
567
|
+
{
|
|
568
|
+
"data-slot": "select-separator",
|
|
569
|
+
className: cn("pointer-events-none -mx-1 my-1 h-px bg-border", className),
|
|
570
|
+
...props
|
|
571
|
+
}
|
|
572
|
+
);
|
|
573
|
+
}
|
|
574
|
+
function SelectScrollUpButton({
|
|
575
|
+
className,
|
|
576
|
+
...props
|
|
577
|
+
}) {
|
|
578
|
+
return /* @__PURE__ */ jsx(
|
|
579
|
+
Select$1.ScrollUpButton,
|
|
580
|
+
{
|
|
581
|
+
"data-slot": "select-scroll-up-button",
|
|
582
|
+
className: cn(
|
|
583
|
+
"z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",
|
|
584
|
+
className
|
|
585
|
+
),
|
|
586
|
+
...props,
|
|
587
|
+
children: /* @__PURE__ */ jsx(
|
|
588
|
+
ChevronUpIcon,
|
|
589
|
+
{}
|
|
590
|
+
)
|
|
591
|
+
}
|
|
592
|
+
);
|
|
593
|
+
}
|
|
594
|
+
function SelectScrollDownButton({
|
|
595
|
+
className,
|
|
596
|
+
...props
|
|
597
|
+
}) {
|
|
598
|
+
return /* @__PURE__ */ jsx(
|
|
599
|
+
Select$1.ScrollDownButton,
|
|
600
|
+
{
|
|
601
|
+
"data-slot": "select-scroll-down-button",
|
|
602
|
+
className: cn(
|
|
603
|
+
"z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",
|
|
604
|
+
className
|
|
605
|
+
),
|
|
606
|
+
...props,
|
|
607
|
+
children: /* @__PURE__ */ jsx(
|
|
608
|
+
ChevronDownIcon,
|
|
609
|
+
{}
|
|
610
|
+
)
|
|
611
|
+
}
|
|
612
|
+
);
|
|
613
|
+
}
|
|
614
|
+
function DropdownMenu({
|
|
615
|
+
...props
|
|
616
|
+
}) {
|
|
617
|
+
return /* @__PURE__ */ jsx(DropdownMenu$1.Root, { "data-slot": "dropdown-menu", ...props });
|
|
618
|
+
}
|
|
619
|
+
function DropdownMenuPortal({
|
|
620
|
+
...props
|
|
621
|
+
}) {
|
|
622
|
+
return /* @__PURE__ */ jsx(DropdownMenu$1.Portal, { "data-slot": "dropdown-menu-portal", ...props });
|
|
623
|
+
}
|
|
624
|
+
function DropdownMenuTrigger({
|
|
625
|
+
...props
|
|
626
|
+
}) {
|
|
627
|
+
return /* @__PURE__ */ jsx(
|
|
628
|
+
DropdownMenu$1.Trigger,
|
|
629
|
+
{
|
|
630
|
+
"data-slot": "dropdown-menu-trigger",
|
|
631
|
+
...props
|
|
632
|
+
}
|
|
633
|
+
);
|
|
634
|
+
}
|
|
635
|
+
function DropdownMenuContent({
|
|
636
|
+
className,
|
|
637
|
+
align = "start",
|
|
638
|
+
sideOffset = 4,
|
|
639
|
+
...props
|
|
640
|
+
}) {
|
|
641
|
+
const portalContainer = usePortalContainer();
|
|
642
|
+
return /* @__PURE__ */ jsx(DropdownMenu$1.Portal, { container: portalContainer ?? void 0, children: /* @__PURE__ */ jsx(
|
|
643
|
+
DropdownMenu$1.Content,
|
|
644
|
+
{
|
|
645
|
+
"data-slot": "dropdown-menu-content",
|
|
646
|
+
sideOffset,
|
|
647
|
+
align,
|
|
648
|
+
className: cn("z-50 max-h-(--radix-dropdown-menu-content-available-height) w-(--radix-dropdown-menu-trigger-width) min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:overflow-hidden data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
|
|
649
|
+
...props
|
|
650
|
+
}
|
|
651
|
+
) });
|
|
652
|
+
}
|
|
653
|
+
function DropdownMenuGroup({
|
|
654
|
+
...props
|
|
655
|
+
}) {
|
|
656
|
+
return /* @__PURE__ */ jsx(DropdownMenu$1.Group, { "data-slot": "dropdown-menu-group", ...props });
|
|
657
|
+
}
|
|
658
|
+
function DropdownMenuItem({
|
|
659
|
+
className,
|
|
660
|
+
inset,
|
|
661
|
+
variant = "default",
|
|
662
|
+
...props
|
|
663
|
+
}) {
|
|
664
|
+
return /* @__PURE__ */ jsx(
|
|
665
|
+
DropdownMenu$1.Item,
|
|
666
|
+
{
|
|
667
|
+
"data-slot": "dropdown-menu-item",
|
|
668
|
+
"data-inset": inset,
|
|
669
|
+
"data-variant": variant,
|
|
670
|
+
className: cn(
|
|
671
|
+
"group/dropdown-menu-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",
|
|
672
|
+
className
|
|
673
|
+
),
|
|
674
|
+
...props
|
|
675
|
+
}
|
|
676
|
+
);
|
|
677
|
+
}
|
|
678
|
+
function DropdownMenuCheckboxItem({
|
|
679
|
+
className,
|
|
680
|
+
children,
|
|
681
|
+
checked,
|
|
682
|
+
inset,
|
|
683
|
+
...props
|
|
684
|
+
}) {
|
|
685
|
+
return /* @__PURE__ */ jsxs(
|
|
686
|
+
DropdownMenu$1.CheckboxItem,
|
|
687
|
+
{
|
|
688
|
+
"data-slot": "dropdown-menu-checkbox-item",
|
|
689
|
+
"data-inset": inset,
|
|
690
|
+
className: cn(
|
|
691
|
+
"relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-8 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
692
|
+
className
|
|
693
|
+
),
|
|
694
|
+
checked,
|
|
695
|
+
...props,
|
|
696
|
+
children: [
|
|
697
|
+
/* @__PURE__ */ jsx(
|
|
698
|
+
"span",
|
|
699
|
+
{
|
|
700
|
+
className: "pointer-events-none absolute right-2 flex items-center justify-center",
|
|
701
|
+
"data-slot": "dropdown-menu-checkbox-item-indicator",
|
|
702
|
+
children: /* @__PURE__ */ jsx(DropdownMenu$1.ItemIndicator, { children: /* @__PURE__ */ jsx(
|
|
703
|
+
CheckIcon,
|
|
704
|
+
{}
|
|
705
|
+
) })
|
|
706
|
+
}
|
|
707
|
+
),
|
|
708
|
+
children
|
|
709
|
+
]
|
|
710
|
+
}
|
|
711
|
+
);
|
|
712
|
+
}
|
|
713
|
+
function DropdownMenuRadioGroup({
|
|
714
|
+
...props
|
|
715
|
+
}) {
|
|
716
|
+
return /* @__PURE__ */ jsx(
|
|
717
|
+
DropdownMenu$1.RadioGroup,
|
|
718
|
+
{
|
|
719
|
+
"data-slot": "dropdown-menu-radio-group",
|
|
720
|
+
...props
|
|
721
|
+
}
|
|
722
|
+
);
|
|
723
|
+
}
|
|
724
|
+
function DropdownMenuRadioItem({
|
|
725
|
+
className,
|
|
726
|
+
children,
|
|
727
|
+
inset,
|
|
728
|
+
...props
|
|
729
|
+
}) {
|
|
730
|
+
return /* @__PURE__ */ jsxs(
|
|
731
|
+
DropdownMenu$1.RadioItem,
|
|
732
|
+
{
|
|
733
|
+
"data-slot": "dropdown-menu-radio-item",
|
|
734
|
+
"data-inset": inset,
|
|
735
|
+
className: cn(
|
|
736
|
+
"relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-8 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
737
|
+
className
|
|
738
|
+
),
|
|
739
|
+
...props,
|
|
740
|
+
children: [
|
|
741
|
+
/* @__PURE__ */ jsx(
|
|
742
|
+
"span",
|
|
743
|
+
{
|
|
744
|
+
className: "pointer-events-none absolute right-2 flex items-center justify-center",
|
|
745
|
+
"data-slot": "dropdown-menu-radio-item-indicator",
|
|
746
|
+
children: /* @__PURE__ */ jsx(DropdownMenu$1.ItemIndicator, { children: /* @__PURE__ */ jsx(
|
|
747
|
+
CheckIcon,
|
|
748
|
+
{}
|
|
749
|
+
) })
|
|
750
|
+
}
|
|
751
|
+
),
|
|
752
|
+
children
|
|
753
|
+
]
|
|
754
|
+
}
|
|
755
|
+
);
|
|
756
|
+
}
|
|
757
|
+
function DropdownMenuLabel({
|
|
758
|
+
className,
|
|
759
|
+
inset,
|
|
760
|
+
...props
|
|
761
|
+
}) {
|
|
762
|
+
return /* @__PURE__ */ jsx(
|
|
763
|
+
DropdownMenu$1.Label,
|
|
764
|
+
{
|
|
765
|
+
"data-slot": "dropdown-menu-label",
|
|
766
|
+
"data-inset": inset,
|
|
767
|
+
className: cn(
|
|
768
|
+
"px-2 py-1.5 text-xs font-medium text-muted-foreground data-inset:pl-8",
|
|
769
|
+
className
|
|
770
|
+
),
|
|
771
|
+
...props
|
|
772
|
+
}
|
|
773
|
+
);
|
|
774
|
+
}
|
|
775
|
+
function DropdownMenuSeparator({
|
|
776
|
+
className,
|
|
777
|
+
...props
|
|
778
|
+
}) {
|
|
779
|
+
return /* @__PURE__ */ jsx(
|
|
780
|
+
DropdownMenu$1.Separator,
|
|
781
|
+
{
|
|
782
|
+
"data-slot": "dropdown-menu-separator",
|
|
783
|
+
className: cn("-mx-1 my-1 h-px bg-border", className),
|
|
784
|
+
...props
|
|
785
|
+
}
|
|
786
|
+
);
|
|
787
|
+
}
|
|
788
|
+
function DropdownMenuShortcut({
|
|
789
|
+
className,
|
|
790
|
+
...props
|
|
791
|
+
}) {
|
|
792
|
+
return /* @__PURE__ */ jsx(
|
|
793
|
+
"span",
|
|
794
|
+
{
|
|
795
|
+
"data-slot": "dropdown-menu-shortcut",
|
|
796
|
+
className: cn(
|
|
797
|
+
"ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground",
|
|
798
|
+
className
|
|
799
|
+
),
|
|
800
|
+
...props
|
|
801
|
+
}
|
|
802
|
+
);
|
|
803
|
+
}
|
|
804
|
+
function DropdownMenuSub({
|
|
805
|
+
...props
|
|
806
|
+
}) {
|
|
807
|
+
return /* @__PURE__ */ jsx(DropdownMenu$1.Sub, { "data-slot": "dropdown-menu-sub", ...props });
|
|
808
|
+
}
|
|
809
|
+
function DropdownMenuSubTrigger({
|
|
810
|
+
className,
|
|
811
|
+
inset,
|
|
812
|
+
children,
|
|
813
|
+
...props
|
|
814
|
+
}) {
|
|
815
|
+
return /* @__PURE__ */ jsxs(
|
|
816
|
+
DropdownMenu$1.SubTrigger,
|
|
817
|
+
{
|
|
818
|
+
"data-slot": "dropdown-menu-sub-trigger",
|
|
819
|
+
"data-inset": inset,
|
|
820
|
+
className: cn(
|
|
821
|
+
"flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-8 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
822
|
+
className
|
|
823
|
+
),
|
|
824
|
+
...props,
|
|
825
|
+
children: [
|
|
826
|
+
children,
|
|
827
|
+
/* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto" })
|
|
828
|
+
]
|
|
829
|
+
}
|
|
830
|
+
);
|
|
831
|
+
}
|
|
832
|
+
function DropdownMenuSubContent({
|
|
833
|
+
className,
|
|
834
|
+
...props
|
|
835
|
+
}) {
|
|
836
|
+
return /* @__PURE__ */ jsx(
|
|
837
|
+
DropdownMenu$1.SubContent,
|
|
838
|
+
{
|
|
839
|
+
"data-slot": "dropdown-menu-sub-content",
|
|
840
|
+
className: cn("z-50 min-w-[96px] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
|
|
841
|
+
...props
|
|
842
|
+
}
|
|
843
|
+
);
|
|
844
|
+
}
|
|
845
|
+
function Card({
|
|
846
|
+
className,
|
|
847
|
+
size = "default",
|
|
848
|
+
...props
|
|
849
|
+
}) {
|
|
850
|
+
return /* @__PURE__ */ jsx(
|
|
851
|
+
"div",
|
|
852
|
+
{
|
|
853
|
+
"data-slot": "card",
|
|
854
|
+
"data-size": size,
|
|
855
|
+
className: cn(
|
|
856
|
+
"group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl border border-border bg-card py-(--card-spacing) text-sm text-card-foreground shadow-sm [--card-spacing:--spacing(6)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(4)] *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",
|
|
857
|
+
className
|
|
858
|
+
),
|
|
859
|
+
...props
|
|
860
|
+
}
|
|
861
|
+
);
|
|
862
|
+
}
|
|
863
|
+
function CardHeader({ className, ...props }) {
|
|
864
|
+
return /* @__PURE__ */ jsx(
|
|
865
|
+
"div",
|
|
866
|
+
{
|
|
867
|
+
"data-slot": "card-header",
|
|
868
|
+
className: cn(
|
|
869
|
+
"group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",
|
|
870
|
+
className
|
|
871
|
+
),
|
|
872
|
+
...props
|
|
873
|
+
}
|
|
874
|
+
);
|
|
875
|
+
}
|
|
876
|
+
function CardTitle({ className, ...props }) {
|
|
877
|
+
return /* @__PURE__ */ jsx(
|
|
878
|
+
"div",
|
|
879
|
+
{
|
|
880
|
+
"data-slot": "card-title",
|
|
881
|
+
className: cn(
|
|
882
|
+
"font-heading text-base leading-normal font-medium group-data-[size=sm]/card:text-sm",
|
|
883
|
+
className
|
|
884
|
+
),
|
|
885
|
+
...props
|
|
886
|
+
}
|
|
887
|
+
);
|
|
888
|
+
}
|
|
889
|
+
function CardDescription({ className, ...props }) {
|
|
890
|
+
return /* @__PURE__ */ jsx(
|
|
891
|
+
"div",
|
|
892
|
+
{
|
|
893
|
+
"data-slot": "card-description",
|
|
894
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
895
|
+
...props
|
|
896
|
+
}
|
|
897
|
+
);
|
|
898
|
+
}
|
|
899
|
+
function CardAction({ className, ...props }) {
|
|
900
|
+
return /* @__PURE__ */ jsx(
|
|
901
|
+
"div",
|
|
902
|
+
{
|
|
903
|
+
"data-slot": "card-action",
|
|
904
|
+
className: cn(
|
|
905
|
+
"col-start-2 row-span-2 row-start-1 self-start justify-self-end",
|
|
906
|
+
className
|
|
907
|
+
),
|
|
908
|
+
...props
|
|
909
|
+
}
|
|
910
|
+
);
|
|
911
|
+
}
|
|
912
|
+
function CardContent({ className, ...props }) {
|
|
913
|
+
return /* @__PURE__ */ jsx(
|
|
914
|
+
"div",
|
|
915
|
+
{
|
|
916
|
+
"data-slot": "card-content",
|
|
917
|
+
className: cn("px-(--card-spacing)", className),
|
|
918
|
+
...props
|
|
919
|
+
}
|
|
920
|
+
);
|
|
921
|
+
}
|
|
922
|
+
function CardFooter({ className, ...props }) {
|
|
923
|
+
return /* @__PURE__ */ jsx(
|
|
924
|
+
"div",
|
|
925
|
+
{
|
|
926
|
+
"data-slot": "card-footer",
|
|
927
|
+
className: cn(
|
|
928
|
+
"flex items-center rounded-b-xl px-(--card-spacing) [.border-t]:pt-(--card-spacing)",
|
|
929
|
+
className
|
|
930
|
+
),
|
|
931
|
+
...props
|
|
932
|
+
}
|
|
933
|
+
);
|
|
934
|
+
}
|
|
935
|
+
var EmptyStateIllustration = ({
|
|
936
|
+
width = 142,
|
|
937
|
+
height = 142,
|
|
938
|
+
className,
|
|
939
|
+
style
|
|
940
|
+
}) => {
|
|
941
|
+
return /* @__PURE__ */ jsxs(
|
|
942
|
+
"svg",
|
|
943
|
+
{
|
|
944
|
+
width,
|
|
945
|
+
height,
|
|
946
|
+
viewBox: "0 0 142 142",
|
|
947
|
+
fill: "none",
|
|
948
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
949
|
+
className,
|
|
950
|
+
style,
|
|
951
|
+
role: "img",
|
|
952
|
+
"aria-label": "Search illustration",
|
|
953
|
+
children: [
|
|
954
|
+
/* @__PURE__ */ jsx(
|
|
955
|
+
"path",
|
|
956
|
+
{
|
|
957
|
+
d: "M82.4271 55.81C74.0471 55.86 65.5371 55.47 57.5771 53.26C49.6171 51.05 42.5771 46.88 36.1771 42.01C31.9871 38.84 28.1771 36.32 22.7371 36.7C17.4181 36.9795 12.3305 38.9641 8.22709 42.36C1.30709 48.42 2.35709 59.62 5.11709 67.5C9.27709 79.37 21.9371 87.61 32.6871 92.98C45.1171 99.19 58.7671 102.8 72.4571 104.87C84.4571 106.69 99.8671 108.02 110.257 100.18C119.807 92.99 122.427 76.55 120.087 65.45C119.518 62.1715 117.772 59.2133 115.177 57.13C108.467 52.23 98.4671 55.5 90.9271 55.67C88.1771 55.73 85.2871 55.8 82.4271 55.81Z",
|
|
958
|
+
fill: "#F5F5F5"
|
|
959
|
+
}
|
|
960
|
+
),
|
|
961
|
+
/* @__PURE__ */ jsx(
|
|
962
|
+
"path",
|
|
963
|
+
{
|
|
964
|
+
d: "M41.5674 17V21.3",
|
|
965
|
+
stroke: "#E5E5E5",
|
|
966
|
+
strokeWidth: "0.85",
|
|
967
|
+
strokeLinecap: "round",
|
|
968
|
+
strokeLinejoin: "round"
|
|
969
|
+
}
|
|
970
|
+
),
|
|
971
|
+
/* @__PURE__ */ jsx(
|
|
972
|
+
"path",
|
|
973
|
+
{
|
|
974
|
+
d: "M39.417 19.15H43.717",
|
|
975
|
+
stroke: "#E5E5E5",
|
|
976
|
+
strokeWidth: "0.85",
|
|
977
|
+
strokeLinecap: "round",
|
|
978
|
+
strokeLinejoin: "round"
|
|
979
|
+
}
|
|
980
|
+
),
|
|
981
|
+
/* @__PURE__ */ jsx(
|
|
982
|
+
"path",
|
|
983
|
+
{
|
|
984
|
+
d: "M123.147 102.71V107.01",
|
|
985
|
+
stroke: "#E5E5E5",
|
|
986
|
+
strokeWidth: "0.85",
|
|
987
|
+
strokeLinecap: "round",
|
|
988
|
+
strokeLinejoin: "round"
|
|
989
|
+
}
|
|
990
|
+
),
|
|
991
|
+
/* @__PURE__ */ jsx(
|
|
992
|
+
"path",
|
|
993
|
+
{
|
|
994
|
+
d: "M120.997 104.86H125.297",
|
|
995
|
+
stroke: "#E5E5E5",
|
|
996
|
+
strokeWidth: "0.85",
|
|
997
|
+
strokeLinecap: "round",
|
|
998
|
+
strokeLinejoin: "round"
|
|
999
|
+
}
|
|
1000
|
+
),
|
|
1001
|
+
/* @__PURE__ */ jsx("circle", { cx: "9.07717", cy: "83.16", r: "0.98", fill: "#E5E5E5" }),
|
|
1002
|
+
/* @__PURE__ */ jsx("circle", { cx: "92.5171", cy: "20.46", r: "0.98", fill: "#E5E5E5" }),
|
|
1003
|
+
/* @__PURE__ */ jsx(
|
|
1004
|
+
"ellipse",
|
|
1005
|
+
{
|
|
1006
|
+
cx: "65.357",
|
|
1007
|
+
cy: "122.03",
|
|
1008
|
+
rx: "36.7",
|
|
1009
|
+
ry: "2.28",
|
|
1010
|
+
fill: "#F5F5F5"
|
|
1011
|
+
}
|
|
1012
|
+
),
|
|
1013
|
+
/* @__PURE__ */ jsx(
|
|
1014
|
+
"path",
|
|
1015
|
+
{
|
|
1016
|
+
d: "M37.0868 28.6799H90.3868C91.7129 28.6799 92.9847 29.2067 93.9224 30.1444C94.8601 31.0821 95.3868 32.3538 95.3868 33.6799V97.0899C95.3868 98.416 94.8601 99.6878 93.9224 100.625C92.9847 101.563 91.7129 102.09 90.3868 102.09H30.2568C28.9308 102.09 27.659 101.563 26.7213 100.625C25.7836 99.6878 25.2568 98.416 25.2568 97.0899V40.6299L37.0868 28.6799Z",
|
|
1017
|
+
fill: "white",
|
|
1018
|
+
stroke: "#A3A3A3",
|
|
1019
|
+
strokeLinecap: "round",
|
|
1020
|
+
strokeLinejoin: "round"
|
|
1021
|
+
}
|
|
1022
|
+
),
|
|
1023
|
+
/* @__PURE__ */ jsx(
|
|
1024
|
+
"path",
|
|
1025
|
+
{
|
|
1026
|
+
d: "M95.147 59.5801H40.187V102.7H95.147V59.5801Z",
|
|
1027
|
+
fill: "#A3A3A3"
|
|
1028
|
+
}
|
|
1029
|
+
),
|
|
1030
|
+
/* @__PURE__ */ jsx(
|
|
1031
|
+
"path",
|
|
1032
|
+
{
|
|
1033
|
+
d: "M25.2568 40.6299H34.9468C35.5153 40.6273 36.0596 40.3996 36.4607 39.9967C36.8617 39.5938 37.0868 39.0484 37.0868 38.4799V28.6799L25.2568 40.6299Z",
|
|
1034
|
+
fill: "white",
|
|
1035
|
+
stroke: "#A3A3A3",
|
|
1036
|
+
strokeLinecap: "round",
|
|
1037
|
+
strokeLinejoin: "round"
|
|
1038
|
+
}
|
|
1039
|
+
),
|
|
1040
|
+
/* @__PURE__ */ jsx(
|
|
1041
|
+
"path",
|
|
1042
|
+
{
|
|
1043
|
+
d: "M94.877 45.8101H40.517C38.4018 45.8101 36.687 47.5248 36.687 49.6401V61.2701C36.687 63.3853 38.4018 65.1001 40.517 65.1001H94.877C96.9923 65.1001 98.707 63.3853 98.707 61.2701V49.6401C98.707 47.5248 96.9923 45.8101 94.877 45.8101Z",
|
|
1044
|
+
fill: "white",
|
|
1045
|
+
stroke: "#A3A3A3",
|
|
1046
|
+
strokeLinecap: "round",
|
|
1047
|
+
strokeLinejoin: "round"
|
|
1048
|
+
}
|
|
1049
|
+
),
|
|
1050
|
+
/* @__PURE__ */ jsx("circle", { cx: "47.2472", cy: "55.48", r: "3.34", fill: "#A3A3A3" }),
|
|
1051
|
+
/* @__PURE__ */ jsx("circle", { cx: "57.7472", cy: "55.48", r: "3.34", fill: "#A3A3A3" }),
|
|
1052
|
+
/* @__PURE__ */ jsx("circle", { cx: "68.237", cy: "55.48", r: "3.34", fill: "#A3A3A3" }),
|
|
1053
|
+
/* @__PURE__ */ jsx(
|
|
1054
|
+
"path",
|
|
1055
|
+
{
|
|
1056
|
+
d: "M94.877 67.1899H40.517C38.4018 67.1899 36.687 68.9047 36.687 71.0199V82.6499C36.687 84.7652 38.4018 86.4799 40.517 86.4799H94.877C96.9923 86.4799 98.707 84.7652 98.707 82.6499V71.0199C98.707 68.9047 96.9923 67.1899 94.877 67.1899Z",
|
|
1057
|
+
fill: "white",
|
|
1058
|
+
stroke: "#A3A3A3",
|
|
1059
|
+
strokeLinecap: "round",
|
|
1060
|
+
strokeLinejoin: "round"
|
|
1061
|
+
}
|
|
1062
|
+
),
|
|
1063
|
+
/* @__PURE__ */ jsx("circle", { cx: "47.2472", cy: "76.87", r: "3.34", fill: "#A3A3A3" }),
|
|
1064
|
+
/* @__PURE__ */ jsx("circle", { cx: "57.7472", cy: "76.87", r: "3.34", fill: "#A3A3A3" }),
|
|
1065
|
+
/* @__PURE__ */ jsx("circle", { cx: "68.237", cy: "76.87", r: "3.34", fill: "#A3A3A3" }),
|
|
1066
|
+
/* @__PURE__ */ jsx(
|
|
1067
|
+
"path",
|
|
1068
|
+
{
|
|
1069
|
+
d: "M94.877 88.5801H40.517C38.4018 88.5801 36.687 90.2948 36.687 92.4101V104.04C36.687 106.155 38.4018 107.87 40.517 107.87H94.877C96.9923 107.87 98.707 106.155 98.707 104.04V92.4101C98.707 90.2948 96.9923 88.5801 94.877 88.5801Z",
|
|
1070
|
+
fill: "white",
|
|
1071
|
+
stroke: "#A3A3A3",
|
|
1072
|
+
strokeLinecap: "round",
|
|
1073
|
+
strokeLinejoin: "round"
|
|
1074
|
+
}
|
|
1075
|
+
),
|
|
1076
|
+
/* @__PURE__ */ jsx("circle", { cx: "47.2472", cy: "98.25", r: "3.34", fill: "#A3A3A3" }),
|
|
1077
|
+
/* @__PURE__ */ jsx("circle", { cx: "57.7472", cy: "98.25", r: "3.34", fill: "#A3A3A3" }),
|
|
1078
|
+
/* @__PURE__ */ jsx("circle", { cx: "68.237", cy: "98.25", r: "3.34", fill: "#A3A3A3" }),
|
|
1079
|
+
/* @__PURE__ */ jsx(
|
|
1080
|
+
"circle",
|
|
1081
|
+
{
|
|
1082
|
+
cx: "99.7974",
|
|
1083
|
+
cy: "49.44",
|
|
1084
|
+
r: "20.73",
|
|
1085
|
+
fill: "white",
|
|
1086
|
+
stroke: "#A3A3A3",
|
|
1087
|
+
strokeLinecap: "round",
|
|
1088
|
+
strokeLinejoin: "round"
|
|
1089
|
+
}
|
|
1090
|
+
),
|
|
1091
|
+
/* @__PURE__ */ jsx(
|
|
1092
|
+
"path",
|
|
1093
|
+
{
|
|
1094
|
+
d: "M114.517 64.48L120.037 70",
|
|
1095
|
+
stroke: "#A3A3A3",
|
|
1096
|
+
strokeLinecap: "round",
|
|
1097
|
+
strokeLinejoin: "round"
|
|
1098
|
+
}
|
|
1099
|
+
),
|
|
1100
|
+
/* @__PURE__ */ jsx(
|
|
1101
|
+
"path",
|
|
1102
|
+
{
|
|
1103
|
+
d: "M119.42 67.3202L117.706 69.1129C116.935 69.9193 116.964 71.1979 117.771 71.9688L132.661 86.2036C133.468 86.9745 134.746 86.9457 135.517 86.1393L137.231 84.3466C138.002 83.5402 137.973 82.2616 137.167 81.4907L122.276 67.2559C121.47 66.485 120.191 66.5138 119.42 67.3202Z",
|
|
1104
|
+
fill: "white",
|
|
1105
|
+
stroke: "#A3A3A3",
|
|
1106
|
+
strokeLinecap: "round",
|
|
1107
|
+
strokeLinejoin: "round"
|
|
1108
|
+
}
|
|
1109
|
+
)
|
|
1110
|
+
]
|
|
1111
|
+
}
|
|
1112
|
+
);
|
|
1113
|
+
};
|
|
1114
|
+
function StatusPage({ code, title, description, icon, onNavigate, homeLabel = "Kembali ke beranda" }) {
|
|
1115
|
+
return /* @__PURE__ */ jsx("div", { className: "flex h-full min-h-[calc(100vh-9rem)] w-full items-center justify-center bg-background p-8", children: /* @__PURE__ */ jsxs("div", { className: "flex w-full max-w-xl flex-col items-center text-center animate-in fade-in slide-in-from-bottom-2 duration-300", children: [
|
|
1116
|
+
/* @__PURE__ */ jsx("div", { className: "mb-8 flex h-28 w-28 items-center justify-center rounded-full bg-primary/10 text-primary [&_svg]:h-14 [&_svg]:w-14", children: icon }),
|
|
1117
|
+
/* @__PURE__ */ jsx("p", { className: "text-6xl font-bold leading-none tracking-wider text-primary", children: code }),
|
|
1118
|
+
/* @__PURE__ */ jsx("h1", { className: "mt-4 text-4xl font-semibold text-foreground", children: title }),
|
|
1119
|
+
/* @__PURE__ */ jsx("p", { className: "mt-3 text-lg text-muted-foreground", children: description }),
|
|
1120
|
+
onNavigate && /* @__PURE__ */ jsx(Button, { size: "lg", className: "mt-8", variant: "outline", onClick: () => onNavigate("/"), children: homeLabel })
|
|
1121
|
+
] }) });
|
|
1122
|
+
}
|
|
1123
|
+
function Forbidden({
|
|
1124
|
+
message = "Anda tidak memiliki akses ke halaman ini.",
|
|
1125
|
+
detail = "Hubungi administrator bila Anda merasa seharusnya memiliki akses.",
|
|
1126
|
+
onNavigate,
|
|
1127
|
+
homeLabel
|
|
1128
|
+
} = {}) {
|
|
1129
|
+
return /* @__PURE__ */ jsx(
|
|
1130
|
+
StatusPage,
|
|
1131
|
+
{
|
|
1132
|
+
code: "403",
|
|
1133
|
+
title: message,
|
|
1134
|
+
description: detail,
|
|
1135
|
+
icon: /* @__PURE__ */ jsx(ShieldAlert, {}),
|
|
1136
|
+
onNavigate,
|
|
1137
|
+
homeLabel
|
|
1138
|
+
}
|
|
1139
|
+
);
|
|
1140
|
+
}
|
|
1141
|
+
function Can({ I, all = false, fallback = null, can, children }) {
|
|
1142
|
+
const permissions = Array.isArray(I) ? I : [I];
|
|
1143
|
+
const allowed = all ? permissions.every((permission) => can(permission)) : can(...permissions);
|
|
1144
|
+
return allowed ? /* @__PURE__ */ jsx(Fragment, { children }) : /* @__PURE__ */ jsx(Fragment, { children: fallback });
|
|
1145
|
+
}
|
|
1146
|
+
function Textarea({ className, ...props }) {
|
|
1147
|
+
return /* @__PURE__ */ jsx(
|
|
1148
|
+
"textarea",
|
|
1149
|
+
{
|
|
1150
|
+
"data-slot": "textarea",
|
|
1151
|
+
className: cn(
|
|
1152
|
+
"flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-2.5 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground/60 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
|
|
1153
|
+
className
|
|
1154
|
+
),
|
|
1155
|
+
...props
|
|
1156
|
+
}
|
|
1157
|
+
);
|
|
1158
|
+
}
|
|
1159
|
+
function InputGroup({ className, ...props }) {
|
|
1160
|
+
return /* @__PURE__ */ jsx(
|
|
1161
|
+
"div",
|
|
1162
|
+
{
|
|
1163
|
+
"data-slot": "input-group",
|
|
1164
|
+
role: "group",
|
|
1165
|
+
className: cn(
|
|
1166
|
+
"group/input-group relative flex h-9 w-full min-w-0 items-center rounded-md border border-input shadow-xs transition-[color,box-shadow] outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",
|
|
1167
|
+
className
|
|
1168
|
+
),
|
|
1169
|
+
...props
|
|
1170
|
+
}
|
|
1171
|
+
);
|
|
1172
|
+
}
|
|
1173
|
+
var inputGroupAddonVariants = cva(
|
|
1174
|
+
"flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",
|
|
1175
|
+
{
|
|
1176
|
+
variants: {
|
|
1177
|
+
align: {
|
|
1178
|
+
"inline-start": "order-first pl-2 has-[>button]:-ml-1 has-[>kbd]:ml-[-0.15rem]",
|
|
1179
|
+
"inline-end": "order-last pr-2 has-[>button]:-mr-1 has-[>kbd]:mr-[-0.15rem]",
|
|
1180
|
+
"block-start": "order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2",
|
|
1181
|
+
"block-end": "order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"
|
|
1182
|
+
}
|
|
1183
|
+
},
|
|
1184
|
+
defaultVariants: {
|
|
1185
|
+
align: "inline-start"
|
|
1186
|
+
}
|
|
1187
|
+
}
|
|
1188
|
+
);
|
|
1189
|
+
function InputGroupAddon({
|
|
1190
|
+
className,
|
|
1191
|
+
align = "inline-start",
|
|
1192
|
+
...props
|
|
1193
|
+
}) {
|
|
1194
|
+
return /* @__PURE__ */ jsx(
|
|
1195
|
+
"div",
|
|
1196
|
+
{
|
|
1197
|
+
role: "group",
|
|
1198
|
+
"data-slot": "input-group-addon",
|
|
1199
|
+
"data-align": align,
|
|
1200
|
+
className: cn(inputGroupAddonVariants({ align }), className),
|
|
1201
|
+
onClick: (e) => {
|
|
1202
|
+
if (e.target.closest("button")) {
|
|
1203
|
+
return;
|
|
1204
|
+
}
|
|
1205
|
+
e.currentTarget.parentElement?.querySelector("input")?.focus();
|
|
1206
|
+
},
|
|
1207
|
+
...props
|
|
1208
|
+
}
|
|
1209
|
+
);
|
|
1210
|
+
}
|
|
1211
|
+
var inputGroupButtonVariants = cva(
|
|
1212
|
+
"flex items-center gap-2 text-sm shadow-none",
|
|
1213
|
+
{
|
|
1214
|
+
variants: {
|
|
1215
|
+
size: {
|
|
1216
|
+
xs: "h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",
|
|
1217
|
+
sm: "",
|
|
1218
|
+
"icon-xs": "size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0",
|
|
1219
|
+
"icon-sm": "size-8 p-0 has-[>svg]:p-0"
|
|
1220
|
+
}
|
|
1221
|
+
},
|
|
1222
|
+
defaultVariants: {
|
|
1223
|
+
size: "xs"
|
|
1224
|
+
}
|
|
1225
|
+
}
|
|
1226
|
+
);
|
|
1227
|
+
function InputGroupButton({
|
|
1228
|
+
className,
|
|
1229
|
+
type = "button",
|
|
1230
|
+
variant = "ghost",
|
|
1231
|
+
size = "xs",
|
|
1232
|
+
...props
|
|
1233
|
+
}) {
|
|
1234
|
+
return /* @__PURE__ */ jsx(
|
|
1235
|
+
Button,
|
|
1236
|
+
{
|
|
1237
|
+
type,
|
|
1238
|
+
"data-size": size,
|
|
1239
|
+
variant,
|
|
1240
|
+
className: cn(inputGroupButtonVariants({ size }), className),
|
|
1241
|
+
...props
|
|
1242
|
+
}
|
|
1243
|
+
);
|
|
1244
|
+
}
|
|
1245
|
+
function InputGroupText({ className, ...props }) {
|
|
1246
|
+
return /* @__PURE__ */ jsx(
|
|
1247
|
+
"span",
|
|
1248
|
+
{
|
|
1249
|
+
className: cn(
|
|
1250
|
+
"flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
|
|
1251
|
+
className
|
|
1252
|
+
),
|
|
1253
|
+
...props
|
|
1254
|
+
}
|
|
1255
|
+
);
|
|
1256
|
+
}
|
|
1257
|
+
function InputGroupInput({
|
|
1258
|
+
className,
|
|
1259
|
+
...props
|
|
1260
|
+
}) {
|
|
1261
|
+
return /* @__PURE__ */ jsx(
|
|
1262
|
+
Input,
|
|
1263
|
+
{
|
|
1264
|
+
"data-slot": "input-group-control",
|
|
1265
|
+
className: cn(
|
|
1266
|
+
"flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",
|
|
1267
|
+
className
|
|
1268
|
+
),
|
|
1269
|
+
...props
|
|
1270
|
+
}
|
|
1271
|
+
);
|
|
1272
|
+
}
|
|
1273
|
+
function InputGroupTextarea({
|
|
1274
|
+
className,
|
|
1275
|
+
...props
|
|
1276
|
+
}) {
|
|
1277
|
+
return /* @__PURE__ */ jsx(
|
|
1278
|
+
Textarea,
|
|
1279
|
+
{
|
|
1280
|
+
"data-slot": "input-group-control",
|
|
1281
|
+
className: cn(
|
|
1282
|
+
"flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",
|
|
1283
|
+
className
|
|
1284
|
+
),
|
|
1285
|
+
...props
|
|
1286
|
+
}
|
|
1287
|
+
);
|
|
1288
|
+
}
|
|
1289
|
+
function Dialog({
|
|
1290
|
+
...props
|
|
1291
|
+
}) {
|
|
1292
|
+
return /* @__PURE__ */ jsx(Dialog$1.Root, { "data-slot": "dialog", ...props });
|
|
1293
|
+
}
|
|
1294
|
+
function DialogTrigger({
|
|
1295
|
+
...props
|
|
1296
|
+
}) {
|
|
1297
|
+
return /* @__PURE__ */ jsx(Dialog$1.Trigger, { "data-slot": "dialog-trigger", ...props });
|
|
1298
|
+
}
|
|
1299
|
+
function DialogPortal({
|
|
1300
|
+
...props
|
|
1301
|
+
}) {
|
|
1302
|
+
return /* @__PURE__ */ jsx(Dialog$1.Portal, { "data-slot": "dialog-portal", ...props });
|
|
1303
|
+
}
|
|
1304
|
+
function DialogClose({
|
|
1305
|
+
...props
|
|
1306
|
+
}) {
|
|
1307
|
+
return /* @__PURE__ */ jsx(Dialog$1.Close, { "data-slot": "dialog-close", ...props });
|
|
1308
|
+
}
|
|
1309
|
+
function DialogOverlay({
|
|
1310
|
+
className,
|
|
1311
|
+
...props
|
|
1312
|
+
}) {
|
|
1313
|
+
return /* @__PURE__ */ jsx(
|
|
1314
|
+
Dialog$1.Overlay,
|
|
1315
|
+
{
|
|
1316
|
+
"data-slot": "dialog-overlay",
|
|
1317
|
+
className: cn(
|
|
1318
|
+
"fixed inset-0 isolate z-[80] bg-black/40 duration-100 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
|
|
1319
|
+
className
|
|
1320
|
+
),
|
|
1321
|
+
...props
|
|
1322
|
+
}
|
|
1323
|
+
);
|
|
1324
|
+
}
|
|
1325
|
+
function DialogContent({
|
|
1326
|
+
className,
|
|
1327
|
+
children,
|
|
1328
|
+
showCloseButton = true,
|
|
1329
|
+
...props
|
|
1330
|
+
}) {
|
|
1331
|
+
const portalContainer = usePortalContainer();
|
|
1332
|
+
return /* @__PURE__ */ jsxs(DialogPortal, { container: portalContainer ?? void 0, children: [
|
|
1333
|
+
/* @__PURE__ */ jsx(DialogOverlay, {}),
|
|
1334
|
+
/* @__PURE__ */ jsxs(
|
|
1335
|
+
Dialog$1.Content,
|
|
1336
|
+
{
|
|
1337
|
+
"data-slot": "dialog-content",
|
|
1338
|
+
onWheel: (event) => event.stopPropagation(),
|
|
1339
|
+
className: cn(
|
|
1340
|
+
"fixed top-1/2 left-1/2 z-[80] grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-6 rounded-xl bg-popover p-6 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-md data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
1341
|
+
className
|
|
1342
|
+
),
|
|
1343
|
+
...props,
|
|
1344
|
+
children: [
|
|
1345
|
+
children,
|
|
1346
|
+
showCloseButton && /* @__PURE__ */ jsx(Dialog$1.Close, { "data-slot": "dialog-close", asChild: true, children: /* @__PURE__ */ jsxs(
|
|
1347
|
+
Button,
|
|
1348
|
+
{
|
|
1349
|
+
variant: "ghost",
|
|
1350
|
+
className: "absolute top-4 right-4",
|
|
1351
|
+
size: "icon-sm",
|
|
1352
|
+
children: [
|
|
1353
|
+
/* @__PURE__ */ jsx(
|
|
1354
|
+
XIcon,
|
|
1355
|
+
{}
|
|
1356
|
+
),
|
|
1357
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
1358
|
+
]
|
|
1359
|
+
}
|
|
1360
|
+
) })
|
|
1361
|
+
]
|
|
1362
|
+
}
|
|
1363
|
+
)
|
|
1364
|
+
] });
|
|
1365
|
+
}
|
|
1366
|
+
function DialogHeader({ className, ...props }) {
|
|
1367
|
+
return /* @__PURE__ */ jsx(
|
|
1368
|
+
"div",
|
|
1369
|
+
{
|
|
1370
|
+
"data-slot": "dialog-header",
|
|
1371
|
+
className: cn("flex flex-col gap-2", className),
|
|
1372
|
+
...props
|
|
1373
|
+
}
|
|
1374
|
+
);
|
|
1375
|
+
}
|
|
1376
|
+
function DialogFooter({
|
|
1377
|
+
className,
|
|
1378
|
+
showCloseButton = false,
|
|
1379
|
+
children,
|
|
1380
|
+
...props
|
|
1381
|
+
}) {
|
|
1382
|
+
return /* @__PURE__ */ jsxs(
|
|
1383
|
+
"div",
|
|
1384
|
+
{
|
|
1385
|
+
"data-slot": "dialog-footer",
|
|
1386
|
+
className: cn(
|
|
1387
|
+
"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
|
|
1388
|
+
className
|
|
1389
|
+
),
|
|
1390
|
+
...props,
|
|
1391
|
+
children: [
|
|
1392
|
+
children,
|
|
1393
|
+
showCloseButton && /* @__PURE__ */ jsx(Dialog$1.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { variant: "outline", children: "Close" }) })
|
|
1394
|
+
]
|
|
1395
|
+
}
|
|
1396
|
+
);
|
|
1397
|
+
}
|
|
1398
|
+
function DialogTitle({
|
|
1399
|
+
className,
|
|
1400
|
+
...props
|
|
1401
|
+
}) {
|
|
1402
|
+
return /* @__PURE__ */ jsx(
|
|
1403
|
+
Dialog$1.Title,
|
|
1404
|
+
{
|
|
1405
|
+
"data-slot": "dialog-title",
|
|
1406
|
+
className: cn("font-heading leading-none font-medium", className),
|
|
1407
|
+
...props
|
|
1408
|
+
}
|
|
1409
|
+
);
|
|
1410
|
+
}
|
|
1411
|
+
function DialogDescription({
|
|
1412
|
+
className,
|
|
1413
|
+
...props
|
|
1414
|
+
}) {
|
|
1415
|
+
return /* @__PURE__ */ jsx(
|
|
1416
|
+
Dialog$1.Description,
|
|
1417
|
+
{
|
|
1418
|
+
"data-slot": "dialog-description",
|
|
1419
|
+
className: cn(
|
|
1420
|
+
"text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",
|
|
1421
|
+
className
|
|
1422
|
+
),
|
|
1423
|
+
...props
|
|
1424
|
+
}
|
|
1425
|
+
);
|
|
1426
|
+
}
|
|
1427
|
+
function Command({
|
|
1428
|
+
className,
|
|
1429
|
+
...props
|
|
1430
|
+
}) {
|
|
1431
|
+
return /* @__PURE__ */ jsx(
|
|
1432
|
+
Command$1,
|
|
1433
|
+
{
|
|
1434
|
+
"data-slot": "command",
|
|
1435
|
+
className: cn(
|
|
1436
|
+
"flex size-full flex-col overflow-hidden rounded-xl! bg-popover p-1 text-popover-foreground",
|
|
1437
|
+
className
|
|
1438
|
+
),
|
|
1439
|
+
...props
|
|
1440
|
+
}
|
|
1441
|
+
);
|
|
1442
|
+
}
|
|
1443
|
+
function CommandDialog({
|
|
1444
|
+
title = "Command Palette",
|
|
1445
|
+
description = "Search for a command to run...",
|
|
1446
|
+
children,
|
|
1447
|
+
className,
|
|
1448
|
+
showCloseButton = false,
|
|
1449
|
+
...props
|
|
1450
|
+
}) {
|
|
1451
|
+
return /* @__PURE__ */ jsxs(Dialog, { ...props, children: [
|
|
1452
|
+
/* @__PURE__ */ jsxs(DialogHeader, { className: "sr-only", children: [
|
|
1453
|
+
/* @__PURE__ */ jsx(DialogTitle, { children: title }),
|
|
1454
|
+
/* @__PURE__ */ jsx(DialogDescription, { children: description })
|
|
1455
|
+
] }),
|
|
1456
|
+
/* @__PURE__ */ jsx(
|
|
1457
|
+
DialogContent,
|
|
1458
|
+
{
|
|
1459
|
+
className: cn(
|
|
1460
|
+
"top-1/3 translate-y-0 overflow-hidden rounded-xl! p-0",
|
|
1461
|
+
className
|
|
1462
|
+
),
|
|
1463
|
+
showCloseButton,
|
|
1464
|
+
children
|
|
1465
|
+
}
|
|
1466
|
+
)
|
|
1467
|
+
] });
|
|
1468
|
+
}
|
|
1469
|
+
function CommandInput({
|
|
1470
|
+
className,
|
|
1471
|
+
...props
|
|
1472
|
+
}) {
|
|
1473
|
+
return /* @__PURE__ */ jsx("div", { "data-slot": "command-input-wrapper", className: "p-1 pb-0", children: /* @__PURE__ */ jsxs(InputGroup, { className: "h-8! rounded-lg! border-input/30 bg-input/30 shadow-none! *:data-[slot=input-group-addon]:pl-2!", children: [
|
|
1474
|
+
/* @__PURE__ */ jsx(
|
|
1475
|
+
Command$1.Input,
|
|
1476
|
+
{
|
|
1477
|
+
"data-slot": "command-input",
|
|
1478
|
+
className: cn(
|
|
1479
|
+
"w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
|
|
1480
|
+
className
|
|
1481
|
+
),
|
|
1482
|
+
...props
|
|
1483
|
+
}
|
|
1484
|
+
),
|
|
1485
|
+
/* @__PURE__ */ jsx(InputGroupAddon, { children: /* @__PURE__ */ jsx(SearchIcon, { className: "size-4 shrink-0 opacity-50" }) })
|
|
1486
|
+
] }) });
|
|
1487
|
+
}
|
|
1488
|
+
function CommandList({
|
|
1489
|
+
className,
|
|
1490
|
+
...props
|
|
1491
|
+
}) {
|
|
1492
|
+
return /* @__PURE__ */ jsx(
|
|
1493
|
+
Command$1.List,
|
|
1494
|
+
{
|
|
1495
|
+
"data-slot": "command-list",
|
|
1496
|
+
className: cn(
|
|
1497
|
+
"no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none",
|
|
1498
|
+
className
|
|
1499
|
+
),
|
|
1500
|
+
...props
|
|
1501
|
+
}
|
|
1502
|
+
);
|
|
1503
|
+
}
|
|
1504
|
+
function CommandEmpty({
|
|
1505
|
+
className,
|
|
1506
|
+
...props
|
|
1507
|
+
}) {
|
|
1508
|
+
return /* @__PURE__ */ jsx(
|
|
1509
|
+
Command$1.Empty,
|
|
1510
|
+
{
|
|
1511
|
+
"data-slot": "command-empty",
|
|
1512
|
+
className: cn("py-6 text-center text-sm", className),
|
|
1513
|
+
...props
|
|
1514
|
+
}
|
|
1515
|
+
);
|
|
1516
|
+
}
|
|
1517
|
+
function CommandGroup({
|
|
1518
|
+
className,
|
|
1519
|
+
...props
|
|
1520
|
+
}) {
|
|
1521
|
+
return /* @__PURE__ */ jsx(
|
|
1522
|
+
Command$1.Group,
|
|
1523
|
+
{
|
|
1524
|
+
"data-slot": "command-group",
|
|
1525
|
+
className: cn(
|
|
1526
|
+
"overflow-hidden p-1 text-foreground **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground",
|
|
1527
|
+
className
|
|
1528
|
+
),
|
|
1529
|
+
...props
|
|
1530
|
+
}
|
|
1531
|
+
);
|
|
1532
|
+
}
|
|
1533
|
+
function CommandSeparator({
|
|
1534
|
+
className,
|
|
1535
|
+
...props
|
|
1536
|
+
}) {
|
|
1537
|
+
return /* @__PURE__ */ jsx(
|
|
1538
|
+
Command$1.Separator,
|
|
1539
|
+
{
|
|
1540
|
+
"data-slot": "command-separator",
|
|
1541
|
+
className: cn("-mx-1 h-px w-auto bg-border", className),
|
|
1542
|
+
...props
|
|
1543
|
+
}
|
|
1544
|
+
);
|
|
1545
|
+
}
|
|
1546
|
+
function CommandItem({
|
|
1547
|
+
className,
|
|
1548
|
+
children,
|
|
1549
|
+
...props
|
|
1550
|
+
}) {
|
|
1551
|
+
return /* @__PURE__ */ jsxs(
|
|
1552
|
+
Command$1.Item,
|
|
1553
|
+
{
|
|
1554
|
+
"data-slot": "command-item",
|
|
1555
|
+
className: cn(
|
|
1556
|
+
"group/command-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-selected:**:[svg]:text-foreground",
|
|
1557
|
+
className
|
|
1558
|
+
),
|
|
1559
|
+
...props,
|
|
1560
|
+
children: [
|
|
1561
|
+
children,
|
|
1562
|
+
/* @__PURE__ */ jsx(CheckIcon, { className: "ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100" })
|
|
1563
|
+
]
|
|
1564
|
+
}
|
|
1565
|
+
);
|
|
1566
|
+
}
|
|
1567
|
+
function CommandShortcut({
|
|
1568
|
+
className,
|
|
1569
|
+
...props
|
|
1570
|
+
}) {
|
|
1571
|
+
return /* @__PURE__ */ jsx(
|
|
1572
|
+
"span",
|
|
1573
|
+
{
|
|
1574
|
+
"data-slot": "command-shortcut",
|
|
1575
|
+
className: cn(
|
|
1576
|
+
"ml-auto text-xs tracking-widest text-muted-foreground group-data-selected/command-item:text-foreground",
|
|
1577
|
+
className
|
|
1578
|
+
),
|
|
1579
|
+
...props
|
|
1580
|
+
}
|
|
1581
|
+
);
|
|
1582
|
+
}
|
|
1583
|
+
function SmartSelect({
|
|
1584
|
+
id,
|
|
1585
|
+
options = [],
|
|
1586
|
+
value,
|
|
1587
|
+
onChange,
|
|
1588
|
+
multiple = false,
|
|
1589
|
+
placeholder = "Select...",
|
|
1590
|
+
disabled = false,
|
|
1591
|
+
onSearch,
|
|
1592
|
+
displayMode = "count",
|
|
1593
|
+
maxVisibleChips = 2,
|
|
1594
|
+
className,
|
|
1595
|
+
minSearchLength = 0
|
|
1596
|
+
}) {
|
|
1597
|
+
const [open, setOpen] = React4.useState(false);
|
|
1598
|
+
const [items, setItems] = React4.useState(options);
|
|
1599
|
+
const [loading, setLoading] = React4.useState(false);
|
|
1600
|
+
const isServer = !!onSearch;
|
|
1601
|
+
const selectedValues = Array.isArray(value) ? value : [value];
|
|
1602
|
+
const visibleItems = isServer ? items : options;
|
|
1603
|
+
const labelCacheRef = React4.useRef(/* @__PURE__ */ new Map());
|
|
1604
|
+
const onSearchRef = React4.useRef(onSearch);
|
|
1605
|
+
React4.useLayoutEffect(() => {
|
|
1606
|
+
onSearchRef.current = onSearch;
|
|
1607
|
+
});
|
|
1608
|
+
const debounceRef = React4.useRef(null);
|
|
1609
|
+
const handleSearch = (query) => {
|
|
1610
|
+
if (!isServer) return;
|
|
1611
|
+
if (debounceRef.current) clearTimeout(debounceRef.current);
|
|
1612
|
+
const trimmed = query.trim();
|
|
1613
|
+
if (trimmed.length > 0 && trimmed.length < minSearchLength) return;
|
|
1614
|
+
debounceRef.current = setTimeout(() => {
|
|
1615
|
+
setLoading(true);
|
|
1616
|
+
onSearchRef.current?.(query).then(setItems).catch(console.error).finally(() => setLoading(false));
|
|
1617
|
+
}, 300);
|
|
1618
|
+
};
|
|
1619
|
+
React4.useEffect(() => {
|
|
1620
|
+
if (open && isServer) {
|
|
1621
|
+
setLoading(true);
|
|
1622
|
+
onSearchRef.current?.("").then(setItems).catch(console.error).finally(() => setLoading(false));
|
|
1623
|
+
}
|
|
1624
|
+
}, [open, isServer]);
|
|
1625
|
+
React4.useEffect(() => {
|
|
1626
|
+
if (options.length === 0) return;
|
|
1627
|
+
options.forEach((o) => {
|
|
1628
|
+
if (o.value) labelCacheRef.current.set(o.value, o.label);
|
|
1629
|
+
});
|
|
1630
|
+
if (isServer) {
|
|
1631
|
+
setItems((prev) => prev.length === 0 ? options : prev);
|
|
1632
|
+
}
|
|
1633
|
+
}, [options, isServer]);
|
|
1634
|
+
React4.useEffect(() => () => {
|
|
1635
|
+
if (debounceRef.current) clearTimeout(debounceRef.current);
|
|
1636
|
+
}, []);
|
|
1637
|
+
const toggleItem = (val) => {
|
|
1638
|
+
const item = visibleItems.find((o) => o.value === val);
|
|
1639
|
+
if (item) labelCacheRef.current.set(val, item.label);
|
|
1640
|
+
if (multiple) {
|
|
1641
|
+
const newValues = selectedValues.includes(val) ? selectedValues.filter((v) => v !== val) : [...selectedValues, val];
|
|
1642
|
+
onChange(newValues);
|
|
1643
|
+
} else {
|
|
1644
|
+
onChange(val);
|
|
1645
|
+
setOpen(false);
|
|
1646
|
+
}
|
|
1647
|
+
};
|
|
1648
|
+
const displayLabel = () => {
|
|
1649
|
+
if (!value || Array.isArray(value) && value.length === 0) return placeholder;
|
|
1650
|
+
if (multiple && displayMode === "chips") {
|
|
1651
|
+
const visibleSelectedValues = selectedValues.slice(0, Math.max(1, maxVisibleChips));
|
|
1652
|
+
const hiddenCount = Math.max(0, selectedValues.length - visibleSelectedValues.length);
|
|
1653
|
+
return /* @__PURE__ */ jsxs("span", { className: "flex min-w-0 flex-1 items-center gap-1 overflow-hidden whitespace-nowrap", children: [
|
|
1654
|
+
visibleSelectedValues.map((selectedValue) => {
|
|
1655
|
+
const label = options.find((item) => item.value === selectedValue)?.label ?? visibleItems.find((item) => item.value === selectedValue)?.label ?? labelCacheRef.current.get(selectedValue) ?? selectedValue;
|
|
1656
|
+
return /* @__PURE__ */ jsx("span", { className: "inline-flex min-w-0 max-w-full flex-[0_1_auto] items-center rounded-sm bg-muted px-2 py-0.5 text-xs text-foreground", children: /* @__PURE__ */ jsx("span", { className: "truncate", children: label }) }, selectedValue);
|
|
1657
|
+
}),
|
|
1658
|
+
hiddenCount > 0 && /* @__PURE__ */ jsxs("span", { className: "inline-flex h-5 shrink-0 items-center rounded-sm bg-muted px-1.5 text-xs font-medium text-muted-foreground", children: [
|
|
1659
|
+
"+",
|
|
1660
|
+
hiddenCount
|
|
1661
|
+
] })
|
|
1662
|
+
] });
|
|
1663
|
+
}
|
|
1664
|
+
if (multiple) return `${selectedValues.length} selected`;
|
|
1665
|
+
const singleVal = typeof value === "string" ? value : value[0];
|
|
1666
|
+
const found = options.find((o) => o.value === singleVal) ?? visibleItems.find((o) => o.value === singleVal);
|
|
1667
|
+
return found?.label ?? labelCacheRef.current.get(singleVal) ?? (singleVal || placeholder);
|
|
1668
|
+
};
|
|
1669
|
+
return /* @__PURE__ */ jsxs(Popover, { open, onOpenChange: disabled ? void 0 : setOpen, children: [
|
|
1670
|
+
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, id, children: /* @__PURE__ */ jsxs(
|
|
1671
|
+
Button,
|
|
1672
|
+
{
|
|
1673
|
+
variant: "outline",
|
|
1674
|
+
role: "combobox",
|
|
1675
|
+
disabled,
|
|
1676
|
+
className: cn(
|
|
1677
|
+
"w-full justify-between bg-transparent dark:bg-input/30",
|
|
1678
|
+
multiple && displayMode === "chips" && "h-auto min-h-9 py-1.5",
|
|
1679
|
+
(!value || Array.isArray(value) && value.length === 0) && "text-muted-foreground",
|
|
1680
|
+
className
|
|
1681
|
+
),
|
|
1682
|
+
children: [
|
|
1683
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 truncate", children: displayLabel() }),
|
|
1684
|
+
/* @__PURE__ */ jsx(ChevronsUpDown, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
|
|
1685
|
+
]
|
|
1686
|
+
}
|
|
1687
|
+
) }),
|
|
1688
|
+
/* @__PURE__ */ jsx(
|
|
1689
|
+
PopoverContent,
|
|
1690
|
+
{
|
|
1691
|
+
className: "p-0 z-[100] shadow-lg border border-border rounded-md",
|
|
1692
|
+
style: { width: "var(--radix-popover-trigger-width)" },
|
|
1693
|
+
children: /* @__PURE__ */ jsxs(Command, { shouldFilter: !isServer, children: [
|
|
1694
|
+
/* @__PURE__ */ jsx(CommandInput, { placeholder: "Search...", onValueChange: handleSearch }),
|
|
1695
|
+
/* @__PURE__ */ jsx(CommandList, { className: "max-h-[200px]", children: loading ? /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center py-4", children: /* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 animate-spin" }) }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1696
|
+
/* @__PURE__ */ jsx(CommandEmpty, { children: "No data found." }),
|
|
1697
|
+
/* @__PURE__ */ jsx(CommandGroup, { children: visibleItems.map((item) => /* @__PURE__ */ jsx(
|
|
1698
|
+
CommandItem,
|
|
1699
|
+
{
|
|
1700
|
+
value: `${item.label}\0${item.value}`,
|
|
1701
|
+
onSelect: () => toggleItem(item.value),
|
|
1702
|
+
"data-checked": selectedValues.includes(item.value),
|
|
1703
|
+
children: item.label
|
|
1704
|
+
},
|
|
1705
|
+
item.value
|
|
1706
|
+
)) })
|
|
1707
|
+
] }) })
|
|
1708
|
+
] })
|
|
1709
|
+
}
|
|
1710
|
+
)
|
|
1711
|
+
] });
|
|
1712
|
+
}
|
|
1713
|
+
function Accordion({
|
|
1714
|
+
className,
|
|
1715
|
+
...props
|
|
1716
|
+
}) {
|
|
1717
|
+
return /* @__PURE__ */ jsx(
|
|
1718
|
+
Accordion$1.Root,
|
|
1719
|
+
{
|
|
1720
|
+
"data-slot": "accordion",
|
|
1721
|
+
className: cn("flex w-full flex-col", className),
|
|
1722
|
+
...props
|
|
1723
|
+
}
|
|
1724
|
+
);
|
|
1725
|
+
}
|
|
1726
|
+
function AccordionItem({
|
|
1727
|
+
className,
|
|
1728
|
+
...props
|
|
1729
|
+
}) {
|
|
1730
|
+
return /* @__PURE__ */ jsx(
|
|
1731
|
+
Accordion$1.Item,
|
|
1732
|
+
{
|
|
1733
|
+
"data-slot": "accordion-item",
|
|
1734
|
+
className: cn("not-last:border-b", className),
|
|
1735
|
+
...props
|
|
1736
|
+
}
|
|
1737
|
+
);
|
|
1738
|
+
}
|
|
1739
|
+
function AccordionTrigger({
|
|
1740
|
+
className,
|
|
1741
|
+
children,
|
|
1742
|
+
...props
|
|
1743
|
+
}) {
|
|
1744
|
+
return /* @__PURE__ */ jsx(Accordion$1.Header, { className: "flex", children: /* @__PURE__ */ jsxs(
|
|
1745
|
+
Accordion$1.Trigger,
|
|
1746
|
+
{
|
|
1747
|
+
"data-slot": "accordion-trigger",
|
|
1748
|
+
className: cn(
|
|
1749
|
+
"group/accordion-trigger relative flex flex-1 items-start justify-between rounded-md border border-transparent py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:after:border-ring disabled:pointer-events-none disabled:opacity-50 **:data-[slot=accordion-trigger-icon]:ml-auto **:data-[slot=accordion-trigger-icon]:size-4 **:data-[slot=accordion-trigger-icon]:text-muted-foreground",
|
|
1750
|
+
className
|
|
1751
|
+
),
|
|
1752
|
+
...props,
|
|
1753
|
+
children: [
|
|
1754
|
+
children,
|
|
1755
|
+
/* @__PURE__ */ jsx(ChevronDownIcon, { "data-slot": "accordion-trigger-icon", className: "pointer-events-none shrink-0 group-aria-expanded/accordion-trigger:hidden" }),
|
|
1756
|
+
/* @__PURE__ */ jsx(ChevronUpIcon, { "data-slot": "accordion-trigger-icon", className: "pointer-events-none hidden shrink-0 group-aria-expanded/accordion-trigger:inline" })
|
|
1757
|
+
]
|
|
1758
|
+
}
|
|
1759
|
+
) });
|
|
1760
|
+
}
|
|
1761
|
+
function AccordionContent({
|
|
1762
|
+
className,
|
|
1763
|
+
children,
|
|
1764
|
+
...props
|
|
1765
|
+
}) {
|
|
1766
|
+
return /* @__PURE__ */ jsx(
|
|
1767
|
+
Accordion$1.Content,
|
|
1768
|
+
{
|
|
1769
|
+
"data-slot": "accordion-content",
|
|
1770
|
+
className: "overflow-hidden text-sm data-open:animate-accordion-down data-closed:animate-accordion-up",
|
|
1771
|
+
...props,
|
|
1772
|
+
children: /* @__PURE__ */ jsx(
|
|
1773
|
+
"div",
|
|
1774
|
+
{
|
|
1775
|
+
className: cn(
|
|
1776
|
+
"h-(--radix-accordion-content-height) pt-0 pb-4 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",
|
|
1777
|
+
className
|
|
1778
|
+
),
|
|
1779
|
+
children
|
|
1780
|
+
}
|
|
1781
|
+
)
|
|
1782
|
+
}
|
|
1783
|
+
);
|
|
1784
|
+
}
|
|
1785
|
+
var alertVariants = cva(
|
|
1786
|
+
"group/alert relative grid w-full gap-0.5 rounded-lg border px-4 py-3 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2.5 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",
|
|
1787
|
+
{
|
|
1788
|
+
variants: {
|
|
1789
|
+
variant: {
|
|
1790
|
+
default: "bg-card text-card-foreground",
|
|
1791
|
+
destructive: "bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"
|
|
1792
|
+
}
|
|
1793
|
+
},
|
|
1794
|
+
defaultVariants: {
|
|
1795
|
+
variant: "default"
|
|
1796
|
+
}
|
|
1797
|
+
}
|
|
1798
|
+
);
|
|
1799
|
+
function Alert({
|
|
1800
|
+
className,
|
|
1801
|
+
variant,
|
|
1802
|
+
...props
|
|
1803
|
+
}) {
|
|
1804
|
+
return /* @__PURE__ */ jsx(
|
|
1805
|
+
"div",
|
|
1806
|
+
{
|
|
1807
|
+
"data-slot": "alert",
|
|
1808
|
+
role: "alert",
|
|
1809
|
+
className: cn(alertVariants({ variant }), className),
|
|
1810
|
+
...props
|
|
1811
|
+
}
|
|
1812
|
+
);
|
|
1813
|
+
}
|
|
1814
|
+
function AlertTitle({ className, ...props }) {
|
|
1815
|
+
return /* @__PURE__ */ jsx(
|
|
1816
|
+
"div",
|
|
1817
|
+
{
|
|
1818
|
+
"data-slot": "alert-title",
|
|
1819
|
+
className: cn(
|
|
1820
|
+
"font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground",
|
|
1821
|
+
className
|
|
1822
|
+
),
|
|
1823
|
+
...props
|
|
1824
|
+
}
|
|
1825
|
+
);
|
|
1826
|
+
}
|
|
1827
|
+
function AlertDescription({
|
|
1828
|
+
className,
|
|
1829
|
+
...props
|
|
1830
|
+
}) {
|
|
1831
|
+
return /* @__PURE__ */ jsx(
|
|
1832
|
+
"div",
|
|
1833
|
+
{
|
|
1834
|
+
"data-slot": "alert-description",
|
|
1835
|
+
className: cn(
|
|
1836
|
+
"text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",
|
|
1837
|
+
className
|
|
1838
|
+
),
|
|
1839
|
+
...props
|
|
1840
|
+
}
|
|
1841
|
+
);
|
|
1842
|
+
}
|
|
1843
|
+
function AlertAction({ className, ...props }) {
|
|
1844
|
+
return /* @__PURE__ */ jsx(
|
|
1845
|
+
"div",
|
|
1846
|
+
{
|
|
1847
|
+
"data-slot": "alert-action",
|
|
1848
|
+
className: cn("absolute top-2.5 right-3", className),
|
|
1849
|
+
...props
|
|
1850
|
+
}
|
|
1851
|
+
);
|
|
1852
|
+
}
|
|
1853
|
+
function AlertDialog({
|
|
1854
|
+
...props
|
|
1855
|
+
}) {
|
|
1856
|
+
return /* @__PURE__ */ jsx(AlertDialog$1.Root, { "data-slot": "alert-dialog", ...props });
|
|
1857
|
+
}
|
|
1858
|
+
function AlertDialogTrigger({
|
|
1859
|
+
...props
|
|
1860
|
+
}) {
|
|
1861
|
+
return /* @__PURE__ */ jsx(AlertDialog$1.Trigger, { "data-slot": "alert-dialog-trigger", ...props });
|
|
1862
|
+
}
|
|
1863
|
+
function AlertDialogPortal({
|
|
1864
|
+
...props
|
|
1865
|
+
}) {
|
|
1866
|
+
return /* @__PURE__ */ jsx(AlertDialog$1.Portal, { "data-slot": "alert-dialog-portal", ...props });
|
|
1867
|
+
}
|
|
1868
|
+
function AlertDialogOverlay({
|
|
1869
|
+
className,
|
|
1870
|
+
...props
|
|
1871
|
+
}) {
|
|
1872
|
+
return /* @__PURE__ */ jsx(
|
|
1873
|
+
AlertDialog$1.Overlay,
|
|
1874
|
+
{
|
|
1875
|
+
"data-slot": "alert-dialog-overlay",
|
|
1876
|
+
className: cn(
|
|
1877
|
+
"fixed inset-0 z-[80] bg-black/40 duration-100 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
|
|
1878
|
+
className
|
|
1879
|
+
),
|
|
1880
|
+
...props
|
|
1881
|
+
}
|
|
1882
|
+
);
|
|
1883
|
+
}
|
|
1884
|
+
var alertDialogPositionClasses = {
|
|
1885
|
+
center: "top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2",
|
|
1886
|
+
top: "top-4 left-1/2 -translate-x-1/2",
|
|
1887
|
+
bottom: "bottom-4 left-1/2 -translate-x-1/2",
|
|
1888
|
+
left: "top-1/2 left-4 -translate-y-1/2",
|
|
1889
|
+
right: "top-1/2 right-4 -translate-y-1/2",
|
|
1890
|
+
"top-left": "top-4 left-4",
|
|
1891
|
+
"top-right": "top-4 right-4",
|
|
1892
|
+
"bottom-left": "bottom-4 left-4",
|
|
1893
|
+
"bottom-right": "bottom-4 right-4"
|
|
1894
|
+
};
|
|
1895
|
+
function AlertDialogContent({
|
|
1896
|
+
className,
|
|
1897
|
+
size = "default",
|
|
1898
|
+
position = "center",
|
|
1899
|
+
...props
|
|
1900
|
+
}) {
|
|
1901
|
+
const portalContainer = usePortalContainer();
|
|
1902
|
+
return /* @__PURE__ */ jsxs(AlertDialogPortal, { container: portalContainer ?? void 0, children: [
|
|
1903
|
+
/* @__PURE__ */ jsx(AlertDialogOverlay, {}),
|
|
1904
|
+
/* @__PURE__ */ jsx(
|
|
1905
|
+
AlertDialog$1.Content,
|
|
1906
|
+
{
|
|
1907
|
+
"data-slot": "alert-dialog-content",
|
|
1908
|
+
"data-size": size,
|
|
1909
|
+
onWheel: (event) => event.stopPropagation(),
|
|
1910
|
+
className: cn(
|
|
1911
|
+
"group/alert-dialog-content fixed z-[80] grid w-full gap-6 rounded-xl bg-popover p-6 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-lg data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
1912
|
+
alertDialogPositionClasses[position],
|
|
1913
|
+
className
|
|
1914
|
+
),
|
|
1915
|
+
...props
|
|
1916
|
+
}
|
|
1917
|
+
)
|
|
1918
|
+
] });
|
|
1919
|
+
}
|
|
1920
|
+
function AlertDialogHeader({
|
|
1921
|
+
className,
|
|
1922
|
+
...props
|
|
1923
|
+
}) {
|
|
1924
|
+
return /* @__PURE__ */ jsx(
|
|
1925
|
+
"div",
|
|
1926
|
+
{
|
|
1927
|
+
"data-slot": "alert-dialog-header",
|
|
1928
|
+
className: cn(
|
|
1929
|
+
"grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",
|
|
1930
|
+
className
|
|
1931
|
+
),
|
|
1932
|
+
...props
|
|
1933
|
+
}
|
|
1934
|
+
);
|
|
1935
|
+
}
|
|
1936
|
+
function AlertDialogFooter({
|
|
1937
|
+
className,
|
|
1938
|
+
...props
|
|
1939
|
+
}) {
|
|
1940
|
+
return /* @__PURE__ */ jsx(
|
|
1941
|
+
"div",
|
|
1942
|
+
{
|
|
1943
|
+
"data-slot": "alert-dialog-footer",
|
|
1944
|
+
className: cn(
|
|
1945
|
+
"flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",
|
|
1946
|
+
className
|
|
1947
|
+
),
|
|
1948
|
+
...props
|
|
1949
|
+
}
|
|
1950
|
+
);
|
|
1951
|
+
}
|
|
1952
|
+
function AlertDialogMedia({
|
|
1953
|
+
className,
|
|
1954
|
+
...props
|
|
1955
|
+
}) {
|
|
1956
|
+
return /* @__PURE__ */ jsx(
|
|
1957
|
+
"div",
|
|
1958
|
+
{
|
|
1959
|
+
"data-slot": "alert-dialog-media",
|
|
1960
|
+
className: cn(
|
|
1961
|
+
"mb-2 inline-flex size-16 items-center justify-center rounded-md bg-muted sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-8",
|
|
1962
|
+
className
|
|
1963
|
+
),
|
|
1964
|
+
...props
|
|
1965
|
+
}
|
|
1966
|
+
);
|
|
1967
|
+
}
|
|
1968
|
+
function AlertDialogTitle({
|
|
1969
|
+
className,
|
|
1970
|
+
...props
|
|
1971
|
+
}) {
|
|
1972
|
+
return /* @__PURE__ */ jsx(
|
|
1973
|
+
AlertDialog$1.Title,
|
|
1974
|
+
{
|
|
1975
|
+
"data-slot": "alert-dialog-title",
|
|
1976
|
+
className: cn(
|
|
1977
|
+
"font-heading text-lg font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",
|
|
1978
|
+
className
|
|
1979
|
+
),
|
|
1980
|
+
...props
|
|
1981
|
+
}
|
|
1982
|
+
);
|
|
1983
|
+
}
|
|
1984
|
+
function AlertDialogDescription({
|
|
1985
|
+
className,
|
|
1986
|
+
...props
|
|
1987
|
+
}) {
|
|
1988
|
+
return /* @__PURE__ */ jsx(
|
|
1989
|
+
AlertDialog$1.Description,
|
|
1990
|
+
{
|
|
1991
|
+
"data-slot": "alert-dialog-description",
|
|
1992
|
+
className: cn(
|
|
1993
|
+
"text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",
|
|
1994
|
+
className
|
|
1995
|
+
),
|
|
1996
|
+
...props
|
|
1997
|
+
}
|
|
1998
|
+
);
|
|
1999
|
+
}
|
|
2000
|
+
function AlertDialogAction({
|
|
2001
|
+
className,
|
|
2002
|
+
variant = "default",
|
|
2003
|
+
size = "default",
|
|
2004
|
+
...props
|
|
2005
|
+
}) {
|
|
2006
|
+
return /* @__PURE__ */ jsx(Button, { variant, size, asChild: true, children: /* @__PURE__ */ jsx(
|
|
2007
|
+
AlertDialog$1.Action,
|
|
2008
|
+
{
|
|
2009
|
+
"data-slot": "alert-dialog-action",
|
|
2010
|
+
className: cn(className),
|
|
2011
|
+
...props
|
|
2012
|
+
}
|
|
2013
|
+
) });
|
|
2014
|
+
}
|
|
2015
|
+
function AlertDialogCancel({
|
|
2016
|
+
className,
|
|
2017
|
+
variant = "outline",
|
|
2018
|
+
size = "default",
|
|
2019
|
+
...props
|
|
2020
|
+
}) {
|
|
2021
|
+
return /* @__PURE__ */ jsx(Button, { variant, size, asChild: true, children: /* @__PURE__ */ jsx(
|
|
2022
|
+
AlertDialog$1.Cancel,
|
|
2023
|
+
{
|
|
2024
|
+
"data-slot": "alert-dialog-cancel",
|
|
2025
|
+
className: cn(className),
|
|
2026
|
+
...props
|
|
2027
|
+
}
|
|
2028
|
+
) });
|
|
2029
|
+
}
|
|
2030
|
+
function AspectRatio({
|
|
2031
|
+
...props
|
|
2032
|
+
}) {
|
|
2033
|
+
return /* @__PURE__ */ jsx(AspectRatio$1.Root, { "data-slot": "aspect-ratio", ...props });
|
|
2034
|
+
}
|
|
2035
|
+
function Avatar({
|
|
2036
|
+
className,
|
|
2037
|
+
size = "default",
|
|
2038
|
+
...props
|
|
2039
|
+
}) {
|
|
2040
|
+
return /* @__PURE__ */ jsx(
|
|
2041
|
+
Avatar$1.Root,
|
|
2042
|
+
{
|
|
2043
|
+
"data-slot": "avatar",
|
|
2044
|
+
"data-size": size,
|
|
2045
|
+
className: cn(
|
|
2046
|
+
"group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten",
|
|
2047
|
+
className
|
|
2048
|
+
),
|
|
2049
|
+
...props
|
|
2050
|
+
}
|
|
2051
|
+
);
|
|
2052
|
+
}
|
|
2053
|
+
function AvatarImage({
|
|
2054
|
+
className,
|
|
2055
|
+
...props
|
|
2056
|
+
}) {
|
|
2057
|
+
return /* @__PURE__ */ jsx(
|
|
2058
|
+
Avatar$1.Image,
|
|
2059
|
+
{
|
|
2060
|
+
"data-slot": "avatar-image",
|
|
2061
|
+
className: cn(
|
|
2062
|
+
"aspect-square size-full rounded-full object-cover",
|
|
2063
|
+
className
|
|
2064
|
+
),
|
|
2065
|
+
...props
|
|
2066
|
+
}
|
|
2067
|
+
);
|
|
2068
|
+
}
|
|
2069
|
+
function AvatarFallback({
|
|
2070
|
+
className,
|
|
2071
|
+
...props
|
|
2072
|
+
}) {
|
|
2073
|
+
return /* @__PURE__ */ jsx(
|
|
2074
|
+
Avatar$1.Fallback,
|
|
2075
|
+
{
|
|
2076
|
+
"data-slot": "avatar-fallback",
|
|
2077
|
+
className: cn(
|
|
2078
|
+
"flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs",
|
|
2079
|
+
className
|
|
2080
|
+
),
|
|
2081
|
+
...props
|
|
2082
|
+
}
|
|
2083
|
+
);
|
|
2084
|
+
}
|
|
2085
|
+
function AvatarBadge({ className, ...props }) {
|
|
2086
|
+
return /* @__PURE__ */ jsx(
|
|
2087
|
+
"span",
|
|
2088
|
+
{
|
|
2089
|
+
"data-slot": "avatar-badge",
|
|
2090
|
+
className: cn(
|
|
2091
|
+
"absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full bg-primary text-primary-foreground bg-blend-color ring-2 ring-background select-none",
|
|
2092
|
+
"group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden",
|
|
2093
|
+
"group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2",
|
|
2094
|
+
"group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2",
|
|
2095
|
+
className
|
|
2096
|
+
),
|
|
2097
|
+
...props
|
|
2098
|
+
}
|
|
2099
|
+
);
|
|
2100
|
+
}
|
|
2101
|
+
function AvatarGroup({ className, ...props }) {
|
|
2102
|
+
return /* @__PURE__ */ jsx(
|
|
2103
|
+
"div",
|
|
2104
|
+
{
|
|
2105
|
+
"data-slot": "avatar-group",
|
|
2106
|
+
className: cn(
|
|
2107
|
+
"group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2 *:data-[slot=avatar]:ring-background",
|
|
2108
|
+
className
|
|
2109
|
+
),
|
|
2110
|
+
...props
|
|
2111
|
+
}
|
|
2112
|
+
);
|
|
2113
|
+
}
|
|
2114
|
+
function AvatarGroupCount({
|
|
2115
|
+
className,
|
|
2116
|
+
...props
|
|
2117
|
+
}) {
|
|
2118
|
+
return /* @__PURE__ */ jsx(
|
|
2119
|
+
"div",
|
|
2120
|
+
{
|
|
2121
|
+
"data-slot": "avatar-group-count",
|
|
2122
|
+
className: cn(
|
|
2123
|
+
"relative flex size-8 shrink-0 items-center justify-center rounded-full bg-muted text-sm text-muted-foreground ring-2 ring-background group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3",
|
|
2124
|
+
className
|
|
2125
|
+
),
|
|
2126
|
+
...props
|
|
2127
|
+
}
|
|
2128
|
+
);
|
|
2129
|
+
}
|
|
2130
|
+
function Breadcrumb({ className, ...props }) {
|
|
2131
|
+
return /* @__PURE__ */ jsx(
|
|
2132
|
+
"nav",
|
|
2133
|
+
{
|
|
2134
|
+
"aria-label": "breadcrumb",
|
|
2135
|
+
"data-slot": "breadcrumb",
|
|
2136
|
+
className: cn(className),
|
|
2137
|
+
...props
|
|
2138
|
+
}
|
|
2139
|
+
);
|
|
2140
|
+
}
|
|
2141
|
+
function BreadcrumbList({ className, ...props }) {
|
|
2142
|
+
return /* @__PURE__ */ jsx(
|
|
2143
|
+
"ol",
|
|
2144
|
+
{
|
|
2145
|
+
"data-slot": "breadcrumb-list",
|
|
2146
|
+
className: cn(
|
|
2147
|
+
"flex flex-wrap items-center gap-1.5 text-sm wrap-break-word text-muted-foreground sm:gap-2.5",
|
|
2148
|
+
className
|
|
2149
|
+
),
|
|
2150
|
+
...props
|
|
2151
|
+
}
|
|
2152
|
+
);
|
|
2153
|
+
}
|
|
2154
|
+
function BreadcrumbItem({ className, ...props }) {
|
|
2155
|
+
return /* @__PURE__ */ jsx(
|
|
2156
|
+
"li",
|
|
2157
|
+
{
|
|
2158
|
+
"data-slot": "breadcrumb-item",
|
|
2159
|
+
className: cn("inline-flex items-center gap-1.5", className),
|
|
2160
|
+
...props
|
|
2161
|
+
}
|
|
2162
|
+
);
|
|
2163
|
+
}
|
|
2164
|
+
function BreadcrumbLink({
|
|
2165
|
+
asChild,
|
|
2166
|
+
className,
|
|
2167
|
+
...props
|
|
2168
|
+
}) {
|
|
2169
|
+
const Comp = asChild ? Slot.Root : "a";
|
|
2170
|
+
return /* @__PURE__ */ jsx(
|
|
2171
|
+
Comp,
|
|
2172
|
+
{
|
|
2173
|
+
"data-slot": "breadcrumb-link",
|
|
2174
|
+
className: cn("transition-colors hover:text-foreground", className),
|
|
2175
|
+
...props
|
|
2176
|
+
}
|
|
2177
|
+
);
|
|
2178
|
+
}
|
|
2179
|
+
function BreadcrumbPage({ className, ...props }) {
|
|
2180
|
+
return /* @__PURE__ */ jsx(
|
|
2181
|
+
"span",
|
|
2182
|
+
{
|
|
2183
|
+
"data-slot": "breadcrumb-page",
|
|
2184
|
+
role: "link",
|
|
2185
|
+
"aria-disabled": "true",
|
|
2186
|
+
"aria-current": "page",
|
|
2187
|
+
className: cn("font-normal text-foreground", className),
|
|
2188
|
+
...props
|
|
2189
|
+
}
|
|
2190
|
+
);
|
|
2191
|
+
}
|
|
2192
|
+
function BreadcrumbSeparator({
|
|
2193
|
+
children,
|
|
2194
|
+
className,
|
|
2195
|
+
...props
|
|
2196
|
+
}) {
|
|
2197
|
+
return /* @__PURE__ */ jsx(
|
|
2198
|
+
"li",
|
|
2199
|
+
{
|
|
2200
|
+
"data-slot": "breadcrumb-separator",
|
|
2201
|
+
role: "presentation",
|
|
2202
|
+
"aria-hidden": "true",
|
|
2203
|
+
className: cn("[&>svg]:size-3.5", className),
|
|
2204
|
+
...props,
|
|
2205
|
+
children: children ?? /* @__PURE__ */ jsx(ChevronRightIcon, {})
|
|
2206
|
+
}
|
|
2207
|
+
);
|
|
2208
|
+
}
|
|
2209
|
+
function BreadcrumbEllipsis({
|
|
2210
|
+
className,
|
|
2211
|
+
...props
|
|
2212
|
+
}) {
|
|
2213
|
+
return /* @__PURE__ */ jsxs(
|
|
2214
|
+
"span",
|
|
2215
|
+
{
|
|
2216
|
+
"data-slot": "breadcrumb-ellipsis",
|
|
2217
|
+
role: "presentation",
|
|
2218
|
+
"aria-hidden": "true",
|
|
2219
|
+
className: cn(
|
|
2220
|
+
"flex size-5 items-center justify-center [&>svg]:size-4",
|
|
2221
|
+
className
|
|
2222
|
+
),
|
|
2223
|
+
...props,
|
|
2224
|
+
children: [
|
|
2225
|
+
/* @__PURE__ */ jsx(
|
|
2226
|
+
MoreHorizontalIcon,
|
|
2227
|
+
{}
|
|
2228
|
+
),
|
|
2229
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "More" })
|
|
2230
|
+
]
|
|
2231
|
+
}
|
|
2232
|
+
);
|
|
2233
|
+
}
|
|
2234
|
+
function Separator({
|
|
2235
|
+
className,
|
|
2236
|
+
orientation = "horizontal",
|
|
2237
|
+
decorative = true,
|
|
2238
|
+
...props
|
|
2239
|
+
}) {
|
|
2240
|
+
return /* @__PURE__ */ jsx(
|
|
2241
|
+
Separator$1.Root,
|
|
2242
|
+
{
|
|
2243
|
+
"data-slot": "separator",
|
|
2244
|
+
decorative,
|
|
2245
|
+
orientation,
|
|
2246
|
+
className: cn(
|
|
2247
|
+
"shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",
|
|
2248
|
+
className
|
|
2249
|
+
),
|
|
2250
|
+
...props
|
|
2251
|
+
}
|
|
2252
|
+
);
|
|
2253
|
+
}
|
|
2254
|
+
var buttonGroupVariants = cva(
|
|
2255
|
+
"group/button-group flex w-fit items-stretch *:focus-visible:relative *:focus-visible:z-10 has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1",
|
|
2256
|
+
{
|
|
2257
|
+
variants: {
|
|
2258
|
+
orientation: {
|
|
2259
|
+
horizontal: "[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-r-md!",
|
|
2260
|
+
vertical: "flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-b-md!"
|
|
2261
|
+
}
|
|
2262
|
+
},
|
|
2263
|
+
defaultVariants: {
|
|
2264
|
+
orientation: "horizontal"
|
|
2265
|
+
}
|
|
2266
|
+
}
|
|
2267
|
+
);
|
|
2268
|
+
function ButtonGroup({
|
|
2269
|
+
className,
|
|
2270
|
+
orientation,
|
|
2271
|
+
...props
|
|
2272
|
+
}) {
|
|
2273
|
+
return /* @__PURE__ */ jsx(
|
|
2274
|
+
"div",
|
|
2275
|
+
{
|
|
2276
|
+
role: "group",
|
|
2277
|
+
"data-slot": "button-group",
|
|
2278
|
+
"data-orientation": orientation,
|
|
2279
|
+
className: cn(buttonGroupVariants({ orientation }), className),
|
|
2280
|
+
...props
|
|
2281
|
+
}
|
|
2282
|
+
);
|
|
2283
|
+
}
|
|
2284
|
+
function ButtonGroupText({
|
|
2285
|
+
className,
|
|
2286
|
+
asChild = false,
|
|
2287
|
+
...props
|
|
2288
|
+
}) {
|
|
2289
|
+
const Comp = asChild ? Slot.Root : "div";
|
|
2290
|
+
return /* @__PURE__ */ jsx(
|
|
2291
|
+
Comp,
|
|
2292
|
+
{
|
|
2293
|
+
className: cn(
|
|
2294
|
+
"flex items-center gap-2 rounded-md border bg-muted px-2.5 text-sm font-medium shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
|
|
2295
|
+
className
|
|
2296
|
+
),
|
|
2297
|
+
...props
|
|
2298
|
+
}
|
|
2299
|
+
);
|
|
2300
|
+
}
|
|
2301
|
+
function ButtonGroupSeparator({
|
|
2302
|
+
className,
|
|
2303
|
+
orientation = "vertical",
|
|
2304
|
+
...props
|
|
2305
|
+
}) {
|
|
2306
|
+
return /* @__PURE__ */ jsx(
|
|
2307
|
+
Separator,
|
|
2308
|
+
{
|
|
2309
|
+
"data-slot": "button-group-separator",
|
|
2310
|
+
orientation,
|
|
2311
|
+
className: cn(
|
|
2312
|
+
"relative self-stretch bg-input data-horizontal:mx-px data-horizontal:w-auto data-vertical:my-px data-vertical:h-auto",
|
|
2313
|
+
className
|
|
2314
|
+
),
|
|
2315
|
+
...props
|
|
2316
|
+
}
|
|
2317
|
+
);
|
|
2318
|
+
}
|
|
2319
|
+
function Collapsible({
|
|
2320
|
+
...props
|
|
2321
|
+
}) {
|
|
2322
|
+
return /* @__PURE__ */ jsx(Collapsible$1.Root, { "data-slot": "collapsible", ...props });
|
|
2323
|
+
}
|
|
2324
|
+
function CollapsibleTrigger({
|
|
2325
|
+
...props
|
|
2326
|
+
}) {
|
|
2327
|
+
return /* @__PURE__ */ jsx(
|
|
2328
|
+
Collapsible$1.CollapsibleTrigger,
|
|
2329
|
+
{
|
|
2330
|
+
"data-slot": "collapsible-trigger",
|
|
2331
|
+
...props
|
|
2332
|
+
}
|
|
2333
|
+
);
|
|
2334
|
+
}
|
|
2335
|
+
function CollapsibleContent({
|
|
2336
|
+
...props
|
|
2337
|
+
}) {
|
|
2338
|
+
return /* @__PURE__ */ jsx(
|
|
2339
|
+
Collapsible$1.CollapsibleContent,
|
|
2340
|
+
{
|
|
2341
|
+
"data-slot": "collapsible-content",
|
|
2342
|
+
...props
|
|
2343
|
+
}
|
|
2344
|
+
);
|
|
2345
|
+
}
|
|
2346
|
+
function ContextMenu({
|
|
2347
|
+
...props
|
|
2348
|
+
}) {
|
|
2349
|
+
return /* @__PURE__ */ jsx(ContextMenu$1.Root, { "data-slot": "context-menu", ...props });
|
|
2350
|
+
}
|
|
2351
|
+
function ContextMenuTrigger({
|
|
2352
|
+
className,
|
|
2353
|
+
...props
|
|
2354
|
+
}) {
|
|
2355
|
+
return /* @__PURE__ */ jsx(
|
|
2356
|
+
ContextMenu$1.Trigger,
|
|
2357
|
+
{
|
|
2358
|
+
"data-slot": "context-menu-trigger",
|
|
2359
|
+
className: cn("select-none", className),
|
|
2360
|
+
...props
|
|
2361
|
+
}
|
|
2362
|
+
);
|
|
2363
|
+
}
|
|
2364
|
+
function ContextMenuGroup({
|
|
2365
|
+
...props
|
|
2366
|
+
}) {
|
|
2367
|
+
return /* @__PURE__ */ jsx(ContextMenu$1.Group, { "data-slot": "context-menu-group", ...props });
|
|
2368
|
+
}
|
|
2369
|
+
function ContextMenuPortal({
|
|
2370
|
+
...props
|
|
2371
|
+
}) {
|
|
2372
|
+
return /* @__PURE__ */ jsx(ContextMenu$1.Portal, { "data-slot": "context-menu-portal", ...props });
|
|
2373
|
+
}
|
|
2374
|
+
function ContextMenuSub({
|
|
2375
|
+
...props
|
|
2376
|
+
}) {
|
|
2377
|
+
return /* @__PURE__ */ jsx(ContextMenu$1.Sub, { "data-slot": "context-menu-sub", ...props });
|
|
2378
|
+
}
|
|
2379
|
+
function ContextMenuRadioGroup({
|
|
2380
|
+
...props
|
|
2381
|
+
}) {
|
|
2382
|
+
return /* @__PURE__ */ jsx(
|
|
2383
|
+
ContextMenu$1.RadioGroup,
|
|
2384
|
+
{
|
|
2385
|
+
"data-slot": "context-menu-radio-group",
|
|
2386
|
+
...props
|
|
2387
|
+
}
|
|
2388
|
+
);
|
|
2389
|
+
}
|
|
2390
|
+
function ContextMenuContent({
|
|
2391
|
+
className,
|
|
2392
|
+
...props
|
|
2393
|
+
}) {
|
|
2394
|
+
const portalContainer = usePortalContainer();
|
|
2395
|
+
return /* @__PURE__ */ jsx(ContextMenu$1.Portal, { container: portalContainer ?? void 0, children: /* @__PURE__ */ jsx(
|
|
2396
|
+
ContextMenu$1.Content,
|
|
2397
|
+
{
|
|
2398
|
+
"data-slot": "context-menu-content",
|
|
2399
|
+
className: cn("z-50 max-h-(--radix-context-menu-content-available-height) min-w-36 origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
|
|
2400
|
+
...props
|
|
2401
|
+
}
|
|
2402
|
+
) });
|
|
2403
|
+
}
|
|
2404
|
+
function ContextMenuItem({
|
|
2405
|
+
className,
|
|
2406
|
+
inset,
|
|
2407
|
+
variant = "default",
|
|
2408
|
+
...props
|
|
2409
|
+
}) {
|
|
2410
|
+
return /* @__PURE__ */ jsx(
|
|
2411
|
+
ContextMenu$1.Item,
|
|
2412
|
+
{
|
|
2413
|
+
"data-slot": "context-menu-item",
|
|
2414
|
+
"data-inset": inset,
|
|
2415
|
+
"data-variant": variant,
|
|
2416
|
+
className: cn(
|
|
2417
|
+
"group/context-menu-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 focus:*:[svg]:text-accent-foreground data-[variant=destructive]:*:[svg]:text-destructive",
|
|
2418
|
+
className
|
|
2419
|
+
),
|
|
2420
|
+
...props
|
|
2421
|
+
}
|
|
2422
|
+
);
|
|
2423
|
+
}
|
|
2424
|
+
function ContextMenuSubTrigger({
|
|
2425
|
+
className,
|
|
2426
|
+
inset,
|
|
2427
|
+
children,
|
|
2428
|
+
...props
|
|
2429
|
+
}) {
|
|
2430
|
+
return /* @__PURE__ */ jsxs(
|
|
2431
|
+
ContextMenu$1.SubTrigger,
|
|
2432
|
+
{
|
|
2433
|
+
"data-slot": "context-menu-sub-trigger",
|
|
2434
|
+
"data-inset": inset,
|
|
2435
|
+
className: cn(
|
|
2436
|
+
"flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-8 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
2437
|
+
className
|
|
2438
|
+
),
|
|
2439
|
+
...props,
|
|
2440
|
+
children: [
|
|
2441
|
+
children,
|
|
2442
|
+
/* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto" })
|
|
2443
|
+
]
|
|
2444
|
+
}
|
|
2445
|
+
);
|
|
2446
|
+
}
|
|
2447
|
+
function ContextMenuSubContent({
|
|
2448
|
+
className,
|
|
2449
|
+
...props
|
|
2450
|
+
}) {
|
|
2451
|
+
return /* @__PURE__ */ jsx(
|
|
2452
|
+
ContextMenu$1.SubContent,
|
|
2453
|
+
{
|
|
2454
|
+
"data-slot": "context-menu-sub-content",
|
|
2455
|
+
className: cn("z-50 min-w-32 origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
|
|
2456
|
+
...props
|
|
2457
|
+
}
|
|
2458
|
+
);
|
|
2459
|
+
}
|
|
2460
|
+
function ContextMenuCheckboxItem({
|
|
2461
|
+
className,
|
|
2462
|
+
children,
|
|
2463
|
+
checked,
|
|
2464
|
+
inset,
|
|
2465
|
+
...props
|
|
2466
|
+
}) {
|
|
2467
|
+
return /* @__PURE__ */ jsxs(
|
|
2468
|
+
ContextMenu$1.CheckboxItem,
|
|
2469
|
+
{
|
|
2470
|
+
"data-slot": "context-menu-checkbox-item",
|
|
2471
|
+
"data-inset": inset,
|
|
2472
|
+
className: cn(
|
|
2473
|
+
"relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-8 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
2474
|
+
className
|
|
2475
|
+
),
|
|
2476
|
+
checked,
|
|
2477
|
+
...props,
|
|
2478
|
+
children: [
|
|
2479
|
+
/* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute right-2", children: /* @__PURE__ */ jsx(ContextMenu$1.ItemIndicator, { children: /* @__PURE__ */ jsx(
|
|
2480
|
+
CheckIcon,
|
|
2481
|
+
{}
|
|
2482
|
+
) }) }),
|
|
2483
|
+
children
|
|
2484
|
+
]
|
|
2485
|
+
}
|
|
2486
|
+
);
|
|
2487
|
+
}
|
|
2488
|
+
function ContextMenuRadioItem({
|
|
2489
|
+
className,
|
|
2490
|
+
children,
|
|
2491
|
+
inset,
|
|
2492
|
+
...props
|
|
2493
|
+
}) {
|
|
2494
|
+
return /* @__PURE__ */ jsxs(
|
|
2495
|
+
ContextMenu$1.RadioItem,
|
|
2496
|
+
{
|
|
2497
|
+
"data-slot": "context-menu-radio-item",
|
|
2498
|
+
"data-inset": inset,
|
|
2499
|
+
className: cn(
|
|
2500
|
+
"relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-8 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
2501
|
+
className
|
|
2502
|
+
),
|
|
2503
|
+
...props,
|
|
2504
|
+
children: [
|
|
2505
|
+
/* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute right-2", children: /* @__PURE__ */ jsx(ContextMenu$1.ItemIndicator, { children: /* @__PURE__ */ jsx(
|
|
2506
|
+
CheckIcon,
|
|
2507
|
+
{}
|
|
2508
|
+
) }) }),
|
|
2509
|
+
children
|
|
2510
|
+
]
|
|
2511
|
+
}
|
|
2512
|
+
);
|
|
2513
|
+
}
|
|
2514
|
+
function ContextMenuLabel({
|
|
2515
|
+
className,
|
|
2516
|
+
inset,
|
|
2517
|
+
...props
|
|
2518
|
+
}) {
|
|
2519
|
+
return /* @__PURE__ */ jsx(
|
|
2520
|
+
ContextMenu$1.Label,
|
|
2521
|
+
{
|
|
2522
|
+
"data-slot": "context-menu-label",
|
|
2523
|
+
"data-inset": inset,
|
|
2524
|
+
className: cn(
|
|
2525
|
+
"px-2 py-1.5 text-xs font-medium text-muted-foreground data-inset:pl-8",
|
|
2526
|
+
className
|
|
2527
|
+
),
|
|
2528
|
+
...props
|
|
2529
|
+
}
|
|
2530
|
+
);
|
|
2531
|
+
}
|
|
2532
|
+
function ContextMenuSeparator({
|
|
2533
|
+
className,
|
|
2534
|
+
...props
|
|
2535
|
+
}) {
|
|
2536
|
+
return /* @__PURE__ */ jsx(
|
|
2537
|
+
ContextMenu$1.Separator,
|
|
2538
|
+
{
|
|
2539
|
+
"data-slot": "context-menu-separator",
|
|
2540
|
+
className: cn("-mx-1 my-1 h-px bg-border", className),
|
|
2541
|
+
...props
|
|
2542
|
+
}
|
|
2543
|
+
);
|
|
2544
|
+
}
|
|
2545
|
+
function ContextMenuShortcut({
|
|
2546
|
+
className,
|
|
2547
|
+
...props
|
|
2548
|
+
}) {
|
|
2549
|
+
return /* @__PURE__ */ jsx(
|
|
2550
|
+
"span",
|
|
2551
|
+
{
|
|
2552
|
+
"data-slot": "context-menu-shortcut",
|
|
2553
|
+
className: cn(
|
|
2554
|
+
"ml-auto text-xs tracking-widest text-muted-foreground group-focus/context-menu-item:text-accent-foreground",
|
|
2555
|
+
className
|
|
2556
|
+
),
|
|
2557
|
+
...props
|
|
2558
|
+
}
|
|
2559
|
+
);
|
|
2560
|
+
}
|
|
2561
|
+
function Empty({ className, ...props }) {
|
|
2562
|
+
return /* @__PURE__ */ jsx(
|
|
2563
|
+
"div",
|
|
2564
|
+
{
|
|
2565
|
+
"data-slot": "empty",
|
|
2566
|
+
className: cn(
|
|
2567
|
+
"flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-lg border-dashed p-12 text-center text-balance",
|
|
2568
|
+
className
|
|
2569
|
+
),
|
|
2570
|
+
...props
|
|
2571
|
+
}
|
|
2572
|
+
);
|
|
2573
|
+
}
|
|
2574
|
+
function EmptyHeader({ className, ...props }) {
|
|
2575
|
+
return /* @__PURE__ */ jsx(
|
|
2576
|
+
"div",
|
|
2577
|
+
{
|
|
2578
|
+
"data-slot": "empty-header",
|
|
2579
|
+
className: cn("flex max-w-sm flex-col items-center gap-2", className),
|
|
2580
|
+
...props
|
|
2581
|
+
}
|
|
2582
|
+
);
|
|
2583
|
+
}
|
|
2584
|
+
var emptyMediaVariants = cva(
|
|
2585
|
+
"mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
2586
|
+
{
|
|
2587
|
+
variants: {
|
|
2588
|
+
variant: {
|
|
2589
|
+
default: "bg-transparent",
|
|
2590
|
+
icon: "flex size-10 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-6"
|
|
2591
|
+
}
|
|
2592
|
+
},
|
|
2593
|
+
defaultVariants: {
|
|
2594
|
+
variant: "default"
|
|
2595
|
+
}
|
|
2596
|
+
}
|
|
2597
|
+
);
|
|
2598
|
+
function EmptyMedia({
|
|
2599
|
+
className,
|
|
2600
|
+
variant = "default",
|
|
2601
|
+
...props
|
|
2602
|
+
}) {
|
|
2603
|
+
return /* @__PURE__ */ jsx(
|
|
2604
|
+
"div",
|
|
2605
|
+
{
|
|
2606
|
+
"data-slot": "empty-icon",
|
|
2607
|
+
"data-variant": variant,
|
|
2608
|
+
className: cn(emptyMediaVariants({ variant, className })),
|
|
2609
|
+
...props
|
|
2610
|
+
}
|
|
2611
|
+
);
|
|
2612
|
+
}
|
|
2613
|
+
function EmptyTitle({ className, ...props }) {
|
|
2614
|
+
return /* @__PURE__ */ jsx(
|
|
2615
|
+
"div",
|
|
2616
|
+
{
|
|
2617
|
+
"data-slot": "empty-title",
|
|
2618
|
+
className: cn(
|
|
2619
|
+
"font-heading text-lg font-medium tracking-tight",
|
|
2620
|
+
className
|
|
2621
|
+
),
|
|
2622
|
+
...props
|
|
2623
|
+
}
|
|
2624
|
+
);
|
|
2625
|
+
}
|
|
2626
|
+
function EmptyDescription({ className, ...props }) {
|
|
2627
|
+
return /* @__PURE__ */ jsx(
|
|
2628
|
+
"div",
|
|
2629
|
+
{
|
|
2630
|
+
"data-slot": "empty-description",
|
|
2631
|
+
className: cn(
|
|
2632
|
+
"text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
|
|
2633
|
+
className
|
|
2634
|
+
),
|
|
2635
|
+
...props
|
|
2636
|
+
}
|
|
2637
|
+
);
|
|
2638
|
+
}
|
|
2639
|
+
function EmptyContent({ className, ...props }) {
|
|
2640
|
+
return /* @__PURE__ */ jsx(
|
|
2641
|
+
"div",
|
|
2642
|
+
{
|
|
2643
|
+
"data-slot": "empty-content",
|
|
2644
|
+
className: cn(
|
|
2645
|
+
"flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm text-balance",
|
|
2646
|
+
className
|
|
2647
|
+
),
|
|
2648
|
+
...props
|
|
2649
|
+
}
|
|
2650
|
+
);
|
|
2651
|
+
}
|
|
2652
|
+
function Label({
|
|
2653
|
+
className,
|
|
2654
|
+
...props
|
|
2655
|
+
}) {
|
|
2656
|
+
return /* @__PURE__ */ jsx(
|
|
2657
|
+
Label$1.Root,
|
|
2658
|
+
{
|
|
2659
|
+
"data-slot": "label",
|
|
2660
|
+
className: cn(
|
|
2661
|
+
"flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
2662
|
+
className
|
|
2663
|
+
),
|
|
2664
|
+
...props
|
|
2665
|
+
}
|
|
2666
|
+
);
|
|
2667
|
+
}
|
|
2668
|
+
function FieldSet({ className, ...props }) {
|
|
2669
|
+
return /* @__PURE__ */ jsx(
|
|
2670
|
+
"fieldset",
|
|
2671
|
+
{
|
|
2672
|
+
"data-slot": "field-set",
|
|
2673
|
+
className: cn(
|
|
2674
|
+
"flex flex-col gap-6 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",
|
|
2675
|
+
className
|
|
2676
|
+
),
|
|
2677
|
+
...props
|
|
2678
|
+
}
|
|
2679
|
+
);
|
|
2680
|
+
}
|
|
2681
|
+
function FieldLegend({
|
|
2682
|
+
className,
|
|
2683
|
+
variant = "legend",
|
|
2684
|
+
...props
|
|
2685
|
+
}) {
|
|
2686
|
+
return /* @__PURE__ */ jsx(
|
|
2687
|
+
"legend",
|
|
2688
|
+
{
|
|
2689
|
+
"data-slot": "field-legend",
|
|
2690
|
+
"data-variant": variant,
|
|
2691
|
+
className: cn(
|
|
2692
|
+
"mb-3 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base",
|
|
2693
|
+
className
|
|
2694
|
+
),
|
|
2695
|
+
...props
|
|
2696
|
+
}
|
|
2697
|
+
);
|
|
2698
|
+
}
|
|
2699
|
+
function FieldGroup({ className, ...props }) {
|
|
2700
|
+
return /* @__PURE__ */ jsx(
|
|
2701
|
+
"div",
|
|
2702
|
+
{
|
|
2703
|
+
"data-slot": "field-group",
|
|
2704
|
+
className: cn(
|
|
2705
|
+
"group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4",
|
|
2706
|
+
className
|
|
2707
|
+
),
|
|
2708
|
+
...props
|
|
2709
|
+
}
|
|
2710
|
+
);
|
|
2711
|
+
}
|
|
2712
|
+
var fieldVariants = cva(
|
|
2713
|
+
"group/field flex w-full gap-3 data-[invalid=true]:text-destructive",
|
|
2714
|
+
{
|
|
2715
|
+
variants: {
|
|
2716
|
+
orientation: {
|
|
2717
|
+
vertical: "flex-col *:w-full [&>.sr-only]:w-auto",
|
|
2718
|
+
horizontal: "flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",
|
|
2719
|
+
responsive: "flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
|
|
2720
|
+
}
|
|
2721
|
+
},
|
|
2722
|
+
defaultVariants: {
|
|
2723
|
+
orientation: "vertical"
|
|
2724
|
+
}
|
|
2725
|
+
}
|
|
2726
|
+
);
|
|
2727
|
+
function Field({
|
|
2728
|
+
className,
|
|
2729
|
+
orientation = "vertical",
|
|
2730
|
+
...props
|
|
2731
|
+
}) {
|
|
2732
|
+
return /* @__PURE__ */ jsx(
|
|
2733
|
+
"div",
|
|
2734
|
+
{
|
|
2735
|
+
role: "group",
|
|
2736
|
+
"data-slot": "field",
|
|
2737
|
+
"data-orientation": orientation,
|
|
2738
|
+
className: cn(fieldVariants({ orientation }), className),
|
|
2739
|
+
...props
|
|
2740
|
+
}
|
|
2741
|
+
);
|
|
2742
|
+
}
|
|
2743
|
+
function FieldContent({ className, ...props }) {
|
|
2744
|
+
return /* @__PURE__ */ jsx(
|
|
2745
|
+
"div",
|
|
2746
|
+
{
|
|
2747
|
+
"data-slot": "field-content",
|
|
2748
|
+
className: cn(
|
|
2749
|
+
"group/field-content flex flex-1 flex-col gap-1 leading-snug",
|
|
2750
|
+
className
|
|
2751
|
+
),
|
|
2752
|
+
...props
|
|
2753
|
+
}
|
|
2754
|
+
);
|
|
2755
|
+
}
|
|
2756
|
+
function FieldLabel({
|
|
2757
|
+
className,
|
|
2758
|
+
...props
|
|
2759
|
+
}) {
|
|
2760
|
+
return /* @__PURE__ */ jsx(
|
|
2761
|
+
Label,
|
|
2762
|
+
{
|
|
2763
|
+
"data-slot": "field-label",
|
|
2764
|
+
className: cn(
|
|
2765
|
+
"group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border *:data-[slot=field]:p-3 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10",
|
|
2766
|
+
"has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col",
|
|
2767
|
+
className
|
|
2768
|
+
),
|
|
2769
|
+
...props
|
|
2770
|
+
}
|
|
2771
|
+
);
|
|
2772
|
+
}
|
|
2773
|
+
function FieldTitle({ className, ...props }) {
|
|
2774
|
+
return /* @__PURE__ */ jsx(
|
|
2775
|
+
"div",
|
|
2776
|
+
{
|
|
2777
|
+
"data-slot": "field-label",
|
|
2778
|
+
className: cn(
|
|
2779
|
+
"flex w-fit items-center gap-2 text-sm font-medium group-data-[disabled=true]/field:opacity-50",
|
|
2780
|
+
className
|
|
2781
|
+
),
|
|
2782
|
+
...props
|
|
2783
|
+
}
|
|
2784
|
+
);
|
|
2785
|
+
}
|
|
2786
|
+
function FieldDescription({ className, ...props }) {
|
|
2787
|
+
return /* @__PURE__ */ jsx(
|
|
2788
|
+
"p",
|
|
2789
|
+
{
|
|
2790
|
+
"data-slot": "field-description",
|
|
2791
|
+
className: cn(
|
|
2792
|
+
"text-left text-sm leading-normal font-normal text-muted-foreground group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5",
|
|
2793
|
+
"last:mt-0 nth-last-2:-mt-1",
|
|
2794
|
+
"[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
|
|
2795
|
+
className
|
|
2796
|
+
),
|
|
2797
|
+
...props
|
|
2798
|
+
}
|
|
2799
|
+
);
|
|
2800
|
+
}
|
|
2801
|
+
function FieldSeparator({
|
|
2802
|
+
children,
|
|
2803
|
+
className,
|
|
2804
|
+
...props
|
|
2805
|
+
}) {
|
|
2806
|
+
return /* @__PURE__ */ jsxs(
|
|
2807
|
+
"div",
|
|
2808
|
+
{
|
|
2809
|
+
"data-slot": "field-separator",
|
|
2810
|
+
"data-content": !!children,
|
|
2811
|
+
className: cn(
|
|
2812
|
+
"relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2",
|
|
2813
|
+
className
|
|
2814
|
+
),
|
|
2815
|
+
...props,
|
|
2816
|
+
children: [
|
|
2817
|
+
/* @__PURE__ */ jsx(Separator, { className: "absolute inset-0 top-1/2" }),
|
|
2818
|
+
children && /* @__PURE__ */ jsx(
|
|
2819
|
+
"span",
|
|
2820
|
+
{
|
|
2821
|
+
className: "relative mx-auto block w-fit bg-background px-2 text-muted-foreground",
|
|
2822
|
+
"data-slot": "field-separator-content",
|
|
2823
|
+
children
|
|
2824
|
+
}
|
|
2825
|
+
)
|
|
2826
|
+
]
|
|
2827
|
+
}
|
|
2828
|
+
);
|
|
2829
|
+
}
|
|
2830
|
+
function FieldError({
|
|
2831
|
+
className,
|
|
2832
|
+
children,
|
|
2833
|
+
errors,
|
|
2834
|
+
...props
|
|
2835
|
+
}) {
|
|
2836
|
+
const content = useMemo(() => {
|
|
2837
|
+
if (children) {
|
|
2838
|
+
return children;
|
|
2839
|
+
}
|
|
2840
|
+
if (!errors?.length) {
|
|
2841
|
+
return null;
|
|
2842
|
+
}
|
|
2843
|
+
const uniqueErrors = [
|
|
2844
|
+
...new Map(errors.map((error) => [error?.message, error])).values()
|
|
2845
|
+
];
|
|
2846
|
+
if (uniqueErrors?.length == 1) {
|
|
2847
|
+
return uniqueErrors[0]?.message;
|
|
2848
|
+
}
|
|
2849
|
+
return /* @__PURE__ */ jsx("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: uniqueErrors.map(
|
|
2850
|
+
(error, index) => error?.message && /* @__PURE__ */ jsx("li", { children: error.message }, index)
|
|
2851
|
+
) });
|
|
2852
|
+
}, [children, errors]);
|
|
2853
|
+
if (!content) {
|
|
2854
|
+
return null;
|
|
2855
|
+
}
|
|
2856
|
+
return /* @__PURE__ */ jsx(
|
|
2857
|
+
"div",
|
|
2858
|
+
{
|
|
2859
|
+
role: "alert",
|
|
2860
|
+
"data-slot": "field-error",
|
|
2861
|
+
className: cn("text-sm font-normal text-destructive", className),
|
|
2862
|
+
...props,
|
|
2863
|
+
children: content
|
|
2864
|
+
}
|
|
2865
|
+
);
|
|
2866
|
+
}
|
|
2867
|
+
function HoverCard({
|
|
2868
|
+
...props
|
|
2869
|
+
}) {
|
|
2870
|
+
return /* @__PURE__ */ jsx(HoverCard$1.Root, { "data-slot": "hover-card", ...props });
|
|
2871
|
+
}
|
|
2872
|
+
function HoverCardTrigger({
|
|
2873
|
+
...props
|
|
2874
|
+
}) {
|
|
2875
|
+
return /* @__PURE__ */ jsx(HoverCard$1.Trigger, { "data-slot": "hover-card-trigger", ...props });
|
|
2876
|
+
}
|
|
2877
|
+
function HoverCardContent({
|
|
2878
|
+
className,
|
|
2879
|
+
align = "center",
|
|
2880
|
+
sideOffset = 4,
|
|
2881
|
+
...props
|
|
2882
|
+
}) {
|
|
2883
|
+
const portalContainer = usePortalContainer();
|
|
2884
|
+
return /* @__PURE__ */ jsx(HoverCard$1.Portal, { "data-slot": "hover-card-portal", container: portalContainer ?? void 0, children: /* @__PURE__ */ jsx(
|
|
2885
|
+
HoverCard$1.Content,
|
|
2886
|
+
{
|
|
2887
|
+
"data-slot": "hover-card-content",
|
|
2888
|
+
align,
|
|
2889
|
+
sideOffset,
|
|
2890
|
+
className: cn(
|
|
2891
|
+
"z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-lg bg-popover p-4 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
2892
|
+
className
|
|
2893
|
+
),
|
|
2894
|
+
...props
|
|
2895
|
+
}
|
|
2896
|
+
) });
|
|
2897
|
+
}
|
|
2898
|
+
function ItemGroup({ className, ...props }) {
|
|
2899
|
+
return /* @__PURE__ */ jsx(
|
|
2900
|
+
"div",
|
|
2901
|
+
{
|
|
2902
|
+
role: "list",
|
|
2903
|
+
"data-slot": "item-group",
|
|
2904
|
+
className: cn(
|
|
2905
|
+
"group/item-group flex w-full flex-col gap-4 has-data-[size=sm]:gap-2.5 has-data-[size=xs]:gap-2",
|
|
2906
|
+
className
|
|
2907
|
+
),
|
|
2908
|
+
...props
|
|
2909
|
+
}
|
|
2910
|
+
);
|
|
2911
|
+
}
|
|
2912
|
+
function ItemSeparator({
|
|
2913
|
+
className,
|
|
2914
|
+
...props
|
|
2915
|
+
}) {
|
|
2916
|
+
return /* @__PURE__ */ jsx(
|
|
2917
|
+
Separator,
|
|
2918
|
+
{
|
|
2919
|
+
"data-slot": "item-separator",
|
|
2920
|
+
orientation: "horizontal",
|
|
2921
|
+
className: cn("my-2", className),
|
|
2922
|
+
...props
|
|
2923
|
+
}
|
|
2924
|
+
);
|
|
2925
|
+
}
|
|
2926
|
+
var itemVariants = cva(
|
|
2927
|
+
"group/item flex w-full flex-wrap items-center rounded-md border text-sm transition-colors duration-100 outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 [a]:transition-colors [a]:hover:bg-muted",
|
|
2928
|
+
{
|
|
2929
|
+
variants: {
|
|
2930
|
+
variant: {
|
|
2931
|
+
default: "border-transparent",
|
|
2932
|
+
outline: "border-border",
|
|
2933
|
+
muted: "border-transparent bg-muted/50"
|
|
2934
|
+
},
|
|
2935
|
+
size: {
|
|
2936
|
+
default: "gap-3.5 px-4 py-3.5",
|
|
2937
|
+
sm: "gap-2.5 px-3 py-2.5",
|
|
2938
|
+
xs: "gap-2 px-2.5 py-2 in-data-[slot=dropdown-menu-content]:p-0"
|
|
2939
|
+
}
|
|
2940
|
+
},
|
|
2941
|
+
defaultVariants: {
|
|
2942
|
+
variant: "default",
|
|
2943
|
+
size: "default"
|
|
2944
|
+
}
|
|
2945
|
+
}
|
|
2946
|
+
);
|
|
2947
|
+
function Item({
|
|
2948
|
+
className,
|
|
2949
|
+
variant = "default",
|
|
2950
|
+
size = "default",
|
|
2951
|
+
asChild = false,
|
|
2952
|
+
...props
|
|
2953
|
+
}) {
|
|
2954
|
+
const Comp = asChild ? Slot.Root : "div";
|
|
2955
|
+
return /* @__PURE__ */ jsx(
|
|
2956
|
+
Comp,
|
|
2957
|
+
{
|
|
2958
|
+
"data-slot": "item",
|
|
2959
|
+
"data-variant": variant,
|
|
2960
|
+
"data-size": size,
|
|
2961
|
+
className: cn(itemVariants({ variant, size, className })),
|
|
2962
|
+
...props
|
|
2963
|
+
}
|
|
2964
|
+
);
|
|
2965
|
+
}
|
|
2966
|
+
var itemMediaVariants = cva(
|
|
2967
|
+
"flex shrink-0 items-center justify-center gap-2 group-has-data-[slot=item-description]/item:translate-y-0.5 group-has-data-[slot=item-description]/item:self-start [&_svg]:pointer-events-none",
|
|
2968
|
+
{
|
|
2969
|
+
variants: {
|
|
2970
|
+
variant: {
|
|
2971
|
+
default: "bg-transparent",
|
|
2972
|
+
icon: "[&_svg:not([class*='size-'])]:size-4",
|
|
2973
|
+
image: "size-10 overflow-hidden rounded-sm group-data-[size=sm]/item:size-8 group-data-[size=xs]/item:size-6 [&_img]:size-full [&_img]:object-cover"
|
|
2974
|
+
}
|
|
2975
|
+
},
|
|
2976
|
+
defaultVariants: {
|
|
2977
|
+
variant: "default"
|
|
2978
|
+
}
|
|
2979
|
+
}
|
|
2980
|
+
);
|
|
2981
|
+
function ItemMedia({
|
|
2982
|
+
className,
|
|
2983
|
+
variant = "default",
|
|
2984
|
+
...props
|
|
2985
|
+
}) {
|
|
2986
|
+
return /* @__PURE__ */ jsx(
|
|
2987
|
+
"div",
|
|
2988
|
+
{
|
|
2989
|
+
"data-slot": "item-media",
|
|
2990
|
+
"data-variant": variant,
|
|
2991
|
+
className: cn(itemMediaVariants({ variant, className })),
|
|
2992
|
+
...props
|
|
2993
|
+
}
|
|
2994
|
+
);
|
|
2995
|
+
}
|
|
2996
|
+
function ItemContent({ className, ...props }) {
|
|
2997
|
+
return /* @__PURE__ */ jsx(
|
|
2998
|
+
"div",
|
|
2999
|
+
{
|
|
3000
|
+
"data-slot": "item-content",
|
|
3001
|
+
className: cn(
|
|
3002
|
+
"flex flex-1 flex-col gap-1 group-data-[size=xs]/item:gap-0 [&+[data-slot=item-content]]:flex-none",
|
|
3003
|
+
className
|
|
3004
|
+
),
|
|
3005
|
+
...props
|
|
3006
|
+
}
|
|
3007
|
+
);
|
|
3008
|
+
}
|
|
3009
|
+
function ItemTitle({ className, ...props }) {
|
|
3010
|
+
return /* @__PURE__ */ jsx(
|
|
3011
|
+
"div",
|
|
3012
|
+
{
|
|
3013
|
+
"data-slot": "item-title",
|
|
3014
|
+
className: cn(
|
|
3015
|
+
"line-clamp-1 flex w-fit items-center gap-2 text-sm leading-snug font-medium underline-offset-4",
|
|
3016
|
+
className
|
|
3017
|
+
),
|
|
3018
|
+
...props
|
|
3019
|
+
}
|
|
3020
|
+
);
|
|
3021
|
+
}
|
|
3022
|
+
function ItemDescription({ className, ...props }) {
|
|
3023
|
+
return /* @__PURE__ */ jsx(
|
|
3024
|
+
"p",
|
|
3025
|
+
{
|
|
3026
|
+
"data-slot": "item-description",
|
|
3027
|
+
className: cn(
|
|
3028
|
+
"line-clamp-2 text-left text-sm leading-normal font-normal text-muted-foreground group-data-[size=xs]/item:text-xs [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
|
|
3029
|
+
className
|
|
3030
|
+
),
|
|
3031
|
+
...props
|
|
3032
|
+
}
|
|
3033
|
+
);
|
|
3034
|
+
}
|
|
3035
|
+
function ItemActions({ className, ...props }) {
|
|
3036
|
+
return /* @__PURE__ */ jsx(
|
|
3037
|
+
"div",
|
|
3038
|
+
{
|
|
3039
|
+
"data-slot": "item-actions",
|
|
3040
|
+
className: cn("flex items-center gap-2", className),
|
|
3041
|
+
...props
|
|
3042
|
+
}
|
|
3043
|
+
);
|
|
3044
|
+
}
|
|
3045
|
+
function ItemHeader({ className, ...props }) {
|
|
3046
|
+
return /* @__PURE__ */ jsx(
|
|
3047
|
+
"div",
|
|
3048
|
+
{
|
|
3049
|
+
"data-slot": "item-header",
|
|
3050
|
+
className: cn(
|
|
3051
|
+
"flex basis-full items-center justify-between gap-2",
|
|
3052
|
+
className
|
|
3053
|
+
),
|
|
3054
|
+
...props
|
|
3055
|
+
}
|
|
3056
|
+
);
|
|
3057
|
+
}
|
|
3058
|
+
function ItemFooter({ className, ...props }) {
|
|
3059
|
+
return /* @__PURE__ */ jsx(
|
|
3060
|
+
"div",
|
|
3061
|
+
{
|
|
3062
|
+
"data-slot": "item-footer",
|
|
3063
|
+
className: cn(
|
|
3064
|
+
"flex basis-full items-center justify-between gap-2",
|
|
3065
|
+
className
|
|
3066
|
+
),
|
|
3067
|
+
...props
|
|
3068
|
+
}
|
|
3069
|
+
);
|
|
3070
|
+
}
|
|
3071
|
+
function Kbd({ className, ...props }) {
|
|
3072
|
+
return /* @__PURE__ */ jsx(
|
|
3073
|
+
"kbd",
|
|
3074
|
+
{
|
|
3075
|
+
"data-slot": "kbd",
|
|
3076
|
+
className: cn(
|
|
3077
|
+
"pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm bg-muted px-1 font-sans text-xs font-medium text-muted-foreground select-none in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10 [&_svg:not([class*='size-'])]:size-3",
|
|
3078
|
+
className
|
|
3079
|
+
),
|
|
3080
|
+
...props
|
|
3081
|
+
}
|
|
3082
|
+
);
|
|
3083
|
+
}
|
|
3084
|
+
function KbdGroup({ className, ...props }) {
|
|
3085
|
+
return /* @__PURE__ */ jsx(
|
|
3086
|
+
"kbd",
|
|
3087
|
+
{
|
|
3088
|
+
"data-slot": "kbd-group",
|
|
3089
|
+
className: cn("inline-flex items-center gap-1", className),
|
|
3090
|
+
...props
|
|
3091
|
+
}
|
|
3092
|
+
);
|
|
3093
|
+
}
|
|
3094
|
+
function Menubar({
|
|
3095
|
+
className,
|
|
3096
|
+
...props
|
|
3097
|
+
}) {
|
|
3098
|
+
return /* @__PURE__ */ jsx(
|
|
3099
|
+
Menubar$1.Root,
|
|
3100
|
+
{
|
|
3101
|
+
"data-slot": "menubar",
|
|
3102
|
+
className: cn(
|
|
3103
|
+
"flex h-9 items-center gap-1 rounded-md border p-1 shadow-xs",
|
|
3104
|
+
className
|
|
3105
|
+
),
|
|
3106
|
+
...props
|
|
3107
|
+
}
|
|
3108
|
+
);
|
|
3109
|
+
}
|
|
3110
|
+
function MenubarMenu({
|
|
3111
|
+
...props
|
|
3112
|
+
}) {
|
|
3113
|
+
return /* @__PURE__ */ jsx(Menubar$1.Menu, { "data-slot": "menubar-menu", ...props });
|
|
3114
|
+
}
|
|
3115
|
+
function MenubarGroup({
|
|
3116
|
+
...props
|
|
3117
|
+
}) {
|
|
3118
|
+
return /* @__PURE__ */ jsx(Menubar$1.Group, { "data-slot": "menubar-group", ...props });
|
|
3119
|
+
}
|
|
3120
|
+
function MenubarPortal({
|
|
3121
|
+
...props
|
|
3122
|
+
}) {
|
|
3123
|
+
return /* @__PURE__ */ jsx(Menubar$1.Portal, { "data-slot": "menubar-portal", ...props });
|
|
3124
|
+
}
|
|
3125
|
+
function MenubarRadioGroup({
|
|
3126
|
+
...props
|
|
3127
|
+
}) {
|
|
3128
|
+
return /* @__PURE__ */ jsx(Menubar$1.RadioGroup, { "data-slot": "menubar-radio-group", ...props });
|
|
3129
|
+
}
|
|
3130
|
+
function MenubarTrigger({
|
|
3131
|
+
className,
|
|
3132
|
+
...props
|
|
3133
|
+
}) {
|
|
3134
|
+
return /* @__PURE__ */ jsx(
|
|
3135
|
+
Menubar$1.Trigger,
|
|
3136
|
+
{
|
|
3137
|
+
"data-slot": "menubar-trigger",
|
|
3138
|
+
className: cn(
|
|
3139
|
+
"flex items-center rounded-sm px-2 py-1 text-sm font-medium outline-hidden select-none hover:bg-muted aria-expanded:bg-muted",
|
|
3140
|
+
className
|
|
3141
|
+
),
|
|
3142
|
+
...props
|
|
3143
|
+
}
|
|
3144
|
+
);
|
|
3145
|
+
}
|
|
3146
|
+
function MenubarContent({
|
|
3147
|
+
className,
|
|
3148
|
+
align = "start",
|
|
3149
|
+
alignOffset = -4,
|
|
3150
|
+
sideOffset = 8,
|
|
3151
|
+
...props
|
|
3152
|
+
}) {
|
|
3153
|
+
const portalContainer = usePortalContainer();
|
|
3154
|
+
return /* @__PURE__ */ jsx(MenubarPortal, { container: portalContainer ?? void 0, children: /* @__PURE__ */ jsx(
|
|
3155
|
+
Menubar$1.Content,
|
|
3156
|
+
{
|
|
3157
|
+
"data-slot": "menubar-content",
|
|
3158
|
+
align,
|
|
3159
|
+
alignOffset,
|
|
3160
|
+
sideOffset,
|
|
3161
|
+
className: cn("z-50 min-w-36 origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95", className),
|
|
3162
|
+
...props
|
|
3163
|
+
}
|
|
3164
|
+
) });
|
|
3165
|
+
}
|
|
3166
|
+
function MenubarItem({
|
|
3167
|
+
className,
|
|
3168
|
+
inset,
|
|
3169
|
+
variant = "default",
|
|
3170
|
+
...props
|
|
3171
|
+
}) {
|
|
3172
|
+
return /* @__PURE__ */ jsx(
|
|
3173
|
+
Menubar$1.Item,
|
|
3174
|
+
{
|
|
3175
|
+
"data-slot": "menubar-item",
|
|
3176
|
+
"data-inset": inset,
|
|
3177
|
+
"data-variant": variant,
|
|
3178
|
+
className: cn(
|
|
3179
|
+
"group/menubar-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive!",
|
|
3180
|
+
className
|
|
3181
|
+
),
|
|
3182
|
+
...props
|
|
3183
|
+
}
|
|
3184
|
+
);
|
|
3185
|
+
}
|
|
3186
|
+
function MenubarCheckboxItem({
|
|
3187
|
+
className,
|
|
3188
|
+
children,
|
|
3189
|
+
checked,
|
|
3190
|
+
inset,
|
|
3191
|
+
...props
|
|
3192
|
+
}) {
|
|
3193
|
+
return /* @__PURE__ */ jsxs(
|
|
3194
|
+
Menubar$1.CheckboxItem,
|
|
3195
|
+
{
|
|
3196
|
+
"data-slot": "menubar-checkbox-item",
|
|
3197
|
+
"data-inset": inset,
|
|
3198
|
+
className: cn(
|
|
3199
|
+
"relative flex cursor-default items-center gap-2 rounded-md py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-8 data-disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
3200
|
+
className
|
|
3201
|
+
),
|
|
3202
|
+
checked,
|
|
3203
|
+
...props,
|
|
3204
|
+
children: [
|
|
3205
|
+
/* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-4 items-center justify-center [&_svg:not([class*='size-'])]:size-4", children: /* @__PURE__ */ jsx(Menubar$1.ItemIndicator, { children: /* @__PURE__ */ jsx(
|
|
3206
|
+
CheckIcon,
|
|
3207
|
+
{}
|
|
3208
|
+
) }) }),
|
|
3209
|
+
children
|
|
3210
|
+
]
|
|
3211
|
+
}
|
|
3212
|
+
);
|
|
3213
|
+
}
|
|
3214
|
+
function MenubarRadioItem({
|
|
3215
|
+
className,
|
|
3216
|
+
children,
|
|
3217
|
+
inset,
|
|
3218
|
+
...props
|
|
3219
|
+
}) {
|
|
3220
|
+
return /* @__PURE__ */ jsxs(
|
|
3221
|
+
Menubar$1.RadioItem,
|
|
3222
|
+
{
|
|
3223
|
+
"data-slot": "menubar-radio-item",
|
|
3224
|
+
"data-inset": inset,
|
|
3225
|
+
className: cn(
|
|
3226
|
+
"relative flex cursor-default items-center gap-2 rounded-md py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-8 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
3227
|
+
className
|
|
3228
|
+
),
|
|
3229
|
+
...props,
|
|
3230
|
+
children: [
|
|
3231
|
+
/* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-4 items-center justify-center [&_svg:not([class*='size-'])]:size-4", children: /* @__PURE__ */ jsx(Menubar$1.ItemIndicator, { children: /* @__PURE__ */ jsx(
|
|
3232
|
+
CheckIcon,
|
|
3233
|
+
{}
|
|
3234
|
+
) }) }),
|
|
3235
|
+
children
|
|
3236
|
+
]
|
|
3237
|
+
}
|
|
3238
|
+
);
|
|
3239
|
+
}
|
|
3240
|
+
function MenubarLabel({
|
|
3241
|
+
className,
|
|
3242
|
+
inset,
|
|
3243
|
+
...props
|
|
3244
|
+
}) {
|
|
3245
|
+
return /* @__PURE__ */ jsx(
|
|
3246
|
+
Menubar$1.Label,
|
|
3247
|
+
{
|
|
3248
|
+
"data-slot": "menubar-label",
|
|
3249
|
+
"data-inset": inset,
|
|
3250
|
+
className: cn(
|
|
3251
|
+
"px-2 py-1.5 text-sm font-medium data-inset:pl-8",
|
|
3252
|
+
className
|
|
3253
|
+
),
|
|
3254
|
+
...props
|
|
3255
|
+
}
|
|
3256
|
+
);
|
|
3257
|
+
}
|
|
3258
|
+
function MenubarSeparator({
|
|
3259
|
+
className,
|
|
3260
|
+
...props
|
|
3261
|
+
}) {
|
|
3262
|
+
return /* @__PURE__ */ jsx(
|
|
3263
|
+
Menubar$1.Separator,
|
|
3264
|
+
{
|
|
3265
|
+
"data-slot": "menubar-separator",
|
|
3266
|
+
className: cn("-mx-1 my-1 h-px bg-border", className),
|
|
3267
|
+
...props
|
|
3268
|
+
}
|
|
3269
|
+
);
|
|
3270
|
+
}
|
|
3271
|
+
function MenubarShortcut({
|
|
3272
|
+
className,
|
|
3273
|
+
...props
|
|
3274
|
+
}) {
|
|
3275
|
+
return /* @__PURE__ */ jsx(
|
|
3276
|
+
"span",
|
|
3277
|
+
{
|
|
3278
|
+
"data-slot": "menubar-shortcut",
|
|
3279
|
+
className: cn(
|
|
3280
|
+
"ml-auto text-xs tracking-widest text-muted-foreground group-focus/menubar-item:text-accent-foreground",
|
|
3281
|
+
className
|
|
3282
|
+
),
|
|
3283
|
+
...props
|
|
3284
|
+
}
|
|
3285
|
+
);
|
|
3286
|
+
}
|
|
3287
|
+
function MenubarSub({
|
|
3288
|
+
...props
|
|
3289
|
+
}) {
|
|
3290
|
+
return /* @__PURE__ */ jsx(Menubar$1.Sub, { "data-slot": "menubar-sub", ...props });
|
|
3291
|
+
}
|
|
3292
|
+
function MenubarSubTrigger({
|
|
3293
|
+
className,
|
|
3294
|
+
inset,
|
|
3295
|
+
children,
|
|
3296
|
+
...props
|
|
3297
|
+
}) {
|
|
3298
|
+
return /* @__PURE__ */ jsxs(
|
|
3299
|
+
Menubar$1.SubTrigger,
|
|
3300
|
+
{
|
|
3301
|
+
"data-slot": "menubar-sub-trigger",
|
|
3302
|
+
"data-inset": inset,
|
|
3303
|
+
className: cn(
|
|
3304
|
+
"flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-8 data-open:bg-accent data-open:text-accent-foreground [&_svg:not([class*='size-'])]:size-4",
|
|
3305
|
+
className
|
|
3306
|
+
),
|
|
3307
|
+
...props,
|
|
3308
|
+
children: [
|
|
3309
|
+
children,
|
|
3310
|
+
/* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto size-4" })
|
|
3311
|
+
]
|
|
3312
|
+
}
|
|
3313
|
+
);
|
|
3314
|
+
}
|
|
3315
|
+
function MenubarSubContent({
|
|
3316
|
+
className,
|
|
3317
|
+
...props
|
|
3318
|
+
}) {
|
|
3319
|
+
return /* @__PURE__ */ jsx(
|
|
3320
|
+
Menubar$1.SubContent,
|
|
3321
|
+
{
|
|
3322
|
+
"data-slot": "menubar-sub-content",
|
|
3323
|
+
className: cn("z-50 min-w-32 origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
|
|
3324
|
+
...props
|
|
3325
|
+
}
|
|
3326
|
+
);
|
|
3327
|
+
}
|
|
3328
|
+
var MONTHS = [
|
|
3329
|
+
[
|
|
3330
|
+
{ number: 0, name: "Jan" },
|
|
3331
|
+
{ number: 1, name: "Feb" },
|
|
3332
|
+
{ number: 2, name: "Mar" },
|
|
3333
|
+
{ number: 3, name: "Apr" }
|
|
3334
|
+
],
|
|
3335
|
+
[
|
|
3336
|
+
{ number: 4, name: "May" },
|
|
3337
|
+
{ number: 5, name: "Jun" },
|
|
3338
|
+
{ number: 6, name: "Jul" },
|
|
3339
|
+
{ number: 7, name: "Aug" }
|
|
3340
|
+
],
|
|
3341
|
+
[
|
|
3342
|
+
{ number: 8, name: "Sep" },
|
|
3343
|
+
{ number: 9, name: "Oct" },
|
|
3344
|
+
{ number: 10, name: "Nov" },
|
|
3345
|
+
{ number: 11, name: "Dec" }
|
|
3346
|
+
]
|
|
3347
|
+
];
|
|
3348
|
+
function MonthPicker({
|
|
3349
|
+
onMonthSelect,
|
|
3350
|
+
selectedMonth,
|
|
3351
|
+
minDate,
|
|
3352
|
+
maxDate,
|
|
3353
|
+
disabledDates,
|
|
3354
|
+
callbacks,
|
|
3355
|
+
onYearBackward,
|
|
3356
|
+
onYearForward,
|
|
3357
|
+
variant,
|
|
3358
|
+
className,
|
|
3359
|
+
...props
|
|
3360
|
+
}) {
|
|
3361
|
+
return /* @__PURE__ */ jsx("div", { className: cn("min-w-[200px] w-[280px] p-3", className), ...props, children: /* @__PURE__ */ jsx("div", { className: "flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0", children: /* @__PURE__ */ jsx("div", { className: "space-y-4 w-full", children: /* @__PURE__ */ jsx(
|
|
3362
|
+
MonthCal,
|
|
3363
|
+
{
|
|
3364
|
+
onMonthSelect,
|
|
3365
|
+
callbacks,
|
|
3366
|
+
selectedMonth,
|
|
3367
|
+
onYearBackward,
|
|
3368
|
+
onYearForward,
|
|
3369
|
+
variant,
|
|
3370
|
+
minDate,
|
|
3371
|
+
maxDate,
|
|
3372
|
+
disabledDates
|
|
3373
|
+
}
|
|
3374
|
+
) }) }) });
|
|
3375
|
+
}
|
|
3376
|
+
function MonthCal({ selectedMonth, onMonthSelect, callbacks, variant, minDate, maxDate, disabledDates, onYearBackward, onYearForward }) {
|
|
3377
|
+
const [year, setYear] = React4.useState(selectedMonth?.getFullYear() ?? (/* @__PURE__ */ new Date()).getFullYear());
|
|
3378
|
+
const [month, setMonth] = React4.useState(selectedMonth?.getMonth() ?? (/* @__PURE__ */ new Date()).getMonth());
|
|
3379
|
+
const [menuYear, setMenuYear] = React4.useState(year);
|
|
3380
|
+
if (minDate && maxDate && minDate > maxDate) minDate = maxDate;
|
|
3381
|
+
const disabledDatesMapped = disabledDates?.map((d) => {
|
|
3382
|
+
return { year: d.getFullYear(), month: d.getMonth() };
|
|
3383
|
+
});
|
|
3384
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3385
|
+
/* @__PURE__ */ jsxs("div", { className: "flex justify-center pt-1 relative items-center", children: [
|
|
3386
|
+
/* @__PURE__ */ jsx("div", { className: "text-sm font-medium", children: callbacks?.yearLabel ? callbacks?.yearLabel(menuYear) : menuYear }),
|
|
3387
|
+
/* @__PURE__ */ jsxs("div", { className: "space-x-1 flex items-center", children: [
|
|
3388
|
+
/* @__PURE__ */ jsx(
|
|
3389
|
+
"button",
|
|
3390
|
+
{
|
|
3391
|
+
onClick: () => {
|
|
3392
|
+
setMenuYear(menuYear - 1);
|
|
3393
|
+
if (onYearBackward) onYearBackward();
|
|
3394
|
+
},
|
|
3395
|
+
className: cn(buttonVariants({ variant: variant?.chevrons ?? "outline" }), "inline-flex items-center justify-center h-7 w-7 p-0 absolute left-1"),
|
|
3396
|
+
children: /* @__PURE__ */ jsx(ChevronLeft, { className: "opacity-50 h-4 w-4" })
|
|
3397
|
+
}
|
|
3398
|
+
),
|
|
3399
|
+
/* @__PURE__ */ jsx(
|
|
3400
|
+
"button",
|
|
3401
|
+
{
|
|
3402
|
+
onClick: () => {
|
|
3403
|
+
setMenuYear(menuYear + 1);
|
|
3404
|
+
if (onYearForward) onYearForward();
|
|
3405
|
+
},
|
|
3406
|
+
className: cn(buttonVariants({ variant: variant?.chevrons ?? "outline" }), "inline-flex items-center justify-center h-7 w-7 p-0 absolute right-1"),
|
|
3407
|
+
children: /* @__PURE__ */ jsx(ChevronRight, { className: "opacity-50 h-4 w-4" })
|
|
3408
|
+
}
|
|
3409
|
+
)
|
|
3410
|
+
] })
|
|
3411
|
+
] }),
|
|
3412
|
+
/* @__PURE__ */ jsx("table", { className: "w-full border-collapse space-y-1", children: /* @__PURE__ */ jsx("tbody", { children: MONTHS.map((monthRow, a) => {
|
|
3413
|
+
return /* @__PURE__ */ jsx("tr", { className: "flex w-full mt-2", children: monthRow.map((m) => {
|
|
3414
|
+
return /* @__PURE__ */ jsx(
|
|
3415
|
+
"td",
|
|
3416
|
+
{
|
|
3417
|
+
className: "h-10 w-1/4 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20",
|
|
3418
|
+
children: /* @__PURE__ */ jsx(
|
|
3419
|
+
"button",
|
|
3420
|
+
{
|
|
3421
|
+
onClick: () => {
|
|
3422
|
+
setMonth(m.number);
|
|
3423
|
+
setYear(menuYear);
|
|
3424
|
+
if (onMonthSelect) onMonthSelect(new Date(menuYear, m.number));
|
|
3425
|
+
},
|
|
3426
|
+
disabled: (maxDate ? menuYear > maxDate?.getFullYear() || menuYear == maxDate?.getFullYear() && m.number > maxDate.getMonth() : false) || (minDate ? menuYear < minDate?.getFullYear() || menuYear == minDate?.getFullYear() && m.number < minDate.getMonth() : false) || (disabledDatesMapped ? disabledDatesMapped?.some((d) => d.year == menuYear && d.month == m.number) : false),
|
|
3427
|
+
className: cn(
|
|
3428
|
+
buttonVariants({ variant: month == m.number && menuYear == year ? variant?.calendar?.selected ?? "default" : variant?.calendar?.main ?? "ghost" }),
|
|
3429
|
+
"h-full w-full p-0 font-normal aria-selected:opacity-100"
|
|
3430
|
+
),
|
|
3431
|
+
children: callbacks?.monthLabel ? callbacks.monthLabel(m) : m.name
|
|
3432
|
+
}
|
|
3433
|
+
)
|
|
3434
|
+
},
|
|
3435
|
+
m.number
|
|
3436
|
+
);
|
|
3437
|
+
}) }, "row-" + a);
|
|
3438
|
+
}) }) })
|
|
3439
|
+
] });
|
|
3440
|
+
}
|
|
3441
|
+
MonthPicker.displayName = "MonthPicker";
|
|
3442
|
+
function NavigationMenu({
|
|
3443
|
+
className,
|
|
3444
|
+
children,
|
|
3445
|
+
viewport = true,
|
|
3446
|
+
...props
|
|
3447
|
+
}) {
|
|
3448
|
+
return /* @__PURE__ */ jsxs(
|
|
3449
|
+
NavigationMenu$1.Root,
|
|
3450
|
+
{
|
|
3451
|
+
"data-slot": "navigation-menu",
|
|
3452
|
+
"data-viewport": viewport,
|
|
3453
|
+
className: cn(
|
|
3454
|
+
"group/navigation-menu relative flex max-w-max flex-1 items-center justify-center",
|
|
3455
|
+
className
|
|
3456
|
+
),
|
|
3457
|
+
...props,
|
|
3458
|
+
children: [
|
|
3459
|
+
children,
|
|
3460
|
+
viewport && /* @__PURE__ */ jsx(NavigationMenuViewport, {})
|
|
3461
|
+
]
|
|
3462
|
+
}
|
|
3463
|
+
);
|
|
3464
|
+
}
|
|
3465
|
+
function NavigationMenuList({
|
|
3466
|
+
className,
|
|
3467
|
+
...props
|
|
3468
|
+
}) {
|
|
3469
|
+
return /* @__PURE__ */ jsx(
|
|
3470
|
+
NavigationMenu$1.List,
|
|
3471
|
+
{
|
|
3472
|
+
"data-slot": "navigation-menu-list",
|
|
3473
|
+
className: cn(
|
|
3474
|
+
"group flex flex-1 list-none items-center justify-center gap-0",
|
|
3475
|
+
className
|
|
3476
|
+
),
|
|
3477
|
+
...props
|
|
3478
|
+
}
|
|
3479
|
+
);
|
|
3480
|
+
}
|
|
3481
|
+
function NavigationMenuItem({
|
|
3482
|
+
className,
|
|
3483
|
+
...props
|
|
3484
|
+
}) {
|
|
3485
|
+
return /* @__PURE__ */ jsx(
|
|
3486
|
+
NavigationMenu$1.Item,
|
|
3487
|
+
{
|
|
3488
|
+
"data-slot": "navigation-menu-item",
|
|
3489
|
+
className: cn("relative", className),
|
|
3490
|
+
...props
|
|
3491
|
+
}
|
|
3492
|
+
);
|
|
3493
|
+
}
|
|
3494
|
+
var navigationMenuTriggerStyle = cva(
|
|
3495
|
+
"group/navigation-menu-trigger inline-flex h-9 w-max items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-all outline-none hover:bg-muted focus:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-popup-open:bg-muted/50 data-popup-open:hover:bg-muted data-open:bg-muted/50 data-open:hover:bg-muted data-open:focus:bg-muted"
|
|
3496
|
+
);
|
|
3497
|
+
function NavigationMenuTrigger({
|
|
3498
|
+
className,
|
|
3499
|
+
children,
|
|
3500
|
+
...props
|
|
3501
|
+
}) {
|
|
3502
|
+
return /* @__PURE__ */ jsxs(
|
|
3503
|
+
NavigationMenu$1.Trigger,
|
|
3504
|
+
{
|
|
3505
|
+
"data-slot": "navigation-menu-trigger",
|
|
3506
|
+
className: cn(navigationMenuTriggerStyle(), "group", className),
|
|
3507
|
+
...props,
|
|
3508
|
+
children: [
|
|
3509
|
+
children,
|
|
3510
|
+
" ",
|
|
3511
|
+
/* @__PURE__ */ jsx(ChevronDownIcon, { className: "relative top-px ml-1 size-3 transition duration-300 group-data-popup-open/navigation-menu-trigger:rotate-180 group-data-open/navigation-menu-trigger:rotate-180", "aria-hidden": "true" })
|
|
3512
|
+
]
|
|
3513
|
+
}
|
|
3514
|
+
);
|
|
3515
|
+
}
|
|
3516
|
+
function NavigationMenuContent({
|
|
3517
|
+
className,
|
|
3518
|
+
...props
|
|
3519
|
+
}) {
|
|
3520
|
+
return /* @__PURE__ */ jsx(
|
|
3521
|
+
NavigationMenu$1.Content,
|
|
3522
|
+
{
|
|
3523
|
+
"data-slot": "navigation-menu-content",
|
|
3524
|
+
className: cn(
|
|
3525
|
+
"top-0 left-0 w-full p-2 pr-2.5 ease-[cubic-bezier(0.22,1,0.36,1)] group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-md group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:ring-1 group-data-[viewport=false]/navigation-menu:ring-foreground/10 group-data-[viewport=false]/navigation-menu:duration-300 data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in data-[motion^=to-]:animate-out data-[motion^=to-]:fade-out **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none md:absolute md:w-auto group-data-[viewport=false]/navigation-menu:data-open:animate-in group-data-[viewport=false]/navigation-menu:data-open:fade-in-0 group-data-[viewport=false]/navigation-menu:data-open:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-closed:animate-out group-data-[viewport=false]/navigation-menu:data-closed:fade-out-0 group-data-[viewport=false]/navigation-menu:data-closed:zoom-out-95",
|
|
3526
|
+
className
|
|
3527
|
+
),
|
|
3528
|
+
...props
|
|
3529
|
+
}
|
|
3530
|
+
);
|
|
3531
|
+
}
|
|
3532
|
+
function NavigationMenuViewport({
|
|
3533
|
+
className,
|
|
3534
|
+
...props
|
|
3535
|
+
}) {
|
|
3536
|
+
return /* @__PURE__ */ jsx(
|
|
3537
|
+
"div",
|
|
3538
|
+
{
|
|
3539
|
+
className: cn(
|
|
3540
|
+
"absolute top-full left-0 isolate z-50 flex justify-center"
|
|
3541
|
+
),
|
|
3542
|
+
children: /* @__PURE__ */ jsx(
|
|
3543
|
+
NavigationMenu$1.Viewport,
|
|
3544
|
+
{
|
|
3545
|
+
"data-slot": "navigation-menu-viewport",
|
|
3546
|
+
className: cn(
|
|
3547
|
+
"origin-top-center relative mt-1.5 h-(--radix-navigation-menu-viewport-height) w-full overflow-hidden rounded-lg bg-popover text-popover-foreground shadow ring-1 ring-foreground/10 duration-100 md:w-(--radix-navigation-menu-viewport-width) data-open:animate-in data-open:zoom-in-90 data-closed:animate-out data-closed:zoom-out-90",
|
|
3548
|
+
className
|
|
3549
|
+
),
|
|
3550
|
+
...props
|
|
3551
|
+
}
|
|
3552
|
+
)
|
|
3553
|
+
}
|
|
3554
|
+
);
|
|
3555
|
+
}
|
|
3556
|
+
function NavigationMenuLink({
|
|
3557
|
+
className,
|
|
3558
|
+
...props
|
|
3559
|
+
}) {
|
|
3560
|
+
return /* @__PURE__ */ jsx(
|
|
3561
|
+
NavigationMenu$1.Link,
|
|
3562
|
+
{
|
|
3563
|
+
"data-slot": "navigation-menu-link",
|
|
3564
|
+
className: cn(
|
|
3565
|
+
"flex items-center gap-1.5 rounded-md p-2 text-sm transition-all outline-none hover:bg-muted focus:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 in-data-[slot=navigation-menu-content]:rounded-sm data-[active=true]:bg-muted/50 data-[active=true]:hover:bg-muted data-[active=true]:focus:bg-muted [&_svg:not([class*='size-'])]:size-4",
|
|
3566
|
+
className
|
|
3567
|
+
),
|
|
3568
|
+
...props
|
|
3569
|
+
}
|
|
3570
|
+
);
|
|
3571
|
+
}
|
|
3572
|
+
function NavigationMenuIndicator({
|
|
3573
|
+
className,
|
|
3574
|
+
...props
|
|
3575
|
+
}) {
|
|
3576
|
+
return /* @__PURE__ */ jsx(
|
|
3577
|
+
NavigationMenu$1.Indicator,
|
|
3578
|
+
{
|
|
3579
|
+
"data-slot": "navigation-menu-indicator",
|
|
3580
|
+
className: cn(
|
|
3581
|
+
"top-full z-1 flex h-1.5 items-end justify-center overflow-hidden data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:animate-in data-[state=visible]:fade-in",
|
|
3582
|
+
className
|
|
3583
|
+
),
|
|
3584
|
+
...props,
|
|
3585
|
+
children: /* @__PURE__ */ jsx("div", { className: "relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" })
|
|
3586
|
+
}
|
|
3587
|
+
);
|
|
3588
|
+
}
|
|
3589
|
+
function Pagination({ className, ...props }) {
|
|
3590
|
+
return /* @__PURE__ */ jsx(
|
|
3591
|
+
"nav",
|
|
3592
|
+
{
|
|
3593
|
+
role: "navigation",
|
|
3594
|
+
"aria-label": "pagination",
|
|
3595
|
+
"data-slot": "pagination",
|
|
3596
|
+
className: cn("mx-auto flex w-full justify-center", className),
|
|
3597
|
+
...props
|
|
3598
|
+
}
|
|
3599
|
+
);
|
|
3600
|
+
}
|
|
3601
|
+
function PaginationContent({
|
|
3602
|
+
className,
|
|
3603
|
+
...props
|
|
3604
|
+
}) {
|
|
3605
|
+
return /* @__PURE__ */ jsx(
|
|
3606
|
+
"ul",
|
|
3607
|
+
{
|
|
3608
|
+
"data-slot": "pagination-content",
|
|
3609
|
+
className: cn("flex items-center gap-1", className),
|
|
3610
|
+
...props
|
|
3611
|
+
}
|
|
3612
|
+
);
|
|
3613
|
+
}
|
|
3614
|
+
function PaginationItem({ ...props }) {
|
|
3615
|
+
return /* @__PURE__ */ jsx("li", { "data-slot": "pagination-item", ...props });
|
|
3616
|
+
}
|
|
3617
|
+
function PaginationLink({
|
|
3618
|
+
className,
|
|
3619
|
+
isActive,
|
|
3620
|
+
size = "icon",
|
|
3621
|
+
...props
|
|
3622
|
+
}) {
|
|
3623
|
+
return /* @__PURE__ */ jsx(
|
|
3624
|
+
Button,
|
|
3625
|
+
{
|
|
3626
|
+
asChild: true,
|
|
3627
|
+
variant: isActive ? "outline" : "ghost",
|
|
3628
|
+
size,
|
|
3629
|
+
className: cn(className),
|
|
3630
|
+
children: /* @__PURE__ */ jsx(
|
|
3631
|
+
"a",
|
|
3632
|
+
{
|
|
3633
|
+
"aria-current": isActive ? "page" : void 0,
|
|
3634
|
+
"data-slot": "pagination-link",
|
|
3635
|
+
"data-active": isActive,
|
|
3636
|
+
...props
|
|
3637
|
+
}
|
|
3638
|
+
)
|
|
3639
|
+
}
|
|
3640
|
+
);
|
|
3641
|
+
}
|
|
3642
|
+
function PaginationPrevious({
|
|
3643
|
+
className,
|
|
3644
|
+
text = "Previous",
|
|
3645
|
+
...props
|
|
3646
|
+
}) {
|
|
3647
|
+
return /* @__PURE__ */ jsxs(
|
|
3648
|
+
PaginationLink,
|
|
3649
|
+
{
|
|
3650
|
+
"aria-label": "Go to previous page",
|
|
3651
|
+
size: "default",
|
|
3652
|
+
className: cn("pl-2!", className),
|
|
3653
|
+
...props,
|
|
3654
|
+
children: [
|
|
3655
|
+
/* @__PURE__ */ jsx(ChevronLeftIcon, { "data-icon": "inline-start" }),
|
|
3656
|
+
/* @__PURE__ */ jsx("span", { className: "hidden sm:block", children: text })
|
|
3657
|
+
]
|
|
3658
|
+
}
|
|
3659
|
+
);
|
|
3660
|
+
}
|
|
3661
|
+
function PaginationNext({
|
|
3662
|
+
className,
|
|
3663
|
+
text = "Next",
|
|
3664
|
+
...props
|
|
3665
|
+
}) {
|
|
3666
|
+
return /* @__PURE__ */ jsxs(
|
|
3667
|
+
PaginationLink,
|
|
3668
|
+
{
|
|
3669
|
+
"aria-label": "Go to next page",
|
|
3670
|
+
size: "default",
|
|
3671
|
+
className: cn("pr-2!", className),
|
|
3672
|
+
...props,
|
|
3673
|
+
children: [
|
|
3674
|
+
/* @__PURE__ */ jsx("span", { className: "hidden sm:block", children: text }),
|
|
3675
|
+
/* @__PURE__ */ jsx(ChevronRightIcon, { "data-icon": "inline-end" })
|
|
3676
|
+
]
|
|
3677
|
+
}
|
|
3678
|
+
);
|
|
3679
|
+
}
|
|
3680
|
+
function PaginationEllipsis({
|
|
3681
|
+
className,
|
|
3682
|
+
...props
|
|
3683
|
+
}) {
|
|
3684
|
+
return /* @__PURE__ */ jsxs(
|
|
3685
|
+
"span",
|
|
3686
|
+
{
|
|
3687
|
+
"aria-hidden": true,
|
|
3688
|
+
"data-slot": "pagination-ellipsis",
|
|
3689
|
+
className: cn(
|
|
3690
|
+
"flex size-9 items-center justify-center [&_svg:not([class*='size-'])]:size-4",
|
|
3691
|
+
className
|
|
3692
|
+
),
|
|
3693
|
+
...props,
|
|
3694
|
+
children: [
|
|
3695
|
+
/* @__PURE__ */ jsx(
|
|
3696
|
+
MoreHorizontalIcon,
|
|
3697
|
+
{}
|
|
3698
|
+
),
|
|
3699
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "More pages" })
|
|
3700
|
+
]
|
|
3701
|
+
}
|
|
3702
|
+
);
|
|
3703
|
+
}
|
|
3704
|
+
function Progress({
|
|
3705
|
+
className,
|
|
3706
|
+
value,
|
|
3707
|
+
...props
|
|
3708
|
+
}) {
|
|
3709
|
+
return /* @__PURE__ */ jsx(
|
|
3710
|
+
Progress$1.Root,
|
|
3711
|
+
{
|
|
3712
|
+
"data-slot": "progress",
|
|
3713
|
+
className: cn(
|
|
3714
|
+
"relative flex h-1.5 w-full items-center overflow-x-hidden rounded-full bg-muted",
|
|
3715
|
+
className
|
|
3716
|
+
),
|
|
3717
|
+
...props,
|
|
3718
|
+
children: /* @__PURE__ */ jsx(
|
|
3719
|
+
Progress$1.Indicator,
|
|
3720
|
+
{
|
|
3721
|
+
"data-slot": "progress-indicator",
|
|
3722
|
+
className: "size-full flex-1 bg-primary transition-all",
|
|
3723
|
+
style: { transform: `translateX(-${100 - (value || 0)}%)` }
|
|
3724
|
+
}
|
|
3725
|
+
)
|
|
3726
|
+
}
|
|
3727
|
+
);
|
|
3728
|
+
}
|
|
3729
|
+
function RadioGroup({
|
|
3730
|
+
className,
|
|
3731
|
+
...props
|
|
3732
|
+
}) {
|
|
3733
|
+
return /* @__PURE__ */ jsx(
|
|
3734
|
+
RadioGroup$1.Root,
|
|
3735
|
+
{
|
|
3736
|
+
"data-slot": "radio-group",
|
|
3737
|
+
className: cn("grid w-full gap-3", className),
|
|
3738
|
+
...props
|
|
3739
|
+
}
|
|
3740
|
+
);
|
|
3741
|
+
}
|
|
3742
|
+
function RadioGroupItem({
|
|
3743
|
+
className,
|
|
3744
|
+
...props
|
|
3745
|
+
}) {
|
|
3746
|
+
return /* @__PURE__ */ jsx(
|
|
3747
|
+
RadioGroup$1.Item,
|
|
3748
|
+
{
|
|
3749
|
+
"data-slot": "radio-group-item",
|
|
3750
|
+
className: cn(
|
|
3751
|
+
"group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-input outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary",
|
|
3752
|
+
className
|
|
3753
|
+
),
|
|
3754
|
+
...props,
|
|
3755
|
+
children: /* @__PURE__ */ jsx(
|
|
3756
|
+
RadioGroup$1.Indicator,
|
|
3757
|
+
{
|
|
3758
|
+
"data-slot": "radio-group-indicator",
|
|
3759
|
+
className: "flex size-4 items-center justify-center",
|
|
3760
|
+
children: /* @__PURE__ */ jsx("span", { className: "absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary-foreground" })
|
|
3761
|
+
}
|
|
3762
|
+
)
|
|
3763
|
+
}
|
|
3764
|
+
);
|
|
3765
|
+
}
|
|
3766
|
+
function ScrollArea({
|
|
3767
|
+
className,
|
|
3768
|
+
children,
|
|
3769
|
+
...props
|
|
3770
|
+
}) {
|
|
3771
|
+
return /* @__PURE__ */ jsxs(
|
|
3772
|
+
ScrollArea$1.Root,
|
|
3773
|
+
{
|
|
3774
|
+
"data-slot": "scroll-area",
|
|
3775
|
+
className: cn("relative", className),
|
|
3776
|
+
...props,
|
|
3777
|
+
children: [
|
|
3778
|
+
/* @__PURE__ */ jsx(
|
|
3779
|
+
ScrollArea$1.Viewport,
|
|
3780
|
+
{
|
|
3781
|
+
"data-slot": "scroll-area-viewport",
|
|
3782
|
+
className: "size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1",
|
|
3783
|
+
children
|
|
3784
|
+
}
|
|
3785
|
+
),
|
|
3786
|
+
/* @__PURE__ */ jsx(ScrollBar, {}),
|
|
3787
|
+
/* @__PURE__ */ jsx(ScrollArea$1.Corner, {})
|
|
3788
|
+
]
|
|
3789
|
+
}
|
|
3790
|
+
);
|
|
3791
|
+
}
|
|
3792
|
+
function ScrollBar({
|
|
3793
|
+
className,
|
|
3794
|
+
orientation = "vertical",
|
|
3795
|
+
...props
|
|
3796
|
+
}) {
|
|
3797
|
+
return /* @__PURE__ */ jsx(
|
|
3798
|
+
ScrollArea$1.ScrollAreaScrollbar,
|
|
3799
|
+
{
|
|
3800
|
+
"data-slot": "scroll-area-scrollbar",
|
|
3801
|
+
"data-orientation": orientation,
|
|
3802
|
+
orientation,
|
|
3803
|
+
className: cn(
|
|
3804
|
+
"flex touch-none p-px transition-colors select-none data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent",
|
|
3805
|
+
className
|
|
3806
|
+
),
|
|
3807
|
+
...props,
|
|
3808
|
+
children: /* @__PURE__ */ jsx(
|
|
3809
|
+
ScrollArea$1.ScrollAreaThumb,
|
|
3810
|
+
{
|
|
3811
|
+
"data-slot": "scroll-area-thumb",
|
|
3812
|
+
className: "relative flex-1 rounded-full bg-border"
|
|
3813
|
+
}
|
|
3814
|
+
)
|
|
3815
|
+
}
|
|
3816
|
+
);
|
|
3817
|
+
}
|
|
3818
|
+
function Sheet({ ...props }) {
|
|
3819
|
+
return /* @__PURE__ */ jsx(Dialog$1.Root, { "data-slot": "sheet", ...props });
|
|
3820
|
+
}
|
|
3821
|
+
function SheetTrigger({
|
|
3822
|
+
...props
|
|
3823
|
+
}) {
|
|
3824
|
+
return /* @__PURE__ */ jsx(Dialog$1.Trigger, { "data-slot": "sheet-trigger", ...props });
|
|
3825
|
+
}
|
|
3826
|
+
function SheetClose({
|
|
3827
|
+
...props
|
|
3828
|
+
}) {
|
|
3829
|
+
return /* @__PURE__ */ jsx(Dialog$1.Close, { "data-slot": "sheet-close", ...props });
|
|
3830
|
+
}
|
|
3831
|
+
function SheetPortal({
|
|
3832
|
+
...props
|
|
3833
|
+
}) {
|
|
3834
|
+
return /* @__PURE__ */ jsx(Dialog$1.Portal, { "data-slot": "sheet-portal", ...props });
|
|
3835
|
+
}
|
|
3836
|
+
function SheetOverlay({
|
|
3837
|
+
className,
|
|
3838
|
+
...props
|
|
3839
|
+
}) {
|
|
3840
|
+
return /* @__PURE__ */ jsx(
|
|
3841
|
+
Dialog$1.Overlay,
|
|
3842
|
+
{
|
|
3843
|
+
"data-slot": "sheet-overlay",
|
|
3844
|
+
className: cn(
|
|
3845
|
+
"fixed inset-0 z-[80] bg-black/40 duration-100 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
|
|
3846
|
+
className
|
|
3847
|
+
),
|
|
3848
|
+
...props
|
|
3849
|
+
}
|
|
3850
|
+
);
|
|
3851
|
+
}
|
|
3852
|
+
function SheetContent({
|
|
3853
|
+
className,
|
|
3854
|
+
children,
|
|
3855
|
+
side = "right",
|
|
3856
|
+
showCloseButton = true,
|
|
3857
|
+
...props
|
|
3858
|
+
}) {
|
|
3859
|
+
const portalContainer = usePortalContainer();
|
|
3860
|
+
return /* @__PURE__ */ jsxs(SheetPortal, { container: portalContainer ?? void 0, children: [
|
|
3861
|
+
/* @__PURE__ */ jsx(SheetOverlay, {}),
|
|
3862
|
+
/* @__PURE__ */ jsxs(
|
|
3863
|
+
Dialog$1.Content,
|
|
3864
|
+
{
|
|
3865
|
+
"data-slot": "sheet-content",
|
|
3866
|
+
"data-side": side,
|
|
3867
|
+
onWheel: (event) => event.stopPropagation(),
|
|
3868
|
+
className: cn(
|
|
3869
|
+
"fixed z-[80] flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-[side=bottom]:data-open:slide-in-from-bottom-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:animate-out data-closed:fade-out-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=right]:data-closed:slide-out-to-right-10 data-[side=top]:data-closed:slide-out-to-top-10",
|
|
3870
|
+
className
|
|
3871
|
+
),
|
|
3872
|
+
...props,
|
|
3873
|
+
children: [
|
|
3874
|
+
children,
|
|
3875
|
+
showCloseButton && /* @__PURE__ */ jsx(Dialog$1.Close, { "data-slot": "sheet-close", asChild: true, children: /* @__PURE__ */ jsxs(
|
|
3876
|
+
Button,
|
|
3877
|
+
{
|
|
3878
|
+
variant: "ghost",
|
|
3879
|
+
className: "absolute top-4 right-4",
|
|
3880
|
+
size: "icon-sm",
|
|
3881
|
+
children: [
|
|
3882
|
+
/* @__PURE__ */ jsx(
|
|
3883
|
+
XIcon,
|
|
3884
|
+
{}
|
|
3885
|
+
),
|
|
3886
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
3887
|
+
]
|
|
3888
|
+
}
|
|
3889
|
+
) })
|
|
3890
|
+
]
|
|
3891
|
+
}
|
|
3892
|
+
)
|
|
3893
|
+
] });
|
|
3894
|
+
}
|
|
3895
|
+
function SheetHeader({ className, ...props }) {
|
|
3896
|
+
return /* @__PURE__ */ jsx(
|
|
3897
|
+
"div",
|
|
3898
|
+
{
|
|
3899
|
+
"data-slot": "sheet-header",
|
|
3900
|
+
className: cn("flex flex-col gap-1.5 p-4", className),
|
|
3901
|
+
...props
|
|
3902
|
+
}
|
|
3903
|
+
);
|
|
3904
|
+
}
|
|
3905
|
+
function SheetFooter({ className, ...props }) {
|
|
3906
|
+
return /* @__PURE__ */ jsx(
|
|
3907
|
+
"div",
|
|
3908
|
+
{
|
|
3909
|
+
"data-slot": "sheet-footer",
|
|
3910
|
+
className: cn("mt-auto flex flex-col gap-2 p-4", className),
|
|
3911
|
+
...props
|
|
3912
|
+
}
|
|
3913
|
+
);
|
|
3914
|
+
}
|
|
3915
|
+
function SheetTitle({
|
|
3916
|
+
className,
|
|
3917
|
+
...props
|
|
3918
|
+
}) {
|
|
3919
|
+
return /* @__PURE__ */ jsx(
|
|
3920
|
+
Dialog$1.Title,
|
|
3921
|
+
{
|
|
3922
|
+
"data-slot": "sheet-title",
|
|
3923
|
+
className: cn("font-heading font-medium text-foreground", className),
|
|
3924
|
+
...props
|
|
3925
|
+
}
|
|
3926
|
+
);
|
|
3927
|
+
}
|
|
3928
|
+
function SheetDescription({
|
|
3929
|
+
className,
|
|
3930
|
+
...props
|
|
3931
|
+
}) {
|
|
3932
|
+
return /* @__PURE__ */ jsx(
|
|
3933
|
+
Dialog$1.Description,
|
|
3934
|
+
{
|
|
3935
|
+
"data-slot": "sheet-description",
|
|
3936
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
3937
|
+
...props
|
|
3938
|
+
}
|
|
3939
|
+
);
|
|
3940
|
+
}
|
|
3941
|
+
function Slider({
|
|
3942
|
+
className,
|
|
3943
|
+
defaultValue,
|
|
3944
|
+
value,
|
|
3945
|
+
min = 0,
|
|
3946
|
+
max = 100,
|
|
3947
|
+
...props
|
|
3948
|
+
}) {
|
|
3949
|
+
const _values = React4.useMemo(
|
|
3950
|
+
() => Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min, max],
|
|
3951
|
+
[value, defaultValue, min, max]
|
|
3952
|
+
);
|
|
3953
|
+
return /* @__PURE__ */ jsxs(
|
|
3954
|
+
Slider$1.Root,
|
|
3955
|
+
{
|
|
3956
|
+
"data-slot": "slider",
|
|
3957
|
+
defaultValue,
|
|
3958
|
+
value,
|
|
3959
|
+
min,
|
|
3960
|
+
max,
|
|
3961
|
+
className: cn(
|
|
3962
|
+
"relative flex w-full touch-none items-center select-none data-disabled:opacity-50 data-vertical:h-full data-vertical:min-h-40 data-vertical:w-auto data-vertical:flex-col",
|
|
3963
|
+
className
|
|
3964
|
+
),
|
|
3965
|
+
...props,
|
|
3966
|
+
children: [
|
|
3967
|
+
/* @__PURE__ */ jsx(
|
|
3968
|
+
Slider$1.Track,
|
|
3969
|
+
{
|
|
3970
|
+
"data-slot": "slider-track",
|
|
3971
|
+
className: "relative grow overflow-hidden rounded-full bg-muted data-horizontal:h-1.5 data-horizontal:w-full data-vertical:h-full data-vertical:w-1.5",
|
|
3972
|
+
children: /* @__PURE__ */ jsx(
|
|
3973
|
+
Slider$1.Range,
|
|
3974
|
+
{
|
|
3975
|
+
"data-slot": "slider-range",
|
|
3976
|
+
className: "absolute bg-primary select-none data-horizontal:h-full data-vertical:w-full"
|
|
3977
|
+
}
|
|
3978
|
+
)
|
|
3979
|
+
}
|
|
3980
|
+
),
|
|
3981
|
+
Array.from({ length: _values.length }, (_, index) => /* @__PURE__ */ jsx(
|
|
3982
|
+
Slider$1.Thumb,
|
|
3983
|
+
{
|
|
3984
|
+
"data-slot": "slider-thumb",
|
|
3985
|
+
className: "block size-4 shrink-0 rounded-full border border-primary bg-white shadow-sm ring-ring/50 transition-[color,box-shadow] select-none hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"
|
|
3986
|
+
},
|
|
3987
|
+
index
|
|
3988
|
+
))
|
|
3989
|
+
]
|
|
3990
|
+
}
|
|
3991
|
+
);
|
|
3992
|
+
}
|
|
3993
|
+
function Spinner({ className, ...props }) {
|
|
3994
|
+
return /* @__PURE__ */ jsx(Loader2Icon, { role: "status", "aria-label": "Loading", className: cn("size-4 animate-spin", className), ...props });
|
|
3995
|
+
}
|
|
3996
|
+
function Switch({
|
|
3997
|
+
className,
|
|
3998
|
+
size = "default",
|
|
3999
|
+
...props
|
|
4000
|
+
}) {
|
|
4001
|
+
return /* @__PURE__ */ jsx(
|
|
4002
|
+
Switch$1.Root,
|
|
4003
|
+
{
|
|
4004
|
+
"data-slot": "switch",
|
|
4005
|
+
"data-size": size,
|
|
4006
|
+
className: cn(
|
|
4007
|
+
"peer group/switch relative inline-flex shrink-0 items-center rounded-full border-2 border-transparent shadow-xs transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[20px] data-[size=default]:w-[36px] data-[size=sm]:h-[16px] data-[size=sm]:w-[28px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50",
|
|
4008
|
+
className
|
|
4009
|
+
),
|
|
4010
|
+
...props,
|
|
4011
|
+
children: /* @__PURE__ */ jsx(
|
|
4012
|
+
Switch$1.Thumb,
|
|
4013
|
+
{
|
|
4014
|
+
"data-slot": "switch-thumb",
|
|
4015
|
+
className: "pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-[16px] group-data-[size=sm]/switch:size-[12px] group-data-[size=default]/switch:data-checked:translate-x-[16px] group-data-[size=sm]/switch:data-checked:translate-x-[12px] dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground"
|
|
4016
|
+
}
|
|
4017
|
+
)
|
|
4018
|
+
}
|
|
4019
|
+
);
|
|
4020
|
+
}
|
|
4021
|
+
function Tabs({
|
|
4022
|
+
className,
|
|
4023
|
+
orientation = "horizontal",
|
|
4024
|
+
...props
|
|
4025
|
+
}) {
|
|
4026
|
+
return /* @__PURE__ */ jsx(
|
|
4027
|
+
Tabs$1.Root,
|
|
4028
|
+
{
|
|
4029
|
+
"data-slot": "tabs",
|
|
4030
|
+
"data-orientation": orientation,
|
|
4031
|
+
className: cn(
|
|
4032
|
+
"group/tabs flex gap-2 data-horizontal:flex-col",
|
|
4033
|
+
className
|
|
4034
|
+
),
|
|
4035
|
+
...props
|
|
4036
|
+
}
|
|
4037
|
+
);
|
|
4038
|
+
}
|
|
4039
|
+
var tabsListVariants = cva(
|
|
4040
|
+
"group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-9 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none",
|
|
4041
|
+
{
|
|
4042
|
+
variants: {
|
|
4043
|
+
variant: {
|
|
4044
|
+
default: "bg-muted",
|
|
4045
|
+
line: "gap-1 bg-transparent"
|
|
4046
|
+
}
|
|
4047
|
+
},
|
|
4048
|
+
defaultVariants: {
|
|
4049
|
+
variant: "default"
|
|
4050
|
+
}
|
|
4051
|
+
}
|
|
4052
|
+
);
|
|
4053
|
+
function TabsList({
|
|
4054
|
+
className,
|
|
4055
|
+
variant = "default",
|
|
4056
|
+
...props
|
|
4057
|
+
}) {
|
|
4058
|
+
return /* @__PURE__ */ jsx(
|
|
4059
|
+
Tabs$1.List,
|
|
4060
|
+
{
|
|
4061
|
+
"data-slot": "tabs-list",
|
|
4062
|
+
"data-variant": variant,
|
|
4063
|
+
className: cn(tabsListVariants({ variant }), className),
|
|
4064
|
+
...props
|
|
4065
|
+
}
|
|
4066
|
+
);
|
|
4067
|
+
}
|
|
4068
|
+
function TabsTrigger({
|
|
4069
|
+
className,
|
|
4070
|
+
...props
|
|
4071
|
+
}) {
|
|
4072
|
+
return /* @__PURE__ */ jsx(
|
|
4073
|
+
Tabs$1.Trigger,
|
|
4074
|
+
{
|
|
4075
|
+
"data-slot": "tabs-trigger",
|
|
4076
|
+
className: cn(
|
|
4077
|
+
"relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
4078
|
+
"group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent",
|
|
4079
|
+
"data-active:bg-card data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground",
|
|
4080
|
+
"after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100",
|
|
4081
|
+
className
|
|
4082
|
+
),
|
|
4083
|
+
...props
|
|
4084
|
+
}
|
|
4085
|
+
);
|
|
4086
|
+
}
|
|
4087
|
+
function TabsContent({
|
|
4088
|
+
className,
|
|
4089
|
+
...props
|
|
4090
|
+
}) {
|
|
4091
|
+
return /* @__PURE__ */ jsx(
|
|
4092
|
+
Tabs$1.Content,
|
|
4093
|
+
{
|
|
4094
|
+
"data-slot": "tabs-content",
|
|
4095
|
+
className: cn("flex-1 text-sm outline-none", className),
|
|
4096
|
+
...props
|
|
4097
|
+
}
|
|
4098
|
+
);
|
|
4099
|
+
}
|
|
4100
|
+
var toggleVariants = cva(
|
|
4101
|
+
"group/toggle inline-flex items-center justify-center gap-1 rounded-md text-sm font-medium whitespace-nowrap transition-[color,box-shadow] outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
4102
|
+
{
|
|
4103
|
+
variants: {
|
|
4104
|
+
variant: {
|
|
4105
|
+
default: "bg-transparent",
|
|
4106
|
+
outline: "border border-input bg-transparent shadow-xs hover:bg-muted"
|
|
4107
|
+
},
|
|
4108
|
+
size: {
|
|
4109
|
+
default: "h-9 min-w-9 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
4110
|
+
sm: "h-8 min-w-8 px-2.5 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5",
|
|
4111
|
+
lg: "h-10 min-w-10 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2"
|
|
4112
|
+
}
|
|
4113
|
+
},
|
|
4114
|
+
defaultVariants: {
|
|
4115
|
+
variant: "default",
|
|
4116
|
+
size: "default"
|
|
4117
|
+
}
|
|
4118
|
+
}
|
|
4119
|
+
);
|
|
4120
|
+
function Toggle({
|
|
4121
|
+
className,
|
|
4122
|
+
variant = "default",
|
|
4123
|
+
size = "default",
|
|
4124
|
+
...props
|
|
4125
|
+
}) {
|
|
4126
|
+
return /* @__PURE__ */ jsx(
|
|
4127
|
+
Toggle$1.Root,
|
|
4128
|
+
{
|
|
4129
|
+
"data-slot": "toggle",
|
|
4130
|
+
className: cn(toggleVariants({ variant, size, className })),
|
|
4131
|
+
...props
|
|
4132
|
+
}
|
|
4133
|
+
);
|
|
4134
|
+
}
|
|
4135
|
+
var ToggleGroupContext = React4.createContext({
|
|
4136
|
+
size: "default",
|
|
4137
|
+
variant: "default",
|
|
4138
|
+
spacing: 0,
|
|
4139
|
+
orientation: "horizontal"
|
|
4140
|
+
});
|
|
4141
|
+
function ToggleGroup({
|
|
4142
|
+
className,
|
|
4143
|
+
variant,
|
|
4144
|
+
size,
|
|
4145
|
+
spacing = 0,
|
|
4146
|
+
orientation = "horizontal",
|
|
4147
|
+
children,
|
|
4148
|
+
...props
|
|
4149
|
+
}) {
|
|
4150
|
+
return /* @__PURE__ */ jsx(
|
|
4151
|
+
ToggleGroup$1.Root,
|
|
4152
|
+
{
|
|
4153
|
+
"data-slot": "toggle-group",
|
|
4154
|
+
"data-variant": variant,
|
|
4155
|
+
"data-size": size,
|
|
4156
|
+
"data-spacing": spacing,
|
|
4157
|
+
"data-orientation": orientation,
|
|
4158
|
+
style: { "--gap": spacing },
|
|
4159
|
+
className: cn(
|
|
4160
|
+
"group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] rounded-md data-[spacing=0]:data-[variant=outline]:shadow-xs data-vertical:flex-col data-vertical:items-stretch",
|
|
4161
|
+
className
|
|
4162
|
+
),
|
|
4163
|
+
...props,
|
|
4164
|
+
children: /* @__PURE__ */ jsx(
|
|
4165
|
+
ToggleGroupContext.Provider,
|
|
4166
|
+
{
|
|
4167
|
+
value: { variant, size, spacing, orientation },
|
|
4168
|
+
children
|
|
4169
|
+
}
|
|
4170
|
+
)
|
|
4171
|
+
}
|
|
4172
|
+
);
|
|
4173
|
+
}
|
|
4174
|
+
function ToggleGroupItem({
|
|
4175
|
+
className,
|
|
4176
|
+
children,
|
|
4177
|
+
variant = "default",
|
|
4178
|
+
size = "default",
|
|
4179
|
+
...props
|
|
4180
|
+
}) {
|
|
4181
|
+
const context = React4.useContext(ToggleGroupContext);
|
|
4182
|
+
return /* @__PURE__ */ jsx(
|
|
4183
|
+
ToggleGroup$1.Item,
|
|
4184
|
+
{
|
|
4185
|
+
"data-slot": "toggle-group-item",
|
|
4186
|
+
"data-variant": context.variant || variant,
|
|
4187
|
+
"data-size": context.size || size,
|
|
4188
|
+
"data-spacing": context.spacing,
|
|
4189
|
+
className: cn(
|
|
4190
|
+
"shrink-0 group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 group-data-[spacing=0]/toggle-group:shadow-none focus:z-10 focus-visible:z-10 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-end]:pr-1.5 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-start]:pl-1.5 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-l-md group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-md group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-r-md group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-md data-[state=on]:bg-muted group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t",
|
|
4191
|
+
toggleVariants({
|
|
4192
|
+
variant: context.variant || variant,
|
|
4193
|
+
size: context.size || size
|
|
4194
|
+
}),
|
|
4195
|
+
className
|
|
4196
|
+
),
|
|
4197
|
+
...props,
|
|
4198
|
+
children
|
|
4199
|
+
}
|
|
4200
|
+
);
|
|
4201
|
+
}
|
|
4202
|
+
function TooltipProvider({
|
|
4203
|
+
delayDuration = 0,
|
|
4204
|
+
...props
|
|
4205
|
+
}) {
|
|
4206
|
+
return /* @__PURE__ */ jsx(
|
|
4207
|
+
Tooltip$1.Provider,
|
|
4208
|
+
{
|
|
4209
|
+
"data-slot": "tooltip-provider",
|
|
4210
|
+
delayDuration,
|
|
4211
|
+
...props
|
|
4212
|
+
}
|
|
4213
|
+
);
|
|
4214
|
+
}
|
|
4215
|
+
function Tooltip({
|
|
4216
|
+
open: openProp,
|
|
4217
|
+
defaultOpen,
|
|
4218
|
+
onOpenChange,
|
|
4219
|
+
...props
|
|
4220
|
+
}) {
|
|
4221
|
+
const portalContainer = usePortalContainer();
|
|
4222
|
+
const [uncontrolledOpen, setUncontrolledOpen] = React4.useState(defaultOpen ?? false);
|
|
4223
|
+
const isControlled = openProp !== void 0;
|
|
4224
|
+
const open = isControlled ? openProp : uncontrolledOpen;
|
|
4225
|
+
const handleOpenChange = React4.useCallback(
|
|
4226
|
+
(next) => {
|
|
4227
|
+
if (!isControlled) setUncontrolledOpen(next);
|
|
4228
|
+
onOpenChange?.(next);
|
|
4229
|
+
},
|
|
4230
|
+
[isControlled, onOpenChange]
|
|
4231
|
+
);
|
|
4232
|
+
React4.useEffect(() => {
|
|
4233
|
+
if (!open) return;
|
|
4234
|
+
const close = () => handleOpenChange(false);
|
|
4235
|
+
const root = portalContainer?.getRootNode() ?? document;
|
|
4236
|
+
root.addEventListener("scroll", close, true);
|
|
4237
|
+
return () => root.removeEventListener("scroll", close, true);
|
|
4238
|
+
}, [open, handleOpenChange, portalContainer]);
|
|
4239
|
+
return /* @__PURE__ */ jsx(
|
|
4240
|
+
Tooltip$1.Root,
|
|
4241
|
+
{
|
|
4242
|
+
"data-slot": "tooltip",
|
|
4243
|
+
open,
|
|
4244
|
+
onOpenChange: handleOpenChange,
|
|
4245
|
+
...props
|
|
4246
|
+
}
|
|
4247
|
+
);
|
|
4248
|
+
}
|
|
4249
|
+
function TooltipTrigger({
|
|
4250
|
+
...props
|
|
4251
|
+
}) {
|
|
4252
|
+
return /* @__PURE__ */ jsx(Tooltip$1.Trigger, { "data-slot": "tooltip-trigger", ...props });
|
|
4253
|
+
}
|
|
4254
|
+
function TooltipContent({
|
|
4255
|
+
className,
|
|
4256
|
+
sideOffset = 0,
|
|
4257
|
+
children,
|
|
4258
|
+
...props
|
|
4259
|
+
}) {
|
|
4260
|
+
const portalContainer = usePortalContainer();
|
|
4261
|
+
return /* @__PURE__ */ jsx(Tooltip$1.Portal, { container: portalContainer ?? void 0, children: /* @__PURE__ */ jsxs(
|
|
4262
|
+
Tooltip$1.Content,
|
|
4263
|
+
{
|
|
4264
|
+
"data-slot": "tooltip-content",
|
|
4265
|
+
sideOffset,
|
|
4266
|
+
className: cn(
|
|
4267
|
+
"z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
4268
|
+
className
|
|
4269
|
+
),
|
|
4270
|
+
...props,
|
|
4271
|
+
children: [
|
|
4272
|
+
children,
|
|
4273
|
+
/* @__PURE__ */ jsx(Tooltip$1.Arrow, { className: "z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground" })
|
|
4274
|
+
]
|
|
4275
|
+
}
|
|
4276
|
+
) });
|
|
4277
|
+
}
|
|
4278
|
+
|
|
4279
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertAction, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatio, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Calendar, CalendarDayButton, Can, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyStateIllustration, EmptyTitle, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, Forbidden, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Kbd, KbdGroup, Label, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, MonthPicker, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverAnchor, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Skeleton, Slider, SmartSelect, Spinner, StatusPage, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonGroupVariants, navigationMenuTriggerStyle, tabsListVariants, toggleVariants };
|
|
4280
|
+
//# sourceMappingURL=index.js.map
|
|
4281
|
+
//# sourceMappingURL=index.js.map
|