@syscore/ui-library 1.1.13 → 1.2.1
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/client/components/ui/accordion.tsx +6 -9
- package/client/components/ui/alert-dialog.tsx +6 -19
- package/client/components/ui/alert.tsx +5 -6
- package/client/components/ui/avatar.tsx +3 -9
- package/client/components/ui/badge.tsx +5 -8
- package/client/components/ui/breadcrumb.tsx +7 -16
- package/client/components/ui/button.tsx +17 -45
- package/client/components/ui/calendar.tsx +24 -28
- package/client/components/ui/card.tsx +6 -9
- package/client/components/ui/carousel.tsx +14 -14
- package/client/components/ui/chart.tsx +25 -28
- package/client/components/ui/checkbox.tsx +3 -8
- package/client/components/ui/code-badge.tsx +1 -4
- package/client/components/ui/command.tsx +12 -48
- package/client/components/ui/context-menu.tsx +17 -32
- package/client/components/ui/dialog.tsx +9 -18
- package/client/components/ui/drawer.tsx +7 -13
- package/client/components/ui/dropdown-menu.tsx +17 -29
- package/client/components/ui/form.tsx +4 -4
- package/client/components/ui/hover-card.tsx +1 -4
- package/client/components/ui/input-otp.tsx +7 -10
- package/client/components/ui/input.tsx +4 -23
- package/client/components/ui/label.tsx +1 -3
- package/client/components/ui/menubar.tsx +19 -40
- package/client/components/ui/navigation-menu.tsx +10 -27
- package/client/components/ui/navigation.tsx +193 -331
- package/client/components/ui/pagination.tsx +8 -8
- package/client/components/ui/popover.tsx +1 -4
- package/client/components/ui/progress.tsx +2 -5
- package/client/components/ui/radio-group.tsx +4 -7
- package/client/components/ui/resizable.tsx +4 -10
- package/client/components/ui/scroll-area.tsx +5 -8
- package/client/components/ui/search.tsx +7 -10
- package/client/components/ui/select.tsx +11 -36
- package/client/components/ui/separator.tsx +2 -2
- package/client/components/ui/sheet.tsx +12 -23
- package/client/components/ui/sidebar.tsx +55 -82
- package/client/components/ui/skeleton.tsx +1 -1
- package/client/components/ui/slider.tsx +4 -7
- package/client/components/ui/sonner.tsx +5 -8
- package/client/components/ui/switch.tsx +2 -9
- package/client/components/ui/table.tsx +9 -18
- package/client/components/ui/tabs.tsx +19 -28
- package/client/components/ui/tag.tsx +6 -66
- package/client/components/ui/textarea.tsx +1 -4
- package/client/components/ui/toast.tsx +9 -19
- package/client/components/ui/toaster.tsx +1 -1
- package/client/components/ui/toggle-group.tsx +4 -4
- package/client/components/ui/toggle.tsx +13 -13
- package/client/components/ui/tooltip.tsx +12 -15
- package/client/global.css +5419 -1054
- package/client/storybook.css +1164 -0
- package/dist/index.cjs.js +1 -0
- package/dist/{ui/index.d.ts → index.d.ts} +0 -1
- package/dist/index.es.js +4552 -0
- package/dist/ui-library.css +1 -0
- package/package.json +9 -12
- package/client/ui/WELLDashboard/WELLDashboard.stories.tsx +0 -115
- package/client/ui/WELLDashboard/index.tsx +0 -317
- package/dist/ui/index.cjs.js +0 -1
- package/dist/ui/index.es.js +0 -5502
- package/tailwind.preset.ts +0 -151
- /package/dist/{ui/favicon.ico → favicon.ico} +0 -0
- /package/dist/{ui/fonts → fonts}/FT-Made/FTMade-Regular.otf +0 -0
- /package/dist/{ui/fonts → fonts}/FT-Made/FTMade-Regular.ttf +0 -0
- /package/dist/{ui/fonts → fonts}/FT-Made/FTMade-Regular.woff +0 -0
- /package/dist/{ui/fonts → fonts}/FT-Made/FTMade-Regular.woff2 +0 -0
- /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-black.otf +0 -0
- /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-blackitalic.otf +0 -0
- /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-bold.otf +0 -0
- /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-bolditalic.otf +0 -0
- /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-extrabold.otf +0 -0
- /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-extrabolditalic.otf +0 -0
- /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-extralight.otf +0 -0
- /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-extralightitalic.otf +0 -0
- /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-italic.otf +0 -0
- /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-light.otf +0 -0
- /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-lightitalic.otf +0 -0
- /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-medium.otf +0 -0
- /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-mediumitalic.otf +0 -0
- /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-regular.otf +0 -0
- /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-semibold.otf +0 -0
- /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-semibolditalic.otf +0 -0
- /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-thin.otf +0 -0
- /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-thinitalic.otf +0 -0
- /package/dist/{ui/placeholder.svg → placeholder.svg} +0 -0
- /package/dist/{ui/robots.txt → robots.txt} +0 -0
package/dist/index.es.js
ADDED
|
@@ -0,0 +1,4552 @@
|
|
|
1
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import React__default, { useState, useEffect, useCallback, useRef } from "react";
|
|
4
|
+
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
|
5
|
+
import { ChevronDown, GripVertical, X, PanelLeft, Check, Circle, Dot, ChevronLeft, ChevronRight, XIcon, Search, MoreHorizontal, ArrowLeft, ArrowRight } from "lucide-react";
|
|
6
|
+
import { clsx } from "clsx";
|
|
7
|
+
import { twMerge } from "tailwind-merge";
|
|
8
|
+
import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio";
|
|
9
|
+
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
10
|
+
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
|
11
|
+
import * as ResizablePrimitive from "react-resizable-panels";
|
|
12
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
13
|
+
import { cva } from "class-variance-authority";
|
|
14
|
+
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
15
|
+
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
16
|
+
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
17
|
+
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
18
|
+
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
19
|
+
import * as SwitchPrimitives from "@radix-ui/react-switch";
|
|
20
|
+
import * as SliderPrimitive from "@radix-ui/react-slider";
|
|
21
|
+
import { OTPInput, OTPInputContext } from "input-otp";
|
|
22
|
+
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
23
|
+
import { useFormContext, FormProvider, Controller } from "react-hook-form";
|
|
24
|
+
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
|
|
25
|
+
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
|
|
26
|
+
import * as AvatarPrimitive from "@radix-ui/react-avatar";
|
|
27
|
+
import * as ProgressPrimitive from "@radix-ui/react-progress";
|
|
28
|
+
import { DayPicker } from "react-day-picker";
|
|
29
|
+
import { motion, AnimatePresence } from "motion/react";
|
|
30
|
+
import { Command as Command$1 } from "cmdk";
|
|
31
|
+
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
32
|
+
import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
|
|
33
|
+
import * as MenubarPrimitive from "@radix-ui/react-menubar";
|
|
34
|
+
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
35
|
+
import { Drawer as Drawer$1 } from "vaul";
|
|
36
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
37
|
+
import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
|
|
38
|
+
import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
|
|
39
|
+
import useEmblaCarousel from "embla-carousel-react";
|
|
40
|
+
import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
|
|
41
|
+
import * as ToastPrimitives from "@radix-ui/react-toast";
|
|
42
|
+
import * as RechartsPrimitive from "recharts";
|
|
43
|
+
import { useTheme } from "next-themes";
|
|
44
|
+
import { Toaster as Toaster$2 } from "sonner";
|
|
45
|
+
function cn(...inputs) {
|
|
46
|
+
return twMerge(clsx(inputs));
|
|
47
|
+
}
|
|
48
|
+
const Accordion = AccordionPrimitive.Root;
|
|
49
|
+
const AccordionItem = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
50
|
+
AccordionPrimitive.Item,
|
|
51
|
+
{
|
|
52
|
+
ref,
|
|
53
|
+
className: cn("accordion-item", className),
|
|
54
|
+
...props
|
|
55
|
+
}
|
|
56
|
+
));
|
|
57
|
+
AccordionItem.displayName = "AccordionItem";
|
|
58
|
+
const AccordionTrigger = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(AccordionPrimitive.Header, { className: "accordion-header", children: /* @__PURE__ */ jsxs(
|
|
59
|
+
AccordionPrimitive.Trigger,
|
|
60
|
+
{
|
|
61
|
+
ref,
|
|
62
|
+
className: cn("accordion-trigger", className),
|
|
63
|
+
...props,
|
|
64
|
+
children: [
|
|
65
|
+
children,
|
|
66
|
+
/* @__PURE__ */ jsx(ChevronDown, { className: "accordion-chevron" })
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
) }));
|
|
70
|
+
AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
|
|
71
|
+
const AccordionContent = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
72
|
+
AccordionPrimitive.Content,
|
|
73
|
+
{
|
|
74
|
+
ref,
|
|
75
|
+
className: "accordion-content",
|
|
76
|
+
...props,
|
|
77
|
+
children: /* @__PURE__ */ jsx("div", { className: cn("accordion-content-inner", className), children })
|
|
78
|
+
}
|
|
79
|
+
));
|
|
80
|
+
AccordionContent.displayName = AccordionPrimitive.Content.displayName;
|
|
81
|
+
const AspectRatio = AspectRatioPrimitive.Root;
|
|
82
|
+
const Card = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
83
|
+
"div",
|
|
84
|
+
{
|
|
85
|
+
ref,
|
|
86
|
+
className: cn("card", className),
|
|
87
|
+
...props
|
|
88
|
+
}
|
|
89
|
+
));
|
|
90
|
+
Card.displayName = "Card";
|
|
91
|
+
const CardHeader = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("card-header", className), ...props }));
|
|
92
|
+
CardHeader.displayName = "CardHeader";
|
|
93
|
+
const CardTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
94
|
+
"h3",
|
|
95
|
+
{
|
|
96
|
+
ref,
|
|
97
|
+
className: cn("card-title heading-xxsmall", className),
|
|
98
|
+
...props
|
|
99
|
+
}
|
|
100
|
+
));
|
|
101
|
+
CardTitle.displayName = "CardTitle";
|
|
102
|
+
const CardDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
103
|
+
"p",
|
|
104
|
+
{
|
|
105
|
+
ref,
|
|
106
|
+
className: cn("card-description body-base", className),
|
|
107
|
+
...props
|
|
108
|
+
}
|
|
109
|
+
));
|
|
110
|
+
CardDescription.displayName = "CardDescription";
|
|
111
|
+
const CardContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
112
|
+
"div",
|
|
113
|
+
{
|
|
114
|
+
ref,
|
|
115
|
+
className: cn("card-content body-base", className),
|
|
116
|
+
...props
|
|
117
|
+
}
|
|
118
|
+
));
|
|
119
|
+
CardContent.displayName = "CardContent";
|
|
120
|
+
const CardFooter = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
121
|
+
"div",
|
|
122
|
+
{
|
|
123
|
+
ref,
|
|
124
|
+
className: cn("card-footer body-base", className),
|
|
125
|
+
...props
|
|
126
|
+
}
|
|
127
|
+
));
|
|
128
|
+
CardFooter.displayName = "CardFooter";
|
|
129
|
+
const Separator = React.forwardRef(
|
|
130
|
+
({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
131
|
+
SeparatorPrimitive.Root,
|
|
132
|
+
{
|
|
133
|
+
ref,
|
|
134
|
+
decorative,
|
|
135
|
+
orientation,
|
|
136
|
+
className: cn(
|
|
137
|
+
"separator",
|
|
138
|
+
orientation === "horizontal" ? "separator--horizontal" : "separator--vertical",
|
|
139
|
+
className
|
|
140
|
+
),
|
|
141
|
+
...props
|
|
142
|
+
}
|
|
143
|
+
)
|
|
144
|
+
);
|
|
145
|
+
Separator.displayName = SeparatorPrimitive.Root.displayName;
|
|
146
|
+
const ScrollArea = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
147
|
+
ScrollAreaPrimitive.Root,
|
|
148
|
+
{
|
|
149
|
+
ref,
|
|
150
|
+
className: cn("scroll-area", className),
|
|
151
|
+
...props,
|
|
152
|
+
children: [
|
|
153
|
+
/* @__PURE__ */ jsx(ScrollAreaPrimitive.Viewport, { className: "scroll-area-viewport", children }),
|
|
154
|
+
/* @__PURE__ */ jsx(ScrollBar, {}),
|
|
155
|
+
/* @__PURE__ */ jsx(ScrollAreaPrimitive.Corner, {})
|
|
156
|
+
]
|
|
157
|
+
}
|
|
158
|
+
));
|
|
159
|
+
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
|
|
160
|
+
const ScrollBar = React.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
161
|
+
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
162
|
+
{
|
|
163
|
+
ref,
|
|
164
|
+
orientation,
|
|
165
|
+
className: cn(
|
|
166
|
+
"scroll-bar",
|
|
167
|
+
orientation === "vertical" ? "scroll-bar--vertical" : "scroll-bar--horizontal",
|
|
168
|
+
className
|
|
169
|
+
),
|
|
170
|
+
...props,
|
|
171
|
+
children: /* @__PURE__ */ jsx(ScrollAreaPrimitive.ScrollAreaThumb, { className: "scroll-bar-thumb" })
|
|
172
|
+
}
|
|
173
|
+
));
|
|
174
|
+
ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
|
|
175
|
+
const Table = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { className: "table-wrapper", children: /* @__PURE__ */ jsx(
|
|
176
|
+
"table",
|
|
177
|
+
{
|
|
178
|
+
ref,
|
|
179
|
+
className: cn("table", className),
|
|
180
|
+
...props
|
|
181
|
+
}
|
|
182
|
+
) }));
|
|
183
|
+
Table.displayName = "Table";
|
|
184
|
+
const TableHeader = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("thead", { ref, className: cn("table-header", className), ...props }));
|
|
185
|
+
TableHeader.displayName = "TableHeader";
|
|
186
|
+
const TableBody = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
187
|
+
"tbody",
|
|
188
|
+
{
|
|
189
|
+
ref,
|
|
190
|
+
className: cn("table-body", className),
|
|
191
|
+
...props
|
|
192
|
+
}
|
|
193
|
+
));
|
|
194
|
+
TableBody.displayName = "TableBody";
|
|
195
|
+
const TableFooter = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
196
|
+
"tfoot",
|
|
197
|
+
{
|
|
198
|
+
ref,
|
|
199
|
+
className: cn("table-footer", className),
|
|
200
|
+
...props
|
|
201
|
+
}
|
|
202
|
+
));
|
|
203
|
+
TableFooter.displayName = "TableFooter";
|
|
204
|
+
const TableRow = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
205
|
+
"tr",
|
|
206
|
+
{
|
|
207
|
+
ref,
|
|
208
|
+
className: cn("table-row", className),
|
|
209
|
+
...props
|
|
210
|
+
}
|
|
211
|
+
));
|
|
212
|
+
TableRow.displayName = "TableRow";
|
|
213
|
+
const TableHead = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
214
|
+
"th",
|
|
215
|
+
{
|
|
216
|
+
ref,
|
|
217
|
+
className: cn("table-head", className),
|
|
218
|
+
...props
|
|
219
|
+
}
|
|
220
|
+
));
|
|
221
|
+
TableHead.displayName = "TableHead";
|
|
222
|
+
const TableCell = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
223
|
+
"td",
|
|
224
|
+
{
|
|
225
|
+
ref,
|
|
226
|
+
className: cn("table-cell", className),
|
|
227
|
+
...props
|
|
228
|
+
}
|
|
229
|
+
));
|
|
230
|
+
TableCell.displayName = "TableCell";
|
|
231
|
+
const TableCaption = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
232
|
+
"caption",
|
|
233
|
+
{
|
|
234
|
+
ref,
|
|
235
|
+
className: cn("table-caption", className),
|
|
236
|
+
...props
|
|
237
|
+
}
|
|
238
|
+
));
|
|
239
|
+
TableCaption.displayName = "TableCaption";
|
|
240
|
+
const ResizablePanelGroup = ({
|
|
241
|
+
className,
|
|
242
|
+
...props
|
|
243
|
+
}) => /* @__PURE__ */ jsx(
|
|
244
|
+
ResizablePrimitive.PanelGroup,
|
|
245
|
+
{
|
|
246
|
+
className: cn("resizable-panel-group", className),
|
|
247
|
+
...props
|
|
248
|
+
}
|
|
249
|
+
);
|
|
250
|
+
const ResizablePanel = ResizablePrimitive.Panel;
|
|
251
|
+
const ResizableHandle = ({
|
|
252
|
+
withHandle,
|
|
253
|
+
className,
|
|
254
|
+
...props
|
|
255
|
+
}) => /* @__PURE__ */ jsx(
|
|
256
|
+
ResizablePrimitive.PanelResizeHandle,
|
|
257
|
+
{
|
|
258
|
+
className: cn("resizable-handle", className),
|
|
259
|
+
...props,
|
|
260
|
+
children: withHandle && /* @__PURE__ */ jsx("div", { className: "resizable-handle-grip", children: /* @__PURE__ */ jsx(GripVertical, { className: "icon-2-5" }) })
|
|
261
|
+
}
|
|
262
|
+
);
|
|
263
|
+
const MOBILE_BREAKPOINT = 768;
|
|
264
|
+
function useIsMobile() {
|
|
265
|
+
const [isMobile, setIsMobile] = React.useState(
|
|
266
|
+
void 0
|
|
267
|
+
);
|
|
268
|
+
React.useEffect(() => {
|
|
269
|
+
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
270
|
+
const onChange = () => {
|
|
271
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
272
|
+
};
|
|
273
|
+
mql.addEventListener("change", onChange);
|
|
274
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
275
|
+
return () => mql.removeEventListener("change", onChange);
|
|
276
|
+
}, []);
|
|
277
|
+
return !!isMobile;
|
|
278
|
+
}
|
|
279
|
+
const buttonVariants = cva(
|
|
280
|
+
"button",
|
|
281
|
+
{
|
|
282
|
+
variants: {
|
|
283
|
+
variant: {
|
|
284
|
+
// CTA variants
|
|
285
|
+
clear: "button--clear",
|
|
286
|
+
default: "button--default",
|
|
287
|
+
"primary-gradient": "button--primary-gradient",
|
|
288
|
+
"primary-dark": "button--primary-dark",
|
|
289
|
+
"secondary-light": "button--secondary-light",
|
|
290
|
+
"tertiary-light": "button--tertiary-light",
|
|
291
|
+
// Utility variants
|
|
292
|
+
"general-primary": "button--general-primary",
|
|
293
|
+
"general-secondary": "button--general-secondary",
|
|
294
|
+
"general-tertiary": "button--general-tertiary",
|
|
295
|
+
"tooltip-primary": "button--tooltip-primary",
|
|
296
|
+
"tooltip-secondary": "button--tooltip-secondary"
|
|
297
|
+
},
|
|
298
|
+
size: {
|
|
299
|
+
xlarge: "button--xlarge",
|
|
300
|
+
large: "button--large",
|
|
301
|
+
utility: "button--utility",
|
|
302
|
+
icon: "button--icon"
|
|
303
|
+
}
|
|
304
|
+
},
|
|
305
|
+
defaultVariants: {
|
|
306
|
+
variant: "default",
|
|
307
|
+
size: "large"
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
);
|
|
311
|
+
const sizeTextClasses = {
|
|
312
|
+
xlarge: "body-large",
|
|
313
|
+
large: "body-base",
|
|
314
|
+
utility: "body-small",
|
|
315
|
+
icon: ""
|
|
316
|
+
};
|
|
317
|
+
const Button = React.forwardRef(
|
|
318
|
+
({ className, variant: variant2, size, children, style, ...props }, ref) => {
|
|
319
|
+
const textClass = sizeTextClasses[size || "large"];
|
|
320
|
+
return /* @__PURE__ */ jsx(
|
|
321
|
+
"button",
|
|
322
|
+
{
|
|
323
|
+
className: cn(
|
|
324
|
+
buttonVariants({ variant: variant2, size }),
|
|
325
|
+
className
|
|
326
|
+
),
|
|
327
|
+
style,
|
|
328
|
+
ref,
|
|
329
|
+
...props,
|
|
330
|
+
children: size === "icon" ? children : /* @__PURE__ */ jsx("span", { className: cn("button-text", textClass), children })
|
|
331
|
+
}
|
|
332
|
+
);
|
|
333
|
+
}
|
|
334
|
+
);
|
|
335
|
+
Button.displayName = "Button";
|
|
336
|
+
const Input = React.forwardRef(
|
|
337
|
+
({ className, type, startIcon, endIcon, ...props }, ref) => {
|
|
338
|
+
const isReadOnly = props.readOnly;
|
|
339
|
+
const isDisabled = props.disabled;
|
|
340
|
+
return /* @__PURE__ */ jsxs(
|
|
341
|
+
"div",
|
|
342
|
+
{
|
|
343
|
+
className: cn(
|
|
344
|
+
"input-wrapper body-base font-mazzard",
|
|
345
|
+
className
|
|
346
|
+
),
|
|
347
|
+
children: [
|
|
348
|
+
startIcon ? /* @__PURE__ */ jsx("div", { className: "input-icon-start", children: startIcon }) : null,
|
|
349
|
+
/* @__PURE__ */ jsx(
|
|
350
|
+
"input",
|
|
351
|
+
{
|
|
352
|
+
type,
|
|
353
|
+
className: "input",
|
|
354
|
+
ref,
|
|
355
|
+
disabled: isDisabled,
|
|
356
|
+
readOnly: isReadOnly,
|
|
357
|
+
...props
|
|
358
|
+
}
|
|
359
|
+
),
|
|
360
|
+
endIcon ? /* @__PURE__ */ jsx("div", { className: "input-icon-end", children: endIcon }) : null
|
|
361
|
+
]
|
|
362
|
+
}
|
|
363
|
+
);
|
|
364
|
+
}
|
|
365
|
+
);
|
|
366
|
+
Input.displayName = "Input";
|
|
367
|
+
const Sheet = SheetPrimitive.Root;
|
|
368
|
+
const SheetTrigger = SheetPrimitive.Trigger;
|
|
369
|
+
const SheetClose = SheetPrimitive.Close;
|
|
370
|
+
const SheetPortal = SheetPrimitive.Portal;
|
|
371
|
+
const SheetOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
372
|
+
SheetPrimitive.Overlay,
|
|
373
|
+
{
|
|
374
|
+
className: cn("sheet-overlay", className),
|
|
375
|
+
...props,
|
|
376
|
+
ref
|
|
377
|
+
}
|
|
378
|
+
));
|
|
379
|
+
SheetOverlay.displayName = SheetPrimitive.Overlay.displayName;
|
|
380
|
+
const sheetVariants = cva(
|
|
381
|
+
"sheet-content",
|
|
382
|
+
{
|
|
383
|
+
variants: {
|
|
384
|
+
side: {
|
|
385
|
+
top: "sheet-content--top",
|
|
386
|
+
bottom: "sheet-content--bottom",
|
|
387
|
+
left: "sheet-content--left",
|
|
388
|
+
right: "sheet-content--right"
|
|
389
|
+
}
|
|
390
|
+
},
|
|
391
|
+
defaultVariants: {
|
|
392
|
+
side: "right"
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
);
|
|
396
|
+
const SheetContent = React.forwardRef(({ side: side2 = "right", className, children, ...props }, ref) => /* @__PURE__ */ jsxs(SheetPortal, { children: [
|
|
397
|
+
/* @__PURE__ */ jsx(SheetOverlay, {}),
|
|
398
|
+
/* @__PURE__ */ jsxs(
|
|
399
|
+
SheetPrimitive.Content,
|
|
400
|
+
{
|
|
401
|
+
ref,
|
|
402
|
+
className: cn(sheetVariants({ side: side2 }), className),
|
|
403
|
+
...props,
|
|
404
|
+
children: [
|
|
405
|
+
children,
|
|
406
|
+
/* @__PURE__ */ jsxs(SheetPrimitive.Close, { className: "sheet-close", children: [
|
|
407
|
+
/* @__PURE__ */ jsx(X, { className: "icon-4" }),
|
|
408
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
409
|
+
] })
|
|
410
|
+
]
|
|
411
|
+
}
|
|
412
|
+
)
|
|
413
|
+
] }));
|
|
414
|
+
SheetContent.displayName = SheetPrimitive.Content.displayName;
|
|
415
|
+
const SheetHeader = ({
|
|
416
|
+
className,
|
|
417
|
+
...props
|
|
418
|
+
}) => /* @__PURE__ */ jsx(
|
|
419
|
+
"div",
|
|
420
|
+
{
|
|
421
|
+
className: cn("sheet-header", className),
|
|
422
|
+
...props
|
|
423
|
+
}
|
|
424
|
+
);
|
|
425
|
+
SheetHeader.displayName = "SheetHeader";
|
|
426
|
+
const SheetFooter = ({
|
|
427
|
+
className,
|
|
428
|
+
...props
|
|
429
|
+
}) => /* @__PURE__ */ jsx(
|
|
430
|
+
"div",
|
|
431
|
+
{
|
|
432
|
+
className: cn("sheet-footer", className),
|
|
433
|
+
...props
|
|
434
|
+
}
|
|
435
|
+
);
|
|
436
|
+
SheetFooter.displayName = "SheetFooter";
|
|
437
|
+
const SheetTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
438
|
+
SheetPrimitive.Title,
|
|
439
|
+
{
|
|
440
|
+
ref,
|
|
441
|
+
className: cn("sheet-title", className),
|
|
442
|
+
...props
|
|
443
|
+
}
|
|
444
|
+
));
|
|
445
|
+
SheetTitle.displayName = SheetPrimitive.Title.displayName;
|
|
446
|
+
const SheetDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
447
|
+
SheetPrimitive.Description,
|
|
448
|
+
{
|
|
449
|
+
ref,
|
|
450
|
+
className: cn("sheet-description", className),
|
|
451
|
+
...props
|
|
452
|
+
}
|
|
453
|
+
));
|
|
454
|
+
SheetDescription.displayName = SheetPrimitive.Description.displayName;
|
|
455
|
+
function Skeleton({
|
|
456
|
+
className,
|
|
457
|
+
...props
|
|
458
|
+
}) {
|
|
459
|
+
return /* @__PURE__ */ jsx(
|
|
460
|
+
"div",
|
|
461
|
+
{
|
|
462
|
+
className: cn("skeleton", className),
|
|
463
|
+
...props
|
|
464
|
+
}
|
|
465
|
+
);
|
|
466
|
+
}
|
|
467
|
+
const TooltipContext = React.createContext({
|
|
468
|
+
trigger: "hover",
|
|
469
|
+
toggle: () => {
|
|
470
|
+
},
|
|
471
|
+
close: () => {
|
|
472
|
+
},
|
|
473
|
+
triggerRef: { current: null }
|
|
474
|
+
});
|
|
475
|
+
function TooltipProvider({
|
|
476
|
+
delayDuration = 0,
|
|
477
|
+
...props
|
|
478
|
+
}) {
|
|
479
|
+
return /* @__PURE__ */ jsx(
|
|
480
|
+
TooltipPrimitive.Provider,
|
|
481
|
+
{
|
|
482
|
+
"data-slot": "tooltip-provider",
|
|
483
|
+
delayDuration,
|
|
484
|
+
...props
|
|
485
|
+
}
|
|
486
|
+
);
|
|
487
|
+
}
|
|
488
|
+
function Tooltip({
|
|
489
|
+
trigger = "hover",
|
|
490
|
+
open: controlledOpen,
|
|
491
|
+
onOpenChange,
|
|
492
|
+
children,
|
|
493
|
+
...props
|
|
494
|
+
}) {
|
|
495
|
+
const [uncontrolledOpen, setUncontrolledOpen] = React.useState(false);
|
|
496
|
+
const triggerRef = React.useRef(null);
|
|
497
|
+
const isControlled = controlledOpen !== void 0;
|
|
498
|
+
const isOpen = isControlled ? controlledOpen : uncontrolledOpen;
|
|
499
|
+
const handleOpenChange = React.useCallback(
|
|
500
|
+
(newOpen) => {
|
|
501
|
+
if (trigger === "click") return;
|
|
502
|
+
if (!isControlled) {
|
|
503
|
+
setUncontrolledOpen(newOpen);
|
|
504
|
+
}
|
|
505
|
+
onOpenChange == null ? void 0 : onOpenChange(newOpen);
|
|
506
|
+
},
|
|
507
|
+
[isControlled, onOpenChange, trigger]
|
|
508
|
+
);
|
|
509
|
+
const close = React.useCallback(() => {
|
|
510
|
+
if (!isControlled) {
|
|
511
|
+
setUncontrolledOpen(false);
|
|
512
|
+
}
|
|
513
|
+
onOpenChange == null ? void 0 : onOpenChange(false);
|
|
514
|
+
}, [isControlled, onOpenChange]);
|
|
515
|
+
const toggle = React.useCallback(() => {
|
|
516
|
+
const newOpen = !isOpen;
|
|
517
|
+
if (!isControlled) {
|
|
518
|
+
setUncontrolledOpen(newOpen);
|
|
519
|
+
}
|
|
520
|
+
onOpenChange == null ? void 0 : onOpenChange(newOpen);
|
|
521
|
+
}, [isOpen, isControlled, onOpenChange]);
|
|
522
|
+
const tooltipProps = trigger === "click" ? {
|
|
523
|
+
open: isOpen,
|
|
524
|
+
onOpenChange: handleOpenChange
|
|
525
|
+
} : {
|
|
526
|
+
open: isControlled ? controlledOpen : void 0,
|
|
527
|
+
onOpenChange
|
|
528
|
+
};
|
|
529
|
+
return /* @__PURE__ */ jsx(TooltipContext.Provider, { value: { trigger, toggle, close, triggerRef }, children: /* @__PURE__ */ jsx(TooltipProvider, { delayDuration: trigger === "click" ? 1e5 : 0, children: /* @__PURE__ */ jsx(TooltipPrimitive.Root, { "data-slot": "tooltip", ...tooltipProps, ...props, children }) }) });
|
|
530
|
+
}
|
|
531
|
+
function TooltipTrigger({
|
|
532
|
+
onClick,
|
|
533
|
+
...props
|
|
534
|
+
}) {
|
|
535
|
+
const { trigger, toggle, triggerRef } = React.useContext(TooltipContext);
|
|
536
|
+
const handleClick = React.useCallback(
|
|
537
|
+
(e) => {
|
|
538
|
+
if (trigger === "click") {
|
|
539
|
+
e.preventDefault();
|
|
540
|
+
e.stopPropagation();
|
|
541
|
+
toggle();
|
|
542
|
+
}
|
|
543
|
+
onClick == null ? void 0 : onClick(e);
|
|
544
|
+
},
|
|
545
|
+
[trigger, toggle, onClick]
|
|
546
|
+
);
|
|
547
|
+
return /* @__PURE__ */ jsx(
|
|
548
|
+
TooltipPrimitive.Trigger,
|
|
549
|
+
{
|
|
550
|
+
ref: triggerRef,
|
|
551
|
+
"data-slot": "tooltip-trigger",
|
|
552
|
+
onClick: handleClick,
|
|
553
|
+
...props
|
|
554
|
+
}
|
|
555
|
+
);
|
|
556
|
+
}
|
|
557
|
+
function TooltipContent({
|
|
558
|
+
className,
|
|
559
|
+
sideOffset = 0,
|
|
560
|
+
side: side2 = "bottom",
|
|
561
|
+
children,
|
|
562
|
+
alignOffset = 0,
|
|
563
|
+
...props
|
|
564
|
+
}) {
|
|
565
|
+
const { trigger, close, triggerRef } = React.useContext(TooltipContext);
|
|
566
|
+
const contentRef = React.useRef(null);
|
|
567
|
+
React.useEffect(() => {
|
|
568
|
+
if (trigger !== "click") return;
|
|
569
|
+
const handleClickOutside = (event) => {
|
|
570
|
+
const target = event.target;
|
|
571
|
+
const isOutsideContent = contentRef.current && !contentRef.current.contains(target);
|
|
572
|
+
const isOutsideTrigger = triggerRef.current && !triggerRef.current.contains(target);
|
|
573
|
+
if (isOutsideContent && isOutsideTrigger) {
|
|
574
|
+
close();
|
|
575
|
+
}
|
|
576
|
+
};
|
|
577
|
+
const timeoutId = setTimeout(() => {
|
|
578
|
+
document.addEventListener("click", handleClickOutside);
|
|
579
|
+
}, 0);
|
|
580
|
+
return () => {
|
|
581
|
+
clearTimeout(timeoutId);
|
|
582
|
+
document.removeEventListener("click", handleClickOutside);
|
|
583
|
+
};
|
|
584
|
+
}, [trigger, close, triggerRef]);
|
|
585
|
+
return /* @__PURE__ */ jsx(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
|
|
586
|
+
TooltipPrimitive.Content,
|
|
587
|
+
{
|
|
588
|
+
ref: contentRef,
|
|
589
|
+
"data-slot": "tooltip-content",
|
|
590
|
+
sideOffset,
|
|
591
|
+
alignOffset,
|
|
592
|
+
side: side2,
|
|
593
|
+
className: cn("tooltip-content", className),
|
|
594
|
+
...props,
|
|
595
|
+
children: [
|
|
596
|
+
/* @__PURE__ */ jsx("div", { className: "tooltip-arrow", "data-side": side2, children: /* @__PURE__ */ jsx(
|
|
597
|
+
"svg",
|
|
598
|
+
{
|
|
599
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
600
|
+
width: "10",
|
|
601
|
+
height: "5",
|
|
602
|
+
viewBox: "0 0 10 5",
|
|
603
|
+
fill: "none",
|
|
604
|
+
children: /* @__PURE__ */ jsx(
|
|
605
|
+
"path",
|
|
606
|
+
{
|
|
607
|
+
d: "M10 -1.74846e-06L-7.36867e-07 0C-3.29906e-07 2.76142 2.23858 5 5 5C7.76142 5 10 2.76142 10 -1.74846e-06Z",
|
|
608
|
+
fill: "#39C9EA"
|
|
609
|
+
}
|
|
610
|
+
)
|
|
611
|
+
}
|
|
612
|
+
) }),
|
|
613
|
+
children
|
|
614
|
+
]
|
|
615
|
+
}
|
|
616
|
+
) });
|
|
617
|
+
}
|
|
618
|
+
const SIDEBAR_COOKIE_NAME = "sidebar:state";
|
|
619
|
+
const SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
620
|
+
const SIDEBAR_WIDTH = "16rem";
|
|
621
|
+
const SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
622
|
+
const SIDEBAR_WIDTH_ICON = "3rem";
|
|
623
|
+
const SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
624
|
+
const SidebarContext = React.createContext(null);
|
|
625
|
+
function useSidebar() {
|
|
626
|
+
const context = React.useContext(SidebarContext);
|
|
627
|
+
if (!context) {
|
|
628
|
+
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
629
|
+
}
|
|
630
|
+
return context;
|
|
631
|
+
}
|
|
632
|
+
const SidebarProvider = React.forwardRef(
|
|
633
|
+
({
|
|
634
|
+
defaultOpen = true,
|
|
635
|
+
open: openProp,
|
|
636
|
+
onOpenChange: setOpenProp,
|
|
637
|
+
className,
|
|
638
|
+
style,
|
|
639
|
+
children,
|
|
640
|
+
...props
|
|
641
|
+
}, ref) => {
|
|
642
|
+
const isMobile = useIsMobile();
|
|
643
|
+
const [openMobile, setOpenMobile] = React.useState(false);
|
|
644
|
+
const [_open, _setOpen] = React.useState(defaultOpen);
|
|
645
|
+
const open = openProp ?? _open;
|
|
646
|
+
const setOpen = React.useCallback(
|
|
647
|
+
(value) => {
|
|
648
|
+
const openState = typeof value === "function" ? value(open) : value;
|
|
649
|
+
if (setOpenProp) {
|
|
650
|
+
setOpenProp(openState);
|
|
651
|
+
} else {
|
|
652
|
+
_setOpen(openState);
|
|
653
|
+
}
|
|
654
|
+
document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
|
|
655
|
+
},
|
|
656
|
+
[setOpenProp, open]
|
|
657
|
+
);
|
|
658
|
+
const toggleSidebar = React.useCallback(() => {
|
|
659
|
+
return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
|
|
660
|
+
}, [isMobile, setOpen, setOpenMobile]);
|
|
661
|
+
React.useEffect(() => {
|
|
662
|
+
const handleKeyDown = (event) => {
|
|
663
|
+
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
664
|
+
event.preventDefault();
|
|
665
|
+
toggleSidebar();
|
|
666
|
+
}
|
|
667
|
+
};
|
|
668
|
+
window.addEventListener("keydown", handleKeyDown);
|
|
669
|
+
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
670
|
+
}, [toggleSidebar]);
|
|
671
|
+
const state2 = open ? "expanded" : "collapsed";
|
|
672
|
+
const contextValue = React.useMemo(
|
|
673
|
+
() => ({
|
|
674
|
+
state: state2,
|
|
675
|
+
open,
|
|
676
|
+
setOpen,
|
|
677
|
+
isMobile,
|
|
678
|
+
openMobile,
|
|
679
|
+
setOpenMobile,
|
|
680
|
+
toggleSidebar
|
|
681
|
+
}),
|
|
682
|
+
[
|
|
683
|
+
state2,
|
|
684
|
+
open,
|
|
685
|
+
setOpen,
|
|
686
|
+
isMobile,
|
|
687
|
+
openMobile,
|
|
688
|
+
setOpenMobile,
|
|
689
|
+
toggleSidebar
|
|
690
|
+
]
|
|
691
|
+
);
|
|
692
|
+
return /* @__PURE__ */ jsx(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ jsx(
|
|
693
|
+
"div",
|
|
694
|
+
{
|
|
695
|
+
style: {
|
|
696
|
+
"--sidebar-width": SIDEBAR_WIDTH,
|
|
697
|
+
"--sidebar-width-icon": SIDEBAR_WIDTH_ICON,
|
|
698
|
+
...style
|
|
699
|
+
},
|
|
700
|
+
className: cn(
|
|
701
|
+
"sidebar-wrapper",
|
|
702
|
+
className
|
|
703
|
+
),
|
|
704
|
+
ref,
|
|
705
|
+
...props,
|
|
706
|
+
children
|
|
707
|
+
}
|
|
708
|
+
) }) });
|
|
709
|
+
}
|
|
710
|
+
);
|
|
711
|
+
SidebarProvider.displayName = "SidebarProvider";
|
|
712
|
+
const Sidebar = React.forwardRef(
|
|
713
|
+
({
|
|
714
|
+
side: side2 = "left",
|
|
715
|
+
variant: variant2 = "sidebar",
|
|
716
|
+
collapsible: collapsible2 = "offcanvas",
|
|
717
|
+
className,
|
|
718
|
+
children,
|
|
719
|
+
...props
|
|
720
|
+
}, ref) => {
|
|
721
|
+
const { isMobile, state: state2, openMobile, setOpenMobile } = useSidebar();
|
|
722
|
+
if (collapsible2 === "none") {
|
|
723
|
+
return /* @__PURE__ */ jsx(
|
|
724
|
+
"div",
|
|
725
|
+
{
|
|
726
|
+
className: cn(
|
|
727
|
+
"sidebar",
|
|
728
|
+
className
|
|
729
|
+
),
|
|
730
|
+
ref,
|
|
731
|
+
...props,
|
|
732
|
+
children
|
|
733
|
+
}
|
|
734
|
+
);
|
|
735
|
+
}
|
|
736
|
+
if (isMobile) {
|
|
737
|
+
return /* @__PURE__ */ jsx(Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ jsx(
|
|
738
|
+
SheetContent,
|
|
739
|
+
{
|
|
740
|
+
"data-sidebar": "sidebar",
|
|
741
|
+
"data-mobile": "true",
|
|
742
|
+
className: "sidebar",
|
|
743
|
+
style: {
|
|
744
|
+
"--sidebar-width": SIDEBAR_WIDTH_MOBILE
|
|
745
|
+
},
|
|
746
|
+
side: side2,
|
|
747
|
+
children: /* @__PURE__ */ jsx("div", { className: "sidebar-mobile-content", children })
|
|
748
|
+
}
|
|
749
|
+
) });
|
|
750
|
+
}
|
|
751
|
+
return /* @__PURE__ */ jsxs(
|
|
752
|
+
"div",
|
|
753
|
+
{
|
|
754
|
+
ref,
|
|
755
|
+
className: "sidebar-base peer",
|
|
756
|
+
"data-state": state2,
|
|
757
|
+
"data-collapsible": state2 === "collapsed" ? collapsible2 : "",
|
|
758
|
+
"data-variant": variant2,
|
|
759
|
+
"data-side": side2,
|
|
760
|
+
children: [
|
|
761
|
+
/* @__PURE__ */ jsx("div", { className: "sidebar-base" }),
|
|
762
|
+
/* @__PURE__ */ jsx(
|
|
763
|
+
"div",
|
|
764
|
+
{
|
|
765
|
+
className: cn(
|
|
766
|
+
"sidebar-container",
|
|
767
|
+
className
|
|
768
|
+
),
|
|
769
|
+
"data-side": side2,
|
|
770
|
+
"data-collapsible": state2 === "collapsed" ? collapsible2 : "",
|
|
771
|
+
"data-variant": variant2,
|
|
772
|
+
...props,
|
|
773
|
+
children: /* @__PURE__ */ jsx(
|
|
774
|
+
"div",
|
|
775
|
+
{
|
|
776
|
+
"data-sidebar": "sidebar",
|
|
777
|
+
className: "sidebar-inner",
|
|
778
|
+
"data-variant": variant2,
|
|
779
|
+
children
|
|
780
|
+
}
|
|
781
|
+
)
|
|
782
|
+
}
|
|
783
|
+
)
|
|
784
|
+
]
|
|
785
|
+
}
|
|
786
|
+
);
|
|
787
|
+
}
|
|
788
|
+
);
|
|
789
|
+
Sidebar.displayName = "Sidebar";
|
|
790
|
+
const SidebarTrigger = React.forwardRef(({ className, onClick, ...props }, ref) => {
|
|
791
|
+
const { toggleSidebar } = useSidebar();
|
|
792
|
+
return /* @__PURE__ */ jsxs(
|
|
793
|
+
Button,
|
|
794
|
+
{
|
|
795
|
+
ref,
|
|
796
|
+
"data-sidebar": "trigger",
|
|
797
|
+
variant: "general-tertiary",
|
|
798
|
+
size: "icon",
|
|
799
|
+
className: cn("sidebar-trigger", className),
|
|
800
|
+
onClick: (event) => {
|
|
801
|
+
onClick == null ? void 0 : onClick(event);
|
|
802
|
+
toggleSidebar();
|
|
803
|
+
},
|
|
804
|
+
...props,
|
|
805
|
+
children: [
|
|
806
|
+
/* @__PURE__ */ jsx(PanelLeft, {}),
|
|
807
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Toggle Sidebar" })
|
|
808
|
+
]
|
|
809
|
+
}
|
|
810
|
+
);
|
|
811
|
+
});
|
|
812
|
+
SidebarTrigger.displayName = "SidebarTrigger";
|
|
813
|
+
const SidebarRail = React.forwardRef(({ className, ...props }, ref) => {
|
|
814
|
+
const { toggleSidebar } = useSidebar();
|
|
815
|
+
return /* @__PURE__ */ jsx(
|
|
816
|
+
"button",
|
|
817
|
+
{
|
|
818
|
+
ref,
|
|
819
|
+
"data-sidebar": "rail",
|
|
820
|
+
"aria-label": "Toggle Sidebar",
|
|
821
|
+
tabIndex: -1,
|
|
822
|
+
onClick: toggleSidebar,
|
|
823
|
+
title: "Toggle Sidebar",
|
|
824
|
+
className: cn(
|
|
825
|
+
"sidebar-rail",
|
|
826
|
+
className
|
|
827
|
+
),
|
|
828
|
+
"data-side": side,
|
|
829
|
+
"data-state": state,
|
|
830
|
+
"data-collapsible": collapsible,
|
|
831
|
+
...props
|
|
832
|
+
}
|
|
833
|
+
);
|
|
834
|
+
});
|
|
835
|
+
SidebarRail.displayName = "SidebarRail";
|
|
836
|
+
const SidebarInset = React.forwardRef(({ className, ...props }, ref) => {
|
|
837
|
+
return /* @__PURE__ */ jsx(
|
|
838
|
+
"main",
|
|
839
|
+
{
|
|
840
|
+
ref,
|
|
841
|
+
className: cn(
|
|
842
|
+
"sidebar-inset",
|
|
843
|
+
className
|
|
844
|
+
),
|
|
845
|
+
"data-variant": variant,
|
|
846
|
+
"data-state": state,
|
|
847
|
+
...props
|
|
848
|
+
}
|
|
849
|
+
);
|
|
850
|
+
});
|
|
851
|
+
SidebarInset.displayName = "SidebarInset";
|
|
852
|
+
const SidebarInput = React.forwardRef(({ className, ...props }, ref) => {
|
|
853
|
+
return /* @__PURE__ */ jsx(
|
|
854
|
+
Input,
|
|
855
|
+
{
|
|
856
|
+
ref,
|
|
857
|
+
"data-sidebar": "input",
|
|
858
|
+
className: cn(
|
|
859
|
+
"sidebar-input",
|
|
860
|
+
className
|
|
861
|
+
),
|
|
862
|
+
...props
|
|
863
|
+
}
|
|
864
|
+
);
|
|
865
|
+
});
|
|
866
|
+
SidebarInput.displayName = "SidebarInput";
|
|
867
|
+
const SidebarHeader = React.forwardRef(({ className, ...props }, ref) => {
|
|
868
|
+
return /* @__PURE__ */ jsx(
|
|
869
|
+
"div",
|
|
870
|
+
{
|
|
871
|
+
ref,
|
|
872
|
+
"data-sidebar": "header",
|
|
873
|
+
className: cn("sidebar-header", className),
|
|
874
|
+
...props
|
|
875
|
+
}
|
|
876
|
+
);
|
|
877
|
+
});
|
|
878
|
+
SidebarHeader.displayName = "SidebarHeader";
|
|
879
|
+
const SidebarFooter = React.forwardRef(({ className, ...props }, ref) => {
|
|
880
|
+
return /* @__PURE__ */ jsx(
|
|
881
|
+
"div",
|
|
882
|
+
{
|
|
883
|
+
ref,
|
|
884
|
+
"data-sidebar": "footer",
|
|
885
|
+
className: cn("sidebar-footer", className),
|
|
886
|
+
...props
|
|
887
|
+
}
|
|
888
|
+
);
|
|
889
|
+
});
|
|
890
|
+
SidebarFooter.displayName = "SidebarFooter";
|
|
891
|
+
const SidebarSeparator = React.forwardRef(({ className, ...props }, ref) => {
|
|
892
|
+
return /* @__PURE__ */ jsx(
|
|
893
|
+
Separator,
|
|
894
|
+
{
|
|
895
|
+
ref,
|
|
896
|
+
"data-sidebar": "separator",
|
|
897
|
+
className: cn("sidebar-separator", className),
|
|
898
|
+
...props
|
|
899
|
+
}
|
|
900
|
+
);
|
|
901
|
+
});
|
|
902
|
+
SidebarSeparator.displayName = "SidebarSeparator";
|
|
903
|
+
const SidebarContent = React.forwardRef(({ className, ...props }, ref) => {
|
|
904
|
+
return /* @__PURE__ */ jsx(
|
|
905
|
+
"div",
|
|
906
|
+
{
|
|
907
|
+
ref,
|
|
908
|
+
"data-sidebar": "content",
|
|
909
|
+
className: cn(
|
|
910
|
+
"sidebar-content",
|
|
911
|
+
className
|
|
912
|
+
),
|
|
913
|
+
...props
|
|
914
|
+
}
|
|
915
|
+
);
|
|
916
|
+
});
|
|
917
|
+
SidebarContent.displayName = "SidebarContent";
|
|
918
|
+
const SidebarGroup = React.forwardRef(({ className, ...props }, ref) => {
|
|
919
|
+
return /* @__PURE__ */ jsx(
|
|
920
|
+
"div",
|
|
921
|
+
{
|
|
922
|
+
ref,
|
|
923
|
+
"data-sidebar": "group",
|
|
924
|
+
className: cn("sidebar-group", className),
|
|
925
|
+
...props
|
|
926
|
+
}
|
|
927
|
+
);
|
|
928
|
+
});
|
|
929
|
+
SidebarGroup.displayName = "SidebarGroup";
|
|
930
|
+
const SidebarGroupLabel = React.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
931
|
+
const Comp = asChild ? Slot : "div";
|
|
932
|
+
return /* @__PURE__ */ jsx(
|
|
933
|
+
Comp,
|
|
934
|
+
{
|
|
935
|
+
ref,
|
|
936
|
+
"data-sidebar": "group-label",
|
|
937
|
+
className: cn(
|
|
938
|
+
"sidebar-group-label",
|
|
939
|
+
className
|
|
940
|
+
),
|
|
941
|
+
...props
|
|
942
|
+
}
|
|
943
|
+
);
|
|
944
|
+
});
|
|
945
|
+
SidebarGroupLabel.displayName = "SidebarGroupLabel";
|
|
946
|
+
const SidebarGroupAction = React.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
947
|
+
const Comp = asChild ? Slot : "button";
|
|
948
|
+
return /* @__PURE__ */ jsx(
|
|
949
|
+
Comp,
|
|
950
|
+
{
|
|
951
|
+
ref,
|
|
952
|
+
"data-sidebar": "group-action",
|
|
953
|
+
className: cn(
|
|
954
|
+
"sidebar-group-action",
|
|
955
|
+
className
|
|
956
|
+
),
|
|
957
|
+
...props
|
|
958
|
+
}
|
|
959
|
+
);
|
|
960
|
+
});
|
|
961
|
+
SidebarGroupAction.displayName = "SidebarGroupAction";
|
|
962
|
+
const SidebarGroupContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
963
|
+
"div",
|
|
964
|
+
{
|
|
965
|
+
ref,
|
|
966
|
+
"data-sidebar": "group-content",
|
|
967
|
+
className: cn("sidebar-group-content", className),
|
|
968
|
+
...props
|
|
969
|
+
}
|
|
970
|
+
));
|
|
971
|
+
SidebarGroupContent.displayName = "SidebarGroupContent";
|
|
972
|
+
const SidebarMenu = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
973
|
+
"ul",
|
|
974
|
+
{
|
|
975
|
+
ref,
|
|
976
|
+
"data-sidebar": "menu",
|
|
977
|
+
className: cn("sidebar-menu", className),
|
|
978
|
+
...props
|
|
979
|
+
}
|
|
980
|
+
));
|
|
981
|
+
SidebarMenu.displayName = "SidebarMenu";
|
|
982
|
+
const SidebarMenuItem = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
983
|
+
"li",
|
|
984
|
+
{
|
|
985
|
+
ref,
|
|
986
|
+
"data-sidebar": "menu-item",
|
|
987
|
+
className: cn("sidebar-menu-item", className),
|
|
988
|
+
...props
|
|
989
|
+
}
|
|
990
|
+
));
|
|
991
|
+
SidebarMenuItem.displayName = "SidebarMenuItem";
|
|
992
|
+
const sidebarMenuButtonVariants = cva(
|
|
993
|
+
"sidebar-menu-button",
|
|
994
|
+
{
|
|
995
|
+
variants: {
|
|
996
|
+
variant: {
|
|
997
|
+
default: "sidebar-menu-button--default",
|
|
998
|
+
outline: "sidebar-menu-button--outline"
|
|
999
|
+
},
|
|
1000
|
+
size: {
|
|
1001
|
+
default: "sidebar-menu-button--size-default",
|
|
1002
|
+
sm: "sidebar-menu-button--size-sm",
|
|
1003
|
+
lg: "sidebar-menu-button--size-lg"
|
|
1004
|
+
}
|
|
1005
|
+
},
|
|
1006
|
+
defaultVariants: {
|
|
1007
|
+
variant: "default",
|
|
1008
|
+
size: "default"
|
|
1009
|
+
}
|
|
1010
|
+
}
|
|
1011
|
+
);
|
|
1012
|
+
const SidebarMenuButton = React.forwardRef(
|
|
1013
|
+
({
|
|
1014
|
+
asChild = false,
|
|
1015
|
+
isActive = false,
|
|
1016
|
+
variant: variant2 = "default",
|
|
1017
|
+
size = "default",
|
|
1018
|
+
tooltip,
|
|
1019
|
+
className,
|
|
1020
|
+
...props
|
|
1021
|
+
}, ref) => {
|
|
1022
|
+
const Comp = asChild ? Slot : "button";
|
|
1023
|
+
const { isMobile, state: state2 } = useSidebar();
|
|
1024
|
+
const button = /* @__PURE__ */ jsx(
|
|
1025
|
+
Comp,
|
|
1026
|
+
{
|
|
1027
|
+
ref,
|
|
1028
|
+
"data-sidebar": "menu-button",
|
|
1029
|
+
"data-size": size,
|
|
1030
|
+
"data-active": isActive,
|
|
1031
|
+
className: cn(sidebarMenuButtonVariants({ variant: variant2, size }), className),
|
|
1032
|
+
...props
|
|
1033
|
+
}
|
|
1034
|
+
);
|
|
1035
|
+
if (!tooltip) {
|
|
1036
|
+
return button;
|
|
1037
|
+
}
|
|
1038
|
+
if (typeof tooltip === "string") {
|
|
1039
|
+
tooltip = {
|
|
1040
|
+
children: tooltip
|
|
1041
|
+
};
|
|
1042
|
+
}
|
|
1043
|
+
return /* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
1044
|
+
/* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: button }),
|
|
1045
|
+
/* @__PURE__ */ jsx(
|
|
1046
|
+
TooltipContent,
|
|
1047
|
+
{
|
|
1048
|
+
side: "right",
|
|
1049
|
+
align: "center",
|
|
1050
|
+
hidden: state2 !== "collapsed" || isMobile,
|
|
1051
|
+
...tooltip
|
|
1052
|
+
}
|
|
1053
|
+
)
|
|
1054
|
+
] });
|
|
1055
|
+
}
|
|
1056
|
+
);
|
|
1057
|
+
SidebarMenuButton.displayName = "SidebarMenuButton";
|
|
1058
|
+
const SidebarMenuAction = React.forwardRef(({ className, asChild = false, showOnHover = false, ...props }, ref) => {
|
|
1059
|
+
const Comp = asChild ? Slot : "button";
|
|
1060
|
+
const { state: state2 } = useSidebar();
|
|
1061
|
+
return /* @__PURE__ */ jsx(
|
|
1062
|
+
Comp,
|
|
1063
|
+
{
|
|
1064
|
+
ref,
|
|
1065
|
+
"data-sidebar": "menu-action",
|
|
1066
|
+
className: cn(
|
|
1067
|
+
"sidebar-menu-action",
|
|
1068
|
+
showOnHover && "sidebar-menu-action--show-on-hover",
|
|
1069
|
+
className
|
|
1070
|
+
),
|
|
1071
|
+
"data-show-on-hover": showOnHover,
|
|
1072
|
+
...props
|
|
1073
|
+
}
|
|
1074
|
+
);
|
|
1075
|
+
});
|
|
1076
|
+
SidebarMenuAction.displayName = "SidebarMenuAction";
|
|
1077
|
+
const SidebarMenuBadge = React.forwardRef(({ className, size, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1078
|
+
"div",
|
|
1079
|
+
{
|
|
1080
|
+
ref,
|
|
1081
|
+
"data-sidebar": "menu-badge",
|
|
1082
|
+
className: cn(
|
|
1083
|
+
"sidebar-menu-badge",
|
|
1084
|
+
className
|
|
1085
|
+
),
|
|
1086
|
+
"data-size": size,
|
|
1087
|
+
...props
|
|
1088
|
+
}
|
|
1089
|
+
));
|
|
1090
|
+
SidebarMenuBadge.displayName = "SidebarMenuBadge";
|
|
1091
|
+
const SidebarMenuSkeleton = React.forwardRef(({ className, showIcon = false, ...props }, ref) => {
|
|
1092
|
+
const width = React.useMemo(() => {
|
|
1093
|
+
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
1094
|
+
}, []);
|
|
1095
|
+
return /* @__PURE__ */ jsxs(
|
|
1096
|
+
"div",
|
|
1097
|
+
{
|
|
1098
|
+
ref,
|
|
1099
|
+
"data-sidebar": "menu-skeleton",
|
|
1100
|
+
className: cn("sidebar-menu-skeleton", className),
|
|
1101
|
+
...props,
|
|
1102
|
+
children: [
|
|
1103
|
+
showIcon && /* @__PURE__ */ jsx(
|
|
1104
|
+
Skeleton,
|
|
1105
|
+
{
|
|
1106
|
+
className: "sidebar-menu-skeleton-icon",
|
|
1107
|
+
"data-sidebar": "menu-skeleton-icon"
|
|
1108
|
+
}
|
|
1109
|
+
),
|
|
1110
|
+
/* @__PURE__ */ jsx(
|
|
1111
|
+
Skeleton,
|
|
1112
|
+
{
|
|
1113
|
+
className: "sidebar-menu-skeleton-text",
|
|
1114
|
+
"data-sidebar": "menu-skeleton-text",
|
|
1115
|
+
style: {
|
|
1116
|
+
"--skeleton-width": width
|
|
1117
|
+
}
|
|
1118
|
+
}
|
|
1119
|
+
)
|
|
1120
|
+
]
|
|
1121
|
+
}
|
|
1122
|
+
);
|
|
1123
|
+
});
|
|
1124
|
+
SidebarMenuSkeleton.displayName = "SidebarMenuSkeleton";
|
|
1125
|
+
const SidebarMenuSub = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1126
|
+
"ul",
|
|
1127
|
+
{
|
|
1128
|
+
ref,
|
|
1129
|
+
"data-sidebar": "menu-sub",
|
|
1130
|
+
className: cn(
|
|
1131
|
+
"sidebar-menu-sub",
|
|
1132
|
+
className
|
|
1133
|
+
),
|
|
1134
|
+
...props
|
|
1135
|
+
}
|
|
1136
|
+
));
|
|
1137
|
+
SidebarMenuSub.displayName = "SidebarMenuSub";
|
|
1138
|
+
const SidebarMenuSubItem = React.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx("li", { ref, ...props }));
|
|
1139
|
+
SidebarMenuSubItem.displayName = "SidebarMenuSubItem";
|
|
1140
|
+
const SidebarMenuSubButton = React.forwardRef(({ asChild = false, size = "md", isActive, className, ...props }, ref) => {
|
|
1141
|
+
const Comp = asChild ? Slot : "a";
|
|
1142
|
+
return /* @__PURE__ */ jsx(
|
|
1143
|
+
Comp,
|
|
1144
|
+
{
|
|
1145
|
+
ref,
|
|
1146
|
+
"data-sidebar": "menu-sub-button",
|
|
1147
|
+
"data-size": size,
|
|
1148
|
+
"data-active": isActive,
|
|
1149
|
+
className: cn(
|
|
1150
|
+
"sidebar-menu-sub-button",
|
|
1151
|
+
size === "sm" && "sidebar-menu-sub-button--size-sm",
|
|
1152
|
+
size === "md" && "sidebar-menu-sub-button--size-md",
|
|
1153
|
+
className
|
|
1154
|
+
),
|
|
1155
|
+
"data-size": size,
|
|
1156
|
+
...props
|
|
1157
|
+
}
|
|
1158
|
+
);
|
|
1159
|
+
});
|
|
1160
|
+
SidebarMenuSubButton.displayName = "SidebarMenuSubButton";
|
|
1161
|
+
const labelVariants = cva("label");
|
|
1162
|
+
const Label = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1163
|
+
LabelPrimitive.Root,
|
|
1164
|
+
{
|
|
1165
|
+
ref,
|
|
1166
|
+
className: cn(labelVariants(), className),
|
|
1167
|
+
...props,
|
|
1168
|
+
children: /* @__PURE__ */ jsx("span", { className: "overline-medium", children })
|
|
1169
|
+
}
|
|
1170
|
+
));
|
|
1171
|
+
Label.displayName = LabelPrimitive.Root.displayName;
|
|
1172
|
+
const Textarea = React.forwardRef(
|
|
1173
|
+
({ className, ...props }, ref) => {
|
|
1174
|
+
return /* @__PURE__ */ jsx(
|
|
1175
|
+
"textarea",
|
|
1176
|
+
{
|
|
1177
|
+
className: cn("textarea body-base", className),
|
|
1178
|
+
ref,
|
|
1179
|
+
...props
|
|
1180
|
+
}
|
|
1181
|
+
);
|
|
1182
|
+
}
|
|
1183
|
+
);
|
|
1184
|
+
Textarea.displayName = "Textarea";
|
|
1185
|
+
const Checkbox = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1186
|
+
CheckboxPrimitive.Root,
|
|
1187
|
+
{
|
|
1188
|
+
ref,
|
|
1189
|
+
className: cn("checkbox", className),
|
|
1190
|
+
...props,
|
|
1191
|
+
children: /* @__PURE__ */ jsx(CheckboxPrimitive.Indicator, { className: "checkbox-indicator", children: /* @__PURE__ */ jsx(Check, { className: "icon-4" }) })
|
|
1192
|
+
}
|
|
1193
|
+
));
|
|
1194
|
+
Checkbox.displayName = CheckboxPrimitive.Root.displayName;
|
|
1195
|
+
const RadioGroup = React.forwardRef(({ className, ...props }, ref) => {
|
|
1196
|
+
return /* @__PURE__ */ jsx(
|
|
1197
|
+
RadioGroupPrimitive.Root,
|
|
1198
|
+
{
|
|
1199
|
+
className: cn("radio-group", className),
|
|
1200
|
+
...props,
|
|
1201
|
+
ref
|
|
1202
|
+
}
|
|
1203
|
+
);
|
|
1204
|
+
});
|
|
1205
|
+
RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;
|
|
1206
|
+
const RadioGroupItem = React.forwardRef(({ className, ...props }, ref) => {
|
|
1207
|
+
return /* @__PURE__ */ jsx(
|
|
1208
|
+
RadioGroupPrimitive.Item,
|
|
1209
|
+
{
|
|
1210
|
+
ref,
|
|
1211
|
+
className: cn("radio-group-item", className),
|
|
1212
|
+
...props,
|
|
1213
|
+
children: /* @__PURE__ */ jsx(RadioGroupPrimitive.Indicator, { className: "radio-group-indicator", children: /* @__PURE__ */ jsx(Circle, { className: "icon-2-5 fill-current text-current" }) })
|
|
1214
|
+
}
|
|
1215
|
+
);
|
|
1216
|
+
});
|
|
1217
|
+
RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
|
|
1218
|
+
const Switch = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1219
|
+
SwitchPrimitives.Root,
|
|
1220
|
+
{
|
|
1221
|
+
className: cn("switch", className),
|
|
1222
|
+
...props,
|
|
1223
|
+
ref,
|
|
1224
|
+
children: /* @__PURE__ */ jsx(SwitchPrimitives.Thumb, { className: "switch-thumb" })
|
|
1225
|
+
}
|
|
1226
|
+
));
|
|
1227
|
+
Switch.displayName = SwitchPrimitives.Root.displayName;
|
|
1228
|
+
const Slider = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
1229
|
+
SliderPrimitive.Root,
|
|
1230
|
+
{
|
|
1231
|
+
ref,
|
|
1232
|
+
className: cn("slider", className),
|
|
1233
|
+
...props,
|
|
1234
|
+
children: [
|
|
1235
|
+
/* @__PURE__ */ jsx(SliderPrimitive.Track, { className: "slider-track", children: /* @__PURE__ */ jsx(SliderPrimitive.Range, { className: "slider-range" }) }),
|
|
1236
|
+
/* @__PURE__ */ jsx(SliderPrimitive.Thumb, { className: "slider-thumb" })
|
|
1237
|
+
]
|
|
1238
|
+
}
|
|
1239
|
+
));
|
|
1240
|
+
Slider.displayName = SliderPrimitive.Root.displayName;
|
|
1241
|
+
const InputOTP = React.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1242
|
+
OTPInput,
|
|
1243
|
+
{
|
|
1244
|
+
ref,
|
|
1245
|
+
containerClassName: cn("input-otp-container", containerClassName),
|
|
1246
|
+
className: cn("input-otp", className),
|
|
1247
|
+
...props
|
|
1248
|
+
}
|
|
1249
|
+
));
|
|
1250
|
+
InputOTP.displayName = "InputOTP";
|
|
1251
|
+
const InputOTPGroup = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("input-otp-group", className), ...props }));
|
|
1252
|
+
InputOTPGroup.displayName = "InputOTPGroup";
|
|
1253
|
+
const InputOTPSlot = React.forwardRef(({ index, className, ...props }, ref) => {
|
|
1254
|
+
const inputOTPContext = React.useContext(OTPInputContext);
|
|
1255
|
+
const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];
|
|
1256
|
+
return /* @__PURE__ */ jsxs(
|
|
1257
|
+
"div",
|
|
1258
|
+
{
|
|
1259
|
+
ref,
|
|
1260
|
+
className: cn(
|
|
1261
|
+
"input-otp-slot",
|
|
1262
|
+
isActive && "input-otp-slot--active",
|
|
1263
|
+
className
|
|
1264
|
+
),
|
|
1265
|
+
...props,
|
|
1266
|
+
children: [
|
|
1267
|
+
char,
|
|
1268
|
+
hasFakeCaret && /* @__PURE__ */ jsx("div", { className: "input-otp-caret", children: /* @__PURE__ */ jsx("div", { className: "input-otp-caret-line" }) })
|
|
1269
|
+
]
|
|
1270
|
+
}
|
|
1271
|
+
);
|
|
1272
|
+
});
|
|
1273
|
+
InputOTPSlot.displayName = "InputOTPSlot";
|
|
1274
|
+
const InputOTPSeparator = React.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, role: "separator", ...props, children: /* @__PURE__ */ jsx(Dot, {}) }));
|
|
1275
|
+
InputOTPSeparator.displayName = "InputOTPSeparator";
|
|
1276
|
+
const UtilityChevronDown = ({
|
|
1277
|
+
className
|
|
1278
|
+
}) => {
|
|
1279
|
+
return /* @__PURE__ */ jsx(
|
|
1280
|
+
"div",
|
|
1281
|
+
{
|
|
1282
|
+
className: cn(
|
|
1283
|
+
"size-4 flex items-center justify-center text-gray-500",
|
|
1284
|
+
className
|
|
1285
|
+
),
|
|
1286
|
+
children: /* @__PURE__ */ jsx(
|
|
1287
|
+
"svg",
|
|
1288
|
+
{
|
|
1289
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1290
|
+
width: "12",
|
|
1291
|
+
height: "6",
|
|
1292
|
+
viewBox: "0 0 12 6",
|
|
1293
|
+
fill: "none",
|
|
1294
|
+
className: cn("text-inherit"),
|
|
1295
|
+
children: /* @__PURE__ */ jsx(
|
|
1296
|
+
"path",
|
|
1297
|
+
{
|
|
1298
|
+
d: "M11 0.75L6 5.25L1 0.75",
|
|
1299
|
+
stroke: "currentColor",
|
|
1300
|
+
strokeWidth: "1.5",
|
|
1301
|
+
strokeLinecap: "round",
|
|
1302
|
+
strokeLinejoin: "round"
|
|
1303
|
+
}
|
|
1304
|
+
)
|
|
1305
|
+
}
|
|
1306
|
+
)
|
|
1307
|
+
}
|
|
1308
|
+
);
|
|
1309
|
+
};
|
|
1310
|
+
const Select = SelectPrimitive.Root;
|
|
1311
|
+
const SelectGroup = SelectPrimitive.Group;
|
|
1312
|
+
const SelectValue = SelectPrimitive.Value;
|
|
1313
|
+
const SelectTrigger = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1314
|
+
SelectPrimitive.Trigger,
|
|
1315
|
+
{
|
|
1316
|
+
ref,
|
|
1317
|
+
className: cn("select-trigger", className),
|
|
1318
|
+
...props,
|
|
1319
|
+
children: /* @__PURE__ */ jsxs("div", { className: "select-trigger-inner", children: [
|
|
1320
|
+
/* @__PURE__ */ jsx("span", { className: "select-trigger-text font-mazzard body-base", children }),
|
|
1321
|
+
/* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx(UtilityChevronDown, { className: "select-icon" }) })
|
|
1322
|
+
] })
|
|
1323
|
+
}
|
|
1324
|
+
));
|
|
1325
|
+
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
1326
|
+
const SelectScrollUpButton = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1327
|
+
SelectPrimitive.ScrollUpButton,
|
|
1328
|
+
{
|
|
1329
|
+
ref,
|
|
1330
|
+
className: cn("select-scroll-button", className),
|
|
1331
|
+
...props,
|
|
1332
|
+
children: /* @__PURE__ */ jsx(UtilityChevronDown, {})
|
|
1333
|
+
}
|
|
1334
|
+
));
|
|
1335
|
+
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
1336
|
+
const SelectScrollDownButton = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1337
|
+
SelectPrimitive.ScrollDownButton,
|
|
1338
|
+
{
|
|
1339
|
+
ref,
|
|
1340
|
+
className: cn("select-scroll-button", className),
|
|
1341
|
+
...props,
|
|
1342
|
+
children: /* @__PURE__ */ jsx(UtilityChevronDown, {})
|
|
1343
|
+
}
|
|
1344
|
+
));
|
|
1345
|
+
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
1346
|
+
const SelectContent = React.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
|
|
1347
|
+
SelectPrimitive.Content,
|
|
1348
|
+
{
|
|
1349
|
+
ref,
|
|
1350
|
+
className: cn("select-content", className),
|
|
1351
|
+
position,
|
|
1352
|
+
...props,
|
|
1353
|
+
children: [
|
|
1354
|
+
/* @__PURE__ */ jsx(SelectScrollUpButton, {}),
|
|
1355
|
+
/* @__PURE__ */ jsx(SelectPrimitive.Viewport, { className: "select-viewport", children }),
|
|
1356
|
+
/* @__PURE__ */ jsx(SelectScrollDownButton, {})
|
|
1357
|
+
]
|
|
1358
|
+
}
|
|
1359
|
+
) }));
|
|
1360
|
+
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
1361
|
+
const SelectLabel = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1362
|
+
SelectPrimitive.Label,
|
|
1363
|
+
{
|
|
1364
|
+
ref,
|
|
1365
|
+
className: cn("select-label font-mazzard", className),
|
|
1366
|
+
...props
|
|
1367
|
+
}
|
|
1368
|
+
));
|
|
1369
|
+
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
1370
|
+
const SelectItem = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1371
|
+
SelectPrimitive.Item,
|
|
1372
|
+
{
|
|
1373
|
+
ref,
|
|
1374
|
+
className: cn("select-item", className),
|
|
1375
|
+
...props,
|
|
1376
|
+
children: /* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children })
|
|
1377
|
+
}
|
|
1378
|
+
));
|
|
1379
|
+
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
1380
|
+
const SelectSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1381
|
+
SelectPrimitive.Separator,
|
|
1382
|
+
{
|
|
1383
|
+
ref,
|
|
1384
|
+
className: cn("select-separator", className),
|
|
1385
|
+
...props
|
|
1386
|
+
}
|
|
1387
|
+
));
|
|
1388
|
+
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
1389
|
+
const Form = FormProvider;
|
|
1390
|
+
const FormFieldContext = React.createContext(
|
|
1391
|
+
{}
|
|
1392
|
+
);
|
|
1393
|
+
const FormField = ({
|
|
1394
|
+
...props
|
|
1395
|
+
}) => {
|
|
1396
|
+
return /* @__PURE__ */ jsx(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsx(Controller, { ...props }) });
|
|
1397
|
+
};
|
|
1398
|
+
const useFormField = () => {
|
|
1399
|
+
const fieldContext = React.useContext(FormFieldContext);
|
|
1400
|
+
const itemContext = React.useContext(FormItemContext);
|
|
1401
|
+
const { getFieldState, formState } = useFormContext();
|
|
1402
|
+
const fieldState = getFieldState(fieldContext.name, formState);
|
|
1403
|
+
if (!fieldContext) {
|
|
1404
|
+
throw new Error("useFormField should be used within <FormField>");
|
|
1405
|
+
}
|
|
1406
|
+
const { id } = itemContext;
|
|
1407
|
+
return {
|
|
1408
|
+
id,
|
|
1409
|
+
name: fieldContext.name,
|
|
1410
|
+
formItemId: `${id}-form-item`,
|
|
1411
|
+
formDescriptionId: `${id}-form-item-description`,
|
|
1412
|
+
formMessageId: `${id}-form-item-message`,
|
|
1413
|
+
...fieldState
|
|
1414
|
+
};
|
|
1415
|
+
};
|
|
1416
|
+
const FormItemContext = React.createContext(
|
|
1417
|
+
{}
|
|
1418
|
+
);
|
|
1419
|
+
const FormItem = React.forwardRef(({ className, ...props }, ref) => {
|
|
1420
|
+
const id = React.useId();
|
|
1421
|
+
return /* @__PURE__ */ jsx(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ jsx("div", { ref, className: cn("form-item", className), ...props }) });
|
|
1422
|
+
});
|
|
1423
|
+
FormItem.displayName = "FormItem";
|
|
1424
|
+
const FormLabel = React.forwardRef(({ className, ...props }, ref) => {
|
|
1425
|
+
const { error, formItemId } = useFormField();
|
|
1426
|
+
return /* @__PURE__ */ jsx(
|
|
1427
|
+
Label,
|
|
1428
|
+
{
|
|
1429
|
+
ref,
|
|
1430
|
+
className: cn(error && "form-label--error", className),
|
|
1431
|
+
htmlFor: formItemId,
|
|
1432
|
+
...props
|
|
1433
|
+
}
|
|
1434
|
+
);
|
|
1435
|
+
});
|
|
1436
|
+
FormLabel.displayName = "FormLabel";
|
|
1437
|
+
const FormControl = React.forwardRef(({ ...props }, ref) => {
|
|
1438
|
+
const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
|
|
1439
|
+
return /* @__PURE__ */ jsx(
|
|
1440
|
+
Slot,
|
|
1441
|
+
{
|
|
1442
|
+
ref,
|
|
1443
|
+
id: formItemId,
|
|
1444
|
+
"aria-describedby": !error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`,
|
|
1445
|
+
"aria-invalid": !!error,
|
|
1446
|
+
...props
|
|
1447
|
+
}
|
|
1448
|
+
);
|
|
1449
|
+
});
|
|
1450
|
+
FormControl.displayName = "FormControl";
|
|
1451
|
+
const FormDescription = React.forwardRef(({ className, ...props }, ref) => {
|
|
1452
|
+
const { formDescriptionId } = useFormField();
|
|
1453
|
+
return /* @__PURE__ */ jsx(
|
|
1454
|
+
"p",
|
|
1455
|
+
{
|
|
1456
|
+
ref,
|
|
1457
|
+
id: formDescriptionId,
|
|
1458
|
+
className: cn("form-description", className),
|
|
1459
|
+
...props
|
|
1460
|
+
}
|
|
1461
|
+
);
|
|
1462
|
+
});
|
|
1463
|
+
FormDescription.displayName = "FormDescription";
|
|
1464
|
+
const FormMessage = React.forwardRef(({ className, children, ...props }, ref) => {
|
|
1465
|
+
const { error, formMessageId } = useFormField();
|
|
1466
|
+
const body = error ? String(error == null ? void 0 : error.message) : children;
|
|
1467
|
+
if (!body) {
|
|
1468
|
+
return null;
|
|
1469
|
+
}
|
|
1470
|
+
return /* @__PURE__ */ jsx(
|
|
1471
|
+
"p",
|
|
1472
|
+
{
|
|
1473
|
+
ref,
|
|
1474
|
+
id: formMessageId,
|
|
1475
|
+
className: cn("form-message", className),
|
|
1476
|
+
...props,
|
|
1477
|
+
children: body
|
|
1478
|
+
}
|
|
1479
|
+
);
|
|
1480
|
+
});
|
|
1481
|
+
FormMessage.displayName = "FormMessage";
|
|
1482
|
+
const toggleVariants = cva(
|
|
1483
|
+
"toggle-group-item",
|
|
1484
|
+
{
|
|
1485
|
+
variants: {
|
|
1486
|
+
variant: {
|
|
1487
|
+
default: "toggle-group-item--default"
|
|
1488
|
+
},
|
|
1489
|
+
size: {
|
|
1490
|
+
default: "toggle-group-item--size-default"
|
|
1491
|
+
}
|
|
1492
|
+
},
|
|
1493
|
+
defaultVariants: {
|
|
1494
|
+
variant: "default",
|
|
1495
|
+
size: "default"
|
|
1496
|
+
}
|
|
1497
|
+
}
|
|
1498
|
+
);
|
|
1499
|
+
const ToggleGroupContext = React.createContext({
|
|
1500
|
+
size: "default",
|
|
1501
|
+
variant: "default"
|
|
1502
|
+
});
|
|
1503
|
+
const ToggleGroup = React.forwardRef(({ className, variant: variant2, size, children, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1504
|
+
ToggleGroupPrimitive.Root,
|
|
1505
|
+
{
|
|
1506
|
+
ref,
|
|
1507
|
+
className: cn("toggle-group", className),
|
|
1508
|
+
...props,
|
|
1509
|
+
children: /* @__PURE__ */ jsx(ToggleGroupContext.Provider, { value: { variant: variant2, size }, children })
|
|
1510
|
+
}
|
|
1511
|
+
));
|
|
1512
|
+
ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
|
|
1513
|
+
const ToggleGroupItem = React.forwardRef(({ className, children, variant: variant2, size, ...props }, ref) => {
|
|
1514
|
+
const context = React.useContext(ToggleGroupContext);
|
|
1515
|
+
return /* @__PURE__ */ jsx(
|
|
1516
|
+
ToggleGroupPrimitive.Item,
|
|
1517
|
+
{
|
|
1518
|
+
ref,
|
|
1519
|
+
className: cn(
|
|
1520
|
+
toggleVariants({
|
|
1521
|
+
variant: context.variant || variant2,
|
|
1522
|
+
size: context.size || size
|
|
1523
|
+
}),
|
|
1524
|
+
className
|
|
1525
|
+
),
|
|
1526
|
+
...props,
|
|
1527
|
+
children
|
|
1528
|
+
}
|
|
1529
|
+
);
|
|
1530
|
+
});
|
|
1531
|
+
ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
|
|
1532
|
+
function useSegmentedControl({
|
|
1533
|
+
value,
|
|
1534
|
+
defaultValue,
|
|
1535
|
+
onValueChange
|
|
1536
|
+
}) {
|
|
1537
|
+
const [internalValue, setInternalValue] = useState(
|
|
1538
|
+
value ?? defaultValue
|
|
1539
|
+
);
|
|
1540
|
+
useEffect(() => {
|
|
1541
|
+
if (value !== void 0) {
|
|
1542
|
+
setInternalValue(value);
|
|
1543
|
+
}
|
|
1544
|
+
}, [value]);
|
|
1545
|
+
const handleValueChange = useCallback(
|
|
1546
|
+
(newValue) => {
|
|
1547
|
+
if (value === void 0) {
|
|
1548
|
+
setInternalValue(newValue);
|
|
1549
|
+
}
|
|
1550
|
+
onValueChange == null ? void 0 : onValueChange(newValue);
|
|
1551
|
+
},
|
|
1552
|
+
[value, onValueChange]
|
|
1553
|
+
);
|
|
1554
|
+
const currentValue = value ?? internalValue;
|
|
1555
|
+
return {
|
|
1556
|
+
value: currentValue,
|
|
1557
|
+
onValueChange: handleValueChange
|
|
1558
|
+
};
|
|
1559
|
+
}
|
|
1560
|
+
cva(
|
|
1561
|
+
"toggle",
|
|
1562
|
+
{
|
|
1563
|
+
variants: {
|
|
1564
|
+
variant: {
|
|
1565
|
+
default: "toggle--default",
|
|
1566
|
+
outline: "toggle--outline"
|
|
1567
|
+
},
|
|
1568
|
+
size: {
|
|
1569
|
+
default: "toggle--size-default",
|
|
1570
|
+
sm: "toggle--size-sm",
|
|
1571
|
+
lg: "toggle--size-lg"
|
|
1572
|
+
}
|
|
1573
|
+
},
|
|
1574
|
+
defaultVariants: {
|
|
1575
|
+
variant: "default",
|
|
1576
|
+
size: "default"
|
|
1577
|
+
}
|
|
1578
|
+
}
|
|
1579
|
+
);
|
|
1580
|
+
const SegmentedControlInner = React.forwardRef(
|
|
1581
|
+
({ className, options, value, defaultValue, onValueChange, ...props }, ref) => {
|
|
1582
|
+
var _a;
|
|
1583
|
+
const { value: selectedValue, onValueChange: handleValueChange } = useSegmentedControl({
|
|
1584
|
+
value,
|
|
1585
|
+
defaultValue: defaultValue ?? ((_a = options[0]) == null ? void 0 : _a.value),
|
|
1586
|
+
onValueChange
|
|
1587
|
+
});
|
|
1588
|
+
return /* @__PURE__ */ jsx("div", { ref, className: cn("segmented-control", className), ...props, children: options.map((option) => {
|
|
1589
|
+
const isReactElement = React.isValidElement(option.label);
|
|
1590
|
+
const isActive = selectedValue === option.value;
|
|
1591
|
+
return /* @__PURE__ */ jsx(
|
|
1592
|
+
"button",
|
|
1593
|
+
{
|
|
1594
|
+
className: cn(
|
|
1595
|
+
"segmented-control-button",
|
|
1596
|
+
isActive ? "segmented-control-button--active" : "segmented-control-button--inactive"
|
|
1597
|
+
),
|
|
1598
|
+
onClick: () => handleValueChange(option.value),
|
|
1599
|
+
type: "button",
|
|
1600
|
+
"data-active": isActive,
|
|
1601
|
+
children: isReactElement ? option.label : /* @__PURE__ */ jsx("span", { className: "body-small font-medium", children: option.label })
|
|
1602
|
+
},
|
|
1603
|
+
option.value
|
|
1604
|
+
);
|
|
1605
|
+
}) });
|
|
1606
|
+
}
|
|
1607
|
+
);
|
|
1608
|
+
SegmentedControlInner.displayName = "SegmentedControl";
|
|
1609
|
+
const SegmentedControl = SegmentedControlInner;
|
|
1610
|
+
const Toggle = SegmentedControl;
|
|
1611
|
+
const badgeVariants = cva(
|
|
1612
|
+
"badge",
|
|
1613
|
+
{
|
|
1614
|
+
variants: {
|
|
1615
|
+
variant: {
|
|
1616
|
+
default: "badge--default",
|
|
1617
|
+
secondary: "badge--secondary",
|
|
1618
|
+
destructive: "badge--destructive",
|
|
1619
|
+
outline: "badge--outline"
|
|
1620
|
+
}
|
|
1621
|
+
},
|
|
1622
|
+
defaultVariants: {
|
|
1623
|
+
variant: "default"
|
|
1624
|
+
}
|
|
1625
|
+
}
|
|
1626
|
+
);
|
|
1627
|
+
function Badge({ className, variant: variant2, ...props }) {
|
|
1628
|
+
return /* @__PURE__ */ jsx("div", { className: cn(badgeVariants({ variant: variant2 }), className), ...props });
|
|
1629
|
+
}
|
|
1630
|
+
const alertVariants = cva(
|
|
1631
|
+
"alert",
|
|
1632
|
+
{
|
|
1633
|
+
variants: {
|
|
1634
|
+
variant: {
|
|
1635
|
+
default: "alert--default",
|
|
1636
|
+
destructive: "alert--destructive"
|
|
1637
|
+
}
|
|
1638
|
+
},
|
|
1639
|
+
defaultVariants: {
|
|
1640
|
+
variant: "default"
|
|
1641
|
+
}
|
|
1642
|
+
}
|
|
1643
|
+
);
|
|
1644
|
+
const Alert = React.forwardRef(({ className, variant: variant2, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1645
|
+
"div",
|
|
1646
|
+
{
|
|
1647
|
+
ref,
|
|
1648
|
+
role: "alert",
|
|
1649
|
+
className: cn(alertVariants({ variant: variant2 }), className),
|
|
1650
|
+
...props
|
|
1651
|
+
}
|
|
1652
|
+
));
|
|
1653
|
+
Alert.displayName = "Alert";
|
|
1654
|
+
const AlertTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1655
|
+
"h5",
|
|
1656
|
+
{
|
|
1657
|
+
ref,
|
|
1658
|
+
className: cn("alert-title", className),
|
|
1659
|
+
...props
|
|
1660
|
+
}
|
|
1661
|
+
));
|
|
1662
|
+
AlertTitle.displayName = "AlertTitle";
|
|
1663
|
+
const AlertDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1664
|
+
"div",
|
|
1665
|
+
{
|
|
1666
|
+
ref,
|
|
1667
|
+
className: cn("alert-description", className),
|
|
1668
|
+
...props
|
|
1669
|
+
}
|
|
1670
|
+
));
|
|
1671
|
+
AlertDescription.displayName = "AlertDescription";
|
|
1672
|
+
const AlertDialog = AlertDialogPrimitive.Root;
|
|
1673
|
+
const AlertDialogTrigger = AlertDialogPrimitive.Trigger;
|
|
1674
|
+
const AlertDialogPortal = AlertDialogPrimitive.Portal;
|
|
1675
|
+
const AlertDialogOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1676
|
+
AlertDialogPrimitive.Overlay,
|
|
1677
|
+
{
|
|
1678
|
+
className: cn("alert-dialog-overlay", className),
|
|
1679
|
+
...props,
|
|
1680
|
+
ref
|
|
1681
|
+
}
|
|
1682
|
+
));
|
|
1683
|
+
AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
|
|
1684
|
+
const AlertDialogContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [
|
|
1685
|
+
/* @__PURE__ */ jsx(AlertDialogOverlay, {}),
|
|
1686
|
+
/* @__PURE__ */ jsx(
|
|
1687
|
+
AlertDialogPrimitive.Content,
|
|
1688
|
+
{
|
|
1689
|
+
ref,
|
|
1690
|
+
className: cn("alert-dialog-content", className),
|
|
1691
|
+
...props
|
|
1692
|
+
}
|
|
1693
|
+
)
|
|
1694
|
+
] }));
|
|
1695
|
+
AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;
|
|
1696
|
+
const AlertDialogHeader = ({
|
|
1697
|
+
className,
|
|
1698
|
+
...props
|
|
1699
|
+
}) => /* @__PURE__ */ jsx(
|
|
1700
|
+
"div",
|
|
1701
|
+
{
|
|
1702
|
+
className: cn("alert-dialog-header", className),
|
|
1703
|
+
...props
|
|
1704
|
+
}
|
|
1705
|
+
);
|
|
1706
|
+
AlertDialogHeader.displayName = "AlertDialogHeader";
|
|
1707
|
+
const AlertDialogFooter = ({
|
|
1708
|
+
className,
|
|
1709
|
+
...props
|
|
1710
|
+
}) => /* @__PURE__ */ jsx(
|
|
1711
|
+
"div",
|
|
1712
|
+
{
|
|
1713
|
+
className: cn("alert-dialog-footer", className),
|
|
1714
|
+
...props
|
|
1715
|
+
}
|
|
1716
|
+
);
|
|
1717
|
+
AlertDialogFooter.displayName = "AlertDialogFooter";
|
|
1718
|
+
const AlertDialogTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1719
|
+
AlertDialogPrimitive.Title,
|
|
1720
|
+
{
|
|
1721
|
+
ref,
|
|
1722
|
+
className: cn("alert-dialog-title", className),
|
|
1723
|
+
...props
|
|
1724
|
+
}
|
|
1725
|
+
));
|
|
1726
|
+
AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
|
|
1727
|
+
const AlertDialogDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1728
|
+
AlertDialogPrimitive.Description,
|
|
1729
|
+
{
|
|
1730
|
+
ref,
|
|
1731
|
+
className: cn("alert-dialog-description", className),
|
|
1732
|
+
...props
|
|
1733
|
+
}
|
|
1734
|
+
));
|
|
1735
|
+
AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
|
|
1736
|
+
const AlertDialogAction = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1737
|
+
AlertDialogPrimitive.Action,
|
|
1738
|
+
{
|
|
1739
|
+
ref,
|
|
1740
|
+
className: cn(buttonVariants(), className),
|
|
1741
|
+
...props
|
|
1742
|
+
}
|
|
1743
|
+
));
|
|
1744
|
+
AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
|
|
1745
|
+
const AlertDialogCancel = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1746
|
+
AlertDialogPrimitive.Cancel,
|
|
1747
|
+
{
|
|
1748
|
+
ref,
|
|
1749
|
+
className: cn(
|
|
1750
|
+
buttonVariants({ variant: "general-secondary" }),
|
|
1751
|
+
className
|
|
1752
|
+
),
|
|
1753
|
+
...props
|
|
1754
|
+
}
|
|
1755
|
+
));
|
|
1756
|
+
AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
|
|
1757
|
+
const Avatar = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1758
|
+
AvatarPrimitive.Root,
|
|
1759
|
+
{
|
|
1760
|
+
ref,
|
|
1761
|
+
className: cn("avatar", className),
|
|
1762
|
+
...props
|
|
1763
|
+
}
|
|
1764
|
+
));
|
|
1765
|
+
Avatar.displayName = AvatarPrimitive.Root.displayName;
|
|
1766
|
+
const AvatarImage = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1767
|
+
AvatarPrimitive.Image,
|
|
1768
|
+
{
|
|
1769
|
+
ref,
|
|
1770
|
+
className: cn("avatar-image", className),
|
|
1771
|
+
...props
|
|
1772
|
+
}
|
|
1773
|
+
));
|
|
1774
|
+
AvatarImage.displayName = AvatarPrimitive.Image.displayName;
|
|
1775
|
+
const AvatarFallback = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1776
|
+
AvatarPrimitive.Fallback,
|
|
1777
|
+
{
|
|
1778
|
+
ref,
|
|
1779
|
+
className: cn("avatar-fallback", className),
|
|
1780
|
+
...props
|
|
1781
|
+
}
|
|
1782
|
+
));
|
|
1783
|
+
AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
|
|
1784
|
+
const Breadcrumb = React.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx("nav", { ref, "aria-label": "breadcrumb", ...props }));
|
|
1785
|
+
Breadcrumb.displayName = "Breadcrumb";
|
|
1786
|
+
const BreadcrumbList = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1787
|
+
"ol",
|
|
1788
|
+
{
|
|
1789
|
+
ref,
|
|
1790
|
+
className: cn("breadcrumb-list", className),
|
|
1791
|
+
...props
|
|
1792
|
+
}
|
|
1793
|
+
));
|
|
1794
|
+
BreadcrumbList.displayName = "BreadcrumbList";
|
|
1795
|
+
const BreadcrumbItem = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1796
|
+
"li",
|
|
1797
|
+
{
|
|
1798
|
+
ref,
|
|
1799
|
+
className: cn("breadcrumb-item", className),
|
|
1800
|
+
...props
|
|
1801
|
+
}
|
|
1802
|
+
));
|
|
1803
|
+
BreadcrumbItem.displayName = "BreadcrumbItem";
|
|
1804
|
+
const BreadcrumbLink = React.forwardRef(({ asChild, className, ...props }, ref) => {
|
|
1805
|
+
const Comp = asChild ? Slot : "a";
|
|
1806
|
+
return /* @__PURE__ */ jsx(
|
|
1807
|
+
Comp,
|
|
1808
|
+
{
|
|
1809
|
+
ref,
|
|
1810
|
+
className: cn("breadcrumb-link", className),
|
|
1811
|
+
...props
|
|
1812
|
+
}
|
|
1813
|
+
);
|
|
1814
|
+
});
|
|
1815
|
+
BreadcrumbLink.displayName = "BreadcrumbLink";
|
|
1816
|
+
const BreadcrumbPage = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1817
|
+
"span",
|
|
1818
|
+
{
|
|
1819
|
+
ref,
|
|
1820
|
+
role: "link",
|
|
1821
|
+
"aria-disabled": "true",
|
|
1822
|
+
"aria-current": "page",
|
|
1823
|
+
className: cn("breadcrumb-page body-small font-medium", className),
|
|
1824
|
+
...props
|
|
1825
|
+
}
|
|
1826
|
+
));
|
|
1827
|
+
BreadcrumbPage.displayName = "BreadcrumbPage";
|
|
1828
|
+
const BreadcrumbSeparator = ({
|
|
1829
|
+
children,
|
|
1830
|
+
className,
|
|
1831
|
+
...props
|
|
1832
|
+
}) => /* @__PURE__ */ jsx(
|
|
1833
|
+
"li",
|
|
1834
|
+
{
|
|
1835
|
+
role: "presentation",
|
|
1836
|
+
"aria-hidden": "true",
|
|
1837
|
+
className: cn("breadcrumb-separator", className),
|
|
1838
|
+
...props,
|
|
1839
|
+
children: children ?? /* @__PURE__ */ jsx(
|
|
1840
|
+
"svg",
|
|
1841
|
+
{
|
|
1842
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1843
|
+
width: "5",
|
|
1844
|
+
height: "8",
|
|
1845
|
+
viewBox: "0 0 5 8",
|
|
1846
|
+
fill: "none",
|
|
1847
|
+
children: /* @__PURE__ */ jsx(
|
|
1848
|
+
"path",
|
|
1849
|
+
{
|
|
1850
|
+
d: "M0.75 6.75L3.75 3.75L0.75 0.75",
|
|
1851
|
+
stroke: "#CBCDD2",
|
|
1852
|
+
strokeWidth: "1.5",
|
|
1853
|
+
strokeLinecap: "round",
|
|
1854
|
+
strokeLinejoin: "round"
|
|
1855
|
+
}
|
|
1856
|
+
)
|
|
1857
|
+
}
|
|
1858
|
+
)
|
|
1859
|
+
}
|
|
1860
|
+
);
|
|
1861
|
+
BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
|
|
1862
|
+
const Progress = React.forwardRef(({ className, value, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1863
|
+
ProgressPrimitive.Root,
|
|
1864
|
+
{
|
|
1865
|
+
ref,
|
|
1866
|
+
className: cn("progress", className),
|
|
1867
|
+
...props,
|
|
1868
|
+
children: /* @__PURE__ */ jsx(
|
|
1869
|
+
ProgressPrimitive.Indicator,
|
|
1870
|
+
{
|
|
1871
|
+
className: "progress-indicator",
|
|
1872
|
+
style: { transform: `translateX(-${100 - (value || 0)}%)` }
|
|
1873
|
+
}
|
|
1874
|
+
)
|
|
1875
|
+
}
|
|
1876
|
+
));
|
|
1877
|
+
Progress.displayName = ProgressPrimitive.Root.displayName;
|
|
1878
|
+
function Calendar({
|
|
1879
|
+
className,
|
|
1880
|
+
classNames,
|
|
1881
|
+
showOutsideDays = true,
|
|
1882
|
+
...props
|
|
1883
|
+
}) {
|
|
1884
|
+
return /* @__PURE__ */ jsx(
|
|
1885
|
+
DayPicker,
|
|
1886
|
+
{
|
|
1887
|
+
showOutsideDays,
|
|
1888
|
+
className: cn("calendar", className),
|
|
1889
|
+
classNames: {
|
|
1890
|
+
months: "calendar-months",
|
|
1891
|
+
month: "calendar-month",
|
|
1892
|
+
caption: "calendar-caption",
|
|
1893
|
+
caption_label: "calendar-caption-label",
|
|
1894
|
+
nav: "calendar-nav",
|
|
1895
|
+
nav_button: cn(
|
|
1896
|
+
buttonVariants({ variant: "general-secondary" }),
|
|
1897
|
+
"calendar-nav-button"
|
|
1898
|
+
),
|
|
1899
|
+
nav_button_previous: "calendar-nav-button-previous",
|
|
1900
|
+
nav_button_next: "calendar-nav-button-next",
|
|
1901
|
+
table: "calendar-table",
|
|
1902
|
+
head_row: "calendar-head-row",
|
|
1903
|
+
head_cell: "calendar-head-cell",
|
|
1904
|
+
row: "calendar-row",
|
|
1905
|
+
cell: "calendar-cell",
|
|
1906
|
+
day: cn(
|
|
1907
|
+
buttonVariants({ variant: "general-tertiary" }),
|
|
1908
|
+
"calendar-day"
|
|
1909
|
+
),
|
|
1910
|
+
day_range_end: "calendar-day-range-end",
|
|
1911
|
+
day_selected: "calendar-day-selected",
|
|
1912
|
+
day_today: "calendar-day-today",
|
|
1913
|
+
day_outside: "calendar-day-outside",
|
|
1914
|
+
day_disabled: "calendar-day-disabled",
|
|
1915
|
+
day_range_middle: "calendar-day-range-middle",
|
|
1916
|
+
day_hidden: "calendar-day-hidden",
|
|
1917
|
+
...classNames
|
|
1918
|
+
},
|
|
1919
|
+
components: {
|
|
1920
|
+
Chevron: (props2) => {
|
|
1921
|
+
if (props2.orientation === "left") {
|
|
1922
|
+
return /* @__PURE__ */ jsx(ChevronLeft, { className: "icon-4" });
|
|
1923
|
+
}
|
|
1924
|
+
return /* @__PURE__ */ jsx(ChevronRight, { className: "icon-4" });
|
|
1925
|
+
}
|
|
1926
|
+
},
|
|
1927
|
+
...props
|
|
1928
|
+
}
|
|
1929
|
+
);
|
|
1930
|
+
}
|
|
1931
|
+
Calendar.displayName = "Calendar";
|
|
1932
|
+
const UtilityClose = ({ className }) => {
|
|
1933
|
+
return /* @__PURE__ */ jsx(
|
|
1934
|
+
"div",
|
|
1935
|
+
{
|
|
1936
|
+
className: cn(
|
|
1937
|
+
"size-4 flex items-center justify-center text-gray-500",
|
|
1938
|
+
className
|
|
1939
|
+
),
|
|
1940
|
+
children: /* @__PURE__ */ jsxs(
|
|
1941
|
+
"svg",
|
|
1942
|
+
{
|
|
1943
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1944
|
+
width: "12",
|
|
1945
|
+
height: "12",
|
|
1946
|
+
viewBox: "0 0 12 12",
|
|
1947
|
+
fill: "none",
|
|
1948
|
+
className: cn("size-3 text-inherit"),
|
|
1949
|
+
children: [
|
|
1950
|
+
/* @__PURE__ */ jsx(
|
|
1951
|
+
"path",
|
|
1952
|
+
{
|
|
1953
|
+
d: "M10.8002 1.19995L1.2002 10.8",
|
|
1954
|
+
stroke: "currentColor",
|
|
1955
|
+
strokeWidth: "1.5",
|
|
1956
|
+
strokeLinecap: "round",
|
|
1957
|
+
strokeLinejoin: "round"
|
|
1958
|
+
}
|
|
1959
|
+
),
|
|
1960
|
+
/* @__PURE__ */ jsx(
|
|
1961
|
+
"path",
|
|
1962
|
+
{
|
|
1963
|
+
d: "M1.2002 1.19995L10.8002 10.8",
|
|
1964
|
+
stroke: "currentColor",
|
|
1965
|
+
strokeWidth: "1.5",
|
|
1966
|
+
strokeLinecap: "round",
|
|
1967
|
+
strokeLinejoin: "round"
|
|
1968
|
+
}
|
|
1969
|
+
)
|
|
1970
|
+
]
|
|
1971
|
+
}
|
|
1972
|
+
)
|
|
1973
|
+
}
|
|
1974
|
+
);
|
|
1975
|
+
};
|
|
1976
|
+
const NavLogo = ({ dark = false }) => {
|
|
1977
|
+
return /* @__PURE__ */ jsxs(
|
|
1978
|
+
"svg",
|
|
1979
|
+
{
|
|
1980
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1981
|
+
width: "64",
|
|
1982
|
+
height: "16",
|
|
1983
|
+
viewBox: "0 0 64 16",
|
|
1984
|
+
fill: "none",
|
|
1985
|
+
className: cn(dark ? "text-gray-700" : "text-white"),
|
|
1986
|
+
children: [
|
|
1987
|
+
/* @__PURE__ */ jsx(
|
|
1988
|
+
"path",
|
|
1989
|
+
{
|
|
1990
|
+
d: "M53.5868 0H55.0485C55.6026 0 56.0325 0.404706 56.0325 0.969412V12.8941H63.016C63.5701 12.8941 64 13.2988 64 13.8447V15.0306C64 15.5765 63.5701 16 63.016 16H53.5868C53.0327 16 52.6028 15.5765 52.6028 15.0306V0.969412C52.6028 0.404706 53.0423 0 53.5868 0Z",
|
|
1991
|
+
fill: "currentColor"
|
|
1992
|
+
}
|
|
1993
|
+
),
|
|
1994
|
+
/* @__PURE__ */ jsx(
|
|
1995
|
+
"path",
|
|
1996
|
+
{
|
|
1997
|
+
d: "M39.9826 0H41.4442C41.9983 0 42.4282 0.404706 42.4282 0.969412V12.8941H49.4118C49.9659 12.8941 50.3958 13.2988 50.3958 13.8447V15.0306C50.3958 15.5765 49.9659 16 49.4118 16H39.9826C39.4285 16 38.9986 15.5765 38.9986 15.0306V0.969412C38.9986 0.404706 39.4285 0 39.9826 0Z",
|
|
1998
|
+
fill: "currentColor"
|
|
1999
|
+
}
|
|
2000
|
+
),
|
|
2001
|
+
/* @__PURE__ */ jsx(
|
|
2002
|
+
"path",
|
|
2003
|
+
{
|
|
2004
|
+
d: "M25.4615 0H35.5212C36.0944 0 36.5052 0.404706 36.5052 0.969412V2.15529C36.5052 2.70118 36.0944 3.12471 35.5212 3.12471H27.9072V6.37176H34.222C34.7761 6.37176 35.206 6.77647 35.206 7.32235V8.50824C35.206 9.07294 34.7761 9.47765 34.222 9.47765H27.9072V12.8941H35.6359C36.2091 12.8941 36.6199 13.2988 36.6199 13.8447V15.0306C36.6199 15.5765 36.2091 16 35.6359 16H25.4615C24.9074 16 24.4775 15.5765 24.4775 15.0306V0.969412C24.4775 0.404706 24.9074 0 25.4615 0Z",
|
|
2005
|
+
fill: "currentColor"
|
|
2006
|
+
}
|
|
2007
|
+
),
|
|
2008
|
+
/* @__PURE__ */ jsx(
|
|
2009
|
+
"path",
|
|
2010
|
+
{
|
|
2011
|
+
d: "M2.26579 0C2.81989 0 3.37399 0.376471 3.53639 0.922353L6.56483 10.4941L9.51684 0.856471C9.66014 0.357647 10.1665 0 10.6728 0H11.6855C12.2109 0 12.7172 0.357647 12.8605 0.856471L15.8412 10.5035L18.8314 0.922353C18.9747 0.376471 19.5288 0 20.102 0H21.6401C22.1942 0 22.4808 0.404706 22.2898 0.922353L17.4653 15.1435C17.2933 15.6141 16.7965 16 16.2616 16H15.2489C14.7426 16 14.2362 15.6424 14.0929 15.1435L11.1887 5.92L8.25578 15.1435C8.11248 15.6424 7.60615 16 7.08071 16H6.08716C5.58083 16 5.0745 15.6235 4.91209 15.1435L0.0589489 0.922353C-0.13212 0.404706 0.154483 0 0.727688 0H2.26579Z",
|
|
2012
|
+
fill: "currentColor"
|
|
2013
|
+
}
|
|
2014
|
+
)
|
|
2015
|
+
]
|
|
2016
|
+
}
|
|
2017
|
+
);
|
|
2018
|
+
};
|
|
2019
|
+
const NavAccount = ({ className = "" }) => {
|
|
2020
|
+
return /* @__PURE__ */ jsxs(
|
|
2021
|
+
"svg",
|
|
2022
|
+
{
|
|
2023
|
+
width: "32",
|
|
2024
|
+
height: "32",
|
|
2025
|
+
viewBox: "0 0 32 32",
|
|
2026
|
+
fill: "none",
|
|
2027
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2028
|
+
className: cn(
|
|
2029
|
+
"transition-colors duration-300 text-bronze-500",
|
|
2030
|
+
className
|
|
2031
|
+
),
|
|
2032
|
+
children: [
|
|
2033
|
+
/* @__PURE__ */ jsx(
|
|
2034
|
+
"path",
|
|
2035
|
+
{
|
|
2036
|
+
d: "M16.0001 14.5C18.2093 14.5 20.0001 12.7091 20.0001 10.5C20.0001 8.29086 18.2093 6.5 16.0001 6.5C13.791 6.5 12.0001 8.29086 12.0001 10.5C12.0001 12.7091 13.791 14.5 16.0001 14.5Z",
|
|
2037
|
+
fill: "currentColor"
|
|
2038
|
+
}
|
|
2039
|
+
),
|
|
2040
|
+
/* @__PURE__ */ jsx(
|
|
2041
|
+
"path",
|
|
2042
|
+
{
|
|
2043
|
+
d: "M6.90759 23.3314C8.48801 19.8899 11.9649 17.5 16 17.5C20.0351 17.5 23.5121 19.89 25.0924 23.3316C22.8919 25.8841 19.6347 27.5 16.0001 27.5C12.3654 27.5 9.10818 25.8841 6.90759 23.3314Z",
|
|
2044
|
+
fill: "currentColor"
|
|
2045
|
+
}
|
|
2046
|
+
)
|
|
2047
|
+
]
|
|
2048
|
+
}
|
|
2049
|
+
);
|
|
2050
|
+
};
|
|
2051
|
+
const NavBullet = ({ color }) => {
|
|
2052
|
+
return /* @__PURE__ */ jsx(
|
|
2053
|
+
"svg",
|
|
2054
|
+
{
|
|
2055
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2056
|
+
width: "8",
|
|
2057
|
+
height: "9",
|
|
2058
|
+
viewBox: "0 0 8 9",
|
|
2059
|
+
fill: "none",
|
|
2060
|
+
children: /* @__PURE__ */ jsx("circle", { cx: "4", cy: "4.5", r: "3.5", fill: color, stroke: "#F3E7D8" })
|
|
2061
|
+
}
|
|
2062
|
+
);
|
|
2063
|
+
};
|
|
2064
|
+
const Navigation = ({
|
|
2065
|
+
navItems,
|
|
2066
|
+
isStrategy = false,
|
|
2067
|
+
Link: LinkComponent,
|
|
2068
|
+
onLinkClick,
|
|
2069
|
+
onClose
|
|
2070
|
+
}) => {
|
|
2071
|
+
const [isOpen, setIsOpen] = React.useState(false);
|
|
2072
|
+
const [activeItem, setActiveItem] = React.useState(null);
|
|
2073
|
+
const containerRef = React.useRef(null);
|
|
2074
|
+
const menuRef = React.useRef(null);
|
|
2075
|
+
const menuItemsRef = React.useRef(null);
|
|
2076
|
+
const overlayRef = React.useRef(null);
|
|
2077
|
+
const handleMouseLeave = () => {
|
|
2078
|
+
setIsOpen(false);
|
|
2079
|
+
setActiveItem(null);
|
|
2080
|
+
};
|
|
2081
|
+
const handleNavItemMouseEnter = (index) => {
|
|
2082
|
+
setIsOpen(true);
|
|
2083
|
+
setActiveItem(index + 1);
|
|
2084
|
+
};
|
|
2085
|
+
const NavLink = ({ href, className, "aria-label": ariaLabel, children }) => {
|
|
2086
|
+
if (LinkComponent) {
|
|
2087
|
+
return /* @__PURE__ */ jsx(LinkComponent, { href, className, "aria-label": ariaLabel, children });
|
|
2088
|
+
}
|
|
2089
|
+
if (onLinkClick) {
|
|
2090
|
+
return /* @__PURE__ */ jsx(
|
|
2091
|
+
"a",
|
|
2092
|
+
{
|
|
2093
|
+
href,
|
|
2094
|
+
className,
|
|
2095
|
+
"aria-label": ariaLabel,
|
|
2096
|
+
onClick: (e) => {
|
|
2097
|
+
e.preventDefault();
|
|
2098
|
+
onLinkClick(href);
|
|
2099
|
+
},
|
|
2100
|
+
children
|
|
2101
|
+
}
|
|
2102
|
+
);
|
|
2103
|
+
}
|
|
2104
|
+
return /* @__PURE__ */ jsx("a", { href, className, "aria-label": ariaLabel, children });
|
|
2105
|
+
};
|
|
2106
|
+
return /* @__PURE__ */ jsxs(
|
|
2107
|
+
"nav",
|
|
2108
|
+
{
|
|
2109
|
+
ref: containerRef,
|
|
2110
|
+
className: cn("navigation", isStrategy && "navigation--strategy"),
|
|
2111
|
+
"data-strategy": isStrategy,
|
|
2112
|
+
onMouseLeave: handleMouseLeave,
|
|
2113
|
+
children: [
|
|
2114
|
+
!isStrategy && /* @__PURE__ */ jsx(
|
|
2115
|
+
"div",
|
|
2116
|
+
{
|
|
2117
|
+
ref: overlayRef,
|
|
2118
|
+
className: "navigation-overlay",
|
|
2119
|
+
"data-open": isOpen
|
|
2120
|
+
}
|
|
2121
|
+
),
|
|
2122
|
+
/* @__PURE__ */ jsxs("div", { className: "navigation-container", children: [
|
|
2123
|
+
/* @__PURE__ */ jsxs("div", { className: "navigation-logo-container", children: [
|
|
2124
|
+
isStrategy ? /* @__PURE__ */ jsx(
|
|
2125
|
+
Button,
|
|
2126
|
+
{
|
|
2127
|
+
className: "navigation-close-button",
|
|
2128
|
+
size: "icon",
|
|
2129
|
+
onClick: (e) => {
|
|
2130
|
+
e.preventDefault();
|
|
2131
|
+
if (onClose) {
|
|
2132
|
+
onClose();
|
|
2133
|
+
} else if (onLinkClick) {
|
|
2134
|
+
onLinkClick("/");
|
|
2135
|
+
}
|
|
2136
|
+
},
|
|
2137
|
+
children: /* @__PURE__ */ jsx(UtilityClose, { className: "navigation-close-icon" })
|
|
2138
|
+
}
|
|
2139
|
+
) : null,
|
|
2140
|
+
/* @__PURE__ */ jsx(
|
|
2141
|
+
NavLink,
|
|
2142
|
+
{
|
|
2143
|
+
href: "/",
|
|
2144
|
+
className: cn(
|
|
2145
|
+
"navigation-logo-link",
|
|
2146
|
+
isStrategy && "navigation-logo-link--strategy"
|
|
2147
|
+
),
|
|
2148
|
+
"data-strategy": isStrategy,
|
|
2149
|
+
"aria-label": "Home",
|
|
2150
|
+
children: /* @__PURE__ */ jsx(NavLogo, { dark: isStrategy })
|
|
2151
|
+
}
|
|
2152
|
+
)
|
|
2153
|
+
] }),
|
|
2154
|
+
!isStrategy ? /* @__PURE__ */ jsx("div", { className: "navigation-nav-container", children: /* @__PURE__ */ jsx("ul", { className: "navigation-nav-list", children: navItems ? navItems.map((item, index) => /* @__PURE__ */ jsxs(
|
|
2155
|
+
"li",
|
|
2156
|
+
{
|
|
2157
|
+
className: "navigation-nav-item",
|
|
2158
|
+
onMouseEnter: () => handleNavItemMouseEnter(index),
|
|
2159
|
+
children: [
|
|
2160
|
+
/* @__PURE__ */ jsx("span", { className: "navigation-nav-link", children: item.label }),
|
|
2161
|
+
activeItem === index + 1 && /* @__PURE__ */ jsx(
|
|
2162
|
+
motion.div,
|
|
2163
|
+
{
|
|
2164
|
+
id: "underline",
|
|
2165
|
+
className: "navigation-underline",
|
|
2166
|
+
layoutId: "underline",
|
|
2167
|
+
transition: { duration: 0.2, ease: "easeOut" },
|
|
2168
|
+
children: /* @__PURE__ */ jsx(
|
|
2169
|
+
"div",
|
|
2170
|
+
{
|
|
2171
|
+
className: "navigation-underline-circle navigation-underline-circle--gradient",
|
|
2172
|
+
style: {
|
|
2173
|
+
width: "10px",
|
|
2174
|
+
height: "5px",
|
|
2175
|
+
borderBottomLeftRadius: "100px",
|
|
2176
|
+
borderBottomRightRadius: "100px",
|
|
2177
|
+
borderBottom: "0",
|
|
2178
|
+
boxSizing: "border-box"
|
|
2179
|
+
}
|
|
2180
|
+
}
|
|
2181
|
+
)
|
|
2182
|
+
}
|
|
2183
|
+
),
|
|
2184
|
+
index === 0 && /* @__PURE__ */ jsx(
|
|
2185
|
+
"div",
|
|
2186
|
+
{
|
|
2187
|
+
className: "navigation-underline navigation-underline--static",
|
|
2188
|
+
style: { transition: "all 0.2s ease-out" },
|
|
2189
|
+
children: /* @__PURE__ */ jsx(
|
|
2190
|
+
"div",
|
|
2191
|
+
{
|
|
2192
|
+
className: "navigation-underline-circle navigation-underline-circle--white",
|
|
2193
|
+
style: {
|
|
2194
|
+
width: "10px",
|
|
2195
|
+
height: "5px",
|
|
2196
|
+
borderTopLeftRadius: "100px",
|
|
2197
|
+
borderTopRightRadius: "100px",
|
|
2198
|
+
borderBottom: "0",
|
|
2199
|
+
boxSizing: "border-box"
|
|
2200
|
+
}
|
|
2201
|
+
}
|
|
2202
|
+
)
|
|
2203
|
+
}
|
|
2204
|
+
)
|
|
2205
|
+
]
|
|
2206
|
+
},
|
|
2207
|
+
index + 1
|
|
2208
|
+
)) : null }) }) : null,
|
|
2209
|
+
/* @__PURE__ */ jsx("div", { className: "navigation-actions", children: /* @__PURE__ */ jsx(
|
|
2210
|
+
NavLink,
|
|
2211
|
+
{
|
|
2212
|
+
href: "/",
|
|
2213
|
+
"aria-label": "Account link",
|
|
2214
|
+
className: "navigation-account-link",
|
|
2215
|
+
"data-open": isOpen,
|
|
2216
|
+
"data-strategy": isStrategy,
|
|
2217
|
+
children: /* @__PURE__ */ jsx(
|
|
2218
|
+
NavAccount,
|
|
2219
|
+
{
|
|
2220
|
+
className: cn(
|
|
2221
|
+
"navigation-account-icon",
|
|
2222
|
+
isStrategy ? "navigation-account-icon--strategy" : "navigation-account-icon--default"
|
|
2223
|
+
)
|
|
2224
|
+
}
|
|
2225
|
+
)
|
|
2226
|
+
}
|
|
2227
|
+
) })
|
|
2228
|
+
] }),
|
|
2229
|
+
isOpen && /* @__PURE__ */ jsx("div", { className: "navigation-divider" }),
|
|
2230
|
+
/* @__PURE__ */ jsx("div", { ref: menuRef, className: "navigation-tray", "data-open": isOpen, children: /* @__PURE__ */ jsx("div", { className: "navigation-tray-content", children: /* @__PURE__ */ jsx("div", { ref: menuItemsRef, className: "navigation-tray-grid", children: /* @__PURE__ */ jsx(AnimatePresence, { mode: "wait", children: /* @__PURE__ */ jsxs(
|
|
2231
|
+
motion.div,
|
|
2232
|
+
{
|
|
2233
|
+
initial: { y: 10, opacity: 0 },
|
|
2234
|
+
animate: { y: 0, opacity: 1 },
|
|
2235
|
+
exit: { y: -10, opacity: 0 },
|
|
2236
|
+
transition: { duration: 0.2 },
|
|
2237
|
+
children: [
|
|
2238
|
+
activeItem === 1 && /* @__PURE__ */ jsxs("div", { className: "navigation-tray-section", children: [
|
|
2239
|
+
/* @__PURE__ */ jsx(
|
|
2240
|
+
"h2",
|
|
2241
|
+
{
|
|
2242
|
+
className: "navigation-tray-heading",
|
|
2243
|
+
style: {
|
|
2244
|
+
background: "linear-gradient(90deg, #41D5F6 0%, #3EECD1 25%, #66FCD9 50%, #66FCD9 75%, #3EECD1 100%)",
|
|
2245
|
+
WebkitBackgroundClip: "text",
|
|
2246
|
+
WebkitTextFillColor: "transparent",
|
|
2247
|
+
backgroundClip: "text"
|
|
2248
|
+
},
|
|
2249
|
+
children: "WELL sets the standard for people-first places"
|
|
2250
|
+
}
|
|
2251
|
+
),
|
|
2252
|
+
/* @__PURE__ */ jsxs("div", { className: "navigation-tray-columns", children: [
|
|
2253
|
+
/* @__PURE__ */ jsxs("div", { className: "navigation-tray-column", children: [
|
|
2254
|
+
/* @__PURE__ */ jsx("h3", { className: "navigation-tray-column-title", children: "Everything" }),
|
|
2255
|
+
/* @__PURE__ */ jsxs("ul", { className: "navigation-tray-column-list navigation-tray-column-list--spacing-5", children: [
|
|
2256
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(NavLink, { href: "/", className: "navigation-tray-link", children: "Explore WELL" }) }),
|
|
2257
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(NavLink, { href: "/", className: "navigation-tray-link", children: "Enroll in WELL" }) }),
|
|
2258
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(NavLink, { href: "/", className: "navigation-tray-link", children: "What's new" }) })
|
|
2259
|
+
] })
|
|
2260
|
+
] }),
|
|
2261
|
+
/* @__PURE__ */ jsxs("div", { className: "navigation-tray-column", children: [
|
|
2262
|
+
/* @__PURE__ */ jsx("h3", { className: "navigation-tray-column-title", children: "WHY WELL" }),
|
|
2263
|
+
/* @__PURE__ */ jsxs("ul", { className: "navigation-tray-column-list navigation-tray-column-list--spacing-5", children: [
|
|
2264
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(NavLink, { href: "/", className: "navigation-tray-link", children: "Performance" }) }),
|
|
2265
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(NavLink, { href: "/", className: "navigation-tray-link", children: "ROI" }) }),
|
|
2266
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(NavLink, { href: "/", className: "navigation-tray-link", children: "Impact" }) })
|
|
2267
|
+
] })
|
|
2268
|
+
] }),
|
|
2269
|
+
/* @__PURE__ */ jsxs("div", { className: "navigation-tray-column", children: [
|
|
2270
|
+
/* @__PURE__ */ jsx("h3", { className: "navigation-tray-column-title", children: "Standard" }),
|
|
2271
|
+
/* @__PURE__ */ jsxs("ul", { className: "navigation-tray-column-list navigation-tray-column-list--spacing-5", children: [
|
|
2272
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(NavLink, { href: "/", className: "navigation-tray-link", children: "Strategies" }) }),
|
|
2273
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(NavLink, { href: "/", className: "navigation-tray-link", children: "Themes" }) }),
|
|
2274
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(NavLink, { href: "/", className: "navigation-tray-link", children: "Milestones" }) })
|
|
2275
|
+
] })
|
|
2276
|
+
] }),
|
|
2277
|
+
/* @__PURE__ */ jsxs("div", { className: "navigation-tray-column", children: [
|
|
2278
|
+
/* @__PURE__ */ jsx("h3", { className: "navigation-tray-column-title", children: "Network" }),
|
|
2279
|
+
/* @__PURE__ */ jsxs("ul", { className: "navigation-tray-column-list navigation-tray-column-list--spacing-5", children: [
|
|
2280
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(NavLink, { href: "/", className: "navigation-tray-link", children: "Organizations" }) }),
|
|
2281
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(NavLink, { href: "/", className: "navigation-tray-link", children: "People" }) })
|
|
2282
|
+
] })
|
|
2283
|
+
] }),
|
|
2284
|
+
/* @__PURE__ */ jsxs("div", { className: "navigation-tray-column", children: [
|
|
2285
|
+
/* @__PURE__ */ jsx("h3", { className: "navigation-tray-column-title", children: "Solutions" }),
|
|
2286
|
+
/* @__PURE__ */ jsxs("ul", { className: "navigation-tray-column-list navigation-tray-column-list--spacing-5", children: [
|
|
2287
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(NavLink, { href: "/", className: "navigation-tray-link", children: "Products" }) }),
|
|
2288
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(NavLink, { href: "/", className: "navigation-tray-link", children: "Services" }) })
|
|
2289
|
+
] })
|
|
2290
|
+
] }),
|
|
2291
|
+
/* @__PURE__ */ jsxs("div", { className: "navigation-tray-column", children: [
|
|
2292
|
+
/* @__PURE__ */ jsx("h3", { className: "navigation-tray-column-title", children: "Places" }),
|
|
2293
|
+
/* @__PURE__ */ jsxs("ul", { className: "navigation-tray-column-list navigation-tray-column-list--spacing-5", children: [
|
|
2294
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(NavLink, { href: "/", className: "navigation-tray-link", children: "Locations" }) }),
|
|
2295
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(NavLink, { href: "/", className: "navigation-tray-link", children: "Portfolios" }) })
|
|
2296
|
+
] })
|
|
2297
|
+
] })
|
|
2298
|
+
] })
|
|
2299
|
+
] }),
|
|
2300
|
+
activeItem === 2 && /* @__PURE__ */ jsxs("div", { className: "navigation-tray-section", children: [
|
|
2301
|
+
/* @__PURE__ */ jsx(
|
|
2302
|
+
"h2",
|
|
2303
|
+
{
|
|
2304
|
+
className: "navigation-tray-heading",
|
|
2305
|
+
style: {
|
|
2306
|
+
background: "linear-gradient(99deg, #41D5F6 3.39%, #3EECD1 57.86%, #66FCD9 112.32%)",
|
|
2307
|
+
backgroundClip: "text",
|
|
2308
|
+
WebkitBackgroundClip: "text",
|
|
2309
|
+
WebkitTextFillColor: "transparent"
|
|
2310
|
+
},
|
|
2311
|
+
children: "WELL works everywhere, at any scale"
|
|
2312
|
+
}
|
|
2313
|
+
),
|
|
2314
|
+
/* @__PURE__ */ jsxs("div", { className: "navigation-tray-columns", children: [
|
|
2315
|
+
/* @__PURE__ */ jsxs("div", { className: "navigation-tray-column", children: [
|
|
2316
|
+
/* @__PURE__ */ jsx("h3", { className: "navigation-tray-column-title", children: "SUBSCRIBE" }),
|
|
2317
|
+
/* @__PURE__ */ jsxs("ul", { className: "navigation-tray-column-list", children: [
|
|
2318
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(NavLink, { href: "/", className: "navigation-tray-link", children: "WELL at scale" }) }),
|
|
2319
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs("div", { className: "navigation-tray-bullet-item", children: [
|
|
2320
|
+
/* @__PURE__ */ jsx("div", { className: "navigation-tray-bullet" }),
|
|
2321
|
+
/* @__PURE__ */ jsx(NavLink, { href: "/", children: /* @__PURE__ */ jsx("span", { className: "navigation-tray-link-small", children: "Pricing" }) })
|
|
2322
|
+
] }) }),
|
|
2323
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs("div", { className: "navigation-tray-bullet-item", children: [
|
|
2324
|
+
/* @__PURE__ */ jsx("div", { className: "navigation-tray-bullet" }),
|
|
2325
|
+
/* @__PURE__ */ jsx(NavLink, { href: "/", children: /* @__PURE__ */ jsx("span", { className: "navigation-tray-link-small", children: "Leaderboard" }) })
|
|
2326
|
+
] }) })
|
|
2327
|
+
] })
|
|
2328
|
+
] }),
|
|
2329
|
+
/* @__PURE__ */ jsxs("div", { className: "navigation-tray-column", children: [
|
|
2330
|
+
/* @__PURE__ */ jsx("h3", { className: "navigation-tray-column-title", children: "Certify" }),
|
|
2331
|
+
/* @__PURE__ */ jsxs("ul", { className: "navigation-tray-column-list", children: [
|
|
2332
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(NavLink, { href: "/", className: "navigation-tray-link", children: "WELL Certification" }) }),
|
|
2333
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(
|
|
2334
|
+
NavLink,
|
|
2335
|
+
{
|
|
2336
|
+
href: "/",
|
|
2337
|
+
className: "navigation-tray-link navigation-tray-link--with-badge",
|
|
2338
|
+
children: [
|
|
2339
|
+
"WELL Residence",
|
|
2340
|
+
/* @__PURE__ */ jsx("span", { className: "navigation-tray-badge", children: "PILOT" })
|
|
2341
|
+
]
|
|
2342
|
+
}
|
|
2343
|
+
) })
|
|
2344
|
+
] })
|
|
2345
|
+
] }),
|
|
2346
|
+
/* @__PURE__ */ jsxs("div", { className: "navigation-tray-column", children: [
|
|
2347
|
+
/* @__PURE__ */ jsx("h3", { className: "navigation-tray-column-title", children: "Get rated" }),
|
|
2348
|
+
/* @__PURE__ */ jsxs("ul", { className: "navigation-tray-column-list", children: [
|
|
2349
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(NavLink, { href: "/", className: "navigation-tray-link", children: "WELL Ratings" }) }),
|
|
2350
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs("div", { className: "navigation-tray-bullet-item", children: [
|
|
2351
|
+
/* @__PURE__ */ jsx(NavBullet, { color: "#F3E7D8" }),
|
|
2352
|
+
/* @__PURE__ */ jsx(
|
|
2353
|
+
NavLink,
|
|
2354
|
+
{
|
|
2355
|
+
href: "/",
|
|
2356
|
+
className: "navigation-tray-link-small",
|
|
2357
|
+
children: "Health-Safety Rating"
|
|
2358
|
+
}
|
|
2359
|
+
)
|
|
2360
|
+
] }) }),
|
|
2361
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs("div", { className: "navigation-tray-bullet-item", children: [
|
|
2362
|
+
/* @__PURE__ */ jsx(NavBullet, { color: "#0F748A" }),
|
|
2363
|
+
/* @__PURE__ */ jsx(
|
|
2364
|
+
NavLink,
|
|
2365
|
+
{
|
|
2366
|
+
href: "/",
|
|
2367
|
+
className: "navigation-tray-link-small",
|
|
2368
|
+
children: "Performance Rating"
|
|
2369
|
+
}
|
|
2370
|
+
)
|
|
2371
|
+
] }) }),
|
|
2372
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs("div", { className: "navigation-tray-bullet-item", children: [
|
|
2373
|
+
/* @__PURE__ */ jsx(NavBullet, { color: "#17AA8D" }),
|
|
2374
|
+
/* @__PURE__ */ jsx(
|
|
2375
|
+
NavLink,
|
|
2376
|
+
{
|
|
2377
|
+
href: "/",
|
|
2378
|
+
className: "navigation-tray-link-small",
|
|
2379
|
+
children: "Equity Rating"
|
|
2380
|
+
}
|
|
2381
|
+
)
|
|
2382
|
+
] }) })
|
|
2383
|
+
] })
|
|
2384
|
+
] })
|
|
2385
|
+
] })
|
|
2386
|
+
] }),
|
|
2387
|
+
activeItem === 3 && /* @__PURE__ */ jsxs("div", { className: "navigation-tray-section", children: [
|
|
2388
|
+
/* @__PURE__ */ jsx(
|
|
2389
|
+
"h2",
|
|
2390
|
+
{
|
|
2391
|
+
className: "navigation-tray-heading",
|
|
2392
|
+
style: {
|
|
2393
|
+
background: "linear-gradient(90deg, #41D5F6 0%, #3EECD1 25%, #66FCD9 50%, #66FCD9 75%, #3EECD1 100%)",
|
|
2394
|
+
WebkitBackgroundClip: "text",
|
|
2395
|
+
WebkitTextFillColor: "transparent"
|
|
2396
|
+
},
|
|
2397
|
+
children: "Our network drives our movement"
|
|
2398
|
+
}
|
|
2399
|
+
),
|
|
2400
|
+
/* @__PURE__ */ jsxs("div", { className: "navigation-tray-columns", children: [
|
|
2401
|
+
/* @__PURE__ */ jsxs("div", { className: "navigation-tray-column", children: [
|
|
2402
|
+
/* @__PURE__ */ jsx("h3", { className: "navigation-tray-column-title", children: "JOIN" }),
|
|
2403
|
+
/* @__PURE__ */ jsxs("ul", { className: "navigation-tray-column-list", children: [
|
|
2404
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(NavLink, { href: "/", className: "navigation-tray-link", children: "Membership" }) }),
|
|
2405
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(NavLink, { href: "/", className: "navigation-tray-link", children: "Works with WELL" }) }),
|
|
2406
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs("div", { className: "navigation-tray-bullet-item", children: [
|
|
2407
|
+
/* @__PURE__ */ jsx(NavBullet, { color: "#2E74AD" }),
|
|
2408
|
+
/* @__PURE__ */ jsx(
|
|
2409
|
+
NavLink,
|
|
2410
|
+
{
|
|
2411
|
+
href: "/",
|
|
2412
|
+
className: "navigation-tray-link-small",
|
|
2413
|
+
children: "Enterprise Provider"
|
|
2414
|
+
}
|
|
2415
|
+
)
|
|
2416
|
+
] }) }),
|
|
2417
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs("div", { className: "navigation-tray-bullet-item", children: [
|
|
2418
|
+
/* @__PURE__ */ jsx(NavBullet, { color: "#149EBD" }),
|
|
2419
|
+
/* @__PURE__ */ jsx(
|
|
2420
|
+
NavLink,
|
|
2421
|
+
{
|
|
2422
|
+
href: "/",
|
|
2423
|
+
className: "navigation-tray-link-small",
|
|
2424
|
+
children: "Product Provider"
|
|
2425
|
+
}
|
|
2426
|
+
)
|
|
2427
|
+
] }) }),
|
|
2428
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs("div", { className: "navigation-tray-bullet-item", children: [
|
|
2429
|
+
/* @__PURE__ */ jsx(NavBullet, { color: "#ED896F" }),
|
|
2430
|
+
/* @__PURE__ */ jsx(
|
|
2431
|
+
NavLink,
|
|
2432
|
+
{
|
|
2433
|
+
href: "/",
|
|
2434
|
+
className: "navigation-tray-link-small",
|
|
2435
|
+
children: "Performance Testing Provider"
|
|
2436
|
+
}
|
|
2437
|
+
)
|
|
2438
|
+
] }) })
|
|
2439
|
+
] })
|
|
2440
|
+
] }),
|
|
2441
|
+
/* @__PURE__ */ jsxs("div", { className: "navigation-tray-column", children: [
|
|
2442
|
+
/* @__PURE__ */ jsx("h3", { className: "navigation-tray-column-title", children: "EARN" }),
|
|
2443
|
+
/* @__PURE__ */ jsxs("ul", { className: "navigation-tray-column-list", children: [
|
|
2444
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(NavLink, { href: "/", className: "navigation-tray-link", children: "WELL AP" }) }),
|
|
2445
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(NavLink, { href: "/", className: "navigation-tray-link", children: "WELL Faculty" }) })
|
|
2446
|
+
] })
|
|
2447
|
+
] })
|
|
2448
|
+
] })
|
|
2449
|
+
] }),
|
|
2450
|
+
activeItem === 4 && /* @__PURE__ */ jsxs("div", { className: "navigation-tray-section", children: [
|
|
2451
|
+
/* @__PURE__ */ jsx(
|
|
2452
|
+
"h2",
|
|
2453
|
+
{
|
|
2454
|
+
className: "navigation-tray-heading",
|
|
2455
|
+
style: {
|
|
2456
|
+
background: "linear-gradient(90deg, #41D5F6 0%, #3EECD1 25%, #66FCD9 50%, #66FCD9 75%, #3EECD1 100%)",
|
|
2457
|
+
WebkitBackgroundClip: "text",
|
|
2458
|
+
WebkitTextFillColor: "transparent"
|
|
2459
|
+
},
|
|
2460
|
+
children: "Learn from the experts on health"
|
|
2461
|
+
}
|
|
2462
|
+
),
|
|
2463
|
+
/* @__PURE__ */ jsxs("div", { className: "navigation-tray-columns", children: [
|
|
2464
|
+
/* @__PURE__ */ jsxs("div", { className: "navigation-tray-column", children: [
|
|
2465
|
+
/* @__PURE__ */ jsx("h3", { className: "navigation-tray-column-title", children: "LEARN" }),
|
|
2466
|
+
/* @__PURE__ */ jsxs("ul", { className: "navigation-tray-column-list", children: [
|
|
2467
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(NavLink, { href: "/", className: "navigation-tray-link", children: "WELL Forum" }) }),
|
|
2468
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs("div", { className: "navigation-tray-bullet-item", children: [
|
|
2469
|
+
/* @__PURE__ */ jsx("div", { className: "navigation-tray-bullet" }),
|
|
2470
|
+
/* @__PURE__ */ jsx(
|
|
2471
|
+
NavLink,
|
|
2472
|
+
{
|
|
2473
|
+
href: "/",
|
|
2474
|
+
className: "navigation-tray-link-small",
|
|
2475
|
+
children: "Threads"
|
|
2476
|
+
}
|
|
2477
|
+
)
|
|
2478
|
+
] }) }),
|
|
2479
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs("div", { className: "navigation-tray-bullet-item", children: [
|
|
2480
|
+
/* @__PURE__ */ jsx("div", { className: "navigation-tray-bullet" }),
|
|
2481
|
+
/* @__PURE__ */ jsx(
|
|
2482
|
+
NavLink,
|
|
2483
|
+
{
|
|
2484
|
+
href: "/",
|
|
2485
|
+
className: "navigation-tray-link-small",
|
|
2486
|
+
children: "Webcasts"
|
|
2487
|
+
}
|
|
2488
|
+
)
|
|
2489
|
+
] }) }),
|
|
2490
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs("div", { className: "navigation-tray-bullet-item", children: [
|
|
2491
|
+
/* @__PURE__ */ jsx("div", { className: "navigation-tray-bullet" }),
|
|
2492
|
+
/* @__PURE__ */ jsx(
|
|
2493
|
+
NavLink,
|
|
2494
|
+
{
|
|
2495
|
+
href: "/",
|
|
2496
|
+
className: "navigation-tray-link-small",
|
|
2497
|
+
children: "Trainings"
|
|
2498
|
+
}
|
|
2499
|
+
)
|
|
2500
|
+
] }) })
|
|
2501
|
+
] })
|
|
2502
|
+
] }),
|
|
2503
|
+
/* @__PURE__ */ jsxs("div", { className: "navigation-tray-column", children: [
|
|
2504
|
+
/* @__PURE__ */ jsx("h3", { className: "navigation-tray-column-title", children: "ATTEND" }),
|
|
2505
|
+
/* @__PURE__ */ jsxs("ul", { className: "navigation-tray-column-list", children: [
|
|
2506
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(NavLink, { href: "/", className: "navigation-tray-link", children: "WELL 2025" }) }),
|
|
2507
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs("div", { className: "navigation-tray-bullet-item", children: [
|
|
2508
|
+
/* @__PURE__ */ jsx("div", { className: "navigation-tray-bullet" }),
|
|
2509
|
+
/* @__PURE__ */ jsx(
|
|
2510
|
+
NavLink,
|
|
2511
|
+
{
|
|
2512
|
+
href: "/",
|
|
2513
|
+
className: "navigation-tray-link-small",
|
|
2514
|
+
children: "Flagship events"
|
|
2515
|
+
}
|
|
2516
|
+
)
|
|
2517
|
+
] }) }),
|
|
2518
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs("div", { className: "navigation-tray-bullet-item", children: [
|
|
2519
|
+
/* @__PURE__ */ jsx("div", { className: "navigation-tray-bullet" }),
|
|
2520
|
+
/* @__PURE__ */ jsx(
|
|
2521
|
+
NavLink,
|
|
2522
|
+
{
|
|
2523
|
+
href: "/",
|
|
2524
|
+
className: "navigation-tray-link-small",
|
|
2525
|
+
children: "Thematic summits"
|
|
2526
|
+
}
|
|
2527
|
+
)
|
|
2528
|
+
] }) }),
|
|
2529
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs("div", { className: "navigation-tray-bullet-item", children: [
|
|
2530
|
+
/* @__PURE__ */ jsx("div", { className: "navigation-tray-bullet" }),
|
|
2531
|
+
/* @__PURE__ */ jsx(
|
|
2532
|
+
NavLink,
|
|
2533
|
+
{
|
|
2534
|
+
href: "/",
|
|
2535
|
+
className: "navigation-tray-link-small",
|
|
2536
|
+
children: "Regional summits"
|
|
2537
|
+
}
|
|
2538
|
+
)
|
|
2539
|
+
] }) })
|
|
2540
|
+
] })
|
|
2541
|
+
] }),
|
|
2542
|
+
/* @__PURE__ */ jsxs("div", { className: "navigation-tray-column", children: [
|
|
2543
|
+
/* @__PURE__ */ jsx("h3", { className: "navigation-tray-column-title", children: "GUIDANCE" }),
|
|
2544
|
+
/* @__PURE__ */ jsxs("ul", { className: "navigation-tray-column-list", children: [
|
|
2545
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(NavLink, { href: "/", className: "navigation-tray-link", children: "Knowledge base" }) }),
|
|
2546
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs("div", { className: "navigation-tray-bullet-item", children: [
|
|
2547
|
+
/* @__PURE__ */ jsx("div", { className: "navigation-tray-bullet" }),
|
|
2548
|
+
/* @__PURE__ */ jsx(
|
|
2549
|
+
NavLink,
|
|
2550
|
+
{
|
|
2551
|
+
href: "/",
|
|
2552
|
+
className: "navigation-tray-link-small",
|
|
2553
|
+
children: "Tutorials"
|
|
2554
|
+
}
|
|
2555
|
+
)
|
|
2556
|
+
] }) }),
|
|
2557
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs("div", { className: "navigation-tray-bullet-item", children: [
|
|
2558
|
+
/* @__PURE__ */ jsx("div", { className: "navigation-tray-bullet" }),
|
|
2559
|
+
/* @__PURE__ */ jsx(
|
|
2560
|
+
NavLink,
|
|
2561
|
+
{
|
|
2562
|
+
href: "/",
|
|
2563
|
+
className: "navigation-tray-link-small",
|
|
2564
|
+
children: "Guides"
|
|
2565
|
+
}
|
|
2566
|
+
)
|
|
2567
|
+
] }) }),
|
|
2568
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs("div", { className: "navigation-tray-bullet-item", children: [
|
|
2569
|
+
/* @__PURE__ */ jsx("div", { className: "navigation-tray-bullet" }),
|
|
2570
|
+
/* @__PURE__ */ jsx(
|
|
2571
|
+
NavLink,
|
|
2572
|
+
{
|
|
2573
|
+
href: "/",
|
|
2574
|
+
className: "navigation-tray-link-small",
|
|
2575
|
+
children: "FAQs"
|
|
2576
|
+
}
|
|
2577
|
+
)
|
|
2578
|
+
] }) })
|
|
2579
|
+
] })
|
|
2580
|
+
] }),
|
|
2581
|
+
/* @__PURE__ */ jsxs("div", { className: "navigation-tray-column", children: [
|
|
2582
|
+
/* @__PURE__ */ jsx("h3", { className: "navigation-tray-column-title", children: "Resources" }),
|
|
2583
|
+
/* @__PURE__ */ jsxs("ul", { className: "navigation-tray-column-list", children: [
|
|
2584
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(NavLink, { href: "/", className: "navigation-tray-link", children: "Resource library" }) }),
|
|
2585
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs("div", { className: "navigation-tray-bullet-item", children: [
|
|
2586
|
+
/* @__PURE__ */ jsx("div", { className: "navigation-tray-bullet" }),
|
|
2587
|
+
/* @__PURE__ */ jsx(
|
|
2588
|
+
NavLink,
|
|
2589
|
+
{
|
|
2590
|
+
href: "/",
|
|
2591
|
+
className: "navigation-tray-link-small",
|
|
2592
|
+
children: "Technical tools"
|
|
2593
|
+
}
|
|
2594
|
+
)
|
|
2595
|
+
] }) }),
|
|
2596
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs("div", { className: "navigation-tray-bullet-item", children: [
|
|
2597
|
+
/* @__PURE__ */ jsx("div", { className: "navigation-tray-bullet" }),
|
|
2598
|
+
/* @__PURE__ */ jsx(
|
|
2599
|
+
NavLink,
|
|
2600
|
+
{
|
|
2601
|
+
href: "/",
|
|
2602
|
+
className: "navigation-tray-link-small",
|
|
2603
|
+
children: "Sales tools"
|
|
2604
|
+
}
|
|
2605
|
+
)
|
|
2606
|
+
] }) }),
|
|
2607
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs("div", { className: "navigation-tray-bullet-item", children: [
|
|
2608
|
+
/* @__PURE__ */ jsx("div", { className: "navigation-tray-bullet" }),
|
|
2609
|
+
/* @__PURE__ */ jsx(
|
|
2610
|
+
NavLink,
|
|
2611
|
+
{
|
|
2612
|
+
href: "/",
|
|
2613
|
+
className: "navigation-tray-link-small",
|
|
2614
|
+
children: "Media"
|
|
2615
|
+
}
|
|
2616
|
+
)
|
|
2617
|
+
] }) })
|
|
2618
|
+
] })
|
|
2619
|
+
] })
|
|
2620
|
+
] })
|
|
2621
|
+
] }),
|
|
2622
|
+
activeItem === 5 && /* @__PURE__ */ jsxs("div", { className: "navigation-tray-section", children: [
|
|
2623
|
+
/* @__PURE__ */ jsx(
|
|
2624
|
+
"h2",
|
|
2625
|
+
{
|
|
2626
|
+
className: "navigation-tray-heading",
|
|
2627
|
+
style: {
|
|
2628
|
+
background: "linear-gradient(90deg, #41D5F6 0%, #3EECD1 25%, #66FCD9 50%, #66FCD9 75%, #3EECD1 100%)",
|
|
2629
|
+
WebkitBackgroundClip: "text",
|
|
2630
|
+
WebkitTextFillColor: "transparent"
|
|
2631
|
+
},
|
|
2632
|
+
children: "The International WELL Building Institute (IWBI)"
|
|
2633
|
+
}
|
|
2634
|
+
),
|
|
2635
|
+
/* @__PURE__ */ jsxs("div", { className: "navigation-tray-columns", children: [
|
|
2636
|
+
/* @__PURE__ */ jsxs("div", { className: "navigation-tray-column", children: [
|
|
2637
|
+
/* @__PURE__ */ jsx("h3", { className: "navigation-tray-column-title", children: "About" }),
|
|
2638
|
+
/* @__PURE__ */ jsxs("ul", { className: "navigation-tray-column-list", children: [
|
|
2639
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(NavLink, { href: "/", className: "navigation-tray-link", children: "IWBI" }) }),
|
|
2640
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(NavLink, { href: "/", className: "navigation-tray-link", children: "Research" }) }),
|
|
2641
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(NavLink, { href: "/", className: "navigation-tray-link", children: "Advocacy" }) })
|
|
2642
|
+
] })
|
|
2643
|
+
] }),
|
|
2644
|
+
/* @__PURE__ */ jsxs("div", { className: "navigation-tray-column", children: [
|
|
2645
|
+
/* @__PURE__ */ jsx("h3", { className: "navigation-tray-column-title", children: "Meet" }),
|
|
2646
|
+
/* @__PURE__ */ jsxs("ul", { className: "navigation-tray-column-list", children: [
|
|
2647
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(NavLink, { href: "/", className: "navigation-tray-link", children: "Team" }) }),
|
|
2648
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(NavLink, { href: "/", className: "navigation-tray-link", children: "Advisories" }) }),
|
|
2649
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(NavLink, { href: "/", className: "navigation-tray-link", children: "Governance Council" }) })
|
|
2650
|
+
] })
|
|
2651
|
+
] }),
|
|
2652
|
+
/* @__PURE__ */ jsxs("div", { className: "navigation-tray-column", children: [
|
|
2653
|
+
/* @__PURE__ */ jsx("h3", { className: "navigation-tray-column-title", children: "Explore" }),
|
|
2654
|
+
/* @__PURE__ */ jsxs("ul", { className: "navigation-tray-column-list", children: [
|
|
2655
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(NavLink, { href: "/", className: "navigation-tray-link", children: "Newsroom" }) }),
|
|
2656
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(NavLink, { href: "/", className: "navigation-tray-link", children: "Jobs" }) }),
|
|
2657
|
+
/* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(NavLink, { href: "/", className: "navigation-tray-link", children: "Blog" }) })
|
|
2658
|
+
] })
|
|
2659
|
+
] })
|
|
2660
|
+
] })
|
|
2661
|
+
] })
|
|
2662
|
+
]
|
|
2663
|
+
},
|
|
2664
|
+
activeItem ? activeItem + 1 : "empty"
|
|
2665
|
+
) }) }) }) })
|
|
2666
|
+
]
|
|
2667
|
+
}
|
|
2668
|
+
);
|
|
2669
|
+
};
|
|
2670
|
+
function Dialog({
|
|
2671
|
+
...props
|
|
2672
|
+
}) {
|
|
2673
|
+
return /* @__PURE__ */ jsx(SheetPrimitive.Root, { "data-slot": "dialog", ...props });
|
|
2674
|
+
}
|
|
2675
|
+
function DialogTrigger({
|
|
2676
|
+
...props
|
|
2677
|
+
}) {
|
|
2678
|
+
return /* @__PURE__ */ jsx(SheetPrimitive.Trigger, { "data-slot": "dialog-trigger", ...props });
|
|
2679
|
+
}
|
|
2680
|
+
function DialogPortal({
|
|
2681
|
+
...props
|
|
2682
|
+
}) {
|
|
2683
|
+
return /* @__PURE__ */ jsx(SheetPrimitive.Portal, { "data-slot": "dialog-portal", ...props });
|
|
2684
|
+
}
|
|
2685
|
+
function DialogClose({
|
|
2686
|
+
...props
|
|
2687
|
+
}) {
|
|
2688
|
+
return /* @__PURE__ */ jsx(SheetPrimitive.Close, { "data-slot": "dialog-close", ...props });
|
|
2689
|
+
}
|
|
2690
|
+
function DialogOverlay({
|
|
2691
|
+
className,
|
|
2692
|
+
...props
|
|
2693
|
+
}) {
|
|
2694
|
+
return /* @__PURE__ */ jsx(
|
|
2695
|
+
SheetPrimitive.Overlay,
|
|
2696
|
+
{
|
|
2697
|
+
"data-slot": "dialog-overlay",
|
|
2698
|
+
className: cn("dialog-overlay", className),
|
|
2699
|
+
...props
|
|
2700
|
+
}
|
|
2701
|
+
);
|
|
2702
|
+
}
|
|
2703
|
+
function DialogContent({
|
|
2704
|
+
className,
|
|
2705
|
+
children,
|
|
2706
|
+
showCloseButton = true,
|
|
2707
|
+
...props
|
|
2708
|
+
}) {
|
|
2709
|
+
return /* @__PURE__ */ jsxs(DialogPortal, { "data-slot": "dialog-portal", children: [
|
|
2710
|
+
/* @__PURE__ */ jsx(DialogOverlay, {}),
|
|
2711
|
+
/* @__PURE__ */ jsxs(
|
|
2712
|
+
SheetPrimitive.Content,
|
|
2713
|
+
{
|
|
2714
|
+
"data-slot": "dialog-content",
|
|
2715
|
+
className: cn("dialog-content", className),
|
|
2716
|
+
...props,
|
|
2717
|
+
children: [
|
|
2718
|
+
/* @__PURE__ */ jsx("div", { className: "dialog-content-inner", children }),
|
|
2719
|
+
showCloseButton && /* @__PURE__ */ jsxs(
|
|
2720
|
+
SheetPrimitive.Close,
|
|
2721
|
+
{
|
|
2722
|
+
"data-slot": "dialog-close",
|
|
2723
|
+
className: "dialog-close",
|
|
2724
|
+
children: [
|
|
2725
|
+
/* @__PURE__ */ jsx(XIcon, {}),
|
|
2726
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
2727
|
+
]
|
|
2728
|
+
}
|
|
2729
|
+
)
|
|
2730
|
+
]
|
|
2731
|
+
}
|
|
2732
|
+
)
|
|
2733
|
+
] });
|
|
2734
|
+
}
|
|
2735
|
+
function DialogHeader({ className, ...props }) {
|
|
2736
|
+
return /* @__PURE__ */ jsx(
|
|
2737
|
+
"div",
|
|
2738
|
+
{
|
|
2739
|
+
"data-slot": "dialog-header",
|
|
2740
|
+
className: cn("dialog-header", className),
|
|
2741
|
+
...props
|
|
2742
|
+
}
|
|
2743
|
+
);
|
|
2744
|
+
}
|
|
2745
|
+
function DialogFooter({ className, ...props }) {
|
|
2746
|
+
return /* @__PURE__ */ jsx(
|
|
2747
|
+
"div",
|
|
2748
|
+
{
|
|
2749
|
+
"data-slot": "dialog-footer",
|
|
2750
|
+
className: cn("dialog-footer", className),
|
|
2751
|
+
...props
|
|
2752
|
+
}
|
|
2753
|
+
);
|
|
2754
|
+
}
|
|
2755
|
+
function DialogTitle({
|
|
2756
|
+
className,
|
|
2757
|
+
...props
|
|
2758
|
+
}) {
|
|
2759
|
+
return /* @__PURE__ */ jsx(
|
|
2760
|
+
SheetPrimitive.Title,
|
|
2761
|
+
{
|
|
2762
|
+
"data-slot": "dialog-title",
|
|
2763
|
+
className: cn("dialog-title heading-xxsmall", className),
|
|
2764
|
+
...props
|
|
2765
|
+
}
|
|
2766
|
+
);
|
|
2767
|
+
}
|
|
2768
|
+
function DialogDescription({
|
|
2769
|
+
className,
|
|
2770
|
+
...props
|
|
2771
|
+
}) {
|
|
2772
|
+
return /* @__PURE__ */ jsx(
|
|
2773
|
+
SheetPrimitive.Description,
|
|
2774
|
+
{
|
|
2775
|
+
"data-slot": "dialog-description",
|
|
2776
|
+
className: cn("dialog-description", className),
|
|
2777
|
+
...props
|
|
2778
|
+
}
|
|
2779
|
+
);
|
|
2780
|
+
}
|
|
2781
|
+
const Command = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Command$1, { ref, className: cn("command", className), ...props }));
|
|
2782
|
+
Command.displayName = Command$1.displayName;
|
|
2783
|
+
const CommandDialog = ({ children, ...props }) => {
|
|
2784
|
+
return /* @__PURE__ */ jsx(Dialog, { ...props, children: /* @__PURE__ */ jsx(DialogContent, { className: "command-dialog-content", children: /* @__PURE__ */ jsx(Command, { children }) }) });
|
|
2785
|
+
};
|
|
2786
|
+
const CommandInput = React.forwardRef(({ className, icon: Icon = Search, ...props }, ref) => /* @__PURE__ */ jsxs("div", { className: cn("command-input-wrapper", className), "cmdk-input-wrapper": "", children: [
|
|
2787
|
+
/* @__PURE__ */ jsx(Icon, { className: "icon-4 icon-shrink-0" }),
|
|
2788
|
+
/* @__PURE__ */ jsx(
|
|
2789
|
+
Command$1.Input,
|
|
2790
|
+
{
|
|
2791
|
+
ref,
|
|
2792
|
+
className: cn("command-input", className),
|
|
2793
|
+
...props
|
|
2794
|
+
}
|
|
2795
|
+
)
|
|
2796
|
+
] }));
|
|
2797
|
+
CommandInput.displayName = Command$1.Input.displayName;
|
|
2798
|
+
const CommandList = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2799
|
+
Command$1.List,
|
|
2800
|
+
{
|
|
2801
|
+
ref,
|
|
2802
|
+
className: cn("command-list", className),
|
|
2803
|
+
...props
|
|
2804
|
+
}
|
|
2805
|
+
));
|
|
2806
|
+
CommandList.displayName = Command$1.List.displayName;
|
|
2807
|
+
const CommandEmpty = React.forwardRef((props, ref) => /* @__PURE__ */ jsx(Command$1.Empty, { ref, className: "command-empty", ...props }));
|
|
2808
|
+
CommandEmpty.displayName = Command$1.Empty.displayName;
|
|
2809
|
+
const CommandGroup = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2810
|
+
Command$1.Group,
|
|
2811
|
+
{
|
|
2812
|
+
ref,
|
|
2813
|
+
className: cn("command-group", className),
|
|
2814
|
+
...props
|
|
2815
|
+
}
|
|
2816
|
+
));
|
|
2817
|
+
CommandGroup.displayName = Command$1.Group.displayName;
|
|
2818
|
+
const CommandSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2819
|
+
Command$1.Separator,
|
|
2820
|
+
{
|
|
2821
|
+
ref,
|
|
2822
|
+
className: cn("command-separator", className),
|
|
2823
|
+
...props
|
|
2824
|
+
}
|
|
2825
|
+
));
|
|
2826
|
+
CommandSeparator.displayName = Command$1.Separator.displayName;
|
|
2827
|
+
const CommandItem = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2828
|
+
Command$1.Item,
|
|
2829
|
+
{
|
|
2830
|
+
ref,
|
|
2831
|
+
className: cn("command-item", className),
|
|
2832
|
+
...props
|
|
2833
|
+
}
|
|
2834
|
+
));
|
|
2835
|
+
CommandItem.displayName = Command$1.Item.displayName;
|
|
2836
|
+
const CommandShortcut = ({
|
|
2837
|
+
className,
|
|
2838
|
+
...props
|
|
2839
|
+
}) => {
|
|
2840
|
+
return /* @__PURE__ */ jsx("span", { className: cn("command-shortcut", className), ...props });
|
|
2841
|
+
};
|
|
2842
|
+
CommandShortcut.displayName = "CommandShortcut";
|
|
2843
|
+
const SearchField = ({
|
|
2844
|
+
options,
|
|
2845
|
+
placeholder,
|
|
2846
|
+
emptyMessage,
|
|
2847
|
+
value,
|
|
2848
|
+
onValueChange,
|
|
2849
|
+
disabled,
|
|
2850
|
+
isLoading = false
|
|
2851
|
+
}) => {
|
|
2852
|
+
const inputRef = useRef(null);
|
|
2853
|
+
const [isOpen, setOpen] = useState(false);
|
|
2854
|
+
const [selected, setSelected] = useState(value);
|
|
2855
|
+
const [inputValue, setInputValue] = useState((value == null ? void 0 : value.label) || "");
|
|
2856
|
+
const handleKeyDown = useCallback(
|
|
2857
|
+
(event) => {
|
|
2858
|
+
const input = inputRef.current;
|
|
2859
|
+
if (!input) {
|
|
2860
|
+
return;
|
|
2861
|
+
}
|
|
2862
|
+
if (!isOpen) {
|
|
2863
|
+
setOpen(true);
|
|
2864
|
+
}
|
|
2865
|
+
if (event.key === "Enter" && input.value !== "") {
|
|
2866
|
+
const optionToSelect = options.find(
|
|
2867
|
+
(option) => option.label === input.value
|
|
2868
|
+
);
|
|
2869
|
+
if (optionToSelect) {
|
|
2870
|
+
setSelected(optionToSelect);
|
|
2871
|
+
onValueChange == null ? void 0 : onValueChange(optionToSelect);
|
|
2872
|
+
}
|
|
2873
|
+
}
|
|
2874
|
+
if (event.key === "Escape") {
|
|
2875
|
+
input.blur();
|
|
2876
|
+
}
|
|
2877
|
+
},
|
|
2878
|
+
[isOpen, options, onValueChange]
|
|
2879
|
+
);
|
|
2880
|
+
const handleBlur = useCallback(() => {
|
|
2881
|
+
setOpen(false);
|
|
2882
|
+
setInputValue(selected == null ? void 0 : selected.label);
|
|
2883
|
+
}, [selected]);
|
|
2884
|
+
const handleSelectOption = useCallback(
|
|
2885
|
+
(selectedOption) => {
|
|
2886
|
+
setInputValue(selectedOption.label);
|
|
2887
|
+
setSelected(selectedOption);
|
|
2888
|
+
onValueChange == null ? void 0 : onValueChange(selectedOption);
|
|
2889
|
+
setTimeout(() => {
|
|
2890
|
+
var _a;
|
|
2891
|
+
(_a = inputRef == null ? void 0 : inputRef.current) == null ? void 0 : _a.blur();
|
|
2892
|
+
}, 0);
|
|
2893
|
+
},
|
|
2894
|
+
[onValueChange]
|
|
2895
|
+
);
|
|
2896
|
+
return /* @__PURE__ */ jsxs(Command$1, { onKeyDown: handleKeyDown, children: [
|
|
2897
|
+
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
|
|
2898
|
+
CommandInput,
|
|
2899
|
+
{
|
|
2900
|
+
ref: inputRef,
|
|
2901
|
+
value: inputValue,
|
|
2902
|
+
onValueChange: isLoading ? void 0 : setInputValue,
|
|
2903
|
+
onBlur: handleBlur,
|
|
2904
|
+
onFocus: () => setOpen(true),
|
|
2905
|
+
placeholder,
|
|
2906
|
+
disabled,
|
|
2907
|
+
className: cn(
|
|
2908
|
+
"search-field-input--focused",
|
|
2909
|
+
isOpen && "search-field-input--open"
|
|
2910
|
+
)
|
|
2911
|
+
}
|
|
2912
|
+
) }),
|
|
2913
|
+
/* @__PURE__ */ jsx("div", { className: "relative", children: /* @__PURE__ */ jsx(
|
|
2914
|
+
"div",
|
|
2915
|
+
{
|
|
2916
|
+
className: cn("search-field-dropdown", isOpen ? "block" : "hidden"),
|
|
2917
|
+
children: /* @__PURE__ */ jsxs(CommandList, { className: "search-field-list", children: [
|
|
2918
|
+
(options == null ? void 0 : options.length) > 0 && !isLoading ? /* @__PURE__ */ jsx(CommandGroup, { children: options.map((option) => {
|
|
2919
|
+
const isSelected = (selected == null ? void 0 : selected.value) === option.value;
|
|
2920
|
+
return /* @__PURE__ */ jsxs(
|
|
2921
|
+
CommandItem,
|
|
2922
|
+
{
|
|
2923
|
+
value: option.label,
|
|
2924
|
+
onMouseDown: (event) => {
|
|
2925
|
+
event.preventDefault();
|
|
2926
|
+
event.stopPropagation();
|
|
2927
|
+
},
|
|
2928
|
+
onSelect: () => handleSelectOption(option),
|
|
2929
|
+
children: [
|
|
2930
|
+
isSelected ? /* @__PURE__ */ jsx(Check, { className: "icon-4" }) : null,
|
|
2931
|
+
option.label
|
|
2932
|
+
]
|
|
2933
|
+
},
|
|
2934
|
+
option.value
|
|
2935
|
+
);
|
|
2936
|
+
}) }) : null,
|
|
2937
|
+
!isLoading ? /* @__PURE__ */ jsx(CommandEmpty, { className: "search-field-empty", children: emptyMessage }) : null
|
|
2938
|
+
] })
|
|
2939
|
+
}
|
|
2940
|
+
) })
|
|
2941
|
+
] });
|
|
2942
|
+
};
|
|
2943
|
+
const getStatusClass = (status, variant2 = "light") => {
|
|
2944
|
+
return `tag tag--${variant2}-${status}`;
|
|
2945
|
+
};
|
|
2946
|
+
const Tag = React.forwardRef(
|
|
2947
|
+
({
|
|
2948
|
+
children,
|
|
2949
|
+
active = false,
|
|
2950
|
+
status,
|
|
2951
|
+
variant: variant2 = "light",
|
|
2952
|
+
className,
|
|
2953
|
+
onClick,
|
|
2954
|
+
...props
|
|
2955
|
+
}, ref) => {
|
|
2956
|
+
if (status) {
|
|
2957
|
+
const statusClass = getStatusClass(status, variant2);
|
|
2958
|
+
return /* @__PURE__ */ jsx(
|
|
2959
|
+
"button",
|
|
2960
|
+
{
|
|
2961
|
+
ref,
|
|
2962
|
+
onClick,
|
|
2963
|
+
className: cn(statusClass, className),
|
|
2964
|
+
...props,
|
|
2965
|
+
children: /* @__PURE__ */ jsx("span", { className: "overline-medium", children })
|
|
2966
|
+
}
|
|
2967
|
+
);
|
|
2968
|
+
}
|
|
2969
|
+
return /* @__PURE__ */ jsx(
|
|
2970
|
+
"button",
|
|
2971
|
+
{
|
|
2972
|
+
ref,
|
|
2973
|
+
onClick,
|
|
2974
|
+
className: cn(
|
|
2975
|
+
"tag-general",
|
|
2976
|
+
active ? "tag-general--active" : "tag-general--inactive",
|
|
2977
|
+
className
|
|
2978
|
+
),
|
|
2979
|
+
...props,
|
|
2980
|
+
children: /* @__PURE__ */ jsx("span", { className: "body-small font-semibold", children })
|
|
2981
|
+
}
|
|
2982
|
+
);
|
|
2983
|
+
}
|
|
2984
|
+
);
|
|
2985
|
+
Tag.displayName = "Tag";
|
|
2986
|
+
function useTabs({ tabs, initialTabId }) {
|
|
2987
|
+
const initialIndex = tabs.findIndex((tab) => tab.value === initialTabId);
|
|
2988
|
+
const [selectedTabIndex, setSelectedTabIndex] = useState(
|
|
2989
|
+
initialIndex >= 0 ? initialIndex : 0
|
|
2990
|
+
);
|
|
2991
|
+
const setSelectedTab = useCallback(([index, direction]) => {
|
|
2992
|
+
setSelectedTabIndex(index);
|
|
2993
|
+
}, []);
|
|
2994
|
+
const selectedTab = tabs[selectedTabIndex] || tabs[0];
|
|
2995
|
+
return {
|
|
2996
|
+
tabProps: {
|
|
2997
|
+
tabs,
|
|
2998
|
+
selectedTabIndex,
|
|
2999
|
+
setSelectedTab
|
|
3000
|
+
},
|
|
3001
|
+
selectedTab
|
|
3002
|
+
};
|
|
3003
|
+
}
|
|
3004
|
+
const TabsRoot = React__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3005
|
+
TabsPrimitive.Root,
|
|
3006
|
+
{
|
|
3007
|
+
ref,
|
|
3008
|
+
className: cn("tabs", className),
|
|
3009
|
+
...props
|
|
3010
|
+
}
|
|
3011
|
+
));
|
|
3012
|
+
TabsRoot.displayName = TabsPrimitive.Root.displayName;
|
|
3013
|
+
const TabsList = React__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3014
|
+
TabsPrimitive.List,
|
|
3015
|
+
{
|
|
3016
|
+
ref,
|
|
3017
|
+
className: cn("tabs-list", className),
|
|
3018
|
+
...props
|
|
3019
|
+
}
|
|
3020
|
+
));
|
|
3021
|
+
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
3022
|
+
const TabsTrigger = React__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3023
|
+
TabsPrimitive.Trigger,
|
|
3024
|
+
{
|
|
3025
|
+
ref,
|
|
3026
|
+
className: cn("tabs-trigger", className),
|
|
3027
|
+
...props
|
|
3028
|
+
}
|
|
3029
|
+
));
|
|
3030
|
+
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
3031
|
+
const TabsContent = React__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3032
|
+
TabsPrimitive.Content,
|
|
3033
|
+
{
|
|
3034
|
+
ref,
|
|
3035
|
+
className: cn("tabs-content", className),
|
|
3036
|
+
...props
|
|
3037
|
+
}
|
|
3038
|
+
));
|
|
3039
|
+
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
3040
|
+
const Pagination = ({ className, ...props }) => /* @__PURE__ */ jsx(
|
|
3041
|
+
"nav",
|
|
3042
|
+
{
|
|
3043
|
+
role: "navigation",
|
|
3044
|
+
"aria-label": "pagination",
|
|
3045
|
+
className: cn("pagination", className),
|
|
3046
|
+
...props
|
|
3047
|
+
}
|
|
3048
|
+
);
|
|
3049
|
+
Pagination.displayName = "Pagination";
|
|
3050
|
+
const PaginationContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3051
|
+
"ul",
|
|
3052
|
+
{
|
|
3053
|
+
ref,
|
|
3054
|
+
className: cn("pagination-content", className),
|
|
3055
|
+
...props
|
|
3056
|
+
}
|
|
3057
|
+
));
|
|
3058
|
+
PaginationContent.displayName = "PaginationContent";
|
|
3059
|
+
const PaginationItem = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("li", { ref, className: cn("", className), ...props }));
|
|
3060
|
+
PaginationItem.displayName = "PaginationItem";
|
|
3061
|
+
const PaginationLink = ({
|
|
3062
|
+
className,
|
|
3063
|
+
isActive,
|
|
3064
|
+
size = "icon",
|
|
3065
|
+
...props
|
|
3066
|
+
}) => /* @__PURE__ */ jsx(
|
|
3067
|
+
"a",
|
|
3068
|
+
{
|
|
3069
|
+
"aria-current": isActive ? "page" : void 0,
|
|
3070
|
+
className: cn(
|
|
3071
|
+
buttonVariants({
|
|
3072
|
+
variant: isActive ? "general-secondary" : "general-tertiary",
|
|
3073
|
+
size
|
|
3074
|
+
}),
|
|
3075
|
+
className
|
|
3076
|
+
),
|
|
3077
|
+
...props
|
|
3078
|
+
}
|
|
3079
|
+
);
|
|
3080
|
+
PaginationLink.displayName = "PaginationLink";
|
|
3081
|
+
const PaginationPrevious = ({
|
|
3082
|
+
className,
|
|
3083
|
+
...props
|
|
3084
|
+
}) => /* @__PURE__ */ jsxs(
|
|
3085
|
+
PaginationLink,
|
|
3086
|
+
{
|
|
3087
|
+
"aria-label": "Go to previous page",
|
|
3088
|
+
size: "utility",
|
|
3089
|
+
className: cn("pagination-previous", className),
|
|
3090
|
+
...props,
|
|
3091
|
+
children: [
|
|
3092
|
+
/* @__PURE__ */ jsx(ChevronLeft, { className: "icon-4" }),
|
|
3093
|
+
/* @__PURE__ */ jsx("span", { children: "Previous" })
|
|
3094
|
+
]
|
|
3095
|
+
}
|
|
3096
|
+
);
|
|
3097
|
+
PaginationPrevious.displayName = "PaginationPrevious";
|
|
3098
|
+
const PaginationNext = ({
|
|
3099
|
+
className,
|
|
3100
|
+
...props
|
|
3101
|
+
}) => /* @__PURE__ */ jsxs(
|
|
3102
|
+
PaginationLink,
|
|
3103
|
+
{
|
|
3104
|
+
"aria-label": "Go to next page",
|
|
3105
|
+
size: "utility",
|
|
3106
|
+
className: cn("pagination-next", className),
|
|
3107
|
+
...props,
|
|
3108
|
+
children: [
|
|
3109
|
+
/* @__PURE__ */ jsx("span", { children: "Next" }),
|
|
3110
|
+
/* @__PURE__ */ jsx(ChevronRight, { className: "icon-4" })
|
|
3111
|
+
]
|
|
3112
|
+
}
|
|
3113
|
+
);
|
|
3114
|
+
PaginationNext.displayName = "PaginationNext";
|
|
3115
|
+
const PaginationEllipsis = ({
|
|
3116
|
+
className,
|
|
3117
|
+
...props
|
|
3118
|
+
}) => /* @__PURE__ */ jsxs(
|
|
3119
|
+
"span",
|
|
3120
|
+
{
|
|
3121
|
+
"aria-hidden": true,
|
|
3122
|
+
className: cn("pagination-ellipsis", className),
|
|
3123
|
+
...props,
|
|
3124
|
+
children: [
|
|
3125
|
+
/* @__PURE__ */ jsx(MoreHorizontal, { className: "icon-4" }),
|
|
3126
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "More pages" })
|
|
3127
|
+
]
|
|
3128
|
+
}
|
|
3129
|
+
);
|
|
3130
|
+
PaginationEllipsis.displayName = "PaginationEllipsis";
|
|
3131
|
+
const NavigationMenu = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
3132
|
+
NavigationMenuPrimitive.Root,
|
|
3133
|
+
{
|
|
3134
|
+
ref,
|
|
3135
|
+
className: cn("navigation-menu", className),
|
|
3136
|
+
...props,
|
|
3137
|
+
children: [
|
|
3138
|
+
children,
|
|
3139
|
+
/* @__PURE__ */ jsx(NavigationMenuViewport, {})
|
|
3140
|
+
]
|
|
3141
|
+
}
|
|
3142
|
+
));
|
|
3143
|
+
NavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName;
|
|
3144
|
+
const NavigationMenuList = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3145
|
+
NavigationMenuPrimitive.List,
|
|
3146
|
+
{
|
|
3147
|
+
ref,
|
|
3148
|
+
className: cn("navigation-menu-list", className),
|
|
3149
|
+
...props
|
|
3150
|
+
}
|
|
3151
|
+
));
|
|
3152
|
+
NavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName;
|
|
3153
|
+
const NavigationMenuItem = NavigationMenuPrimitive.Item;
|
|
3154
|
+
const navigationMenuTriggerStyle = cva("navigation-menu-trigger");
|
|
3155
|
+
const NavigationMenuTrigger = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
3156
|
+
NavigationMenuPrimitive.Trigger,
|
|
3157
|
+
{
|
|
3158
|
+
ref,
|
|
3159
|
+
className: cn(navigationMenuTriggerStyle(), className),
|
|
3160
|
+
...props,
|
|
3161
|
+
children: [
|
|
3162
|
+
children,
|
|
3163
|
+
" ",
|
|
3164
|
+
/* @__PURE__ */ jsx(
|
|
3165
|
+
ChevronDown,
|
|
3166
|
+
{
|
|
3167
|
+
className: "navigation-menu-trigger-icon",
|
|
3168
|
+
"aria-hidden": "true"
|
|
3169
|
+
}
|
|
3170
|
+
)
|
|
3171
|
+
]
|
|
3172
|
+
}
|
|
3173
|
+
));
|
|
3174
|
+
NavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName;
|
|
3175
|
+
const NavigationMenuContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3176
|
+
NavigationMenuPrimitive.Content,
|
|
3177
|
+
{
|
|
3178
|
+
ref,
|
|
3179
|
+
className: cn("navigation-menu-content", className),
|
|
3180
|
+
...props
|
|
3181
|
+
}
|
|
3182
|
+
));
|
|
3183
|
+
NavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName;
|
|
3184
|
+
const NavigationMenuLink = NavigationMenuPrimitive.Link;
|
|
3185
|
+
const NavigationMenuViewport = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { className: "navigation-menu-viewport-wrapper", children: /* @__PURE__ */ jsx(
|
|
3186
|
+
NavigationMenuPrimitive.Viewport,
|
|
3187
|
+
{
|
|
3188
|
+
className: cn("navigation-menu-viewport", className),
|
|
3189
|
+
ref,
|
|
3190
|
+
...props
|
|
3191
|
+
}
|
|
3192
|
+
) }));
|
|
3193
|
+
NavigationMenuViewport.displayName = NavigationMenuPrimitive.Viewport.displayName;
|
|
3194
|
+
const NavigationMenuIndicator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3195
|
+
NavigationMenuPrimitive.Indicator,
|
|
3196
|
+
{
|
|
3197
|
+
ref,
|
|
3198
|
+
className: cn("navigation-menu-indicator", className),
|
|
3199
|
+
...props
|
|
3200
|
+
}
|
|
3201
|
+
));
|
|
3202
|
+
NavigationMenuIndicator.displayName = NavigationMenuPrimitive.Indicator.displayName;
|
|
3203
|
+
const MenubarMenu = MenubarPrimitive.Menu;
|
|
3204
|
+
const MenubarSub = MenubarPrimitive.Sub;
|
|
3205
|
+
const MenubarRadioGroup = MenubarPrimitive.RadioGroup;
|
|
3206
|
+
const Menubar = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3207
|
+
MenubarPrimitive.Root,
|
|
3208
|
+
{
|
|
3209
|
+
ref,
|
|
3210
|
+
className: cn("menubar", className),
|
|
3211
|
+
...props
|
|
3212
|
+
}
|
|
3213
|
+
));
|
|
3214
|
+
Menubar.displayName = MenubarPrimitive.Root.displayName;
|
|
3215
|
+
const MenubarTrigger = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3216
|
+
MenubarPrimitive.Trigger,
|
|
3217
|
+
{
|
|
3218
|
+
ref,
|
|
3219
|
+
className: cn("menubar-trigger", className),
|
|
3220
|
+
...props
|
|
3221
|
+
}
|
|
3222
|
+
));
|
|
3223
|
+
MenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName;
|
|
3224
|
+
const MenubarSubTrigger = React.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
3225
|
+
MenubarPrimitive.SubTrigger,
|
|
3226
|
+
{
|
|
3227
|
+
ref,
|
|
3228
|
+
className: cn(
|
|
3229
|
+
"menubar-sub-trigger",
|
|
3230
|
+
inset && "menubar-sub-trigger--inset",
|
|
3231
|
+
className
|
|
3232
|
+
),
|
|
3233
|
+
...props,
|
|
3234
|
+
children: [
|
|
3235
|
+
children,
|
|
3236
|
+
/* @__PURE__ */ jsx(ChevronRight, { className: "icon-4" })
|
|
3237
|
+
]
|
|
3238
|
+
}
|
|
3239
|
+
));
|
|
3240
|
+
MenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName;
|
|
3241
|
+
const MenubarSubContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3242
|
+
MenubarPrimitive.SubContent,
|
|
3243
|
+
{
|
|
3244
|
+
ref,
|
|
3245
|
+
className: cn("menubar-sub-content", className),
|
|
3246
|
+
...props
|
|
3247
|
+
}
|
|
3248
|
+
));
|
|
3249
|
+
MenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName;
|
|
3250
|
+
const MenubarContent = React.forwardRef(
|
|
3251
|
+
({ className, align = "start", alignOffset = -4, sideOffset = 8, ...props }, ref) => /* @__PURE__ */ jsx(MenubarPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
3252
|
+
MenubarPrimitive.Content,
|
|
3253
|
+
{
|
|
3254
|
+
ref,
|
|
3255
|
+
align,
|
|
3256
|
+
alignOffset,
|
|
3257
|
+
sideOffset,
|
|
3258
|
+
className: cn("menubar-content", className),
|
|
3259
|
+
...props
|
|
3260
|
+
}
|
|
3261
|
+
) })
|
|
3262
|
+
);
|
|
3263
|
+
MenubarContent.displayName = MenubarPrimitive.Content.displayName;
|
|
3264
|
+
const MenubarItem = React.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3265
|
+
MenubarPrimitive.Item,
|
|
3266
|
+
{
|
|
3267
|
+
ref,
|
|
3268
|
+
className: cn(
|
|
3269
|
+
"menubar-item",
|
|
3270
|
+
inset && "menubar-item--inset",
|
|
3271
|
+
className
|
|
3272
|
+
),
|
|
3273
|
+
...props
|
|
3274
|
+
}
|
|
3275
|
+
));
|
|
3276
|
+
MenubarItem.displayName = MenubarPrimitive.Item.displayName;
|
|
3277
|
+
const MenubarCheckboxItem = React.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
3278
|
+
MenubarPrimitive.CheckboxItem,
|
|
3279
|
+
{
|
|
3280
|
+
ref,
|
|
3281
|
+
className: cn("menubar-checkbox-item", className),
|
|
3282
|
+
checked,
|
|
3283
|
+
...props,
|
|
3284
|
+
children: [
|
|
3285
|
+
/* @__PURE__ */ jsx("span", { className: "menubar-item-indicator", children: /* @__PURE__ */ jsx(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: "icon-4" }) }) }),
|
|
3286
|
+
children
|
|
3287
|
+
]
|
|
3288
|
+
}
|
|
3289
|
+
));
|
|
3290
|
+
MenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName;
|
|
3291
|
+
const MenubarRadioItem = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
3292
|
+
MenubarPrimitive.RadioItem,
|
|
3293
|
+
{
|
|
3294
|
+
ref,
|
|
3295
|
+
className: cn("menubar-radio-item", className),
|
|
3296
|
+
...props,
|
|
3297
|
+
children: [
|
|
3298
|
+
/* @__PURE__ */ jsx("span", { className: "menubar-item-indicator", children: /* @__PURE__ */ jsx(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Circle, { className: "icon-2 fill-current" }) }) }),
|
|
3299
|
+
children
|
|
3300
|
+
]
|
|
3301
|
+
}
|
|
3302
|
+
));
|
|
3303
|
+
MenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName;
|
|
3304
|
+
const MenubarLabel = React.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3305
|
+
MenubarPrimitive.Label,
|
|
3306
|
+
{
|
|
3307
|
+
ref,
|
|
3308
|
+
className: cn(
|
|
3309
|
+
"menubar-label",
|
|
3310
|
+
inset && "menubar-label--inset",
|
|
3311
|
+
className
|
|
3312
|
+
),
|
|
3313
|
+
...props
|
|
3314
|
+
}
|
|
3315
|
+
));
|
|
3316
|
+
MenubarLabel.displayName = MenubarPrimitive.Label.displayName;
|
|
3317
|
+
const MenubarSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3318
|
+
MenubarPrimitive.Separator,
|
|
3319
|
+
{
|
|
3320
|
+
ref,
|
|
3321
|
+
className: cn("menubar-separator", className),
|
|
3322
|
+
...props
|
|
3323
|
+
}
|
|
3324
|
+
));
|
|
3325
|
+
MenubarSeparator.displayName = MenubarPrimitive.Separator.displayName;
|
|
3326
|
+
const MenubarShortcut = ({
|
|
3327
|
+
className,
|
|
3328
|
+
...props
|
|
3329
|
+
}) => {
|
|
3330
|
+
return /* @__PURE__ */ jsx(
|
|
3331
|
+
"span",
|
|
3332
|
+
{
|
|
3333
|
+
className: cn("menubar-shortcut", className),
|
|
3334
|
+
...props
|
|
3335
|
+
}
|
|
3336
|
+
);
|
|
3337
|
+
};
|
|
3338
|
+
MenubarShortcut.displayname = "MenubarShortcut";
|
|
3339
|
+
const DropdownMenu = DropdownMenuPrimitive.Root;
|
|
3340
|
+
const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
3341
|
+
const DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
3342
|
+
const DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
3343
|
+
const DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
3344
|
+
const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
3345
|
+
const DropdownMenuSubTrigger = React.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
3346
|
+
DropdownMenuPrimitive.SubTrigger,
|
|
3347
|
+
{
|
|
3348
|
+
ref,
|
|
3349
|
+
className: cn(
|
|
3350
|
+
"dropdown-menu-sub-trigger",
|
|
3351
|
+
inset && "dropdown-menu-sub-trigger--inset",
|
|
3352
|
+
className
|
|
3353
|
+
),
|
|
3354
|
+
...props,
|
|
3355
|
+
children: [
|
|
3356
|
+
children,
|
|
3357
|
+
/* @__PURE__ */ jsx(ChevronRight, { className: "dropdown-menu-sub-trigger-icon icon-4" })
|
|
3358
|
+
]
|
|
3359
|
+
}
|
|
3360
|
+
));
|
|
3361
|
+
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
3362
|
+
const DropdownMenuSubContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3363
|
+
DropdownMenuPrimitive.SubContent,
|
|
3364
|
+
{
|
|
3365
|
+
ref,
|
|
3366
|
+
className: cn("dropdown-menu-sub-content", className),
|
|
3367
|
+
...props
|
|
3368
|
+
}
|
|
3369
|
+
));
|
|
3370
|
+
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
3371
|
+
const DropdownMenuContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
3372
|
+
DropdownMenuPrimitive.Content,
|
|
3373
|
+
{
|
|
3374
|
+
ref,
|
|
3375
|
+
sideOffset,
|
|
3376
|
+
className: cn("dropdown-menu-content", className),
|
|
3377
|
+
...props
|
|
3378
|
+
}
|
|
3379
|
+
) }));
|
|
3380
|
+
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
3381
|
+
const DropdownMenuItem = React.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3382
|
+
DropdownMenuPrimitive.Item,
|
|
3383
|
+
{
|
|
3384
|
+
ref,
|
|
3385
|
+
className: cn(
|
|
3386
|
+
"dropdown-menu-item",
|
|
3387
|
+
inset && "dropdown-menu-item--inset",
|
|
3388
|
+
className
|
|
3389
|
+
),
|
|
3390
|
+
...props
|
|
3391
|
+
}
|
|
3392
|
+
));
|
|
3393
|
+
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
3394
|
+
const DropdownMenuCheckboxItem = React.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
3395
|
+
DropdownMenuPrimitive.CheckboxItem,
|
|
3396
|
+
{
|
|
3397
|
+
ref,
|
|
3398
|
+
className: cn("dropdown-menu-checkbox-item", className),
|
|
3399
|
+
checked,
|
|
3400
|
+
...props,
|
|
3401
|
+
children: [
|
|
3402
|
+
/* @__PURE__ */ jsx("span", { className: "dropdown-menu-item-indicator", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: "icon-4" }) }) }),
|
|
3403
|
+
children
|
|
3404
|
+
]
|
|
3405
|
+
}
|
|
3406
|
+
));
|
|
3407
|
+
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
3408
|
+
const DropdownMenuRadioItem = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
3409
|
+
DropdownMenuPrimitive.RadioItem,
|
|
3410
|
+
{
|
|
3411
|
+
ref,
|
|
3412
|
+
className: cn("dropdown-menu-radio-item", className),
|
|
3413
|
+
...props,
|
|
3414
|
+
children: [
|
|
3415
|
+
/* @__PURE__ */ jsx("span", { className: "dropdown-menu-item-indicator", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Circle, { className: "icon-2 fill-current" }) }) }),
|
|
3416
|
+
children
|
|
3417
|
+
]
|
|
3418
|
+
}
|
|
3419
|
+
));
|
|
3420
|
+
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
3421
|
+
const DropdownMenuLabel = React.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3422
|
+
DropdownMenuPrimitive.Label,
|
|
3423
|
+
{
|
|
3424
|
+
ref,
|
|
3425
|
+
className: cn(
|
|
3426
|
+
"dropdown-menu-label",
|
|
3427
|
+
inset && "dropdown-menu-label--inset",
|
|
3428
|
+
className
|
|
3429
|
+
),
|
|
3430
|
+
...props
|
|
3431
|
+
}
|
|
3432
|
+
));
|
|
3433
|
+
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
3434
|
+
const DropdownMenuSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3435
|
+
DropdownMenuPrimitive.Separator,
|
|
3436
|
+
{
|
|
3437
|
+
ref,
|
|
3438
|
+
className: cn("dropdown-menu-separator", className),
|
|
3439
|
+
...props
|
|
3440
|
+
}
|
|
3441
|
+
));
|
|
3442
|
+
DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
|
|
3443
|
+
const DropdownMenuShortcut = ({
|
|
3444
|
+
className,
|
|
3445
|
+
...props
|
|
3446
|
+
}) => {
|
|
3447
|
+
return /* @__PURE__ */ jsx(
|
|
3448
|
+
"span",
|
|
3449
|
+
{
|
|
3450
|
+
className: cn("dropdown-menu-shortcut", className),
|
|
3451
|
+
...props
|
|
3452
|
+
}
|
|
3453
|
+
);
|
|
3454
|
+
};
|
|
3455
|
+
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
3456
|
+
const Drawer = ({
|
|
3457
|
+
shouldScaleBackground = true,
|
|
3458
|
+
...props
|
|
3459
|
+
}) => /* @__PURE__ */ jsx(
|
|
3460
|
+
Drawer$1.Root,
|
|
3461
|
+
{
|
|
3462
|
+
shouldScaleBackground,
|
|
3463
|
+
...props
|
|
3464
|
+
}
|
|
3465
|
+
);
|
|
3466
|
+
Drawer.displayName = "Drawer";
|
|
3467
|
+
const DrawerTrigger = Drawer$1.Trigger;
|
|
3468
|
+
const DrawerPortal = Drawer$1.Portal;
|
|
3469
|
+
const DrawerClose = Drawer$1.Close;
|
|
3470
|
+
const DrawerOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3471
|
+
Drawer$1.Overlay,
|
|
3472
|
+
{
|
|
3473
|
+
ref,
|
|
3474
|
+
className: cn("drawer-overlay", className),
|
|
3475
|
+
...props
|
|
3476
|
+
}
|
|
3477
|
+
));
|
|
3478
|
+
DrawerOverlay.displayName = Drawer$1.Overlay.displayName;
|
|
3479
|
+
const DrawerContent = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DrawerPortal, { children: [
|
|
3480
|
+
/* @__PURE__ */ jsx(DrawerOverlay, {}),
|
|
3481
|
+
/* @__PURE__ */ jsxs(
|
|
3482
|
+
Drawer$1.Content,
|
|
3483
|
+
{
|
|
3484
|
+
ref,
|
|
3485
|
+
className: cn("drawer-content", className),
|
|
3486
|
+
...props,
|
|
3487
|
+
children: [
|
|
3488
|
+
/* @__PURE__ */ jsx("div", { className: "drawer-handle" }),
|
|
3489
|
+
children
|
|
3490
|
+
]
|
|
3491
|
+
}
|
|
3492
|
+
)
|
|
3493
|
+
] }));
|
|
3494
|
+
DrawerContent.displayName = "DrawerContent";
|
|
3495
|
+
const DrawerHeader = ({
|
|
3496
|
+
className,
|
|
3497
|
+
...props
|
|
3498
|
+
}) => /* @__PURE__ */ jsx(
|
|
3499
|
+
"div",
|
|
3500
|
+
{
|
|
3501
|
+
className: cn("drawer-header", className),
|
|
3502
|
+
...props
|
|
3503
|
+
}
|
|
3504
|
+
);
|
|
3505
|
+
DrawerHeader.displayName = "DrawerHeader";
|
|
3506
|
+
const DrawerFooter = ({
|
|
3507
|
+
className,
|
|
3508
|
+
...props
|
|
3509
|
+
}) => /* @__PURE__ */ jsx(
|
|
3510
|
+
"div",
|
|
3511
|
+
{
|
|
3512
|
+
className: cn("drawer-footer", className),
|
|
3513
|
+
...props
|
|
3514
|
+
}
|
|
3515
|
+
);
|
|
3516
|
+
DrawerFooter.displayName = "DrawerFooter";
|
|
3517
|
+
const DrawerTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3518
|
+
Drawer$1.Title,
|
|
3519
|
+
{
|
|
3520
|
+
ref,
|
|
3521
|
+
className: cn("drawer-title", className),
|
|
3522
|
+
...props
|
|
3523
|
+
}
|
|
3524
|
+
));
|
|
3525
|
+
DrawerTitle.displayName = Drawer$1.Title.displayName;
|
|
3526
|
+
const DrawerDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3527
|
+
Drawer$1.Description,
|
|
3528
|
+
{
|
|
3529
|
+
ref,
|
|
3530
|
+
className: cn("drawer-description", className),
|
|
3531
|
+
...props
|
|
3532
|
+
}
|
|
3533
|
+
));
|
|
3534
|
+
DrawerDescription.displayName = Drawer$1.Description.displayName;
|
|
3535
|
+
const Popover = PopoverPrimitive.Root;
|
|
3536
|
+
const PopoverTrigger = PopoverPrimitive.Trigger;
|
|
3537
|
+
const PopoverContent = React.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
3538
|
+
PopoverPrimitive.Content,
|
|
3539
|
+
{
|
|
3540
|
+
ref,
|
|
3541
|
+
align,
|
|
3542
|
+
sideOffset,
|
|
3543
|
+
className: cn("popover-content", className),
|
|
3544
|
+
...props
|
|
3545
|
+
}
|
|
3546
|
+
) }));
|
|
3547
|
+
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
3548
|
+
const HoverCard = HoverCardPrimitive.Root;
|
|
3549
|
+
const HoverCardTrigger = HoverCardPrimitive.Trigger;
|
|
3550
|
+
const HoverCardContent = React.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3551
|
+
HoverCardPrimitive.Content,
|
|
3552
|
+
{
|
|
3553
|
+
ref,
|
|
3554
|
+
align,
|
|
3555
|
+
sideOffset,
|
|
3556
|
+
className: cn("hover-card-content", className),
|
|
3557
|
+
...props
|
|
3558
|
+
}
|
|
3559
|
+
));
|
|
3560
|
+
HoverCardContent.displayName = HoverCardPrimitive.Content.displayName;
|
|
3561
|
+
const ContextMenu = ContextMenuPrimitive.Root;
|
|
3562
|
+
const ContextMenuTrigger = ContextMenuPrimitive.Trigger;
|
|
3563
|
+
const ContextMenuGroup = ContextMenuPrimitive.Group;
|
|
3564
|
+
const ContextMenuPortal = ContextMenuPrimitive.Portal;
|
|
3565
|
+
const ContextMenuSub = ContextMenuPrimitive.Sub;
|
|
3566
|
+
const ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;
|
|
3567
|
+
const ContextMenuSubTrigger = React.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
3568
|
+
ContextMenuPrimitive.SubTrigger,
|
|
3569
|
+
{
|
|
3570
|
+
ref,
|
|
3571
|
+
className: cn(
|
|
3572
|
+
"context-menu-sub-trigger",
|
|
3573
|
+
inset && "context-menu-sub-trigger--inset",
|
|
3574
|
+
className
|
|
3575
|
+
),
|
|
3576
|
+
...props,
|
|
3577
|
+
children: [
|
|
3578
|
+
children,
|
|
3579
|
+
/* @__PURE__ */ jsx(ChevronRight, { className: "icon-4" })
|
|
3580
|
+
]
|
|
3581
|
+
}
|
|
3582
|
+
));
|
|
3583
|
+
ContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;
|
|
3584
|
+
const ContextMenuSubContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3585
|
+
ContextMenuPrimitive.SubContent,
|
|
3586
|
+
{
|
|
3587
|
+
ref,
|
|
3588
|
+
className: cn("context-menu-sub-content", className),
|
|
3589
|
+
...props
|
|
3590
|
+
}
|
|
3591
|
+
));
|
|
3592
|
+
ContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;
|
|
3593
|
+
const ContextMenuContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(ContextMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
3594
|
+
ContextMenuPrimitive.Content,
|
|
3595
|
+
{
|
|
3596
|
+
ref,
|
|
3597
|
+
className: cn("context-menu-content", className),
|
|
3598
|
+
...props
|
|
3599
|
+
}
|
|
3600
|
+
) }));
|
|
3601
|
+
ContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;
|
|
3602
|
+
const ContextMenuItem = React.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3603
|
+
ContextMenuPrimitive.Item,
|
|
3604
|
+
{
|
|
3605
|
+
ref,
|
|
3606
|
+
className: cn(
|
|
3607
|
+
"context-menu-item",
|
|
3608
|
+
inset && "context-menu-item--inset",
|
|
3609
|
+
className
|
|
3610
|
+
),
|
|
3611
|
+
...props
|
|
3612
|
+
}
|
|
3613
|
+
));
|
|
3614
|
+
ContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;
|
|
3615
|
+
const ContextMenuCheckboxItem = React.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
3616
|
+
ContextMenuPrimitive.CheckboxItem,
|
|
3617
|
+
{
|
|
3618
|
+
ref,
|
|
3619
|
+
className: cn("context-menu-checkbox-item", className),
|
|
3620
|
+
checked,
|
|
3621
|
+
...props,
|
|
3622
|
+
children: [
|
|
3623
|
+
/* @__PURE__ */ jsx("span", { className: "context-menu-item-indicator", children: /* @__PURE__ */ jsx(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: "icon-4" }) }) }),
|
|
3624
|
+
children
|
|
3625
|
+
]
|
|
3626
|
+
}
|
|
3627
|
+
));
|
|
3628
|
+
ContextMenuCheckboxItem.displayName = ContextMenuPrimitive.CheckboxItem.displayName;
|
|
3629
|
+
const ContextMenuRadioItem = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
3630
|
+
ContextMenuPrimitive.RadioItem,
|
|
3631
|
+
{
|
|
3632
|
+
ref,
|
|
3633
|
+
className: cn("context-menu-radio-item", className),
|
|
3634
|
+
...props,
|
|
3635
|
+
children: [
|
|
3636
|
+
/* @__PURE__ */ jsx("span", { className: "context-menu-item-indicator", children: /* @__PURE__ */ jsx(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Circle, { className: "icon-2 fill-current" }) }) }),
|
|
3637
|
+
children
|
|
3638
|
+
]
|
|
3639
|
+
}
|
|
3640
|
+
));
|
|
3641
|
+
ContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;
|
|
3642
|
+
const ContextMenuLabel = React.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3643
|
+
ContextMenuPrimitive.Label,
|
|
3644
|
+
{
|
|
3645
|
+
ref,
|
|
3646
|
+
className: cn(
|
|
3647
|
+
"context-menu-label",
|
|
3648
|
+
inset && "context-menu-label--inset",
|
|
3649
|
+
className
|
|
3650
|
+
),
|
|
3651
|
+
...props
|
|
3652
|
+
}
|
|
3653
|
+
));
|
|
3654
|
+
ContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;
|
|
3655
|
+
const ContextMenuSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3656
|
+
ContextMenuPrimitive.Separator,
|
|
3657
|
+
{
|
|
3658
|
+
ref,
|
|
3659
|
+
className: cn("context-menu-separator", className),
|
|
3660
|
+
...props
|
|
3661
|
+
}
|
|
3662
|
+
));
|
|
3663
|
+
ContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName;
|
|
3664
|
+
const ContextMenuShortcut = ({
|
|
3665
|
+
className,
|
|
3666
|
+
...props
|
|
3667
|
+
}) => {
|
|
3668
|
+
return /* @__PURE__ */ jsx(
|
|
3669
|
+
"span",
|
|
3670
|
+
{
|
|
3671
|
+
className: cn("context-menu-shortcut", className),
|
|
3672
|
+
...props
|
|
3673
|
+
}
|
|
3674
|
+
);
|
|
3675
|
+
};
|
|
3676
|
+
ContextMenuShortcut.displayName = "ContextMenuShortcut";
|
|
3677
|
+
const CarouselContext = React.createContext(null);
|
|
3678
|
+
function useCarousel() {
|
|
3679
|
+
const context = React.useContext(CarouselContext);
|
|
3680
|
+
if (!context) {
|
|
3681
|
+
throw new Error("useCarousel must be used within a <Carousel />");
|
|
3682
|
+
}
|
|
3683
|
+
return context;
|
|
3684
|
+
}
|
|
3685
|
+
const Carousel = React.forwardRef(
|
|
3686
|
+
({
|
|
3687
|
+
orientation = "horizontal",
|
|
3688
|
+
opts,
|
|
3689
|
+
setApi,
|
|
3690
|
+
plugins,
|
|
3691
|
+
className,
|
|
3692
|
+
children,
|
|
3693
|
+
...props
|
|
3694
|
+
}, ref) => {
|
|
3695
|
+
const [carouselRef, api] = useEmblaCarousel(
|
|
3696
|
+
{
|
|
3697
|
+
...opts,
|
|
3698
|
+
axis: orientation === "horizontal" ? "x" : "y"
|
|
3699
|
+
},
|
|
3700
|
+
plugins
|
|
3701
|
+
);
|
|
3702
|
+
const [canScrollPrev, setCanScrollPrev] = React.useState(false);
|
|
3703
|
+
const [canScrollNext, setCanScrollNext] = React.useState(false);
|
|
3704
|
+
const onSelect = React.useCallback((api2) => {
|
|
3705
|
+
if (!api2) {
|
|
3706
|
+
return;
|
|
3707
|
+
}
|
|
3708
|
+
setCanScrollPrev(api2.canScrollPrev());
|
|
3709
|
+
setCanScrollNext(api2.canScrollNext());
|
|
3710
|
+
}, []);
|
|
3711
|
+
const scrollPrev = React.useCallback(() => {
|
|
3712
|
+
api == null ? void 0 : api.scrollPrev();
|
|
3713
|
+
}, [api]);
|
|
3714
|
+
const scrollNext = React.useCallback(() => {
|
|
3715
|
+
api == null ? void 0 : api.scrollNext();
|
|
3716
|
+
}, [api]);
|
|
3717
|
+
const handleKeyDown = React.useCallback(
|
|
3718
|
+
(event) => {
|
|
3719
|
+
if (event.key === "ArrowLeft") {
|
|
3720
|
+
event.preventDefault();
|
|
3721
|
+
scrollPrev();
|
|
3722
|
+
} else if (event.key === "ArrowRight") {
|
|
3723
|
+
event.preventDefault();
|
|
3724
|
+
scrollNext();
|
|
3725
|
+
}
|
|
3726
|
+
},
|
|
3727
|
+
[scrollPrev, scrollNext]
|
|
3728
|
+
);
|
|
3729
|
+
React.useEffect(() => {
|
|
3730
|
+
if (!api || !setApi) {
|
|
3731
|
+
return;
|
|
3732
|
+
}
|
|
3733
|
+
setApi(api);
|
|
3734
|
+
}, [api, setApi]);
|
|
3735
|
+
React.useEffect(() => {
|
|
3736
|
+
if (!api) {
|
|
3737
|
+
return;
|
|
3738
|
+
}
|
|
3739
|
+
onSelect(api);
|
|
3740
|
+
api.on("reInit", onSelect);
|
|
3741
|
+
api.on("select", onSelect);
|
|
3742
|
+
return () => {
|
|
3743
|
+
api == null ? void 0 : api.off("select", onSelect);
|
|
3744
|
+
};
|
|
3745
|
+
}, [api, onSelect]);
|
|
3746
|
+
return /* @__PURE__ */ jsx(
|
|
3747
|
+
CarouselContext.Provider,
|
|
3748
|
+
{
|
|
3749
|
+
value: {
|
|
3750
|
+
carouselRef,
|
|
3751
|
+
api,
|
|
3752
|
+
opts,
|
|
3753
|
+
orientation: orientation || ((opts == null ? void 0 : opts.axis) === "y" ? "vertical" : "horizontal"),
|
|
3754
|
+
scrollPrev,
|
|
3755
|
+
scrollNext,
|
|
3756
|
+
canScrollPrev,
|
|
3757
|
+
canScrollNext
|
|
3758
|
+
},
|
|
3759
|
+
children: /* @__PURE__ */ jsx(
|
|
3760
|
+
"div",
|
|
3761
|
+
{
|
|
3762
|
+
ref,
|
|
3763
|
+
onKeyDownCapture: handleKeyDown,
|
|
3764
|
+
className: cn("carousel", className),
|
|
3765
|
+
role: "region",
|
|
3766
|
+
"aria-roledescription": "carousel",
|
|
3767
|
+
...props,
|
|
3768
|
+
children
|
|
3769
|
+
}
|
|
3770
|
+
)
|
|
3771
|
+
}
|
|
3772
|
+
);
|
|
3773
|
+
}
|
|
3774
|
+
);
|
|
3775
|
+
Carousel.displayName = "Carousel";
|
|
3776
|
+
const CarouselContent = React.forwardRef(({ className, ...props }, ref) => {
|
|
3777
|
+
const { carouselRef, orientation } = useCarousel();
|
|
3778
|
+
return /* @__PURE__ */ jsx("div", { ref: carouselRef, className: "carousel-viewport", children: /* @__PURE__ */ jsx(
|
|
3779
|
+
"div",
|
|
3780
|
+
{
|
|
3781
|
+
ref,
|
|
3782
|
+
className: cn(
|
|
3783
|
+
"carousel-content",
|
|
3784
|
+
orientation === "horizontal" ? "carousel-content--horizontal" : "carousel-content--vertical",
|
|
3785
|
+
className
|
|
3786
|
+
),
|
|
3787
|
+
...props
|
|
3788
|
+
}
|
|
3789
|
+
) });
|
|
3790
|
+
});
|
|
3791
|
+
CarouselContent.displayName = "CarouselContent";
|
|
3792
|
+
const CarouselItem = React.forwardRef(({ className, ...props }, ref) => {
|
|
3793
|
+
const { orientation } = useCarousel();
|
|
3794
|
+
return /* @__PURE__ */ jsx(
|
|
3795
|
+
"div",
|
|
3796
|
+
{
|
|
3797
|
+
ref,
|
|
3798
|
+
role: "group",
|
|
3799
|
+
"aria-roledescription": "slide",
|
|
3800
|
+
className: cn(
|
|
3801
|
+
"carousel-item",
|
|
3802
|
+
orientation === "horizontal" ? "carousel-item--horizontal" : "carousel-item--vertical",
|
|
3803
|
+
className
|
|
3804
|
+
),
|
|
3805
|
+
...props
|
|
3806
|
+
}
|
|
3807
|
+
);
|
|
3808
|
+
});
|
|
3809
|
+
CarouselItem.displayName = "CarouselItem";
|
|
3810
|
+
const CarouselPrevious = React.forwardRef(
|
|
3811
|
+
({ className, variant: variant2 = "general-secondary", size = "icon", ...props }, ref) => {
|
|
3812
|
+
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
3813
|
+
return /* @__PURE__ */ jsxs(
|
|
3814
|
+
Button,
|
|
3815
|
+
{
|
|
3816
|
+
ref,
|
|
3817
|
+
variant: variant2,
|
|
3818
|
+
size,
|
|
3819
|
+
className: cn(
|
|
3820
|
+
"carousel-button carousel-button--previous",
|
|
3821
|
+
orientation === "horizontal" ? "carousel-button--horizontal" : "carousel-button--vertical",
|
|
3822
|
+
className
|
|
3823
|
+
),
|
|
3824
|
+
disabled: !canScrollPrev,
|
|
3825
|
+
onClick: scrollPrev,
|
|
3826
|
+
...props,
|
|
3827
|
+
children: [
|
|
3828
|
+
/* @__PURE__ */ jsx(ArrowLeft, { className: "icon-4" }),
|
|
3829
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Previous slide" })
|
|
3830
|
+
]
|
|
3831
|
+
}
|
|
3832
|
+
);
|
|
3833
|
+
}
|
|
3834
|
+
);
|
|
3835
|
+
CarouselPrevious.displayName = "CarouselPrevious";
|
|
3836
|
+
const CarouselNext = React.forwardRef(
|
|
3837
|
+
({ className, variant: variant2 = "general-secondary", size = "icon", ...props }, ref) => {
|
|
3838
|
+
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
3839
|
+
return /* @__PURE__ */ jsxs(
|
|
3840
|
+
Button,
|
|
3841
|
+
{
|
|
3842
|
+
ref,
|
|
3843
|
+
variant: variant2,
|
|
3844
|
+
size,
|
|
3845
|
+
className: cn(
|
|
3846
|
+
"carousel-button carousel-button--next",
|
|
3847
|
+
orientation === "horizontal" ? "carousel-button--horizontal" : "carousel-button--vertical",
|
|
3848
|
+
className
|
|
3849
|
+
),
|
|
3850
|
+
disabled: !canScrollNext,
|
|
3851
|
+
onClick: scrollNext,
|
|
3852
|
+
...props,
|
|
3853
|
+
children: [
|
|
3854
|
+
/* @__PURE__ */ jsx(ArrowRight, { className: "icon-4" }),
|
|
3855
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Next slide" })
|
|
3856
|
+
]
|
|
3857
|
+
}
|
|
3858
|
+
);
|
|
3859
|
+
}
|
|
3860
|
+
);
|
|
3861
|
+
CarouselNext.displayName = "CarouselNext";
|
|
3862
|
+
const Collapsible = CollapsiblePrimitive.Root;
|
|
3863
|
+
const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger;
|
|
3864
|
+
const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent;
|
|
3865
|
+
const ToastProvider = ToastPrimitives.Provider;
|
|
3866
|
+
const ToastViewport = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3867
|
+
ToastPrimitives.Viewport,
|
|
3868
|
+
{
|
|
3869
|
+
ref,
|
|
3870
|
+
className: cn("toast-viewport", className),
|
|
3871
|
+
...props
|
|
3872
|
+
}
|
|
3873
|
+
));
|
|
3874
|
+
ToastViewport.displayName = ToastPrimitives.Viewport.displayName;
|
|
3875
|
+
const toastVariants = cva(
|
|
3876
|
+
"toast",
|
|
3877
|
+
{
|
|
3878
|
+
variants: {
|
|
3879
|
+
variant: {
|
|
3880
|
+
default: "toast--default",
|
|
3881
|
+
destructive: "toast--destructive"
|
|
3882
|
+
}
|
|
3883
|
+
},
|
|
3884
|
+
defaultVariants: {
|
|
3885
|
+
variant: "default"
|
|
3886
|
+
}
|
|
3887
|
+
}
|
|
3888
|
+
);
|
|
3889
|
+
const Toast = React.forwardRef(({ className, variant: variant2, ...props }, ref) => {
|
|
3890
|
+
return /* @__PURE__ */ jsx(
|
|
3891
|
+
ToastPrimitives.Root,
|
|
3892
|
+
{
|
|
3893
|
+
ref,
|
|
3894
|
+
className: cn(toastVariants({ variant: variant2 }), className),
|
|
3895
|
+
...props
|
|
3896
|
+
}
|
|
3897
|
+
);
|
|
3898
|
+
});
|
|
3899
|
+
Toast.displayName = ToastPrimitives.Root.displayName;
|
|
3900
|
+
const ToastAction = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3901
|
+
ToastPrimitives.Action,
|
|
3902
|
+
{
|
|
3903
|
+
ref,
|
|
3904
|
+
className: cn("toast-action", className),
|
|
3905
|
+
...props
|
|
3906
|
+
}
|
|
3907
|
+
));
|
|
3908
|
+
ToastAction.displayName = ToastPrimitives.Action.displayName;
|
|
3909
|
+
const ToastClose = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3910
|
+
ToastPrimitives.Close,
|
|
3911
|
+
{
|
|
3912
|
+
ref,
|
|
3913
|
+
className: cn("toast-close", className),
|
|
3914
|
+
"toast-close": "",
|
|
3915
|
+
...props,
|
|
3916
|
+
children: /* @__PURE__ */ jsx(X, { className: "icon-4" })
|
|
3917
|
+
}
|
|
3918
|
+
));
|
|
3919
|
+
ToastClose.displayName = ToastPrimitives.Close.displayName;
|
|
3920
|
+
const ToastTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3921
|
+
ToastPrimitives.Title,
|
|
3922
|
+
{
|
|
3923
|
+
ref,
|
|
3924
|
+
className: cn("toast-title", className),
|
|
3925
|
+
...props
|
|
3926
|
+
}
|
|
3927
|
+
));
|
|
3928
|
+
ToastTitle.displayName = ToastPrimitives.Title.displayName;
|
|
3929
|
+
const ToastDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3930
|
+
ToastPrimitives.Description,
|
|
3931
|
+
{
|
|
3932
|
+
ref,
|
|
3933
|
+
className: cn("toast-description", className),
|
|
3934
|
+
...props
|
|
3935
|
+
}
|
|
3936
|
+
));
|
|
3937
|
+
ToastDescription.displayName = ToastPrimitives.Description.displayName;
|
|
3938
|
+
const TOAST_LIMIT = 1;
|
|
3939
|
+
const TOAST_REMOVE_DELAY = 1e6;
|
|
3940
|
+
let count = 0;
|
|
3941
|
+
function genId() {
|
|
3942
|
+
count = (count + 1) % Number.MAX_SAFE_INTEGER;
|
|
3943
|
+
return count.toString();
|
|
3944
|
+
}
|
|
3945
|
+
const toastTimeouts = /* @__PURE__ */ new Map();
|
|
3946
|
+
const addToRemoveQueue = (toastId) => {
|
|
3947
|
+
if (toastTimeouts.has(toastId)) {
|
|
3948
|
+
return;
|
|
3949
|
+
}
|
|
3950
|
+
const timeout = setTimeout(() => {
|
|
3951
|
+
toastTimeouts.delete(toastId);
|
|
3952
|
+
dispatch({
|
|
3953
|
+
type: "REMOVE_TOAST",
|
|
3954
|
+
toastId
|
|
3955
|
+
});
|
|
3956
|
+
}, TOAST_REMOVE_DELAY);
|
|
3957
|
+
toastTimeouts.set(toastId, timeout);
|
|
3958
|
+
};
|
|
3959
|
+
const reducer = (state2, action) => {
|
|
3960
|
+
switch (action.type) {
|
|
3961
|
+
case "ADD_TOAST":
|
|
3962
|
+
return {
|
|
3963
|
+
...state2,
|
|
3964
|
+
toasts: [action.toast, ...state2.toasts].slice(0, TOAST_LIMIT)
|
|
3965
|
+
};
|
|
3966
|
+
case "UPDATE_TOAST":
|
|
3967
|
+
return {
|
|
3968
|
+
...state2,
|
|
3969
|
+
toasts: state2.toasts.map(
|
|
3970
|
+
(t) => t.id === action.toast.id ? { ...t, ...action.toast } : t
|
|
3971
|
+
)
|
|
3972
|
+
};
|
|
3973
|
+
case "DISMISS_TOAST": {
|
|
3974
|
+
const { toastId } = action;
|
|
3975
|
+
if (toastId) {
|
|
3976
|
+
addToRemoveQueue(toastId);
|
|
3977
|
+
} else {
|
|
3978
|
+
state2.toasts.forEach((toast2) => {
|
|
3979
|
+
addToRemoveQueue(toast2.id);
|
|
3980
|
+
});
|
|
3981
|
+
}
|
|
3982
|
+
return {
|
|
3983
|
+
...state2,
|
|
3984
|
+
toasts: state2.toasts.map(
|
|
3985
|
+
(t) => t.id === toastId || toastId === void 0 ? {
|
|
3986
|
+
...t,
|
|
3987
|
+
open: false
|
|
3988
|
+
} : t
|
|
3989
|
+
)
|
|
3990
|
+
};
|
|
3991
|
+
}
|
|
3992
|
+
case "REMOVE_TOAST":
|
|
3993
|
+
if (action.toastId === void 0) {
|
|
3994
|
+
return {
|
|
3995
|
+
...state2,
|
|
3996
|
+
toasts: []
|
|
3997
|
+
};
|
|
3998
|
+
}
|
|
3999
|
+
return {
|
|
4000
|
+
...state2,
|
|
4001
|
+
toasts: state2.toasts.filter((t) => t.id !== action.toastId)
|
|
4002
|
+
};
|
|
4003
|
+
}
|
|
4004
|
+
};
|
|
4005
|
+
const listeners = [];
|
|
4006
|
+
let memoryState = { toasts: [] };
|
|
4007
|
+
function dispatch(action) {
|
|
4008
|
+
memoryState = reducer(memoryState, action);
|
|
4009
|
+
listeners.forEach((listener) => {
|
|
4010
|
+
listener(memoryState);
|
|
4011
|
+
});
|
|
4012
|
+
}
|
|
4013
|
+
function toast({ ...props }) {
|
|
4014
|
+
const id = genId();
|
|
4015
|
+
const update = (props2) => dispatch({
|
|
4016
|
+
type: "UPDATE_TOAST",
|
|
4017
|
+
toast: { ...props2, id }
|
|
4018
|
+
});
|
|
4019
|
+
const dismiss = () => dispatch({ type: "DISMISS_TOAST", toastId: id });
|
|
4020
|
+
dispatch({
|
|
4021
|
+
type: "ADD_TOAST",
|
|
4022
|
+
toast: {
|
|
4023
|
+
...props,
|
|
4024
|
+
id,
|
|
4025
|
+
open: true,
|
|
4026
|
+
onOpenChange: (open) => {
|
|
4027
|
+
if (!open) dismiss();
|
|
4028
|
+
}
|
|
4029
|
+
}
|
|
4030
|
+
});
|
|
4031
|
+
return {
|
|
4032
|
+
id,
|
|
4033
|
+
dismiss,
|
|
4034
|
+
update
|
|
4035
|
+
};
|
|
4036
|
+
}
|
|
4037
|
+
function useToast() {
|
|
4038
|
+
const [state2, setState] = React.useState(memoryState);
|
|
4039
|
+
React.useEffect(() => {
|
|
4040
|
+
listeners.push(setState);
|
|
4041
|
+
return () => {
|
|
4042
|
+
const index = listeners.indexOf(setState);
|
|
4043
|
+
if (index > -1) {
|
|
4044
|
+
listeners.splice(index, 1);
|
|
4045
|
+
}
|
|
4046
|
+
};
|
|
4047
|
+
}, [state2]);
|
|
4048
|
+
return {
|
|
4049
|
+
...state2,
|
|
4050
|
+
toast,
|
|
4051
|
+
dismiss: (toastId) => dispatch({ type: "DISMISS_TOAST", toastId })
|
|
4052
|
+
};
|
|
4053
|
+
}
|
|
4054
|
+
function Toaster$1() {
|
|
4055
|
+
const { toasts } = useToast();
|
|
4056
|
+
return /* @__PURE__ */ jsxs(ToastProvider, { children: [
|
|
4057
|
+
toasts.map(function({ id, title, description, action, ...props }) {
|
|
4058
|
+
return /* @__PURE__ */ jsxs(Toast, { ...props, children: [
|
|
4059
|
+
/* @__PURE__ */ jsxs("div", { className: "toast-content", children: [
|
|
4060
|
+
title && /* @__PURE__ */ jsx(ToastTitle, { children: title }),
|
|
4061
|
+
description && /* @__PURE__ */ jsx(ToastDescription, { children: description })
|
|
4062
|
+
] }),
|
|
4063
|
+
action,
|
|
4064
|
+
/* @__PURE__ */ jsx(ToastClose, {})
|
|
4065
|
+
] }, id);
|
|
4066
|
+
}),
|
|
4067
|
+
/* @__PURE__ */ jsx(ToastViewport, {})
|
|
4068
|
+
] });
|
|
4069
|
+
}
|
|
4070
|
+
const THEMES = { light: "", dark: ".dark" };
|
|
4071
|
+
const ChartContext = React.createContext(null);
|
|
4072
|
+
function useChart() {
|
|
4073
|
+
const context = React.useContext(ChartContext);
|
|
4074
|
+
if (!context) {
|
|
4075
|
+
throw new Error("useChart must be used within a <ChartContainer />");
|
|
4076
|
+
}
|
|
4077
|
+
return context;
|
|
4078
|
+
}
|
|
4079
|
+
const ChartContainer = React.forwardRef(({ id, className, children, config, ...props }, ref) => {
|
|
4080
|
+
const uniqueId = React.useId();
|
|
4081
|
+
const chartId = `chart-${id || uniqueId.replace(/:/g, "")}`;
|
|
4082
|
+
return /* @__PURE__ */ jsx(ChartContext.Provider, { value: { config }, children: /* @__PURE__ */ jsxs(
|
|
4083
|
+
"div",
|
|
4084
|
+
{
|
|
4085
|
+
"data-chart": chartId,
|
|
4086
|
+
ref,
|
|
4087
|
+
className: cn(
|
|
4088
|
+
"chart-container",
|
|
4089
|
+
className
|
|
4090
|
+
),
|
|
4091
|
+
...props,
|
|
4092
|
+
children: [
|
|
4093
|
+
/* @__PURE__ */ jsx(ChartStyle, { id: chartId, config }),
|
|
4094
|
+
/* @__PURE__ */ jsx(RechartsPrimitive.ResponsiveContainer, { children })
|
|
4095
|
+
]
|
|
4096
|
+
}
|
|
4097
|
+
) });
|
|
4098
|
+
});
|
|
4099
|
+
ChartContainer.displayName = "Chart";
|
|
4100
|
+
const ChartStyle = ({ id, config }) => {
|
|
4101
|
+
const colorConfig = Object.entries(config).filter(
|
|
4102
|
+
([_, config2]) => config2.theme || config2.color
|
|
4103
|
+
);
|
|
4104
|
+
if (!colorConfig.length) {
|
|
4105
|
+
return null;
|
|
4106
|
+
}
|
|
4107
|
+
return /* @__PURE__ */ jsx(
|
|
4108
|
+
"style",
|
|
4109
|
+
{
|
|
4110
|
+
dangerouslySetInnerHTML: {
|
|
4111
|
+
__html: Object.entries(THEMES).map(
|
|
4112
|
+
([theme, prefix]) => `
|
|
4113
|
+
${prefix} [data-chart=${id}] {
|
|
4114
|
+
${colorConfig.map(([key, itemConfig]) => {
|
|
4115
|
+
var _a;
|
|
4116
|
+
const color = ((_a = itemConfig.theme) == null ? void 0 : _a[theme]) || itemConfig.color;
|
|
4117
|
+
return color ? ` --color-${key}: ${color};` : null;
|
|
4118
|
+
}).join("\n")}
|
|
4119
|
+
}
|
|
4120
|
+
`
|
|
4121
|
+
).join("\n")
|
|
4122
|
+
}
|
|
4123
|
+
}
|
|
4124
|
+
);
|
|
4125
|
+
};
|
|
4126
|
+
const ChartTooltip = RechartsPrimitive.Tooltip;
|
|
4127
|
+
const ChartTooltipContent = React.forwardRef(
|
|
4128
|
+
({
|
|
4129
|
+
active,
|
|
4130
|
+
payload,
|
|
4131
|
+
className,
|
|
4132
|
+
indicator = "dot",
|
|
4133
|
+
hideLabel = false,
|
|
4134
|
+
hideIndicator = false,
|
|
4135
|
+
label,
|
|
4136
|
+
labelFormatter,
|
|
4137
|
+
labelClassName,
|
|
4138
|
+
formatter,
|
|
4139
|
+
color,
|
|
4140
|
+
nameKey,
|
|
4141
|
+
labelKey
|
|
4142
|
+
}, ref) => {
|
|
4143
|
+
const { config } = useChart();
|
|
4144
|
+
const tooltipLabel = React.useMemo(() => {
|
|
4145
|
+
var _a;
|
|
4146
|
+
if (hideLabel || !(payload == null ? void 0 : payload.length)) {
|
|
4147
|
+
return null;
|
|
4148
|
+
}
|
|
4149
|
+
const [item] = payload;
|
|
4150
|
+
const key = `${labelKey || item.dataKey || item.name || "value"}`;
|
|
4151
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
4152
|
+
const value = !labelKey && typeof label === "string" ? ((_a = config[label]) == null ? void 0 : _a.label) || label : itemConfig == null ? void 0 : itemConfig.label;
|
|
4153
|
+
if (labelFormatter) {
|
|
4154
|
+
return /* @__PURE__ */ jsx("div", { className: cn("chart-tooltip-label", labelClassName), children: labelFormatter(value, payload) });
|
|
4155
|
+
}
|
|
4156
|
+
if (!value) {
|
|
4157
|
+
return null;
|
|
4158
|
+
}
|
|
4159
|
+
return /* @__PURE__ */ jsx("div", { className: cn("chart-tooltip-label", labelClassName), children: value });
|
|
4160
|
+
}, [
|
|
4161
|
+
label,
|
|
4162
|
+
labelFormatter,
|
|
4163
|
+
payload,
|
|
4164
|
+
hideLabel,
|
|
4165
|
+
labelClassName,
|
|
4166
|
+
config,
|
|
4167
|
+
labelKey
|
|
4168
|
+
]);
|
|
4169
|
+
if (!active || !(payload == null ? void 0 : payload.length)) {
|
|
4170
|
+
return null;
|
|
4171
|
+
}
|
|
4172
|
+
const nestLabel = payload.length === 1 && indicator !== "dot";
|
|
4173
|
+
return /* @__PURE__ */ jsxs(
|
|
4174
|
+
"div",
|
|
4175
|
+
{
|
|
4176
|
+
ref,
|
|
4177
|
+
className: cn(
|
|
4178
|
+
"chart-tooltip",
|
|
4179
|
+
className
|
|
4180
|
+
),
|
|
4181
|
+
children: [
|
|
4182
|
+
!nestLabel ? tooltipLabel : null,
|
|
4183
|
+
/* @__PURE__ */ jsx("div", { className: "chart-tooltip-content", children: payload.map((item, index) => {
|
|
4184
|
+
const key = `${nameKey || item.name || item.dataKey || "value"}`;
|
|
4185
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
4186
|
+
const indicatorColor = color || item.payload.fill || item.color;
|
|
4187
|
+
return /* @__PURE__ */ jsx(
|
|
4188
|
+
"div",
|
|
4189
|
+
{
|
|
4190
|
+
className: cn(
|
|
4191
|
+
"chart-tooltip-item",
|
|
4192
|
+
indicator === "dot" && "chart-tooltip-item--dot"
|
|
4193
|
+
),
|
|
4194
|
+
children: formatter && (item == null ? void 0 : item.value) !== void 0 && item.name ? formatter(item.value, item.name, item, index, item.payload) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4195
|
+
(itemConfig == null ? void 0 : itemConfig.icon) ? /* @__PURE__ */ jsx(itemConfig.icon, {}) : !hideIndicator && /* @__PURE__ */ jsx(
|
|
4196
|
+
"div",
|
|
4197
|
+
{
|
|
4198
|
+
className: cn(
|
|
4199
|
+
"chart-tooltip-indicator",
|
|
4200
|
+
{
|
|
4201
|
+
"chart-tooltip-indicator--dot": indicator === "dot",
|
|
4202
|
+
"chart-tooltip-indicator--line": indicator === "line",
|
|
4203
|
+
"chart-tooltip-indicator--dashed": indicator === "dashed",
|
|
4204
|
+
"chart-tooltip-indicator--dashed-nested": nestLabel && indicator === "dashed"
|
|
4205
|
+
}
|
|
4206
|
+
),
|
|
4207
|
+
style: {
|
|
4208
|
+
"--color-bg": indicatorColor,
|
|
4209
|
+
"--color-border": indicatorColor
|
|
4210
|
+
}
|
|
4211
|
+
}
|
|
4212
|
+
),
|
|
4213
|
+
/* @__PURE__ */ jsxs(
|
|
4214
|
+
"div",
|
|
4215
|
+
{
|
|
4216
|
+
className: cn(
|
|
4217
|
+
"chart-tooltip-item-content",
|
|
4218
|
+
nestLabel ? "chart-tooltip-item-content--nested" : ""
|
|
4219
|
+
),
|
|
4220
|
+
children: [
|
|
4221
|
+
/* @__PURE__ */ jsxs("div", { className: "chart-tooltip-item-details", children: [
|
|
4222
|
+
nestLabel ? tooltipLabel : null,
|
|
4223
|
+
/* @__PURE__ */ jsx("span", { className: "chart-tooltip-item-label", children: (itemConfig == null ? void 0 : itemConfig.label) || item.name })
|
|
4224
|
+
] }),
|
|
4225
|
+
item.value && /* @__PURE__ */ jsx("span", { className: "chart-tooltip-item-value", children: item.value.toLocaleString() })
|
|
4226
|
+
]
|
|
4227
|
+
}
|
|
4228
|
+
)
|
|
4229
|
+
] })
|
|
4230
|
+
},
|
|
4231
|
+
item.dataKey
|
|
4232
|
+
);
|
|
4233
|
+
}) })
|
|
4234
|
+
]
|
|
4235
|
+
}
|
|
4236
|
+
);
|
|
4237
|
+
}
|
|
4238
|
+
);
|
|
4239
|
+
ChartTooltipContent.displayName = "ChartTooltip";
|
|
4240
|
+
const ChartLegend = RechartsPrimitive.Legend;
|
|
4241
|
+
const ChartLegendContent = React.forwardRef(
|
|
4242
|
+
({ className, hideIcon = false, payload, verticalAlign = "bottom", nameKey }, ref) => {
|
|
4243
|
+
const { config } = useChart();
|
|
4244
|
+
if (!(payload == null ? void 0 : payload.length)) {
|
|
4245
|
+
return null;
|
|
4246
|
+
}
|
|
4247
|
+
return /* @__PURE__ */ jsx(
|
|
4248
|
+
"div",
|
|
4249
|
+
{
|
|
4250
|
+
ref,
|
|
4251
|
+
className: cn(
|
|
4252
|
+
"chart-legend",
|
|
4253
|
+
verticalAlign === "top" ? "chart-legend--top" : "chart-legend--bottom",
|
|
4254
|
+
className
|
|
4255
|
+
),
|
|
4256
|
+
children: payload.map((item) => {
|
|
4257
|
+
const key = `${nameKey || item.dataKey || "value"}`;
|
|
4258
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
4259
|
+
return /* @__PURE__ */ jsxs(
|
|
4260
|
+
"div",
|
|
4261
|
+
{
|
|
4262
|
+
className: "chart-legend-item",
|
|
4263
|
+
children: [
|
|
4264
|
+
(itemConfig == null ? void 0 : itemConfig.icon) && !hideIcon ? /* @__PURE__ */ jsx(itemConfig.icon, {}) : /* @__PURE__ */ jsx(
|
|
4265
|
+
"div",
|
|
4266
|
+
{
|
|
4267
|
+
className: "chart-legend-indicator",
|
|
4268
|
+
style: {
|
|
4269
|
+
backgroundColor: item.color
|
|
4270
|
+
}
|
|
4271
|
+
}
|
|
4272
|
+
),
|
|
4273
|
+
itemConfig == null ? void 0 : itemConfig.label
|
|
4274
|
+
]
|
|
4275
|
+
},
|
|
4276
|
+
item.value
|
|
4277
|
+
);
|
|
4278
|
+
})
|
|
4279
|
+
}
|
|
4280
|
+
);
|
|
4281
|
+
}
|
|
4282
|
+
);
|
|
4283
|
+
ChartLegendContent.displayName = "ChartLegend";
|
|
4284
|
+
function getPayloadConfigFromPayload(config, payload, key) {
|
|
4285
|
+
if (typeof payload !== "object" || payload === null) {
|
|
4286
|
+
return void 0;
|
|
4287
|
+
}
|
|
4288
|
+
const payloadPayload = "payload" in payload && typeof payload.payload === "object" && payload.payload !== null ? payload.payload : void 0;
|
|
4289
|
+
let configLabelKey = key;
|
|
4290
|
+
if (key in payload && typeof payload[key] === "string") {
|
|
4291
|
+
configLabelKey = payload[key];
|
|
4292
|
+
} else if (payloadPayload && key in payloadPayload && typeof payloadPayload[key] === "string") {
|
|
4293
|
+
configLabelKey = payloadPayload[key];
|
|
4294
|
+
}
|
|
4295
|
+
return configLabelKey in config ? config[configLabelKey] : config[key];
|
|
4296
|
+
}
|
|
4297
|
+
const Toaster = ({ ...props }) => {
|
|
4298
|
+
const { theme = "system" } = useTheme();
|
|
4299
|
+
return /* @__PURE__ */ jsx(
|
|
4300
|
+
Toaster$2,
|
|
4301
|
+
{
|
|
4302
|
+
theme,
|
|
4303
|
+
className: "toaster",
|
|
4304
|
+
toastOptions: {
|
|
4305
|
+
classNames: {
|
|
4306
|
+
toast: "toast",
|
|
4307
|
+
description: "toast-description",
|
|
4308
|
+
actionButton: "toast-action",
|
|
4309
|
+
cancelButton: "toast-cancel"
|
|
4310
|
+
}
|
|
4311
|
+
},
|
|
4312
|
+
...props
|
|
4313
|
+
}
|
|
4314
|
+
);
|
|
4315
|
+
};
|
|
4316
|
+
export {
|
|
4317
|
+
Accordion,
|
|
4318
|
+
AccordionContent,
|
|
4319
|
+
AccordionItem,
|
|
4320
|
+
AccordionTrigger,
|
|
4321
|
+
Alert,
|
|
4322
|
+
AlertDescription,
|
|
4323
|
+
AlertDialog,
|
|
4324
|
+
AlertDialogAction,
|
|
4325
|
+
AlertDialogCancel,
|
|
4326
|
+
AlertDialogContent,
|
|
4327
|
+
AlertDialogDescription,
|
|
4328
|
+
AlertDialogFooter,
|
|
4329
|
+
AlertDialogHeader,
|
|
4330
|
+
AlertDialogTitle,
|
|
4331
|
+
AlertDialogTrigger,
|
|
4332
|
+
AlertTitle,
|
|
4333
|
+
AspectRatio,
|
|
4334
|
+
Avatar,
|
|
4335
|
+
AvatarFallback,
|
|
4336
|
+
AvatarImage,
|
|
4337
|
+
Badge,
|
|
4338
|
+
Breadcrumb,
|
|
4339
|
+
BreadcrumbItem,
|
|
4340
|
+
BreadcrumbLink,
|
|
4341
|
+
BreadcrumbList,
|
|
4342
|
+
BreadcrumbPage,
|
|
4343
|
+
BreadcrumbSeparator,
|
|
4344
|
+
Button,
|
|
4345
|
+
Calendar,
|
|
4346
|
+
Card,
|
|
4347
|
+
CardContent,
|
|
4348
|
+
CardDescription,
|
|
4349
|
+
CardFooter,
|
|
4350
|
+
CardHeader,
|
|
4351
|
+
CardTitle,
|
|
4352
|
+
Carousel,
|
|
4353
|
+
CarouselContent,
|
|
4354
|
+
CarouselItem,
|
|
4355
|
+
CarouselNext,
|
|
4356
|
+
CarouselPrevious,
|
|
4357
|
+
ChartContainer,
|
|
4358
|
+
ChartLegend,
|
|
4359
|
+
ChartStyle,
|
|
4360
|
+
ChartTooltip,
|
|
4361
|
+
ChartTooltipContent,
|
|
4362
|
+
Checkbox,
|
|
4363
|
+
Collapsible,
|
|
4364
|
+
CollapsibleContent,
|
|
4365
|
+
CollapsibleTrigger,
|
|
4366
|
+
Command,
|
|
4367
|
+
CommandDialog,
|
|
4368
|
+
CommandEmpty,
|
|
4369
|
+
CommandGroup,
|
|
4370
|
+
CommandInput,
|
|
4371
|
+
CommandItem,
|
|
4372
|
+
CommandList,
|
|
4373
|
+
CommandSeparator,
|
|
4374
|
+
CommandShortcut,
|
|
4375
|
+
ContextMenu,
|
|
4376
|
+
ContextMenuCheckboxItem,
|
|
4377
|
+
ContextMenuContent,
|
|
4378
|
+
ContextMenuGroup,
|
|
4379
|
+
ContextMenuItem,
|
|
4380
|
+
ContextMenuLabel,
|
|
4381
|
+
ContextMenuPortal,
|
|
4382
|
+
ContextMenuRadioGroup,
|
|
4383
|
+
ContextMenuRadioItem,
|
|
4384
|
+
ContextMenuSeparator,
|
|
4385
|
+
ContextMenuShortcut,
|
|
4386
|
+
ContextMenuSub,
|
|
4387
|
+
ContextMenuSubContent,
|
|
4388
|
+
ContextMenuSubTrigger,
|
|
4389
|
+
ContextMenuTrigger,
|
|
4390
|
+
Dialog,
|
|
4391
|
+
DialogClose,
|
|
4392
|
+
DialogContent,
|
|
4393
|
+
DialogDescription,
|
|
4394
|
+
DialogFooter,
|
|
4395
|
+
DialogHeader,
|
|
4396
|
+
DialogOverlay,
|
|
4397
|
+
DialogPortal,
|
|
4398
|
+
DialogTitle,
|
|
4399
|
+
DialogTrigger,
|
|
4400
|
+
Drawer,
|
|
4401
|
+
DrawerClose,
|
|
4402
|
+
DrawerContent,
|
|
4403
|
+
DrawerDescription,
|
|
4404
|
+
DrawerFooter,
|
|
4405
|
+
DrawerHeader,
|
|
4406
|
+
DrawerTitle,
|
|
4407
|
+
DrawerTrigger,
|
|
4408
|
+
DropdownMenu,
|
|
4409
|
+
DropdownMenuCheckboxItem,
|
|
4410
|
+
DropdownMenuContent,
|
|
4411
|
+
DropdownMenuGroup,
|
|
4412
|
+
DropdownMenuItem,
|
|
4413
|
+
DropdownMenuLabel,
|
|
4414
|
+
DropdownMenuPortal,
|
|
4415
|
+
DropdownMenuRadioGroup,
|
|
4416
|
+
DropdownMenuRadioItem,
|
|
4417
|
+
DropdownMenuSeparator,
|
|
4418
|
+
DropdownMenuShortcut,
|
|
4419
|
+
DropdownMenuSub,
|
|
4420
|
+
DropdownMenuSubContent,
|
|
4421
|
+
DropdownMenuSubTrigger,
|
|
4422
|
+
DropdownMenuTrigger,
|
|
4423
|
+
Form,
|
|
4424
|
+
FormControl,
|
|
4425
|
+
FormDescription,
|
|
4426
|
+
FormField,
|
|
4427
|
+
FormItem,
|
|
4428
|
+
FormLabel,
|
|
4429
|
+
FormMessage,
|
|
4430
|
+
HoverCard,
|
|
4431
|
+
HoverCardContent,
|
|
4432
|
+
HoverCardTrigger,
|
|
4433
|
+
Input,
|
|
4434
|
+
InputOTP,
|
|
4435
|
+
InputOTPGroup,
|
|
4436
|
+
InputOTPSeparator,
|
|
4437
|
+
InputOTPSlot,
|
|
4438
|
+
Label,
|
|
4439
|
+
Menubar,
|
|
4440
|
+
MenubarCheckboxItem,
|
|
4441
|
+
MenubarContent,
|
|
4442
|
+
MenubarItem,
|
|
4443
|
+
MenubarLabel,
|
|
4444
|
+
MenubarMenu,
|
|
4445
|
+
MenubarRadioGroup,
|
|
4446
|
+
MenubarRadioItem,
|
|
4447
|
+
MenubarSeparator,
|
|
4448
|
+
MenubarShortcut,
|
|
4449
|
+
MenubarSub,
|
|
4450
|
+
MenubarSubContent,
|
|
4451
|
+
MenubarSubTrigger,
|
|
4452
|
+
MenubarTrigger,
|
|
4453
|
+
Navigation,
|
|
4454
|
+
NavigationMenu,
|
|
4455
|
+
NavigationMenuContent,
|
|
4456
|
+
NavigationMenuItem,
|
|
4457
|
+
NavigationMenuLink,
|
|
4458
|
+
NavigationMenuList,
|
|
4459
|
+
NavigationMenuTrigger,
|
|
4460
|
+
Pagination,
|
|
4461
|
+
PaginationContent,
|
|
4462
|
+
PaginationEllipsis,
|
|
4463
|
+
PaginationItem,
|
|
4464
|
+
PaginationLink,
|
|
4465
|
+
PaginationNext,
|
|
4466
|
+
PaginationPrevious,
|
|
4467
|
+
Popover,
|
|
4468
|
+
PopoverContent,
|
|
4469
|
+
PopoverTrigger,
|
|
4470
|
+
Progress,
|
|
4471
|
+
RadioGroup,
|
|
4472
|
+
RadioGroupItem,
|
|
4473
|
+
ResizableHandle,
|
|
4474
|
+
ResizablePanel,
|
|
4475
|
+
ResizablePanelGroup,
|
|
4476
|
+
ScrollArea,
|
|
4477
|
+
ScrollBar,
|
|
4478
|
+
SearchField,
|
|
4479
|
+
Select,
|
|
4480
|
+
SelectContent,
|
|
4481
|
+
SelectGroup,
|
|
4482
|
+
SelectItem,
|
|
4483
|
+
SelectLabel,
|
|
4484
|
+
SelectScrollDownButton,
|
|
4485
|
+
SelectScrollUpButton,
|
|
4486
|
+
SelectSeparator,
|
|
4487
|
+
SelectTrigger,
|
|
4488
|
+
SelectValue,
|
|
4489
|
+
Separator,
|
|
4490
|
+
Sheet,
|
|
4491
|
+
SheetClose,
|
|
4492
|
+
SheetContent,
|
|
4493
|
+
SheetDescription,
|
|
4494
|
+
SheetFooter,
|
|
4495
|
+
SheetHeader,
|
|
4496
|
+
SheetTitle,
|
|
4497
|
+
SheetTrigger,
|
|
4498
|
+
Sidebar,
|
|
4499
|
+
SidebarContent,
|
|
4500
|
+
SidebarFooter,
|
|
4501
|
+
SidebarGroup,
|
|
4502
|
+
SidebarGroupContent,
|
|
4503
|
+
SidebarGroupLabel,
|
|
4504
|
+
SidebarHeader,
|
|
4505
|
+
SidebarMenu,
|
|
4506
|
+
SidebarMenuButton,
|
|
4507
|
+
SidebarMenuItem,
|
|
4508
|
+
SidebarMenuSub,
|
|
4509
|
+
SidebarMenuSubButton,
|
|
4510
|
+
SidebarMenuSubItem,
|
|
4511
|
+
Skeleton,
|
|
4512
|
+
Slider,
|
|
4513
|
+
Toaster as Sonner,
|
|
4514
|
+
Switch,
|
|
4515
|
+
Table,
|
|
4516
|
+
TableBody,
|
|
4517
|
+
TableCaption,
|
|
4518
|
+
TableCell,
|
|
4519
|
+
TableFooter,
|
|
4520
|
+
TableHead,
|
|
4521
|
+
TableHeader,
|
|
4522
|
+
TableRow,
|
|
4523
|
+
TabsRoot as Tabs,
|
|
4524
|
+
TabsContent,
|
|
4525
|
+
TabsList,
|
|
4526
|
+
TabsTrigger,
|
|
4527
|
+
Tag,
|
|
4528
|
+
Textarea,
|
|
4529
|
+
Toast,
|
|
4530
|
+
ToastAction,
|
|
4531
|
+
ToastClose,
|
|
4532
|
+
ToastDescription,
|
|
4533
|
+
ToastProvider,
|
|
4534
|
+
ToastTitle,
|
|
4535
|
+
ToastViewport,
|
|
4536
|
+
Toaster$1 as Toaster,
|
|
4537
|
+
Toggle,
|
|
4538
|
+
ToggleGroup,
|
|
4539
|
+
ToggleGroupItem,
|
|
4540
|
+
Tooltip,
|
|
4541
|
+
TooltipContent,
|
|
4542
|
+
TooltipProvider,
|
|
4543
|
+
TooltipTrigger,
|
|
4544
|
+
badgeVariants,
|
|
4545
|
+
buttonVariants,
|
|
4546
|
+
cn,
|
|
4547
|
+
navigationMenuTriggerStyle,
|
|
4548
|
+
useIsMobile,
|
|
4549
|
+
useSegmentedControl,
|
|
4550
|
+
useTabs,
|
|
4551
|
+
useToast
|
|
4552
|
+
};
|