@aircall/ds 0.2.7 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +95 -11
- package/dist/globals.css +1 -1
- package/dist/index.d.ts +762 -376
- package/dist/index.js +1545 -731
- package/package.json +31 -31
package/dist/index.js
CHANGED
|
@@ -1,40 +1,46 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Accordion as Accordion$1 } from "@base-ui/react/accordion";
|
|
2
2
|
import { clsx } from "clsx";
|
|
3
3
|
import { extendTailwindMerge } from "tailwind-merge";
|
|
4
|
+
import * as Icons from "@aircall/react-icons";
|
|
5
|
+
import { ArrowLeft, ArrowRight, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CircleAlertIcon, CircleCheck, Info, Loader2Icon, MinusIcon, MoreHorizontalIcon, PanelLeftIcon, Search, Smile, TriangleAlertIcon, XIcon } from "@aircall/react-icons";
|
|
4
6
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
5
7
|
import * as React$1 from "react";
|
|
6
|
-
import React, { useMemo } from "react";
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
8
|
+
import React, { createContext, useContext, useMemo } from "react";
|
|
9
|
+
import { AlertDialog as AlertDialog$1 } from "@base-ui/react/alert-dialog";
|
|
10
|
+
import { Button as Button$1 } from "@base-ui/react/button";
|
|
11
|
+
import { cva } from "class-variance-authority";
|
|
12
|
+
import { Avatar as Avatar$1 } from "@base-ui/react/avatar";
|
|
13
|
+
import { mergeProps } from "@base-ui/react/merge-props";
|
|
14
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
15
|
+
import { Separator as Separator$1 } from "@base-ui/react/separator";
|
|
16
|
+
import { DayPicker, getDefaultClassNames } from "react-day-picker";
|
|
10
17
|
import useEmblaCarousel from "embla-carousel-react";
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
14
|
-
import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
|
|
18
|
+
import { Checkbox as Checkbox$1 } from "@base-ui/react/checkbox";
|
|
19
|
+
import { Collapsible as Collapsible$1 } from "@base-ui/react/collapsible";
|
|
15
20
|
import { Combobox as Combobox$1 } from "@base-ui/react";
|
|
16
|
-
import { CheckIcon, ChevronDownIcon, CircleIcon, Loader2Icon, MinusIcon, OctagonXIcon, PanelLeftIcon, TriangleAlertIcon, XIcon } from "lucide-react";
|
|
17
21
|
import { Command as Command$1 } from "cmdk";
|
|
18
|
-
import
|
|
22
|
+
import { Dialog as Dialog$1 } from "@base-ui/react/dialog";
|
|
19
23
|
import { getCountryISO3 } from "@aircall/numbers";
|
|
20
|
-
import {
|
|
21
|
-
import
|
|
24
|
+
import { flexRender, getCoreRowModel, useReactTable } from "@tanstack/react-table";
|
|
25
|
+
import { Drawer as DrawerPrimitive } from "@base-ui/react/drawer";
|
|
26
|
+
import { Radio } from "@base-ui/react/radio";
|
|
27
|
+
import { RadioGroup as RadioGroup$1 } from "@base-ui/react/radio-group";
|
|
28
|
+
import { ScrollArea as ScrollAreaPrimitive } from "@base-ui/react/scroll-area";
|
|
29
|
+
import { Menu } from "@base-ui/react/menu";
|
|
22
30
|
import EmojiReactPicker, { Categories, EmojiStyle, SuggestionMode, Theme } from "emoji-picker-react";
|
|
23
|
-
import
|
|
31
|
+
import { Popover as Popover$1 } from "@base-ui/react/popover";
|
|
24
32
|
import { ThemeProvider as ThemeProvider$1, useTheme, useTheme as useTheme$1 } from "next-themes";
|
|
25
|
-
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
26
|
-
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
27
33
|
import { OTPInput, OTPInputContext } from "input-otp";
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
import
|
|
32
|
-
import
|
|
34
|
+
import { Progress as Progress$1 } from "@base-ui/react/progress";
|
|
35
|
+
import { Select as Select$1 } from "@base-ui/react/select";
|
|
36
|
+
import { Tooltip as Tooltip$1 } from "@base-ui/react/tooltip";
|
|
37
|
+
import { Slider as Slider$1 } from "@base-ui/react/slider";
|
|
38
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
33
39
|
import { Toaster as Toaster$1, toast } from "sonner";
|
|
34
|
-
import
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
import
|
|
40
|
+
import { Switch as Switch$1 } from "@base-ui/react/switch";
|
|
41
|
+
import { Tabs as Tabs$1 } from "@base-ui/react/tabs";
|
|
42
|
+
import { Toggle as Toggle$1 } from "@base-ui/react/toggle";
|
|
43
|
+
import { ToggleGroup as ToggleGroup$1 } from "@base-ui/react/toggle-group";
|
|
38
44
|
|
|
39
45
|
//#region src/lib/utils.ts
|
|
40
46
|
const twMerge = extendTailwindMerge({ extend: { theme: { text: ["tiny"] } } });
|
|
@@ -42,16 +48,198 @@ function cn(...inputs) {
|
|
|
42
48
|
return twMerge(clsx(inputs));
|
|
43
49
|
}
|
|
44
50
|
|
|
51
|
+
//#endregion
|
|
52
|
+
//#region src/components/accordion.tsx
|
|
53
|
+
function Accordion({ className, ...props }) {
|
|
54
|
+
return /* @__PURE__ */ jsx(Accordion$1.Root, {
|
|
55
|
+
"data-slot": "accordion",
|
|
56
|
+
className: cn("flex w-full flex-col", className),
|
|
57
|
+
...props
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
function AccordionItem({ className, ...props }) {
|
|
61
|
+
return /* @__PURE__ */ jsx(Accordion$1.Item, {
|
|
62
|
+
"data-slot": "accordion-item",
|
|
63
|
+
className: cn("not-last:border-b", className),
|
|
64
|
+
...props
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
function AccordionTrigger({ className, children, ...props }) {
|
|
68
|
+
return /* @__PURE__ */ jsx(Accordion$1.Header, {
|
|
69
|
+
className: "flex",
|
|
70
|
+
children: /* @__PURE__ */ jsxs(Accordion$1.Trigger, {
|
|
71
|
+
"data-slot": "accordion-trigger",
|
|
72
|
+
className: cn("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 aria-disabled:pointer-events-none aria-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", className),
|
|
73
|
+
...props,
|
|
74
|
+
children: [
|
|
75
|
+
children,
|
|
76
|
+
/* @__PURE__ */ jsx(ChevronDownIcon, {
|
|
77
|
+
"data-slot": "accordion-trigger-icon",
|
|
78
|
+
className: "pointer-events-none shrink-0 group-aria-expanded/accordion-trigger:hidden"
|
|
79
|
+
}),
|
|
80
|
+
/* @__PURE__ */ jsx(ChevronUpIcon, {
|
|
81
|
+
"data-slot": "accordion-trigger-icon",
|
|
82
|
+
className: "pointer-events-none hidden shrink-0 group-aria-expanded/accordion-trigger:inline"
|
|
83
|
+
})
|
|
84
|
+
]
|
|
85
|
+
})
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
function AccordionContent({ className, children, ...props }) {
|
|
89
|
+
return /* @__PURE__ */ jsx(Accordion$1.Panel, {
|
|
90
|
+
"data-slot": "accordion-content",
|
|
91
|
+
className: "overflow-hidden text-sm data-open:animate-accordion-down data-closed:animate-accordion-up",
|
|
92
|
+
...props,
|
|
93
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
94
|
+
className: cn("h-(--accordion-panel-height) pt-0 pb-4 data-ending-style:h-0 data-starting-style:h-0 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4", className),
|
|
95
|
+
children
|
|
96
|
+
})
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
//#endregion
|
|
101
|
+
//#region src/components/button.tsx
|
|
102
|
+
const buttonVariants = cva("group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 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", {
|
|
103
|
+
variants: {
|
|
104
|
+
variant: {
|
|
105
|
+
default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
|
|
106
|
+
outline: "border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
|
|
107
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
|
|
108
|
+
ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
|
|
109
|
+
destructive: "bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",
|
|
110
|
+
link: "text-primary underline underline-offset-4"
|
|
111
|
+
},
|
|
112
|
+
size: {
|
|
113
|
+
default: "h-8 gap-1.5 px-2 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5",
|
|
114
|
+
sm: "h-6 gap-1.5 px-2 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5",
|
|
115
|
+
lg: "h-10 gap-1.5 px-4 [&_svg:not([class*='size-'])]:size-6 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",
|
|
116
|
+
icon: "size-8",
|
|
117
|
+
"icon-sm": "size-6",
|
|
118
|
+
"icon-lg": "size-10 [&_svg:not([class*='size-'])]:size-6"
|
|
119
|
+
},
|
|
120
|
+
block: { true: "w-full" }
|
|
121
|
+
},
|
|
122
|
+
defaultVariants: {
|
|
123
|
+
variant: "default",
|
|
124
|
+
size: "default",
|
|
125
|
+
block: false
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
const Button = React$1.forwardRef(({ className, variant = "default", size = "default", block = false, ...props }, ref) => {
|
|
129
|
+
return /* @__PURE__ */ jsx(Button$1, {
|
|
130
|
+
ref,
|
|
131
|
+
"data-slot": "button",
|
|
132
|
+
"data-variant": variant,
|
|
133
|
+
className: cn(buttonVariants({
|
|
134
|
+
variant,
|
|
135
|
+
size,
|
|
136
|
+
block,
|
|
137
|
+
className
|
|
138
|
+
})),
|
|
139
|
+
...props
|
|
140
|
+
});
|
|
141
|
+
});
|
|
142
|
+
Button.displayName = "Button";
|
|
143
|
+
|
|
144
|
+
//#endregion
|
|
145
|
+
//#region src/components/alert-dialog.tsx
|
|
146
|
+
function AlertDialog({ ...props }) {
|
|
147
|
+
return /* @__PURE__ */ jsx(AlertDialog$1.Root, {
|
|
148
|
+
"data-slot": "alert-dialog",
|
|
149
|
+
...props
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
function AlertDialogTrigger({ ...props }) {
|
|
153
|
+
return /* @__PURE__ */ jsx(AlertDialog$1.Trigger, {
|
|
154
|
+
"data-slot": "alert-dialog-trigger",
|
|
155
|
+
...props
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
function AlertDialogPortal({ ...props }) {
|
|
159
|
+
return /* @__PURE__ */ jsx(AlertDialog$1.Portal, {
|
|
160
|
+
"data-slot": "alert-dialog-portal",
|
|
161
|
+
...props
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
function AlertDialogOverlay({ className, ...props }) {
|
|
165
|
+
return /* @__PURE__ */ jsx(AlertDialog$1.Backdrop, {
|
|
166
|
+
"data-slot": "alert-dialog-overlay",
|
|
167
|
+
className: cn("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0", className),
|
|
168
|
+
...props
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
function AlertDialogContent({ className, size = "default", ...props }) {
|
|
172
|
+
return /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [/* @__PURE__ */ jsx(AlertDialogOverlay, {}), /* @__PURE__ */ jsx(AlertDialog$1.Popup, {
|
|
173
|
+
"data-slot": "alert-dialog-content",
|
|
174
|
+
"data-size": size,
|
|
175
|
+
className: cn("group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 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-sm 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),
|
|
176
|
+
...props
|
|
177
|
+
})] });
|
|
178
|
+
}
|
|
179
|
+
function AlertDialogHeader({ className, ...props }) {
|
|
180
|
+
return /* @__PURE__ */ jsx("div", {
|
|
181
|
+
"data-slot": "alert-dialog-header",
|
|
182
|
+
className: cn("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-4 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]", className),
|
|
183
|
+
...props
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
function AlertDialogFooter({ className, ...props }) {
|
|
187
|
+
return /* @__PURE__ */ jsx("div", {
|
|
188
|
+
"data-slot": "alert-dialog-footer",
|
|
189
|
+
className: cn("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end", className),
|
|
190
|
+
...props
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
function AlertDialogMedia({ className, ...props }) {
|
|
194
|
+
return /* @__PURE__ */ jsx("div", {
|
|
195
|
+
"data-slot": "alert-dialog-media",
|
|
196
|
+
className: cn("mb-2 inline-flex size-10 items-center justify-center rounded-md bg-muted sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-6", className),
|
|
197
|
+
...props
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
function AlertDialogTitle({ className, ...props }) {
|
|
201
|
+
return /* @__PURE__ */ jsx(AlertDialog$1.Title, {
|
|
202
|
+
"data-slot": "alert-dialog-title",
|
|
203
|
+
className: cn("text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2", className),
|
|
204
|
+
...props
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
function AlertDialogDescription({ className, ...props }) {
|
|
208
|
+
return /* @__PURE__ */ jsx(AlertDialog$1.Description, {
|
|
209
|
+
"data-slot": "alert-dialog-description",
|
|
210
|
+
className: cn("text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", className),
|
|
211
|
+
...props
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
function AlertDialogAction({ className, ...props }) {
|
|
215
|
+
return /* @__PURE__ */ jsx(Button, {
|
|
216
|
+
"data-slot": "alert-dialog-action",
|
|
217
|
+
className: cn(className),
|
|
218
|
+
...props
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
function AlertDialogCancel({ className, variant = "outline", size = "default", ...props }) {
|
|
222
|
+
return /* @__PURE__ */ jsx(AlertDialog$1.Close, {
|
|
223
|
+
"data-slot": "alert-dialog-cancel",
|
|
224
|
+
className: cn(className),
|
|
225
|
+
render: /* @__PURE__ */ jsx(Button, {
|
|
226
|
+
variant,
|
|
227
|
+
size
|
|
228
|
+
}),
|
|
229
|
+
...props
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
|
|
45
233
|
//#endregion
|
|
46
234
|
//#region src/components/alert.tsx
|
|
47
|
-
const alertVariants = cva("relative grid w-full items-start gap-x-2 gap-y-0.5 rounded-
|
|
235
|
+
const alertVariants = cva("relative grid w-full items-start gap-x-2 gap-y-0.5 rounded-3xl border px-4 py-4 text-card-foreground text-sm has-[>svg]:has-data-[slot=alert-action]:grid-cols-[calc(var(--spacing)*6)_1fr_auto] has-[>svg]:grid-cols-[calc(var(--spacing)*6)_1fr] has-data-[slot=alert-action]:grid-cols-[1fr_auto] has-[>svg]:gap-x-4 [&>svg]:size-6", {
|
|
48
236
|
defaultVariants: { variant: "default" },
|
|
49
237
|
variants: { variant: {
|
|
50
|
-
default: "bg-
|
|
51
|
-
error: "
|
|
52
|
-
info: "
|
|
53
|
-
success: "
|
|
54
|
-
warning: "
|
|
238
|
+
default: "bg-card border-border [&>svg]:text-muted-foreground",
|
|
239
|
+
error: "bg-destructive-background border-destructive/35 [&>svg]:text-destructive",
|
|
240
|
+
info: "bg-info-background border-info/35 [&>svg]:text-info",
|
|
241
|
+
success: "bg-success-background border-success/35 [&>svg]:text-success",
|
|
242
|
+
warning: "bg-warning-background border-warning/35 [&>svg]:text-warning"
|
|
55
243
|
} }
|
|
56
244
|
});
|
|
57
245
|
function Alert({ className, variant, ...props }) {
|
|
@@ -64,7 +252,7 @@ function Alert({ className, variant, ...props }) {
|
|
|
64
252
|
}
|
|
65
253
|
function AlertTitle({ className, ...props }) {
|
|
66
254
|
return /* @__PURE__ */ jsx("div", {
|
|
67
|
-
className: cn("font-medium [svg~&]:col-start-2", className),
|
|
255
|
+
className: cn("font-medium leading-6 [svg~&]:col-start-2", className),
|
|
68
256
|
"data-slot": "alert-title",
|
|
69
257
|
...props
|
|
70
258
|
});
|
|
@@ -86,88 +274,180 @@ function AlertAction({ className, ...props }) {
|
|
|
86
274
|
|
|
87
275
|
//#endregion
|
|
88
276
|
//#region src/components/avatar.tsx
|
|
89
|
-
const
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
default: "rounded-full",
|
|
93
|
-
rounded: "rounded-md"
|
|
94
|
-
},
|
|
95
|
-
size: {
|
|
96
|
-
sm: "size-6 text-xs",
|
|
97
|
-
default: "size-8",
|
|
98
|
-
lg: "size-10"
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
defaultVariants: {
|
|
102
|
-
shape: "default",
|
|
103
|
-
size: "default"
|
|
104
|
-
}
|
|
105
|
-
});
|
|
106
|
-
const Avatar = React$1.forwardRef(({ className, shape = "default", size = "default", ...props }, ref) => {
|
|
107
|
-
return /* @__PURE__ */ jsx(AvatarPrimitive.Root, {
|
|
277
|
+
const Avatar = React$1.forwardRef(({ className, size = "default", ...props }, ref) => {
|
|
278
|
+
return /* @__PURE__ */ jsx(Avatar$1.Root, {
|
|
279
|
+
ref,
|
|
108
280
|
"data-slot": "avatar",
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
}), className),
|
|
113
|
-
...props,
|
|
114
|
-
ref
|
|
281
|
+
"data-size": size,
|
|
282
|
+
className: cn("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=xs]:size-5 data-[size=sm]:size-6 data-[size=lg]:size-10 data-[size=xl]:size-12 dark:after:mix-blend-lighten", className),
|
|
283
|
+
...props
|
|
115
284
|
});
|
|
116
285
|
});
|
|
286
|
+
Avatar.displayName = "Avatar";
|
|
117
287
|
function AvatarImage({ className, ...props }) {
|
|
118
|
-
return /* @__PURE__ */ jsx(
|
|
288
|
+
return /* @__PURE__ */ jsx(Avatar$1.Image, {
|
|
119
289
|
"data-slot": "avatar-image",
|
|
120
|
-
className: cn("aspect-square size-full", className),
|
|
290
|
+
className: cn("aspect-square size-full rounded-full object-cover", className),
|
|
121
291
|
...props
|
|
122
292
|
});
|
|
123
293
|
}
|
|
124
294
|
function AvatarFallback({ className, ...props }) {
|
|
125
|
-
return /* @__PURE__ */ jsx(
|
|
295
|
+
return /* @__PURE__ */ jsx(Avatar$1.Fallback, {
|
|
126
296
|
"data-slot": "avatar-fallback",
|
|
127
|
-
className: cn("
|
|
297
|
+
className: cn("flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=xs]/avatar:text-xs group-data-[size=sm]/avatar:text-xs group-data-[size=xl]/avatar:text-base", className),
|
|
298
|
+
...props
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
function AvatarBadge({ className, ...props }) {
|
|
302
|
+
return /* @__PURE__ */ jsx("span", {
|
|
303
|
+
"data-slot": "avatar-badge",
|
|
304
|
+
className: cn("absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full bg-blend-color ring-2 ring-background select-none", "group-data-[size=xs]/avatar:size-2 group-data-[size=xs]/avatar:[&>svg]:hidden", "group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden", "group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2", "group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2", "group-data-[size=xl]/avatar:size-3 group-data-[size=xl]/avatar:[&>svg]:size-2", className),
|
|
305
|
+
...props
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
function AvatarGroup({ className, ...props }) {
|
|
309
|
+
return /* @__PURE__ */ jsx("div", {
|
|
310
|
+
"data-slot": "avatar-group",
|
|
311
|
+
className: cn("group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2 *:data-[slot=avatar]:ring-background", className),
|
|
312
|
+
...props
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
function AvatarGroupCount({ className, ...props }) {
|
|
316
|
+
return /* @__PURE__ */ jsx("div", {
|
|
317
|
+
"data-slot": "avatar-group-count",
|
|
318
|
+
className: cn("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=xs]/avatar-group:size-5 group-has-data-[size=sm]/avatar-group:size-6 group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=xl]/avatar-group:size-12 [&>svg]:size-4 group-has-data-[size=xs]/avatar-group:[&>svg]:size-3 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=xl]/avatar-group:[&>svg]:size-6", className),
|
|
128
319
|
...props
|
|
129
320
|
});
|
|
130
321
|
}
|
|
131
322
|
|
|
132
323
|
//#endregion
|
|
133
|
-
//#region src/components/badge.tsx
|
|
134
|
-
const
|
|
324
|
+
//#region src/components/counter-badge.tsx
|
|
325
|
+
const counterBadgeVariants = cva("group/counter-badge inline-flex h-5 min-w-5 shrink-0 items-center justify-center rounded-full border border-transparent px-1 text-xs font-medium whitespace-nowrap transition-[color,box-shadow]", {
|
|
135
326
|
variants: { variant: {
|
|
136
|
-
default: "
|
|
137
|
-
secondary: "
|
|
138
|
-
|
|
139
|
-
outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"
|
|
327
|
+
default: "bg-destructive text-primary-foreground hover:bg-destructive/80 focus-visible:border-ring focus-visible:outline-1 focus-visible:outline-offset-1 focus-visible:outline-ring/50",
|
|
328
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 focus-visible:border-ring focus-visible:outline-1 focus-visible:outline-offset-1 focus-visible:outline-ring/50",
|
|
329
|
+
ghost: "text-muted-foreground hover:bg-muted/80 focus-visible:outline-1 focus-visible:outline-offset-1 focus-visible:outline-ring/50"
|
|
140
330
|
} },
|
|
141
331
|
defaultVariants: { variant: "default" }
|
|
142
332
|
});
|
|
143
|
-
const
|
|
144
|
-
return
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
333
|
+
const CounterBadge = React$1.forwardRef(({ className, variant = "default", render, ...props }, ref) => {
|
|
334
|
+
return useRender({
|
|
335
|
+
defaultTagName: "span",
|
|
336
|
+
props: mergeProps({
|
|
337
|
+
className: cn(counterBadgeVariants({ variant }), className),
|
|
338
|
+
ref
|
|
339
|
+
}, props),
|
|
340
|
+
render,
|
|
341
|
+
state: {
|
|
342
|
+
slot: "counter-badge",
|
|
343
|
+
variant
|
|
344
|
+
}
|
|
345
|
+
});
|
|
346
|
+
});
|
|
347
|
+
CounterBadge.displayName = "CounterBadge";
|
|
348
|
+
|
|
349
|
+
//#endregion
|
|
350
|
+
//#region src/components/badge.tsx
|
|
351
|
+
const badgeVariants = cva("group/badge inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none", {
|
|
352
|
+
variants: {
|
|
353
|
+
variant: {
|
|
354
|
+
default: "bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",
|
|
355
|
+
secondary: "bg-charcoal-500/30 text-foreground [a]:hover:bg-charcoal-500/20",
|
|
356
|
+
outline: "border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground"
|
|
357
|
+
},
|
|
358
|
+
size: {
|
|
359
|
+
sm: "h-5 px-2 py-0.5 text-xs [&>svg]:size-3!",
|
|
360
|
+
lg: "h-7 px-3 py-1 text-sm [&>svg]:size-4!"
|
|
361
|
+
}
|
|
362
|
+
},
|
|
363
|
+
defaultVariants: {
|
|
364
|
+
variant: "default",
|
|
365
|
+
size: "sm"
|
|
366
|
+
}
|
|
367
|
+
});
|
|
368
|
+
const Badge = React$1.forwardRef(({ className, variant = "default", size = "sm", render, ...props }, ref) => {
|
|
369
|
+
return useRender({
|
|
370
|
+
defaultTagName: "span",
|
|
371
|
+
props: mergeProps({
|
|
372
|
+
className: cn(badgeVariants({
|
|
373
|
+
variant,
|
|
374
|
+
size
|
|
375
|
+
}), className),
|
|
376
|
+
ref
|
|
377
|
+
}, props),
|
|
378
|
+
render,
|
|
379
|
+
state: {
|
|
380
|
+
slot: "badge",
|
|
381
|
+
variant,
|
|
382
|
+
size
|
|
383
|
+
}
|
|
149
384
|
});
|
|
150
385
|
});
|
|
151
386
|
Badge.displayName = "Badge";
|
|
387
|
+
function BadgeGroup({ className, ...props }) {
|
|
388
|
+
return /* @__PURE__ */ jsx("div", {
|
|
389
|
+
"data-slot": "badge-group",
|
|
390
|
+
className: cn("flex flex-wrap items-center gap-2", className),
|
|
391
|
+
...props
|
|
392
|
+
});
|
|
393
|
+
}
|
|
394
|
+
function BadgeGroupCount({ className, ...props }) {
|
|
395
|
+
return /* @__PURE__ */ jsx(CounterBadge, {
|
|
396
|
+
"data-slot": "badge-group-count",
|
|
397
|
+
variant: "ghost",
|
|
398
|
+
className,
|
|
399
|
+
...props
|
|
400
|
+
});
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
//#endregion
|
|
404
|
+
//#region src/components/banner.tsx
|
|
405
|
+
const bannerVariants = cva("relative grid w-full items-start gap-x-2 gap-y-0.5 px-4 py-4 text-card-foreground text-sm has-[>svg]:has-data-[slot=alert-action]:grid-cols-[calc(var(--spacing)*6)_1fr_auto] has-[>svg]:grid-cols-[calc(var(--spacing)*6)_1fr] has-data-[slot=alert-action]:grid-cols-[1fr_auto] has-[>svg]:gap-x-4 [&>svg]:size-6", {
|
|
406
|
+
defaultVariants: { variant: "default" },
|
|
407
|
+
variants: {
|
|
408
|
+
variant: {
|
|
409
|
+
default: "bg-card border-border [&>svg]:text-muted-foreground",
|
|
410
|
+
error: "bg-destructive-background border-destructive [&>svg]:text-destructive",
|
|
411
|
+
info: "bg-info-background border-info [&>svg]:text-info",
|
|
412
|
+
success: "bg-success-background border-success [&>svg]:text-success",
|
|
413
|
+
warning: "bg-warning-background border-warning [&>svg]:text-warning"
|
|
414
|
+
},
|
|
415
|
+
borderDirection: {
|
|
416
|
+
top: "border-t",
|
|
417
|
+
bottom: "border-b"
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
});
|
|
421
|
+
function Banner({ className, variant, borderDirection, ...props }) {
|
|
422
|
+
return /* @__PURE__ */ jsx("div", {
|
|
423
|
+
className: cn(bannerVariants({
|
|
424
|
+
variant,
|
|
425
|
+
borderDirection
|
|
426
|
+
}), className),
|
|
427
|
+
"data-slot": "banner",
|
|
428
|
+
role: "alert",
|
|
429
|
+
...props
|
|
430
|
+
});
|
|
431
|
+
}
|
|
152
432
|
|
|
153
433
|
//#endregion
|
|
154
434
|
//#region src/components/separator.tsx
|
|
155
|
-
function Separator({ className, orientation = "horizontal",
|
|
156
|
-
return /* @__PURE__ */ jsx(
|
|
435
|
+
function Separator({ className, orientation = "horizontal", ...props }) {
|
|
436
|
+
return /* @__PURE__ */ jsx(Separator$1, {
|
|
157
437
|
"data-slot": "separator",
|
|
158
|
-
|
|
438
|
+
"data-orientation": orientation,
|
|
159
439
|
orientation,
|
|
160
|
-
className: cn("bg-border
|
|
440
|
+
className: cn("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px data-[orientation=vertical]:self-stretch", className),
|
|
161
441
|
...props
|
|
162
442
|
});
|
|
163
443
|
}
|
|
164
444
|
|
|
165
445
|
//#endregion
|
|
166
446
|
//#region src/components/button-group.tsx
|
|
167
|
-
const buttonGroupVariants = cva("flex w-fit items-stretch
|
|
447
|
+
const buttonGroupVariants = cva("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", {
|
|
168
448
|
variants: { orientation: {
|
|
169
|
-
horizontal: "[
|
|
170
|
-
vertical: "flex-col [
|
|
449
|
+
horizontal: "*:data-slot:rounded-r-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-r-md! [&>[data-slot]~[data-slot]]:rounded-l-none [&>[data-slot]~[data-slot]]:border-l-0",
|
|
450
|
+
vertical: "flex-col *:data-slot:rounded-b-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-b-md! [&>[data-slot]~[data-slot]]:rounded-t-none [&>[data-slot]~[data-slot]]:border-t-0"
|
|
171
451
|
} },
|
|
172
452
|
defaultVariants: { orientation: "horizontal" }
|
|
173
453
|
});
|
|
@@ -180,64 +460,124 @@ function ButtonGroup({ className, orientation, ...props }) {
|
|
|
180
460
|
...props
|
|
181
461
|
});
|
|
182
462
|
}
|
|
183
|
-
function ButtonGroupText({ className,
|
|
184
|
-
return
|
|
185
|
-
|
|
186
|
-
|
|
463
|
+
function ButtonGroupText({ className, render, ...props }) {
|
|
464
|
+
return useRender({
|
|
465
|
+
defaultTagName: "div",
|
|
466
|
+
props: mergeProps({ className: cn("flex items-center gap-2 rounded-md border bg-muted px-2.5 text-sm font-medium [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", className) }, props),
|
|
467
|
+
render,
|
|
468
|
+
state: { slot: "button-group-text" }
|
|
187
469
|
});
|
|
188
470
|
}
|
|
189
471
|
function ButtonGroupSeparator({ className, orientation = "vertical", ...props }) {
|
|
190
472
|
return /* @__PURE__ */ jsx(Separator, {
|
|
191
473
|
"data-slot": "button-group-separator",
|
|
192
474
|
orientation,
|
|
193
|
-
className: cn("bg-input
|
|
475
|
+
className: cn("relative self-stretch bg-input data-[orientation=horizontal]:mx-px data-[orientation=horizontal]:w-auto data-[orientation=vertical]:my-px data-[orientation=vertical]:h-auto", className),
|
|
194
476
|
...props
|
|
195
477
|
});
|
|
196
478
|
}
|
|
197
479
|
|
|
198
480
|
//#endregion
|
|
199
|
-
//#region src/components/
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
481
|
+
//#region src/components/calendar.tsx
|
|
482
|
+
function Calendar({ className, classNames, showOutsideDays = true, captionLayout = "label", buttonVariant = "ghost", locale, formatters, components, ...props }) {
|
|
483
|
+
const defaultClassNames = getDefaultClassNames();
|
|
484
|
+
return /* @__PURE__ */ jsx(DayPicker, {
|
|
485
|
+
showOutsideDays,
|
|
486
|
+
className: cn("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", String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`, String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`, className),
|
|
487
|
+
captionLayout,
|
|
488
|
+
locale,
|
|
489
|
+
formatters: {
|
|
490
|
+
formatMonthDropdown: (date) => date.toLocaleString(locale?.code, { month: "short" }),
|
|
491
|
+
...formatters
|
|
209
492
|
},
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
493
|
+
classNames: {
|
|
494
|
+
root: cn("w-fit", defaultClassNames.root),
|
|
495
|
+
months: cn("relative flex flex-col gap-4 md:flex-row", defaultClassNames.months),
|
|
496
|
+
month: cn("flex w-full flex-col gap-4", defaultClassNames.month),
|
|
497
|
+
nav: cn("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1", defaultClassNames.nav),
|
|
498
|
+
button_previous: cn(buttonVariants({ variant: buttonVariant }), "size-(--cell-size) p-0 select-none aria-disabled:opacity-50", defaultClassNames.button_previous),
|
|
499
|
+
button_next: cn(buttonVariants({ variant: buttonVariant }), "size-(--cell-size) p-0 select-none aria-disabled:opacity-50", defaultClassNames.button_next),
|
|
500
|
+
month_caption: cn("flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)", defaultClassNames.month_caption),
|
|
501
|
+
dropdowns: cn("flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium", defaultClassNames.dropdowns),
|
|
502
|
+
dropdown_root: cn("relative rounded-(--cell-radius)", defaultClassNames.dropdown_root),
|
|
503
|
+
dropdown: cn("absolute inset-0 bg-popover opacity-0", defaultClassNames.dropdown),
|
|
504
|
+
caption_label: cn("font-medium select-none", captionLayout === "label" ? "text-sm" : "flex items-center gap-1 rounded-(--cell-radius) text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground", defaultClassNames.caption_label),
|
|
505
|
+
table: "w-full border-collapse",
|
|
506
|
+
weekdays: cn("flex", defaultClassNames.weekdays),
|
|
507
|
+
weekday: cn("flex-1 rounded-(--cell-radius) text-[0.8rem] font-normal text-muted-foreground select-none", defaultClassNames.weekday),
|
|
508
|
+
week: cn("mt-2 flex w-full", defaultClassNames.week),
|
|
509
|
+
week_number_header: cn("w-(--cell-size) select-none", defaultClassNames.week_number_header),
|
|
510
|
+
week_number: cn("text-[0.8rem] text-muted-foreground select-none", defaultClassNames.week_number),
|
|
511
|
+
day: cn("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)", props.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-(--cell-radius)" : "[&:first-child[data-selected=true]_button]:rounded-l-(--cell-radius)", defaultClassNames.day),
|
|
512
|
+
range_start: cn("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", defaultClassNames.range_start),
|
|
513
|
+
range_middle: cn("rounded-none", defaultClassNames.range_middle),
|
|
514
|
+
range_end: cn("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", defaultClassNames.range_end),
|
|
515
|
+
today: cn("rounded-(--cell-radius) text-foreground not-data-[selected=true]:bg-muted data-[selected=true]:rounded-none", defaultClassNames.today),
|
|
516
|
+
outside: cn("text-muted-foreground aria-selected:text-muted-foreground", defaultClassNames.outside),
|
|
517
|
+
disabled: cn("text-muted-foreground opacity-50", defaultClassNames.disabled),
|
|
518
|
+
hidden: cn("invisible", defaultClassNames.hidden),
|
|
519
|
+
...classNames
|
|
520
|
+
},
|
|
521
|
+
components: {
|
|
522
|
+
Root: ({ className: rootClassName, rootRef, ...rootProps }) => {
|
|
523
|
+
return /* @__PURE__ */ jsx("div", {
|
|
524
|
+
"data-slot": "calendar",
|
|
525
|
+
ref: rootRef,
|
|
526
|
+
className: cn(rootClassName),
|
|
527
|
+
...rootProps
|
|
528
|
+
});
|
|
529
|
+
},
|
|
530
|
+
Chevron: ({ className: chevronClassName, orientation, ...chevronProps }) => {
|
|
531
|
+
if (orientation === "left") return /* @__PURE__ */ jsx(ChevronLeftIcon, {
|
|
532
|
+
className: cn("size-4", chevronClassName),
|
|
533
|
+
...chevronProps
|
|
534
|
+
});
|
|
535
|
+
if (orientation === "right") return /* @__PURE__ */ jsx(ChevronRightIcon, {
|
|
536
|
+
className: cn("size-4", chevronClassName),
|
|
537
|
+
...chevronProps
|
|
538
|
+
});
|
|
539
|
+
return /* @__PURE__ */ jsx(ChevronDownIcon, {
|
|
540
|
+
className: cn("size-4", chevronClassName),
|
|
541
|
+
...chevronProps
|
|
542
|
+
});
|
|
543
|
+
},
|
|
544
|
+
DayButton: ({ ...dayButtonProps }) => /* @__PURE__ */ jsx(CalendarDayButton, {
|
|
545
|
+
locale,
|
|
546
|
+
...dayButtonProps
|
|
547
|
+
}),
|
|
548
|
+
WeekNumber: ({ children, ...weekNumberProps }) => {
|
|
549
|
+
return /* @__PURE__ */ jsx("td", {
|
|
550
|
+
...weekNumberProps,
|
|
551
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
552
|
+
className: "flex size-(--cell-size) items-center justify-center text-center",
|
|
553
|
+
children
|
|
554
|
+
})
|
|
555
|
+
});
|
|
556
|
+
},
|
|
557
|
+
...components
|
|
218
558
|
},
|
|
219
|
-
block: { true: "w-full" }
|
|
220
|
-
},
|
|
221
|
-
defaultVariants: {
|
|
222
|
-
variant: "default",
|
|
223
|
-
size: "default",
|
|
224
|
-
block: false
|
|
225
|
-
}
|
|
226
|
-
});
|
|
227
|
-
const Button = React$1.forwardRef(({ className, variant, size, asChild = false, block = false, ...props }, forwardedRef) => {
|
|
228
|
-
return /* @__PURE__ */ jsx(asChild ? Slot$1 : "button", {
|
|
229
|
-
"data-slot": "button",
|
|
230
|
-
className: cn(buttonVariants({
|
|
231
|
-
variant,
|
|
232
|
-
size,
|
|
233
|
-
block,
|
|
234
|
-
className
|
|
235
|
-
})),
|
|
236
|
-
ref: forwardedRef,
|
|
237
559
|
...props
|
|
238
560
|
});
|
|
239
|
-
}
|
|
240
|
-
|
|
561
|
+
}
|
|
562
|
+
function CalendarDayButton({ className: dayClassName, day, modifiers, locale, ...props }) {
|
|
563
|
+
const defaultClassNames = getDefaultClassNames();
|
|
564
|
+
const ref = React$1.useRef(null);
|
|
565
|
+
React$1.useEffect(() => {
|
|
566
|
+
if (modifiers.focused) ref.current?.focus();
|
|
567
|
+
}, [modifiers.focused]);
|
|
568
|
+
return /* @__PURE__ */ jsx(Button, {
|
|
569
|
+
ref,
|
|
570
|
+
variant: "ghost",
|
|
571
|
+
size: "icon",
|
|
572
|
+
"data-day": day.date.toLocaleDateString(locale?.code),
|
|
573
|
+
"data-selected-single": modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle,
|
|
574
|
+
"data-range-start": modifiers.range_start,
|
|
575
|
+
"data-range-end": modifiers.range_end,
|
|
576
|
+
"data-range-middle": modifiers.range_middle,
|
|
577
|
+
className: cn("relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 rounded-(--cell-radius) border-transparent bg-clip-border 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-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-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", defaultClassNames.day, dayClassName),
|
|
578
|
+
...props
|
|
579
|
+
});
|
|
580
|
+
}
|
|
241
581
|
|
|
242
582
|
//#endregion
|
|
243
583
|
//#region src/components/card.tsx
|
|
@@ -393,7 +733,7 @@ function CarouselPrevious({ className, variant = "outline", size = "sm", ...prop
|
|
|
393
733
|
disabled: !canScrollPrev,
|
|
394
734
|
onClick: scrollPrev,
|
|
395
735
|
...props,
|
|
396
|
-
children: [/* @__PURE__ */ jsx(
|
|
736
|
+
children: [/* @__PURE__ */ jsx(ArrowLeft, {}), /* @__PURE__ */ jsx("span", {
|
|
397
737
|
className: "sr-only",
|
|
398
738
|
children: "Previous slide"
|
|
399
739
|
})]
|
|
@@ -409,7 +749,7 @@ function CarouselNext({ className, variant = "outline", size = "sm", ...props })
|
|
|
409
749
|
disabled: !canScrollNext,
|
|
410
750
|
onClick: scrollNext,
|
|
411
751
|
...props,
|
|
412
|
-
children: [/* @__PURE__ */ jsx(
|
|
752
|
+
children: [/* @__PURE__ */ jsx(ArrowRight, {}), /* @__PURE__ */ jsx("span", {
|
|
413
753
|
className: "sr-only",
|
|
414
754
|
children: "Next slide"
|
|
415
755
|
})]
|
|
@@ -419,15 +759,16 @@ function CarouselNext({ className, variant = "outline", size = "sm", ...props })
|
|
|
419
759
|
//#endregion
|
|
420
760
|
//#region src/components/checkbox.tsx
|
|
421
761
|
const Checkbox = React$1.forwardRef(({ className, ...props }, ref) => {
|
|
422
|
-
return /* @__PURE__ */ jsx(
|
|
762
|
+
return /* @__PURE__ */ jsx(Checkbox$1.Root, {
|
|
423
763
|
ref,
|
|
424
764
|
"data-slot": "checkbox",
|
|
425
|
-
className: cn("peer
|
|
765
|
+
className: cn("peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input transition-[color,box-shadow,opacity] outline-none active:opacity-60 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:bg-input/50 disabled:opacity-50 dark:disabled:bg-input/80 aria-invalid:border-destructive focus-visible:aria-invalid:ring-3 focus-visible:aria-invalid:ring-destructive/20 hover:aria-invalid:data-unchecked:bg-destructive-background focus-visible:aria-invalid:data-unchecked:bg-destructive-background dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:focus-visible:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground data-indeterminate:border-primary data-indeterminate:bg-primary data-indeterminate:text-primary-foreground aria-invalid:data-checked:border-destructive aria-invalid:data-checked:bg-destructive aria-invalid:data-indeterminate:border-destructive aria-invalid:data-indeterminate:bg-destructive dark:data-checked:bg-primary dark:data-indeterminate:bg-primary", className),
|
|
426
766
|
...props,
|
|
427
|
-
children: /* @__PURE__ */
|
|
767
|
+
children: /* @__PURE__ */ jsxs(Checkbox$1.Indicator, {
|
|
428
768
|
"data-slot": "checkbox-indicator",
|
|
429
|
-
|
|
430
|
-
|
|
769
|
+
keepMounted: true,
|
|
770
|
+
className: "group/indicator grid place-content-center text-current transition-none [&>svg]:size-3.5",
|
|
771
|
+
children: [/* @__PURE__ */ jsx(CheckIcon, { className: "hidden group-data-[checked]/indicator:block" }), /* @__PURE__ */ jsx(MinusIcon, { className: "hidden group-data-[indeterminate]/indicator:block" })]
|
|
431
772
|
})
|
|
432
773
|
});
|
|
433
774
|
});
|
|
@@ -436,19 +777,19 @@ Checkbox.displayName = "Checkbox";
|
|
|
436
777
|
//#endregion
|
|
437
778
|
//#region src/components/collapsible.tsx
|
|
438
779
|
function Collapsible({ ...props }) {
|
|
439
|
-
return /* @__PURE__ */ jsx(
|
|
780
|
+
return /* @__PURE__ */ jsx(Collapsible$1.Root, {
|
|
440
781
|
"data-slot": "collapsible",
|
|
441
782
|
...props
|
|
442
783
|
});
|
|
443
784
|
}
|
|
444
785
|
function CollapsibleTrigger({ ...props }) {
|
|
445
|
-
return /* @__PURE__ */ jsx(
|
|
786
|
+
return /* @__PURE__ */ jsx(Collapsible$1.Trigger, {
|
|
446
787
|
"data-slot": "collapsible-trigger",
|
|
447
788
|
...props
|
|
448
789
|
});
|
|
449
790
|
}
|
|
450
791
|
function CollapsibleContent({ ...props }) {
|
|
451
|
-
return /* @__PURE__ */ jsx(
|
|
792
|
+
return /* @__PURE__ */ jsx(Collapsible$1.Panel, {
|
|
452
793
|
"data-slot": "collapsible-content",
|
|
453
794
|
...props
|
|
454
795
|
});
|
|
@@ -456,23 +797,12 @@ function CollapsibleContent({ ...props }) {
|
|
|
456
797
|
|
|
457
798
|
//#endregion
|
|
458
799
|
//#region src/components/input.tsx
|
|
459
|
-
const inputVariants = cva("text-foreground file:text-foreground placeholder:text-muted-foreground
|
|
460
|
-
|
|
461
|
-
sizing: {
|
|
462
|
-
default: "h-9 px-4 py-2",
|
|
463
|
-
sm: "h-8 rounded-md gap-1.5 px-3",
|
|
464
|
-
lg: "h-11 rounded-lg px-6"
|
|
465
|
-
},
|
|
466
|
-
block: { true: "w-full" }
|
|
467
|
-
},
|
|
468
|
-
defaultVariants: { sizing: "default" }
|
|
469
|
-
});
|
|
470
|
-
const Input = React$1.forwardRef(({ className, type, sizing, block, ...props }, forwardedRef) => {
|
|
800
|
+
const inputVariants = cva("text-foreground file:text-foreground placeholder:text-muted-foreground dark:bg-input/30 border-input flex h-10 w-full min-w-0 rounded-md border bg-transparent px-3 py-2 text-base transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium hover:border-ring hover:aria-invalid:border-destructive disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 dark:disabled:bg-input/80 md:text-sm focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3 aria-invalid:border-destructive focus-visible:aria-invalid:ring-destructive/20 focus-visible:aria-invalid:ring-3 dark:focus-visible:aria-invalid:ring-destructive/40", { variants: { block: { true: "w-full" } } });
|
|
801
|
+
const Input = React$1.forwardRef(({ className, type, block, ...props }, forwardedRef) => {
|
|
471
802
|
return /* @__PURE__ */ jsx("input", {
|
|
472
803
|
type,
|
|
473
804
|
"data-slot": "input",
|
|
474
805
|
className: cn(inputVariants({
|
|
475
|
-
sizing,
|
|
476
806
|
block,
|
|
477
807
|
className
|
|
478
808
|
})),
|
|
@@ -486,29 +816,21 @@ const Input = React$1.forwardRef(({ className, type, sizing, block, ...props },
|
|
|
486
816
|
function Textarea({ className, ...props }) {
|
|
487
817
|
return /* @__PURE__ */ jsx("textarea", {
|
|
488
818
|
"data-slot": "textarea",
|
|
489
|
-
className: cn("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20
|
|
819
|
+
className: cn("border-input placeholder:text-muted-foreground hover:border-ring hover:aria-invalid:border-destructive focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3 aria-invalid:border-destructive focus-visible:aria-invalid:ring-destructive/20 focus-visible:aria-invalid:ring-3 dark:focus-visible:aria-invalid:ring-destructive/40 dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 dark:disabled:bg-input/80 md:text-sm", className),
|
|
490
820
|
...props
|
|
491
821
|
});
|
|
492
822
|
}
|
|
493
823
|
|
|
494
824
|
//#endregion
|
|
495
825
|
//#region src/components/input-group.tsx
|
|
496
|
-
const
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
function InputGroup({ className, sizing, ...props }) {
|
|
505
|
-
return /* @__PURE__ */ jsx("div", {
|
|
506
|
-
"data-slot": "input-group",
|
|
507
|
-
role: "group",
|
|
508
|
-
className: cn(inputGroupVariants({ sizing }), "has-[>[data-align=inline-start]]:[&>input]:pl-2", "has-[>[data-align=inline-end]]:[&>input]:pr-2", "has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3", "has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3", "has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot=input-group-control]:focus-visible]:ring-[3px]", "has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40", className),
|
|
509
|
-
...props
|
|
510
|
-
});
|
|
511
|
-
}
|
|
826
|
+
const InputGroup = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", {
|
|
827
|
+
ref,
|
|
828
|
+
"data-slot": "input-group",
|
|
829
|
+
role: "group",
|
|
830
|
+
className: cn("group/input-group border-input dark:bg-input/30 relative flex h-10 w-full items-center rounded-md border transition-[color,box-shadow] outline-none has-[>textarea]:h-auto", "not-has-[input:disabled]:not-has-[textarea:disabled]:not-has-[[data-slot][aria-invalid=true]]:hover:border-ring", "has-[input:disabled]:bg-input/50 has-[textarea:disabled]:bg-input/50 has-[input:disabled]:opacity-50 has-[textarea:disabled]:opacity-50 dark:has-[input:disabled]:bg-input/80 dark:has-[textarea:disabled]:bg-input/80", "has-[>[data-align=inline-start]]:[&>input]:pl-2", "has-[>[data-align=inline-end]]:[&>input]:pr-2", "has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3", "has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3", "has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot=input-group-control]:focus-visible]:ring-3", "has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]:focus-visible]:ring-destructive/20 dark:has-[[data-slot][aria-invalid=true]:focus-visible]:ring-destructive/40", className),
|
|
831
|
+
...props
|
|
832
|
+
}));
|
|
833
|
+
InputGroup.displayName = "InputGroup";
|
|
512
834
|
const inputGroupAddonVariants = cva("text-muted-foreground flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium select-none [&>svg:not([class*='size-'])]:size-4 [&>kbd]:rounded-[calc(var(--radius)-5px)] group-data-[disabled=true]/input-group:opacity-50", {
|
|
513
835
|
variants: { align: {
|
|
514
836
|
"inline-start": "order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]",
|
|
@@ -531,22 +853,13 @@ function InputGroupAddon({ className, align = "inline-start", ...props }) {
|
|
|
531
853
|
...props
|
|
532
854
|
});
|
|
533
855
|
}
|
|
534
|
-
const
|
|
535
|
-
variants: { size: {
|
|
536
|
-
xs: "h-6 gap-1 px-2 rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-3.5 has-[>svg]:px-2",
|
|
537
|
-
sm: "h-7 px-2.5 gap-1.5 rounded-md has-[>svg]:px-2.5",
|
|
538
|
-
"icon-xs": "size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0",
|
|
539
|
-
"icon-sm": "size-7 p-0 has-[>svg]:p-0"
|
|
540
|
-
} },
|
|
541
|
-
defaultVariants: { size: "xs" }
|
|
542
|
-
});
|
|
543
|
-
const InputGroupButton = React$1.forwardRef(({ className, type = "button", variant = "ghost", size = "xs", ...props }, ref) => {
|
|
856
|
+
const InputGroupButton = React$1.forwardRef(({ className, type = "button", variant = "ghost", size = "sm", ...props }, ref) => {
|
|
544
857
|
return /* @__PURE__ */ jsx(Button, {
|
|
545
858
|
ref,
|
|
546
859
|
type,
|
|
547
|
-
"data-size": size,
|
|
548
860
|
variant,
|
|
549
|
-
|
|
861
|
+
size,
|
|
862
|
+
className,
|
|
550
863
|
...props
|
|
551
864
|
});
|
|
552
865
|
});
|
|
@@ -560,7 +873,7 @@ function InputGroupText({ className, ...props }) {
|
|
|
560
873
|
const InputGroupInput = React$1.forwardRef(({ className, ...props }, forwardedRef) => {
|
|
561
874
|
return /* @__PURE__ */ jsx(Input, {
|
|
562
875
|
"data-slot": "input-group-control",
|
|
563
|
-
className: cn("flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent", className),
|
|
876
|
+
className: cn("flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 aria-invalid:ring-0 focus-visible:aria-invalid:!ring-0 disabled:bg-transparent disabled:opacity-100 dark:bg-transparent dark:disabled:bg-transparent", className),
|
|
564
877
|
...props,
|
|
565
878
|
ref: forwardedRef
|
|
566
879
|
});
|
|
@@ -568,7 +881,7 @@ const InputGroupInput = React$1.forwardRef(({ className, ...props }, forwardedRe
|
|
|
568
881
|
function InputGroupTextarea({ className, ...props }) {
|
|
569
882
|
return /* @__PURE__ */ jsx(Textarea, {
|
|
570
883
|
"data-slot": "input-group-control",
|
|
571
|
-
className: cn("flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0 dark:bg-transparent", className),
|
|
884
|
+
className: cn("flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent", className),
|
|
572
885
|
...props
|
|
573
886
|
});
|
|
574
887
|
}
|
|
@@ -586,54 +899,49 @@ const ComboboxTrigger = React$1.forwardRef(({ className, children, ...props }, r
|
|
|
586
899
|
return /* @__PURE__ */ jsxs(Combobox$1.Trigger, {
|
|
587
900
|
ref,
|
|
588
901
|
"data-slot": "combobox-trigger",
|
|
589
|
-
"aria-label": "Open options",
|
|
590
902
|
className: cn("[&_svg:not([class*='size-'])]:size-4", className),
|
|
591
903
|
...props,
|
|
592
|
-
children: [children, /* @__PURE__ */ jsx(ChevronDownIcon, {
|
|
593
|
-
"data-slot": "combobox-trigger-icon",
|
|
594
|
-
className: "text-muted-foreground pointer-events-none size-4"
|
|
595
|
-
})]
|
|
904
|
+
children: [children, /* @__PURE__ */ jsx(ChevronDownIcon, { className: "pointer-events-none size-4 text-muted-foreground" })]
|
|
596
905
|
});
|
|
597
906
|
});
|
|
598
907
|
ComboboxTrigger.displayName = "ComboboxTrigger";
|
|
599
908
|
function ComboboxClear({ className, ...props }) {
|
|
600
909
|
return /* @__PURE__ */ jsx(Combobox$1.Clear, {
|
|
601
910
|
"data-slot": "combobox-clear",
|
|
602
|
-
"aria-label": "Clear selection",
|
|
603
911
|
render: /* @__PURE__ */ jsx(InputGroupButton, {
|
|
604
912
|
variant: "ghost",
|
|
605
|
-
size: "icon-
|
|
913
|
+
size: "icon-sm"
|
|
606
914
|
}),
|
|
607
915
|
className: cn(className),
|
|
608
916
|
...props,
|
|
609
917
|
children: /* @__PURE__ */ jsx(XIcon, { className: "pointer-events-none" })
|
|
610
918
|
});
|
|
611
919
|
}
|
|
612
|
-
|
|
920
|
+
const ComboboxInput = React$1.forwardRef(({ className, children, disabled = false, showTrigger = true, showClear = false, ...props }, ref) => {
|
|
613
921
|
return /* @__PURE__ */ jsxs(InputGroup, {
|
|
922
|
+
ref,
|
|
614
923
|
className: cn("w-auto", className),
|
|
615
924
|
children: [
|
|
616
925
|
/* @__PURE__ */ jsx(Combobox$1.Input, {
|
|
617
|
-
disabled,
|
|
618
926
|
render: /* @__PURE__ */ jsx(InputGroupInput, { disabled }),
|
|
619
927
|
...props
|
|
620
928
|
}),
|
|
621
929
|
/* @__PURE__ */ jsxs(InputGroupAddon, {
|
|
622
930
|
align: "inline-end",
|
|
623
931
|
children: [showTrigger && /* @__PURE__ */ jsx(InputGroupButton, {
|
|
624
|
-
size: "icon-
|
|
932
|
+
size: "icon-sm",
|
|
625
933
|
variant: "ghost",
|
|
626
|
-
|
|
934
|
+
render: /* @__PURE__ */ jsx(ComboboxTrigger, {}),
|
|
627
935
|
"data-slot": "input-group-button",
|
|
628
936
|
className: "group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent",
|
|
629
|
-
disabled
|
|
630
|
-
children: /* @__PURE__ */ jsx(ComboboxTrigger, {})
|
|
937
|
+
disabled
|
|
631
938
|
}), showClear && /* @__PURE__ */ jsx(ComboboxClear, { disabled })]
|
|
632
939
|
}),
|
|
633
940
|
children
|
|
634
941
|
]
|
|
635
942
|
});
|
|
636
|
-
}
|
|
943
|
+
});
|
|
944
|
+
ComboboxInput.displayName = "ComboboxInput";
|
|
637
945
|
function ComboboxContent({ className, side = "bottom", sideOffset = 6, align = "start", alignOffset = 0, anchor, ...props }) {
|
|
638
946
|
return /* @__PURE__ */ jsx(Combobox$1.Portal, { children: /* @__PURE__ */ jsx(Combobox$1.Positioner, {
|
|
639
947
|
side,
|
|
@@ -645,7 +953,7 @@ function ComboboxContent({ className, side = "bottom", sideOffset = 6, align = "
|
|
|
645
953
|
children: /* @__PURE__ */ jsx(Combobox$1.Popup, {
|
|
646
954
|
"data-slot": "combobox-content",
|
|
647
955
|
"data-chips": !!anchor,
|
|
648
|
-
className: cn("bg-popover text-popover-foreground
|
|
956
|
+
className: cn("group/combobox-content relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) overflow-hidden rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[chips=true]:min-w-(--anchor-width) data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:border-input/30 *:data-[slot=input-group]:bg-input/30 *:data-[slot=input-group]:shadow-none 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
957
|
...props
|
|
650
958
|
})
|
|
651
959
|
}) });
|
|
@@ -653,19 +961,19 @@ function ComboboxContent({ className, side = "bottom", sideOffset = 6, align = "
|
|
|
653
961
|
function ComboboxList({ className, ...props }) {
|
|
654
962
|
return /* @__PURE__ */ jsx(Combobox$1.List, {
|
|
655
963
|
"data-slot": "combobox-list",
|
|
656
|
-
className: cn("max-h-[min(calc(--spacing(
|
|
964
|
+
className: cn("no-scrollbar max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto overscroll-contain p-1 outline-hidden data-empty:p-0", className),
|
|
657
965
|
...props
|
|
658
966
|
});
|
|
659
967
|
}
|
|
660
968
|
function ComboboxItem({ className, children, ...props }) {
|
|
661
969
|
return /* @__PURE__ */ jsxs(Combobox$1.Item, {
|
|
662
970
|
"data-slot": "combobox-item",
|
|
663
|
-
className: cn("
|
|
971
|
+
className: cn("relative flex w-full cursor-default items-center gap-2 rounded-md p-2 pr-8 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted: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", className),
|
|
664
972
|
...props,
|
|
665
973
|
children: [children, /* @__PURE__ */ jsx(Combobox$1.ItemIndicator, {
|
|
666
974
|
"data-slot": "combobox-item-indicator",
|
|
667
|
-
render: /* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center" }),
|
|
668
|
-
children: /* @__PURE__ */ jsx(CheckIcon, { className: "pointer-events-none
|
|
975
|
+
render: /* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center text-primary" }),
|
|
976
|
+
children: /* @__PURE__ */ jsx(CheckIcon, { className: "pointer-events-none" })
|
|
669
977
|
})]
|
|
670
978
|
});
|
|
671
979
|
}
|
|
@@ -679,7 +987,7 @@ function ComboboxGroup({ className, ...props }) {
|
|
|
679
987
|
function ComboboxLabel({ className, ...props }) {
|
|
680
988
|
return /* @__PURE__ */ jsx(Combobox$1.GroupLabel, {
|
|
681
989
|
"data-slot": "combobox-label",
|
|
682
|
-
className: cn("
|
|
990
|
+
className: cn("p-2 text-xs text-muted-foreground", className),
|
|
683
991
|
...props
|
|
684
992
|
});
|
|
685
993
|
}
|
|
@@ -692,14 +1000,14 @@ function ComboboxCollection({ ...props }) {
|
|
|
692
1000
|
function ComboboxEmpty({ className, ...props }) {
|
|
693
1001
|
return /* @__PURE__ */ jsx(Combobox$1.Empty, {
|
|
694
1002
|
"data-slot": "combobox-empty",
|
|
695
|
-
className: cn("
|
|
1003
|
+
className: cn("hidden w-full justify-center py-2 text-center text-sm text-muted-foreground group-data-empty/combobox-content:flex", className),
|
|
696
1004
|
...props
|
|
697
1005
|
});
|
|
698
1006
|
}
|
|
699
1007
|
function ComboboxSeparator({ className, ...props }) {
|
|
700
1008
|
return /* @__PURE__ */ jsx(Combobox$1.Separator, {
|
|
701
1009
|
"data-slot": "combobox-separator",
|
|
702
|
-
className: cn("
|
|
1010
|
+
className: cn("-mx-1 my-1 h-px bg-border", className),
|
|
703
1011
|
...props
|
|
704
1012
|
});
|
|
705
1013
|
}
|
|
@@ -707,7 +1015,7 @@ const ComboboxChips = React$1.forwardRef(({ className, ...props }, ref) => {
|
|
|
707
1015
|
return /* @__PURE__ */ jsx(Combobox$1.Chips, {
|
|
708
1016
|
ref,
|
|
709
1017
|
"data-slot": "combobox-chips",
|
|
710
|
-
className: cn("
|
|
1018
|
+
className: cn("flex min-h-10 flex-wrap items-center gap-1 rounded-md border border-input bg-transparent bg-clip-padding py-2 pl-3 pr-2 text-sm transition-colors focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50 has-aria-invalid:border-destructive has-aria-invalid:ring-3 has-aria-invalid:ring-destructive/20 dark:bg-input/30 dark:has-aria-invalid:border-destructive/50 dark:has-aria-invalid:ring-destructive/40", className),
|
|
711
1019
|
...props
|
|
712
1020
|
});
|
|
713
1021
|
});
|
|
@@ -715,13 +1023,12 @@ ComboboxChips.displayName = "ComboboxChips";
|
|
|
715
1023
|
function ComboboxChip({ className, children, showRemove = true, ...props }) {
|
|
716
1024
|
return /* @__PURE__ */ jsxs(Combobox$1.Chip, {
|
|
717
1025
|
"data-slot": "combobox-chip",
|
|
718
|
-
className: cn("
|
|
1026
|
+
className: cn("flex h-6 w-fit items-center justify-center gap-1 rounded-md bg-muted px-1.5 text-xs font-medium whitespace-nowrap text-foreground has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50 has-data-[slot=combobox-chip-remove]:pr-0", className),
|
|
719
1027
|
...props,
|
|
720
1028
|
children: [children, showRemove && /* @__PURE__ */ jsx(Combobox$1.ChipRemove, {
|
|
721
|
-
"aria-label": "Remove item",
|
|
722
1029
|
render: /* @__PURE__ */ jsx(Button, {
|
|
723
1030
|
variant: "ghost",
|
|
724
|
-
size: "icon-
|
|
1031
|
+
size: "icon-sm"
|
|
725
1032
|
}),
|
|
726
1033
|
className: "-ml-1 opacity-50 hover:opacity-100",
|
|
727
1034
|
"data-slot": "combobox-chip-remove",
|
|
@@ -743,78 +1050,84 @@ function useComboboxAnchor() {
|
|
|
743
1050
|
//#endregion
|
|
744
1051
|
//#region src/components/dialog.tsx
|
|
745
1052
|
function Dialog({ ...props }) {
|
|
746
|
-
return /* @__PURE__ */ jsx(
|
|
1053
|
+
return /* @__PURE__ */ jsx(Dialog$1.Root, {
|
|
747
1054
|
"data-slot": "dialog",
|
|
748
1055
|
...props
|
|
749
1056
|
});
|
|
750
1057
|
}
|
|
751
1058
|
function DialogTrigger({ ...props }) {
|
|
752
|
-
return /* @__PURE__ */ jsx(
|
|
1059
|
+
return /* @__PURE__ */ jsx(Dialog$1.Trigger, {
|
|
753
1060
|
"data-slot": "dialog-trigger",
|
|
754
1061
|
...props
|
|
755
1062
|
});
|
|
756
1063
|
}
|
|
757
1064
|
function DialogPortal({ ...props }) {
|
|
758
|
-
return /* @__PURE__ */ jsx(
|
|
1065
|
+
return /* @__PURE__ */ jsx(Dialog$1.Portal, {
|
|
759
1066
|
"data-slot": "dialog-portal",
|
|
760
1067
|
...props
|
|
761
1068
|
});
|
|
762
1069
|
}
|
|
763
1070
|
function DialogClose({ ...props }) {
|
|
764
|
-
return /* @__PURE__ */ jsx(
|
|
1071
|
+
return /* @__PURE__ */ jsx(Dialog$1.Close, {
|
|
765
1072
|
"data-slot": "dialog-close",
|
|
766
1073
|
...props
|
|
767
1074
|
});
|
|
768
1075
|
}
|
|
769
1076
|
function DialogOverlay({ className, ...props }) {
|
|
770
|
-
return /* @__PURE__ */ jsx(
|
|
1077
|
+
return /* @__PURE__ */ jsx(Dialog$1.Backdrop, {
|
|
771
1078
|
"data-slot": "dialog-overlay",
|
|
772
|
-
className: cn("data-
|
|
1079
|
+
className: cn("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0", className),
|
|
773
1080
|
...props
|
|
774
1081
|
});
|
|
775
1082
|
}
|
|
776
|
-
function DialogContent({ className, children, ...props }) {
|
|
777
|
-
return /* @__PURE__ */ jsxs(DialogPortal, {
|
|
778
|
-
"data-slot": "dialog-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
1083
|
+
function DialogContent({ className, children, showCloseButton = true, ...props }) {
|
|
1084
|
+
return /* @__PURE__ */ jsxs(DialogPortal, { children: [/* @__PURE__ */ jsx(DialogOverlay, {}), /* @__PURE__ */ jsxs(Dialog$1.Popup, {
|
|
1085
|
+
"data-slot": "dialog-content",
|
|
1086
|
+
className: cn("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl ring-1 ring-foreground/10 bg-background px-6 py-4 text-sm 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", className),
|
|
1087
|
+
...props,
|
|
1088
|
+
children: [children, showCloseButton && /* @__PURE__ */ jsxs(Dialog$1.Close, {
|
|
1089
|
+
"data-slot": "dialog-close",
|
|
1090
|
+
render: /* @__PURE__ */ jsx(Button, {
|
|
1091
|
+
variant: "ghost",
|
|
1092
|
+
className: "absolute top-3 right-4",
|
|
1093
|
+
size: "icon-sm"
|
|
1094
|
+
}),
|
|
1095
|
+
children: [/* @__PURE__ */ jsx(XIcon, {}), /* @__PURE__ */ jsx("span", {
|
|
1096
|
+
className: "sr-only",
|
|
1097
|
+
children: "Close"
|
|
789
1098
|
})]
|
|
790
1099
|
})]
|
|
791
|
-
});
|
|
1100
|
+
})] });
|
|
792
1101
|
}
|
|
793
1102
|
function DialogHeader({ className, ...props }) {
|
|
794
1103
|
return /* @__PURE__ */ jsx("div", {
|
|
795
1104
|
"data-slot": "dialog-header",
|
|
796
|
-
className: cn("flex flex-col gap-2
|
|
1105
|
+
className: cn("flex flex-col gap-2", className),
|
|
797
1106
|
...props
|
|
798
1107
|
});
|
|
799
1108
|
}
|
|
800
|
-
function DialogFooter({ className, ...props }) {
|
|
801
|
-
return /* @__PURE__ */
|
|
1109
|
+
function DialogFooter({ className, showCloseButton = false, children, ...props }) {
|
|
1110
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
802
1111
|
"data-slot": "dialog-footer",
|
|
803
1112
|
className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
|
|
804
|
-
...props
|
|
1113
|
+
...props,
|
|
1114
|
+
children: [children, showCloseButton && /* @__PURE__ */ jsx(Dialog$1.Close, {
|
|
1115
|
+
render: /* @__PURE__ */ jsx(Button, { variant: "outline" }),
|
|
1116
|
+
children: "Close"
|
|
1117
|
+
})]
|
|
805
1118
|
});
|
|
806
1119
|
}
|
|
807
1120
|
function DialogTitle({ className, ...props }) {
|
|
808
|
-
return /* @__PURE__ */ jsx(
|
|
1121
|
+
return /* @__PURE__ */ jsx(Dialog$1.Title, {
|
|
809
1122
|
"data-slot": "dialog-title",
|
|
810
|
-
className: cn("text-lg
|
|
1123
|
+
className: cn("text-lg font-bold leading-normal", className),
|
|
811
1124
|
...props
|
|
812
1125
|
});
|
|
813
1126
|
}
|
|
814
1127
|
function DialogDescription({ className, ...props }) {
|
|
815
|
-
return /* @__PURE__ */ jsx(
|
|
1128
|
+
return /* @__PURE__ */ jsx(Dialog$1.Description, {
|
|
816
1129
|
"data-slot": "dialog-description",
|
|
817
|
-
className: cn("text-muted-foreground text-
|
|
1130
|
+
className: cn("text-sm leading-normal text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", className),
|
|
818
1131
|
...props
|
|
819
1132
|
});
|
|
820
1133
|
}
|
|
@@ -925,197 +1238,533 @@ function capitalizeFirstLetter(val) {
|
|
|
925
1238
|
}
|
|
926
1239
|
|
|
927
1240
|
//#endregion
|
|
928
|
-
//#region src/components/
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
1241
|
+
//#region src/components/table.tsx
|
|
1242
|
+
const Table = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", {
|
|
1243
|
+
"data-slot": "table-container",
|
|
1244
|
+
className: "relative w-full overflow-x-auto",
|
|
1245
|
+
children: /* @__PURE__ */ jsx("table", {
|
|
1246
|
+
ref,
|
|
1247
|
+
"data-slot": "table",
|
|
1248
|
+
className: cn("w-full caption-bottom text-sm", className),
|
|
932
1249
|
...props
|
|
1250
|
+
})
|
|
1251
|
+
}));
|
|
1252
|
+
Table.displayName = "Table";
|
|
1253
|
+
const TableHeader = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("thead", {
|
|
1254
|
+
ref,
|
|
1255
|
+
"data-slot": "table-header",
|
|
1256
|
+
className: cn("[&_tr]:border-b", className),
|
|
1257
|
+
...props
|
|
1258
|
+
}));
|
|
1259
|
+
TableHeader.displayName = "TableHeader";
|
|
1260
|
+
const TableBody = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("tbody", {
|
|
1261
|
+
ref,
|
|
1262
|
+
"data-slot": "table-body",
|
|
1263
|
+
className: cn("[&_tr:last-child]:border-0", className),
|
|
1264
|
+
...props
|
|
1265
|
+
}));
|
|
1266
|
+
TableBody.displayName = "TableBody";
|
|
1267
|
+
const TableFooter = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("tfoot", {
|
|
1268
|
+
ref,
|
|
1269
|
+
"data-slot": "table-footer",
|
|
1270
|
+
className: cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", className),
|
|
1271
|
+
...props
|
|
1272
|
+
}));
|
|
1273
|
+
TableFooter.displayName = "TableFooter";
|
|
1274
|
+
const TableRow = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("tr", {
|
|
1275
|
+
ref,
|
|
1276
|
+
"data-slot": "table-row",
|
|
1277
|
+
className: cn("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted", className),
|
|
1278
|
+
...props
|
|
1279
|
+
}));
|
|
1280
|
+
TableRow.displayName = "TableRow";
|
|
1281
|
+
const TableHead = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("th", {
|
|
1282
|
+
ref,
|
|
1283
|
+
"data-slot": "table-head",
|
|
1284
|
+
className: cn("h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0", className),
|
|
1285
|
+
...props
|
|
1286
|
+
}));
|
|
1287
|
+
TableHead.displayName = "TableHead";
|
|
1288
|
+
const TableCell = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("td", {
|
|
1289
|
+
ref,
|
|
1290
|
+
"data-slot": "table-cell",
|
|
1291
|
+
className: cn("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0", className),
|
|
1292
|
+
...props
|
|
1293
|
+
}));
|
|
1294
|
+
TableCell.displayName = "TableCell";
|
|
1295
|
+
const TableCaption = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("caption", {
|
|
1296
|
+
ref,
|
|
1297
|
+
"data-slot": "table-caption",
|
|
1298
|
+
className: cn("mt-4 text-sm text-muted-foreground", className),
|
|
1299
|
+
...props
|
|
1300
|
+
}));
|
|
1301
|
+
TableCaption.displayName = "TableCaption";
|
|
1302
|
+
|
|
1303
|
+
//#endregion
|
|
1304
|
+
//#region src/components/data-table.tsx
|
|
1305
|
+
function DataTable({ columns, data, tableOptions, noResultsMessage = "No results." }) {
|
|
1306
|
+
const table = useReactTable({
|
|
1307
|
+
data,
|
|
1308
|
+
columns,
|
|
1309
|
+
getCoreRowModel: getCoreRowModel(),
|
|
1310
|
+
...tableOptions
|
|
1311
|
+
});
|
|
1312
|
+
return /* @__PURE__ */ jsxs(Table, { children: [/* @__PURE__ */ jsx(TableHeader, { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx(TableRow, { children: headerGroup.headers.map((header) => /* @__PURE__ */ jsx(TableHead, { children: header.isPlaceholder ? null : flexRender(header.column.columnDef.header, header.getContext()) }, header.id)) }, headerGroup.id)) }), /* @__PURE__ */ jsx(TableBody, { children: table.getRowModel().rows.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ jsx(TableRow, {
|
|
1313
|
+
"data-state": row.getIsSelected() && "selected",
|
|
1314
|
+
children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx(TableCell, { children: flexRender(cell.column.columnDef.cell, cell.getContext()) }, cell.id))
|
|
1315
|
+
}, row.id)) : /* @__PURE__ */ jsx(TableRow, { children: /* @__PURE__ */ jsx(TableCell, {
|
|
1316
|
+
colSpan: columns.length,
|
|
1317
|
+
className: "h-24 text-center",
|
|
1318
|
+
children: noResultsMessage
|
|
1319
|
+
}) }) })] });
|
|
1320
|
+
}
|
|
1321
|
+
|
|
1322
|
+
//#endregion
|
|
1323
|
+
//#region src/components/scroll-area.tsx
|
|
1324
|
+
function ScrollArea({ className, children, scrollFade = false, scrollbarGutter = false, ...props }) {
|
|
1325
|
+
return /* @__PURE__ */ jsxs(ScrollAreaPrimitive.Root, {
|
|
1326
|
+
className: cn("size-full min-h-0", className),
|
|
1327
|
+
...props,
|
|
1328
|
+
children: [
|
|
1329
|
+
/* @__PURE__ */ jsx(ScrollAreaPrimitive.Viewport, {
|
|
1330
|
+
className: cn("h-full rounded-[inherit] outline-none transition-shadows focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background data-has-overflow-y:overscroll-y-contain data-has-overflow-x:overscroll-x-contain", scrollFade && "mask-t-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-y-start)))] mask-b-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-y-end)))] mask-l-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-x-start)))] mask-r-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-x-end)))] [--fade-size:1.5rem]", scrollbarGutter && "data-has-overflow-y:pe-2.5 data-has-overflow-x:pb-2.5"),
|
|
1331
|
+
"data-slot": "scroll-area-viewport",
|
|
1332
|
+
children
|
|
1333
|
+
}),
|
|
1334
|
+
/* @__PURE__ */ jsx(ScrollBar, { orientation: "vertical" }),
|
|
1335
|
+
/* @__PURE__ */ jsx(ScrollBar, { orientation: "horizontal" }),
|
|
1336
|
+
/* @__PURE__ */ jsx(ScrollAreaPrimitive.Corner, { "data-slot": "scroll-area-corner" })
|
|
1337
|
+
]
|
|
1338
|
+
});
|
|
1339
|
+
}
|
|
1340
|
+
function ScrollBar({ className, orientation = "vertical", ...props }) {
|
|
1341
|
+
return /* @__PURE__ */ jsx(ScrollAreaPrimitive.Scrollbar, {
|
|
1342
|
+
className: cn("m-1 flex opacity-0 transition-opacity delay-300 data-[orientation=horizontal]:h-1.5 data-[orientation=vertical]:w-1.5 data-[orientation=horizontal]:flex-col data-hovering:opacity-100 data-scrolling:opacity-100 data-hovering:delay-0 data-scrolling:delay-0 data-hovering:duration-100 data-scrolling:duration-100", className),
|
|
1343
|
+
"data-slot": "scroll-area-scrollbar",
|
|
1344
|
+
orientation,
|
|
1345
|
+
...props,
|
|
1346
|
+
children: /* @__PURE__ */ jsx(ScrollAreaPrimitive.Thumb, {
|
|
1347
|
+
className: "relative flex-1 rounded-full bg-foreground/20",
|
|
1348
|
+
"data-slot": "scroll-area-thumb"
|
|
1349
|
+
})
|
|
1350
|
+
});
|
|
1351
|
+
}
|
|
1352
|
+
|
|
1353
|
+
//#endregion
|
|
1354
|
+
//#region src/components/drawer.tsx
|
|
1355
|
+
const DrawerContext = createContext({ position: "bottom" });
|
|
1356
|
+
const directionMap = {
|
|
1357
|
+
bottom: "down",
|
|
1358
|
+
left: "left",
|
|
1359
|
+
right: "right",
|
|
1360
|
+
top: "up"
|
|
1361
|
+
};
|
|
1362
|
+
const DrawerCreateHandle = DrawerPrimitive.createHandle;
|
|
1363
|
+
function Drawer({ swipeDirection, position = "bottom", ...props }) {
|
|
1364
|
+
return /* @__PURE__ */ jsx(DrawerContext.Provider, {
|
|
1365
|
+
value: { position },
|
|
1366
|
+
children: /* @__PURE__ */ jsx(DrawerPrimitive.Root, {
|
|
1367
|
+
swipeDirection: swipeDirection ?? directionMap[position],
|
|
1368
|
+
...props
|
|
1369
|
+
})
|
|
933
1370
|
});
|
|
934
1371
|
}
|
|
935
|
-
|
|
936
|
-
|
|
1372
|
+
const DrawerPortal = DrawerPrimitive.Portal;
|
|
1373
|
+
function DrawerTrigger(props) {
|
|
1374
|
+
return /* @__PURE__ */ jsx(DrawerPrimitive.Trigger, {
|
|
937
1375
|
"data-slot": "drawer-trigger",
|
|
938
1376
|
...props
|
|
939
1377
|
});
|
|
940
1378
|
}
|
|
941
|
-
function
|
|
942
|
-
return /* @__PURE__ */ jsx(
|
|
943
|
-
"data-slot": "drawer-
|
|
1379
|
+
function DrawerClose(props) {
|
|
1380
|
+
return /* @__PURE__ */ jsx(DrawerPrimitive.Close, {
|
|
1381
|
+
"data-slot": "drawer-close",
|
|
944
1382
|
...props
|
|
945
1383
|
});
|
|
946
1384
|
}
|
|
947
|
-
function
|
|
948
|
-
|
|
949
|
-
|
|
1385
|
+
function DrawerSwipeArea({ className, position: positionProp, ...props }) {
|
|
1386
|
+
const { position: contextPosition } = useContext(DrawerContext);
|
|
1387
|
+
const position = positionProp ?? contextPosition;
|
|
1388
|
+
return /* @__PURE__ */ jsx(DrawerPrimitive.SwipeArea, {
|
|
1389
|
+
className: cn("fixed z-50 touch-none", position === "bottom" && "inset-x-0 bottom-0 h-8", position === "top" && "inset-x-0 top-0 h-8", position === "left" && "inset-y-0 left-0 w-8", position === "right" && "inset-y-0 right-0 w-8", className),
|
|
1390
|
+
"data-slot": "drawer-swipe-area",
|
|
950
1391
|
...props
|
|
951
1392
|
});
|
|
952
1393
|
}
|
|
953
|
-
|
|
954
|
-
return /* @__PURE__ */ jsx(
|
|
955
|
-
"data-
|
|
956
|
-
|
|
957
|
-
...props
|
|
958
|
-
ref: forwardedRef
|
|
1394
|
+
function DrawerBackdrop({ className, inContainer, ...props }) {
|
|
1395
|
+
return /* @__PURE__ */ jsx(DrawerPrimitive.Backdrop, {
|
|
1396
|
+
className: cn("inset-0 z-50 bg-black/10 opacity-[calc(1-var(--drawer-swipe-progress))] backdrop-blur-sm transition-opacity duration-450 ease-[cubic-bezier(0.32,0.72,0,1)] data-ending-style:opacity-0 data-starting-style:opacity-0 data-ending-style:duration-[calc(var(--drawer-swipe-strength)*400ms)] data-swiping:duration-0 supports-[-webkit-touch-callout:none]:absolute", inContainer ? "absolute" : "fixed", className),
|
|
1397
|
+
"data-slot": "drawer-backdrop",
|
|
1398
|
+
...props
|
|
959
1399
|
});
|
|
960
|
-
}
|
|
961
|
-
function
|
|
1400
|
+
}
|
|
1401
|
+
function DrawerViewport({ className, position, variant = "default", inContainer, ...props }) {
|
|
1402
|
+
return /* @__PURE__ */ jsx(DrawerPrimitive.Viewport, {
|
|
1403
|
+
className: cn("inset-0 z-50 [--bleed:--spacing(12)] [--inset:--spacing(0)]", inContainer ? "absolute" : "fixed", "touch-none", position === "bottom" && "grid grid-rows-[1fr_auto] pt-12", position === "top" && "grid grid-rows-[auto_1fr] pb-12", position === "left" && "flex justify-start", position === "right" && "flex justify-end", variant === "inset" && "px-(--inset) sm:[--inset:--spacing(4)]", variant === "inset" && position !== "bottom" && "pt-(--inset)", variant === "inset" && position !== "top" && "pb-(--inset)", className),
|
|
1404
|
+
"data-slot": "drawer-viewport",
|
|
1405
|
+
...props
|
|
1406
|
+
});
|
|
1407
|
+
}
|
|
1408
|
+
function DrawerPopup({ className, children, showCloseButton = false, position: positionProp, variant = "default", showBar = false, container, ...props }) {
|
|
1409
|
+
const { position: contextPosition } = useContext(DrawerContext);
|
|
1410
|
+
const position = positionProp ?? contextPosition;
|
|
1411
|
+
const inContainer = !!container;
|
|
962
1412
|
return /* @__PURE__ */ jsxs(DrawerPortal, {
|
|
963
|
-
"data-slot": "drawer-portal",
|
|
964
1413
|
container,
|
|
965
|
-
children: [/* @__PURE__ */ jsx(
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
children:
|
|
1414
|
+
children: [/* @__PURE__ */ jsx(DrawerBackdrop, { inContainer }), /* @__PURE__ */ jsx(DrawerViewport, {
|
|
1415
|
+
position,
|
|
1416
|
+
variant,
|
|
1417
|
+
inContainer,
|
|
1418
|
+
children: /* @__PURE__ */ jsxs(DrawerPrimitive.Popup, {
|
|
1419
|
+
className: cn("relative flex max-h-full min-h-0 w-full min-w-0 flex-col bg-popover not-dark:bg-clip-padding text-popover-foreground shadow-lg/5 outline-none transition-[transform,box-shadow,height,background-color] duration-450 ease-[cubic-bezier(0.32,0.72,0,1)] will-change-transform [--peek:calc(--spacing(6)-1px)] [--scale-base:calc(max(0,1-(var(--nested-drawers)*var(--stack-step))))] [--scale:clamp(0,calc(var(--scale-base)+(var(--stack-step)*var(--stack-progress))),1)] [--shrink:calc(1-var(--scale))] [--stack-peek-offset:max(0px,calc((var(--nested-drawers)-var(--stack-progress))*var(--peek)))] [--stack-progress:clamp(0,var(--drawer-swipe-progress),1)] [--stack-step:0.05] before:pointer-events-none before:absolute before:inset-0 before:shadow-[0_1px_--theme(--color-black/4%)] after:pointer-events-none after:absolute after:bg-popover data-swiping:select-none data-nested-drawer-open:overflow-hidden data-nested-drawer-open:bg-[color-mix(in_srgb,var(--popover),var(--color-black)_calc(2%*(var(--nested-drawers)-var(--stack-progress))))] data-ending-style:shadow-transparent data-starting-style:shadow-transparent data-ending-style:duration-[calc(var(--drawer-swipe-strength)*400ms)] dark:data-nested-drawer-open:bg-[color-mix(in_srgb,var(--popover),var(--color-black)_calc(6%*(var(--nested-drawers)-var(--stack-progress))))] dark:before:shadow-[0_-1px_--theme(--color-white/6%)]", "touch-none", position === "bottom" && "transform-[translateY(calc(var(--drawer-snap-point-offset)+var(--drawer-swipe-movement-y)))] data-ending-style:transform-[translateY(calc(100%+env(safe-area-inset-bottom,0px)+var(--inset)))] data-starting-style:transform-[translateY(calc(100%+env(safe-area-inset-bottom,0px)+var(--inset)))] row-start-2 -mb-[max(0px,calc(var(--drawer-snap-point-offset,0px)+clamp(0,1,var(--drawer-snap-point-offset,0px)/1px)*var(--drawer-swipe-movement-y,0px)))] border-t pb-[max(0px,calc(env(safe-area-inset-bottom,0px)+var(--drawer-snap-point-offset,0px)+clamp(0,1,var(--drawer-snap-point-offset,0px)/1px)*var(--drawer-swipe-movement-y,0px)))] not-data-starting-style:not-data-ending-style:transition-[transform,box-shadow,height,background-color,margin,padding] after:inset-x-0 after:top-full after:h-(--bleed) has-data-[slot=drawer-bar]:pt-2 data-ending-style:mb-0 data-starting-style:mb-0 data-ending-style:pb-0 data-starting-style:pb-0", position === "top" && "data-starting-style:transform-[translateY(calc(-100%-var(--inset)))] data-ending-style:transform-[translateY(calc(-100%-var(--inset)))] transform-[translateY(var(--drawer-swipe-movement-y))] border-b after:inset-x-0 after:bottom-full after:h-(--bleed) has-data-[slot=drawer-bar]:pb-2", position === "left" && "data-starting-style:transform-[translateX(calc(-100%-var(--inset)))] data-ending-style:transform-[translateX(calc(-100%-var(--inset)))] transform-[translateX(var(--drawer-swipe-movement-x))] w-[calc(100%-(--spacing(12)))] max-w-md border-e after:inset-y-0 after:end-full after:w-(--bleed) has-data-[slot=drawer-bar]:pe-2", position === "right" && "transform-[translateX(var(--drawer-swipe-movement-x))] data-ending-style:transform-[translateX(calc(100%+var(--inset)))] data-starting-style:transform-[translateX(calc(100%+var(--inset)))] col-start-2 w-[calc(100%-(--spacing(12)))] max-w-md border-s after:inset-y-0 after:start-full after:w-(--bleed) has-data-[slot=drawer-bar]:ps-2", variant !== "straight" && cn(position === "bottom" && "rounded-t-2xl", position === "top" && "rounded-b-2xl **:data-[slot=drawer-footer]:rounded-b-[calc(var(--radius-2xl)-1px)]", position === "left" && "rounded-e-2xl **:data-[slot=drawer-footer]:rounded-ee-[calc(var(--radius-2xl)-1px)]", position === "right" && "rounded-s-2xl **:data-[slot=drawer-footer]:rounded-es-[calc(var(--radius-2xl)-1px)]"), variant === "default" && cn(position === "bottom" && "before:rounded-t-[calc(var(--radius-2xl)-1px)]", position === "top" && "before:rounded-b-[calc(var(--radius-2xl)-1px)]", position === "left" && "before:rounded-e-[calc(var(--radius-2xl)-1px)]", position === "right" && "before:rounded-s-[calc(var(--radius-2xl)-1px)]"), variant === "inset" && "before:hidden sm:rounded-2xl sm:border sm:after:bg-transparent sm:before:rounded-[calc(var(--radius-2xl)-1px)] sm:**:data-[slot=drawer-footer]:rounded-b-[calc(var(--radius-2xl)-1px)]", variant === "straight" && "[--stack-step:0]", (position === "bottom" || position === "top") && "h-(--drawer-height,auto) [--height:max(0px,calc(var(--drawer-frontmost-height,var(--drawer-height))))] data-nested-drawer-open:h-(--height)", position === "bottom" && "data-nested-drawer-open:transform-[translateY(calc(var(--drawer-swipe-movement-y)-var(--stack-peek-offset)-(var(--shrink)*var(--height))))_scale(var(--scale))] origin-[50%_calc(100%-var(--inset))]", position === "top" && "data-nested-drawer-open:transform-[translateY(calc(var(--drawer-swipe-movement-y)+var(--stack-peek-offset)+(var(--shrink)*var(--height))))_scale(var(--scale))] origin-[50%_var(--inset)]", position === "left" && "data-nested-drawer-open:transform-[translateX(calc(var(--drawer-swipe-movement-x)+var(--stack-peek-offset)))_scale(var(--scale))] origin-right", position === "right" && "data-nested-drawer-open:transform-[translateX(calc(var(--drawer-swipe-movement-x)-var(--stack-peek-offset)))_scale(var(--scale))] origin-left", className),
|
|
1420
|
+
"data-slot": "drawer-popup",
|
|
1421
|
+
...props,
|
|
1422
|
+
children: [
|
|
1423
|
+
children,
|
|
1424
|
+
showCloseButton && /* @__PURE__ */ jsx(DrawerPrimitive.Close, {
|
|
1425
|
+
"aria-label": "Close",
|
|
1426
|
+
className: "absolute end-2 top-2",
|
|
1427
|
+
render: /* @__PURE__ */ jsx(Button, {
|
|
1428
|
+
size: "icon",
|
|
1429
|
+
variant: "ghost"
|
|
1430
|
+
}),
|
|
1431
|
+
children: /* @__PURE__ */ jsx(XIcon, {})
|
|
1432
|
+
}),
|
|
1433
|
+
showBar && /* @__PURE__ */ jsx(DrawerBar, {})
|
|
1434
|
+
]
|
|
1435
|
+
})
|
|
970
1436
|
})]
|
|
971
1437
|
});
|
|
972
1438
|
}
|
|
973
|
-
function DrawerHeader({ className, ...props }) {
|
|
974
|
-
return
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
1439
|
+
function DrawerHeader({ className, allowSelection = false, render, ...props }) {
|
|
1440
|
+
return useRender({
|
|
1441
|
+
defaultTagName: "div",
|
|
1442
|
+
props: mergeProps({
|
|
1443
|
+
className: cn("flex flex-col gap-2 p-6 in-[[data-slot=drawer-popup]:has([data-slot=drawer-panel])]:pb-3 max-sm:pb-4", !allowSelection && "cursor-default", className),
|
|
1444
|
+
"data-slot": "drawer-header"
|
|
1445
|
+
}, props),
|
|
1446
|
+
render: allowSelection ? /* @__PURE__ */ jsx(DrawerContent, { render }) : render
|
|
978
1447
|
});
|
|
979
1448
|
}
|
|
980
|
-
function DrawerFooter({ className, ...props }) {
|
|
981
|
-
return
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
1449
|
+
function DrawerFooter({ className, variant = "default", allowSelection = true, render, ...props }) {
|
|
1450
|
+
return useRender({
|
|
1451
|
+
defaultTagName: "div",
|
|
1452
|
+
props: mergeProps({
|
|
1453
|
+
className: cn("flex flex-col-reverse gap-2 px-6 pb-(--safe-area-inset-bottom,0px) sm:flex-row sm:justify-end", !allowSelection && "cursor-default", variant === "default" && "border-t bg-muted/72 pt-4 pb-[calc(env(safe-area-inset-bottom,0px)+--spacing(4))]", variant === "bare" && "in-[[data-slot=drawer-popup]:has([data-slot=drawer-panel])]:pt-3 pt-4 pb-[calc(env(safe-area-inset-bottom,0px)+--spacing(6))]", className),
|
|
1454
|
+
"data-slot": "drawer-footer"
|
|
1455
|
+
}, props),
|
|
1456
|
+
render: allowSelection ? /* @__PURE__ */ jsx(DrawerContent, { render }) : render
|
|
985
1457
|
});
|
|
986
1458
|
}
|
|
987
1459
|
function DrawerTitle({ className, ...props }) {
|
|
988
|
-
return /* @__PURE__ */ jsx(
|
|
1460
|
+
return /* @__PURE__ */ jsx(DrawerPrimitive.Title, {
|
|
1461
|
+
className: cn("font-heading font-semibold text-xl leading-none", className),
|
|
989
1462
|
"data-slot": "drawer-title",
|
|
990
|
-
className: cn("text-foreground font-semibold", className),
|
|
991
1463
|
...props
|
|
992
1464
|
});
|
|
993
1465
|
}
|
|
994
1466
|
function DrawerDescription({ className, ...props }) {
|
|
995
|
-
return /* @__PURE__ */ jsx(
|
|
996
|
-
"data-slot": "drawer-description",
|
|
1467
|
+
return /* @__PURE__ */ jsx(DrawerPrimitive.Description, {
|
|
997
1468
|
className: cn("text-muted-foreground text-sm", className),
|
|
1469
|
+
"data-slot": "drawer-description",
|
|
998
1470
|
...props
|
|
999
1471
|
});
|
|
1000
1472
|
}
|
|
1473
|
+
function DrawerPanel({ className, scrollFade = true, scrollable = true, allowSelection = true, render, ...props }) {
|
|
1474
|
+
const content = useRender({
|
|
1475
|
+
defaultTagName: "div",
|
|
1476
|
+
props: mergeProps({
|
|
1477
|
+
className: cn("p-6 in-[[data-slot=drawer-popup]:has([data-slot=drawer-header])]:pt-1 in-[[data-slot=drawer-popup]:has([data-slot=drawer-footer]:not(.border-t))]:pb-1", !allowSelection && "cursor-default", className),
|
|
1478
|
+
"data-slot": "drawer-panel"
|
|
1479
|
+
}, props),
|
|
1480
|
+
render: allowSelection ? /* @__PURE__ */ jsx(DrawerContent, { render }) : render
|
|
1481
|
+
});
|
|
1482
|
+
if (scrollable) return /* @__PURE__ */ jsx(ScrollArea, {
|
|
1483
|
+
className: "touch-auto",
|
|
1484
|
+
scrollFade,
|
|
1485
|
+
children: content
|
|
1486
|
+
});
|
|
1487
|
+
return content;
|
|
1488
|
+
}
|
|
1489
|
+
function DrawerBar({ className, position: positionProp, render, ...props }) {
|
|
1490
|
+
const { position: contextPosition } = useContext(DrawerContext);
|
|
1491
|
+
const position = positionProp ?? contextPosition;
|
|
1492
|
+
const horizontal = position === "left" || position === "right";
|
|
1493
|
+
return useRender({
|
|
1494
|
+
defaultTagName: "div",
|
|
1495
|
+
props: mergeProps({
|
|
1496
|
+
"aria-hidden": true,
|
|
1497
|
+
className: cn("absolute flex touch-none items-center justify-center p-3 before:rounded-full before:bg-input", horizontal ? "inset-y-0 before:h-12 before:w-1" : "inset-x-0 before:h-1 before:w-12", position === "top" && "bottom-0", position === "bottom" && "top-0", position === "left" && "right-0", position === "right" && "left-0", className),
|
|
1498
|
+
"data-slot": "drawer-bar"
|
|
1499
|
+
}, props),
|
|
1500
|
+
render
|
|
1501
|
+
});
|
|
1502
|
+
}
|
|
1503
|
+
const DrawerContent = DrawerPrimitive.Content;
|
|
1504
|
+
function DrawerMenu({ className, render, ...props }) {
|
|
1505
|
+
return useRender({
|
|
1506
|
+
defaultTagName: "nav",
|
|
1507
|
+
props: mergeProps({
|
|
1508
|
+
className: cn("-m-2 flex flex-col", className),
|
|
1509
|
+
"data-slot": "drawer-menu"
|
|
1510
|
+
}, props),
|
|
1511
|
+
render
|
|
1512
|
+
});
|
|
1513
|
+
}
|
|
1514
|
+
function DrawerMenuItem({ className, variant = "default", render, disabled, ...props }) {
|
|
1515
|
+
return useRender({
|
|
1516
|
+
defaultTagName: "button",
|
|
1517
|
+
props: mergeProps({
|
|
1518
|
+
className: cn("flex min-h-9 w-full cursor-default select-none items-center gap-2 rounded-sm px-2 py-1 text-base text-foreground outline-none hover:bg-accent hover:text-accent-foreground disabled:pointer-events-none disabled:opacity-64 data-[variant=destructive]:text-destructive-foreground sm:min-h-8 sm:text-sm [&>svg:not([class*='opacity-'])]:opacity-80 [&>svg:not([class*='size-'])]:size-4.5 sm:[&>svg:not([class*='size-'])]:size-4 [&>svg]:pointer-events-none [&>svg]:-mx-0.5 [&>svg]:shrink-0", className),
|
|
1519
|
+
"data-slot": "drawer-menu-item",
|
|
1520
|
+
"data-variant": variant,
|
|
1521
|
+
disabled,
|
|
1522
|
+
type: "button"
|
|
1523
|
+
}, props),
|
|
1524
|
+
render
|
|
1525
|
+
});
|
|
1526
|
+
}
|
|
1527
|
+
function DrawerMenuSeparator({ className, render, ...props }) {
|
|
1528
|
+
return useRender({
|
|
1529
|
+
defaultTagName: "div",
|
|
1530
|
+
props: mergeProps({
|
|
1531
|
+
className: cn("mx-2 my-1 h-px bg-border", className),
|
|
1532
|
+
"data-slot": "drawer-menu-separator"
|
|
1533
|
+
}, props),
|
|
1534
|
+
render
|
|
1535
|
+
});
|
|
1536
|
+
}
|
|
1537
|
+
function DrawerMenuGroup({ className, render, ...props }) {
|
|
1538
|
+
return useRender({
|
|
1539
|
+
defaultTagName: "div",
|
|
1540
|
+
props: mergeProps({
|
|
1541
|
+
className: cn("flex flex-col", className),
|
|
1542
|
+
"data-slot": "drawer-menu-group"
|
|
1543
|
+
}, props),
|
|
1544
|
+
render
|
|
1545
|
+
});
|
|
1546
|
+
}
|
|
1547
|
+
function DrawerMenuGroupLabel({ className, render, ...props }) {
|
|
1548
|
+
return useRender({
|
|
1549
|
+
defaultTagName: "div",
|
|
1550
|
+
props: mergeProps({
|
|
1551
|
+
className: cn("px-2 py-1.5 font-medium text-muted-foreground text-xs", className),
|
|
1552
|
+
"data-slot": "drawer-menu-group-label"
|
|
1553
|
+
}, props),
|
|
1554
|
+
render
|
|
1555
|
+
});
|
|
1556
|
+
}
|
|
1557
|
+
function DrawerMenuTrigger({ className, children, ...props }) {
|
|
1558
|
+
return /* @__PURE__ */ jsxs(DrawerTrigger, {
|
|
1559
|
+
className: cn("flex min-h-9 w-full cursor-default select-none items-center gap-2 rounded-sm px-2 py-1 text-base text-foreground outline-none hover:bg-accent hover:text-accent-foreground sm:min-h-8 sm:text-sm [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0", className),
|
|
1560
|
+
"data-slot": "drawer-menu-trigger",
|
|
1561
|
+
...props,
|
|
1562
|
+
children: [children, /* @__PURE__ */ jsx(ChevronRightIcon, { className: "ms-auto -me-0.5 opacity-80" })]
|
|
1563
|
+
});
|
|
1564
|
+
}
|
|
1565
|
+
function DrawerMenuCheckboxItem({ className, children, checked, defaultChecked, onCheckedChange, variant = "default", disabled, render, ...props }) {
|
|
1566
|
+
return /* @__PURE__ */ jsx(Checkbox$1.Root, {
|
|
1567
|
+
checked,
|
|
1568
|
+
className: cn("grid min-h-9 w-full cursor-default select-none items-center gap-2 rounded-sm px-2 py-1 text-base text-foreground outline-none hover:bg-accent hover:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-64 sm:min-h-8 sm:text-sm [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:-mx-0.5 [&_svg]:shrink-0", variant === "switch" ? "grid-cols-[1fr_auto] gap-4 pe-1.5" : "grid-cols-[1rem_1fr] pe-4", className),
|
|
1569
|
+
"data-slot": "drawer-menu-checkbox-item",
|
|
1570
|
+
defaultChecked,
|
|
1571
|
+
disabled,
|
|
1572
|
+
onCheckedChange,
|
|
1573
|
+
render,
|
|
1574
|
+
...props,
|
|
1575
|
+
children: variant === "switch" ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
|
|
1576
|
+
className: "col-start-1",
|
|
1577
|
+
children
|
|
1578
|
+
}), /* @__PURE__ */ jsx(Checkbox$1.Indicator, {
|
|
1579
|
+
className: "inset-shadow-[0_1px_--theme(--color-black/4%)] col-start-2 inline-flex h-[calc(var(--thumb-size)+2px)] w-[calc(var(--thumb-size)*2-2px)] shrink-0 items-center rounded-full p-px outline-none transition-[background-color,box-shadow] duration-200 [--thumb-size:--spacing(4)] focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background data-checked:bg-primary data-unchecked:bg-input data-disabled:opacity-64 sm:[--thumb-size:--spacing(3)]",
|
|
1580
|
+
keepMounted: true,
|
|
1581
|
+
children: /* @__PURE__ */ jsx("span", { className: "pointer-events-none block aspect-square h-full in-[[data-slot=drawer-menu-checkbox-item][data-checked]]:origin-[var(--thumb-size)_50%] origin-left in-[[data-slot=drawer-menu-checkbox-item][data-checked]]:translate-x-[calc(var(--thumb-size)-4px)] in-[[data-slot=drawer-menu-checkbox-item]:active]:not-data-disabled:scale-x-110 in-[[data-slot=drawer-menu-checkbox-item]:active]:rounded-[var(--thumb-size)/calc(var(--thumb-size)*1.10)] rounded-(--thumb-size) bg-background shadow-sm/5 will-change-transform [transition:translate_.15s,border-radius_.15s,scale_.1s_.1s,transform-origin_.15s]" })
|
|
1582
|
+
})] }) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Checkbox$1.Indicator, {
|
|
1583
|
+
className: "col-start-1",
|
|
1584
|
+
children: /* @__PURE__ */ jsx("svg", {
|
|
1585
|
+
fill: "none",
|
|
1586
|
+
height: "24",
|
|
1587
|
+
stroke: "currentColor",
|
|
1588
|
+
strokeLinecap: "round",
|
|
1589
|
+
strokeLinejoin: "round",
|
|
1590
|
+
strokeWidth: "2",
|
|
1591
|
+
viewBox: "0 0 24 24",
|
|
1592
|
+
width: "24",
|
|
1593
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1594
|
+
children: /* @__PURE__ */ jsx("path", { d: "M5.252 12.7 10.2 18.63 18.748 5.37" })
|
|
1595
|
+
})
|
|
1596
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
1597
|
+
className: "col-start-2",
|
|
1598
|
+
children
|
|
1599
|
+
})] })
|
|
1600
|
+
});
|
|
1601
|
+
}
|
|
1602
|
+
function DrawerMenuRadioGroup({ className, ...props }) {
|
|
1603
|
+
return /* @__PURE__ */ jsx(RadioGroup$1, {
|
|
1604
|
+
className: cn("flex flex-col", className),
|
|
1605
|
+
"data-slot": "drawer-menu-radio-group",
|
|
1606
|
+
...props
|
|
1607
|
+
});
|
|
1608
|
+
}
|
|
1609
|
+
function DrawerMenuRadioItem({ className, children, value, disabled, render, ...props }) {
|
|
1610
|
+
return /* @__PURE__ */ jsxs(Radio.Root, {
|
|
1611
|
+
className: cn("grid min-h-9 w-full cursor-default select-none items-center gap-2 rounded-sm px-2 py-1 text-base text-foreground outline-none hover:bg-accent hover:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-64 sm:min-h-8 sm:text-sm [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:-mx-0.5 [&_svg]:shrink-0", "grid-cols-[1rem_1fr] items-center pe-4", className),
|
|
1612
|
+
"data-slot": "drawer-menu-radio-item",
|
|
1613
|
+
disabled,
|
|
1614
|
+
render,
|
|
1615
|
+
value,
|
|
1616
|
+
...props,
|
|
1617
|
+
children: [/* @__PURE__ */ jsx(Radio.Indicator, {
|
|
1618
|
+
className: "col-start-1",
|
|
1619
|
+
children: /* @__PURE__ */ jsx("svg", {
|
|
1620
|
+
fill: "none",
|
|
1621
|
+
height: "24",
|
|
1622
|
+
stroke: "currentColor",
|
|
1623
|
+
strokeLinecap: "round",
|
|
1624
|
+
strokeLinejoin: "round",
|
|
1625
|
+
strokeWidth: "2",
|
|
1626
|
+
viewBox: "0 0 24 24",
|
|
1627
|
+
width: "24",
|
|
1628
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1629
|
+
children: /* @__PURE__ */ jsx("path", { d: "M5.252 12.7 10.2 18.63 18.748 5.37" })
|
|
1630
|
+
})
|
|
1631
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
1632
|
+
className: "col-start-2",
|
|
1633
|
+
children
|
|
1634
|
+
})]
|
|
1635
|
+
});
|
|
1636
|
+
}
|
|
1001
1637
|
|
|
1002
1638
|
//#endregion
|
|
1003
1639
|
//#region src/components/dropdown-menu.tsx
|
|
1004
1640
|
function DropdownMenu({ ...props }) {
|
|
1005
|
-
return /* @__PURE__ */ jsx(
|
|
1641
|
+
return /* @__PURE__ */ jsx(Menu.Root, {
|
|
1006
1642
|
"data-slot": "dropdown-menu",
|
|
1007
1643
|
...props
|
|
1008
1644
|
});
|
|
1009
1645
|
}
|
|
1010
1646
|
function DropdownMenuPortal({ ...props }) {
|
|
1011
|
-
return /* @__PURE__ */ jsx(
|
|
1647
|
+
return /* @__PURE__ */ jsx(Menu.Portal, {
|
|
1012
1648
|
"data-slot": "dropdown-menu-portal",
|
|
1013
1649
|
...props
|
|
1014
1650
|
});
|
|
1015
1651
|
}
|
|
1016
1652
|
function DropdownMenuTrigger({ ...props }) {
|
|
1017
|
-
return /* @__PURE__ */ jsx(
|
|
1653
|
+
return /* @__PURE__ */ jsx(Menu.Trigger, {
|
|
1018
1654
|
"data-slot": "dropdown-menu-trigger",
|
|
1019
1655
|
...props
|
|
1020
1656
|
});
|
|
1021
1657
|
}
|
|
1022
|
-
function DropdownMenuContent({
|
|
1023
|
-
return /* @__PURE__ */ jsx(
|
|
1658
|
+
function DropdownMenuContent({ align = "start", alignOffset = 0, side = "bottom", sideOffset = 4, className, container, ...props }) {
|
|
1659
|
+
return /* @__PURE__ */ jsx(Menu.Portal, {
|
|
1024
1660
|
container,
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1661
|
+
children: /* @__PURE__ */ jsx(Menu.Positioner, {
|
|
1662
|
+
className: "isolate z-50 outline-none",
|
|
1663
|
+
align,
|
|
1664
|
+
alignOffset,
|
|
1665
|
+
side,
|
|
1028
1666
|
sideOffset,
|
|
1029
|
-
|
|
1030
|
-
|
|
1667
|
+
children: /* @__PURE__ */ jsx(Menu.Popup, {
|
|
1668
|
+
"data-slot": "dropdown-menu-content",
|
|
1669
|
+
className: cn("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--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 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95", className),
|
|
1670
|
+
...props
|
|
1671
|
+
})
|
|
1031
1672
|
})
|
|
1032
1673
|
});
|
|
1033
1674
|
}
|
|
1034
1675
|
function DropdownMenuGroup({ ...props }) {
|
|
1035
|
-
return /* @__PURE__ */ jsx(
|
|
1676
|
+
return /* @__PURE__ */ jsx(Menu.Group, {
|
|
1036
1677
|
"data-slot": "dropdown-menu-group",
|
|
1037
1678
|
...props
|
|
1038
1679
|
});
|
|
1039
1680
|
}
|
|
1681
|
+
function DropdownMenuLabel({ className, inset, ...props }) {
|
|
1682
|
+
return /* @__PURE__ */ jsx(Menu.GroupLabel, {
|
|
1683
|
+
"data-slot": "dropdown-menu-label",
|
|
1684
|
+
"data-inset": inset,
|
|
1685
|
+
className: cn("px-2 py-1.5 text-xs font-medium text-muted-foreground data-inset:pl-8", className),
|
|
1686
|
+
...props
|
|
1687
|
+
});
|
|
1688
|
+
}
|
|
1040
1689
|
function DropdownMenuItem({ className, inset, variant = "default", ...props }) {
|
|
1041
|
-
return /* @__PURE__ */ jsx(
|
|
1690
|
+
return /* @__PURE__ */ jsx(Menu.Item, {
|
|
1042
1691
|
"data-slot": "dropdown-menu-item",
|
|
1043
1692
|
"data-inset": inset,
|
|
1044
1693
|
"data-variant": variant,
|
|
1045
|
-
className: cn("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-
|
|
1694
|
+
className: cn("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", className),
|
|
1046
1695
|
...props
|
|
1047
1696
|
});
|
|
1048
1697
|
}
|
|
1049
|
-
function
|
|
1050
|
-
return /* @__PURE__ */
|
|
1051
|
-
"data-slot": "dropdown-menu-
|
|
1052
|
-
className: cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
1053
|
-
checked,
|
|
1054
|
-
...props,
|
|
1055
|
-
children: [/* @__PURE__ */ jsx("span", {
|
|
1056
|
-
className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",
|
|
1057
|
-
children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckOutline, { className: "size-4" }) })
|
|
1058
|
-
}), children]
|
|
1059
|
-
});
|
|
1060
|
-
}
|
|
1061
|
-
function DropdownMenuRadioGroup({ ...props }) {
|
|
1062
|
-
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.RadioGroup, {
|
|
1063
|
-
"data-slot": "dropdown-menu-radio-group",
|
|
1698
|
+
function DropdownMenuSub({ ...props }) {
|
|
1699
|
+
return /* @__PURE__ */ jsx(Menu.SubmenuRoot, {
|
|
1700
|
+
"data-slot": "dropdown-menu-sub",
|
|
1064
1701
|
...props
|
|
1065
1702
|
});
|
|
1066
1703
|
}
|
|
1067
|
-
function
|
|
1068
|
-
return /* @__PURE__ */ jsxs(
|
|
1069
|
-
"data-slot": "dropdown-menu-
|
|
1070
|
-
className: cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
1071
|
-
...props,
|
|
1072
|
-
children: [/* @__PURE__ */ jsx("span", {
|
|
1073
|
-
className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",
|
|
1074
|
-
children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx("div", { className: "size-2 rounded-full bg-current" }) })
|
|
1075
|
-
}), children]
|
|
1076
|
-
});
|
|
1077
|
-
}
|
|
1078
|
-
function DropdownMenuLabel({ className, inset, ...props }) {
|
|
1079
|
-
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Label, {
|
|
1080
|
-
"data-slot": "dropdown-menu-label",
|
|
1704
|
+
function DropdownMenuSubTrigger({ className, inset, children, ...props }) {
|
|
1705
|
+
return /* @__PURE__ */ jsxs(Menu.SubmenuTrigger, {
|
|
1706
|
+
"data-slot": "dropdown-menu-sub-trigger",
|
|
1081
1707
|
"data-inset": inset,
|
|
1082
|
-
className: cn("px-2 py-1.5 text-sm
|
|
1083
|
-
...props
|
|
1708
|
+
className: cn("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-popup-open:bg-accent data-popup-open:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
1709
|
+
...props,
|
|
1710
|
+
children: [children, /* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto" })]
|
|
1084
1711
|
});
|
|
1085
1712
|
}
|
|
1086
|
-
function
|
|
1087
|
-
return /* @__PURE__ */ jsx(
|
|
1088
|
-
"data-slot": "dropdown-menu-
|
|
1089
|
-
className: cn("bg-
|
|
1713
|
+
function DropdownMenuSubContent({ align = "start", alignOffset = -3, side = "right", sideOffset = 0, className, ...props }) {
|
|
1714
|
+
return /* @__PURE__ */ jsx(DropdownMenuContent, {
|
|
1715
|
+
"data-slot": "dropdown-menu-sub-content",
|
|
1716
|
+
className: cn("w-auto min-w-[96px] 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),
|
|
1717
|
+
align,
|
|
1718
|
+
alignOffset,
|
|
1719
|
+
side,
|
|
1720
|
+
sideOffset,
|
|
1090
1721
|
...props
|
|
1091
1722
|
});
|
|
1092
1723
|
}
|
|
1093
|
-
function
|
|
1094
|
-
return /* @__PURE__ */
|
|
1095
|
-
"data-slot": "dropdown-menu-
|
|
1096
|
-
|
|
1097
|
-
|
|
1724
|
+
function DropdownMenuCheckboxItem({ className, children, checked, inset, ...props }) {
|
|
1725
|
+
return /* @__PURE__ */ jsxs(Menu.CheckboxItem, {
|
|
1726
|
+
"data-slot": "dropdown-menu-checkbox-item",
|
|
1727
|
+
"data-inset": inset,
|
|
1728
|
+
className: cn("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", className),
|
|
1729
|
+
checked,
|
|
1730
|
+
...props,
|
|
1731
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
1732
|
+
className: "pointer-events-none absolute right-2 flex items-center justify-center",
|
|
1733
|
+
"data-slot": "dropdown-menu-checkbox-item-indicator",
|
|
1734
|
+
children: /* @__PURE__ */ jsx(Menu.CheckboxItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, {}) })
|
|
1735
|
+
}), children]
|
|
1098
1736
|
});
|
|
1099
1737
|
}
|
|
1100
|
-
function
|
|
1101
|
-
return /* @__PURE__ */ jsx(
|
|
1102
|
-
"data-slot": "dropdown-menu-
|
|
1738
|
+
function DropdownMenuRadioGroup({ ...props }) {
|
|
1739
|
+
return /* @__PURE__ */ jsx(Menu.RadioGroup, {
|
|
1740
|
+
"data-slot": "dropdown-menu-radio-group",
|
|
1103
1741
|
...props
|
|
1104
1742
|
});
|
|
1105
1743
|
}
|
|
1106
|
-
function
|
|
1107
|
-
return /* @__PURE__ */ jsxs(
|
|
1108
|
-
"data-slot": "dropdown-menu-
|
|
1744
|
+
function DropdownMenuRadioItem({ className, children, inset, ...props }) {
|
|
1745
|
+
return /* @__PURE__ */ jsxs(Menu.RadioItem, {
|
|
1746
|
+
"data-slot": "dropdown-menu-radio-item",
|
|
1109
1747
|
"data-inset": inset,
|
|
1110
|
-
className: cn("
|
|
1748
|
+
className: cn("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", className),
|
|
1111
1749
|
...props,
|
|
1112
|
-
children: [
|
|
1750
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
1751
|
+
className: "pointer-events-none absolute right-2 flex items-center justify-center",
|
|
1752
|
+
"data-slot": "dropdown-menu-radio-item-indicator",
|
|
1753
|
+
children: /* @__PURE__ */ jsx(Menu.RadioItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, {}) })
|
|
1754
|
+
}), children]
|
|
1113
1755
|
});
|
|
1114
1756
|
}
|
|
1115
|
-
function
|
|
1116
|
-
return /* @__PURE__ */ jsx(
|
|
1117
|
-
"data-slot": "dropdown-menu-
|
|
1118
|
-
className: cn("
|
|
1757
|
+
function DropdownMenuSeparator({ className, ...props }) {
|
|
1758
|
+
return /* @__PURE__ */ jsx(Menu.Separator, {
|
|
1759
|
+
"data-slot": "dropdown-menu-separator",
|
|
1760
|
+
className: cn("-mx-1 my-1 h-px bg-border", className),
|
|
1761
|
+
...props
|
|
1762
|
+
});
|
|
1763
|
+
}
|
|
1764
|
+
function DropdownMenuShortcut({ className, ...props }) {
|
|
1765
|
+
return /* @__PURE__ */ jsx("span", {
|
|
1766
|
+
"data-slot": "dropdown-menu-shortcut",
|
|
1767
|
+
className: cn("ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground", className),
|
|
1119
1768
|
...props
|
|
1120
1769
|
});
|
|
1121
1770
|
}
|
|
@@ -1123,29 +1772,51 @@ function DropdownMenuSubContent({ className, ...props }) {
|
|
|
1123
1772
|
//#endregion
|
|
1124
1773
|
//#region src/components/popover.tsx
|
|
1125
1774
|
function Popover({ ...props }) {
|
|
1126
|
-
return /* @__PURE__ */ jsx(
|
|
1775
|
+
return /* @__PURE__ */ jsx(Popover$1.Root, {
|
|
1127
1776
|
"data-slot": "popover",
|
|
1128
1777
|
...props
|
|
1129
1778
|
});
|
|
1130
1779
|
}
|
|
1131
|
-
|
|
1132
|
-
return /* @__PURE__ */ jsx(
|
|
1780
|
+
const PopoverTrigger = React$1.forwardRef((props, ref) => {
|
|
1781
|
+
return /* @__PURE__ */ jsx(Popover$1.Trigger, {
|
|
1133
1782
|
"data-slot": "popover-trigger",
|
|
1783
|
+
ref,
|
|
1134
1784
|
...props
|
|
1135
1785
|
});
|
|
1136
|
-
}
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1786
|
+
});
|
|
1787
|
+
PopoverTrigger.displayName = "PopoverTrigger";
|
|
1788
|
+
function PopoverContent({ className, align = "center", alignOffset = 0, side = "bottom", sideOffset = 4, ...props }) {
|
|
1789
|
+
return /* @__PURE__ */ jsx(Popover$1.Portal, { children: /* @__PURE__ */ jsx(Popover$1.Positioner, {
|
|
1140
1790
|
align,
|
|
1791
|
+
alignOffset,
|
|
1792
|
+
side,
|
|
1141
1793
|
sideOffset,
|
|
1142
|
-
className:
|
|
1143
|
-
|
|
1794
|
+
className: "isolate z-50",
|
|
1795
|
+
children: /* @__PURE__ */ jsx(Popover$1.Popup, {
|
|
1796
|
+
"data-slot": "popover-content",
|
|
1797
|
+
className: cn("z-50 flex w-72 origin-(--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=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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),
|
|
1798
|
+
...props
|
|
1799
|
+
})
|
|
1144
1800
|
}) });
|
|
1145
1801
|
}
|
|
1146
|
-
function
|
|
1147
|
-
return /* @__PURE__ */ jsx(
|
|
1148
|
-
"data-slot": "popover-
|
|
1802
|
+
function PopoverHeader({ className, ...props }) {
|
|
1803
|
+
return /* @__PURE__ */ jsx("div", {
|
|
1804
|
+
"data-slot": "popover-header",
|
|
1805
|
+
className: cn("flex flex-col gap-0.5 text-sm", className),
|
|
1806
|
+
...props
|
|
1807
|
+
});
|
|
1808
|
+
}
|
|
1809
|
+
function PopoverTitle({ className, ...props }) {
|
|
1810
|
+
return /* @__PURE__ */ jsx(Popover$1.Title, {
|
|
1811
|
+
"data-slot": "popover-title",
|
|
1812
|
+
className: cn("font-bold", className),
|
|
1813
|
+
...props
|
|
1814
|
+
});
|
|
1815
|
+
}
|
|
1816
|
+
function PopoverDescription({ className, ...props }) {
|
|
1817
|
+
return /* @__PURE__ */ jsx(Popover$1.Description, {
|
|
1818
|
+
"data-slot": "popover-description",
|
|
1819
|
+
className: cn("text-muted-foreground", className),
|
|
1149
1820
|
...props
|
|
1150
1821
|
});
|
|
1151
1822
|
}
|
|
@@ -1163,25 +1834,6 @@ function ThemeProvider({ children, ...props }) {
|
|
|
1163
1834
|
});
|
|
1164
1835
|
}
|
|
1165
1836
|
|
|
1166
|
-
//#endregion
|
|
1167
|
-
//#region src/components/tooltip.tsx
|
|
1168
|
-
const TooltipProvider = TooltipPrimitive.Provider;
|
|
1169
|
-
const Tooltip = TooltipPrimitive.Root;
|
|
1170
|
-
const TooltipTrigger = TooltipPrimitive.Trigger;
|
|
1171
|
-
const TooltipContent = React$1.forwardRef(({ className, sideOffset = 4, collisionPadding = 4, container, forceMount, ...props }, ref) => /* @__PURE__ */ jsx(TooltipPrimitive.Portal, {
|
|
1172
|
-
container,
|
|
1173
|
-
forceMount,
|
|
1174
|
-
children: /* @__PURE__ */ jsx(TooltipPrimitive.Content, {
|
|
1175
|
-
ref,
|
|
1176
|
-
sideOffset,
|
|
1177
|
-
collisionPadding,
|
|
1178
|
-
sticky: "partial",
|
|
1179
|
-
className: cn("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", className),
|
|
1180
|
-
...props
|
|
1181
|
-
})
|
|
1182
|
-
}));
|
|
1183
|
-
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
1184
|
-
|
|
1185
1837
|
//#endregion
|
|
1186
1838
|
//#region src/components/emoji-picker.tsx
|
|
1187
1839
|
const EmojiPickerCategories = {
|
|
@@ -1195,55 +1847,63 @@ const EmojiPickerCategories = {
|
|
|
1195
1847
|
SYMBOLS: Categories.SYMBOLS,
|
|
1196
1848
|
FLAGS: Categories.FLAGS
|
|
1197
1849
|
};
|
|
1198
|
-
const
|
|
1199
|
-
|
|
1850
|
+
const EmojiPickerContext = React$1.createContext(null);
|
|
1851
|
+
function useEmojiPickerContext() {
|
|
1852
|
+
const context = React$1.useContext(EmojiPickerContext);
|
|
1853
|
+
if (!context) throw new Error("EmojiPicker compound components must be used inside <EmojiPicker>");
|
|
1854
|
+
return context;
|
|
1855
|
+
}
|
|
1856
|
+
function EmojiPicker({ onEmojiSelect, children }) {
|
|
1857
|
+
const [open, setOpen] = React$1.useState(false);
|
|
1858
|
+
const onSelect = React$1.useCallback((emoji) => {
|
|
1859
|
+
onEmojiSelect?.(emoji);
|
|
1860
|
+
setOpen(false);
|
|
1861
|
+
}, [onEmojiSelect]);
|
|
1862
|
+
const contextValue = React$1.useMemo(() => ({ onSelect }), [onSelect]);
|
|
1863
|
+
return /* @__PURE__ */ jsx(EmojiPickerContext.Provider, {
|
|
1864
|
+
value: contextValue,
|
|
1865
|
+
children: /* @__PURE__ */ jsx(Popover, {
|
|
1866
|
+
open,
|
|
1867
|
+
onOpenChange: setOpen,
|
|
1868
|
+
children
|
|
1869
|
+
})
|
|
1870
|
+
});
|
|
1871
|
+
}
|
|
1872
|
+
const EmojiPickerTrigger = React$1.forwardRef(({ render, children, ...props }, ref) => /* @__PURE__ */ jsx(PopoverTrigger, {
|
|
1200
1873
|
ref,
|
|
1201
|
-
|
|
1202
|
-
|
|
1874
|
+
"aria-label": "Emoji",
|
|
1875
|
+
render: render ?? /* @__PURE__ */ jsx(Button, {
|
|
1876
|
+
variant: "outline",
|
|
1877
|
+
size: "icon"
|
|
1878
|
+
}),
|
|
1879
|
+
...props,
|
|
1880
|
+
children: children ?? /* @__PURE__ */ jsx(Smile, { "aria-hidden": "true" })
|
|
1203
1881
|
}));
|
|
1204
|
-
|
|
1205
|
-
function
|
|
1206
|
-
const
|
|
1882
|
+
EmojiPickerTrigger.displayName = "EmojiPickerTrigger";
|
|
1883
|
+
function EmojiPickerContent({ className, align = "start", searchPlaceholder, categories, width = 300, suggestedEmojisMode = SuggestionMode.RECENT, ...props }) {
|
|
1884
|
+
const { onSelect } = useEmojiPickerContext();
|
|
1207
1885
|
const { resolvedTheme } = useTheme();
|
|
1208
1886
|
const pickerTheme = resolvedTheme === "dark" ? Theme.DARK : Theme.LIGHT;
|
|
1209
|
-
const
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
})
|
|
1228
|
-
}), /* @__PURE__ */ jsx(TooltipContent, { children: tooltip })] }) }), /* @__PURE__ */ jsx(PopoverContent, {
|
|
1229
|
-
className: cn("p-0 w-64", className),
|
|
1230
|
-
align: "start",
|
|
1231
|
-
children: /* @__PURE__ */ jsx("div", {
|
|
1232
|
-
className: cn("ds-emoji-picker", emojiClassName),
|
|
1233
|
-
"data-emoji-class": true,
|
|
1234
|
-
children: /* @__PURE__ */ jsx(EmojiReactPicker, {
|
|
1235
|
-
lazyLoadEmojis: true,
|
|
1236
|
-
emojiStyle: EmojiStyle.NATIVE,
|
|
1237
|
-
suggestedEmojisMode: SuggestionMode.RECENT,
|
|
1238
|
-
previewConfig: { showPreview: false },
|
|
1239
|
-
onEmojiClick: handleSelect,
|
|
1240
|
-
width: emojiListWidth,
|
|
1241
|
-
searchPlaceHolder: searchPlaceholder,
|
|
1242
|
-
categories,
|
|
1243
|
-
theme: pickerTheme
|
|
1244
|
-
})
|
|
1887
|
+
const handleClick = React$1.useCallback((emojiData) => onSelect(emojiData.emoji), [onSelect]);
|
|
1888
|
+
return /* @__PURE__ */ jsx(PopoverContent, {
|
|
1889
|
+
"aria-label": "Choose an emoji",
|
|
1890
|
+
className: cn("p-0 w-auto overflow-hidden ring-foreground/5", className),
|
|
1891
|
+
align,
|
|
1892
|
+
...props,
|
|
1893
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
1894
|
+
className: "ds-emoji-picker",
|
|
1895
|
+
children: /* @__PURE__ */ jsx(EmojiReactPicker, {
|
|
1896
|
+
lazyLoadEmojis: true,
|
|
1897
|
+
emojiStyle: EmojiStyle.NATIVE,
|
|
1898
|
+
suggestedEmojisMode,
|
|
1899
|
+
previewConfig: { showPreview: false },
|
|
1900
|
+
onEmojiClick: handleClick,
|
|
1901
|
+
width,
|
|
1902
|
+
searchPlaceHolder: searchPlaceholder,
|
|
1903
|
+
categories,
|
|
1904
|
+
theme: pickerTheme
|
|
1245
1905
|
})
|
|
1246
|
-
})
|
|
1906
|
+
})
|
|
1247
1907
|
});
|
|
1248
1908
|
}
|
|
1249
1909
|
|
|
@@ -1252,7 +1912,7 @@ function EmojiPicker({ disabled, tooltip = "Emoji", onEmojiSelect, className, tr
|
|
|
1252
1912
|
function Empty({ className, ...props }) {
|
|
1253
1913
|
return /* @__PURE__ */ jsx("div", {
|
|
1254
1914
|
"data-slot": "empty",
|
|
1255
|
-
className: cn("flex min-w-0 flex-1 flex-col items-center justify-center gap-
|
|
1915
|
+
className: cn("flex min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-lg border-dashed p-6 text-center text-balance md:p-12", className),
|
|
1256
1916
|
...props
|
|
1257
1917
|
});
|
|
1258
1918
|
}
|
|
@@ -1284,14 +1944,14 @@ function EmptyMedia({ className, variant = "default", ...props }) {
|
|
|
1284
1944
|
function EmptyTitle({ className, ...props }) {
|
|
1285
1945
|
return /* @__PURE__ */ jsx("div", {
|
|
1286
1946
|
"data-slot": "empty-title",
|
|
1287
|
-
className: cn("text-
|
|
1947
|
+
className: cn("text-sm font-medium tracking-tight", className),
|
|
1288
1948
|
...props
|
|
1289
1949
|
});
|
|
1290
1950
|
}
|
|
1291
1951
|
function EmptyDescription({ className, ...props }) {
|
|
1292
1952
|
return /* @__PURE__ */ jsx("div", {
|
|
1293
1953
|
"data-slot": "empty-description",
|
|
1294
|
-
className: cn("text-muted-foreground [&>a:hover]:text-primary text-sm
|
|
1954
|
+
className: cn("text-muted-foreground [&>a:hover]:text-primary text-sm [&>a]:underline [&>a]:underline-offset-4", className),
|
|
1295
1955
|
...props
|
|
1296
1956
|
});
|
|
1297
1957
|
}
|
|
@@ -1306,9 +1966,9 @@ function EmptyContent({ className, ...props }) {
|
|
|
1306
1966
|
//#endregion
|
|
1307
1967
|
//#region src/components/label.tsx
|
|
1308
1968
|
function Label({ className, ...props }) {
|
|
1309
|
-
return /* @__PURE__ */ jsx(
|
|
1969
|
+
return /* @__PURE__ */ jsx("label", {
|
|
1310
1970
|
"data-slot": "label",
|
|
1311
|
-
className: cn("flex items-center gap-2 text-sm leading-
|
|
1971
|
+
className: cn("flex items-center gap-2 text-sm leading-normal 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 peer-data-disabled:opacity-50", className),
|
|
1312
1972
|
...props
|
|
1313
1973
|
});
|
|
1314
1974
|
}
|
|
@@ -1318,7 +1978,7 @@ function Label({ className, ...props }) {
|
|
|
1318
1978
|
function FieldSet({ className, ...props }) {
|
|
1319
1979
|
return /* @__PURE__ */ jsx("fieldset", {
|
|
1320
1980
|
"data-slot": "field-set",
|
|
1321
|
-
className: cn("flex flex-col gap-
|
|
1981
|
+
className: cn("flex flex-col gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3", className),
|
|
1322
1982
|
...props
|
|
1323
1983
|
});
|
|
1324
1984
|
}
|
|
@@ -1326,30 +1986,22 @@ function FieldLegend({ className, variant = "legend", ...props }) {
|
|
|
1326
1986
|
return /* @__PURE__ */ jsx("legend", {
|
|
1327
1987
|
"data-slot": "field-legend",
|
|
1328
1988
|
"data-variant": variant,
|
|
1329
|
-
className: cn("mb-
|
|
1989
|
+
className: cn("mb-1.5 font-medium leading-normal data-[variant=label]:text-sm data-[variant=legend]:text-base", className),
|
|
1330
1990
|
...props
|
|
1331
1991
|
});
|
|
1332
1992
|
}
|
|
1333
1993
|
function FieldGroup({ className, ...props }) {
|
|
1334
1994
|
return /* @__PURE__ */ jsx("div", {
|
|
1335
1995
|
"data-slot": "field-group",
|
|
1336
|
-
className: cn("group/field-group @container/field-group flex w-full flex-col gap-
|
|
1996
|
+
className: cn("group/field-group @container/field-group flex w-full flex-col gap-6 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4", className),
|
|
1337
1997
|
...props
|
|
1338
1998
|
});
|
|
1339
1999
|
}
|
|
1340
|
-
const fieldVariants = cva("group/field flex w-full gap-
|
|
2000
|
+
const fieldVariants = cva("group/field flex w-full gap-2 data-[invalid=true]:text-destructive", {
|
|
1341
2001
|
variants: { orientation: {
|
|
1342
|
-
vertical:
|
|
1343
|
-
horizontal: [
|
|
1344
|
-
|
|
1345
|
-
"[&>[data-slot=field-label]]:flex-auto",
|
|
1346
|
-
"has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
|
|
1347
|
-
],
|
|
1348
|
-
responsive: [
|
|
1349
|
-
"flex-col [&>*]:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto",
|
|
1350
|
-
"@md/field-group:[&>[data-slot=field-label]]:flex-auto",
|
|
1351
|
-
"@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
|
|
1352
|
-
]
|
|
2002
|
+
vertical: "flex-col *:w-full [&>.sr-only]:w-auto",
|
|
2003
|
+
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",
|
|
2004
|
+
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"
|
|
1353
2005
|
} },
|
|
1354
2006
|
defaultVariants: { orientation: "vertical" }
|
|
1355
2007
|
});
|
|
@@ -1365,28 +2017,28 @@ function Field({ className, orientation = "vertical", ...props }) {
|
|
|
1365
2017
|
function FieldContent({ className, ...props }) {
|
|
1366
2018
|
return /* @__PURE__ */ jsx("div", {
|
|
1367
2019
|
"data-slot": "field-content",
|
|
1368
|
-
className: cn("group/field-content flex flex-1 flex-col gap-
|
|
2020
|
+
className: cn("group/field-content flex flex-1 flex-col gap-2 leading-normal", className),
|
|
1369
2021
|
...props
|
|
1370
2022
|
});
|
|
1371
2023
|
}
|
|
1372
2024
|
function FieldLabel({ className, ...props }) {
|
|
1373
2025
|
return /* @__PURE__ */ jsx(Label, {
|
|
1374
2026
|
"data-slot": "field-label",
|
|
1375
|
-
className: cn("group/field-label peer/field-label flex w-fit gap-2 leading-
|
|
2027
|
+
className: cn("group/field-label peer/field-label flex w-fit gap-2 leading-normal group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border *:data-[slot=field]:p-4 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10", "has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col", className),
|
|
1376
2028
|
...props
|
|
1377
2029
|
});
|
|
1378
2030
|
}
|
|
1379
2031
|
function FieldTitle({ className, ...props }) {
|
|
1380
2032
|
return /* @__PURE__ */ jsx("div", {
|
|
1381
2033
|
"data-slot": "field-label",
|
|
1382
|
-
className: cn("flex w-fit items-center gap-2 text-sm leading-
|
|
2034
|
+
className: cn("flex w-fit items-center gap-2 text-sm leading-normal font-medium group-data-[disabled=true]/field:opacity-50", className),
|
|
1383
2035
|
...props
|
|
1384
2036
|
});
|
|
1385
2037
|
}
|
|
1386
2038
|
function FieldDescription({ className, ...props }) {
|
|
1387
2039
|
return /* @__PURE__ */ jsx("p", {
|
|
1388
2040
|
"data-slot": "field-description",
|
|
1389
|
-
className: cn("text-
|
|
2041
|
+
className: cn("text-left text-sm leading-normal font-normal text-muted-foreground group-has-[[data-orientation=horizontal]]/field:text-balance [[data-variant=legend]+&]:-mt-1.5", "last:mt-0 nth-last-2:-mt-1", "[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", className),
|
|
1390
2042
|
...props
|
|
1391
2043
|
});
|
|
1392
2044
|
}
|
|
@@ -1397,7 +2049,7 @@ function FieldSeparator({ children, className, ...props }) {
|
|
|
1397
2049
|
className: cn("relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2", className),
|
|
1398
2050
|
...props,
|
|
1399
2051
|
children: [/* @__PURE__ */ jsx(Separator, { className: "absolute inset-0 top-1/2" }), children && /* @__PURE__ */ jsx("span", {
|
|
1400
|
-
className: "
|
|
2052
|
+
className: "relative mx-auto block w-fit bg-background px-2 text-muted-foreground",
|
|
1401
2053
|
"data-slot": "field-separator-content",
|
|
1402
2054
|
children
|
|
1403
2055
|
})]
|
|
@@ -1418,7 +2070,7 @@ function FieldError({ className, children, errors, ...props }) {
|
|
|
1418
2070
|
return /* @__PURE__ */ jsx("div", {
|
|
1419
2071
|
role: "alert",
|
|
1420
2072
|
"data-slot": "field-error",
|
|
1421
|
-
className: cn("text-
|
|
2073
|
+
className: cn("text-sm leading-normal font-normal text-destructive", className),
|
|
1422
2074
|
...props,
|
|
1423
2075
|
children: content
|
|
1424
2076
|
});
|
|
@@ -1426,18 +2078,10 @@ function FieldError({ className, children, errors, ...props }) {
|
|
|
1426
2078
|
|
|
1427
2079
|
//#endregion
|
|
1428
2080
|
//#region src/components/input-otp.tsx
|
|
1429
|
-
|
|
1430
|
-
variants: { sizing: {
|
|
1431
|
-
default: "**:data-[slot=input-otp-slot]:h-9 **:data-[slot=input-otp-slot]:w-9",
|
|
1432
|
-
sm: "**:data-[slot=input-otp-slot]:h-8 **:data-[slot=input-otp-slot]:w-8",
|
|
1433
|
-
lg: "**:data-[slot=input-otp-slot]:h-12 **:data-[slot=input-otp-slot]:w-12"
|
|
1434
|
-
} },
|
|
1435
|
-
defaultVariants: { sizing: "default" }
|
|
1436
|
-
});
|
|
1437
|
-
function InputOTP({ className, containerClassName, sizing, ...props }) {
|
|
2081
|
+
function InputOTP({ className, containerClassName, ...props }) {
|
|
1438
2082
|
return /* @__PURE__ */ jsx(OTPInput, {
|
|
1439
2083
|
"data-slot": "input-otp",
|
|
1440
|
-
containerClassName: cn("flex items-center gap-2 has-disabled:opacity-50
|
|
2084
|
+
containerClassName: cn("flex items-center gap-2 has-disabled:opacity-50 **:data-[slot=input-otp-slot]:h-12 **:data-[slot=input-otp-slot]:w-12 has-[input[aria-invalid=true]]:**:data-[slot=input-otp-slot]:border-destructive has-[input[aria-invalid=true]]:**:data-[slot=input-otp-slot]:data-[active=true]:ring-destructive/20 dark:has-[input[aria-invalid=true]]:**:data-[slot=input-otp-slot]:data-[active=true]:ring-destructive/40", containerClassName),
|
|
1441
2085
|
className: cn("disabled:cursor-not-allowed", className),
|
|
1442
2086
|
...props
|
|
1443
2087
|
});
|
|
@@ -1454,7 +2098,7 @@ function InputOTPSlot({ index, className, ...props }) {
|
|
|
1454
2098
|
return /* @__PURE__ */ jsxs("div", {
|
|
1455
2099
|
"data-slot": "input-otp-slot",
|
|
1456
2100
|
"data-active": isActive,
|
|
1457
|
-
className: cn("data-[active=true]:border-ring data-[active=true]:ring-ring/50
|
|
2101
|
+
className: cn("data-[active=true]:border-ring data-[active=true]:ring-ring/50 dark:bg-input/30 border-input relative flex items-center justify-center border-y border-r text-sm transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-3", className),
|
|
1458
2102
|
...props,
|
|
1459
2103
|
children: [char, hasFakeCaret && /* @__PURE__ */ jsx("div", {
|
|
1460
2104
|
className: "pointer-events-none absolute inset-0 flex items-center justify-center",
|
|
@@ -1479,7 +2123,7 @@ const ItemGroup = React$1.forwardRef(({ className, stackedItems = false, ...prop
|
|
|
1479
2123
|
role: "list",
|
|
1480
2124
|
"data-slot": "item-group",
|
|
1481
2125
|
"data-stacked": stackedItems ? "" : void 0,
|
|
1482
|
-
className: cn("group/item-group flex flex-col", stackedItems ? "*:has-[+[data-slot=item]]:rounded-b-none *:[[data-slot=item]+[data-slot=item]]:rounded-t-none *:[[data-slot=item]+[data-slot=item]]:border-t-0" : "", className),
|
|
2126
|
+
className: cn("group/item-group flex w-full flex-col", stackedItems ? "*:has-[+[data-slot=item]]:rounded-b-none *:[[data-slot=item]+[data-slot=item]]:rounded-t-none *:[[data-slot=item]+[data-slot=item]]:border-t-0" : "gap-4 has-data-[size=sm]:gap-2.5 has-data-[size=xs]:gap-2", className),
|
|
1483
2127
|
...props
|
|
1484
2128
|
});
|
|
1485
2129
|
});
|
|
@@ -1488,20 +2132,21 @@ function ItemSeparator({ className, ...props }) {
|
|
|
1488
2132
|
return /* @__PURE__ */ jsx(Separator, {
|
|
1489
2133
|
"data-slot": "item-separator",
|
|
1490
2134
|
orientation: "horizontal",
|
|
1491
|
-
className: cn("my-
|
|
2135
|
+
className: cn("my-2", className),
|
|
1492
2136
|
...props
|
|
1493
2137
|
});
|
|
1494
2138
|
}
|
|
1495
|
-
const itemVariants = cva("group/item flex items-center
|
|
2139
|
+
const itemVariants = cva("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", {
|
|
1496
2140
|
variants: {
|
|
1497
2141
|
variant: {
|
|
1498
|
-
default: "
|
|
1499
|
-
outline: "border
|
|
1500
|
-
muted: "bg-muted/50
|
|
2142
|
+
default: "border-transparent",
|
|
2143
|
+
outline: "border-border",
|
|
2144
|
+
muted: "border-transparent bg-muted/50"
|
|
1501
2145
|
},
|
|
1502
2146
|
size: {
|
|
1503
|
-
default: "
|
|
1504
|
-
sm: "
|
|
2147
|
+
default: "gap-3.5 px-4 py-3.5",
|
|
2148
|
+
sm: "gap-2.5 px-3 py-2.5",
|
|
2149
|
+
xs: "gap-2 px-2.5 py-2 in-data-[slot=dropdown-menu-content]:p-0"
|
|
1505
2150
|
}
|
|
1506
2151
|
},
|
|
1507
2152
|
defaultVariants: {
|
|
@@ -1509,26 +2154,31 @@ const itemVariants = cva("group/item flex items-center text-sm transition-colors
|
|
|
1509
2154
|
size: "default"
|
|
1510
2155
|
}
|
|
1511
2156
|
});
|
|
1512
|
-
const Item = React$1.forwardRef(({ className, variant = "default", size = "default",
|
|
1513
|
-
return
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
2157
|
+
const Item = React$1.forwardRef(({ className, variant = "default", size = "default", render, ...props }, ref) => {
|
|
2158
|
+
return useRender({
|
|
2159
|
+
defaultTagName: "div",
|
|
2160
|
+
props: mergeProps({
|
|
2161
|
+
className: cn(itemVariants({
|
|
2162
|
+
variant,
|
|
2163
|
+
size,
|
|
2164
|
+
className
|
|
2165
|
+
})),
|
|
2166
|
+
ref
|
|
2167
|
+
}, props),
|
|
2168
|
+
render,
|
|
2169
|
+
state: {
|
|
2170
|
+
slot: "item",
|
|
1519
2171
|
variant,
|
|
1520
|
-
size
|
|
1521
|
-
|
|
1522
|
-
})),
|
|
1523
|
-
...props
|
|
2172
|
+
size
|
|
2173
|
+
}
|
|
1524
2174
|
});
|
|
1525
2175
|
});
|
|
1526
2176
|
Item.displayName = "Item";
|
|
1527
|
-
const itemMediaVariants = cva("flex shrink-0 items-center justify-center gap-2 group-has-
|
|
2177
|
+
const itemMediaVariants = cva("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", {
|
|
1528
2178
|
variants: { variant: {
|
|
1529
2179
|
default: "bg-transparent",
|
|
1530
|
-
icon: "
|
|
1531
|
-
image: "size-10 rounded-sm
|
|
2180
|
+
icon: "[&_svg:not([class*='size-'])]:size-4",
|
|
2181
|
+
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"
|
|
1532
2182
|
} },
|
|
1533
2183
|
defaultVariants: { variant: "default" }
|
|
1534
2184
|
});
|
|
@@ -1549,7 +2199,7 @@ const ItemContent = React$1.forwardRef(({ className, ...props }, ref) => {
|
|
|
1549
2199
|
return /* @__PURE__ */ jsx("div", {
|
|
1550
2200
|
ref,
|
|
1551
2201
|
"data-slot": "item-content",
|
|
1552
|
-
className: cn("flex flex-1 flex-col gap-1 [&+[data-slot=item-content]]:flex-none", className),
|
|
2202
|
+
className: cn("flex flex-1 flex-col gap-1 group-data-[size=xs]/item:gap-0 [&+[data-slot=item-content]]:flex-none", className),
|
|
1553
2203
|
...props
|
|
1554
2204
|
});
|
|
1555
2205
|
});
|
|
@@ -1558,7 +2208,7 @@ const ItemTitle = React$1.forwardRef(({ className, ...props }, ref) => {
|
|
|
1558
2208
|
return /* @__PURE__ */ jsx("div", {
|
|
1559
2209
|
ref,
|
|
1560
2210
|
"data-slot": "item-title",
|
|
1561
|
-
className: cn("flex w-fit items-center gap-2 text-sm leading-snug font-medium", className),
|
|
2211
|
+
className: cn("line-clamp-1 flex w-fit items-center gap-2 text-sm leading-snug font-medium underline-offset-4", className),
|
|
1562
2212
|
...props
|
|
1563
2213
|
});
|
|
1564
2214
|
});
|
|
@@ -1567,7 +2217,7 @@ const ItemDescription = React$1.forwardRef(({ className, ...props }, ref) => {
|
|
|
1567
2217
|
return /* @__PURE__ */ jsx("p", {
|
|
1568
2218
|
ref,
|
|
1569
2219
|
"data-slot": "item-description",
|
|
1570
|
-
className: cn("
|
|
2220
|
+
className: cn("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", className),
|
|
1571
2221
|
...props
|
|
1572
2222
|
});
|
|
1573
2223
|
});
|
|
@@ -1625,208 +2275,294 @@ const ListCol = ({ grow, wrap, children, className, ...props }) => {
|
|
|
1625
2275
|
});
|
|
1626
2276
|
};
|
|
1627
2277
|
|
|
2278
|
+
//#endregion
|
|
2279
|
+
//#region src/components/pagination.tsx
|
|
2280
|
+
function Pagination({ className, ...props }) {
|
|
2281
|
+
return /* @__PURE__ */ jsx("nav", {
|
|
2282
|
+
role: "navigation",
|
|
2283
|
+
"aria-label": "pagination",
|
|
2284
|
+
"data-slot": "pagination",
|
|
2285
|
+
className: cn("mx-auto flex w-full justify-center", className),
|
|
2286
|
+
...props
|
|
2287
|
+
});
|
|
2288
|
+
}
|
|
2289
|
+
function PaginationContent({ className, ...props }) {
|
|
2290
|
+
return /* @__PURE__ */ jsx("ul", {
|
|
2291
|
+
"data-slot": "pagination-content",
|
|
2292
|
+
className: cn("flex items-center gap-1", className),
|
|
2293
|
+
...props
|
|
2294
|
+
});
|
|
2295
|
+
}
|
|
2296
|
+
function PaginationItem({ ...props }) {
|
|
2297
|
+
return /* @__PURE__ */ jsx("li", {
|
|
2298
|
+
"data-slot": "pagination-item",
|
|
2299
|
+
...props
|
|
2300
|
+
});
|
|
2301
|
+
}
|
|
2302
|
+
function PaginationLink({ className, isActive, size = "icon", ...props }) {
|
|
2303
|
+
return /* @__PURE__ */ jsx(Button, {
|
|
2304
|
+
variant: isActive ? "outline" : "ghost",
|
|
2305
|
+
size,
|
|
2306
|
+
className: cn(className),
|
|
2307
|
+
nativeButton: false,
|
|
2308
|
+
render: /* @__PURE__ */ jsx("a", {
|
|
2309
|
+
"aria-current": isActive ? "page" : void 0,
|
|
2310
|
+
"data-slot": "pagination-link",
|
|
2311
|
+
"data-active": isActive,
|
|
2312
|
+
...props
|
|
2313
|
+
})
|
|
2314
|
+
});
|
|
2315
|
+
}
|
|
2316
|
+
function PaginationPrevious({ className, text = "Previous", ...props }) {
|
|
2317
|
+
return /* @__PURE__ */ jsxs(PaginationLink, {
|
|
2318
|
+
"aria-label": "Go to previous page",
|
|
2319
|
+
size: "default",
|
|
2320
|
+
className: cn("pl-2!", className),
|
|
2321
|
+
...props,
|
|
2322
|
+
children: [/* @__PURE__ */ jsx(ChevronLeftIcon, { "data-icon": "inline-start" }), /* @__PURE__ */ jsx("span", {
|
|
2323
|
+
className: "hidden sm:block",
|
|
2324
|
+
children: text
|
|
2325
|
+
})]
|
|
2326
|
+
});
|
|
2327
|
+
}
|
|
2328
|
+
function PaginationNext({ className, text = "Next", ...props }) {
|
|
2329
|
+
return /* @__PURE__ */ jsxs(PaginationLink, {
|
|
2330
|
+
"aria-label": "Go to next page",
|
|
2331
|
+
size: "default",
|
|
2332
|
+
className: cn("pr-2!", className),
|
|
2333
|
+
...props,
|
|
2334
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
2335
|
+
className: "hidden sm:block",
|
|
2336
|
+
children: text
|
|
2337
|
+
}), /* @__PURE__ */ jsx(ChevronRightIcon, { "data-icon": "inline-end" })]
|
|
2338
|
+
});
|
|
2339
|
+
}
|
|
2340
|
+
function PaginationEllipsis({ className, ...props }) {
|
|
2341
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
2342
|
+
"aria-hidden": true,
|
|
2343
|
+
"data-slot": "pagination-ellipsis",
|
|
2344
|
+
className: cn("flex size-9 items-center justify-center [&_svg:not([class*='size-'])]:size-4", className),
|
|
2345
|
+
...props,
|
|
2346
|
+
children: [/* @__PURE__ */ jsx(MoreHorizontalIcon, {}), /* @__PURE__ */ jsx("span", {
|
|
2347
|
+
className: "sr-only",
|
|
2348
|
+
children: "More pages"
|
|
2349
|
+
})]
|
|
2350
|
+
});
|
|
2351
|
+
}
|
|
2352
|
+
|
|
1628
2353
|
//#endregion
|
|
1629
2354
|
//#region src/components/progress.tsx
|
|
1630
|
-
function Progress({ className, value, ...props }) {
|
|
1631
|
-
return /* @__PURE__ */
|
|
2355
|
+
function Progress({ className, children, value, ...props }) {
|
|
2356
|
+
return /* @__PURE__ */ jsxs(Progress$1.Root, {
|
|
2357
|
+
value,
|
|
1632
2358
|
"data-slot": "progress",
|
|
1633
|
-
className: cn("
|
|
2359
|
+
className: cn("flex flex-wrap gap-3", className),
|
|
1634
2360
|
...props,
|
|
1635
|
-
children: /* @__PURE__ */ jsx(
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
2361
|
+
children: [children, /* @__PURE__ */ jsx(ProgressTrack, { children: /* @__PURE__ */ jsx(ProgressIndicator, {}) })]
|
|
2362
|
+
});
|
|
2363
|
+
}
|
|
2364
|
+
function ProgressTrack({ className, ...props }) {
|
|
2365
|
+
return /* @__PURE__ */ jsx(Progress$1.Track, {
|
|
2366
|
+
className: cn("relative flex h-1 w-full items-center overflow-x-hidden rounded-full bg-muted", className),
|
|
2367
|
+
"data-slot": "progress-track",
|
|
2368
|
+
...props
|
|
2369
|
+
});
|
|
2370
|
+
}
|
|
2371
|
+
function ProgressIndicator({ className, ...props }) {
|
|
2372
|
+
return /* @__PURE__ */ jsx(Progress$1.Indicator, {
|
|
2373
|
+
"data-slot": "progress-indicator",
|
|
2374
|
+
className: cn("h-full bg-primary transition-all", className),
|
|
2375
|
+
...props
|
|
2376
|
+
});
|
|
2377
|
+
}
|
|
2378
|
+
function ProgressLabel({ className, ...props }) {
|
|
2379
|
+
return /* @__PURE__ */ jsx(Progress$1.Label, {
|
|
2380
|
+
className: cn("text-sm font-medium", className),
|
|
2381
|
+
"data-slot": "progress-label",
|
|
2382
|
+
...props
|
|
2383
|
+
});
|
|
2384
|
+
}
|
|
2385
|
+
function ProgressValue({ className, ...props }) {
|
|
2386
|
+
return /* @__PURE__ */ jsx(Progress$1.Value, {
|
|
2387
|
+
className: cn("ml-auto text-sm text-muted-foreground tabular-nums", className),
|
|
2388
|
+
"data-slot": "progress-value",
|
|
2389
|
+
...props
|
|
1640
2390
|
});
|
|
1641
2391
|
}
|
|
1642
2392
|
|
|
1643
2393
|
//#endregion
|
|
1644
2394
|
//#region src/components/radio-group.tsx
|
|
1645
2395
|
function RadioGroup({ className, ...props }) {
|
|
1646
|
-
return /* @__PURE__ */ jsx(
|
|
2396
|
+
return /* @__PURE__ */ jsx(RadioGroup$1, {
|
|
1647
2397
|
"data-slot": "radio-group",
|
|
1648
|
-
className: cn("grid gap-3", className),
|
|
2398
|
+
className: cn("grid w-full gap-3", className),
|
|
1649
2399
|
...props
|
|
1650
2400
|
});
|
|
1651
2401
|
}
|
|
1652
2402
|
function RadioGroupItem({ className, ...props }) {
|
|
1653
|
-
return /* @__PURE__ */ jsx(
|
|
2403
|
+
return /* @__PURE__ */ jsx(Radio.Root, {
|
|
1654
2404
|
"data-slot": "radio-group-item",
|
|
1655
|
-
className: cn("border-input
|
|
2405
|
+
className: cn("group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-input outline-none transition-[color,box-shadow,opacity] active:opacity-60 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 data-disabled:pointer-events-none data-disabled:cursor-not-allowed data-disabled:opacity-50 aria-invalid:border-destructive focus-visible:aria-invalid:ring-3 focus-visible:aria-invalid:ring-destructive/20 dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:focus-visible:aria-invalid:ring-destructive/40 data-checked:border-primary aria-invalid:data-checked:border-destructive", className),
|
|
1656
2406
|
...props,
|
|
1657
|
-
children: /* @__PURE__ */ jsx(
|
|
2407
|
+
children: /* @__PURE__ */ jsx(Radio.Indicator, {
|
|
1658
2408
|
"data-slot": "radio-group-indicator",
|
|
1659
|
-
className: "
|
|
1660
|
-
children: /* @__PURE__ */ jsx(
|
|
1661
|
-
})
|
|
1662
|
-
});
|
|
1663
|
-
}
|
|
1664
|
-
|
|
1665
|
-
//#endregion
|
|
1666
|
-
//#region src/components/scroll-area.tsx
|
|
1667
|
-
function ScrollArea({ className, children, ...props }) {
|
|
1668
|
-
return /* @__PURE__ */ jsxs(ScrollAreaPrimitive.Root, {
|
|
1669
|
-
"data-slot": "scroll-area",
|
|
1670
|
-
className: cn("relative", className),
|
|
1671
|
-
...props,
|
|
1672
|
-
children: [
|
|
1673
|
-
/* @__PURE__ */ jsx(ScrollAreaPrimitive.Viewport, {
|
|
1674
|
-
"data-slot": "scroll-area-viewport",
|
|
1675
|
-
className: "focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",
|
|
1676
|
-
children
|
|
1677
|
-
}),
|
|
1678
|
-
/* @__PURE__ */ jsx(ScrollBar, {}),
|
|
1679
|
-
/* @__PURE__ */ jsx(ScrollAreaPrimitive.Corner, {})
|
|
1680
|
-
]
|
|
1681
|
-
});
|
|
1682
|
-
}
|
|
1683
|
-
function ScrollBar({ className, orientation = "vertical", ...props }) {
|
|
1684
|
-
return /* @__PURE__ */ jsx(ScrollAreaPrimitive.ScrollAreaScrollbar, {
|
|
1685
|
-
"data-slot": "scroll-area-scrollbar",
|
|
1686
|
-
orientation,
|
|
1687
|
-
className: cn("flex touch-none p-px transition-colors select-none", orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent", orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent", className),
|
|
1688
|
-
...props,
|
|
1689
|
-
children: /* @__PURE__ */ jsx(ScrollAreaPrimitive.ScrollAreaThumb, {
|
|
1690
|
-
"data-slot": "scroll-area-thumb",
|
|
1691
|
-
className: "bg-border relative flex-1 rounded-full"
|
|
2409
|
+
className: "flex size-full items-center justify-center",
|
|
2410
|
+
children: /* @__PURE__ */ jsx("span", { className: "size-2 rounded-full bg-primary group-aria-invalid/radio-group-item:bg-destructive" })
|
|
1692
2411
|
})
|
|
1693
2412
|
});
|
|
1694
2413
|
}
|
|
1695
2414
|
|
|
1696
2415
|
//#endregion
|
|
1697
2416
|
//#region src/components/select.tsx
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
"
|
|
1701
|
-
|
|
1702
|
-
}
|
|
1703
|
-
}
|
|
1704
|
-
|
|
1705
|
-
|
|
2417
|
+
const selectTriggerVariants = cva("flex w-fit items-center justify-between rounded-md border border-input bg-transparent py-2 text-sm whitespace-nowrap transition-colors outline-none select-none hover:border-ring focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive focus-visible:aria-invalid:ring-3 focus-visible:aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground *: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:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:focus-visible:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
|
|
2418
|
+
variants: { size: {
|
|
2419
|
+
default: "h-10 gap-2 px-3",
|
|
2420
|
+
sm: "h-8 gap-1.5 px-2"
|
|
2421
|
+
} },
|
|
2422
|
+
defaultVariants: { size: "default" }
|
|
2423
|
+
});
|
|
2424
|
+
const Select = Select$1.Root;
|
|
2425
|
+
function SelectGroup({ className, ...props }) {
|
|
2426
|
+
return /* @__PURE__ */ jsx(Select$1.Group, {
|
|
1706
2427
|
"data-slot": "select-group",
|
|
2428
|
+
className: cn("scroll-my-1", className),
|
|
1707
2429
|
...props
|
|
1708
2430
|
});
|
|
1709
2431
|
}
|
|
1710
|
-
function SelectValue({ ...props }) {
|
|
1711
|
-
return /* @__PURE__ */ jsx(
|
|
2432
|
+
function SelectValue({ className, ...props }) {
|
|
2433
|
+
return /* @__PURE__ */ jsx(Select$1.Value, {
|
|
1712
2434
|
"data-slot": "select-value",
|
|
2435
|
+
className: cn("flex flex-1 text-left", className),
|
|
1713
2436
|
...props
|
|
1714
2437
|
});
|
|
1715
2438
|
}
|
|
1716
2439
|
function SelectTrigger({ className, size = "default", children, ...props }) {
|
|
1717
|
-
return /* @__PURE__ */ jsxs(
|
|
2440
|
+
return /* @__PURE__ */ jsxs(Select$1.Trigger, {
|
|
1718
2441
|
"data-slot": "select-trigger",
|
|
1719
2442
|
"data-size": size,
|
|
1720
|
-
className: cn(
|
|
2443
|
+
className: cn(selectTriggerVariants({ size }), className),
|
|
1721
2444
|
...props,
|
|
1722
|
-
children: [children, /* @__PURE__ */ jsx(
|
|
1723
|
-
asChild: true,
|
|
1724
|
-
children: /* @__PURE__ */ jsx(ChevronDownOutline, { className: "size-4 opacity-50" })
|
|
1725
|
-
})]
|
|
2445
|
+
children: [children, /* @__PURE__ */ jsx(Select$1.Icon, { render: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "pointer-events-none size-4 text-muted-foreground" }) })]
|
|
1726
2446
|
});
|
|
1727
2447
|
}
|
|
1728
|
-
function SelectContent({ className, children,
|
|
1729
|
-
return /* @__PURE__ */ jsx(
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
2448
|
+
function SelectContent({ className, children, side = "bottom", sideOffset = 4, align = "start", alignOffset = 0, alignItemWithTrigger = false, ...props }) {
|
|
2449
|
+
return /* @__PURE__ */ jsx(Select$1.Portal, { children: /* @__PURE__ */ jsx(Select$1.Positioner, {
|
|
2450
|
+
side,
|
|
2451
|
+
sideOffset,
|
|
2452
|
+
align,
|
|
2453
|
+
alignOffset,
|
|
2454
|
+
alignItemWithTrigger,
|
|
2455
|
+
className: "isolate z-50",
|
|
2456
|
+
children: /* @__PURE__ */ jsxs(Select$1.Popup, {
|
|
2457
|
+
"data-slot": "select-content",
|
|
2458
|
+
"data-align-trigger": alignItemWithTrigger,
|
|
2459
|
+
className: cn("relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md p-1 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=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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),
|
|
2460
|
+
...props,
|
|
2461
|
+
children: [
|
|
2462
|
+
/* @__PURE__ */ jsx(SelectScrollUpButton, {}),
|
|
2463
|
+
/* @__PURE__ */ jsx(Select$1.List, { children }),
|
|
2464
|
+
/* @__PURE__ */ jsx(SelectScrollDownButton, {})
|
|
2465
|
+
]
|
|
2466
|
+
})
|
|
1742
2467
|
}) });
|
|
1743
2468
|
}
|
|
1744
2469
|
function SelectLabel({ className, ...props }) {
|
|
1745
|
-
return /* @__PURE__ */ jsx(
|
|
2470
|
+
return /* @__PURE__ */ jsx(Select$1.GroupLabel, {
|
|
1746
2471
|
"data-slot": "select-label",
|
|
1747
|
-
className: cn("
|
|
2472
|
+
className: cn("p-2 text-xs text-muted-foreground", className),
|
|
1748
2473
|
...props
|
|
1749
2474
|
});
|
|
1750
2475
|
}
|
|
1751
2476
|
function SelectItem({ className, children, ...props }) {
|
|
1752
|
-
return /* @__PURE__ */ jsxs(
|
|
2477
|
+
return /* @__PURE__ */ jsxs(Select$1.Item, {
|
|
1753
2478
|
"data-slot": "select-item",
|
|
1754
|
-
className: cn("
|
|
2479
|
+
className: cn("relative flex w-full cursor-default items-center gap-2 rounded-md p-2 pr-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:cursor-not-allowed 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", className),
|
|
1755
2480
|
...props,
|
|
1756
|
-
children: [/* @__PURE__ */ jsx(
|
|
1757
|
-
className: "
|
|
1758
|
-
children
|
|
1759
|
-
}), /* @__PURE__ */ jsx(
|
|
2481
|
+
children: [/* @__PURE__ */ jsx(Select$1.ItemText, {
|
|
2482
|
+
className: "flex flex-1 shrink-0 gap-2 whitespace-nowrap",
|
|
2483
|
+
children
|
|
2484
|
+
}), /* @__PURE__ */ jsx(Select$1.ItemIndicator, {
|
|
2485
|
+
"data-slot": "select-item-indicator",
|
|
2486
|
+
render: /* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center text-primary" }),
|
|
2487
|
+
children: /* @__PURE__ */ jsx(CheckIcon, { className: "pointer-events-none" })
|
|
2488
|
+
})]
|
|
1760
2489
|
});
|
|
1761
2490
|
}
|
|
1762
2491
|
function SelectSeparator({ className, ...props }) {
|
|
1763
|
-
return /* @__PURE__ */ jsx(
|
|
2492
|
+
return /* @__PURE__ */ jsx(Select$1.Separator, {
|
|
1764
2493
|
"data-slot": "select-separator",
|
|
1765
|
-
className: cn("
|
|
2494
|
+
className: cn("pointer-events-none -mx-1 my-1 h-px bg-border", className),
|
|
1766
2495
|
...props
|
|
1767
2496
|
});
|
|
1768
2497
|
}
|
|
1769
2498
|
function SelectScrollUpButton({ className, ...props }) {
|
|
1770
|
-
return /* @__PURE__ */ jsx(
|
|
2499
|
+
return /* @__PURE__ */ jsx(Select$1.ScrollUpArrow, {
|
|
1771
2500
|
"data-slot": "select-scroll-up-button",
|
|
1772
|
-
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
2501
|
+
className: cn("top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4", className),
|
|
1773
2502
|
...props,
|
|
1774
|
-
children: /* @__PURE__ */ jsx(
|
|
2503
|
+
children: /* @__PURE__ */ jsx(ChevronUpIcon, {})
|
|
1775
2504
|
});
|
|
1776
2505
|
}
|
|
1777
2506
|
function SelectScrollDownButton({ className, ...props }) {
|
|
1778
|
-
return /* @__PURE__ */ jsx(
|
|
2507
|
+
return /* @__PURE__ */ jsx(Select$1.ScrollDownArrow, {
|
|
1779
2508
|
"data-slot": "select-scroll-down-button",
|
|
1780
|
-
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
2509
|
+
className: cn("bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4", className),
|
|
1781
2510
|
...props,
|
|
1782
|
-
children: /* @__PURE__ */ jsx(
|
|
2511
|
+
children: /* @__PURE__ */ jsx(ChevronDownIcon, {})
|
|
1783
2512
|
});
|
|
1784
2513
|
}
|
|
1785
2514
|
|
|
1786
2515
|
//#endregion
|
|
1787
2516
|
//#region src/components/sheet.tsx
|
|
1788
2517
|
function Sheet({ ...props }) {
|
|
1789
|
-
return /* @__PURE__ */ jsx(
|
|
2518
|
+
return /* @__PURE__ */ jsx(Dialog$1.Root, {
|
|
1790
2519
|
"data-slot": "sheet",
|
|
1791
2520
|
...props
|
|
1792
2521
|
});
|
|
1793
2522
|
}
|
|
1794
2523
|
function SheetTrigger({ ...props }) {
|
|
1795
|
-
return /* @__PURE__ */ jsx(
|
|
2524
|
+
return /* @__PURE__ */ jsx(Dialog$1.Trigger, {
|
|
1796
2525
|
"data-slot": "sheet-trigger",
|
|
1797
2526
|
...props
|
|
1798
2527
|
});
|
|
1799
2528
|
}
|
|
1800
2529
|
function SheetClose({ ...props }) {
|
|
1801
|
-
return /* @__PURE__ */ jsx(
|
|
2530
|
+
return /* @__PURE__ */ jsx(Dialog$1.Close, {
|
|
1802
2531
|
"data-slot": "sheet-close",
|
|
1803
2532
|
...props
|
|
1804
2533
|
});
|
|
1805
2534
|
}
|
|
1806
2535
|
function SheetPortal({ ...props }) {
|
|
1807
|
-
return /* @__PURE__ */ jsx(
|
|
2536
|
+
return /* @__PURE__ */ jsx(Dialog$1.Portal, {
|
|
1808
2537
|
"data-slot": "sheet-portal",
|
|
1809
2538
|
...props
|
|
1810
2539
|
});
|
|
1811
2540
|
}
|
|
1812
|
-
const SheetOverlay = React$1.forwardRef(({ className, ...props },
|
|
1813
|
-
return /* @__PURE__ */ jsx(
|
|
2541
|
+
const SheetOverlay = React$1.forwardRef(({ className, ...props }, ref) => {
|
|
2542
|
+
return /* @__PURE__ */ jsx(Dialog$1.Backdrop, {
|
|
1814
2543
|
"data-slot": "sheet-overlay",
|
|
1815
|
-
className: cn("
|
|
2544
|
+
className: cn("fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs", className),
|
|
1816
2545
|
...props,
|
|
1817
|
-
ref
|
|
2546
|
+
ref
|
|
1818
2547
|
});
|
|
1819
2548
|
});
|
|
1820
|
-
|
|
2549
|
+
SheetOverlay.displayName = "SheetOverlay";
|
|
2550
|
+
function SheetContent({ className, children, side = "right", showCloseButton = true, container, ...props }) {
|
|
1821
2551
|
return /* @__PURE__ */ jsxs(SheetPortal, {
|
|
1822
2552
|
container,
|
|
1823
|
-
children: [/* @__PURE__ */ jsx(SheetOverlay, {}), /* @__PURE__ */ jsxs(
|
|
2553
|
+
children: [/* @__PURE__ */ jsx(SheetOverlay, {}), /* @__PURE__ */ jsxs(Dialog$1.Popup, {
|
|
1824
2554
|
"data-slot": "sheet-content",
|
|
1825
|
-
|
|
2555
|
+
"data-side": side,
|
|
2556
|
+
className: cn("fixed z-50 flex flex-col gap-4 bg-background bg-clip-padding text-sm shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] 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=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] 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=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm", className),
|
|
1826
2557
|
...props,
|
|
1827
|
-
children: [children, /* @__PURE__ */ jsxs(
|
|
1828
|
-
|
|
1829
|
-
|
|
2558
|
+
children: [children, showCloseButton && /* @__PURE__ */ jsxs(Dialog$1.Close, {
|
|
2559
|
+
"data-slot": "sheet-close",
|
|
2560
|
+
render: /* @__PURE__ */ jsx(Button, {
|
|
2561
|
+
variant: "ghost",
|
|
2562
|
+
className: "absolute top-4 right-4",
|
|
2563
|
+
size: "icon"
|
|
2564
|
+
}),
|
|
2565
|
+
children: [/* @__PURE__ */ jsx(XIcon, {}), /* @__PURE__ */ jsx("span", {
|
|
1830
2566
|
className: "sr-only",
|
|
1831
2567
|
children: "Close"
|
|
1832
2568
|
})]
|
|
@@ -1849,16 +2585,16 @@ function SheetFooter({ className, ...props }) {
|
|
|
1849
2585
|
});
|
|
1850
2586
|
}
|
|
1851
2587
|
function SheetTitle({ className, ...props }) {
|
|
1852
|
-
return /* @__PURE__ */ jsx(
|
|
2588
|
+
return /* @__PURE__ */ jsx(Dialog$1.Title, {
|
|
1853
2589
|
"data-slot": "sheet-title",
|
|
1854
|
-
className: cn("text-foreground
|
|
2590
|
+
className: cn("font-medium text-foreground", className),
|
|
1855
2591
|
...props
|
|
1856
2592
|
});
|
|
1857
2593
|
}
|
|
1858
2594
|
function SheetDescription({ className, ...props }) {
|
|
1859
|
-
return /* @__PURE__ */ jsx(
|
|
2595
|
+
return /* @__PURE__ */ jsx(Dialog$1.Description, {
|
|
1860
2596
|
"data-slot": "sheet-description",
|
|
1861
|
-
className: cn("text-muted-foreground
|
|
2597
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
1862
2598
|
...props
|
|
1863
2599
|
});
|
|
1864
2600
|
}
|
|
@@ -1868,10 +2604,49 @@ function SheetDescription({ className, ...props }) {
|
|
|
1868
2604
|
function Skeleton({ className, ...props }) {
|
|
1869
2605
|
return /* @__PURE__ */ jsx("div", {
|
|
1870
2606
|
"data-slot": "skeleton",
|
|
1871
|
-
className: cn("
|
|
2607
|
+
className: cn("animate-pulse rounded-md bg-muted", className),
|
|
2608
|
+
...props
|
|
2609
|
+
});
|
|
2610
|
+
}
|
|
2611
|
+
|
|
2612
|
+
//#endregion
|
|
2613
|
+
//#region src/components/tooltip.tsx
|
|
2614
|
+
function TooltipProvider({ delay = 0, ...props }) {
|
|
2615
|
+
return /* @__PURE__ */ jsx(Tooltip$1.Provider, {
|
|
2616
|
+
"data-slot": "tooltip-provider",
|
|
2617
|
+
delay,
|
|
2618
|
+
...props
|
|
2619
|
+
});
|
|
2620
|
+
}
|
|
2621
|
+
function Tooltip({ ...props }) {
|
|
2622
|
+
return /* @__PURE__ */ jsx(Tooltip$1.Root, {
|
|
2623
|
+
"data-slot": "tooltip",
|
|
2624
|
+
...props
|
|
2625
|
+
});
|
|
2626
|
+
}
|
|
2627
|
+
function TooltipTrigger({ ...props }) {
|
|
2628
|
+
return /* @__PURE__ */ jsx(Tooltip$1.Trigger, {
|
|
2629
|
+
"data-slot": "tooltip-trigger",
|
|
1872
2630
|
...props
|
|
1873
2631
|
});
|
|
1874
2632
|
}
|
|
2633
|
+
const TooltipContent = React$1.forwardRef(({ className, side = "top", sideOffset = 4, align = "center", alignOffset = 0, children, ...props }, ref) => {
|
|
2634
|
+
return /* @__PURE__ */ jsx(Tooltip$1.Portal, { children: /* @__PURE__ */ jsx(Tooltip$1.Positioner, {
|
|
2635
|
+
align,
|
|
2636
|
+
alignOffset,
|
|
2637
|
+
side,
|
|
2638
|
+
sideOffset,
|
|
2639
|
+
className: "isolate z-50",
|
|
2640
|
+
children: /* @__PURE__ */ jsxs(Tooltip$1.Popup, {
|
|
2641
|
+
ref,
|
|
2642
|
+
"data-slot": "tooltip-content",
|
|
2643
|
+
className: cn("z-50 inline-flex w-fit max-w-sm origin-(--transform-origin) items-center gap-2 rounded-md bg-accent-foreground p-2 text-sm font-medium text-primary-foreground has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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", className),
|
|
2644
|
+
...props,
|
|
2645
|
+
children: [children, /* @__PURE__ */ jsx(Tooltip$1.Arrow, { className: "z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-accent-foreground fill-accent-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5" })]
|
|
2646
|
+
})
|
|
2647
|
+
}) });
|
|
2648
|
+
});
|
|
2649
|
+
TooltipContent.displayName = "TooltipContent";
|
|
1875
2650
|
|
|
1876
2651
|
//#endregion
|
|
1877
2652
|
//#region src/hooks/use-mobile.ts
|
|
@@ -1904,9 +2679,8 @@ function useSidebar() {
|
|
|
1904
2679
|
if (!context) throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
1905
2680
|
return context;
|
|
1906
2681
|
}
|
|
1907
|
-
function SidebarProvider({ defaultOpen = true, open: openProp, onOpenChange: setOpenProp,
|
|
1908
|
-
const
|
|
1909
|
-
const isMobile = disableMobile ? false : isMobileDevice;
|
|
2682
|
+
function SidebarProvider({ defaultOpen = true, open: openProp, onOpenChange: setOpenProp, className, style, children, ...props }) {
|
|
2683
|
+
const isMobile = useIsMobile();
|
|
1910
2684
|
const [openMobile, setOpenMobile] = React$1.useState(false);
|
|
1911
2685
|
const [_open, _setOpen] = React$1.useState(defaultOpen);
|
|
1912
2686
|
const open = openProp ?? _open;
|
|
@@ -1953,27 +2727,24 @@ function SidebarProvider({ defaultOpen = true, open: openProp, onOpenChange: set
|
|
|
1953
2727
|
]);
|
|
1954
2728
|
return /* @__PURE__ */ jsx(SidebarContext.Provider, {
|
|
1955
2729
|
value: contextValue,
|
|
1956
|
-
children: /* @__PURE__ */ jsx(
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
"
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
...props,
|
|
1967
|
-
children
|
|
1968
|
-
})
|
|
2730
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
2731
|
+
"data-slot": "sidebar-wrapper",
|
|
2732
|
+
style: {
|
|
2733
|
+
"--sidebar-width": SIDEBAR_WIDTH,
|
|
2734
|
+
"--sidebar-width-icon": SIDEBAR_WIDTH_ICON,
|
|
2735
|
+
...style
|
|
2736
|
+
},
|
|
2737
|
+
className: cn("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar", className),
|
|
2738
|
+
...props,
|
|
2739
|
+
children
|
|
1969
2740
|
})
|
|
1970
2741
|
});
|
|
1971
2742
|
}
|
|
1972
|
-
function Sidebar({ side = "left", variant = "sidebar", collapsible = "offcanvas", className, children, ...props }) {
|
|
2743
|
+
function Sidebar({ side = "left", variant = "sidebar", collapsible = "offcanvas", className, children, dir, ...props }) {
|
|
1973
2744
|
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
1974
2745
|
if (collapsible === "none") return /* @__PURE__ */ jsx("div", {
|
|
1975
2746
|
"data-slot": "sidebar",
|
|
1976
|
-
className: cn("
|
|
2747
|
+
className: cn("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground", className),
|
|
1977
2748
|
...props,
|
|
1978
2749
|
children
|
|
1979
2750
|
});
|
|
@@ -1982,10 +2753,11 @@ function Sidebar({ side = "left", variant = "sidebar", collapsible = "offcanvas"
|
|
|
1982
2753
|
onOpenChange: setOpenMobile,
|
|
1983
2754
|
...props,
|
|
1984
2755
|
children: /* @__PURE__ */ jsxs(SheetContent, {
|
|
2756
|
+
dir,
|
|
1985
2757
|
"data-sidebar": "sidebar",
|
|
1986
2758
|
"data-slot": "sidebar",
|
|
1987
2759
|
"data-mobile": "true",
|
|
1988
|
-
className: "
|
|
2760
|
+
className: "w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",
|
|
1989
2761
|
style: { "--sidebar-width": SIDEBAR_WIDTH_MOBILE },
|
|
1990
2762
|
side,
|
|
1991
2763
|
children: [/* @__PURE__ */ jsxs(SheetHeader, {
|
|
@@ -1998,7 +2770,7 @@ function Sidebar({ side = "left", variant = "sidebar", collapsible = "offcanvas"
|
|
|
1998
2770
|
})
|
|
1999
2771
|
});
|
|
2000
2772
|
return /* @__PURE__ */ jsxs("div", {
|
|
2001
|
-
className:
|
|
2773
|
+
className: "group peer hidden text-sidebar-foreground md:block",
|
|
2002
2774
|
"data-state": state,
|
|
2003
2775
|
"data-collapsible": state === "collapsed" ? collapsible : "",
|
|
2004
2776
|
"data-variant": variant,
|
|
@@ -2009,12 +2781,13 @@ function Sidebar({ side = "left", variant = "sidebar", collapsible = "offcanvas"
|
|
|
2009
2781
|
className: cn("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear", "group-data-[collapsible=offcanvas]:w-0", "group-data-[side=right]:rotate-180", variant === "floating" || variant === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)")
|
|
2010
2782
|
}), /* @__PURE__ */ jsx("div", {
|
|
2011
2783
|
"data-slot": "sidebar-container",
|
|
2012
|
-
|
|
2784
|
+
"data-side": side,
|
|
2785
|
+
className: cn("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex", variant === "floating" || variant === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l", className),
|
|
2013
2786
|
...props,
|
|
2014
2787
|
children: /* @__PURE__ */ jsx("div", {
|
|
2015
2788
|
"data-sidebar": "sidebar",
|
|
2016
2789
|
"data-slot": "sidebar-inner",
|
|
2017
|
-
className: "bg-sidebar group-data-[variant=floating]:
|
|
2790
|
+
className: "flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border",
|
|
2018
2791
|
children
|
|
2019
2792
|
})
|
|
2020
2793
|
})]
|
|
@@ -2025,9 +2798,9 @@ function SidebarTrigger({ className, onClick, ...props }) {
|
|
|
2025
2798
|
return /* @__PURE__ */ jsxs(Button, {
|
|
2026
2799
|
"data-sidebar": "trigger",
|
|
2027
2800
|
"data-slot": "sidebar-trigger",
|
|
2028
|
-
variant: "
|
|
2029
|
-
size: "icon
|
|
2030
|
-
className,
|
|
2801
|
+
variant: "ghost",
|
|
2802
|
+
size: "icon",
|
|
2803
|
+
className: cn(className),
|
|
2031
2804
|
onClick: (event) => {
|
|
2032
2805
|
onClick?.(event);
|
|
2033
2806
|
toggleSidebar();
|
|
@@ -2040,7 +2813,7 @@ function SidebarTrigger({ className, onClick, ...props }) {
|
|
|
2040
2813
|
});
|
|
2041
2814
|
}
|
|
2042
2815
|
function SidebarRail({ className, ...props }) {
|
|
2043
|
-
const {
|
|
2816
|
+
const { toggleSidebar } = useSidebar();
|
|
2044
2817
|
return /* @__PURE__ */ jsx("button", {
|
|
2045
2818
|
"data-sidebar": "rail",
|
|
2046
2819
|
"data-slot": "sidebar-rail",
|
|
@@ -2048,15 +2821,14 @@ function SidebarRail({ className, ...props }) {
|
|
|
2048
2821
|
tabIndex: -1,
|
|
2049
2822
|
onClick: toggleSidebar,
|
|
2050
2823
|
title: "Toggle Sidebar",
|
|
2051
|
-
className: cn("
|
|
2824
|
+
className: cn("absolute inset-y-0 z-20 hidden w-4 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:start-1/2 after:w-[2px] hover:after:bg-sidebar-border sm:flex ltr:-translate-x-1/2 rtl:-translate-x-1/2", "in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize", "[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize", "group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full hover:group-data-[collapsible=offcanvas]:bg-sidebar", "[[data-side=left][data-collapsible=offcanvas]_&]:-right-2", "[[data-side=right][data-collapsible=offcanvas]_&]:-left-2", className),
|
|
2052
2825
|
...props
|
|
2053
2826
|
});
|
|
2054
2827
|
}
|
|
2055
2828
|
function SidebarInset({ className, ...props }) {
|
|
2056
|
-
const { isMobile } = useSidebar();
|
|
2057
2829
|
return /* @__PURE__ */ jsx("main", {
|
|
2058
2830
|
"data-slot": "sidebar-inset",
|
|
2059
|
-
className: cn("
|
|
2831
|
+
className: cn("relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2", className),
|
|
2060
2832
|
...props
|
|
2061
2833
|
});
|
|
2062
2834
|
}
|
|
@@ -2064,7 +2836,7 @@ function SidebarInput({ className, ...props }) {
|
|
|
2064
2836
|
return /* @__PURE__ */ jsx(Input, {
|
|
2065
2837
|
"data-slot": "sidebar-input",
|
|
2066
2838
|
"data-sidebar": "input",
|
|
2067
|
-
className: cn("
|
|
2839
|
+
className: cn("h-8 w-full bg-background shadow-none", className),
|
|
2068
2840
|
...props
|
|
2069
2841
|
});
|
|
2070
2842
|
}
|
|
@@ -2088,7 +2860,7 @@ function SidebarSeparator({ className, ...props }) {
|
|
|
2088
2860
|
return /* @__PURE__ */ jsx(Separator, {
|
|
2089
2861
|
"data-slot": "sidebar-separator",
|
|
2090
2862
|
"data-sidebar": "separator",
|
|
2091
|
-
className: cn("
|
|
2863
|
+
className: cn("mx-2 w-auto bg-sidebar-border", className),
|
|
2092
2864
|
...props
|
|
2093
2865
|
});
|
|
2094
2866
|
}
|
|
@@ -2096,7 +2868,7 @@ function SidebarContent({ className, ...props }) {
|
|
|
2096
2868
|
return /* @__PURE__ */ jsx("div", {
|
|
2097
2869
|
"data-slot": "sidebar-content",
|
|
2098
2870
|
"data-sidebar": "content",
|
|
2099
|
-
className: cn("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden", className),
|
|
2871
|
+
className: cn("no-scrollbar flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden", className),
|
|
2100
2872
|
...props
|
|
2101
2873
|
});
|
|
2102
2874
|
}
|
|
@@ -2108,22 +2880,26 @@ function SidebarGroup({ className, ...props }) {
|
|
|
2108
2880
|
...props
|
|
2109
2881
|
});
|
|
2110
2882
|
}
|
|
2111
|
-
function SidebarGroupLabel({ className,
|
|
2112
|
-
return
|
|
2113
|
-
|
|
2114
|
-
"
|
|
2115
|
-
|
|
2116
|
-
|
|
2883
|
+
function SidebarGroupLabel({ className, render, ...props }) {
|
|
2884
|
+
return useRender({
|
|
2885
|
+
defaultTagName: "div",
|
|
2886
|
+
props: mergeProps({ className: cn("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0", className) }, props),
|
|
2887
|
+
render,
|
|
2888
|
+
state: {
|
|
2889
|
+
slot: "sidebar-group-label",
|
|
2890
|
+
sidebar: "group-label"
|
|
2891
|
+
}
|
|
2117
2892
|
});
|
|
2118
2893
|
}
|
|
2119
|
-
function SidebarGroupAction({ className,
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2894
|
+
function SidebarGroupAction({ className, render, ...props }) {
|
|
2895
|
+
return useRender({
|
|
2896
|
+
defaultTagName: "button",
|
|
2897
|
+
props: mergeProps({ className: cn("absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0", className) }, props),
|
|
2898
|
+
render,
|
|
2899
|
+
state: {
|
|
2900
|
+
slot: "sidebar-group-action",
|
|
2901
|
+
sidebar: "group-action"
|
|
2902
|
+
}
|
|
2127
2903
|
});
|
|
2128
2904
|
}
|
|
2129
2905
|
function SidebarGroupContent({ className, ...props }) {
|
|
@@ -2150,7 +2926,7 @@ function SidebarMenuItem({ className, ...props }) {
|
|
|
2150
2926
|
...props
|
|
2151
2927
|
});
|
|
2152
2928
|
}
|
|
2153
|
-
const sidebarMenuButtonVariants = cva("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm
|
|
2929
|
+
const sidebarMenuButtonVariants = cva("peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate", {
|
|
2154
2930
|
variants: {
|
|
2155
2931
|
variant: {
|
|
2156
2932
|
default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
|
|
@@ -2167,44 +2943,47 @@ const sidebarMenuButtonVariants = cva("peer/menu-button flex w-full items-center
|
|
|
2167
2943
|
size: "default"
|
|
2168
2944
|
}
|
|
2169
2945
|
});
|
|
2170
|
-
const SidebarMenuButton = React$1.forwardRef(({
|
|
2171
|
-
const Comp = asChild ? Slot$1 : "button";
|
|
2946
|
+
const SidebarMenuButton = React$1.forwardRef(({ render, isActive = false, variant = "default", size = "default", tooltip, className, ...props }, ref) => {
|
|
2172
2947
|
const { isMobile, state } = useSidebar();
|
|
2173
|
-
const
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2948
|
+
const comp = useRender({
|
|
2949
|
+
defaultTagName: "button",
|
|
2950
|
+
props: mergeProps({
|
|
2951
|
+
className: cn(sidebarMenuButtonVariants({
|
|
2952
|
+
variant,
|
|
2953
|
+
size
|
|
2954
|
+
}), className),
|
|
2955
|
+
ref
|
|
2956
|
+
}, props),
|
|
2957
|
+
render: !tooltip ? render : /* @__PURE__ */ jsx(TooltipTrigger, { render }),
|
|
2958
|
+
state: {
|
|
2959
|
+
slot: "sidebar-menu-button",
|
|
2960
|
+
sidebar: "menu-button",
|
|
2961
|
+
size,
|
|
2962
|
+
active: isActive
|
|
2963
|
+
}
|
|
2184
2964
|
});
|
|
2185
|
-
if (!tooltip) return
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
return /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, {
|
|
2189
|
-
asChild: true,
|
|
2190
|
-
children: button
|
|
2191
|
-
}), /* @__PURE__ */ jsx(TooltipContent, {
|
|
2965
|
+
if (!tooltip) return comp;
|
|
2966
|
+
if (typeof tooltip === "string") tooltip = { children: tooltip };
|
|
2967
|
+
return /* @__PURE__ */ jsxs(Tooltip, { children: [comp, /* @__PURE__ */ jsx(TooltipContent, {
|
|
2192
2968
|
side: "right",
|
|
2193
2969
|
align: "center",
|
|
2194
2970
|
hidden: state !== "collapsed" || isMobile,
|
|
2195
|
-
...
|
|
2971
|
+
...tooltip
|
|
2196
2972
|
})] });
|
|
2197
2973
|
});
|
|
2198
2974
|
SidebarMenuButton.displayName = "SidebarMenuButton";
|
|
2199
|
-
const SidebarMenuAction = React$1.forwardRef(({ className,
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2975
|
+
const SidebarMenuAction = React$1.forwardRef(({ className, render, showOnHover = false, ...props }, ref) => {
|
|
2976
|
+
return useRender({
|
|
2977
|
+
defaultTagName: "button",
|
|
2978
|
+
props: mergeProps({
|
|
2979
|
+
className: cn("absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0", showOnHover && "group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 peer-data-active/menu-button:text-sidebar-accent-foreground aria-expanded:opacity-100 md:opacity-0", className),
|
|
2980
|
+
ref
|
|
2981
|
+
}, props),
|
|
2982
|
+
render,
|
|
2983
|
+
state: {
|
|
2984
|
+
slot: "sidebar-menu-action",
|
|
2985
|
+
sidebar: "menu-action"
|
|
2986
|
+
}
|
|
2208
2987
|
});
|
|
2209
2988
|
});
|
|
2210
2989
|
SidebarMenuAction.displayName = "SidebarMenuAction";
|
|
@@ -2212,14 +2991,15 @@ function SidebarMenuBadge({ className, ...props }) {
|
|
|
2212
2991
|
return /* @__PURE__ */ jsx("div", {
|
|
2213
2992
|
"data-slot": "sidebar-menu-badge",
|
|
2214
2993
|
"data-sidebar": "menu-badge",
|
|
2215
|
-
className: cn("
|
|
2994
|
+
className: cn("pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium text-sidebar-foreground tabular-nums select-none group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 peer-data-active/menu-button:text-sidebar-accent-foreground", className),
|
|
2216
2995
|
...props
|
|
2217
2996
|
});
|
|
2218
2997
|
}
|
|
2219
|
-
function SidebarMenuSkeleton({ className, showIcon = false, ...props }) {
|
|
2220
|
-
const
|
|
2998
|
+
function SidebarMenuSkeleton({ className, showIcon = false, width: widthProp, ...props }) {
|
|
2999
|
+
const [fallbackWidth] = React$1.useState(() => {
|
|
2221
3000
|
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
2222
|
-
}
|
|
3001
|
+
});
|
|
3002
|
+
const width = widthProp ?? fallbackWidth;
|
|
2223
3003
|
return /* @__PURE__ */ jsxs("div", {
|
|
2224
3004
|
"data-slot": "sidebar-menu-skeleton",
|
|
2225
3005
|
"data-sidebar": "menu-skeleton",
|
|
@@ -2239,7 +3019,7 @@ function SidebarMenuSub({ className, ...props }) {
|
|
|
2239
3019
|
return /* @__PURE__ */ jsx("ul", {
|
|
2240
3020
|
"data-slot": "sidebar-menu-sub",
|
|
2241
3021
|
"data-sidebar": "menu-sub",
|
|
2242
|
-
className: cn("
|
|
3022
|
+
className: cn("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5 group-data-[collapsible=icon]:hidden", className),
|
|
2243
3023
|
...props
|
|
2244
3024
|
});
|
|
2245
3025
|
}
|
|
@@ -2251,45 +3031,57 @@ function SidebarMenuSubItem({ className, ...props }) {
|
|
|
2251
3031
|
...props
|
|
2252
3032
|
});
|
|
2253
3033
|
}
|
|
2254
|
-
function SidebarMenuSubButton({
|
|
2255
|
-
return
|
|
2256
|
-
|
|
2257
|
-
"data-sidebar
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
3034
|
+
function SidebarMenuSubButton({ render, size = "md", isActive = false, className, ...props }) {
|
|
3035
|
+
return useRender({
|
|
3036
|
+
defaultTagName: "a",
|
|
3037
|
+
props: mergeProps({ className: cn("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground ring-sidebar-ring outline-hidden group-data-[collapsible=icon]:hidden hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[size=md]:text-sm data-[size=sm]:text-xs data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground", className) }, props),
|
|
3038
|
+
render,
|
|
3039
|
+
state: {
|
|
3040
|
+
slot: "sidebar-menu-sub-button",
|
|
3041
|
+
sidebar: "menu-sub-button",
|
|
3042
|
+
size,
|
|
3043
|
+
active: isActive
|
|
3044
|
+
}
|
|
2262
3045
|
});
|
|
2263
3046
|
}
|
|
2264
3047
|
|
|
2265
3048
|
//#endregion
|
|
2266
3049
|
//#region src/components/slider.tsx
|
|
2267
|
-
function Slider({ className, defaultValue, value, min = 0, max = 100, ...props }) {
|
|
3050
|
+
function Slider({ className, defaultValue, value, min = 0, max = 100, orientation = "horizontal", ...props }) {
|
|
2268
3051
|
const _values = React$1.useMemo(() => Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min, max], [
|
|
2269
3052
|
value,
|
|
2270
3053
|
defaultValue,
|
|
2271
3054
|
min,
|
|
2272
3055
|
max
|
|
2273
3056
|
]);
|
|
2274
|
-
return /* @__PURE__ */
|
|
3057
|
+
return /* @__PURE__ */ jsx(Slider$1.Root, {
|
|
3058
|
+
className: cn("data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full", className),
|
|
2275
3059
|
"data-slot": "slider",
|
|
3060
|
+
"data-orientation": orientation,
|
|
2276
3061
|
defaultValue,
|
|
2277
3062
|
value,
|
|
2278
3063
|
min,
|
|
2279
3064
|
max,
|
|
2280
|
-
|
|
3065
|
+
orientation,
|
|
3066
|
+
thumbAlignment: "edge",
|
|
2281
3067
|
...props,
|
|
2282
|
-
children:
|
|
2283
|
-
"data-
|
|
2284
|
-
className:
|
|
2285
|
-
children: /* @__PURE__ */ jsx(
|
|
2286
|
-
"data-slot": "slider-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
3068
|
+
children: /* @__PURE__ */ jsxs(Slider$1.Control, {
|
|
3069
|
+
"data-orientation": orientation,
|
|
3070
|
+
className: "relative flex w-full touch-none items-center select-none data-disabled:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-40 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",
|
|
3071
|
+
children: [/* @__PURE__ */ jsx(Slider$1.Track, {
|
|
3072
|
+
"data-slot": "slider-track",
|
|
3073
|
+
"data-orientation": orientation,
|
|
3074
|
+
className: "relative grow overflow-hidden rounded-full bg-muted select-none data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5",
|
|
3075
|
+
children: /* @__PURE__ */ jsx(Slider$1.Indicator, {
|
|
3076
|
+
"data-slot": "slider-range",
|
|
3077
|
+
"data-orientation": orientation,
|
|
3078
|
+
className: "bg-primary select-none data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full"
|
|
3079
|
+
})
|
|
3080
|
+
}), Array.from({ length: _values.length }, (_, index) => /* @__PURE__ */ jsx(Slider$1.Thumb, {
|
|
3081
|
+
"data-slot": "slider-thumb",
|
|
3082
|
+
className: "block size-4 shrink-0 rounded-full border border-ring bg-background shadow-sm ring-ring/50 transition-[color,box-shadow] select-none hover:ring-3 focus-visible:ring-3 focus-visible:outline-hidden data-disabled:pointer-events-none"
|
|
3083
|
+
}, index))]
|
|
3084
|
+
})
|
|
2293
3085
|
});
|
|
2294
3086
|
}
|
|
2295
3087
|
|
|
@@ -2301,12 +3093,22 @@ const Toaster = ({ ...props }) => {
|
|
|
2301
3093
|
theme,
|
|
2302
3094
|
className: "toaster group",
|
|
2303
3095
|
icons: {
|
|
2304
|
-
success: /* @__PURE__ */ jsx(
|
|
3096
|
+
success: /* @__PURE__ */ jsx(CircleCheck, { className: "size-4" }),
|
|
2305
3097
|
info: /* @__PURE__ */ jsx(Info, { className: "size-4" }),
|
|
2306
3098
|
warning: /* @__PURE__ */ jsx(TriangleAlertIcon, { className: "size-4" }),
|
|
2307
|
-
error: /* @__PURE__ */ jsx(
|
|
3099
|
+
error: /* @__PURE__ */ jsx(CircleAlertIcon, { className: "size-4" }),
|
|
2308
3100
|
loading: /* @__PURE__ */ jsx(Loader2Icon, { className: "size-4 animate-spin" })
|
|
2309
3101
|
},
|
|
3102
|
+
toastOptions: { classNames: {
|
|
3103
|
+
toast: "group toast !rounded-3xl !border !px-4 !py-4 !shadow-[0px_4px_12px_-1px_rgba(0,0,0,0.1)] !gap-2 !items-center",
|
|
3104
|
+
title: "!font-medium !text-sm",
|
|
3105
|
+
description: "!text-sm !text-muted-foreground",
|
|
3106
|
+
default: "",
|
|
3107
|
+
info: "!bg-info-background !border-info/35 [&_[data-icon]>svg]:!text-info",
|
|
3108
|
+
success: "!bg-success-background !border-success/35 [&_[data-icon]>svg]:!text-success",
|
|
3109
|
+
error: "!bg-destructive-background !border-destructive/35 [&_[data-icon]>svg]:!text-destructive",
|
|
3110
|
+
warning: "!bg-warning-background !border-warning/35 [&_[data-icon]>svg]:!text-warning"
|
|
3111
|
+
} },
|
|
2310
3112
|
style: {
|
|
2311
3113
|
"--normal-bg": "var(--popover)",
|
|
2312
3114
|
"--normal-text": "var(--popover-foreground)",
|
|
@@ -2353,44 +3155,45 @@ function Spinner({ className, size, ...props }) {
|
|
|
2353
3155
|
//#endregion
|
|
2354
3156
|
//#region src/components/switch.tsx
|
|
2355
3157
|
function Switch({ className, ...props }) {
|
|
2356
|
-
return /* @__PURE__ */ jsx(
|
|
3158
|
+
return /* @__PURE__ */ jsx(Switch$1.Root, {
|
|
2357
3159
|
"data-slot": "switch",
|
|
2358
|
-
className: cn("peer
|
|
3160
|
+
className: cn("peer relative inline-flex h-6 w-10 shrink-0 items-center rounded-full border border-transparent p-1 transition-all outline-none active:opacity-60 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 focus-visible:aria-invalid:ring-3 focus-visible:aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:focus-visible:aria-invalid:ring-destructive/40 data-checked:bg-primary aria-invalid:data-checked:bg-destructive data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50", className),
|
|
2359
3161
|
...props,
|
|
2360
|
-
children: /* @__PURE__ */ jsx(
|
|
3162
|
+
children: /* @__PURE__ */ jsx(Switch$1.Thumb, {
|
|
2361
3163
|
"data-slot": "switch-thumb",
|
|
2362
|
-
className:
|
|
3164
|
+
className: "pointer-events-none block size-4 rounded-full bg-background ring-0 transition-transform data-unchecked:translate-x-0 data-checked:translate-x-4 dark:data-checked:bg-primary-foreground dark:data-unchecked:bg-foreground"
|
|
2363
3165
|
})
|
|
2364
3166
|
});
|
|
2365
3167
|
}
|
|
2366
3168
|
|
|
2367
3169
|
//#endregion
|
|
2368
3170
|
//#region src/components/tabs.tsx
|
|
2369
|
-
function Tabs({ className, ...props }) {
|
|
2370
|
-
return /* @__PURE__ */ jsx(
|
|
3171
|
+
function Tabs({ className, orientation = "horizontal", ...props }) {
|
|
3172
|
+
return /* @__PURE__ */ jsx(Tabs$1.Root, {
|
|
2371
3173
|
"data-slot": "tabs",
|
|
2372
|
-
|
|
3174
|
+
"data-orientation": orientation,
|
|
3175
|
+
className: cn("group/tabs flex gap-2 data-[orientation=horizontal]:flex-col", className),
|
|
2373
3176
|
...props
|
|
2374
3177
|
});
|
|
2375
3178
|
}
|
|
2376
3179
|
function TabsList({ className, ...props }) {
|
|
2377
|
-
return /* @__PURE__ */ jsx(
|
|
3180
|
+
return /* @__PURE__ */ jsx(Tabs$1.List, {
|
|
2378
3181
|
"data-slot": "tabs-list",
|
|
2379
|
-
className: cn("
|
|
3182
|
+
className: cn("group/tabs-list inline-flex w-fit items-center justify-center gap-4 text-muted-foreground group-data-[orientation=horizontal]/tabs:h-9 group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col", className),
|
|
2380
3183
|
...props
|
|
2381
3184
|
});
|
|
2382
3185
|
}
|
|
2383
3186
|
function TabsTrigger({ className, ...props }) {
|
|
2384
|
-
return /* @__PURE__ */ jsx(
|
|
3187
|
+
return /* @__PURE__ */ jsx(Tabs$1.Tab, {
|
|
2385
3188
|
"data-slot": "tabs-trigger",
|
|
2386
|
-
className: cn("
|
|
3189
|
+
className: cn("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-3 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 has-data-[icon=inline-start]:pl-1 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground data-active:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", "after:absolute after:rounded-full after:bg-foreground after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-1.5 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0.5 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 data-active:after:opacity-100", className),
|
|
2387
3190
|
...props
|
|
2388
3191
|
});
|
|
2389
3192
|
}
|
|
2390
3193
|
function TabsContent({ className, ...props }) {
|
|
2391
|
-
return /* @__PURE__ */ jsx(
|
|
3194
|
+
return /* @__PURE__ */ jsx(Tabs$1.Panel, {
|
|
2392
3195
|
"data-slot": "tabs-content",
|
|
2393
|
-
className: cn("flex-1 outline-none", className),
|
|
3196
|
+
className: cn("flex-1 text-sm outline-none", className),
|
|
2394
3197
|
...props
|
|
2395
3198
|
});
|
|
2396
3199
|
}
|
|
@@ -2406,7 +3209,7 @@ function TabBar({ tabs, activeTab, onTabChange, renderTab, className }) {
|
|
|
2406
3209
|
className: "w-full h-auto flex border-t border-border bg-card p-0 rounded-none shadow-none",
|
|
2407
3210
|
children: tabs.map((tab) => /* @__PURE__ */ jsx(TabsTrigger, {
|
|
2408
3211
|
value: tab.value,
|
|
2409
|
-
className: ["flex flex-col items-center flex-1 py-2 px-0 transition-colors border-b-2 border-b-transparent rounded-none bg-transparent data-
|
|
3212
|
+
className: ["flex flex-col items-center flex-1 py-2 px-0 transition-colors border-b-2 border-b-transparent rounded-none bg-transparent data-active:shadow-none! dark:data-active:bg-transparent! dark:data-active:border-none!", activeTab === tab.value ? "text-foreground font-semibold border-b-primary" : "text-muted-foreground font-normal"].join(" "),
|
|
2410
3213
|
children: renderTab ? renderTab(tab, activeTab === tab.value) : /* @__PURE__ */ jsxs(Fragment, { children: [tab.renderIcon?.(), /* @__PURE__ */ jsx("span", {
|
|
2411
3214
|
className: "text-xs",
|
|
2412
3215
|
children: tab.label
|
|
@@ -2418,16 +3221,16 @@ function TabBar({ tabs, activeTab, onTabChange, renderTab, className }) {
|
|
|
2418
3221
|
|
|
2419
3222
|
//#endregion
|
|
2420
3223
|
//#region src/components/toggle.tsx
|
|
2421
|
-
const toggleVariants = cva("inline-flex items-center justify-center gap-
|
|
3224
|
+
const toggleVariants = cva("group/toggle inline-flex items-center justify-center gap-1 rounded-md bg-transparent text-sm font-medium whitespace-nowrap transition-all outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 data-disabled:pointer-events-none data-disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
|
|
2422
3225
|
variants: {
|
|
2423
3226
|
variant: {
|
|
2424
|
-
default: "bg-
|
|
2425
|
-
outline: "border border-input
|
|
3227
|
+
default: "data-pressed:bg-secondary data-pressed:text-secondary-foreground data-pressed:hover:bg-secondary data-pressed:hover:text-secondary-foreground",
|
|
3228
|
+
outline: "border border-input data-pressed:bg-muted"
|
|
2426
3229
|
},
|
|
2427
3230
|
size: {
|
|
2428
|
-
default: "h-
|
|
2429
|
-
sm: "h-
|
|
2430
|
-
lg: "h-10 px-2.5
|
|
3231
|
+
default: "h-8 min-w-8 px-2 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5",
|
|
3232
|
+
sm: "h-6 min-w-6 px-1.5 has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 [&_svg:not([class*='size-'])]:size-3.5",
|
|
3233
|
+
lg: "h-10 min-w-10 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2"
|
|
2431
3234
|
}
|
|
2432
3235
|
},
|
|
2433
3236
|
defaultVariants: {
|
|
@@ -2435,54 +3238,65 @@ const toggleVariants = cva("inline-flex items-center justify-center gap-2 rounde
|
|
|
2435
3238
|
size: "default"
|
|
2436
3239
|
}
|
|
2437
3240
|
});
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
})
|
|
2448
|
-
|
|
3241
|
+
function Toggle({ className, variant = "default", size = "default", ...props }) {
|
|
3242
|
+
return /* @__PURE__ */ jsx(Toggle$1, {
|
|
3243
|
+
"data-slot": "toggle",
|
|
3244
|
+
className: cn(toggleVariants({
|
|
3245
|
+
variant,
|
|
3246
|
+
size,
|
|
3247
|
+
className
|
|
3248
|
+
})),
|
|
3249
|
+
...props
|
|
3250
|
+
});
|
|
3251
|
+
}
|
|
2449
3252
|
|
|
2450
3253
|
//#endregion
|
|
2451
3254
|
//#region src/components/toggle-group.tsx
|
|
2452
3255
|
const ToggleGroupContext = React$1.createContext({
|
|
2453
3256
|
size: "default",
|
|
2454
|
-
variant: "default"
|
|
3257
|
+
variant: "default",
|
|
3258
|
+
spacing: 0,
|
|
3259
|
+
orientation: "horizontal",
|
|
3260
|
+
block: false
|
|
2455
3261
|
});
|
|
2456
|
-
function ToggleGroup({ className, variant, size, children, ...props }) {
|
|
2457
|
-
return /* @__PURE__ */ jsx(
|
|
3262
|
+
function ToggleGroup({ className, variant, size, spacing = 0, orientation = "horizontal", block = false, children, ...props }) {
|
|
3263
|
+
return /* @__PURE__ */ jsx(ToggleGroup$1, {
|
|
2458
3264
|
"data-slot": "toggle-group",
|
|
2459
3265
|
"data-variant": variant,
|
|
2460
3266
|
"data-size": size,
|
|
2461
|
-
|
|
3267
|
+
"data-spacing": spacing,
|
|
3268
|
+
"data-orientation": orientation,
|
|
3269
|
+
"data-block": block,
|
|
3270
|
+
style: { "--gap": spacing },
|
|
3271
|
+
className: cn("group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] rounded-md data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-stretch data-[block=true]:w-full", className),
|
|
2462
3272
|
...props,
|
|
2463
3273
|
children: /* @__PURE__ */ jsx(ToggleGroupContext.Provider, {
|
|
2464
3274
|
value: {
|
|
2465
3275
|
variant,
|
|
2466
|
-
size
|
|
3276
|
+
size,
|
|
3277
|
+
spacing,
|
|
3278
|
+
orientation,
|
|
3279
|
+
block
|
|
2467
3280
|
},
|
|
2468
3281
|
children
|
|
2469
3282
|
})
|
|
2470
3283
|
});
|
|
2471
3284
|
}
|
|
2472
|
-
function ToggleGroupItem({ className, children, variant, size, ...props }) {
|
|
3285
|
+
function ToggleGroupItem({ className, children, variant = "default", size = "default", ...props }) {
|
|
2473
3286
|
const context = React$1.useContext(ToggleGroupContext);
|
|
2474
|
-
return /* @__PURE__ */ jsx(
|
|
3287
|
+
return /* @__PURE__ */ jsx(Toggle$1, {
|
|
2475
3288
|
"data-slot": "toggle-group-item",
|
|
2476
3289
|
"data-variant": context.variant || variant,
|
|
2477
3290
|
"data-size": context.size || size,
|
|
2478
|
-
|
|
3291
|
+
"data-spacing": context.spacing,
|
|
3292
|
+
className: cn("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-[orientation=horizontal]/toggle-group:data-[spacing=0]:first:rounded-l-md group-data-[orientation=vertical]/toggle-group:data-[spacing=0]:first:rounded-t-md group-data-[orientation=horizontal]/toggle-group:data-[spacing=0]:last:rounded-r-md group-data-[orientation=vertical]/toggle-group:data-[spacing=0]:last:rounded-b-md group-data-[orientation=horizontal]/toggle-group:data-[spacing=0]:border-l-0 group-data-[orientation=vertical]/toggle-group:data-[spacing=0]:border-t-0 group-data-[orientation=horizontal]/toggle-group:data-[spacing=0]:first:border-l group-data-[orientation=vertical]/toggle-group:data-[spacing=0]:first:border-t group-data-[block=true]/toggle-group:flex-1", toggleVariants({
|
|
2479
3293
|
variant: context.variant || variant,
|
|
2480
3294
|
size: context.size || size
|
|
2481
|
-
}),
|
|
3295
|
+
}), className),
|
|
2482
3296
|
...props,
|
|
2483
3297
|
children
|
|
2484
3298
|
});
|
|
2485
3299
|
}
|
|
2486
3300
|
|
|
2487
3301
|
//#endregion
|
|
2488
|
-
export { Alert, AlertAction, AlertDescription, AlertTitle, Avatar, AvatarFallback, AvatarImage, Badge, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, CountryFlag, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader,
|
|
3302
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertAction, AlertAction as BannerAction, AlertDescription, AlertDescription as BannerDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AlertTitle as BannerTitle, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, BadgeGroup, BadgeGroupCount, Banner, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Calendar, CalendarDayButton, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, CounterBadge, CountryFlag, DataTable, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerBackdrop, DrawerBar, DrawerClose, DrawerContent, DrawerCreateHandle, DrawerDescription, DrawerFooter, DrawerHeader, DrawerMenu, DrawerMenuCheckboxItem, DrawerMenuGroup, DrawerMenuGroupLabel, DrawerMenuItem, DrawerMenuRadioGroup, DrawerMenuRadioItem, DrawerMenuSeparator, DrawerMenuTrigger, DrawerPanel, DrawerPopup, DrawerPortal, DrawerPrimitive, DrawerSwipeArea, DrawerTitle, DrawerTrigger, DrawerViewport, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmojiPicker, EmojiPickerCategories, EmojiPickerContent, EmojiPickerTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Label, List, ListCol, ListRow, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, Progress, ProgressIndicator, ProgressLabel, ProgressTrack, ProgressValue, RadioGroup, RadioGroupItem, ScrollArea, ScrollAreaPrimitive, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Slot, Spinner, Switch, TabBar, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThemeProvider, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, alertVariants, badgeVariants, bannerVariants, buttonGroupVariants, buttonVariants, cn, counterBadgeVariants, selectTriggerVariants, spinnerVariants, toast, toggleVariants, useComboboxAnchor, useSidebar, useTheme };
|