@usevyre/react 1.0.2 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/components/ButtonGroup/ButtonGroup.d.ts +50 -0
- package/dist/components/Combobox/Combobox.d.ts +66 -0
- package/dist/components/DataGrid/DataGrid.d.ts +66 -0
- package/dist/components/Tag/Tag.d.ts +41 -0
- package/dist/components/Tag/TagGroup.d.ts +34 -0
- package/dist/components/TagsInput/TagsInput.d.ts +51 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +18 -0
- package/dist/index.js +1515 -1052
- package/dist/styles/components.css +508 -4
- package/package.json +15 -27
package/dist/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
function
|
|
1
|
+
import { jsxs as x, jsx as n, Fragment as de } from "react/jsx-runtime";
|
|
2
|
+
import g, { useRef as B, useCallback as D, useEffect as $, createContext as ee, useReducer as Ee, useContext as U, useState as E, useId as te, useMemo as oe } from "react";
|
|
3
|
+
import G from "react-dom";
|
|
4
|
+
function y(...e) {
|
|
5
5
|
const r = [];
|
|
6
6
|
for (const t of e)
|
|
7
7
|
if (t) {
|
|
8
8
|
if (typeof t == "string")
|
|
9
9
|
r.push(t);
|
|
10
10
|
else if (Array.isArray(t)) {
|
|
11
|
-
const a =
|
|
11
|
+
const a = y(...t);
|
|
12
12
|
a && r.push(a);
|
|
13
13
|
} else if (typeof t == "object")
|
|
14
14
|
for (const [a, o] of Object.entries(t))
|
|
@@ -16,19 +16,19 @@ function u(...e) {
|
|
|
16
16
|
}
|
|
17
17
|
return r.join(" ");
|
|
18
18
|
}
|
|
19
|
-
const
|
|
19
|
+
const Ae = {
|
|
20
20
|
primary: "vyre-btn--primary",
|
|
21
21
|
secondary: "vyre-btn--secondary",
|
|
22
22
|
ghost: "vyre-btn--ghost",
|
|
23
23
|
accent: "vyre-btn--accent",
|
|
24
24
|
teal: "vyre-btn--teal",
|
|
25
25
|
danger: "vyre-btn--danger"
|
|
26
|
-
},
|
|
26
|
+
}, Be = {
|
|
27
27
|
sm: "vyre-btn--sm",
|
|
28
28
|
md: "vyre-btn--md",
|
|
29
29
|
lg: "vyre-btn--lg",
|
|
30
30
|
icon: "vyre-btn--icon"
|
|
31
|
-
},
|
|
31
|
+
}, Ve = g.forwardRef(
|
|
32
32
|
({
|
|
33
33
|
variant: e = "secondary",
|
|
34
34
|
size: r = "md",
|
|
@@ -37,39 +37,39 @@ const Ee = {
|
|
|
37
37
|
leftIcon: o,
|
|
38
38
|
rightIcon: i,
|
|
39
39
|
className: d,
|
|
40
|
-
children:
|
|
41
|
-
as:
|
|
42
|
-
...
|
|
43
|
-
},
|
|
40
|
+
children: l,
|
|
41
|
+
as: c = "button",
|
|
42
|
+
...f
|
|
43
|
+
}, u) => {
|
|
44
44
|
const v = a || t;
|
|
45
|
-
return /* @__PURE__ */
|
|
46
|
-
|
|
45
|
+
return /* @__PURE__ */ x(
|
|
46
|
+
c,
|
|
47
47
|
{
|
|
48
|
-
ref:
|
|
49
|
-
className:
|
|
48
|
+
ref: u,
|
|
49
|
+
className: y(
|
|
50
50
|
"vyre-btn",
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
Ae[e],
|
|
52
|
+
Be[r],
|
|
53
53
|
t && "vyre-btn--loading",
|
|
54
54
|
d
|
|
55
55
|
),
|
|
56
|
-
disabled:
|
|
56
|
+
disabled: c === "button" ? v : void 0,
|
|
57
57
|
"aria-disabled": v,
|
|
58
58
|
"data-variant": e,
|
|
59
59
|
"data-size": r,
|
|
60
|
-
...
|
|
60
|
+
...f,
|
|
61
61
|
children: [
|
|
62
|
-
t && /* @__PURE__ */ n("span", { className: "vyre-btn__spinner", "aria-hidden": "true", children: /* @__PURE__ */ n(
|
|
62
|
+
t && /* @__PURE__ */ n("span", { className: "vyre-btn__spinner", "aria-hidden": "true", children: /* @__PURE__ */ n($e, {}) }),
|
|
63
63
|
!t && o && /* @__PURE__ */ n("span", { className: "vyre-btn__icon vyre-btn__icon--left", "aria-hidden": "true", children: o }),
|
|
64
|
-
|
|
64
|
+
l && /* @__PURE__ */ n("span", { className: "vyre-btn__label", children: l }),
|
|
65
65
|
i && /* @__PURE__ */ n("span", { className: "vyre-btn__icon vyre-btn__icon--right", "aria-hidden": "true", children: i })
|
|
66
66
|
]
|
|
67
67
|
}
|
|
68
68
|
);
|
|
69
69
|
}
|
|
70
70
|
);
|
|
71
|
-
|
|
72
|
-
function
|
|
71
|
+
Ve.displayName = "VyreButton";
|
|
72
|
+
function $e() {
|
|
73
73
|
return /* @__PURE__ */ n(
|
|
74
74
|
"svg",
|
|
75
75
|
{
|
|
@@ -96,12 +96,12 @@ function Be() {
|
|
|
96
96
|
}
|
|
97
97
|
);
|
|
98
98
|
}
|
|
99
|
-
const
|
|
100
|
-
({ variant: e = "default", dot: r = !1, className: t, children: a, ...o }, i) => /* @__PURE__ */
|
|
99
|
+
const We = g.forwardRef(
|
|
100
|
+
({ variant: e = "default", dot: r = !1, className: t, children: a, ...o }, i) => /* @__PURE__ */ x(
|
|
101
101
|
"span",
|
|
102
102
|
{
|
|
103
103
|
ref: i,
|
|
104
|
-
className:
|
|
104
|
+
className: y("vyre-badge", `vyre-badge--${e}`, t),
|
|
105
105
|
"data-variant": e,
|
|
106
106
|
...o,
|
|
107
107
|
children: [
|
|
@@ -111,8 +111,8 @@ const Ve = p.forwardRef(
|
|
|
111
111
|
}
|
|
112
112
|
)
|
|
113
113
|
);
|
|
114
|
-
|
|
115
|
-
const
|
|
114
|
+
We.displayName = "VyreBadge";
|
|
115
|
+
const je = g.forwardRef(
|
|
116
116
|
({
|
|
117
117
|
variant: e = "default",
|
|
118
118
|
hoverable: r = !1,
|
|
@@ -124,7 +124,7 @@ const $e = p.forwardRef(
|
|
|
124
124
|
"div",
|
|
125
125
|
{
|
|
126
126
|
ref: d,
|
|
127
|
-
className:
|
|
127
|
+
className: y(
|
|
128
128
|
"vyre-card",
|
|
129
129
|
`vyre-card--${e}`,
|
|
130
130
|
r && "vyre-card--hoverable",
|
|
@@ -139,20 +139,20 @@ const $e = p.forwardRef(
|
|
|
139
139
|
}
|
|
140
140
|
)
|
|
141
141
|
);
|
|
142
|
-
|
|
143
|
-
const
|
|
144
|
-
({ className: e, children: r, ...t }, a) => /* @__PURE__ */ n("div", { ref: a, className:
|
|
142
|
+
je.displayName = "VyreCard";
|
|
143
|
+
const He = g.forwardRef(
|
|
144
|
+
({ className: e, children: r, ...t }, a) => /* @__PURE__ */ n("div", { ref: a, className: y("vyre-card__header", e), ...t, children: r })
|
|
145
145
|
);
|
|
146
|
-
|
|
147
|
-
const
|
|
148
|
-
({ className: e, children: r, ...t }, a) => /* @__PURE__ */ n("div", { ref: a, className:
|
|
146
|
+
He.displayName = "VyreCardHeader";
|
|
147
|
+
const Fe = g.forwardRef(
|
|
148
|
+
({ className: e, children: r, ...t }, a) => /* @__PURE__ */ n("div", { ref: a, className: y("vyre-card__body", e), ...t, children: r })
|
|
149
149
|
);
|
|
150
|
-
|
|
151
|
-
const
|
|
152
|
-
({ className: e, children: r, ...t }, a) => /* @__PURE__ */ n("div", { ref: a, className:
|
|
150
|
+
Fe.displayName = "VyreCardBody";
|
|
151
|
+
const Oe = g.forwardRef(
|
|
152
|
+
({ className: e, children: r, ...t }, a) => /* @__PURE__ */ n("div", { ref: a, className: y("vyre-card__footer", e), ...t, children: r })
|
|
153
153
|
);
|
|
154
|
-
|
|
155
|
-
const
|
|
154
|
+
Oe.displayName = "VyreCardFooter";
|
|
155
|
+
const Ke = g.forwardRef(
|
|
156
156
|
({
|
|
157
157
|
label: e,
|
|
158
158
|
hint: r,
|
|
@@ -161,16 +161,16 @@ const Fe = p.forwardRef(
|
|
|
161
161
|
htmlFor: o,
|
|
162
162
|
className: i,
|
|
163
163
|
children: d,
|
|
164
|
-
...
|
|
165
|
-
},
|
|
164
|
+
...l
|
|
165
|
+
}, c) => /* @__PURE__ */ x(
|
|
166
166
|
"div",
|
|
167
167
|
{
|
|
168
|
-
ref:
|
|
169
|
-
className:
|
|
168
|
+
ref: c,
|
|
169
|
+
className: y("vyre-field", t !== "idle" && `vyre-field--${t}`, i),
|
|
170
170
|
"data-state": t,
|
|
171
|
-
...
|
|
171
|
+
...l,
|
|
172
172
|
children: [
|
|
173
|
-
e && /* @__PURE__ */
|
|
173
|
+
e && /* @__PURE__ */ x("label", { className: "vyre-field__label", htmlFor: o, children: [
|
|
174
174
|
e,
|
|
175
175
|
a && /* @__PURE__ */ n("span", { className: "vyre-field__required", "aria-label": "required", children: "*" })
|
|
176
176
|
] }),
|
|
@@ -180,21 +180,21 @@ const Fe = p.forwardRef(
|
|
|
180
180
|
}
|
|
181
181
|
)
|
|
182
182
|
);
|
|
183
|
-
|
|
184
|
-
const
|
|
183
|
+
Ke.displayName = "VyreField";
|
|
184
|
+
const qe = g.forwardRef(
|
|
185
185
|
({
|
|
186
186
|
size: e = "md",
|
|
187
187
|
leftElement: r,
|
|
188
188
|
rightElement: t,
|
|
189
189
|
className: a,
|
|
190
190
|
...o
|
|
191
|
-
}, i) => r || t ? /* @__PURE__ */
|
|
191
|
+
}, i) => r || t ? /* @__PURE__ */ x("div", { className: y("vyre-input-wrapper", `vyre-input-wrapper--${e}`), children: [
|
|
192
192
|
r && /* @__PURE__ */ n("span", { className: "vyre-input__element vyre-input__element--left", "aria-hidden": "true", children: r }),
|
|
193
193
|
/* @__PURE__ */ n(
|
|
194
194
|
"input",
|
|
195
195
|
{
|
|
196
196
|
ref: i,
|
|
197
|
-
className:
|
|
197
|
+
className: y(
|
|
198
198
|
"vyre-input",
|
|
199
199
|
`vyre-input--${e}`,
|
|
200
200
|
!!r && "vyre-input--has-left",
|
|
@@ -209,32 +209,32 @@ const Oe = p.forwardRef(
|
|
|
209
209
|
"input",
|
|
210
210
|
{
|
|
211
211
|
ref: i,
|
|
212
|
-
className:
|
|
212
|
+
className: y("vyre-input", `vyre-input--${e}`, a),
|
|
213
213
|
...o
|
|
214
214
|
}
|
|
215
215
|
)
|
|
216
216
|
);
|
|
217
|
-
|
|
218
|
-
const
|
|
217
|
+
qe.displayName = "VyreInput";
|
|
218
|
+
const Pe = g.forwardRef(
|
|
219
219
|
({ size: e = "md", resize: r = "vertical", className: t, style: a, ...o }, i) => /* @__PURE__ */ n(
|
|
220
220
|
"textarea",
|
|
221
221
|
{
|
|
222
222
|
ref: i,
|
|
223
|
-
className:
|
|
223
|
+
className: y("vyre-textarea", `vyre-textarea--${e}`, t),
|
|
224
224
|
style: { resize: r, ...a },
|
|
225
225
|
...o
|
|
226
226
|
}
|
|
227
227
|
)
|
|
228
228
|
);
|
|
229
|
-
|
|
230
|
-
const
|
|
229
|
+
Pe.displayName = "VyreTextarea";
|
|
230
|
+
const Ge = [
|
|
231
231
|
"a[href]",
|
|
232
232
|
"button:not([disabled])",
|
|
233
233
|
"textarea:not([disabled])",
|
|
234
234
|
"input:not([disabled])",
|
|
235
235
|
"select:not([disabled])",
|
|
236
236
|
'[tabindex]:not([tabindex="-1"])'
|
|
237
|
-
].join(","),
|
|
237
|
+
].join(","), Ye = g.forwardRef(
|
|
238
238
|
({
|
|
239
239
|
open: e,
|
|
240
240
|
onClose: r,
|
|
@@ -243,64 +243,64 @@ const qe = [
|
|
|
243
243
|
closeOnEsc: o = !0,
|
|
244
244
|
initialFocus: i,
|
|
245
245
|
className: d,
|
|
246
|
-
children:
|
|
247
|
-
"aria-label":
|
|
248
|
-
"aria-labelledby":
|
|
249
|
-
...
|
|
246
|
+
children: l,
|
|
247
|
+
"aria-label": c,
|
|
248
|
+
"aria-labelledby": f,
|
|
249
|
+
...u
|
|
250
250
|
}, v) => {
|
|
251
|
-
const
|
|
252
|
-
(
|
|
253
|
-
|
|
251
|
+
const h = B(null), _ = B(null), s = D(
|
|
252
|
+
(b) => {
|
|
253
|
+
h.current = b, typeof v == "function" ? v(b) : v && (v.current = b);
|
|
254
254
|
},
|
|
255
255
|
[v]
|
|
256
|
-
), m =
|
|
257
|
-
if (
|
|
258
|
-
const
|
|
259
|
-
if (!
|
|
260
|
-
const
|
|
261
|
-
if (!
|
|
262
|
-
const
|
|
263
|
-
|
|
264
|
-
}, []),
|
|
265
|
-
(
|
|
266
|
-
|
|
256
|
+
), m = D((b) => {
|
|
257
|
+
if (b.key !== "Tab") return;
|
|
258
|
+
const C = h.current;
|
|
259
|
+
if (!C) return;
|
|
260
|
+
const k = Array.from(C.querySelectorAll(Ge));
|
|
261
|
+
if (!k.length) return;
|
|
262
|
+
const T = k[0], V = k[k.length - 1];
|
|
263
|
+
b.shiftKey && document.activeElement === T ? (b.preventDefault(), V.focus()) : !b.shiftKey && document.activeElement === V && (b.preventDefault(), T.focus());
|
|
264
|
+
}, []), p = D(
|
|
265
|
+
(b) => {
|
|
266
|
+
b.key === "Escape" && o && r();
|
|
267
267
|
},
|
|
268
268
|
[o, r]
|
|
269
269
|
);
|
|
270
|
-
return
|
|
270
|
+
return $(() => {
|
|
271
271
|
if (!e) return;
|
|
272
|
-
document.addEventListener("keydown",
|
|
273
|
-
const
|
|
272
|
+
document.addEventListener("keydown", p), document.addEventListener("keydown", m);
|
|
273
|
+
const b = document.body.style.overflow;
|
|
274
274
|
document.body.style.overflow = "hidden";
|
|
275
|
-
const
|
|
276
|
-
var
|
|
277
|
-
i != null && i.current ? i.current.focus() : (
|
|
275
|
+
const C = setTimeout(() => {
|
|
276
|
+
var k;
|
|
277
|
+
i != null && i.current ? i.current.focus() : (k = h.current) == null || k.focus();
|
|
278
278
|
}, 0);
|
|
279
279
|
return () => {
|
|
280
|
-
document.removeEventListener("keydown",
|
|
280
|
+
document.removeEventListener("keydown", p), document.removeEventListener("keydown", m), document.body.style.overflow = b, clearTimeout(C);
|
|
281
281
|
};
|
|
282
|
-
}, [e,
|
|
282
|
+
}, [e, p, m, i]), e ? G.createPortal(
|
|
283
283
|
/* @__PURE__ */ n(
|
|
284
284
|
"div",
|
|
285
285
|
{
|
|
286
286
|
ref: _,
|
|
287
287
|
className: "vyre-modal-backdrop",
|
|
288
|
-
onClick: (
|
|
289
|
-
a &&
|
|
288
|
+
onClick: (b) => {
|
|
289
|
+
a && b.target === _.current && r();
|
|
290
290
|
},
|
|
291
291
|
role: "presentation",
|
|
292
292
|
children: /* @__PURE__ */ n(
|
|
293
293
|
"div",
|
|
294
294
|
{
|
|
295
|
-
ref:
|
|
296
|
-
className:
|
|
295
|
+
ref: s,
|
|
296
|
+
className: y("vyre-modal", `vyre-modal--${t}`, d),
|
|
297
297
|
role: "dialog",
|
|
298
298
|
"aria-modal": "true",
|
|
299
|
-
"aria-label":
|
|
300
|
-
"aria-labelledby":
|
|
299
|
+
"aria-label": c,
|
|
300
|
+
"aria-labelledby": f,
|
|
301
301
|
tabIndex: -1,
|
|
302
|
-
...
|
|
303
|
-
children:
|
|
302
|
+
...u,
|
|
303
|
+
children: l
|
|
304
304
|
}
|
|
305
305
|
)
|
|
306
306
|
}
|
|
@@ -309,21 +309,21 @@ const qe = [
|
|
|
309
309
|
) : null;
|
|
310
310
|
}
|
|
311
311
|
);
|
|
312
|
-
|
|
313
|
-
const
|
|
314
|
-
({ className: e, children: r, ...t }, a) => /* @__PURE__ */ n("div", { ref: a, className:
|
|
312
|
+
Ye.displayName = "VyreModal";
|
|
313
|
+
const Ue = g.forwardRef(
|
|
314
|
+
({ className: e, children: r, ...t }, a) => /* @__PURE__ */ n("div", { ref: a, className: y("vyre-modal__header", e), ...t, children: r })
|
|
315
315
|
);
|
|
316
|
-
|
|
317
|
-
const
|
|
318
|
-
({ className: e, children: r, ...t }, a) => /* @__PURE__ */ n("div", { ref: a, className:
|
|
316
|
+
Ue.displayName = "VyreModalHeader";
|
|
317
|
+
const Xe = g.forwardRef(
|
|
318
|
+
({ className: e, children: r, ...t }, a) => /* @__PURE__ */ n("div", { ref: a, className: y("vyre-modal__body", e), ...t, children: r })
|
|
319
319
|
);
|
|
320
|
-
|
|
321
|
-
const
|
|
322
|
-
({ className: e, children: r, ...t }, a) => /* @__PURE__ */ n("div", { ref: a, className:
|
|
320
|
+
Xe.displayName = "VyreModalBody";
|
|
321
|
+
const ze = g.forwardRef(
|
|
322
|
+
({ className: e, children: r, ...t }, a) => /* @__PURE__ */ n("div", { ref: a, className: y("vyre-modal__footer", e), ...t, children: r })
|
|
323
323
|
);
|
|
324
|
-
|
|
324
|
+
ze.displayName = "VyreModalFooter";
|
|
325
325
|
const _e = ee(null);
|
|
326
|
-
function
|
|
326
|
+
function Ze(e, r) {
|
|
327
327
|
switch (r.type) {
|
|
328
328
|
case "ADD":
|
|
329
329
|
return [...e, r.payload];
|
|
@@ -333,18 +333,18 @@ function Xe(e, r) {
|
|
|
333
333
|
return e;
|
|
334
334
|
}
|
|
335
335
|
}
|
|
336
|
-
let
|
|
337
|
-
const
|
|
338
|
-
function
|
|
339
|
-
const [r, t] =
|
|
340
|
-
const d =
|
|
336
|
+
let Je = 0;
|
|
337
|
+
const Qe = () => `vyre-t-${++Je}`;
|
|
338
|
+
function Qr({ children: e }) {
|
|
339
|
+
const [r, t] = Ee(Ze, []), a = D((i) => {
|
|
340
|
+
const d = Qe();
|
|
341
341
|
return t({ type: "ADD", payload: { ...i, id: d } }), d;
|
|
342
|
-
}, []), o =
|
|
342
|
+
}, []), o = D((i) => {
|
|
343
343
|
t({ type: "REMOVE", id: i });
|
|
344
344
|
}, []);
|
|
345
|
-
return /* @__PURE__ */
|
|
345
|
+
return /* @__PURE__ */ x(_e.Provider, { value: { toast: a, dismiss: o }, children: [
|
|
346
346
|
e,
|
|
347
|
-
typeof document < "u" &&
|
|
347
|
+
typeof document < "u" && G.createPortal(
|
|
348
348
|
/* @__PURE__ */ n(
|
|
349
349
|
"div",
|
|
350
350
|
{
|
|
@@ -352,37 +352,37 @@ function Pr({ children: e }) {
|
|
|
352
352
|
"aria-live": "polite",
|
|
353
353
|
"aria-atomic": "false",
|
|
354
354
|
"aria-label": "Notifications",
|
|
355
|
-
children: r.map((i) => /* @__PURE__ */ n(
|
|
355
|
+
children: r.map((i) => /* @__PURE__ */ n(et, { ...i, onDismiss: () => o(i.id) }, i.id))
|
|
356
356
|
}
|
|
357
357
|
),
|
|
358
358
|
document.body
|
|
359
359
|
)
|
|
360
360
|
] });
|
|
361
361
|
}
|
|
362
|
-
function
|
|
362
|
+
function en() {
|
|
363
363
|
const e = U(_e);
|
|
364
364
|
if (!e) throw new Error("useToast must be used inside <ToastProvider>");
|
|
365
365
|
return e;
|
|
366
366
|
}
|
|
367
|
-
function
|
|
367
|
+
function et({
|
|
368
368
|
title: e,
|
|
369
369
|
description: r,
|
|
370
370
|
variant: t = "default",
|
|
371
371
|
duration: a = 4e3,
|
|
372
372
|
onDismiss: o
|
|
373
373
|
}) {
|
|
374
|
-
return
|
|
374
|
+
return $(() => {
|
|
375
375
|
if (a === 1 / 0) return;
|
|
376
376
|
const i = setTimeout(o, a);
|
|
377
377
|
return () => clearTimeout(i);
|
|
378
|
-
}, [a, o]), /* @__PURE__ */
|
|
378
|
+
}, [a, o]), /* @__PURE__ */ x(
|
|
379
379
|
"div",
|
|
380
380
|
{
|
|
381
|
-
className:
|
|
381
|
+
className: y("vyre-toast", `vyre-toast--${t}`),
|
|
382
382
|
role: "alert",
|
|
383
383
|
"data-variant": t,
|
|
384
384
|
children: [
|
|
385
|
-
/* @__PURE__ */
|
|
385
|
+
/* @__PURE__ */ x("div", { className: "vyre-toast__content", children: [
|
|
386
386
|
e && /* @__PURE__ */ n("p", { className: "vyre-toast__title", children: e }),
|
|
387
387
|
r && /* @__PURE__ */ n("p", { className: "vyre-toast__description", children: r })
|
|
388
388
|
] }),
|
|
@@ -393,14 +393,14 @@ function Je({
|
|
|
393
393
|
onClick: o,
|
|
394
394
|
"aria-label": "Dismiss notification",
|
|
395
395
|
type: "button",
|
|
396
|
-
children: /* @__PURE__ */ n(
|
|
396
|
+
children: /* @__PURE__ */ n(tt, {})
|
|
397
397
|
}
|
|
398
398
|
)
|
|
399
399
|
]
|
|
400
400
|
}
|
|
401
401
|
);
|
|
402
402
|
}
|
|
403
|
-
function
|
|
403
|
+
function tt() {
|
|
404
404
|
return /* @__PURE__ */ n(
|
|
405
405
|
"svg",
|
|
406
406
|
{
|
|
@@ -421,7 +421,7 @@ function Qe() {
|
|
|
421
421
|
}
|
|
422
422
|
);
|
|
423
423
|
}
|
|
424
|
-
const
|
|
424
|
+
const rt = g.forwardRef(
|
|
425
425
|
({
|
|
426
426
|
options: e,
|
|
427
427
|
value: r,
|
|
@@ -430,161 +430,161 @@ const et = p.forwardRef(
|
|
|
430
430
|
placeholder: o = "Select an option",
|
|
431
431
|
disabled: i = !1,
|
|
432
432
|
size: d = "md",
|
|
433
|
-
className:
|
|
434
|
-
...
|
|
435
|
-
},
|
|
436
|
-
const
|
|
437
|
-
m(!1),
|
|
438
|
-
}, []),
|
|
439
|
-
(
|
|
440
|
-
var
|
|
441
|
-
|
|
433
|
+
className: l,
|
|
434
|
+
...c
|
|
435
|
+
}, f) => {
|
|
436
|
+
const u = r !== void 0, [v, h] = E(t ?? ""), _ = u ? r : v, [s, m] = E(!1), [p, b] = E(-1), C = B(null), k = B(null), V = `${te()}-listbox`, W = e.find((L) => L.value === _), j = e.filter((L) => !L.disabled), O = D(() => {
|
|
437
|
+
m(!1), b(-1);
|
|
438
|
+
}, []), A = D(
|
|
439
|
+
(L) => {
|
|
440
|
+
var N;
|
|
441
|
+
L.disabled || (u || h(L.value), a == null || a(L.value), O(), (N = C.current) == null || N.focus());
|
|
442
442
|
},
|
|
443
|
-
[
|
|
443
|
+
[u, a, O]
|
|
444
444
|
);
|
|
445
|
-
|
|
446
|
-
if (!
|
|
447
|
-
const
|
|
448
|
-
const
|
|
449
|
-
|
|
445
|
+
$(() => {
|
|
446
|
+
if (!s) return;
|
|
447
|
+
const L = (N) => {
|
|
448
|
+
const R = f == null ? void 0 : f.current;
|
|
449
|
+
R && !R.contains(N.target) && O();
|
|
450
450
|
};
|
|
451
|
-
return document.addEventListener("mousedown",
|
|
452
|
-
}, [
|
|
453
|
-
var
|
|
454
|
-
if (!
|
|
455
|
-
const
|
|
456
|
-
|
|
457
|
-
}, [
|
|
458
|
-
const
|
|
459
|
-
switch (
|
|
451
|
+
return document.addEventListener("mousedown", L), () => document.removeEventListener("mousedown", L);
|
|
452
|
+
}, [s, f, O]), $(() => {
|
|
453
|
+
var N;
|
|
454
|
+
if (!s || p < 0) return;
|
|
455
|
+
const L = (N = k.current) == null ? void 0 : N.children[p];
|
|
456
|
+
L == null || L.scrollIntoView({ block: "nearest" });
|
|
457
|
+
}, [p, s]);
|
|
458
|
+
const F = (L) => {
|
|
459
|
+
switch (L.key) {
|
|
460
460
|
case "Enter":
|
|
461
461
|
case " ":
|
|
462
462
|
case "ArrowDown": {
|
|
463
|
-
if (
|
|
463
|
+
if (L.preventDefault(), !s) {
|
|
464
464
|
m(!0);
|
|
465
|
-
const
|
|
466
|
-
|
|
465
|
+
const N = e.findIndex((R) => R.value === _);
|
|
466
|
+
b(N >= 0 ? N : 0);
|
|
467
467
|
}
|
|
468
468
|
break;
|
|
469
469
|
}
|
|
470
470
|
case "ArrowUp": {
|
|
471
|
-
|
|
471
|
+
L.preventDefault(), s || (m(!0), b(e.length - 1));
|
|
472
472
|
break;
|
|
473
473
|
}
|
|
474
474
|
case "Escape": {
|
|
475
|
-
|
|
475
|
+
O();
|
|
476
476
|
break;
|
|
477
477
|
}
|
|
478
478
|
}
|
|
479
|
-
},
|
|
480
|
-
var
|
|
481
|
-
switch (
|
|
479
|
+
}, S = (L) => {
|
|
480
|
+
var N;
|
|
481
|
+
switch (L.key) {
|
|
482
482
|
case "ArrowDown": {
|
|
483
|
-
|
|
484
|
-
let
|
|
485
|
-
for (;
|
|
486
|
-
return
|
|
483
|
+
L.preventDefault(), b((R) => {
|
|
484
|
+
let I = R + 1;
|
|
485
|
+
for (; I < e.length && e[I].disabled; ) I++;
|
|
486
|
+
return I < e.length ? I : R;
|
|
487
487
|
});
|
|
488
488
|
break;
|
|
489
489
|
}
|
|
490
490
|
case "ArrowUp": {
|
|
491
|
-
|
|
492
|
-
let
|
|
493
|
-
for (;
|
|
494
|
-
return
|
|
491
|
+
L.preventDefault(), b((R) => {
|
|
492
|
+
let I = R - 1;
|
|
493
|
+
for (; I >= 0 && e[I].disabled; ) I--;
|
|
494
|
+
return I >= 0 ? I : R;
|
|
495
495
|
});
|
|
496
496
|
break;
|
|
497
497
|
}
|
|
498
498
|
case "Enter":
|
|
499
499
|
case " ": {
|
|
500
|
-
|
|
500
|
+
L.preventDefault(), p >= 0 && A(e[p]);
|
|
501
501
|
break;
|
|
502
502
|
}
|
|
503
503
|
case "Escape":
|
|
504
504
|
case "Tab": {
|
|
505
|
-
|
|
505
|
+
O(), (N = C.current) == null || N.focus();
|
|
506
506
|
break;
|
|
507
507
|
}
|
|
508
508
|
case "Home": {
|
|
509
|
-
|
|
510
|
-
const
|
|
511
|
-
|
|
509
|
+
L.preventDefault();
|
|
510
|
+
const R = e.findIndex((I) => !I.disabled);
|
|
511
|
+
R >= 0 && b(R);
|
|
512
512
|
break;
|
|
513
513
|
}
|
|
514
514
|
case "End": {
|
|
515
|
-
|
|
516
|
-
const
|
|
517
|
-
|
|
515
|
+
L.preventDefault();
|
|
516
|
+
const R = [...e].reverse().findIndex((I) => !I.disabled);
|
|
517
|
+
R >= 0 && b(e.length - 1 - R);
|
|
518
518
|
break;
|
|
519
519
|
}
|
|
520
520
|
}
|
|
521
521
|
};
|
|
522
|
-
return /* @__PURE__ */
|
|
522
|
+
return /* @__PURE__ */ x(
|
|
523
523
|
"div",
|
|
524
524
|
{
|
|
525
|
-
ref:
|
|
526
|
-
className:
|
|
527
|
-
"data-open":
|
|
528
|
-
...
|
|
525
|
+
ref: f,
|
|
526
|
+
className: y("vyre-select", `vyre-select--${d}`, l),
|
|
527
|
+
"data-open": s,
|
|
528
|
+
...c,
|
|
529
529
|
children: [
|
|
530
|
-
/* @__PURE__ */
|
|
530
|
+
/* @__PURE__ */ x(
|
|
531
531
|
"button",
|
|
532
532
|
{
|
|
533
|
-
ref:
|
|
533
|
+
ref: C,
|
|
534
534
|
type: "button",
|
|
535
535
|
className: "vyre-select__trigger",
|
|
536
536
|
"aria-haspopup": "listbox",
|
|
537
|
-
"aria-expanded":
|
|
538
|
-
"aria-controls":
|
|
537
|
+
"aria-expanded": s,
|
|
538
|
+
"aria-controls": V,
|
|
539
539
|
"aria-disabled": i,
|
|
540
540
|
disabled: i,
|
|
541
541
|
onClick: () => {
|
|
542
|
-
i || m((
|
|
543
|
-
if (!
|
|
544
|
-
const
|
|
545
|
-
|
|
542
|
+
i || m((L) => {
|
|
543
|
+
if (!L) {
|
|
544
|
+
const N = e.findIndex((R) => R.value === _);
|
|
545
|
+
b(N >= 0 ? N : 0);
|
|
546
546
|
}
|
|
547
|
-
return !
|
|
547
|
+
return !L;
|
|
548
548
|
});
|
|
549
549
|
},
|
|
550
|
-
onKeyDown:
|
|
550
|
+
onKeyDown: F,
|
|
551
551
|
children: [
|
|
552
|
-
|
|
553
|
-
/* @__PURE__ */ n(
|
|
552
|
+
W ? /* @__PURE__ */ n("span", { className: "vyre-select__value", children: W.label }) : /* @__PURE__ */ n("span", { className: "vyre-select__placeholder", children: o }),
|
|
553
|
+
/* @__PURE__ */ n(nt, {})
|
|
554
554
|
]
|
|
555
555
|
}
|
|
556
556
|
),
|
|
557
|
-
|
|
557
|
+
s && /* @__PURE__ */ x(
|
|
558
558
|
"ul",
|
|
559
559
|
{
|
|
560
|
-
ref:
|
|
561
|
-
id:
|
|
560
|
+
ref: k,
|
|
561
|
+
id: V,
|
|
562
562
|
role: "listbox",
|
|
563
563
|
className: "vyre-select__dropdown",
|
|
564
564
|
"aria-label": "Options",
|
|
565
565
|
tabIndex: -1,
|
|
566
|
-
onKeyDown:
|
|
566
|
+
onKeyDown: S,
|
|
567
567
|
children: [
|
|
568
|
-
e.map((
|
|
568
|
+
e.map((L, N) => /* @__PURE__ */ x(
|
|
569
569
|
"li",
|
|
570
570
|
{
|
|
571
571
|
role: "option",
|
|
572
|
-
"aria-selected":
|
|
573
|
-
"aria-disabled":
|
|
574
|
-
"data-highlighted":
|
|
572
|
+
"aria-selected": L.value === _,
|
|
573
|
+
"aria-disabled": L.disabled,
|
|
574
|
+
"data-highlighted": N === p,
|
|
575
575
|
className: "vyre-select__option",
|
|
576
|
-
onMouseEnter: () => !
|
|
577
|
-
onMouseDown: (
|
|
578
|
-
|
|
576
|
+
onMouseEnter: () => !L.disabled && b(N),
|
|
577
|
+
onMouseDown: (R) => {
|
|
578
|
+
R.preventDefault(), A(L);
|
|
579
579
|
},
|
|
580
580
|
children: [
|
|
581
|
-
|
|
582
|
-
|
|
581
|
+
L.label,
|
|
582
|
+
L.value === _ && /* @__PURE__ */ n(at, {})
|
|
583
583
|
]
|
|
584
584
|
},
|
|
585
|
-
|
|
585
|
+
L.value
|
|
586
586
|
)),
|
|
587
|
-
|
|
587
|
+
j.length === 0 && /* @__PURE__ */ n("li", { className: "vyre-select__empty", role: "presentation", children: "No options available" })
|
|
588
588
|
]
|
|
589
589
|
}
|
|
590
590
|
)
|
|
@@ -593,8 +593,8 @@ const et = p.forwardRef(
|
|
|
593
593
|
);
|
|
594
594
|
}
|
|
595
595
|
);
|
|
596
|
-
|
|
597
|
-
function
|
|
596
|
+
rt.displayName = "VyreSelect";
|
|
597
|
+
function nt() {
|
|
598
598
|
return /* @__PURE__ */ n(
|
|
599
599
|
"svg",
|
|
600
600
|
{
|
|
@@ -617,7 +617,7 @@ function tt() {
|
|
|
617
617
|
}
|
|
618
618
|
);
|
|
619
619
|
}
|
|
620
|
-
function
|
|
620
|
+
function at() {
|
|
621
621
|
return /* @__PURE__ */ n(
|
|
622
622
|
"svg",
|
|
623
623
|
{
|
|
@@ -640,13 +640,13 @@ function rt() {
|
|
|
640
640
|
}
|
|
641
641
|
);
|
|
642
642
|
}
|
|
643
|
-
const
|
|
644
|
-
function
|
|
645
|
-
const e = U(
|
|
643
|
+
const ge = ee(null);
|
|
644
|
+
function we() {
|
|
645
|
+
const e = U(ge);
|
|
646
646
|
if (!e) throw new Error("Tab components must be used inside <Tabs>");
|
|
647
647
|
return e;
|
|
648
648
|
}
|
|
649
|
-
const
|
|
649
|
+
const ot = g.forwardRef(
|
|
650
650
|
({
|
|
651
651
|
defaultValue: e = "",
|
|
652
652
|
value: r,
|
|
@@ -655,42 +655,42 @@ const nt = p.forwardRef(
|
|
|
655
655
|
children: o,
|
|
656
656
|
...i
|
|
657
657
|
}, d) => {
|
|
658
|
-
const
|
|
658
|
+
const l = r !== void 0, [c, f] = E(e), u = l ? r : c, v = te(), h = D(
|
|
659
659
|
(_) => {
|
|
660
|
-
|
|
660
|
+
l || f(_), t == null || t(_);
|
|
661
661
|
},
|
|
662
|
-
[
|
|
662
|
+
[l, t]
|
|
663
663
|
);
|
|
664
|
-
return /* @__PURE__ */ n(
|
|
664
|
+
return /* @__PURE__ */ n(ge.Provider, { value: { value: u, onChange: h, baseId: v }, children: /* @__PURE__ */ n("div", { ref: d, className: y("vyre-tabs", a), ...i, children: o }) });
|
|
665
665
|
}
|
|
666
666
|
);
|
|
667
|
-
|
|
668
|
-
const
|
|
667
|
+
ot.displayName = "VyreTabs";
|
|
668
|
+
const it = g.forwardRef(
|
|
669
669
|
({ className: e, children: r, "aria-label": t, ...a }, o) => {
|
|
670
|
-
const i =
|
|
670
|
+
const i = B(null), d = (l) => {
|
|
671
671
|
var v;
|
|
672
|
-
const
|
|
672
|
+
const c = Array.from(
|
|
673
673
|
((v = i.current) == null ? void 0 : v.querySelectorAll(
|
|
674
674
|
'[role="tab"]:not([disabled])'
|
|
675
675
|
)) ?? []
|
|
676
|
-
),
|
|
677
|
-
if (
|
|
678
|
-
let
|
|
679
|
-
if (
|
|
680
|
-
else if (
|
|
681
|
-
else if (
|
|
682
|
-
else if (
|
|
676
|
+
), f = c.findIndex((h) => h === document.activeElement);
|
|
677
|
+
if (f < 0) return;
|
|
678
|
+
let u = f;
|
|
679
|
+
if (l.key === "ArrowRight") u = (f + 1) % c.length;
|
|
680
|
+
else if (l.key === "ArrowLeft") u = (f - 1 + c.length) % c.length;
|
|
681
|
+
else if (l.key === "Home") u = 0;
|
|
682
|
+
else if (l.key === "End") u = c.length - 1;
|
|
683
683
|
else return;
|
|
684
|
-
|
|
684
|
+
l.preventDefault(), c[u].focus(), c[u].click();
|
|
685
685
|
};
|
|
686
686
|
return /* @__PURE__ */ n(
|
|
687
687
|
"div",
|
|
688
688
|
{
|
|
689
|
-
ref: (
|
|
690
|
-
i.current =
|
|
689
|
+
ref: (l) => {
|
|
690
|
+
i.current = l, typeof o == "function" ? o(l) : o && (o.current = l);
|
|
691
691
|
},
|
|
692
692
|
role: "tablist",
|
|
693
|
-
className:
|
|
693
|
+
className: y("vyre-tabs__list", e),
|
|
694
694
|
"aria-label": t,
|
|
695
695
|
onKeyDown: d,
|
|
696
696
|
...a,
|
|
@@ -699,42 +699,42 @@ const at = p.forwardRef(
|
|
|
699
699
|
);
|
|
700
700
|
}
|
|
701
701
|
);
|
|
702
|
-
|
|
703
|
-
const
|
|
702
|
+
it.displayName = "VyreTabList";
|
|
703
|
+
const st = g.forwardRef(
|
|
704
704
|
({ value: e, disabled: r = !1, className: t, children: a, ...o }, i) => {
|
|
705
|
-
const { value: d, onChange:
|
|
705
|
+
const { value: d, onChange: l, baseId: c } = we(), f = e === d;
|
|
706
706
|
return /* @__PURE__ */ n(
|
|
707
707
|
"button",
|
|
708
708
|
{
|
|
709
709
|
ref: i,
|
|
710
710
|
role: "tab",
|
|
711
711
|
type: "button",
|
|
712
|
-
id: `${
|
|
713
|
-
"aria-controls": `${
|
|
714
|
-
"aria-selected":
|
|
712
|
+
id: `${c}-tab-${e}`,
|
|
713
|
+
"aria-controls": `${c}-panel-${e}`,
|
|
714
|
+
"aria-selected": f,
|
|
715
715
|
disabled: r,
|
|
716
|
-
tabIndex:
|
|
717
|
-
className:
|
|
716
|
+
tabIndex: f ? 0 : -1,
|
|
717
|
+
className: y(
|
|
718
718
|
"vyre-tabs__tab",
|
|
719
|
-
|
|
719
|
+
f && "vyre-tabs__tab--active",
|
|
720
720
|
t
|
|
721
721
|
),
|
|
722
|
-
"data-selected":
|
|
723
|
-
onClick: () => !r &&
|
|
722
|
+
"data-selected": f,
|
|
723
|
+
onClick: () => !r && l(e),
|
|
724
724
|
...o,
|
|
725
725
|
children: a
|
|
726
726
|
}
|
|
727
727
|
);
|
|
728
728
|
}
|
|
729
729
|
);
|
|
730
|
-
|
|
731
|
-
const
|
|
732
|
-
({ className: e, children: r, ...t }, a) => /* @__PURE__ */ n("div", { ref: a, className:
|
|
730
|
+
st.displayName = "VyreTab";
|
|
731
|
+
const lt = g.forwardRef(
|
|
732
|
+
({ className: e, children: r, ...t }, a) => /* @__PURE__ */ n("div", { ref: a, className: y("vyre-tabs__panels", e), ...t, children: r })
|
|
733
733
|
);
|
|
734
|
-
|
|
735
|
-
const
|
|
734
|
+
lt.displayName = "VyreTabPanels";
|
|
735
|
+
const dt = g.forwardRef(
|
|
736
736
|
({ value: e, className: r, children: t, ...a }, o) => {
|
|
737
|
-
const { value: i, baseId: d } =
|
|
737
|
+
const { value: i, baseId: d } = we();
|
|
738
738
|
return e === i ? /* @__PURE__ */ n(
|
|
739
739
|
"div",
|
|
740
740
|
{
|
|
@@ -743,52 +743,52 @@ const st = p.forwardRef(
|
|
|
743
743
|
id: `${d}-panel-${e}`,
|
|
744
744
|
"aria-labelledby": `${d}-tab-${e}`,
|
|
745
745
|
tabIndex: 0,
|
|
746
|
-
className:
|
|
746
|
+
className: y("vyre-tabs__panel", r),
|
|
747
747
|
...a,
|
|
748
748
|
children: t
|
|
749
749
|
}
|
|
750
750
|
) : null;
|
|
751
751
|
}
|
|
752
752
|
);
|
|
753
|
-
|
|
754
|
-
const
|
|
753
|
+
dt.displayName = "VyreTabPanel";
|
|
754
|
+
const ct = 120, ut = ({
|
|
755
755
|
content: e,
|
|
756
756
|
placement: r = "top",
|
|
757
757
|
delay: t = 300,
|
|
758
758
|
children: a,
|
|
759
759
|
className: o
|
|
760
760
|
}) => {
|
|
761
|
-
const [i, d] =
|
|
762
|
-
|
|
763
|
-
}, [t]), v =
|
|
764
|
-
|
|
765
|
-
}, []),
|
|
766
|
-
onMouseEnter: (
|
|
767
|
-
var m,
|
|
768
|
-
|
|
761
|
+
const [i, d] = E("hidden"), l = B(null), c = B(null), f = te(), u = D(() => {
|
|
762
|
+
c.current && (clearTimeout(c.current), c.current = null), l.current = setTimeout(() => d("visible"), t);
|
|
763
|
+
}, [t]), v = D(() => {
|
|
764
|
+
l.current && (clearTimeout(l.current), l.current = null), d("leaving"), c.current = setTimeout(() => d("hidden"), ct);
|
|
765
|
+
}, []), h = g.Children.only(a), _ = g.cloneElement(h, {
|
|
766
|
+
onMouseEnter: (s) => {
|
|
767
|
+
var m, p;
|
|
768
|
+
u(), (p = (m = h.props).onMouseEnter) == null || p.call(m, s);
|
|
769
769
|
},
|
|
770
|
-
onMouseLeave: (
|
|
771
|
-
var m,
|
|
772
|
-
v(), (
|
|
770
|
+
onMouseLeave: (s) => {
|
|
771
|
+
var m, p;
|
|
772
|
+
v(), (p = (m = h.props).onMouseLeave) == null || p.call(m, s);
|
|
773
773
|
},
|
|
774
|
-
onFocus: (
|
|
775
|
-
var m,
|
|
776
|
-
d("visible"), (
|
|
774
|
+
onFocus: (s) => {
|
|
775
|
+
var m, p;
|
|
776
|
+
d("visible"), (p = (m = h.props).onFocus) == null || p.call(m, s);
|
|
777
777
|
},
|
|
778
|
-
onBlur: (
|
|
779
|
-
var m,
|
|
780
|
-
v(), (
|
|
778
|
+
onBlur: (s) => {
|
|
779
|
+
var m, p;
|
|
780
|
+
v(), (p = (m = h.props).onBlur) == null || p.call(m, s);
|
|
781
781
|
},
|
|
782
|
-
"aria-describedby": i !== "hidden" ?
|
|
782
|
+
"aria-describedby": i !== "hidden" ? f : void 0
|
|
783
783
|
});
|
|
784
|
-
return /* @__PURE__ */
|
|
784
|
+
return /* @__PURE__ */ x("span", { className: y("vyre-tooltip-wrapper", o), children: [
|
|
785
785
|
_,
|
|
786
|
-
i !== "hidden" && /* @__PURE__ */
|
|
786
|
+
i !== "hidden" && /* @__PURE__ */ x(
|
|
787
787
|
"span",
|
|
788
788
|
{
|
|
789
|
-
id:
|
|
789
|
+
id: f,
|
|
790
790
|
role: "tooltip",
|
|
791
|
-
className:
|
|
791
|
+
className: y(
|
|
792
792
|
"vyre-tooltip",
|
|
793
793
|
`vyre-tooltip--${r}`,
|
|
794
794
|
i === "leaving" && "vyre-tooltip--leaving"
|
|
@@ -802,14 +802,14 @@ const lt = 120, dt = ({
|
|
|
802
802
|
)
|
|
803
803
|
] });
|
|
804
804
|
};
|
|
805
|
-
|
|
806
|
-
const Ne =
|
|
805
|
+
ut.displayName = "VyreTooltip";
|
|
806
|
+
const Ne = g.createContext(null);
|
|
807
807
|
function ke() {
|
|
808
|
-
const e =
|
|
808
|
+
const e = g.useContext(Ne);
|
|
809
809
|
if (!e) throw new Error("AccordionItem must be used within Accordion");
|
|
810
810
|
return e;
|
|
811
811
|
}
|
|
812
|
-
const
|
|
812
|
+
const mt = g.forwardRef(
|
|
813
813
|
({
|
|
814
814
|
type: e = "single",
|
|
815
815
|
defaultValue: r,
|
|
@@ -818,20 +818,20 @@ const ct = p.forwardRef(
|
|
|
818
818
|
className: o,
|
|
819
819
|
children: i,
|
|
820
820
|
...d
|
|
821
|
-
},
|
|
822
|
-
const
|
|
823
|
-
|
|
824
|
-
), v = t !== void 0 ?
|
|
821
|
+
}, l) => {
|
|
822
|
+
const c = (_) => _ === void 0 ? [] : Array.isArray(_) ? _ : [_], [f, u] = g.useState(
|
|
823
|
+
c(r)
|
|
824
|
+
), v = t !== void 0 ? c(t) : f, h = g.useCallback(
|
|
825
825
|
(_) => {
|
|
826
|
-
let
|
|
827
|
-
e === "single" ?
|
|
826
|
+
let s;
|
|
827
|
+
e === "single" ? s = v.includes(_) ? [] : [_] : s = v.includes(_) ? v.filter((m) => m !== _) : [...v, _], t === void 0 && u(s), a == null || a(e === "single" ? s[0] ?? "" : s);
|
|
828
828
|
},
|
|
829
829
|
[e, v, t, a]
|
|
830
830
|
);
|
|
831
|
-
return /* @__PURE__ */ n(Ne.Provider, { value: { type: e, value: v, toggle:
|
|
831
|
+
return /* @__PURE__ */ n(Ne.Provider, { value: { type: e, value: v, toggle: h }, children: /* @__PURE__ */ n(
|
|
832
832
|
"div",
|
|
833
833
|
{
|
|
834
|
-
ref:
|
|
834
|
+
ref: l,
|
|
835
835
|
className: ["vyre-accordion", o].filter(Boolean).join(" "),
|
|
836
836
|
...d,
|
|
837
837
|
children: i
|
|
@@ -839,8 +839,8 @@ const ct = p.forwardRef(
|
|
|
839
839
|
) });
|
|
840
840
|
}
|
|
841
841
|
);
|
|
842
|
-
|
|
843
|
-
const ve =
|
|
842
|
+
mt.displayName = "Accordion";
|
|
843
|
+
const ve = g.createContext(null), vt = g.forwardRef(
|
|
844
844
|
({ value: e, className: r, children: t, ...a }, o) => {
|
|
845
845
|
const { value: i } = ke(), d = i.includes(e);
|
|
846
846
|
return /* @__PURE__ */ n(ve.Provider, { value: { itemValue: e, isOpen: d }, children: /* @__PURE__ */ n(
|
|
@@ -855,19 +855,19 @@ const ve = p.createContext(null), ut = p.forwardRef(
|
|
|
855
855
|
) });
|
|
856
856
|
}
|
|
857
857
|
);
|
|
858
|
-
|
|
859
|
-
const
|
|
858
|
+
vt.displayName = "AccordionItem";
|
|
859
|
+
const yt = g.forwardRef(
|
|
860
860
|
({ className: e, children: r, ...t }, a) => {
|
|
861
|
-
const { toggle: o } = ke(), i =
|
|
861
|
+
const { toggle: o } = ke(), i = g.useContext(ve);
|
|
862
862
|
if (!i) throw new Error("AccordionTrigger must be used within AccordionItem");
|
|
863
|
-
const { itemValue: d, isOpen:
|
|
864
|
-
return /* @__PURE__ */
|
|
863
|
+
const { itemValue: d, isOpen: l } = i;
|
|
864
|
+
return /* @__PURE__ */ x(
|
|
865
865
|
"button",
|
|
866
866
|
{
|
|
867
867
|
ref: a,
|
|
868
868
|
type: "button",
|
|
869
|
-
"aria-expanded":
|
|
870
|
-
"data-state":
|
|
869
|
+
"aria-expanded": l,
|
|
870
|
+
"data-state": l ? "open" : "closed",
|
|
871
871
|
className: ["vyre-accordion__trigger", e].filter(Boolean).join(" "),
|
|
872
872
|
onClick: () => o(d),
|
|
873
873
|
...t,
|
|
@@ -890,10 +890,10 @@ const mt = p.forwardRef(
|
|
|
890
890
|
);
|
|
891
891
|
}
|
|
892
892
|
);
|
|
893
|
-
|
|
894
|
-
const
|
|
893
|
+
yt.displayName = "AccordionTrigger";
|
|
894
|
+
const ft = g.forwardRef(
|
|
895
895
|
({ className: e, children: r, ...t }, a) => {
|
|
896
|
-
const o =
|
|
896
|
+
const o = g.useContext(ve);
|
|
897
897
|
if (!o) throw new Error("AccordionContent must be used within AccordionItem");
|
|
898
898
|
const { isOpen: i } = o;
|
|
899
899
|
return /* @__PURE__ */ n(
|
|
@@ -909,26 +909,26 @@ const vt = p.forwardRef(
|
|
|
909
909
|
);
|
|
910
910
|
}
|
|
911
911
|
);
|
|
912
|
-
|
|
913
|
-
const
|
|
914
|
-
({ src: e, alt: r = "", fallback: t, size: a = "md", status: o, className: i, ...d },
|
|
912
|
+
ft.displayName = "AccordionContent";
|
|
913
|
+
const ht = g.forwardRef(
|
|
914
|
+
({ src: e, alt: r = "", fallback: t, size: a = "md", status: o, className: i, ...d }, l) => {
|
|
915
915
|
var v;
|
|
916
|
-
const [
|
|
917
|
-
return /* @__PURE__ */
|
|
916
|
+
const [c, f] = g.useState(!1), u = e && !c;
|
|
917
|
+
return /* @__PURE__ */ x(
|
|
918
918
|
"span",
|
|
919
919
|
{
|
|
920
|
-
ref:
|
|
920
|
+
ref: l,
|
|
921
921
|
"data-size": a,
|
|
922
922
|
className: ["vyre-avatar", i].filter(Boolean).join(" "),
|
|
923
923
|
...d,
|
|
924
924
|
children: [
|
|
925
|
-
|
|
925
|
+
u ? /* @__PURE__ */ n(
|
|
926
926
|
"img",
|
|
927
927
|
{
|
|
928
928
|
src: e,
|
|
929
929
|
alt: r,
|
|
930
930
|
className: "vyre-avatar__img",
|
|
931
|
-
onError: () =>
|
|
931
|
+
onError: () => f(!0)
|
|
932
932
|
}
|
|
933
933
|
) : /* @__PURE__ */ n("span", { className: "vyre-avatar__fallback", "aria-label": r || t, children: t ?? ((v = r == null ? void 0 : r.charAt(0)) == null ? void 0 : v.toUpperCase()) ?? "?" }),
|
|
934
934
|
o && /* @__PURE__ */ n(
|
|
@@ -943,8 +943,8 @@ const yt = p.forwardRef(
|
|
|
943
943
|
);
|
|
944
944
|
}
|
|
945
945
|
);
|
|
946
|
-
|
|
947
|
-
const
|
|
946
|
+
ht.displayName = "Avatar";
|
|
947
|
+
const bt = g.forwardRef(
|
|
948
948
|
({
|
|
949
949
|
checked: e,
|
|
950
950
|
defaultChecked: r,
|
|
@@ -953,13 +953,13 @@ const ft = p.forwardRef(
|
|
|
953
953
|
disabled: o,
|
|
954
954
|
size: i = "md",
|
|
955
955
|
className: d,
|
|
956
|
-
id:
|
|
957
|
-
...
|
|
958
|
-
},
|
|
959
|
-
const
|
|
960
|
-
return
|
|
956
|
+
id: l,
|
|
957
|
+
...c
|
|
958
|
+
}, f) => {
|
|
959
|
+
const u = g.useRef(null), v = f ?? u;
|
|
960
|
+
return g.useEffect(() => {
|
|
961
961
|
v.current && (v.current.indeterminate = t);
|
|
962
|
-
}, [t, v]), /* @__PURE__ */
|
|
962
|
+
}, [t, v]), /* @__PURE__ */ x(
|
|
963
963
|
"span",
|
|
964
964
|
{
|
|
965
965
|
className: ["vyre-checkbox", `vyre-checkbox--${i}`, d].filter(Boolean).join(" "),
|
|
@@ -972,13 +972,13 @@ const ft = p.forwardRef(
|
|
|
972
972
|
{
|
|
973
973
|
ref: v,
|
|
974
974
|
type: "checkbox",
|
|
975
|
-
id:
|
|
975
|
+
id: l,
|
|
976
976
|
checked: e,
|
|
977
977
|
defaultChecked: r,
|
|
978
978
|
disabled: o,
|
|
979
979
|
className: "vyre-checkbox__input",
|
|
980
|
-
onChange: (
|
|
981
|
-
...
|
|
980
|
+
onChange: (h) => a == null ? void 0 : a(h.target.checked),
|
|
981
|
+
...c
|
|
982
982
|
}
|
|
983
983
|
),
|
|
984
984
|
/* @__PURE__ */ n("span", { className: "vyre-checkbox__box", "aria-hidden": "true", children: t ? /* @__PURE__ */ n("svg", { width: "10", height: "2", viewBox: "0 0 10 2", fill: "none", children: /* @__PURE__ */ n("path", { d: "M1 1h8", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }) }) : /* @__PURE__ */ n("svg", { width: "10", height: "8", viewBox: "0 0 10 8", fill: "none", children: /* @__PURE__ */ n("path", { d: "M1 4l3 3 5-6", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round" }) }) })
|
|
@@ -987,8 +987,8 @@ const ft = p.forwardRef(
|
|
|
987
987
|
);
|
|
988
988
|
}
|
|
989
989
|
);
|
|
990
|
-
|
|
991
|
-
const
|
|
990
|
+
bt.displayName = "Checkbox";
|
|
991
|
+
const pt = g.forwardRef(
|
|
992
992
|
({
|
|
993
993
|
checked: e,
|
|
994
994
|
defaultChecked: r = !1,
|
|
@@ -997,21 +997,21 @@ const ht = p.forwardRef(
|
|
|
997
997
|
size: o = "md",
|
|
998
998
|
className: i,
|
|
999
999
|
...d
|
|
1000
|
-
},
|
|
1001
|
-
const [
|
|
1000
|
+
}, l) => {
|
|
1001
|
+
const [c, f] = g.useState(r), u = e !== void 0 ? e : c, v = () => {
|
|
1002
1002
|
if (a) return;
|
|
1003
|
-
const
|
|
1004
|
-
e === void 0 &&
|
|
1003
|
+
const h = !u;
|
|
1004
|
+
e === void 0 && f(h), t == null || t(h);
|
|
1005
1005
|
};
|
|
1006
1006
|
return /* @__PURE__ */ n(
|
|
1007
1007
|
"button",
|
|
1008
1008
|
{
|
|
1009
|
-
ref:
|
|
1009
|
+
ref: l,
|
|
1010
1010
|
type: "button",
|
|
1011
1011
|
role: "switch",
|
|
1012
|
-
"aria-checked":
|
|
1012
|
+
"aria-checked": u,
|
|
1013
1013
|
disabled: a,
|
|
1014
|
-
"data-checked":
|
|
1014
|
+
"data-checked": u || void 0,
|
|
1015
1015
|
"data-size": o,
|
|
1016
1016
|
className: ["vyre-switch", i].filter(Boolean).join(" "),
|
|
1017
1017
|
onClick: v,
|
|
@@ -1021,8 +1021,8 @@ const ht = p.forwardRef(
|
|
|
1021
1021
|
);
|
|
1022
1022
|
}
|
|
1023
1023
|
);
|
|
1024
|
-
|
|
1025
|
-
const
|
|
1024
|
+
pt.displayName = "Switch";
|
|
1025
|
+
const _t = g.forwardRef(
|
|
1026
1026
|
({
|
|
1027
1027
|
value: e,
|
|
1028
1028
|
defaultValue: r = 0,
|
|
@@ -1031,18 +1031,18 @@ const bt = p.forwardRef(
|
|
|
1031
1031
|
step: o = 1,
|
|
1032
1032
|
onValueChange: i,
|
|
1033
1033
|
disabled: d,
|
|
1034
|
-
size:
|
|
1035
|
-
className:
|
|
1036
|
-
style:
|
|
1037
|
-
...
|
|
1034
|
+
size: l = "md",
|
|
1035
|
+
className: c,
|
|
1036
|
+
style: f,
|
|
1037
|
+
...u
|
|
1038
1038
|
}, v) => {
|
|
1039
|
-
const [
|
|
1040
|
-
return /* @__PURE__ */
|
|
1039
|
+
const [h, _] = g.useState(r), s = e !== void 0 ? e : h, m = (s - t) / (a - t) * 100;
|
|
1040
|
+
return /* @__PURE__ */ x(
|
|
1041
1041
|
"div",
|
|
1042
1042
|
{
|
|
1043
|
-
className: ["vyre-slider", `vyre-slider--${
|
|
1043
|
+
className: ["vyre-slider", `vyre-slider--${l}`, c].filter(Boolean).join(" "),
|
|
1044
1044
|
"data-disabled": d || void 0,
|
|
1045
|
-
style: { "--vyre-slider-pct": `${m}%`, ...
|
|
1045
|
+
style: { "--vyre-slider-pct": `${m}%`, ...f },
|
|
1046
1046
|
children: [
|
|
1047
1047
|
/* @__PURE__ */ n(
|
|
1048
1048
|
"input",
|
|
@@ -1052,17 +1052,17 @@ const bt = p.forwardRef(
|
|
|
1052
1052
|
min: t,
|
|
1053
1053
|
max: a,
|
|
1054
1054
|
step: o,
|
|
1055
|
-
value:
|
|
1055
|
+
value: s,
|
|
1056
1056
|
disabled: d,
|
|
1057
1057
|
className: "vyre-slider__input",
|
|
1058
|
-
onChange: (
|
|
1059
|
-
const
|
|
1060
|
-
e === void 0 && _(
|
|
1058
|
+
onChange: (p) => {
|
|
1059
|
+
const b = Number(p.target.value);
|
|
1060
|
+
e === void 0 && _(b), i == null || i(b);
|
|
1061
1061
|
},
|
|
1062
|
-
...
|
|
1062
|
+
...u
|
|
1063
1063
|
}
|
|
1064
1064
|
),
|
|
1065
|
-
/* @__PURE__ */
|
|
1065
|
+
/* @__PURE__ */ x("div", { className: "vyre-slider__track", children: [
|
|
1066
1066
|
/* @__PURE__ */ n("div", { className: "vyre-slider__fill", style: { width: `${m}%` } }),
|
|
1067
1067
|
/* @__PURE__ */ n("div", { className: "vyre-slider__thumb", style: { left: `${m}%` } })
|
|
1068
1068
|
] })
|
|
@@ -1071,8 +1071,8 @@ const bt = p.forwardRef(
|
|
|
1071
1071
|
);
|
|
1072
1072
|
}
|
|
1073
1073
|
);
|
|
1074
|
-
|
|
1075
|
-
const
|
|
1074
|
+
_t.displayName = "Slider";
|
|
1075
|
+
const gt = g.forwardRef(
|
|
1076
1076
|
({
|
|
1077
1077
|
value: e,
|
|
1078
1078
|
max: r = 100,
|
|
@@ -1081,12 +1081,12 @@ const pt = p.forwardRef(
|
|
|
1081
1081
|
variant: o = "default",
|
|
1082
1082
|
className: i,
|
|
1083
1083
|
...d
|
|
1084
|
-
},
|
|
1085
|
-
const
|
|
1084
|
+
}, l) => {
|
|
1085
|
+
const c = t ? void 0 : Math.min(100, Math.max(0, (e ?? 0) / r * 100));
|
|
1086
1086
|
return /* @__PURE__ */ n(
|
|
1087
1087
|
"div",
|
|
1088
1088
|
{
|
|
1089
|
-
ref:
|
|
1089
|
+
ref: l,
|
|
1090
1090
|
role: "progressbar",
|
|
1091
1091
|
"aria-valuemin": 0,
|
|
1092
1092
|
"aria-valuemax": r,
|
|
@@ -1100,15 +1100,15 @@ const pt = p.forwardRef(
|
|
|
1100
1100
|
"div",
|
|
1101
1101
|
{
|
|
1102
1102
|
className: "vyre-progress__bar",
|
|
1103
|
-
style:
|
|
1103
|
+
style: c !== void 0 ? { width: `${c}%` } : void 0
|
|
1104
1104
|
}
|
|
1105
1105
|
)
|
|
1106
1106
|
}
|
|
1107
1107
|
);
|
|
1108
1108
|
}
|
|
1109
1109
|
);
|
|
1110
|
-
|
|
1111
|
-
const
|
|
1110
|
+
gt.displayName = "Progress";
|
|
1111
|
+
const wt = g.forwardRef(
|
|
1112
1112
|
({ orientation: e = "horizontal", decorative: r = !0, className: t, ...a }, o) => /* @__PURE__ */ n(
|
|
1113
1113
|
"div",
|
|
1114
1114
|
{
|
|
@@ -1121,9 +1121,9 @@ const _t = p.forwardRef(
|
|
|
1121
1121
|
}
|
|
1122
1122
|
)
|
|
1123
1123
|
);
|
|
1124
|
-
|
|
1125
|
-
const
|
|
1126
|
-
({ required: e, disabled: r, className: t, children: a, ...o }, i) => /* @__PURE__ */
|
|
1124
|
+
wt.displayName = "Separator";
|
|
1125
|
+
const Nt = g.forwardRef(
|
|
1126
|
+
({ required: e, disabled: r, className: t, children: a, ...o }, i) => /* @__PURE__ */ x(
|
|
1127
1127
|
"label",
|
|
1128
1128
|
{
|
|
1129
1129
|
ref: i,
|
|
@@ -1138,8 +1138,8 @@ const wt = p.forwardRef(
|
|
|
1138
1138
|
}
|
|
1139
1139
|
)
|
|
1140
1140
|
);
|
|
1141
|
-
|
|
1142
|
-
const
|
|
1141
|
+
Nt.displayName = "Label";
|
|
1142
|
+
const xe = g.forwardRef(
|
|
1143
1143
|
({ variant: e = "rect", width: r, height: t, className: a, style: o, ...i }, d) => /* @__PURE__ */ n(
|
|
1144
1144
|
"div",
|
|
1145
1145
|
{
|
|
@@ -1156,54 +1156,54 @@ const gt = p.forwardRef(
|
|
|
1156
1156
|
}
|
|
1157
1157
|
)
|
|
1158
1158
|
);
|
|
1159
|
-
|
|
1160
|
-
const le = 8,
|
|
1161
|
-
function
|
|
1159
|
+
xe.displayName = "Skeleton";
|
|
1160
|
+
const le = 8, kt = 120;
|
|
1161
|
+
function xt(e) {
|
|
1162
1162
|
const [r, t] = e.split("-");
|
|
1163
1163
|
return { side: r, align: t ?? "center" };
|
|
1164
1164
|
}
|
|
1165
|
-
function
|
|
1166
|
-
const d = e.width,
|
|
1167
|
-
let
|
|
1165
|
+
function Lt(e, r, t, a, o, i) {
|
|
1166
|
+
const d = e.width, l = e.height, c = r.width, f = r.height, u = e.left + o, v = e.top + i;
|
|
1167
|
+
let h = 0, _ = 0;
|
|
1168
1168
|
switch (t) {
|
|
1169
1169
|
case "top":
|
|
1170
|
-
|
|
1170
|
+
h = v - f - le;
|
|
1171
1171
|
break;
|
|
1172
1172
|
case "bottom":
|
|
1173
|
-
|
|
1173
|
+
h = v + l + le;
|
|
1174
1174
|
break;
|
|
1175
1175
|
case "left":
|
|
1176
|
-
_ =
|
|
1176
|
+
_ = u - c - le;
|
|
1177
1177
|
break;
|
|
1178
1178
|
case "right":
|
|
1179
|
-
_ =
|
|
1179
|
+
_ = u + d + le;
|
|
1180
1180
|
break;
|
|
1181
1181
|
}
|
|
1182
1182
|
if (t === "top" || t === "bottom")
|
|
1183
1183
|
switch (a) {
|
|
1184
1184
|
case "start":
|
|
1185
|
-
_ =
|
|
1185
|
+
_ = u;
|
|
1186
1186
|
break;
|
|
1187
1187
|
case "center":
|
|
1188
|
-
_ =
|
|
1188
|
+
_ = u + d / 2 - c / 2;
|
|
1189
1189
|
break;
|
|
1190
1190
|
case "end":
|
|
1191
|
-
_ =
|
|
1191
|
+
_ = u + d - c;
|
|
1192
1192
|
break;
|
|
1193
1193
|
}
|
|
1194
1194
|
else
|
|
1195
1195
|
switch (a) {
|
|
1196
1196
|
case "start":
|
|
1197
|
-
|
|
1197
|
+
h = v;
|
|
1198
1198
|
break;
|
|
1199
1199
|
case "center":
|
|
1200
|
-
|
|
1200
|
+
h = v + l / 2 - f / 2;
|
|
1201
1201
|
break;
|
|
1202
1202
|
case "end":
|
|
1203
|
-
|
|
1203
|
+
h = v + l - f;
|
|
1204
1204
|
break;
|
|
1205
1205
|
}
|
|
1206
|
-
return { top:
|
|
1206
|
+
return { top: h, left: _ };
|
|
1207
1207
|
}
|
|
1208
1208
|
const Ct = ({
|
|
1209
1209
|
trigger: e,
|
|
@@ -1214,59 +1214,59 @@ const Ct = ({
|
|
|
1214
1214
|
closeOnOutside: i = !0,
|
|
1215
1215
|
className: d
|
|
1216
1216
|
}) => {
|
|
1217
|
-
const
|
|
1218
|
-
|
|
1219
|
-
}, [
|
|
1220
|
-
v(!0),
|
|
1221
|
-
v(!1), _(!1),
|
|
1222
|
-
},
|
|
1223
|
-
}, [
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
}, [
|
|
1227
|
-
if (!
|
|
1228
|
-
const
|
|
1229
|
-
m(
|
|
1230
|
-
}, [
|
|
1231
|
-
if (!
|
|
1232
|
-
const
|
|
1233
|
-
|
|
1217
|
+
const l = t !== void 0, [c, f] = E(!1), [u, v] = E(!1), [h, _] = E(!1), [s, m] = E({ top: 0, left: 0 }), p = l ? t : c, b = B(null), C = B(null), k = B(null), T = te(), { side: V, align: W } = xt(o), j = D((S) => {
|
|
1218
|
+
l || f(S), a == null || a(S);
|
|
1219
|
+
}, [l, a]), O = D(() => j(!p), [p, j]), A = D(() => {
|
|
1220
|
+
v(!0), k.current = setTimeout(() => {
|
|
1221
|
+
v(!1), _(!1), j(!1);
|
|
1222
|
+
}, kt);
|
|
1223
|
+
}, [j]);
|
|
1224
|
+
$(() => {
|
|
1225
|
+
p ? (k.current && (clearTimeout(k.current), k.current = null), v(!1), _(!0)) : h && !u && A();
|
|
1226
|
+
}, [p]), $(() => {
|
|
1227
|
+
if (!h || !b.current || !C.current) return;
|
|
1228
|
+
const S = b.current.getBoundingClientRect(), L = C.current.getBoundingClientRect(), N = Lt(S, L, V, W, window.scrollX, window.scrollY);
|
|
1229
|
+
m(N);
|
|
1230
|
+
}, [h, V, W]), $(() => {
|
|
1231
|
+
if (!h || !i) return;
|
|
1232
|
+
const S = (L) => {
|
|
1233
|
+
C.current && !C.current.contains(L.target) && b.current && !b.current.contains(L.target) && A();
|
|
1234
1234
|
};
|
|
1235
|
-
return document.addEventListener("mousedown",
|
|
1236
|
-
}, [
|
|
1237
|
-
if (!
|
|
1238
|
-
const
|
|
1239
|
-
|
|
1235
|
+
return document.addEventListener("mousedown", S), () => document.removeEventListener("mousedown", S);
|
|
1236
|
+
}, [h, i, A]), $(() => {
|
|
1237
|
+
if (!h) return;
|
|
1238
|
+
const S = (L) => {
|
|
1239
|
+
L.key === "Escape" && A();
|
|
1240
1240
|
};
|
|
1241
|
-
return document.addEventListener("keydown",
|
|
1242
|
-
}, [
|
|
1243
|
-
const
|
|
1244
|
-
ref:
|
|
1245
|
-
onClick: (
|
|
1246
|
-
var
|
|
1247
|
-
|
|
1241
|
+
return document.addEventListener("keydown", S), () => document.removeEventListener("keydown", S);
|
|
1242
|
+
}, [h, A]);
|
|
1243
|
+
const F = g.cloneElement(e, {
|
|
1244
|
+
ref: b,
|
|
1245
|
+
onClick: (S) => {
|
|
1246
|
+
var L, N;
|
|
1247
|
+
O(), (N = (L = e.props).onClick) == null || N.call(L, S);
|
|
1248
1248
|
},
|
|
1249
|
-
"aria-expanded":
|
|
1250
|
-
"aria-controls":
|
|
1249
|
+
"aria-expanded": p,
|
|
1250
|
+
"aria-controls": T,
|
|
1251
1251
|
"aria-haspopup": "dialog"
|
|
1252
1252
|
});
|
|
1253
|
-
return /* @__PURE__ */
|
|
1254
|
-
|
|
1255
|
-
|
|
1253
|
+
return /* @__PURE__ */ x(de, { children: [
|
|
1254
|
+
F,
|
|
1255
|
+
h && G.createPortal(
|
|
1256
1256
|
/* @__PURE__ */ n(
|
|
1257
1257
|
"div",
|
|
1258
1258
|
{
|
|
1259
|
-
ref:
|
|
1260
|
-
id:
|
|
1259
|
+
ref: C,
|
|
1260
|
+
id: T,
|
|
1261
1261
|
role: "dialog",
|
|
1262
1262
|
"aria-modal": "false",
|
|
1263
|
-
className:
|
|
1263
|
+
className: y(
|
|
1264
1264
|
"vyre-popover",
|
|
1265
|
-
`vyre-popover--${
|
|
1266
|
-
|
|
1265
|
+
`vyre-popover--${V}`,
|
|
1266
|
+
u && "vyre-popover--leaving",
|
|
1267
1267
|
d
|
|
1268
1268
|
),
|
|
1269
|
-
style: { top:
|
|
1269
|
+
style: { top: s.top, left: s.left },
|
|
1270
1270
|
children: r
|
|
1271
1271
|
}
|
|
1272
1272
|
),
|
|
@@ -1275,97 +1275,97 @@ const Ct = ({
|
|
|
1275
1275
|
] });
|
|
1276
1276
|
};
|
|
1277
1277
|
Ct.displayName = "VyrePopover";
|
|
1278
|
-
const ce = ee(null),
|
|
1278
|
+
const ce = ee(null), Le = ee(null), Mt = 120, Rt = ({
|
|
1279
1279
|
trigger: e,
|
|
1280
1280
|
children: r,
|
|
1281
1281
|
placement: t = "bottom-start",
|
|
1282
1282
|
className: a
|
|
1283
1283
|
}) => {
|
|
1284
|
-
const [o, i] =
|
|
1284
|
+
const [o, i] = E(!1), [d, l] = E(!1), [c, f] = E(!1), [u, v] = E({ top: 0, left: 0 }), [h, _] = E(-1), s = B(null), m = B(null), p = B(null), b = te(), C = D(
|
|
1285
1285
|
() => {
|
|
1286
|
-
var
|
|
1286
|
+
var A;
|
|
1287
1287
|
return Array.from(
|
|
1288
|
-
((
|
|
1288
|
+
((A = m.current) == null ? void 0 : A.querySelectorAll(
|
|
1289
1289
|
"[role=menuitem]:not([aria-disabled=true]):not([disabled]),[role=menuitemcheckbox]:not([aria-disabled=true]):not([disabled]),[role=menuitemradio]:not([aria-disabled=true]):not([disabled])"
|
|
1290
1290
|
)) ?? []
|
|
1291
1291
|
);
|
|
1292
1292
|
},
|
|
1293
1293
|
[]
|
|
1294
|
-
),
|
|
1295
|
-
|
|
1296
|
-
var
|
|
1297
|
-
|
|
1298
|
-
},
|
|
1299
|
-
}, []),
|
|
1300
|
-
|
|
1301
|
-
}, []),
|
|
1302
|
-
o ?
|
|
1303
|
-
}, [o,
|
|
1304
|
-
|
|
1305
|
-
if (!
|
|
1306
|
-
const
|
|
1307
|
-
let
|
|
1308
|
-
t.startsWith("bottom") ? (
|
|
1309
|
-
var
|
|
1310
|
-
(
|
|
1294
|
+
), k = D(() => {
|
|
1295
|
+
l(!0), p.current = setTimeout(() => {
|
|
1296
|
+
var A;
|
|
1297
|
+
l(!1), f(!1), i(!1), _(-1), (A = s.current) == null || A.focus({ preventScroll: !0 });
|
|
1298
|
+
}, Mt);
|
|
1299
|
+
}, []), T = D(() => {
|
|
1300
|
+
p.current && (clearTimeout(p.current), p.current = null), l(!1), i(!0), f(!0);
|
|
1301
|
+
}, []), V = D(() => {
|
|
1302
|
+
o ? k() : T();
|
|
1303
|
+
}, [o, T, k]);
|
|
1304
|
+
$(() => {
|
|
1305
|
+
if (!c || !s.current) return;
|
|
1306
|
+
const A = s.current.getBoundingClientRect(), F = 4, S = window.scrollX, L = window.scrollY;
|
|
1307
|
+
let N = 0, R = 0;
|
|
1308
|
+
t.startsWith("bottom") ? (N = A.bottom + L + F, R = t === "bottom-start" ? A.left + S : A.right + S) : (N = A.top + L - F, R = t === "top-start" ? A.left + S : A.right + S), v({ top: N, left: R }), requestAnimationFrame(() => {
|
|
1309
|
+
var H;
|
|
1310
|
+
(H = C()[0]) == null || H.focus({ preventScroll: !0 }), _(0);
|
|
1311
1311
|
});
|
|
1312
|
-
}, [
|
|
1313
|
-
if (!
|
|
1314
|
-
const
|
|
1315
|
-
m.current && !m.current.contains(
|
|
1316
|
-
},
|
|
1317
|
-
var
|
|
1318
|
-
if (
|
|
1319
|
-
|
|
1312
|
+
}, [c, t, C]), $(() => {
|
|
1313
|
+
if (!c) return;
|
|
1314
|
+
const A = (S) => {
|
|
1315
|
+
m.current && !m.current.contains(S.target) && s.current && !s.current.contains(S.target) && k();
|
|
1316
|
+
}, F = (S) => {
|
|
1317
|
+
var L, N, R;
|
|
1318
|
+
if (S.key === "Escape") {
|
|
1319
|
+
k();
|
|
1320
1320
|
return;
|
|
1321
1321
|
}
|
|
1322
|
-
if (
|
|
1323
|
-
|
|
1324
|
-
const
|
|
1325
|
-
if (!
|
|
1326
|
-
const
|
|
1327
|
-
(
|
|
1322
|
+
if (S.key === "ArrowDown" || S.key === "ArrowUp") {
|
|
1323
|
+
S.preventDefault();
|
|
1324
|
+
const I = C();
|
|
1325
|
+
if (!I.length) return;
|
|
1326
|
+
const H = S.key === "ArrowDown" ? 1 : -1, ie = (h + H + I.length) % I.length;
|
|
1327
|
+
(L = I[ie]) == null || L.focus({ preventScroll: !0 }), _(ie);
|
|
1328
1328
|
}
|
|
1329
|
-
if (
|
|
1330
|
-
const
|
|
1331
|
-
(
|
|
1329
|
+
if (S.key === "Home" && ((N = C()[0]) == null || N.focus({ preventScroll: !0 }), _(0)), S.key === "End") {
|
|
1330
|
+
const I = C();
|
|
1331
|
+
(R = I[I.length - 1]) == null || R.focus({ preventScroll: !0 }), _(I.length - 1);
|
|
1332
1332
|
}
|
|
1333
1333
|
};
|
|
1334
|
-
return document.addEventListener("mousedown",
|
|
1335
|
-
document.removeEventListener("mousedown",
|
|
1334
|
+
return document.addEventListener("mousedown", A), document.addEventListener("keydown", F), () => {
|
|
1335
|
+
document.removeEventListener("mousedown", A), document.removeEventListener("keydown", F);
|
|
1336
1336
|
};
|
|
1337
|
-
}, [
|
|
1338
|
-
const
|
|
1339
|
-
ref:
|
|
1340
|
-
onClick: (
|
|
1341
|
-
var
|
|
1342
|
-
|
|
1337
|
+
}, [c, h, k, C]);
|
|
1338
|
+
const W = g.cloneElement(e, {
|
|
1339
|
+
ref: s,
|
|
1340
|
+
onClick: (A) => {
|
|
1341
|
+
var F, S;
|
|
1342
|
+
V(), (S = (F = e.props).onClick) == null || S.call(F, A);
|
|
1343
1343
|
},
|
|
1344
1344
|
"aria-expanded": o,
|
|
1345
1345
|
"aria-haspopup": "menu",
|
|
1346
|
-
"aria-controls":
|
|
1347
|
-
}),
|
|
1348
|
-
return /* @__PURE__ */
|
|
1349
|
-
|
|
1350
|
-
|
|
1346
|
+
"aria-controls": b
|
|
1347
|
+
}), j = t.endsWith("-end"), O = t.startsWith("top");
|
|
1348
|
+
return /* @__PURE__ */ x(ce.Provider, { value: { close: k }, children: [
|
|
1349
|
+
W,
|
|
1350
|
+
c && G.createPortal(
|
|
1351
1351
|
/* @__PURE__ */ n(
|
|
1352
1352
|
"div",
|
|
1353
1353
|
{
|
|
1354
1354
|
ref: m,
|
|
1355
|
-
id:
|
|
1355
|
+
id: b,
|
|
1356
1356
|
role: "menu",
|
|
1357
1357
|
"aria-orientation": "vertical",
|
|
1358
|
-
className:
|
|
1358
|
+
className: y(
|
|
1359
1359
|
"vyre-dropdown",
|
|
1360
|
-
|
|
1361
|
-
|
|
1360
|
+
j && "vyre-dropdown--end",
|
|
1361
|
+
O && "vyre-dropdown--top",
|
|
1362
1362
|
d && "vyre-dropdown--leaving",
|
|
1363
1363
|
a
|
|
1364
1364
|
),
|
|
1365
1365
|
style: {
|
|
1366
|
-
top:
|
|
1367
|
-
left:
|
|
1368
|
-
transform:
|
|
1366
|
+
top: u.top,
|
|
1367
|
+
left: u.left,
|
|
1368
|
+
transform: j ? "translateX(-100%)" : void 0
|
|
1369
1369
|
},
|
|
1370
1370
|
children: r
|
|
1371
1371
|
}
|
|
@@ -1374,13 +1374,13 @@ const ce = ee(null), xe = ee(null), Lt = 120, Mt = ({
|
|
|
1374
1374
|
)
|
|
1375
1375
|
] });
|
|
1376
1376
|
};
|
|
1377
|
-
|
|
1378
|
-
const
|
|
1377
|
+
Rt.displayName = "VyreDropdownMenu";
|
|
1378
|
+
const It = ({
|
|
1379
1379
|
children: e,
|
|
1380
1380
|
className: r
|
|
1381
|
-
}) => /* @__PURE__ */ n("div", { className:
|
|
1382
|
-
|
|
1383
|
-
const
|
|
1381
|
+
}) => /* @__PURE__ */ n("div", { className: y("vyre-dropdown__label", r), children: e });
|
|
1382
|
+
It.displayName = "VyreDropdownLabel";
|
|
1383
|
+
const Dt = ({
|
|
1384
1384
|
children: e,
|
|
1385
1385
|
onSelect: r,
|
|
1386
1386
|
disabled: t = !1,
|
|
@@ -1389,12 +1389,12 @@ const It = ({
|
|
|
1389
1389
|
shortcut: i,
|
|
1390
1390
|
className: d
|
|
1391
1391
|
}) => {
|
|
1392
|
-
const
|
|
1393
|
-
return /* @__PURE__ */
|
|
1392
|
+
const l = U(ce);
|
|
1393
|
+
return /* @__PURE__ */ x(
|
|
1394
1394
|
"button",
|
|
1395
1395
|
{
|
|
1396
1396
|
role: "menuitem",
|
|
1397
|
-
className:
|
|
1397
|
+
className: y(
|
|
1398
1398
|
"vyre-dropdown__item",
|
|
1399
1399
|
a === "danger" && "vyre-dropdown__item--danger",
|
|
1400
1400
|
d
|
|
@@ -1403,7 +1403,7 @@ const It = ({
|
|
|
1403
1403
|
disabled: t,
|
|
1404
1404
|
tabIndex: -1,
|
|
1405
1405
|
onClick: () => {
|
|
1406
|
-
t || (r == null || r(),
|
|
1406
|
+
t || (r == null || r(), l == null || l.close());
|
|
1407
1407
|
},
|
|
1408
1408
|
children: [
|
|
1409
1409
|
o && /* @__PURE__ */ n("span", { className: "vyre-dropdown__item-icon", "aria-hidden": "true", children: o }),
|
|
@@ -1413,8 +1413,8 @@ const It = ({
|
|
|
1413
1413
|
}
|
|
1414
1414
|
);
|
|
1415
1415
|
};
|
|
1416
|
-
|
|
1417
|
-
const
|
|
1416
|
+
Dt.displayName = "VyreDropdownItem";
|
|
1417
|
+
const Tt = ({
|
|
1418
1418
|
children: e,
|
|
1419
1419
|
checked: r,
|
|
1420
1420
|
onCheckedChange: t,
|
|
@@ -1423,7 +1423,7 @@ const St = ({
|
|
|
1423
1423
|
className: i
|
|
1424
1424
|
}) => {
|
|
1425
1425
|
const d = U(ce);
|
|
1426
|
-
return /* @__PURE__ */
|
|
1426
|
+
return /* @__PURE__ */ x(
|
|
1427
1427
|
"button",
|
|
1428
1428
|
{
|
|
1429
1429
|
role: "menuitemcheckbox",
|
|
@@ -1431,7 +1431,7 @@ const St = ({
|
|
|
1431
1431
|
"aria-disabled": a || void 0,
|
|
1432
1432
|
disabled: a,
|
|
1433
1433
|
tabIndex: -1,
|
|
1434
|
-
className:
|
|
1434
|
+
className: y("vyre-dropdown__item vyre-dropdown__item--checkbox", i),
|
|
1435
1435
|
onClick: () => {
|
|
1436
1436
|
a || (t(!r), d == null || d.close());
|
|
1437
1437
|
},
|
|
@@ -1443,21 +1443,21 @@ const St = ({
|
|
|
1443
1443
|
}
|
|
1444
1444
|
);
|
|
1445
1445
|
};
|
|
1446
|
-
|
|
1447
|
-
const
|
|
1446
|
+
Tt.displayName = "VyreDropdownCheckboxItem";
|
|
1447
|
+
const St = ({
|
|
1448
1448
|
value: e,
|
|
1449
1449
|
onValueChange: r,
|
|
1450
1450
|
children: t
|
|
1451
|
-
}) => /* @__PURE__ */ n(
|
|
1452
|
-
|
|
1451
|
+
}) => /* @__PURE__ */ n(Le.Provider, { value: { value: e, onValueChange: r }, children: /* @__PURE__ */ n("div", { role: "group", children: t }) });
|
|
1452
|
+
St.displayName = "VyreDropdownRadioGroup";
|
|
1453
1453
|
const Et = ({
|
|
1454
1454
|
children: e,
|
|
1455
1455
|
value: r,
|
|
1456
1456
|
disabled: t = !1,
|
|
1457
1457
|
className: a
|
|
1458
1458
|
}) => {
|
|
1459
|
-
const o = U(ce), i = U(
|
|
1460
|
-
return /* @__PURE__ */
|
|
1459
|
+
const o = U(ce), i = U(Le), d = (i == null ? void 0 : i.value) === r;
|
|
1460
|
+
return /* @__PURE__ */ x(
|
|
1461
1461
|
"button",
|
|
1462
1462
|
{
|
|
1463
1463
|
role: "menuitemradio",
|
|
@@ -1465,7 +1465,7 @@ const Et = ({
|
|
|
1465
1465
|
"aria-disabled": t || void 0,
|
|
1466
1466
|
disabled: t,
|
|
1467
1467
|
tabIndex: -1,
|
|
1468
|
-
className:
|
|
1468
|
+
className: y("vyre-dropdown__item vyre-dropdown__item--radio", a),
|
|
1469
1469
|
onClick: () => {
|
|
1470
1470
|
t || (i == null || i.onValueChange(r), o == null || o.close());
|
|
1471
1471
|
},
|
|
@@ -1477,7 +1477,7 @@ const Et = ({
|
|
|
1477
1477
|
);
|
|
1478
1478
|
};
|
|
1479
1479
|
Et.displayName = "VyreDropdownRadioItem";
|
|
1480
|
-
const
|
|
1480
|
+
const At = ({
|
|
1481
1481
|
trigger: e,
|
|
1482
1482
|
children: r,
|
|
1483
1483
|
icon: t,
|
|
@@ -1485,33 +1485,33 @@ const Dt = ({
|
|
|
1485
1485
|
disabled: o = !1,
|
|
1486
1486
|
className: i
|
|
1487
1487
|
}) => {
|
|
1488
|
-
const [d,
|
|
1489
|
-
if (!
|
|
1490
|
-
const m =
|
|
1491
|
-
|
|
1492
|
-
top: m.top +
|
|
1493
|
-
left: a === "right" ? m.right +
|
|
1494
|
-
}),
|
|
1495
|
-
}, [a]), _ =
|
|
1496
|
-
var
|
|
1497
|
-
const
|
|
1498
|
-
(
|
|
1488
|
+
const [d, l] = E(!1), [c, f] = E({ top: 0, left: 0 }), u = B(null), v = B(null), h = D(() => {
|
|
1489
|
+
if (!u.current) return;
|
|
1490
|
+
const m = u.current.getBoundingClientRect(), p = window.scrollX, b = window.scrollY, C = 2;
|
|
1491
|
+
f({
|
|
1492
|
+
top: m.top + b,
|
|
1493
|
+
left: a === "right" ? m.right + p + C : m.left + p - C
|
|
1494
|
+
}), l(!0);
|
|
1495
|
+
}, [a]), _ = D(() => l(!1), []), s = (m) => {
|
|
1496
|
+
var b;
|
|
1497
|
+
const p = m.relatedTarget;
|
|
1498
|
+
(b = v.current) != null && b.contains(p) || _();
|
|
1499
1499
|
};
|
|
1500
|
-
return /* @__PURE__ */
|
|
1501
|
-
/* @__PURE__ */
|
|
1500
|
+
return /* @__PURE__ */ x(de, { children: [
|
|
1501
|
+
/* @__PURE__ */ x(
|
|
1502
1502
|
"button",
|
|
1503
1503
|
{
|
|
1504
|
-
ref:
|
|
1504
|
+
ref: u,
|
|
1505
1505
|
role: "menuitem",
|
|
1506
1506
|
"aria-haspopup": "menu",
|
|
1507
1507
|
"aria-expanded": d,
|
|
1508
1508
|
"aria-disabled": o || void 0,
|
|
1509
1509
|
disabled: o,
|
|
1510
1510
|
tabIndex: -1,
|
|
1511
|
-
className:
|
|
1512
|
-
onMouseEnter:
|
|
1513
|
-
onMouseLeave:
|
|
1514
|
-
onFocus:
|
|
1511
|
+
className: y("vyre-dropdown__item vyre-dropdown__item--sub", i),
|
|
1512
|
+
onMouseEnter: h,
|
|
1513
|
+
onMouseLeave: s,
|
|
1514
|
+
onFocus: h,
|
|
1515
1515
|
children: [
|
|
1516
1516
|
t && /* @__PURE__ */ n("span", { className: "vyre-dropdown__item-icon", "aria-hidden": "true", children: t }),
|
|
1517
1517
|
/* @__PURE__ */ n("span", { className: "vyre-dropdown__item-label", children: e }),
|
|
@@ -1519,27 +1519,27 @@ const Dt = ({
|
|
|
1519
1519
|
]
|
|
1520
1520
|
}
|
|
1521
1521
|
),
|
|
1522
|
-
d &&
|
|
1522
|
+
d && G.createPortal(
|
|
1523
1523
|
/* @__PURE__ */ n(
|
|
1524
1524
|
"div",
|
|
1525
1525
|
{
|
|
1526
1526
|
ref: v,
|
|
1527
1527
|
role: "menu",
|
|
1528
|
-
className:
|
|
1528
|
+
className: y(
|
|
1529
1529
|
"vyre-dropdown vyre-dropdown--sub",
|
|
1530
1530
|
a === "left" && "vyre-dropdown--sub-left"
|
|
1531
1531
|
),
|
|
1532
1532
|
style: {
|
|
1533
1533
|
position: "absolute",
|
|
1534
|
-
top:
|
|
1535
|
-
left: a === "right" ?
|
|
1536
|
-
right: a === "left" ? `calc(100vw - ${
|
|
1534
|
+
top: c.top,
|
|
1535
|
+
left: a === "right" ? c.left : void 0,
|
|
1536
|
+
right: a === "left" ? `calc(100vw - ${c.left}px)` : void 0,
|
|
1537
1537
|
transform: a === "left" ? "translateX(-100%)" : void 0
|
|
1538
1538
|
},
|
|
1539
1539
|
onMouseLeave: (m) => {
|
|
1540
|
-
var
|
|
1541
|
-
const
|
|
1542
|
-
(
|
|
1540
|
+
var b;
|
|
1541
|
+
const p = m.relatedTarget;
|
|
1542
|
+
(b = u.current) != null && b.contains(p) || _();
|
|
1543
1543
|
},
|
|
1544
1544
|
children: r
|
|
1545
1545
|
}
|
|
@@ -1548,22 +1548,22 @@ const Dt = ({
|
|
|
1548
1548
|
)
|
|
1549
1549
|
] });
|
|
1550
1550
|
};
|
|
1551
|
-
|
|
1552
|
-
const
|
|
1553
|
-
|
|
1554
|
-
const
|
|
1551
|
+
At.displayName = "VyreDropdownSub";
|
|
1552
|
+
const Bt = ({ className: e }) => /* @__PURE__ */ n("div", { role: "separator", className: y("vyre-dropdown__separator", e) });
|
|
1553
|
+
Bt.displayName = "VyreDropdownSeparator";
|
|
1554
|
+
const Vt = () => /* @__PURE__ */ x("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
|
|
1555
1555
|
/* @__PURE__ */ n("circle", { cx: "8", cy: "8", r: "7", stroke: "currentColor", strokeWidth: "1.4" }),
|
|
1556
1556
|
/* @__PURE__ */ n("path", { d: "M8 7v4M8 5v.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
|
|
1557
|
-
] }),
|
|
1557
|
+
] }), $t = () => /* @__PURE__ */ x("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
|
|
1558
1558
|
/* @__PURE__ */ n("circle", { cx: "8", cy: "8", r: "7", stroke: "currentColor", strokeWidth: "1.4" }),
|
|
1559
1559
|
/* @__PURE__ */ n("path", { d: "M5 8l2 2 4-4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
1560
|
-
] }),
|
|
1560
|
+
] }), Wt = () => /* @__PURE__ */ x("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
|
|
1561
1561
|
/* @__PURE__ */ n("path", { d: "M8 2L14.5 13H1.5L8 2Z", stroke: "currentColor", strokeWidth: "1.4", strokeLinejoin: "round" }),
|
|
1562
1562
|
/* @__PURE__ */ n("path", { d: "M8 6v3M8 11v.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
|
|
1563
|
-
] }),
|
|
1563
|
+
] }), jt = () => /* @__PURE__ */ x("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
|
|
1564
1564
|
/* @__PURE__ */ n("circle", { cx: "8", cy: "8", r: "7", stroke: "currentColor", strokeWidth: "1.4" }),
|
|
1565
1565
|
/* @__PURE__ */ n("path", { d: "M6 6l4 4M10 6l-4 4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
|
|
1566
|
-
] }), Ce = { info:
|
|
1566
|
+
] }), Ce = { info: Vt, success: $t, warning: Wt, danger: jt }, Ht = ({
|
|
1567
1567
|
variant: e = "info",
|
|
1568
1568
|
title: r,
|
|
1569
1569
|
icon: t,
|
|
@@ -1572,14 +1572,14 @@ const Bt = () => /* @__PURE__ */ N("svg", { width: "16", height: "16", viewBox:
|
|
|
1572
1572
|
className: i
|
|
1573
1573
|
}) => {
|
|
1574
1574
|
const d = Ce[e];
|
|
1575
|
-
return /* @__PURE__ */
|
|
1575
|
+
return /* @__PURE__ */ x(
|
|
1576
1576
|
"div",
|
|
1577
1577
|
{
|
|
1578
1578
|
role: "alert",
|
|
1579
|
-
className:
|
|
1579
|
+
className: y("vyre-alert", `vyre-alert--${e}`, i),
|
|
1580
1580
|
children: [
|
|
1581
1581
|
/* @__PURE__ */ n("span", { className: "vyre-alert__icon", "aria-hidden": "true", children: t ?? /* @__PURE__ */ n(d, {}) }),
|
|
1582
|
-
/* @__PURE__ */
|
|
1582
|
+
/* @__PURE__ */ x("div", { className: "vyre-alert__body", children: [
|
|
1583
1583
|
r && /* @__PURE__ */ n("p", { className: "vyre-alert__title", children: r }),
|
|
1584
1584
|
o && /* @__PURE__ */ n("div", { className: "vyre-alert__description", children: o })
|
|
1585
1585
|
] }),
|
|
@@ -1597,11 +1597,11 @@ const Bt = () => /* @__PURE__ */ N("svg", { width: "16", height: "16", viewBox:
|
|
|
1597
1597
|
}
|
|
1598
1598
|
);
|
|
1599
1599
|
};
|
|
1600
|
-
|
|
1601
|
-
const
|
|
1600
|
+
Ht.displayName = "VyreAlert";
|
|
1601
|
+
const Ft = [
|
|
1602
1602
|
"button:not([disabled])",
|
|
1603
1603
|
'[tabindex]:not([tabindex="-1"])'
|
|
1604
|
-
].join(","),
|
|
1604
|
+
].join(","), Ot = ({
|
|
1605
1605
|
open: e,
|
|
1606
1606
|
onOpenChange: r,
|
|
1607
1607
|
title: t,
|
|
@@ -1609,70 +1609,70 @@ const Ht = [
|
|
|
1609
1609
|
variant: o = "danger",
|
|
1610
1610
|
confirmLabel: i = "Confirm",
|
|
1611
1611
|
cancelLabel: d = "Cancel",
|
|
1612
|
-
onConfirm:
|
|
1613
|
-
onCancel:
|
|
1614
|
-
className:
|
|
1612
|
+
onConfirm: l,
|
|
1613
|
+
onCancel: c,
|
|
1614
|
+
className: f
|
|
1615
1615
|
}) => {
|
|
1616
|
-
const
|
|
1616
|
+
const u = B(null), v = B(null), h = B(null), _ = D(() => {
|
|
1617
|
+
c == null || c(), r(!1);
|
|
1618
|
+
}, [c, r]), s = D(() => {
|
|
1617
1619
|
l == null || l(), r(!1);
|
|
1618
|
-
}, [l, r]),
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
if (
|
|
1622
|
-
const
|
|
1623
|
-
if (!
|
|
1624
|
-
const
|
|
1625
|
-
|
|
1626
|
-
const B = L[0], $ = L[L.length - 1];
|
|
1627
|
-
f.shiftKey && document.activeElement === B ? (f.preventDefault(), $.focus()) : !f.shiftKey && document.activeElement === $ && (f.preventDefault(), B.focus());
|
|
1620
|
+
}, [l, r]), m = D((b) => {
|
|
1621
|
+
if (b.key !== "Tab") return;
|
|
1622
|
+
const C = u.current;
|
|
1623
|
+
if (!C) return;
|
|
1624
|
+
const k = Array.from(C.querySelectorAll(Ft));
|
|
1625
|
+
if (!k.length) return;
|
|
1626
|
+
const T = k[0], V = k[k.length - 1];
|
|
1627
|
+
b.shiftKey && document.activeElement === T ? (b.preventDefault(), V.focus()) : !b.shiftKey && document.activeElement === V && (b.preventDefault(), T.focus());
|
|
1628
1628
|
}, []);
|
|
1629
|
-
if (
|
|
1629
|
+
if ($(() => {
|
|
1630
1630
|
if (!e) return;
|
|
1631
1631
|
document.addEventListener("keydown", m);
|
|
1632
|
-
const
|
|
1632
|
+
const b = document.body.style.overflow;
|
|
1633
1633
|
document.body.style.overflow = "hidden";
|
|
1634
|
-
const
|
|
1635
|
-
|
|
1634
|
+
const C = (k) => {
|
|
1635
|
+
k.key === "Escape" && _();
|
|
1636
1636
|
};
|
|
1637
|
-
return document.addEventListener("keydown",
|
|
1638
|
-
var
|
|
1639
|
-
return (
|
|
1637
|
+
return document.addEventListener("keydown", C), setTimeout(() => {
|
|
1638
|
+
var k;
|
|
1639
|
+
return (k = h.current) == null ? void 0 : k.focus();
|
|
1640
1640
|
}, 0), () => {
|
|
1641
|
-
document.removeEventListener("keydown", m), document.removeEventListener("keydown",
|
|
1641
|
+
document.removeEventListener("keydown", m), document.removeEventListener("keydown", C), document.body.style.overflow = b;
|
|
1642
1642
|
};
|
|
1643
1643
|
}, [e, m, _]), !e) return null;
|
|
1644
|
-
const
|
|
1645
|
-
return
|
|
1644
|
+
const p = Ce[o];
|
|
1645
|
+
return G.createPortal(
|
|
1646
1646
|
/* @__PURE__ */ n(
|
|
1647
1647
|
"div",
|
|
1648
1648
|
{
|
|
1649
1649
|
ref: v,
|
|
1650
1650
|
className: "vyre-alert-dialog-backdrop",
|
|
1651
|
-
onClick: (
|
|
1652
|
-
|
|
1651
|
+
onClick: (b) => {
|
|
1652
|
+
b.target === v.current && _();
|
|
1653
1653
|
},
|
|
1654
1654
|
role: "presentation",
|
|
1655
|
-
children: /* @__PURE__ */
|
|
1655
|
+
children: /* @__PURE__ */ x(
|
|
1656
1656
|
"div",
|
|
1657
1657
|
{
|
|
1658
|
-
ref:
|
|
1658
|
+
ref: u,
|
|
1659
1659
|
role: "alertdialog",
|
|
1660
1660
|
"aria-modal": "true",
|
|
1661
1661
|
"aria-labelledby": "vyre-ad-title",
|
|
1662
1662
|
"aria-describedby": a ? "vyre-ad-desc" : void 0,
|
|
1663
|
-
className:
|
|
1663
|
+
className: y("vyre-alert-dialog", `vyre-alert-dialog--${o}`, f),
|
|
1664
1664
|
tabIndex: -1,
|
|
1665
1665
|
children: [
|
|
1666
|
-
/* @__PURE__ */ n("div", { className: "vyre-alert-dialog__icon-wrap", children: /* @__PURE__ */ n("span", { className:
|
|
1667
|
-
/* @__PURE__ */
|
|
1666
|
+
/* @__PURE__ */ n("div", { className: "vyre-alert-dialog__icon-wrap", children: /* @__PURE__ */ n("span", { className: y("vyre-alert-dialog__icon", `vyre-alert-dialog__icon--${o}`), children: /* @__PURE__ */ n(p, {}) }) }),
|
|
1667
|
+
/* @__PURE__ */ x("div", { className: "vyre-alert-dialog__body", children: [
|
|
1668
1668
|
/* @__PURE__ */ n("h2", { id: "vyre-ad-title", className: "vyre-alert-dialog__title", children: t }),
|
|
1669
1669
|
a && /* @__PURE__ */ n("p", { id: "vyre-ad-desc", className: "vyre-alert-dialog__description", children: a })
|
|
1670
1670
|
] }),
|
|
1671
|
-
/* @__PURE__ */
|
|
1671
|
+
/* @__PURE__ */ x("div", { className: "vyre-alert-dialog__footer", children: [
|
|
1672
1672
|
/* @__PURE__ */ n(
|
|
1673
1673
|
"button",
|
|
1674
1674
|
{
|
|
1675
|
-
ref:
|
|
1675
|
+
ref: h,
|
|
1676
1676
|
type: "button",
|
|
1677
1677
|
className: "vyre-btn vyre-btn--ghost vyre-btn--sm",
|
|
1678
1678
|
onClick: _,
|
|
@@ -1683,13 +1683,13 @@ const Ht = [
|
|
|
1683
1683
|
"button",
|
|
1684
1684
|
{
|
|
1685
1685
|
type: "button",
|
|
1686
|
-
className:
|
|
1686
|
+
className: y(
|
|
1687
1687
|
"vyre-btn vyre-btn--sm",
|
|
1688
1688
|
o === "danger" && "vyre-btn--danger",
|
|
1689
1689
|
o === "warning" && "vyre-btn--primary",
|
|
1690
1690
|
o === "info" && "vyre-btn--accent"
|
|
1691
1691
|
),
|
|
1692
|
-
onClick:
|
|
1692
|
+
onClick: s,
|
|
1693
1693
|
children: i
|
|
1694
1694
|
}
|
|
1695
1695
|
)
|
|
@@ -1702,15 +1702,15 @@ const Ht = [
|
|
|
1702
1702
|
document.body
|
|
1703
1703
|
);
|
|
1704
1704
|
};
|
|
1705
|
-
|
|
1706
|
-
const
|
|
1705
|
+
Ot.displayName = "VyreAlertDialog";
|
|
1706
|
+
const Kt = [
|
|
1707
1707
|
"a[href]",
|
|
1708
1708
|
"button:not([disabled])",
|
|
1709
1709
|
"textarea:not([disabled])",
|
|
1710
1710
|
"input:not([disabled])",
|
|
1711
1711
|
"select:not([disabled])",
|
|
1712
1712
|
'[tabindex]:not([tabindex="-1"])'
|
|
1713
|
-
].join(","),
|
|
1713
|
+
].join(","), qt = g.forwardRef(
|
|
1714
1714
|
({
|
|
1715
1715
|
open: e,
|
|
1716
1716
|
onClose: r,
|
|
@@ -1719,43 +1719,43 @@ const Ot = [
|
|
|
1719
1719
|
closeOnBackdrop: o = !0,
|
|
1720
1720
|
closeOnEsc: i = !0,
|
|
1721
1721
|
className: d,
|
|
1722
|
-
children:
|
|
1723
|
-
"aria-label":
|
|
1724
|
-
"aria-labelledby":
|
|
1725
|
-
...
|
|
1722
|
+
children: l,
|
|
1723
|
+
"aria-label": c,
|
|
1724
|
+
"aria-labelledby": f,
|
|
1725
|
+
...u
|
|
1726
1726
|
}, v) => {
|
|
1727
|
-
const
|
|
1727
|
+
const h = B(null), _ = B(null), s = D((m) => {
|
|
1728
1728
|
if (m.key !== "Tab") return;
|
|
1729
|
-
const
|
|
1730
|
-
if (!
|
|
1731
|
-
const
|
|
1732
|
-
if (!
|
|
1733
|
-
const
|
|
1734
|
-
m.shiftKey && document.activeElement ===
|
|
1729
|
+
const p = h.current;
|
|
1730
|
+
if (!p) return;
|
|
1731
|
+
const b = Array.from(p.querySelectorAll(Kt));
|
|
1732
|
+
if (!b.length) return;
|
|
1733
|
+
const C = b[0], k = b[b.length - 1];
|
|
1734
|
+
m.shiftKey && document.activeElement === C ? (m.preventDefault(), k.focus()) : !m.shiftKey && document.activeElement === k && (m.preventDefault(), C.focus());
|
|
1735
1735
|
}, []);
|
|
1736
|
-
return
|
|
1736
|
+
return $(() => {
|
|
1737
1737
|
if (!e) return;
|
|
1738
|
-
if (document.addEventListener("keydown",
|
|
1739
|
-
const
|
|
1740
|
-
|
|
1738
|
+
if (document.addEventListener("keydown", s), i) {
|
|
1739
|
+
const p = (C) => {
|
|
1740
|
+
C.key === "Escape" && r();
|
|
1741
1741
|
};
|
|
1742
|
-
document.addEventListener("keydown",
|
|
1743
|
-
const
|
|
1742
|
+
document.addEventListener("keydown", p);
|
|
1743
|
+
const b = document.body.style.overflow;
|
|
1744
1744
|
return document.body.style.overflow = "hidden", setTimeout(() => {
|
|
1745
|
-
var
|
|
1746
|
-
return (
|
|
1745
|
+
var C;
|
|
1746
|
+
return (C = h.current) == null ? void 0 : C.focus();
|
|
1747
1747
|
}, 0), () => {
|
|
1748
|
-
document.removeEventListener("keydown",
|
|
1748
|
+
document.removeEventListener("keydown", s), document.removeEventListener("keydown", p), document.body.style.overflow = b;
|
|
1749
1749
|
};
|
|
1750
1750
|
}
|
|
1751
1751
|
const m = document.body.style.overflow;
|
|
1752
1752
|
return document.body.style.overflow = "hidden", setTimeout(() => {
|
|
1753
|
-
var
|
|
1754
|
-
return (
|
|
1753
|
+
var p;
|
|
1754
|
+
return (p = h.current) == null ? void 0 : p.focus();
|
|
1755
1755
|
}, 0), () => {
|
|
1756
|
-
document.removeEventListener("keydown",
|
|
1756
|
+
document.removeEventListener("keydown", s), document.body.style.overflow = m;
|
|
1757
1757
|
};
|
|
1758
|
-
}, [e,
|
|
1758
|
+
}, [e, s, i, r]), e ? G.createPortal(
|
|
1759
1759
|
/* @__PURE__ */ n(
|
|
1760
1760
|
"div",
|
|
1761
1761
|
{
|
|
@@ -1769,21 +1769,21 @@ const Ot = [
|
|
|
1769
1769
|
"div",
|
|
1770
1770
|
{
|
|
1771
1771
|
ref: (m) => {
|
|
1772
|
-
|
|
1772
|
+
h.current = m, typeof v == "function" ? v(m) : v && (v.current = m);
|
|
1773
1773
|
},
|
|
1774
1774
|
role: "dialog",
|
|
1775
1775
|
"aria-modal": "true",
|
|
1776
|
-
"aria-label":
|
|
1777
|
-
"aria-labelledby":
|
|
1776
|
+
"aria-label": c,
|
|
1777
|
+
"aria-labelledby": f,
|
|
1778
1778
|
tabIndex: -1,
|
|
1779
|
-
className:
|
|
1779
|
+
className: y(
|
|
1780
1780
|
"vyre-sheet",
|
|
1781
1781
|
`vyre-sheet--${t}`,
|
|
1782
1782
|
`vyre-sheet--${a}`,
|
|
1783
1783
|
d
|
|
1784
1784
|
),
|
|
1785
|
-
...
|
|
1786
|
-
children:
|
|
1785
|
+
...u,
|
|
1786
|
+
children: l
|
|
1787
1787
|
}
|
|
1788
1788
|
)
|
|
1789
1789
|
}
|
|
@@ -1792,17 +1792,17 @@ const Ot = [
|
|
|
1792
1792
|
) : null;
|
|
1793
1793
|
}
|
|
1794
1794
|
);
|
|
1795
|
-
|
|
1796
|
-
const
|
|
1797
|
-
({ className: e, children: r, ...t }, a) => /* @__PURE__ */ n("div", { ref: a, className:
|
|
1795
|
+
qt.displayName = "VyreSheet";
|
|
1796
|
+
const Pt = g.forwardRef(
|
|
1797
|
+
({ className: e, children: r, ...t }, a) => /* @__PURE__ */ n("div", { ref: a, className: y("vyre-sheet__header", e), ...t, children: r })
|
|
1798
1798
|
);
|
|
1799
|
-
|
|
1800
|
-
const
|
|
1801
|
-
({ className: e, children: r, ...t }, a) => /* @__PURE__ */ n("div", { ref: a, className:
|
|
1799
|
+
Pt.displayName = "VyreSheetHeader";
|
|
1800
|
+
const Gt = g.forwardRef(
|
|
1801
|
+
({ className: e, children: r, ...t }, a) => /* @__PURE__ */ n("div", { ref: a, className: y("vyre-sheet__body", e), ...t, children: r })
|
|
1802
1802
|
);
|
|
1803
|
-
|
|
1804
|
-
const Yt =
|
|
1805
|
-
({ className: e, children: r, ...t }, a) => /* @__PURE__ */ n("div", { ref: a, className:
|
|
1803
|
+
Gt.displayName = "VyreSheetBody";
|
|
1804
|
+
const Yt = g.forwardRef(
|
|
1805
|
+
({ className: e, children: r, ...t }, a) => /* @__PURE__ */ n("div", { ref: a, className: y("vyre-sheet__footer", e), ...t, children: r })
|
|
1806
1806
|
);
|
|
1807
1807
|
Yt.displayName = "VyreSheetFooter";
|
|
1808
1808
|
const Ut = ({
|
|
@@ -1810,14 +1810,14 @@ const Ut = ({
|
|
|
1810
1810
|
separator: r = "/",
|
|
1811
1811
|
className: t
|
|
1812
1812
|
}) => {
|
|
1813
|
-
const a =
|
|
1814
|
-
return /* @__PURE__ */ n("nav", { "aria-label": "Breadcrumb", className:
|
|
1813
|
+
const a = g.Children.toArray(e).filter(Boolean);
|
|
1814
|
+
return /* @__PURE__ */ n("nav", { "aria-label": "Breadcrumb", className: y("vyre-breadcrumb", t), children: /* @__PURE__ */ n("ol", { className: "vyre-breadcrumb__list", children: a.map((o, i) => /* @__PURE__ */ x("li", { className: "vyre-breadcrumb__item", children: [
|
|
1815
1815
|
o,
|
|
1816
1816
|
i < a.length - 1 && /* @__PURE__ */ n("span", { className: "vyre-breadcrumb__separator", "aria-hidden": "true", children: r })
|
|
1817
1817
|
] }, i)) }) });
|
|
1818
1818
|
};
|
|
1819
1819
|
Ut.displayName = "VyreBreadcrumb";
|
|
1820
|
-
const
|
|
1820
|
+
const Xt = ({
|
|
1821
1821
|
children: e,
|
|
1822
1822
|
href: r,
|
|
1823
1823
|
current: t = !1,
|
|
@@ -1825,29 +1825,29 @@ const Gt = ({
|
|
|
1825
1825
|
}) => t || !r ? /* @__PURE__ */ n(
|
|
1826
1826
|
"span",
|
|
1827
1827
|
{
|
|
1828
|
-
className:
|
|
1828
|
+
className: y("vyre-breadcrumb__link vyre-breadcrumb__link--current", a),
|
|
1829
1829
|
"aria-current": t ? "page" : void 0,
|
|
1830
1830
|
children: e
|
|
1831
1831
|
}
|
|
1832
|
-
) : /* @__PURE__ */ n("a", { href: r, className:
|
|
1833
|
-
|
|
1834
|
-
const
|
|
1835
|
-
|
|
1836
|
-
const
|
|
1832
|
+
) : /* @__PURE__ */ n("a", { href: r, className: y("vyre-breadcrumb__link", a), children: e });
|
|
1833
|
+
Xt.displayName = "VyreBreadcrumbItem";
|
|
1834
|
+
const zt = ({ children: e, href: r, className: t }) => /* @__PURE__ */ n("a", { href: r, className: y("vyre-breadcrumb__link", t), children: e });
|
|
1835
|
+
zt.displayName = "VyreBreadcrumbLink";
|
|
1836
|
+
const Zt = ({
|
|
1837
1837
|
children: e = "/",
|
|
1838
1838
|
className: r
|
|
1839
|
-
}) => /* @__PURE__ */ n("span", { className:
|
|
1840
|
-
|
|
1839
|
+
}) => /* @__PURE__ */ n("span", { className: y("vyre-breadcrumb__separator", r), "aria-hidden": "true", children: e });
|
|
1840
|
+
Zt.displayName = "VyreBreadcrumbSeparator";
|
|
1841
1841
|
function he(e, r) {
|
|
1842
1842
|
return Array.from({ length: r - e + 1 }, (t, a) => e + a);
|
|
1843
1843
|
}
|
|
1844
|
-
function
|
|
1844
|
+
function Jt(e, r, t) {
|
|
1845
1845
|
const a = t * 2 + 5;
|
|
1846
1846
|
if (r <= a) return he(1, r);
|
|
1847
|
-
const o = Math.max(e - t, 2), i = Math.min(e + t, r - 1), d = o > 2,
|
|
1848
|
-
return d &&
|
|
1847
|
+
const o = Math.max(e - t, 2), i = Math.min(e + t, r - 1), d = o > 2, l = i < r - 1, c = [1];
|
|
1848
|
+
return d && c.push("..."), c.push(...he(o, i)), l && c.push("..."), c.push(r), c;
|
|
1849
1849
|
}
|
|
1850
|
-
const
|
|
1850
|
+
const Qt = () => /* @__PURE__ */ n("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ n("path", { d: "M9 2L4 7l5 5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }), er = () => /* @__PURE__ */ n("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ n("path", { d: "M5 2l5 5-5 5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }), tr = () => /* @__PURE__ */ n("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ n("path", { d: "M7 2L2 7l5 5M12 2L7 7l5 5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }), rr = () => /* @__PURE__ */ n("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ n("path", { d: "M2 2l5 5-5 5M7 2l5 5-5 5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }), nr = ({
|
|
1851
1851
|
page: e,
|
|
1852
1852
|
totalPages: r,
|
|
1853
1853
|
onPageChange: t,
|
|
@@ -1855,25 +1855,25 @@ const Jt = () => /* @__PURE__ */ n("svg", { width: "14", height: "14", viewBox:
|
|
|
1855
1855
|
showEdges: o = !0,
|
|
1856
1856
|
showInfo: i = !1,
|
|
1857
1857
|
totalItems: d,
|
|
1858
|
-
pageSize:
|
|
1859
|
-
className:
|
|
1858
|
+
pageSize: l,
|
|
1859
|
+
className: c
|
|
1860
1860
|
}) => {
|
|
1861
|
-
const
|
|
1861
|
+
const f = Jt(e, r, a), u = e > 1, v = e < r, h = g.useMemo(() => {
|
|
1862
1862
|
if (!i) return null;
|
|
1863
|
-
if (d != null &&
|
|
1864
|
-
const
|
|
1865
|
-
return `Showing ${
|
|
1863
|
+
if (d != null && l != null) {
|
|
1864
|
+
const s = (e - 1) * l + 1, m = Math.min(e * l, d);
|
|
1865
|
+
return `Showing ${s}–${m} of ${d}`;
|
|
1866
1866
|
}
|
|
1867
1867
|
return `Page ${e} of ${r}`;
|
|
1868
|
-
}, [i, e, r, d,
|
|
1868
|
+
}, [i, e, r, d, l]), _ = /* @__PURE__ */ x(de, { children: [
|
|
1869
1869
|
o && /* @__PURE__ */ n(
|
|
1870
1870
|
"button",
|
|
1871
1871
|
{
|
|
1872
1872
|
className: "vyre-pagination__nav",
|
|
1873
1873
|
onClick: () => t(1),
|
|
1874
|
-
disabled: !
|
|
1874
|
+
disabled: !u,
|
|
1875
1875
|
"aria-label": "First page",
|
|
1876
|
-
children: /* @__PURE__ */ n(
|
|
1876
|
+
children: /* @__PURE__ */ n(tr, {})
|
|
1877
1877
|
}
|
|
1878
1878
|
),
|
|
1879
1879
|
/* @__PURE__ */ n(
|
|
@@ -1881,25 +1881,25 @@ const Jt = () => /* @__PURE__ */ n("svg", { width: "14", height: "14", viewBox:
|
|
|
1881
1881
|
{
|
|
1882
1882
|
className: "vyre-pagination__nav",
|
|
1883
1883
|
onClick: () => t(e - 1),
|
|
1884
|
-
disabled: !
|
|
1884
|
+
disabled: !u,
|
|
1885
1885
|
"aria-label": "Previous page",
|
|
1886
|
-
children: /* @__PURE__ */ n(
|
|
1886
|
+
children: /* @__PURE__ */ n(Qt, {})
|
|
1887
1887
|
}
|
|
1888
1888
|
),
|
|
1889
|
-
/* @__PURE__ */ n("ol", { className: "vyre-pagination__list", children:
|
|
1890
|
-
(
|
|
1889
|
+
/* @__PURE__ */ n("ol", { className: "vyre-pagination__list", children: f.map(
|
|
1890
|
+
(s, m) => s === "..." ? /* @__PURE__ */ n("li", { children: /* @__PURE__ */ n("span", { className: "vyre-pagination__dots", "aria-hidden": "true", children: "···" }) }, `dots-${m}`) : /* @__PURE__ */ n("li", { children: /* @__PURE__ */ n(
|
|
1891
1891
|
"button",
|
|
1892
1892
|
{
|
|
1893
|
-
className:
|
|
1893
|
+
className: y(
|
|
1894
1894
|
"vyre-pagination__btn",
|
|
1895
|
-
|
|
1895
|
+
s === e && "vyre-pagination__btn--active"
|
|
1896
1896
|
),
|
|
1897
|
-
onClick: () => t(
|
|
1898
|
-
"aria-label": `Page ${
|
|
1899
|
-
"aria-current":
|
|
1900
|
-
children:
|
|
1897
|
+
onClick: () => t(s),
|
|
1898
|
+
"aria-label": `Page ${s}`,
|
|
1899
|
+
"aria-current": s === e ? "page" : void 0,
|
|
1900
|
+
children: s
|
|
1901
1901
|
}
|
|
1902
|
-
) },
|
|
1902
|
+
) }, s)
|
|
1903
1903
|
) }),
|
|
1904
1904
|
/* @__PURE__ */ n(
|
|
1905
1905
|
"button",
|
|
@@ -1908,7 +1908,7 @@ const Jt = () => /* @__PURE__ */ n("svg", { width: "14", height: "14", viewBox:
|
|
|
1908
1908
|
onClick: () => t(e + 1),
|
|
1909
1909
|
disabled: !v,
|
|
1910
1910
|
"aria-label": "Next page",
|
|
1911
|
-
children: /* @__PURE__ */ n(
|
|
1911
|
+
children: /* @__PURE__ */ n(er, {})
|
|
1912
1912
|
}
|
|
1913
1913
|
),
|
|
1914
1914
|
o && /* @__PURE__ */ n(
|
|
@@ -1918,17 +1918,17 @@ const Jt = () => /* @__PURE__ */ n("svg", { width: "14", height: "14", viewBox:
|
|
|
1918
1918
|
onClick: () => t(r),
|
|
1919
1919
|
disabled: !v,
|
|
1920
1920
|
"aria-label": "Last page",
|
|
1921
|
-
children: /* @__PURE__ */ n(
|
|
1921
|
+
children: /* @__PURE__ */ n(rr, {})
|
|
1922
1922
|
}
|
|
1923
1923
|
)
|
|
1924
1924
|
] });
|
|
1925
|
-
return i ? /* @__PURE__ */
|
|
1926
|
-
/* @__PURE__ */ n("span", { className: "vyre-pagination__info", children:
|
|
1925
|
+
return i ? /* @__PURE__ */ x("div", { className: y("vyre-pagination-row", c), children: [
|
|
1926
|
+
/* @__PURE__ */ n("span", { className: "vyre-pagination__info", children: h }),
|
|
1927
1927
|
/* @__PURE__ */ n("nav", { "aria-label": "Pagination", className: "vyre-pagination", children: _ })
|
|
1928
|
-
] }) : /* @__PURE__ */ n("nav", { "aria-label": "Pagination", className:
|
|
1928
|
+
] }) : /* @__PURE__ */ n("nav", { "aria-label": "Pagination", className: y("vyre-pagination", c), children: _ });
|
|
1929
1929
|
};
|
|
1930
|
-
|
|
1931
|
-
const
|
|
1930
|
+
nr.displayName = "VyrePagination";
|
|
1931
|
+
const ar = ({
|
|
1932
1932
|
children: e,
|
|
1933
1933
|
striped: r = !1,
|
|
1934
1934
|
bordered: t = !1,
|
|
@@ -1938,7 +1938,7 @@ const nr = ({
|
|
|
1938
1938
|
}) => /* @__PURE__ */ n("div", { className: "vyre-table-wrapper", children: /* @__PURE__ */ n(
|
|
1939
1939
|
"table",
|
|
1940
1940
|
{
|
|
1941
|
-
className:
|
|
1941
|
+
className: y(
|
|
1942
1942
|
"vyre-table",
|
|
1943
1943
|
r && "vyre-table--striped",
|
|
1944
1944
|
t && "vyre-table--bordered",
|
|
@@ -1949,24 +1949,24 @@ const nr = ({
|
|
|
1949
1949
|
children: e
|
|
1950
1950
|
}
|
|
1951
1951
|
) });
|
|
1952
|
-
|
|
1953
|
-
const
|
|
1954
|
-
|
|
1955
|
-
const
|
|
1956
|
-
|
|
1957
|
-
const
|
|
1952
|
+
ar.displayName = "VyreTable";
|
|
1953
|
+
const or = g.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ n("thead", { ref: t, className: y("vyre-table__head", e), ...r }));
|
|
1954
|
+
or.displayName = "VyreTableHead";
|
|
1955
|
+
const ir = g.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ n("tbody", { ref: t, className: y("vyre-table__body", e), ...r }));
|
|
1956
|
+
ir.displayName = "VyreTableBody";
|
|
1957
|
+
const sr = g.forwardRef(
|
|
1958
1958
|
({ className: e, selected: r, ...t }, a) => /* @__PURE__ */ n(
|
|
1959
1959
|
"tr",
|
|
1960
1960
|
{
|
|
1961
1961
|
ref: a,
|
|
1962
|
-
className:
|
|
1962
|
+
className: y("vyre-table__row", r && "vyre-table__row--selected", e),
|
|
1963
1963
|
"aria-selected": r,
|
|
1964
1964
|
...t
|
|
1965
1965
|
}
|
|
1966
1966
|
)
|
|
1967
1967
|
);
|
|
1968
|
-
|
|
1969
|
-
const
|
|
1968
|
+
sr.displayName = "VyreTableRow";
|
|
1969
|
+
const lr = ({ dir: e }) => /* @__PURE__ */ n("span", { className: "vyre-table__sort-icon", "aria-hidden": "true", children: /* @__PURE__ */ x("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", children: [
|
|
1970
1970
|
/* @__PURE__ */ n(
|
|
1971
1971
|
"path",
|
|
1972
1972
|
{
|
|
@@ -1989,12 +1989,12 @@ const sr = ({ dir: e }) => /* @__PURE__ */ n("span", { className: "vyre-table__s
|
|
|
1989
1989
|
opacity: e === "asc" ? 0.3 : 1
|
|
1990
1990
|
}
|
|
1991
1991
|
)
|
|
1992
|
-
] }) }),
|
|
1993
|
-
({ className: e, sortable: r, sortDir: t = null, onSort: a, align: o = "left", children: i, ...d },
|
|
1992
|
+
] }) }), dr = g.forwardRef(
|
|
1993
|
+
({ className: e, sortable: r, sortDir: t = null, onSort: a, align: o = "left", children: i, ...d }, l) => r ? /* @__PURE__ */ n(
|
|
1994
1994
|
"th",
|
|
1995
1995
|
{
|
|
1996
|
-
ref:
|
|
1997
|
-
className:
|
|
1996
|
+
ref: l,
|
|
1997
|
+
className: y(
|
|
1998
1998
|
"vyre-table__th vyre-table__th--sortable",
|
|
1999
1999
|
`vyre-table__th--${o}`,
|
|
2000
2000
|
t && `vyre-table__th--sort-${t}`,
|
|
@@ -2002,81 +2002,81 @@ const sr = ({ dir: e }) => /* @__PURE__ */ n("span", { className: "vyre-table__s
|
|
|
2002
2002
|
),
|
|
2003
2003
|
"aria-sort": t === "asc" ? "ascending" : t === "desc" ? "descending" : "none",
|
|
2004
2004
|
...d,
|
|
2005
|
-
children: /* @__PURE__ */
|
|
2005
|
+
children: /* @__PURE__ */ x("button", { className: "vyre-table__sort-btn", onClick: a, type: "button", children: [
|
|
2006
2006
|
i,
|
|
2007
|
-
/* @__PURE__ */ n(
|
|
2007
|
+
/* @__PURE__ */ n(lr, { dir: t })
|
|
2008
2008
|
] })
|
|
2009
2009
|
}
|
|
2010
2010
|
) : /* @__PURE__ */ n(
|
|
2011
2011
|
"th",
|
|
2012
2012
|
{
|
|
2013
|
-
ref:
|
|
2014
|
-
className:
|
|
2013
|
+
ref: l,
|
|
2014
|
+
className: y("vyre-table__th", `vyre-table__th--${o}`, e),
|
|
2015
2015
|
...d,
|
|
2016
2016
|
children: i
|
|
2017
2017
|
}
|
|
2018
2018
|
)
|
|
2019
2019
|
);
|
|
2020
|
-
|
|
2021
|
-
const
|
|
2020
|
+
dr.displayName = "VyreTableHeader";
|
|
2021
|
+
const cr = g.forwardRef(
|
|
2022
2022
|
({ className: e, align: r = "left", ...t }, a) => /* @__PURE__ */ n(
|
|
2023
2023
|
"td",
|
|
2024
2024
|
{
|
|
2025
2025
|
ref: a,
|
|
2026
|
-
className:
|
|
2026
|
+
className: y("vyre-table__td", `vyre-table__td--${r}`, e),
|
|
2027
2027
|
...t
|
|
2028
2028
|
}
|
|
2029
2029
|
)
|
|
2030
2030
|
);
|
|
2031
|
-
|
|
2032
|
-
const
|
|
2033
|
-
|
|
2034
|
-
const
|
|
2035
|
-
const e = U(
|
|
2031
|
+
cr.displayName = "VyreTableCell";
|
|
2032
|
+
const ur = g.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ n("caption", { ref: t, className: y("vyre-table__caption", e), ...r }));
|
|
2033
|
+
ur.displayName = "VyreTableCaption";
|
|
2034
|
+
const Me = ee(null), ue = () => {
|
|
2035
|
+
const e = U(Me);
|
|
2036
2036
|
if (!e) throw new Error("Command components must be used inside <Command>");
|
|
2037
2037
|
return e;
|
|
2038
2038
|
};
|
|
2039
2039
|
function me(e) {
|
|
2040
2040
|
return e.toLowerCase().replace(/\s+/g, " ").trim();
|
|
2041
2041
|
}
|
|
2042
|
-
function
|
|
2042
|
+
function mr(e, r, t = []) {
|
|
2043
2043
|
if (!e) return !0;
|
|
2044
2044
|
const a = me(e);
|
|
2045
2045
|
return me(r).includes(a) || t.some((o) => me(o).includes(a));
|
|
2046
2046
|
}
|
|
2047
|
-
let
|
|
2048
|
-
function
|
|
2049
|
-
return `cmd-${++
|
|
2047
|
+
let vr = 0;
|
|
2048
|
+
function yr() {
|
|
2049
|
+
return `cmd-${++vr}`;
|
|
2050
2050
|
}
|
|
2051
|
-
const
|
|
2051
|
+
const Re = g.forwardRef(
|
|
2052
2052
|
({ value: e, onValueChange: r, className: t, children: a }, o) => {
|
|
2053
|
-
const [i, d] =
|
|
2054
|
-
d(
|
|
2055
|
-
}, [r]), _ =
|
|
2056
|
-
_.current.set(
|
|
2057
|
-
}, []),
|
|
2058
|
-
_.current.delete(
|
|
2059
|
-
}, []),
|
|
2060
|
-
var
|
|
2061
|
-
(
|
|
2062
|
-
}, []),
|
|
2053
|
+
const [i, d] = E(""), [l, c] = E(0), [f, u] = E(0), v = e !== void 0 ? e : i, h = D((k) => {
|
|
2054
|
+
d(k), r == null || r(k), c(0);
|
|
2055
|
+
}, [r]), _ = B(/* @__PURE__ */ new Map()), s = B(/* @__PURE__ */ new Map()), m = D((k, T, V) => {
|
|
2056
|
+
_.current.set(k, { el: T, disabled: V });
|
|
2057
|
+
}, []), p = D((k) => {
|
|
2058
|
+
_.current.delete(k), s.current.delete(k);
|
|
2059
|
+
}, []), b = D((k) => {
|
|
2060
|
+
var T;
|
|
2061
|
+
(T = s.current.get(k)) == null || T();
|
|
2062
|
+
}, []), C = oe(() => ({
|
|
2063
2063
|
search: v,
|
|
2064
|
-
setSearch:
|
|
2065
|
-
activeIndex:
|
|
2066
|
-
setActiveIndex:
|
|
2064
|
+
setSearch: h,
|
|
2065
|
+
activeIndex: l,
|
|
2066
|
+
setActiveIndex: c,
|
|
2067
2067
|
items: _,
|
|
2068
2068
|
registerItem: m,
|
|
2069
|
-
unregisterItem:
|
|
2070
|
-
selectItem:
|
|
2071
|
-
onSelectRef:
|
|
2072
|
-
visibleCount:
|
|
2073
|
-
setVisibleCount:
|
|
2074
|
-
}), [v,
|
|
2075
|
-
return /* @__PURE__ */ n(
|
|
2069
|
+
unregisterItem: p,
|
|
2070
|
+
selectItem: b,
|
|
2071
|
+
onSelectRef: s,
|
|
2072
|
+
visibleCount: f,
|
|
2073
|
+
setVisibleCount: u
|
|
2074
|
+
}), [v, h, l, m, p, b, f]);
|
|
2075
|
+
return /* @__PURE__ */ n(Me.Provider, { value: C, children: /* @__PURE__ */ n(
|
|
2076
2076
|
"div",
|
|
2077
2077
|
{
|
|
2078
2078
|
ref: o,
|
|
2079
|
-
className:
|
|
2079
|
+
className: y("vyre-command", t),
|
|
2080
2080
|
role: "combobox",
|
|
2081
2081
|
"aria-expanded": "true",
|
|
2082
2082
|
"aria-haspopup": "listbox",
|
|
@@ -2085,17 +2085,17 @@ const Me = p.forwardRef(
|
|
|
2085
2085
|
) });
|
|
2086
2086
|
}
|
|
2087
2087
|
);
|
|
2088
|
-
|
|
2089
|
-
const
|
|
2088
|
+
Re.displayName = "VyreCommand";
|
|
2089
|
+
const fr = g.forwardRef(
|
|
2090
2090
|
({ placeholder: e = "Search...", className: r }, t) => {
|
|
2091
2091
|
const { search: a, setSearch: o } = ue();
|
|
2092
|
-
return /* @__PURE__ */
|
|
2092
|
+
return /* @__PURE__ */ x("div", { className: "vyre-command__input-wrapper", children: [
|
|
2093
2093
|
/* @__PURE__ */ n("svg", { className: "vyre-command__search-icon", width: "15", height: "15", viewBox: "0 0 15 15", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ n("path", { d: "M10 6.5a3.5 3.5 0 1 1-7 0 3.5 3.5 0 0 1 7 0ZM9.5 10.207l3.146 3.147", stroke: "currentColor", strokeWidth: "1.3", strokeLinecap: "round" }) }),
|
|
2094
2094
|
/* @__PURE__ */ n(
|
|
2095
2095
|
"input",
|
|
2096
2096
|
{
|
|
2097
2097
|
ref: t,
|
|
2098
|
-
className:
|
|
2098
|
+
className: y("vyre-command__input", r),
|
|
2099
2099
|
type: "text",
|
|
2100
2100
|
placeholder: e,
|
|
2101
2101
|
value: a,
|
|
@@ -2120,20 +2120,20 @@ const yr = p.forwardRef(
|
|
|
2120
2120
|
] });
|
|
2121
2121
|
}
|
|
2122
2122
|
);
|
|
2123
|
-
|
|
2124
|
-
const
|
|
2123
|
+
fr.displayName = "VyreCommandInput";
|
|
2124
|
+
const hr = g.forwardRef(
|
|
2125
2125
|
({ className: e, children: r }, t) => {
|
|
2126
|
-
const { activeIndex: a, setActiveIndex: o, items: i, selectItem: d } = ue(),
|
|
2127
|
-
var
|
|
2128
|
-
const
|
|
2129
|
-
if (
|
|
2130
|
-
|
|
2131
|
-
else if (
|
|
2132
|
-
|
|
2133
|
-
else if (
|
|
2134
|
-
|
|
2135
|
-
const [
|
|
2136
|
-
|
|
2126
|
+
const { activeIndex: a, setActiveIndex: o, items: i, selectItem: d } = ue(), l = D((c) => {
|
|
2127
|
+
var u, v;
|
|
2128
|
+
const f = Array.from((i.current ?? /* @__PURE__ */ new Map()).entries()).filter(([, h]) => !h.disabled && h.el.closest("[data-cmd-item]") !== null && !h.el.hasAttribute("data-cmd-hidden"));
|
|
2129
|
+
if (c.key === "ArrowDown")
|
|
2130
|
+
c.preventDefault(), o(Math.min(a + 1, f.length - 1)), (u = f[Math.min(a + 1, f.length - 1)]) == null || u[1].el.scrollIntoView({ block: "nearest" });
|
|
2131
|
+
else if (c.key === "ArrowUp")
|
|
2132
|
+
c.preventDefault(), o(Math.max(a - 1, 0)), (v = f[Math.max(a - 1, 0)]) == null || v[1].el.scrollIntoView({ block: "nearest" });
|
|
2133
|
+
else if (c.key === "Enter") {
|
|
2134
|
+
c.preventDefault();
|
|
2135
|
+
const [h] = f[a] ?? [];
|
|
2136
|
+
h && d(h);
|
|
2137
2137
|
}
|
|
2138
2138
|
}, [a, o, i, d]);
|
|
2139
2139
|
return /* @__PURE__ */ n(
|
|
@@ -2142,25 +2142,25 @@ const fr = p.forwardRef(
|
|
|
2142
2142
|
ref: t,
|
|
2143
2143
|
id: "vyre-command-list",
|
|
2144
2144
|
role: "listbox",
|
|
2145
|
-
className:
|
|
2146
|
-
onKeyDown:
|
|
2145
|
+
className: y("vyre-command__list", e),
|
|
2146
|
+
onKeyDown: l,
|
|
2147
2147
|
children: r
|
|
2148
2148
|
}
|
|
2149
2149
|
);
|
|
2150
2150
|
}
|
|
2151
2151
|
);
|
|
2152
|
-
|
|
2153
|
-
const
|
|
2152
|
+
hr.displayName = "VyreCommandList";
|
|
2153
|
+
const br = ({ className: e, children: r }) => {
|
|
2154
2154
|
const { search: t, visibleCount: a } = ue();
|
|
2155
|
-
return !t || a > 0 ? null : /* @__PURE__ */ n("div", { className:
|
|
2155
|
+
return !t || a > 0 ? null : /* @__PURE__ */ n("div", { className: y("vyre-command__empty", e), role: "presentation", children: r ?? "No results found." });
|
|
2156
2156
|
};
|
|
2157
|
-
|
|
2158
|
-
const
|
|
2157
|
+
br.displayName = "VyreCommandEmpty";
|
|
2158
|
+
const pr = ({ heading: e, className: r, children: t }) => /* @__PURE__ */ x("div", { className: y("vyre-command__group", r), role: "presentation", children: [
|
|
2159
2159
|
e && /* @__PURE__ */ n("div", { className: "vyre-command__group-heading", "aria-hidden": "true", children: e }),
|
|
2160
2160
|
/* @__PURE__ */ n("div", { role: "group", "aria-label": e, children: t })
|
|
2161
2161
|
] });
|
|
2162
|
-
|
|
2163
|
-
const
|
|
2162
|
+
pr.displayName = "VyreCommandGroup";
|
|
2163
|
+
const _r = ({
|
|
2164
2164
|
onSelect: e,
|
|
2165
2165
|
disabled: r = !1,
|
|
2166
2166
|
keywords: t,
|
|
@@ -2169,27 +2169,27 @@ const pr = ({
|
|
|
2169
2169
|
icon: i,
|
|
2170
2170
|
shortcut: d
|
|
2171
2171
|
}) => {
|
|
2172
|
-
const { search:
|
|
2173
|
-
return
|
|
2174
|
-
|
|
2175
|
-
}), [
|
|
2176
|
-
const
|
|
2177
|
-
if (!(!
|
|
2178
|
-
return
|
|
2179
|
-
}, [_, r,
|
|
2180
|
-
var
|
|
2181
|
-
return e && ((
|
|
2182
|
-
var
|
|
2183
|
-
(
|
|
2172
|
+
const { search: l, setActiveIndex: c, registerItem: f, unregisterItem: u, onSelectRef: v, setVisibleCount: h } = ue(), _ = oe(() => yr(), []), s = B(null), p = mr(l, typeof o == "string" ? o : "", t);
|
|
2173
|
+
return $(() => (h((b) => b + (p ? 1 : 0)), () => {
|
|
2174
|
+
h((b) => b - (p ? 1 : 0));
|
|
2175
|
+
}), [p, h]), $(() => {
|
|
2176
|
+
const b = s.current;
|
|
2177
|
+
if (!(!b || !p))
|
|
2178
|
+
return f(_, b, r), () => u(_);
|
|
2179
|
+
}, [_, r, p, f, u]), $(() => {
|
|
2180
|
+
var b;
|
|
2181
|
+
return e && ((b = v.current) == null || b.set(_, e)), () => {
|
|
2182
|
+
var C;
|
|
2183
|
+
(C = v.current) == null || C.delete(_);
|
|
2184
2184
|
};
|
|
2185
|
-
}, [_, e, v]),
|
|
2185
|
+
}, [_, e, v]), p ? /* @__PURE__ */ x(
|
|
2186
2186
|
"div",
|
|
2187
2187
|
{
|
|
2188
|
-
ref:
|
|
2188
|
+
ref: s,
|
|
2189
2189
|
"data-cmd-item": !0,
|
|
2190
2190
|
role: "option",
|
|
2191
2191
|
"aria-disabled": r || void 0,
|
|
2192
|
-
className:
|
|
2192
|
+
className: y(
|
|
2193
2193
|
"vyre-command__item",
|
|
2194
2194
|
r && "vyre-command__item--disabled",
|
|
2195
2195
|
a
|
|
@@ -2198,7 +2198,7 @@ const pr = ({
|
|
|
2198
2198
|
r || e == null || e();
|
|
2199
2199
|
},
|
|
2200
2200
|
onMouseEnter: () => {
|
|
2201
|
-
!r &&
|
|
2201
|
+
!r && s.current && c(-1);
|
|
2202
2202
|
},
|
|
2203
2203
|
children: [
|
|
2204
2204
|
i && /* @__PURE__ */ n("span", { className: "vyre-command__item-icon", "aria-hidden": "true", children: i }),
|
|
@@ -2208,9 +2208,9 @@ const pr = ({
|
|
|
2208
2208
|
}
|
|
2209
2209
|
) : null;
|
|
2210
2210
|
};
|
|
2211
|
-
|
|
2212
|
-
const
|
|
2213
|
-
|
|
2211
|
+
_r.displayName = "VyreCommandItem";
|
|
2212
|
+
const gr = ({ className: e }) => /* @__PURE__ */ n("div", { className: y("vyre-command__separator", e), role: "separator", "aria-hidden": "true" });
|
|
2213
|
+
gr.displayName = "VyreCommandSeparator";
|
|
2214
2214
|
const wr = ({
|
|
2215
2215
|
open: e,
|
|
2216
2216
|
onOpenChange: r,
|
|
@@ -2219,38 +2219,38 @@ const wr = ({
|
|
|
2219
2219
|
className: o,
|
|
2220
2220
|
children: i
|
|
2221
2221
|
}) => {
|
|
2222
|
-
const d =
|
|
2223
|
-
return
|
|
2224
|
-
var
|
|
2222
|
+
const d = B(null);
|
|
2223
|
+
return $(() => {
|
|
2224
|
+
var f;
|
|
2225
2225
|
if (!e) return;
|
|
2226
|
-
const
|
|
2227
|
-
return
|
|
2228
|
-
|
|
2226
|
+
const l = document.activeElement, c = (f = d.current) == null ? void 0 : f.querySelector(".vyre-command__input");
|
|
2227
|
+
return c == null || c.focus(), () => {
|
|
2228
|
+
l == null || l.focus({ preventScroll: !0 });
|
|
2229
2229
|
};
|
|
2230
|
-
}, [e]),
|
|
2230
|
+
}, [e]), $(() => {
|
|
2231
2231
|
if (!e) return;
|
|
2232
|
-
const
|
|
2233
|
-
|
|
2232
|
+
const l = (c) => {
|
|
2233
|
+
c.key === "Escape" && r(!1);
|
|
2234
2234
|
};
|
|
2235
|
-
return window.addEventListener("keydown",
|
|
2236
|
-
}, [e, r]), e ?
|
|
2235
|
+
return window.addEventListener("keydown", l), () => window.removeEventListener("keydown", l);
|
|
2236
|
+
}, [e, r]), e ? G.createPortal(
|
|
2237
2237
|
/* @__PURE__ */ n(
|
|
2238
2238
|
"div",
|
|
2239
2239
|
{
|
|
2240
2240
|
className: "vyre-command-backdrop",
|
|
2241
2241
|
ref: d,
|
|
2242
|
-
onClick: (
|
|
2243
|
-
|
|
2242
|
+
onClick: (l) => {
|
|
2243
|
+
l.target === l.currentTarget && r(!1);
|
|
2244
2244
|
},
|
|
2245
2245
|
role: "dialog",
|
|
2246
2246
|
"aria-modal": "true",
|
|
2247
2247
|
"aria-label": "Command palette",
|
|
2248
2248
|
children: /* @__PURE__ */ n(
|
|
2249
|
-
|
|
2249
|
+
Re,
|
|
2250
2250
|
{
|
|
2251
2251
|
value: t,
|
|
2252
2252
|
onValueChange: a,
|
|
2253
|
-
className:
|
|
2253
|
+
className: y("vyre-command--dialog", o),
|
|
2254
2254
|
children: i
|
|
2255
2255
|
}
|
|
2256
2256
|
)
|
|
@@ -2260,34 +2260,491 @@ const wr = ({
|
|
|
2260
2260
|
) : null;
|
|
2261
2261
|
};
|
|
2262
2262
|
wr.displayName = "VyreCommandDialog";
|
|
2263
|
+
const Nr = g.forwardRef(
|
|
2264
|
+
({
|
|
2265
|
+
orientation: e = "horizontal",
|
|
2266
|
+
attached: r = !1,
|
|
2267
|
+
size: t,
|
|
2268
|
+
className: a,
|
|
2269
|
+
children: o,
|
|
2270
|
+
...i
|
|
2271
|
+
}, d) => /* @__PURE__ */ n(
|
|
2272
|
+
"div",
|
|
2273
|
+
{
|
|
2274
|
+
ref: d,
|
|
2275
|
+
role: "group",
|
|
2276
|
+
className: y(
|
|
2277
|
+
"vyre-btn-group",
|
|
2278
|
+
e === "vertical" && "vyre-btn-group--vertical",
|
|
2279
|
+
r && "vyre-btn-group--attached",
|
|
2280
|
+
a
|
|
2281
|
+
),
|
|
2282
|
+
"data-orientation": e,
|
|
2283
|
+
"data-size": t,
|
|
2284
|
+
...i,
|
|
2285
|
+
children: o
|
|
2286
|
+
}
|
|
2287
|
+
)
|
|
2288
|
+
);
|
|
2289
|
+
Nr.displayName = "VyreButtonGroup";
|
|
2290
|
+
const Ie = g.forwardRef(
|
|
2291
|
+
({
|
|
2292
|
+
variant: e = "default",
|
|
2293
|
+
size: r = "md",
|
|
2294
|
+
onRemove: t,
|
|
2295
|
+
onClick: a,
|
|
2296
|
+
disabled: o = !1,
|
|
2297
|
+
className: i,
|
|
2298
|
+
children: d,
|
|
2299
|
+
...l
|
|
2300
|
+
}, c) => {
|
|
2301
|
+
const f = !!a && !o;
|
|
2302
|
+
return /* @__PURE__ */ x(
|
|
2303
|
+
"span",
|
|
2304
|
+
{
|
|
2305
|
+
ref: c,
|
|
2306
|
+
className: y(
|
|
2307
|
+
"vyre-tag",
|
|
2308
|
+
`vyre-tag--${e}`,
|
|
2309
|
+
`vyre-tag--${r}`,
|
|
2310
|
+
f && "vyre-tag--clickable",
|
|
2311
|
+
o && "vyre-tag--disabled",
|
|
2312
|
+
i
|
|
2313
|
+
),
|
|
2314
|
+
"data-variant": e,
|
|
2315
|
+
"data-size": r,
|
|
2316
|
+
role: f ? "button" : void 0,
|
|
2317
|
+
tabIndex: f ? 0 : void 0,
|
|
2318
|
+
"aria-disabled": o || void 0,
|
|
2319
|
+
onClick: f ? a : void 0,
|
|
2320
|
+
onKeyDown: f ? (u) => {
|
|
2321
|
+
(u.key === "Enter" || u.key === " ") && (u.preventDefault(), a == null || a());
|
|
2322
|
+
} : void 0,
|
|
2323
|
+
...l,
|
|
2324
|
+
children: [
|
|
2325
|
+
/* @__PURE__ */ n("span", { className: "vyre-tag__label", children: d }),
|
|
2326
|
+
t && /* @__PURE__ */ n(
|
|
2327
|
+
"button",
|
|
2328
|
+
{
|
|
2329
|
+
type: "button",
|
|
2330
|
+
className: "vyre-tag__remove",
|
|
2331
|
+
"aria-label": "Remove",
|
|
2332
|
+
disabled: o,
|
|
2333
|
+
onClick: (u) => {
|
|
2334
|
+
u.stopPropagation(), t();
|
|
2335
|
+
},
|
|
2336
|
+
children: /* @__PURE__ */ n("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ n(
|
|
2337
|
+
"path",
|
|
2338
|
+
{
|
|
2339
|
+
d: "M9 3L3 9M3 3L9 9",
|
|
2340
|
+
stroke: "currentColor",
|
|
2341
|
+
strokeWidth: "1.5",
|
|
2342
|
+
strokeLinecap: "round"
|
|
2343
|
+
}
|
|
2344
|
+
) })
|
|
2345
|
+
}
|
|
2346
|
+
)
|
|
2347
|
+
]
|
|
2348
|
+
}
|
|
2349
|
+
);
|
|
2350
|
+
}
|
|
2351
|
+
);
|
|
2352
|
+
Ie.displayName = "VyreTag";
|
|
2353
|
+
const kr = g.forwardRef(
|
|
2354
|
+
({
|
|
2355
|
+
value: e,
|
|
2356
|
+
onChange: r,
|
|
2357
|
+
placeholder: t = "Add tag…",
|
|
2358
|
+
disabled: a = !1,
|
|
2359
|
+
max: o,
|
|
2360
|
+
size: i = "md",
|
|
2361
|
+
className: d,
|
|
2362
|
+
style: l,
|
|
2363
|
+
"data-testid": c
|
|
2364
|
+
}, f) => {
|
|
2365
|
+
const [u, v] = E(""), h = B(null), _ = o !== void 0 && e.length >= o, s = a || _;
|
|
2366
|
+
function m(k) {
|
|
2367
|
+
const T = k.trim();
|
|
2368
|
+
if (!T || e.includes(T) || _) {
|
|
2369
|
+
v("");
|
|
2370
|
+
return;
|
|
2371
|
+
}
|
|
2372
|
+
r([...e, T]), v("");
|
|
2373
|
+
}
|
|
2374
|
+
function p(k) {
|
|
2375
|
+
a || r(e.filter((T, V) => V !== k));
|
|
2376
|
+
}
|
|
2377
|
+
function b(k) {
|
|
2378
|
+
if (k.key === "Enter" || k.key === ",") {
|
|
2379
|
+
k.preventDefault(), m(u);
|
|
2380
|
+
return;
|
|
2381
|
+
}
|
|
2382
|
+
k.key === "Backspace" && u === "" && e.length > 0 && p(e.length - 1);
|
|
2383
|
+
}
|
|
2384
|
+
function C(k) {
|
|
2385
|
+
const T = k.target.value;
|
|
2386
|
+
if (T.includes(",")) {
|
|
2387
|
+
const V = T.split(",");
|
|
2388
|
+
V.slice(0, -1).forEach((j) => m(j)), v(V[V.length - 1]);
|
|
2389
|
+
} else
|
|
2390
|
+
v(T);
|
|
2391
|
+
}
|
|
2392
|
+
return /* @__PURE__ */ x(
|
|
2393
|
+
"div",
|
|
2394
|
+
{
|
|
2395
|
+
ref: f,
|
|
2396
|
+
className: y(
|
|
2397
|
+
"vyre-tags-input",
|
|
2398
|
+
`vyre-tags-input--${i}`,
|
|
2399
|
+
a && "vyre-tags-input--disabled",
|
|
2400
|
+
d
|
|
2401
|
+
),
|
|
2402
|
+
"data-testid": c,
|
|
2403
|
+
style: l,
|
|
2404
|
+
onClick: () => {
|
|
2405
|
+
var k;
|
|
2406
|
+
return (k = h.current) == null ? void 0 : k.focus();
|
|
2407
|
+
},
|
|
2408
|
+
children: [
|
|
2409
|
+
e.map((k, T) => /* @__PURE__ */ n(
|
|
2410
|
+
Ie,
|
|
2411
|
+
{
|
|
2412
|
+
size: i,
|
|
2413
|
+
disabled: a,
|
|
2414
|
+
onRemove: a ? void 0 : () => p(T),
|
|
2415
|
+
children: k
|
|
2416
|
+
},
|
|
2417
|
+
`${k}-${T}`
|
|
2418
|
+
)),
|
|
2419
|
+
/* @__PURE__ */ n(
|
|
2420
|
+
"input",
|
|
2421
|
+
{
|
|
2422
|
+
ref: h,
|
|
2423
|
+
type: "text",
|
|
2424
|
+
className: "vyre-tags-input__field",
|
|
2425
|
+
value: u,
|
|
2426
|
+
onChange: C,
|
|
2427
|
+
onKeyDown: b,
|
|
2428
|
+
placeholder: _ ? "" : t,
|
|
2429
|
+
disabled: s,
|
|
2430
|
+
"aria-label": "Add tag"
|
|
2431
|
+
}
|
|
2432
|
+
)
|
|
2433
|
+
]
|
|
2434
|
+
}
|
|
2435
|
+
);
|
|
2436
|
+
}
|
|
2437
|
+
);
|
|
2438
|
+
kr.displayName = "VyreTagsInput";
|
|
2439
|
+
const xr = g.forwardRef(
|
|
2440
|
+
({
|
|
2441
|
+
options: e,
|
|
2442
|
+
value: r,
|
|
2443
|
+
onChange: t,
|
|
2444
|
+
placeholder: a = "Search…",
|
|
2445
|
+
disabled: o = !1,
|
|
2446
|
+
size: i = "md",
|
|
2447
|
+
emptyText: d = "No results",
|
|
2448
|
+
className: l,
|
|
2449
|
+
...c
|
|
2450
|
+
}, f) => {
|
|
2451
|
+
const [u, v] = E(!1), [h, _] = E(""), [s, m] = E(-1), p = B(null), b = B(null), C = B(null), T = `${te()}-listbox`, V = e.find((N) => N.value === r) ?? null, W = e.filter(
|
|
2452
|
+
(N) => N.label.toLowerCase().includes(h.toLowerCase())
|
|
2453
|
+
), j = D(() => {
|
|
2454
|
+
v(!1), m(-1), _("");
|
|
2455
|
+
}, []), O = D(
|
|
2456
|
+
(N) => {
|
|
2457
|
+
var R;
|
|
2458
|
+
N.disabled || (t(N.value), j(), (R = p.current) == null || R.blur());
|
|
2459
|
+
},
|
|
2460
|
+
[t, j]
|
|
2461
|
+
);
|
|
2462
|
+
$(() => {
|
|
2463
|
+
if (!u) return;
|
|
2464
|
+
const N = (R) => {
|
|
2465
|
+
const I = C.current;
|
|
2466
|
+
I && !I.contains(R.target) && j();
|
|
2467
|
+
};
|
|
2468
|
+
return document.addEventListener("mousedown", N), () => document.removeEventListener("mousedown", N);
|
|
2469
|
+
}, [u, j]), $(() => {
|
|
2470
|
+
var R;
|
|
2471
|
+
if (!u || s < 0) return;
|
|
2472
|
+
const N = (R = b.current) == null ? void 0 : R.children[s];
|
|
2473
|
+
N == null || N.scrollIntoView({ block: "nearest" });
|
|
2474
|
+
}, [s, u]), $(() => {
|
|
2475
|
+
m(W.length > 0 ? 0 : -1);
|
|
2476
|
+
}, [h]);
|
|
2477
|
+
function A() {
|
|
2478
|
+
o || (v(!0), _(""));
|
|
2479
|
+
}
|
|
2480
|
+
function F(N) {
|
|
2481
|
+
_(N.target.value), u || v(!0);
|
|
2482
|
+
}
|
|
2483
|
+
function S(N) {
|
|
2484
|
+
var R;
|
|
2485
|
+
switch (N.key) {
|
|
2486
|
+
case "ArrowDown": {
|
|
2487
|
+
if (N.preventDefault(), !u) {
|
|
2488
|
+
v(!0);
|
|
2489
|
+
return;
|
|
2490
|
+
}
|
|
2491
|
+
m((I) => {
|
|
2492
|
+
let H = I + 1;
|
|
2493
|
+
for (; H < W.length && W[H].disabled; ) H++;
|
|
2494
|
+
return H < W.length ? H : I;
|
|
2495
|
+
});
|
|
2496
|
+
break;
|
|
2497
|
+
}
|
|
2498
|
+
case "ArrowUp": {
|
|
2499
|
+
if (N.preventDefault(), !u) {
|
|
2500
|
+
v(!0);
|
|
2501
|
+
return;
|
|
2502
|
+
}
|
|
2503
|
+
m((I) => {
|
|
2504
|
+
let H = I - 1;
|
|
2505
|
+
for (; H >= 0 && W[H].disabled; ) H--;
|
|
2506
|
+
return H >= 0 ? H : I;
|
|
2507
|
+
});
|
|
2508
|
+
break;
|
|
2509
|
+
}
|
|
2510
|
+
case "Enter": {
|
|
2511
|
+
N.preventDefault(), u && s >= 0 && W[s] && O(W[s]);
|
|
2512
|
+
break;
|
|
2513
|
+
}
|
|
2514
|
+
case "Escape": {
|
|
2515
|
+
j(), (R = p.current) == null || R.blur();
|
|
2516
|
+
break;
|
|
2517
|
+
}
|
|
2518
|
+
}
|
|
2519
|
+
}
|
|
2520
|
+
const L = u ? h : (V == null ? void 0 : V.label) ?? "";
|
|
2521
|
+
return /* @__PURE__ */ x(
|
|
2522
|
+
"div",
|
|
2523
|
+
{
|
|
2524
|
+
ref: (N) => {
|
|
2525
|
+
C.current = N, typeof f == "function" ? f(N) : f && (f.current = N);
|
|
2526
|
+
},
|
|
2527
|
+
className: y(
|
|
2528
|
+
"vyre-combobox",
|
|
2529
|
+
`vyre-combobox--${i}`,
|
|
2530
|
+
o && "vyre-combobox--disabled",
|
|
2531
|
+
l
|
|
2532
|
+
),
|
|
2533
|
+
"data-open": u,
|
|
2534
|
+
...c,
|
|
2535
|
+
children: [
|
|
2536
|
+
/* @__PURE__ */ n(
|
|
2537
|
+
"input",
|
|
2538
|
+
{
|
|
2539
|
+
ref: p,
|
|
2540
|
+
type: "text",
|
|
2541
|
+
role: "combobox",
|
|
2542
|
+
"aria-expanded": u,
|
|
2543
|
+
"aria-haspopup": "listbox",
|
|
2544
|
+
"aria-controls": T,
|
|
2545
|
+
"aria-autocomplete": "list",
|
|
2546
|
+
"aria-disabled": o,
|
|
2547
|
+
disabled: o,
|
|
2548
|
+
className: "vyre-combobox__input",
|
|
2549
|
+
placeholder: a,
|
|
2550
|
+
value: L,
|
|
2551
|
+
onFocus: A,
|
|
2552
|
+
onChange: F,
|
|
2553
|
+
onKeyDown: S
|
|
2554
|
+
}
|
|
2555
|
+
),
|
|
2556
|
+
/* @__PURE__ */ n("span", { className: "vyre-combobox__chevron", "aria-hidden": "true", children: /* @__PURE__ */ n("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", children: /* @__PURE__ */ n(
|
|
2557
|
+
"path",
|
|
2558
|
+
{
|
|
2559
|
+
d: "M3 5L7 9L11 5",
|
|
2560
|
+
stroke: "currentColor",
|
|
2561
|
+
strokeWidth: "1.5",
|
|
2562
|
+
strokeLinecap: "round",
|
|
2563
|
+
strokeLinejoin: "round"
|
|
2564
|
+
}
|
|
2565
|
+
) }) }),
|
|
2566
|
+
u && /* @__PURE__ */ n(
|
|
2567
|
+
"ul",
|
|
2568
|
+
{
|
|
2569
|
+
ref: b,
|
|
2570
|
+
id: T,
|
|
2571
|
+
role: "listbox",
|
|
2572
|
+
className: "vyre-combobox__dropdown",
|
|
2573
|
+
"aria-label": "Options",
|
|
2574
|
+
children: W.length > 0 ? W.map((N, R) => /* @__PURE__ */ n(
|
|
2575
|
+
"li",
|
|
2576
|
+
{
|
|
2577
|
+
role: "option",
|
|
2578
|
+
"aria-selected": N.value === r,
|
|
2579
|
+
"aria-disabled": N.disabled,
|
|
2580
|
+
"data-highlighted": R === s,
|
|
2581
|
+
className: y(
|
|
2582
|
+
"vyre-combobox__option",
|
|
2583
|
+
R === s && "vyre-combobox__option--highlighted",
|
|
2584
|
+
N.value === r && "vyre-combobox__option--selected"
|
|
2585
|
+
),
|
|
2586
|
+
onMouseEnter: () => !N.disabled && m(R),
|
|
2587
|
+
onMouseDown: (I) => {
|
|
2588
|
+
I.preventDefault(), O(N);
|
|
2589
|
+
},
|
|
2590
|
+
children: N.label
|
|
2591
|
+
},
|
|
2592
|
+
N.value
|
|
2593
|
+
)) : /* @__PURE__ */ n("li", { className: "vyre-combobox__empty", role: "presentation", children: d })
|
|
2594
|
+
}
|
|
2595
|
+
)
|
|
2596
|
+
]
|
|
2597
|
+
}
|
|
2598
|
+
);
|
|
2599
|
+
}
|
|
2600
|
+
);
|
|
2601
|
+
xr.displayName = "VyreCombobox";
|
|
2602
|
+
function Lr({ col: e, sortKey: r, sortDir: t }) {
|
|
2603
|
+
const o = r === e.key ? t : void 0;
|
|
2604
|
+
return /* @__PURE__ */ n("span", { className: "vyre-data-grid__sort-icon", "aria-hidden": "true", children: /* @__PURE__ */ x("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", children: [
|
|
2605
|
+
/* @__PURE__ */ n(
|
|
2606
|
+
"path",
|
|
2607
|
+
{
|
|
2608
|
+
d: "M6 2v4M3.5 4.5L6 2l2.5 2.5",
|
|
2609
|
+
stroke: "currentColor",
|
|
2610
|
+
strokeWidth: "1.3",
|
|
2611
|
+
strokeLinecap: "round",
|
|
2612
|
+
strokeLinejoin: "round",
|
|
2613
|
+
opacity: o === "desc" ? 0.3 : 1
|
|
2614
|
+
}
|
|
2615
|
+
),
|
|
2616
|
+
/* @__PURE__ */ n(
|
|
2617
|
+
"path",
|
|
2618
|
+
{
|
|
2619
|
+
d: "M6 10V6M3.5 7.5L6 10l2.5-2.5",
|
|
2620
|
+
stroke: "currentColor",
|
|
2621
|
+
strokeWidth: "1.3",
|
|
2622
|
+
strokeLinecap: "round",
|
|
2623
|
+
strokeLinejoin: "round",
|
|
2624
|
+
opacity: o === "asc" ? 0.3 : 1
|
|
2625
|
+
}
|
|
2626
|
+
)
|
|
2627
|
+
] }) });
|
|
2628
|
+
}
|
|
2629
|
+
const Cr = 5, Mr = g.forwardRef(
|
|
2630
|
+
({
|
|
2631
|
+
columns: e,
|
|
2632
|
+
rows: r,
|
|
2633
|
+
sortKey: t,
|
|
2634
|
+
sortDir: a,
|
|
2635
|
+
onSort: o,
|
|
2636
|
+
loading: i = !1,
|
|
2637
|
+
emptyText: d = "No data",
|
|
2638
|
+
stickyHeader: l = !1,
|
|
2639
|
+
className: c,
|
|
2640
|
+
style: f,
|
|
2641
|
+
"data-testid": u
|
|
2642
|
+
}, v) => {
|
|
2643
|
+
function h(s) {
|
|
2644
|
+
if (!s.sortable || !o) return;
|
|
2645
|
+
const m = t === s.key && a === "asc" ? "desc" : "asc";
|
|
2646
|
+
o(s.key, m);
|
|
2647
|
+
}
|
|
2648
|
+
function _(s) {
|
|
2649
|
+
return t !== s.key ? "none" : a === "asc" ? "ascending" : "descending";
|
|
2650
|
+
}
|
|
2651
|
+
return /* @__PURE__ */ n(
|
|
2652
|
+
"div",
|
|
2653
|
+
{
|
|
2654
|
+
ref: v,
|
|
2655
|
+
className: y(
|
|
2656
|
+
"vyre-data-grid",
|
|
2657
|
+
l && "vyre-data-grid--sticky-header",
|
|
2658
|
+
c
|
|
2659
|
+
),
|
|
2660
|
+
style: f,
|
|
2661
|
+
"data-testid": u,
|
|
2662
|
+
children: /* @__PURE__ */ x("table", { className: "vyre-data-grid__table", children: [
|
|
2663
|
+
/* @__PURE__ */ n("thead", { className: "vyre-data-grid__thead", children: /* @__PURE__ */ n("tr", { children: e.map((s) => /* @__PURE__ */ n(
|
|
2664
|
+
"th",
|
|
2665
|
+
{
|
|
2666
|
+
className: y(
|
|
2667
|
+
"vyre-data-grid__th",
|
|
2668
|
+
s.sortable && "vyre-data-grid__th--sortable",
|
|
2669
|
+
t === s.key && `vyre-data-grid__th--sort-${a}`
|
|
2670
|
+
),
|
|
2671
|
+
style: s.width ? { width: s.width } : void 0,
|
|
2672
|
+
"aria-sort": s.sortable ? _(s) : void 0,
|
|
2673
|
+
children: s.sortable ? /* @__PURE__ */ x(
|
|
2674
|
+
"button",
|
|
2675
|
+
{
|
|
2676
|
+
type: "button",
|
|
2677
|
+
className: "vyre-data-grid__sort-btn",
|
|
2678
|
+
onClick: () => h(s),
|
|
2679
|
+
children: [
|
|
2680
|
+
s.label,
|
|
2681
|
+
/* @__PURE__ */ n(Lr, { col: s, sortKey: t, sortDir: a })
|
|
2682
|
+
]
|
|
2683
|
+
}
|
|
2684
|
+
) : s.label
|
|
2685
|
+
},
|
|
2686
|
+
s.key
|
|
2687
|
+
)) }) }),
|
|
2688
|
+
/* @__PURE__ */ n("tbody", { className: "vyre-data-grid__tbody", children: i ? Array.from({ length: Cr }).map((s, m) => /* @__PURE__ */ n("tr", { className: "vyre-data-grid__row vyre-data-grid__row--skeleton", children: e.map((p) => /* @__PURE__ */ n("td", { className: "vyre-data-grid__td", children: /* @__PURE__ */ n(xe, { height: 16 }) }, p.key)) }, `skel-${m}`)) : r.length === 0 ? /* @__PURE__ */ n("tr", { className: "vyre-data-grid__row vyre-data-grid__row--empty", children: /* @__PURE__ */ n(
|
|
2689
|
+
"td",
|
|
2690
|
+
{
|
|
2691
|
+
className: "vyre-data-grid__td vyre-data-grid__empty",
|
|
2692
|
+
colSpan: e.length,
|
|
2693
|
+
children: d
|
|
2694
|
+
}
|
|
2695
|
+
) }) : r.map((s, m) => /* @__PURE__ */ n("tr", { className: "vyre-data-grid__row", children: e.map((p) => /* @__PURE__ */ n("td", { className: "vyre-data-grid__td", children: s[p.key] != null ? String(s[p.key]) : "" }, p.key)) }, m)) })
|
|
2696
|
+
] })
|
|
2697
|
+
}
|
|
2698
|
+
);
|
|
2699
|
+
}
|
|
2700
|
+
);
|
|
2701
|
+
Mr.displayName = "VyreDataGrid";
|
|
2702
|
+
const Rr = g.forwardRef(
|
|
2703
|
+
({ gap: e = "md", wrap: r = !0, className: t, children: a, ...o }, i) => /* @__PURE__ */ n(
|
|
2704
|
+
"div",
|
|
2705
|
+
{
|
|
2706
|
+
ref: i,
|
|
2707
|
+
className: y(
|
|
2708
|
+
"vyre-tag-group",
|
|
2709
|
+
`vyre-tag-group--gap-${e}`,
|
|
2710
|
+
!r && "vyre-tag-group--nowrap",
|
|
2711
|
+
t
|
|
2712
|
+
),
|
|
2713
|
+
role: "list",
|
|
2714
|
+
...o,
|
|
2715
|
+
children: a
|
|
2716
|
+
}
|
|
2717
|
+
)
|
|
2718
|
+
);
|
|
2719
|
+
Rr.displayName = "VyreTagGroup";
|
|
2263
2720
|
function Q(e) {
|
|
2264
2721
|
return new Date(e.getFullYear(), e.getMonth(), e.getDate());
|
|
2265
2722
|
}
|
|
2266
2723
|
function Y(e, r) {
|
|
2267
2724
|
return e.getFullYear() === r.getFullYear() && e.getMonth() === r.getMonth() && e.getDate() === r.getDate();
|
|
2268
2725
|
}
|
|
2269
|
-
function
|
|
2726
|
+
function ne(e, r) {
|
|
2270
2727
|
return Q(e) < Q(r);
|
|
2271
2728
|
}
|
|
2272
2729
|
function be(e, r) {
|
|
2273
2730
|
return Q(e) > Q(r);
|
|
2274
2731
|
}
|
|
2275
|
-
function
|
|
2732
|
+
function Ir(e, r) {
|
|
2276
2733
|
return new Date(e, r + 1, 0).getDate();
|
|
2277
2734
|
}
|
|
2278
|
-
function
|
|
2735
|
+
function Dr(e, r, t) {
|
|
2279
2736
|
return (new Date(e, r, 1).getDay() - t + 7) % 7;
|
|
2280
2737
|
}
|
|
2281
2738
|
function X(e, r) {
|
|
2282
2739
|
return e ? new Intl.DateTimeFormat("default", { year: "numeric", month: "short", day: "numeric" }).format(e) : "";
|
|
2283
2740
|
}
|
|
2284
|
-
function
|
|
2741
|
+
function Tr(e) {
|
|
2285
2742
|
return `${String(e.getHours()).padStart(2, "0")}:${String(e.getMinutes()).padStart(2, "0")}`;
|
|
2286
2743
|
}
|
|
2287
2744
|
const pe = Array.from(
|
|
2288
2745
|
{ length: 12 },
|
|
2289
2746
|
(e, r) => new Intl.DateTimeFormat("default", { month: "long" }).format(new Date(2e3, r, 1))
|
|
2290
|
-
),
|
|
2747
|
+
), ae = 12, De = g.forwardRef(
|
|
2291
2748
|
(e, r) => {
|
|
2292
2749
|
const {
|
|
2293
2750
|
showTime: t = !1,
|
|
@@ -2295,149 +2752,149 @@ const pe = Array.from(
|
|
|
2295
2752
|
maxDate: o,
|
|
2296
2753
|
disabled: i,
|
|
2297
2754
|
className: d,
|
|
2298
|
-
weekStartsOn:
|
|
2299
|
-
} = e,
|
|
2300
|
-
var
|
|
2301
|
-
return e.mode === "range" ? ((
|
|
2302
|
-
}, [
|
|
2303
|
-
const
|
|
2304
|
-
return
|
|
2305
|
-
}), [
|
|
2306
|
-
const
|
|
2307
|
-
return
|
|
2308
|
-
}),
|
|
2309
|
-
const
|
|
2310
|
-
return { count:
|
|
2311
|
-
}, [
|
|
2755
|
+
weekStartsOn: l = 1
|
|
2756
|
+
} = e, c = Q(/* @__PURE__ */ new Date()), f = () => {
|
|
2757
|
+
var w, M;
|
|
2758
|
+
return e.mode === "range" ? ((w = e.value) == null ? void 0 : w[0]) ?? c : e.mode === "multiple" ? ((M = e.value) == null ? void 0 : M[0]) ?? c : e.value ?? c;
|
|
2759
|
+
}, [u, v] = E(() => (f() ?? c).getFullYear()), [h, _] = E(() => (f() ?? c).getMonth()), [s, m] = E("days"), [p, b] = E(null), [C, k] = E(() => {
|
|
2760
|
+
const w = e.mode === "single" ? e.value : null;
|
|
2761
|
+
return w ? w.getHours() : 0;
|
|
2762
|
+
}), [T, V] = E(() => {
|
|
2763
|
+
const w = e.mode === "single" ? e.value : null;
|
|
2764
|
+
return w ? w.getMinutes() : 0;
|
|
2765
|
+
}), W = oe(() => {
|
|
2766
|
+
const w = Ir(u, h), M = Dr(u, h, l);
|
|
2767
|
+
return { count: w, offset: M };
|
|
2768
|
+
}, [u, h, l]), j = oe(() => l === 1 ? ["Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"] : ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], [l]), O = D((w) => {
|
|
2312
2769
|
if (e.mode === "single")
|
|
2313
|
-
return !!e.value && Y(
|
|
2770
|
+
return !!e.value && Y(w, e.value);
|
|
2314
2771
|
if (e.mode === "range") {
|
|
2315
|
-
const [
|
|
2316
|
-
return !!
|
|
2772
|
+
const [M, K] = e.value ?? [null, null];
|
|
2773
|
+
return !!M && Y(w, M) || !!K && Y(w, K);
|
|
2317
2774
|
}
|
|
2318
|
-
return e.mode === "multiple" ? (e.value ?? []).some((
|
|
2319
|
-
}, [e]),
|
|
2775
|
+
return e.mode === "multiple" ? (e.value ?? []).some((M) => Y(w, M)) : !1;
|
|
2776
|
+
}, [e]), A = D((w) => {
|
|
2320
2777
|
if (e.mode !== "range") return !1;
|
|
2321
|
-
const [
|
|
2322
|
-
if (!
|
|
2323
|
-
const z =
|
|
2324
|
-
return be(
|
|
2325
|
-
}, [e,
|
|
2778
|
+
const [M, K] = e.value ?? [null, null], q = K ?? p;
|
|
2779
|
+
if (!M || !q) return !1;
|
|
2780
|
+
const z = ne(M, q) ? M : q, Z = ne(M, q) ? q : M;
|
|
2781
|
+
return be(w, z) && ne(w, Z);
|
|
2782
|
+
}, [e, p]), F = D((w) => {
|
|
2326
2783
|
if (e.mode !== "range") return !1;
|
|
2327
|
-
const [
|
|
2328
|
-
return !!
|
|
2329
|
-
}, [e]),
|
|
2784
|
+
const [M] = e.value ?? [null, null];
|
|
2785
|
+
return !!M && Y(w, M);
|
|
2786
|
+
}, [e]), S = D((w) => {
|
|
2330
2787
|
if (e.mode !== "range") return !1;
|
|
2331
|
-
const [,
|
|
2332
|
-
return !!
|
|
2333
|
-
}, [e]),
|
|
2334
|
-
var
|
|
2335
|
-
const
|
|
2336
|
-
if (!
|
|
2788
|
+
const [, M] = e.value ?? [null, null];
|
|
2789
|
+
return !!M && Y(w, M);
|
|
2790
|
+
}, [e]), L = D((w) => !!(a && ne(w, a) || o && be(w, o) || i != null && i(w)), [a, o, i]), N = D((w) => {
|
|
2791
|
+
var K, q, z, Z, re, se;
|
|
2792
|
+
const M = new Date(u, h, w, C, T);
|
|
2793
|
+
if (!L(Q(M))) {
|
|
2337
2794
|
if (e.mode === "single" || !e.mode)
|
|
2338
|
-
(
|
|
2795
|
+
(K = e.onChange) == null || K.call(e, M);
|
|
2339
2796
|
else if (e.mode === "range") {
|
|
2340
|
-
const [
|
|
2341
|
-
!
|
|
2797
|
+
const [P, J] = e.value ?? [null, null];
|
|
2798
|
+
!P || P && J ? (q = e.onChange) == null || q.call(e, [M, null]) : ne(M, P) ? (z = e.onChange) == null || z.call(e, [M, P]) : (Z = e.onChange) == null || Z.call(e, [P, M]);
|
|
2342
2799
|
} else if (e.mode === "multiple") {
|
|
2343
|
-
const
|
|
2344
|
-
J >= 0 ? (
|
|
2800
|
+
const P = e.value ?? [], J = P.findIndex((fe) => Y(fe, M));
|
|
2801
|
+
J >= 0 ? (re = e.onChange) == null || re.call(e, P.filter((fe, Se) => Se !== J)) : (se = e.onChange) == null || se.call(e, [...P, M]);
|
|
2345
2802
|
}
|
|
2346
2803
|
}
|
|
2347
|
-
}, [
|
|
2348
|
-
|
|
2349
|
-
},
|
|
2350
|
-
|
|
2351
|
-
},
|
|
2352
|
-
var
|
|
2353
|
-
if (
|
|
2354
|
-
const
|
|
2355
|
-
|
|
2804
|
+
}, [u, h, C, T, e, L]), R = () => {
|
|
2805
|
+
h === 0 ? (_(11), v((w) => w - 1)) : _((w) => w - 1);
|
|
2806
|
+
}, I = () => {
|
|
2807
|
+
h === 11 ? (_(0), v((w) => w + 1)) : _((w) => w + 1);
|
|
2808
|
+
}, H = (w, M) => {
|
|
2809
|
+
var K;
|
|
2810
|
+
if (k(w), V(M), e.mode === "single" && e.value) {
|
|
2811
|
+
const q = new Date(e.value);
|
|
2812
|
+
q.setHours(w, M), (K = e.onChange) == null || K.call(e, q);
|
|
2356
2813
|
}
|
|
2357
|
-
}, ie = Math.floor(
|
|
2358
|
-
return /* @__PURE__ */
|
|
2359
|
-
/* @__PURE__ */
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
/* @__PURE__ */
|
|
2814
|
+
}, ie = Math.floor(u / ae) * ae;
|
|
2815
|
+
return /* @__PURE__ */ x("div", { ref: r, className: y("vyre-calendar", d), children: [
|
|
2816
|
+
/* @__PURE__ */ x("div", { className: "vyre-calendar__header", children: [
|
|
2817
|
+
s === "days" && /* @__PURE__ */ n("button", { className: "vyre-calendar__nav", onClick: R, "aria-label": "Previous month", children: /* @__PURE__ */ n("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", children: /* @__PURE__ */ n("path", { d: "M9 11L5 7l4-4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }) }),
|
|
2818
|
+
s === "years" && /* @__PURE__ */ n("button", { className: "vyre-calendar__nav", onClick: () => v((w) => w - ae), "aria-label": "Previous years", children: /* @__PURE__ */ n("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", children: /* @__PURE__ */ n("path", { d: "M9 11L5 7l4-4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }) }),
|
|
2819
|
+
/* @__PURE__ */ x("div", { className: "vyre-calendar__header-center", children: [
|
|
2363
2820
|
/* @__PURE__ */ n(
|
|
2364
2821
|
"button",
|
|
2365
2822
|
{
|
|
2366
2823
|
className: "vyre-calendar__header-btn",
|
|
2367
|
-
onClick: () => m(
|
|
2368
|
-
children: pe[
|
|
2824
|
+
onClick: () => m(s === "months" ? "days" : "months"),
|
|
2825
|
+
children: pe[h]
|
|
2369
2826
|
}
|
|
2370
2827
|
),
|
|
2371
2828
|
/* @__PURE__ */ n(
|
|
2372
2829
|
"button",
|
|
2373
2830
|
{
|
|
2374
2831
|
className: "vyre-calendar__header-btn",
|
|
2375
|
-
onClick: () => m(
|
|
2376
|
-
children:
|
|
2832
|
+
onClick: () => m(s === "years" ? "days" : "years"),
|
|
2833
|
+
children: u
|
|
2377
2834
|
}
|
|
2378
2835
|
)
|
|
2379
2836
|
] }),
|
|
2380
|
-
|
|
2381
|
-
|
|
2837
|
+
s === "days" && /* @__PURE__ */ n("button", { className: "vyre-calendar__nav", onClick: I, "aria-label": "Next month", children: /* @__PURE__ */ n("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", children: /* @__PURE__ */ n("path", { d: "M5 3l4 4-4 4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }) }),
|
|
2838
|
+
s === "years" && /* @__PURE__ */ n("button", { className: "vyre-calendar__nav", onClick: () => v((w) => w + ae), "aria-label": "Next years", children: /* @__PURE__ */ n("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", children: /* @__PURE__ */ n("path", { d: "M5 3l4 4-4 4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }) })
|
|
2382
2839
|
] }),
|
|
2383
|
-
|
|
2840
|
+
s === "months" && /* @__PURE__ */ n("div", { className: "vyre-calendar__month-grid", children: pe.map((w, M) => /* @__PURE__ */ n(
|
|
2384
2841
|
"button",
|
|
2385
2842
|
{
|
|
2386
|
-
className:
|
|
2843
|
+
className: y("vyre-calendar__month-cell", M === h && "vyre-calendar__month-cell--active"),
|
|
2387
2844
|
onClick: () => {
|
|
2388
|
-
_(
|
|
2845
|
+
_(M), m("days");
|
|
2389
2846
|
},
|
|
2390
|
-
children:
|
|
2847
|
+
children: w.slice(0, 3)
|
|
2391
2848
|
},
|
|
2392
|
-
|
|
2849
|
+
w
|
|
2393
2850
|
)) }),
|
|
2394
|
-
|
|
2851
|
+
s === "years" && /* @__PURE__ */ n("div", { className: "vyre-calendar__year-grid", children: Array.from({ length: ae }, (w, M) => ie + M).map((w) => /* @__PURE__ */ n(
|
|
2395
2852
|
"button",
|
|
2396
2853
|
{
|
|
2397
|
-
className:
|
|
2854
|
+
className: y("vyre-calendar__year-cell", w === u && "vyre-calendar__year-cell--active"),
|
|
2398
2855
|
onClick: () => {
|
|
2399
|
-
v(
|
|
2856
|
+
v(w), m("days");
|
|
2400
2857
|
},
|
|
2401
|
-
children:
|
|
2858
|
+
children: w
|
|
2402
2859
|
},
|
|
2403
|
-
|
|
2860
|
+
w
|
|
2404
2861
|
)) }),
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
Array.from({ length:
|
|
2408
|
-
Array.from({ length:
|
|
2409
|
-
const
|
|
2862
|
+
s === "days" && /* @__PURE__ */ x("div", { className: "vyre-calendar__grid", children: [
|
|
2863
|
+
j.map((w) => /* @__PURE__ */ n("div", { className: "vyre-calendar__weekday", children: w }, w)),
|
|
2864
|
+
Array.from({ length: W.offset }).map((w, M) => /* @__PURE__ */ n("div", {}, `empty-${M}`)),
|
|
2865
|
+
Array.from({ length: W.count }, (w, M) => M + 1).map((w) => {
|
|
2866
|
+
const M = new Date(u, h, w), K = O(M), q = A(M), z = F(M), Z = S(M), re = L(M), se = Y(M, c);
|
|
2410
2867
|
return /* @__PURE__ */ n(
|
|
2411
2868
|
"button",
|
|
2412
2869
|
{
|
|
2413
|
-
className:
|
|
2870
|
+
className: y(
|
|
2414
2871
|
"vyre-calendar__day",
|
|
2415
2872
|
se && "vyre-calendar__day--today",
|
|
2416
|
-
|
|
2417
|
-
|
|
2873
|
+
K && "vyre-calendar__day--selected",
|
|
2874
|
+
q && "vyre-calendar__day--in-range",
|
|
2418
2875
|
z && "vyre-calendar__day--range-start",
|
|
2419
2876
|
Z && "vyre-calendar__day--range-end",
|
|
2420
|
-
|
|
2877
|
+
re && "vyre-calendar__day--disabled"
|
|
2421
2878
|
),
|
|
2422
|
-
onClick: () =>
|
|
2879
|
+
onClick: () => N(w),
|
|
2423
2880
|
onMouseEnter: () => {
|
|
2424
2881
|
if (e.mode === "range") {
|
|
2425
|
-
const [
|
|
2426
|
-
|
|
2882
|
+
const [P, J] = e.value ?? [null, null];
|
|
2883
|
+
P && !J && b(M);
|
|
2427
2884
|
}
|
|
2428
2885
|
},
|
|
2429
|
-
onMouseLeave: () =>
|
|
2430
|
-
disabled:
|
|
2431
|
-
"aria-selected":
|
|
2432
|
-
"aria-label": X(
|
|
2433
|
-
children:
|
|
2886
|
+
onMouseLeave: () => b(null),
|
|
2887
|
+
disabled: re,
|
|
2888
|
+
"aria-selected": K,
|
|
2889
|
+
"aria-label": X(M),
|
|
2890
|
+
children: w
|
|
2434
2891
|
},
|
|
2435
|
-
|
|
2892
|
+
w
|
|
2436
2893
|
);
|
|
2437
2894
|
})
|
|
2438
2895
|
] }),
|
|
2439
|
-
t &&
|
|
2440
|
-
/* @__PURE__ */
|
|
2896
|
+
t && s === "days" && /* @__PURE__ */ x("div", { className: "vyre-calendar__time", children: [
|
|
2897
|
+
/* @__PURE__ */ x("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", "aria-hidden": "true", children: [
|
|
2441
2898
|
/* @__PURE__ */ n("circle", { cx: "7", cy: "7", r: "5.5", stroke: "currentColor", strokeWidth: "1.3" }),
|
|
2442
2899
|
/* @__PURE__ */ n("path", { d: "M7 4v3.5l2 1.5", stroke: "currentColor", strokeWidth: "1.3", strokeLinecap: "round" })
|
|
2443
2900
|
] }),
|
|
@@ -2448,8 +2905,8 @@ const pe = Array.from(
|
|
|
2448
2905
|
className: "vyre-calendar__time-input",
|
|
2449
2906
|
min: 0,
|
|
2450
2907
|
max: 23,
|
|
2451
|
-
value:
|
|
2452
|
-
onChange: (
|
|
2908
|
+
value: C,
|
|
2909
|
+
onChange: (w) => H(Number(w.target.value), T),
|
|
2453
2910
|
"aria-label": "Hours"
|
|
2454
2911
|
}
|
|
2455
2912
|
),
|
|
@@ -2461,8 +2918,8 @@ const pe = Array.from(
|
|
|
2461
2918
|
className: "vyre-calendar__time-input",
|
|
2462
2919
|
min: 0,
|
|
2463
2920
|
max: 59,
|
|
2464
|
-
value:
|
|
2465
|
-
onChange: (
|
|
2921
|
+
value: T,
|
|
2922
|
+
onChange: (w) => H(C, Number(w.target.value)),
|
|
2466
2923
|
"aria-label": "Minutes"
|
|
2467
2924
|
}
|
|
2468
2925
|
)
|
|
@@ -2470,8 +2927,8 @@ const pe = Array.from(
|
|
|
2470
2927
|
] });
|
|
2471
2928
|
}
|
|
2472
2929
|
);
|
|
2473
|
-
|
|
2474
|
-
function
|
|
2930
|
+
De.displayName = "VyreCalendar";
|
|
2931
|
+
function Sr(e) {
|
|
2475
2932
|
if (e.mode === "range") {
|
|
2476
2933
|
const [a, o] = e.value ?? [null, null];
|
|
2477
2934
|
return a ? o ? `${X(a)} – ${X(o)}` : X(a) : "";
|
|
@@ -2481,78 +2938,78 @@ function xr(e) {
|
|
|
2481
2938
|
return a.length === 0 ? "" : a.length === 1 ? X(a[0]) : `${a.length} dates selected`;
|
|
2482
2939
|
}
|
|
2483
2940
|
const r = e.value, t = e.showTime;
|
|
2484
|
-
return r ? t ? `${X(r)} ${
|
|
2941
|
+
return r ? t ? `${X(r)} ${Tr(r)}` : X(r) : "";
|
|
2485
2942
|
}
|
|
2486
|
-
const
|
|
2943
|
+
const Er = g.forwardRef(
|
|
2487
2944
|
({ placeholder: e = "Pick a date", inputClassName: r, ...t }, a) => {
|
|
2488
|
-
const [o, i] =
|
|
2945
|
+
const [o, i] = E(!1), d = B(null), l = B(null), [c, f] = E({ top: 0, left: 0, width: 0 }), u = Sr(t), v = D(() => {
|
|
2489
2946
|
if (!d.current) return;
|
|
2490
|
-
const
|
|
2491
|
-
|
|
2492
|
-
top:
|
|
2493
|
-
left:
|
|
2494
|
-
width:
|
|
2947
|
+
const s = d.current.getBoundingClientRect();
|
|
2948
|
+
f({
|
|
2949
|
+
top: s.bottom + window.scrollY + 6,
|
|
2950
|
+
left: s.left + window.scrollX,
|
|
2951
|
+
width: s.width
|
|
2495
2952
|
});
|
|
2496
2953
|
}, []);
|
|
2497
|
-
|
|
2954
|
+
$(() => {
|
|
2498
2955
|
if (!o) return;
|
|
2499
2956
|
v();
|
|
2500
|
-
const
|
|
2501
|
-
return window.addEventListener("scroll",
|
|
2502
|
-
window.removeEventListener("scroll",
|
|
2957
|
+
const s = () => v(), m = () => v();
|
|
2958
|
+
return window.addEventListener("scroll", s, !0), window.addEventListener("resize", m), () => {
|
|
2959
|
+
window.removeEventListener("scroll", s, !0), window.removeEventListener("resize", m);
|
|
2503
2960
|
};
|
|
2504
|
-
}, [o, v]),
|
|
2961
|
+
}, [o, v]), $(() => {
|
|
2505
2962
|
if (!o) return;
|
|
2506
|
-
const
|
|
2507
|
-
var
|
|
2508
|
-
!((
|
|
2509
|
-
}, m = (
|
|
2510
|
-
|
|
2963
|
+
const s = (p) => {
|
|
2964
|
+
var b, C;
|
|
2965
|
+
!((b = l.current) != null && b.contains(p.target)) && !((C = d.current) != null && C.contains(p.target)) && i(!1);
|
|
2966
|
+
}, m = (p) => {
|
|
2967
|
+
p.key === "Escape" && i(!1);
|
|
2511
2968
|
};
|
|
2512
|
-
return document.addEventListener("pointerdown",
|
|
2513
|
-
document.removeEventListener("pointerdown",
|
|
2969
|
+
return document.addEventListener("pointerdown", s), document.addEventListener("keydown", m), () => {
|
|
2970
|
+
document.removeEventListener("pointerdown", s), document.removeEventListener("keydown", m);
|
|
2514
2971
|
};
|
|
2515
2972
|
}, [o]);
|
|
2516
|
-
const
|
|
2973
|
+
const h = t.mode !== "range" && t.mode !== "multiple" && !t.showTime, _ = oe(() => t.mode === "range" ? {
|
|
2517
2974
|
...t,
|
|
2518
|
-
onChange: (
|
|
2975
|
+
onChange: (s) => {
|
|
2519
2976
|
var m;
|
|
2520
|
-
(m = t.onChange) == null || m.call(t,
|
|
2977
|
+
(m = t.onChange) == null || m.call(t, s), s[0] && s[1] && i(!1);
|
|
2521
2978
|
}
|
|
2522
2979
|
} : t.mode === "multiple" ? t : {
|
|
2523
2980
|
...t,
|
|
2524
|
-
onChange: (
|
|
2981
|
+
onChange: (s) => {
|
|
2525
2982
|
var m;
|
|
2526
|
-
(m = t.onChange) == null || m.call(t,
|
|
2983
|
+
(m = t.onChange) == null || m.call(t, s), h && i(!1);
|
|
2527
2984
|
}
|
|
2528
|
-
}, [t,
|
|
2529
|
-
return /* @__PURE__ */
|
|
2530
|
-
/* @__PURE__ */
|
|
2985
|
+
}, [t, h]);
|
|
2986
|
+
return /* @__PURE__ */ x("div", { ref: a, className: "vyre-datepicker", children: [
|
|
2987
|
+
/* @__PURE__ */ x(
|
|
2531
2988
|
"button",
|
|
2532
2989
|
{
|
|
2533
2990
|
ref: d,
|
|
2534
2991
|
type: "button",
|
|
2535
|
-
className:
|
|
2992
|
+
className: y("vyre-datepicker__trigger", !u && "vyre-datepicker__trigger--placeholder", r),
|
|
2536
2993
|
onClick: () => {
|
|
2537
|
-
v(), i((
|
|
2994
|
+
v(), i((s) => !s);
|
|
2538
2995
|
},
|
|
2539
2996
|
"aria-expanded": o,
|
|
2540
2997
|
"aria-haspopup": "dialog",
|
|
2541
2998
|
children: [
|
|
2542
|
-
/* @__PURE__ */
|
|
2999
|
+
/* @__PURE__ */ x("svg", { className: "vyre-datepicker__icon", width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", "aria-hidden": "true", children: [
|
|
2543
3000
|
/* @__PURE__ */ n("rect", { x: "1.5", y: "2.5", width: "11", height: "10", rx: "1.5", stroke: "currentColor", strokeWidth: "1.3" }),
|
|
2544
3001
|
/* @__PURE__ */ n("path", { d: "M1.5 6h11M4.5 1v3M9.5 1v3", stroke: "currentColor", strokeWidth: "1.3", strokeLinecap: "round" })
|
|
2545
3002
|
] }),
|
|
2546
|
-
/* @__PURE__ */ n("span", { children:
|
|
2547
|
-
|
|
3003
|
+
/* @__PURE__ */ n("span", { children: u || e }),
|
|
3004
|
+
u && /* @__PURE__ */ n(
|
|
2548
3005
|
"button",
|
|
2549
3006
|
{
|
|
2550
3007
|
className: "vyre-datepicker__clear",
|
|
2551
3008
|
type: "button",
|
|
2552
3009
|
"aria-label": "Clear",
|
|
2553
|
-
onClick: (
|
|
2554
|
-
var m,
|
|
2555
|
-
|
|
3010
|
+
onClick: (s) => {
|
|
3011
|
+
var m, p, b;
|
|
3012
|
+
s.stopPropagation(), t.mode === "range" ? (m = t.onChange) == null || m.call(t, [null, null]) : t.mode === "multiple" ? (p = t.onChange) == null || p.call(t, []) : (b = t.onChange) == null || b.call(t, null);
|
|
2556
3013
|
},
|
|
2557
3014
|
children: /* @__PURE__ */ n("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ n("path", { d: "M2 2l8 8M10 2l-8 8", stroke: "currentColor", strokeWidth: "1.4", strokeLinecap: "round" }) })
|
|
2558
3015
|
}
|
|
@@ -2560,16 +3017,16 @@ const Cr = p.forwardRef(
|
|
|
2560
3017
|
]
|
|
2561
3018
|
}
|
|
2562
3019
|
),
|
|
2563
|
-
o &&
|
|
3020
|
+
o && G.createPortal(
|
|
2564
3021
|
/* @__PURE__ */ n(
|
|
2565
3022
|
"div",
|
|
2566
3023
|
{
|
|
2567
|
-
ref:
|
|
3024
|
+
ref: l,
|
|
2568
3025
|
className: "vyre-datepicker__popover",
|
|
2569
3026
|
role: "dialog",
|
|
2570
3027
|
"aria-label": "Date picker",
|
|
2571
|
-
style: { top:
|
|
2572
|
-
children: /* @__PURE__ */ n(
|
|
3028
|
+
style: { top: c.top, left: c.left, minWidth: c.width },
|
|
3029
|
+
children: /* @__PURE__ */ n(De, { ..._ })
|
|
2573
3030
|
}
|
|
2574
3031
|
),
|
|
2575
3032
|
document.body
|
|
@@ -2577,8 +3034,8 @@ const Cr = p.forwardRef(
|
|
|
2577
3034
|
] });
|
|
2578
3035
|
}
|
|
2579
3036
|
);
|
|
2580
|
-
|
|
2581
|
-
const
|
|
3037
|
+
Er.displayName = "VyreDatePicker";
|
|
3038
|
+
const Ar = g.forwardRef(
|
|
2582
3039
|
({
|
|
2583
3040
|
as: e = "p",
|
|
2584
3041
|
size: r = "md",
|
|
@@ -2587,13 +3044,13 @@ const Lr = p.forwardRef(
|
|
|
2587
3044
|
truncate: o,
|
|
2588
3045
|
mono: i,
|
|
2589
3046
|
className: d,
|
|
2590
|
-
children:
|
|
2591
|
-
...
|
|
2592
|
-
},
|
|
3047
|
+
children: l,
|
|
3048
|
+
...c
|
|
3049
|
+
}, f) => /* @__PURE__ */ n(
|
|
2593
3050
|
e,
|
|
2594
3051
|
{
|
|
2595
|
-
ref:
|
|
2596
|
-
className:
|
|
3052
|
+
ref: f,
|
|
3053
|
+
className: y(
|
|
2597
3054
|
"vyre-text",
|
|
2598
3055
|
r !== "md" && `vyre-text--${r}`,
|
|
2599
3056
|
t && `vyre-text--${t}`,
|
|
@@ -2602,13 +3059,13 @@ const Lr = p.forwardRef(
|
|
|
2602
3059
|
i && "vyre-text--mono",
|
|
2603
3060
|
d
|
|
2604
3061
|
),
|
|
2605
|
-
...
|
|
2606
|
-
children:
|
|
3062
|
+
...c,
|
|
3063
|
+
children: l
|
|
2607
3064
|
}
|
|
2608
3065
|
)
|
|
2609
3066
|
);
|
|
2610
|
-
|
|
2611
|
-
const
|
|
3067
|
+
Ar.displayName = "VyreText";
|
|
3068
|
+
const Br = g.forwardRef(
|
|
2612
3069
|
({
|
|
2613
3070
|
as: e = "h2",
|
|
2614
3071
|
size: r = "md",
|
|
@@ -2617,12 +3074,12 @@ const Mr = p.forwardRef(
|
|
|
2617
3074
|
truncate: o,
|
|
2618
3075
|
className: i,
|
|
2619
3076
|
children: d,
|
|
2620
|
-
...
|
|
2621
|
-
},
|
|
3077
|
+
...l
|
|
3078
|
+
}, c) => /* @__PURE__ */ n(
|
|
2622
3079
|
e,
|
|
2623
3080
|
{
|
|
2624
|
-
ref:
|
|
2625
|
-
className:
|
|
3081
|
+
ref: c,
|
|
3082
|
+
className: y(
|
|
2626
3083
|
"vyre-heading",
|
|
2627
3084
|
`vyre-heading--${r}`,
|
|
2628
3085
|
t !== "bold" && `vyre-heading--${t}`,
|
|
@@ -2630,54 +3087,54 @@ const Mr = p.forwardRef(
|
|
|
2630
3087
|
o && "vyre-text--truncate",
|
|
2631
3088
|
i
|
|
2632
3089
|
),
|
|
2633
|
-
...
|
|
3090
|
+
...l,
|
|
2634
3091
|
children: d
|
|
2635
3092
|
}
|
|
2636
3093
|
)
|
|
2637
3094
|
);
|
|
2638
|
-
|
|
2639
|
-
const
|
|
2640
|
-
({ className: e, children: r, ...t }, a) => /* @__PURE__ */ n("p", { ref: a, className:
|
|
3095
|
+
Br.displayName = "VyreHeading";
|
|
3096
|
+
const Vr = g.forwardRef(
|
|
3097
|
+
({ className: e, children: r, ...t }, a) => /* @__PURE__ */ n("p", { ref: a, className: y("vyre-lead", e), ...t, children: r })
|
|
2641
3098
|
);
|
|
2642
|
-
|
|
2643
|
-
const
|
|
2644
|
-
({ block: e, className: r, children: t, ...a }, o) => e ? /* @__PURE__ */ n("pre", { className:
|
|
3099
|
+
Vr.displayName = "VyreLead";
|
|
3100
|
+
const $r = g.forwardRef(
|
|
3101
|
+
({ block: e, className: r, children: t, ...a }, o) => e ? /* @__PURE__ */ n("pre", { className: y("vyre-code-block", r), ...a, children: /* @__PURE__ */ n("code", { ref: o, children: t }) }) : /* @__PURE__ */ n(
|
|
2645
3102
|
"code",
|
|
2646
3103
|
{
|
|
2647
3104
|
ref: o,
|
|
2648
|
-
className:
|
|
3105
|
+
className: y("vyre-code", r),
|
|
2649
3106
|
...a,
|
|
2650
3107
|
children: t
|
|
2651
3108
|
}
|
|
2652
3109
|
)
|
|
2653
3110
|
);
|
|
2654
|
-
|
|
2655
|
-
const
|
|
2656
|
-
({ className: e, children: r, ...t }, a) => /* @__PURE__ */ n("blockquote", { ref: a, className:
|
|
3111
|
+
$r.displayName = "VyreCode";
|
|
3112
|
+
const Wr = g.forwardRef(
|
|
3113
|
+
({ className: e, children: r, ...t }, a) => /* @__PURE__ */ n("blockquote", { ref: a, className: y("vyre-blockquote", e), ...t, children: r })
|
|
2657
3114
|
);
|
|
2658
|
-
|
|
2659
|
-
const
|
|
3115
|
+
Wr.displayName = "VyreBlockquote";
|
|
3116
|
+
const Te = ee({
|
|
2660
3117
|
collapsed: !1,
|
|
2661
3118
|
toggleCollapsed: () => {
|
|
2662
3119
|
}
|
|
2663
|
-
}), ye = () => U(
|
|
3120
|
+
}), ye = () => U(Te), jr = g.forwardRef(
|
|
2664
3121
|
({ defaultCollapsed: e = !1, collapsed: r, onCollapsedChange: t, className: a, children: o }, i) => {
|
|
2665
|
-
const [d,
|
|
2666
|
-
const
|
|
2667
|
-
|
|
2668
|
-
}, [
|
|
2669
|
-
return /* @__PURE__ */ n(
|
|
3122
|
+
const [d, l] = E(e), c = r !== void 0 ? r : d, f = D(() => {
|
|
3123
|
+
const u = !c;
|
|
3124
|
+
l(u), t == null || t(u);
|
|
3125
|
+
}, [c, t]);
|
|
3126
|
+
return /* @__PURE__ */ n(Te.Provider, { value: { collapsed: c, toggleCollapsed: f }, children: /* @__PURE__ */ n("div", { ref: i, className: y("vyre-app-layout", a), children: o }) });
|
|
2670
3127
|
}
|
|
2671
3128
|
);
|
|
2672
|
-
|
|
2673
|
-
const
|
|
3129
|
+
jr.displayName = "VyreAppLayout";
|
|
3130
|
+
const Hr = g.forwardRef(
|
|
2674
3131
|
({ variant: e = "default", className: r, children: t }, a) => {
|
|
2675
3132
|
const { collapsed: o } = ye();
|
|
2676
3133
|
return /* @__PURE__ */ n(
|
|
2677
3134
|
"aside",
|
|
2678
3135
|
{
|
|
2679
3136
|
ref: a,
|
|
2680
|
-
className:
|
|
3137
|
+
className: y(
|
|
2681
3138
|
"vyre-sidebar",
|
|
2682
3139
|
o && "vyre-sidebar--collapsed",
|
|
2683
3140
|
e === "floating" && "vyre-sidebar--floating",
|
|
@@ -2689,27 +3146,27 @@ const Er = p.forwardRef(
|
|
|
2689
3146
|
);
|
|
2690
3147
|
}
|
|
2691
3148
|
);
|
|
2692
|
-
|
|
2693
|
-
const
|
|
2694
|
-
({ logo: e, title: r, className: t, children: a }, o) => /* @__PURE__ */
|
|
3149
|
+
Hr.displayName = "VyreSidebar";
|
|
3150
|
+
const Fr = g.forwardRef(
|
|
3151
|
+
({ logo: e, title: r, className: t, children: a }, o) => /* @__PURE__ */ x("div", { ref: o, className: y("vyre-sidebar__header", t), children: [
|
|
2695
3152
|
e && /* @__PURE__ */ n("span", { className: "vyre-sidebar__logo", children: e }),
|
|
2696
3153
|
r && /* @__PURE__ */ n("span", { className: "vyre-sidebar__title", children: r }),
|
|
2697
3154
|
a
|
|
2698
3155
|
] })
|
|
2699
3156
|
);
|
|
2700
|
-
|
|
2701
|
-
const
|
|
2702
|
-
({ className: e, children: r }, t) => /* @__PURE__ */ n("div", { ref: t, className:
|
|
3157
|
+
Fr.displayName = "VyreSidebarHeader";
|
|
3158
|
+
const Or = g.forwardRef(
|
|
3159
|
+
({ className: e, children: r }, t) => /* @__PURE__ */ n("div", { ref: t, className: y("vyre-sidebar__content", e), children: r })
|
|
2703
3160
|
);
|
|
2704
|
-
|
|
2705
|
-
const
|
|
2706
|
-
({ label: e, className: r, children: t }, a) => /* @__PURE__ */
|
|
3161
|
+
Or.displayName = "VyreSidebarContent";
|
|
3162
|
+
const Kr = g.forwardRef(
|
|
3163
|
+
({ label: e, className: r, children: t }, a) => /* @__PURE__ */ x("div", { ref: a, className: y("vyre-sidebar__section", r), children: [
|
|
2707
3164
|
e && /* @__PURE__ */ n("div", { className: "vyre-sidebar__section-label", children: e }),
|
|
2708
3165
|
t
|
|
2709
3166
|
] })
|
|
2710
3167
|
);
|
|
2711
|
-
|
|
2712
|
-
const
|
|
3168
|
+
Kr.displayName = "VyreSidebarSection";
|
|
3169
|
+
const qr = ({
|
|
2713
3170
|
active: e,
|
|
2714
3171
|
icon: r,
|
|
2715
3172
|
badge: t,
|
|
@@ -2718,7 +3175,7 @@ const Vr = ({
|
|
|
2718
3175
|
className: i,
|
|
2719
3176
|
children: d
|
|
2720
3177
|
}) => {
|
|
2721
|
-
const { collapsed:
|
|
3178
|
+
const { collapsed: l } = ye(), c = y("vyre-sidebar__item", e && "vyre-sidebar__item--active", i), f = /* @__PURE__ */ x(de, { children: [
|
|
2722
3179
|
r && /* @__PURE__ */ n("span", { className: "vyre-sidebar__item-icon", children: r }),
|
|
2723
3180
|
/* @__PURE__ */ n("span", { className: "vyre-sidebar__item-label", children: d }),
|
|
2724
3181
|
t !== void 0 && /* @__PURE__ */ n("span", { className: "vyre-sidebar__item-badge", children: t })
|
|
@@ -2727,47 +3184,47 @@ const Vr = ({
|
|
|
2727
3184
|
"a",
|
|
2728
3185
|
{
|
|
2729
3186
|
href: a,
|
|
2730
|
-
className:
|
|
3187
|
+
className: c,
|
|
2731
3188
|
"aria-current": e ? "page" : void 0,
|
|
2732
|
-
title:
|
|
2733
|
-
children:
|
|
3189
|
+
title: l ? String(d) : void 0,
|
|
3190
|
+
children: f
|
|
2734
3191
|
}
|
|
2735
3192
|
) : /* @__PURE__ */ n(
|
|
2736
3193
|
"button",
|
|
2737
3194
|
{
|
|
2738
3195
|
type: "button",
|
|
2739
|
-
className:
|
|
3196
|
+
className: c,
|
|
2740
3197
|
onClick: o,
|
|
2741
3198
|
"aria-pressed": e,
|
|
2742
|
-
title:
|
|
2743
|
-
children:
|
|
3199
|
+
title: l ? String(d) : void 0,
|
|
3200
|
+
children: f
|
|
2744
3201
|
}
|
|
2745
3202
|
);
|
|
2746
3203
|
};
|
|
2747
|
-
|
|
2748
|
-
const
|
|
2749
|
-
({ className: e, children: r }, t) => /* @__PURE__ */ n("div", { ref: t, className:
|
|
3204
|
+
qr.displayName = "VyreSidebarItem";
|
|
3205
|
+
const Pr = g.forwardRef(
|
|
3206
|
+
({ className: e, children: r }, t) => /* @__PURE__ */ n("div", { ref: t, className: y("vyre-sidebar__footer", e), children: r })
|
|
2750
3207
|
);
|
|
2751
|
-
|
|
2752
|
-
const
|
|
2753
|
-
({ className: e, children: r }, t) => /* @__PURE__ */ n("div", { ref: t, className:
|
|
3208
|
+
Pr.displayName = "VyreSidebarFooter";
|
|
3209
|
+
const Gr = g.forwardRef(
|
|
3210
|
+
({ className: e, children: r }, t) => /* @__PURE__ */ n("div", { ref: t, className: y("vyre-app-shell", e), children: r })
|
|
2754
3211
|
);
|
|
2755
|
-
|
|
2756
|
-
const
|
|
2757
|
-
({ className: e, children: r }, t) => /* @__PURE__ */ n("header", { ref: t, className:
|
|
3212
|
+
Gr.displayName = "VyreAppShell";
|
|
3213
|
+
const Yr = g.forwardRef(
|
|
3214
|
+
({ className: e, children: r }, t) => /* @__PURE__ */ n("header", { ref: t, className: y("vyre-app-bar", e), children: r })
|
|
2758
3215
|
);
|
|
2759
|
-
|
|
2760
|
-
const
|
|
3216
|
+
Yr.displayName = "VyreAppBar";
|
|
3217
|
+
const Ur = ({ className: e }) => {
|
|
2761
3218
|
const { collapsed: r, toggleCollapsed: t } = ye();
|
|
2762
3219
|
return /* @__PURE__ */ n(
|
|
2763
3220
|
"button",
|
|
2764
3221
|
{
|
|
2765
3222
|
type: "button",
|
|
2766
|
-
className:
|
|
3223
|
+
className: y("vyre-sidebar-trigger", e),
|
|
2767
3224
|
onClick: t,
|
|
2768
3225
|
"aria-label": r ? "Expand sidebar" : "Collapse sidebar",
|
|
2769
3226
|
"aria-expanded": !r,
|
|
2770
|
-
children: /* @__PURE__ */
|
|
3227
|
+
children: /* @__PURE__ */ x("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
|
|
2771
3228
|
/* @__PURE__ */ n("rect", { x: "2", y: "4", width: "12", height: "1.5", rx: "0.75", fill: "currentColor" }),
|
|
2772
3229
|
/* @__PURE__ */ n("rect", { x: "2", y: "7.25", width: "8", height: "1.5", rx: "0.75", fill: "currentColor" }),
|
|
2773
3230
|
/* @__PURE__ */ n("rect", { x: "2", y: "10.5", width: "12", height: "1.5", rx: "0.75", fill: "currentColor" })
|
|
@@ -2775,99 +3232,105 @@ const Hr = ({ className: e }) => {
|
|
|
2775
3232
|
}
|
|
2776
3233
|
);
|
|
2777
3234
|
};
|
|
2778
|
-
|
|
2779
|
-
const
|
|
2780
|
-
({ className: e, children: r }, t) => /* @__PURE__ */ n("div", { ref: t, className:
|
|
3235
|
+
Ur.displayName = "VyreSidebarTrigger";
|
|
3236
|
+
const Xr = g.forwardRef(
|
|
3237
|
+
({ className: e, children: r }, t) => /* @__PURE__ */ n("div", { ref: t, className: y("vyre-page-content", e), children: r })
|
|
2781
3238
|
);
|
|
2782
|
-
|
|
3239
|
+
Xr.displayName = "VyrePageContent";
|
|
2783
3240
|
export {
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
3241
|
+
mt as Accordion,
|
|
3242
|
+
ft as AccordionContent,
|
|
3243
|
+
vt as AccordionItem,
|
|
3244
|
+
yt as AccordionTrigger,
|
|
3245
|
+
Ht as Alert,
|
|
3246
|
+
Ot as AlertDialog,
|
|
3247
|
+
Yr as AppBar,
|
|
3248
|
+
jr as AppLayout,
|
|
3249
|
+
Gr as AppShell,
|
|
3250
|
+
ht as Avatar,
|
|
3251
|
+
We as Badge,
|
|
3252
|
+
Wr as Blockquote,
|
|
2796
3253
|
Ut as Breadcrumb,
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
je as
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
3254
|
+
Xt as BreadcrumbItem,
|
|
3255
|
+
zt as BreadcrumbLink,
|
|
3256
|
+
Zt as BreadcrumbSeparator,
|
|
3257
|
+
Ve as Button,
|
|
3258
|
+
Nr as ButtonGroup,
|
|
3259
|
+
De as Calendar,
|
|
3260
|
+
je as Card,
|
|
3261
|
+
Fe as CardBody,
|
|
3262
|
+
Oe as CardFooter,
|
|
3263
|
+
He as CardHeader,
|
|
3264
|
+
bt as Checkbox,
|
|
3265
|
+
$r as Code,
|
|
3266
|
+
xr as Combobox,
|
|
3267
|
+
Re as Command,
|
|
2809
3268
|
wr as CommandDialog,
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
3269
|
+
br as CommandEmpty,
|
|
3270
|
+
pr as CommandGroup,
|
|
3271
|
+
fr as CommandInput,
|
|
3272
|
+
_r as CommandItem,
|
|
3273
|
+
hr as CommandList,
|
|
3274
|
+
gr as CommandSeparator,
|
|
3275
|
+
Mr as DataGrid,
|
|
3276
|
+
Er as DatePicker,
|
|
3277
|
+
Tt as DropdownCheckboxItem,
|
|
3278
|
+
Dt as DropdownItem,
|
|
3279
|
+
It as DropdownLabel,
|
|
3280
|
+
Rt as DropdownMenu,
|
|
3281
|
+
St as DropdownRadioGroup,
|
|
2822
3282
|
Et as DropdownRadioItem,
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
3283
|
+
Bt as DropdownSeparator,
|
|
3284
|
+
At as DropdownSub,
|
|
3285
|
+
Ke as Field,
|
|
3286
|
+
Br as Heading,
|
|
3287
|
+
qe as Input,
|
|
3288
|
+
Nt as Label,
|
|
3289
|
+
Vr as Lead,
|
|
3290
|
+
Ye as Modal,
|
|
3291
|
+
Xe as ModalBody,
|
|
3292
|
+
ze as ModalFooter,
|
|
3293
|
+
Ue as ModalHeader,
|
|
3294
|
+
Xr as PageContent,
|
|
3295
|
+
nr as Pagination,
|
|
2836
3296
|
Ct as Popover,
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
3297
|
+
gt as Progress,
|
|
3298
|
+
rt as Select,
|
|
3299
|
+
wt as Separator,
|
|
3300
|
+
qt as Sheet,
|
|
3301
|
+
Gt as SheetBody,
|
|
2842
3302
|
Yt as SheetFooter,
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
3303
|
+
Pt as SheetHeader,
|
|
3304
|
+
Hr as Sidebar,
|
|
3305
|
+
Or as SidebarContent,
|
|
3306
|
+
Pr as SidebarFooter,
|
|
3307
|
+
Fr as SidebarHeader,
|
|
3308
|
+
qr as SidebarItem,
|
|
3309
|
+
Kr as SidebarSection,
|
|
3310
|
+
Ur as SidebarTrigger,
|
|
3311
|
+
xe as Skeleton,
|
|
3312
|
+
_t as Slider,
|
|
3313
|
+
pt as Switch,
|
|
3314
|
+
st as Tab,
|
|
3315
|
+
it as TabList,
|
|
3316
|
+
dt as TabPanel,
|
|
3317
|
+
lt as TabPanels,
|
|
3318
|
+
ar as Table,
|
|
3319
|
+
ir as TableBody,
|
|
3320
|
+
ur as TableCaption,
|
|
3321
|
+
cr as TableCell,
|
|
3322
|
+
or as TableHead,
|
|
3323
|
+
dr as TableHeader,
|
|
3324
|
+
sr as TableRow,
|
|
3325
|
+
ot as Tabs,
|
|
3326
|
+
Ie as Tag,
|
|
3327
|
+
Rr as TagGroup,
|
|
3328
|
+
kr as TagsInput,
|
|
3329
|
+
Ar as Text,
|
|
3330
|
+
Pe as Textarea,
|
|
3331
|
+
Qr as ToastProvider,
|
|
3332
|
+
ut as Tooltip,
|
|
3333
|
+
y as cn,
|
|
2871
3334
|
ye as useAppLayout,
|
|
2872
|
-
|
|
3335
|
+
en as useToast
|
|
2873
3336
|
};
|