@plyaz/ui 0.8.4 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/reveal-text.cjs.js +1 -1
- package/dist/client/reveal-text.es.js +603 -609
- package/dist/client/toaster.cjs.js +1 -1
- package/dist/client/toaster.es.js +34 -8
- package/dist/client.cjs.js +1 -1
- package/dist/client.es.js +443 -444
- package/dist/index.cjs.js +27 -6
- package/dist/index.es.js +2137 -437
- package/dist/types/components/DataTable/DataTable.d.ts +8 -0
- package/dist/types/components/DataTable/DataTable.d.ts.map +1 -0
- package/dist/types/components/DataTable/DataTable.stories.d.ts +27 -0
- package/dist/types/components/DataTable/DataTable.stories.d.ts.map +1 -0
- package/dist/types/components/Toaster/Toaster.d.ts +1 -1
- package/dist/types/components/Toaster/Toaster.d.ts.map +1 -1
- package/dist/types/components/Toaster/Toaster.stories.d.ts.map +1 -1
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/components/index.d.ts.map +1 -1
- package/dist/ui.css +1 -1
- package/package.json +2 -1
- package/styles/utilities.css +15 -0
package/dist/client.es.js
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import { TextReveal as
|
|
2
|
-
import { AlertDialog as
|
|
3
|
-
import { Calendar as
|
|
4
|
-
import { Carousel as
|
|
5
|
-
import { Combobox as
|
|
6
|
-
import { InputOTP as
|
|
7
|
-
import { Slider as
|
|
8
|
-
import { Progress as
|
|
9
|
-
import { Accordion as
|
|
10
|
-
import { Avatar as
|
|
11
|
-
import { Checkbox as
|
|
12
|
-
import { ContextMenu as
|
|
13
|
-
import { DropdownMenu as qa, DropdownMenuCheckboxItem as Xa, DropdownMenuContent as
|
|
14
|
-
import { HoverCard as
|
|
15
|
-
import { RadioGroup as
|
|
16
|
-
import { ScrollArea as
|
|
17
|
-
import { Switch as
|
|
18
|
-
import { Tabs as
|
|
19
|
-
import { Tooltip as
|
|
20
|
-
import { Command as
|
|
21
|
-
import { CommandDialog as
|
|
22
|
-
import { Dialog as
|
|
23
|
-
import { Drawer as
|
|
24
|
-
import { Sheet as
|
|
25
|
-
import { SheetClose as
|
|
26
|
-
import { Toaster as
|
|
27
|
-
import { Toggle as
|
|
28
|
-
import { Label as
|
|
29
|
-
import { Menubar as
|
|
30
|
-
import { Popover as
|
|
31
|
-
import { PopoverAnchor as
|
|
32
|
-
import { jsx as n, jsxs as N, Fragment as
|
|
1
|
+
import { TextReveal as Kr } from "./client/reveal-text.es.js";
|
|
2
|
+
import { AlertDialog as $r, AlertDialogAction as Jr, AlertDialogCancel as Qr, AlertDialogContent as Zr, AlertDialogDescription as jr, AlertDialogFooter as qr, AlertDialogHeader as Xr, AlertDialogOverlay as Yr, AlertDialogPortal as ea, AlertDialogTitle as ta, AlertDialogTrigger as ra } from "./client/alert-dialog.es.js";
|
|
3
|
+
import { Calendar as oa, CalendarDayButton as na } from "./client/calendar.es.js";
|
|
4
|
+
import { Carousel as sa, CarouselContent as da, CarouselItem as la, CarouselNext as ua, CarouselPrevious as ca } from "./client/carousel.es.js";
|
|
5
|
+
import { Combobox as fa } from "./client/combobox.es.js";
|
|
6
|
+
import { InputOTP as ba, InputOTPGroup as ga, InputOTPSeparator as ha, InputOTPSlot as xa } from "./client/input-otp.es.js";
|
|
7
|
+
import { Slider as Aa } from "./client/slider.es.js";
|
|
8
|
+
import { Progress as ya } from "./client/progress.es.js";
|
|
9
|
+
import { Accordion as Ca, AccordionContent as Ma, AccordionItem as Ia, AccordionTrigger as Na } from "./client/accordion.es.js";
|
|
10
|
+
import { Avatar as _a, AvatarFallback as Ea, AvatarImage as Ta } from "./client/avatar.es.js";
|
|
11
|
+
import { Checkbox as Fa } from "./client/checkbox.es.js";
|
|
12
|
+
import { ContextMenu as Pa, ContextMenuCheckboxItem as Oa, ContextMenuContent as Va, ContextMenuGroup as Ba, ContextMenuItem as La, ContextMenuLabel as Ga, ContextMenuPortal as Ha, ContextMenuRadioGroup as za, ContextMenuRadioItem as Ua, ContextMenuSeparator as Ka, ContextMenuShortcut as Wa, ContextMenuSub as $a, ContextMenuSubContent as Ja, ContextMenuSubTrigger as Qa, ContextMenuTrigger as Za } from "./client/context-menu.es.js";
|
|
13
|
+
import { DropdownMenu as qa, DropdownMenuCheckboxItem as Xa, DropdownMenuContent as Ya, DropdownMenuGroup as eo, DropdownMenuItem as to, DropdownMenuLabel as ro, DropdownMenuPortal as ao, DropdownMenuRadioGroup as oo, DropdownMenuRadioItem as no, DropdownMenuSeparator as io, DropdownMenuShortcut as so, DropdownMenuSub as lo, DropdownMenuSubContent as uo, DropdownMenuSubTrigger as co, DropdownMenuTrigger as mo } from "./client/dropdown-menu.es.js";
|
|
14
|
+
import { HoverCard as po, HoverCardContent as bo, HoverCardTrigger as go } from "./client/hover-card.es.js";
|
|
15
|
+
import { RadioGroup as xo, RadioGroupItem as vo } from "./client/radio-group.es.js";
|
|
16
|
+
import { ScrollArea as wo, ScrollBar as yo } from "./client/scroll-area.es.js";
|
|
17
|
+
import { Switch as Co } from "./client/switch.es.js";
|
|
18
|
+
import { Tabs as Io, TabsContent as No, TabsList as Do, TabsTrigger as _o } from "./client/tabs.es.js";
|
|
19
|
+
import { Tooltip as be, TooltipTrigger as ge, TooltipContent as he, TooltipProvider as xe } from "./client/tooltip.es.js";
|
|
20
|
+
import { Command as J, CommandList as Q, CommandInput as ve, CommandEmpty as Ae, CommandGroup as we, CommandItem as ye } from "./client/command.es.js";
|
|
21
|
+
import { CommandDialog as To, CommandSeparator as ko, CommandShortcut as Fo } from "./client/command.es.js";
|
|
22
|
+
import { Dialog as Po, DialogClose as Oo, DialogContent as Vo, DialogDescription as Bo, DialogFooter as Lo, DialogHeader as Go, DialogOverlay as Ho, DialogPortal as zo, DialogTitle as Uo, DialogTrigger as Ko } from "./client/dialog.es.js";
|
|
23
|
+
import { Drawer as $o, DrawerClose as Jo, DrawerContent as Qo, DrawerDescription as Zo, DrawerFooter as jo, DrawerHeader as qo, DrawerOverlay as Xo, DrawerPortal as Yo, DrawerTitle as en, DrawerTrigger as tn } from "./client/drawer.es.js";
|
|
24
|
+
import { Sheet as Se, SheetContent as Ce, SheetHeader as Me, SheetTitle as Ie, SheetDescription as Ne } from "./client/sheet.es.js";
|
|
25
|
+
import { SheetClose as an, SheetFooter as on, SheetTrigger as nn } from "./client/sheet.es.js";
|
|
26
|
+
import { Toaster as dn } from "./client/toaster.es.js";
|
|
27
|
+
import { Toggle as un } from "./client/toggle.es.js";
|
|
28
|
+
import { Label as De } from "./client/label.es.js";
|
|
29
|
+
import { Menubar as mn, MenubarCheckboxItem as fn, MenubarContent as pn, MenubarGroup as bn, MenubarItem as gn, MenubarLabel as hn, MenubarMenu as xn, MenubarPortal as vn, MenubarRadioGroup as An, MenubarRadioItem as wn, MenubarSeparator as yn, MenubarShortcut as Sn, MenubarSub as Cn, MenubarSubContent as Mn, MenubarSubTrigger as In, MenubarTrigger as Nn } from "./client/menu-bar.es.js";
|
|
30
|
+
import { Popover as _e, PopoverContent as Ee, PopoverTrigger as Te } from "./client/popover.es.js";
|
|
31
|
+
import { PopoverAnchor as _n } from "./client/popover.es.js";
|
|
32
|
+
import { jsx as n, jsxs as N, Fragment as ke } from "react/jsx-runtime";
|
|
33
33
|
import * as v from "react";
|
|
34
|
-
import m, { createContext as
|
|
34
|
+
import m, { createContext as Fe, useState as P, useCallback as z, useEffect as Re, useRef as Z, useContext as Pe } from "react";
|
|
35
35
|
import { Slot as T } from "@radix-ui/react-slot";
|
|
36
|
-
import { cva as
|
|
37
|
-
import { PanelLeftIcon as
|
|
38
|
-
import { c
|
|
39
|
-
import { I as
|
|
40
|
-
import { B as
|
|
36
|
+
import { cva as Oe } from "class-variance-authority";
|
|
37
|
+
import { PanelLeftIcon as Ve, CheckIcon as Be, ChevronsUpDownIcon as Le, XIcon as Ge } from "lucide-react";
|
|
38
|
+
import { c } from "./utils-B6yFEsav.js";
|
|
39
|
+
import { I as He, B as j } from "./Textarea-BfrJwucE.js";
|
|
40
|
+
import { B as ae } from "./Button-B7sEajdG.js";
|
|
41
41
|
import "@radix-ui/react-select";
|
|
42
42
|
import "next-intl";
|
|
43
|
-
import { a as q, S as
|
|
43
|
+
import { a as q, S as ze } from "./Skeleton-Cj9Od_Nd.js";
|
|
44
44
|
import "@radix-ui/react-alert-dialog";
|
|
45
45
|
import "react-day-picker";
|
|
46
46
|
import "cmdk";
|
|
@@ -66,28 +66,28 @@ import "@radix-ui/react-label";
|
|
|
66
66
|
import "@radix-ui/react-menubar";
|
|
67
67
|
import "@radix-ui/react-separator";
|
|
68
68
|
import "@radix-ui/react-tooltip";
|
|
69
|
-
var i = { US: "US", CA: "CA", MX: "MX", BR: "BR", AR: "AR", CL: "CL", CO: "CO", PE: "PE", VE: "VE", GB: "GB", FR: "FR", DE: "DE", IT: "IT", ES: "ES", PT: "PT", NL: "NL", CH: "CH", SE: "SE", NO: "NO", FI: "FI", PL: "PL", GR: "GR", UA: "UA", RU: "RU", CN: "CN", JP: "JP", KR: "KR", IN: "IN", PK: "PK", BD: "BD", TH: "TH", VN: "VN", MY: "MY", SG: "SG", ID: "ID", PH: "PH", SA: "SA", AE: "AE", QA: "QA", KW: "KW", IQ: "IQ", IR: "IR", IL: "IL", TR: "TR", EG: "EG", MA: "MA", ET: "ET", KE: "KE", TZ: "TZ", ZA: "ZA", NG: "NG", GH: "GH", SN: "SN", AU: "AU", NZ: "NZ", PG: "PG", FJ: "FJ", AQ: "AQ" },
|
|
70
|
-
Array.from(new Set(Object.values(
|
|
71
|
-
Array.from({ length: ze }, (e, r) => r);
|
|
69
|
+
var i = { US: "US", CA: "CA", MX: "MX", BR: "BR", AR: "AR", CL: "CL", CO: "CO", PE: "PE", VE: "VE", GB: "GB", FR: "FR", DE: "DE", IT: "IT", ES: "ES", PT: "PT", NL: "NL", CH: "CH", SE: "SE", NO: "NO", FI: "FI", PL: "PL", GR: "GR", UA: "UA", RU: "RU", CN: "CN", JP: "JP", KR: "KR", IN: "IN", PK: "PK", BD: "BD", TH: "TH", VN: "VN", MY: "MY", SG: "SG", ID: "ID", PH: "PH", SA: "SA", AE: "AE", QA: "QA", KW: "KW", IQ: "IQ", IR: "IR", IL: "IL", TR: "TR", EG: "EG", MA: "MA", ET: "ET", KE: "KE", TZ: "TZ", ZA: "ZA", NG: "NG", GH: "GH", SN: "SN", AU: "AU", NZ: "NZ", PG: "PG", FJ: "FJ", AQ: "AQ" }, Ue = 7, Ke = 6, We = { WEEK: 6048e5 }, $e = { [i.US]: ["America/New_York", "America/Chicago", "America/Denver", "America/Los_Angeles", "America/Anchorage", "Pacific/Honolulu"], [i.CA]: ["America/Toronto", "America/Vancouver", "America/Edmonton", "America/Halifax", "America/St_Johns"], [i.MX]: ["America/Mexico_City", "America/Monterrey", "America/Tijuana"], [i.BR]: ["America/Sao_Paulo", "America/Manaus", "America/Fortaleza"], [i.AR]: ["America/Argentina/Buenos_Aires"], [i.CL]: ["America/Santiago"], [i.CO]: ["America/Bogota"], [i.PE]: ["America/Lima"], [i.VE]: ["America/Caracas"], [i.GB]: ["Europe/London"], [i.FR]: ["Europe/Paris"], [i.DE]: ["Europe/Berlin"], [i.IT]: ["Europe/Rome"], [i.ES]: ["Europe/Madrid"], [i.PT]: ["Europe/Lisbon"], [i.NL]: ["Europe/Amsterdam"], [i.SE]: ["Europe/Stockholm"], [i.PL]: ["Europe/Warsaw"], [i.FI]: ["Europe/Helsinki"], [i.NO]: ["Europe/Oslo"], [i.CH]: ["Europe/Zurich"], [i.RU]: ["Europe/Moscow", "Asia/Yekaterinburg", "Asia/Irkutsk", "Asia/Vladivostok"], [i.UA]: ["Europe/Kyiv"], [i.GR]: ["Europe/Athens"], [i.TR]: ["Europe/Istanbul"], [i.CN]: ["Asia/Shanghai", "Asia/Urumqi"], [i.JP]: ["Asia/Tokyo"], [i.KR]: ["Asia/Seoul"], [i.IN]: ["Asia/Kolkata"], [i.PK]: ["Asia/Karachi"], [i.BD]: ["Asia/Dhaka"], [i.TH]: ["Asia/Bangkok"], [i.VN]: ["Asia/Ho_Chi_Minh"], [i.MY]: ["Asia/Kuala_Lumpur"], [i.SG]: ["Asia/Singapore"], [i.ID]: ["Asia/Jakarta", "Asia/Makassar", "Asia/Jayapura"], [i.PH]: ["Asia/Manila"], [i.AE]: ["Asia/Dubai"], [i.SA]: ["Asia/Riyadh"], [i.IR]: ["Asia/Tehran"], [i.IQ]: ["Asia/Baghdad"], [i.IL]: ["Asia/Jerusalem"], [i.QA]: ["Asia/Qatar"], [i.KW]: ["Asia/Kuwait"], [i.EG]: ["Africa/Cairo"], [i.NG]: ["Africa/Lagos"], [i.ZA]: ["Africa/Johannesburg"], [i.KE]: ["Africa/Nairobi"], [i.MA]: ["Africa/Casablanca"], [i.GH]: ["Africa/Accra"], [i.ET]: ["Africa/Addis_Ababa"], [i.TZ]: ["Africa/Dar_es_Salaam"], [i.SN]: ["Africa/Dakar"], [i.AU]: ["Australia/Sydney", "Australia/Melbourne", "Australia/Perth", "Australia/Brisbane"], [i.NZ]: ["Pacific/Auckland"], [i.FJ]: ["Pacific/Fiji"], [i.PG]: ["Pacific/Port_Moresby"], [i.AQ]: ["Antarctica/McMurdo", "Antarctica/Palmer", "Antarctica/Casey"] };
|
|
70
|
+
Array.from(new Set(Object.values($e).flat()));
|
|
72
71
|
Array.from({ length: Ue }, (e, r) => r);
|
|
73
|
-
|
|
74
|
-
|
|
72
|
+
Array.from({ length: Ke }, (e, r) => r);
|
|
73
|
+
const G = 768;
|
|
74
|
+
function Je() {
|
|
75
75
|
const [e, r] = v.useState(void 0);
|
|
76
76
|
return v.useEffect(() => {
|
|
77
|
-
const t = window.matchMedia(`(max-width: ${
|
|
78
|
-
r(window.innerWidth <
|
|
77
|
+
const t = window.matchMedia(`(max-width: ${G - 1}px)`), a = () => {
|
|
78
|
+
r(window.innerWidth < G);
|
|
79
79
|
};
|
|
80
|
-
return t.addEventListener("change", a), r(window.innerWidth <
|
|
80
|
+
return t.addEventListener("change", a), r(window.innerWidth < G), () => t.removeEventListener("change", a);
|
|
81
81
|
}, []), !!e;
|
|
82
82
|
}
|
|
83
|
-
const
|
|
84
|
-
function
|
|
85
|
-
const e = v.useContext(
|
|
83
|
+
const Qe = "sidebar_state", Ze = We.WEEK, je = "16rem", qe = "18rem", Xe = "3rem", oe = v.createContext(null);
|
|
84
|
+
function ne() {
|
|
85
|
+
const e = v.useContext(oe);
|
|
86
86
|
if (!e)
|
|
87
87
|
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
88
88
|
return e;
|
|
89
89
|
}
|
|
90
|
-
function
|
|
90
|
+
function cr({
|
|
91
91
|
defaultOpen: e = !0,
|
|
92
92
|
open: r,
|
|
93
93
|
onOpenChange: t,
|
|
@@ -96,10 +96,10 @@ function ur({
|
|
|
96
96
|
children: s,
|
|
97
97
|
...d
|
|
98
98
|
}) {
|
|
99
|
-
const l =
|
|
99
|
+
const l = Je(), [f, p] = v.useState(!1), [M, g] = v.useState(e), x = r ?? M, w = v.useCallback(
|
|
100
100
|
(h) => {
|
|
101
101
|
const S = typeof h == "function" ? h(x) : h;
|
|
102
|
-
t ? t(S) : g(S), document.cookie = `${
|
|
102
|
+
t ? t(S) : g(S), document.cookie = `${Qe}=${S}; path=/; max-age=${Ze}`;
|
|
103
103
|
},
|
|
104
104
|
[t, x]
|
|
105
105
|
), A = v.useCallback(() => {
|
|
@@ -115,16 +115,16 @@ function ur({
|
|
|
115
115
|
}),
|
|
116
116
|
[y, x, w, l, f, p, A]
|
|
117
117
|
);
|
|
118
|
-
return /* @__PURE__ */ n(
|
|
118
|
+
return /* @__PURE__ */ n(oe.Provider, { value: b, children: /* @__PURE__ */ n(xe, { delayDuration: 0, children: /* @__PURE__ */ n(
|
|
119
119
|
"div",
|
|
120
120
|
{
|
|
121
121
|
"data-slot": "sidebar-wrapper",
|
|
122
122
|
style: {
|
|
123
|
-
"--sidebar-width":
|
|
123
|
+
"--sidebar-width": je,
|
|
124
124
|
"--sidebar-width-icon": Xe,
|
|
125
125
|
...o
|
|
126
126
|
},
|
|
127
|
-
className:
|
|
127
|
+
className: c(
|
|
128
128
|
"group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",
|
|
129
129
|
a
|
|
130
130
|
),
|
|
@@ -133,15 +133,15 @@ function ur({
|
|
|
133
133
|
}
|
|
134
134
|
) }) });
|
|
135
135
|
}
|
|
136
|
-
function
|
|
136
|
+
function Ye({
|
|
137
137
|
side: e,
|
|
138
138
|
openMobile: r,
|
|
139
139
|
setOpenMobile: t,
|
|
140
140
|
children: a,
|
|
141
141
|
...o
|
|
142
142
|
}) {
|
|
143
|
-
return /* @__PURE__ */ n(
|
|
144
|
-
|
|
143
|
+
return /* @__PURE__ */ n(Se, { open: r, onOpenChange: t, ...o, children: /* @__PURE__ */ N(
|
|
144
|
+
Ce,
|
|
145
145
|
{
|
|
146
146
|
"data-sidebar": "sidebar",
|
|
147
147
|
"data-slot": "sidebar",
|
|
@@ -152,16 +152,16 @@ function je({
|
|
|
152
152
|
},
|
|
153
153
|
side: e,
|
|
154
154
|
children: [
|
|
155
|
-
/* @__PURE__ */ N(
|
|
156
|
-
/* @__PURE__ */ n(
|
|
157
|
-
/* @__PURE__ */ n(
|
|
155
|
+
/* @__PURE__ */ N(Me, { className: "sr-only", children: [
|
|
156
|
+
/* @__PURE__ */ n(Ie, { children: "Sidebar" }),
|
|
157
|
+
/* @__PURE__ */ n(Ne, { children: "Displays the mobile sidebar." })
|
|
158
158
|
] }),
|
|
159
159
|
/* @__PURE__ */ n("div", { className: "flex h-full w-full flex-col", children: a })
|
|
160
160
|
]
|
|
161
161
|
}
|
|
162
162
|
) });
|
|
163
163
|
}
|
|
164
|
-
function
|
|
164
|
+
function et({
|
|
165
165
|
side: e,
|
|
166
166
|
variant: r,
|
|
167
167
|
collapsible: t,
|
|
@@ -184,7 +184,7 @@ function Ye({
|
|
|
184
184
|
"div",
|
|
185
185
|
{
|
|
186
186
|
"data-slot": "sidebar-gap",
|
|
187
|
-
className:
|
|
187
|
+
className: c(
|
|
188
188
|
"relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear",
|
|
189
189
|
"group-data-[collapsible=offcanvas]:w-0",
|
|
190
190
|
"group-data-[side=right]:rotate-180",
|
|
@@ -196,7 +196,7 @@ function Ye({
|
|
|
196
196
|
"div",
|
|
197
197
|
{
|
|
198
198
|
"data-slot": "sidebar-container",
|
|
199
|
-
className:
|
|
199
|
+
className: c(
|
|
200
200
|
"fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",
|
|
201
201
|
e === "left" ? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]" : "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",
|
|
202
202
|
// Adjust the padding for floating and inset variants.
|
|
@@ -219,7 +219,7 @@ function Ye({
|
|
|
219
219
|
}
|
|
220
220
|
);
|
|
221
221
|
}
|
|
222
|
-
function
|
|
222
|
+
function mr({
|
|
223
223
|
side: e = "left",
|
|
224
224
|
variant: r = "sidebar",
|
|
225
225
|
collapsible: t = "offcanvas",
|
|
@@ -227,20 +227,20 @@ function cr({
|
|
|
227
227
|
children: o,
|
|
228
228
|
...s
|
|
229
229
|
}) {
|
|
230
|
-
const { isMobile: d, state: l, openMobile: f, setOpenMobile: p } =
|
|
230
|
+
const { isMobile: d, state: l, openMobile: f, setOpenMobile: p } = ne();
|
|
231
231
|
return t === "none" ? /* @__PURE__ */ n(
|
|
232
232
|
"div",
|
|
233
233
|
{
|
|
234
234
|
"data-slot": "sidebar",
|
|
235
|
-
className:
|
|
235
|
+
className: c(
|
|
236
236
|
"bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",
|
|
237
237
|
a
|
|
238
238
|
),
|
|
239
239
|
...s,
|
|
240
240
|
children: o
|
|
241
241
|
}
|
|
242
|
-
) : d ? /* @__PURE__ */ n(
|
|
243
|
-
|
|
242
|
+
) : d ? /* @__PURE__ */ n(Ye, { side: e, openMobile: f, setOpenMobile: p, ...s, children: o }) : /* @__PURE__ */ n(
|
|
243
|
+
et,
|
|
244
244
|
{
|
|
245
245
|
side: e,
|
|
246
246
|
variant: r,
|
|
@@ -252,28 +252,28 @@ function cr({
|
|
|
252
252
|
}
|
|
253
253
|
);
|
|
254
254
|
}
|
|
255
|
-
function
|
|
255
|
+
function fr({ className: e, onClick: r, ...t }) {
|
|
256
256
|
return /* @__PURE__ */ N(
|
|
257
|
-
|
|
257
|
+
ae,
|
|
258
258
|
{
|
|
259
259
|
"data-sidebar": "trigger",
|
|
260
260
|
"data-slot": "sidebar-trigger",
|
|
261
261
|
variant: "ghost",
|
|
262
262
|
size: "icon",
|
|
263
|
-
className:
|
|
263
|
+
className: c("size-7", e),
|
|
264
264
|
onClick: (a) => {
|
|
265
265
|
r == null || r(a);
|
|
266
266
|
},
|
|
267
267
|
disabled: !0,
|
|
268
268
|
...t,
|
|
269
269
|
children: [
|
|
270
|
-
/* @__PURE__ */ n(
|
|
270
|
+
/* @__PURE__ */ n(Ve, {}),
|
|
271
271
|
/* @__PURE__ */ n("span", { className: "sr-only", children: "Toggle Sidebar" })
|
|
272
272
|
]
|
|
273
273
|
}
|
|
274
274
|
);
|
|
275
275
|
}
|
|
276
|
-
function
|
|
276
|
+
function pr({ className: e, ...r }) {
|
|
277
277
|
return /* @__PURE__ */ n(
|
|
278
278
|
"button",
|
|
279
279
|
{
|
|
@@ -285,7 +285,7 @@ function fr({ className: e, ...r }) {
|
|
|
285
285
|
},
|
|
286
286
|
title: "Toggle Sidebar",
|
|
287
287
|
disabled: !0,
|
|
288
|
-
className:
|
|
288
|
+
className: c(
|
|
289
289
|
"hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] sm:flex",
|
|
290
290
|
"in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize",
|
|
291
291
|
"[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",
|
|
@@ -298,12 +298,12 @@ function fr({ className: e, ...r }) {
|
|
|
298
298
|
}
|
|
299
299
|
);
|
|
300
300
|
}
|
|
301
|
-
function
|
|
301
|
+
function br({ className: e, ...r }) {
|
|
302
302
|
return /* @__PURE__ */ n(
|
|
303
303
|
"main",
|
|
304
304
|
{
|
|
305
305
|
"data-slot": "sidebar-inset",
|
|
306
|
-
className:
|
|
306
|
+
className: c(
|
|
307
307
|
"bg-background relative flex w-full flex-1 flex-col",
|
|
308
308
|
"md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",
|
|
309
309
|
e
|
|
@@ -312,57 +312,57 @@ function pr({ className: e, ...r }) {
|
|
|
312
312
|
}
|
|
313
313
|
);
|
|
314
314
|
}
|
|
315
|
-
function
|
|
315
|
+
function gr({ className: e, ...r }) {
|
|
316
316
|
return /* @__PURE__ */ n(
|
|
317
|
-
|
|
317
|
+
He,
|
|
318
318
|
{
|
|
319
319
|
"data-slot": "sidebar-input",
|
|
320
320
|
"data-sidebar": "input",
|
|
321
|
-
className:
|
|
321
|
+
className: c("bg-background h-10 w-full shadow-none", e),
|
|
322
322
|
...r
|
|
323
323
|
}
|
|
324
324
|
);
|
|
325
325
|
}
|
|
326
|
-
function
|
|
326
|
+
function hr({ className: e, ...r }) {
|
|
327
327
|
return /* @__PURE__ */ n(
|
|
328
328
|
"div",
|
|
329
329
|
{
|
|
330
330
|
"data-slot": "sidebar-header",
|
|
331
331
|
"data-sidebar": "header",
|
|
332
|
-
className:
|
|
332
|
+
className: c("flex flex-col gap-3 p-2", e),
|
|
333
333
|
...r
|
|
334
334
|
}
|
|
335
335
|
);
|
|
336
336
|
}
|
|
337
|
-
function
|
|
337
|
+
function xr({ className: e, ...r }) {
|
|
338
338
|
return /* @__PURE__ */ n(
|
|
339
339
|
"div",
|
|
340
340
|
{
|
|
341
341
|
"data-slot": "sidebar-footer",
|
|
342
342
|
"data-sidebar": "footer",
|
|
343
|
-
className:
|
|
343
|
+
className: c("flex flex-col gap-3 p-2", e),
|
|
344
344
|
...r
|
|
345
345
|
}
|
|
346
346
|
);
|
|
347
347
|
}
|
|
348
|
-
function
|
|
348
|
+
function vr({ className: e, ...r }) {
|
|
349
349
|
return /* @__PURE__ */ n(
|
|
350
|
-
|
|
350
|
+
ze,
|
|
351
351
|
{
|
|
352
352
|
"data-slot": "sidebar-separator",
|
|
353
353
|
"data-sidebar": "separator",
|
|
354
|
-
className:
|
|
354
|
+
className: c("bg-sidebar-border mx-2 w-auto", e),
|
|
355
355
|
...r
|
|
356
356
|
}
|
|
357
357
|
);
|
|
358
358
|
}
|
|
359
|
-
function
|
|
359
|
+
function Ar({ className: e, ...r }) {
|
|
360
360
|
return /* @__PURE__ */ n(
|
|
361
361
|
"div",
|
|
362
362
|
{
|
|
363
363
|
"data-slot": "sidebar-content",
|
|
364
364
|
"data-sidebar": "content",
|
|
365
|
-
className:
|
|
365
|
+
className: c(
|
|
366
366
|
"flex min-h-0 flex-1 flex-col gap-3 overflow-auto group-data-[collapsible=icon]:overflow-hidden",
|
|
367
367
|
e
|
|
368
368
|
),
|
|
@@ -370,18 +370,18 @@ function vr({ className: e, ...r }) {
|
|
|
370
370
|
}
|
|
371
371
|
);
|
|
372
372
|
}
|
|
373
|
-
function
|
|
373
|
+
function wr({ className: e, ...r }) {
|
|
374
374
|
return /* @__PURE__ */ n(
|
|
375
375
|
"div",
|
|
376
376
|
{
|
|
377
377
|
"data-slot": "sidebar-group",
|
|
378
378
|
"data-sidebar": "group",
|
|
379
|
-
className:
|
|
379
|
+
className: c("relative flex w-full min-w-0 flex-col p-2", e),
|
|
380
380
|
...r
|
|
381
381
|
}
|
|
382
382
|
);
|
|
383
383
|
}
|
|
384
|
-
function
|
|
384
|
+
function yr({
|
|
385
385
|
className: e,
|
|
386
386
|
asChild: r = !1,
|
|
387
387
|
...t
|
|
@@ -391,7 +391,7 @@ function wr({
|
|
|
391
391
|
{
|
|
392
392
|
"data-slot": "sidebar-group-label",
|
|
393
393
|
"data-sidebar": "group-label",
|
|
394
|
-
className:
|
|
394
|
+
className: c(
|
|
395
395
|
"text-sidebar-foreground/70 ring-sidebar-ring flex h-10 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-6 [&>svg]:shrink-0 [&>svg]:text-tertiary-foreground",
|
|
396
396
|
"group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",
|
|
397
397
|
e
|
|
@@ -400,7 +400,7 @@ function wr({
|
|
|
400
400
|
}
|
|
401
401
|
);
|
|
402
402
|
}
|
|
403
|
-
function
|
|
403
|
+
function Sr({
|
|
404
404
|
className: e,
|
|
405
405
|
asChild: r = !1,
|
|
406
406
|
...t
|
|
@@ -410,7 +410,7 @@ function yr({
|
|
|
410
410
|
{
|
|
411
411
|
"data-slot": "sidebar-group-action",
|
|
412
412
|
"data-sidebar": "group-action",
|
|
413
|
-
className:
|
|
413
|
+
className: c(
|
|
414
414
|
"text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-6 [&>svg]:shrink-0 [&>svg]:text-tertiary-foreground",
|
|
415
415
|
// Increases the hit area of the button on mobile.
|
|
416
416
|
"after:absolute after:-inset-2 md:after:hidden",
|
|
@@ -421,40 +421,40 @@ function yr({
|
|
|
421
421
|
}
|
|
422
422
|
);
|
|
423
423
|
}
|
|
424
|
-
function
|
|
424
|
+
function Cr({ className: e, ...r }) {
|
|
425
425
|
return /* @__PURE__ */ n(
|
|
426
426
|
"div",
|
|
427
427
|
{
|
|
428
428
|
"data-slot": "sidebar-group-content",
|
|
429
429
|
"data-sidebar": "group-content",
|
|
430
|
-
className:
|
|
430
|
+
className: c("w-full text-sm", e),
|
|
431
431
|
...r
|
|
432
432
|
}
|
|
433
433
|
);
|
|
434
434
|
}
|
|
435
|
-
function
|
|
435
|
+
function Mr({ className: e, ...r }) {
|
|
436
436
|
return /* @__PURE__ */ n(
|
|
437
437
|
"ul",
|
|
438
438
|
{
|
|
439
439
|
"data-slot": "sidebar-menu",
|
|
440
440
|
"data-sidebar": "menu",
|
|
441
|
-
className:
|
|
441
|
+
className: c("flex w-full min-w-0 flex-col gap-1", e),
|
|
442
442
|
...r
|
|
443
443
|
}
|
|
444
444
|
);
|
|
445
445
|
}
|
|
446
|
-
function
|
|
446
|
+
function Ir({ className: e, ...r }) {
|
|
447
447
|
return /* @__PURE__ */ n(
|
|
448
448
|
"li",
|
|
449
449
|
{
|
|
450
450
|
"data-slot": "sidebar-menu-item",
|
|
451
451
|
"data-sidebar": "menu-item",
|
|
452
|
-
className:
|
|
452
|
+
className: c("group/menu-item relative", e),
|
|
453
453
|
...r
|
|
454
454
|
}
|
|
455
455
|
);
|
|
456
456
|
}
|
|
457
|
-
const
|
|
457
|
+
const tt = Oe(
|
|
458
458
|
"peer/menu-button flex w-full items-center gap-3 overflow-hidden rounded-md p-2 text-left text-sm font-medium outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-6 [&>svg]:shrink-0 [&>svg]:text-tertiary-foreground",
|
|
459
459
|
{
|
|
460
460
|
variants: {
|
|
@@ -474,7 +474,7 @@ const et = Pe(
|
|
|
474
474
|
}
|
|
475
475
|
}
|
|
476
476
|
);
|
|
477
|
-
function
|
|
477
|
+
function Nr({
|
|
478
478
|
asChild: e = !1,
|
|
479
479
|
isActive: r = !1,
|
|
480
480
|
variant: t = "default",
|
|
@@ -483,23 +483,23 @@ function Ir({
|
|
|
483
483
|
className: s,
|
|
484
484
|
...d
|
|
485
485
|
}) {
|
|
486
|
-
const l = e ? T : "button", { isMobile: f, state: p } =
|
|
486
|
+
const l = e ? T : "button", { isMobile: f, state: p } = ne(), M = /* @__PURE__ */ n(
|
|
487
487
|
l,
|
|
488
488
|
{
|
|
489
489
|
"data-slot": "sidebar-menu-button",
|
|
490
490
|
"data-sidebar": "menu-button",
|
|
491
491
|
"data-size": a,
|
|
492
492
|
"data-active": r,
|
|
493
|
-
className:
|
|
493
|
+
className: c(tt({ variant: t, size: a }), s),
|
|
494
494
|
...d
|
|
495
495
|
}
|
|
496
496
|
);
|
|
497
497
|
return o ? (typeof o == "string" && (o = {
|
|
498
498
|
children: o
|
|
499
|
-
}), /* @__PURE__ */ N(
|
|
500
|
-
/* @__PURE__ */ n(
|
|
499
|
+
}), /* @__PURE__ */ N(be, { children: [
|
|
500
|
+
/* @__PURE__ */ n(ge, { asChild: !0, children: M }),
|
|
501
501
|
/* @__PURE__ */ n(
|
|
502
|
-
|
|
502
|
+
he,
|
|
503
503
|
{
|
|
504
504
|
side: "right",
|
|
505
505
|
align: "center",
|
|
@@ -507,9 +507,9 @@ function Ir({
|
|
|
507
507
|
...o
|
|
508
508
|
}
|
|
509
509
|
)
|
|
510
|
-
] })) :
|
|
510
|
+
] })) : M;
|
|
511
511
|
}
|
|
512
|
-
function
|
|
512
|
+
function Dr({
|
|
513
513
|
className: e,
|
|
514
514
|
asChild: r = !1,
|
|
515
515
|
showOnHover: t = !1,
|
|
@@ -520,7 +520,7 @@ function Nr({
|
|
|
520
520
|
{
|
|
521
521
|
"data-slot": "sidebar-menu-action",
|
|
522
522
|
"data-sidebar": "menu-action",
|
|
523
|
-
className:
|
|
523
|
+
className: c(
|
|
524
524
|
"text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-6 [&>svg]:shrink-0 [&>svg]:text-tertiary-foreground",
|
|
525
525
|
// Increases the hit area of the button on mobile.
|
|
526
526
|
"after:absolute after:-inset-2 md:after:hidden",
|
|
@@ -535,13 +535,13 @@ function Nr({
|
|
|
535
535
|
}
|
|
536
536
|
);
|
|
537
537
|
}
|
|
538
|
-
function
|
|
538
|
+
function _r({ className: e, ...r }) {
|
|
539
539
|
return /* @__PURE__ */ n(
|
|
540
540
|
"div",
|
|
541
541
|
{
|
|
542
542
|
"data-slot": "sidebar-menu-badge",
|
|
543
543
|
"data-sidebar": "menu-badge",
|
|
544
|
-
className:
|
|
544
|
+
className: c(
|
|
545
545
|
"text-sidebar-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none",
|
|
546
546
|
"peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground",
|
|
547
547
|
"peer-data-[size=sm]/menu-button:top-1",
|
|
@@ -554,19 +554,19 @@ function Dr({ className: e, ...r }) {
|
|
|
554
554
|
}
|
|
555
555
|
);
|
|
556
556
|
}
|
|
557
|
-
const
|
|
558
|
-
function
|
|
557
|
+
const rt = 50, at = 40;
|
|
558
|
+
function Er({
|
|
559
559
|
className: e,
|
|
560
560
|
showIcon: r = !1,
|
|
561
561
|
...t
|
|
562
562
|
}) {
|
|
563
|
-
const a = v.useMemo(() => `${Math.floor(Math.random() *
|
|
563
|
+
const a = v.useMemo(() => `${Math.floor(Math.random() * at) + rt}%`, []);
|
|
564
564
|
return /* @__PURE__ */ N(
|
|
565
565
|
"div",
|
|
566
566
|
{
|
|
567
567
|
"data-slot": "sidebar-menu-skeleton",
|
|
568
568
|
"data-sidebar": "menu-skeleton",
|
|
569
|
-
className:
|
|
569
|
+
className: c("flex h-10 items-center gap-3 rounded-md px-2", e),
|
|
570
570
|
...t,
|
|
571
571
|
children: [
|
|
572
572
|
r && /* @__PURE__ */ n(q, { className: "size-6 rounded-md", "data-sidebar": "menu-skeleton-icon" }),
|
|
@@ -584,13 +584,13 @@ function _r({
|
|
|
584
584
|
}
|
|
585
585
|
);
|
|
586
586
|
}
|
|
587
|
-
function
|
|
587
|
+
function Tr({ className: e, ...r }) {
|
|
588
588
|
return /* @__PURE__ */ n(
|
|
589
589
|
"ul",
|
|
590
590
|
{
|
|
591
591
|
"data-slot": "sidebar-menu-sub",
|
|
592
592
|
"data-sidebar": "menu-sub",
|
|
593
|
-
className:
|
|
593
|
+
className: c(
|
|
594
594
|
"border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5",
|
|
595
595
|
"group-data-[collapsible=icon]:hidden",
|
|
596
596
|
e
|
|
@@ -599,18 +599,18 @@ function Er({ className: e, ...r }) {
|
|
|
599
599
|
}
|
|
600
600
|
);
|
|
601
601
|
}
|
|
602
|
-
function
|
|
602
|
+
function kr({ className: e, ...r }) {
|
|
603
603
|
return /* @__PURE__ */ n(
|
|
604
604
|
"li",
|
|
605
605
|
{
|
|
606
606
|
"data-slot": "sidebar-menu-sub-item",
|
|
607
607
|
"data-sidebar": "menu-sub-item",
|
|
608
|
-
className:
|
|
608
|
+
className: c("group/menu-sub-item relative", e),
|
|
609
609
|
...r
|
|
610
610
|
}
|
|
611
611
|
);
|
|
612
612
|
}
|
|
613
|
-
function
|
|
613
|
+
function Fr({
|
|
614
614
|
asChild: e = !1,
|
|
615
615
|
size: r = "md",
|
|
616
616
|
isActive: t = !1,
|
|
@@ -624,7 +624,7 @@ function kr({
|
|
|
624
624
|
"data-sidebar": "menu-sub-button",
|
|
625
625
|
"data-size": r,
|
|
626
626
|
"data-active": t,
|
|
627
|
-
className:
|
|
627
|
+
className: c(
|
|
628
628
|
"text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-tertiary-foreground flex h-7 min-w-0 -translate-x-px items-center gap-3 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-6 [&>svg]:shrink-0",
|
|
629
629
|
"data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",
|
|
630
630
|
r === "sm" && "text-xs",
|
|
@@ -636,35 +636,34 @@ function kr({
|
|
|
636
636
|
}
|
|
637
637
|
);
|
|
638
638
|
}
|
|
639
|
-
var
|
|
640
|
-
const
|
|
641
|
-
var E = (e) => !
|
|
639
|
+
var ot = (e) => e.type === "checkbox", k = (e) => e instanceof Date, K = (e) => e == null;
|
|
640
|
+
const ie = (e) => typeof e == "object";
|
|
641
|
+
var E = (e) => !K(e) && !Array.isArray(e) && ie(e) && !k(e), nt = (e) => E(e) && e.target ? ot(e.target) ? e.target.checked : e.target.value : e, it = (e) => e.substring(0, e.search(/\.\d+(\.|$)/)) || e, st = (e, r) => e.has(it(r)), dt = (e) => {
|
|
642
642
|
const r = e.constructor && e.constructor.prototype;
|
|
643
643
|
return E(r) && r.hasOwnProperty("isPrototypeOf");
|
|
644
|
-
},
|
|
645
|
-
function
|
|
646
|
-
let r;
|
|
647
|
-
const t = Array.isArray(e), a = typeof FileList < "u" ? e instanceof FileList : !1;
|
|
644
|
+
}, lt = typeof window < "u" && typeof window.HTMLElement < "u" && typeof document < "u";
|
|
645
|
+
function se(e) {
|
|
648
646
|
if (e instanceof Date)
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
e.hasOwnProperty(o) && (r[o] = ie(e[o]));
|
|
656
|
-
else
|
|
647
|
+
return new Date(e);
|
|
648
|
+
const r = typeof FileList < "u" && e instanceof FileList;
|
|
649
|
+
if (lt && (e instanceof Blob || r))
|
|
650
|
+
return e;
|
|
651
|
+
const t = Array.isArray(e);
|
|
652
|
+
if (!t && !(E(e) && dt(e)))
|
|
657
653
|
return e;
|
|
658
|
-
|
|
654
|
+
const a = t ? [] : Object.create(Object.getPrototypeOf(e));
|
|
655
|
+
for (const o in e)
|
|
656
|
+
Object.prototype.hasOwnProperty.call(e, o) && (a[o] = se(e[o]));
|
|
657
|
+
return a;
|
|
659
658
|
}
|
|
660
|
-
var
|
|
659
|
+
var de = (e) => /^\w*$/.test(e), U = (e) => e === void 0, ut = (e) => Array.isArray(e) ? e.filter(Boolean) : [], le = (e) => ut(e.replace(/["|']|\]/g, "").split(/\.|\[/)), I = (e, r, t) => {
|
|
661
660
|
if (!r || !E(e))
|
|
662
661
|
return t;
|
|
663
|
-
const a = (
|
|
664
|
-
return
|
|
665
|
-
},
|
|
662
|
+
const a = (de(r) ? [r] : le(r)).reduce((o, s) => K(o) ? o : o[s], e);
|
|
663
|
+
return U(a) || a === e ? U(e[r]) ? t : e[r] : a;
|
|
664
|
+
}, H = (e) => typeof e == "boolean", R = (e) => typeof e == "function", X = (e, r, t) => {
|
|
666
665
|
let a = -1;
|
|
667
|
-
const o =
|
|
666
|
+
const o = de(r) ? [r] : le(r), s = o.length, d = s - 1;
|
|
668
667
|
for (; ++a < s; ) {
|
|
669
668
|
const l = o[a];
|
|
670
669
|
let f = t;
|
|
@@ -677,18 +676,18 @@ var se = (e) => /^\w*$/.test(e), z = (e) => e === void 0, lt = (e) => Array.isAr
|
|
|
677
676
|
e[l] = f, e = e[l];
|
|
678
677
|
}
|
|
679
678
|
};
|
|
680
|
-
const
|
|
679
|
+
const Y = {
|
|
681
680
|
BLUR: "blur",
|
|
682
681
|
CHANGE: "change"
|
|
683
|
-
},
|
|
682
|
+
}, ee = {
|
|
684
683
|
all: "all"
|
|
685
|
-
},
|
|
686
|
-
|
|
687
|
-
const
|
|
684
|
+
}, W = m.createContext(null);
|
|
685
|
+
W.displayName = "HookFormContext";
|
|
686
|
+
const V = () => m.useContext(W), ct = (e) => {
|
|
688
687
|
const { children: r, ...t } = e;
|
|
689
|
-
return m.createElement(
|
|
688
|
+
return m.createElement(W.Provider, { value: t }, r);
|
|
690
689
|
};
|
|
691
|
-
var
|
|
690
|
+
var mt = (e, r, t, a = !0) => {
|
|
692
691
|
const o = {
|
|
693
692
|
defaultValues: r._defaultValues
|
|
694
693
|
};
|
|
@@ -696,14 +695,14 @@ var ct = (e, r, t, a = !0) => {
|
|
|
696
695
|
Object.defineProperty(o, s, {
|
|
697
696
|
get: () => {
|
|
698
697
|
const d = s;
|
|
699
|
-
return r._proxyFormState[d] !==
|
|
698
|
+
return r._proxyFormState[d] !== ee.all && (r._proxyFormState[d] = !a || ee.all), t && (t[d] = !0), e[d];
|
|
700
699
|
}
|
|
701
700
|
});
|
|
702
701
|
return o;
|
|
703
702
|
};
|
|
704
|
-
const
|
|
705
|
-
function
|
|
706
|
-
const r =
|
|
703
|
+
const ue = typeof window < "u" ? m.useLayoutEffect : m.useEffect;
|
|
704
|
+
function ft(e) {
|
|
705
|
+
const r = V(), { control: t = r.control, disabled: a, name: o, exact: s } = e || {}, [d, l] = m.useState(t._formState), f = m.useRef({
|
|
707
706
|
isDirty: !1,
|
|
708
707
|
isLoading: !1,
|
|
709
708
|
dirtyFields: !1,
|
|
@@ -713,7 +712,7 @@ function mt(e) {
|
|
|
713
712
|
isValid: !1,
|
|
714
713
|
errors: !1
|
|
715
714
|
});
|
|
716
|
-
return
|
|
715
|
+
return ue(() => t._subscribe({
|
|
717
716
|
name: o,
|
|
718
717
|
formState: f.current,
|
|
719
718
|
exact: s,
|
|
@@ -725,11 +724,11 @@ function mt(e) {
|
|
|
725
724
|
}
|
|
726
725
|
}), [o, a, s]), m.useEffect(() => {
|
|
727
726
|
f.current.isValid && t._setValid(!0);
|
|
728
|
-
}, [t]), m.useMemo(() =>
|
|
727
|
+
}, [t]), m.useMemo(() => mt(d, t, f.current, !1), [d, t]);
|
|
729
728
|
}
|
|
730
|
-
var
|
|
731
|
-
function
|
|
732
|
-
if (
|
|
729
|
+
var pt = (e) => typeof e == "string", te = (e, r, t, a, o) => pt(e) ? I(t, e, o) : Array.isArray(e) ? e.map((s) => I(t, s)) : t, re = (e) => K(e) || !ie(e);
|
|
730
|
+
function O(e, r, t = /* @__PURE__ */ new WeakSet()) {
|
|
731
|
+
if (re(e) || re(r))
|
|
733
732
|
return Object.is(e, r);
|
|
734
733
|
if (k(e) && k(r))
|
|
735
734
|
return e.getTime() === r.getTime();
|
|
@@ -745,63 +744,63 @@ function P(e, r, t = /* @__PURE__ */ new WeakSet()) {
|
|
|
745
744
|
return !1;
|
|
746
745
|
if (s !== "ref") {
|
|
747
746
|
const l = r[s];
|
|
748
|
-
if (k(d) && k(l) || E(d) && E(l) || Array.isArray(d) && Array.isArray(l) ? !
|
|
747
|
+
if (k(d) && k(l) || E(d) && E(l) || Array.isArray(d) && Array.isArray(l) ? !O(d, l, t) : !Object.is(d, l))
|
|
749
748
|
return !1;
|
|
750
749
|
}
|
|
751
750
|
}
|
|
752
751
|
return !0;
|
|
753
752
|
}
|
|
754
|
-
function
|
|
755
|
-
const r =
|
|
753
|
+
function bt(e) {
|
|
754
|
+
const r = V(), { control: t = r.control, name: a, defaultValue: o, disabled: s, exact: d, compute: l } = e || {}, f = m.useRef(o), p = m.useRef(l), M = m.useRef(void 0), g = m.useRef(t), x = m.useRef(a);
|
|
756
755
|
p.current = l;
|
|
757
756
|
const [w, A] = m.useState(() => {
|
|
758
|
-
const
|
|
759
|
-
return p.current ? p.current(
|
|
760
|
-
}), y = m.useCallback((
|
|
761
|
-
const
|
|
762
|
-
return p.current ? p.current(
|
|
763
|
-
}, [t._formValues, t._names, a]), b = m.useCallback((
|
|
757
|
+
const u = t._getWatch(a, f.current);
|
|
758
|
+
return p.current ? p.current(u) : u;
|
|
759
|
+
}), y = m.useCallback((u) => {
|
|
760
|
+
const C = te(a, t._names, u || t._formValues, !1, f.current);
|
|
761
|
+
return p.current ? p.current(C) : C;
|
|
762
|
+
}, [t._formValues, t._names, a]), b = m.useCallback((u) => {
|
|
764
763
|
if (!s) {
|
|
765
|
-
const
|
|
764
|
+
const C = te(a, t._names, u || t._formValues, !1, f.current);
|
|
766
765
|
if (p.current) {
|
|
767
|
-
const _ = p.current(
|
|
768
|
-
|
|
766
|
+
const _ = p.current(C);
|
|
767
|
+
O(_, M.current) || (A(_), M.current = _);
|
|
769
768
|
} else
|
|
770
|
-
A(
|
|
769
|
+
A(C);
|
|
771
770
|
}
|
|
772
771
|
}, [t._formValues, t._names, s, a]);
|
|
773
|
-
|
|
772
|
+
ue(() => ((g.current !== t || !O(x.current, a)) && (g.current = t, x.current = a, b()), t._subscribe({
|
|
774
773
|
name: a,
|
|
775
774
|
formState: {
|
|
776
775
|
values: !0
|
|
777
776
|
},
|
|
778
777
|
exact: d,
|
|
779
|
-
callback: (
|
|
780
|
-
b(
|
|
778
|
+
callback: (u) => {
|
|
779
|
+
b(u.values);
|
|
781
780
|
}
|
|
782
781
|
})), [t, d, a, b]), m.useEffect(() => t._removeUnmounted());
|
|
783
782
|
const h = g.current !== t, S = x.current, D = m.useMemo(() => {
|
|
784
783
|
if (s)
|
|
785
784
|
return null;
|
|
786
|
-
const
|
|
787
|
-
return h ||
|
|
785
|
+
const u = !h && !O(S, a);
|
|
786
|
+
return h || u ? y() : null;
|
|
788
787
|
}, [s, h, a, S, y]);
|
|
789
788
|
return D !== null ? D : w;
|
|
790
789
|
}
|
|
791
|
-
function
|
|
792
|
-
const r =
|
|
790
|
+
function gt(e) {
|
|
791
|
+
const r = V(), { name: t, disabled: a, control: o = r.control, shouldUnregister: s, defaultValue: d, exact: l = !0 } = e, f = st(o._names.array, t), p = m.useMemo(() => I(o._formValues, t, I(o._defaultValues, t, d)), [o, t, d]), M = bt({
|
|
793
792
|
control: o,
|
|
794
793
|
name: t,
|
|
795
794
|
defaultValue: p,
|
|
796
795
|
exact: l
|
|
797
|
-
}), g =
|
|
796
|
+
}), g = ft({
|
|
798
797
|
control: o,
|
|
799
798
|
name: t,
|
|
800
799
|
exact: l
|
|
801
800
|
}), x = m.useRef(e), w = m.useRef(void 0), A = m.useRef(o.register(t, {
|
|
802
801
|
...e.rules,
|
|
803
|
-
value:
|
|
804
|
-
...
|
|
802
|
+
value: M,
|
|
803
|
+
...H(e.disabled) ? { disabled: e.disabled } : {}
|
|
805
804
|
}));
|
|
806
805
|
x.current = e;
|
|
807
806
|
const y = m.useMemo(() => Object.defineProperties({}, {
|
|
@@ -825,50 +824,50 @@ function bt(e) {
|
|
|
825
824
|
enumerable: !0,
|
|
826
825
|
get: () => I(g.errors, t)
|
|
827
826
|
}
|
|
828
|
-
}), [g, t]), b = m.useCallback((
|
|
827
|
+
}), [g, t]), b = m.useCallback((u) => A.current.onChange({
|
|
829
828
|
target: {
|
|
830
|
-
value:
|
|
829
|
+
value: nt(u),
|
|
831
830
|
name: t
|
|
832
831
|
},
|
|
833
|
-
type:
|
|
832
|
+
type: Y.CHANGE
|
|
834
833
|
}), [t]), h = m.useCallback(() => A.current.onBlur({
|
|
835
834
|
target: {
|
|
836
835
|
value: I(o._formValues, t),
|
|
837
836
|
name: t
|
|
838
837
|
},
|
|
839
|
-
type:
|
|
840
|
-
}), [t, o._formValues]), S = m.useCallback((
|
|
841
|
-
const
|
|
842
|
-
|
|
843
|
-
focus: () =>
|
|
844
|
-
select: () =>
|
|
845
|
-
setCustomValidity: (_) =>
|
|
846
|
-
reportValidity: () =>
|
|
838
|
+
type: Y.BLUR
|
|
839
|
+
}), [t, o._formValues]), S = m.useCallback((u) => {
|
|
840
|
+
const C = I(o._fields, t);
|
|
841
|
+
C && C._f && u && (C._f.ref = {
|
|
842
|
+
focus: () => R(u.focus) && u.focus(),
|
|
843
|
+
select: () => R(u.select) && u.select(),
|
|
844
|
+
setCustomValidity: (_) => R(u.setCustomValidity) && u.setCustomValidity(_),
|
|
845
|
+
reportValidity: () => R(u.reportValidity) && u.reportValidity()
|
|
847
846
|
});
|
|
848
847
|
}, [o._fields, t]), D = m.useMemo(() => ({
|
|
849
848
|
name: t,
|
|
850
|
-
value:
|
|
851
|
-
...
|
|
849
|
+
value: M,
|
|
850
|
+
...H(a) || g.disabled ? { disabled: g.disabled || a } : {},
|
|
852
851
|
onChange: b,
|
|
853
852
|
onBlur: h,
|
|
854
853
|
ref: S
|
|
855
|
-
}), [t, a, g.disabled, b, h, S,
|
|
854
|
+
}), [t, a, g.disabled, b, h, S, M]);
|
|
856
855
|
return m.useEffect(() => {
|
|
857
|
-
const
|
|
858
|
-
|
|
856
|
+
const u = o._options.shouldUnregister || s, C = w.current;
|
|
857
|
+
C && C !== t && !f && o.unregister(C), o.register(t, {
|
|
859
858
|
...x.current.rules,
|
|
860
|
-
...
|
|
859
|
+
...H(x.current.disabled) ? { disabled: x.current.disabled } : {}
|
|
861
860
|
});
|
|
862
|
-
const _ = (
|
|
863
|
-
const
|
|
864
|
-
|
|
861
|
+
const _ = (F, pe) => {
|
|
862
|
+
const L = I(o._fields, F);
|
|
863
|
+
L && L._f && (L._f.mount = pe);
|
|
865
864
|
};
|
|
866
|
-
if (_(t, !0),
|
|
867
|
-
const
|
|
868
|
-
X(o._defaultValues, t,
|
|
865
|
+
if (_(t, !0), u) {
|
|
866
|
+
const F = se(I(o._options.defaultValues, t, x.current.defaultValue));
|
|
867
|
+
X(o._defaultValues, t, F), U(I(o._formValues, t)) && X(o._formValues, t, F);
|
|
869
868
|
}
|
|
870
869
|
return !f && o.register(t), w.current = t, () => {
|
|
871
|
-
(f ?
|
|
870
|
+
(f ? u && !o._state.action : u) ? o.unregister(t) : _(t, !1);
|
|
872
871
|
};
|
|
873
872
|
}, [t, o, f, s]), m.useEffect(() => {
|
|
874
873
|
o._setDisabledField({
|
|
@@ -881,10 +880,10 @@ function bt(e) {
|
|
|
881
880
|
fieldState: y
|
|
882
881
|
}), [D, g, y]);
|
|
883
882
|
}
|
|
884
|
-
const
|
|
883
|
+
const ht = (e) => e.render(gt(e)), Rr = ct, ce = v.createContext(null), Pr = ({
|
|
885
884
|
...e
|
|
886
|
-
}) => /* @__PURE__ */ n(
|
|
887
|
-
const e = v.useContext(
|
|
885
|
+
}) => /* @__PURE__ */ n(ce.Provider, { value: { name: e.name }, children: /* @__PURE__ */ n(ht, { ...e }) }), B = () => {
|
|
886
|
+
const e = v.useContext(ce), r = v.useContext(me), { getFieldState: t, formState: a } = V();
|
|
888
887
|
if (!e)
|
|
889
888
|
throw new Error("useFormField should be used within <FormField>");
|
|
890
889
|
if (!r)
|
|
@@ -898,28 +897,28 @@ const gt = (e) => e.render(bt(e)), Rr = ut, ue = v.createContext(null), Fr = ({
|
|
|
898
897
|
formMessageId: `${s}-form-item-message`,
|
|
899
898
|
...o
|
|
900
899
|
};
|
|
901
|
-
},
|
|
900
|
+
}, me = v.createContext(null), xt = v.forwardRef(
|
|
902
901
|
({ className: e, ...r }, t) => {
|
|
903
902
|
const a = v.useId();
|
|
904
|
-
return /* @__PURE__ */ n(
|
|
903
|
+
return /* @__PURE__ */ n(me.Provider, { value: { id: a }, children: /* @__PURE__ */ n("div", { ref: t, className: c("space-y-2", e), ...r }) });
|
|
905
904
|
}
|
|
906
905
|
);
|
|
907
|
-
|
|
908
|
-
const
|
|
909
|
-
const { error: a, formItemId: o } =
|
|
906
|
+
xt.displayName = "FormItem";
|
|
907
|
+
const vt = v.forwardRef(({ className: e, ...r }, t) => {
|
|
908
|
+
const { error: a, formItemId: o } = B();
|
|
910
909
|
return /* @__PURE__ */ n(
|
|
911
|
-
|
|
910
|
+
De,
|
|
912
911
|
{
|
|
913
912
|
ref: t,
|
|
914
|
-
className:
|
|
913
|
+
className: c(a && "text-destructive", e),
|
|
915
914
|
htmlFor: o,
|
|
916
915
|
...r
|
|
917
916
|
}
|
|
918
917
|
);
|
|
919
918
|
});
|
|
920
|
-
|
|
921
|
-
const
|
|
922
|
-
const { error: t, formItemId: a, formDescriptionId: o, formMessageId: s } =
|
|
919
|
+
vt.displayName = "FormLabel";
|
|
920
|
+
const At = v.forwardRef(({ ...e }, r) => {
|
|
921
|
+
const { error: t, formItemId: a, formDescriptionId: o, formMessageId: s } = B();
|
|
923
922
|
return /* @__PURE__ */ n(
|
|
924
923
|
T,
|
|
925
924
|
{
|
|
@@ -931,48 +930,48 @@ const vt = v.forwardRef(({ ...e }, r) => {
|
|
|
931
930
|
}
|
|
932
931
|
);
|
|
933
932
|
});
|
|
934
|
-
|
|
935
|
-
const
|
|
936
|
-
const { formDescriptionId: a } =
|
|
933
|
+
At.displayName = "FormControl";
|
|
934
|
+
const wt = v.forwardRef(({ className: e, ...r }, t) => {
|
|
935
|
+
const { formDescriptionId: a } = B();
|
|
937
936
|
return /* @__PURE__ */ n(
|
|
938
937
|
"p",
|
|
939
938
|
{
|
|
940
939
|
ref: t,
|
|
941
940
|
id: a,
|
|
942
|
-
className:
|
|
941
|
+
className: c("text-[0.8rem] text-muted-foreground", e),
|
|
943
942
|
...r
|
|
944
943
|
}
|
|
945
944
|
);
|
|
946
945
|
});
|
|
947
|
-
|
|
948
|
-
const
|
|
949
|
-
const { error: o, formMessageId: s } =
|
|
946
|
+
wt.displayName = "FormDescription";
|
|
947
|
+
const yt = v.forwardRef(({ className: e, children: r, ...t }, a) => {
|
|
948
|
+
const { error: o, formMessageId: s } = B(), d = o ? String((o == null ? void 0 : o.message) ?? "") : r;
|
|
950
949
|
return d ? /* @__PURE__ */ n(
|
|
951
950
|
"p",
|
|
952
951
|
{
|
|
953
952
|
ref: a,
|
|
954
953
|
id: s,
|
|
955
|
-
className:
|
|
954
|
+
className: c("font-medium text-[0.8rem] text-destructive", e),
|
|
956
955
|
...t,
|
|
957
956
|
children: d
|
|
958
957
|
}
|
|
959
958
|
) : null;
|
|
960
959
|
});
|
|
961
|
-
|
|
962
|
-
function
|
|
960
|
+
yt.displayName = "FormMessage";
|
|
961
|
+
function St(e, r) {
|
|
963
962
|
let t = null;
|
|
964
963
|
return function(...a) {
|
|
965
964
|
t && clearTimeout(t), t = setTimeout(() => e.apply(this, a), r);
|
|
966
965
|
};
|
|
967
966
|
}
|
|
968
|
-
const
|
|
969
|
-
function
|
|
967
|
+
const fe = Fe(null);
|
|
968
|
+
function Or({
|
|
970
969
|
children: e,
|
|
971
970
|
values: r,
|
|
972
971
|
defaultValues: t,
|
|
973
972
|
onValuesChange: a
|
|
974
973
|
}) {
|
|
975
|
-
const [o, s] =
|
|
974
|
+
const [o, s] = P(!1), [d, l] = P(new Set(r ?? t)), f = r ? new Set(r) : d, [p, M] = P(/* @__PURE__ */ new Map());
|
|
976
975
|
function g(w) {
|
|
977
976
|
const A = (y) => {
|
|
978
977
|
const b = new Set(y);
|
|
@@ -980,11 +979,11 @@ function Pr({
|
|
|
980
979
|
};
|
|
981
980
|
l(A), a == null || a([...A(f)]);
|
|
982
981
|
}
|
|
983
|
-
const x =
|
|
984
|
-
|
|
982
|
+
const x = z((w, A) => {
|
|
983
|
+
M((y) => y.get(w) === A ? y : new Map(y).set(w, A));
|
|
985
984
|
}, []);
|
|
986
985
|
return /* @__PURE__ */ n(
|
|
987
|
-
|
|
986
|
+
fe,
|
|
988
987
|
{
|
|
989
988
|
value: {
|
|
990
989
|
open: o,
|
|
@@ -994,57 +993,57 @@ function Pr({
|
|
|
994
993
|
items: p,
|
|
995
994
|
onItemAdded: x
|
|
996
995
|
},
|
|
997
|
-
children: /* @__PURE__ */ n(
|
|
996
|
+
children: /* @__PURE__ */ n(_e, { open: o, onOpenChange: s, modal: !0, children: e })
|
|
998
997
|
}
|
|
999
998
|
);
|
|
1000
999
|
}
|
|
1001
|
-
function
|
|
1000
|
+
function Vr({
|
|
1002
1001
|
className: e,
|
|
1003
1002
|
children: r,
|
|
1004
1003
|
...t
|
|
1005
1004
|
}) {
|
|
1006
|
-
const { open: a } =
|
|
1007
|
-
return /* @__PURE__ */ n(
|
|
1008
|
-
|
|
1005
|
+
const { open: a } = $();
|
|
1006
|
+
return /* @__PURE__ */ n(Te, { asChild: !0, children: /* @__PURE__ */ N(
|
|
1007
|
+
ae,
|
|
1009
1008
|
{
|
|
1010
1009
|
...t,
|
|
1011
1010
|
variant: t.variant ?? "outline",
|
|
1012
1011
|
role: t.role ?? "combobox",
|
|
1013
1012
|
"aria-expanded": t["aria-expanded"] ?? a,
|
|
1014
|
-
className:
|
|
1013
|
+
className: c(
|
|
1015
1014
|
"flex text-secondary cursor-pointer h-auto min-h-9 w-fit items-center justify-between gap-2 overflow-hidden rounded-md border border-input bg-transparent px-3 py-1.5 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",
|
|
1016
1015
|
e
|
|
1017
1016
|
),
|
|
1018
1017
|
children: [
|
|
1019
1018
|
r,
|
|
1020
|
-
/* @__PURE__ */ n(
|
|
1019
|
+
/* @__PURE__ */ n(Le, { className: "opacity-50 size-4 shrink-0" })
|
|
1021
1020
|
]
|
|
1022
1021
|
}
|
|
1023
1022
|
) });
|
|
1024
1023
|
}
|
|
1025
|
-
function
|
|
1024
|
+
function Br({
|
|
1026
1025
|
placeholder: e,
|
|
1027
1026
|
clickToRemove: r = !0,
|
|
1028
1027
|
className: t,
|
|
1029
1028
|
overflowBehavior: a = "wrap-when-open",
|
|
1030
1029
|
...o
|
|
1031
1030
|
}) {
|
|
1032
|
-
const { selectedValues: s, toggleValue: d, items: l, open: f } =
|
|
1031
|
+
const { selectedValues: s, toggleValue: d, items: l, open: f } = $(), [p, M] = P(0), g = Z(null), x = Z(null), w = a === "wrap" || a === "wrap-when-open" && f, A = z(() => {
|
|
1033
1032
|
if (g.current == null) return;
|
|
1034
1033
|
const b = g.current, h = x.current, S = b.querySelectorAll("[data-selected-item]");
|
|
1035
|
-
h != null && (h.style.display = "none"), S.forEach((
|
|
1034
|
+
h != null && (h.style.display = "none"), S.forEach((u) => u.style.removeProperty("display"));
|
|
1036
1035
|
let D = 0;
|
|
1037
|
-
for (let
|
|
1038
|
-
const
|
|
1036
|
+
for (let u = S.length - 1; u >= 0; u--) {
|
|
1037
|
+
const C = S[u];
|
|
1039
1038
|
if (b.scrollWidth <= b.clientWidth)
|
|
1040
1039
|
break;
|
|
1041
|
-
D = S.length -
|
|
1040
|
+
D = S.length - u, C.style.display = "none", h == null || h.style.removeProperty("display");
|
|
1042
1041
|
}
|
|
1043
|
-
|
|
1044
|
-
}, []), y =
|
|
1042
|
+
M(D);
|
|
1043
|
+
}, []), y = z(
|
|
1045
1044
|
(b) => {
|
|
1046
1045
|
g.current = b;
|
|
1047
|
-
const h = new MutationObserver(A), S = 100, D = new ResizeObserver(
|
|
1046
|
+
const h = new MutationObserver(A), S = 100, D = new ResizeObserver(St(A, S));
|
|
1048
1047
|
return h.observe(b, {
|
|
1049
1048
|
childList: !0,
|
|
1050
1049
|
attributes: !0,
|
|
@@ -1060,14 +1059,14 @@ function Vr({
|
|
|
1060
1059
|
{
|
|
1061
1060
|
...o,
|
|
1062
1061
|
ref: y,
|
|
1063
|
-
className:
|
|
1062
|
+
className: c(
|
|
1064
1063
|
"flex gap-1.5 w-full overflow-hidden",
|
|
1065
1064
|
w && "h-full flex-wrap",
|
|
1066
1065
|
t
|
|
1067
1066
|
),
|
|
1068
1067
|
children: [
|
|
1069
1068
|
[...s].filter((b) => l.has(b)).map((b) => /* @__PURE__ */ N(
|
|
1070
|
-
|
|
1069
|
+
j,
|
|
1071
1070
|
{
|
|
1072
1071
|
variant: "outline",
|
|
1073
1072
|
"data-selected-item": !0,
|
|
@@ -1077,13 +1076,13 @@ function Vr({
|
|
|
1077
1076
|
} : void 0,
|
|
1078
1077
|
children: [
|
|
1079
1078
|
l.get(b),
|
|
1080
|
-
r && /* @__PURE__ */ n(
|
|
1079
|
+
r && /* @__PURE__ */ n(Ge, { className: "size-2 text-muted-foreground group-hover:text-destructive hover:cursor-pointer group-hover:cursor-pointer" })
|
|
1081
1080
|
]
|
|
1082
1081
|
},
|
|
1083
1082
|
b
|
|
1084
1083
|
)),
|
|
1085
1084
|
/* @__PURE__ */ N(
|
|
1086
|
-
|
|
1085
|
+
j,
|
|
1087
1086
|
{
|
|
1088
1087
|
className: "text-secondary cursor-pointer",
|
|
1089
1088
|
style: {
|
|
@@ -1101,29 +1100,29 @@ function Vr({
|
|
|
1101
1100
|
}
|
|
1102
1101
|
);
|
|
1103
1102
|
}
|
|
1104
|
-
function
|
|
1103
|
+
function Lr({
|
|
1105
1104
|
search: e = !0,
|
|
1106
1105
|
children: r,
|
|
1107
1106
|
...t
|
|
1108
1107
|
}) {
|
|
1109
1108
|
const a = typeof e == "object" ? !0 : e;
|
|
1110
|
-
return /* @__PURE__ */ N(
|
|
1111
|
-
/* @__PURE__ */ n("div", { style: { display: "none" }, children: /* @__PURE__ */ n(
|
|
1112
|
-
/* @__PURE__ */ n(
|
|
1109
|
+
return /* @__PURE__ */ N(ke, { children: [
|
|
1110
|
+
/* @__PURE__ */ n("div", { style: { display: "none" }, children: /* @__PURE__ */ n(J, { children: /* @__PURE__ */ n(Q, { children: r }) }) }),
|
|
1111
|
+
/* @__PURE__ */ n(Ee, { className: "p-0 min-w-[var(--radix-popover-trigger-width)]", children: /* @__PURE__ */ N(J, { ...t, children: [
|
|
1113
1112
|
a ? /* @__PURE__ */ n(
|
|
1114
|
-
|
|
1113
|
+
ve,
|
|
1115
1114
|
{
|
|
1116
1115
|
placeholder: typeof e == "object" ? e.placeholder : void 0
|
|
1117
1116
|
}
|
|
1118
1117
|
) : /* @__PURE__ */ n("button", { className: "sr-only" }),
|
|
1119
|
-
/* @__PURE__ */ N(
|
|
1120
|
-
a && /* @__PURE__ */ n(
|
|
1118
|
+
/* @__PURE__ */ N(Q, { children: [
|
|
1119
|
+
a && /* @__PURE__ */ n(Ae, { children: typeof e == "object" ? e.emptyMessage : void 0 }),
|
|
1121
1120
|
r
|
|
1122
1121
|
] })
|
|
1123
1122
|
] }) })
|
|
1124
1123
|
] });
|
|
1125
1124
|
}
|
|
1126
|
-
function
|
|
1125
|
+
function Gr({
|
|
1127
1126
|
value: e,
|
|
1128
1127
|
children: r,
|
|
1129
1128
|
badgeLabel: t,
|
|
@@ -1131,210 +1130,210 @@ function Lr({
|
|
|
1131
1130
|
className: o,
|
|
1132
1131
|
...s
|
|
1133
1132
|
}) {
|
|
1134
|
-
const { toggleValue: d, selectedValues: l, onItemAdded: f } =
|
|
1133
|
+
const { toggleValue: d, selectedValues: l, onItemAdded: f } = $(), p = l.has(e);
|
|
1135
1134
|
return Re(() => {
|
|
1136
1135
|
f(e, t ?? r);
|
|
1137
1136
|
}, [e, r, f, t]), /* @__PURE__ */ N(
|
|
1138
|
-
|
|
1137
|
+
ye,
|
|
1139
1138
|
{
|
|
1140
1139
|
...s,
|
|
1141
1140
|
onSelect: () => {
|
|
1142
1141
|
d(e), a == null || a(e);
|
|
1143
1142
|
},
|
|
1144
|
-
className:
|
|
1143
|
+
className: c("text-secondary data-[selected=true]:text-secondary cursor-pointer", o),
|
|
1145
1144
|
children: [
|
|
1146
|
-
/* @__PURE__ */ n(
|
|
1145
|
+
/* @__PURE__ */ n(Be, { className: c("mr-2 size-4", p ? "opacity-100" : "opacity-0") }),
|
|
1147
1146
|
r
|
|
1148
1147
|
]
|
|
1149
1148
|
}
|
|
1150
1149
|
);
|
|
1151
1150
|
}
|
|
1152
|
-
function
|
|
1153
|
-
return /* @__PURE__ */ n(
|
|
1151
|
+
function Hr(e) {
|
|
1152
|
+
return /* @__PURE__ */ n(we, { ...e });
|
|
1154
1153
|
}
|
|
1155
|
-
function
|
|
1156
|
-
const e =
|
|
1154
|
+
function $() {
|
|
1155
|
+
const e = Pe(fe);
|
|
1157
1156
|
if (e == null)
|
|
1158
1157
|
throw new Error("useMultiSelectContext must be used within a MultiSelectContext");
|
|
1159
1158
|
return e;
|
|
1160
1159
|
}
|
|
1161
1160
|
export {
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1161
|
+
Ca as Accordion,
|
|
1162
|
+
Ma as AccordionContent,
|
|
1163
|
+
Ia as AccordionItem,
|
|
1164
|
+
Na as AccordionTrigger,
|
|
1165
|
+
$r as AlertDialog,
|
|
1166
|
+
Jr as AlertDialogAction,
|
|
1167
|
+
Qr as AlertDialogCancel,
|
|
1168
|
+
Zr as AlertDialogContent,
|
|
1169
|
+
jr as AlertDialogDescription,
|
|
1171
1170
|
qr as AlertDialogFooter,
|
|
1172
1171
|
Xr as AlertDialogHeader,
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1172
|
+
Yr as AlertDialogOverlay,
|
|
1173
|
+
ea as AlertDialogPortal,
|
|
1174
|
+
ta as AlertDialogTitle,
|
|
1175
|
+
ra as AlertDialogTrigger,
|
|
1176
|
+
_a as Avatar,
|
|
1177
|
+
Ea as AvatarFallback,
|
|
1178
|
+
Ta as AvatarImage,
|
|
1179
|
+
oa as Calendar,
|
|
1180
|
+
na as CalendarDayButton,
|
|
1181
|
+
sa as Carousel,
|
|
1182
|
+
da as CarouselContent,
|
|
1183
|
+
la as CarouselItem,
|
|
1184
|
+
ua as CarouselNext,
|
|
1185
|
+
ca as CarouselPrevious,
|
|
1186
|
+
Fa as Checkbox,
|
|
1187
|
+
fa as Combobox,
|
|
1188
|
+
J as Command,
|
|
1189
|
+
To as CommandDialog,
|
|
1190
|
+
Ae as CommandEmpty,
|
|
1191
|
+
we as CommandGroup,
|
|
1192
|
+
ve as CommandInput,
|
|
1193
|
+
ye as CommandItem,
|
|
1194
|
+
Q as CommandList,
|
|
1195
|
+
ko as CommandSeparator,
|
|
1196
|
+
Fo as CommandShortcut,
|
|
1197
|
+
Pa as ContextMenu,
|
|
1198
|
+
Oa as ContextMenuCheckboxItem,
|
|
1199
|
+
Va as ContextMenuContent,
|
|
1200
|
+
Ba as ContextMenuGroup,
|
|
1201
|
+
La as ContextMenuItem,
|
|
1202
|
+
Ga as ContextMenuLabel,
|
|
1203
|
+
Ha as ContextMenuPortal,
|
|
1204
|
+
za as ContextMenuRadioGroup,
|
|
1205
|
+
Ua as ContextMenuRadioItem,
|
|
1206
|
+
Ka as ContextMenuSeparator,
|
|
1207
|
+
Wa as ContextMenuShortcut,
|
|
1208
|
+
$a as ContextMenuSub,
|
|
1209
|
+
Ja as ContextMenuSubContent,
|
|
1210
|
+
Qa as ContextMenuSubTrigger,
|
|
1211
|
+
Za as ContextMenuTrigger,
|
|
1212
|
+
Po as Dialog,
|
|
1213
|
+
Oo as DialogClose,
|
|
1214
|
+
Vo as DialogContent,
|
|
1215
|
+
Bo as DialogDescription,
|
|
1216
|
+
Lo as DialogFooter,
|
|
1217
|
+
Go as DialogHeader,
|
|
1218
|
+
Ho as DialogOverlay,
|
|
1219
|
+
zo as DialogPortal,
|
|
1220
|
+
Uo as DialogTitle,
|
|
1221
|
+
Ko as DialogTrigger,
|
|
1222
|
+
$o as Drawer,
|
|
1223
|
+
Jo as DrawerClose,
|
|
1224
|
+
Qo as DrawerContent,
|
|
1225
|
+
Zo as DrawerDescription,
|
|
1226
|
+
jo as DrawerFooter,
|
|
1228
1227
|
qo as DrawerHeader,
|
|
1229
1228
|
Xo as DrawerOverlay,
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1229
|
+
Yo as DrawerPortal,
|
|
1230
|
+
en as DrawerTitle,
|
|
1231
|
+
tn as DrawerTrigger,
|
|
1233
1232
|
qa as DropdownMenu,
|
|
1234
1233
|
Xa as DropdownMenuCheckboxItem,
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1234
|
+
Ya as DropdownMenuContent,
|
|
1235
|
+
eo as DropdownMenuGroup,
|
|
1236
|
+
to as DropdownMenuItem,
|
|
1237
|
+
ro as DropdownMenuLabel,
|
|
1238
|
+
ao as DropdownMenuPortal,
|
|
1239
|
+
oo as DropdownMenuRadioGroup,
|
|
1240
|
+
no as DropdownMenuRadioItem,
|
|
1241
|
+
io as DropdownMenuSeparator,
|
|
1242
|
+
so as DropdownMenuShortcut,
|
|
1243
|
+
lo as DropdownMenuSub,
|
|
1244
|
+
uo as DropdownMenuSubContent,
|
|
1245
|
+
co as DropdownMenuSubTrigger,
|
|
1246
|
+
mo as DropdownMenuTrigger,
|
|
1248
1247
|
Rr as Form,
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1248
|
+
At as FormControl,
|
|
1249
|
+
wt as FormDescription,
|
|
1250
|
+
Pr as FormField,
|
|
1251
|
+
xt as FormItem,
|
|
1252
|
+
vt as FormLabel,
|
|
1253
|
+
yt as FormMessage,
|
|
1254
|
+
po as HoverCard,
|
|
1255
|
+
bo as HoverCardContent,
|
|
1256
|
+
go as HoverCardTrigger,
|
|
1257
|
+
ba as InputOTP,
|
|
1258
|
+
ga as InputOTPGroup,
|
|
1259
|
+
ha as InputOTPSeparator,
|
|
1260
|
+
xa as InputOTPSlot,
|
|
1261
|
+
De as Label,
|
|
1262
|
+
mn as Menubar,
|
|
1263
|
+
fn as MenubarCheckboxItem,
|
|
1264
|
+
pn as MenubarContent,
|
|
1265
|
+
bn as MenubarGroup,
|
|
1266
|
+
gn as MenubarItem,
|
|
1267
|
+
hn as MenubarLabel,
|
|
1268
|
+
xn as MenubarMenu,
|
|
1269
|
+
vn as MenubarPortal,
|
|
1270
|
+
An as MenubarRadioGroup,
|
|
1271
|
+
wn as MenubarRadioItem,
|
|
1272
|
+
yn as MenubarSeparator,
|
|
1273
|
+
Sn as MenubarShortcut,
|
|
1274
|
+
Cn as MenubarSub,
|
|
1275
|
+
Mn as MenubarSubContent,
|
|
1276
|
+
In as MenubarSubTrigger,
|
|
1277
|
+
Nn as MenubarTrigger,
|
|
1278
|
+
Or as MultiSelect,
|
|
1279
|
+
Lr as MultiSelectContent,
|
|
1280
|
+
Hr as MultiSelectGroup,
|
|
1281
|
+
Gr as MultiSelectItem,
|
|
1282
|
+
Vr as MultiSelectTrigger,
|
|
1283
|
+
Br as MultiSelectValue,
|
|
1284
|
+
_e as Popover,
|
|
1285
|
+
_n as PopoverAnchor,
|
|
1286
|
+
Ee as PopoverContent,
|
|
1287
|
+
Te as PopoverTrigger,
|
|
1288
|
+
ya as Progress,
|
|
1289
|
+
xo as RadioGroup,
|
|
1290
|
+
vo as RadioGroupItem,
|
|
1291
|
+
wo as ScrollArea,
|
|
1292
|
+
yo as ScrollBar,
|
|
1293
|
+
Se as Sheet,
|
|
1294
|
+
an as SheetClose,
|
|
1295
|
+
Ce as SheetContent,
|
|
1296
|
+
Ne as SheetDescription,
|
|
1297
|
+
on as SheetFooter,
|
|
1298
|
+
Me as SheetHeader,
|
|
1299
|
+
Ie as SheetTitle,
|
|
1300
|
+
nn as SheetTrigger,
|
|
1301
|
+
mr as Sidebar,
|
|
1302
|
+
Ar as SidebarContent,
|
|
1303
|
+
xr as SidebarFooter,
|
|
1304
|
+
wr as SidebarGroup,
|
|
1305
|
+
Sr as SidebarGroupAction,
|
|
1306
|
+
Cr as SidebarGroupContent,
|
|
1307
|
+
yr as SidebarGroupLabel,
|
|
1308
|
+
hr as SidebarHeader,
|
|
1309
|
+
gr as SidebarInput,
|
|
1310
|
+
br as SidebarInset,
|
|
1311
|
+
Mr as SidebarMenu,
|
|
1312
|
+
Dr as SidebarMenuAction,
|
|
1313
|
+
_r as SidebarMenuBadge,
|
|
1314
|
+
Nr as SidebarMenuButton,
|
|
1315
|
+
Ir as SidebarMenuItem,
|
|
1316
|
+
Er as SidebarMenuSkeleton,
|
|
1317
|
+
Tr as SidebarMenuSub,
|
|
1318
|
+
Fr as SidebarMenuSubButton,
|
|
1319
|
+
kr as SidebarMenuSubItem,
|
|
1320
|
+
cr as SidebarProvider,
|
|
1321
|
+
pr as SidebarRail,
|
|
1322
|
+
vr as SidebarSeparator,
|
|
1323
|
+
fr as SidebarTrigger,
|
|
1324
|
+
Aa as Slider,
|
|
1325
|
+
Co as Switch,
|
|
1326
|
+
Io as Tabs,
|
|
1327
|
+
No as TabsContent,
|
|
1328
|
+
Do as TabsList,
|
|
1329
|
+
_o as TabsTrigger,
|
|
1330
|
+
Kr as TextReveal,
|
|
1331
|
+
dn as Toaster,
|
|
1332
|
+
un as Toggle,
|
|
1333
|
+
be as Tooltip,
|
|
1334
|
+
he as TooltipContent,
|
|
1335
|
+
xe as TooltipProvider,
|
|
1336
|
+
ge as TooltipTrigger,
|
|
1337
|
+
B as useFormField,
|
|
1338
|
+
ne as useSidebar
|
|
1340
1339
|
};
|