ui-arreya-components 0.0.16 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +342 -0
- package/dist/index.d.ts +342 -0
- package/dist/index.js +1682 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +1495 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +61 -106
- package/.github/workflows/npm-publish.yml +0 -35
- package/.storybook/main.ts +0 -18
- package/.storybook/preview.ts +0 -16
- package/.storybook/vitest.setup.ts +0 -9
- package/README.md +0 -62
- package/components.json +0 -21
- package/dist/styles.css +0 -3
- package/dist/ui.cjs.js +0 -242
- package/dist/ui.es.js +0 -25142
- package/dist/ui.umd.js +0 -242
- package/eslint.config.js +0 -28
- package/postcss.config.js +0 -6
- package/scripts/build-index-ts.sh +0 -16
- package/scripts/template.sh +0 -57
- package/src/components/feature/graph-card.stories.tsx +0 -138
- package/src/components/feature/graph-card.tsx +0 -113
- package/src/components/feature/header.stories.tsx +0 -129
- package/src/components/feature/header.tsx +0 -78
- package/src/components/feature/login-form.stories.tsx +0 -35
- package/src/components/feature/login-form.tsx +0 -97
- package/src/components/feature/search-bar.stories.tsx +0 -35
- package/src/components/feature/search-bar.tsx +0 -141
- package/src/components/feature/wizard.stories.tsx +0 -199
- package/src/components/feature/wizard.tsx +0 -278
- package/src/components/ui/accordion.stories.tsx.disabled +0 -36
- package/src/components/ui/accordion.tsx +0 -55
- package/src/components/ui/alert-dialog.stories.tsx +0 -46
- package/src/components/ui/alert-dialog.tsx +0 -139
- package/src/components/ui/alert.stories.tsx +0 -45
- package/src/components/ui/alert.tsx +0 -59
- package/src/components/ui/aspect-ratio.stories.tsx +0 -24
- package/src/components/ui/aspect-ratio.tsx +0 -5
- package/src/components/ui/avatar.stories.tsx +0 -29
- package/src/components/ui/avatar.tsx +0 -48
- package/src/components/ui/badge.stories.tsx +0 -43
- package/src/components/ui/badge.tsx +0 -36
- package/src/components/ui/breadcrumb.stories.tsx +0 -146
- package/src/components/ui/breadcrumb.tsx +0 -115
- package/src/components/ui/button.stories.tsx +0 -87
- package/src/components/ui/button.tsx +0 -57
- package/src/components/ui/card.stories.tsx +0 -99
- package/src/components/ui/card.tsx +0 -76
- package/src/components/ui/carousel.stories.tsx +0 -47
- package/src/components/ui/carousel.tsx +0 -260
- package/src/components/ui/chart.stories.tsx.disabled +0 -44
- package/src/components/ui/chart.tsx +0 -363
- package/src/components/ui/checkbox.stories.tsx +0 -56
- package/src/components/ui/checkbox.tsx +0 -28
- package/src/components/ui/collapsible.stories.tsx +0 -58
- package/src/components/ui/collapsible.tsx +0 -9
- package/src/components/ui/context-menu.stories.tsx +0 -34
- package/src/components/ui/context-menu.tsx +0 -198
- package/src/components/ui/dialog.stories.tsx +0 -40
- package/src/components/ui/dialog.tsx +0 -120
- package/src/components/ui/drawer.stories.tsx +0 -48
- package/src/components/ui/drawer.tsx +0 -116
- package/src/components/ui/dropdown-menu.stories.tsx +0 -92
- package/src/components/ui/dropdown-menu.tsx +0 -199
- package/src/components/ui/form.tsx +0 -176
- package/src/components/ui/hover-card.stories.tsx +0 -31
- package/src/components/ui/hover-card.tsx +0 -27
- package/src/components/ui/input-otp.tsx +0 -69
- package/src/components/ui/input.stories.tsx +0 -63
- package/src/components/ui/input.tsx +0 -22
- package/src/components/ui/label.tsx +0 -24
- package/src/components/ui/menubar.tsx +0 -254
- package/src/components/ui/navigation-menu.tsx +0 -128
- package/src/components/ui/pagination.tsx +0 -117
- package/src/components/ui/popover.tsx +0 -31
- package/src/components/ui/progress.tsx +0 -26
- package/src/components/ui/radio-group.tsx +0 -42
- package/src/components/ui/resizable.tsx +0 -43
- package/src/components/ui/scroll-area.tsx +0 -46
- package/src/components/ui/select.tsx +0 -157
- package/src/components/ui/separator.tsx +0 -29
- package/src/components/ui/sheet.tsx +0 -138
- package/src/components/ui/sidebar.tsx +0 -771
- package/src/components/ui/skeleton.tsx +0 -15
- package/src/components/ui/slider.tsx +0 -26
- package/src/components/ui/sonner.tsx +0 -29
- package/src/components/ui/switch.tsx +0 -27
- package/src/components/ui/table.tsx +0 -120
- package/src/components/ui/tabs.tsx +0 -53
- package/src/components/ui/textarea.tsx +0 -22
- package/src/components/ui/toast.tsx +0 -127
- package/src/components/ui/toaster.tsx +0 -33
- package/src/components/ui/toggle-group.tsx +0 -59
- package/src/components/ui/toggle.tsx +0 -43
- package/src/components/ui/tooltip.tsx +0 -30
- package/src/hooks/use-mobile.tsx +0 -19
- package/src/hooks/use-toast.ts +0 -194
- package/src/index.css +0 -3633
- package/src/index.ts +0 -51
- package/src/lib/types.ts +0 -5
- package/src/lib/utils.ts +0 -6
- package/src/styles/tailwind.css +0 -100
- package/tailwind.config.js +0 -94
- package/tsconfig.app.json +0 -30
- package/tsconfig.json +0 -13
- package/tsconfig.node.json +0 -24
- package/vite.config.ts +0 -33
- package/vitest.workspace.ts +0 -32
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,1495 @@
|
|
|
1
|
+
import { forwardRef, createContext, useId, useState, useCallback, useEffect, useMemo, useContext } from 'react';
|
|
2
|
+
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
|
3
|
+
import { clsx } from 'clsx';
|
|
4
|
+
import { twMerge } from 'tailwind-merge';
|
|
5
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
6
|
+
import { cva } from 'class-variance-authority';
|
|
7
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
8
|
+
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
9
|
+
import { Check, X, Search, ChevronRight, Circle, ChevronDown, ChevronUp, PanelLeft, MoreHorizontal, ChevronLeft } from 'lucide-react';
|
|
10
|
+
import { DayPicker } from 'react-day-picker';
|
|
11
|
+
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
12
|
+
import { Command as Command$1 } from 'cmdk';
|
|
13
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
14
|
+
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
15
|
+
import { useFormContext, FormProvider, Controller } from 'react-hook-form';
|
|
16
|
+
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
17
|
+
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
18
|
+
import * as ProgressPrimitive from '@radix-ui/react-progress';
|
|
19
|
+
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
20
|
+
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
21
|
+
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
22
|
+
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
23
|
+
import { useTheme } from 'next-themes';
|
|
24
|
+
import { Toaster as Toaster$1 } from 'sonner';
|
|
25
|
+
import * as SwitchPrimitives from '@radix-ui/react-switch';
|
|
26
|
+
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
27
|
+
|
|
28
|
+
function cn(...inputs) {
|
|
29
|
+
return twMerge(clsx(inputs));
|
|
30
|
+
}
|
|
31
|
+
var buttonVariants = cva(
|
|
32
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
33
|
+
{
|
|
34
|
+
variants: {
|
|
35
|
+
variant: {
|
|
36
|
+
default: "bg-button-primary text-primary-background shadow hover:bg-primary/90 rounded-full",
|
|
37
|
+
destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
|
|
38
|
+
outline: "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
|
|
39
|
+
secondary: "bg-button-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
|
|
40
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
41
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
42
|
+
},
|
|
43
|
+
size: {
|
|
44
|
+
default: "h-9 px-8 py-4",
|
|
45
|
+
sm: "h-8 rounded-md px-3 text-xs",
|
|
46
|
+
lg: "h-10 rounded-md px-8",
|
|
47
|
+
icon: "h-12 w-12"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
defaultVariants: {
|
|
51
|
+
variant: "default",
|
|
52
|
+
size: "default"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
);
|
|
56
|
+
var Button = forwardRef(
|
|
57
|
+
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
58
|
+
const Comp = asChild ? Slot : "button";
|
|
59
|
+
return /* @__PURE__ */ jsx(Comp, { className: cn(buttonVariants({ variant, size, className })), ref, ...props });
|
|
60
|
+
}
|
|
61
|
+
);
|
|
62
|
+
Button.displayName = "Button";
|
|
63
|
+
var AlertDialog = AlertDialogPrimitive.Root;
|
|
64
|
+
var AlertDialogTrigger = AlertDialogPrimitive.Trigger;
|
|
65
|
+
var AlertDialogPortal = AlertDialogPrimitive.Portal;
|
|
66
|
+
var AlertDialogOverlay = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
67
|
+
AlertDialogPrimitive.Overlay,
|
|
68
|
+
{
|
|
69
|
+
className: cn(
|
|
70
|
+
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
71
|
+
className
|
|
72
|
+
),
|
|
73
|
+
...props,
|
|
74
|
+
ref
|
|
75
|
+
}
|
|
76
|
+
));
|
|
77
|
+
AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
|
|
78
|
+
var AlertDialogContent = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [
|
|
79
|
+
/* @__PURE__ */ jsx(AlertDialogOverlay, {}),
|
|
80
|
+
/* @__PURE__ */ jsx(
|
|
81
|
+
AlertDialogPrimitive.Content,
|
|
82
|
+
{
|
|
83
|
+
ref,
|
|
84
|
+
className: cn(
|
|
85
|
+
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
|
|
86
|
+
className
|
|
87
|
+
),
|
|
88
|
+
...props
|
|
89
|
+
}
|
|
90
|
+
)
|
|
91
|
+
] }));
|
|
92
|
+
AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;
|
|
93
|
+
var AlertDialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn("flex flex-col space-y-2 text-center sm:text-left", className), ...props });
|
|
94
|
+
AlertDialogHeader.displayName = "AlertDialogHeader";
|
|
95
|
+
var AlertDialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className), ...props });
|
|
96
|
+
AlertDialogFooter.displayName = "AlertDialogFooter";
|
|
97
|
+
var AlertDialogTitle = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(AlertDialogPrimitive.Title, { ref, className: cn("text-lg font-semibold", className), ...props }));
|
|
98
|
+
AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
|
|
99
|
+
var AlertDialogDescription = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(AlertDialogPrimitive.Description, { ref, className: cn("text-sm text-muted-foreground", className), ...props }));
|
|
100
|
+
AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
|
|
101
|
+
var AlertDialogAction = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(AlertDialogPrimitive.Action, { ref, className: cn(buttonVariants(), className), ...props }));
|
|
102
|
+
AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
|
|
103
|
+
var AlertDialogCancel = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
104
|
+
AlertDialogPrimitive.Cancel,
|
|
105
|
+
{
|
|
106
|
+
ref,
|
|
107
|
+
className: cn(buttonVariants({ variant: "outline" }), "mt-2 sm:mt-0", className),
|
|
108
|
+
...props
|
|
109
|
+
}
|
|
110
|
+
));
|
|
111
|
+
AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
|
|
112
|
+
var alertVariants = cva(
|
|
113
|
+
"relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",
|
|
114
|
+
{
|
|
115
|
+
variants: {
|
|
116
|
+
variant: {
|
|
117
|
+
default: "bg-background text-foreground",
|
|
118
|
+
destructive: "border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
defaultVariants: {
|
|
122
|
+
variant: "default"
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
);
|
|
126
|
+
var Alert = forwardRef(
|
|
127
|
+
({ className, variant, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, role: "alert", className: cn(alertVariants({ variant }), className), ...props })
|
|
128
|
+
);
|
|
129
|
+
Alert.displayName = "Alert";
|
|
130
|
+
var AlertTitle = forwardRef(
|
|
131
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx("h5", { ref, className: cn("mb-1 font-medium leading-none tracking-tight", className), ...props })
|
|
132
|
+
);
|
|
133
|
+
AlertTitle.displayName = "AlertTitle";
|
|
134
|
+
var AlertDescription = forwardRef(
|
|
135
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("text-sm [&_p]:leading-relaxed", className), ...props })
|
|
136
|
+
);
|
|
137
|
+
AlertDescription.displayName = "AlertDescription";
|
|
138
|
+
var Avatar = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
139
|
+
AvatarPrimitive.Root,
|
|
140
|
+
{
|
|
141
|
+
ref,
|
|
142
|
+
className: cn("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full", className),
|
|
143
|
+
...props
|
|
144
|
+
}
|
|
145
|
+
));
|
|
146
|
+
Avatar.displayName = AvatarPrimitive.Root.displayName;
|
|
147
|
+
var AvatarImage = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(AvatarPrimitive.Image, { ref, className: cn("aspect-square h-full w-full", className), ...props }));
|
|
148
|
+
AvatarImage.displayName = AvatarPrimitive.Image.displayName;
|
|
149
|
+
var AvatarFallback = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
150
|
+
AvatarPrimitive.Fallback,
|
|
151
|
+
{
|
|
152
|
+
ref,
|
|
153
|
+
className: cn("flex h-full w-full items-center justify-center rounded-full bg-muted", className),
|
|
154
|
+
...props
|
|
155
|
+
}
|
|
156
|
+
));
|
|
157
|
+
AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
|
|
158
|
+
var badgeVariants = cva(
|
|
159
|
+
"inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
160
|
+
{
|
|
161
|
+
variants: {
|
|
162
|
+
variant: {
|
|
163
|
+
default: "border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",
|
|
164
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
165
|
+
destructive: "border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",
|
|
166
|
+
outline: "text-foreground"
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
defaultVariants: {
|
|
170
|
+
variant: "default"
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
);
|
|
174
|
+
var Badge = forwardRef(({ className, variant, ...props }, ref) => {
|
|
175
|
+
return /* @__PURE__ */ jsx("div", { ref, className: cn(badgeVariants({ variant }), className), ...props });
|
|
176
|
+
});
|
|
177
|
+
Badge.displayName = "Badge";
|
|
178
|
+
var Breadcrumb = forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx("nav", { ref, "aria-label": "breadcrumb", ...props }));
|
|
179
|
+
Breadcrumb.displayName = "Breadcrumb";
|
|
180
|
+
var BreadcrumbList = forwardRef(
|
|
181
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
182
|
+
"ol",
|
|
183
|
+
{
|
|
184
|
+
ref,
|
|
185
|
+
className: cn(
|
|
186
|
+
"flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",
|
|
187
|
+
className
|
|
188
|
+
),
|
|
189
|
+
...props
|
|
190
|
+
}
|
|
191
|
+
)
|
|
192
|
+
);
|
|
193
|
+
BreadcrumbList.displayName = "BreadcrumbList";
|
|
194
|
+
var BreadcrumbItem = forwardRef(
|
|
195
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx("li", { ref, className: cn("inline-flex items-center gap-1.5", className), ...props })
|
|
196
|
+
);
|
|
197
|
+
BreadcrumbItem.displayName = "BreadcrumbItem";
|
|
198
|
+
var BreadcrumbLink = forwardRef(({ asChild, className, ...props }, ref) => {
|
|
199
|
+
const Comp = asChild ? Slot : "a";
|
|
200
|
+
return /* @__PURE__ */ jsx(Comp, { ref, className: cn("transition-colors hover:text-foreground", className), ...props });
|
|
201
|
+
});
|
|
202
|
+
BreadcrumbLink.displayName = "BreadcrumbLink";
|
|
203
|
+
var BreadcrumbPage = forwardRef(
|
|
204
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
205
|
+
"span",
|
|
206
|
+
{
|
|
207
|
+
ref,
|
|
208
|
+
role: "link",
|
|
209
|
+
"aria-disabled": "true",
|
|
210
|
+
"aria-current": "page",
|
|
211
|
+
className: cn("font-normal text-foreground", className),
|
|
212
|
+
...props
|
|
213
|
+
}
|
|
214
|
+
)
|
|
215
|
+
);
|
|
216
|
+
BreadcrumbPage.displayName = "BreadcrumbPage";
|
|
217
|
+
var BreadcrumbSeparator = ({ children, className, ...props }) => /* @__PURE__ */ jsx("li", { role: "presentation", "aria-hidden": "true", className: cn("[&>svg]:w-3.5 [&>svg]:h-3.5", className), ...props, children: children ?? /* @__PURE__ */ jsx(ChevronRight, {}) });
|
|
218
|
+
BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
|
|
219
|
+
var BreadcrumbEllipsis = ({ className, ...props }) => /* @__PURE__ */ jsxs(
|
|
220
|
+
"span",
|
|
221
|
+
{
|
|
222
|
+
role: "presentation",
|
|
223
|
+
"aria-hidden": "true",
|
|
224
|
+
className: cn("flex h-9 w-9 items-center justify-center", className),
|
|
225
|
+
...props,
|
|
226
|
+
children: [
|
|
227
|
+
/* @__PURE__ */ jsx(MoreHorizontal, { className: "h-4 w-4" }),
|
|
228
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "More" })
|
|
229
|
+
]
|
|
230
|
+
}
|
|
231
|
+
);
|
|
232
|
+
BreadcrumbEllipsis.displayName = "BreadcrumbElipssis";
|
|
233
|
+
function Calendar({ className, classNames, showOutsideDays = true, ...props }) {
|
|
234
|
+
return /* @__PURE__ */ jsx(
|
|
235
|
+
DayPicker,
|
|
236
|
+
{
|
|
237
|
+
showOutsideDays,
|
|
238
|
+
className: cn("p-3", className),
|
|
239
|
+
classNames: {
|
|
240
|
+
months: "flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",
|
|
241
|
+
month: "space-y-4",
|
|
242
|
+
caption: "flex justify-center pt-1 relative items-center",
|
|
243
|
+
caption_label: "text-sm font-medium",
|
|
244
|
+
nav: "space-x-1 flex items-center",
|
|
245
|
+
nav_button: cn(
|
|
246
|
+
buttonVariants({ variant: "outline" }),
|
|
247
|
+
"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"
|
|
248
|
+
),
|
|
249
|
+
nav_button_previous: "absolute left-1",
|
|
250
|
+
nav_button_next: "absolute right-1",
|
|
251
|
+
table: "w-full border-collapse space-y-1",
|
|
252
|
+
head_row: "flex",
|
|
253
|
+
head_cell: "text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",
|
|
254
|
+
row: "flex w-full mt-2",
|
|
255
|
+
cell: cn(
|
|
256
|
+
"relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md",
|
|
257
|
+
props.mode === "range" ? "[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md" : "[&:has([aria-selected])]:rounded-md"
|
|
258
|
+
),
|
|
259
|
+
day: cn(buttonVariants({ variant: "ghost" }), "h-8 w-8 p-0 font-normal aria-selected:opacity-100"),
|
|
260
|
+
day_range_start: "day-range-start",
|
|
261
|
+
day_range_end: "day-range-end",
|
|
262
|
+
day_selected: "bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",
|
|
263
|
+
day_today: "bg-accent text-accent-foreground",
|
|
264
|
+
day_outside: "day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",
|
|
265
|
+
day_disabled: "text-muted-foreground opacity-50",
|
|
266
|
+
day_range_middle: "aria-selected:bg-accent aria-selected:text-accent-foreground",
|
|
267
|
+
day_hidden: "invisible",
|
|
268
|
+
...classNames
|
|
269
|
+
},
|
|
270
|
+
components: {
|
|
271
|
+
IconLeft: ({ className: className2, ...props2 }) => /* @__PURE__ */ jsx(ChevronLeft, { className: cn("h-4 w-4", className2), ...props2 }),
|
|
272
|
+
IconRight: ({ className: className2, ...props2 }) => /* @__PURE__ */ jsx(ChevronRight, { className: cn("h-4 w-4", className2), ...props2 })
|
|
273
|
+
},
|
|
274
|
+
...props
|
|
275
|
+
}
|
|
276
|
+
);
|
|
277
|
+
}
|
|
278
|
+
Calendar.displayName = "Calendar";
|
|
279
|
+
var Card = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("rounded-xl border bg-card text-card-foreground shadow", className), ...props }));
|
|
280
|
+
Card.displayName = "Card";
|
|
281
|
+
var CardHeader = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("flex flex-col space-y-1.5 p-6", className), ...props }));
|
|
282
|
+
CardHeader.displayName = "CardHeader";
|
|
283
|
+
var CardTitle = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("font-semibold leading-none tracking-tight", className), ...props }));
|
|
284
|
+
CardTitle.displayName = "CardTitle";
|
|
285
|
+
var CardDescription = forwardRef(
|
|
286
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("text-sm text-muted-foreground", className), ...props })
|
|
287
|
+
);
|
|
288
|
+
CardDescription.displayName = "CardDescription";
|
|
289
|
+
var CardContent = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("p-6 pt-0", className), ...props }));
|
|
290
|
+
CardContent.displayName = "CardContent";
|
|
291
|
+
var CardFooter = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("flex items-center p-6 pt-0", className), ...props }));
|
|
292
|
+
CardFooter.displayName = "CardFooter";
|
|
293
|
+
var Checkbox = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
294
|
+
CheckboxPrimitive.Root,
|
|
295
|
+
{
|
|
296
|
+
ref,
|
|
297
|
+
className: cn(
|
|
298
|
+
"peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
|
|
299
|
+
className
|
|
300
|
+
),
|
|
301
|
+
...props,
|
|
302
|
+
children: /* @__PURE__ */ jsx(CheckboxPrimitive.Indicator, { className: cn("flex items-center justify-center text-current"), children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" }) })
|
|
303
|
+
}
|
|
304
|
+
));
|
|
305
|
+
Checkbox.displayName = CheckboxPrimitive.Root.displayName;
|
|
306
|
+
var Dialog = DialogPrimitive.Root;
|
|
307
|
+
var DialogTrigger = DialogPrimitive.Trigger;
|
|
308
|
+
var DialogPortal = DialogPrimitive.Portal;
|
|
309
|
+
var DialogClose = DialogPrimitive.Close;
|
|
310
|
+
var DialogOverlay = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
311
|
+
DialogPrimitive.Overlay,
|
|
312
|
+
{
|
|
313
|
+
ref,
|
|
314
|
+
className: cn(
|
|
315
|
+
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
316
|
+
className
|
|
317
|
+
),
|
|
318
|
+
...props
|
|
319
|
+
}
|
|
320
|
+
));
|
|
321
|
+
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
322
|
+
var DialogContent = forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DialogPortal, { children: [
|
|
323
|
+
/* @__PURE__ */ jsx(DialogOverlay, {}),
|
|
324
|
+
/* @__PURE__ */ jsxs(
|
|
325
|
+
DialogPrimitive.Content,
|
|
326
|
+
{
|
|
327
|
+
ref,
|
|
328
|
+
className: cn(
|
|
329
|
+
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
|
|
330
|
+
className
|
|
331
|
+
),
|
|
332
|
+
...props,
|
|
333
|
+
children: [
|
|
334
|
+
children,
|
|
335
|
+
/* @__PURE__ */ jsxs(DialogPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
|
|
336
|
+
/* @__PURE__ */ jsx(X, { className: "h-4 w-4" }),
|
|
337
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
338
|
+
] })
|
|
339
|
+
]
|
|
340
|
+
}
|
|
341
|
+
)
|
|
342
|
+
] }));
|
|
343
|
+
DialogContent.displayName = DialogPrimitive.Content.displayName;
|
|
344
|
+
var DialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn("flex flex-col space-y-1.5 text-center sm:text-left", className), ...props });
|
|
345
|
+
DialogHeader.displayName = "DialogHeader";
|
|
346
|
+
var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className), ...props });
|
|
347
|
+
DialogFooter.displayName = "DialogFooter";
|
|
348
|
+
var DialogTitle = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
349
|
+
DialogPrimitive.Title,
|
|
350
|
+
{
|
|
351
|
+
ref,
|
|
352
|
+
className: cn("text-lg font-semibold leading-none tracking-tight", className),
|
|
353
|
+
...props
|
|
354
|
+
}
|
|
355
|
+
));
|
|
356
|
+
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
357
|
+
var DialogDescription = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(DialogPrimitive.Description, { ref, className: cn("text-sm text-muted-foreground", className), ...props }));
|
|
358
|
+
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
359
|
+
var Command = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
360
|
+
Command$1,
|
|
361
|
+
{
|
|
362
|
+
ref,
|
|
363
|
+
className: cn(
|
|
364
|
+
"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
|
|
365
|
+
className
|
|
366
|
+
),
|
|
367
|
+
...props
|
|
368
|
+
}
|
|
369
|
+
));
|
|
370
|
+
Command.displayName = Command$1.displayName;
|
|
371
|
+
var CommandDialog = ({ children, ...props }) => {
|
|
372
|
+
return /* @__PURE__ */ jsx(Dialog, { ...props, children: /* @__PURE__ */ jsx(DialogContent, { className: "overflow-hidden p-0", children: /* @__PURE__ */ jsx(Command, { className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children }) }) });
|
|
373
|
+
};
|
|
374
|
+
var CommandInput = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs("div", { className: "flex items-center border-b px-3", children: [
|
|
375
|
+
/* @__PURE__ */ jsx(Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
376
|
+
/* @__PURE__ */ jsx(
|
|
377
|
+
Command$1.Input,
|
|
378
|
+
{
|
|
379
|
+
ref,
|
|
380
|
+
className: cn(
|
|
381
|
+
"flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
|
|
382
|
+
className
|
|
383
|
+
),
|
|
384
|
+
...props
|
|
385
|
+
}
|
|
386
|
+
)
|
|
387
|
+
] }));
|
|
388
|
+
CommandInput.displayName = Command$1.Input.displayName;
|
|
389
|
+
var CommandList = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
390
|
+
Command$1.List,
|
|
391
|
+
{
|
|
392
|
+
ref,
|
|
393
|
+
className: cn("max-h-[300px] overflow-y-auto overflow-x-hidden", className),
|
|
394
|
+
...props
|
|
395
|
+
}
|
|
396
|
+
));
|
|
397
|
+
CommandList.displayName = Command$1.List.displayName;
|
|
398
|
+
var CommandEmpty = forwardRef((props, ref) => /* @__PURE__ */ jsx(Command$1.Empty, { ref, className: "py-6 text-center text-sm", ...props }));
|
|
399
|
+
CommandEmpty.displayName = Command$1.Empty.displayName;
|
|
400
|
+
var CommandGroup = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
401
|
+
Command$1.Group,
|
|
402
|
+
{
|
|
403
|
+
ref,
|
|
404
|
+
className: cn(
|
|
405
|
+
"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
|
|
406
|
+
className
|
|
407
|
+
),
|
|
408
|
+
...props
|
|
409
|
+
}
|
|
410
|
+
));
|
|
411
|
+
CommandGroup.displayName = Command$1.Group.displayName;
|
|
412
|
+
var CommandSeparator = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Command$1.Separator, { ref, className: cn("-mx-1 h-px bg-border", className), ...props }));
|
|
413
|
+
CommandSeparator.displayName = Command$1.Separator.displayName;
|
|
414
|
+
var CommandItem = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
415
|
+
Command$1.Item,
|
|
416
|
+
{
|
|
417
|
+
ref,
|
|
418
|
+
className: cn(
|
|
419
|
+
"relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
420
|
+
className
|
|
421
|
+
),
|
|
422
|
+
...props
|
|
423
|
+
}
|
|
424
|
+
));
|
|
425
|
+
CommandItem.displayName = Command$1.Item.displayName;
|
|
426
|
+
var CommandShortcut = ({ className, ...props }) => {
|
|
427
|
+
return /* @__PURE__ */ jsx("span", { className: cn("ml-auto text-xs tracking-widest text-muted-foreground", className), ...props });
|
|
428
|
+
};
|
|
429
|
+
CommandShortcut.displayName = "CommandShortcut";
|
|
430
|
+
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
431
|
+
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
432
|
+
var DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
433
|
+
var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
434
|
+
var DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
435
|
+
var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
436
|
+
var DropdownMenuSubTrigger = forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
437
|
+
DropdownMenuPrimitive.SubTrigger,
|
|
438
|
+
{
|
|
439
|
+
ref,
|
|
440
|
+
className: cn(
|
|
441
|
+
"flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
442
|
+
inset && "pl-8",
|
|
443
|
+
className
|
|
444
|
+
),
|
|
445
|
+
...props,
|
|
446
|
+
children: [
|
|
447
|
+
children,
|
|
448
|
+
/* @__PURE__ */ jsx(ChevronRight, { className: "ml-auto" })
|
|
449
|
+
]
|
|
450
|
+
}
|
|
451
|
+
));
|
|
452
|
+
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
453
|
+
var DropdownMenuSubContent = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
454
|
+
DropdownMenuPrimitive.SubContent,
|
|
455
|
+
{
|
|
456
|
+
ref,
|
|
457
|
+
className: cn(
|
|
458
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-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",
|
|
459
|
+
className
|
|
460
|
+
),
|
|
461
|
+
...props
|
|
462
|
+
}
|
|
463
|
+
));
|
|
464
|
+
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
465
|
+
var DropdownMenuContent = forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
466
|
+
DropdownMenuPrimitive.Content,
|
|
467
|
+
{
|
|
468
|
+
ref,
|
|
469
|
+
sideOffset,
|
|
470
|
+
className: cn(
|
|
471
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
|
|
472
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-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",
|
|
473
|
+
className
|
|
474
|
+
),
|
|
475
|
+
...props
|
|
476
|
+
}
|
|
477
|
+
) }));
|
|
478
|
+
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
479
|
+
var DropdownMenuItem = forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
480
|
+
DropdownMenuPrimitive.Item,
|
|
481
|
+
{
|
|
482
|
+
ref,
|
|
483
|
+
className: cn(
|
|
484
|
+
"relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
485
|
+
inset && "pl-8",
|
|
486
|
+
className
|
|
487
|
+
),
|
|
488
|
+
...props
|
|
489
|
+
}
|
|
490
|
+
));
|
|
491
|
+
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
492
|
+
var DropdownMenuCheckboxItem = forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
493
|
+
DropdownMenuPrimitive.CheckboxItem,
|
|
494
|
+
{
|
|
495
|
+
ref,
|
|
496
|
+
className: cn(
|
|
497
|
+
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
498
|
+
className
|
|
499
|
+
),
|
|
500
|
+
checked,
|
|
501
|
+
...props,
|
|
502
|
+
children: [
|
|
503
|
+
/* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" }) }) }),
|
|
504
|
+
children
|
|
505
|
+
]
|
|
506
|
+
}
|
|
507
|
+
));
|
|
508
|
+
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
509
|
+
var DropdownMenuRadioItem = forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
510
|
+
DropdownMenuPrimitive.RadioItem,
|
|
511
|
+
{
|
|
512
|
+
ref,
|
|
513
|
+
className: cn(
|
|
514
|
+
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
515
|
+
className
|
|
516
|
+
),
|
|
517
|
+
...props,
|
|
518
|
+
children: [
|
|
519
|
+
/* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Circle, { className: "h-2 w-2 fill-current" }) }) }),
|
|
520
|
+
children
|
|
521
|
+
]
|
|
522
|
+
}
|
|
523
|
+
));
|
|
524
|
+
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
525
|
+
var DropdownMenuLabel = forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
526
|
+
DropdownMenuPrimitive.Label,
|
|
527
|
+
{
|
|
528
|
+
ref,
|
|
529
|
+
className: cn("px-2 py-1.5 text-sm font-semibold", inset && "pl-8", className),
|
|
530
|
+
...props
|
|
531
|
+
}
|
|
532
|
+
));
|
|
533
|
+
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
534
|
+
var DropdownMenuSeparator = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Separator, { ref, className: cn("-mx-1 my-1 h-px bg-muted", className), ...props }));
|
|
535
|
+
DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
|
|
536
|
+
var DropdownMenuShortcut = ({ className, ...props }) => {
|
|
537
|
+
return /* @__PURE__ */ jsx("span", { className: cn("ml-auto text-xs tracking-widest opacity-60", className), ...props });
|
|
538
|
+
};
|
|
539
|
+
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
540
|
+
var labelVariants = cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70");
|
|
541
|
+
var Label2 = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(LabelPrimitive.Root, { ref, className: cn(labelVariants(), className), ...props }));
|
|
542
|
+
Label2.displayName = LabelPrimitive.Root.displayName;
|
|
543
|
+
var Form = FormProvider;
|
|
544
|
+
var FormFieldContext = createContext({});
|
|
545
|
+
var FormField = ({
|
|
546
|
+
...props
|
|
547
|
+
}) => {
|
|
548
|
+
return /* @__PURE__ */ jsx(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsx(Controller, { ...props }) });
|
|
549
|
+
};
|
|
550
|
+
var useFormField = () => {
|
|
551
|
+
const fieldContext = useContext(FormFieldContext);
|
|
552
|
+
const itemContext = useContext(FormItemContext);
|
|
553
|
+
const { getFieldState, formState } = useFormContext();
|
|
554
|
+
const fieldState = getFieldState(fieldContext.name, formState);
|
|
555
|
+
if (!fieldContext) {
|
|
556
|
+
throw new Error("useFormField should be used within <FormField>");
|
|
557
|
+
}
|
|
558
|
+
const { id } = itemContext;
|
|
559
|
+
return {
|
|
560
|
+
id,
|
|
561
|
+
name: fieldContext.name,
|
|
562
|
+
formItemId: `${id}-form-item`,
|
|
563
|
+
formDescriptionId: `${id}-form-item-description`,
|
|
564
|
+
formMessageId: `${id}-form-item-message`,
|
|
565
|
+
...fieldState
|
|
566
|
+
};
|
|
567
|
+
};
|
|
568
|
+
var FormItemContext = createContext({});
|
|
569
|
+
var FormItem = forwardRef(({ className, ...props }, ref) => {
|
|
570
|
+
const id = useId();
|
|
571
|
+
return /* @__PURE__ */ jsx(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ jsx("div", { ref, className: cn("space-y-2", className), ...props }) });
|
|
572
|
+
});
|
|
573
|
+
FormItem.displayName = "FormItem";
|
|
574
|
+
var FormLabel = forwardRef(({ className, ...props }, ref) => {
|
|
575
|
+
const { error, formItemId } = useFormField();
|
|
576
|
+
return /* @__PURE__ */ jsx(Label2, { ref, className: cn(error && "text-destructive", className), htmlFor: formItemId, ...props });
|
|
577
|
+
});
|
|
578
|
+
FormLabel.displayName = "FormLabel";
|
|
579
|
+
var FormControl = forwardRef(
|
|
580
|
+
({ ...props }, ref) => {
|
|
581
|
+
const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
|
|
582
|
+
return /* @__PURE__ */ jsx(
|
|
583
|
+
Slot,
|
|
584
|
+
{
|
|
585
|
+
ref,
|
|
586
|
+
id: formItemId,
|
|
587
|
+
"aria-describedby": !error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`,
|
|
588
|
+
"aria-invalid": !!error,
|
|
589
|
+
...props
|
|
590
|
+
}
|
|
591
|
+
);
|
|
592
|
+
}
|
|
593
|
+
);
|
|
594
|
+
FormControl.displayName = "FormControl";
|
|
595
|
+
var FormDescription = forwardRef(
|
|
596
|
+
({ className, ...props }, ref) => {
|
|
597
|
+
const { formDescriptionId } = useFormField();
|
|
598
|
+
return /* @__PURE__ */ jsx("p", { ref, id: formDescriptionId, className: cn("text-[0.8rem] text-muted-foreground", className), ...props });
|
|
599
|
+
}
|
|
600
|
+
);
|
|
601
|
+
FormDescription.displayName = "FormDescription";
|
|
602
|
+
var FormMessage = forwardRef(
|
|
603
|
+
({ className, children, ...props }, ref) => {
|
|
604
|
+
const { error, formMessageId } = useFormField();
|
|
605
|
+
const body = error ? String(error?.message ?? "") : children;
|
|
606
|
+
if (!body) {
|
|
607
|
+
return null;
|
|
608
|
+
}
|
|
609
|
+
return /* @__PURE__ */ jsx(
|
|
610
|
+
"p",
|
|
611
|
+
{
|
|
612
|
+
ref,
|
|
613
|
+
id: formMessageId,
|
|
614
|
+
className: cn("text-[0.8rem] font-medium text-destructive", className),
|
|
615
|
+
...props,
|
|
616
|
+
children: body
|
|
617
|
+
}
|
|
618
|
+
);
|
|
619
|
+
}
|
|
620
|
+
);
|
|
621
|
+
FormMessage.displayName = "FormMessage";
|
|
622
|
+
var Input = forwardRef(({ className, type, ...props }, ref) => {
|
|
623
|
+
return /* @__PURE__ */ jsx(
|
|
624
|
+
"input",
|
|
625
|
+
{
|
|
626
|
+
type,
|
|
627
|
+
className: cn(
|
|
628
|
+
"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
629
|
+
className
|
|
630
|
+
),
|
|
631
|
+
ref,
|
|
632
|
+
...props
|
|
633
|
+
}
|
|
634
|
+
);
|
|
635
|
+
});
|
|
636
|
+
Input.displayName = "Input";
|
|
637
|
+
var Popover = PopoverPrimitive.Root;
|
|
638
|
+
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
639
|
+
var PopoverAnchor = PopoverPrimitive.Anchor;
|
|
640
|
+
var PopoverContent = forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
641
|
+
PopoverPrimitive.Content,
|
|
642
|
+
{
|
|
643
|
+
ref,
|
|
644
|
+
align,
|
|
645
|
+
sideOffset,
|
|
646
|
+
className: cn(
|
|
647
|
+
"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-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",
|
|
648
|
+
className
|
|
649
|
+
),
|
|
650
|
+
...props
|
|
651
|
+
}
|
|
652
|
+
) }));
|
|
653
|
+
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
654
|
+
var Progress = forwardRef(({ className, value, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
655
|
+
ProgressPrimitive.Root,
|
|
656
|
+
{
|
|
657
|
+
ref,
|
|
658
|
+
className: cn("relative h-2 w-full overflow-hidden rounded-full bg-primary/20", className),
|
|
659
|
+
...props,
|
|
660
|
+
children: /* @__PURE__ */ jsx(
|
|
661
|
+
ProgressPrimitive.Indicator,
|
|
662
|
+
{
|
|
663
|
+
className: "h-full w-full flex-1 bg-primary transition-all",
|
|
664
|
+
style: { transform: `translateX(-${100 - (value || 0)}%)` }
|
|
665
|
+
}
|
|
666
|
+
)
|
|
667
|
+
}
|
|
668
|
+
));
|
|
669
|
+
Progress.displayName = ProgressPrimitive.Root.displayName;
|
|
670
|
+
var ScrollArea = forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(ScrollAreaPrimitive.Root, { ref, className: cn("relative overflow-hidden", className), ...props, children: [
|
|
671
|
+
/* @__PURE__ */ jsx(ScrollAreaPrimitive.Viewport, { className: "h-full w-full rounded-[inherit]", children }),
|
|
672
|
+
/* @__PURE__ */ jsx(ScrollBar, {}),
|
|
673
|
+
/* @__PURE__ */ jsx(ScrollAreaPrimitive.Corner, {})
|
|
674
|
+
] }));
|
|
675
|
+
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
|
|
676
|
+
var ScrollBar = forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
677
|
+
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
678
|
+
{
|
|
679
|
+
ref,
|
|
680
|
+
orientation,
|
|
681
|
+
className: cn(
|
|
682
|
+
"flex touch-none select-none transition-colors",
|
|
683
|
+
orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]",
|
|
684
|
+
orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]",
|
|
685
|
+
className
|
|
686
|
+
),
|
|
687
|
+
...props,
|
|
688
|
+
children: /* @__PURE__ */ jsx(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
|
|
689
|
+
}
|
|
690
|
+
));
|
|
691
|
+
ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
|
|
692
|
+
var Select = SelectPrimitive.Root;
|
|
693
|
+
var SelectGroup = SelectPrimitive.Group;
|
|
694
|
+
var SelectValue = SelectPrimitive.Value;
|
|
695
|
+
var SelectTrigger = forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
696
|
+
SelectPrimitive.Trigger,
|
|
697
|
+
{
|
|
698
|
+
ref,
|
|
699
|
+
className: cn(
|
|
700
|
+
"flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
|
701
|
+
className
|
|
702
|
+
),
|
|
703
|
+
...props,
|
|
704
|
+
children: [
|
|
705
|
+
children,
|
|
706
|
+
/* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4 opacity-50" }) })
|
|
707
|
+
]
|
|
708
|
+
}
|
|
709
|
+
));
|
|
710
|
+
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
711
|
+
var SelectScrollUpButton = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
712
|
+
SelectPrimitive.ScrollUpButton,
|
|
713
|
+
{
|
|
714
|
+
ref,
|
|
715
|
+
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
716
|
+
...props,
|
|
717
|
+
children: /* @__PURE__ */ jsx(ChevronUp, { className: "h-4 w-4" })
|
|
718
|
+
}
|
|
719
|
+
));
|
|
720
|
+
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
721
|
+
var SelectScrollDownButton = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
722
|
+
SelectPrimitive.ScrollDownButton,
|
|
723
|
+
{
|
|
724
|
+
ref,
|
|
725
|
+
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
726
|
+
...props,
|
|
727
|
+
children: /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4" })
|
|
728
|
+
}
|
|
729
|
+
));
|
|
730
|
+
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
731
|
+
var SelectContent = forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
|
|
732
|
+
SelectPrimitive.Content,
|
|
733
|
+
{
|
|
734
|
+
ref,
|
|
735
|
+
className: cn(
|
|
736
|
+
"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-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",
|
|
737
|
+
position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
738
|
+
className
|
|
739
|
+
),
|
|
740
|
+
position,
|
|
741
|
+
...props,
|
|
742
|
+
children: [
|
|
743
|
+
/* @__PURE__ */ jsx(SelectScrollUpButton, {}),
|
|
744
|
+
/* @__PURE__ */ jsx(
|
|
745
|
+
SelectPrimitive.Viewport,
|
|
746
|
+
{
|
|
747
|
+
className: cn(
|
|
748
|
+
"p-1",
|
|
749
|
+
position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
|
|
750
|
+
),
|
|
751
|
+
children
|
|
752
|
+
}
|
|
753
|
+
),
|
|
754
|
+
/* @__PURE__ */ jsx(SelectScrollDownButton, {})
|
|
755
|
+
]
|
|
756
|
+
}
|
|
757
|
+
) }));
|
|
758
|
+
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
759
|
+
var SelectLabel = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Label, { ref, className: cn("px-2 py-1.5 text-sm font-semibold", className), ...props }));
|
|
760
|
+
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
761
|
+
var SelectItem = forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
762
|
+
SelectPrimitive.Item,
|
|
763
|
+
{
|
|
764
|
+
ref,
|
|
765
|
+
className: cn(
|
|
766
|
+
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50",
|
|
767
|
+
className
|
|
768
|
+
),
|
|
769
|
+
...props,
|
|
770
|
+
children: [
|
|
771
|
+
/* @__PURE__ */ jsx("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" }) }) }),
|
|
772
|
+
/* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children })
|
|
773
|
+
]
|
|
774
|
+
}
|
|
775
|
+
));
|
|
776
|
+
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
777
|
+
var SelectSeparator = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Separator, { ref, className: cn("-mx-1 my-1 h-px bg-muted", className), ...props }));
|
|
778
|
+
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
779
|
+
var Separator3 = forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
780
|
+
SeparatorPrimitive.Root,
|
|
781
|
+
{
|
|
782
|
+
ref,
|
|
783
|
+
decorative,
|
|
784
|
+
orientation,
|
|
785
|
+
className: cn("shrink-0 bg-border", orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]", className),
|
|
786
|
+
...props
|
|
787
|
+
}
|
|
788
|
+
));
|
|
789
|
+
Separator3.displayName = SeparatorPrimitive.Root.displayName;
|
|
790
|
+
var Sheet = DialogPrimitive.Root;
|
|
791
|
+
var SheetTrigger = DialogPrimitive.Trigger;
|
|
792
|
+
var SheetClose = DialogPrimitive.Close;
|
|
793
|
+
var SheetPortal = DialogPrimitive.Portal;
|
|
794
|
+
var SheetOverlay = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
795
|
+
DialogPrimitive.Overlay,
|
|
796
|
+
{
|
|
797
|
+
className: cn(
|
|
798
|
+
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
799
|
+
className
|
|
800
|
+
),
|
|
801
|
+
...props,
|
|
802
|
+
ref
|
|
803
|
+
}
|
|
804
|
+
));
|
|
805
|
+
SheetOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
806
|
+
var sheetVariants = cva(
|
|
807
|
+
"fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
808
|
+
{
|
|
809
|
+
variants: {
|
|
810
|
+
side: {
|
|
811
|
+
top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
|
|
812
|
+
bottom: "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
|
|
813
|
+
left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
|
|
814
|
+
right: "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"
|
|
815
|
+
}
|
|
816
|
+
},
|
|
817
|
+
defaultVariants: {
|
|
818
|
+
side: "right"
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
);
|
|
822
|
+
var SheetContent = forwardRef(
|
|
823
|
+
({ side = "right", className, children, ...props }, ref) => /* @__PURE__ */ jsxs(SheetPortal, { children: [
|
|
824
|
+
/* @__PURE__ */ jsx(SheetOverlay, {}),
|
|
825
|
+
/* @__PURE__ */ jsxs(DialogPrimitive.Content, { ref, className: cn(sheetVariants({ side }), className), ...props, children: [
|
|
826
|
+
/* @__PURE__ */ jsxs(DialogPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
|
|
827
|
+
/* @__PURE__ */ jsx(X, { className: "h-4 w-4" }),
|
|
828
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
829
|
+
] }),
|
|
830
|
+
children
|
|
831
|
+
] })
|
|
832
|
+
] })
|
|
833
|
+
);
|
|
834
|
+
SheetContent.displayName = DialogPrimitive.Content.displayName;
|
|
835
|
+
var SheetHeader = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn("flex flex-col space-y-2 text-center sm:text-left", className), ...props });
|
|
836
|
+
SheetHeader.displayName = "SheetHeader";
|
|
837
|
+
var SheetFooter = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className), ...props });
|
|
838
|
+
SheetFooter.displayName = "SheetFooter";
|
|
839
|
+
var SheetTitle = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(DialogPrimitive.Title, { ref, className: cn("text-lg font-semibold text-foreground", className), ...props }));
|
|
840
|
+
SheetTitle.displayName = DialogPrimitive.Title.displayName;
|
|
841
|
+
var SheetDescription = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(DialogPrimitive.Description, { ref, className: cn("text-sm text-muted-foreground", className), ...props }));
|
|
842
|
+
SheetDescription.displayName = DialogPrimitive.Description.displayName;
|
|
843
|
+
var MOBILE_BREAKPOINT = 768;
|
|
844
|
+
function useIsMobile() {
|
|
845
|
+
const [isMobile, setIsMobile] = useState(void 0);
|
|
846
|
+
useEffect(() => {
|
|
847
|
+
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
848
|
+
const onChange = () => {
|
|
849
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
850
|
+
};
|
|
851
|
+
mql.addEventListener("change", onChange);
|
|
852
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
853
|
+
return () => mql.removeEventListener("change", onChange);
|
|
854
|
+
}, []);
|
|
855
|
+
return !!isMobile;
|
|
856
|
+
}
|
|
857
|
+
function Skeleton({ className, ...props }) {
|
|
858
|
+
return /* @__PURE__ */ jsx("div", { className: cn("animate-pulse rounded-md bg-primary/10", className), ...props });
|
|
859
|
+
}
|
|
860
|
+
var TooltipProvider = TooltipPrimitive.Provider;
|
|
861
|
+
var Tooltip = TooltipPrimitive.Root;
|
|
862
|
+
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
863
|
+
var TooltipContent = forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
864
|
+
TooltipPrimitive.Content,
|
|
865
|
+
{
|
|
866
|
+
ref,
|
|
867
|
+
sideOffset,
|
|
868
|
+
className: cn(
|
|
869
|
+
"z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground 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",
|
|
870
|
+
className
|
|
871
|
+
),
|
|
872
|
+
...props
|
|
873
|
+
}
|
|
874
|
+
) }));
|
|
875
|
+
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
876
|
+
var SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
877
|
+
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
878
|
+
var SIDEBAR_WIDTH = "16rem";
|
|
879
|
+
var SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
880
|
+
var SIDEBAR_WIDTH_ICON = "3rem";
|
|
881
|
+
var SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
882
|
+
var SidebarContext = createContext(null);
|
|
883
|
+
function useSidebar() {
|
|
884
|
+
const context = useContext(SidebarContext);
|
|
885
|
+
if (!context) {
|
|
886
|
+
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
887
|
+
}
|
|
888
|
+
return context;
|
|
889
|
+
}
|
|
890
|
+
var SidebarProvider = forwardRef(({ defaultOpen = true, open: openProp, onOpenChange: setOpenProp, className, style, children, ...props }, ref) => {
|
|
891
|
+
const isMobile = useIsMobile();
|
|
892
|
+
const [openMobile, setOpenMobile] = useState(false);
|
|
893
|
+
const [_open, _setOpen] = useState(defaultOpen);
|
|
894
|
+
const open = openProp ?? _open;
|
|
895
|
+
const setOpen = useCallback(
|
|
896
|
+
(value) => {
|
|
897
|
+
const openState = typeof value === "function" ? value(open) : value;
|
|
898
|
+
if (setOpenProp) {
|
|
899
|
+
setOpenProp(openState);
|
|
900
|
+
} else {
|
|
901
|
+
_setOpen(openState);
|
|
902
|
+
}
|
|
903
|
+
document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
|
|
904
|
+
},
|
|
905
|
+
[setOpenProp, open]
|
|
906
|
+
);
|
|
907
|
+
const toggleSidebar = useCallback(() => {
|
|
908
|
+
return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
|
|
909
|
+
}, [isMobile, setOpen, setOpenMobile]);
|
|
910
|
+
useEffect(() => {
|
|
911
|
+
const handleKeyDown = (event) => {
|
|
912
|
+
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
913
|
+
event.preventDefault();
|
|
914
|
+
toggleSidebar();
|
|
915
|
+
}
|
|
916
|
+
};
|
|
917
|
+
window.addEventListener("keydown", handleKeyDown);
|
|
918
|
+
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
919
|
+
}, [toggleSidebar]);
|
|
920
|
+
const state = open ? "expanded" : "collapsed";
|
|
921
|
+
const contextValue = useMemo(
|
|
922
|
+
() => ({
|
|
923
|
+
state,
|
|
924
|
+
open,
|
|
925
|
+
setOpen,
|
|
926
|
+
isMobile,
|
|
927
|
+
openMobile,
|
|
928
|
+
setOpenMobile,
|
|
929
|
+
toggleSidebar
|
|
930
|
+
}),
|
|
931
|
+
[state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]
|
|
932
|
+
);
|
|
933
|
+
return /* @__PURE__ */ jsx(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ jsx(
|
|
934
|
+
"div",
|
|
935
|
+
{
|
|
936
|
+
style: {
|
|
937
|
+
"--sidebar-width": SIDEBAR_WIDTH,
|
|
938
|
+
"--sidebar-width-icon": SIDEBAR_WIDTH_ICON,
|
|
939
|
+
...style
|
|
940
|
+
},
|
|
941
|
+
className: cn("group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar", className),
|
|
942
|
+
ref,
|
|
943
|
+
...props,
|
|
944
|
+
children
|
|
945
|
+
}
|
|
946
|
+
) }) });
|
|
947
|
+
});
|
|
948
|
+
SidebarProvider.displayName = "SidebarProvider";
|
|
949
|
+
var Sidebar = forwardRef(({ side = "left", variant = "sidebar", collapsible = "offcanvas", className, children, ...props }, ref) => {
|
|
950
|
+
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
951
|
+
if (collapsible === "none") {
|
|
952
|
+
return /* @__PURE__ */ jsx(
|
|
953
|
+
"div",
|
|
954
|
+
{
|
|
955
|
+
className: cn("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground", className),
|
|
956
|
+
ref,
|
|
957
|
+
...props,
|
|
958
|
+
children
|
|
959
|
+
}
|
|
960
|
+
);
|
|
961
|
+
}
|
|
962
|
+
if (isMobile) {
|
|
963
|
+
return /* @__PURE__ */ jsx(Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ jsxs(
|
|
964
|
+
SheetContent,
|
|
965
|
+
{
|
|
966
|
+
"data-sidebar": "sidebar",
|
|
967
|
+
"data-mobile": "true",
|
|
968
|
+
className: "w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",
|
|
969
|
+
style: {
|
|
970
|
+
"--sidebar-width": SIDEBAR_WIDTH_MOBILE
|
|
971
|
+
},
|
|
972
|
+
side,
|
|
973
|
+
children: [
|
|
974
|
+
/* @__PURE__ */ jsxs(SheetHeader, { className: "sr-only", children: [
|
|
975
|
+
/* @__PURE__ */ jsx(SheetTitle, { children: "Sidebar" }),
|
|
976
|
+
/* @__PURE__ */ jsx(SheetDescription, { children: "Displays the mobile sidebar." })
|
|
977
|
+
] }),
|
|
978
|
+
/* @__PURE__ */ jsx("div", { className: "flex h-full w-full flex-col", children })
|
|
979
|
+
]
|
|
980
|
+
}
|
|
981
|
+
) });
|
|
982
|
+
}
|
|
983
|
+
return /* @__PURE__ */ jsxs(
|
|
984
|
+
"div",
|
|
985
|
+
{
|
|
986
|
+
ref,
|
|
987
|
+
className: "group peer hidden text-sidebar-foreground md:block",
|
|
988
|
+
"data-state": state,
|
|
989
|
+
"data-collapsible": state === "collapsed" ? collapsible : "",
|
|
990
|
+
"data-variant": variant,
|
|
991
|
+
"data-side": side,
|
|
992
|
+
children: [
|
|
993
|
+
/* @__PURE__ */ jsx(
|
|
994
|
+
"div",
|
|
995
|
+
{
|
|
996
|
+
className: cn(
|
|
997
|
+
"relative w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear",
|
|
998
|
+
"group-data-[collapsible=offcanvas]:w-0",
|
|
999
|
+
"group-data-[side=right]:rotate-180",
|
|
1000
|
+
variant === "floating" || variant === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]" : "group-data-[collapsible=icon]:w-[--sidebar-width-icon]"
|
|
1001
|
+
)
|
|
1002
|
+
}
|
|
1003
|
+
),
|
|
1004
|
+
/* @__PURE__ */ jsx(
|
|
1005
|
+
"div",
|
|
1006
|
+
{
|
|
1007
|
+
className: cn(
|
|
1008
|
+
"fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex",
|
|
1009
|
+
side === "left" ? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]" : "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",
|
|
1010
|
+
// Adjust the padding for floating and inset variants.
|
|
1011
|
+
variant === "floating" || variant === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]" : "group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",
|
|
1012
|
+
className
|
|
1013
|
+
),
|
|
1014
|
+
...props,
|
|
1015
|
+
children: /* @__PURE__ */ jsx(
|
|
1016
|
+
"div",
|
|
1017
|
+
{
|
|
1018
|
+
"data-sidebar": "sidebar",
|
|
1019
|
+
className: "flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",
|
|
1020
|
+
children
|
|
1021
|
+
}
|
|
1022
|
+
)
|
|
1023
|
+
}
|
|
1024
|
+
)
|
|
1025
|
+
]
|
|
1026
|
+
}
|
|
1027
|
+
);
|
|
1028
|
+
});
|
|
1029
|
+
Sidebar.displayName = "Sidebar";
|
|
1030
|
+
var SidebarTrigger = forwardRef(
|
|
1031
|
+
({ className, onClick, ...props }, ref) => {
|
|
1032
|
+
const { toggleSidebar } = useSidebar();
|
|
1033
|
+
return /* @__PURE__ */ jsxs(
|
|
1034
|
+
Button,
|
|
1035
|
+
{
|
|
1036
|
+
ref,
|
|
1037
|
+
"data-sidebar": "trigger",
|
|
1038
|
+
variant: "ghost",
|
|
1039
|
+
size: "icon",
|
|
1040
|
+
className: cn("h-7 w-7", className),
|
|
1041
|
+
onClick: (event) => {
|
|
1042
|
+
onClick?.(event);
|
|
1043
|
+
toggleSidebar();
|
|
1044
|
+
},
|
|
1045
|
+
...props,
|
|
1046
|
+
children: [
|
|
1047
|
+
/* @__PURE__ */ jsx(PanelLeft, {}),
|
|
1048
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Toggle Sidebar" })
|
|
1049
|
+
]
|
|
1050
|
+
}
|
|
1051
|
+
);
|
|
1052
|
+
}
|
|
1053
|
+
);
|
|
1054
|
+
SidebarTrigger.displayName = "SidebarTrigger";
|
|
1055
|
+
var SidebarRail = forwardRef(({ className, ...props }, ref) => {
|
|
1056
|
+
const { toggleSidebar } = useSidebar();
|
|
1057
|
+
return /* @__PURE__ */ jsx(
|
|
1058
|
+
"button",
|
|
1059
|
+
{
|
|
1060
|
+
ref,
|
|
1061
|
+
"data-sidebar": "rail",
|
|
1062
|
+
"aria-label": "Toggle Sidebar",
|
|
1063
|
+
tabIndex: -1,
|
|
1064
|
+
onClick: toggleSidebar,
|
|
1065
|
+
title: "Toggle Sidebar",
|
|
1066
|
+
className: cn(
|
|
1067
|
+
"absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex",
|
|
1068
|
+
"[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize",
|
|
1069
|
+
"[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",
|
|
1070
|
+
"group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar",
|
|
1071
|
+
"[[data-side=left][data-collapsible=offcanvas]_&]:-right-2",
|
|
1072
|
+
"[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",
|
|
1073
|
+
className
|
|
1074
|
+
),
|
|
1075
|
+
...props
|
|
1076
|
+
}
|
|
1077
|
+
);
|
|
1078
|
+
});
|
|
1079
|
+
SidebarRail.displayName = "SidebarRail";
|
|
1080
|
+
var SidebarInset = forwardRef(({ className, ...props }, ref) => {
|
|
1081
|
+
return /* @__PURE__ */ jsx(
|
|
1082
|
+
"main",
|
|
1083
|
+
{
|
|
1084
|
+
ref,
|
|
1085
|
+
className: cn(
|
|
1086
|
+
"relative flex w-full flex-1 flex-col bg-background",
|
|
1087
|
+
"md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",
|
|
1088
|
+
className
|
|
1089
|
+
),
|
|
1090
|
+
...props
|
|
1091
|
+
}
|
|
1092
|
+
);
|
|
1093
|
+
});
|
|
1094
|
+
SidebarInset.displayName = "SidebarInset";
|
|
1095
|
+
var SidebarInput = forwardRef(
|
|
1096
|
+
({ className, ...props }, ref) => {
|
|
1097
|
+
return /* @__PURE__ */ jsx(
|
|
1098
|
+
Input,
|
|
1099
|
+
{
|
|
1100
|
+
ref,
|
|
1101
|
+
"data-sidebar": "input",
|
|
1102
|
+
className: cn(
|
|
1103
|
+
"h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",
|
|
1104
|
+
className
|
|
1105
|
+
),
|
|
1106
|
+
...props
|
|
1107
|
+
}
|
|
1108
|
+
);
|
|
1109
|
+
}
|
|
1110
|
+
);
|
|
1111
|
+
SidebarInput.displayName = "SidebarInput";
|
|
1112
|
+
var SidebarHeader = forwardRef(({ className, ...props }, ref) => {
|
|
1113
|
+
return /* @__PURE__ */ jsx("div", { ref, "data-sidebar": "header", className: cn("flex flex-col gap-2 p-2", className), ...props });
|
|
1114
|
+
});
|
|
1115
|
+
SidebarHeader.displayName = "SidebarHeader";
|
|
1116
|
+
var SidebarFooter = forwardRef(({ className, ...props }, ref) => {
|
|
1117
|
+
return /* @__PURE__ */ jsx("div", { ref, "data-sidebar": "footer", className: cn("flex flex-col gap-2 p-2", className), ...props });
|
|
1118
|
+
});
|
|
1119
|
+
SidebarFooter.displayName = "SidebarFooter";
|
|
1120
|
+
var SidebarSeparator = forwardRef(
|
|
1121
|
+
({ className, ...props }, ref) => {
|
|
1122
|
+
return /* @__PURE__ */ jsx(
|
|
1123
|
+
Separator3,
|
|
1124
|
+
{
|
|
1125
|
+
ref,
|
|
1126
|
+
"data-sidebar": "separator",
|
|
1127
|
+
className: cn("mx-2 w-auto bg-sidebar-border", className),
|
|
1128
|
+
...props
|
|
1129
|
+
}
|
|
1130
|
+
);
|
|
1131
|
+
}
|
|
1132
|
+
);
|
|
1133
|
+
SidebarSeparator.displayName = "SidebarSeparator";
|
|
1134
|
+
var SidebarContent = forwardRef(({ className, ...props }, ref) => {
|
|
1135
|
+
return /* @__PURE__ */ jsx(
|
|
1136
|
+
"div",
|
|
1137
|
+
{
|
|
1138
|
+
ref,
|
|
1139
|
+
"data-sidebar": "content",
|
|
1140
|
+
className: cn(
|
|
1141
|
+
"flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",
|
|
1142
|
+
className
|
|
1143
|
+
),
|
|
1144
|
+
...props
|
|
1145
|
+
}
|
|
1146
|
+
);
|
|
1147
|
+
});
|
|
1148
|
+
SidebarContent.displayName = "SidebarContent";
|
|
1149
|
+
var SidebarGroup = forwardRef(({ className, ...props }, ref) => {
|
|
1150
|
+
return /* @__PURE__ */ jsx(
|
|
1151
|
+
"div",
|
|
1152
|
+
{
|
|
1153
|
+
ref,
|
|
1154
|
+
"data-sidebar": "group",
|
|
1155
|
+
className: cn("relative flex w-full min-w-0 flex-col p-2", className),
|
|
1156
|
+
...props
|
|
1157
|
+
}
|
|
1158
|
+
);
|
|
1159
|
+
});
|
|
1160
|
+
SidebarGroup.displayName = "SidebarGroup";
|
|
1161
|
+
var SidebarGroupLabel = forwardRef(
|
|
1162
|
+
({ className, asChild = false, ...props }, ref) => {
|
|
1163
|
+
const Comp = asChild ? Slot : "div";
|
|
1164
|
+
return /* @__PURE__ */ jsx(
|
|
1165
|
+
Comp,
|
|
1166
|
+
{
|
|
1167
|
+
ref,
|
|
1168
|
+
"data-sidebar": "group-label",
|
|
1169
|
+
className: cn(
|
|
1170
|
+
"flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
1171
|
+
"group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",
|
|
1172
|
+
className
|
|
1173
|
+
),
|
|
1174
|
+
...props
|
|
1175
|
+
}
|
|
1176
|
+
);
|
|
1177
|
+
}
|
|
1178
|
+
);
|
|
1179
|
+
SidebarGroupLabel.displayName = "SidebarGroupLabel";
|
|
1180
|
+
var SidebarGroupAction = forwardRef(
|
|
1181
|
+
({ className, asChild = false, ...props }, ref) => {
|
|
1182
|
+
const Comp = asChild ? Slot : "button";
|
|
1183
|
+
return /* @__PURE__ */ jsx(
|
|
1184
|
+
Comp,
|
|
1185
|
+
{
|
|
1186
|
+
ref,
|
|
1187
|
+
"data-sidebar": "group-action",
|
|
1188
|
+
className: cn(
|
|
1189
|
+
"absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
1190
|
+
// Increases the hit area of the button on mobile.
|
|
1191
|
+
"after:absolute after:-inset-2 after:md:hidden",
|
|
1192
|
+
"group-data-[collapsible=icon]:hidden",
|
|
1193
|
+
className
|
|
1194
|
+
),
|
|
1195
|
+
...props
|
|
1196
|
+
}
|
|
1197
|
+
);
|
|
1198
|
+
}
|
|
1199
|
+
);
|
|
1200
|
+
SidebarGroupAction.displayName = "SidebarGroupAction";
|
|
1201
|
+
var SidebarGroupContent = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, "data-sidebar": "group-content", className: cn("w-full text-sm", className), ...props }));
|
|
1202
|
+
SidebarGroupContent.displayName = "SidebarGroupContent";
|
|
1203
|
+
var SidebarMenu = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("ul", { ref, "data-sidebar": "menu", className: cn("flex w-full min-w-0 flex-col gap-1", className), ...props }));
|
|
1204
|
+
SidebarMenu.displayName = "SidebarMenu";
|
|
1205
|
+
var SidebarMenuItem = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("li", { ref, "data-sidebar": "menu-item", className: cn("group/menu-item relative", className), ...props }));
|
|
1206
|
+
SidebarMenuItem.displayName = "SidebarMenuItem";
|
|
1207
|
+
var sidebarMenuButtonVariants = cva(
|
|
1208
|
+
"peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] 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 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
|
|
1209
|
+
{
|
|
1210
|
+
variants: {
|
|
1211
|
+
variant: {
|
|
1212
|
+
default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
|
|
1213
|
+
outline: "bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"
|
|
1214
|
+
},
|
|
1215
|
+
size: {
|
|
1216
|
+
default: "h-8 text-sm",
|
|
1217
|
+
sm: "h-7 text-xs",
|
|
1218
|
+
lg: "h-12 text-sm group-data-[collapsible=icon]:!p-0"
|
|
1219
|
+
}
|
|
1220
|
+
},
|
|
1221
|
+
defaultVariants: {
|
|
1222
|
+
variant: "default",
|
|
1223
|
+
size: "default"
|
|
1224
|
+
}
|
|
1225
|
+
}
|
|
1226
|
+
);
|
|
1227
|
+
var SidebarMenuButton = forwardRef(({ asChild = false, isActive = false, variant = "default", size = "default", tooltip, className, ...props }, ref) => {
|
|
1228
|
+
const Comp = asChild ? Slot : "button";
|
|
1229
|
+
const { isMobile, state } = useSidebar();
|
|
1230
|
+
const button = /* @__PURE__ */ jsx(
|
|
1231
|
+
Comp,
|
|
1232
|
+
{
|
|
1233
|
+
ref,
|
|
1234
|
+
"data-sidebar": "menu-button",
|
|
1235
|
+
"data-size": size,
|
|
1236
|
+
"data-active": isActive,
|
|
1237
|
+
className: cn(sidebarMenuButtonVariants({ variant, size }), className),
|
|
1238
|
+
...props
|
|
1239
|
+
}
|
|
1240
|
+
);
|
|
1241
|
+
if (!tooltip) {
|
|
1242
|
+
return button;
|
|
1243
|
+
}
|
|
1244
|
+
if (typeof tooltip === "string") {
|
|
1245
|
+
tooltip = {
|
|
1246
|
+
children: tooltip
|
|
1247
|
+
};
|
|
1248
|
+
}
|
|
1249
|
+
return /* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
1250
|
+
/* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: button }),
|
|
1251
|
+
/* @__PURE__ */ jsx(TooltipContent, { side: "right", align: "center", hidden: state !== "collapsed" || isMobile, ...tooltip })
|
|
1252
|
+
] });
|
|
1253
|
+
});
|
|
1254
|
+
SidebarMenuButton.displayName = "SidebarMenuButton";
|
|
1255
|
+
var SidebarMenuAction = forwardRef(({ className, asChild = false, showOnHover = false, ...props }, ref) => {
|
|
1256
|
+
const Comp = asChild ? Slot : "button";
|
|
1257
|
+
return /* @__PURE__ */ jsx(
|
|
1258
|
+
Comp,
|
|
1259
|
+
{
|
|
1260
|
+
ref,
|
|
1261
|
+
"data-sidebar": "menu-action",
|
|
1262
|
+
className: cn(
|
|
1263
|
+
"absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0",
|
|
1264
|
+
// Increases the hit area of the button on mobile.
|
|
1265
|
+
"after:absolute after:-inset-2 after:md:hidden",
|
|
1266
|
+
"peer-data-[size=sm]/menu-button:top-1",
|
|
1267
|
+
"peer-data-[size=default]/menu-button:top-1.5",
|
|
1268
|
+
"peer-data-[size=lg]/menu-button:top-2.5",
|
|
1269
|
+
"group-data-[collapsible=icon]:hidden",
|
|
1270
|
+
showOnHover && "group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",
|
|
1271
|
+
className
|
|
1272
|
+
),
|
|
1273
|
+
...props
|
|
1274
|
+
}
|
|
1275
|
+
);
|
|
1276
|
+
});
|
|
1277
|
+
SidebarMenuAction.displayName = "SidebarMenuAction";
|
|
1278
|
+
var SidebarMenuBadge = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1279
|
+
"div",
|
|
1280
|
+
{
|
|
1281
|
+
ref,
|
|
1282
|
+
"data-sidebar": "menu-badge",
|
|
1283
|
+
className: cn(
|
|
1284
|
+
"pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground",
|
|
1285
|
+
"peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground",
|
|
1286
|
+
"peer-data-[size=sm]/menu-button:top-1",
|
|
1287
|
+
"peer-data-[size=default]/menu-button:top-1.5",
|
|
1288
|
+
"peer-data-[size=lg]/menu-button:top-2.5",
|
|
1289
|
+
"group-data-[collapsible=icon]:hidden",
|
|
1290
|
+
className
|
|
1291
|
+
),
|
|
1292
|
+
...props
|
|
1293
|
+
}
|
|
1294
|
+
));
|
|
1295
|
+
SidebarMenuBadge.displayName = "SidebarMenuBadge";
|
|
1296
|
+
var SidebarMenuSkeleton = forwardRef(({ className, showIcon = false, ...props }, ref) => {
|
|
1297
|
+
const width = useMemo(() => {
|
|
1298
|
+
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
1299
|
+
}, []);
|
|
1300
|
+
return /* @__PURE__ */ jsxs(
|
|
1301
|
+
"div",
|
|
1302
|
+
{
|
|
1303
|
+
ref,
|
|
1304
|
+
"data-sidebar": "menu-skeleton",
|
|
1305
|
+
className: cn("flex h-8 items-center gap-2 rounded-md px-2", className),
|
|
1306
|
+
...props,
|
|
1307
|
+
children: [
|
|
1308
|
+
showIcon && /* @__PURE__ */ jsx(Skeleton, { className: "size-4 rounded-md", "data-sidebar": "menu-skeleton-icon" }),
|
|
1309
|
+
/* @__PURE__ */ jsx(
|
|
1310
|
+
Skeleton,
|
|
1311
|
+
{
|
|
1312
|
+
className: "h-4 max-w-[--skeleton-width] flex-1",
|
|
1313
|
+
"data-sidebar": "menu-skeleton-text",
|
|
1314
|
+
style: {
|
|
1315
|
+
"--skeleton-width": width
|
|
1316
|
+
}
|
|
1317
|
+
}
|
|
1318
|
+
)
|
|
1319
|
+
]
|
|
1320
|
+
}
|
|
1321
|
+
);
|
|
1322
|
+
});
|
|
1323
|
+
SidebarMenuSkeleton.displayName = "SidebarMenuSkeleton";
|
|
1324
|
+
var SidebarMenuSub = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1325
|
+
"ul",
|
|
1326
|
+
{
|
|
1327
|
+
ref,
|
|
1328
|
+
"data-sidebar": "menu-sub",
|
|
1329
|
+
className: cn(
|
|
1330
|
+
"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",
|
|
1331
|
+
"group-data-[collapsible=icon]:hidden",
|
|
1332
|
+
className
|
|
1333
|
+
),
|
|
1334
|
+
...props
|
|
1335
|
+
}
|
|
1336
|
+
));
|
|
1337
|
+
SidebarMenuSub.displayName = "SidebarMenuSub";
|
|
1338
|
+
var SidebarMenuSubItem = forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx("li", { ref, ...props }));
|
|
1339
|
+
SidebarMenuSubItem.displayName = "SidebarMenuSubItem";
|
|
1340
|
+
var SidebarMenuSubButton = forwardRef(({ asChild = false, size = "md", isActive, className, ...props }, ref) => {
|
|
1341
|
+
const Comp = asChild ? Slot : "a";
|
|
1342
|
+
return /* @__PURE__ */ jsx(
|
|
1343
|
+
Comp,
|
|
1344
|
+
{
|
|
1345
|
+
ref,
|
|
1346
|
+
"data-sidebar": "menu-sub-button",
|
|
1347
|
+
"data-size": size,
|
|
1348
|
+
"data-active": isActive,
|
|
1349
|
+
className: cn(
|
|
1350
|
+
"flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring 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 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground",
|
|
1351
|
+
"data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",
|
|
1352
|
+
size === "sm" && "text-xs",
|
|
1353
|
+
size === "md" && "text-sm",
|
|
1354
|
+
"group-data-[collapsible=icon]:hidden",
|
|
1355
|
+
className
|
|
1356
|
+
),
|
|
1357
|
+
...props
|
|
1358
|
+
}
|
|
1359
|
+
);
|
|
1360
|
+
});
|
|
1361
|
+
SidebarMenuSubButton.displayName = "SidebarMenuSubButton";
|
|
1362
|
+
var Toaster = ({ ...props }) => {
|
|
1363
|
+
const { theme = "system" } = useTheme();
|
|
1364
|
+
return /* @__PURE__ */ jsx(
|
|
1365
|
+
Toaster$1,
|
|
1366
|
+
{
|
|
1367
|
+
theme,
|
|
1368
|
+
className: "toaster group",
|
|
1369
|
+
toastOptions: {
|
|
1370
|
+
classNames: {
|
|
1371
|
+
toast: "group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",
|
|
1372
|
+
description: "group-[.toast]:text-muted-foreground",
|
|
1373
|
+
actionButton: "group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",
|
|
1374
|
+
cancelButton: "group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"
|
|
1375
|
+
}
|
|
1376
|
+
},
|
|
1377
|
+
...props
|
|
1378
|
+
}
|
|
1379
|
+
);
|
|
1380
|
+
};
|
|
1381
|
+
var Switch = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1382
|
+
SwitchPrimitives.Root,
|
|
1383
|
+
{
|
|
1384
|
+
className: cn(
|
|
1385
|
+
"peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",
|
|
1386
|
+
className
|
|
1387
|
+
),
|
|
1388
|
+
...props,
|
|
1389
|
+
ref,
|
|
1390
|
+
children: /* @__PURE__ */ jsx(
|
|
1391
|
+
SwitchPrimitives.Thumb,
|
|
1392
|
+
{
|
|
1393
|
+
className: cn(
|
|
1394
|
+
"pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0"
|
|
1395
|
+
)
|
|
1396
|
+
}
|
|
1397
|
+
)
|
|
1398
|
+
}
|
|
1399
|
+
));
|
|
1400
|
+
Switch.displayName = SwitchPrimitives.Root.displayName;
|
|
1401
|
+
var Table = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsx("table", { ref, className: cn("w-full caption-bottom text-sm", className), ...props }) }));
|
|
1402
|
+
Table.displayName = "Table";
|
|
1403
|
+
var TableHeader = forwardRef(
|
|
1404
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx("thead", { ref, className: cn("[&_tr]:border-b", className), ...props })
|
|
1405
|
+
);
|
|
1406
|
+
TableHeader.displayName = "TableHeader";
|
|
1407
|
+
var TableBody = forwardRef(
|
|
1408
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx("tbody", { ref, className: cn("[&_tr:last-child]:border-0", className), ...props })
|
|
1409
|
+
);
|
|
1410
|
+
TableBody.displayName = "TableBody";
|
|
1411
|
+
var TableFooter = forwardRef(
|
|
1412
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx("tfoot", { ref, className: cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", className), ...props })
|
|
1413
|
+
);
|
|
1414
|
+
TableFooter.displayName = "TableFooter";
|
|
1415
|
+
var TableRow = forwardRef(
|
|
1416
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1417
|
+
"tr",
|
|
1418
|
+
{
|
|
1419
|
+
ref,
|
|
1420
|
+
className: cn("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted", className),
|
|
1421
|
+
...props
|
|
1422
|
+
}
|
|
1423
|
+
)
|
|
1424
|
+
);
|
|
1425
|
+
TableRow.displayName = "TableRow";
|
|
1426
|
+
var TableHead = forwardRef(
|
|
1427
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1428
|
+
"th",
|
|
1429
|
+
{
|
|
1430
|
+
ref,
|
|
1431
|
+
className: cn(
|
|
1432
|
+
"h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
1433
|
+
className
|
|
1434
|
+
),
|
|
1435
|
+
...props
|
|
1436
|
+
}
|
|
1437
|
+
)
|
|
1438
|
+
);
|
|
1439
|
+
TableHead.displayName = "TableHead";
|
|
1440
|
+
var TableCell = forwardRef(
|
|
1441
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1442
|
+
"td",
|
|
1443
|
+
{
|
|
1444
|
+
ref,
|
|
1445
|
+
className: cn("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", className),
|
|
1446
|
+
...props
|
|
1447
|
+
}
|
|
1448
|
+
)
|
|
1449
|
+
);
|
|
1450
|
+
TableCell.displayName = "TableCell";
|
|
1451
|
+
var TableCaption = forwardRef(
|
|
1452
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx("caption", { ref, className: cn("mt-4 text-sm text-muted-foreground", className), ...props })
|
|
1453
|
+
);
|
|
1454
|
+
TableCaption.displayName = "TableCaption";
|
|
1455
|
+
var Tabs = TabsPrimitive.Root;
|
|
1456
|
+
var TabsList = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1457
|
+
TabsPrimitive.List,
|
|
1458
|
+
{
|
|
1459
|
+
ref,
|
|
1460
|
+
className: cn(
|
|
1461
|
+
"inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",
|
|
1462
|
+
className
|
|
1463
|
+
),
|
|
1464
|
+
...props
|
|
1465
|
+
}
|
|
1466
|
+
));
|
|
1467
|
+
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
1468
|
+
var TabsTrigger = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1469
|
+
TabsPrimitive.Trigger,
|
|
1470
|
+
{
|
|
1471
|
+
ref,
|
|
1472
|
+
className: cn(
|
|
1473
|
+
"inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",
|
|
1474
|
+
className
|
|
1475
|
+
),
|
|
1476
|
+
...props
|
|
1477
|
+
}
|
|
1478
|
+
));
|
|
1479
|
+
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
1480
|
+
var TabsContent = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1481
|
+
TabsPrimitive.Content,
|
|
1482
|
+
{
|
|
1483
|
+
ref,
|
|
1484
|
+
className: cn(
|
|
1485
|
+
"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
1486
|
+
className
|
|
1487
|
+
),
|
|
1488
|
+
...props
|
|
1489
|
+
}
|
|
1490
|
+
));
|
|
1491
|
+
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
1492
|
+
|
|
1493
|
+
export { Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, Input, Label2 as Label, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator3 as Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, 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, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants, cn, useFormField, useIsMobile, useSidebar };
|
|
1494
|
+
//# sourceMappingURL=index.mjs.map
|
|
1495
|
+
//# sourceMappingURL=index.mjs.map
|