@arcadeai/design-system 0.7.4 → 0.7.5

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.
@@ -2,35 +2,36 @@ import { Accordion as o, AccordionContent as t, AccordionItem as a, AccordionTri
2
2
  import { Alert as l, AlertDescription as d, AlertTitle as p } from "./ui/atoms/alert.js";
3
3
  import { Avatar as S, AvatarFallback as b, AvatarImage as u } from "./ui/atoms/avatar.js";
4
4
  import { Badge as g, badgeVariants as c } from "./ui/atoms/badge.js";
5
- import { Breadcrumb as x, BreadcrumbEllipsis as s, BreadcrumbItem as f, BreadcrumbLink as D, BreadcrumbList as M, BreadcrumbPage as h, BreadcrumbSeparator as w } from "./ui/atoms/breadcrumb.js";
5
+ import { Breadcrumb as T, BreadcrumbEllipsis as f, BreadcrumbItem as s, BreadcrumbLink as D, BreadcrumbList as M, BreadcrumbPage as h, BreadcrumbSeparator as w } from "./ui/atoms/breadcrumb.js";
6
6
  import { Button as B, buttonVariants as A } from "./ui/atoms/button.js";
7
7
  import { Card as v, CardAction as P, CardContent as L, CardDescription as H, CardFooter as G, CardHeader as R, CardTitle as k } from "./ui/atoms/card.js";
8
8
  import { ChartContainer as V, ChartLegend as z, ChartLegendContent as E, ChartStyle as O, ChartTooltip as U, ChartTooltipContent as j } from "./ui/atoms/chart.js";
9
9
  import { Collapsible as J, CollapsibleContent as K, CollapsibleTrigger as N } from "./ui/atoms/collapsible.js";
10
10
  import { Command as W, CommandDialog as X, CommandEmpty as Y, CommandGroup as Z, CommandInput as _, CommandItem as $, CommandList as ee, CommandSeparator as re, CommandShortcut as oe } from "./ui/atoms/command.js";
11
11
  import { Dialog as ae, DialogClose as ne, DialogContent as ie, DialogDescription as le, DialogFooter as de, DialogHeader as pe, DialogOverlay as me, DialogPortal as Se, DialogTitle as be, DialogTrigger as ue } from "./ui/atoms/dialog.js";
12
- import { DropdownMenu as ge, DropdownMenuCheckboxItem as ce, DropdownMenuContent as Te, DropdownMenuGroup as xe, DropdownMenuItem as se, DropdownMenuLabel as fe, DropdownMenuPortal as De, DropdownMenuRadioGroup as Me, DropdownMenuRadioItem as he, DropdownMenuSeparator as we, DropdownMenuShortcut as Fe, DropdownMenuSub as Be, DropdownMenuSubContent as Ae, DropdownMenuSubTrigger as Ie, DropdownMenuTrigger as ve } from "./ui/atoms/dropdown-menu.js";
13
- import { Form as Le, FormControl as He, FormDescription as Ge, FormField as Re, FormItem as ke, FormLabel as ye, FormMessage as Ve, useFormContext as ze, useFormField as Ee } from "./ui/atoms/form.js";
14
- import { HoverCard as Ue, HoverCardContent as je, HoverCardTrigger as qe } from "./ui/atoms/hover-card.js";
15
- import { Input as Ke } from "./ui/atoms/input.js";
16
- import { Label as Qe } from "./ui/atoms/label.js";
17
- import { Popover as Xe, PopoverAnchor as Ye, PopoverContent as Ze, PopoverTrigger as _e } from "./ui/atoms/popover.js";
18
- import { Progress as er } from "./ui/atoms/progress.js";
19
- import { ResizableHandle as or, ResizablePanel as tr, ResizablePanelGroup as ar } from "./ui/atoms/resizable.js";
20
- import { ScrollArea as ir, ScrollBar as lr } from "./ui/atoms/scroll-area.js";
21
- import { Select as pr, SelectContent as mr, SelectGroup as Sr, SelectItem as br, SelectLabel as ur, SelectScrollDownButton as Cr, SelectScrollUpButton as gr, SelectSeparator as cr, SelectTrigger as Tr, SelectValue as xr } from "./ui/atoms/select.js";
12
+ import { DropdownMenu as ge, DropdownMenuCheckboxItem as ce, DropdownMenuContent as xe, DropdownMenuGroup as Te, DropdownMenuItem as fe, DropdownMenuLabel as se, DropdownMenuPortal as De, DropdownMenuRadioGroup as Me, DropdownMenuRadioItem as he, DropdownMenuSeparator as we, DropdownMenuShortcut as Fe, DropdownMenuSub as Be, DropdownMenuSubContent as Ae, DropdownMenuSubTrigger as Ie, DropdownMenuTrigger as ve } from "./ui/atoms/dropdown-menu.js";
13
+ import { Form as Le, FormControl as He, FormDescription as Ge, FormField as Re, FormItem as ke, FormLabel as ye, FormMessage as Ve, useFormField as ze } from "./ui/atoms/form.js";
14
+ import { HoverCard as Oe, HoverCardContent as Ue, HoverCardTrigger as je } from "./ui/atoms/hover-card.js";
15
+ import { Input as Je } from "./ui/atoms/input.js";
16
+ import { Label as Ne } from "./ui/atoms/label.js";
17
+ import { Popover as We, PopoverAnchor as Xe, PopoverContent as Ye, PopoverTrigger as Ze } from "./ui/atoms/popover.js";
18
+ import { Progress as $e } from "./ui/atoms/progress.js";
19
+ import { ResizableHandle as rr, ResizablePanel as or, ResizablePanelGroup as tr } from "./ui/atoms/resizable.js";
20
+ import { ScrollArea as nr, ScrollBar as ir } from "./ui/atoms/scroll-area.js";
21
+ import { Select as dr, SelectContent as pr, SelectGroup as mr, SelectItem as Sr, SelectLabel as br, SelectScrollDownButton as ur, SelectScrollUpButton as Cr, SelectSeparator as gr, SelectTrigger as cr, SelectValue as xr } from "./ui/atoms/select.js";
22
22
  import { Separator as fr } from "./ui/atoms/separator.js";
23
- import { Sheet as Mr, SheetClose as hr, SheetContent as wr, SheetDescription as Fr, SheetFooter as Br, SheetHeader as Ar, SheetTitle as Ir, SheetTrigger as vr } from "./ui/atoms/sheet.js";
24
- import { Sidebar as Lr, SidebarContent as Hr, SidebarFooter as Gr, SidebarGroup as Rr, SidebarGroupAction as kr, SidebarGroupContent as yr, SidebarGroupLabel as Vr, SidebarHeader as zr, SidebarInput as Er, SidebarInset as Or, SidebarMenu as Ur, SidebarMenuAction as jr, SidebarMenuBadge as qr, SidebarMenuButton as Jr, SidebarMenuItem as Kr, SidebarMenuSkeleton as Nr, SidebarMenuSub as Qr, SidebarMenuSubButton as Wr, SidebarMenuSubItem as Xr, SidebarProvider as Yr, SidebarRail as Zr, SidebarSeparator as _r, SidebarTrigger as $r, useSidebar as eo } from "./ui/atoms/sidebar.js";
25
- import { Skeleton as oo } from "./ui/atoms/skeleton.js";
26
- import { Slider as ao } from "./ui/atoms/slider.js";
27
- import { Toaster as io } from "./ui/atoms/sonner.js";
28
- import { Switch as po } from "./ui/atoms/switch.js";
29
- import { Table as So, TableBody as bo, TableCaption as uo, TableCell as Co, TableFooter as go, TableHead as co, TableHeader as To, TableRow as xo } from "./ui/atoms/table.js";
30
- import { Tabs as fo, TabsContent as Do, TabsList as Mo, TabsTrigger as ho } from "./ui/atoms/tabs.js";
31
- import { Textarea as Fo } from "./ui/atoms/textarea.js";
32
- import { Toggle as Ao, toggleVariants as Io } from "./ui/atoms/toggle.js";
33
- import { Tooltip as Po, TooltipContent as Lo, TooltipProvider as Ho, TooltipTrigger as Go } from "./ui/atoms/tooltip.js";
23
+ import { Sheet as Dr, SheetClose as Mr, SheetContent as hr, SheetDescription as wr, SheetFooter as Fr, SheetHeader as Br, SheetTitle as Ar, SheetTrigger as Ir } from "./ui/atoms/sheet.js";
24
+ import { Sidebar as Pr, SidebarContent as Lr, SidebarFooter as Hr, SidebarGroup as Gr, SidebarGroupAction as Rr, SidebarGroupContent as kr, SidebarGroupLabel as yr, SidebarHeader as Vr, SidebarInput as zr, SidebarInset as Er, SidebarMenu as Or, SidebarMenuAction as Ur, SidebarMenuBadge as jr, SidebarMenuButton as qr, SidebarMenuItem as Jr, SidebarMenuSkeleton as Kr, SidebarMenuSub as Nr, SidebarMenuSubButton as Qr, SidebarMenuSubItem as Wr, SidebarProvider as Xr, SidebarRail as Yr, SidebarSeparator as Zr, SidebarTrigger as _r, useSidebar as $r } from "./ui/atoms/sidebar.js";
25
+ import { Skeleton as ro } from "./ui/atoms/skeleton.js";
26
+ import { Slider as to } from "./ui/atoms/slider.js";
27
+ import { Toaster as no } from "./ui/atoms/sonner.js";
28
+ import { Switch as lo } from "./ui/atoms/switch.js";
29
+ import { Table as mo, TableBody as So, TableCaption as bo, TableCell as uo, TableFooter as Co, TableHead as go, TableHeader as co, TableRow as xo } from "./ui/atoms/table.js";
30
+ import { Tabs as fo, TabsContent as so, TabsList as Do, TabsTrigger as Mo } from "./ui/atoms/tabs.js";
31
+ import { Textarea as wo } from "./ui/atoms/textarea.js";
32
+ import { Toggle as Bo, toggleVariants as Ao } from "./ui/atoms/toggle.js";
33
+ import { Tooltip as vo, TooltipContent as Po, TooltipProvider as Lo, TooltipTrigger as Ho } from "./ui/atoms/tooltip.js";
34
+ import { useFormContext as Ro } from "react-hook-form";
34
35
  export {
35
36
  o as Accordion,
36
37
  t as AccordionContent,
@@ -43,9 +44,9 @@ export {
43
44
  b as AvatarFallback,
44
45
  u as AvatarImage,
45
46
  g as Badge,
46
- x as Breadcrumb,
47
- s as BreadcrumbEllipsis,
48
- f as BreadcrumbItem,
47
+ T as Breadcrumb,
48
+ f as BreadcrumbEllipsis,
49
+ s as BreadcrumbItem,
49
50
  D as BreadcrumbLink,
50
51
  M as BreadcrumbList,
51
52
  h as BreadcrumbPage,
@@ -88,10 +89,10 @@ export {
88
89
  ue as DialogTrigger,
89
90
  ge as DropdownMenu,
90
91
  ce as DropdownMenuCheckboxItem,
91
- Te as DropdownMenuContent,
92
- xe as DropdownMenuGroup,
93
- se as DropdownMenuItem,
94
- fe as DropdownMenuLabel,
92
+ xe as DropdownMenuContent,
93
+ Te as DropdownMenuGroup,
94
+ fe as DropdownMenuItem,
95
+ se as DropdownMenuLabel,
95
96
  De as DropdownMenuPortal,
96
97
  Me as DropdownMenuRadioGroup,
97
98
  he as DropdownMenuRadioItem,
@@ -108,89 +109,89 @@ export {
108
109
  ke as FormItem,
109
110
  ye as FormLabel,
110
111
  Ve as FormMessage,
111
- Ue as HoverCard,
112
- je as HoverCardContent,
113
- qe as HoverCardTrigger,
114
- Ke as Input,
115
- Qe as Label,
116
- Xe as Popover,
117
- Ye as PopoverAnchor,
118
- Ze as PopoverContent,
119
- _e as PopoverTrigger,
120
- er as Progress,
121
- or as ResizableHandle,
122
- tr as ResizablePanel,
123
- ar as ResizablePanelGroup,
124
- ir as ScrollArea,
125
- lr as ScrollBar,
126
- pr as Select,
127
- mr as SelectContent,
128
- Sr as SelectGroup,
129
- br as SelectItem,
130
- ur as SelectLabel,
131
- Cr as SelectScrollDownButton,
132
- gr as SelectScrollUpButton,
133
- cr as SelectSeparator,
134
- Tr as SelectTrigger,
112
+ Oe as HoverCard,
113
+ Ue as HoverCardContent,
114
+ je as HoverCardTrigger,
115
+ Je as Input,
116
+ Ne as Label,
117
+ We as Popover,
118
+ Xe as PopoverAnchor,
119
+ Ye as PopoverContent,
120
+ Ze as PopoverTrigger,
121
+ $e as Progress,
122
+ rr as ResizableHandle,
123
+ or as ResizablePanel,
124
+ tr as ResizablePanelGroup,
125
+ nr as ScrollArea,
126
+ ir as ScrollBar,
127
+ dr as Select,
128
+ pr as SelectContent,
129
+ mr as SelectGroup,
130
+ Sr as SelectItem,
131
+ br as SelectLabel,
132
+ ur as SelectScrollDownButton,
133
+ Cr as SelectScrollUpButton,
134
+ gr as SelectSeparator,
135
+ cr as SelectTrigger,
135
136
  xr as SelectValue,
136
137
  fr as Separator,
137
- Mr as Sheet,
138
- hr as SheetClose,
139
- wr as SheetContent,
140
- Fr as SheetDescription,
141
- Br as SheetFooter,
142
- Ar as SheetHeader,
143
- Ir as SheetTitle,
144
- vr as SheetTrigger,
145
- Lr as Sidebar,
146
- Hr as SidebarContent,
147
- Gr as SidebarFooter,
148
- Rr as SidebarGroup,
149
- kr as SidebarGroupAction,
150
- yr as SidebarGroupContent,
151
- Vr as SidebarGroupLabel,
152
- zr as SidebarHeader,
153
- Er as SidebarInput,
154
- Or as SidebarInset,
155
- Ur as SidebarMenu,
156
- jr as SidebarMenuAction,
157
- qr as SidebarMenuBadge,
158
- Jr as SidebarMenuButton,
159
- Kr as SidebarMenuItem,
160
- Nr as SidebarMenuSkeleton,
161
- Qr as SidebarMenuSub,
162
- Wr as SidebarMenuSubButton,
163
- Xr as SidebarMenuSubItem,
164
- Yr as SidebarProvider,
165
- Zr as SidebarRail,
166
- _r as SidebarSeparator,
167
- $r as SidebarTrigger,
168
- oo as Skeleton,
169
- ao as Slider,
170
- po as Switch,
171
- So as Table,
172
- bo as TableBody,
173
- uo as TableCaption,
174
- Co as TableCell,
175
- go as TableFooter,
176
- co as TableHead,
177
- To as TableHeader,
138
+ Dr as Sheet,
139
+ Mr as SheetClose,
140
+ hr as SheetContent,
141
+ wr as SheetDescription,
142
+ Fr as SheetFooter,
143
+ Br as SheetHeader,
144
+ Ar as SheetTitle,
145
+ Ir as SheetTrigger,
146
+ Pr as Sidebar,
147
+ Lr as SidebarContent,
148
+ Hr as SidebarFooter,
149
+ Gr as SidebarGroup,
150
+ Rr as SidebarGroupAction,
151
+ kr as SidebarGroupContent,
152
+ yr as SidebarGroupLabel,
153
+ Vr as SidebarHeader,
154
+ zr as SidebarInput,
155
+ Er as SidebarInset,
156
+ Or as SidebarMenu,
157
+ Ur as SidebarMenuAction,
158
+ jr as SidebarMenuBadge,
159
+ qr as SidebarMenuButton,
160
+ Jr as SidebarMenuItem,
161
+ Kr as SidebarMenuSkeleton,
162
+ Nr as SidebarMenuSub,
163
+ Qr as SidebarMenuSubButton,
164
+ Wr as SidebarMenuSubItem,
165
+ Xr as SidebarProvider,
166
+ Yr as SidebarRail,
167
+ Zr as SidebarSeparator,
168
+ _r as SidebarTrigger,
169
+ ro as Skeleton,
170
+ to as Slider,
171
+ lo as Switch,
172
+ mo as Table,
173
+ So as TableBody,
174
+ bo as TableCaption,
175
+ uo as TableCell,
176
+ Co as TableFooter,
177
+ go as TableHead,
178
+ co as TableHeader,
178
179
  xo as TableRow,
179
180
  fo as Tabs,
180
- Do as TabsContent,
181
- Mo as TabsList,
182
- ho as TabsTrigger,
183
- Fo as Textarea,
184
- io as Toaster,
185
- Ao as Toggle,
186
- Po as Tooltip,
187
- Lo as TooltipContent,
188
- Ho as TooltipProvider,
189
- Go as TooltipTrigger,
181
+ so as TabsContent,
182
+ Do as TabsList,
183
+ Mo as TabsTrigger,
184
+ wo as Textarea,
185
+ no as Toaster,
186
+ Bo as Toggle,
187
+ vo as Tooltip,
188
+ Po as TooltipContent,
189
+ Lo as TooltipProvider,
190
+ Ho as TooltipTrigger,
190
191
  c as badgeVariants,
191
192
  A as buttonVariants,
192
- Io as toggleVariants,
193
- ze as useFormContext,
194
- Ee as useFormField,
195
- eo as useSidebar
193
+ Ao as toggleVariants,
194
+ Ro as useFormContext,
195
+ ze as useFormField,
196
+ $r as useSidebar
196
197
  };
@@ -9,8 +9,8 @@ import { P as M } from "../../../index-CpDnqHCm.js";
9
9
  import { c as V, R as oe, T as re, b as te } from "../../../index-CtSXVDca.js";
10
10
  import { u as ne } from "../../../index-Cv867SGx.js";
11
11
  import { u as ce } from "../../../index-ByaXH_ih.js";
12
+ import { ChevronDownIcon as ae } from "lucide-react";
12
13
  import { c as S } from "../../../utils-CRiPKpXj.js";
13
- import { C as ae } from "../../../chevron-down-DmZMdOiC.js";
14
14
  var d = "Accordion", ie = ["Home", "End", "ArrowDown", "ArrowUp", "ArrowLeft", "ArrowRight"], [E, se, le] = X(d), [b, Oe] = W(d, [
15
15
  le,
16
16
  V
@@ -1,130 +1,248 @@
1
- import { jsx as d } from "react/jsx-runtime";
2
- import * as i from "react";
3
- import { c as R } from "../../../index-DFZozV_h.js";
4
- import { u as b } from "../../../index-0ioNhtNM.js";
5
- import { u as f } from "../../../index-CCKe-Mpx.js";
6
- import { P as m } from "../../../index-CpDnqHCm.js";
7
- import { r as C } from "../../../index-CJFGOBPb.js";
8
- import { c as v } from "../../../utils-CRiPKpXj.js";
9
- var y = C();
10
- function N() {
11
- return y.useSyncExternalStore(
12
- _,
1
+ import { jsx as g } from "react/jsx-runtime";
2
+ import * as _ from "react";
3
+ import N from "react";
4
+ import { c as H } from "../../../index-DFZozV_h.js";
5
+ import { u as U } from "../../../index-0ioNhtNM.js";
6
+ import { u as O } from "../../../index-CCKe-Mpx.js";
7
+ import { P as w } from "../../../index-CpDnqHCm.js";
8
+ import { c as x } from "../../../utils-CRiPKpXj.js";
9
+ var h = { exports: {} }, y = {};
10
+ /**
11
+ * @license React
12
+ * use-sync-external-store-shim.production.js
13
+ *
14
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
15
+ *
16
+ * This source code is licensed under the MIT license found in the
17
+ * LICENSE file in the root directory of this source tree.
18
+ */
19
+ var I;
20
+ function q() {
21
+ if (I) return y;
22
+ I = 1;
23
+ var e = N;
24
+ function t(a, d) {
25
+ return a === d && (a !== 0 || 1 / a === 1 / d) || a !== a && d !== d;
26
+ }
27
+ var i = typeof Object.is == "function" ? Object.is : t, c = e.useState, o = e.useEffect, r = e.useLayoutEffect, S = e.useDebugValue;
28
+ function f(a, d) {
29
+ var n = d(), u = c({ inst: { value: n, getSnapshot: d } }), s = u[0].inst, p = u[1];
30
+ return r(
31
+ function() {
32
+ s.value = n, s.getSnapshot = d, l(s) && p({ inst: s });
33
+ },
34
+ [a, n, d]
35
+ ), o(
36
+ function() {
37
+ return l(s) && p({ inst: s }), a(function() {
38
+ l(s) && p({ inst: s });
39
+ });
40
+ },
41
+ [a]
42
+ ), S(n), n;
43
+ }
44
+ function l(a) {
45
+ var d = a.getSnapshot;
46
+ a = a.value;
47
+ try {
48
+ var n = d();
49
+ return !i(a, n);
50
+ } catch {
51
+ return !0;
52
+ }
53
+ }
54
+ function v(a, d) {
55
+ return d();
56
+ }
57
+ var E = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? v : f;
58
+ return y.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : E, y;
59
+ }
60
+ var A = {};
61
+ /**
62
+ * @license React
63
+ * use-sync-external-store-shim.development.js
64
+ *
65
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
66
+ *
67
+ * This source code is licensed under the MIT license found in the
68
+ * LICENSE file in the root directory of this source tree.
69
+ */
70
+ var C;
71
+ function B() {
72
+ return C || (C = 1, process.env.NODE_ENV !== "production" && function() {
73
+ function e(n, u) {
74
+ return n === u && (n !== 0 || 1 / n === 1 / u) || n !== n && u !== u;
75
+ }
76
+ function t(n, u) {
77
+ E || o.startTransition === void 0 || (E = !0, console.error(
78
+ "You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
79
+ ));
80
+ var s = u();
81
+ if (!a) {
82
+ var p = u();
83
+ r(s, p) || (console.error(
84
+ "The result of getSnapshot should be cached to avoid an infinite loop"
85
+ ), a = !0);
86
+ }
87
+ p = S({
88
+ inst: { value: s, getSnapshot: u }
89
+ });
90
+ var m = p[0].inst, L = p[1];
91
+ return l(
92
+ function() {
93
+ m.value = s, m.getSnapshot = u, i(m) && L({ inst: m });
94
+ },
95
+ [n, s, u]
96
+ ), f(
97
+ function() {
98
+ return i(m) && L({ inst: m }), n(function() {
99
+ i(m) && L({ inst: m });
100
+ });
101
+ },
102
+ [n]
103
+ ), v(s), s;
104
+ }
105
+ function i(n) {
106
+ var u = n.getSnapshot;
107
+ n = n.value;
108
+ try {
109
+ var s = u();
110
+ return !r(n, s);
111
+ } catch {
112
+ return !0;
113
+ }
114
+ }
115
+ function c(n, u) {
116
+ return u();
117
+ }
118
+ typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
119
+ var o = N, r = typeof Object.is == "function" ? Object.is : e, S = o.useState, f = o.useEffect, l = o.useLayoutEffect, v = o.useDebugValue, E = !1, a = !1, d = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? c : t;
120
+ A.useSyncExternalStore = o.useSyncExternalStore !== void 0 ? o.useSyncExternalStore : d, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
121
+ }()), A;
122
+ }
123
+ var T;
124
+ function K() {
125
+ return T || (T = 1, process.env.NODE_ENV === "production" ? h.exports = q() : h.exports = B()), h.exports;
126
+ }
127
+ var $ = K();
128
+ function F() {
129
+ return $.useSyncExternalStore(
130
+ P,
13
131
  () => !0,
14
132
  () => !1
15
133
  );
16
134
  }
17
- function _() {
135
+ function P() {
18
136
  return () => {
19
137
  };
20
138
  }
21
- var g = "Avatar", [k, V] = R(g), [F, S] = k(g), L = i.forwardRef(
22
- (a, e) => {
23
- const { __scopeAvatar: n, ...r } = a, [o, t] = i.useState("idle");
24
- return /* @__PURE__ */ d(
25
- F,
139
+ var R = "Avatar", [z, ue] = H(R), [W, D] = z(R), k = _.forwardRef(
140
+ (e, t) => {
141
+ const { __scopeAvatar: i, ...c } = e, [o, r] = _.useState("idle");
142
+ return /* @__PURE__ */ g(
143
+ W,
26
144
  {
27
- scope: n,
145
+ scope: i,
28
146
  imageLoadingStatus: o,
29
- onImageLoadingStatusChange: t,
30
- children: /* @__PURE__ */ d(m.span, { ...r, ref: e })
147
+ onImageLoadingStatusChange: r,
148
+ children: /* @__PURE__ */ g(w.span, { ...c, ref: t })
31
149
  }
32
150
  );
33
151
  }
34
152
  );
35
- L.displayName = g;
36
- var h = "AvatarImage", E = i.forwardRef(
37
- (a, e) => {
38
- const { __scopeAvatar: n, src: r, onLoadingStatusChange: o = () => {
39
- }, ...t } = a, l = S(h, n), s = M(r, t), u = b((c) => {
40
- o(c), l.onImageLoadingStatusChange(c);
153
+ k.displayName = R;
154
+ var G = "AvatarImage", V = _.forwardRef(
155
+ (e, t) => {
156
+ const { __scopeAvatar: i, src: c, onLoadingStatusChange: o = () => {
157
+ }, ...r } = e, S = D(G, i), f = Y(c, r), l = U((v) => {
158
+ o(v), S.onImageLoadingStatusChange(v);
41
159
  });
42
- return f(() => {
43
- s !== "idle" && u(s);
44
- }, [s, u]), s === "loaded" ? /* @__PURE__ */ d(m.img, { ...t, ref: e, src: r }) : null;
160
+ return O(() => {
161
+ f !== "idle" && l(f);
162
+ }, [f, l]), f === "loaded" ? /* @__PURE__ */ g(w.img, { ...r, ref: t, src: c }) : null;
45
163
  }
46
164
  );
47
- E.displayName = h;
48
- var I = "AvatarFallback", w = i.forwardRef(
49
- (a, e) => {
50
- const { __scopeAvatar: n, delayMs: r, ...o } = a, t = S(I, n), [l, s] = i.useState(r === void 0);
51
- return i.useEffect(() => {
52
- if (r !== void 0) {
53
- const u = window.setTimeout(() => s(!0), r);
54
- return () => window.clearTimeout(u);
165
+ V.displayName = G;
166
+ var M = "AvatarFallback", j = _.forwardRef(
167
+ (e, t) => {
168
+ const { __scopeAvatar: i, delayMs: c, ...o } = e, r = D(M, i), [S, f] = _.useState(c === void 0);
169
+ return _.useEffect(() => {
170
+ if (c !== void 0) {
171
+ const l = window.setTimeout(() => f(!0), c);
172
+ return () => window.clearTimeout(l);
55
173
  }
56
- }, [r]), l && t.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ d(m.span, { ...o, ref: e }) : null;
174
+ }, [c]), S && r.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ g(w.span, { ...o, ref: t }) : null;
57
175
  }
58
176
  );
59
- w.displayName = I;
60
- function A(a, e) {
61
- return a ? e ? (a.src !== e && (a.src = e), a.complete && a.naturalWidth > 0 ? "loaded" : "loading") : "error" : "idle";
177
+ j.displayName = M;
178
+ function b(e, t) {
179
+ return e ? t ? (e.src !== t && (e.src = t), e.complete && e.naturalWidth > 0 ? "loaded" : "loading") : "error" : "idle";
62
180
  }
63
- function M(a, { referrerPolicy: e, crossOrigin: n }) {
64
- const r = N(), o = i.useRef(null), t = r ? (o.current || (o.current = new window.Image()), o.current) : null, [l, s] = i.useState(
65
- () => A(t, a)
181
+ function Y(e, { referrerPolicy: t, crossOrigin: i }) {
182
+ const c = F(), o = _.useRef(null), r = c ? (o.current || (o.current = new window.Image()), o.current) : null, [S, f] = _.useState(
183
+ () => b(r, e)
66
184
  );
67
- return f(() => {
68
- s(A(t, a));
69
- }, [t, a]), f(() => {
70
- const u = (x) => () => {
71
- s(x);
185
+ return O(() => {
186
+ f(b(r, e));
187
+ }, [r, e]), O(() => {
188
+ const l = (a) => () => {
189
+ f(a);
72
190
  };
73
- if (!t) return;
74
- const c = u("loaded"), p = u("error");
75
- return t.addEventListener("load", c), t.addEventListener("error", p), e && (t.referrerPolicy = e), typeof n == "string" && (t.crossOrigin = n), () => {
76
- t.removeEventListener("load", c), t.removeEventListener("error", p);
191
+ if (!r) return;
192
+ const v = l("loaded"), E = l("error");
193
+ return r.addEventListener("load", v), r.addEventListener("error", E), t && (r.referrerPolicy = t), typeof i == "string" && (r.crossOrigin = i), () => {
194
+ r.removeEventListener("load", v), r.removeEventListener("error", E);
77
195
  };
78
- }, [t, n, e]), l;
196
+ }, [r, i, t]), S;
79
197
  }
80
- var P = L, z = E, T = w;
81
- function W({
82
- className: a,
83
- ...e
198
+ var J = k, Q = V, X = j;
199
+ function se({
200
+ className: e,
201
+ ...t
84
202
  }) {
85
- return /* @__PURE__ */ d(
86
- P,
203
+ return /* @__PURE__ */ g(
204
+ J,
87
205
  {
88
- className: v(
206
+ className: x(
89
207
  "relative flex size-8 shrink-0 overflow-hidden rounded-full",
90
- a
208
+ e
91
209
  ),
92
210
  "data-slot": "avatar",
93
- ...e
211
+ ...t
94
212
  }
95
213
  );
96
214
  }
97
- function D({
98
- className: a,
99
- ...e
215
+ function ie({
216
+ className: e,
217
+ ...t
100
218
  }) {
101
- return /* @__PURE__ */ d(
102
- z,
219
+ return /* @__PURE__ */ g(
220
+ Q,
103
221
  {
104
- className: v("aspect-square size-full", a),
222
+ className: x("aspect-square size-full", e),
105
223
  "data-slot": "avatar-image",
106
- ...e
224
+ ...t
107
225
  }
108
226
  );
109
227
  }
110
- function J({
111
- className: a,
112
- ...e
228
+ function ce({
229
+ className: e,
230
+ ...t
113
231
  }) {
114
- return /* @__PURE__ */ d(
115
- T,
232
+ return /* @__PURE__ */ g(
233
+ X,
116
234
  {
117
- className: v(
235
+ className: x(
118
236
  "flex size-full items-center justify-center rounded-full bg-muted",
119
- a
237
+ e
120
238
  ),
121
239
  "data-slot": "avatar-fallback",
122
- ...e
240
+ ...t
123
241
  }
124
242
  );
125
243
  }
126
244
  export {
127
- W as Avatar,
128
- J as AvatarFallback,
129
- D as AvatarImage
245
+ se as Avatar,
246
+ ce as AvatarFallback,
247
+ ie as AvatarImage
130
248
  };