@vellira-ui/react 2.34.0 → 2.35.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.js +630 -577
- package/dist/styles.css +1 -1
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -215,15 +215,15 @@ var ae = B("checkboxItem", "Dropdown.CheckboxItem"), V = (...e) => p(e), H = ({
|
|
|
215
215
|
let r = document.getElementById("overlay-root") ?? document.body;
|
|
216
216
|
return r ? m(e, r) : null;
|
|
217
217
|
}, U = {
|
|
218
|
-
dropdown: "
|
|
219
|
-
"dropdown-in": "_dropdown-
|
|
220
|
-
primary: "
|
|
221
|
-
neutral: "
|
|
222
|
-
success: "
|
|
223
|
-
warning: "
|
|
224
|
-
danger: "
|
|
225
|
-
empty: "
|
|
226
|
-
"dropdown-sheet-in": "_dropdown-sheet-
|
|
218
|
+
dropdown: "_dropdown_g5457_1",
|
|
219
|
+
"dropdown-in": "_dropdown-in_g5457_1",
|
|
220
|
+
primary: "_primary_g5457_42",
|
|
221
|
+
neutral: "_neutral_g5457_65",
|
|
222
|
+
success: "_success_g5457_88",
|
|
223
|
+
warning: "_warning_g5457_111",
|
|
224
|
+
danger: "_danger_g5457_134",
|
|
225
|
+
empty: "_empty_g5457_157",
|
|
226
|
+
"dropdown-sheet-in": "_dropdown-sheet-in_g5457_1"
|
|
227
227
|
}, oe = B("empty", "Dropdown.Empty"), se = ({ children: e }) => /* @__PURE__ */ g("li", {
|
|
228
228
|
role: "presentation",
|
|
229
229
|
className: U.empty,
|
|
@@ -249,99 +249,106 @@ function ge() {
|
|
|
249
249
|
return e;
|
|
250
250
|
}
|
|
251
251
|
var W = {
|
|
252
|
-
item: "
|
|
253
|
-
disabled: "
|
|
254
|
-
active: "
|
|
255
|
-
itemShortcut: "
|
|
256
|
-
itemDescription: "
|
|
257
|
-
primary: "
|
|
258
|
-
success: "
|
|
259
|
-
warning: "
|
|
260
|
-
danger: "
|
|
261
|
-
itemIcon: "
|
|
262
|
-
sm: "
|
|
263
|
-
md: "
|
|
264
|
-
lg: "
|
|
265
|
-
itemText: "
|
|
266
|
-
itemLabel: "
|
|
267
|
-
itemBadge: "
|
|
268
|
-
indicator: "
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
252
|
+
item: "_item_1vj4n_1",
|
|
253
|
+
disabled: "_disabled_1vj4n_22",
|
|
254
|
+
active: "_active_1vj4n_37",
|
|
255
|
+
itemShortcut: "_itemShortcut_1vj4n_44",
|
|
256
|
+
itemDescription: "_itemDescription_1vj4n_45",
|
|
257
|
+
primary: "_primary_1vj4n_53",
|
|
258
|
+
success: "_success_1vj4n_71",
|
|
259
|
+
warning: "_warning_1vj4n_89",
|
|
260
|
+
danger: "_danger_1vj4n_107",
|
|
261
|
+
itemIcon: "_itemIcon_1vj4n_131",
|
|
262
|
+
sm: "_sm_1vj4n_151",
|
|
263
|
+
md: "_md_1vj4n_157",
|
|
264
|
+
lg: "_lg_1vj4n_161",
|
|
265
|
+
itemText: "_itemText_1vj4n_168",
|
|
266
|
+
itemLabel: "_itemLabel_1vj4n_177",
|
|
267
|
+
itemBadge: "_itemBadge_1vj4n_203",
|
|
268
|
+
indicator: "_indicator_1vj4n_230",
|
|
269
|
+
"dropdown-indicator-in": "_dropdown-indicator-in_1vj4n_1",
|
|
270
|
+
checked: "_checked_1vj4n_246",
|
|
271
|
+
"dropdown-item-pop": "_dropdown-item-pop_1vj4n_1",
|
|
272
|
+
subContent: "_subContent_1vj4n_251",
|
|
273
|
+
"dropdown-sub-in": "_dropdown-sub-in_1vj4n_1",
|
|
274
|
+
subLabel: "_subLabel_1vj4n_276",
|
|
275
|
+
subSeparator: "_subSeparator_1vj4n_284"
|
|
273
276
|
}, _e = B("item", "Dropdown.Item"), ve = ({ item: e, itemIndex: t }) => {
|
|
274
|
-
let n = he(),
|
|
275
|
-
if (
|
|
277
|
+
let n = he(), r = d(void 0), [i, a] = f(e.type === "checkbox" ? e.props.defaultChecked ?? !1 : !1), o = n.activeIndex === t, s = n.openSubId === e.id, c = e.type === "checkbox", l = e.type === "radio", u = e.type === "subTrigger", p = c ? e.props.checked ?? i : l ? (e.groupProps?.value ?? n.radioValues[e.groupId]) === e.props.value : !1, m = n.loading || e.disabled, y = e.props, x = ne(y.children), S = x.icon ?? y.icon, C = x.description ?? ("description" in y ? y.description : void 0), w = x.badge ?? ("badge" in y ? y.badge : void 0), T = x.shortcut ?? y.shortcut, E = x.content.length ? x.content : y.children, D = "color" in y ? y.color : void 0, O = e.type === "item" ? e.props.href : void 0, k = e.type === "item" ? e.props.target : void 0, A = e.type === "item" ? e.props.download : void 0, j = n.getItemId(t), M = c ? "menuitemcheckbox" : l ? "menuitemradio" : "menuitem", N = e.type === "item" && k === "_blank" && !e.props.rel ? "noreferrer noopener" : e.type === "item" ? e.props.rel : void 0, P = O ? "a" : "li", F = c || l, I = (t) => {
|
|
278
|
+
if (m) {
|
|
276
279
|
t.preventDefault();
|
|
277
280
|
return;
|
|
278
281
|
}
|
|
279
|
-
if (
|
|
280
|
-
let t = !
|
|
281
|
-
|
|
282
|
+
if (c && e.type === "checkbox") {
|
|
283
|
+
let t = !p;
|
|
284
|
+
a(t), e.props.onCheckedChange?.(t);
|
|
282
285
|
}
|
|
283
286
|
n.selectItem(e, ye(t));
|
|
284
287
|
};
|
|
285
|
-
return /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ _(
|
|
286
|
-
id:
|
|
287
|
-
role:
|
|
288
|
-
href:
|
|
289
|
-
target:
|
|
290
|
-
rel:
|
|
291
|
-
download:
|
|
292
|
-
tabIndex:
|
|
293
|
-
"aria-disabled":
|
|
294
|
-
"aria-checked":
|
|
295
|
-
"aria-haspopup":
|
|
296
|
-
"aria-expanded":
|
|
297
|
-
"data-active":
|
|
298
|
-
"data-state":
|
|
288
|
+
return /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ _(P, {
|
|
289
|
+
id: j,
|
|
290
|
+
role: M,
|
|
291
|
+
href: P === "a" && !m ? O : void 0,
|
|
292
|
+
target: P === "a" && !m ? k : void 0,
|
|
293
|
+
rel: P === "a" ? N : void 0,
|
|
294
|
+
download: P === "a" && !m ? A : void 0,
|
|
295
|
+
tabIndex: m ? -1 : 0,
|
|
296
|
+
"aria-disabled": m || void 0,
|
|
297
|
+
"aria-checked": c || l ? p : void 0,
|
|
298
|
+
"aria-haspopup": u ? "menu" : void 0,
|
|
299
|
+
"aria-expanded": u ? s : void 0,
|
|
300
|
+
"data-active": o || void 0,
|
|
301
|
+
"data-state": s ? "open" : void 0,
|
|
299
302
|
className: V(W.item, W[n.size], {
|
|
300
|
-
[W.active]:
|
|
301
|
-
[W.disabled]:
|
|
302
|
-
[W.checked]:
|
|
303
|
-
},
|
|
304
|
-
onClick:
|
|
303
|
+
[W.active]: o,
|
|
304
|
+
[W.disabled]: m,
|
|
305
|
+
[W.checked]: p
|
|
306
|
+
}, D && D !== "default" ? W[D] : void 0, y.className),
|
|
307
|
+
onClick: I,
|
|
305
308
|
onMouseEnter: () => {
|
|
306
|
-
|
|
309
|
+
m || (n.setActiveIndex(t), u ? (window.clearTimeout(r.current), r.current = window.setTimeout(() => n.setOpenSubId(e.id), 120)) : (window.clearTimeout(r.current), n.setOpenSubId(void 0)));
|
|
310
|
+
},
|
|
311
|
+
onMouseLeave: () => {
|
|
312
|
+
window.clearTimeout(r.current);
|
|
307
313
|
},
|
|
308
314
|
children: [
|
|
309
|
-
|
|
315
|
+
F && /* @__PURE__ */ g("span", {
|
|
310
316
|
className: W.indicator,
|
|
311
317
|
"aria-hidden": "true",
|
|
312
|
-
children:
|
|
318
|
+
children: p ? /* @__PURE__ */ g(v, {}) : null
|
|
313
319
|
}),
|
|
314
|
-
|
|
320
|
+
S && /* @__PURE__ */ g("span", {
|
|
315
321
|
className: W.itemIcon,
|
|
316
|
-
children:
|
|
322
|
+
children: S
|
|
317
323
|
}),
|
|
318
324
|
/* @__PURE__ */ _("span", {
|
|
319
325
|
className: W.itemText,
|
|
320
326
|
children: [/* @__PURE__ */ g("span", {
|
|
321
327
|
className: W.itemLabel,
|
|
322
|
-
children:
|
|
323
|
-
}),
|
|
328
|
+
children: E
|
|
329
|
+
}), C && /* @__PURE__ */ g("span", {
|
|
324
330
|
className: W.itemDescription,
|
|
325
|
-
children:
|
|
331
|
+
children: C
|
|
326
332
|
})]
|
|
327
333
|
}),
|
|
328
|
-
|
|
334
|
+
w && /* @__PURE__ */ g("span", {
|
|
329
335
|
className: W.itemBadge,
|
|
330
|
-
children:
|
|
336
|
+
children: w
|
|
331
337
|
}),
|
|
332
|
-
|
|
338
|
+
T && /* @__PURE__ */ g("span", {
|
|
333
339
|
className: W.itemShortcut,
|
|
334
|
-
children:
|
|
340
|
+
children: T
|
|
335
341
|
}),
|
|
336
|
-
|
|
342
|
+
u && /* @__PURE__ */ g("span", {
|
|
337
343
|
className: W.itemShortcut,
|
|
338
344
|
"aria-hidden": "true",
|
|
339
345
|
children: /* @__PURE__ */ g(b, {})
|
|
340
346
|
})
|
|
341
347
|
]
|
|
342
|
-
}),
|
|
348
|
+
}), u && s && e.subEntries.length > 0 && /* @__PURE__ */ g("ul", {
|
|
343
349
|
role: "menu",
|
|
344
350
|
className: W.subContent,
|
|
351
|
+
onMouseEnter: () => n.setOpenSubId(e.id),
|
|
345
352
|
children: e.subEntries.map((e) => e.type === "label" ? /* @__PURE__ */ g("li", {
|
|
346
353
|
role: "presentation",
|
|
347
354
|
className: W.subLabel,
|
|
@@ -352,7 +359,7 @@ var W = {
|
|
|
352
359
|
"aria-hidden": "true"
|
|
353
360
|
}, e.id) : e.type === "item" ? /* @__PURE__ */ g(be, {
|
|
354
361
|
item: e.item,
|
|
355
|
-
id: `${
|
|
362
|
+
id: `${j}-${e.itemIndex}`
|
|
356
363
|
}, e.item.id) : null)
|
|
357
364
|
})] });
|
|
358
365
|
};
|
|
@@ -370,26 +377,61 @@ function ye(e) {
|
|
|
370
377
|
};
|
|
371
378
|
}
|
|
372
379
|
function be({ id: e, item: t }) {
|
|
373
|
-
let n = he(), r = t.props,
|
|
374
|
-
|
|
380
|
+
let n = he(), [r, i] = f(t.type === "checkbox" ? t.props.defaultChecked ?? !1 : !1), a = t.type === "checkbox", o = t.type === "radio", s = a ? t.props.checked ?? r : o ? (t.groupProps?.value ?? n.radioValues[t.groupId]) === t.props.value : !1, c = t.props, l = ne(c.children), u = l.icon ?? c.icon, d = l.description ?? ("description" in c ? c.description : void 0), p = l.badge ?? ("badge" in c ? c.badge : void 0), m = l.shortcut ?? c.shortcut, h = l.content.length ? l.content : c.children, y = "color" in c ? c.color : void 0, b = n.loading || t.disabled, x = t.type === "item" ? t.props.href : void 0, S = t.type === "item" ? t.props.target : void 0, C = t.type === "item" ? t.props.download : void 0, w = a ? "menuitemcheckbox" : o ? "menuitemradio" : "menuitem", T = t.type === "item" && S === "_blank" && !t.props.rel ? "noreferrer noopener" : t.type === "item" ? t.props.rel : void 0, E = x ? "a" : "li", D = a || o, O = (e) => {
|
|
381
|
+
if (b) {
|
|
382
|
+
e.preventDefault();
|
|
383
|
+
return;
|
|
384
|
+
}
|
|
385
|
+
if (a && t.type === "checkbox") {
|
|
386
|
+
let e = !s;
|
|
387
|
+
i(e), t.props.onCheckedChange?.(e);
|
|
388
|
+
}
|
|
389
|
+
n.selectItem(t, ye(e));
|
|
390
|
+
};
|
|
391
|
+
return /* @__PURE__ */ _(E, {
|
|
375
392
|
id: e,
|
|
376
|
-
role:
|
|
377
|
-
|
|
378
|
-
"
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
393
|
+
role: w,
|
|
394
|
+
href: E === "a" && !b ? x : void 0,
|
|
395
|
+
target: E === "a" && !b ? S : void 0,
|
|
396
|
+
rel: E === "a" ? T : void 0,
|
|
397
|
+
download: E === "a" && !b ? C : void 0,
|
|
398
|
+
tabIndex: b ? -1 : 0,
|
|
399
|
+
"aria-disabled": b || void 0,
|
|
400
|
+
"aria-checked": a || o ? s : void 0,
|
|
401
|
+
className: V(W.item, W[n.size], {
|
|
402
|
+
[W.disabled]: b,
|
|
403
|
+
[W.checked]: s
|
|
404
|
+
}, y && y !== "default" ? W[y] : void 0),
|
|
405
|
+
onClick: O,
|
|
406
|
+
children: [
|
|
407
|
+
D && /* @__PURE__ */ g("span", {
|
|
408
|
+
className: W.indicator,
|
|
409
|
+
"aria-hidden": "true",
|
|
410
|
+
children: s ? /* @__PURE__ */ g(v, {}) : null
|
|
411
|
+
}),
|
|
412
|
+
u && /* @__PURE__ */ g("span", {
|
|
413
|
+
className: W.itemIcon,
|
|
414
|
+
children: u
|
|
415
|
+
}),
|
|
416
|
+
/* @__PURE__ */ _("span", {
|
|
417
|
+
className: W.itemText,
|
|
418
|
+
children: [/* @__PURE__ */ g("span", {
|
|
419
|
+
className: W.itemLabel,
|
|
420
|
+
children: h
|
|
421
|
+
}), d && /* @__PURE__ */ g("span", {
|
|
422
|
+
className: W.itemDescription,
|
|
423
|
+
children: d
|
|
424
|
+
})]
|
|
425
|
+
}),
|
|
426
|
+
p && /* @__PURE__ */ g("span", {
|
|
427
|
+
className: W.itemBadge,
|
|
428
|
+
children: p
|
|
429
|
+
}),
|
|
430
|
+
m && /* @__PURE__ */ g("span", {
|
|
431
|
+
className: W.itemShortcut,
|
|
432
|
+
children: m
|
|
391
433
|
})
|
|
392
|
-
|
|
434
|
+
]
|
|
393
435
|
});
|
|
394
436
|
}
|
|
395
437
|
var xe = { group: "_group_aviwv_1" }, Se = B("label", "Dropdown.Label"), Ce = ({ children: e, className: t }) => /* @__PURE__ */ g("li", {
|
|
@@ -524,19 +566,19 @@ function G(e) {
|
|
|
524
566
|
return typeof e == "number" ? `${e}px` : e;
|
|
525
567
|
}
|
|
526
568
|
var K = { wrapper: "_wrapper_14ue8_1" }, Ve = ({ children: e, open: t, defaultOpen: n = !1, onOpenChange: r, size: i = "md", color: a = "primary", placement: s = "bottom-start", offset: p = 2, matchTriggerWidth: m = !1, minWidth: h, maxWidth: v, portal: y = !0, avoidCollisions: b = !0, modal: x = !1, closeOnSelect: S = !0, loop: C = !0, disabled: w = !1, loading: T = !1, loadingText: E = "Loading actions...", className: D }) => {
|
|
527
|
-
let O = l(), k = `${O}-trigger`, A = `${O}-menu`, j = d(null), M = d(null), [N, P] = f(), [I, L] = f({}), R = u(() => te(e), [e]), ee = u(() => R.items.map((e) => ({
|
|
569
|
+
let O = l(), k = `${O}-trigger`, A = `${O}-menu`, j = d(null), M = d(null), [N, P] = f(), [I, L] = f({}), R = u(() => te(e), [e]), ee = u(() => Ue(R.items), [R.items]), z = u(() => R.items.map((e) => ({
|
|
528
570
|
disabled: e.disabled,
|
|
529
571
|
label: e.label
|
|
530
572
|
})), [R.items]);
|
|
531
573
|
c(() => {
|
|
532
574
|
L((e) => {
|
|
533
575
|
let t = { ...e };
|
|
534
|
-
return
|
|
576
|
+
return ee.forEach((e) => {
|
|
535
577
|
e.type === "radio" && t[e.groupId] === void 0 && (t[e.groupId] = e.groupProps?.value ?? e.groupProps?.defaultValue);
|
|
536
578
|
}), t;
|
|
537
579
|
});
|
|
538
|
-
}, [
|
|
539
|
-
let { floatingStyles:
|
|
580
|
+
}, [ee]);
|
|
581
|
+
let { floatingStyles: B, setRef: ne, setFloatingRef: re } = Le({
|
|
540
582
|
open: t,
|
|
541
583
|
onOpenChange: r,
|
|
542
584
|
placement: s,
|
|
@@ -544,8 +586,8 @@ var K = { wrapper: "_wrapper_14ue8_1" }, Ve = ({ children: e, open: t, defaultOp
|
|
|
544
586
|
avoidCollisions: b,
|
|
545
587
|
offset: p,
|
|
546
588
|
mobileSheetBreakpoint: 640
|
|
547
|
-
}), { activeIndex:
|
|
548
|
-
items:
|
|
589
|
+
}), { activeIndex: ie, setActiveIndex: ae, isOpen: H, closeDropdown: U, toggleDropdown: oe, onKeyDown: se } = F({
|
|
590
|
+
items: z,
|
|
549
591
|
open: t,
|
|
550
592
|
defaultOpen: n,
|
|
551
593
|
disabled: w,
|
|
@@ -555,15 +597,15 @@ var K = { wrapper: "_wrapper_14ue8_1" }, Ve = ({ children: e, open: t, defaultOp
|
|
|
555
597
|
loop: C
|
|
556
598
|
});
|
|
557
599
|
c(() => {
|
|
558
|
-
if (!x || !
|
|
600
|
+
if (!x || !H) return;
|
|
559
601
|
let e = document.body.style.overflow;
|
|
560
602
|
return document.body.style.overflow = "hidden", () => {
|
|
561
603
|
document.body.style.overflow = e;
|
|
562
604
|
};
|
|
563
|
-
}, [
|
|
564
|
-
let
|
|
565
|
-
|
|
566
|
-
}, [
|
|
605
|
+
}, [H, x]);
|
|
606
|
+
let ce = o(() => {
|
|
607
|
+
U(), j.current?.focus();
|
|
608
|
+
}, [U]), le = o((e, t) => {
|
|
567
609
|
if (e.disabled || T) return;
|
|
568
610
|
if (e.type === "subTrigger") {
|
|
569
611
|
P(e.id);
|
|
@@ -574,13 +616,13 @@ var K = { wrapper: "_wrapper_14ue8_1" }, Ve = ({ children: e, open: t, defaultOp
|
|
|
574
616
|
[e.groupId]: e.props.value
|
|
575
617
|
})), e.groupProps?.onValueChange?.(e.props.value));
|
|
576
618
|
let n = e.props.closeOnSelect ?? (e.type !== "checkbox" && S);
|
|
577
|
-
!t.defaultPrevented && n &&
|
|
619
|
+
!t.defaultPrevented && n && ce();
|
|
578
620
|
}, [
|
|
579
|
-
|
|
621
|
+
ce,
|
|
580
622
|
S,
|
|
581
623
|
T
|
|
582
|
-
]),
|
|
583
|
-
let t = R.items[
|
|
624
|
+
]), ue = o((e) => {
|
|
625
|
+
let t = R.items[ie];
|
|
584
626
|
if (e.key === "ArrowRight" && t?.type === "subTrigger") {
|
|
585
627
|
e.preventDefault(), P(t.id);
|
|
586
628
|
return;
|
|
@@ -592,42 +634,42 @@ var K = { wrapper: "_wrapper_14ue8_1" }, Ve = ({ children: e, open: t, defaultOp
|
|
|
592
634
|
if ((e.key === "Enter" || e.key === " ") && t) {
|
|
593
635
|
e.preventDefault();
|
|
594
636
|
let n = He(e);
|
|
595
|
-
|
|
637
|
+
le(t, n);
|
|
596
638
|
return;
|
|
597
639
|
}
|
|
598
|
-
|
|
640
|
+
se(e), e.key === "Escape" && j.current?.focus();
|
|
599
641
|
}, [
|
|
600
|
-
|
|
601
|
-
|
|
642
|
+
ie,
|
|
643
|
+
se,
|
|
602
644
|
N,
|
|
603
645
|
R.items,
|
|
604
|
-
|
|
605
|
-
]),
|
|
606
|
-
e.preventDefault(),
|
|
607
|
-
}, [
|
|
608
|
-
j.current = e,
|
|
609
|
-
}, [
|
|
610
|
-
M.current = e,
|
|
611
|
-
}, [
|
|
612
|
-
Re([j, M],
|
|
613
|
-
let
|
|
614
|
-
...
|
|
646
|
+
le
|
|
647
|
+
]), de = o((e) => {
|
|
648
|
+
e.preventDefault(), oe();
|
|
649
|
+
}, [oe]), fe = o((e) => {
|
|
650
|
+
j.current = e, ne(e);
|
|
651
|
+
}, [ne]), he = o((e) => {
|
|
652
|
+
M.current = e, re(e), e?.focus();
|
|
653
|
+
}, [re]);
|
|
654
|
+
Re([j, M], U, H);
|
|
655
|
+
let ge = {
|
|
656
|
+
...B,
|
|
615
657
|
minWidth: G(h),
|
|
616
658
|
maxWidth: G(v)
|
|
617
659
|
};
|
|
618
660
|
return /* @__PURE__ */ g(me, {
|
|
619
661
|
value: {
|
|
620
662
|
disabled: w,
|
|
621
|
-
isOpen:
|
|
663
|
+
isOpen: H,
|
|
622
664
|
contentId: A,
|
|
623
665
|
triggerId: k,
|
|
624
|
-
setTriggerRef:
|
|
625
|
-
onClick:
|
|
626
|
-
onKeyDown:
|
|
666
|
+
setTriggerRef: fe,
|
|
667
|
+
onClick: de,
|
|
668
|
+
onKeyDown: ue
|
|
627
669
|
},
|
|
628
670
|
children: /* @__PURE__ */ g(pe, {
|
|
629
671
|
value: {
|
|
630
|
-
activeIndex:
|
|
672
|
+
activeIndex: ie,
|
|
631
673
|
closeOnSelect: S,
|
|
632
674
|
color: a,
|
|
633
675
|
contentId: A,
|
|
@@ -635,19 +677,19 @@ var K = { wrapper: "_wrapper_14ue8_1" }, Ve = ({ children: e, open: t, defaultOp
|
|
|
635
677
|
disabled: w,
|
|
636
678
|
entries: R.entries,
|
|
637
679
|
getItemId: (e) => `${A}-item-${e}`,
|
|
638
|
-
isOpen:
|
|
680
|
+
isOpen: H,
|
|
639
681
|
items: R.items,
|
|
640
682
|
loading: T,
|
|
641
683
|
loadingText: E,
|
|
642
684
|
maxWidth: v,
|
|
643
685
|
minWidth: h,
|
|
644
686
|
openSubId: N,
|
|
645
|
-
onKeyDown:
|
|
687
|
+
onKeyDown: ue,
|
|
646
688
|
portal: y,
|
|
647
689
|
radioValues: I,
|
|
648
|
-
selectItem:
|
|
649
|
-
setActiveIndex:
|
|
650
|
-
setContentRef:
|
|
690
|
+
selectItem: le,
|
|
691
|
+
setActiveIndex: ae,
|
|
692
|
+
setContentRef: he,
|
|
651
693
|
setOpenSubId: P,
|
|
652
694
|
setRadioValue: (e, t) => {
|
|
653
695
|
L((n) => ({
|
|
@@ -656,7 +698,7 @@ var K = { wrapper: "_wrapper_14ue8_1" }, Ve = ({ children: e, open: t, defaultOp
|
|
|
656
698
|
}));
|
|
657
699
|
},
|
|
658
700
|
size: i,
|
|
659
|
-
surfaceStyle:
|
|
701
|
+
surfaceStyle: ge,
|
|
660
702
|
triggerId: k
|
|
661
703
|
},
|
|
662
704
|
children: /* @__PURE__ */ _("div", {
|
|
@@ -680,27 +722,33 @@ function He(e) {
|
|
|
680
722
|
}
|
|
681
723
|
};
|
|
682
724
|
}
|
|
725
|
+
function Ue(e) {
|
|
726
|
+
let t = [];
|
|
727
|
+
return e.forEach((e) => {
|
|
728
|
+
t.push(e), e.type === "subTrigger" && t.push(...Ue(e.subItems));
|
|
729
|
+
}), t;
|
|
730
|
+
}
|
|
683
731
|
//#endregion
|
|
684
732
|
//#region src/components/Dropdown/SubContent/DropdownSubContent.tsx
|
|
685
|
-
var
|
|
686
|
-
button: "
|
|
687
|
-
disabled: "
|
|
688
|
-
arrow: "
|
|
689
|
-
iconLeft: "
|
|
690
|
-
iconOnly: "
|
|
691
|
-
primary: "
|
|
692
|
-
neutral: "
|
|
693
|
-
success: "
|
|
694
|
-
warning: "
|
|
695
|
-
danger: "
|
|
696
|
-
sm: "
|
|
697
|
-
md: "
|
|
698
|
-
lg: "
|
|
699
|
-
label: "
|
|
700
|
-
open: "
|
|
701
|
-
},
|
|
702
|
-
|
|
703
|
-
var
|
|
733
|
+
var We = B("subContent", "Dropdown.SubContent"), Ge = B("subTrigger", "Dropdown.SubTrigger"), Ke = B("sub", "Dropdown.Sub"), qe = {
|
|
734
|
+
button: "_button_bb3ib_1",
|
|
735
|
+
disabled: "_disabled_bb3ib_63",
|
|
736
|
+
arrow: "_arrow_bb3ib_71",
|
|
737
|
+
iconLeft: "_iconLeft_bb3ib_87",
|
|
738
|
+
iconOnly: "_iconOnly_bb3ib_113",
|
|
739
|
+
primary: "_primary_bb3ib_126",
|
|
740
|
+
neutral: "_neutral_bb3ib_166",
|
|
741
|
+
success: "_success_bb3ib_206",
|
|
742
|
+
warning: "_warning_bb3ib_246",
|
|
743
|
+
danger: "_danger_bb3ib_286",
|
|
744
|
+
sm: "_sm_bb3ib_326",
|
|
745
|
+
md: "_md_bb3ib_338",
|
|
746
|
+
lg: "_lg_bb3ib_350",
|
|
747
|
+
label: "_label_bb3ib_362",
|
|
748
|
+
open: "_open_bb3ib_390"
|
|
749
|
+
}, Je = (e) => /* @__PURE__ */ g(Ye, { ...e });
|
|
750
|
+
Je.__velliraDropdownPart = "trigger", Je.displayName = "Dropdown.Trigger";
|
|
751
|
+
var Ye = ({ children: e, asChild: t = !1, disabled: r, className: i }) => {
|
|
704
752
|
let o = he(), s = ge(), c = t && a(e) ? e : void 0, l = o.disabled || r, u = {
|
|
705
753
|
id: s.triggerId,
|
|
706
754
|
ref: c ? Be(c.props.ref, s.setTriggerRef) : s.setTriggerRef,
|
|
@@ -708,7 +756,7 @@ var Je = ({ children: e, asChild: t = !1, disabled: r, className: i }) => {
|
|
|
708
756
|
"aria-disabled": l || void 0,
|
|
709
757
|
"aria-expanded": s.isOpen,
|
|
710
758
|
"aria-haspopup": "menu",
|
|
711
|
-
className: V(!c &&
|
|
759
|
+
className: V(!c && qe.button, !c && qe[o.size], !c && qe[o.color], i),
|
|
712
760
|
"data-state": s.isOpen ? "open" : "closed",
|
|
713
761
|
disabled: l || void 0,
|
|
714
762
|
onClick: ze(c?.props.onClick, s.onClick),
|
|
@@ -721,20 +769,20 @@ var Je = ({ children: e, asChild: t = !1, disabled: r, className: i }) => {
|
|
|
721
769
|
type: "button",
|
|
722
770
|
...u,
|
|
723
771
|
children: [/* @__PURE__ */ g("span", {
|
|
724
|
-
className:
|
|
772
|
+
className: qe.label,
|
|
725
773
|
children: e
|
|
726
774
|
}), /* @__PURE__ */ g("span", {
|
|
727
|
-
className: V(
|
|
775
|
+
className: V(qe.arrow, { [qe.open]: s.isOpen }),
|
|
728
776
|
"aria-hidden": "true",
|
|
729
777
|
children: /* @__PURE__ */ g(y, {})
|
|
730
778
|
})]
|
|
731
779
|
});
|
|
732
780
|
};
|
|
733
|
-
|
|
781
|
+
Ye.displayName = "DropdownTriggerSurface";
|
|
734
782
|
//#endregion
|
|
735
783
|
//#region src/components/Dropdown/Dropdown.tsx
|
|
736
|
-
var
|
|
737
|
-
Trigger:
|
|
784
|
+
var Xe = Object.assign(Ve, {
|
|
785
|
+
Trigger: Je,
|
|
738
786
|
Content: ke,
|
|
739
787
|
Item: _e,
|
|
740
788
|
CheckboxItem: ae,
|
|
@@ -743,9 +791,9 @@ var Ye = Object.assign(Ve, {
|
|
|
743
791
|
Group: ce,
|
|
744
792
|
Label: Se,
|
|
745
793
|
Separator: De,
|
|
746
|
-
Sub:
|
|
747
|
-
SubTrigger:
|
|
748
|
-
SubContent:
|
|
794
|
+
Sub: Ke,
|
|
795
|
+
SubTrigger: Ge,
|
|
796
|
+
SubContent: We,
|
|
749
797
|
ItemIcon: Me,
|
|
750
798
|
ItemDescription: je,
|
|
751
799
|
ItemBadge: Ae,
|
|
@@ -753,81 +801,81 @@ var Ye = Object.assign(Ve, {
|
|
|
753
801
|
Empty: oe,
|
|
754
802
|
Loading: we
|
|
755
803
|
});
|
|
756
|
-
|
|
804
|
+
Xe.displayName = "Dropdown";
|
|
757
805
|
//#endregion
|
|
758
806
|
//#region src/components/Modal/ModalContext.tsx
|
|
759
|
-
var
|
|
760
|
-
let e = s(
|
|
807
|
+
var Ze = r(void 0), Qe = () => {
|
|
808
|
+
let e = s(Ze);
|
|
761
809
|
if (e === void 0) throw Error("Modal compound components must be used inside Modal");
|
|
762
810
|
return e;
|
|
763
811
|
};
|
|
764
|
-
|
|
765
|
-
var
|
|
766
|
-
let { descriptionId: t } =
|
|
812
|
+
Ze.displayName = "ModalContext";
|
|
813
|
+
var $e = { modalBody: "_modalBody_iv33a_1" }, et = ({ children: e }) => {
|
|
814
|
+
let { descriptionId: t } = Qe();
|
|
767
815
|
return /* @__PURE__ */ g("div", {
|
|
768
816
|
id: t,
|
|
769
|
-
className:
|
|
817
|
+
className: $e.modalBody,
|
|
770
818
|
children: e
|
|
771
819
|
});
|
|
772
820
|
};
|
|
773
|
-
|
|
774
|
-
var
|
|
775
|
-
className:
|
|
821
|
+
et.displayName = "ModalBody";
|
|
822
|
+
var tt = { content: "_content_k44g7_1" }, nt = ({ children: e }) => /* @__PURE__ */ g("div", {
|
|
823
|
+
className: tt.content,
|
|
776
824
|
children: e
|
|
777
825
|
});
|
|
778
|
-
|
|
779
|
-
var
|
|
780
|
-
className:
|
|
826
|
+
nt.displayName = "ModalContent";
|
|
827
|
+
var rt = { modalFooter: "_modalFooter_ezys6_1" }, it = ({ children: e }) => /* @__PURE__ */ g("div", {
|
|
828
|
+
className: rt.modalFooter,
|
|
781
829
|
children: e
|
|
782
830
|
});
|
|
783
|
-
|
|
784
|
-
var
|
|
831
|
+
it.displayName = "ModalFooter";
|
|
832
|
+
var at = {
|
|
785
833
|
modalHeader: "_modalHeader_p8xf1_1",
|
|
786
834
|
modalHeaderTitle: "_modalHeaderTitle_p8xf1_7",
|
|
787
835
|
modalHeaderCloseButton: "_modalHeaderCloseButton_p8xf1_14"
|
|
788
|
-
},
|
|
789
|
-
let { onClose: t, titleId: n } =
|
|
836
|
+
}, ot = ({ children: e }) => {
|
|
837
|
+
let { onClose: t, titleId: n } = Qe();
|
|
790
838
|
return /* @__PURE__ */ _("div", {
|
|
791
|
-
className:
|
|
839
|
+
className: at.modalHeader,
|
|
792
840
|
children: [/* @__PURE__ */ g("h2", {
|
|
793
841
|
id: n,
|
|
794
|
-
className:
|
|
842
|
+
className: at.modalHeaderTitle,
|
|
795
843
|
children: e
|
|
796
844
|
}), t && /* @__PURE__ */ g("button", {
|
|
797
845
|
type: "button",
|
|
798
|
-
className:
|
|
846
|
+
className: at.modalHeaderCloseButton,
|
|
799
847
|
onClick: t,
|
|
800
848
|
"aria-label": "Close modal",
|
|
801
849
|
children: /* @__PURE__ */ g(x, { size: 16 })
|
|
802
850
|
})]
|
|
803
851
|
});
|
|
804
852
|
};
|
|
805
|
-
|
|
853
|
+
ot.displayName = "ModalHeader";
|
|
806
854
|
//#endregion
|
|
807
855
|
//#region src/hooks/useModalKeyboard.ts
|
|
808
|
-
var
|
|
856
|
+
var st = ({ isOpen: e, onClose: t }) => {
|
|
809
857
|
let n = o((n) => {
|
|
810
858
|
e && n.key === "Escape" && (n.preventDefault(), t?.());
|
|
811
859
|
}, [e, t]);
|
|
812
860
|
c(() => (document.addEventListener("keydown", n), () => document.removeEventListener("keydown", n)), [n]);
|
|
813
|
-
},
|
|
861
|
+
}, ct = {
|
|
814
862
|
overlay: "_overlay_dcudn_1",
|
|
815
863
|
"overlay--open": "_overlay--open_dcudn_14",
|
|
816
864
|
modal: "_modal_dcudn_20",
|
|
817
865
|
"overlay--animated": "_overlay--animated_dcudn_28"
|
|
818
|
-
},
|
|
819
|
-
let f = i ?? a ?? !0, p = d(null), { titleId: m, descriptionId: h } =
|
|
866
|
+
}, lt = 0, ut = "", dt = ({ children: e, onClose: t, isOpen: n, className: r, closeOnBackdrop: i, closeOnClick: a, closeOnEsc: s = !0, zIndex: l = 1e3, animated: u = !0 }) => {
|
|
867
|
+
let f = i ?? a ?? !0, p = d(null), { titleId: m, descriptionId: h } = Qe(), _ = o((e) => {
|
|
820
868
|
f && e.target === e.currentTarget && t?.();
|
|
821
869
|
}, [f, t]);
|
|
822
|
-
return
|
|
870
|
+
return st({
|
|
823
871
|
isOpen: n,
|
|
824
872
|
onClose: s ? t : void 0
|
|
825
873
|
}), c(() => {
|
|
826
|
-
if (n) return
|
|
827
|
-
|
|
874
|
+
if (n) return lt === 0 && (ut = document.body.style.overflow), lt += 1, document.body.style.overflow = "hidden", () => {
|
|
875
|
+
lt = Math.max(0, lt - 1), lt === 0 && (document.body.style.overflow = ut);
|
|
828
876
|
};
|
|
829
877
|
}, [n]), !n && !u ? null : /* @__PURE__ */ g(H, { children: /* @__PURE__ */ g("div", {
|
|
830
|
-
className: V(
|
|
878
|
+
className: V(ct.overlay, n && ct["overlay--open"], u && ct["overlay--animated"], r),
|
|
831
879
|
onClick: _,
|
|
832
880
|
tabIndex: -1,
|
|
833
881
|
role: "presentation",
|
|
@@ -843,7 +891,7 @@ var ot = ({ isOpen: e, onClose: t }) => {
|
|
|
843
891
|
children: /* @__PURE__ */ g("div", {
|
|
844
892
|
ref: p,
|
|
845
893
|
tabIndex: -1,
|
|
846
|
-
className:
|
|
894
|
+
className: ct.modal,
|
|
847
895
|
role: "dialog",
|
|
848
896
|
"aria-modal": "true",
|
|
849
897
|
"aria-labelledby": m,
|
|
@@ -853,10 +901,10 @@ var ot = ({ isOpen: e, onClose: t }) => {
|
|
|
853
901
|
})
|
|
854
902
|
}) });
|
|
855
903
|
};
|
|
856
|
-
|
|
904
|
+
dt.displayName = "ModalOverlay";
|
|
857
905
|
//#endregion
|
|
858
906
|
//#region src/components/Modal/Modal.tsx
|
|
859
|
-
var
|
|
907
|
+
var ft = ({ isOpen: e, children: t, onClose: n, closeOnBackdrop: r, closeOnClick: i, closeOnEsc: a = !0 }) => {
|
|
860
908
|
let o = I({
|
|
861
909
|
isOpen: e,
|
|
862
910
|
onClose: n,
|
|
@@ -864,34 +912,34 @@ var dt = ({ isOpen: e, children: t, onClose: n, closeOnBackdrop: r, closeOnClick
|
|
|
864
912
|
closeOnClick: i,
|
|
865
913
|
closeOnEsc: a
|
|
866
914
|
});
|
|
867
|
-
return o.shouldRender ? /* @__PURE__ */ g(
|
|
915
|
+
return o.shouldRender ? /* @__PURE__ */ g(Ze.Provider, {
|
|
868
916
|
value: {
|
|
869
917
|
onClose: o.onClose,
|
|
870
918
|
titleId: o.titleId,
|
|
871
919
|
descriptionId: o.descriptionId
|
|
872
920
|
},
|
|
873
|
-
children: /* @__PURE__ */ g(
|
|
921
|
+
children: /* @__PURE__ */ g(dt, {
|
|
874
922
|
isOpen: o.isOpen,
|
|
875
923
|
onClose: o.onClose,
|
|
876
924
|
closeOnBackdrop: o.closeOnBackdrop,
|
|
877
925
|
closeOnEsc: o.closeOnEsc,
|
|
878
|
-
children: /* @__PURE__ */ g(
|
|
926
|
+
children: /* @__PURE__ */ g(nt, { children: t })
|
|
879
927
|
})
|
|
880
928
|
}) : null;
|
|
881
929
|
};
|
|
882
|
-
|
|
930
|
+
ft.displayName = "Modal";
|
|
883
931
|
//#endregion
|
|
884
932
|
//#region src/components/Modal/index.ts
|
|
885
|
-
var
|
|
886
|
-
Header:
|
|
887
|
-
Body:
|
|
888
|
-
Content:
|
|
889
|
-
Footer:
|
|
890
|
-
}),
|
|
891
|
-
function
|
|
892
|
-
return s(
|
|
933
|
+
var pt = Object.assign(ft, {
|
|
934
|
+
Header: ot,
|
|
935
|
+
Body: et,
|
|
936
|
+
Content: nt,
|
|
937
|
+
Footer: it
|
|
938
|
+
}), mt = r(null), ht = mt.Provider;
|
|
939
|
+
function gt() {
|
|
940
|
+
return s(mt);
|
|
893
941
|
}
|
|
894
|
-
var
|
|
942
|
+
var _t = {
|
|
895
943
|
root: "_root_1n02e_1",
|
|
896
944
|
label: "_label_1n02e_9",
|
|
897
945
|
required: "_required_1n02e_21",
|
|
@@ -902,7 +950,7 @@ var gt = {
|
|
|
902
950
|
error: "_error_1n02e_51",
|
|
903
951
|
disabled: "_disabled_1n02e_59",
|
|
904
952
|
invalid: "_invalid_1n02e_75"
|
|
905
|
-
},
|
|
953
|
+
}, vt = i(({ value: e, defaultValue: t = "", onValueChange: n, disabled: r = !1, required: i = !1, size: a = "md", color: o = "primary", name: s, label: c, description: u, error: d, orientation: f = "vertical", children: p, className: m, id: h, ...v }, y) => {
|
|
906
954
|
let b = l(), x = h ?? b, S = c ? `${x}-label` : void 0, C = u ? `${x}-description` : void 0, w = d ? `${x}-error` : void 0, T = [C, w].filter(Boolean).join(" ") || void 0, E = s ?? `${x}-radio`, [D, O] = P({
|
|
907
955
|
value: e,
|
|
908
956
|
defaultValue: t,
|
|
@@ -918,23 +966,23 @@ var gt = {
|
|
|
918
966
|
"aria-disabled": r || void 0,
|
|
919
967
|
"aria-required": i || void 0,
|
|
920
968
|
"aria-invalid": k || void 0,
|
|
921
|
-
className: V(
|
|
969
|
+
className: V(_t.root, k && _t.invalid, r && _t.disabled, m),
|
|
922
970
|
children: [
|
|
923
971
|
c && /* @__PURE__ */ _("div", {
|
|
924
972
|
id: S,
|
|
925
|
-
className:
|
|
973
|
+
className: _t.label,
|
|
926
974
|
children: [c, i && /* @__PURE__ */ g("span", {
|
|
927
|
-
className:
|
|
975
|
+
className: _t.required,
|
|
928
976
|
"aria-hidden": "true",
|
|
929
977
|
children: "*"
|
|
930
978
|
})]
|
|
931
979
|
}),
|
|
932
980
|
u && /* @__PURE__ */ g("div", {
|
|
933
981
|
id: C,
|
|
934
|
-
className:
|
|
982
|
+
className: _t.description,
|
|
935
983
|
children: u
|
|
936
984
|
}),
|
|
937
|
-
/* @__PURE__ */ g(
|
|
985
|
+
/* @__PURE__ */ g(ht, {
|
|
938
986
|
value: {
|
|
939
987
|
name: E,
|
|
940
988
|
value: D,
|
|
@@ -947,31 +995,31 @@ var gt = {
|
|
|
947
995
|
onValueChange: O
|
|
948
996
|
},
|
|
949
997
|
children: /* @__PURE__ */ g("div", {
|
|
950
|
-
className: V(
|
|
998
|
+
className: V(_t.items, _t[f]),
|
|
951
999
|
children: p
|
|
952
1000
|
})
|
|
953
1001
|
}),
|
|
954
1002
|
d && /* @__PURE__ */ g("div", {
|
|
955
1003
|
id: w,
|
|
956
|
-
className:
|
|
1004
|
+
className: _t.error,
|
|
957
1005
|
children: d
|
|
958
1006
|
})
|
|
959
1007
|
]
|
|
960
1008
|
});
|
|
961
1009
|
});
|
|
962
|
-
|
|
1010
|
+
vt.displayName = "RadioGroup";
|
|
963
1011
|
//#endregion
|
|
964
1012
|
//#region src/components/Select/internal/SelectContext.tsx
|
|
965
|
-
var
|
|
966
|
-
function
|
|
967
|
-
let e = s(
|
|
1013
|
+
var yt = r(null), bt = yt.Provider;
|
|
1014
|
+
function xt() {
|
|
1015
|
+
let e = s(yt);
|
|
968
1016
|
if (!e) throw Error("Select compound components must be used inside <Select>");
|
|
969
1017
|
return e;
|
|
970
1018
|
}
|
|
971
|
-
|
|
1019
|
+
yt.displayName = "SelectContext";
|
|
972
1020
|
//#endregion
|
|
973
1021
|
//#region src/components/Select/internal/useSelectVirtualization.ts
|
|
974
|
-
function
|
|
1022
|
+
function St({ loading: e, options: t, scrollTop: n, virtual: r }) {
|
|
975
1023
|
return u(() => {
|
|
976
1024
|
let i = typeof r == "object" ? r : r ? {} : void 0, a = i?.itemHeight ?? 40, o = !!(i && t.length > 0 && !e), s = o ? Math.max(0, Math.floor(n / a) - 2) : 0, c = o ? Math.ceil(300 / a) + 4 : t.length, l = o ? t.slice(s, s + c) : t, u = o ? s * a : 0;
|
|
977
1025
|
return {
|
|
@@ -991,25 +1039,26 @@ function xt({ loading: e, options: t, scrollTop: n, virtual: r }) {
|
|
|
991
1039
|
]);
|
|
992
1040
|
}
|
|
993
1041
|
var q = {
|
|
994
|
-
option: "
|
|
995
|
-
selected: "
|
|
996
|
-
disabled: "
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1042
|
+
option: "_option_1l7x7_1",
|
|
1043
|
+
selected: "_selected_1l7x7_19",
|
|
1044
|
+
disabled: "_disabled_1l7x7_19",
|
|
1045
|
+
optionPop: "_optionPop_1l7x7_1",
|
|
1046
|
+
description: "_description_1l7x7_39",
|
|
1047
|
+
icon: "_icon_1l7x7_43",
|
|
1048
|
+
active: "_active_1l7x7_47",
|
|
1049
|
+
label: "_label_1l7x7_90",
|
|
1050
|
+
content: "_content_1l7x7_99",
|
|
1051
|
+
custom: "_custom_1l7x7_100",
|
|
1052
|
+
badge: "_badge_1l7x7_134",
|
|
1053
|
+
shortcut: "_shortcut_1l7x7_135",
|
|
1054
|
+
success: "_success_1l7x7_155",
|
|
1055
|
+
warning: "_warning_1l7x7_219",
|
|
1056
|
+
danger: "_danger_1l7x7_283",
|
|
1057
|
+
check: "_check_1l7x7_347",
|
|
1058
|
+
checkPop: "_checkPop_1l7x7_1"
|
|
1059
|
+
}, Ct = () => null;
|
|
1060
|
+
Ct.__velliraSelectPart = "item", Ct.displayName = "Select.Item";
|
|
1061
|
+
var wt = ({ option: e, isSelected: t, isActive: n, optionId: r, renderOption: i, onSelect: a, onMouseEnter: o }) => {
|
|
1013
1062
|
let s = !!e.disabled;
|
|
1014
1063
|
return /* @__PURE__ */ _("li", {
|
|
1015
1064
|
id: r,
|
|
@@ -1063,43 +1112,43 @@ var Ct = ({ option: e, isSelected: t, isActive: n, optionId: r, renderOption: i,
|
|
|
1063
1112
|
})]
|
|
1064
1113
|
});
|
|
1065
1114
|
};
|
|
1066
|
-
|
|
1115
|
+
wt.displayName = "SelectItemRow";
|
|
1067
1116
|
var J = {
|
|
1068
|
-
dropdown: "
|
|
1069
|
-
dropdownIn: "
|
|
1070
|
-
primary: "
|
|
1071
|
-
outline: "
|
|
1072
|
-
filled: "
|
|
1073
|
-
soft: "
|
|
1074
|
-
neutral: "
|
|
1075
|
-
success: "
|
|
1076
|
-
warning: "
|
|
1077
|
-
danger: "
|
|
1078
|
-
listReveal: "
|
|
1079
|
-
groupAction: "
|
|
1080
|
-
groupActionText: "
|
|
1081
|
-
groupActionMeta: "
|
|
1082
|
-
command: "
|
|
1083
|
-
searchWrap: "
|
|
1084
|
-
searchReveal: "
|
|
1085
|
-
search: "
|
|
1086
|
-
searchClear: "
|
|
1087
|
-
empty: "
|
|
1088
|
-
groupLabel: "
|
|
1089
|
-
separator: "
|
|
1090
|
-
virtualSpacer: "
|
|
1091
|
-
mobileDropdownIn: "
|
|
1092
|
-
},
|
|
1093
|
-
let { contentProps: n } =
|
|
1094
|
-
return /* @__PURE__ */ g(
|
|
1117
|
+
dropdown: "_dropdown_k5nye_1",
|
|
1118
|
+
dropdownIn: "_dropdownIn_k5nye_1",
|
|
1119
|
+
primary: "_primary_k5nye_103",
|
|
1120
|
+
outline: "_outline_k5nye_103",
|
|
1121
|
+
filled: "_filled_k5nye_190",
|
|
1122
|
+
soft: "_soft_k5nye_277",
|
|
1123
|
+
neutral: "_neutral_k5nye_364",
|
|
1124
|
+
success: "_success_k5nye_625",
|
|
1125
|
+
warning: "_warning_k5nye_886",
|
|
1126
|
+
danger: "_danger_k5nye_1147",
|
|
1127
|
+
listReveal: "_listReveal_k5nye_1",
|
|
1128
|
+
groupAction: "_groupAction_k5nye_1415",
|
|
1129
|
+
groupActionText: "_groupActionText_k5nye_1452",
|
|
1130
|
+
groupActionMeta: "_groupActionMeta_k5nye_1460",
|
|
1131
|
+
command: "_command_k5nye_1466",
|
|
1132
|
+
searchWrap: "_searchWrap_k5nye_1471",
|
|
1133
|
+
searchReveal: "_searchReveal_k5nye_1",
|
|
1134
|
+
search: "_search_k5nye_1471",
|
|
1135
|
+
searchClear: "_searchClear_k5nye_1502",
|
|
1136
|
+
empty: "_empty_k5nye_1538",
|
|
1137
|
+
groupLabel: "_groupLabel_k5nye_1546",
|
|
1138
|
+
separator: "_separator_k5nye_1556",
|
|
1139
|
+
virtualSpacer: "_virtualSpacer_k5nye_1562",
|
|
1140
|
+
mobileDropdownIn: "_mobileDropdownIn_k5nye_1"
|
|
1141
|
+
}, Tt = ({ children: e, className: t }) => {
|
|
1142
|
+
let { contentProps: n } = xt(), r = Dt(e);
|
|
1143
|
+
return /* @__PURE__ */ g(Et, {
|
|
1095
1144
|
...n,
|
|
1096
1145
|
...r,
|
|
1097
1146
|
className: [n.className, t].filter(Boolean).join(" ")
|
|
1098
1147
|
});
|
|
1099
1148
|
};
|
|
1100
|
-
|
|
1101
|
-
var
|
|
1102
|
-
let B = d(null), te = d(!1), [ne, re] = f(null), [ie, ae] = f(0), { bottomSpacerHeight: V, isVirtual: U, itemHeight: oe, startIndex: se, topSpacerHeight: ce, viewportHeight: le, visibleOptions: ue } =
|
|
1149
|
+
Tt.__velliraSelectPart = "content", Tt.displayName = "Select.Content";
|
|
1150
|
+
var Et = ({ isOpen: e, listboxId: t, labelledById: n, setDropdownRef: r, style: i, options: a, entries: s, multiple: l, selectedValues: u, color: p = "primary", variant: m = "outline", searchable: v, command: y, virtual: b, portal: S = !0, searchValue: C = "", searchPlaceholder: w = "Search...", loading: T, loadingText: E = "Loading...", noOptionsText: D, searchSlot: O, headerSlot: k, emptySlot: A, loadingSlot: j, renderOption: M, selectedValue: N, activeIndex: P, visualActiveIndex: F = P, className: I, onSelect: L, onSelectGroup: R, onMouseEnter: ee, onSearchChange: z }) => {
|
|
1151
|
+
let B = d(null), te = d(!1), [ne, re] = f(null), [ie, ae] = f(0), { bottomSpacerHeight: V, isVirtual: U, itemHeight: oe, startIndex: se, topSpacerHeight: ce, viewportHeight: le, visibleOptions: ue } = St({
|
|
1103
1152
|
loading: T,
|
|
1104
1153
|
options: a,
|
|
1105
1154
|
scrollTop: ie,
|
|
@@ -1206,7 +1255,7 @@ var Tt = ({ isOpen: e, listboxId: t, labelledById: n, setDropdownRef: r, style:
|
|
|
1206
1255
|
children: /* @__PURE__ */ _("button", {
|
|
1207
1256
|
type: "button",
|
|
1208
1257
|
className: J.groupAction,
|
|
1209
|
-
"aria-label":
|
|
1258
|
+
"aria-label": Ot(e.selectLabel ?? e.label),
|
|
1210
1259
|
"aria-pressed": i ? "mixed" : r ? "true" : "false",
|
|
1211
1260
|
disabled: t.length === 0,
|
|
1212
1261
|
onClick: () => R(t),
|
|
@@ -1237,7 +1286,7 @@ var Tt = ({ isOpen: e, listboxId: t, labelledById: n, setDropdownRef: r, style:
|
|
|
1237
1286
|
"data-vellira-select-separator": "true"
|
|
1238
1287
|
}, e.id);
|
|
1239
1288
|
let { option: n, optionIndex: r } = e;
|
|
1240
|
-
return /* @__PURE__ */ g(
|
|
1289
|
+
return /* @__PURE__ */ g(wt, {
|
|
1241
1290
|
option: n,
|
|
1242
1291
|
isSelected: u ? u.includes(n.value) : n.value === N,
|
|
1243
1292
|
isActive: r === F,
|
|
@@ -1264,8 +1313,8 @@ var Tt = ({ isOpen: e, listboxId: t, labelledById: n, setDropdownRef: r, style:
|
|
|
1264
1313
|
});
|
|
1265
1314
|
return S ? /* @__PURE__ */ g(H, { children: pe }) : pe;
|
|
1266
1315
|
};
|
|
1267
|
-
|
|
1268
|
-
function
|
|
1316
|
+
Et.displayName = "SelectContentSurface";
|
|
1317
|
+
function Dt(t) {
|
|
1269
1318
|
let n, r, i, o;
|
|
1270
1319
|
return e.forEach(t, (e) => {
|
|
1271
1320
|
if (!a(e)) return;
|
|
@@ -1278,21 +1327,21 @@ function Et(t) {
|
|
|
1278
1327
|
searchSlot: r
|
|
1279
1328
|
};
|
|
1280
1329
|
}
|
|
1281
|
-
function
|
|
1330
|
+
function Ot(e) {
|
|
1282
1331
|
return typeof e == "string" || typeof e == "number" ? String(e) : "Select group";
|
|
1283
1332
|
}
|
|
1284
1333
|
//#endregion
|
|
1285
1334
|
//#region src/components/Select/Content/SelectEmpty.tsx
|
|
1286
|
-
var
|
|
1287
|
-
|
|
1335
|
+
var kt = ({ children: e }) => /* @__PURE__ */ g(h, { children: e });
|
|
1336
|
+
kt.__velliraSelectPart = "empty", kt.displayName = "Select.Empty";
|
|
1288
1337
|
//#endregion
|
|
1289
1338
|
//#region src/components/Select/Content/SelectLoading.tsx
|
|
1290
|
-
var
|
|
1291
|
-
|
|
1339
|
+
var At = ({ children: e }) => /* @__PURE__ */ g(h, { children: e });
|
|
1340
|
+
At.__velliraSelectPart = "loading", At.displayName = "Select.Loading";
|
|
1292
1341
|
//#endregion
|
|
1293
1342
|
//#region src/components/Select/Content/SelectSearch.tsx
|
|
1294
|
-
var
|
|
1295
|
-
let { contentProps: n } =
|
|
1343
|
+
var jt = ({ placeholder: e, className: t }) => {
|
|
1344
|
+
let { contentProps: n } = xt(), r = d(null), i = n.searchValue ?? "";
|
|
1296
1345
|
return c(() => {
|
|
1297
1346
|
if (!n.isOpen) return;
|
|
1298
1347
|
let e = window.setTimeout(() => {
|
|
@@ -1320,38 +1369,38 @@ var At = ({ placeholder: e, className: t }) => {
|
|
|
1320
1369
|
})]
|
|
1321
1370
|
});
|
|
1322
1371
|
};
|
|
1323
|
-
|
|
1372
|
+
jt.__velliraSelectPart = "search", jt.displayName = "Select.Search";
|
|
1324
1373
|
//#endregion
|
|
1325
1374
|
//#region src/components/Select/Group/SelectGroup.tsx
|
|
1326
|
-
var
|
|
1327
|
-
|
|
1375
|
+
var Mt = () => null;
|
|
1376
|
+
Mt.__velliraSelectPart = "group", Mt.displayName = "Select.Group";
|
|
1328
1377
|
//#endregion
|
|
1329
1378
|
//#region src/components/Select/Group/SelectLabel.tsx
|
|
1330
|
-
var
|
|
1379
|
+
var Nt = ({ children: e }) => /* @__PURE__ */ g("div", {
|
|
1331
1380
|
role: "presentation",
|
|
1332
1381
|
className: J.groupLabel,
|
|
1333
1382
|
children: e
|
|
1334
1383
|
});
|
|
1335
|
-
|
|
1384
|
+
Nt.__velliraSelectPart = "label", Nt.displayName = "Select.Label";
|
|
1336
1385
|
//#endregion
|
|
1337
1386
|
//#region src/components/Select/Group/SelectSeparator.tsx
|
|
1338
|
-
var
|
|
1339
|
-
|
|
1387
|
+
var Pt = () => null;
|
|
1388
|
+
Pt.__velliraSelectPart = "separator", Pt.displayName = "Select.Separator";
|
|
1340
1389
|
//#endregion
|
|
1341
1390
|
//#region src/components/Select/Item/SelectItemBadge.tsx
|
|
1342
|
-
var
|
|
1343
|
-
|
|
1391
|
+
var Ft = () => null;
|
|
1392
|
+
Ft.__velliraSelectPart = "itemBadge", Ft.displayName = "Select.ItemBadge";
|
|
1344
1393
|
//#endregion
|
|
1345
1394
|
//#region src/components/Select/Item/SelectItemDescription.tsx
|
|
1346
|
-
var
|
|
1347
|
-
|
|
1395
|
+
var It = () => null;
|
|
1396
|
+
It.__velliraSelectPart = "itemDescription", It.displayName = "Select.ItemDescription";
|
|
1348
1397
|
//#endregion
|
|
1349
1398
|
//#region src/components/Select/Item/SelectItemIcon.tsx
|
|
1350
|
-
var
|
|
1351
|
-
|
|
1399
|
+
var Lt = () => null;
|
|
1400
|
+
Lt.__velliraSelectPart = "itemIcon", Lt.displayName = "Select.ItemIcon";
|
|
1352
1401
|
//#endregion
|
|
1353
1402
|
//#region src/patterns/FormField/FormFieldContext.ts
|
|
1354
|
-
var
|
|
1403
|
+
var Rt = r(null), zt = () => s(Rt), Bt = {
|
|
1355
1404
|
wrapper: "_wrapper_143kr_1",
|
|
1356
1405
|
sm: "_sm_143kr_41",
|
|
1357
1406
|
md: "_md_143kr_78",
|
|
@@ -1367,8 +1416,8 @@ var Lt = r(null), Rt = () => s(Lt), zt = {
|
|
|
1367
1416
|
optional: "_optional_143kr_194",
|
|
1368
1417
|
labelInfo: "_labelInfo_143kr_201",
|
|
1369
1418
|
disabled: "_disabled_143kr_243"
|
|
1370
|
-
},
|
|
1371
|
-
let T = l(), E = e ?? T, D = t ? `${E}-label` : void 0, O = r && E ? `${E}-description` : void 0, k = i && E ? `${E}-error` : void 0, A = c || !!i, j =
|
|
1419
|
+
}, Vt = (...e) => e.filter(Boolean).join(" ") || void 0, Ht = ({ id: e, label: t, description: r, error: i, required: o = !1, disabled: s = !1, invalid: c = !1, orientation: u = "vertical", labelPosition: d = "top", size: f = "md", labelInfo: p, optionalText: m, children: h, bindControl: v = !0, className: y, controlClassName: b, labelClassName: x, descriptionClassName: S, errorClassName: C, ...w }) => {
|
|
1420
|
+
let T = l(), E = e ?? T, D = t ? `${E}-label` : void 0, O = r && E ? `${E}-description` : void 0, k = i && E ? `${E}-error` : void 0, A = c || !!i, j = Vt(D), M = Vt(O, k), N = {
|
|
1372
1421
|
controlId: E,
|
|
1373
1422
|
labelId: D,
|
|
1374
1423
|
descriptionId: O,
|
|
@@ -1384,13 +1433,13 @@ var Lt = r(null), Rt = () => s(Lt), zt = {
|
|
|
1384
1433
|
required: P.props.required ?? o,
|
|
1385
1434
|
disabled: P.props.disabled ?? s,
|
|
1386
1435
|
"aria-invalid": P.props["aria-invalid"] ?? (A || void 0),
|
|
1387
|
-
"aria-labelledby":
|
|
1388
|
-
"aria-describedby":
|
|
1436
|
+
"aria-labelledby": Vt(P.props["aria-labelledby"], j),
|
|
1437
|
+
"aria-describedby": Vt(P.props["aria-describedby"], M)
|
|
1389
1438
|
}) : h;
|
|
1390
1439
|
return /* @__PURE__ */ _("div", {
|
|
1391
1440
|
...w,
|
|
1392
1441
|
"aria-disabled": s || void 0,
|
|
1393
|
-
className: V(
|
|
1442
|
+
className: V(Bt.wrapper, Bt[u], Bt[d], Bt[f], s && Bt.disabled, y),
|
|
1394
1443
|
"data-disabled": s || void 0,
|
|
1395
1444
|
"data-invalid": A || void 0,
|
|
1396
1445
|
"data-orientation": u,
|
|
@@ -1399,42 +1448,42 @@ var Lt = r(null), Rt = () => s(Lt), zt = {
|
|
|
1399
1448
|
t && /* @__PURE__ */ _("label", {
|
|
1400
1449
|
id: D,
|
|
1401
1450
|
htmlFor: E,
|
|
1402
|
-
className: V(
|
|
1451
|
+
className: V(Bt.label, x),
|
|
1403
1452
|
children: [
|
|
1404
1453
|
/* @__PURE__ */ g("span", {
|
|
1405
|
-
className:
|
|
1454
|
+
className: Bt.labelText,
|
|
1406
1455
|
children: t
|
|
1407
1456
|
}),
|
|
1408
1457
|
o && /* @__PURE__ */ g("span", {
|
|
1409
|
-
className:
|
|
1458
|
+
className: Bt.required,
|
|
1410
1459
|
"aria-hidden": "true",
|
|
1411
1460
|
children: "*"
|
|
1412
1461
|
}),
|
|
1413
1462
|
!o && m && /* @__PURE__ */ g("span", {
|
|
1414
|
-
className:
|
|
1463
|
+
className: Bt.optional,
|
|
1415
1464
|
children: m
|
|
1416
1465
|
}),
|
|
1417
1466
|
p && /* @__PURE__ */ g("span", {
|
|
1418
|
-
className:
|
|
1467
|
+
className: Bt.labelInfo,
|
|
1419
1468
|
children: p
|
|
1420
1469
|
})
|
|
1421
1470
|
]
|
|
1422
1471
|
}),
|
|
1423
1472
|
r && /* @__PURE__ */ g("div", {
|
|
1424
1473
|
id: O,
|
|
1425
|
-
className: V(
|
|
1474
|
+
className: V(Bt.description, S),
|
|
1426
1475
|
children: r
|
|
1427
1476
|
}),
|
|
1428
|
-
/* @__PURE__ */ g(
|
|
1477
|
+
/* @__PURE__ */ g(Rt.Provider, {
|
|
1429
1478
|
value: N,
|
|
1430
1479
|
children: /* @__PURE__ */ g("div", {
|
|
1431
|
-
className: V(
|
|
1480
|
+
className: V(Bt.control, b),
|
|
1432
1481
|
children: F
|
|
1433
1482
|
})
|
|
1434
1483
|
}),
|
|
1435
1484
|
i && /* @__PURE__ */ g("div", {
|
|
1436
1485
|
id: k,
|
|
1437
|
-
className: V(
|
|
1486
|
+
className: V(Bt.errorText, C),
|
|
1438
1487
|
role: "alert",
|
|
1439
1488
|
children: i
|
|
1440
1489
|
})
|
|
@@ -1443,14 +1492,14 @@ var Lt = r(null), Rt = () => s(Lt), zt = {
|
|
|
1443
1492
|
};
|
|
1444
1493
|
//#endregion
|
|
1445
1494
|
//#region src/components/Select/internal/SelectCollection.ts
|
|
1446
|
-
function
|
|
1495
|
+
function Ut(t) {
|
|
1447
1496
|
let n = [], r = [], i = 0;
|
|
1448
1497
|
function o(t) {
|
|
1449
1498
|
e.forEach(t, (e) => {
|
|
1450
1499
|
if (!a(e)) return;
|
|
1451
1500
|
let t = e.type;
|
|
1452
1501
|
if (t.__velliraSelectPart === "group") {
|
|
1453
|
-
let t = e.props, r =
|
|
1502
|
+
let t = e.props, r = Gt(t.children);
|
|
1454
1503
|
n.push({
|
|
1455
1504
|
type: "group",
|
|
1456
1505
|
id: `group-${i++}`,
|
|
@@ -1462,7 +1511,7 @@ function Ht(t) {
|
|
|
1462
1511
|
return;
|
|
1463
1512
|
}
|
|
1464
1513
|
if (t.__velliraSelectPart === "item") {
|
|
1465
|
-
let t = e.props, i =
|
|
1514
|
+
let t = e.props, i = Kt(t.children, t.value), a = t.label ?? i.label, o = r.length, s = {
|
|
1466
1515
|
label: a,
|
|
1467
1516
|
value: t.value,
|
|
1468
1517
|
disabled: t.disabled,
|
|
@@ -1494,7 +1543,7 @@ function Ht(t) {
|
|
|
1494
1543
|
options: r
|
|
1495
1544
|
};
|
|
1496
1545
|
}
|
|
1497
|
-
function
|
|
1546
|
+
function Wt(t) {
|
|
1498
1547
|
let n = !1;
|
|
1499
1548
|
function r(t) {
|
|
1500
1549
|
e.forEach(t, (e) => {
|
|
@@ -1509,7 +1558,7 @@ function Ut(t) {
|
|
|
1509
1558
|
}
|
|
1510
1559
|
return r(t), n;
|
|
1511
1560
|
}
|
|
1512
|
-
function
|
|
1561
|
+
function Gt(t) {
|
|
1513
1562
|
let n = [];
|
|
1514
1563
|
function r(t) {
|
|
1515
1564
|
e.forEach(t, (e) => {
|
|
@@ -1524,7 +1573,7 @@ function Wt(t) {
|
|
|
1524
1573
|
}
|
|
1525
1574
|
return r(t), n;
|
|
1526
1575
|
}
|
|
1527
|
-
function
|
|
1576
|
+
function Kt(t, n) {
|
|
1528
1577
|
let r, i, o, s = [];
|
|
1529
1578
|
function c(t) {
|
|
1530
1579
|
e.forEach(t, (e) => {
|
|
@@ -1560,12 +1609,12 @@ function Gt(t, n) {
|
|
|
1560
1609
|
}
|
|
1561
1610
|
//#endregion
|
|
1562
1611
|
//#region src/components/Select/internal/useSelectCollection.ts
|
|
1563
|
-
function
|
|
1564
|
-
return u(() =>
|
|
1612
|
+
function qt(e) {
|
|
1613
|
+
return u(() => Ut(e), [e]);
|
|
1565
1614
|
}
|
|
1566
1615
|
//#endregion
|
|
1567
1616
|
//#region src/components/Select/internal/useSelectPosition.ts
|
|
1568
|
-
function
|
|
1617
|
+
function Jt({ avoidCollisions: e, isOpen: t, matchTriggerWidth: n, onOpenChange: r, placement: i }) {
|
|
1569
1618
|
return Le({
|
|
1570
1619
|
open: t,
|
|
1571
1620
|
onOpenChange: r,
|
|
@@ -1577,56 +1626,56 @@ function qt({ avoidCollisions: e, isOpen: t, matchTriggerWidth: n, onOpenChange:
|
|
|
1577
1626
|
}
|
|
1578
1627
|
//#endregion
|
|
1579
1628
|
//#region src/components/Select/internal/useSelectSearch.ts
|
|
1580
|
-
function
|
|
1629
|
+
function Yt({ options: e, searchable: t, searchValue: n }) {
|
|
1581
1630
|
return u(() => {
|
|
1582
1631
|
if (!t || !n) return e;
|
|
1583
1632
|
let r = n.toLocaleLowerCase();
|
|
1584
|
-
return e.filter((e) => `${e.label} ${
|
|
1633
|
+
return e.filter((e) => `${e.label} ${Xt(e.description)}`.toLocaleLowerCase().includes(r));
|
|
1585
1634
|
}, [
|
|
1586
1635
|
e,
|
|
1587
1636
|
n,
|
|
1588
1637
|
t
|
|
1589
1638
|
]);
|
|
1590
1639
|
}
|
|
1591
|
-
function
|
|
1640
|
+
function Xt(e) {
|
|
1592
1641
|
return typeof e == "string" || typeof e == "number" ? String(e) : "";
|
|
1593
1642
|
}
|
|
1594
1643
|
var Y = {
|
|
1595
|
-
control: "
|
|
1596
|
-
disabled: "
|
|
1597
|
-
arrow: "
|
|
1598
|
-
primary: "
|
|
1599
|
-
outline: "
|
|
1600
|
-
filled: "
|
|
1601
|
-
soft: "
|
|
1602
|
-
neutral: "
|
|
1603
|
-
success: "
|
|
1604
|
-
warning: "
|
|
1605
|
-
danger: "
|
|
1606
|
-
sm: "
|
|
1607
|
-
md: "
|
|
1608
|
-
lg: "
|
|
1609
|
-
valueWrap: "
|
|
1610
|
-
value: "
|
|
1611
|
-
adornment: "
|
|
1612
|
-
clear: "
|
|
1613
|
-
affix: "
|
|
1614
|
-
placeholder: "
|
|
1615
|
-
error: "
|
|
1616
|
-
spinner: "
|
|
1617
|
-
spin: "
|
|
1618
|
-
loading: "
|
|
1619
|
-
open: "
|
|
1620
|
-
},
|
|
1621
|
-
let { triggerProps: n } =
|
|
1622
|
-
return /* @__PURE__ */ g(
|
|
1644
|
+
control: "_control_x5w2h_1",
|
|
1645
|
+
disabled: "_disabled_x5w2h_54",
|
|
1646
|
+
arrow: "_arrow_x5w2h_64",
|
|
1647
|
+
primary: "_primary_x5w2h_84",
|
|
1648
|
+
outline: "_outline_x5w2h_84",
|
|
1649
|
+
filled: "_filled_x5w2h_125",
|
|
1650
|
+
soft: "_soft_x5w2h_166",
|
|
1651
|
+
neutral: "_neutral_x5w2h_207",
|
|
1652
|
+
success: "_success_x5w2h_330",
|
|
1653
|
+
warning: "_warning_x5w2h_453",
|
|
1654
|
+
danger: "_danger_x5w2h_576",
|
|
1655
|
+
sm: "_sm_x5w2h_699",
|
|
1656
|
+
md: "_md_x5w2h_706",
|
|
1657
|
+
lg: "_lg_x5w2h_713",
|
|
1658
|
+
valueWrap: "_valueWrap_x5w2h_720",
|
|
1659
|
+
value: "_value_x5w2h_720",
|
|
1660
|
+
adornment: "_adornment_x5w2h_734",
|
|
1661
|
+
clear: "_clear_x5w2h_735",
|
|
1662
|
+
affix: "_affix_x5w2h_736",
|
|
1663
|
+
placeholder: "_placeholder_x5w2h_775",
|
|
1664
|
+
error: "_error_x5w2h_779",
|
|
1665
|
+
spinner: "_spinner_x5w2h_818",
|
|
1666
|
+
spin: "_spin_x5w2h_818",
|
|
1667
|
+
loading: "_loading_x5w2h_827",
|
|
1668
|
+
open: "_open_x5w2h_846"
|
|
1669
|
+
}, Zt = ({ children: e, className: t }) => {
|
|
1670
|
+
let { triggerProps: n } = xt();
|
|
1671
|
+
return /* @__PURE__ */ g(Qt, {
|
|
1623
1672
|
...n,
|
|
1624
1673
|
className: [n.className, t].filter(Boolean).join(" "),
|
|
1625
1674
|
children: e
|
|
1626
1675
|
});
|
|
1627
1676
|
};
|
|
1628
|
-
|
|
1629
|
-
var
|
|
1677
|
+
Zt.__velliraSelectPart = "trigger", Zt.displayName = "Select.Trigger";
|
|
1678
|
+
var Qt = ({ children: e, id: t, describedBy: n, labelledBy: r, isOpen: i, disabled: a, required: o, listboxId: s, activeIndex: c, ariaLabel: l, error: u, displayText: d, isPlaceholder: f, size: p = "md", color: m, variant: v, loading: b, startIcon: S, endIcon: C, prefix: w, suffix: T, clearable: E, onClear: D, className: O, buttonRef: k, onClick: A, onKeyDown: j, onBlur: M, onFocus: N }) => /* @__PURE__ */ g("button", {
|
|
1630
1679
|
id: t,
|
|
1631
1680
|
ref: k,
|
|
1632
1681
|
type: "button",
|
|
@@ -1688,16 +1737,16 @@ var Zt = ({ children: e, id: t, describedBy: n, labelledBy: r, isOpen: i, disabl
|
|
|
1688
1737
|
})
|
|
1689
1738
|
] })
|
|
1690
1739
|
});
|
|
1691
|
-
|
|
1740
|
+
Qt.displayName = "SelectTriggerSurface";
|
|
1692
1741
|
//#endregion
|
|
1693
1742
|
//#region src/components/Select/Root/SelectRoot.tsx
|
|
1694
|
-
var
|
|
1695
|
-
let W = l(), _e =
|
|
1743
|
+
var $t = 0, en = "", tn = ({ children: e, label: t, description: n, id: r, name: i, "aria-label": a, "aria-describedby": s, "aria-labelledby": p, value: m, defaultValue: v, onValueChange: y, multiple: b = !1, maxSelected: x, closeOnSelect: S, placeholder: C = "Select...", empty: w, loadingText: T = "Loading...", noOptionsText: E, size: D, color: O = "primary", variant: k = "outline", required: A = !1, disabled: j = !1, invalid: M = !1, loading: N = !1, clearable: P = !1, searchable: F = !1, virtual: I, modal: R = !1, command: ee = !1, error: z, placement: B = "bottom", matchTriggerWidth: te = !0, avoidCollisions: ne = !0, portal: re = !0, open: ie, defaultOpen: ae = !1, onOpenChange: V, onSearch: H, onClear: U, startIcon: oe, endIcon: se, prefix: ce, suffix: le, renderValue: ue, renderOption: de, onBlur: fe, onFocus: pe, className: me, triggerClassName: he, dropdownClassName: ge }) => {
|
|
1744
|
+
let W = l(), _e = zt(), ve = !!(t || n || z), ye = r ?? (ve ? void 0 : _e?.controlId) ?? W, be = `${ye}-listbox`, [xe, Se] = f(""), Ce = !!z, we = Ce ? `${ye}-error` : void 0, Te = n ? `${ye}-description` : void 0, Ee = D ?? _e?.size ?? "md", De = M || Ce || !ve && !!_e?.invalid, Oe = j || !ve && !!_e?.disabled, ke = A || !ve && !!_e?.required, Ae = [
|
|
1696
1745
|
s,
|
|
1697
1746
|
!ve && !s ? _e?.ariaDescribedBy : void 0,
|
|
1698
1747
|
Te,
|
|
1699
1748
|
we
|
|
1700
|
-
].filter(Boolean).join(" "), je = d(null), Me = d(null), [Ne, Pe] = f(!1), Fe = F || ee, { entries: Ie, options: Le } =
|
|
1749
|
+
].filter(Boolean).join(" "), je = d(null), Me = d(null), [Ne, Pe] = f(!1), Fe = F || ee, { entries: Ie, options: Le } = qt(e), ze = Yt({
|
|
1701
1750
|
options: Le,
|
|
1702
1751
|
searchable: Fe,
|
|
1703
1752
|
searchValue: xe
|
|
@@ -1713,7 +1762,7 @@ var Qt = 0, $t = "", en = ({ children: e, label: t, description: n, id: r, name:
|
|
|
1713
1762
|
open: ie,
|
|
1714
1763
|
defaultOpen: ae,
|
|
1715
1764
|
onOpenChange: V
|
|
1716
|
-
}), Ye = u(() => Le.find((e) => G.includes(e.value)), [Le, G]), Xe = u(() => Le.filter((e) => G.includes(e.value)), [Le, G]), Ze = !!Ye, Qe = Array.isArray(Be) ? Be[0] ?? "" : Be, { floatingStyles: $e, setRef: et, setFloatingRef: tt } =
|
|
1765
|
+
}), Ye = u(() => Le.find((e) => G.includes(e.value)), [Le, G]), Xe = u(() => Le.filter((e) => G.includes(e.value)), [Le, G]), Ze = !!Ye, Qe = Array.isArray(Be) ? Be[0] ?? "" : Be, { floatingStyles: $e, setRef: et, setFloatingRef: tt } = Jt({
|
|
1717
1766
|
isOpen: K,
|
|
1718
1767
|
onOpenChange: Ve,
|
|
1719
1768
|
placement: B,
|
|
@@ -1747,7 +1796,7 @@ var Qt = 0, $t = "", en = ({ children: e, label: t, description: n, id: r, name:
|
|
|
1747
1796
|
}, [U, qe]), at = o(() => {
|
|
1748
1797
|
K || Pe(!1), Ke();
|
|
1749
1798
|
}, [K, Ke]), ot = o((e) => {
|
|
1750
|
-
|
|
1799
|
+
nn(e, K) && Pe(!0), Je(e);
|
|
1751
1800
|
}, [K, Je]), st = o((e) => {
|
|
1752
1801
|
Pe(!0), We(e);
|
|
1753
1802
|
}, [We]), ct = o((e) => {
|
|
@@ -1758,8 +1807,8 @@ var Qt = 0, $t = "", en = ({ children: e, label: t, description: n, id: r, name:
|
|
|
1758
1807
|
}, [K]), c(() => {
|
|
1759
1808
|
!K && xe && Se("");
|
|
1760
1809
|
}, [K, xe]), c(() => {
|
|
1761
|
-
if (!(!R || !K)) return
|
|
1762
|
-
|
|
1810
|
+
if (!(!R || !K)) return $t === 0 && (en = document.body.style.overflow), $t += 1, document.body.style.overflow = "hidden", () => {
|
|
1811
|
+
$t = Math.max(0, $t - 1), $t === 0 && (document.body.style.overflow = en);
|
|
1763
1812
|
};
|
|
1764
1813
|
}, [K, R]);
|
|
1765
1814
|
let lt = o((e) => {
|
|
@@ -1834,24 +1883,24 @@ var Qt = 0, $t = "", en = ({ children: e, label: t, description: n, id: r, name:
|
|
|
1834
1883
|
name: i,
|
|
1835
1884
|
value: Qe,
|
|
1836
1885
|
disabled: Oe
|
|
1837
|
-
})] }), _t =
|
|
1886
|
+
})] }), _t = Wt(e), vt = /* @__PURE__ */ _(bt, {
|
|
1838
1887
|
value: {
|
|
1839
1888
|
triggerProps: mt,
|
|
1840
1889
|
contentProps: ht
|
|
1841
1890
|
},
|
|
1842
|
-
children: [gt, _t ? e : /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(
|
|
1843
|
-
}),
|
|
1891
|
+
children: [gt, _t ? e : /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(Zt, {}), /* @__PURE__ */ g(Tt, { children: e })] })]
|
|
1892
|
+
}), yt = /* @__PURE__ */ _(bt, {
|
|
1844
1893
|
value: {
|
|
1845
1894
|
triggerProps: mt,
|
|
1846
1895
|
contentProps: ht
|
|
1847
1896
|
},
|
|
1848
1897
|
children: [
|
|
1849
1898
|
gt,
|
|
1850
|
-
/* @__PURE__ */ g(
|
|
1851
|
-
/* @__PURE__ */ g(
|
|
1899
|
+
/* @__PURE__ */ g(Qt, { ...mt }),
|
|
1900
|
+
/* @__PURE__ */ g(Et, { ...ht })
|
|
1852
1901
|
]
|
|
1853
1902
|
});
|
|
1854
|
-
return !ve && _e ? e ? vt :
|
|
1903
|
+
return !ve && _e ? e ? vt : yt : /* @__PURE__ */ g(Ht, {
|
|
1855
1904
|
id: ye,
|
|
1856
1905
|
label: t,
|
|
1857
1906
|
description: n,
|
|
@@ -1860,28 +1909,28 @@ var Qt = 0, $t = "", en = ({ children: e, label: t, description: n, id: r, name:
|
|
|
1860
1909
|
disabled: Oe,
|
|
1861
1910
|
bindControl: !1,
|
|
1862
1911
|
className: me,
|
|
1863
|
-
children: e ? vt :
|
|
1912
|
+
children: e ? vt : yt
|
|
1864
1913
|
});
|
|
1865
1914
|
};
|
|
1866
|
-
|
|
1867
|
-
function
|
|
1915
|
+
tn.displayName = "SelectRoot";
|
|
1916
|
+
function nn(e, t) {
|
|
1868
1917
|
return e.altKey || e.ctrlKey || e.metaKey ? !1 : t ? e.key === "ArrowDown" || e.key === "ArrowUp" || e.key === "Home" || e.key === "End" || e.key === "Enter" || e.key === " " || e.key.length === 1 : e.key === "ArrowDown" || e.key === "ArrowUp" || e.key === "Enter" || e.key === " ";
|
|
1869
1918
|
}
|
|
1870
1919
|
//#endregion
|
|
1871
1920
|
//#region src/components/Select/Trigger/SelectIcon.tsx
|
|
1872
|
-
var
|
|
1873
|
-
let { triggerProps: n } =
|
|
1921
|
+
var rn = ({ children: e, className: t }) => {
|
|
1922
|
+
let { triggerProps: n } = xt();
|
|
1874
1923
|
return /* @__PURE__ */ g("span", {
|
|
1875
1924
|
className: V(Y.arrow, { [Y.open]: n.isOpen }, t),
|
|
1876
1925
|
"aria-hidden": "true",
|
|
1877
1926
|
children: n.loading ? /* @__PURE__ */ g("span", { className: Y.spinner }) : e ?? n.endIcon ?? /* @__PURE__ */ g(y, {})
|
|
1878
1927
|
});
|
|
1879
1928
|
};
|
|
1880
|
-
|
|
1929
|
+
rn.__velliraSelectPart = "icon", rn.displayName = "Select.Icon";
|
|
1881
1930
|
//#endregion
|
|
1882
1931
|
//#region src/components/Select/Trigger/SelectValue.tsx
|
|
1883
|
-
var
|
|
1884
|
-
let { triggerProps: n } =
|
|
1932
|
+
var an = ({ children: e, className: t }) => {
|
|
1933
|
+
let { triggerProps: n } = xt();
|
|
1885
1934
|
return /* @__PURE__ */ g("span", {
|
|
1886
1935
|
className: V(Y.valueWrap, t),
|
|
1887
1936
|
children: /* @__PURE__ */ g("span", {
|
|
@@ -1890,52 +1939,52 @@ var rn = ({ children: e, className: t }) => {
|
|
|
1890
1939
|
})
|
|
1891
1940
|
});
|
|
1892
1941
|
};
|
|
1893
|
-
|
|
1942
|
+
an.__velliraSelectPart = "value", an.displayName = "Select.Value";
|
|
1894
1943
|
//#endregion
|
|
1895
1944
|
//#region src/components/Select/Select.tsx
|
|
1896
|
-
var
|
|
1897
|
-
Trigger:
|
|
1898
|
-
Value:
|
|
1899
|
-
Icon:
|
|
1900
|
-
Content:
|
|
1901
|
-
Search:
|
|
1902
|
-
Group:
|
|
1903
|
-
Label:
|
|
1904
|
-
Item:
|
|
1905
|
-
ItemIcon:
|
|
1906
|
-
ItemDescription:
|
|
1907
|
-
ItemBadge:
|
|
1908
|
-
Separator:
|
|
1909
|
-
Empty:
|
|
1910
|
-
Loading:
|
|
1945
|
+
var on = Object.assign(tn, {
|
|
1946
|
+
Trigger: Zt,
|
|
1947
|
+
Value: an,
|
|
1948
|
+
Icon: rn,
|
|
1949
|
+
Content: Tt,
|
|
1950
|
+
Search: jt,
|
|
1951
|
+
Group: Mt,
|
|
1952
|
+
Label: Nt,
|
|
1953
|
+
Item: Ct,
|
|
1954
|
+
ItemIcon: Lt,
|
|
1955
|
+
ItemDescription: It,
|
|
1956
|
+
ItemBadge: Ft,
|
|
1957
|
+
Separator: Pt,
|
|
1958
|
+
Empty: kt,
|
|
1959
|
+
Loading: At
|
|
1911
1960
|
});
|
|
1912
|
-
|
|
1961
|
+
on.displayName = "Select";
|
|
1913
1962
|
//#endregion
|
|
1914
1963
|
//#region src/components/Tabs/TabsContext.tsx
|
|
1915
|
-
var
|
|
1916
|
-
let e = s(
|
|
1964
|
+
var sn = r(null), cn = () => {
|
|
1965
|
+
let e = s(sn);
|
|
1917
1966
|
if (!e) throw Error("Tabs components must be used inside Tabs");
|
|
1918
1967
|
return e;
|
|
1919
|
-
},
|
|
1968
|
+
}, ln = {
|
|
1920
1969
|
list: "_list_13hkl_1",
|
|
1921
1970
|
vertical: "_vertical_13hkl_8"
|
|
1922
|
-
},
|
|
1923
|
-
let { orientation: r, appearance: i } =
|
|
1971
|
+
}, un = ({ children: e, className: t, ...n }) => {
|
|
1972
|
+
let { orientation: r, appearance: i } = cn();
|
|
1924
1973
|
return /* @__PURE__ */ g("div", {
|
|
1925
1974
|
...n,
|
|
1926
1975
|
role: "tablist",
|
|
1927
1976
|
"aria-orientation": r,
|
|
1928
|
-
className: V(
|
|
1977
|
+
className: V(ln.list, r === "vertical" && ln.vertical, i === "underline" && ln.underline, i === "pills" && ln.pills, t),
|
|
1929
1978
|
children: e
|
|
1930
1979
|
});
|
|
1931
1980
|
};
|
|
1932
|
-
|
|
1933
|
-
var
|
|
1981
|
+
un.displayName = "TabsList";
|
|
1982
|
+
var dn = {
|
|
1934
1983
|
panel: "_panel_1v1a9_1",
|
|
1935
1984
|
visible: "_visible_1v1a9_10",
|
|
1936
1985
|
vertical: "_vertical_1v1a9_14"
|
|
1937
|
-
},
|
|
1938
|
-
let { activeIndex: r, orientation: i } =
|
|
1986
|
+
}, fn = ({ index: e, children: t, className: n }) => {
|
|
1987
|
+
let { activeIndex: r, orientation: i } = cn(), [a, o] = f(!1), s = r === e;
|
|
1939
1988
|
return c(() => {
|
|
1940
1989
|
if (!s) {
|
|
1941
1990
|
o(!1);
|
|
@@ -1949,12 +1998,12 @@ var un = {
|
|
|
1949
1998
|
"aria-labelledby": `tab-${e}`,
|
|
1950
1999
|
hidden: !s,
|
|
1951
2000
|
tabIndex: 0,
|
|
1952
|
-
className: V(
|
|
2001
|
+
className: V(dn.panel, a && dn.visible, i === "vertical" && dn.vertical, n),
|
|
1953
2002
|
children: t
|
|
1954
2003
|
});
|
|
1955
2004
|
};
|
|
1956
|
-
|
|
1957
|
-
var
|
|
2005
|
+
fn.displayName = "TabsPanel";
|
|
2006
|
+
var pn = {
|
|
1958
2007
|
tab: "_tab_qe8xc_1",
|
|
1959
2008
|
iconOnly: "_iconOnly_qe8xc_27",
|
|
1960
2009
|
tabIcon: "_tabIcon_qe8xc_31",
|
|
@@ -1963,8 +2012,8 @@ var fn = {
|
|
|
1963
2012
|
underline: "_underline_qe8xc_60",
|
|
1964
2013
|
pills: "_pills_qe8xc_92",
|
|
1965
2014
|
vertical: "_vertical_qe8xc_106"
|
|
1966
|
-
},
|
|
1967
|
-
let { activeIndex: u, setActiveIndex: d, orientation: f, appearance: p = "default", registerTab: m, onTabKeyDown: h } =
|
|
2015
|
+
}, mn = i(({ index: e, children: t, className: n, disabled: r = !1, icon: i, onClick: a, onKeyDown: s, ...c }, l) => {
|
|
2016
|
+
let { activeIndex: u, setActiveIndex: d, orientation: f, appearance: p = "default", registerTab: m, onTabKeyDown: h } = cn(), v = u === e, y = !!i, b = y && t == null;
|
|
1968
2017
|
return /* @__PURE__ */ _("button", {
|
|
1969
2018
|
type: "button",
|
|
1970
2019
|
ref: o((t) => {
|
|
@@ -1980,7 +2029,7 @@ var fn = {
|
|
|
1980
2029
|
id: `tab-${e}`,
|
|
1981
2030
|
disabled: r,
|
|
1982
2031
|
tabIndex: v ? 0 : -1,
|
|
1983
|
-
className: V(
|
|
2032
|
+
className: V(pn.tab, pn[p], f === "vertical" && pn.vertical, y && pn.withIcon, b && pn.iconOnly, n),
|
|
1984
2033
|
onClick: (t) => {
|
|
1985
2034
|
r || (d(e), a?.(t));
|
|
1986
2035
|
},
|
|
@@ -1989,20 +2038,20 @@ var fn = {
|
|
|
1989
2038
|
},
|
|
1990
2039
|
...c,
|
|
1991
2040
|
children: [y && /* @__PURE__ */ g("span", {
|
|
1992
|
-
className:
|
|
2041
|
+
className: pn.tabIcon,
|
|
1993
2042
|
"aria-hidden": "true",
|
|
1994
2043
|
children: i
|
|
1995
2044
|
}), t != null && /* @__PURE__ */ g("span", {
|
|
1996
|
-
className:
|
|
2045
|
+
className: pn.label,
|
|
1997
2046
|
children: t
|
|
1998
2047
|
})]
|
|
1999
2048
|
});
|
|
2000
2049
|
});
|
|
2001
|
-
|
|
2002
|
-
var
|
|
2050
|
+
mn.displayName = "Tab";
|
|
2051
|
+
var hn = {
|
|
2003
2052
|
tabs: "_tabs_uqy7q_1",
|
|
2004
2053
|
vertical: "_vertical_uqy7q_5"
|
|
2005
|
-
},
|
|
2054
|
+
}, gn = ({ children: e, activeIndex: t, defaultActiveIndex: n = 0, onChange: r, orientation: i = "horizontal", appearance: a = "default", className: s }) => {
|
|
2006
2055
|
let { activeIndex: c, setActiveIndex: l } = R({
|
|
2007
2056
|
activeIndex: t,
|
|
2008
2057
|
defaultActiveIndex: n,
|
|
@@ -2025,25 +2074,25 @@ var mn = {
|
|
|
2025
2074
|
registerTab: f,
|
|
2026
2075
|
onTabKeyDown: p
|
|
2027
2076
|
};
|
|
2028
|
-
return /* @__PURE__ */ g(
|
|
2077
|
+
return /* @__PURE__ */ g(sn.Provider, {
|
|
2029
2078
|
value: m,
|
|
2030
2079
|
children: /* @__PURE__ */ g("div", {
|
|
2031
|
-
className: V(
|
|
2080
|
+
className: V(hn.tabs, i === "vertical" && hn.vertical, s),
|
|
2032
2081
|
children: e
|
|
2033
2082
|
})
|
|
2034
2083
|
});
|
|
2035
2084
|
};
|
|
2036
|
-
|
|
2085
|
+
gn.displayName = "Tabs";
|
|
2037
2086
|
//#endregion
|
|
2038
2087
|
//#region src/components/Tabs/index.ts
|
|
2039
|
-
var
|
|
2040
|
-
List:
|
|
2041
|
-
Tab:
|
|
2042
|
-
Panel:
|
|
2043
|
-
}),
|
|
2088
|
+
var _n = Object.assign(gn, {
|
|
2089
|
+
List: un,
|
|
2090
|
+
Tab: mn,
|
|
2091
|
+
Panel: fn
|
|
2092
|
+
}), vn = {
|
|
2044
2093
|
tooltip: "_tooltip_10opu_1",
|
|
2045
2094
|
arrow: "_arrow_10opu_25"
|
|
2046
|
-
},
|
|
2095
|
+
}, yn = i(({ content: e, placement: t = "top", arrowRef: n, arrowX: r, arrowY: i, className: a, style: o, ...s }, c) => {
|
|
2047
2096
|
let l = {
|
|
2048
2097
|
top: "bottom",
|
|
2049
2098
|
right: "left",
|
|
@@ -2058,22 +2107,22 @@ var gn = Object.assign(hn, {
|
|
|
2058
2107
|
};
|
|
2059
2108
|
return /* @__PURE__ */ _("div", {
|
|
2060
2109
|
ref: c,
|
|
2061
|
-
className: V(
|
|
2110
|
+
className: V(vn.tooltip, a),
|
|
2062
2111
|
"data-placement": t,
|
|
2063
2112
|
"data-state": "open",
|
|
2064
2113
|
style: o,
|
|
2065
2114
|
...s,
|
|
2066
2115
|
children: [e, /* @__PURE__ */ g("div", {
|
|
2067
2116
|
ref: n,
|
|
2068
|
-
className:
|
|
2117
|
+
className: vn.arrow,
|
|
2069
2118
|
style: u
|
|
2070
2119
|
})]
|
|
2071
2120
|
});
|
|
2072
2121
|
});
|
|
2073
|
-
|
|
2122
|
+
yn.displayName = "TooltipContent";
|
|
2074
2123
|
//#endregion
|
|
2075
2124
|
//#region src/components/Tooltip/Tooltip.tsx
|
|
2076
|
-
var
|
|
2125
|
+
var bn = ({ children: e, placement: t = "top", content: n, disabled: r = !1, delay: i = {
|
|
2077
2126
|
open: 300,
|
|
2078
2127
|
close: 100
|
|
2079
2128
|
}, maxWidth: a = 250, className: o, onOpenChange: s }) => {
|
|
@@ -2094,7 +2143,7 @@ var yn = ({ children: e, placement: t = "top", content: n, disabled: r = !1, del
|
|
|
2094
2143
|
"aria-describedby": c ? m : void 0,
|
|
2095
2144
|
...O(),
|
|
2096
2145
|
children: e
|
|
2097
|
-
}), /* @__PURE__ */ g(C, { children: c && n && /* @__PURE__ */ g(
|
|
2146
|
+
}), /* @__PURE__ */ g(C, { children: c && n && /* @__PURE__ */ g(yn, {
|
|
2098
2147
|
id: m,
|
|
2099
2148
|
ref: S,
|
|
2100
2149
|
content: n,
|
|
@@ -2111,47 +2160,47 @@ var yn = ({ children: e, placement: t = "top", content: n, disabled: r = !1, del
|
|
|
2111
2160
|
...k()
|
|
2112
2161
|
}) })] });
|
|
2113
2162
|
};
|
|
2114
|
-
|
|
2163
|
+
bn.displayName = "Tooltip";
|
|
2115
2164
|
//#endregion
|
|
2116
2165
|
//#region src/utils/devWarning.ts
|
|
2117
|
-
var
|
|
2166
|
+
var xn = (e, t) => {
|
|
2118
2167
|
process.env.NODE_ENV !== "production" && !e && console.warn(t);
|
|
2119
2168
|
}, X = {
|
|
2120
|
-
button: "
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
square: "
|
|
2133
|
-
rounded: "
|
|
2134
|
-
pill: "
|
|
2135
|
-
sm: "
|
|
2136
|
-
md: "
|
|
2137
|
-
lg: "
|
|
2138
|
-
fullWidth: "
|
|
2139
|
-
iconOnly: "
|
|
2140
|
-
label: "
|
|
2141
|
-
labelText: "
|
|
2142
|
-
icon: "
|
|
2143
|
-
spinner: "
|
|
2144
|
-
"button-spin": "_button-
|
|
2145
|
-
badge: "
|
|
2146
|
-
shortcut: "
|
|
2147
|
-
},
|
|
2169
|
+
button: "_button_wwfj5_1",
|
|
2170
|
+
link: "_link_wwfj5_35",
|
|
2171
|
+
solid: "_solid_wwfj5_39",
|
|
2172
|
+
primary: "_primary_wwfj5_39",
|
|
2173
|
+
loading: "_loading_wwfj5_39",
|
|
2174
|
+
neutral: "_neutral_wwfj5_74",
|
|
2175
|
+
success: "_success_wwfj5_109",
|
|
2176
|
+
warning: "_warning_wwfj5_144",
|
|
2177
|
+
danger: "_danger_wwfj5_179",
|
|
2178
|
+
outline: "_outline_wwfj5_214",
|
|
2179
|
+
ghost: "_ghost_wwfj5_389",
|
|
2180
|
+
soft: "_soft_wwfj5_564",
|
|
2181
|
+
square: "_square_wwfj5_957",
|
|
2182
|
+
rounded: "_rounded_wwfj5_961",
|
|
2183
|
+
pill: "_pill_wwfj5_965",
|
|
2184
|
+
sm: "_sm_wwfj5_969",
|
|
2185
|
+
md: "_md_wwfj5_975",
|
|
2186
|
+
lg: "_lg_wwfj5_981",
|
|
2187
|
+
fullWidth: "_fullWidth_wwfj5_987",
|
|
2188
|
+
iconOnly: "_iconOnly_wwfj5_991",
|
|
2189
|
+
label: "_label_wwfj5_995",
|
|
2190
|
+
labelText: "_labelText_wwfj5_1017",
|
|
2191
|
+
icon: "_icon_wwfj5_991",
|
|
2192
|
+
spinner: "_spinner_wwfj5_1036",
|
|
2193
|
+
"button-spin": "_button-spin_wwfj5_1",
|
|
2194
|
+
badge: "_badge_wwfj5_1058",
|
|
2195
|
+
shortcut: "_shortcut_wwfj5_1072"
|
|
2196
|
+
}, Sn = i(({ children: e, color: t = "primary", appearance: r = "solid", size: i = "md", shape: o = "pill", type: s = "button", disabled: c = !1, loading: l = !1, loadingText: u, iconStart: d, iconEnd: f, spinner: p, badge: m, shortcut: v, tooltip: y, fullWidth: b = !1, iconOnly: x = !1, asChild: S = !1, className: C, onClick: w, "aria-label": T, "aria-labelledby": E, href: D, target: O, rel: k, download: A, id: j, role: M, tabIndex: N, ...P }, F) => {
|
|
2148
2197
|
let I = S && a(e) ? e : void 0, L = I ? I.props.children : e, R = x || !L && !!(d || f), ee = !!(T || E || I?.props["aria-label"] || I?.props["aria-labelledby"]), z = c || l, B = l && u ? u : L, te = u && L && !R && (typeof L == "string" || typeof L == "number") && (typeof u == "string" || typeof u == "number") ? String(l ? L : u) : void 0, ne = O === "_blank" && !k ? "noreferrer noopener" : k, re = V(X.button, X[t], X[r], X[i], X[o], C, {
|
|
2149
2198
|
[X.disabled]: z,
|
|
2150
2199
|
[X.loading]: l,
|
|
2151
2200
|
[X.fullWidth]: b,
|
|
2152
2201
|
[X.iconOnly]: R
|
|
2153
2202
|
});
|
|
2154
|
-
|
|
2203
|
+
xn(!S || !D, "Button: pass href to the child element when using asChild."), xn(!S || !!I, "Button: asChild requires a single valid React element child."), xn(!R || ee, "Button: icon-only buttons must provide aria-label or aria-labelledby.");
|
|
2155
2204
|
let ie = (e) => {
|
|
2156
2205
|
e.preventDefault(), e.stopPropagation();
|
|
2157
2206
|
}, ae = (e) => {
|
|
@@ -2241,59 +2290,61 @@ var bn = (e, t) => {
|
|
|
2241
2290
|
children: H
|
|
2242
2291
|
});
|
|
2243
2292
|
});
|
|
2244
|
-
|
|
2293
|
+
Sn.displayName = "Button";
|
|
2245
2294
|
var Z = {
|
|
2246
|
-
wrapper: "
|
|
2247
|
-
colorPrimary: "
|
|
2248
|
-
colorNeutral: "
|
|
2249
|
-
colorSuccess: "
|
|
2250
|
-
colorWarning: "
|
|
2251
|
-
colorDanger: "
|
|
2252
|
-
labelStart: "
|
|
2253
|
-
wrapperSm: "
|
|
2254
|
-
wrapperMd: "
|
|
2255
|
-
wrapperLg: "
|
|
2256
|
-
iconOnly: "
|
|
2257
|
-
container: "
|
|
2258
|
-
containerSm: "
|
|
2259
|
-
containerMd: "
|
|
2260
|
-
containerLg: "
|
|
2261
|
-
containerLabelStart: "
|
|
2262
|
-
descriptionText: "
|
|
2263
|
-
errorText: "
|
|
2264
|
-
input: "
|
|
2265
|
-
customCheckbox: "
|
|
2266
|
-
requiredMark: "
|
|
2267
|
-
error: "
|
|
2268
|
-
checkmark: "
|
|
2269
|
-
indeterminateMark: "
|
|
2270
|
-
customMark: "
|
|
2271
|
-
label: "
|
|
2272
|
-
labelSm: "
|
|
2273
|
-
labelMd: "
|
|
2274
|
-
labelLg: "
|
|
2275
|
-
indeterminate: "
|
|
2276
|
-
"checkbox-pop": "_checkbox-
|
|
2277
|
-
|
|
2278
|
-
|
|
2295
|
+
wrapper: "_wrapper_1kk5v_1",
|
|
2296
|
+
colorPrimary: "_colorPrimary_1kk5v_27",
|
|
2297
|
+
colorNeutral: "_colorNeutral_1kk5v_45",
|
|
2298
|
+
colorSuccess: "_colorSuccess_1kk5v_63",
|
|
2299
|
+
colorWarning: "_colorWarning_1kk5v_81",
|
|
2300
|
+
colorDanger: "_colorDanger_1kk5v_99",
|
|
2301
|
+
labelStart: "_labelStart_1kk5v_115",
|
|
2302
|
+
wrapperSm: "_wrapperSm_1kk5v_119",
|
|
2303
|
+
wrapperMd: "_wrapperMd_1kk5v_125",
|
|
2304
|
+
wrapperLg: "_wrapperLg_1kk5v_131",
|
|
2305
|
+
iconOnly: "_iconOnly_1kk5v_137",
|
|
2306
|
+
container: "_container_1kk5v_143",
|
|
2307
|
+
containerSm: "_containerSm_1kk5v_150",
|
|
2308
|
+
containerMd: "_containerMd_1kk5v_154",
|
|
2309
|
+
containerLg: "_containerLg_1kk5v_158",
|
|
2310
|
+
containerLabelStart: "_containerLabelStart_1kk5v_162",
|
|
2311
|
+
descriptionText: "_descriptionText_1kk5v_162",
|
|
2312
|
+
errorText: "_errorText_1kk5v_163",
|
|
2313
|
+
input: "_input_1kk5v_167",
|
|
2314
|
+
customCheckbox: "_customCheckbox_1kk5v_179",
|
|
2315
|
+
requiredMark: "_requiredMark_1kk5v_194",
|
|
2316
|
+
error: "_error_1kk5v_163",
|
|
2317
|
+
checkmark: "_checkmark_1kk5v_210",
|
|
2318
|
+
indeterminateMark: "_indeterminateMark_1kk5v_226",
|
|
2319
|
+
customMark: "_customMark_1kk5v_239",
|
|
2320
|
+
label: "_label_1kk5v_115",
|
|
2321
|
+
labelSm: "_labelSm_1kk5v_270",
|
|
2322
|
+
labelMd: "_labelMd_1kk5v_274",
|
|
2323
|
+
labelLg: "_labelLg_1kk5v_278",
|
|
2324
|
+
indeterminate: "_indeterminate_1kk5v_226",
|
|
2325
|
+
"checkbox-pop": "_checkbox-pop_1kk5v_1",
|
|
2326
|
+
"checkbox-checkmark-in": "_checkbox-checkmark-in_1kk5v_1",
|
|
2327
|
+
"checkbox-indeterminate-in": "_checkbox-indeterminate-in_1kk5v_1",
|
|
2328
|
+
disabled: "_disabled_1kk5v_361"
|
|
2329
|
+
}, Cn = {
|
|
2279
2330
|
sm: Z.labelSm,
|
|
2280
2331
|
md: Z.labelMd,
|
|
2281
2332
|
lg: Z.labelLg
|
|
2282
|
-
},
|
|
2333
|
+
}, wn = {
|
|
2283
2334
|
sm: Z.wrapperSm,
|
|
2284
2335
|
md: Z.wrapperMd,
|
|
2285
2336
|
lg: Z.wrapperLg
|
|
2286
|
-
},
|
|
2337
|
+
}, Tn = {
|
|
2287
2338
|
sm: Z.containerSm,
|
|
2288
2339
|
md: Z.containerMd,
|
|
2289
2340
|
lg: Z.containerLg
|
|
2290
|
-
},
|
|
2341
|
+
}, En = {
|
|
2291
2342
|
primary: Z.colorPrimary,
|
|
2292
2343
|
neutral: Z.colorNeutral,
|
|
2293
2344
|
success: Z.colorSuccess,
|
|
2294
2345
|
warning: Z.colorWarning,
|
|
2295
2346
|
danger: Z.colorDanger
|
|
2296
|
-
},
|
|
2347
|
+
}, Dn = i(({ id: e, label: t, description: n, icon: r, indeterminateIcon: i, checked: a, size: s = "md", color: u = "primary", labelPosition: f = "end", defaultChecked: p = !1, disabled: m = !1, required: h = !1, indeterminate: y = !1, className: b, wrapperClassName: x, onCheckedChange: S, error: C, "aria-label": w, "aria-labelledby": T, "aria-describedby": E, ...D }, O) => {
|
|
2297
2348
|
let k = l(), A = e ?? k, j = d(null), M = !!C, N = n ? `${A}-description` : void 0, F = M ? `${A}-error` : void 0, I = [
|
|
2298
2349
|
E,
|
|
2299
2350
|
N,
|
|
@@ -2315,12 +2366,12 @@ var Z = {
|
|
|
2315
2366
|
let z = (e) => {
|
|
2316
2367
|
R(e.target.checked);
|
|
2317
2368
|
};
|
|
2318
|
-
return
|
|
2319
|
-
className: V(Z.container,
|
|
2369
|
+
return xn(!!(t || w || T), "Checkbox: an accessible label must be provided through label, aria-label, or aria-labelledby."), /* @__PURE__ */ _("div", {
|
|
2370
|
+
className: V(Z.container, Tn[s], f === "start" && Z.containerLabelStart, b),
|
|
2320
2371
|
children: [
|
|
2321
2372
|
/* @__PURE__ */ _("label", {
|
|
2322
2373
|
htmlFor: A,
|
|
2323
|
-
className: V(Z.wrapper,
|
|
2374
|
+
className: V(Z.wrapper, wn[s], En[u], f === "start" && Z.labelStart, !t && Z.iconOnly, m && Z.disabled, x),
|
|
2324
2375
|
children: [
|
|
2325
2376
|
/* @__PURE__ */ g("input", {
|
|
2326
2377
|
...D,
|
|
@@ -2350,7 +2401,7 @@ var Z = {
|
|
|
2350
2401
|
})
|
|
2351
2402
|
}),
|
|
2352
2403
|
t && /* @__PURE__ */ _("span", {
|
|
2353
|
-
className: V(Z.label,
|
|
2404
|
+
className: V(Z.label, Cn[s]),
|
|
2354
2405
|
children: [t, h && /* @__PURE__ */ g("span", {
|
|
2355
2406
|
className: Z.requiredMark,
|
|
2356
2407
|
"aria-hidden": "true",
|
|
@@ -2372,49 +2423,49 @@ var Z = {
|
|
|
2372
2423
|
]
|
|
2373
2424
|
});
|
|
2374
2425
|
});
|
|
2375
|
-
|
|
2426
|
+
Dn.displayName = "Checkbox";
|
|
2376
2427
|
var Q = {
|
|
2377
|
-
inputGroup: "
|
|
2378
|
-
primary: "
|
|
2379
|
-
outline: "
|
|
2380
|
-
filled: "
|
|
2381
|
-
soft: "
|
|
2382
|
-
neutral: "
|
|
2383
|
-
success: "
|
|
2384
|
-
warning: "
|
|
2385
|
-
danger: "
|
|
2386
|
-
inputWrapper: "
|
|
2387
|
-
input: "
|
|
2388
|
-
error: "
|
|
2389
|
-
sm: "
|
|
2390
|
-
md: "
|
|
2391
|
-
lg: "
|
|
2392
|
-
isInvalid: "
|
|
2393
|
-
hasLeftAdornment: "
|
|
2394
|
-
hasRightAdornment: "
|
|
2395
|
-
hasStartIconAndPrefix: "
|
|
2396
|
-
hasEndIconAndSuffix: "
|
|
2397
|
-
startAdornment: "
|
|
2398
|
-
endAdornment: "
|
|
2399
|
-
prefix: "
|
|
2400
|
-
suffix: "
|
|
2401
|
-
endSlot: "
|
|
2402
|
-
isLoading: "
|
|
2403
|
-
clearButton: "
|
|
2404
|
-
iconButton: "
|
|
2405
|
-
spinner: "
|
|
2406
|
-
"input-spin": "_input-
|
|
2407
|
-
addon: "
|
|
2408
|
-
hasAddons: "
|
|
2409
|
-
counter: "
|
|
2410
|
-
toneDefault: "
|
|
2411
|
-
tonePrimary: "
|
|
2412
|
-
toneSecondary: "
|
|
2413
|
-
toneSuccess: "
|
|
2414
|
-
toneDanger: "
|
|
2415
|
-
toneMuted: "
|
|
2416
|
-
toneInverse: "
|
|
2417
|
-
},
|
|
2428
|
+
inputGroup: "_inputGroup_1fjhk_1",
|
|
2429
|
+
primary: "_primary_1fjhk_29",
|
|
2430
|
+
outline: "_outline_1fjhk_29",
|
|
2431
|
+
filled: "_filled_1fjhk_62",
|
|
2432
|
+
soft: "_soft_1fjhk_95",
|
|
2433
|
+
neutral: "_neutral_1fjhk_128",
|
|
2434
|
+
success: "_success_1fjhk_227",
|
|
2435
|
+
warning: "_warning_1fjhk_326",
|
|
2436
|
+
danger: "_danger_1fjhk_425",
|
|
2437
|
+
inputWrapper: "_inputWrapper_1fjhk_524",
|
|
2438
|
+
input: "_input_1fjhk_1",
|
|
2439
|
+
error: "_error_1fjhk_576",
|
|
2440
|
+
sm: "_sm_1fjhk_584",
|
|
2441
|
+
md: "_md_1fjhk_588",
|
|
2442
|
+
lg: "_lg_1fjhk_592",
|
|
2443
|
+
isInvalid: "_isInvalid_1fjhk_608",
|
|
2444
|
+
hasLeftAdornment: "_hasLeftAdornment_1fjhk_638",
|
|
2445
|
+
hasRightAdornment: "_hasRightAdornment_1fjhk_642",
|
|
2446
|
+
hasStartIconAndPrefix: "_hasStartIconAndPrefix_1fjhk_646",
|
|
2447
|
+
hasEndIconAndSuffix: "_hasEndIconAndSuffix_1fjhk_650",
|
|
2448
|
+
startAdornment: "_startAdornment_1fjhk_654",
|
|
2449
|
+
endAdornment: "_endAdornment_1fjhk_655",
|
|
2450
|
+
prefix: "_prefix_1fjhk_673",
|
|
2451
|
+
suffix: "_suffix_1fjhk_674",
|
|
2452
|
+
endSlot: "_endSlot_1fjhk_701",
|
|
2453
|
+
isLoading: "_isLoading_1fjhk_712",
|
|
2454
|
+
clearButton: "_clearButton_1fjhk_747",
|
|
2455
|
+
iconButton: "_iconButton_1fjhk_762",
|
|
2456
|
+
spinner: "_spinner_1fjhk_788",
|
|
2457
|
+
"input-spin": "_input-spin_1fjhk_1",
|
|
2458
|
+
addon: "_addon_1fjhk_797",
|
|
2459
|
+
hasAddons: "_hasAddons_1fjhk_818",
|
|
2460
|
+
counter: "_counter_1fjhk_832",
|
|
2461
|
+
toneDefault: "_toneDefault_1fjhk_860",
|
|
2462
|
+
tonePrimary: "_tonePrimary_1fjhk_864",
|
|
2463
|
+
toneSecondary: "_toneSecondary_1fjhk_868",
|
|
2464
|
+
toneSuccess: "_toneSuccess_1fjhk_872",
|
|
2465
|
+
toneDanger: "_toneDanger_1fjhk_876",
|
|
2466
|
+
toneMuted: "_toneMuted_1fjhk_880",
|
|
2467
|
+
toneInverse: "_toneInverse_1fjhk_884"
|
|
2468
|
+
}, On = {
|
|
2418
2469
|
default: Q.toneDefault,
|
|
2419
2470
|
primary: Q.tonePrimary,
|
|
2420
2471
|
secondary: Q.toneSecondary,
|
|
@@ -2422,7 +2473,7 @@ var Q = {
|
|
|
2422
2473
|
danger: Q.toneDanger,
|
|
2423
2474
|
muted: Q.toneMuted,
|
|
2424
2475
|
inverse: Q.toneInverse
|
|
2425
|
-
},
|
|
2476
|
+
}, kn = (e = "text", t) => {
|
|
2426
2477
|
if (t) return t;
|
|
2427
2478
|
switch (e) {
|
|
2428
2479
|
case "email": return "email";
|
|
@@ -2432,7 +2483,7 @@ var Q = {
|
|
|
2432
2483
|
case "search": return "off";
|
|
2433
2484
|
default: return;
|
|
2434
2485
|
}
|
|
2435
|
-
},
|
|
2486
|
+
}, An = (e, t) => {
|
|
2436
2487
|
let n = e.replace(/\D/g, ""), r = 0, i = "";
|
|
2437
2488
|
for (let e of t) {
|
|
2438
2489
|
if (e === "#") {
|
|
@@ -2444,8 +2495,8 @@ var Q = {
|
|
|
2444
2495
|
r < n.length && (i += e);
|
|
2445
2496
|
}
|
|
2446
2497
|
return i;
|
|
2447
|
-
},
|
|
2448
|
-
let fe = l(), pe =
|
|
2498
|
+
}, jn = (e, t) => t ? typeof t == "function" ? t(e) : An(e, t) : e, Mn = i(({ id: e, label: t, name: n, description: r, placeholder: i, value: a, defaultValue: s, type: c = "text", size: u, color: p = "primary", variant: m = "outline", error: v, invalid: y = !1, disabled: b = !1, required: x = !1, loading: C = !1, className: w, wrapperClassName: T, autoComplete: E, readOnly: D = !1, clearable: O = !1, onClear: k, onValueChange: A, revealPassword: j = !1, showCounter: M = !1, startIcon: N, endIcon: P, startAddon: F, endAddon: I, prefix: L, suffix: R, clearIcon: ee, mask: z, format: B, parse: te, startIconTone: ne = "default", endIconTone: re = "default", clearIconTone: ie = "danger", autoFocus: ae, maxLength: H, onMouseEnter: U, onMouseLeave: oe, "aria-describedby": se, "aria-invalid": ce, "aria-labelledby": le, ...ue }, de) => {
|
|
2499
|
+
let fe = l(), pe = zt(), me = !!(t || r || v), he = e ?? (me ? void 0 : pe?.controlId) ?? fe, ge = d(null), [W, _e] = f(!1), [ve, ye] = f(s ?? ""), be = a !== void 0, xe = String((be ? a : ve) ?? ""), Se = B ? B(xe) : xe, Ce = xe.length > 0, we = u ?? pe?.size ?? "md", Te = y || !!v || !me && !!pe?.invalid, Ee = b || !me && !!pe?.disabled, De = x || !me && !!pe?.required, Oe = D || C, ke = c === "password", Ae = ke && j && W ? "text" : c, je = N ?? (c === "search" ? /* @__PURE__ */ g(S, {}) : null), Me = P, Ne = kn(c, E), Pe = C && !Ee, Fe = O && Ce && !Ee && !Oe && !Pe, Ie = j && ke && !Ee && !Pe && !Fe, Le = !Pe && !Fe && !Ie && !!Me, Re = !!(M && H), ze = r ? `${he}-description` : void 0, Be = v ? `${he}-error` : void 0, G = Re ? `${he}-counter` : void 0, K = [
|
|
2449
2500
|
se,
|
|
2450
2501
|
!me && !se ? pe?.ariaDescribedBy : void 0,
|
|
2451
2502
|
ze,
|
|
@@ -2458,7 +2509,7 @@ var Q = {
|
|
|
2458
2509
|
}
|
|
2459
2510
|
de && (de.current = e);
|
|
2460
2511
|
}, [de]), Je = o((e) => {
|
|
2461
|
-
let t =
|
|
2512
|
+
let t = jn(te ? te(e.target.value) : e.target.value, z);
|
|
2462
2513
|
be || ye(t), A?.(t);
|
|
2463
2514
|
}, [
|
|
2464
2515
|
be,
|
|
@@ -2493,7 +2544,7 @@ var Q = {
|
|
|
2493
2544
|
children: [
|
|
2494
2545
|
je && /* @__PURE__ */ g("span", {
|
|
2495
2546
|
"aria-hidden": "true",
|
|
2496
|
-
className: V(Q.startAdornment,
|
|
2547
|
+
className: V(Q.startAdornment, On[ne]),
|
|
2497
2548
|
children: je
|
|
2498
2549
|
}),
|
|
2499
2550
|
L && /* @__PURE__ */ g("span", {
|
|
@@ -2544,14 +2595,14 @@ var Q = {
|
|
|
2544
2595
|
}),
|
|
2545
2596
|
Fe && /* @__PURE__ */ g("button", {
|
|
2546
2597
|
type: "button",
|
|
2547
|
-
className: V(Q.clearButton,
|
|
2598
|
+
className: V(Q.clearButton, On[ie]),
|
|
2548
2599
|
onClick: Ye,
|
|
2549
2600
|
"aria-label": "Clear input",
|
|
2550
2601
|
children: Ve
|
|
2551
2602
|
}),
|
|
2552
2603
|
Le && Me && /* @__PURE__ */ g("span", {
|
|
2553
2604
|
"aria-hidden": "true",
|
|
2554
|
-
className: V(Q.endAdornment,
|
|
2605
|
+
className: V(Q.endAdornment, On[re]),
|
|
2555
2606
|
children: Me
|
|
2556
2607
|
})
|
|
2557
2608
|
]
|
|
@@ -2572,7 +2623,7 @@ var Q = {
|
|
|
2572
2623
|
H
|
|
2573
2624
|
]
|
|
2574
2625
|
})] });
|
|
2575
|
-
return !me && pe ? Xe : /* @__PURE__ */ g(
|
|
2626
|
+
return !me && pe ? Xe : /* @__PURE__ */ g(Ht, {
|
|
2576
2627
|
id: he,
|
|
2577
2628
|
label: t,
|
|
2578
2629
|
description: r,
|
|
@@ -2586,36 +2637,38 @@ var Q = {
|
|
|
2586
2637
|
children: Xe
|
|
2587
2638
|
});
|
|
2588
2639
|
});
|
|
2589
|
-
|
|
2640
|
+
Mn.displayName = "Input";
|
|
2590
2641
|
var $ = {
|
|
2591
|
-
root: "
|
|
2592
|
-
invalid: "
|
|
2593
|
-
control: "
|
|
2594
|
-
label: "
|
|
2595
|
-
wrapper: "
|
|
2596
|
-
input: "
|
|
2597
|
-
disabled: "
|
|
2598
|
-
description: "
|
|
2599
|
-
colorPrimary: "
|
|
2600
|
-
colorNeutral: "
|
|
2601
|
-
colorSuccess: "
|
|
2602
|
-
colorWarning: "
|
|
2603
|
-
colorDanger: "
|
|
2604
|
-
sm: "
|
|
2605
|
-
md: "
|
|
2606
|
-
lg: "
|
|
2607
|
-
indicator: "
|
|
2608
|
-
customIcon: "
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2642
|
+
root: "_root_1avxs_1",
|
|
2643
|
+
invalid: "_invalid_1avxs_27",
|
|
2644
|
+
control: "_control_1avxs_27",
|
|
2645
|
+
label: "_label_1avxs_30",
|
|
2646
|
+
wrapper: "_wrapper_1avxs_33",
|
|
2647
|
+
input: "_input_1avxs_34",
|
|
2648
|
+
disabled: "_disabled_1avxs_37",
|
|
2649
|
+
description: "_description_1avxs_45",
|
|
2650
|
+
colorPrimary: "_colorPrimary_1avxs_49",
|
|
2651
|
+
colorNeutral: "_colorNeutral_1avxs_65",
|
|
2652
|
+
colorSuccess: "_colorSuccess_1avxs_81",
|
|
2653
|
+
colorWarning: "_colorWarning_1avxs_97",
|
|
2654
|
+
colorDanger: "_colorDanger_1avxs_113",
|
|
2655
|
+
sm: "_sm_1avxs_129",
|
|
2656
|
+
md: "_md_1avxs_138",
|
|
2657
|
+
lg: "_lg_1avxs_147",
|
|
2658
|
+
indicator: "_indicator_1avxs_202",
|
|
2659
|
+
customIcon: "_customIcon_1avxs_216",
|
|
2660
|
+
"radio-pop": "_radio-pop_1avxs_1",
|
|
2661
|
+
"radio-indicator-in": "_radio-indicator-in_1avxs_1",
|
|
2662
|
+
content: "_content_1avxs_339",
|
|
2663
|
+
error: "_error_1avxs_356"
|
|
2664
|
+
}, Nn = {
|
|
2612
2665
|
primary: $.colorPrimary,
|
|
2613
2666
|
neutral: $.colorNeutral,
|
|
2614
2667
|
success: $.colorSuccess,
|
|
2615
2668
|
warning: $.colorWarning,
|
|
2616
2669
|
danger: $.colorDanger
|
|
2617
|
-
},
|
|
2618
|
-
let S =
|
|
2670
|
+
}, Pn = i(({ value: e, checked: t, defaultChecked: n = !1, disabled: r = !1, required: i = !1, size: a, color: o, error: s, onCheckedChange: c, label: u, description: d, icon: f, wrapperClassName: p, className: m, id: h, name: v, "aria-describedby": y, ...b }, x) => {
|
|
2671
|
+
let S = gt(), C = l(), w = h ?? C, T = d ? `${w}-description` : void 0, E = s ? `${w}-error` : void 0, D = [
|
|
2619
2672
|
T,
|
|
2620
2673
|
E,
|
|
2621
2674
|
S?.describedBy,
|
|
@@ -2634,7 +2687,7 @@ var $ = {
|
|
|
2634
2687
|
}
|
|
2635
2688
|
};
|
|
2636
2689
|
return /* @__PURE__ */ _("div", {
|
|
2637
|
-
className: V($.root, $[L], I && $.invalid, M && $.disabled,
|
|
2690
|
+
className: V($.root, $[L], I && $.invalid, M && $.disabled, Nn[R], m),
|
|
2638
2691
|
children: [/* @__PURE__ */ _("label", {
|
|
2639
2692
|
htmlFor: w,
|
|
2640
2693
|
className: V($.wrapper, p),
|
|
@@ -2681,15 +2734,15 @@ var $ = {
|
|
|
2681
2734
|
})]
|
|
2682
2735
|
});
|
|
2683
2736
|
});
|
|
2684
|
-
|
|
2737
|
+
Pn.displayName = "Radio";
|
|
2685
2738
|
//#endregion
|
|
2686
2739
|
//#region src/theme/ThemeContext.ts
|
|
2687
|
-
var
|
|
2740
|
+
var Fn = r(null), In = (e) => e === "highContrast" ? "high-contrast" : e, Ln = ({ theme: e, defaultTheme: t = "light", onThemeChange: n, children: r }) => {
|
|
2688
2741
|
let [i, a] = P({
|
|
2689
2742
|
value: e,
|
|
2690
2743
|
defaultValue: t,
|
|
2691
2744
|
onChange: n
|
|
2692
|
-
}), o =
|
|
2745
|
+
}), o = In(i);
|
|
2693
2746
|
c(() => {
|
|
2694
2747
|
if (typeof document > "u") return;
|
|
2695
2748
|
let { documentElement: e } = document, t = e.dataset.velliraTheme;
|
|
@@ -2705,7 +2758,7 @@ var Pn = r(null), Fn = (e) => e === "highContrast" ? "high-contrast" : e, In = (
|
|
|
2705
2758
|
theme: i,
|
|
2706
2759
|
setTheme: a
|
|
2707
2760
|
}), [i, a]);
|
|
2708
|
-
return /* @__PURE__ */ g(
|
|
2761
|
+
return /* @__PURE__ */ g(Fn.Provider, {
|
|
2709
2762
|
value: s,
|
|
2710
2763
|
children: /* @__PURE__ */ g("div", {
|
|
2711
2764
|
"data-vellira-theme": o,
|
|
@@ -2713,13 +2766,13 @@ var Pn = r(null), Fn = (e) => e === "highContrast" ? "high-contrast" : e, In = (
|
|
|
2713
2766
|
})
|
|
2714
2767
|
});
|
|
2715
2768
|
};
|
|
2716
|
-
|
|
2769
|
+
Ln.displayName = "ThemeProvider";
|
|
2717
2770
|
//#endregion
|
|
2718
2771
|
//#region src/theme/useTheme.ts
|
|
2719
|
-
function
|
|
2720
|
-
let e = s(
|
|
2772
|
+
function Rn() {
|
|
2773
|
+
let e = s(Fn);
|
|
2721
2774
|
if (!e) throw Error("useTheme must be used within ThemeProvider.");
|
|
2722
2775
|
return e;
|
|
2723
2776
|
}
|
|
2724
2777
|
//#endregion
|
|
2725
|
-
export {
|
|
2778
|
+
export { Sn as Button, Dn as Checkbox, Xe as Dropdown, Ht as FormField, Mn as Input, pt as Modal, Pn as Radio, vt as RadioGroup, on as Select, _n as Tabs, Ln as ThemeProvider, bn as Tooltip, Rn as useTheme };
|