@dimasbaguspm/versaur 0.0.34 → 0.0.36
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/js/{bottom-sheet-DNCxKsrR.js → bottom-sheet-CoR7hCZO.js} +204 -174
- package/dist/js/{bottom-sheet-input-86f0OVXf.js → bottom-sheet-input-DzZ1xoOR.js} +2 -2
- package/dist/js/forms/index.js +1 -1
- package/dist/js/{image-rectangle-VLG1D0Cd.js → image-rectangle-B48Z5AzG.js} +845 -438
- package/dist/js/index.js +54 -51
- package/dist/js/layouts/index.js +1 -1
- package/dist/js/navigation/index.js +1 -1
- package/dist/js/overlays/index.js +3 -3
- package/dist/js/primitive/index.js +24 -21
- package/dist/js/{tabs-DwXZsJC-.js → tabs-Cs-qKwI3.js} +1 -1
- package/dist/js/{tooltip-B_bTyMQN.js → tooltip-D5V0M0cy.js} +1 -1
- package/dist/js/{top-bar-CW5RI_Xd.js → top-bar-o8F7AMVL.js} +158 -138
- package/dist/types/forms/bottom-sheet-input/bottom-sheet-input.d.ts +1 -1
- package/dist/types/layouts/badge-group/types.d.ts +5 -0
- package/dist/types/layouts/bottom-bar/bottom-bar.atoms.d.ts +1 -1
- package/dist/types/layouts/bottom-bar/bottom-bar.d.ts +1 -1
- package/dist/types/layouts/bottom-bar/types.d.ts +4 -3
- package/dist/types/layouts/button-group/types.d.ts +5 -0
- package/dist/types/layouts/filter-chip-group/types.d.ts +5 -0
- package/dist/types/overlays/bottom-sheet/bottom-sheet.atoms.d.ts +3 -2
- package/dist/types/overlays/bottom-sheet/bottom-sheet.d.ts +2 -1
- package/dist/types/overlays/bottom-sheet/types.d.ts +3 -1
- package/dist/types/overlays/menu/menu.atoms.d.ts +0 -6
- package/dist/types/overlays/menu/types.d.ts +6 -3
- package/dist/types/overlays/menu/use-menu.d.ts +2 -1
- package/dist/types/primitive/accordion/accordion.atoms.d.ts +23 -0
- package/dist/types/primitive/accordion/accordion.d.ts +20 -0
- package/dist/types/primitive/accordion/index.d.ts +2 -0
- package/dist/types/primitive/accordion/types.d.ts +76 -0
- package/dist/types/primitive/attribute/types.d.ts +5 -0
- package/dist/types/primitive/button-menu-icon/types.d.ts +2 -12
- package/dist/types/primitive/heading/heading.d.ts +7 -0
- package/dist/types/primitive/heading/index.d.ts +2 -0
- package/dist/types/primitive/heading/types.d.ts +37 -0
- package/dist/types/primitive/hr/hr.d.ts +20 -0
- package/dist/types/primitive/hr/index.d.ts +2 -0
- package/dist/types/primitive/hr/types.d.ts +13 -0
- package/dist/types/primitive/index.d.ts +3 -0
- package/dist/utils/enforce-subpath-import.js +3 -0
- package/package.json +1 -1
|
@@ -1,10 +1,324 @@
|
|
|
1
1
|
import { c as cva, j as jsxRuntimeExports, a as cn } from "./index-DOdDlCoL.js";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
import React__default, { forwardRef, useState, useEffect, useCallback, useRef, useId, cloneElement
|
|
3
|
+
import React__default, { createContext, useContext, forwardRef, useState, useEffect, useCallback, useRef, useId, cloneElement } from "react";
|
|
4
|
+
import { ChevronDown, EllipsisVerticalIcon, X, XIcon, ImageOff } from "lucide-react";
|
|
4
5
|
import ReactDOM from "react-dom";
|
|
5
|
-
import { EllipsisVerticalIcon, X, XIcon, ImageOff } from "lucide-react";
|
|
6
6
|
import { S as Skeleton } from "./skeleton-BNZyaRjo.js";
|
|
7
|
-
const
|
|
7
|
+
const AccordionContext = createContext(
|
|
8
|
+
null
|
|
9
|
+
), useAccordionContext = () => {
|
|
10
|
+
const e = useContext(AccordionContext);
|
|
11
|
+
if (!e)
|
|
12
|
+
throw new Error(
|
|
13
|
+
"Accordion compound components must be used within Accordion"
|
|
14
|
+
);
|
|
15
|
+
return e;
|
|
16
|
+
}, accordionVariants = cva(
|
|
17
|
+
"border-b border-border bg-background overflow-hidden",
|
|
18
|
+
{
|
|
19
|
+
variants: {
|
|
20
|
+
disabled: {
|
|
21
|
+
true: "opacity-50 cursor-not-allowed",
|
|
22
|
+
false: ""
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
defaultVariants: {
|
|
26
|
+
disabled: !1
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
), accordionHeaderVariants = cva(
|
|
30
|
+
"flex items-center justify-between w-full p-4 text-left transition-colors duration-200 focus:outline-none focus-visible:ring-2 focus-visible:ring-primary-light focus-visible:ring-inset",
|
|
31
|
+
{
|
|
32
|
+
variants: {
|
|
33
|
+
disabled: {
|
|
34
|
+
true: "cursor-not-allowed",
|
|
35
|
+
false: "cursor-pointer hover:bg-neutral-soft"
|
|
36
|
+
},
|
|
37
|
+
isOpen: {
|
|
38
|
+
true: "",
|
|
39
|
+
false: "bg-background"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
defaultVariants: {
|
|
43
|
+
disabled: !1,
|
|
44
|
+
isOpen: !1
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
), accordionContentVariants = cva(
|
|
48
|
+
"overflow-hidden transition-all duration-300",
|
|
49
|
+
{
|
|
50
|
+
variants: {
|
|
51
|
+
isOpen: {
|
|
52
|
+
true: "max-h-screen opacity-100",
|
|
53
|
+
false: "max-h-0 opacity-0"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
defaultVariants: {
|
|
57
|
+
isOpen: !1
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
), accordionContentInnerVariants = cva("p-4 pt-0"), accordionIconVariants = cva("transition-transform duration-200", {
|
|
61
|
+
variants: {
|
|
62
|
+
isOpen: {
|
|
63
|
+
true: "rotate-180",
|
|
64
|
+
false: "rotate-0"
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
defaultVariants: {
|
|
68
|
+
isOpen: !1
|
|
69
|
+
}
|
|
70
|
+
}), headingVariants = cva("", {
|
|
71
|
+
variants: {
|
|
72
|
+
color: {
|
|
73
|
+
primary: "text-primary",
|
|
74
|
+
secondary: "text-secondary",
|
|
75
|
+
tertiary: "text-tertiary",
|
|
76
|
+
ghost: "text-ghost",
|
|
77
|
+
neutral: "text-ghost",
|
|
78
|
+
success: "text-success",
|
|
79
|
+
info: "text-info",
|
|
80
|
+
warning: "text-warning",
|
|
81
|
+
danger: "text-danger",
|
|
82
|
+
inherit: "",
|
|
83
|
+
gray: "text-gray-500",
|
|
84
|
+
black: "text-black",
|
|
85
|
+
white: "text-white"
|
|
86
|
+
},
|
|
87
|
+
hasUnderline: {
|
|
88
|
+
true: "underline",
|
|
89
|
+
false: ""
|
|
90
|
+
},
|
|
91
|
+
isCapitalize: {
|
|
92
|
+
true: "capitalize",
|
|
93
|
+
false: ""
|
|
94
|
+
},
|
|
95
|
+
hasMargin: {
|
|
96
|
+
true: "mb-4",
|
|
97
|
+
false: ""
|
|
98
|
+
},
|
|
99
|
+
align: {
|
|
100
|
+
left: "text-left",
|
|
101
|
+
center: "text-center",
|
|
102
|
+
right: "text-right",
|
|
103
|
+
justify: "text-justify"
|
|
104
|
+
},
|
|
105
|
+
italic: {
|
|
106
|
+
true: "italic",
|
|
107
|
+
false: ""
|
|
108
|
+
},
|
|
109
|
+
clamp: {
|
|
110
|
+
1: "line-clamp-1",
|
|
111
|
+
2: "line-clamp-2",
|
|
112
|
+
3: "line-clamp-3",
|
|
113
|
+
4: "line-clamp-4",
|
|
114
|
+
5: "line-clamp-5",
|
|
115
|
+
none: ""
|
|
116
|
+
},
|
|
117
|
+
ellipsis: {
|
|
118
|
+
true: "truncate",
|
|
119
|
+
false: ""
|
|
120
|
+
},
|
|
121
|
+
level: {
|
|
122
|
+
1: "font-bold text-2xl leading-loose",
|
|
123
|
+
2: "font-semibold text-xl leading-relaxed",
|
|
124
|
+
3: "font-medium text-base leading-relaxed",
|
|
125
|
+
4: "font-bold text-sm leading-normal",
|
|
126
|
+
5: "font-semibold text-sm leading-normal",
|
|
127
|
+
6: "font-medium text-xs leading-normal"
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
defaultVariants: {
|
|
131
|
+
color: "ghost",
|
|
132
|
+
hasUnderline: !1,
|
|
133
|
+
isCapitalize: !1,
|
|
134
|
+
hasMargin: !1,
|
|
135
|
+
align: "left",
|
|
136
|
+
italic: !1,
|
|
137
|
+
clamp: "none",
|
|
138
|
+
ellipsis: !1,
|
|
139
|
+
level: 1
|
|
140
|
+
}
|
|
141
|
+
}), Heading = forwardRef(
|
|
142
|
+
({
|
|
143
|
+
level: e = 3,
|
|
144
|
+
color: t = "ghost",
|
|
145
|
+
hasUnderline: r = !1,
|
|
146
|
+
isCapitalize: i = !1,
|
|
147
|
+
hasMargin: s = !1,
|
|
148
|
+
align: o = "left",
|
|
149
|
+
italic: n = !1,
|
|
150
|
+
clamp: l = "none",
|
|
151
|
+
ellipsis: u = !1,
|
|
152
|
+
className: c,
|
|
153
|
+
children: f,
|
|
154
|
+
...a
|
|
155
|
+
}, d) => {
|
|
156
|
+
const b = `h${e}`;
|
|
157
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
158
|
+
b,
|
|
159
|
+
{
|
|
160
|
+
ref: d,
|
|
161
|
+
className: cn(
|
|
162
|
+
headingVariants({
|
|
163
|
+
color: t,
|
|
164
|
+
hasUnderline: r,
|
|
165
|
+
isCapitalize: i,
|
|
166
|
+
hasMargin: s,
|
|
167
|
+
align: o,
|
|
168
|
+
italic: n,
|
|
169
|
+
clamp: l,
|
|
170
|
+
ellipsis: u,
|
|
171
|
+
level: e
|
|
172
|
+
}),
|
|
173
|
+
c
|
|
174
|
+
),
|
|
175
|
+
...a,
|
|
176
|
+
children: f
|
|
177
|
+
}
|
|
178
|
+
);
|
|
179
|
+
}
|
|
180
|
+
);
|
|
181
|
+
Heading.displayName = "Heading";
|
|
182
|
+
const iconVariants = cva("inline-flex items-center justify-center", {
|
|
183
|
+
variants: {
|
|
184
|
+
size: {
|
|
185
|
+
xs: "w-3 h-3",
|
|
186
|
+
sm: "w-4 h-4",
|
|
187
|
+
md: "w-5 h-5",
|
|
188
|
+
lg: "w-6 h-6",
|
|
189
|
+
xl: "w-8 h-8",
|
|
190
|
+
inherit: "w-auto h-auto"
|
|
191
|
+
},
|
|
192
|
+
color: {
|
|
193
|
+
primary: "text-primary",
|
|
194
|
+
secondary: "text-secondary",
|
|
195
|
+
tertiary: "text-tertiary",
|
|
196
|
+
ghost: "text-ghost",
|
|
197
|
+
neutral: "text-neutral",
|
|
198
|
+
success: "text-success",
|
|
199
|
+
info: "text-info",
|
|
200
|
+
warning: "text-warning",
|
|
201
|
+
danger: "text-danger",
|
|
202
|
+
gray: "text-gray-500",
|
|
203
|
+
black: "text-black",
|
|
204
|
+
white: "text-white",
|
|
205
|
+
inherit: ""
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
defaultVariants: {
|
|
209
|
+
size: "md",
|
|
210
|
+
color: "primary"
|
|
211
|
+
}
|
|
212
|
+
}), Icon = React__default.forwardRef(function({ as: t, color: r = "primary", size: i = "md", className: s, ...o }, n) {
|
|
213
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
214
|
+
t,
|
|
215
|
+
{
|
|
216
|
+
ref: n,
|
|
217
|
+
className: iconVariants({ color: r, size: i, className: s }),
|
|
218
|
+
...o
|
|
219
|
+
}
|
|
220
|
+
);
|
|
221
|
+
}), AccordionTitle = forwardRef(function({ className: t, children: r, ...i }, s) {
|
|
222
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
223
|
+
Heading,
|
|
224
|
+
{
|
|
225
|
+
ref: s,
|
|
226
|
+
level: 4,
|
|
227
|
+
className: cn("font-medium", t),
|
|
228
|
+
...i,
|
|
229
|
+
color: "black",
|
|
230
|
+
children: r
|
|
231
|
+
}
|
|
232
|
+
);
|
|
233
|
+
}), AccordionContent = forwardRef(function({ className: t, children: r, ...i }, s) {
|
|
234
|
+
const { isOpen: o } = useAccordionContext();
|
|
235
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
236
|
+
"div",
|
|
237
|
+
{
|
|
238
|
+
ref: s,
|
|
239
|
+
className: cn(accordionContentVariants({ isOpen: o }), t),
|
|
240
|
+
...i,
|
|
241
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: accordionContentInnerVariants(), children: r })
|
|
242
|
+
}
|
|
243
|
+
);
|
|
244
|
+
}), AccordionIcon = forwardRef(function({ as: t, ...r }, i) {
|
|
245
|
+
const { isOpen: s } = useAccordionContext();
|
|
246
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
247
|
+
Icon,
|
|
248
|
+
{
|
|
249
|
+
ref: i,
|
|
250
|
+
as: t,
|
|
251
|
+
color: "ghost",
|
|
252
|
+
size: "sm",
|
|
253
|
+
className: accordionIconVariants({ isOpen: s }),
|
|
254
|
+
...r
|
|
255
|
+
}
|
|
256
|
+
);
|
|
257
|
+
}), AccordionRoot = forwardRef(
|
|
258
|
+
function({
|
|
259
|
+
title: t,
|
|
260
|
+
subtitle: r,
|
|
261
|
+
isDefaultOpen: i = !1,
|
|
262
|
+
disabled: s = !1,
|
|
263
|
+
hasMargin: o,
|
|
264
|
+
className: n,
|
|
265
|
+
children: l,
|
|
266
|
+
...u
|
|
267
|
+
}, c) {
|
|
268
|
+
const [f, a] = useState(i), d = () => {
|
|
269
|
+
s || a((v) => !v);
|
|
270
|
+
}, b = {
|
|
271
|
+
isOpen: f,
|
|
272
|
+
toggle: d,
|
|
273
|
+
disabled: s
|
|
274
|
+
};
|
|
275
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(AccordionContext.Provider, { value: b, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
276
|
+
"div",
|
|
277
|
+
{
|
|
278
|
+
ref: c,
|
|
279
|
+
className: cn(
|
|
280
|
+
accordionVariants({ disabled: s }),
|
|
281
|
+
n,
|
|
282
|
+
o && "mb-4"
|
|
283
|
+
),
|
|
284
|
+
...u,
|
|
285
|
+
children: [
|
|
286
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
287
|
+
"div",
|
|
288
|
+
{
|
|
289
|
+
role: "button",
|
|
290
|
+
className: accordionHeaderVariants({ disabled: s, isOpen: f }),
|
|
291
|
+
onClick: d,
|
|
292
|
+
"aria-disabled": s,
|
|
293
|
+
"aria-expanded": f,
|
|
294
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between w-full gap-2", children: [
|
|
295
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-3 flex-grow", children: [
|
|
296
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1", children: t }),
|
|
297
|
+
r && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-shrink-0", children: r })
|
|
298
|
+
] }),
|
|
299
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(AccordionIcon, { as: ChevronDown })
|
|
300
|
+
] })
|
|
301
|
+
}
|
|
302
|
+
),
|
|
303
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
304
|
+
"div",
|
|
305
|
+
{
|
|
306
|
+
className: cn(
|
|
307
|
+
"overflow-hidden transition-all duration-300",
|
|
308
|
+
f ? "max-h-screen opacity-100" : "max-h-0 opacity-0"
|
|
309
|
+
),
|
|
310
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "p-4 pt-2", children: l })
|
|
311
|
+
}
|
|
312
|
+
)
|
|
313
|
+
]
|
|
314
|
+
}
|
|
315
|
+
) });
|
|
316
|
+
}
|
|
317
|
+
), Accordion = Object.assign(AccordionRoot, {
|
|
318
|
+
Title: AccordionTitle,
|
|
319
|
+
Content: AccordionContent,
|
|
320
|
+
Icon: AccordionIcon
|
|
321
|
+
}), alertVariants = cva(
|
|
8
322
|
"relative flex items-center gap-2 rounded-md p-2 text-sm transition-all duration-200",
|
|
9
323
|
{
|
|
10
324
|
variants: {
|
|
@@ -140,25 +454,25 @@ const alertVariants = cva(
|
|
|
140
454
|
}
|
|
141
455
|
}
|
|
142
456
|
), AlertIcon = forwardRef(
|
|
143
|
-
({ className: e, children: t, ...r },
|
|
457
|
+
({ className: e, children: t, ...r }, i) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: i, className: cn(alertIconVariants(), e), ...r, children: t })
|
|
144
458
|
), AlertRoot = forwardRef(
|
|
145
459
|
({
|
|
146
460
|
variant: e = "default",
|
|
147
461
|
color: t = "neutral",
|
|
148
462
|
icon: r,
|
|
149
|
-
className:
|
|
150
|
-
children:
|
|
463
|
+
className: i,
|
|
464
|
+
children: s,
|
|
151
465
|
...o
|
|
152
466
|
}, n) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
153
467
|
"div",
|
|
154
468
|
{
|
|
155
469
|
ref: n,
|
|
156
470
|
role: "alert",
|
|
157
|
-
className: cn(alertVariants({ variant: e, color: t }),
|
|
471
|
+
className: cn(alertVariants({ variant: e, color: t }), i),
|
|
158
472
|
...o,
|
|
159
473
|
children: [
|
|
160
474
|
r && /* @__PURE__ */ jsxRuntimeExports.jsx(AlertIcon, { children: r }),
|
|
161
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1", children:
|
|
475
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1", children: s })
|
|
162
476
|
]
|
|
163
477
|
}
|
|
164
478
|
)
|
|
@@ -226,16 +540,16 @@ const alertVariants = cva(
|
|
|
226
540
|
children: e,
|
|
227
541
|
className: t,
|
|
228
542
|
color: r = "primary",
|
|
229
|
-
fontSize:
|
|
230
|
-
fontWeight:
|
|
543
|
+
fontSize: i = "base",
|
|
544
|
+
fontWeight: s = "medium",
|
|
231
545
|
quiet: o = !1,
|
|
232
546
|
...n
|
|
233
|
-
},
|
|
547
|
+
}, l) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
234
548
|
"a",
|
|
235
549
|
{
|
|
236
|
-
ref:
|
|
550
|
+
ref: l,
|
|
237
551
|
className: cn(
|
|
238
|
-
anchorVariants({ color: r, fontSize:
|
|
552
|
+
anchorVariants({ color: r, fontSize: i, fontWeight: s, quiet: o }),
|
|
239
553
|
t
|
|
240
554
|
),
|
|
241
555
|
...n,
|
|
@@ -316,18 +630,18 @@ const alertVariants = cva(
|
|
|
316
630
|
as: e = "span",
|
|
317
631
|
color: t = "ghost",
|
|
318
632
|
hasUnderline: r = !1,
|
|
319
|
-
isCapitalize:
|
|
320
|
-
align:
|
|
633
|
+
isCapitalize: i = !1,
|
|
634
|
+
align: s = "left",
|
|
321
635
|
italic: o = !1,
|
|
322
636
|
clamp: n = "none",
|
|
323
|
-
ellipsis:
|
|
324
|
-
fontSize:
|
|
325
|
-
fontWeight:
|
|
326
|
-
className:
|
|
327
|
-
children:
|
|
637
|
+
ellipsis: l = !1,
|
|
638
|
+
fontSize: u,
|
|
639
|
+
fontWeight: c,
|
|
640
|
+
className: f,
|
|
641
|
+
children: a,
|
|
328
642
|
...d
|
|
329
643
|
}, b) => {
|
|
330
|
-
const
|
|
644
|
+
const j = [
|
|
331
645
|
"h1",
|
|
332
646
|
"h2",
|
|
333
647
|
"h3",
|
|
@@ -337,7 +651,7 @@ const alertVariants = cva(
|
|
|
337
651
|
"p",
|
|
338
652
|
"span",
|
|
339
653
|
"label"
|
|
340
|
-
].includes(e) ? e : "span",
|
|
654
|
+
].includes(e) ? e : "span", w = u ? `text-${u}` : "", R = c ? `font-${c}` : "";
|
|
341
655
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
342
656
|
e,
|
|
343
657
|
{
|
|
@@ -346,39 +660,47 @@ const alertVariants = cva(
|
|
|
346
660
|
textVariants({
|
|
347
661
|
color: t,
|
|
348
662
|
hasUnderline: r,
|
|
349
|
-
isCapitalize:
|
|
350
|
-
align:
|
|
663
|
+
isCapitalize: i,
|
|
664
|
+
align: s,
|
|
351
665
|
italic: o,
|
|
352
666
|
clamp: n,
|
|
353
|
-
ellipsis:
|
|
667
|
+
ellipsis: l,
|
|
354
668
|
// @ts-expect-error - `as` is not a valid variant
|
|
355
|
-
as:
|
|
669
|
+
as: j
|
|
356
670
|
}),
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
671
|
+
w,
|
|
672
|
+
R,
|
|
673
|
+
f
|
|
360
674
|
),
|
|
361
675
|
...d,
|
|
362
|
-
children:
|
|
676
|
+
children: a
|
|
363
677
|
}
|
|
364
678
|
);
|
|
365
679
|
}
|
|
366
680
|
), Attribute = forwardRef(
|
|
367
|
-
function({ title: t, children: r, className: s, ...
|
|
368
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
681
|
+
function({ title: t, children: r, className: i, hasMargin: s, ...o }, n) {
|
|
682
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
683
|
+
"div",
|
|
684
|
+
{
|
|
685
|
+
ref: n,
|
|
686
|
+
className: cn("space-y-1", i, s && "mb-4"),
|
|
687
|
+
...o,
|
|
688
|
+
children: [
|
|
689
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
690
|
+
Text,
|
|
691
|
+
{
|
|
692
|
+
as: "h4",
|
|
693
|
+
fontSize: "sm",
|
|
694
|
+
fontWeight: "normal",
|
|
695
|
+
color: "gray",
|
|
696
|
+
className: "leading-none",
|
|
697
|
+
children: t
|
|
698
|
+
}
|
|
699
|
+
),
|
|
700
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Text, { as: "p", fontSize: "base", fontWeight: "normal", children: r })
|
|
701
|
+
]
|
|
702
|
+
}
|
|
703
|
+
);
|
|
382
704
|
}
|
|
383
705
|
);
|
|
384
706
|
function getColSpan(e = 1) {
|
|
@@ -441,18 +763,18 @@ function getGridCols(e = 4) {
|
|
|
441
763
|
return "grid-cols-4";
|
|
442
764
|
}
|
|
443
765
|
}
|
|
444
|
-
const AttributeListItem = forwardRef(function({ children: t, className: r, span:
|
|
445
|
-
const
|
|
446
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("li", { ref: n, className: cn(
|
|
766
|
+
const AttributeListItem = forwardRef(function({ children: t, className: r, span: i = 1, title: s, ...o }, n) {
|
|
767
|
+
const l = getColSpan(i);
|
|
768
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("li", { ref: n, className: cn(l, r), ...o, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Attribute, { title: s, children: t }) });
|
|
447
769
|
}), AttributeListRoot = forwardRef(
|
|
448
|
-
function({ children: t, className: r, columns:
|
|
449
|
-
const n = getGridCols(
|
|
770
|
+
function({ children: t, className: r, columns: i = 4, ...s }, o) {
|
|
771
|
+
const n = getGridCols(i);
|
|
450
772
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
451
773
|
"ul",
|
|
452
774
|
{
|
|
453
775
|
ref: o,
|
|
454
776
|
className: cn("grid gap-4", n, r),
|
|
455
|
-
...
|
|
777
|
+
...s,
|
|
456
778
|
children: t
|
|
457
779
|
}
|
|
458
780
|
);
|
|
@@ -502,29 +824,29 @@ const AttributeListItem = forwardRef(function({ children: t, className: r, span:
|
|
|
502
824
|
variant: e = "primary",
|
|
503
825
|
size: t = "md",
|
|
504
826
|
shape: r = "circle",
|
|
505
|
-
className:
|
|
506
|
-
children:
|
|
827
|
+
className: i,
|
|
828
|
+
children: s,
|
|
507
829
|
...o
|
|
508
830
|
}, n) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
509
831
|
"div",
|
|
510
832
|
{
|
|
511
833
|
ref: n,
|
|
512
|
-
className: cn(avatarVariants({ variant: e, size: t, shape: r }),
|
|
834
|
+
className: cn(avatarVariants({ variant: e, size: t, shape: r }), i),
|
|
513
835
|
...o,
|
|
514
|
-
children:
|
|
836
|
+
children: s
|
|
515
837
|
}
|
|
516
838
|
)
|
|
517
839
|
), AvatarImage = forwardRef(
|
|
518
|
-
({ src: e, alt: t, className: r, onError:
|
|
519
|
-
const [n,
|
|
840
|
+
({ src: e, alt: t, className: r, onError: i, ...s }, o) => {
|
|
841
|
+
const [n, l] = useState(!1);
|
|
520
842
|
useEffect(() => {
|
|
521
|
-
|
|
843
|
+
l(!1);
|
|
522
844
|
}, [e]);
|
|
523
|
-
const
|
|
524
|
-
(
|
|
525
|
-
|
|
845
|
+
const u = useCallback(
|
|
846
|
+
(c) => {
|
|
847
|
+
l(!0), i?.(c);
|
|
526
848
|
},
|
|
527
|
-
[
|
|
849
|
+
[i]
|
|
528
850
|
);
|
|
529
851
|
return n ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
530
852
|
"img",
|
|
@@ -533,8 +855,8 @@ const AttributeListItem = forwardRef(function({ children: t, className: r, span:
|
|
|
533
855
|
src: e,
|
|
534
856
|
alt: t,
|
|
535
857
|
className: cn(avatarImageVariants(), r),
|
|
536
|
-
onError:
|
|
537
|
-
...
|
|
858
|
+
onError: u,
|
|
859
|
+
...s
|
|
538
860
|
}
|
|
539
861
|
);
|
|
540
862
|
}
|
|
@@ -701,37 +1023,37 @@ const AttributeListItem = forwardRef(function({ children: t, className: r, span:
|
|
|
701
1023
|
variant: e = "default",
|
|
702
1024
|
shape: t = "square",
|
|
703
1025
|
color: r = "primary",
|
|
704
|
-
size:
|
|
705
|
-
iconLeft:
|
|
1026
|
+
size: i = "md",
|
|
1027
|
+
iconLeft: s,
|
|
706
1028
|
iconRight: o,
|
|
707
1029
|
className: n,
|
|
708
|
-
children:
|
|
709
|
-
...
|
|
710
|
-
},
|
|
711
|
-
const d = !(
|
|
1030
|
+
children: l,
|
|
1031
|
+
...u
|
|
1032
|
+
}, c) => {
|
|
1033
|
+
const d = !(l != null && l !== "") && !!(s || o);
|
|
712
1034
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
713
1035
|
"span",
|
|
714
1036
|
{
|
|
715
|
-
ref:
|
|
1037
|
+
ref: c,
|
|
716
1038
|
className: cn(
|
|
717
1039
|
badgeVariants({
|
|
718
1040
|
variant: e,
|
|
719
1041
|
color: r,
|
|
720
1042
|
shape: t,
|
|
721
|
-
size:
|
|
1043
|
+
size: i,
|
|
722
1044
|
iconOnly: d
|
|
723
1045
|
}),
|
|
724
1046
|
n
|
|
725
1047
|
),
|
|
726
|
-
...
|
|
1048
|
+
...u,
|
|
727
1049
|
children: d ? (
|
|
728
1050
|
// Icon-only mode: display only the icon
|
|
729
|
-
|
|
1051
|
+
s || o
|
|
730
1052
|
) : (
|
|
731
1053
|
// Normal mode: display icon(s) and text
|
|
732
1054
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
733
|
-
|
|
734
|
-
|
|
1055
|
+
s,
|
|
1056
|
+
l,
|
|
735
1057
|
o
|
|
736
1058
|
] })
|
|
737
1059
|
)
|
|
@@ -752,7 +1074,7 @@ const AttributeListItem = forwardRef(function({ children: t, className: r, span:
|
|
|
752
1074
|
size: "md"
|
|
753
1075
|
}
|
|
754
1076
|
}), BrandLogo = forwardRef(
|
|
755
|
-
({ shape: e = "square", size: t, ...r },
|
|
1077
|
+
({ shape: e = "square", size: t, ...r }, i) => {
|
|
756
1078
|
const o = {
|
|
757
1079
|
square: SvgSpenicleSquare,
|
|
758
1080
|
rounded: SvgSpenicleRounded,
|
|
@@ -761,19 +1083,19 @@ const AttributeListItem = forwardRef(function({ children: t, className: r, span:
|
|
|
761
1083
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
762
1084
|
o,
|
|
763
1085
|
{
|
|
764
|
-
ref:
|
|
1086
|
+
ref: i,
|
|
765
1087
|
...r,
|
|
766
1088
|
className: cn("inline-block", brandSizeClass({ size: t }))
|
|
767
1089
|
}
|
|
768
1090
|
);
|
|
769
1091
|
}
|
|
770
1092
|
), Brand = forwardRef(
|
|
771
|
-
({ name: e = "spenicle", size: t = "md", shape: r, ...
|
|
1093
|
+
({ name: e = "spenicle", size: t = "md", shape: r, ...i }, s) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
772
1094
|
"span",
|
|
773
1095
|
{
|
|
774
|
-
ref:
|
|
1096
|
+
ref: s,
|
|
775
1097
|
className: cn("inline-flex items-center gap-2"),
|
|
776
|
-
...
|
|
1098
|
+
...i,
|
|
777
1099
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(BrandLogo, { shape: r, size: t, "aria-hidden": "true" })
|
|
778
1100
|
}
|
|
779
1101
|
)
|
|
@@ -831,22 +1153,22 @@ const AttributeListItem = forwardRef(function({ children: t, className: r, span:
|
|
|
831
1153
|
function({
|
|
832
1154
|
className: t,
|
|
833
1155
|
variant: r = "primary",
|
|
834
|
-
size:
|
|
835
|
-
disabled:
|
|
1156
|
+
size: i = "md",
|
|
1157
|
+
disabled: s = !1,
|
|
836
1158
|
type: o = "button",
|
|
837
1159
|
children: n,
|
|
838
|
-
...
|
|
839
|
-
},
|
|
1160
|
+
...l
|
|
1161
|
+
}, u) {
|
|
840
1162
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
841
1163
|
"button",
|
|
842
1164
|
{
|
|
843
|
-
ref:
|
|
1165
|
+
ref: u,
|
|
844
1166
|
type: o,
|
|
845
|
-
className: cn(buttonVariants({ variant: r, size:
|
|
846
|
-
disabled:
|
|
847
|
-
"aria-disabled":
|
|
848
|
-
inert:
|
|
849
|
-
...
|
|
1167
|
+
className: cn(buttonVariants({ variant: r, size: i }), t),
|
|
1168
|
+
disabled: s,
|
|
1169
|
+
"aria-disabled": s,
|
|
1170
|
+
inert: s ? !0 : void 0,
|
|
1171
|
+
...l,
|
|
850
1172
|
children: n
|
|
851
1173
|
}
|
|
852
1174
|
);
|
|
@@ -878,185 +1200,286 @@ const AttributeListItem = forwardRef(function({ children: t, className: r, span:
|
|
|
878
1200
|
}
|
|
879
1201
|
}
|
|
880
1202
|
);
|
|
881
|
-
function useMenuOutsideClick(e, t, r,
|
|
1203
|
+
function useMenuOutsideClick(e, t, r, i) {
|
|
882
1204
|
useEffect(() => {
|
|
883
1205
|
if (!e) return;
|
|
884
|
-
function
|
|
885
|
-
!t.current?.contains(o.target) && !r.current?.contains(o.target) &&
|
|
1206
|
+
function s(o) {
|
|
1207
|
+
!t.current?.contains(o.target) && !r.current?.contains(o.target) && i();
|
|
886
1208
|
}
|
|
887
|
-
return document.addEventListener("mousedown",
|
|
888
|
-
}, [e,
|
|
1209
|
+
return document.addEventListener("mousedown", s), () => document.removeEventListener("mousedown", s);
|
|
1210
|
+
}, [e, i, t, r]);
|
|
889
1211
|
}
|
|
890
|
-
function
|
|
891
|
-
const
|
|
892
|
-
|
|
1212
|
+
function getScrollableAncestors(e) {
|
|
1213
|
+
const t = [];
|
|
1214
|
+
let r = e.parentElement;
|
|
1215
|
+
for (; r && r !== document.documentElement; ) {
|
|
1216
|
+
const i = getComputedStyle(r);
|
|
1217
|
+
(i.overflow === "auto" || i.overflow === "scroll" || i.overflowY === "auto" || i.overflowY === "scroll" || i.overflowX === "auto" || i.overflowX === "scroll") && t.push(r), r = r.parentElement;
|
|
1218
|
+
}
|
|
1219
|
+
return t.push(document.documentElement), t;
|
|
1220
|
+
}
|
|
1221
|
+
function isTriggerVisible(e, t) {
|
|
1222
|
+
const r = e.getBoundingClientRect();
|
|
1223
|
+
if (r.bottom < 0 || r.top > window.innerHeight || r.right < 0 || r.left > window.innerWidth)
|
|
1224
|
+
return !1;
|
|
1225
|
+
for (const i of t) {
|
|
1226
|
+
if (i === document.documentElement) continue;
|
|
1227
|
+
const s = i.getBoundingClientRect();
|
|
1228
|
+
if (r.bottom < s.top || r.top > s.bottom || r.right < s.left || r.left > s.right)
|
|
1229
|
+
return !1;
|
|
1230
|
+
}
|
|
1231
|
+
return !0;
|
|
1232
|
+
}
|
|
1233
|
+
function useMenuPosition(e, t, r, i = "bottom-start", s) {
|
|
1234
|
+
const [o, n] = useState({ isReady: !1 }), l = useCallback(() => {
|
|
893
1235
|
if (!e || !t.current) {
|
|
894
1236
|
n({ isReady: !1 });
|
|
895
1237
|
return;
|
|
896
1238
|
}
|
|
897
1239
|
if (!r.current) {
|
|
898
|
-
const
|
|
1240
|
+
const m = setTimeout(() => {
|
|
899
1241
|
n({ isReady: !1 });
|
|
900
1242
|
}, 0);
|
|
901
|
-
return () => clearTimeout(
|
|
1243
|
+
return () => clearTimeout(m);
|
|
1244
|
+
}
|
|
1245
|
+
const u = t.current, c = r.current, f = getScrollableAncestors(u);
|
|
1246
|
+
if (!isTriggerVisible(u, f)) {
|
|
1247
|
+
n({ isReady: !1 });
|
|
1248
|
+
return;
|
|
1249
|
+
}
|
|
1250
|
+
const a = u.getBoundingClientRect(), d = window.innerWidth, b = window.innerHeight;
|
|
1251
|
+
let v = null;
|
|
1252
|
+
s && ("getBoundingClientRect" in s ? v = s : "current" in s && (v = s.current));
|
|
1253
|
+
const j = v || document.documentElement, w = j === document.documentElement ? { top: 0, bottom: b, left: 0, right: d } : j.getBoundingClientRect(), R = c.style.visibility, E = c.style.position, C = c.style.opacity;
|
|
1254
|
+
c.style.visibility = "hidden", c.style.position = "absolute", c.style.opacity = "0";
|
|
1255
|
+
const x = c.getBoundingClientRect();
|
|
1256
|
+
c.style.visibility = R, c.style.position = E, c.style.opacity = C;
|
|
1257
|
+
const N = w.bottom - a.bottom - 8, I = a.top - w.top - 8, V = w.right - a.left - 8, A = a.right - w.left - 8;
|
|
1258
|
+
let p = i;
|
|
1259
|
+
if (i === "auto") {
|
|
1260
|
+
const h = [
|
|
1261
|
+
{
|
|
1262
|
+
name: "bottom-start",
|
|
1263
|
+
fits: N >= x.height && V >= x.width,
|
|
1264
|
+
spaceUsed: N,
|
|
1265
|
+
priority: 1
|
|
1266
|
+
// Prefer bottom-start as default
|
|
1267
|
+
},
|
|
1268
|
+
{
|
|
1269
|
+
name: "bottom-end",
|
|
1270
|
+
fits: N >= x.height && A >= x.width,
|
|
1271
|
+
spaceUsed: N,
|
|
1272
|
+
priority: 2
|
|
1273
|
+
},
|
|
1274
|
+
{
|
|
1275
|
+
name: "top-start",
|
|
1276
|
+
fits: I >= x.height && V >= x.width,
|
|
1277
|
+
spaceUsed: I,
|
|
1278
|
+
priority: 3
|
|
1279
|
+
},
|
|
1280
|
+
{
|
|
1281
|
+
name: "top-end",
|
|
1282
|
+
fits: I >= x.height && A >= x.width,
|
|
1283
|
+
spaceUsed: I,
|
|
1284
|
+
priority: 4
|
|
1285
|
+
}
|
|
1286
|
+
].filter((y) => y.fits);
|
|
1287
|
+
h.length > 0 ? p = h.sort(
|
|
1288
|
+
(y, S) => y.priority - S.priority
|
|
1289
|
+
)[0].name : N >= I ? p = V >= A ? "bottom-start" : "bottom-end" : p = V >= A ? "top-start" : "top-end";
|
|
902
1290
|
}
|
|
903
|
-
const a = t.current, l = r.current, u = i || document.documentElement, c = a.getBoundingClientRect(), f = u.getBoundingClientRect(), d = l.style.visibility, b = l.style.position, p = l.style.opacity;
|
|
904
|
-
l.style.visibility = "hidden", l.style.position = "absolute", l.style.opacity = "0";
|
|
905
|
-
const h = l.getBoundingClientRect();
|
|
906
|
-
l.style.visibility = d, l.style.position = b, l.style.opacity = p;
|
|
907
|
-
const y = f.bottom - c.bottom - 8, v = c.top - f.top - 8, R = f.right - c.left - 8, j = c.right - f.left - 8;
|
|
908
|
-
let x = s;
|
|
909
|
-
s === "auto" && (y >= h.height && R >= h.width ? x = "bottom-start" : y >= h.height && j >= h.width ? x = "bottom-end" : v >= h.height && R >= h.width ? x = "top-start" : v >= h.height && j >= h.width ? x = "top-end" : x = y >= v ? "bottom-start" : "top-start");
|
|
910
1291
|
const g = {};
|
|
911
|
-
if (
|
|
912
|
-
switch (g.position = "fixed",
|
|
1292
|
+
if (s)
|
|
1293
|
+
switch (g.position = "fixed", p) {
|
|
913
1294
|
case "bottom-start":
|
|
914
|
-
g.top =
|
|
1295
|
+
g.top = a.bottom + 4, g.left = a.left;
|
|
915
1296
|
break;
|
|
916
1297
|
case "bottom-end":
|
|
917
|
-
g.top =
|
|
1298
|
+
g.top = a.bottom + 4, g.right = window.innerWidth - a.right;
|
|
918
1299
|
break;
|
|
919
1300
|
case "top-start":
|
|
920
|
-
g.bottom = window.innerHeight -
|
|
1301
|
+
g.bottom = window.innerHeight - a.top + 4, g.left = a.left;
|
|
921
1302
|
break;
|
|
922
1303
|
case "top-end":
|
|
923
|
-
g.bottom = window.innerHeight -
|
|
1304
|
+
g.bottom = window.innerHeight - a.top + 4, g.right = window.innerWidth - a.right;
|
|
924
1305
|
break;
|
|
925
1306
|
}
|
|
926
1307
|
else
|
|
927
|
-
switch (g.position = "absolute",
|
|
1308
|
+
switch (g.position = "absolute", p) {
|
|
928
1309
|
case "bottom-start":
|
|
929
|
-
g.top =
|
|
1310
|
+
g.top = a.height + 4, g.left = 0;
|
|
930
1311
|
break;
|
|
931
1312
|
case "bottom-end":
|
|
932
|
-
g.top =
|
|
1313
|
+
g.top = a.height + 4, g.right = 0;
|
|
933
1314
|
break;
|
|
934
1315
|
case "top-start":
|
|
935
|
-
g.bottom =
|
|
1316
|
+
g.bottom = a.height + 4, g.left = 0;
|
|
936
1317
|
break;
|
|
937
1318
|
case "top-end":
|
|
938
|
-
g.bottom =
|
|
1319
|
+
g.bottom = a.height + 4, g.right = 0;
|
|
939
1320
|
break;
|
|
940
1321
|
}
|
|
941
|
-
if (
|
|
942
|
-
const
|
|
943
|
-
top:
|
|
944
|
-
left:
|
|
945
|
-
width:
|
|
946
|
-
height:
|
|
1322
|
+
if (s) {
|
|
1323
|
+
const m = {
|
|
1324
|
+
top: p.startsWith("bottom") ? a.bottom + 4 : a.top - x.height - 4,
|
|
1325
|
+
left: p.endsWith("start") ? a.left : a.right - x.width,
|
|
1326
|
+
width: x.width,
|
|
1327
|
+
height: x.height
|
|
947
1328
|
};
|
|
948
|
-
if (
|
|
949
|
-
const
|
|
950
|
-
|
|
951
|
-
} else if (
|
|
952
|
-
const
|
|
953
|
-
|
|
1329
|
+
if (m.left < w.left + 8) {
|
|
1330
|
+
const h = w.left + 8 - m.left;
|
|
1331
|
+
p.endsWith("start") ? g.left = (g.left || 0) + h : g.right = (g.right || 0) - h;
|
|
1332
|
+
} else if (m.left + m.width > w.right - 8) {
|
|
1333
|
+
const h = m.left + m.width - (w.right - 8);
|
|
1334
|
+
p.endsWith("start") ? g.left = (g.left || 0) - h : g.right = (g.right || 0) + h;
|
|
954
1335
|
}
|
|
955
|
-
if (
|
|
956
|
-
const
|
|
1336
|
+
if (p.startsWith("bottom")) {
|
|
1337
|
+
const h = Math.max(
|
|
957
1338
|
50,
|
|
958
|
-
|
|
1339
|
+
w.bottom - a.bottom - 16
|
|
959
1340
|
);
|
|
960
|
-
|
|
1341
|
+
x.height > h && (g.maxHeight = h);
|
|
961
1342
|
} else {
|
|
962
|
-
const
|
|
1343
|
+
const h = Math.max(
|
|
963
1344
|
50,
|
|
964
|
-
|
|
1345
|
+
a.top - w.top - 16
|
|
965
1346
|
);
|
|
966
|
-
|
|
1347
|
+
x.height > h && (g.maxHeight = h);
|
|
1348
|
+
}
|
|
1349
|
+
} else {
|
|
1350
|
+
const m = {
|
|
1351
|
+
top: p.startsWith("bottom") ? a.height + 4 : -x.height - 4,
|
|
1352
|
+
left: p.endsWith("start") ? 0 : -x.width,
|
|
1353
|
+
width: x.width,
|
|
1354
|
+
height: x.height
|
|
1355
|
+
}, h = {
|
|
1356
|
+
left: a.left,
|
|
1357
|
+
right: a.right,
|
|
1358
|
+
top: a.top,
|
|
1359
|
+
bottom: a.bottom
|
|
1360
|
+
};
|
|
1361
|
+
if (h.left + m.left < 8) {
|
|
1362
|
+
const y = 8 - (h.left + m.left);
|
|
1363
|
+
p.endsWith("start") ? g.left = (g.left || 0) + y : g.right = (g.right || 0) - y;
|
|
1364
|
+
} else if (h.left + m.left + m.width > d - 8) {
|
|
1365
|
+
const y = h.left + m.left + m.width - (d - 8);
|
|
1366
|
+
p.endsWith("start") ? g.left = (g.left || 0) - y : g.right = (g.right || 0) + y;
|
|
967
1367
|
}
|
|
968
1368
|
}
|
|
969
1369
|
g.isReady = !0, n(g);
|
|
970
|
-
}, [e,
|
|
971
|
-
}
|
|
972
|
-
const MenuContent = forwardRef(
|
|
973
|
-
({ children: e }, t) => /* @__PURE__ */ jsxRuntimeExports.jsx("ul", { ref: t, className: "flex flex-col gap-1", children: e })
|
|
974
|
-
), MenuItem = forwardRef(
|
|
975
|
-
({ children: e, disabled: t, ...r }, s) => /* @__PURE__ */ jsxRuntimeExports.jsx("li", { ref: s, ...r, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
976
|
-
Button,
|
|
977
|
-
{
|
|
978
|
-
variant: "ghost",
|
|
979
|
-
className: cn("block text-left w-full"),
|
|
980
|
-
disabled: t,
|
|
981
|
-
children: e
|
|
982
|
-
}
|
|
983
|
-
) })
|
|
984
|
-
);
|
|
985
|
-
function useEscapeClose(e, t, r) {
|
|
986
|
-
const s = useRef(null);
|
|
1370
|
+
}, [e, i, t, r, s]);
|
|
987
1371
|
return useEffect(() => {
|
|
988
|
-
|
|
989
|
-
}, []), useEffect(() => {
|
|
990
|
-
|
|
991
|
-
|
|
1372
|
+
l();
|
|
1373
|
+
}, [l]), useEffect(() => {
|
|
1374
|
+
if (!e || !t.current) return;
|
|
1375
|
+
const u = t.current, c = getScrollableAncestors(u);
|
|
1376
|
+
let f = !1;
|
|
1377
|
+
const a = () => {
|
|
1378
|
+
f || (requestAnimationFrame(() => {
|
|
1379
|
+
l(), f = !1;
|
|
1380
|
+
}), f = !0);
|
|
992
1381
|
};
|
|
993
|
-
return
|
|
994
|
-
document.
|
|
1382
|
+
return c.forEach((d) => {
|
|
1383
|
+
d === document.documentElement ? (window.addEventListener("scroll", a, { passive: !0 }), window.addEventListener("resize", a, { passive: !0 })) : d.addEventListener("scroll", a, { passive: !0 });
|
|
1384
|
+
}), () => {
|
|
1385
|
+
c.forEach((d) => {
|
|
1386
|
+
d === document.documentElement ? (window.removeEventListener("scroll", a), window.removeEventListener("resize", a)) : d.removeEventListener("scroll", a);
|
|
1387
|
+
});
|
|
995
1388
|
};
|
|
996
|
-
}, [e,
|
|
1389
|
+
}, [e, l, t]), o;
|
|
997
1390
|
}
|
|
998
|
-
const
|
|
1391
|
+
const MenuContext = createContext(void 0), MenuProvider = MenuContext.Provider, useMenuProvider = () => {
|
|
1392
|
+
const e = useContext(MenuContext);
|
|
1393
|
+
if (!e)
|
|
1394
|
+
throw new Error("useMenuProvider must be used within a MenuProvider");
|
|
1395
|
+
return e;
|
|
1396
|
+
}, MenuContent = forwardRef(
|
|
1397
|
+
({ children: e }, t) => /* @__PURE__ */ jsxRuntimeExports.jsx("ul", { ref: t, className: "flex flex-col gap-1", children: e })
|
|
1398
|
+
), MenuItem = forwardRef(
|
|
1399
|
+
({ children: e, disabled: t, onClick: r, ...i }, s) => {
|
|
1400
|
+
const { preserve: o, onClose: n } = useMenuProvider(), l = (u) => {
|
|
1401
|
+
r?.(u), o || n();
|
|
1402
|
+
};
|
|
1403
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("li", { ref: s, ...i, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1404
|
+
Button,
|
|
1405
|
+
{
|
|
1406
|
+
variant: "ghost",
|
|
1407
|
+
className: cn("justify-start w-full gap-2"),
|
|
1408
|
+
disabled: t,
|
|
1409
|
+
onClick: l,
|
|
1410
|
+
children: e
|
|
1411
|
+
}
|
|
1412
|
+
) });
|
|
1413
|
+
}
|
|
1414
|
+
), MenuRoot = ({
|
|
999
1415
|
isOpen: e,
|
|
1000
1416
|
onOutsideClick: t,
|
|
1001
1417
|
size: r = "md",
|
|
1002
|
-
content:
|
|
1003
|
-
children:
|
|
1004
|
-
placement: o = "
|
|
1005
|
-
container: n
|
|
1418
|
+
content: i,
|
|
1419
|
+
children: s,
|
|
1420
|
+
placement: o = "auto",
|
|
1421
|
+
container: n,
|
|
1422
|
+
preserve: l
|
|
1006
1423
|
}) => {
|
|
1007
|
-
const
|
|
1008
|
-
useMenuOutsideClick(e,
|
|
1009
|
-
const
|
|
1424
|
+
const u = useRef(null), c = useRef(null), f = useId();
|
|
1425
|
+
useMenuOutsideClick(e, c, u, t);
|
|
1426
|
+
const a = useMenuPosition(
|
|
1010
1427
|
e,
|
|
1011
|
-
|
|
1012
|
-
|
|
1428
|
+
u,
|
|
1429
|
+
c,
|
|
1013
1430
|
o,
|
|
1014
|
-
n
|
|
1015
|
-
),
|
|
1016
|
-
...
|
|
1017
|
-
position:
|
|
1018
|
-
overflowY:
|
|
1019
|
-
overflowX:
|
|
1020
|
-
},
|
|
1431
|
+
n || null
|
|
1432
|
+
), d = {
|
|
1433
|
+
...a,
|
|
1434
|
+
position: a.position || "absolute",
|
|
1435
|
+
overflowY: a.maxHeight ? "auto" : void 0,
|
|
1436
|
+
overflowX: a.maxWidth ? "auto" : void 0
|
|
1437
|
+
}, b = e && a.isReady, v = /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1021
1438
|
"div",
|
|
1022
1439
|
{
|
|
1023
|
-
id:
|
|
1024
|
-
ref:
|
|
1025
|
-
className: cn(menuVariants({ size: r, open:
|
|
1026
|
-
style:
|
|
1440
|
+
id: f,
|
|
1441
|
+
ref: c,
|
|
1442
|
+
className: cn(menuVariants({ size: r, open: b })),
|
|
1443
|
+
style: d,
|
|
1027
1444
|
role: "menu",
|
|
1028
|
-
"aria-hidden": !
|
|
1029
|
-
children:
|
|
1445
|
+
"aria-hidden": !b,
|
|
1446
|
+
children: i
|
|
1447
|
+
}
|
|
1448
|
+
);
|
|
1449
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1450
|
+
MenuProvider,
|
|
1451
|
+
{
|
|
1452
|
+
value: { onClose: t, preserve: !!l },
|
|
1453
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative w-fit", children: [
|
|
1454
|
+
cloneElement(s, {
|
|
1455
|
+
// @ts-expect-error: ref is valid for button or forwardRef components
|
|
1456
|
+
ref: u,
|
|
1457
|
+
"aria-haspopup": "menu",
|
|
1458
|
+
"aria-expanded": e,
|
|
1459
|
+
"aria-controls": f
|
|
1460
|
+
}),
|
|
1461
|
+
e && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
1462
|
+
!a.isReady && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1463
|
+
"div",
|
|
1464
|
+
{
|
|
1465
|
+
ref: c,
|
|
1466
|
+
className: cn(menuVariants({ size: r, open: !1 })),
|
|
1467
|
+
style: {
|
|
1468
|
+
position: "absolute",
|
|
1469
|
+
visibility: "hidden",
|
|
1470
|
+
opacity: 0,
|
|
1471
|
+
pointerEvents: "none"
|
|
1472
|
+
},
|
|
1473
|
+
role: "menu",
|
|
1474
|
+
"aria-hidden": !0,
|
|
1475
|
+
children: i
|
|
1476
|
+
}
|
|
1477
|
+
),
|
|
1478
|
+
a.isReady && /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: a.position === "fixed" ? /* @__PURE__ */ jsxRuntimeExports.jsx(OverlayPortal, { children: v }) : v })
|
|
1479
|
+
] })
|
|
1480
|
+
] })
|
|
1030
1481
|
}
|
|
1031
1482
|
);
|
|
1032
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative w-fit", children: [
|
|
1033
|
-
cloneElement(i, {
|
|
1034
|
-
// @ts-expect-error: ref is valid for button or forwardRef components
|
|
1035
|
-
ref: a,
|
|
1036
|
-
"aria-haspopup": "menu",
|
|
1037
|
-
"aria-expanded": e,
|
|
1038
|
-
"aria-controls": u
|
|
1039
|
-
}),
|
|
1040
|
-
e && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
1041
|
-
!c.isReady && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1042
|
-
"div",
|
|
1043
|
-
{
|
|
1044
|
-
ref: l,
|
|
1045
|
-
className: cn(menuVariants({ size: r, open: !1 })),
|
|
1046
|
-
style: {
|
|
1047
|
-
position: "absolute",
|
|
1048
|
-
visibility: "hidden",
|
|
1049
|
-
opacity: 0,
|
|
1050
|
-
pointerEvents: "none"
|
|
1051
|
-
},
|
|
1052
|
-
role: "menu",
|
|
1053
|
-
"aria-hidden": !0,
|
|
1054
|
-
children: s
|
|
1055
|
-
}
|
|
1056
|
-
),
|
|
1057
|
-
c.isReady && /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: c.position === "fixed" ? /* @__PURE__ */ jsxRuntimeExports.jsx(OverlayPortal, { children: b }) : b })
|
|
1058
|
-
] })
|
|
1059
|
-
] });
|
|
1060
1483
|
}, Menu = Object.assign(MenuRoot, {
|
|
1061
1484
|
Content: MenuContent,
|
|
1062
1485
|
Item: MenuItem
|
|
@@ -1070,7 +1493,7 @@ function getIconColorFromVariant(e = "primary") {
|
|
|
1070
1493
|
case "outline":
|
|
1071
1494
|
return "ghost";
|
|
1072
1495
|
default:
|
|
1073
|
-
return "
|
|
1496
|
+
return "white";
|
|
1074
1497
|
}
|
|
1075
1498
|
if (t?.[1] === "outline") return "inherit";
|
|
1076
1499
|
switch (t[0]) {
|
|
@@ -1149,73 +1572,35 @@ const buttonIconVariants = cva(
|
|
|
1149
1572
|
shape: "rounded"
|
|
1150
1573
|
}
|
|
1151
1574
|
}
|
|
1152
|
-
),
|
|
1153
|
-
variants: {
|
|
1154
|
-
size: {
|
|
1155
|
-
xs: "w-3 h-3",
|
|
1156
|
-
sm: "w-4 h-4",
|
|
1157
|
-
md: "w-5 h-5",
|
|
1158
|
-
lg: "w-6 h-6",
|
|
1159
|
-
xl: "w-8 h-8"
|
|
1160
|
-
},
|
|
1161
|
-
color: {
|
|
1162
|
-
primary: "text-primary",
|
|
1163
|
-
secondary: "text-secondary",
|
|
1164
|
-
tertiary: "text-tertiary",
|
|
1165
|
-
ghost: "text-ghost",
|
|
1166
|
-
neutral: "text-neutral",
|
|
1167
|
-
success: "text-success",
|
|
1168
|
-
info: "text-info",
|
|
1169
|
-
warning: "text-warning",
|
|
1170
|
-
danger: "text-danger",
|
|
1171
|
-
gray: "text-gray-500",
|
|
1172
|
-
black: "text-black",
|
|
1173
|
-
white: "text-white",
|
|
1174
|
-
inherit: ""
|
|
1175
|
-
}
|
|
1176
|
-
},
|
|
1177
|
-
defaultVariants: {
|
|
1178
|
-
size: "md",
|
|
1179
|
-
color: "primary"
|
|
1180
|
-
}
|
|
1181
|
-
}), Icon = React__default.forwardRef(function({ as: t, color: r = "primary", size: s = "md", className: i, ...o }, n) {
|
|
1182
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1183
|
-
t,
|
|
1184
|
-
{
|
|
1185
|
-
ref: n,
|
|
1186
|
-
className: iconVariants({ color: r, size: s, className: i }),
|
|
1187
|
-
...o
|
|
1188
|
-
}
|
|
1189
|
-
);
|
|
1190
|
-
}), ButtonIcon = React__default.forwardRef(
|
|
1575
|
+
), ButtonIcon = React__default.forwardRef(
|
|
1191
1576
|
function({
|
|
1192
1577
|
className: t,
|
|
1193
1578
|
variant: r = "primary",
|
|
1194
|
-
size:
|
|
1195
|
-
shape:
|
|
1579
|
+
size: i = "md",
|
|
1580
|
+
shape: s = "rounded",
|
|
1196
1581
|
disabled: o = !1,
|
|
1197
1582
|
as: n,
|
|
1198
|
-
"aria-label":
|
|
1199
|
-
...
|
|
1200
|
-
},
|
|
1583
|
+
"aria-label": l,
|
|
1584
|
+
...u
|
|
1585
|
+
}, c) {
|
|
1201
1586
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1202
1587
|
"button",
|
|
1203
1588
|
{
|
|
1204
|
-
ref:
|
|
1589
|
+
ref: c,
|
|
1205
1590
|
type: "button",
|
|
1206
1591
|
className: cn(
|
|
1207
1592
|
buttonIconVariants({
|
|
1208
1593
|
variant: r,
|
|
1209
|
-
size:
|
|
1210
|
-
shape:
|
|
1594
|
+
size: i,
|
|
1595
|
+
shape: s
|
|
1211
1596
|
}),
|
|
1212
1597
|
t
|
|
1213
1598
|
),
|
|
1214
1599
|
disabled: o,
|
|
1215
1600
|
"aria-disabled": o,
|
|
1216
|
-
"aria-label":
|
|
1601
|
+
"aria-label": l,
|
|
1217
1602
|
inert: o ? !0 : void 0,
|
|
1218
|
-
...
|
|
1603
|
+
...u,
|
|
1219
1604
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1220
1605
|
Icon,
|
|
1221
1606
|
{
|
|
@@ -1231,31 +1616,32 @@ const buttonIconVariants = cva(
|
|
|
1231
1616
|
(e, t) => {
|
|
1232
1617
|
const {
|
|
1233
1618
|
as: r = EllipsisVerticalIcon,
|
|
1234
|
-
children:
|
|
1235
|
-
onOpenChange:
|
|
1619
|
+
children: i,
|
|
1620
|
+
onOpenChange: s,
|
|
1236
1621
|
onClick: o,
|
|
1237
|
-
placement: n
|
|
1238
|
-
container:
|
|
1239
|
-
|
|
1240
|
-
|
|
1622
|
+
placement: n,
|
|
1623
|
+
container: l,
|
|
1624
|
+
preserve: u,
|
|
1625
|
+
...c
|
|
1626
|
+
} = e ?? {}, [f, a] = useState(!1);
|
|
1241
1627
|
useEffect(() => {
|
|
1242
|
-
|
|
1243
|
-
}, [
|
|
1244
|
-
const
|
|
1245
|
-
|
|
1246
|
-
},
|
|
1247
|
-
|
|
1628
|
+
s?.(f);
|
|
1629
|
+
}, [f, s]);
|
|
1630
|
+
const d = () => {
|
|
1631
|
+
a(!1);
|
|
1632
|
+
}, b = (v) => {
|
|
1633
|
+
a((j) => !j), o?.(v);
|
|
1248
1634
|
};
|
|
1249
1635
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1250
1636
|
Menu,
|
|
1251
1637
|
{
|
|
1252
|
-
isOpen:
|
|
1253
|
-
onOutsideClick:
|
|
1254
|
-
size: "md",
|
|
1638
|
+
isOpen: f,
|
|
1639
|
+
onOutsideClick: d,
|
|
1255
1640
|
placement: n,
|
|
1256
|
-
container:
|
|
1257
|
-
|
|
1258
|
-
|
|
1641
|
+
container: l,
|
|
1642
|
+
preserve: u,
|
|
1643
|
+
content: /* @__PURE__ */ jsxRuntimeExports.jsx(Menu.Content, { children: i }),
|
|
1644
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(ButtonIcon, { ref: t, as: r, onClick: b, ...c })
|
|
1259
1645
|
}
|
|
1260
1646
|
);
|
|
1261
1647
|
}
|
|
@@ -1329,64 +1715,64 @@ const buttonIconVariants = cva(
|
|
|
1329
1715
|
}
|
|
1330
1716
|
);
|
|
1331
1717
|
function useFloatingPosition(e, t = "1rem") {
|
|
1332
|
-
const r = useRef(null), [
|
|
1333
|
-
const
|
|
1334
|
-
if (!
|
|
1335
|
-
const
|
|
1718
|
+
const r = useRef(null), [i, s] = useState({}), [o, n] = useState("fixed bottom-4 right-4"), l = useCallback(() => {
|
|
1719
|
+
const c = r.current;
|
|
1720
|
+
if (!c) return;
|
|
1721
|
+
const a = c.getBoundingClientRect().height > window.innerHeight;
|
|
1336
1722
|
let d = {}, b = "";
|
|
1337
|
-
|
|
1723
|
+
a ? (d = {
|
|
1338
1724
|
position: "fixed",
|
|
1339
1725
|
bottom: t,
|
|
1340
1726
|
zIndex: 50,
|
|
1341
|
-
transform: `translateY(${
|
|
1727
|
+
transform: `translateY(${c.scrollTop}px)`
|
|
1342
1728
|
}, b = `fixed bottom-4 ${e}-4`) : (d = {
|
|
1343
1729
|
position: "fixed",
|
|
1344
1730
|
bottom: t,
|
|
1345
1731
|
zIndex: 50
|
|
1346
|
-
}, b = `fixed bottom-4 ${e}-4`),
|
|
1732
|
+
}, b = `fixed bottom-4 ${e}-4`), s(d), n(b);
|
|
1347
1733
|
}, [e, t]);
|
|
1348
1734
|
return useEffect(() => {
|
|
1349
|
-
|
|
1350
|
-
const
|
|
1351
|
-
return
|
|
1352
|
-
|
|
1735
|
+
l();
|
|
1736
|
+
const c = r.current;
|
|
1737
|
+
return c && c.addEventListener("scroll", l), window.addEventListener("resize", l), () => {
|
|
1738
|
+
c && c.removeEventListener("scroll", l), window.removeEventListener("resize", l);
|
|
1353
1739
|
};
|
|
1354
|
-
}, [
|
|
1355
|
-
r.current &&
|
|
1356
|
-
}, [e, t,
|
|
1357
|
-
(
|
|
1358
|
-
r.current =
|
|
1740
|
+
}, [l]), useEffect(() => {
|
|
1741
|
+
r.current && l();
|
|
1742
|
+
}, [e, t, l]), [useCallback(
|
|
1743
|
+
(c) => {
|
|
1744
|
+
r.current = c, c && l();
|
|
1359
1745
|
},
|
|
1360
|
-
[
|
|
1361
|
-
),
|
|
1746
|
+
[l]
|
|
1747
|
+
), i, o];
|
|
1362
1748
|
}
|
|
1363
1749
|
const ButtonFloat = forwardRef(
|
|
1364
1750
|
function({
|
|
1365
1751
|
className: t,
|
|
1366
1752
|
variant: r = "primary",
|
|
1367
|
-
size:
|
|
1368
|
-
side:
|
|
1753
|
+
size: i = "md",
|
|
1754
|
+
side: s = "right",
|
|
1369
1755
|
offset: o = "1rem",
|
|
1370
1756
|
...n
|
|
1371
|
-
},
|
|
1372
|
-
const [
|
|
1373
|
-
|
|
1757
|
+
}, l) {
|
|
1758
|
+
const [u, c, f] = useFloatingPosition(
|
|
1759
|
+
s,
|
|
1374
1760
|
o
|
|
1375
|
-
), [
|
|
1761
|
+
), [a, d] = useState(!1);
|
|
1376
1762
|
return useEffect(() => {
|
|
1377
1763
|
d(!0);
|
|
1378
|
-
}, []), /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref:
|
|
1764
|
+
}, []), /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: u, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1379
1765
|
"button",
|
|
1380
1766
|
{
|
|
1381
|
-
ref:
|
|
1767
|
+
ref: l,
|
|
1382
1768
|
type: n.type || "button",
|
|
1383
1769
|
className: cn(
|
|
1384
|
-
buttonFloatVariants({ variant: r, size:
|
|
1385
|
-
|
|
1386
|
-
|
|
1770
|
+
buttonFloatVariants({ variant: r, size: i }),
|
|
1771
|
+
f,
|
|
1772
|
+
a && "animate-fab-in",
|
|
1387
1773
|
t
|
|
1388
1774
|
),
|
|
1389
|
-
style:
|
|
1775
|
+
style: c,
|
|
1390
1776
|
...n
|
|
1391
1777
|
}
|
|
1392
1778
|
) });
|
|
@@ -1424,10 +1810,10 @@ const ButtonFloat = forwardRef(
|
|
|
1424
1810
|
disabled: !1
|
|
1425
1811
|
}
|
|
1426
1812
|
}
|
|
1427
|
-
), CalculatorButton = forwardRef(({ variant: e = "default", className: t, ...r },
|
|
1813
|
+
), CalculatorButton = forwardRef(({ variant: e = "default", className: t, ...r }, i) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1428
1814
|
"button",
|
|
1429
1815
|
{
|
|
1430
|
-
ref:
|
|
1816
|
+
ref: i,
|
|
1431
1817
|
type: "button",
|
|
1432
1818
|
className: cn(
|
|
1433
1819
|
calculatorButtonVariants({ variant: e, disabled: r.disabled }),
|
|
@@ -1506,10 +1892,10 @@ const BUTTONS = [
|
|
|
1506
1892
|
initialValue: e = "",
|
|
1507
1893
|
onChange: t,
|
|
1508
1894
|
disabled: r,
|
|
1509
|
-
className:
|
|
1510
|
-
"aria-label":
|
|
1895
|
+
className: i,
|
|
1896
|
+
"aria-label": s
|
|
1511
1897
|
}, o) => {
|
|
1512
|
-
const { input: n, inputRef:
|
|
1898
|
+
const { input: n, inputRef: l, handleButton: u, handleInput: c } = useCalculator({
|
|
1513
1899
|
initialValue: e,
|
|
1514
1900
|
disabled: r,
|
|
1515
1901
|
onChange: t
|
|
@@ -1518,30 +1904,30 @@ const BUTTONS = [
|
|
|
1518
1904
|
"div",
|
|
1519
1905
|
{
|
|
1520
1906
|
ref: o,
|
|
1521
|
-
className: cn(calculatorRootVariants({ disabled: r }),
|
|
1522
|
-
"aria-label":
|
|
1907
|
+
className: cn(calculatorRootVariants({ disabled: r }), i),
|
|
1908
|
+
"aria-label": s || "Calculator",
|
|
1523
1909
|
role: "region",
|
|
1524
1910
|
children: [
|
|
1525
1911
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1526
1912
|
"input",
|
|
1527
1913
|
{
|
|
1528
|
-
ref:
|
|
1914
|
+
ref: l,
|
|
1529
1915
|
className: "w-full mb-3 px-3 py-2 rounded border border-[var(--color-neutral)] bg-[var(--color-neutral-soft)] text-right text-xl font-mono focus:outline-none focus:ring-2 focus:ring-[var(--color-primary)]",
|
|
1530
1916
|
value: n,
|
|
1531
|
-
onChange:
|
|
1917
|
+
onChange: c,
|
|
1532
1918
|
disabled: r,
|
|
1533
1919
|
inputMode: "decimal",
|
|
1534
1920
|
"aria-label": "Calculator input"
|
|
1535
1921
|
}
|
|
1536
1922
|
),
|
|
1537
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-col gap-1 mb-3", children: BUTTONS.map((
|
|
1923
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-col gap-1 mb-3", children: BUTTONS.map((f, a) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex w-full", children: f.map((d) => d === "⌫" ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1538
1924
|
ButtonIcon,
|
|
1539
1925
|
{
|
|
1540
1926
|
as: X,
|
|
1541
1927
|
variant: "danger-ghost",
|
|
1542
1928
|
"aria-label": "Backspace",
|
|
1543
1929
|
size: "md",
|
|
1544
|
-
onClick: () =>
|
|
1930
|
+
onClick: () => u("⌫"),
|
|
1545
1931
|
disabled: r
|
|
1546
1932
|
},
|
|
1547
1933
|
"backspace"
|
|
@@ -1549,13 +1935,13 @@ const BUTTONS = [
|
|
|
1549
1935
|
CalculatorButton,
|
|
1550
1936
|
{
|
|
1551
1937
|
variant: d === "=" ? "action" : d === "C" ? "danger" : ["/", "*", "-", "+", "/"].includes(d) ? "operator" : "default",
|
|
1552
|
-
onClick: () =>
|
|
1938
|
+
onClick: () => u(d),
|
|
1553
1939
|
disabled: r,
|
|
1554
1940
|
"aria-label": d,
|
|
1555
1941
|
children: d
|
|
1556
1942
|
},
|
|
1557
1943
|
d
|
|
1558
|
-
)) },
|
|
1944
|
+
)) }, a)) })
|
|
1559
1945
|
]
|
|
1560
1946
|
}
|
|
1561
1947
|
);
|
|
@@ -1604,25 +1990,25 @@ const cardVariants = cva(
|
|
|
1604
1990
|
size: e = "md",
|
|
1605
1991
|
shape: t = "rounded",
|
|
1606
1992
|
avatar: r,
|
|
1607
|
-
title:
|
|
1608
|
-
subtitle:
|
|
1993
|
+
title: i,
|
|
1994
|
+
subtitle: s,
|
|
1609
1995
|
badge: o,
|
|
1610
1996
|
supplementaryInfo: n,
|
|
1611
|
-
bordered:
|
|
1612
|
-
className:
|
|
1613
|
-
...
|
|
1614
|
-
},
|
|
1997
|
+
bordered: l = !1,
|
|
1998
|
+
className: u,
|
|
1999
|
+
...c
|
|
2000
|
+
}, f) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1615
2001
|
"button",
|
|
1616
2002
|
{
|
|
1617
|
-
ref:
|
|
1618
|
-
className: cn(cardVariants({ size: e, shape: t, bordered:
|
|
1619
|
-
...
|
|
2003
|
+
ref: f,
|
|
2004
|
+
className: cn(cardVariants({ size: e, shape: t, bordered: l }), u),
|
|
2005
|
+
...c,
|
|
1620
2006
|
children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-start gap-4", children: [
|
|
1621
2007
|
r && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-shrink-0", children: r }),
|
|
1622
2008
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "w-full", children: [
|
|
1623
2009
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mb-2", children: [
|
|
1624
|
-
|
|
1625
|
-
|
|
2010
|
+
i && /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { as: "h3", fontSize: "base", fontWeight: "semibold", children: i }),
|
|
2011
|
+
s && /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { as: "p", fontSize: "sm", color: "gray", children: s })
|
|
1626
2012
|
] }),
|
|
1627
2013
|
(o || n) && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-between items-center", children: [
|
|
1628
2014
|
o,
|
|
@@ -1677,29 +2063,48 @@ const cardVariants = cva(
|
|
|
1677
2063
|
function e({
|
|
1678
2064
|
className: t,
|
|
1679
2065
|
variant: r = "neutral-outline",
|
|
1680
|
-
size:
|
|
1681
|
-
disabled:
|
|
2066
|
+
size: i = "md",
|
|
2067
|
+
disabled: s = !1,
|
|
1682
2068
|
children: o,
|
|
1683
2069
|
...n
|
|
1684
|
-
},
|
|
2070
|
+
}, l) {
|
|
1685
2071
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
1686
2072
|
"button",
|
|
1687
2073
|
{
|
|
1688
|
-
ref:
|
|
2074
|
+
ref: l,
|
|
1689
2075
|
type: "button",
|
|
1690
|
-
className: cn(filterChipVariants({ variant: r, size:
|
|
1691
|
-
disabled:
|
|
1692
|
-
"aria-disabled":
|
|
2076
|
+
className: cn(filterChipVariants({ variant: r, size: i }), t),
|
|
2077
|
+
disabled: s,
|
|
2078
|
+
"aria-disabled": s,
|
|
1693
2079
|
"aria-label": `${o}, removable`,
|
|
1694
|
-
inert:
|
|
2080
|
+
inert: s ? !0 : void 0,
|
|
1695
2081
|
...n,
|
|
1696
2082
|
children: [
|
|
1697
2083
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "flex-shrink-0", children: o }),
|
|
1698
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Icon, { as: XIcon, color: "inherit", size:
|
|
2084
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Icon, { as: XIcon, color: "inherit", size: i === "lg" ? "md" : "sm" })
|
|
1699
2085
|
]
|
|
1700
2086
|
}
|
|
1701
2087
|
);
|
|
1702
2088
|
}
|
|
2089
|
+
), hrVariants = cva("h-px w-full bg-border border-0", {
|
|
2090
|
+
variants: {
|
|
2091
|
+
hasMargin: {
|
|
2092
|
+
true: "mb-4",
|
|
2093
|
+
false: ""
|
|
2094
|
+
}
|
|
2095
|
+
},
|
|
2096
|
+
defaultVariants: {
|
|
2097
|
+
hasMargin: !1
|
|
2098
|
+
}
|
|
2099
|
+
}), Hr = forwardRef(
|
|
2100
|
+
({ hasMargin: e = !1, className: t, ...r }, i) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2101
|
+
"hr",
|
|
2102
|
+
{
|
|
2103
|
+
ref: i,
|
|
2104
|
+
className: cn(hrVariants({ hasMargin: e }), t),
|
|
2105
|
+
...r
|
|
2106
|
+
}
|
|
2107
|
+
)
|
|
1703
2108
|
), noResultsVariants = cva(
|
|
1704
2109
|
"flex flex-col items-center justify-center text-center border border-border rounded-lg bg-background",
|
|
1705
2110
|
{
|
|
@@ -1722,22 +2127,22 @@ const cardVariants = cva(
|
|
|
1722
2127
|
), noResultsHeaderVariants = cva(
|
|
1723
2128
|
"flex flex-row items-center gap-3 mb-2"
|
|
1724
2129
|
), NoResults = React__default.forwardRef(
|
|
1725
|
-
function e({ icon: t, title: r, subtitle:
|
|
2130
|
+
function e({ icon: t, title: r, subtitle: i, action: s, className: o, hasGrayBackground: n, ...l }, u) {
|
|
1726
2131
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
1727
2132
|
"section",
|
|
1728
2133
|
{
|
|
1729
|
-
ref:
|
|
2134
|
+
ref: u,
|
|
1730
2135
|
className: cn(noResultsVariants({ hasGrayBackground: n }), o),
|
|
1731
2136
|
role: "status",
|
|
1732
2137
|
"aria-label": "No results found",
|
|
1733
|
-
...
|
|
2138
|
+
...l,
|
|
1734
2139
|
children: [
|
|
1735
2140
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("header", { className: noResultsHeaderVariants(), children: [
|
|
1736
2141
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Icon, { as: t, size: "lg", color: "ghost", "aria-hidden": "true" }),
|
|
1737
2142
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Text, { as: "h2", fontSize: "lg", children: r })
|
|
1738
2143
|
] }),
|
|
1739
|
-
|
|
1740
|
-
|
|
2144
|
+
i && /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { as: "p", align: "center", color: "gray", className: "mb-4", children: i }),
|
|
2145
|
+
s && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { role: "group", "aria-label": "Available actions", children: s })
|
|
1741
2146
|
]
|
|
1742
2147
|
}
|
|
1743
2148
|
);
|
|
@@ -1812,20 +2217,20 @@ const getTableColumnClass = (e) => {
|
|
|
1812
2217
|
return "col-span-2";
|
|
1813
2218
|
}
|
|
1814
2219
|
}, TableHeader = forwardRef(
|
|
1815
|
-
({ children: e, className: t, ...r },
|
|
1816
|
-
const { columns:
|
|
2220
|
+
({ children: e, className: t, ...r }, i) => {
|
|
2221
|
+
const { columns: s } = useTableContext();
|
|
1817
2222
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1818
2223
|
"div",
|
|
1819
2224
|
{
|
|
1820
2225
|
role: "rowgroup",
|
|
1821
2226
|
className: cn("bg-neutral-soft", t),
|
|
1822
2227
|
...r,
|
|
1823
|
-
ref:
|
|
2228
|
+
ref: i,
|
|
1824
2229
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1825
2230
|
"div",
|
|
1826
2231
|
{
|
|
1827
2232
|
role: "row",
|
|
1828
|
-
className: cn("grid gap-4", getTableColumnClass(
|
|
2233
|
+
className: cn("grid gap-4", getTableColumnClass(s)),
|
|
1829
2234
|
children: e
|
|
1830
2235
|
}
|
|
1831
2236
|
)
|
|
@@ -1833,22 +2238,22 @@ const getTableColumnClass = (e) => {
|
|
|
1833
2238
|
);
|
|
1834
2239
|
}
|
|
1835
2240
|
), TableBody = forwardRef(
|
|
1836
|
-
({ children: e, className: t, ...r },
|
|
2241
|
+
({ children: e, className: t, ...r }, i) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { role: "rowgroup", ref: i, className: cn(t), ...r, children: e })
|
|
1837
2242
|
), TableFooter = forwardRef(
|
|
1838
|
-
({ children: e, className: t, ...r },
|
|
1839
|
-
const { columns:
|
|
2243
|
+
({ children: e, className: t, ...r }, i) => {
|
|
2244
|
+
const { columns: s } = useTableContext();
|
|
1840
2245
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1841
2246
|
"div",
|
|
1842
2247
|
{
|
|
1843
2248
|
role: "rowgroup",
|
|
1844
2249
|
className: cn("bg-neutral-soft", t),
|
|
1845
2250
|
...r,
|
|
1846
|
-
ref:
|
|
2251
|
+
ref: i,
|
|
1847
2252
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1848
2253
|
"div",
|
|
1849
2254
|
{
|
|
1850
2255
|
role: "row",
|
|
1851
|
-
className: cn("grid gap-4", getTableColumnClass(
|
|
2256
|
+
className: cn("grid gap-4", getTableColumnClass(s)),
|
|
1852
2257
|
children: e
|
|
1853
2258
|
}
|
|
1854
2259
|
)
|
|
@@ -1856,43 +2261,43 @@ const getTableColumnClass = (e) => {
|
|
|
1856
2261
|
);
|
|
1857
2262
|
}
|
|
1858
2263
|
), TableRow = forwardRef(
|
|
1859
|
-
({ children: e, className: t, ...r },
|
|
1860
|
-
const { columns:
|
|
2264
|
+
({ children: e, className: t, ...r }, i) => {
|
|
2265
|
+
const { columns: s } = useTableContext();
|
|
1861
2266
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1862
2267
|
"div",
|
|
1863
2268
|
{
|
|
1864
2269
|
role: "row",
|
|
1865
2270
|
className: cn(
|
|
1866
2271
|
"grid gap-4",
|
|
1867
|
-
getTableColumnClass(
|
|
2272
|
+
getTableColumnClass(s),
|
|
1868
2273
|
"border-b border-border last:border-0",
|
|
1869
2274
|
t
|
|
1870
2275
|
),
|
|
1871
|
-
ref:
|
|
2276
|
+
ref: i,
|
|
1872
2277
|
...r,
|
|
1873
2278
|
children: e
|
|
1874
2279
|
}
|
|
1875
2280
|
);
|
|
1876
2281
|
}
|
|
1877
2282
|
), TableColumn = forwardRef(
|
|
1878
|
-
({ as: e = "td", span: t, align: r = "left", children:
|
|
1879
|
-
const
|
|
1880
|
-
let
|
|
1881
|
-
return r === "center" ?
|
|
2283
|
+
({ as: e = "td", span: t, align: r = "left", children: i, className: s, ...o }, n) => {
|
|
2284
|
+
const l = e === "th" ? "columnheader" : "cell";
|
|
2285
|
+
let u = "text-left";
|
|
2286
|
+
return r === "center" ? u = "text-center" : r === "right" && (u = "text-right"), /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1882
2287
|
"div",
|
|
1883
2288
|
{
|
|
1884
2289
|
ref: n,
|
|
1885
|
-
role:
|
|
2290
|
+
role: l,
|
|
1886
2291
|
className: cn(
|
|
1887
2292
|
"px-4 py-2",
|
|
1888
2293
|
"[&:not(:last-child)]:border-r [&:not(:last-child)]:border-border",
|
|
1889
2294
|
getRowSpanClass(t),
|
|
1890
|
-
|
|
2295
|
+
u,
|
|
1891
2296
|
"truncate overflow-hidden whitespace-nowrap",
|
|
1892
|
-
|
|
2297
|
+
s
|
|
1893
2298
|
),
|
|
1894
2299
|
...o,
|
|
1895
|
-
children:
|
|
2300
|
+
children: i
|
|
1896
2301
|
}
|
|
1897
2302
|
);
|
|
1898
2303
|
}
|
|
@@ -1923,10 +2328,10 @@ const getTableColumnClass = (e) => {
|
|
|
1923
2328
|
}
|
|
1924
2329
|
)
|
|
1925
2330
|
), TableRoot = forwardRef(
|
|
1926
|
-
({ children: e, className: t, columns: r = 12, ...
|
|
2331
|
+
({ children: e, className: t, columns: r = 12, ...i }, s) => /* @__PURE__ */ jsxRuntimeExports.jsx(TableProvider, { value: { columns: r }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1927
2332
|
"div",
|
|
1928
2333
|
{
|
|
1929
|
-
ref:
|
|
2334
|
+
ref: s,
|
|
1930
2335
|
role: "table",
|
|
1931
2336
|
className: cn(
|
|
1932
2337
|
// Versaur design system: border, background, shadow, rounded, spacing
|
|
@@ -1936,7 +2341,7 @@ const getTableColumnClass = (e) => {
|
|
|
1936
2341
|
"transition-colors",
|
|
1937
2342
|
t
|
|
1938
2343
|
),
|
|
1939
|
-
...
|
|
2344
|
+
...i,
|
|
1940
2345
|
children: e
|
|
1941
2346
|
}
|
|
1942
2347
|
) })
|
|
@@ -1983,36 +2388,36 @@ const getTableColumnClass = (e) => {
|
|
|
1983
2388
|
}
|
|
1984
2389
|
}
|
|
1985
2390
|
), Tile = forwardRef(
|
|
1986
|
-
({ variant: e = "white", size: t = "md", shape: r = "rounded", className:
|
|
2391
|
+
({ variant: e = "white", size: t = "md", shape: r = "rounded", className: i, ...s }, o) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1987
2392
|
"div",
|
|
1988
2393
|
{
|
|
1989
2394
|
ref: o,
|
|
1990
|
-
className: cn(tileVariants({ variant: e, size: t, shape: r }),
|
|
1991
|
-
...
|
|
2395
|
+
className: cn(tileVariants({ variant: e, size: t, shape: r }), i),
|
|
2396
|
+
...s
|
|
1992
2397
|
}
|
|
1993
2398
|
)
|
|
1994
2399
|
);
|
|
1995
2400
|
function useImage({ src: e }) {
|
|
1996
|
-
const [t, r] = useState(!1), [
|
|
2401
|
+
const [t, r] = useState(!1), [i, s] = useState(!1), o = useRef(!1), n = () => {
|
|
1997
2402
|
r(!0);
|
|
1998
|
-
},
|
|
1999
|
-
|
|
2403
|
+
}, l = () => {
|
|
2404
|
+
s(!0);
|
|
2000
2405
|
};
|
|
2001
2406
|
return useEffect(() => {
|
|
2002
2407
|
if (!e) return;
|
|
2003
|
-
const
|
|
2004
|
-
return
|
|
2408
|
+
const u = new Image();
|
|
2409
|
+
return u.src = e, u.onload = () => {
|
|
2005
2410
|
o.current || r(!0);
|
|
2006
|
-
},
|
|
2007
|
-
o.current ||
|
|
2411
|
+
}, u.onerror = () => {
|
|
2412
|
+
o.current || s(!0);
|
|
2008
2413
|
}, () => {
|
|
2009
2414
|
o.current = !0;
|
|
2010
2415
|
};
|
|
2011
2416
|
}, [e]), {
|
|
2012
2417
|
loaded: t,
|
|
2013
|
-
errored:
|
|
2418
|
+
errored: i,
|
|
2014
2419
|
handleLoad: n,
|
|
2015
|
-
handleError:
|
|
2420
|
+
handleError: l
|
|
2016
2421
|
};
|
|
2017
2422
|
}
|
|
2018
2423
|
const imageVariants = cva("block object-cover", {
|
|
@@ -2072,14 +2477,14 @@ function BaseImageSkeleton({
|
|
|
2072
2477
|
className: e,
|
|
2073
2478
|
shape: t,
|
|
2074
2479
|
size: r,
|
|
2075
|
-
height:
|
|
2076
|
-
width:
|
|
2480
|
+
height: i,
|
|
2481
|
+
width: s
|
|
2077
2482
|
}) {
|
|
2078
2483
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2079
2484
|
Skeleton,
|
|
2080
2485
|
{
|
|
2081
2486
|
className: cn(imageAtomVariants({ shape: t, size: r }), e),
|
|
2082
|
-
style: { height:
|
|
2487
|
+
style: { height: i, width: s }
|
|
2083
2488
|
}
|
|
2084
2489
|
);
|
|
2085
2490
|
}
|
|
@@ -2087,16 +2492,16 @@ function BaseImageFallback({
|
|
|
2087
2492
|
alt: e,
|
|
2088
2493
|
width: t,
|
|
2089
2494
|
height: r,
|
|
2090
|
-
className:
|
|
2091
|
-
style:
|
|
2495
|
+
className: i,
|
|
2496
|
+
style: s,
|
|
2092
2497
|
shape: o,
|
|
2093
2498
|
size: n
|
|
2094
2499
|
}) {
|
|
2095
2500
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
2096
2501
|
"div",
|
|
2097
2502
|
{
|
|
2098
|
-
className: imageAtomVariants({ shape: o, size: n, className:
|
|
2099
|
-
style: { width: t, height: r, ...
|
|
2503
|
+
className: imageAtomVariants({ shape: o, size: n, className: i }),
|
|
2504
|
+
style: { width: t, height: r, ...s },
|
|
2100
2505
|
"aria-label": e,
|
|
2101
2506
|
role: "img",
|
|
2102
2507
|
children: [
|
|
@@ -2118,33 +2523,33 @@ const BaseImage = forwardRef(
|
|
|
2118
2523
|
src: e,
|
|
2119
2524
|
alt: t,
|
|
2120
2525
|
onLoad: r,
|
|
2121
|
-
onError:
|
|
2122
|
-
width:
|
|
2526
|
+
onError: i,
|
|
2527
|
+
width: s,
|
|
2123
2528
|
height: o,
|
|
2124
2529
|
loading: n = "lazy",
|
|
2125
|
-
position:
|
|
2126
|
-
size:
|
|
2127
|
-
shape:
|
|
2128
|
-
className:
|
|
2129
|
-
...
|
|
2530
|
+
position: l = "cover",
|
|
2531
|
+
size: u = "auto",
|
|
2532
|
+
shape: c,
|
|
2533
|
+
className: f,
|
|
2534
|
+
...a
|
|
2130
2535
|
}, d) => {
|
|
2131
|
-
const { loaded: b, errored:
|
|
2536
|
+
const { loaded: b, errored: v, handleLoad: j, handleError: w } = useImage({
|
|
2132
2537
|
src: e
|
|
2133
|
-
}),
|
|
2134
|
-
return !b && !
|
|
2538
|
+
}), R = typeof s == "number" ? s : Number(s), E = typeof o == "number" ? o : Number(o);
|
|
2539
|
+
return !b && !v ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2135
2540
|
BaseImageSkeleton,
|
|
2136
2541
|
{
|
|
2137
|
-
shape:
|
|
2138
|
-
width:
|
|
2139
|
-
height:
|
|
2542
|
+
shape: c,
|
|
2543
|
+
width: R,
|
|
2544
|
+
height: E
|
|
2140
2545
|
}
|
|
2141
|
-
) :
|
|
2546
|
+
) : v ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2142
2547
|
BaseImageFallback,
|
|
2143
2548
|
{
|
|
2144
|
-
shape:
|
|
2549
|
+
shape: c,
|
|
2145
2550
|
alt: t,
|
|
2146
|
-
width:
|
|
2147
|
-
height:
|
|
2551
|
+
width: R,
|
|
2552
|
+
height: E
|
|
2148
2553
|
}
|
|
2149
2554
|
) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2150
2555
|
"img",
|
|
@@ -2152,53 +2557,55 @@ const BaseImage = forwardRef(
|
|
|
2152
2557
|
ref: d,
|
|
2153
2558
|
src: e,
|
|
2154
2559
|
alt: t,
|
|
2155
|
-
width:
|
|
2156
|
-
height:
|
|
2560
|
+
width: R,
|
|
2561
|
+
height: E,
|
|
2157
2562
|
loading: n,
|
|
2158
2563
|
className: cn(
|
|
2159
2564
|
imageVariants({
|
|
2160
|
-
position:
|
|
2161
|
-
size:
|
|
2162
|
-
shape:
|
|
2565
|
+
position: l,
|
|
2566
|
+
size: u,
|
|
2567
|
+
shape: c
|
|
2163
2568
|
}),
|
|
2164
|
-
|
|
2569
|
+
f
|
|
2165
2570
|
),
|
|
2166
|
-
onLoad: (
|
|
2167
|
-
|
|
2571
|
+
onLoad: (C) => {
|
|
2572
|
+
j(), r?.(C);
|
|
2168
2573
|
},
|
|
2169
|
-
onError: (
|
|
2170
|
-
|
|
2574
|
+
onError: (C) => {
|
|
2575
|
+
w(), i?.(C);
|
|
2171
2576
|
},
|
|
2172
|
-
...
|
|
2577
|
+
...a
|
|
2173
2578
|
}
|
|
2174
2579
|
);
|
|
2175
2580
|
}
|
|
2176
2581
|
), ImageCircle = forwardRef((e, t) => /* @__PURE__ */ jsxRuntimeExports.jsx(BaseImage, { ref: t, ...e, shape: "circle" })), ImageSquare = forwardRef((e, t) => /* @__PURE__ */ jsxRuntimeExports.jsx(BaseImage, { ref: t, ...e, shape: "square" })), ImageRectangle = forwardRef((e, t) => /* @__PURE__ */ jsxRuntimeExports.jsx(BaseImage, { ref: t, ...e, shape: "rectangle" }));
|
|
2177
2582
|
export {
|
|
2178
|
-
|
|
2583
|
+
Accordion as A,
|
|
2179
2584
|
Badge as B,
|
|
2180
2585
|
Calculator as C,
|
|
2181
2586
|
FilterChip as F,
|
|
2587
|
+
Heading as H,
|
|
2182
2588
|
Icon as I,
|
|
2183
2589
|
Menu as M,
|
|
2184
2590
|
NoResults as N,
|
|
2185
2591
|
OverlayPortal as O,
|
|
2186
2592
|
Table as T,
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2593
|
+
Alert as a,
|
|
2594
|
+
Anchor as b,
|
|
2595
|
+
Attribute as c,
|
|
2596
|
+
AttributeList as d,
|
|
2597
|
+
Avatar as e,
|
|
2598
|
+
Brand as f,
|
|
2599
|
+
Button as g,
|
|
2600
|
+
ButtonMenuIcon as h,
|
|
2601
|
+
ButtonFloat as i,
|
|
2602
|
+
ButtonIcon as j,
|
|
2603
|
+
Card as k,
|
|
2604
|
+
Hr as l,
|
|
2605
|
+
Text as m,
|
|
2606
|
+
Tile as n,
|
|
2607
|
+
ImageCircle as o,
|
|
2608
|
+
ImageSquare as p,
|
|
2609
|
+
ImageRectangle as q,
|
|
2610
|
+
BaseImage as r
|
|
2204
2611
|
};
|