@psnext/design-system 1.0.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 +126 -0
- package/dist/AiChatPanel.cjs +1603 -0
- package/dist/AiChatPanel.cjs.map +1 -0
- package/dist/AiChatPanel.js +1526 -0
- package/dist/AiChatPanel.js.map +1 -0
- package/dist/BodhiLogo.cjs +240 -0
- package/dist/BodhiLogo.cjs.map +1 -0
- package/dist/BodhiLogo.js +194 -0
- package/dist/BodhiLogo.js.map +1 -0
- package/dist/Skeleton.cjs +19 -0
- package/dist/Skeleton.cjs.map +1 -0
- package/dist/Skeleton.js +14 -0
- package/dist/Skeleton.js.map +1 -0
- package/dist/SustainLogo.cjs +415 -0
- package/dist/SustainLogo.cjs.map +1 -0
- package/dist/SustainLogo.js +378 -0
- package/dist/SustainLogo.js.map +1 -0
- package/dist/contexts/index.cjs +60 -0
- package/dist/contexts/index.cjs.map +1 -0
- package/dist/contexts/index.d.cts +23 -0
- package/dist/contexts/index.d.cts.map +1 -0
- package/dist/contexts/index.d.ts +23 -0
- package/dist/contexts/index.d.ts.map +1 -0
- package/dist/contexts/index.js +58 -0
- package/dist/contexts/index.js.map +1 -0
- package/dist/index.cjs +273 -0
- package/dist/index.d.cts +1440 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.ts +1440 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7 -0
- package/dist/index2.d.cts +16 -0
- package/dist/index2.d.cts.map +1 -0
- package/dist/index2.d.ts +16 -0
- package/dist/index2.d.ts.map +1 -0
- package/dist/layouts/index.cjs +13 -0
- package/dist/layouts/index.d.cts +133 -0
- package/dist/layouts/index.d.cts.map +1 -0
- package/dist/layouts/index.d.ts +133 -0
- package/dist/layouts/index.d.ts.map +1 -0
- package/dist/layouts/index.js +2 -0
- package/dist/layouts.cjs +3245 -0
- package/dist/layouts.cjs.map +1 -0
- package/dist/layouts.js +3180 -0
- package/dist/layouts.js.map +1 -0
- package/dist/patterns/index.cjs +7375 -0
- package/dist/patterns/index.cjs.map +1 -0
- package/dist/patterns/index.d.cts +418 -0
- package/dist/patterns/index.d.cts.map +1 -0
- package/dist/patterns/index.d.ts +418 -0
- package/dist/patterns/index.d.ts.map +1 -0
- package/dist/patterns/index.js +7344 -0
- package/dist/patterns/index.js.map +1 -0
- package/dist/primitives/index.cjs +256 -0
- package/dist/primitives/index.d.cts +2 -0
- package/dist/primitives/index.d.ts +2 -0
- package/dist/primitives/index.js +5 -0
- package/dist/primitives.cjs +4292 -0
- package/dist/primitives.cjs.map +1 -0
- package/dist/primitives.js +2807 -0
- package/dist/primitives.js.map +1 -0
- package/dist/styles/base/colors.css +300 -0
- package/dist/styles/base/component-tokens.css +240 -0
- package/dist/styles/base/elevation.css +7 -0
- package/dist/styles/base/fonts.css +14 -0
- package/dist/styles/base/global.css +305 -0
- package/dist/styles/base/radius.css +22 -0
- package/dist/styles/base/semantic-aliases.css +53 -0
- package/dist/styles/base/spacing.css +33 -0
- package/dist/styles/base/typography.css +48 -0
- package/dist/styles/generated/bodhi-vars.css +34 -0
- package/dist/styles/generated/dark.css +87 -0
- package/dist/styles/generated/light.css +87 -0
- package/dist/styles/generated/slingshot-vars.css +34 -0
- package/dist/styles/generated/sustain-vars.css +34 -0
- package/dist/styles/index.css +32 -0
- package/dist/styles/theme.css +65 -0
- package/dist/styles/themes/bodhi.css +166 -0
- package/dist/styles/themes/slingshot.css +144 -0
- package/dist/styles/themes/sustain.css +130 -0
- package/package.json +131 -0
|
@@ -0,0 +1,2807 @@
|
|
|
1
|
+
import { n as useIsMobile, r as cn } from "./BodhiLogo.js";
|
|
2
|
+
import { t as Skeleton } from "./Skeleton.js";
|
|
3
|
+
import { a as TooltipProvider, i as TooltipContent, o as TooltipTrigger, r as Tooltip } from "./SustainLogo.js";
|
|
4
|
+
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
|
5
|
+
import { ArrowLeft, ArrowRight, CheckIcon, ChevronDownIcon, ChevronLeft, ChevronLeftIcon, ChevronRight, ChevronRightIcon, ChevronUpIcon, CircleIcon, GripVerticalIcon, MinusIcon, MoreHorizontal, MoreHorizontalIcon, PanelLeftIcon, SearchIcon, XIcon } from "lucide-react";
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
import { cva } from "class-variance-authority";
|
|
9
|
+
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
|
|
10
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
11
|
+
import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio";
|
|
12
|
+
import * as AvatarPrimitive from "@radix-ui/react-avatar";
|
|
13
|
+
import { DayPicker } from "react-day-picker";
|
|
14
|
+
import useEmblaCarousel from "embla-carousel-react";
|
|
15
|
+
import * as RechartsPrimitive from "recharts";
|
|
16
|
+
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
17
|
+
import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
|
|
18
|
+
import { Command } from "cmdk";
|
|
19
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
20
|
+
import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
|
|
21
|
+
import { Drawer } from "vaul";
|
|
22
|
+
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
23
|
+
import { Controller, FormProvider, useFormContext, useFormState } from "react-hook-form";
|
|
24
|
+
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
25
|
+
import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
|
|
26
|
+
import { OTPInput, OTPInputContext } from "input-otp";
|
|
27
|
+
import * as MenubarPrimitive from "@radix-ui/react-menubar";
|
|
28
|
+
import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
|
|
29
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
30
|
+
import * as ProgressPrimitive from "@radix-ui/react-progress";
|
|
31
|
+
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
32
|
+
import * as ResizablePrimitive from "react-resizable-panels";
|
|
33
|
+
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
|
34
|
+
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
35
|
+
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
36
|
+
import * as SliderPrimitive from "@radix-ui/react-slider";
|
|
37
|
+
import { Toaster } from "sonner";
|
|
38
|
+
import * as SwitchPrimitive from "@radix-ui/react-switch";
|
|
39
|
+
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
40
|
+
import * as TogglePrimitive from "@radix-ui/react-toggle";
|
|
41
|
+
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
|
|
42
|
+
//#region src/primitives/Accordion/Accordion.tsx
|
|
43
|
+
function Accordion({ ...props }) {
|
|
44
|
+
return /* @__PURE__ */ jsx(AccordionPrimitive.Root, {
|
|
45
|
+
"data-slot": "accordion",
|
|
46
|
+
...props
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
function AccordionItem({ className, ...props }) {
|
|
50
|
+
return /* @__PURE__ */ jsx(AccordionPrimitive.Item, {
|
|
51
|
+
"data-slot": "accordion-item",
|
|
52
|
+
className: cn("border-b last:border-b-0", className),
|
|
53
|
+
...props
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
function AccordionTrigger({ className, children, ...props }) {
|
|
57
|
+
return /* @__PURE__ */ jsx(AccordionPrimitive.Header, {
|
|
58
|
+
className: "flex",
|
|
59
|
+
children: /* @__PURE__ */ jsxs(AccordionPrimitive.Trigger, {
|
|
60
|
+
"data-slot": "accordion-trigger",
|
|
61
|
+
className: cn("focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180", className),
|
|
62
|
+
...props,
|
|
63
|
+
children: [children, /* @__PURE__ */ jsx(ChevronDownIcon, { className: "text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200" })]
|
|
64
|
+
})
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
function AccordionContent({ className, children, ...props }) {
|
|
68
|
+
return /* @__PURE__ */ jsx(AccordionPrimitive.Content, {
|
|
69
|
+
"data-slot": "accordion-content",
|
|
70
|
+
className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",
|
|
71
|
+
...props,
|
|
72
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
73
|
+
className: cn("pt-0 pb-4", className),
|
|
74
|
+
children
|
|
75
|
+
})
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
//#endregion
|
|
79
|
+
//#region src/primitives/Alert/Alert.tsx
|
|
80
|
+
const alertVariants = cva("relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current", {
|
|
81
|
+
variants: { variant: {
|
|
82
|
+
default: "bg-card text-card-foreground",
|
|
83
|
+
destructive: "text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"
|
|
84
|
+
} },
|
|
85
|
+
defaultVariants: { variant: "default" }
|
|
86
|
+
});
|
|
87
|
+
function Alert({ className, variant, ...props }) {
|
|
88
|
+
return /* @__PURE__ */ jsx("div", {
|
|
89
|
+
"data-slot": "alert",
|
|
90
|
+
role: "alert",
|
|
91
|
+
className: cn(alertVariants({ variant }), className),
|
|
92
|
+
...props
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
function AlertTitle({ className, ...props }) {
|
|
96
|
+
return /* @__PURE__ */ jsx("h5", {
|
|
97
|
+
"data-slot": "alert-title",
|
|
98
|
+
className: cn("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight", className),
|
|
99
|
+
...props
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
function AlertDescription({ className, ...props }) {
|
|
103
|
+
return /* @__PURE__ */ jsx("div", {
|
|
104
|
+
"data-slot": "alert-description",
|
|
105
|
+
className: cn("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed", className),
|
|
106
|
+
...props
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
//#endregion
|
|
110
|
+
//#region src/primitives/Button/Button.tsx
|
|
111
|
+
const buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium cursor-pointer transition-[background-color,color,border-color,box-shadow,opacity,transform] duration-150 ease-out active:scale-[0.97] disabled:pointer-events-none disabled:opacity-50 disabled:active:scale-100 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", {
|
|
112
|
+
variants: {
|
|
113
|
+
variant: {
|
|
114
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
115
|
+
destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
116
|
+
outline: "border bg-background text-foreground hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
|
|
117
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
118
|
+
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
119
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
120
|
+
},
|
|
121
|
+
size: {
|
|
122
|
+
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
123
|
+
sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
|
|
124
|
+
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
|
125
|
+
icon: "size-9 rounded-md"
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
defaultVariants: {
|
|
129
|
+
variant: "default",
|
|
130
|
+
size: "default"
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
function Button({ className, variant, size, asChild = false, ...props }) {
|
|
134
|
+
return /* @__PURE__ */ jsx(asChild ? Slot : "button", {
|
|
135
|
+
"data-slot": "button",
|
|
136
|
+
className: cn(buttonVariants({
|
|
137
|
+
variant,
|
|
138
|
+
size,
|
|
139
|
+
className
|
|
140
|
+
})),
|
|
141
|
+
...props
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
//#endregion
|
|
145
|
+
//#region src/primitives/AlertDialog/AlertDialog.tsx
|
|
146
|
+
function AlertDialog({ ...props }) {
|
|
147
|
+
return /* @__PURE__ */ jsx(AlertDialogPrimitive.Root, {
|
|
148
|
+
"data-slot": "alert-dialog",
|
|
149
|
+
...props
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
function AlertDialogTrigger({ ...props }) {
|
|
153
|
+
return /* @__PURE__ */ jsx(AlertDialogPrimitive.Trigger, {
|
|
154
|
+
"data-slot": "alert-dialog-trigger",
|
|
155
|
+
...props
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
function AlertDialogPortal({ ...props }) {
|
|
159
|
+
return /* @__PURE__ */ jsx(AlertDialogPrimitive.Portal, {
|
|
160
|
+
"data-slot": "alert-dialog-portal",
|
|
161
|
+
...props
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
function AlertDialogOverlay({ className, ...props }) {
|
|
165
|
+
return /* @__PURE__ */ jsx(AlertDialogPrimitive.Overlay, {
|
|
166
|
+
"data-slot": "alert-dialog-overlay",
|
|
167
|
+
className: cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-[var(--overlay)]", className),
|
|
168
|
+
...props
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
function AlertDialogContent({ className, ...props }) {
|
|
172
|
+
return /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [/* @__PURE__ */ jsx(AlertDialogOverlay, {}), /* @__PURE__ */ jsx(AlertDialogPrimitive.Content, {
|
|
173
|
+
"data-slot": "alert-dialog-content",
|
|
174
|
+
className: cn("bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg", className),
|
|
175
|
+
...props
|
|
176
|
+
})] });
|
|
177
|
+
}
|
|
178
|
+
function AlertDialogHeader({ className, ...props }) {
|
|
179
|
+
return /* @__PURE__ */ jsx("div", {
|
|
180
|
+
"data-slot": "alert-dialog-header",
|
|
181
|
+
className: cn("flex flex-col gap-2 text-center sm:text-left", className),
|
|
182
|
+
...props
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
function AlertDialogFooter({ className, ...props }) {
|
|
186
|
+
return /* @__PURE__ */ jsx("div", {
|
|
187
|
+
"data-slot": "alert-dialog-footer",
|
|
188
|
+
className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
|
|
189
|
+
...props
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
function AlertDialogTitle({ className, ...props }) {
|
|
193
|
+
return /* @__PURE__ */ jsx(AlertDialogPrimitive.Title, {
|
|
194
|
+
"data-slot": "alert-dialog-title",
|
|
195
|
+
className: cn("text-lg font-semibold", className),
|
|
196
|
+
...props
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
function AlertDialogDescription({ className, ...props }) {
|
|
200
|
+
return /* @__PURE__ */ jsx(AlertDialogPrimitive.Description, {
|
|
201
|
+
"data-slot": "alert-dialog-description",
|
|
202
|
+
className: cn("text-muted-foreground text-sm", className),
|
|
203
|
+
...props
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
function AlertDialogAction({ className, variant = "default", ...props }) {
|
|
207
|
+
return /* @__PURE__ */ jsx(AlertDialogPrimitive.Action, {
|
|
208
|
+
className: cn(buttonVariants({ variant }), className),
|
|
209
|
+
...props
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
function AlertDialogCancel({ className, ...props }) {
|
|
213
|
+
return /* @__PURE__ */ jsx(AlertDialogPrimitive.Cancel, {
|
|
214
|
+
className: cn(buttonVariants({ variant: "outline" }), className),
|
|
215
|
+
...props
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
//#endregion
|
|
219
|
+
//#region src/primitives/AspectRatio/AspectRatio.tsx
|
|
220
|
+
function AspectRatio({ className, ...props }) {
|
|
221
|
+
return /* @__PURE__ */ jsx(AspectRatioPrimitive.Root, {
|
|
222
|
+
"data-slot": "aspect-ratio",
|
|
223
|
+
className: cn(className),
|
|
224
|
+
...props
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
//#endregion
|
|
228
|
+
//#region src/primitives/Avatar/Avatar.tsx
|
|
229
|
+
function Avatar({ className, ...props }) {
|
|
230
|
+
return /* @__PURE__ */ jsx(AvatarPrimitive.Root, {
|
|
231
|
+
"data-slot": "avatar",
|
|
232
|
+
className: cn("relative flex size-10 shrink-0 overflow-hidden rounded-full", className),
|
|
233
|
+
...props
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
function AvatarImage({ className, ...props }) {
|
|
237
|
+
return /* @__PURE__ */ jsx(AvatarPrimitive.Image, {
|
|
238
|
+
"data-slot": "avatar-image",
|
|
239
|
+
className: cn("aspect-square size-full", className),
|
|
240
|
+
...props
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
function AvatarFallback({ className, ...props }) {
|
|
244
|
+
return /* @__PURE__ */ jsx(AvatarPrimitive.Fallback, {
|
|
245
|
+
"data-slot": "avatar-fallback",
|
|
246
|
+
className: cn("bg-muted flex size-full items-center justify-center rounded-full", className),
|
|
247
|
+
...props
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
//#endregion
|
|
251
|
+
//#region src/primitives/Badge/Badge.tsx
|
|
252
|
+
const badgeVariants = cva("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden", {
|
|
253
|
+
variants: { variant: {
|
|
254
|
+
default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
|
|
255
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
|
|
256
|
+
destructive: "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
257
|
+
outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"
|
|
258
|
+
} },
|
|
259
|
+
defaultVariants: { variant: "default" }
|
|
260
|
+
});
|
|
261
|
+
function Badge({ className, variant, asChild = false, ...props }) {
|
|
262
|
+
return /* @__PURE__ */ jsx(asChild ? Slot : "span", {
|
|
263
|
+
"data-slot": "badge",
|
|
264
|
+
className: cn(badgeVariants({ variant }), className),
|
|
265
|
+
...props
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
//#endregion
|
|
269
|
+
//#region src/primitives/BodhiIcon/BodhiIcon.tsx
|
|
270
|
+
function BodhiIcon({ isDarkMode = false }) {
|
|
271
|
+
return /* @__PURE__ */ jsxs("svg", {
|
|
272
|
+
width: "64",
|
|
273
|
+
height: "64",
|
|
274
|
+
viewBox: "0 0 64 64",
|
|
275
|
+
fill: "none",
|
|
276
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
277
|
+
style: { fill: "var(--color-red-500)" },
|
|
278
|
+
children: [
|
|
279
|
+
/* @__PURE__ */ jsx("path", {
|
|
280
|
+
d: "M63.3 32.5c0 17.32-14.06 32.05-31.4 32.05C14.55 64.55.5 49.82.5 32.5A31.4 31.4 0 0 1 31.9 1.13 31.4 31.4 0 0 1 63.3 32.5",
|
|
281
|
+
fill: "white"
|
|
282
|
+
}),
|
|
283
|
+
/* @__PURE__ */ jsx("path", { d: "M32 .55a32 32 0 0 1 2.64 63.9l-.79-11.57.4-1.01 8.6-8.79a2.38 2.38 0 0 0 4.42-.85l8.54-.87a2.39 2.39 0 1 0 2.74-2.9l.17-9.7c.9-.04 1.6-.75 1.6-1.68a1.69 1.69 0 0 0-2.59-1.42L52.1 18a2.28 2.28 0 0 0-3.36-3.09l-4.88-4.22q.1-.28.1-.59a1.69 1.69 0 0 0-3.17-.8l-6.55-1.27a1.69 1.69 0 0 0-3.32-.01l-6.6 1.29a1.7 1.7 0 0 0-3.08 1.38l-4.88 4.22q-.23-.24-.55-.42a2.29 2.29 0 0 0-2.8 3.51l-5.64 7.66a1.7 1.7 0 0 0-.91-.27 1.69 1.69 0 0 0-.08 3.37l.17 9.85a2.39 2.39 0 1 0 3.26 2.8l8.02.82a2.38 2.38 0 0 0 4.06 1.34l8.4 9.04-.78 11.86C13 63.2 0 50.24 0 32.56a32 32 0 0 1 32-32" }),
|
|
284
|
+
/* @__PURE__ */ jsx("path", { d: "M40.52 35.07a2.4 2.4 0 0 0 1.97.3l1.43 4.35c-.82.37-1.4 1.2-1.4 2.17v.07l-8.9 6.9-.2-7.96z" }),
|
|
285
|
+
/* @__PURE__ */ jsx("path", { d: "m30.84 40.87-.42 7.95-7.96-6.2a2.37 2.37 0 0 0-1.28-2.9l1.5-4.54c.62 0 1.2-.25 1.62-.65z" }),
|
|
286
|
+
/* @__PURE__ */ jsx("path", { d: "M12.55 33.23a2.6 2.6 0 0 0 2.65.18l3.71 6.47a2.4 2.4 0 0 0-1.1 2.13l-7.95-.81q.04-.2.04-.4c0-.95-.55-1.76-1.35-2.15z" }),
|
|
287
|
+
/* @__PURE__ */ jsx("path", { d: "M56.68 38.9a2.4 2.4 0 0 0-.91 2.25l-8.48.86v-.12c0-.85-.44-1.59-1.1-2.01l3.7-6.47a2.6 2.6 0 0 0 2.63-.16z" }),
|
|
288
|
+
/* @__PURE__ */ jsx("path", { d: "M39.82 31.79a2.4 2.4 0 0 0 .52 3.15l-6.93 5.69-.28-11.4q.49-.24.81-.64z" }),
|
|
289
|
+
/* @__PURE__ */ jsx("path", { d: "M30.6 28.93q.38.3.84.43l-.59 11.22-6.4-6.2a2.4 2.4 0 0 0 .47-2.36z" }),
|
|
290
|
+
/* @__PURE__ */ jsx("path", { d: "M20.28 32.92c.07 1.19 1 2.14 2.17 2.25l-1.47 4.47a2.4 2.4 0 0 0-1.88.13l-3.7-6.47q.57-.35.91-.94z" }),
|
|
291
|
+
/* @__PURE__ */ jsx("path", { d: "M48.78 32.36q.35.59.92.94L46 39.77a2 2 0 0 0-.8-.25l-.3-.02q-.4 0-.78.14L42.7 35.3c.89-.35 1.52-1.21 1.52-2.23v-.06z" }),
|
|
292
|
+
/* @__PURE__ */ jsx("path", { d: "M57.25 28.04c.28.4.73.68 1.25.72l-.17 9.66h-.2q-.68 0-1.21.32l-4.17-5.66a2.6 2.6 0 0 0 .84-2.84z" }),
|
|
293
|
+
/* @__PURE__ */ jsx("path", { d: "M11.5 30.24a2.6 2.6 0 0 0 .87 2.86l-4.02 5.47a2.4 2.4 0 0 0-1.59-.04l-.17-9.77c.52-.04.97-.32 1.25-.72z" }),
|
|
294
|
+
/* @__PURE__ */ jsx("path", { d: "M49.21 29.17a2.6 2.6 0 0 0-.53 2.99l-4.49.64a2.4 2.4 0 0 0-1.33-1.87l.85-8.06h.02q.5-.01.88-.25z" }),
|
|
295
|
+
/* @__PURE__ */ jsx("path", { d: "M20.49 22.62q.4.24.88.25h.02l.8 7.58a2.4 2.4 0 0 0-1.9 2.25l-3.87-.54a2.6 2.6 0 0 0-.53-3z" }),
|
|
296
|
+
/* @__PURE__ */ jsx("path", { d: "M29.83 26.32a2.4 2.4 0 0 0 .55 2.4l-5.57 3.04a2.4 2.4 0 0 0-2.41-1.34l-.8-7.57q.55-.08.93-.44z" }),
|
|
297
|
+
/* @__PURE__ */ jsx("path", { d: "M42.57 22.41q.38.37.93.45l-.84 7.98a2.4 2.4 0 0 0-2.54.57l-.18.2-5.87-3.2a2.4 2.4 0 0 0 .4-1.66z" }),
|
|
298
|
+
/* @__PURE__ */ jsx("path", { d: "M48.4 17.6a2.3 2.3 0 0 0 2.9.99l.2-.1q.25-.14.44-.33l5.62 7.63a1.7 1.7 0 0 0-.42 2.06l-3.62 2.18a2.64 2.64 0 0 0-4.15-1L44.8 22.5a1.7 1.7 0 0 0 .32-2.28z" }),
|
|
299
|
+
/* @__PURE__ */ jsx("path", { d: "M19.98 20.22a1.7 1.7 0 0 0 .33 2.28l-4.58 6.52a2.63 2.63 0 0 0-4.15 1.01l-3.62-2.18a1.7 1.7 0 0 0-.42-2.06l5.61-7.63q.2.18.45.32c1.1.61 2.48.22 3.1-.88z" }),
|
|
300
|
+
/* @__PURE__ */ jsx("path", { d: "m42.06 20.92-.02.27q.01.61.38 1.06l-8 4.28a2.4 2.4 0 0 0-1.91-1.81l.08-4.14c.83 0 1.51-.6 1.65-1.4z" }),
|
|
301
|
+
/* @__PURE__ */ jsx("path", { d: "M30.94 19.3c.16.67.73 1.19 1.44 1.27l-.08 4.12-.2-.01c-.98 0-1.82.6-2.19 1.44l-7.23-3.87a1.7 1.7 0 0 0 .36-1.3z" }),
|
|
302
|
+
/* @__PURE__ */ jsx("path", { d: "M21.33 10.9c.25.46.71.8 1.26.87l.23.02c.48 0 .9-.2 1.21-.51l7.42 6.37a1.7 1.7 0 0 0-.55 1.43L23 20.74a1.69 1.69 0 0 0-2.88-.69L16.8 17.4c.34-.78.21-1.68-.3-2.33z" }),
|
|
303
|
+
/* @__PURE__ */ jsx("path", { d: "M48.6 15.07c-.51.65-.64 1.54-.3 2.33l-3.32 2.65a1.68 1.68 0 0 0-2.87.66l-7.85-1.75v-.06q0-.54-.29-.96l7.15-6.61a1.68 1.68 0 0 0 2.65-.44z" }),
|
|
304
|
+
/* @__PURE__ */ jsx("path", { d: "M40.7 9.5a1.7 1.7 0 0 0 .27 1.67l-7.13 6.6c-.3-.32-.72-.54-1.19-.56L32.8 10c.83-.11 1.48-.82 1.48-1.68v-.06z" }),
|
|
305
|
+
/* @__PURE__ */ jsx("path", { d: "M30.89 8.32c0 .93.75 1.68 1.69 1.68l-.14 7.22q-.46.04-.82.29l-7.45-6.4a1.7 1.7 0 0 0 .23-1.6l6.5-1.27z" })
|
|
306
|
+
]
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
//#endregion
|
|
310
|
+
//#region src/primitives/Breadcrumb/Breadcrumb.tsx
|
|
311
|
+
function Breadcrumb({ ...props }) {
|
|
312
|
+
return /* @__PURE__ */ jsx("nav", {
|
|
313
|
+
"aria-label": "breadcrumb",
|
|
314
|
+
"data-slot": "breadcrumb",
|
|
315
|
+
...props
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
function BreadcrumbList({ className, ...props }) {
|
|
319
|
+
return /* @__PURE__ */ jsx("ol", {
|
|
320
|
+
"data-slot": "breadcrumb-list",
|
|
321
|
+
className: cn("text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5", className),
|
|
322
|
+
...props
|
|
323
|
+
});
|
|
324
|
+
}
|
|
325
|
+
function BreadcrumbItem({ className, ...props }) {
|
|
326
|
+
return /* @__PURE__ */ jsx("li", {
|
|
327
|
+
"data-slot": "breadcrumb-item",
|
|
328
|
+
className: cn("inline-flex items-center gap-1.5", className),
|
|
329
|
+
...props
|
|
330
|
+
});
|
|
331
|
+
}
|
|
332
|
+
function BreadcrumbLink({ asChild, className, ...props }) {
|
|
333
|
+
return /* @__PURE__ */ jsx(asChild ? Slot : "a", {
|
|
334
|
+
"data-slot": "breadcrumb-link",
|
|
335
|
+
className: cn("hover:text-foreground transition-colors", className),
|
|
336
|
+
...props
|
|
337
|
+
});
|
|
338
|
+
}
|
|
339
|
+
function BreadcrumbPage({ className, ...props }) {
|
|
340
|
+
return /* @__PURE__ */ jsx("span", {
|
|
341
|
+
"data-slot": "breadcrumb-page",
|
|
342
|
+
"aria-current": "page",
|
|
343
|
+
className: cn("text-foreground font-normal", className),
|
|
344
|
+
...props
|
|
345
|
+
});
|
|
346
|
+
}
|
|
347
|
+
function BreadcrumbSeparator({ children, className, ...props }) {
|
|
348
|
+
return /* @__PURE__ */ jsx("li", {
|
|
349
|
+
"data-slot": "breadcrumb-separator",
|
|
350
|
+
role: "presentation",
|
|
351
|
+
"aria-hidden": "true",
|
|
352
|
+
className: cn("[&>svg]:size-3.5", className),
|
|
353
|
+
...props,
|
|
354
|
+
children: children ?? /* @__PURE__ */ jsx(ChevronRight, {})
|
|
355
|
+
});
|
|
356
|
+
}
|
|
357
|
+
function BreadcrumbEllipsis({ className, ...props }) {
|
|
358
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
359
|
+
"data-slot": "breadcrumb-ellipsis",
|
|
360
|
+
role: "presentation",
|
|
361
|
+
"aria-hidden": "true",
|
|
362
|
+
className: cn("flex size-9 items-center justify-center", className),
|
|
363
|
+
...props,
|
|
364
|
+
children: [/* @__PURE__ */ jsx(MoreHorizontal, { className: "size-4" }), /* @__PURE__ */ jsx("span", {
|
|
365
|
+
className: "sr-only",
|
|
366
|
+
children: "More"
|
|
367
|
+
})]
|
|
368
|
+
});
|
|
369
|
+
}
|
|
370
|
+
//#endregion
|
|
371
|
+
//#region src/primitives/Calendar/Calendar.tsx
|
|
372
|
+
function Calendar({ className, classNames, showOutsideDays = true, ...props }) {
|
|
373
|
+
return /* @__PURE__ */ jsx(DayPicker, {
|
|
374
|
+
showOutsideDays,
|
|
375
|
+
className: cn("p-3", className),
|
|
376
|
+
classNames: {
|
|
377
|
+
months: "flex flex-col sm:flex-row gap-2",
|
|
378
|
+
month: "flex flex-col gap-4",
|
|
379
|
+
caption: "flex justify-center pt-1 relative items-center w-full",
|
|
380
|
+
caption_label: "text-sm font-medium",
|
|
381
|
+
nav: "flex items-center gap-1",
|
|
382
|
+
nav_button: cn(buttonVariants({ variant: "outline" }), "size-7 bg-transparent p-0 opacity-50 hover:opacity-100"),
|
|
383
|
+
nav_button_previous: "absolute left-1",
|
|
384
|
+
nav_button_next: "absolute right-1",
|
|
385
|
+
table: "w-full border-collapse space-x-1",
|
|
386
|
+
head_row: "flex",
|
|
387
|
+
head_cell: "text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",
|
|
388
|
+
row: "flex w-full mt-2",
|
|
389
|
+
cell: cn("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-range-end)]:rounded-r-md", 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"),
|
|
390
|
+
day: cn(buttonVariants({ variant: "ghost" }), "size-8 p-0 font-normal aria-selected:opacity-100"),
|
|
391
|
+
day_range_start: "day-range-start aria-selected:bg-primary aria-selected:text-primary-foreground",
|
|
392
|
+
day_range_end: "day-range-end aria-selected:bg-primary aria-selected:text-primary-foreground",
|
|
393
|
+
day_selected: "bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",
|
|
394
|
+
day_today: "bg-accent text-accent-foreground",
|
|
395
|
+
day_outside: "day-outside text-muted-foreground aria-selected:text-muted-foreground",
|
|
396
|
+
day_disabled: "text-muted-foreground opacity-50",
|
|
397
|
+
day_range_middle: "aria-selected:bg-accent aria-selected:text-accent-foreground",
|
|
398
|
+
day_hidden: "invisible",
|
|
399
|
+
...classNames
|
|
400
|
+
},
|
|
401
|
+
components: {
|
|
402
|
+
IconLeft: ({ className, ...props }) => /* @__PURE__ */ jsx(ChevronLeft, {
|
|
403
|
+
className: cn("size-4", className),
|
|
404
|
+
...props
|
|
405
|
+
}),
|
|
406
|
+
IconRight: ({ className, ...props }) => /* @__PURE__ */ jsx(ChevronRight, {
|
|
407
|
+
className: cn("size-4", className),
|
|
408
|
+
...props
|
|
409
|
+
})
|
|
410
|
+
},
|
|
411
|
+
...props
|
|
412
|
+
});
|
|
413
|
+
}
|
|
414
|
+
//#endregion
|
|
415
|
+
//#region src/primitives/Card/Card.tsx
|
|
416
|
+
function Card({ className, ...props }) {
|
|
417
|
+
return /* @__PURE__ */ jsx("div", {
|
|
418
|
+
"data-slot": "card",
|
|
419
|
+
className: cn("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border", className),
|
|
420
|
+
...props
|
|
421
|
+
});
|
|
422
|
+
}
|
|
423
|
+
function CardHeader({ className, ...props }) {
|
|
424
|
+
return /* @__PURE__ */ jsx("div", {
|
|
425
|
+
"data-slot": "card-header",
|
|
426
|
+
className: cn("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 pt-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6", className),
|
|
427
|
+
...props
|
|
428
|
+
});
|
|
429
|
+
}
|
|
430
|
+
function CardTitle({ className, ...props }) {
|
|
431
|
+
return /* @__PURE__ */ jsx("h4", {
|
|
432
|
+
"data-slot": "card-title",
|
|
433
|
+
className: cn("leading-none", className),
|
|
434
|
+
...props
|
|
435
|
+
});
|
|
436
|
+
}
|
|
437
|
+
function CardDescription({ className, ...props }) {
|
|
438
|
+
return /* @__PURE__ */ jsx("p", {
|
|
439
|
+
"data-slot": "card-description",
|
|
440
|
+
className: cn("text-muted-foreground", className),
|
|
441
|
+
...props
|
|
442
|
+
});
|
|
443
|
+
}
|
|
444
|
+
function CardAction({ className, ...props }) {
|
|
445
|
+
return /* @__PURE__ */ jsx("div", {
|
|
446
|
+
"data-slot": "card-action",
|
|
447
|
+
className: cn("col-start-2 row-span-2 row-start-1 self-start justify-self-end", className),
|
|
448
|
+
...props
|
|
449
|
+
});
|
|
450
|
+
}
|
|
451
|
+
function CardContent({ className, ...props }) {
|
|
452
|
+
return /* @__PURE__ */ jsx("div", {
|
|
453
|
+
"data-slot": "card-content",
|
|
454
|
+
className: cn("px-6 [&:last-child]:pb-6", className),
|
|
455
|
+
...props
|
|
456
|
+
});
|
|
457
|
+
}
|
|
458
|
+
function CardFooter({ className, ...props }) {
|
|
459
|
+
return /* @__PURE__ */ jsx("div", {
|
|
460
|
+
"data-slot": "card-footer",
|
|
461
|
+
className: cn("flex items-center px-6 pb-6 [.border-t]:pt-6", className),
|
|
462
|
+
...props
|
|
463
|
+
});
|
|
464
|
+
}
|
|
465
|
+
//#endregion
|
|
466
|
+
//#region src/primitives/Carousel/Carousel.tsx
|
|
467
|
+
const CarouselContext = React.createContext(null);
|
|
468
|
+
function useCarousel() {
|
|
469
|
+
const context = React.useContext(CarouselContext);
|
|
470
|
+
if (!context) throw new Error("useCarousel must be used within a <Carousel />");
|
|
471
|
+
return context;
|
|
472
|
+
}
|
|
473
|
+
function Carousel({ orientation = "horizontal", opts, setApi, plugins, className, children, ...props }) {
|
|
474
|
+
const [carouselRef, api] = useEmblaCarousel({
|
|
475
|
+
...opts,
|
|
476
|
+
axis: orientation === "horizontal" ? "x" : "y"
|
|
477
|
+
}, plugins);
|
|
478
|
+
const [canScrollPrev, setCanScrollPrev] = React.useState(false);
|
|
479
|
+
const [canScrollNext, setCanScrollNext] = React.useState(false);
|
|
480
|
+
const onSelect = React.useCallback((api) => {
|
|
481
|
+
if (!api) return;
|
|
482
|
+
setCanScrollPrev(api.canScrollPrev());
|
|
483
|
+
setCanScrollNext(api.canScrollNext());
|
|
484
|
+
}, []);
|
|
485
|
+
const scrollPrev = React.useCallback(() => {
|
|
486
|
+
api?.scrollPrev();
|
|
487
|
+
}, [api]);
|
|
488
|
+
const scrollNext = React.useCallback(() => {
|
|
489
|
+
api?.scrollNext();
|
|
490
|
+
}, [api]);
|
|
491
|
+
const handleKeyDown = React.useCallback((event) => {
|
|
492
|
+
if (event.key === "ArrowLeft") {
|
|
493
|
+
event.preventDefault();
|
|
494
|
+
scrollPrev();
|
|
495
|
+
} else if (event.key === "ArrowRight") {
|
|
496
|
+
event.preventDefault();
|
|
497
|
+
scrollNext();
|
|
498
|
+
}
|
|
499
|
+
}, [scrollPrev, scrollNext]);
|
|
500
|
+
React.useEffect(() => {
|
|
501
|
+
if (!api || !setApi) return;
|
|
502
|
+
setApi(api);
|
|
503
|
+
}, [api, setApi]);
|
|
504
|
+
React.useEffect(() => {
|
|
505
|
+
if (!api) return;
|
|
506
|
+
onSelect(api);
|
|
507
|
+
api.on("reInit", onSelect);
|
|
508
|
+
api.on("select", onSelect);
|
|
509
|
+
return () => {
|
|
510
|
+
api?.off("select", onSelect);
|
|
511
|
+
};
|
|
512
|
+
}, [api, onSelect]);
|
|
513
|
+
return /* @__PURE__ */ jsx(CarouselContext.Provider, {
|
|
514
|
+
value: {
|
|
515
|
+
carouselRef,
|
|
516
|
+
api,
|
|
517
|
+
opts,
|
|
518
|
+
orientation: orientation || (opts?.axis === "y" ? "vertical" : "horizontal"),
|
|
519
|
+
scrollPrev,
|
|
520
|
+
scrollNext,
|
|
521
|
+
canScrollPrev,
|
|
522
|
+
canScrollNext
|
|
523
|
+
},
|
|
524
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
525
|
+
onKeyDownCapture: handleKeyDown,
|
|
526
|
+
className: cn("relative", className),
|
|
527
|
+
role: "region",
|
|
528
|
+
"aria-roledescription": "carousel",
|
|
529
|
+
"data-slot": "carousel",
|
|
530
|
+
...props,
|
|
531
|
+
children
|
|
532
|
+
})
|
|
533
|
+
});
|
|
534
|
+
}
|
|
535
|
+
function CarouselContent({ className, ...props }) {
|
|
536
|
+
const { carouselRef, orientation } = useCarousel();
|
|
537
|
+
return /* @__PURE__ */ jsx("div", {
|
|
538
|
+
ref: carouselRef,
|
|
539
|
+
className: "overflow-hidden",
|
|
540
|
+
"data-slot": "carousel-content",
|
|
541
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
542
|
+
className: cn("flex", orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col", className),
|
|
543
|
+
...props
|
|
544
|
+
})
|
|
545
|
+
});
|
|
546
|
+
}
|
|
547
|
+
function CarouselItem({ className, ...props }) {
|
|
548
|
+
const { orientation } = useCarousel();
|
|
549
|
+
return /* @__PURE__ */ jsx("div", {
|
|
550
|
+
role: "group",
|
|
551
|
+
"aria-roledescription": "slide",
|
|
552
|
+
"data-slot": "carousel-item",
|
|
553
|
+
className: cn("min-w-0 shrink-0 grow-0 basis-full", orientation === "horizontal" ? "pl-4" : "pt-4", className),
|
|
554
|
+
...props
|
|
555
|
+
});
|
|
556
|
+
}
|
|
557
|
+
function CarouselPrevious({ className, variant = "outline", size = "icon", ...props }) {
|
|
558
|
+
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
559
|
+
return /* @__PURE__ */ jsxs(Button, {
|
|
560
|
+
"data-slot": "carousel-previous",
|
|
561
|
+
variant,
|
|
562
|
+
size,
|
|
563
|
+
className: cn("absolute size-8 rounded-full", orientation === "horizontal" ? "top-1/2 -left-12 -translate-y-1/2" : "-top-12 left-1/2 -translate-x-1/2 rotate-90", className),
|
|
564
|
+
disabled: !canScrollPrev,
|
|
565
|
+
onClick: scrollPrev,
|
|
566
|
+
...props,
|
|
567
|
+
children: [/* @__PURE__ */ jsx(ArrowLeft, {}), /* @__PURE__ */ jsx("span", {
|
|
568
|
+
className: "sr-only",
|
|
569
|
+
children: "Previous slide"
|
|
570
|
+
})]
|
|
571
|
+
});
|
|
572
|
+
}
|
|
573
|
+
function CarouselNext({ className, variant = "outline", size = "icon", ...props }) {
|
|
574
|
+
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
575
|
+
return /* @__PURE__ */ jsxs(Button, {
|
|
576
|
+
"data-slot": "carousel-next",
|
|
577
|
+
variant,
|
|
578
|
+
size,
|
|
579
|
+
className: cn("absolute size-8 rounded-full", orientation === "horizontal" ? "top-1/2 -right-12 -translate-y-1/2" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90", className),
|
|
580
|
+
disabled: !canScrollNext,
|
|
581
|
+
onClick: scrollNext,
|
|
582
|
+
...props,
|
|
583
|
+
children: [/* @__PURE__ */ jsx(ArrowRight, {}), /* @__PURE__ */ jsx("span", {
|
|
584
|
+
className: "sr-only",
|
|
585
|
+
children: "Next slide"
|
|
586
|
+
})]
|
|
587
|
+
});
|
|
588
|
+
}
|
|
589
|
+
//#endregion
|
|
590
|
+
//#region src/primitives/Chart/Chart.tsx
|
|
591
|
+
const THEMES = {
|
|
592
|
+
light: "",
|
|
593
|
+
dark: ".dark"
|
|
594
|
+
};
|
|
595
|
+
const ChartContext = React.createContext(null);
|
|
596
|
+
function useChart() {
|
|
597
|
+
const context = React.useContext(ChartContext);
|
|
598
|
+
if (!context) throw new Error("useChart must be used within a <ChartContainer />");
|
|
599
|
+
return context;
|
|
600
|
+
}
|
|
601
|
+
function ChartContainer({ id, className, children, config, ...props }) {
|
|
602
|
+
const uniqueId = React.useId();
|
|
603
|
+
const chartId = `chart-${id || uniqueId.replace(/:/g, "")}`;
|
|
604
|
+
return /* @__PURE__ */ jsx(ChartContext.Provider, {
|
|
605
|
+
value: { config },
|
|
606
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
607
|
+
"data-slot": "chart",
|
|
608
|
+
"data-chart": chartId,
|
|
609
|
+
className: cn("[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border flex aspect-video justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden", className),
|
|
610
|
+
...props,
|
|
611
|
+
children: [/* @__PURE__ */ jsx(ChartStyle, {
|
|
612
|
+
id: chartId,
|
|
613
|
+
config
|
|
614
|
+
}), /* @__PURE__ */ jsx(RechartsPrimitive.ResponsiveContainer, { children })]
|
|
615
|
+
})
|
|
616
|
+
});
|
|
617
|
+
}
|
|
618
|
+
const ChartStyle = ({ id, config }) => {
|
|
619
|
+
const colorConfig = Object.entries(config).filter(([, config]) => config.theme || config.color);
|
|
620
|
+
if (!colorConfig.length) return null;
|
|
621
|
+
return /* @__PURE__ */ jsx("style", { dangerouslySetInnerHTML: { __html: Object.entries(THEMES).map(([theme, prefix]) => `
|
|
622
|
+
${prefix} [data-chart=${id}] {
|
|
623
|
+
${colorConfig.map(([key, itemConfig]) => {
|
|
624
|
+
const color = itemConfig.theme?.[theme] || itemConfig.color;
|
|
625
|
+
return color ? ` --color-${key}: ${color};` : null;
|
|
626
|
+
}).join("\n")}
|
|
627
|
+
}
|
|
628
|
+
`).join("\n") } });
|
|
629
|
+
};
|
|
630
|
+
const ChartTooltip = RechartsPrimitive.Tooltip;
|
|
631
|
+
function ChartTooltipContent({ active, payload, className, indicator = "dot", hideLabel = false, hideIndicator = false, label, labelFormatter, labelClassName, formatter, color, nameKey, labelKey }) {
|
|
632
|
+
const { config } = useChart();
|
|
633
|
+
const tooltipLabel = React.useMemo(() => {
|
|
634
|
+
if (hideLabel || !payload?.length) return null;
|
|
635
|
+
const [item] = payload;
|
|
636
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, `${labelKey || item?.dataKey || item?.name || "value"}`);
|
|
637
|
+
const value = !labelKey && typeof label === "string" ? config[label]?.label || label : itemConfig?.label;
|
|
638
|
+
if (labelFormatter) return /* @__PURE__ */ jsx("div", {
|
|
639
|
+
className: cn("font-medium", labelClassName),
|
|
640
|
+
children: labelFormatter(value, payload)
|
|
641
|
+
});
|
|
642
|
+
if (!value) return null;
|
|
643
|
+
return /* @__PURE__ */ jsx("div", {
|
|
644
|
+
className: cn("font-medium", labelClassName),
|
|
645
|
+
children: value
|
|
646
|
+
});
|
|
647
|
+
}, [
|
|
648
|
+
label,
|
|
649
|
+
labelFormatter,
|
|
650
|
+
payload,
|
|
651
|
+
hideLabel,
|
|
652
|
+
labelClassName,
|
|
653
|
+
config,
|
|
654
|
+
labelKey
|
|
655
|
+
]);
|
|
656
|
+
if (!active || !payload?.length) return null;
|
|
657
|
+
const nestLabel = payload.length === 1 && indicator !== "dot";
|
|
658
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
659
|
+
className: cn("border-border/50 bg-background grid min-w-[8rem] items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl", className),
|
|
660
|
+
children: [!nestLabel ? tooltipLabel : null, /* @__PURE__ */ jsx("div", {
|
|
661
|
+
className: "grid gap-1.5",
|
|
662
|
+
children: payload.map((item, index) => {
|
|
663
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, `${nameKey || item.name || item.dataKey || "value"}`);
|
|
664
|
+
const indicatorColor = color || item.payload.fill || item.color;
|
|
665
|
+
return /* @__PURE__ */ jsx("div", {
|
|
666
|
+
className: cn("[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5", indicator === "dot" && "items-center"),
|
|
667
|
+
children: formatter && item?.value !== void 0 && item.name ? formatter(item.value, item.name, item, index, item.payload) : /* @__PURE__ */ jsxs(Fragment, { children: [itemConfig?.icon ? /* @__PURE__ */ jsx(itemConfig.icon, {}) : !hideIndicator && /* @__PURE__ */ jsx("div", {
|
|
668
|
+
className: cn("shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)", {
|
|
669
|
+
"h-2.5 w-2.5": indicator === "dot",
|
|
670
|
+
"w-1": indicator === "line",
|
|
671
|
+
"w-0 border-[1.5px] border-dashed bg-transparent": indicator === "dashed",
|
|
672
|
+
"my-0.5": nestLabel && indicator === "dashed"
|
|
673
|
+
}),
|
|
674
|
+
style: {
|
|
675
|
+
"--color-bg": indicatorColor,
|
|
676
|
+
"--color-border": indicatorColor
|
|
677
|
+
}
|
|
678
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
679
|
+
className: cn("flex flex-1 justify-between leading-none", nestLabel ? "items-end" : "items-center"),
|
|
680
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
681
|
+
className: "grid gap-1.5",
|
|
682
|
+
children: [nestLabel ? tooltipLabel : null, /* @__PURE__ */ jsx("span", {
|
|
683
|
+
className: "text-muted-foreground",
|
|
684
|
+
children: itemConfig?.label || item.name
|
|
685
|
+
})]
|
|
686
|
+
}), item.value && /* @__PURE__ */ jsx("span", {
|
|
687
|
+
className: "text-foreground font-mono font-medium tabular-nums",
|
|
688
|
+
children: item.value.toLocaleString()
|
|
689
|
+
})]
|
|
690
|
+
})] })
|
|
691
|
+
}, item.dataKey);
|
|
692
|
+
})
|
|
693
|
+
})]
|
|
694
|
+
});
|
|
695
|
+
}
|
|
696
|
+
const ChartLegend = RechartsPrimitive.Legend;
|
|
697
|
+
function ChartLegendContent({ className, hideIcon = false, payload, verticalAlign = "bottom", nameKey }) {
|
|
698
|
+
const { config } = useChart();
|
|
699
|
+
if (!payload?.length) return null;
|
|
700
|
+
return /* @__PURE__ */ jsx("div", {
|
|
701
|
+
className: cn("flex items-center justify-center gap-4", verticalAlign === "top" ? "pb-3" : "pt-3", className),
|
|
702
|
+
children: payload.map((item) => {
|
|
703
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, `${nameKey || item.dataKey || "value"}`);
|
|
704
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
705
|
+
className: cn("[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3"),
|
|
706
|
+
children: [itemConfig?.icon && !hideIcon ? /* @__PURE__ */ jsx(itemConfig.icon, {}) : /* @__PURE__ */ jsx("div", {
|
|
707
|
+
className: "h-2 w-2 shrink-0 rounded-[2px]",
|
|
708
|
+
style: { backgroundColor: item.color }
|
|
709
|
+
}), itemConfig?.label]
|
|
710
|
+
}, item.value);
|
|
711
|
+
})
|
|
712
|
+
});
|
|
713
|
+
}
|
|
714
|
+
function getPayloadConfigFromPayload(config, payload, key) {
|
|
715
|
+
if (typeof payload !== "object" || payload === null) return;
|
|
716
|
+
const payloadPayload = "payload" in payload && typeof payload.payload === "object" && payload.payload !== null ? payload.payload : void 0;
|
|
717
|
+
let configLabelKey = key;
|
|
718
|
+
if (key in payload && typeof payload[key] === "string") configLabelKey = payload[key];
|
|
719
|
+
else if (payloadPayload && key in payloadPayload && typeof payloadPayload[key] === "string") configLabelKey = payloadPayload[key];
|
|
720
|
+
return configLabelKey in config ? config[configLabelKey] : config[key];
|
|
721
|
+
}
|
|
722
|
+
//#endregion
|
|
723
|
+
//#region src/primitives/Checkbox/Checkbox.tsx
|
|
724
|
+
function Checkbox({ className, ...props }) {
|
|
725
|
+
return /* @__PURE__ */ jsx(CheckboxPrimitive.Root, {
|
|
726
|
+
"data-slot": "checkbox",
|
|
727
|
+
className: cn("peer border bg-input-background dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50", className),
|
|
728
|
+
...props,
|
|
729
|
+
children: /* @__PURE__ */ jsx(CheckboxPrimitive.Indicator, {
|
|
730
|
+
"data-slot": "checkbox-indicator",
|
|
731
|
+
className: "flex items-center justify-center text-current transition-none",
|
|
732
|
+
children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-3.5" })
|
|
733
|
+
})
|
|
734
|
+
});
|
|
735
|
+
}
|
|
736
|
+
//#endregion
|
|
737
|
+
//#region src/primitives/Collapsible/Collapsible.tsx
|
|
738
|
+
function Collapsible({ ...props }) {
|
|
739
|
+
return /* @__PURE__ */ jsx(CollapsiblePrimitive.Root, {
|
|
740
|
+
"data-slot": "collapsible",
|
|
741
|
+
...props
|
|
742
|
+
});
|
|
743
|
+
}
|
|
744
|
+
function CollapsibleTrigger({ ...props }) {
|
|
745
|
+
return /* @__PURE__ */ jsx(CollapsiblePrimitive.CollapsibleTrigger, {
|
|
746
|
+
"data-slot": "collapsible-trigger",
|
|
747
|
+
...props
|
|
748
|
+
});
|
|
749
|
+
}
|
|
750
|
+
function CollapsibleContent({ ...props }) {
|
|
751
|
+
return /* @__PURE__ */ jsx(CollapsiblePrimitive.CollapsibleContent, {
|
|
752
|
+
"data-slot": "collapsible-content",
|
|
753
|
+
...props
|
|
754
|
+
});
|
|
755
|
+
}
|
|
756
|
+
//#endregion
|
|
757
|
+
//#region src/primitives/Dialog/Dialog.tsx
|
|
758
|
+
function Dialog({ ...props }) {
|
|
759
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Root, {
|
|
760
|
+
"data-slot": "dialog",
|
|
761
|
+
...props
|
|
762
|
+
});
|
|
763
|
+
}
|
|
764
|
+
function DialogTrigger({ ...props }) {
|
|
765
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Trigger, {
|
|
766
|
+
"data-slot": "dialog-trigger",
|
|
767
|
+
...props
|
|
768
|
+
});
|
|
769
|
+
}
|
|
770
|
+
function DialogPortal({ ...props }) {
|
|
771
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Portal, {
|
|
772
|
+
"data-slot": "dialog-portal",
|
|
773
|
+
...props
|
|
774
|
+
});
|
|
775
|
+
}
|
|
776
|
+
function DialogClose({ ...props }) {
|
|
777
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Close, {
|
|
778
|
+
"data-slot": "dialog-close",
|
|
779
|
+
...props
|
|
780
|
+
});
|
|
781
|
+
}
|
|
782
|
+
function DialogOverlay({ className, ...props }) {
|
|
783
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Overlay, {
|
|
784
|
+
"data-slot": "dialog-overlay",
|
|
785
|
+
className: cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-[var(--overlay)]", className),
|
|
786
|
+
...props
|
|
787
|
+
});
|
|
788
|
+
}
|
|
789
|
+
function DialogContent({ className, children, showCloseButton = true, ...props }) {
|
|
790
|
+
return /* @__PURE__ */ jsxs(DialogPortal, {
|
|
791
|
+
"data-slot": "dialog-portal",
|
|
792
|
+
children: [/* @__PURE__ */ jsx(DialogOverlay, {}), /* @__PURE__ */ jsxs(DialogPrimitive.Content, {
|
|
793
|
+
"data-slot": "dialog-content",
|
|
794
|
+
className: cn("bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg", className),
|
|
795
|
+
...props,
|
|
796
|
+
children: [children, showCloseButton && /* @__PURE__ */ jsxs(DialogPrimitive.Close, {
|
|
797
|
+
className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
798
|
+
children: [/* @__PURE__ */ jsx(XIcon, {}), /* @__PURE__ */ jsx("span", {
|
|
799
|
+
className: "sr-only",
|
|
800
|
+
children: "Close"
|
|
801
|
+
})]
|
|
802
|
+
})]
|
|
803
|
+
})]
|
|
804
|
+
});
|
|
805
|
+
}
|
|
806
|
+
function DialogHeader({ className, ...props }) {
|
|
807
|
+
return /* @__PURE__ */ jsx("div", {
|
|
808
|
+
"data-slot": "dialog-header",
|
|
809
|
+
className: cn("flex flex-col gap-2 text-center sm:text-left", className),
|
|
810
|
+
...props
|
|
811
|
+
});
|
|
812
|
+
}
|
|
813
|
+
function DialogFooter({ className, ...props }) {
|
|
814
|
+
return /* @__PURE__ */ jsx("div", {
|
|
815
|
+
"data-slot": "dialog-footer",
|
|
816
|
+
className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
|
|
817
|
+
...props
|
|
818
|
+
});
|
|
819
|
+
}
|
|
820
|
+
function DialogTitle({ className, ...props }) {
|
|
821
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Title, {
|
|
822
|
+
"data-slot": "dialog-title",
|
|
823
|
+
className: cn("text-lg leading-none font-semibold", className),
|
|
824
|
+
...props
|
|
825
|
+
});
|
|
826
|
+
}
|
|
827
|
+
function DialogDescription({ className, ...props }) {
|
|
828
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Description, {
|
|
829
|
+
"data-slot": "dialog-description",
|
|
830
|
+
className: cn("text-muted-foreground text-sm", className),
|
|
831
|
+
...props
|
|
832
|
+
});
|
|
833
|
+
}
|
|
834
|
+
//#endregion
|
|
835
|
+
//#region src/primitives/Command/Command.tsx
|
|
836
|
+
function Command$1({ className, ...props }) {
|
|
837
|
+
return /* @__PURE__ */ jsx(Command, {
|
|
838
|
+
"data-slot": "command",
|
|
839
|
+
className: cn("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md", className),
|
|
840
|
+
...props
|
|
841
|
+
});
|
|
842
|
+
}
|
|
843
|
+
function CommandDialog({ title = "Command Palette", description = "Search for a command to run...", children, ...props }) {
|
|
844
|
+
return /* @__PURE__ */ jsxs(Dialog, {
|
|
845
|
+
...props,
|
|
846
|
+
children: [/* @__PURE__ */ jsxs(DialogHeader, {
|
|
847
|
+
className: "sr-only",
|
|
848
|
+
children: [/* @__PURE__ */ jsx(DialogTitle, { children: title }), /* @__PURE__ */ jsx(DialogDescription, { children: description })]
|
|
849
|
+
}), /* @__PURE__ */ jsx(DialogContent, {
|
|
850
|
+
className: "overflow-hidden p-0",
|
|
851
|
+
children: /* @__PURE__ */ jsx(Command$1, {
|
|
852
|
+
className: "[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[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",
|
|
853
|
+
children
|
|
854
|
+
})
|
|
855
|
+
})]
|
|
856
|
+
});
|
|
857
|
+
}
|
|
858
|
+
function CommandInput({ className, ...props }) {
|
|
859
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
860
|
+
"data-slot": "command-input-wrapper",
|
|
861
|
+
className: "flex h-9 items-center gap-2 border-b px-3",
|
|
862
|
+
children: [/* @__PURE__ */ jsx(SearchIcon, { className: "size-4 shrink-0 opacity-50" }), /* @__PURE__ */ jsx(Command.Input, {
|
|
863
|
+
"data-slot": "command-input",
|
|
864
|
+
className: cn("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50", className),
|
|
865
|
+
...props
|
|
866
|
+
})]
|
|
867
|
+
});
|
|
868
|
+
}
|
|
869
|
+
function CommandList({ className, ...props }) {
|
|
870
|
+
return /* @__PURE__ */ jsx(Command.List, {
|
|
871
|
+
"data-slot": "command-list",
|
|
872
|
+
className: cn("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto", className),
|
|
873
|
+
...props
|
|
874
|
+
});
|
|
875
|
+
}
|
|
876
|
+
function CommandEmpty({ ...props }) {
|
|
877
|
+
return /* @__PURE__ */ jsx(Command.Empty, {
|
|
878
|
+
"data-slot": "command-empty",
|
|
879
|
+
className: "py-6 text-center text-sm",
|
|
880
|
+
...props
|
|
881
|
+
});
|
|
882
|
+
}
|
|
883
|
+
function CommandGroup({ className, ...props }) {
|
|
884
|
+
return /* @__PURE__ */ jsx(Command.Group, {
|
|
885
|
+
"data-slot": "command-group",
|
|
886
|
+
className: cn("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium", className),
|
|
887
|
+
...props
|
|
888
|
+
});
|
|
889
|
+
}
|
|
890
|
+
function CommandSeparator({ className, ...props }) {
|
|
891
|
+
return /* @__PURE__ */ jsx(Command.Separator, {
|
|
892
|
+
"data-slot": "command-separator",
|
|
893
|
+
className: cn("bg-border -mx-1 h-px", className),
|
|
894
|
+
...props
|
|
895
|
+
});
|
|
896
|
+
}
|
|
897
|
+
function CommandItem({ className, ...props }) {
|
|
898
|
+
return /* @__PURE__ */ jsx(Command.Item, {
|
|
899
|
+
"data-slot": "command-item",
|
|
900
|
+
className: cn("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
901
|
+
...props
|
|
902
|
+
});
|
|
903
|
+
}
|
|
904
|
+
function CommandShortcut({ className, ...props }) {
|
|
905
|
+
return /* @__PURE__ */ jsx("span", {
|
|
906
|
+
"data-slot": "command-shortcut",
|
|
907
|
+
className: cn("text-muted-foreground ml-auto text-xs tracking-widest", className),
|
|
908
|
+
...props
|
|
909
|
+
});
|
|
910
|
+
}
|
|
911
|
+
//#endregion
|
|
912
|
+
//#region src/primitives/ContextMenu/ContextMenu.tsx
|
|
913
|
+
function ContextMenu({ ...props }) {
|
|
914
|
+
return /* @__PURE__ */ jsx(ContextMenuPrimitive.Root, {
|
|
915
|
+
"data-slot": "context-menu",
|
|
916
|
+
...props
|
|
917
|
+
});
|
|
918
|
+
}
|
|
919
|
+
function ContextMenuTrigger({ ...props }) {
|
|
920
|
+
return /* @__PURE__ */ jsx(ContextMenuPrimitive.Trigger, {
|
|
921
|
+
"data-slot": "context-menu-trigger",
|
|
922
|
+
...props
|
|
923
|
+
});
|
|
924
|
+
}
|
|
925
|
+
function ContextMenuGroup({ ...props }) {
|
|
926
|
+
return /* @__PURE__ */ jsx(ContextMenuPrimitive.Group, {
|
|
927
|
+
"data-slot": "context-menu-group",
|
|
928
|
+
...props
|
|
929
|
+
});
|
|
930
|
+
}
|
|
931
|
+
function ContextMenuPortal({ ...props }) {
|
|
932
|
+
return /* @__PURE__ */ jsx(ContextMenuPrimitive.Portal, {
|
|
933
|
+
"data-slot": "context-menu-portal",
|
|
934
|
+
...props
|
|
935
|
+
});
|
|
936
|
+
}
|
|
937
|
+
function ContextMenuSub({ ...props }) {
|
|
938
|
+
return /* @__PURE__ */ jsx(ContextMenuPrimitive.Sub, {
|
|
939
|
+
"data-slot": "context-menu-sub",
|
|
940
|
+
...props
|
|
941
|
+
});
|
|
942
|
+
}
|
|
943
|
+
function ContextMenuRadioGroup({ ...props }) {
|
|
944
|
+
return /* @__PURE__ */ jsx(ContextMenuPrimitive.RadioGroup, {
|
|
945
|
+
"data-slot": "context-menu-radio-group",
|
|
946
|
+
...props
|
|
947
|
+
});
|
|
948
|
+
}
|
|
949
|
+
function ContextMenuSubTrigger({ className, inset, children, ...props }) {
|
|
950
|
+
return /* @__PURE__ */ jsxs(ContextMenuPrimitive.SubTrigger, {
|
|
951
|
+
"data-slot": "context-menu-sub-trigger",
|
|
952
|
+
"data-inset": inset,
|
|
953
|
+
className: cn("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
954
|
+
...props,
|
|
955
|
+
children: [children, /* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto" })]
|
|
956
|
+
});
|
|
957
|
+
}
|
|
958
|
+
function ContextMenuSubContent({ className, ...props }) {
|
|
959
|
+
return /* @__PURE__ */ jsx(ContextMenuPrimitive.SubContent, {
|
|
960
|
+
"data-slot": "context-menu-sub-content",
|
|
961
|
+
className: cn("bg-popover text-popover-foreground 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 z-50 min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg", className),
|
|
962
|
+
...props
|
|
963
|
+
});
|
|
964
|
+
}
|
|
965
|
+
function ContextMenuContent({ className, ...props }) {
|
|
966
|
+
return /* @__PURE__ */ jsx(ContextMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(ContextMenuPrimitive.Content, {
|
|
967
|
+
"data-slot": "context-menu-content",
|
|
968
|
+
className: cn("bg-popover text-popover-foreground 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 z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md", className),
|
|
969
|
+
...props
|
|
970
|
+
}) });
|
|
971
|
+
}
|
|
972
|
+
function ContextMenuItem({ className, inset, variant = "default", ...props }) {
|
|
973
|
+
return /* @__PURE__ */ jsx(ContextMenuPrimitive.Item, {
|
|
974
|
+
"data-slot": "context-menu-item",
|
|
975
|
+
"data-inset": inset,
|
|
976
|
+
"data-variant": variant,
|
|
977
|
+
className: cn("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
978
|
+
...props
|
|
979
|
+
});
|
|
980
|
+
}
|
|
981
|
+
function ContextMenuCheckboxItem({ className, children, checked, ...props }) {
|
|
982
|
+
return /* @__PURE__ */ jsxs(ContextMenuPrimitive.CheckboxItem, {
|
|
983
|
+
"data-slot": "context-menu-checkbox-item",
|
|
984
|
+
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),
|
|
985
|
+
checked,
|
|
986
|
+
...props,
|
|
987
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
988
|
+
className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",
|
|
989
|
+
children: /* @__PURE__ */ jsx(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) })
|
|
990
|
+
}), children]
|
|
991
|
+
});
|
|
992
|
+
}
|
|
993
|
+
function ContextMenuRadioItem({ className, children, ...props }) {
|
|
994
|
+
return /* @__PURE__ */ jsxs(ContextMenuPrimitive.RadioItem, {
|
|
995
|
+
"data-slot": "context-menu-radio-item",
|
|
996
|
+
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),
|
|
997
|
+
...props,
|
|
998
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
999
|
+
className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",
|
|
1000
|
+
children: /* @__PURE__ */ jsx(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CircleIcon, { className: "size-2 fill-current" }) })
|
|
1001
|
+
}), children]
|
|
1002
|
+
});
|
|
1003
|
+
}
|
|
1004
|
+
function ContextMenuLabel({ className, inset, ...props }) {
|
|
1005
|
+
return /* @__PURE__ */ jsx(ContextMenuPrimitive.Label, {
|
|
1006
|
+
"data-slot": "context-menu-label",
|
|
1007
|
+
"data-inset": inset,
|
|
1008
|
+
className: cn("text-foreground px-2 py-1.5 text-sm font-medium data-[inset]:pl-8", className),
|
|
1009
|
+
...props
|
|
1010
|
+
});
|
|
1011
|
+
}
|
|
1012
|
+
function ContextMenuSeparator({ className, ...props }) {
|
|
1013
|
+
return /* @__PURE__ */ jsx(ContextMenuPrimitive.Separator, {
|
|
1014
|
+
"data-slot": "context-menu-separator",
|
|
1015
|
+
className: cn("bg-border -mx-1 my-1 h-px", className),
|
|
1016
|
+
...props
|
|
1017
|
+
});
|
|
1018
|
+
}
|
|
1019
|
+
function ContextMenuShortcut({ className, ...props }) {
|
|
1020
|
+
return /* @__PURE__ */ jsx("span", {
|
|
1021
|
+
"data-slot": "context-menu-shortcut",
|
|
1022
|
+
className: cn("text-muted-foreground ml-auto text-xs tracking-widest", className),
|
|
1023
|
+
...props
|
|
1024
|
+
});
|
|
1025
|
+
}
|
|
1026
|
+
//#endregion
|
|
1027
|
+
//#region src/primitives/Drawer/Drawer.tsx
|
|
1028
|
+
function Drawer$1({ ...props }) {
|
|
1029
|
+
return /* @__PURE__ */ jsx(Drawer.Root, {
|
|
1030
|
+
"data-slot": "drawer",
|
|
1031
|
+
...props
|
|
1032
|
+
});
|
|
1033
|
+
}
|
|
1034
|
+
function DrawerTrigger({ ...props }) {
|
|
1035
|
+
return /* @__PURE__ */ jsx(Drawer.Trigger, {
|
|
1036
|
+
"data-slot": "drawer-trigger",
|
|
1037
|
+
...props
|
|
1038
|
+
});
|
|
1039
|
+
}
|
|
1040
|
+
function DrawerPortal({ ...props }) {
|
|
1041
|
+
return /* @__PURE__ */ jsx(Drawer.Portal, {
|
|
1042
|
+
"data-slot": "drawer-portal",
|
|
1043
|
+
...props
|
|
1044
|
+
});
|
|
1045
|
+
}
|
|
1046
|
+
function DrawerClose({ ...props }) {
|
|
1047
|
+
return /* @__PURE__ */ jsx(Drawer.Close, {
|
|
1048
|
+
"data-slot": "drawer-close",
|
|
1049
|
+
...props
|
|
1050
|
+
});
|
|
1051
|
+
}
|
|
1052
|
+
function DrawerOverlay({ className, ...props }) {
|
|
1053
|
+
return /* @__PURE__ */ jsx(Drawer.Overlay, {
|
|
1054
|
+
"data-slot": "drawer-overlay",
|
|
1055
|
+
className: cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50", className),
|
|
1056
|
+
...props
|
|
1057
|
+
});
|
|
1058
|
+
}
|
|
1059
|
+
function DrawerContent({ className, children, ...props }) {
|
|
1060
|
+
return /* @__PURE__ */ jsxs(DrawerPortal, {
|
|
1061
|
+
"data-slot": "drawer-portal",
|
|
1062
|
+
children: [/* @__PURE__ */ jsx(DrawerOverlay, {}), /* @__PURE__ */ jsxs(Drawer.Content, {
|
|
1063
|
+
"data-slot": "drawer-content",
|
|
1064
|
+
className: cn("group/drawer-content bg-background fixed z-50 flex h-auto flex-col", "data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b", "data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t", "data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm", "data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm", className),
|
|
1065
|
+
...props,
|
|
1066
|
+
children: [/* @__PURE__ */ jsx("div", { className: "bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block" }), children]
|
|
1067
|
+
})]
|
|
1068
|
+
});
|
|
1069
|
+
}
|
|
1070
|
+
function DrawerHeader({ className, ...props }) {
|
|
1071
|
+
return /* @__PURE__ */ jsx("div", {
|
|
1072
|
+
"data-slot": "drawer-header",
|
|
1073
|
+
className: cn("flex flex-col gap-1.5 p-4", className),
|
|
1074
|
+
...props
|
|
1075
|
+
});
|
|
1076
|
+
}
|
|
1077
|
+
function DrawerFooter({ className, ...props }) {
|
|
1078
|
+
return /* @__PURE__ */ jsx("div", {
|
|
1079
|
+
"data-slot": "drawer-footer",
|
|
1080
|
+
className: cn("mt-auto flex flex-col gap-2 p-4", className),
|
|
1081
|
+
...props
|
|
1082
|
+
});
|
|
1083
|
+
}
|
|
1084
|
+
function DrawerTitle({ className, ...props }) {
|
|
1085
|
+
return /* @__PURE__ */ jsx(Drawer.Title, {
|
|
1086
|
+
"data-slot": "drawer-title",
|
|
1087
|
+
className: cn("text-foreground font-semibold", className),
|
|
1088
|
+
...props
|
|
1089
|
+
});
|
|
1090
|
+
}
|
|
1091
|
+
function DrawerDescription({ className, ...props }) {
|
|
1092
|
+
return /* @__PURE__ */ jsx(Drawer.Description, {
|
|
1093
|
+
"data-slot": "drawer-description",
|
|
1094
|
+
className: cn("text-muted-foreground text-sm", className),
|
|
1095
|
+
...props
|
|
1096
|
+
});
|
|
1097
|
+
}
|
|
1098
|
+
//#endregion
|
|
1099
|
+
//#region src/primitives/DropdownMenu/DropdownMenu.tsx
|
|
1100
|
+
function DropdownMenu({ ...props }) {
|
|
1101
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Root, {
|
|
1102
|
+
"data-slot": "dropdown-menu",
|
|
1103
|
+
...props
|
|
1104
|
+
});
|
|
1105
|
+
}
|
|
1106
|
+
function DropdownMenuPortal({ ...props }) {
|
|
1107
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, {
|
|
1108
|
+
"data-slot": "dropdown-menu-portal",
|
|
1109
|
+
...props
|
|
1110
|
+
});
|
|
1111
|
+
}
|
|
1112
|
+
function DropdownMenuTrigger({ ...props }) {
|
|
1113
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Trigger, {
|
|
1114
|
+
"data-slot": "dropdown-menu-trigger",
|
|
1115
|
+
...props
|
|
1116
|
+
});
|
|
1117
|
+
}
|
|
1118
|
+
function DropdownMenuContent({ className, sideOffset = 4, ...props }) {
|
|
1119
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.Content, {
|
|
1120
|
+
"data-slot": "dropdown-menu-content",
|
|
1121
|
+
sideOffset,
|
|
1122
|
+
className: cn("bg-popover text-popover-foreground 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 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md", className),
|
|
1123
|
+
...props
|
|
1124
|
+
}) });
|
|
1125
|
+
}
|
|
1126
|
+
function DropdownMenuGroup({ ...props }) {
|
|
1127
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Group, {
|
|
1128
|
+
"data-slot": "dropdown-menu-group",
|
|
1129
|
+
...props
|
|
1130
|
+
});
|
|
1131
|
+
}
|
|
1132
|
+
function DropdownMenuItem({ className, inset, variant = "default", ...props }) {
|
|
1133
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Item, {
|
|
1134
|
+
"data-slot": "dropdown-menu-item",
|
|
1135
|
+
"data-inset": inset,
|
|
1136
|
+
"data-variant": variant,
|
|
1137
|
+
className: cn("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
1138
|
+
...props
|
|
1139
|
+
});
|
|
1140
|
+
}
|
|
1141
|
+
function DropdownMenuCheckboxItem({ className, children, checked, ...props }) {
|
|
1142
|
+
return /* @__PURE__ */ jsxs(DropdownMenuPrimitive.CheckboxItem, {
|
|
1143
|
+
"data-slot": "dropdown-menu-checkbox-item",
|
|
1144
|
+
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),
|
|
1145
|
+
checked,
|
|
1146
|
+
...props,
|
|
1147
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
1148
|
+
className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",
|
|
1149
|
+
children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) })
|
|
1150
|
+
}), children]
|
|
1151
|
+
});
|
|
1152
|
+
}
|
|
1153
|
+
function DropdownMenuRadioGroup({ ...props }) {
|
|
1154
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.RadioGroup, {
|
|
1155
|
+
"data-slot": "dropdown-menu-radio-group",
|
|
1156
|
+
...props
|
|
1157
|
+
});
|
|
1158
|
+
}
|
|
1159
|
+
function DropdownMenuRadioItem({ className, children, ...props }) {
|
|
1160
|
+
return /* @__PURE__ */ jsxs(DropdownMenuPrimitive.RadioItem, {
|
|
1161
|
+
"data-slot": "dropdown-menu-radio-item",
|
|
1162
|
+
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),
|
|
1163
|
+
...props,
|
|
1164
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
1165
|
+
className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",
|
|
1166
|
+
children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CircleIcon, { className: "size-2 fill-current" }) })
|
|
1167
|
+
}), children]
|
|
1168
|
+
});
|
|
1169
|
+
}
|
|
1170
|
+
function DropdownMenuLabel({ className, inset, ...props }) {
|
|
1171
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Label, {
|
|
1172
|
+
"data-slot": "dropdown-menu-label",
|
|
1173
|
+
"data-inset": inset,
|
|
1174
|
+
className: cn("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8", className),
|
|
1175
|
+
...props
|
|
1176
|
+
});
|
|
1177
|
+
}
|
|
1178
|
+
function DropdownMenuSeparator({ className, ...props }) {
|
|
1179
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Separator, {
|
|
1180
|
+
"data-slot": "dropdown-menu-separator",
|
|
1181
|
+
className: cn("bg-border -mx-1 my-1 h-px", className),
|
|
1182
|
+
...props
|
|
1183
|
+
});
|
|
1184
|
+
}
|
|
1185
|
+
function DropdownMenuShortcut({ className, ...props }) {
|
|
1186
|
+
return /* @__PURE__ */ jsx("span", {
|
|
1187
|
+
"data-slot": "dropdown-menu-shortcut",
|
|
1188
|
+
className: cn("text-muted-foreground ml-auto text-xs tracking-widest", className),
|
|
1189
|
+
...props
|
|
1190
|
+
});
|
|
1191
|
+
}
|
|
1192
|
+
function DropdownMenuSub({ ...props }) {
|
|
1193
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Sub, {
|
|
1194
|
+
"data-slot": "dropdown-menu-sub",
|
|
1195
|
+
...props
|
|
1196
|
+
});
|
|
1197
|
+
}
|
|
1198
|
+
function DropdownMenuSubTrigger({ className, inset, children, ...props }) {
|
|
1199
|
+
return /* @__PURE__ */ jsxs(DropdownMenuPrimitive.SubTrigger, {
|
|
1200
|
+
"data-slot": "dropdown-menu-sub-trigger",
|
|
1201
|
+
"data-inset": inset,
|
|
1202
|
+
className: cn("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8", className),
|
|
1203
|
+
...props,
|
|
1204
|
+
children: [children, /* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto size-4" })]
|
|
1205
|
+
});
|
|
1206
|
+
}
|
|
1207
|
+
function DropdownMenuSubContent({ className, ...props }) {
|
|
1208
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.SubContent, {
|
|
1209
|
+
"data-slot": "dropdown-menu-sub-content",
|
|
1210
|
+
className: cn("bg-popover text-popover-foreground 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 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg", className),
|
|
1211
|
+
...props
|
|
1212
|
+
});
|
|
1213
|
+
}
|
|
1214
|
+
//#endregion
|
|
1215
|
+
//#region src/primitives/Label/Label.tsx
|
|
1216
|
+
function Label({ className, ...props }) {
|
|
1217
|
+
return /* @__PURE__ */ jsx(LabelPrimitive.Root, {
|
|
1218
|
+
"data-slot": "label",
|
|
1219
|
+
className: cn("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", className),
|
|
1220
|
+
...props
|
|
1221
|
+
});
|
|
1222
|
+
}
|
|
1223
|
+
//#endregion
|
|
1224
|
+
//#region src/primitives/Form/Form.tsx
|
|
1225
|
+
const Form = FormProvider;
|
|
1226
|
+
const FormFieldContext = React.createContext({});
|
|
1227
|
+
const FormField = ({ ...props }) => {
|
|
1228
|
+
return /* @__PURE__ */ jsx(FormFieldContext.Provider, {
|
|
1229
|
+
value: { name: props.name },
|
|
1230
|
+
children: /* @__PURE__ */ jsx(Controller, { ...props })
|
|
1231
|
+
});
|
|
1232
|
+
};
|
|
1233
|
+
const useFormField = () => {
|
|
1234
|
+
const fieldContext = React.useContext(FormFieldContext);
|
|
1235
|
+
const itemContext = React.useContext(FormItemContext);
|
|
1236
|
+
const { getFieldState } = useFormContext();
|
|
1237
|
+
if (!fieldContext.name) throw new Error("useFormField should be used within <FormField>");
|
|
1238
|
+
const formState = useFormState({ name: fieldContext.name });
|
|
1239
|
+
const fieldState = getFieldState(fieldContext.name, formState);
|
|
1240
|
+
const { id } = itemContext;
|
|
1241
|
+
return {
|
|
1242
|
+
id,
|
|
1243
|
+
name: fieldContext.name,
|
|
1244
|
+
formItemId: `${id}-form-item`,
|
|
1245
|
+
formDescriptionId: `${id}-form-item-description`,
|
|
1246
|
+
formMessageId: `${id}-form-item-message`,
|
|
1247
|
+
...fieldState
|
|
1248
|
+
};
|
|
1249
|
+
};
|
|
1250
|
+
const FormItemContext = React.createContext({});
|
|
1251
|
+
function FormItem({ className, ...props }) {
|
|
1252
|
+
const id = React.useId();
|
|
1253
|
+
return /* @__PURE__ */ jsx(FormItemContext.Provider, {
|
|
1254
|
+
value: { id },
|
|
1255
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
1256
|
+
"data-slot": "form-item",
|
|
1257
|
+
className: cn("grid gap-2", className),
|
|
1258
|
+
...props
|
|
1259
|
+
})
|
|
1260
|
+
});
|
|
1261
|
+
}
|
|
1262
|
+
function FormLabel({ className, ...props }) {
|
|
1263
|
+
const { error, formItemId } = useFormField();
|
|
1264
|
+
return /* @__PURE__ */ jsx(Label, {
|
|
1265
|
+
"data-slot": "form-label",
|
|
1266
|
+
"data-error": !!error,
|
|
1267
|
+
className: cn("data-[error=true]:text-destructive", className),
|
|
1268
|
+
htmlFor: formItemId,
|
|
1269
|
+
...props
|
|
1270
|
+
});
|
|
1271
|
+
}
|
|
1272
|
+
function FormControl({ ...props }) {
|
|
1273
|
+
const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
|
|
1274
|
+
return /* @__PURE__ */ jsx(Slot, {
|
|
1275
|
+
"data-slot": "form-control",
|
|
1276
|
+
id: formItemId,
|
|
1277
|
+
"aria-describedby": !error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`,
|
|
1278
|
+
"aria-invalid": !!error,
|
|
1279
|
+
...props
|
|
1280
|
+
});
|
|
1281
|
+
}
|
|
1282
|
+
function FormDescription({ className, ...props }) {
|
|
1283
|
+
const { formDescriptionId } = useFormField();
|
|
1284
|
+
return /* @__PURE__ */ jsx("p", {
|
|
1285
|
+
"data-slot": "form-description",
|
|
1286
|
+
id: formDescriptionId,
|
|
1287
|
+
className: cn("text-muted-foreground text-sm", className),
|
|
1288
|
+
...props
|
|
1289
|
+
});
|
|
1290
|
+
}
|
|
1291
|
+
function FormMessage({ className, ...props }) {
|
|
1292
|
+
const { error, formMessageId } = useFormField();
|
|
1293
|
+
const body = error ? String(error?.message ?? "") : props.children;
|
|
1294
|
+
if (!body) return null;
|
|
1295
|
+
return /* @__PURE__ */ jsx("p", {
|
|
1296
|
+
"data-slot": "form-message",
|
|
1297
|
+
id: formMessageId,
|
|
1298
|
+
className: cn("text-destructive text-sm", className),
|
|
1299
|
+
...props,
|
|
1300
|
+
children: body
|
|
1301
|
+
});
|
|
1302
|
+
}
|
|
1303
|
+
//#endregion
|
|
1304
|
+
//#region src/primitives/HoverCard/HoverCard.tsx
|
|
1305
|
+
function HoverCard({ ...props }) {
|
|
1306
|
+
return /* @__PURE__ */ jsx(HoverCardPrimitive.Root, {
|
|
1307
|
+
"data-slot": "hover-card",
|
|
1308
|
+
...props
|
|
1309
|
+
});
|
|
1310
|
+
}
|
|
1311
|
+
function HoverCardTrigger({ ...props }) {
|
|
1312
|
+
return /* @__PURE__ */ jsx(HoverCardPrimitive.Trigger, {
|
|
1313
|
+
"data-slot": "hover-card-trigger",
|
|
1314
|
+
...props
|
|
1315
|
+
});
|
|
1316
|
+
}
|
|
1317
|
+
function HoverCardContent({ className, align = "center", sideOffset = 4, ...props }) {
|
|
1318
|
+
return /* @__PURE__ */ jsx(HoverCardPrimitive.Portal, {
|
|
1319
|
+
"data-slot": "hover-card-portal",
|
|
1320
|
+
children: /* @__PURE__ */ jsx(HoverCardPrimitive.Content, {
|
|
1321
|
+
"data-slot": "hover-card-content",
|
|
1322
|
+
align,
|
|
1323
|
+
sideOffset,
|
|
1324
|
+
className: cn("bg-popover text-popover-foreground 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 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden", className),
|
|
1325
|
+
...props
|
|
1326
|
+
})
|
|
1327
|
+
});
|
|
1328
|
+
}
|
|
1329
|
+
//#endregion
|
|
1330
|
+
//#region src/primitives/Input/Input.tsx
|
|
1331
|
+
function Input({ className, type, ...props }) {
|
|
1332
|
+
return /* @__PURE__ */ jsx("input", {
|
|
1333
|
+
type,
|
|
1334
|
+
"data-slot": "input",
|
|
1335
|
+
className: cn("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border px-3 py-1 text-base bg-input-background transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]", "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", className),
|
|
1336
|
+
...props
|
|
1337
|
+
});
|
|
1338
|
+
}
|
|
1339
|
+
//#endregion
|
|
1340
|
+
//#region src/primitives/InputOtp/InputOtp.tsx
|
|
1341
|
+
function InputOTP({ className, containerClassName, ...props }) {
|
|
1342
|
+
return /* @__PURE__ */ jsx(OTPInput, {
|
|
1343
|
+
"data-slot": "input-otp",
|
|
1344
|
+
containerClassName: cn("flex items-center gap-2 has-disabled:opacity-50", containerClassName),
|
|
1345
|
+
className: cn("disabled:cursor-not-allowed", className),
|
|
1346
|
+
...props
|
|
1347
|
+
});
|
|
1348
|
+
}
|
|
1349
|
+
function InputOTPGroup({ className, ...props }) {
|
|
1350
|
+
return /* @__PURE__ */ jsx("div", {
|
|
1351
|
+
"data-slot": "input-otp-group",
|
|
1352
|
+
className: cn("flex items-center gap-1", className),
|
|
1353
|
+
...props
|
|
1354
|
+
});
|
|
1355
|
+
}
|
|
1356
|
+
function InputOTPSlot({ index, className, ...props }) {
|
|
1357
|
+
const { char, hasFakeCaret, isActive } = React.useContext(OTPInputContext)?.slots[index] ?? {};
|
|
1358
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
1359
|
+
"data-slot": "input-otp-slot",
|
|
1360
|
+
"data-active": isActive,
|
|
1361
|
+
className: cn("data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive dark:bg-input/30 border-input relative flex h-9 w-9 items-center justify-center border-y border-r text-sm bg-input-background transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-[3px]", className),
|
|
1362
|
+
...props,
|
|
1363
|
+
children: [char, hasFakeCaret && /* @__PURE__ */ jsx("div", {
|
|
1364
|
+
className: "pointer-events-none absolute inset-0 flex items-center justify-center",
|
|
1365
|
+
children: /* @__PURE__ */ jsx("div", { className: "animate-caret-blink bg-foreground h-4 w-px duration-1000" })
|
|
1366
|
+
})]
|
|
1367
|
+
});
|
|
1368
|
+
}
|
|
1369
|
+
function InputOTPSeparator({ ...props }) {
|
|
1370
|
+
return /* @__PURE__ */ jsx("div", {
|
|
1371
|
+
"data-slot": "input-otp-separator",
|
|
1372
|
+
role: "separator",
|
|
1373
|
+
...props,
|
|
1374
|
+
children: /* @__PURE__ */ jsx(MinusIcon, {})
|
|
1375
|
+
});
|
|
1376
|
+
}
|
|
1377
|
+
//#endregion
|
|
1378
|
+
//#region src/primitives/Menubar/Menubar.tsx
|
|
1379
|
+
function Menubar({ className, ...props }) {
|
|
1380
|
+
return /* @__PURE__ */ jsx(MenubarPrimitive.Root, {
|
|
1381
|
+
"data-slot": "menubar",
|
|
1382
|
+
className: cn("bg-background flex h-9 items-center gap-1 rounded-md border p-1 shadow-xs", className),
|
|
1383
|
+
...props
|
|
1384
|
+
});
|
|
1385
|
+
}
|
|
1386
|
+
function MenubarMenu({ ...props }) {
|
|
1387
|
+
return /* @__PURE__ */ jsx(MenubarPrimitive.Menu, {
|
|
1388
|
+
"data-slot": "menubar-menu",
|
|
1389
|
+
...props
|
|
1390
|
+
});
|
|
1391
|
+
}
|
|
1392
|
+
function MenubarGroup({ ...props }) {
|
|
1393
|
+
return /* @__PURE__ */ jsx(MenubarPrimitive.Group, {
|
|
1394
|
+
"data-slot": "menubar-group",
|
|
1395
|
+
...props
|
|
1396
|
+
});
|
|
1397
|
+
}
|
|
1398
|
+
function MenubarPortal({ ...props }) {
|
|
1399
|
+
return /* @__PURE__ */ jsx(MenubarPrimitive.Portal, {
|
|
1400
|
+
"data-slot": "menubar-portal",
|
|
1401
|
+
...props
|
|
1402
|
+
});
|
|
1403
|
+
}
|
|
1404
|
+
function MenubarRadioGroup({ ...props }) {
|
|
1405
|
+
return /* @__PURE__ */ jsx(MenubarPrimitive.RadioGroup, {
|
|
1406
|
+
"data-slot": "menubar-radio-group",
|
|
1407
|
+
...props
|
|
1408
|
+
});
|
|
1409
|
+
}
|
|
1410
|
+
function MenubarTrigger({ className, ...props }) {
|
|
1411
|
+
return /* @__PURE__ */ jsx(MenubarPrimitive.Trigger, {
|
|
1412
|
+
"data-slot": "menubar-trigger",
|
|
1413
|
+
className: cn("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex items-center rounded-sm px-2 py-1 text-sm font-medium outline-hidden select-none", className),
|
|
1414
|
+
...props
|
|
1415
|
+
});
|
|
1416
|
+
}
|
|
1417
|
+
function MenubarContent({ className, align = "start", alignOffset = -4, sideOffset = 8, ...props }) {
|
|
1418
|
+
return /* @__PURE__ */ jsx(MenubarPortal, { children: /* @__PURE__ */ jsx(MenubarPrimitive.Content, {
|
|
1419
|
+
"data-slot": "menubar-content",
|
|
1420
|
+
align,
|
|
1421
|
+
alignOffset,
|
|
1422
|
+
sideOffset,
|
|
1423
|
+
className: cn("bg-popover text-popover-foreground data-[state=open]:animate-in 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 z-50 min-w-[12rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-md", className),
|
|
1424
|
+
...props
|
|
1425
|
+
}) });
|
|
1426
|
+
}
|
|
1427
|
+
function MenubarItem({ className, inset, variant = "default", ...props }) {
|
|
1428
|
+
return /* @__PURE__ */ jsx(MenubarPrimitive.Item, {
|
|
1429
|
+
"data-slot": "menubar-item",
|
|
1430
|
+
"data-inset": inset,
|
|
1431
|
+
"data-variant": variant,
|
|
1432
|
+
className: cn("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
1433
|
+
...props
|
|
1434
|
+
});
|
|
1435
|
+
}
|
|
1436
|
+
function MenubarCheckboxItem({ className, children, checked, ...props }) {
|
|
1437
|
+
return /* @__PURE__ */ jsxs(MenubarPrimitive.CheckboxItem, {
|
|
1438
|
+
"data-slot": "menubar-checkbox-item",
|
|
1439
|
+
className: cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs 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),
|
|
1440
|
+
checked,
|
|
1441
|
+
...props,
|
|
1442
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
1443
|
+
className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",
|
|
1444
|
+
children: /* @__PURE__ */ jsx(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) })
|
|
1445
|
+
}), children]
|
|
1446
|
+
});
|
|
1447
|
+
}
|
|
1448
|
+
function MenubarRadioItem({ className, children, ...props }) {
|
|
1449
|
+
return /* @__PURE__ */ jsxs(MenubarPrimitive.RadioItem, {
|
|
1450
|
+
"data-slot": "menubar-radio-item",
|
|
1451
|
+
className: cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs 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),
|
|
1452
|
+
...props,
|
|
1453
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
1454
|
+
className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",
|
|
1455
|
+
children: /* @__PURE__ */ jsx(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CircleIcon, { className: "size-2 fill-current" }) })
|
|
1456
|
+
}), children]
|
|
1457
|
+
});
|
|
1458
|
+
}
|
|
1459
|
+
function MenubarLabel({ className, inset, ...props }) {
|
|
1460
|
+
return /* @__PURE__ */ jsx(MenubarPrimitive.Label, {
|
|
1461
|
+
"data-slot": "menubar-label",
|
|
1462
|
+
"data-inset": inset,
|
|
1463
|
+
className: cn("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8", className),
|
|
1464
|
+
...props
|
|
1465
|
+
});
|
|
1466
|
+
}
|
|
1467
|
+
function MenubarSeparator({ className, ...props }) {
|
|
1468
|
+
return /* @__PURE__ */ jsx(MenubarPrimitive.Separator, {
|
|
1469
|
+
"data-slot": "menubar-separator",
|
|
1470
|
+
className: cn("bg-border -mx-1 my-1 h-px", className),
|
|
1471
|
+
...props
|
|
1472
|
+
});
|
|
1473
|
+
}
|
|
1474
|
+
function MenubarShortcut({ className, ...props }) {
|
|
1475
|
+
return /* @__PURE__ */ jsx("span", {
|
|
1476
|
+
"data-slot": "menubar-shortcut",
|
|
1477
|
+
className: cn("text-muted-foreground ml-auto text-xs tracking-widest", className),
|
|
1478
|
+
...props
|
|
1479
|
+
});
|
|
1480
|
+
}
|
|
1481
|
+
function MenubarSub({ ...props }) {
|
|
1482
|
+
return /* @__PURE__ */ jsx(MenubarPrimitive.Sub, {
|
|
1483
|
+
"data-slot": "menubar-sub",
|
|
1484
|
+
...props
|
|
1485
|
+
});
|
|
1486
|
+
}
|
|
1487
|
+
function MenubarSubTrigger({ className, inset, children, ...props }) {
|
|
1488
|
+
return /* @__PURE__ */ jsxs(MenubarPrimitive.SubTrigger, {
|
|
1489
|
+
"data-slot": "menubar-sub-trigger",
|
|
1490
|
+
"data-inset": inset,
|
|
1491
|
+
className: cn("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[inset]:pl-8", className),
|
|
1492
|
+
...props,
|
|
1493
|
+
children: [children, /* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto h-4 w-4" })]
|
|
1494
|
+
});
|
|
1495
|
+
}
|
|
1496
|
+
function MenubarSubContent({ className, ...props }) {
|
|
1497
|
+
return /* @__PURE__ */ jsx(MenubarPrimitive.SubContent, {
|
|
1498
|
+
"data-slot": "menubar-sub-content",
|
|
1499
|
+
className: cn("bg-popover text-popover-foreground 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 z-50 min-w-[8rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg", className),
|
|
1500
|
+
...props
|
|
1501
|
+
});
|
|
1502
|
+
}
|
|
1503
|
+
//#endregion
|
|
1504
|
+
//#region src/primitives/NavigationMenu/NavigationMenu.tsx
|
|
1505
|
+
function NavigationMenu({ className, children, viewport = true, ...props }) {
|
|
1506
|
+
return /* @__PURE__ */ jsxs(NavigationMenuPrimitive.Root, {
|
|
1507
|
+
"data-slot": "navigation-menu",
|
|
1508
|
+
"data-viewport": viewport,
|
|
1509
|
+
className: cn("group/navigation-menu relative flex max-w-max flex-1 items-center justify-center", className),
|
|
1510
|
+
...props,
|
|
1511
|
+
children: [children, viewport && /* @__PURE__ */ jsx(NavigationMenuViewport, {})]
|
|
1512
|
+
});
|
|
1513
|
+
}
|
|
1514
|
+
function NavigationMenuList({ className, ...props }) {
|
|
1515
|
+
return /* @__PURE__ */ jsx(NavigationMenuPrimitive.List, {
|
|
1516
|
+
"data-slot": "navigation-menu-list",
|
|
1517
|
+
className: cn("group flex flex-1 list-none items-center justify-center gap-1", className),
|
|
1518
|
+
...props
|
|
1519
|
+
});
|
|
1520
|
+
}
|
|
1521
|
+
function NavigationMenuItem({ className, ...props }) {
|
|
1522
|
+
return /* @__PURE__ */ jsx(NavigationMenuPrimitive.Item, {
|
|
1523
|
+
"data-slot": "navigation-menu-item",
|
|
1524
|
+
className: cn("relative", className),
|
|
1525
|
+
...props
|
|
1526
|
+
});
|
|
1527
|
+
}
|
|
1528
|
+
const navigationMenuTriggerStyle = cva("group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=open]:hover:bg-accent data-[state=open]:text-accent-foreground data-[state=open]:focus:bg-accent data-[state=open]:bg-accent/50 focus-visible:ring-ring/50 outline-none transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1");
|
|
1529
|
+
function NavigationMenuTrigger({ className, children, ...props }) {
|
|
1530
|
+
return /* @__PURE__ */ jsxs(NavigationMenuPrimitive.Trigger, {
|
|
1531
|
+
"data-slot": "navigation-menu-trigger",
|
|
1532
|
+
className: cn(navigationMenuTriggerStyle(), "group", className),
|
|
1533
|
+
...props,
|
|
1534
|
+
children: [
|
|
1535
|
+
children,
|
|
1536
|
+
" ",
|
|
1537
|
+
/* @__PURE__ */ jsx(ChevronDownIcon, {
|
|
1538
|
+
className: "relative top-[1px] ml-1 size-3 transition duration-300 group-data-[state=open]:rotate-180",
|
|
1539
|
+
"aria-hidden": "true"
|
|
1540
|
+
})
|
|
1541
|
+
]
|
|
1542
|
+
});
|
|
1543
|
+
}
|
|
1544
|
+
function NavigationMenuContent({ className, ...props }) {
|
|
1545
|
+
return /* @__PURE__ */ jsx(NavigationMenuPrimitive.Content, {
|
|
1546
|
+
"data-slot": "navigation-menu-content",
|
|
1547
|
+
className: cn("data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 top-0 left-0 w-full p-2 pr-2.5 md:absolute md:w-auto", "group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:data-[state=open]:animate-in group-data-[viewport=false]/navigation-menu:data-[state=closed]:animate-out group-data-[viewport=false]/navigation-menu:data-[state=closed]:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:fade-in-0 group-data-[viewport=false]/navigation-menu:data-[state=closed]:fade-out-0 group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-md group-data-[viewport=false]/navigation-menu:border group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:duration-200 **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none", className),
|
|
1548
|
+
...props
|
|
1549
|
+
});
|
|
1550
|
+
}
|
|
1551
|
+
function NavigationMenuViewport({ className, ...props }) {
|
|
1552
|
+
return /* @__PURE__ */ jsx("div", {
|
|
1553
|
+
className: cn("absolute top-full left-0 isolate z-50 flex justify-center"),
|
|
1554
|
+
children: /* @__PURE__ */ jsx(NavigationMenuPrimitive.Viewport, {
|
|
1555
|
+
"data-slot": "navigation-menu-viewport",
|
|
1556
|
+
className: cn("origin-top-center bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border shadow md:w-[var(--radix-navigation-menu-viewport-width)]", className),
|
|
1557
|
+
...props
|
|
1558
|
+
})
|
|
1559
|
+
});
|
|
1560
|
+
}
|
|
1561
|
+
function NavigationMenuLink({ className, ...props }) {
|
|
1562
|
+
return /* @__PURE__ */ jsx(NavigationMenuPrimitive.Link, {
|
|
1563
|
+
"data-slot": "navigation-menu-link",
|
|
1564
|
+
className: cn("data-[active=true]:focus:bg-accent data-[active=true]:hover:bg-accent data-[active=true]:bg-accent/50 data-[active=true]:text-accent-foreground hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus-visible:ring-ring/50 [&_svg:not([class*='text-'])]:text-muted-foreground flex flex-col gap-1 rounded-sm p-2 text-sm transition-all outline-none focus-visible:ring-[3px] focus-visible:outline-1 [&_svg:not([class*='size-'])]:size-4", className),
|
|
1565
|
+
...props
|
|
1566
|
+
});
|
|
1567
|
+
}
|
|
1568
|
+
function NavigationMenuIndicator({ className, ...props }) {
|
|
1569
|
+
return /* @__PURE__ */ jsx(NavigationMenuPrimitive.Indicator, {
|
|
1570
|
+
"data-slot": "navigation-menu-indicator",
|
|
1571
|
+
className: cn("data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden", className),
|
|
1572
|
+
...props,
|
|
1573
|
+
children: /* @__PURE__ */ jsx("div", { className: "bg-border relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm shadow-md" })
|
|
1574
|
+
});
|
|
1575
|
+
}
|
|
1576
|
+
//#endregion
|
|
1577
|
+
//#region src/primitives/Pagination/Pagination.tsx
|
|
1578
|
+
function Pagination({ className, ...props }) {
|
|
1579
|
+
return /* @__PURE__ */ jsx("nav", {
|
|
1580
|
+
role: "navigation",
|
|
1581
|
+
"aria-label": "pagination",
|
|
1582
|
+
"data-slot": "pagination",
|
|
1583
|
+
className: cn("mx-auto flex w-full justify-center", className),
|
|
1584
|
+
...props
|
|
1585
|
+
});
|
|
1586
|
+
}
|
|
1587
|
+
function PaginationContent({ className, ...props }) {
|
|
1588
|
+
return /* @__PURE__ */ jsx("ul", {
|
|
1589
|
+
"data-slot": "pagination-content",
|
|
1590
|
+
className: cn("flex flex-row items-center gap-1", className),
|
|
1591
|
+
...props
|
|
1592
|
+
});
|
|
1593
|
+
}
|
|
1594
|
+
function PaginationItem({ ...props }) {
|
|
1595
|
+
return /* @__PURE__ */ jsx("li", {
|
|
1596
|
+
"data-slot": "pagination-item",
|
|
1597
|
+
...props
|
|
1598
|
+
});
|
|
1599
|
+
}
|
|
1600
|
+
function PaginationLink({ className, isActive, size = "icon", ...props }) {
|
|
1601
|
+
return /* @__PURE__ */ jsx("a", {
|
|
1602
|
+
"aria-current": isActive ? "page" : void 0,
|
|
1603
|
+
"data-slot": "pagination-link",
|
|
1604
|
+
"data-active": isActive,
|
|
1605
|
+
className: cn(buttonVariants({
|
|
1606
|
+
variant: isActive ? "outline" : "ghost",
|
|
1607
|
+
size
|
|
1608
|
+
}), className),
|
|
1609
|
+
...props
|
|
1610
|
+
});
|
|
1611
|
+
}
|
|
1612
|
+
function PaginationPrevious({ className, ...props }) {
|
|
1613
|
+
return /* @__PURE__ */ jsxs(PaginationLink, {
|
|
1614
|
+
"aria-label": "Go to previous page",
|
|
1615
|
+
size: "default",
|
|
1616
|
+
className: cn("gap-1 px-2.5 sm:pl-2.5", className),
|
|
1617
|
+
...props,
|
|
1618
|
+
children: [/* @__PURE__ */ jsx(ChevronLeftIcon, {}), /* @__PURE__ */ jsx("span", {
|
|
1619
|
+
className: "hidden sm:block",
|
|
1620
|
+
children: "Previous"
|
|
1621
|
+
})]
|
|
1622
|
+
});
|
|
1623
|
+
}
|
|
1624
|
+
function PaginationNext({ className, ...props }) {
|
|
1625
|
+
return /* @__PURE__ */ jsxs(PaginationLink, {
|
|
1626
|
+
"aria-label": "Go to next page",
|
|
1627
|
+
size: "default",
|
|
1628
|
+
className: cn("gap-1 px-2.5 sm:pr-2.5", className),
|
|
1629
|
+
...props,
|
|
1630
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
1631
|
+
className: "hidden sm:block",
|
|
1632
|
+
children: "Next"
|
|
1633
|
+
}), /* @__PURE__ */ jsx(ChevronRightIcon, {})]
|
|
1634
|
+
});
|
|
1635
|
+
}
|
|
1636
|
+
function PaginationEllipsis({ className, ...props }) {
|
|
1637
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
1638
|
+
"aria-hidden": true,
|
|
1639
|
+
"data-slot": "pagination-ellipsis",
|
|
1640
|
+
className: cn("flex size-9 items-center justify-center", className),
|
|
1641
|
+
...props,
|
|
1642
|
+
children: [/* @__PURE__ */ jsx(MoreHorizontalIcon, { className: "size-4" }), /* @__PURE__ */ jsx("span", {
|
|
1643
|
+
className: "sr-only",
|
|
1644
|
+
children: "More pages"
|
|
1645
|
+
})]
|
|
1646
|
+
});
|
|
1647
|
+
}
|
|
1648
|
+
//#endregion
|
|
1649
|
+
//#region src/primitives/Popover/Popover.tsx
|
|
1650
|
+
function Popover({ ...props }) {
|
|
1651
|
+
return /* @__PURE__ */ jsx(PopoverPrimitive.Root, {
|
|
1652
|
+
"data-slot": "popover",
|
|
1653
|
+
...props
|
|
1654
|
+
});
|
|
1655
|
+
}
|
|
1656
|
+
function PopoverTrigger({ ...props }) {
|
|
1657
|
+
return /* @__PURE__ */ jsx(PopoverPrimitive.Trigger, {
|
|
1658
|
+
"data-slot": "popover-trigger",
|
|
1659
|
+
...props
|
|
1660
|
+
});
|
|
1661
|
+
}
|
|
1662
|
+
function PopoverContent({ className, align = "center", sideOffset = 4, ...props }) {
|
|
1663
|
+
return /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(PopoverPrimitive.Content, {
|
|
1664
|
+
"data-slot": "popover-content",
|
|
1665
|
+
align,
|
|
1666
|
+
sideOffset,
|
|
1667
|
+
className: cn("bg-popover text-popover-foreground 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 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden", className),
|
|
1668
|
+
...props
|
|
1669
|
+
}) });
|
|
1670
|
+
}
|
|
1671
|
+
function PopoverAnchor({ ...props }) {
|
|
1672
|
+
return /* @__PURE__ */ jsx(PopoverPrimitive.Anchor, {
|
|
1673
|
+
"data-slot": "popover-anchor",
|
|
1674
|
+
...props
|
|
1675
|
+
});
|
|
1676
|
+
}
|
|
1677
|
+
//#endregion
|
|
1678
|
+
//#region src/primitives/Progress/Progress.tsx
|
|
1679
|
+
function Progress({ className, value, variant = "default", ...props }) {
|
|
1680
|
+
return /* @__PURE__ */ jsx(ProgressPrimitive.Root, {
|
|
1681
|
+
"data-slot": "progress",
|
|
1682
|
+
className: cn("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full", className),
|
|
1683
|
+
...props,
|
|
1684
|
+
children: /* @__PURE__ */ jsx(ProgressPrimitive.Indicator, {
|
|
1685
|
+
"data-slot": "progress-indicator",
|
|
1686
|
+
className: "bg-primary h-full w-full flex-1 transition-all",
|
|
1687
|
+
style: { transform: `translateX(-${100 - (value ?? 0)}%)` }
|
|
1688
|
+
})
|
|
1689
|
+
});
|
|
1690
|
+
}
|
|
1691
|
+
//#endregion
|
|
1692
|
+
//#region src/primitives/PsaiLogo/PsaiLogo.tsx
|
|
1693
|
+
function PSAILogo({ isDarkMode = false }) {
|
|
1694
|
+
return /* @__PURE__ */ jsxs("svg", {
|
|
1695
|
+
width: "151",
|
|
1696
|
+
height: "38",
|
|
1697
|
+
viewBox: "0 0 151 38",
|
|
1698
|
+
fill: "none",
|
|
1699
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1700
|
+
style: {
|
|
1701
|
+
"--psai-primary-red": "var(--color-red-500)",
|
|
1702
|
+
"--psai-accent-white": isDarkMode ? "#E5E7EB" : "white",
|
|
1703
|
+
"--psai-text-dark": isDarkMode ? "#FFFFFF" : "#030712"
|
|
1704
|
+
},
|
|
1705
|
+
children: [
|
|
1706
|
+
/* @__PURE__ */ jsx("path", {
|
|
1707
|
+
d: "M18.08 0C8.11 0 0 8.29 0 18.47s8.11 18.47 18.08 18.47 18.08-8.28 18.08-18.47S28.06 0 18.08 0",
|
|
1708
|
+
fill: "var(--psai-primary-red)"
|
|
1709
|
+
}),
|
|
1710
|
+
/* @__PURE__ */ jsx("path", {
|
|
1711
|
+
"fill-rule": "evenodd",
|
|
1712
|
+
"clip-rule": "evenodd",
|
|
1713
|
+
d: "M31.58 24.2c-.27.66-1.02.97-1.67.7a1.3 1.3 0 0 1-.69-1.7 1.27 1.27 0 0 1 1.67-.7c.65.27.96 1.03.69 1.7",
|
|
1714
|
+
fill: "var(--psai-accent-white)"
|
|
1715
|
+
}),
|
|
1716
|
+
/* @__PURE__ */ jsx("path", {
|
|
1717
|
+
"fill-rule": "evenodd",
|
|
1718
|
+
"clip-rule": "evenodd",
|
|
1719
|
+
d: "M23.66 32.26c-.65.28-1.4-.04-1.66-.7-.27-.67.04-1.43.69-1.7.65-.28 1.4.04 1.66.7.27.67-.04 1.43-.69 1.7",
|
|
1720
|
+
fill: "var(--psai-accent-white)"
|
|
1721
|
+
}),
|
|
1722
|
+
/* @__PURE__ */ jsx("path", {
|
|
1723
|
+
"fill-rule": "evenodd",
|
|
1724
|
+
"clip-rule": "evenodd",
|
|
1725
|
+
d: "M12.48 32.26a1.3 1.3 0 0 1-.7-1.7 1.27 1.27 0 0 1 1.67-.71c.65.28.96 1.04.7 1.7-.28.67-1.02.98-1.67.7",
|
|
1726
|
+
fill: "var(--psai-accent-white)"
|
|
1727
|
+
}),
|
|
1728
|
+
/* @__PURE__ */ jsx("path", {
|
|
1729
|
+
"fill-rule": "evenodd",
|
|
1730
|
+
"clip-rule": "evenodd",
|
|
1731
|
+
d: "M4.57 24.17c-.26-.67.05-1.43.7-1.7.65-.28 1.4.04 1.66.7.27.67-.04 1.43-.7 1.7-.64.28-1.39-.04-1.66-.7",
|
|
1732
|
+
fill: "var(--psai-accent-white)"
|
|
1733
|
+
}),
|
|
1734
|
+
/* @__PURE__ */ jsx("path", {
|
|
1735
|
+
"fill-rule": "evenodd",
|
|
1736
|
+
"clip-rule": "evenodd",
|
|
1737
|
+
d: "M4.59 12.74a1.27 1.27 0 0 1 1.66-.7c.65.28.96 1.04.7 1.7-.28.67-1.02.98-1.67.7a1.3 1.3 0 0 1-.7-1.7",
|
|
1738
|
+
fill: "var(--psai-accent-white)"
|
|
1739
|
+
}),
|
|
1740
|
+
/* @__PURE__ */ jsx("path", {
|
|
1741
|
+
"fill-rule": "evenodd",
|
|
1742
|
+
"clip-rule": "evenodd",
|
|
1743
|
+
d: "M12.5 4.67c.65-.27 1.4.04 1.67.7.27.67-.04 1.43-.7 1.7-.64.28-1.39-.03-1.66-.7s.04-1.42.7-1.7",
|
|
1744
|
+
fill: "var(--psai-accent-white)"
|
|
1745
|
+
}),
|
|
1746
|
+
/* @__PURE__ */ jsx("path", {
|
|
1747
|
+
"fill-rule": "evenodd",
|
|
1748
|
+
"clip-rule": "evenodd",
|
|
1749
|
+
d: "M23.69 4.68c.65.28.95 1.04.68 1.7-.27.67-1.01.98-1.66.7a1.3 1.3 0 0 1-.69-1.7 1.27 1.27 0 0 1 1.67-.7",
|
|
1750
|
+
fill: "var(--psai-accent-white)"
|
|
1751
|
+
}),
|
|
1752
|
+
/* @__PURE__ */ jsx("path", {
|
|
1753
|
+
"fill-rule": "evenodd",
|
|
1754
|
+
"clip-rule": "evenodd",
|
|
1755
|
+
d: "M31.59 12.77c.27.67-.04 1.43-.7 1.7-.64.28-1.39-.04-1.66-.7-.27-.67.04-1.43.7-1.7.65-.28 1.39.04 1.66.7",
|
|
1756
|
+
fill: "var(--psai-accent-white)"
|
|
1757
|
+
}),
|
|
1758
|
+
/* @__PURE__ */ jsx("path", {
|
|
1759
|
+
"fill-rule": "evenodd",
|
|
1760
|
+
"clip-rule": "evenodd",
|
|
1761
|
+
d: "M19.42 20.97c-1 1.39-1.7 3.64-.39 4.98.89.91.22 2.42-.98 2.42s-1.87-1.5-.98-2.42c1.31-1.34.6-3.59-.39-4.98a9 9 0 0 0-1.04-1.14c-1.37-1-3.58-1.73-4.89-.39-.88.9-2.36.22-2.36-1 0-1.23 1.48-1.91 2.36-1 1.31 1.34 3.52.62 4.89-.4.23-.17.95-.84 1.1-1.07 1-1.4 1.7-3.64.39-4.98-.89-.91-.22-2.42.98-2.42s1.87 1.5.98 2.42c-1.31 1.34-.6 3.59.39 4.98.17.25.82.97 1.04 1.13 1.37 1.02 3.57 1.74 4.89.4.88-.9 2.36-.22 2.36 1 0 1.23-1.48 1.91-2.36 1-1.31-1.34-3.52-.62-4.89.4-.23.17-.95.84-1.1 1.07",
|
|
1762
|
+
fill: "var(--psai-accent-white)"
|
|
1763
|
+
}),
|
|
1764
|
+
/* @__PURE__ */ jsx("path", {
|
|
1765
|
+
"fill-rule": "evenodd",
|
|
1766
|
+
"clip-rule": "evenodd",
|
|
1767
|
+
d: "M25.04 11.37c.74.76.74 2 0 2.77-.75.76-1.97.76-2.72 0-.74-.77-.74-2 0-2.77a1.9 1.9 0 0 1 2.72 0",
|
|
1768
|
+
fill: "var(--psai-accent-white)"
|
|
1769
|
+
}),
|
|
1770
|
+
/* @__PURE__ */ jsx("path", {
|
|
1771
|
+
"fill-rule": "evenodd",
|
|
1772
|
+
"clip-rule": "evenodd",
|
|
1773
|
+
d: "M25.04 25.57c-.75.77-1.97.77-2.72 0-.74-.76-.74-2 0-2.76a1.9 1.9 0 0 1 2.72 0c.74.76.74 2 0 2.76",
|
|
1774
|
+
fill: "var(--psai-accent-white)"
|
|
1775
|
+
}),
|
|
1776
|
+
/* @__PURE__ */ jsx("path", {
|
|
1777
|
+
"fill-rule": "evenodd",
|
|
1778
|
+
"clip-rule": "evenodd",
|
|
1779
|
+
d: "M11.13 25.57c-.75-.76-.75-2 0-2.76a1.9 1.9 0 0 1 2.7 0c.76.76.76 2 0 2.76-.74.77-1.95.77-2.7 0",
|
|
1780
|
+
fill: "var(--psai-accent-white)"
|
|
1781
|
+
}),
|
|
1782
|
+
/* @__PURE__ */ jsx("path", {
|
|
1783
|
+
"fill-rule": "evenodd",
|
|
1784
|
+
"clip-rule": "evenodd",
|
|
1785
|
+
d: "M11.13 11.37a1.9 1.9 0 0 1 2.7 0c.76.76.76 2 0 2.77-.74.76-1.95.76-2.7 0-.75-.77-.75-2 0-2.77",
|
|
1786
|
+
fill: "var(--psai-accent-white)"
|
|
1787
|
+
}),
|
|
1788
|
+
/* @__PURE__ */ jsx("path", {
|
|
1789
|
+
"fill-rule": "evenodd",
|
|
1790
|
+
"clip-rule": "evenodd",
|
|
1791
|
+
d: "M66.37 5.64a.5.5 0 0 0 .48-.5.5.5 0 0 0-.48-.5.5.5 0 0 0-.5.5c0 .28.23.5.5.5",
|
|
1792
|
+
fill: "var(--psai-text-dark)"
|
|
1793
|
+
}),
|
|
1794
|
+
/* @__PURE__ */ jsx("path", {
|
|
1795
|
+
"fill-rule": "evenodd",
|
|
1796
|
+
"clip-rule": "evenodd",
|
|
1797
|
+
d: "M65.98 13.2h.76V6.58h-.76z",
|
|
1798
|
+
fill: "var(--psai-text-dark)"
|
|
1799
|
+
}),
|
|
1800
|
+
/* @__PURE__ */ jsx("path", {
|
|
1801
|
+
"fill-rule": "evenodd",
|
|
1802
|
+
"clip-rule": "evenodd",
|
|
1803
|
+
d: "M50.82 9.87c0-1.38 1.06-2.5 2.37-2.5 1.3 0 2.37 1.12 2.37 2.5v.1c-.06 1.37-1.1 2.44-2.37 2.44-1.28 0-2.37-1.14-2.37-2.54m2.37 3.32c.92 0 1.77-.41 2.36-1.14v1.15h.77V6.58h-.77v1.14a3 3 0 0 0-2.36-1.14 3.2 3.2 0 0 0-3.14 3.3c0 1.8 1.4 3.31 3.14 3.31",
|
|
1804
|
+
fill: "var(--psai-text-dark)"
|
|
1805
|
+
}),
|
|
1806
|
+
/* @__PURE__ */ jsx("path", {
|
|
1807
|
+
"fill-rule": "evenodd",
|
|
1808
|
+
"clip-rule": "evenodd",
|
|
1809
|
+
d: "M61.45 12.41c-1.28 0-2.32-1.07-2.37-2.43v-.1c0-1.4 1.06-2.52 2.37-2.52 1.3 0 2.36 1.13 2.36 2.51 0 1.39-1.06 2.54-2.36 2.54m3.13-2.54c0-1.81-1.4-3.29-3.13-3.29-.93 0-1.78.41-2.37 1.14V6.58h-.77v9h.77v-3.53c.6.73 1.44 1.14 2.37 1.14 1.72 0 3.13-1.49 3.13-3.32",
|
|
1810
|
+
fill: "var(--psai-text-dark)"
|
|
1811
|
+
}),
|
|
1812
|
+
/* @__PURE__ */ jsx("path", {
|
|
1813
|
+
"fill-rule": "evenodd",
|
|
1814
|
+
"clip-rule": "evenodd",
|
|
1815
|
+
d: "M78.83 6.58c-.73 0-1.41.3-1.9.84v-.84h-.74v6.62h.73V9.28a1.95 1.95 0 0 1 1.9-1.93c1.03 0 1.9.86 1.9 1.93v3.92h.75V9.28c0-1.49-1.19-2.7-2.64-2.7",
|
|
1816
|
+
fill: "var(--psai-text-dark)"
|
|
1817
|
+
}),
|
|
1818
|
+
/* @__PURE__ */ jsx("path", {
|
|
1819
|
+
"fill-rule": "evenodd",
|
|
1820
|
+
"clip-rule": "evenodd",
|
|
1821
|
+
d: "m85.4 12.44-.07.02q-.11.04-.37.05-.45.02-.44-.67v-4.5h.9v-.76h-.9V4.36h-.78v2.22h-.9v.76h.9v4.53q0 .74.28 1.01.27.3.76.31.38 0 .62-.1l.04-.01z",
|
|
1822
|
+
fill: "var(--psai-text-dark)"
|
|
1823
|
+
}),
|
|
1824
|
+
/* @__PURE__ */ jsx("path", {
|
|
1825
|
+
"fill-rule": "evenodd",
|
|
1826
|
+
"clip-rule": "evenodd",
|
|
1827
|
+
d: "M71.51 7.35c1.12 0 2.08.83 2.3 1.97h-4.64a2.4 2.4 0 0 1 2.34-1.97m1.99 3.94a2.3 2.3 0 0 1-1.99 1.14 2.46 2.46 0 0 1-2.39-2.36h5.14c.2 0 .37-.15.37-.35v-.06c-.13-1.75-1.47-3.08-3.12-3.08a3.24 3.24 0 0 0-3.14 3.32c0 1.83 1.4 3.3 3.14 3.3 1.06 0 2.04-.56 2.61-1.5z",
|
|
1828
|
+
fill: "var(--psai-text-dark)"
|
|
1829
|
+
}),
|
|
1830
|
+
/* @__PURE__ */ jsx("path", {
|
|
1831
|
+
"fill-rule": "evenodd",
|
|
1832
|
+
"clip-rule": "evenodd",
|
|
1833
|
+
d: "M48.3 10s-.2-.16-.41-.25c-.22-.09-.52-.2-1.16-.35q-.12-.04-.25-.06a3 3 0 0 1-1-.44q-.34-.28-.3-.61.01-.39.4-.67.45-.34 1.18-.3c.53.02.94.3 1.38.62l.05.03.55-.53-.27-.2c-.43-.3-.97-.62-1.68-.65q-.95-.04-1.61.38c-.47.32-.76.79-.77 1.28 0 .38.07.72.44 1.08.43.43 1.1.65 1.72.77.53.1 1.02.3 1.26.51.3.28.4.48.4.77q-.03.42-.49.72c-.3.23-.73.35-1.17.33q-.9-.05-1.82-.78l-.04-.04-.55.51.06.05q1.08.95 2.31 1.02a2.6 2.6 0 0 0 1.64-.46q.77-.54.8-1.32A1.7 1.7 0 0 0 48.3 10",
|
|
1834
|
+
fill: "var(--psai-text-dark)"
|
|
1835
|
+
}),
|
|
1836
|
+
/* @__PURE__ */ jsx("path", {
|
|
1837
|
+
d: "M53.26 27.7a2.76 2.76 0 0 0-2.74-2.76 2.7 2.7 0 0 0-2.74 2.74c0 1.52 1.2 2.74 2.74 2.74a2.8 2.8 0 0 0 2.74-2.72m-.3-3.66v-1.26h2.76v9.8h-2.76V31.3a3.9 3.9 0 0 1-3.2 1.58c-2.76 0-4.82-2.26-4.82-5.22 0-2.92 2.04-5.2 4.76-5.2q1.92.01 3.26 1.58m5.32-1.26h2.76v9.8h-2.76zm-.26-4.14c0-.9.74-1.64 1.64-1.64s1.64.74 1.64 1.64-.74 1.64-1.64 1.64-1.64-.74-1.64-1.64m17.5 9.06a2.75 2.75 0 1 0-5.5-.02 2.77 2.77 0 0 0 2.76 2.74c1.5 0 2.74-1.26 2.74-2.72m-5.2 3.6v6.5h-2.76V22.78h2.76v1.26a4 4 0 0 1 3.2-1.58c2.76 0 4.82 2.28 4.82 5.22 0 2.96-2.08 5.2-4.76 5.2a4.1 4.1 0 0 1-3.26-1.58m10.11 1.28v-9.8h2.76v1.48q1.02-1.8 2.84-1.8.57 0 1.2.24l-.38 2.58a3 3 0 0 0-1.32-.34q-2.34 0-2.34 2.94v4.7zm10.43-4.94a2.74 2.74 0 0 0 2.76 2.78 2.8 2.8 0 0 0 2.78-2.74 2.8 2.8 0 0 0-2.78-2.74 2.8 2.8 0 0 0-2.76 2.7m-2.84-.04c0-2.98 2.38-5.14 5.62-5.14s5.58 2.16 5.58 5.2c0 3.16-2.36 5.22-5.64 5.22-3.34 0-5.56-2.18-5.56-5.28m21.1.1a2.76 2.76 0 0 0-2.75-2.76 2.76 2.76 0 0 0-2.74 2.74c0 1.5 1.24 2.74 2.74 2.74a2.8 2.8 0 0 0 2.74-2.72m-.3-3.66v-8.42h2.75v16.96h-2.76V31.3a3.9 3.9 0 0 1-3.2 1.58c-2.76 0-4.82-2.22-4.82-5.22 0-2.92 2.06-5.2 4.76-5.2q1.92.01 3.26 1.58m5.34-1.26h2.76v5.56q0 2.22 1.98 2.22 2 0 2-2.22v-5.56h2.74v6.02c0 2.62-1.7 4.08-4.74 4.08s-4.74-1.46-4.74-4.08zm19.43.28v2.7a3.6 3.6 0 0 0-2.24-.82 2.7 2.7 0 0 0-2.8 2.74c0 1.6 1.2 2.74 2.8 2.74q1.2 0 2.24-.82v2.7q-1.26.57-2.52.58a5.22 5.22 0 1 1 .04-10.42q1.35 0 2.48.6m2.1 2.08h-1.08v-2.36h1.08v-3.34h2.76v3.34h1.92v2.36h-1.92v2.92c0 1.52.18 2.4 1.2 2.4q.28 0 .5-.04v2.4c-.3.04-.86.06-1.16.06-2.14 0-3.3-1.58-3.3-3.84zm13.16-1.68-1.36 1.6a2.7 2.7 0 0 0-1.62-.64c-.6 0-1.06.36-1.06.82 0 .48.26.64 1.56 1.1 2.28.8 2.98 1.48 2.98 3.04 0 2.06-1.7 3.52-4.1 3.52a4.8 4.8 0 0 1-3.72-1.62l1.42-1.68q1.14 1.15 2.32 1.16c.7 0 1.24-.46 1.24-1.08 0-.54-.22-.78-1.5-1.24-2.38-.84-2.86-1.48-2.86-2.9 0-1.9 1.54-3.12 3.5-3.12q1.8 0 3.2 1.04",
|
|
1838
|
+
fill: "var(--psai-text-dark)"
|
|
1839
|
+
})
|
|
1840
|
+
]
|
|
1841
|
+
});
|
|
1842
|
+
}
|
|
1843
|
+
//#endregion
|
|
1844
|
+
//#region src/primitives/RadioGroup/RadioGroup.tsx
|
|
1845
|
+
function RadioGroup({ className, ...props }) {
|
|
1846
|
+
return /* @__PURE__ */ jsx(RadioGroupPrimitive.Root, {
|
|
1847
|
+
"data-slot": "radio-group",
|
|
1848
|
+
className: cn("grid gap-3", className),
|
|
1849
|
+
...props
|
|
1850
|
+
});
|
|
1851
|
+
}
|
|
1852
|
+
function RadioGroupItem({ className, ...props }) {
|
|
1853
|
+
return /* @__PURE__ */ jsx(RadioGroupPrimitive.Item, {
|
|
1854
|
+
"data-slot": "radio-group-item",
|
|
1855
|
+
className: cn("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50", className),
|
|
1856
|
+
...props,
|
|
1857
|
+
children: /* @__PURE__ */ jsx(RadioGroupPrimitive.Indicator, {
|
|
1858
|
+
"data-slot": "radio-group-indicator",
|
|
1859
|
+
className: "relative flex items-center justify-center",
|
|
1860
|
+
children: /* @__PURE__ */ jsx(CircleIcon, { className: "fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2" })
|
|
1861
|
+
})
|
|
1862
|
+
});
|
|
1863
|
+
}
|
|
1864
|
+
//#endregion
|
|
1865
|
+
//#region src/primitives/Resizable/Resizable.tsx
|
|
1866
|
+
function ResizablePanelGroup({ className, ...props }) {
|
|
1867
|
+
return /* @__PURE__ */ jsx(ResizablePrimitive.PanelGroup, {
|
|
1868
|
+
"data-slot": "resizable-panel-group",
|
|
1869
|
+
className: cn("flex h-full w-full data-[panel-group-direction=vertical]:flex-col", className),
|
|
1870
|
+
...props
|
|
1871
|
+
});
|
|
1872
|
+
}
|
|
1873
|
+
function ResizablePanel({ className, ...props }) {
|
|
1874
|
+
return /* @__PURE__ */ jsx(ResizablePrimitive.Panel, {
|
|
1875
|
+
"data-slot": "resizable-panel",
|
|
1876
|
+
className: cn(className),
|
|
1877
|
+
...props
|
|
1878
|
+
});
|
|
1879
|
+
}
|
|
1880
|
+
function ResizableHandle({ withHandle, className, ...props }) {
|
|
1881
|
+
return /* @__PURE__ */ jsx(ResizablePrimitive.PanelResizeHandle, {
|
|
1882
|
+
"data-slot": "resizable-handle",
|
|
1883
|
+
className: cn("bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90", className),
|
|
1884
|
+
...props,
|
|
1885
|
+
children: withHandle && /* @__PURE__ */ jsx("div", {
|
|
1886
|
+
className: "bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",
|
|
1887
|
+
children: /* @__PURE__ */ jsx(GripVerticalIcon, { className: "size-2.5" })
|
|
1888
|
+
})
|
|
1889
|
+
});
|
|
1890
|
+
}
|
|
1891
|
+
//#endregion
|
|
1892
|
+
//#region src/primitives/ScrollArea/ScrollArea.tsx
|
|
1893
|
+
function ScrollArea({ className, children, ...props }) {
|
|
1894
|
+
return /* @__PURE__ */ jsxs(ScrollAreaPrimitive.Root, {
|
|
1895
|
+
"data-slot": "scroll-area",
|
|
1896
|
+
className: cn("relative", className),
|
|
1897
|
+
...props,
|
|
1898
|
+
children: [
|
|
1899
|
+
/* @__PURE__ */ jsx(ScrollAreaPrimitive.Viewport, {
|
|
1900
|
+
"data-slot": "scroll-area-viewport",
|
|
1901
|
+
className: "focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",
|
|
1902
|
+
children
|
|
1903
|
+
}),
|
|
1904
|
+
/* @__PURE__ */ jsx(ScrollBar, {}),
|
|
1905
|
+
/* @__PURE__ */ jsx(ScrollAreaPrimitive.Corner, {})
|
|
1906
|
+
]
|
|
1907
|
+
});
|
|
1908
|
+
}
|
|
1909
|
+
function ScrollBar({ className, orientation = "vertical", ...props }) {
|
|
1910
|
+
return /* @__PURE__ */ jsx(ScrollAreaPrimitive.ScrollAreaScrollbar, {
|
|
1911
|
+
"data-slot": "scroll-area-scrollbar",
|
|
1912
|
+
orientation,
|
|
1913
|
+
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),
|
|
1914
|
+
...props,
|
|
1915
|
+
children: /* @__PURE__ */ jsx(ScrollAreaPrimitive.ScrollAreaThumb, {
|
|
1916
|
+
"data-slot": "scroll-area-thumb",
|
|
1917
|
+
className: "bg-border relative flex-1 rounded-full"
|
|
1918
|
+
})
|
|
1919
|
+
});
|
|
1920
|
+
}
|
|
1921
|
+
//#endregion
|
|
1922
|
+
//#region src/primitives/Select/Select.tsx
|
|
1923
|
+
function Select({ ...props }) {
|
|
1924
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.Root, {
|
|
1925
|
+
"data-slot": "select",
|
|
1926
|
+
...props
|
|
1927
|
+
});
|
|
1928
|
+
}
|
|
1929
|
+
function SelectGroup({ ...props }) {
|
|
1930
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.Group, {
|
|
1931
|
+
"data-slot": "select-group",
|
|
1932
|
+
...props
|
|
1933
|
+
});
|
|
1934
|
+
}
|
|
1935
|
+
function SelectValue({ ...props }) {
|
|
1936
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.Value, {
|
|
1937
|
+
"data-slot": "select-value",
|
|
1938
|
+
...props
|
|
1939
|
+
});
|
|
1940
|
+
}
|
|
1941
|
+
function SelectTrigger({ className, size = "default", children, ...props }) {
|
|
1942
|
+
return /* @__PURE__ */ jsxs(SelectPrimitive.Trigger, {
|
|
1943
|
+
"data-slot": "select-trigger",
|
|
1944
|
+
"data-size": size,
|
|
1945
|
+
className: cn("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-full items-center justify-between gap-2 rounded-md border bg-input-background px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
1946
|
+
...props,
|
|
1947
|
+
children: [children, /* @__PURE__ */ jsx(SelectPrimitive.Icon, {
|
|
1948
|
+
asChild: true,
|
|
1949
|
+
children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-4 opacity-50" })
|
|
1950
|
+
})]
|
|
1951
|
+
});
|
|
1952
|
+
}
|
|
1953
|
+
function SelectContent({ className, children, position = "popper", ...props }) {
|
|
1954
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(SelectPrimitive.Content, {
|
|
1955
|
+
"data-slot": "select-content",
|
|
1956
|
+
className: cn("bg-popover text-popover-foreground 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 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md", position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", className),
|
|
1957
|
+
position,
|
|
1958
|
+
...props,
|
|
1959
|
+
children: [
|
|
1960
|
+
/* @__PURE__ */ jsx(SelectScrollUpButton, {}),
|
|
1961
|
+
/* @__PURE__ */ jsx(SelectPrimitive.Viewport, {
|
|
1962
|
+
className: cn("p-1", position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),
|
|
1963
|
+
children
|
|
1964
|
+
}),
|
|
1965
|
+
/* @__PURE__ */ jsx(SelectScrollDownButton, {})
|
|
1966
|
+
]
|
|
1967
|
+
}) });
|
|
1968
|
+
}
|
|
1969
|
+
function SelectLabel({ className, ...props }) {
|
|
1970
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.Label, {
|
|
1971
|
+
"data-slot": "select-label",
|
|
1972
|
+
className: cn("text-muted-foreground px-2 py-1.5 text-xs", className),
|
|
1973
|
+
...props
|
|
1974
|
+
});
|
|
1975
|
+
}
|
|
1976
|
+
function SelectItem({ className, children, ...props }) {
|
|
1977
|
+
return /* @__PURE__ */ jsxs(SelectPrimitive.Item, {
|
|
1978
|
+
"data-slot": "select-item",
|
|
1979
|
+
className: cn("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", className),
|
|
1980
|
+
...props,
|
|
1981
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
1982
|
+
className: "absolute right-2 flex size-3.5 items-center justify-center",
|
|
1983
|
+
children: /* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) })
|
|
1984
|
+
}), /* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children })]
|
|
1985
|
+
});
|
|
1986
|
+
}
|
|
1987
|
+
function SelectSeparator({ className, ...props }) {
|
|
1988
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.Separator, {
|
|
1989
|
+
"data-slot": "select-separator",
|
|
1990
|
+
className: cn("bg-border pointer-events-none -mx-1 my-1 h-px", className),
|
|
1991
|
+
...props
|
|
1992
|
+
});
|
|
1993
|
+
}
|
|
1994
|
+
function SelectScrollUpButton({ className, ...props }) {
|
|
1995
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.ScrollUpButton, {
|
|
1996
|
+
"data-slot": "select-scroll-up-button",
|
|
1997
|
+
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
1998
|
+
...props,
|
|
1999
|
+
children: /* @__PURE__ */ jsx(ChevronUpIcon, { className: "size-4" })
|
|
2000
|
+
});
|
|
2001
|
+
}
|
|
2002
|
+
function SelectScrollDownButton({ className, ...props }) {
|
|
2003
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.ScrollDownButton, {
|
|
2004
|
+
"data-slot": "select-scroll-down-button",
|
|
2005
|
+
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
2006
|
+
...props,
|
|
2007
|
+
children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-4" })
|
|
2008
|
+
});
|
|
2009
|
+
}
|
|
2010
|
+
//#endregion
|
|
2011
|
+
//#region src/primitives/Separator/Separator.tsx
|
|
2012
|
+
function Separator({ className, orientation = "horizontal", decorative = true, ...props }) {
|
|
2013
|
+
return /* @__PURE__ */ jsx(SeparatorPrimitive.Root, {
|
|
2014
|
+
"data-slot": "separator-root",
|
|
2015
|
+
decorative,
|
|
2016
|
+
orientation,
|
|
2017
|
+
className: cn("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px", className),
|
|
2018
|
+
...props
|
|
2019
|
+
});
|
|
2020
|
+
}
|
|
2021
|
+
//#endregion
|
|
2022
|
+
//#region src/primitives/Sheet/Sheet.tsx
|
|
2023
|
+
function Sheet({ ...props }) {
|
|
2024
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Root, {
|
|
2025
|
+
"data-slot": "sheet",
|
|
2026
|
+
...props
|
|
2027
|
+
});
|
|
2028
|
+
}
|
|
2029
|
+
function SheetTrigger({ ...props }) {
|
|
2030
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Trigger, {
|
|
2031
|
+
"data-slot": "sheet-trigger",
|
|
2032
|
+
...props
|
|
2033
|
+
});
|
|
2034
|
+
}
|
|
2035
|
+
function SheetClose({ ...props }) {
|
|
2036
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Close, {
|
|
2037
|
+
"data-slot": "sheet-close",
|
|
2038
|
+
...props
|
|
2039
|
+
});
|
|
2040
|
+
}
|
|
2041
|
+
function SheetPortal({ ...props }) {
|
|
2042
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Portal, {
|
|
2043
|
+
"data-slot": "sheet-portal",
|
|
2044
|
+
...props
|
|
2045
|
+
});
|
|
2046
|
+
}
|
|
2047
|
+
function SheetOverlay({ className, ...props }) {
|
|
2048
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Overlay, {
|
|
2049
|
+
"data-slot": "sheet-overlay",
|
|
2050
|
+
className: cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-[var(--overlay)]", className),
|
|
2051
|
+
...props
|
|
2052
|
+
});
|
|
2053
|
+
}
|
|
2054
|
+
function SheetContent({ className, children, side = "right", showCloseButton = true, overlayClassName, overlayStyle, ...props }) {
|
|
2055
|
+
return /* @__PURE__ */ jsxs(SheetPortal, { children: [/* @__PURE__ */ jsx(SheetOverlay, {
|
|
2056
|
+
className: overlayClassName,
|
|
2057
|
+
style: overlayStyle
|
|
2058
|
+
}), /* @__PURE__ */ jsxs(DialogPrimitive.Content, {
|
|
2059
|
+
"data-slot": "sheet-content",
|
|
2060
|
+
className: cn("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500", side === "right" && "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm", side === "left" && "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm", side === "top" && "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b", side === "bottom" && "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t", className),
|
|
2061
|
+
...props,
|
|
2062
|
+
children: [children, showCloseButton && /* @__PURE__ */ jsxs(DialogPrimitive.Close, {
|
|
2063
|
+
className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",
|
|
2064
|
+
children: [/* @__PURE__ */ jsx(XIcon, { className: "size-4" }), /* @__PURE__ */ jsx("span", {
|
|
2065
|
+
className: "sr-only",
|
|
2066
|
+
children: "Close"
|
|
2067
|
+
})]
|
|
2068
|
+
})]
|
|
2069
|
+
})] });
|
|
2070
|
+
}
|
|
2071
|
+
function SheetHeader({ className, ...props }) {
|
|
2072
|
+
return /* @__PURE__ */ jsx("div", {
|
|
2073
|
+
"data-slot": "sheet-header",
|
|
2074
|
+
className: cn("flex flex-col gap-1.5 p-4", className),
|
|
2075
|
+
...props
|
|
2076
|
+
});
|
|
2077
|
+
}
|
|
2078
|
+
function SheetFooter({ className, ...props }) {
|
|
2079
|
+
return /* @__PURE__ */ jsx("div", {
|
|
2080
|
+
"data-slot": "sheet-footer",
|
|
2081
|
+
className: cn("mt-auto flex flex-col gap-2 p-4", className),
|
|
2082
|
+
...props
|
|
2083
|
+
});
|
|
2084
|
+
}
|
|
2085
|
+
function SheetTitle({ className, ...props }) {
|
|
2086
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Title, {
|
|
2087
|
+
"data-slot": "sheet-title",
|
|
2088
|
+
className: cn("text-foreground font-semibold", className),
|
|
2089
|
+
...props
|
|
2090
|
+
});
|
|
2091
|
+
}
|
|
2092
|
+
function SheetDescription({ className, ...props }) {
|
|
2093
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Description, {
|
|
2094
|
+
"data-slot": "sheet-description",
|
|
2095
|
+
className: cn("text-muted-foreground text-sm", className),
|
|
2096
|
+
...props
|
|
2097
|
+
});
|
|
2098
|
+
}
|
|
2099
|
+
//#endregion
|
|
2100
|
+
//#region src/primitives/Sidebar/Sidebar.tsx
|
|
2101
|
+
const SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
2102
|
+
const SIDEBAR_COOKIE_MAX_AGE = 3600 * 24 * 7;
|
|
2103
|
+
const SIDEBAR_WIDTH = "16rem";
|
|
2104
|
+
const SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
2105
|
+
const SIDEBAR_WIDTH_ICON = "3rem";
|
|
2106
|
+
const SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
2107
|
+
const SidebarContext = React.createContext(null);
|
|
2108
|
+
function useSidebar() {
|
|
2109
|
+
const context = React.useContext(SidebarContext);
|
|
2110
|
+
if (!context) throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
2111
|
+
return context;
|
|
2112
|
+
}
|
|
2113
|
+
function SidebarProvider({ defaultOpen = true, open: openProp, onOpenChange: setOpenProp, className, style, children, ...props }) {
|
|
2114
|
+
const isMobile = useIsMobile();
|
|
2115
|
+
const [openMobile, setOpenMobile] = React.useState(false);
|
|
2116
|
+
const [_open, _setOpen] = React.useState(defaultOpen);
|
|
2117
|
+
const open = openProp ?? _open;
|
|
2118
|
+
const setOpen = React.useCallback((value) => {
|
|
2119
|
+
const openState = typeof value === "function" ? value(open) : value;
|
|
2120
|
+
if (setOpenProp) setOpenProp(openState);
|
|
2121
|
+
else _setOpen(openState);
|
|
2122
|
+
document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
|
|
2123
|
+
}, [setOpenProp, open]);
|
|
2124
|
+
const toggleSidebar = React.useCallback(() => {
|
|
2125
|
+
return isMobile ? setOpenMobile((open) => !open) : setOpen((open) => !open);
|
|
2126
|
+
}, [
|
|
2127
|
+
isMobile,
|
|
2128
|
+
setOpen,
|
|
2129
|
+
setOpenMobile
|
|
2130
|
+
]);
|
|
2131
|
+
React.useEffect(() => {
|
|
2132
|
+
const handleKeyDown = (event) => {
|
|
2133
|
+
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
2134
|
+
event.preventDefault();
|
|
2135
|
+
toggleSidebar();
|
|
2136
|
+
}
|
|
2137
|
+
};
|
|
2138
|
+
window.addEventListener("keydown", handleKeyDown);
|
|
2139
|
+
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
2140
|
+
}, [toggleSidebar]);
|
|
2141
|
+
const state = open ? "expanded" : "collapsed";
|
|
2142
|
+
const contextValue = React.useMemo(() => ({
|
|
2143
|
+
state,
|
|
2144
|
+
open,
|
|
2145
|
+
setOpen,
|
|
2146
|
+
isMobile,
|
|
2147
|
+
openMobile,
|
|
2148
|
+
setOpenMobile,
|
|
2149
|
+
toggleSidebar
|
|
2150
|
+
}), [
|
|
2151
|
+
state,
|
|
2152
|
+
open,
|
|
2153
|
+
setOpen,
|
|
2154
|
+
isMobile,
|
|
2155
|
+
openMobile,
|
|
2156
|
+
setOpenMobile,
|
|
2157
|
+
toggleSidebar
|
|
2158
|
+
]);
|
|
2159
|
+
return /* @__PURE__ */ jsx(SidebarContext.Provider, {
|
|
2160
|
+
value: contextValue,
|
|
2161
|
+
children: /* @__PURE__ */ jsx(TooltipProvider, {
|
|
2162
|
+
delayDuration: 0,
|
|
2163
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
2164
|
+
"data-slot": "sidebar-wrapper",
|
|
2165
|
+
style: {
|
|
2166
|
+
"--sidebar-width": SIDEBAR_WIDTH,
|
|
2167
|
+
"--sidebar-width-icon": SIDEBAR_WIDTH_ICON,
|
|
2168
|
+
...style
|
|
2169
|
+
},
|
|
2170
|
+
className: cn("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full", className),
|
|
2171
|
+
...props,
|
|
2172
|
+
children
|
|
2173
|
+
})
|
|
2174
|
+
})
|
|
2175
|
+
});
|
|
2176
|
+
}
|
|
2177
|
+
function Sidebar({ side = "left", variant = "sidebar", collapsible = "offcanvas", className, children, ...props }) {
|
|
2178
|
+
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
2179
|
+
if (collapsible === "none") return /* @__PURE__ */ jsx("div", {
|
|
2180
|
+
"data-slot": "sidebar",
|
|
2181
|
+
className: cn("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col", className),
|
|
2182
|
+
...props,
|
|
2183
|
+
children
|
|
2184
|
+
});
|
|
2185
|
+
if (isMobile) return /* @__PURE__ */ jsx(Sheet, {
|
|
2186
|
+
open: openMobile,
|
|
2187
|
+
onOpenChange: setOpenMobile,
|
|
2188
|
+
...props,
|
|
2189
|
+
children: /* @__PURE__ */ jsxs(SheetContent, {
|
|
2190
|
+
"data-sidebar": "sidebar",
|
|
2191
|
+
"data-slot": "sidebar",
|
|
2192
|
+
"data-mobile": "true",
|
|
2193
|
+
className: "bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",
|
|
2194
|
+
style: { "--sidebar-width": SIDEBAR_WIDTH_MOBILE },
|
|
2195
|
+
side,
|
|
2196
|
+
children: [/* @__PURE__ */ jsxs(SheetHeader, {
|
|
2197
|
+
className: "sr-only",
|
|
2198
|
+
children: [/* @__PURE__ */ jsx(SheetTitle, { children: "Sidebar" }), /* @__PURE__ */ jsx(SheetDescription, { children: "Displays the mobile sidebar." })]
|
|
2199
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
2200
|
+
className: "flex h-full w-full flex-col",
|
|
2201
|
+
children
|
|
2202
|
+
})]
|
|
2203
|
+
})
|
|
2204
|
+
});
|
|
2205
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
2206
|
+
className: "group peer text-sidebar-foreground hidden md:block",
|
|
2207
|
+
"data-state": state,
|
|
2208
|
+
"data-collapsible": state === "collapsed" ? collapsible : "",
|
|
2209
|
+
"data-variant": variant,
|
|
2210
|
+
"data-side": side,
|
|
2211
|
+
"data-slot": "sidebar",
|
|
2212
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
2213
|
+
"data-slot": "sidebar-gap",
|
|
2214
|
+
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)")
|
|
2215
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
2216
|
+
"data-slot": "sidebar-container",
|
|
2217
|
+
className: cn("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex", 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)]", 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),
|
|
2218
|
+
...props,
|
|
2219
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
2220
|
+
"data-sidebar": "sidebar",
|
|
2221
|
+
"data-slot": "sidebar-inner",
|
|
2222
|
+
className: "bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",
|
|
2223
|
+
children
|
|
2224
|
+
})
|
|
2225
|
+
})]
|
|
2226
|
+
});
|
|
2227
|
+
}
|
|
2228
|
+
function SidebarTrigger({ className, onClick, ...props }) {
|
|
2229
|
+
const { toggleSidebar } = useSidebar();
|
|
2230
|
+
return /* @__PURE__ */ jsxs(Button, {
|
|
2231
|
+
"data-sidebar": "trigger",
|
|
2232
|
+
"data-slot": "sidebar-trigger",
|
|
2233
|
+
variant: "ghost",
|
|
2234
|
+
size: "icon",
|
|
2235
|
+
className: cn("size-7", className),
|
|
2236
|
+
onClick: (event) => {
|
|
2237
|
+
onClick?.(event);
|
|
2238
|
+
toggleSidebar();
|
|
2239
|
+
},
|
|
2240
|
+
...props,
|
|
2241
|
+
children: [/* @__PURE__ */ jsx(PanelLeftIcon, {}), /* @__PURE__ */ jsx("span", {
|
|
2242
|
+
className: "sr-only",
|
|
2243
|
+
children: "Toggle Sidebar"
|
|
2244
|
+
})]
|
|
2245
|
+
});
|
|
2246
|
+
}
|
|
2247
|
+
function SidebarRail({ className, ...props }) {
|
|
2248
|
+
const { toggleSidebar } = useSidebar();
|
|
2249
|
+
return /* @__PURE__ */ jsx("button", {
|
|
2250
|
+
"data-sidebar": "rail",
|
|
2251
|
+
"data-slot": "sidebar-rail",
|
|
2252
|
+
"aria-label": "Toggle Sidebar",
|
|
2253
|
+
tabIndex: -1,
|
|
2254
|
+
onClick: toggleSidebar,
|
|
2255
|
+
title: "Toggle Sidebar",
|
|
2256
|
+
className: cn("hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] sm:flex", "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", "hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full", "[[data-side=left][data-collapsible=offcanvas]_&]:-right-2", "[[data-side=right][data-collapsible=offcanvas]_&]:-left-2", className),
|
|
2257
|
+
...props
|
|
2258
|
+
});
|
|
2259
|
+
}
|
|
2260
|
+
function SidebarInset({ className, ...props }) {
|
|
2261
|
+
return /* @__PURE__ */ jsx("main", {
|
|
2262
|
+
"data-slot": "sidebar-inset",
|
|
2263
|
+
className: cn("bg-background relative flex w-full flex-1 flex-col", "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),
|
|
2264
|
+
...props
|
|
2265
|
+
});
|
|
2266
|
+
}
|
|
2267
|
+
function SidebarInput({ className, ...props }) {
|
|
2268
|
+
return /* @__PURE__ */ jsx(Input, {
|
|
2269
|
+
"data-slot": "sidebar-input",
|
|
2270
|
+
"data-sidebar": "input",
|
|
2271
|
+
className: cn("bg-background h-8 w-full shadow-none", className),
|
|
2272
|
+
...props
|
|
2273
|
+
});
|
|
2274
|
+
}
|
|
2275
|
+
function SidebarHeader({ className, ...props }) {
|
|
2276
|
+
return /* @__PURE__ */ jsx("div", {
|
|
2277
|
+
"data-slot": "sidebar-header",
|
|
2278
|
+
"data-sidebar": "header",
|
|
2279
|
+
className: cn("flex flex-col gap-2 p-2", className),
|
|
2280
|
+
...props
|
|
2281
|
+
});
|
|
2282
|
+
}
|
|
2283
|
+
function SidebarFooter({ className, ...props }) {
|
|
2284
|
+
return /* @__PURE__ */ jsx("div", {
|
|
2285
|
+
"data-slot": "sidebar-footer",
|
|
2286
|
+
"data-sidebar": "footer",
|
|
2287
|
+
className: cn("flex flex-col gap-2 p-2", className),
|
|
2288
|
+
...props
|
|
2289
|
+
});
|
|
2290
|
+
}
|
|
2291
|
+
function SidebarSeparator({ className, ...props }) {
|
|
2292
|
+
return /* @__PURE__ */ jsx(Separator, {
|
|
2293
|
+
"data-slot": "sidebar-separator",
|
|
2294
|
+
"data-sidebar": "separator",
|
|
2295
|
+
className: cn("bg-sidebar-border mx-2 w-auto", className),
|
|
2296
|
+
...props
|
|
2297
|
+
});
|
|
2298
|
+
}
|
|
2299
|
+
function SidebarContent({ className, ...props }) {
|
|
2300
|
+
return /* @__PURE__ */ jsx("div", {
|
|
2301
|
+
"data-slot": "sidebar-content",
|
|
2302
|
+
"data-sidebar": "content",
|
|
2303
|
+
className: cn("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden", className),
|
|
2304
|
+
...props
|
|
2305
|
+
});
|
|
2306
|
+
}
|
|
2307
|
+
function SidebarGroup({ className, ...props }) {
|
|
2308
|
+
return /* @__PURE__ */ jsx("div", {
|
|
2309
|
+
"data-slot": "sidebar-group",
|
|
2310
|
+
"data-sidebar": "group",
|
|
2311
|
+
className: cn("relative flex w-full min-w-0 flex-col p-2", className),
|
|
2312
|
+
...props
|
|
2313
|
+
});
|
|
2314
|
+
}
|
|
2315
|
+
function SidebarGroupLabel({ className, asChild = false, ...props }) {
|
|
2316
|
+
return /* @__PURE__ */ jsx(asChild ? Slot : "div", {
|
|
2317
|
+
"data-slot": "sidebar-group-label",
|
|
2318
|
+
"data-sidebar": "group-label",
|
|
2319
|
+
className: cn("text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0", "group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0", className),
|
|
2320
|
+
...props
|
|
2321
|
+
});
|
|
2322
|
+
}
|
|
2323
|
+
function SidebarGroupAction({ className, asChild = false, ...props }) {
|
|
2324
|
+
return /* @__PURE__ */ jsx(asChild ? Slot : "button", {
|
|
2325
|
+
"data-slot": "sidebar-group-action",
|
|
2326
|
+
"data-sidebar": "group-action",
|
|
2327
|
+
className: cn("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0", "after:absolute after:-inset-2 md:after:hidden", "group-data-[collapsible=icon]:hidden", className),
|
|
2328
|
+
...props
|
|
2329
|
+
});
|
|
2330
|
+
}
|
|
2331
|
+
function SidebarGroupContent({ className, ...props }) {
|
|
2332
|
+
return /* @__PURE__ */ jsx("div", {
|
|
2333
|
+
"data-slot": "sidebar-group-content",
|
|
2334
|
+
"data-sidebar": "group-content",
|
|
2335
|
+
className: cn("w-full text-sm", className),
|
|
2336
|
+
...props
|
|
2337
|
+
});
|
|
2338
|
+
}
|
|
2339
|
+
function SidebarMenu({ className, ...props }) {
|
|
2340
|
+
return /* @__PURE__ */ jsx("ul", {
|
|
2341
|
+
"data-slot": "sidebar-menu",
|
|
2342
|
+
"data-sidebar": "menu",
|
|
2343
|
+
className: cn("flex w-full min-w-0 flex-col gap-1", className),
|
|
2344
|
+
...props
|
|
2345
|
+
});
|
|
2346
|
+
}
|
|
2347
|
+
function SidebarMenuItem({ className, ...props }) {
|
|
2348
|
+
return /* @__PURE__ */ jsx("li", {
|
|
2349
|
+
"data-slot": "sidebar-menu-item",
|
|
2350
|
+
"data-sidebar": "menu-item",
|
|
2351
|
+
className: cn("group/menu-item relative", className),
|
|
2352
|
+
...props
|
|
2353
|
+
});
|
|
2354
|
+
}
|
|
2355
|
+
const sidebarMenuButtonVariants = cva("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden 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", {
|
|
2356
|
+
variants: {
|
|
2357
|
+
variant: {
|
|
2358
|
+
default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
|
|
2359
|
+
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))]"
|
|
2360
|
+
},
|
|
2361
|
+
size: {
|
|
2362
|
+
default: "h-8 text-sm",
|
|
2363
|
+
sm: "h-7 text-xs",
|
|
2364
|
+
lg: "h-12 text-sm group-data-[collapsible=icon]:p-0!"
|
|
2365
|
+
}
|
|
2366
|
+
},
|
|
2367
|
+
defaultVariants: {
|
|
2368
|
+
variant: "default",
|
|
2369
|
+
size: "default"
|
|
2370
|
+
}
|
|
2371
|
+
});
|
|
2372
|
+
function SidebarMenuButton({ asChild = false, isActive = false, variant = "default", size = "default", tooltip, className, ...props }) {
|
|
2373
|
+
const Comp = asChild ? Slot : "button";
|
|
2374
|
+
const { isMobile, state } = useSidebar();
|
|
2375
|
+
const button = /* @__PURE__ */ jsx(Comp, {
|
|
2376
|
+
"data-slot": "sidebar-menu-button",
|
|
2377
|
+
"data-sidebar": "menu-button",
|
|
2378
|
+
"data-size": size,
|
|
2379
|
+
"data-active": isActive,
|
|
2380
|
+
className: cn(sidebarMenuButtonVariants({
|
|
2381
|
+
variant,
|
|
2382
|
+
size
|
|
2383
|
+
}), className),
|
|
2384
|
+
...props
|
|
2385
|
+
});
|
|
2386
|
+
if (!tooltip) return button;
|
|
2387
|
+
if (typeof tooltip === "string") tooltip = { children: tooltip };
|
|
2388
|
+
return /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, {
|
|
2389
|
+
asChild: true,
|
|
2390
|
+
children: button
|
|
2391
|
+
}), /* @__PURE__ */ jsx(TooltipContent, {
|
|
2392
|
+
side: "right",
|
|
2393
|
+
align: "center",
|
|
2394
|
+
hidden: state !== "collapsed" || isMobile,
|
|
2395
|
+
...tooltip
|
|
2396
|
+
})] });
|
|
2397
|
+
}
|
|
2398
|
+
function SidebarMenuAction({ className, asChild = false, showOnHover = false, ...props }) {
|
|
2399
|
+
return /* @__PURE__ */ jsx(asChild ? Slot : "button", {
|
|
2400
|
+
"data-slot": "sidebar-menu-action",
|
|
2401
|
+
"data-sidebar": "menu-action",
|
|
2402
|
+
className: cn("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0", "after:absolute after:-inset-2 md:after:hidden", "peer-data-[size=sm]/menu-button:top-1", "peer-data-[size=default]/menu-button:top-1.5", "peer-data-[size=lg]/menu-button:top-2.5", "group-data-[collapsible=icon]:hidden", showOnHover && "peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0", className),
|
|
2403
|
+
...props
|
|
2404
|
+
});
|
|
2405
|
+
}
|
|
2406
|
+
function SidebarMenuBadge({ className, ...props }) {
|
|
2407
|
+
return /* @__PURE__ */ jsx("div", {
|
|
2408
|
+
"data-slot": "sidebar-menu-badge",
|
|
2409
|
+
"data-sidebar": "menu-badge",
|
|
2410
|
+
className: cn("text-sidebar-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none", "peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground", "peer-data-[size=sm]/menu-button:top-1", "peer-data-[size=default]/menu-button:top-1.5", "peer-data-[size=lg]/menu-button:top-2.5", "group-data-[collapsible=icon]:hidden", className),
|
|
2411
|
+
...props
|
|
2412
|
+
});
|
|
2413
|
+
}
|
|
2414
|
+
function SidebarMenuSkeleton({ className, showIcon = false, ...props }) {
|
|
2415
|
+
const width = React.useMemo(() => {
|
|
2416
|
+
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
2417
|
+
}, []);
|
|
2418
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
2419
|
+
"data-slot": "sidebar-menu-skeleton",
|
|
2420
|
+
"data-sidebar": "menu-skeleton",
|
|
2421
|
+
className: cn("flex h-8 items-center gap-2 rounded-md px-2", className),
|
|
2422
|
+
...props,
|
|
2423
|
+
children: [showIcon && /* @__PURE__ */ jsx(Skeleton, {
|
|
2424
|
+
className: "size-4 rounded-md",
|
|
2425
|
+
"data-sidebar": "menu-skeleton-icon"
|
|
2426
|
+
}), /* @__PURE__ */ jsx(Skeleton, {
|
|
2427
|
+
className: "h-4 max-w-(--skeleton-width) flex-1",
|
|
2428
|
+
"data-sidebar": "menu-skeleton-text",
|
|
2429
|
+
style: { "--skeleton-width": width }
|
|
2430
|
+
})]
|
|
2431
|
+
});
|
|
2432
|
+
}
|
|
2433
|
+
function SidebarMenuSub({ className, ...props }) {
|
|
2434
|
+
return /* @__PURE__ */ jsx("ul", {
|
|
2435
|
+
"data-slot": "sidebar-menu-sub",
|
|
2436
|
+
"data-sidebar": "menu-sub",
|
|
2437
|
+
className: cn("border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5", "group-data-[collapsible=icon]:hidden", className),
|
|
2438
|
+
...props
|
|
2439
|
+
});
|
|
2440
|
+
}
|
|
2441
|
+
function SidebarMenuSubItem({ className, ...props }) {
|
|
2442
|
+
return /* @__PURE__ */ jsx("li", {
|
|
2443
|
+
"data-slot": "sidebar-menu-sub-item",
|
|
2444
|
+
"data-sidebar": "menu-sub-item",
|
|
2445
|
+
className: cn("group/menu-sub-item relative", className),
|
|
2446
|
+
...props
|
|
2447
|
+
});
|
|
2448
|
+
}
|
|
2449
|
+
function SidebarMenuSubButton({ asChild = false, size = "md", isActive = false, className, ...props }) {
|
|
2450
|
+
return /* @__PURE__ */ jsx(asChild ? Slot : "a", {
|
|
2451
|
+
"data-slot": "sidebar-menu-sub-button",
|
|
2452
|
+
"data-sidebar": "menu-sub-button",
|
|
2453
|
+
"data-size": size,
|
|
2454
|
+
"data-active": isActive,
|
|
2455
|
+
className: cn("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 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", "data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground", size === "sm" && "text-xs", size === "md" && "text-sm", "group-data-[collapsible=icon]:hidden", className),
|
|
2456
|
+
...props
|
|
2457
|
+
});
|
|
2458
|
+
}
|
|
2459
|
+
//#endregion
|
|
2460
|
+
//#region src/primitives/Slider/Slider.tsx
|
|
2461
|
+
function Slider({ className, defaultValue, value, min = 0, max = 100, ...props }) {
|
|
2462
|
+
const _values = React.useMemo(() => Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min, max], [
|
|
2463
|
+
value,
|
|
2464
|
+
defaultValue,
|
|
2465
|
+
min,
|
|
2466
|
+
max
|
|
2467
|
+
]);
|
|
2468
|
+
return /* @__PURE__ */ jsxs(SliderPrimitive.Root, {
|
|
2469
|
+
"data-slot": "slider",
|
|
2470
|
+
defaultValue,
|
|
2471
|
+
value,
|
|
2472
|
+
min,
|
|
2473
|
+
max,
|
|
2474
|
+
className: cn("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col", className),
|
|
2475
|
+
...props,
|
|
2476
|
+
children: [/* @__PURE__ */ jsx(SliderPrimitive.Track, {
|
|
2477
|
+
"data-slot": "slider-track",
|
|
2478
|
+
className: cn("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-4 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),
|
|
2479
|
+
children: /* @__PURE__ */ jsx(SliderPrimitive.Range, {
|
|
2480
|
+
"data-slot": "slider-range",
|
|
2481
|
+
className: cn("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")
|
|
2482
|
+
})
|
|
2483
|
+
}), Array.from({ length: _values.length }, (_, index) => /* @__PURE__ */ jsx(SliderPrimitive.Thumb, {
|
|
2484
|
+
"data-slot": "slider-thumb",
|
|
2485
|
+
className: "border-primary bg-background ring-ring/50 block size-4 shrink-0 rounded-full border shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"
|
|
2486
|
+
}, index))]
|
|
2487
|
+
});
|
|
2488
|
+
}
|
|
2489
|
+
//#endregion
|
|
2490
|
+
//#region src/primitives/SlingshotIcon/SlingshotIcon.tsx
|
|
2491
|
+
function SlingshotIcon({ isDarkMode = false }) {
|
|
2492
|
+
return /* @__PURE__ */ jsxs("svg", {
|
|
2493
|
+
width: "64",
|
|
2494
|
+
height: "64",
|
|
2495
|
+
viewBox: "0 0 64 64",
|
|
2496
|
+
fill: "none",
|
|
2497
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2498
|
+
style: { fill: "var(--color-red-500)" },
|
|
2499
|
+
children: [
|
|
2500
|
+
/* @__PURE__ */ jsx("path", { d: "M32 0C14.35 0 0 14.35 0 32s14.35 32 32 32 32-14.35 32-32S49.64 0 32 0" }),
|
|
2501
|
+
/* @__PURE__ */ jsx("path", {
|
|
2502
|
+
"fill-rule": "evenodd",
|
|
2503
|
+
"clip-rule": "evenodd",
|
|
2504
|
+
d: "M55.88 41.92a2.25 2.25 0 1 1-4.15-1.72 2.25 2.25 0 0 1 4.15 1.72",
|
|
2505
|
+
fill: "white"
|
|
2506
|
+
}),
|
|
2507
|
+
/* @__PURE__ */ jsx("path", {
|
|
2508
|
+
"fill-rule": "evenodd",
|
|
2509
|
+
"clip-rule": "evenodd",
|
|
2510
|
+
d: "M41.87 55.9a2.26 2.26 0 1 1-1.72-4.18 2.26 2.26 0 0 1 1.72 4.18",
|
|
2511
|
+
fill: "white"
|
|
2512
|
+
}),
|
|
2513
|
+
/* @__PURE__ */ jsx("path", {
|
|
2514
|
+
"fill-rule": "evenodd",
|
|
2515
|
+
"clip-rule": "evenodd",
|
|
2516
|
+
d: "M22.08 55.88a2.26 2.26 0 1 1 1.74-4.16 2.26 2.26 0 0 1-1.74 4.16",
|
|
2517
|
+
fill: "white"
|
|
2518
|
+
}),
|
|
2519
|
+
/* @__PURE__ */ jsx("path", {
|
|
2520
|
+
"fill-rule": "evenodd",
|
|
2521
|
+
"clip-rule": "evenodd",
|
|
2522
|
+
d: "M8.1 41.87",
|
|
2523
|
+
fill: "white"
|
|
2524
|
+
}),
|
|
2525
|
+
/* @__PURE__ */ jsx("path", {
|
|
2526
|
+
"fill-rule": "evenodd",
|
|
2527
|
+
"clip-rule": "evenodd",
|
|
2528
|
+
d: "M8.12 22.08a2.25 2.25 0 1 1 1.22 2.94 2.26 2.26 0 0 1-1.22-2.94",
|
|
2529
|
+
fill: "white"
|
|
2530
|
+
}),
|
|
2531
|
+
/* @__PURE__ */ jsx("path", {
|
|
2532
|
+
"fill-rule": "evenodd",
|
|
2533
|
+
"clip-rule": "evenodd",
|
|
2534
|
+
d: "M22.13 8.1a2.26 2.26 0 1 1-1.22 2.94 2.26 2.26 0 0 1 1.22-2.95",
|
|
2535
|
+
fill: "white"
|
|
2536
|
+
}),
|
|
2537
|
+
/* @__PURE__ */ jsx("path", {
|
|
2538
|
+
"fill-rule": "evenodd",
|
|
2539
|
+
"clip-rule": "evenodd",
|
|
2540
|
+
d: "M41.92 8.12",
|
|
2541
|
+
fill: "white"
|
|
2542
|
+
}),
|
|
2543
|
+
/* @__PURE__ */ jsx("path", {
|
|
2544
|
+
"fill-rule": "evenodd",
|
|
2545
|
+
"clip-rule": "evenodd",
|
|
2546
|
+
d: "M55.9 22.13a2.26 2.26 0 1 1-2.95-1.22 2.26 2.26 0 0 1 2.95 1.22",
|
|
2547
|
+
fill: "white"
|
|
2548
|
+
}),
|
|
2549
|
+
/* @__PURE__ */ jsx("path", {
|
|
2550
|
+
"fill-rule": "evenodd",
|
|
2551
|
+
"clip-rule": "evenodd",
|
|
2552
|
+
d: "M34.36 36.32c-1.75 2.42-3 6.33-.68 8.64 1.57 1.58.38 4.19-1.74 4.19s-3.3-2.61-1.73-4.19c2.32-2.32 1.07-6.22-.69-8.64-.3-.42-1.46-1.68-1.85-1.96-2.42-1.75-6.32-3-8.64-.68-1.57 1.57-4.18.39-4.18-1.73s2.61-3.31 4.18-1.74c2.32 2.32 6.23 1.07 8.64-.68.42-.3 1.68-1.47 1.96-1.86 1.76-2.41 3-6.31.69-8.64-1.58-1.57-.4-4.18 1.73-4.18s3.3 2.61 1.73 4.18c-2.31 2.32-1.07 6.23.69 8.64.3.42 1.46 1.68 1.85 1.96 2.42 1.76 6.32 3 8.64.69 1.57-1.58 4.18-.39 4.18 1.73s-2.6 3.31-4.18 1.74c-2.32-2.32-6.22-1.07-8.64.68-.42.3-1.68 1.47-1.96 1.85",
|
|
2553
|
+
fill: "white"
|
|
2554
|
+
}),
|
|
2555
|
+
/* @__PURE__ */ jsx("path", {
|
|
2556
|
+
"fill-rule": "evenodd",
|
|
2557
|
+
"clip-rule": "evenodd",
|
|
2558
|
+
d: "M44.3 19.7a3.39 3.39 0 1 1-4.78 4.8 3.39 3.39 0 0 1 4.78-4.8",
|
|
2559
|
+
fill: "white"
|
|
2560
|
+
}),
|
|
2561
|
+
/* @__PURE__ */ jsx("path", {
|
|
2562
|
+
"fill-rule": "evenodd",
|
|
2563
|
+
"clip-rule": "evenodd",
|
|
2564
|
+
d: "M44.3 44.3a3.4 3.4 0 1 1-4.79-4.79 3.4 3.4 0 0 1 4.8 4.8",
|
|
2565
|
+
fill: "white"
|
|
2566
|
+
}),
|
|
2567
|
+
/* @__PURE__ */ jsx("path", {
|
|
2568
|
+
"fill-rule": "evenodd",
|
|
2569
|
+
"clip-rule": "evenodd",
|
|
2570
|
+
d: "M19.7 44.3a3.39 3.39 0 1 1 4.78-4.79 3.39 3.39 0 0 1-4.79 4.8",
|
|
2571
|
+
fill: "white"
|
|
2572
|
+
}),
|
|
2573
|
+
/* @__PURE__ */ jsx("path", {
|
|
2574
|
+
"fill-rule": "evenodd",
|
|
2575
|
+
"clip-rule": "evenodd",
|
|
2576
|
+
d: "M19.7 19.7a3.39 3.39 0 1 1 4.79 4.78 3.39 3.39 0 0 1-4.8-4.78",
|
|
2577
|
+
fill: "white"
|
|
2578
|
+
})
|
|
2579
|
+
]
|
|
2580
|
+
});
|
|
2581
|
+
}
|
|
2582
|
+
//#endregion
|
|
2583
|
+
//#region src/primitives/Sonner/Sonner.tsx
|
|
2584
|
+
/**
|
|
2585
|
+
* Toaster wired to the design-system `--toast-*` tokens.
|
|
2586
|
+
*
|
|
2587
|
+
* Theme is accepted as a prop (default "system") instead of being read from
|
|
2588
|
+
* `next-themes`, so the DS does not couple to any particular theme provider —
|
|
2589
|
+
* consuming apps pass their resolved theme explicitly.
|
|
2590
|
+
*
|
|
2591
|
+
* Per-severity colors map Sonner's rich-color CSS variables to our tokens, so
|
|
2592
|
+
* `toast.error/success/warning/info(...)` adopt the tokenized palette and react
|
|
2593
|
+
* to light/dark + brand switching.
|
|
2594
|
+
*/
|
|
2595
|
+
const Toaster$1 = ({ theme = "system", ...props }) => {
|
|
2596
|
+
return /* @__PURE__ */ jsx(Toaster, {
|
|
2597
|
+
theme,
|
|
2598
|
+
richColors: true,
|
|
2599
|
+
className: "toaster group",
|
|
2600
|
+
style: {
|
|
2601
|
+
"--normal-bg": "var(--popover)",
|
|
2602
|
+
"--normal-text": "var(--popover-foreground)",
|
|
2603
|
+
"--normal-border": "var(--border)"
|
|
2604
|
+
},
|
|
2605
|
+
...props
|
|
2606
|
+
});
|
|
2607
|
+
};
|
|
2608
|
+
//#endregion
|
|
2609
|
+
//#region src/primitives/SustainIcon/SustainIcon.tsx
|
|
2610
|
+
function SustainIcon({ isDarkMode = false }) {
|
|
2611
|
+
return /* @__PURE__ */ jsxs("svg", {
|
|
2612
|
+
width: "65",
|
|
2613
|
+
height: "65",
|
|
2614
|
+
viewBox: "0 0 65 65",
|
|
2615
|
+
fill: "none",
|
|
2616
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2617
|
+
style: { fill: "var(--color-red-500)" },
|
|
2618
|
+
children: [/* @__PURE__ */ jsx("path", {
|
|
2619
|
+
d: "M63.3 32.5c0 17.32-14.06 32.05-31.4 32.05C14.55 64.55.5 49.82.5 32.5A31.4 31.4 0 0 1 31.9 1.13 31.4 31.4 0 0 1 63.3 32.5",
|
|
2620
|
+
fill: "white"
|
|
2621
|
+
}), /* @__PURE__ */ jsx("path", { d: "M58.8 33.3q2.7 0 5.2.53-.15 3.15-.86 6.1-2.09-.46-4.36-.48v.18a2.05 2.05 0 0 0-3.85.95 2.05 2.05 0 0 0 3.98.66q1.93 0 3.75.43a33 33 0 0 1-2.01 5.09q-.91-.15-1.87-.15a12.65 12.65 0 0 0-12.63 12.62v1.94a32 32 0 0 1-4.94 1.94q-.3-1.32-.37-2.72c.6-.36 1-1.01 1-1.77 0-1.13-.9-2.04-2.04-2.04-1.13 0-2.04.91-2.04 2.04 0 1.14.55 1.62 1.31 1.92q.12 1.54.43 3.05-2.95.71-6.1.85a25.96 25.96 0 0 1 25.4-31.12zm-53.66 0a25.96 25.96 0 0 1 25.41 31.12q-3.15-.14-6.1-.86.33-1.45.43-2.97a2.04 2.04 0 0 0 1.44-1.97c0-1.13-.91-2.04-2.05-2.04s-2.04.91-2.04 2.04c0 .7.36 1.31.89 1.7q-.09 1.42-.38 2.76a31 31 0 0 1-5.1-2.04q.12-.9.13-1.81c0-6.96-5.67-12.62-12.63-12.62H3.3a32 32 0 0 1-1.95-4.97q1.78-.39 3.63-.4a2.05 2.05 0 1 0 1.94-2.7c-1.14 0-1.41.4-1.77 1.01v-.1q-2.2.02-4.28.48-.71-2.96-.86-6.07a27 27 0 0 1 5.12-.5zm41.13 27.8c-.07.48-.1 3.35-.11.07zM5.14 48.38c5.98 0 10.87 4.86 10.87 10.86s0 .6-.05.9a32 32 0 0 1-11.7-11.71c.3 0 .58-.05.88-.05m53.67 0q.48-.01.96.05a32 32 0 0 1-11.78 11.77q-.04-.48-.05-.96c0-5.97 4.87-10.86 10.87-10.86M31.99 11.98a27.8 27.8 0 0 0 21 20.16 27.8 27.8 0 0 0-21 20.16 27.8 27.8 0 0 0-21-20.16 27.8 27.8 0 0 0 21-20.16M3.34 46.71c-.44-.06-3.5-.1-.05-.1zm28.67-23.06a8.8 8.8 0 0 1-8.77 8.77 8.8 8.8 0 0 1 8.77 8.8 8.8 8.8 0 0 1 8.78-8.8A8.8 8.8 0 0 1 32 23.65M30.68.45q.41 2.23.4 4.6A26.07 26.07 0 0 1 5.04 31.01c-4.87 0-4.52-.18-4.99-.53q.2-3.11.96-6.05 1.96.42 4.03.43c.3.73 1.04 1.23 1.9 1.23 1.13 0 2.03-.9 2.03-2.04 0-1.13-.9-2.04-2.04-2.04-1.13 0-1.43.43-1.79 1.06a17 17 0 0 1-3.63-.38 30 30 0 0 1 2.15-5.09q.75.09 1.5.1c6.96 0 12.64-5.67 12.64-12.62V3.76q2.42-1.2 5.06-2 .25 1.32.3 2.71c-.55.38-.9.99-.9 1.7 0 1.13.9 2.03 2.04 2.03a2.04 2.04 0 0 0 .63-3.98q-.06-1.49-.35-2.92c1.96-.45 4-.76 6.07-.83zm2.62 0q3.13.12 6.07.82-.29 1.47-.35 3a2 2 0 0 0-1.29 1.9c0 .85.91 2.03 2.05 2.03a2.03 2.03 0 0 0 1-3.8q.05-1.35.3-2.67 2.7.8 5.15 2.01-.08.64-.08 1.31c0 6.96 5.68 12.63 12.63 12.63h1.64a33 33 0 0 1 2.1 4.99q-1.82.37-3.71.37A2.1 2.1 0 0 0 56.99 22c-1.13 0-2.04.9-2.04 2.04a2.06 2.06 0 0 0 3.93.8q2.13 0 4.14-.45.76 2.95.96 6.07-2.51.51-5.17.53A25.96 25.96 0 0 1 33.27.44zm27.08 17.14c.41.04 3.87.08.04.08zm-44.4-12.5.03-.03c0 5.97-4.87 10.86-10.87 10.86H4.6a32.5 32.5 0 0 1 11.4-11.2zm31.99-.44a32 32 0 0 1 11.47 11.22h-.63A10.9 10.9 0 0 1 47.94 5v-.37z" })]
|
|
2622
|
+
});
|
|
2623
|
+
}
|
|
2624
|
+
//#endregion
|
|
2625
|
+
//#region src/primitives/Switch/Switch.tsx
|
|
2626
|
+
function Switch({ className, ...props }) {
|
|
2627
|
+
return /* @__PURE__ */ jsx(SwitchPrimitive.Root, {
|
|
2628
|
+
"data-slot": "switch",
|
|
2629
|
+
className: cn("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-switch-background focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50", className),
|
|
2630
|
+
...props,
|
|
2631
|
+
children: /* @__PURE__ */ jsx(SwitchPrimitive.Thumb, {
|
|
2632
|
+
"data-slot": "switch-thumb",
|
|
2633
|
+
className: cn("bg-card dark:data-[state=unchecked]:bg-card-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")
|
|
2634
|
+
})
|
|
2635
|
+
});
|
|
2636
|
+
}
|
|
2637
|
+
//#endregion
|
|
2638
|
+
//#region src/primitives/Table/Table.tsx
|
|
2639
|
+
function Table({ className, ...props }) {
|
|
2640
|
+
return /* @__PURE__ */ jsx("div", {
|
|
2641
|
+
"data-slot": "table-container",
|
|
2642
|
+
className: "relative w-full overflow-x-auto",
|
|
2643
|
+
children: /* @__PURE__ */ jsx("table", {
|
|
2644
|
+
"data-slot": "table",
|
|
2645
|
+
className: cn("w-full caption-bottom text-sm", className),
|
|
2646
|
+
...props
|
|
2647
|
+
})
|
|
2648
|
+
});
|
|
2649
|
+
}
|
|
2650
|
+
function TableHeader({ className, ...props }) {
|
|
2651
|
+
return /* @__PURE__ */ jsx("thead", {
|
|
2652
|
+
"data-slot": "table-header",
|
|
2653
|
+
className: cn("[&_tr]:border-b", className),
|
|
2654
|
+
...props
|
|
2655
|
+
});
|
|
2656
|
+
}
|
|
2657
|
+
function TableBody({ className, ...props }) {
|
|
2658
|
+
return /* @__PURE__ */ jsx("tbody", {
|
|
2659
|
+
"data-slot": "table-body",
|
|
2660
|
+
className: cn("[&_tr:last-child]:border-0", className),
|
|
2661
|
+
...props
|
|
2662
|
+
});
|
|
2663
|
+
}
|
|
2664
|
+
function TableFooter({ className, ...props }) {
|
|
2665
|
+
return /* @__PURE__ */ jsx("tfoot", {
|
|
2666
|
+
"data-slot": "table-footer",
|
|
2667
|
+
className: cn("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0", className),
|
|
2668
|
+
...props
|
|
2669
|
+
});
|
|
2670
|
+
}
|
|
2671
|
+
function TableRow({ className, ...props }) {
|
|
2672
|
+
return /* @__PURE__ */ jsx("tr", {
|
|
2673
|
+
"data-slot": "table-row",
|
|
2674
|
+
className: cn("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors", className),
|
|
2675
|
+
...props
|
|
2676
|
+
});
|
|
2677
|
+
}
|
|
2678
|
+
function TableHead({ className, ...props }) {
|
|
2679
|
+
return /* @__PURE__ */ jsx("th", {
|
|
2680
|
+
"data-slot": "table-head",
|
|
2681
|
+
className: cn("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", className),
|
|
2682
|
+
...props
|
|
2683
|
+
});
|
|
2684
|
+
}
|
|
2685
|
+
function TableCell({ className, ...props }) {
|
|
2686
|
+
return /* @__PURE__ */ jsx("td", {
|
|
2687
|
+
"data-slot": "table-cell",
|
|
2688
|
+
className: cn("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", className),
|
|
2689
|
+
...props
|
|
2690
|
+
});
|
|
2691
|
+
}
|
|
2692
|
+
function TableCaption({ className, ...props }) {
|
|
2693
|
+
return /* @__PURE__ */ jsx("caption", {
|
|
2694
|
+
"data-slot": "table-caption",
|
|
2695
|
+
className: cn("text-muted-foreground mt-4 text-sm", className),
|
|
2696
|
+
...props
|
|
2697
|
+
});
|
|
2698
|
+
}
|
|
2699
|
+
//#endregion
|
|
2700
|
+
//#region src/primitives/Tabs/Tabs.tsx
|
|
2701
|
+
function Tabs({ className, ...props }) {
|
|
2702
|
+
return /* @__PURE__ */ jsx(TabsPrimitive.Root, {
|
|
2703
|
+
"data-slot": "tabs",
|
|
2704
|
+
className: cn("flex flex-col gap-2", className),
|
|
2705
|
+
...props
|
|
2706
|
+
});
|
|
2707
|
+
}
|
|
2708
|
+
function TabsList({ className, ...props }) {
|
|
2709
|
+
return /* @__PURE__ */ jsx(TabsPrimitive.List, {
|
|
2710
|
+
"data-slot": "tabs-list",
|
|
2711
|
+
className: cn("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-xl p-[3px] flex", className),
|
|
2712
|
+
...props
|
|
2713
|
+
});
|
|
2714
|
+
}
|
|
2715
|
+
function TabsTrigger({ className, ...props }) {
|
|
2716
|
+
return /* @__PURE__ */ jsx(TabsPrimitive.Trigger, {
|
|
2717
|
+
"data-slot": "tabs-trigger",
|
|
2718
|
+
className: cn("data-[state=active]:bg-card dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-xl border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
2719
|
+
...props
|
|
2720
|
+
});
|
|
2721
|
+
}
|
|
2722
|
+
function TabsContent({ className, ...props }) {
|
|
2723
|
+
return /* @__PURE__ */ jsx(TabsPrimitive.Content, {
|
|
2724
|
+
"data-slot": "tabs-content",
|
|
2725
|
+
className: cn("flex-1 outline-none", className),
|
|
2726
|
+
...props
|
|
2727
|
+
});
|
|
2728
|
+
}
|
|
2729
|
+
//#endregion
|
|
2730
|
+
//#region src/primitives/Textarea/Textarea.tsx
|
|
2731
|
+
function Textarea({ className, ...props }) {
|
|
2732
|
+
return /* @__PURE__ */ jsx("textarea", {
|
|
2733
|
+
"data-slot": "textarea",
|
|
2734
|
+
className: cn("resize-none border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-input-background px-3 py-2 text-base transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", className),
|
|
2735
|
+
...props
|
|
2736
|
+
});
|
|
2737
|
+
}
|
|
2738
|
+
//#endregion
|
|
2739
|
+
//#region src/primitives/Toggle/Toggle.tsx
|
|
2740
|
+
const toggleVariants = cva("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap", {
|
|
2741
|
+
variants: {
|
|
2742
|
+
variant: {
|
|
2743
|
+
default: "bg-transparent",
|
|
2744
|
+
outline: "border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"
|
|
2745
|
+
},
|
|
2746
|
+
size: {
|
|
2747
|
+
default: "h-9 px-2 min-w-9",
|
|
2748
|
+
sm: "h-8 px-1.5 min-w-8",
|
|
2749
|
+
lg: "h-10 px-2.5 min-w-10"
|
|
2750
|
+
}
|
|
2751
|
+
},
|
|
2752
|
+
defaultVariants: {
|
|
2753
|
+
variant: "default",
|
|
2754
|
+
size: "default"
|
|
2755
|
+
}
|
|
2756
|
+
});
|
|
2757
|
+
function Toggle({ className, variant, size, ...props }) {
|
|
2758
|
+
return /* @__PURE__ */ jsx(TogglePrimitive.Root, {
|
|
2759
|
+
"data-slot": "toggle",
|
|
2760
|
+
className: cn(toggleVariants({
|
|
2761
|
+
variant,
|
|
2762
|
+
size,
|
|
2763
|
+
className
|
|
2764
|
+
})),
|
|
2765
|
+
...props
|
|
2766
|
+
});
|
|
2767
|
+
}
|
|
2768
|
+
//#endregion
|
|
2769
|
+
//#region src/primitives/ToggleGroup/ToggleGroup.tsx
|
|
2770
|
+
const ToggleGroupContext = React.createContext({
|
|
2771
|
+
size: "default",
|
|
2772
|
+
variant: "default"
|
|
2773
|
+
});
|
|
2774
|
+
function ToggleGroup({ className, variant, size, children, ...props }) {
|
|
2775
|
+
return /* @__PURE__ */ jsx(ToggleGroupPrimitive.Root, {
|
|
2776
|
+
"data-slot": "toggle-group",
|
|
2777
|
+
"data-variant": variant,
|
|
2778
|
+
"data-size": size,
|
|
2779
|
+
className: cn("group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs", className),
|
|
2780
|
+
...props,
|
|
2781
|
+
children: /* @__PURE__ */ jsx(ToggleGroupContext.Provider, {
|
|
2782
|
+
value: {
|
|
2783
|
+
variant,
|
|
2784
|
+
size
|
|
2785
|
+
},
|
|
2786
|
+
children
|
|
2787
|
+
})
|
|
2788
|
+
});
|
|
2789
|
+
}
|
|
2790
|
+
function ToggleGroupItem({ className, children, variant, size, ...props }) {
|
|
2791
|
+
const context = React.useContext(ToggleGroupContext);
|
|
2792
|
+
return /* @__PURE__ */ jsx(ToggleGroupPrimitive.Item, {
|
|
2793
|
+
"data-slot": "toggle-group-item",
|
|
2794
|
+
"data-variant": variant ?? context.variant,
|
|
2795
|
+
"data-size": size ?? context.size,
|
|
2796
|
+
className: cn(toggleVariants({
|
|
2797
|
+
variant: variant ?? context.variant,
|
|
2798
|
+
size: size ?? context.size
|
|
2799
|
+
}), "min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l", className),
|
|
2800
|
+
...props,
|
|
2801
|
+
children
|
|
2802
|
+
});
|
|
2803
|
+
}
|
|
2804
|
+
//#endregion
|
|
2805
|
+
export { SheetTitle as $, ContextMenuRadioItem as $n, BreadcrumbPage as $r, MenubarSub as $t, SidebarHeader as A, DropdownMenuShortcut as An, ChartLegend as Ar, PaginationNext as At, SidebarMenuSubButton as B, DrawerHeader as Bn, Card as Br, navigationMenuTriggerStyle as Bt, Sidebar as C, AlertTitle as Ci, DropdownMenuGroup as Cn, DialogTitle as Cr, PopoverContent as Ct, SidebarGroupAction as D, AccordionTrigger as Di, DropdownMenuRadioGroup as Dn, CollapsibleTrigger as Dr, PaginationEllipsis as Dt, SidebarGroup as E, AccordionItem as Ei, DropdownMenuPortal as En, CollapsibleContent as Er, PaginationContent as Et, SidebarMenuBadge as F, Drawer$1 as Fn, Carousel as Fr, NavigationMenuItem as Ft, SidebarTrigger as G, ContextMenu as Gn, CardHeader as Gr, MenubarItem as Gt, SidebarProvider as H, DrawerPortal as Hn, CardContent as Hr, MenubarCheckboxItem as Ht, SidebarMenuButton as I, DrawerClose as In, CarouselContent as Ir, NavigationMenuLink as It, SheetClose as J, ContextMenuGroup as Jn, Breadcrumb as Jr, MenubarPortal as Jt, useSidebar as K, ContextMenuCheckboxItem as Kn, CardTitle as Kr, MenubarLabel as Kt, SidebarMenuItem as L, DrawerContent as Ln, CarouselItem as Lr, NavigationMenuList as Lt, SidebarInset as M, DropdownMenuSubContent as Mn, ChartStyle as Mr, NavigationMenu as Mt, SidebarMenu as N, DropdownMenuSubTrigger as Nn, ChartTooltip as Nr, NavigationMenuContent as Nt, SidebarGroupContent as O, DropdownMenuRadioItem as On, Checkbox as Or, PaginationItem as Ot, SidebarMenuAction as P, DropdownMenuTrigger as Pn, ChartTooltipContent as Pr, NavigationMenuIndicator as Pt, SheetHeader as Q, ContextMenuRadioGroup as Qn, BreadcrumbList as Qr, MenubarShortcut as Qt, SidebarMenuSkeleton as R, DrawerDescription as Rn, CarouselNext as Rr, NavigationMenuTrigger as Rt, Slider as S, AlertDescription as Si, DropdownMenuContent as Sn, DialogPortal as Sr, PopoverAnchor as St, SidebarFooter as T, AccordionContent as Ti, DropdownMenuLabel as Tn, Collapsible as Tr, Pagination as Tt, SidebarRail as U, DrawerTitle as Un, CardDescription as Ur, MenubarContent as Ut, SidebarMenuSubItem as V, DrawerOverlay as Vn, CardAction as Vr, Menubar as Vt, SidebarSeparator as W, DrawerTrigger as Wn, CardFooter as Wr, MenubarGroup as Wt, SheetDescription as X, ContextMenuLabel as Xn, BreadcrumbItem as Xr, MenubarRadioItem as Xt, SheetContent as Y, ContextMenuItem as Yn, BreadcrumbEllipsis as Yr, MenubarRadioGroup as Yt, SheetFooter as Z, ContextMenuPortal as Zn, BreadcrumbLink as Zr, MenubarSeparator as Zt, TableRow as _, AlertDialogTitle as _i, FormMessage as _n, DialogContent as _r, RadioGroup as _t, Textarea as a, AvatarFallback as ai, InputOTPSeparator as an, ContextMenuTrigger as ar, SelectItem as at, Toaster$1 as b, buttonVariants as bi, DropdownMenu as bn, DialogHeader as br, Progress as bt, TabsList as c, AlertDialog as ci, HoverCard as cn, CommandEmpty as cr, SelectScrollUpButton as ct, TableBody as d, AlertDialogContent as di, Form as dn, CommandItem as dr, SelectValue as dt, BreadcrumbSeparator as ei, MenubarSubContent as en, ContextMenuSeparator as er, SheetTrigger as et, TableCaption as f, AlertDialogDescription as fi, FormControl as fn, CommandList as fr, ScrollArea as ft, TableHeader as g, AlertDialogPortal as gi, FormLabel as gn, DialogClose as gr, ResizablePanelGroup as gt, TableHead as h, AlertDialogOverlay as hi, FormItem as hn, Dialog as hr, ResizablePanel as ht, toggleVariants as i, Avatar as ii, InputOTPGroup as in, ContextMenuSubTrigger as ir, SelectGroup as it, SidebarInput as j, DropdownMenuSub as jn, ChartLegendContent as jr, PaginationPrevious as jt, SidebarGroupLabel as k, DropdownMenuSeparator as kn, ChartContainer as kr, PaginationLink as kt, TabsTrigger as l, AlertDialogAction as li, HoverCardContent as ln, CommandGroup as lr, SelectSeparator as lt, TableFooter as m, AlertDialogHeader as mi, FormField as mn, CommandShortcut as mr, ResizableHandle as mt, ToggleGroupItem as n, Badge as ni, MenubarTrigger as nn, ContextMenuSub as nr, Select as nt, Tabs as o, AvatarImage as oi, InputOTPSlot as on, Command$1 as or, SelectLabel as ot, TableCell as p, AlertDialogFooter as pi, FormDescription as pn, CommandSeparator as pr, ScrollBar as pt, Sheet as q, ContextMenuContent as qn, Calendar as qr, MenubarMenu as qt, Toggle as r, badgeVariants as ri, InputOTP as rn, ContextMenuSubContent as rr, SelectContent as rt, TabsContent as s, AspectRatio as si, Input as sn, CommandDialog as sr, SelectScrollDownButton as st, ToggleGroup as t, BodhiIcon as ti, MenubarSubTrigger as tn, ContextMenuShortcut as tr, Separator as tt, Table as u, AlertDialogCancel as ui, HoverCardTrigger as un, CommandInput as ur, SelectTrigger as ut, Switch as v, AlertDialogTrigger as vi, useFormField as vn, DialogDescription as vr, RadioGroupItem as vt, SidebarContent as w, Accordion as wi, DropdownMenuItem as wn, DialogTrigger as wr, PopoverTrigger as wt, SlingshotIcon as x, Alert as xi, DropdownMenuCheckboxItem as xn, DialogOverlay as xr, Popover as xt, SustainIcon as y, Button as yi, Label as yn, DialogFooter as yr, PSAILogo as yt, SidebarMenuSub as z, DrawerFooter as zn, CarouselPrevious as zr, NavigationMenuViewport as zt };
|
|
2806
|
+
|
|
2807
|
+
//# sourceMappingURL=primitives.js.map
|