@vellira-ui/react 2.62.3 → 2.63.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +352 -342
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -293,7 +293,7 @@ var de = ({ active: e, enabled: t = !0, finalFocus: n, onCloseAutoFocus: r }) =>
|
|
|
293
293
|
restoreFocusAfterClose: f,
|
|
294
294
|
saveFocusSnapshot: u
|
|
295
295
|
};
|
|
296
|
-
},
|
|
296
|
+
}, J = () => {
|
|
297
297
|
let e = !1;
|
|
298
298
|
return {
|
|
299
299
|
preventDefault: () => {
|
|
@@ -303,7 +303,7 @@ var de = ({ active: e, enabled: t = !0, finalFocus: n, onCloseAutoFocus: r }) =>
|
|
|
303
303
|
return e;
|
|
304
304
|
}
|
|
305
305
|
};
|
|
306
|
-
},
|
|
306
|
+
}, fe = (e) => {
|
|
307
307
|
let t = !1;
|
|
308
308
|
return {
|
|
309
309
|
originalEvent: e,
|
|
@@ -331,7 +331,7 @@ var de = ({ active: e, enabled: t = !0, finalFocus: n, onCloseAutoFocus: r }) =>
|
|
|
331
331
|
onCloseAutoFocus: s
|
|
332
332
|
}), x(() => {
|
|
333
333
|
if (!e) return;
|
|
334
|
-
let n =
|
|
334
|
+
let n = J();
|
|
335
335
|
o?.(n), n.defaultPrevented || queueMicrotask(() => {
|
|
336
336
|
r?.current?.focus(), !r?.current && t.current && he(t.current);
|
|
337
337
|
});
|
|
@@ -554,7 +554,7 @@ var Ae = ({ active: e, id: t, zIndexLevel: n, registrationActive: r = e, registe
|
|
|
554
554
|
if (!e) return;
|
|
555
555
|
let n = ke(m), r = m.registerPointerDownOutsideHandler(t, (e) => {
|
|
556
556
|
if (e.target instanceof Node && [o, ...g.current].some((t) => t.current?.contains(e.target))) return;
|
|
557
|
-
let t =
|
|
557
|
+
let t = fe(e);
|
|
558
558
|
d?.(t), f?.(t), !(t.defaultPrevented || !l) && p("outside-press", e);
|
|
559
559
|
});
|
|
560
560
|
return () => {
|
|
@@ -1309,7 +1309,7 @@ var kt = { wrapper: "_wrapper_14ue8_1" }, At = ({ children: e, open: t, defaultO
|
|
|
1309
1309
|
}), t;
|
|
1310
1310
|
});
|
|
1311
1311
|
}, [se]);
|
|
1312
|
-
let { activeIndex: ue, setActiveIndex: de, isOpen:
|
|
1312
|
+
let { activeIndex: ue, setActiveIndex: de, isOpen: J, closeDropdown: fe, toggleDropdown: pe, onKeyDown: me } = Be({
|
|
1313
1313
|
items: oe ? le : ce,
|
|
1314
1314
|
open: t,
|
|
1315
1315
|
defaultOpen: n,
|
|
@@ -1319,7 +1319,7 @@ var kt = { wrapper: "_wrapper_14ue8_1" }, At = ({ children: e, open: t, defaultO
|
|
|
1319
1319
|
getItemText: (e) => e.label,
|
|
1320
1320
|
loop: b
|
|
1321
1321
|
}), { floatingStyles: he, isMobileSheet: ge, isPositioned: _e, setRef: ve, setFloatingRef: ye } = je({
|
|
1322
|
-
open:
|
|
1322
|
+
open: J,
|
|
1323
1323
|
placement: o,
|
|
1324
1324
|
strategy: s,
|
|
1325
1325
|
portal: h,
|
|
@@ -1336,12 +1336,12 @@ var kt = { wrapper: "_wrapper_14ue8_1" }, At = ({ children: e, open: t, defaultO
|
|
|
1336
1336
|
de
|
|
1337
1337
|
]);
|
|
1338
1338
|
Fe({
|
|
1339
|
-
active:
|
|
1339
|
+
active: J,
|
|
1340
1340
|
enabled: _
|
|
1341
1341
|
});
|
|
1342
1342
|
let xe = y(() => {
|
|
1343
|
-
|
|
1344
|
-
}, [
|
|
1343
|
+
fe(), B.current?.focus();
|
|
1344
|
+
}, [fe]), Se = y((e, t) => {
|
|
1345
1345
|
if (e.disabled || D) return;
|
|
1346
1346
|
if (e.type === "subTrigger") {
|
|
1347
1347
|
H(e.id);
|
|
@@ -1387,14 +1387,14 @@ var kt = { wrapper: "_wrapper_14ue8_1" }, At = ({ children: e, open: t, defaultO
|
|
|
1387
1387
|
}, [ve]), Ee = y((e) => {
|
|
1388
1388
|
ee.current = e, ye(e), ge && e?.focus({ preventScroll: !0 });
|
|
1389
1389
|
}, [ge, ye]), De = Ae({
|
|
1390
|
-
active:
|
|
1390
|
+
active: J,
|
|
1391
1391
|
id: z,
|
|
1392
1392
|
zIndexLevel: "dropdown",
|
|
1393
1393
|
closeOnEscape: !0,
|
|
1394
1394
|
closeOnOutsidePress: !0,
|
|
1395
1395
|
contentRef: ee,
|
|
1396
1396
|
ignoreRefs: [B],
|
|
1397
|
-
requestClose: () =>
|
|
1397
|
+
requestClose: () => fe()
|
|
1398
1398
|
}), Oe = {
|
|
1399
1399
|
...he,
|
|
1400
1400
|
zIndex: De.zIndex,
|
|
@@ -1402,7 +1402,7 @@ var kt = { wrapper: "_wrapper_14ue8_1" }, At = ({ children: e, open: t, defaultO
|
|
|
1402
1402
|
maxWidth: Ot(m)
|
|
1403
1403
|
}, ke = {
|
|
1404
1404
|
disabled: C,
|
|
1405
|
-
isOpen:
|
|
1405
|
+
isOpen: J,
|
|
1406
1406
|
contentId: z,
|
|
1407
1407
|
triggerId: R,
|
|
1408
1408
|
setTriggerRef: Te,
|
|
@@ -1418,7 +1418,7 @@ var kt = { wrapper: "_wrapper_14ue8_1" }, At = ({ children: e, open: t, defaultO
|
|
|
1418
1418
|
disabled: C,
|
|
1419
1419
|
entries: q.entries,
|
|
1420
1420
|
getItemId: (e) => `${z}-item-${e}`,
|
|
1421
|
-
isOpen:
|
|
1421
|
+
isOpen: J,
|
|
1422
1422
|
items: q.items,
|
|
1423
1423
|
loading: D,
|
|
1424
1424
|
loadingText: O,
|
|
@@ -2141,55 +2141,55 @@ An.displayName = "Popover.Description";
|
|
|
2141
2141
|
function jn(e, t) {
|
|
2142
2142
|
return t === "center" ? e : `${e}-${t}`;
|
|
2143
2143
|
}
|
|
2144
|
-
function Mn({ children: e, open: t, defaultOpen: n = !1, modal: r = !1, onOpenChange: i, side: a = "bottom", align: o = "center", sideOffset: s = 8,
|
|
2145
|
-
let
|
|
2144
|
+
function Mn({ children: e, open: t, defaultOpen: n = !1, modal: r = !1, onOpenChange: i, side: a = "bottom", align: o = "center", sideOffset: s = 8, collisionPadding: c = 8, avoidCollisions: l = !0, portal: u = !0, strategy: f }) {
|
|
2145
|
+
let p = T(null), m = T(null), h = T(null), g = T({ reason: "programmatic" }), _ = S(), v = `vellira-popover-trigger-${_}`, b = `vellira-popover-content-${_}`, x = `vellira-popover-title-${_}`, C = `vellira-popover-description-${_}`, [E, D] = Y({
|
|
2146
2146
|
value: t,
|
|
2147
2147
|
defaultValue: n,
|
|
2148
2148
|
onChange: (e) => {
|
|
2149
|
-
i?.(e,
|
|
2149
|
+
i?.(e, g.current);
|
|
2150
2150
|
}
|
|
2151
|
-
}),
|
|
2152
|
-
|
|
2153
|
-
}, [
|
|
2154
|
-
element:
|
|
2151
|
+
}), O = y((e, t) => {
|
|
2152
|
+
g.current = t, D(e);
|
|
2153
|
+
}, [D]), k = T(null), j = w(() => [A({
|
|
2154
|
+
element: k,
|
|
2155
2155
|
padding: 8
|
|
2156
|
-
})], []), { context:
|
|
2157
|
-
open:
|
|
2156
|
+
})], []), { context: M, floatingStyles: N, isPositioned: P, placement: F, setFloatingRef: I, setRef: L } = je({
|
|
2157
|
+
open: E,
|
|
2158
2158
|
placement: jn(a, o),
|
|
2159
|
-
strategy:
|
|
2160
|
-
portal:
|
|
2159
|
+
strategy: f,
|
|
2160
|
+
portal: u,
|
|
2161
2161
|
offset: s + 7,
|
|
2162
|
-
collisionPadding:
|
|
2163
|
-
avoidCollisions:
|
|
2164
|
-
middleware:
|
|
2165
|
-
}),
|
|
2166
|
-
|
|
2167
|
-
}, [
|
|
2168
|
-
|
|
2169
|
-
}, [
|
|
2170
|
-
|
|
2171
|
-
}, [
|
|
2162
|
+
collisionPadding: c,
|
|
2163
|
+
avoidCollisions: l,
|
|
2164
|
+
middleware: j
|
|
2165
|
+
}), R = y((e) => {
|
|
2166
|
+
p.current = e, m.current || L(e);
|
|
2167
|
+
}, [L]), z = y((e) => {
|
|
2168
|
+
m.current = e, L(e ?? p.current);
|
|
2169
|
+
}, [L]), B = y((e) => {
|
|
2170
|
+
h.current = e, I(e);
|
|
2171
|
+
}, [I]);
|
|
2172
2172
|
return /* @__PURE__ */ d(yn, {
|
|
2173
2173
|
value: {
|
|
2174
|
-
open:
|
|
2174
|
+
open: E,
|
|
2175
2175
|
modal: r,
|
|
2176
|
-
portal:
|
|
2177
|
-
triggerRef:
|
|
2178
|
-
anchorRef:
|
|
2179
|
-
contentRef:
|
|
2180
|
-
triggerId:
|
|
2181
|
-
contentId:
|
|
2182
|
-
titleId:
|
|
2183
|
-
descriptionId:
|
|
2184
|
-
placement:
|
|
2185
|
-
floatingStyles:
|
|
2186
|
-
isPositioned:
|
|
2187
|
-
floatingContext:
|
|
2188
|
-
arrowRef:
|
|
2189
|
-
setTriggerRef:
|
|
2190
|
-
setAnchorRef:
|
|
2191
|
-
setContentRef:
|
|
2192
|
-
setOpen:
|
|
2176
|
+
portal: u,
|
|
2177
|
+
triggerRef: p,
|
|
2178
|
+
anchorRef: m,
|
|
2179
|
+
contentRef: h,
|
|
2180
|
+
triggerId: v,
|
|
2181
|
+
contentId: b,
|
|
2182
|
+
titleId: x,
|
|
2183
|
+
descriptionId: C,
|
|
2184
|
+
placement: F,
|
|
2185
|
+
floatingStyles: N,
|
|
2186
|
+
isPositioned: P,
|
|
2187
|
+
floatingContext: M,
|
|
2188
|
+
arrowRef: k,
|
|
2189
|
+
setTriggerRef: R,
|
|
2190
|
+
setAnchorRef: z,
|
|
2191
|
+
setContentRef: B,
|
|
2192
|
+
setOpen: O
|
|
2193
2193
|
},
|
|
2194
2194
|
children: e
|
|
2195
2195
|
});
|
|
@@ -2399,71 +2399,71 @@ var Yn = {
|
|
|
2399
2399
|
error: "_error_1s3vp_152",
|
|
2400
2400
|
disabled: "_disabled_1s3vp_160",
|
|
2401
2401
|
invalid: "_invalid_1s3vp_176"
|
|
2402
|
-
}, Xn = _(({ value: e, defaultValue: t = "", onValueChange: n, disabled: r = !1, required: i = !1,
|
|
2403
|
-
let
|
|
2402
|
+
}, Xn = _(({ value: e, defaultValue: t = "", onValueChange: n, disabled: r = !1, required: i = !1, invalid: a = !1, size: o = "md", color: s = "primary", name: c, label: l, description: u, error: p, orientation: m = "vertical", children: h, className: g, id: _, onKeyDown: v, ...y }, b) => {
|
|
2403
|
+
let x = T(null), C = S(), w = _ ?? C, E = l ? `${w}-label` : void 0, D = u ? `${w}-description` : void 0, O = p ? `${w}-error` : void 0, k = [D, O].filter(Boolean).join(" ") || void 0, A = c ?? `${w}-radio`, [j, M] = Y({
|
|
2404
2404
|
value: e,
|
|
2405
2405
|
defaultValue: t,
|
|
2406
2406
|
onChange: n
|
|
2407
|
-
}),
|
|
2408
|
-
rootRef:
|
|
2409
|
-
orientation:
|
|
2410
|
-
}),
|
|
2411
|
-
if (
|
|
2412
|
-
|
|
2407
|
+
}), N = a || !!p, P = Jn({
|
|
2408
|
+
rootRef: x,
|
|
2409
|
+
orientation: m
|
|
2410
|
+
}), F = (e) => {
|
|
2411
|
+
if (x.current = e, typeof b == "function") {
|
|
2412
|
+
b(e);
|
|
2413
2413
|
return;
|
|
2414
2414
|
}
|
|
2415
|
-
|
|
2415
|
+
b && (b.current = e);
|
|
2416
2416
|
};
|
|
2417
2417
|
return /* @__PURE__ */ f("div", {
|
|
2418
|
-
...
|
|
2419
|
-
ref:
|
|
2420
|
-
id:
|
|
2418
|
+
...y,
|
|
2419
|
+
ref: F,
|
|
2420
|
+
id: w,
|
|
2421
2421
|
role: "radiogroup",
|
|
2422
|
-
"aria-labelledby":
|
|
2423
|
-
"aria-describedby":
|
|
2422
|
+
"aria-labelledby": E,
|
|
2423
|
+
"aria-describedby": k,
|
|
2424
2424
|
"aria-disabled": r || void 0,
|
|
2425
2425
|
"aria-required": i || void 0,
|
|
2426
|
-
"aria-invalid":
|
|
2426
|
+
"aria-invalid": N || void 0,
|
|
2427
2427
|
onKeyDown: (e) => {
|
|
2428
|
-
|
|
2428
|
+
v?.(e), e.defaultPrevented || P(e);
|
|
2429
2429
|
},
|
|
2430
|
-
className: U(Yn.root, Yn[
|
|
2430
|
+
className: U(Yn.root, Yn[o], N && Yn.invalid, r && Yn.disabled, g),
|
|
2431
2431
|
children: [
|
|
2432
|
-
|
|
2433
|
-
id:
|
|
2432
|
+
l && /* @__PURE__ */ f("div", {
|
|
2433
|
+
id: E,
|
|
2434
2434
|
className: Yn.label,
|
|
2435
|
-
children: [
|
|
2435
|
+
children: [l, i && /* @__PURE__ */ d("span", {
|
|
2436
2436
|
className: Yn.required,
|
|
2437
2437
|
"aria-hidden": "true",
|
|
2438
2438
|
children: "*"
|
|
2439
2439
|
})]
|
|
2440
2440
|
}),
|
|
2441
|
-
|
|
2442
|
-
id:
|
|
2441
|
+
u && /* @__PURE__ */ d("div", {
|
|
2442
|
+
id: D,
|
|
2443
2443
|
className: Yn.description,
|
|
2444
|
-
children:
|
|
2444
|
+
children: u
|
|
2445
2445
|
}),
|
|
2446
2446
|
/* @__PURE__ */ d(Rn, {
|
|
2447
2447
|
value: {
|
|
2448
|
-
name:
|
|
2449
|
-
value:
|
|
2448
|
+
name: A,
|
|
2449
|
+
value: j,
|
|
2450
2450
|
disabled: r,
|
|
2451
2451
|
required: i,
|
|
2452
|
-
invalid:
|
|
2453
|
-
size:
|
|
2454
|
-
color:
|
|
2455
|
-
describedBy:
|
|
2456
|
-
onValueChange:
|
|
2452
|
+
invalid: N,
|
|
2453
|
+
size: o,
|
|
2454
|
+
color: s,
|
|
2455
|
+
describedBy: k,
|
|
2456
|
+
onValueChange: M
|
|
2457
2457
|
},
|
|
2458
2458
|
children: /* @__PURE__ */ d("div", {
|
|
2459
|
-
className: U(Yn.items, Yn[
|
|
2460
|
-
children:
|
|
2459
|
+
className: U(Yn.items, Yn[m]),
|
|
2460
|
+
children: h
|
|
2461
2461
|
})
|
|
2462
2462
|
}),
|
|
2463
|
-
|
|
2464
|
-
id:
|
|
2463
|
+
p && /* @__PURE__ */ d("div", {
|
|
2464
|
+
id: O,
|
|
2465
2465
|
className: Yn.error,
|
|
2466
|
-
children:
|
|
2466
|
+
children: p
|
|
2467
2467
|
})
|
|
2468
2468
|
]
|
|
2469
2469
|
});
|
|
@@ -2704,11 +2704,11 @@ var lr = ({ isOpen: e, listboxId: t, labelledById: n, setDropdownRef: r, style:
|
|
|
2704
2704
|
"--select-dropdown-max-height": typeof oe == "number" ? `${oe}px` : oe
|
|
2705
2705
|
}), [oe, i]);
|
|
2706
2706
|
if (!e) return null;
|
|
2707
|
-
let
|
|
2707
|
+
let J = o && !K ? o : le.map((e, t) => ({
|
|
2708
2708
|
type: "option",
|
|
2709
2709
|
option: e,
|
|
2710
2710
|
optionIndex: se + t
|
|
2711
|
-
})),
|
|
2711
|
+
})), fe = /* @__PURE__ */ f("div", {
|
|
2712
2712
|
ref: ue,
|
|
2713
2713
|
tabIndex: 0,
|
|
2714
2714
|
className: [
|
|
@@ -2761,7 +2761,7 @@ var lr = ({ isOpen: e, listboxId: t, labelledById: n, setDropdownRef: r, style:
|
|
|
2761
2761
|
className: sr.virtualSpacer,
|
|
2762
2762
|
style: { height: ce }
|
|
2763
2763
|
}),
|
|
2764
|
-
|
|
2764
|
+
J.map((e) => {
|
|
2765
2765
|
if (e.type === "group") {
|
|
2766
2766
|
if (e.selectable && s) {
|
|
2767
2767
|
let t = e.itemValues.filter((e) => a.some((t) => t.value === e && !t.disabled)), n = c ? t.filter((e) => c.includes(e)).length : 0, r = t.length > 0 && n === t.length, i = n > 0 && n < t.length;
|
|
@@ -2829,7 +2829,7 @@ var lr = ({ isOpen: e, listboxId: t, labelledById: n, setDropdownRef: r, style:
|
|
|
2829
2829
|
})
|
|
2830
2830
|
]
|
|
2831
2831
|
});
|
|
2832
|
-
return _ ? /* @__PURE__ */ d(Ke, { children:
|
|
2832
|
+
return _ ? /* @__PURE__ */ d(Ke, { children: fe }) : fe;
|
|
2833
2833
|
};
|
|
2834
2834
|
lr.displayName = "SelectContentSurface";
|
|
2835
2835
|
function ur(e) {
|
|
@@ -3273,265 +3273,275 @@ function Br(e) {
|
|
|
3273
3273
|
//#endregion
|
|
3274
3274
|
//#region src/components/Select/Root/useSelectRootState.tsx
|
|
3275
3275
|
function Vr(e) {
|
|
3276
|
-
let { children: t, label: n, description: r, id: i, name: a, "aria-label": o, "aria-describedby": s, "aria-labelledby": c,
|
|
3276
|
+
let { children: t, label: n, description: r, id: i, name: a, "aria-label": o, "aria-describedby": s, "aria-labelledby": c, multiple: l = !1, maxSelected: p, closeOnSelect: m, placeholder: h = "Select...", empty: g, loadingText: _ = "Loading...", size: v, color: b = "primary", variant: C = "outline", required: D = !1, disabled: O = !1, invalid: k = !1, loading: A = !1, clearable: j = !1, searchable: M = !1, virtual: N, modal: P = !1, command: F = !1, error: I, placement: L = "bottom", matchTriggerWidth: R = !0, avoidCollisions: z = !0, portal: B = !0, open: ee, defaultOpen: V = !1, onOpenChange: H, onSearch: te, onClear: ne, startIcon: re, endIcon: U, prefix: ie, suffix: W, renderValue: G, renderOption: K, onBlur: ae, onFocus: oe, className: se, triggerClassName: ce, dropdownClassName: q } = e, le = S(), ue = xr(), de = !!(n || r || I), J = i ?? (de ? void 0 : ue?.controlId) ?? le, fe = `${J}-listbox`, [pe, me] = E(""), he = !!I, ge = he ? `${J}-error` : void 0, _e = r ? `${J}-description` : void 0, ve = v ?? ue?.size ?? "md", ye = k || he || !de && !!ue?.invalid, be = O || !de && !!ue?.disabled, xe = D || !de && !!ue?.required, Se = [
|
|
3277
3277
|
s,
|
|
3278
|
-
!
|
|
3279
|
-
|
|
3280
|
-
ye
|
|
3281
|
-
].filter(Boolean).join(" "), Ee = T(null), De = T(null), [Oe, ke] = E(!1), je = F || R, { entries: Me, options: Ne } = Br(t), Pe = w(() => Rr({
|
|
3282
|
-
options: Ne,
|
|
3283
|
-
searchable: je,
|
|
3284
|
-
searchValue: ge
|
|
3285
|
-
}), [
|
|
3286
|
-
je,
|
|
3287
|
-
Ne,
|
|
3278
|
+
!de && !s ? ue?.ariaDescribedBy : void 0,
|
|
3279
|
+
_e,
|
|
3288
3280
|
ge
|
|
3289
|
-
]),
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3281
|
+
].filter(Boolean).join(" "), Ce = T(null), we = T(null), [Te, Ee] = E(!1), De = M || F, { entries: Oe, options: ke } = Br(t), je = w(() => Rr({
|
|
3282
|
+
options: ke,
|
|
3283
|
+
searchable: De,
|
|
3284
|
+
searchValue: pe
|
|
3285
|
+
}), [
|
|
3286
|
+
De,
|
|
3287
|
+
ke,
|
|
3288
|
+
pe
|
|
3289
|
+
]), Me = e.multiple === !0 ? e.value : e.value === null ? "" : e.value, Ne = e.multiple === !0 ? e.defaultValue : e.defaultValue === null ? "" : e.defaultValue, Pe = e.multiple === !0 ? e.onValueChange : void 0, Ie = e.multiple === !0 ? void 0 : e.onValueChange, { selectedValue: Le, selectedValues: Y, isOpen: ze, setIsOpen: Be, setSelectedValue: Ve, activeIndex: Ue, setActiveIndex: We, closeDropdown: Ge, toggleDropdown: Ke, selectValue: qe, onKeyDown: Je } = He({
|
|
3290
|
+
value: Me,
|
|
3291
|
+
defaultValue: Ne,
|
|
3292
|
+
onValueChange: y((e) => {
|
|
3293
|
+
if (l) {
|
|
3294
|
+
Pe?.(Array.isArray(e) ? e : e ? [e] : []);
|
|
3295
|
+
return;
|
|
3296
|
+
}
|
|
3297
|
+
Ie?.(Array.isArray(e) ? e[0] ?? null : e === "" ? null : e);
|
|
3298
|
+
}, [
|
|
3299
|
+
l,
|
|
3300
|
+
Pe,
|
|
3301
|
+
Ie
|
|
3302
|
+
]),
|
|
3303
|
+
options: je,
|
|
3304
|
+
multiple: l,
|
|
3305
|
+
maxSelected: p,
|
|
3306
|
+
closeOnSelect: m,
|
|
3307
|
+
disabled: be,
|
|
3308
|
+
open: ee,
|
|
3309
|
+
defaultOpen: V,
|
|
3310
|
+
onOpenChange: H
|
|
3311
|
+
}), Ye = w(() => ke.find((e) => Y.includes(e.value)), [ke, Y]), Xe = w(() => ke.filter((e) => Y.includes(e.value)), [ke, Y]), Ze = !!Ye, Qe = Array.isArray(Le) ? Le[0] ?? "" : Le, { floatingStyles: $e, setRef: et, setFloatingRef: tt } = Re({
|
|
3312
|
+
isOpen: ze,
|
|
3313
|
+
onOpenChange: Be,
|
|
3314
|
+
placement: L,
|
|
3315
|
+
matchTriggerWidth: R,
|
|
3316
|
+
avoidCollisions: z
|
|
3317
|
+
}), nt = y((e) => {
|
|
3318
|
+
qe(e), Ce.current?.focus();
|
|
3319
|
+
}, [qe]), rt = y((e) => {
|
|
3320
|
+
if (!l || e.length === 0) return;
|
|
3321
|
+
let t = e.filter((e) => ke.some((t) => t.value === e && !t.disabled)), n = t.filter((e) => Y.includes(e)), r = Y.filter((e) => !t.includes(e)).length, i = typeof p == "number" ? Math.max(0, Math.min(t.length, p - r)) : t.length;
|
|
3312
3322
|
if (n.length > 0 && n.length >= i) {
|
|
3313
|
-
|
|
3323
|
+
Ve(Y.filter((e) => !t.includes(e)));
|
|
3314
3324
|
return;
|
|
3315
3325
|
}
|
|
3316
|
-
let a = [...
|
|
3326
|
+
let a = [...Y];
|
|
3317
3327
|
for (let e of t) if (!a.includes(e)) {
|
|
3318
|
-
if (typeof
|
|
3328
|
+
if (typeof p == "number" && a.length >= p) break;
|
|
3319
3329
|
a.push(e);
|
|
3320
3330
|
}
|
|
3321
|
-
|
|
3331
|
+
Ve(a), m && (Ge(), Ce.current?.focus());
|
|
3322
3332
|
}, [
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
]),
|
|
3331
|
-
|
|
3332
|
-
}, [
|
|
3333
|
-
|
|
3334
|
-
}, [
|
|
3335
|
-
Hr(e,
|
|
3336
|
-
}, [
|
|
3337
|
-
|
|
3338
|
-
}, [
|
|
3339
|
-
|
|
3340
|
-
}, [
|
|
3341
|
-
active:
|
|
3342
|
-
id:
|
|
3333
|
+
Ge,
|
|
3334
|
+
m,
|
|
3335
|
+
p,
|
|
3336
|
+
l,
|
|
3337
|
+
ke,
|
|
3338
|
+
Y,
|
|
3339
|
+
Ve
|
|
3340
|
+
]), it = y(() => {
|
|
3341
|
+
qe(""), ne?.(), Ce.current?.focus();
|
|
3342
|
+
}, [ne, qe]), at = y(() => {
|
|
3343
|
+
ze || Ee(!1), Ke();
|
|
3344
|
+
}, [ze, Ke]), X = y((e) => {
|
|
3345
|
+
Hr(e, ze) && Ee(!0), Je(e);
|
|
3346
|
+
}, [ze, Je]), ot = y((e) => {
|
|
3347
|
+
Ee(!0), We(e);
|
|
3348
|
+
}, [We]), st = y((e) => {
|
|
3349
|
+
me(e), te?.(e);
|
|
3350
|
+
}, [te]), ct = Ae({
|
|
3351
|
+
active: ze,
|
|
3352
|
+
id: fe,
|
|
3343
3353
|
zIndexLevel: "dropdown",
|
|
3344
3354
|
closeOnEscape: !0,
|
|
3345
3355
|
closeOnOutsidePress: !0,
|
|
3346
|
-
contentRef:
|
|
3347
|
-
ignoreRefs: [
|
|
3348
|
-
requestClose:
|
|
3356
|
+
contentRef: we,
|
|
3357
|
+
ignoreRefs: [Ce],
|
|
3358
|
+
requestClose: Ge
|
|
3349
3359
|
});
|
|
3350
3360
|
x(() => {
|
|
3351
|
-
|
|
3352
|
-
}, [
|
|
3353
|
-
!
|
|
3354
|
-
}, [
|
|
3355
|
-
active:
|
|
3356
|
-
enabled:
|
|
3361
|
+
ze || Ee(!1);
|
|
3362
|
+
}, [ze]), x(() => {
|
|
3363
|
+
!ze && pe && me("");
|
|
3364
|
+
}, [ze, pe]), Fe({
|
|
3365
|
+
active: ze,
|
|
3366
|
+
enabled: P
|
|
3357
3367
|
});
|
|
3358
|
-
let
|
|
3359
|
-
|
|
3360
|
-
}, [
|
|
3361
|
-
|
|
3362
|
-
}, [
|
|
3363
|
-
multiple:
|
|
3364
|
-
option:
|
|
3365
|
-
options:
|
|
3366
|
-
value:
|
|
3367
|
-
values:
|
|
3368
|
-
}) :
|
|
3368
|
+
let lt = y((e) => {
|
|
3369
|
+
Ce.current = e, et(e);
|
|
3370
|
+
}, [et]), ut = y((e) => {
|
|
3371
|
+
we.current = e, tt(e);
|
|
3372
|
+
}, [tt]), dt = w(() => G ? G({
|
|
3373
|
+
multiple: l,
|
|
3374
|
+
option: Ye,
|
|
3375
|
+
options: Xe,
|
|
3376
|
+
value: Qe,
|
|
3377
|
+
values: Y
|
|
3378
|
+
}) : l && Xe.length ? Xe.map((e) => e.label).join(", ") : Ye?.label ?? h, [
|
|
3379
|
+
l,
|
|
3369
3380
|
h,
|
|
3370
|
-
|
|
3371
|
-
oe,
|
|
3372
|
-
Je,
|
|
3381
|
+
G,
|
|
3373
3382
|
Ye,
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3383
|
+
Xe,
|
|
3384
|
+
Y,
|
|
3385
|
+
Qe
|
|
3386
|
+
]), ft = g ?? "No options available", pt = j && Y.length > 0 && !be && !A, mt = w(() => ({
|
|
3387
|
+
...$e,
|
|
3388
|
+
zIndex: ct.zIndex
|
|
3389
|
+
}), [ct.zIndex, $e]), ht = w(() => ({
|
|
3390
|
+
id: J,
|
|
3391
|
+
describedBy: Se || void 0,
|
|
3382
3392
|
labelledBy: o ? void 0 : c,
|
|
3383
|
-
isOpen:
|
|
3384
|
-
disabled:
|
|
3385
|
-
required:
|
|
3386
|
-
listboxId:
|
|
3387
|
-
activeIndex:
|
|
3388
|
-
ariaLabel: o ?? (!n && !
|
|
3389
|
-
error:
|
|
3390
|
-
loading:
|
|
3391
|
-
displayText:
|
|
3392
|
-
isPlaceholder: !
|
|
3393
|
-
size:
|
|
3394
|
-
color:
|
|
3395
|
-
variant:
|
|
3396
|
-
startIcon:
|
|
3397
|
-
endIcon:
|
|
3398
|
-
prefix:
|
|
3399
|
-
suffix:
|
|
3400
|
-
clearable:
|
|
3401
|
-
className:
|
|
3402
|
-
buttonRef:
|
|
3403
|
-
onClear:
|
|
3404
|
-
onClick:
|
|
3405
|
-
onKeyDown:
|
|
3406
|
-
onBlur:
|
|
3407
|
-
onFocus:
|
|
3393
|
+
isOpen: ze,
|
|
3394
|
+
disabled: be,
|
|
3395
|
+
required: xe,
|
|
3396
|
+
listboxId: fe,
|
|
3397
|
+
activeIndex: Ue,
|
|
3398
|
+
ariaLabel: o ?? (!n && !ue?.labelId ? Ye?.label || h : void 0),
|
|
3399
|
+
error: ye,
|
|
3400
|
+
loading: A,
|
|
3401
|
+
displayText: dt,
|
|
3402
|
+
isPlaceholder: !Ze,
|
|
3403
|
+
size: ve,
|
|
3404
|
+
color: b,
|
|
3405
|
+
variant: C,
|
|
3406
|
+
startIcon: re,
|
|
3407
|
+
endIcon: U,
|
|
3408
|
+
prefix: ie,
|
|
3409
|
+
suffix: W,
|
|
3410
|
+
clearable: pt,
|
|
3411
|
+
className: ce,
|
|
3412
|
+
buttonRef: lt,
|
|
3413
|
+
onClear: it,
|
|
3414
|
+
onClick: at,
|
|
3415
|
+
onKeyDown: X,
|
|
3416
|
+
onBlur: ae,
|
|
3417
|
+
onFocus: oe
|
|
3408
3418
|
}), [
|
|
3409
|
-
|
|
3419
|
+
Ue,
|
|
3410
3420
|
o,
|
|
3411
3421
|
c,
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
rt,
|
|
3422
|
+
b,
|
|
3423
|
+
Se,
|
|
3424
|
+
U,
|
|
3425
|
+
ue?.labelId,
|
|
3417
3426
|
it,
|
|
3418
3427
|
at,
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3428
|
+
X,
|
|
3429
|
+
Ze,
|
|
3430
|
+
be,
|
|
3431
|
+
ye,
|
|
3432
|
+
ze,
|
|
3433
|
+
xe,
|
|
3424
3434
|
n,
|
|
3425
|
-
|
|
3426
|
-
|
|
3435
|
+
fe,
|
|
3436
|
+
A,
|
|
3437
|
+
ae,
|
|
3438
|
+
oe,
|
|
3439
|
+
h,
|
|
3440
|
+
ie,
|
|
3441
|
+
ve,
|
|
3442
|
+
dt,
|
|
3443
|
+
Ye?.label,
|
|
3444
|
+
lt,
|
|
3445
|
+
pt,
|
|
3446
|
+
re,
|
|
3447
|
+
W,
|
|
3427
3448
|
ce,
|
|
3449
|
+
J,
|
|
3450
|
+
C
|
|
3451
|
+
]), gt = w(() => ({
|
|
3452
|
+
isOpen: ze,
|
|
3453
|
+
listboxId: fe,
|
|
3454
|
+
labelledById: J,
|
|
3455
|
+
style: mt,
|
|
3456
|
+
options: je,
|
|
3457
|
+
entries: De || pe ? void 0 : Oe,
|
|
3458
|
+
multiple: l,
|
|
3459
|
+
color: b,
|
|
3460
|
+
variant: C,
|
|
3461
|
+
searchable: De,
|
|
3462
|
+
command: F,
|
|
3463
|
+
virtual: N,
|
|
3464
|
+
portal: B,
|
|
3465
|
+
searchValue: pe,
|
|
3466
|
+
loading: A,
|
|
3467
|
+
loadingText: _,
|
|
3468
|
+
emptyText: ft,
|
|
3469
|
+
renderOption: K,
|
|
3470
|
+
selectedValue: Qe,
|
|
3471
|
+
selectedValues: Y,
|
|
3472
|
+
activeIndex: Ue,
|
|
3473
|
+
visualActiveIndex: Te ? Ue : -1,
|
|
3474
|
+
className: q,
|
|
3475
|
+
setDropdownRef: ut,
|
|
3476
|
+
onSelect: nt,
|
|
3477
|
+
onSelectGroup: rt,
|
|
3478
|
+
onMouseEnter: ot,
|
|
3479
|
+
onSearchChange: st
|
|
3480
|
+
}), [
|
|
3481
|
+
Ue,
|
|
3482
|
+
b,
|
|
3483
|
+
F,
|
|
3484
|
+
mt,
|
|
3428
3485
|
q,
|
|
3429
|
-
v,
|
|
3430
|
-
K,
|
|
3431
|
-
xe,
|
|
3432
|
-
ut,
|
|
3433
|
-
Je?.label,
|
|
3434
|
-
ct,
|
|
3435
3486
|
ft,
|
|
3436
|
-
|
|
3437
|
-
ae,
|
|
3438
|
-
ue,
|
|
3439
|
-
me,
|
|
3440
|
-
k
|
|
3441
|
-
]), ht = w(() => ({
|
|
3442
|
-
isOpen: Y,
|
|
3443
|
-
listboxId: he,
|
|
3444
|
-
labelledById: me,
|
|
3445
|
-
style: pt,
|
|
3446
|
-
options: Pe,
|
|
3447
|
-
entries: je || ge ? void 0 : Me,
|
|
3448
|
-
multiple: h,
|
|
3449
|
-
color: O,
|
|
3450
|
-
variant: k,
|
|
3451
|
-
searchable: je,
|
|
3452
|
-
command: R,
|
|
3453
|
-
virtual: I,
|
|
3454
|
-
portal: H,
|
|
3455
|
-
searchValue: ge,
|
|
3456
|
-
loading: N,
|
|
3457
|
-
loadingText: C,
|
|
3458
|
-
emptyText: dt,
|
|
3459
|
-
renderOption: se,
|
|
3460
|
-
selectedValue: Ze,
|
|
3461
|
-
selectedValues: Le,
|
|
3462
|
-
activeIndex: Ve,
|
|
3463
|
-
visualActiveIndex: Oe ? Ve : -1,
|
|
3464
|
-
className: de,
|
|
3465
|
-
setDropdownRef: lt,
|
|
3466
|
-
onSelect: tt,
|
|
3467
|
-
onSelectGroup: nt,
|
|
3468
|
-
onMouseEnter: X,
|
|
3469
|
-
onSearchChange: ot
|
|
3470
|
-
}), [
|
|
3471
|
-
Ve,
|
|
3472
|
-
O,
|
|
3473
|
-
R,
|
|
3474
|
-
pt,
|
|
3475
|
-
de,
|
|
3476
|
-
dt,
|
|
3477
|
-
Pe,
|
|
3478
|
-
X,
|
|
3487
|
+
je,
|
|
3479
3488
|
ot,
|
|
3480
|
-
|
|
3489
|
+
st,
|
|
3481
3490
|
nt,
|
|
3491
|
+
rt,
|
|
3492
|
+
Te,
|
|
3493
|
+
ze,
|
|
3494
|
+
De,
|
|
3495
|
+
fe,
|
|
3496
|
+
A,
|
|
3497
|
+
_,
|
|
3498
|
+
l,
|
|
3499
|
+
B,
|
|
3500
|
+
K,
|
|
3482
3501
|
Oe,
|
|
3502
|
+
pe,
|
|
3483
3503
|
Y,
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3504
|
+
ut,
|
|
3505
|
+
Qe,
|
|
3506
|
+
J,
|
|
3487
3507
|
C,
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
Le,
|
|
3494
|
-
lt,
|
|
3495
|
-
Ze,
|
|
3496
|
-
me,
|
|
3497
|
-
k,
|
|
3498
|
-
I
|
|
3499
|
-
]), gt = w(() => ({
|
|
3500
|
-
triggerProps: mt,
|
|
3501
|
-
contentProps: ht
|
|
3502
|
-
}), [ht, mt]), _t = w(() => /* @__PURE__ */ f(u, { children: [a && h && Le.length > 0 && /* @__PURE__ */ d(u, { children: Le.map((e) => /* @__PURE__ */ d("input", {
|
|
3508
|
+
N
|
|
3509
|
+
]), _t = w(() => ({
|
|
3510
|
+
triggerProps: ht,
|
|
3511
|
+
contentProps: gt
|
|
3512
|
+
}), [gt, ht]), vt = w(() => /* @__PURE__ */ f(u, { children: [a && l && Y.length > 0 && /* @__PURE__ */ d(u, { children: Y.map((e) => /* @__PURE__ */ d("input", {
|
|
3503
3513
|
type: "hidden",
|
|
3504
3514
|
name: a,
|
|
3505
3515
|
value: e,
|
|
3506
|
-
disabled:
|
|
3507
|
-
}, e)) }), a && !
|
|
3516
|
+
disabled: be
|
|
3517
|
+
}, e)) }), a && !l && /* @__PURE__ */ d("input", {
|
|
3508
3518
|
type: "hidden",
|
|
3509
3519
|
name: a,
|
|
3510
|
-
value:
|
|
3511
|
-
disabled:
|
|
3520
|
+
value: Qe,
|
|
3521
|
+
disabled: be
|
|
3512
3522
|
})] }), [
|
|
3513
|
-
|
|
3514
|
-
|
|
3523
|
+
be,
|
|
3524
|
+
l,
|
|
3515
3525
|
a,
|
|
3516
|
-
|
|
3517
|
-
|
|
3526
|
+
Y,
|
|
3527
|
+
Qe
|
|
3518
3528
|
]);
|
|
3519
3529
|
return {
|
|
3520
3530
|
children: t,
|
|
3521
|
-
className:
|
|
3522
|
-
contentProps:
|
|
3523
|
-
contextValue:
|
|
3531
|
+
className: se,
|
|
3532
|
+
contentProps: gt,
|
|
3533
|
+
contextValue: _t,
|
|
3524
3534
|
description: r,
|
|
3525
|
-
error:
|
|
3535
|
+
error: I,
|
|
3526
3536
|
hasCompoundLayout: w(() => Fr(t), [t]),
|
|
3527
|
-
hasExternalField: !
|
|
3528
|
-
hiddenInputs:
|
|
3529
|
-
isDisabled:
|
|
3530
|
-
isRequired:
|
|
3537
|
+
hasExternalField: !de && !!ue,
|
|
3538
|
+
hiddenInputs: vt,
|
|
3539
|
+
isDisabled: be,
|
|
3540
|
+
isRequired: xe,
|
|
3531
3541
|
label: n,
|
|
3532
|
-
resolvedSize:
|
|
3533
|
-
triggerId:
|
|
3534
|
-
triggerProps:
|
|
3542
|
+
resolvedSize: ve,
|
|
3543
|
+
triggerId: J,
|
|
3544
|
+
triggerProps: ht
|
|
3535
3545
|
};
|
|
3536
3546
|
}
|
|
3537
3547
|
function Hr(e, t) {
|
|
@@ -4300,55 +4310,55 @@ function Di({ open: e, onOpenChange: t, placement: n, offset: r, avoidCollisions
|
|
|
4300
4310
|
}
|
|
4301
4311
|
//#endregion
|
|
4302
4312
|
//#region src/components/Tooltip/Root/TooltipRoot.tsx
|
|
4303
|
-
var Oi = ({ children: e, open: t, defaultOpen: n = !1, onOpenChange: r, placement: i = "top", offset: a = 8, delay: o, skipDelay: s, disabled: c = !1, interactive: l = !1, avoidCollisions: u = !0, matchTriggerWidth: f = !1
|
|
4304
|
-
let
|
|
4313
|
+
var Oi = ({ children: e, open: t, defaultOpen: n = !1, onOpenChange: r, placement: i = "top", offset: a = 8, delay: o, skipDelay: s, disabled: c = !1, interactive: l = !1, avoidCollisions: u = !0, matchTriggerWidth: f = !1 }) => {
|
|
4314
|
+
let p = `${S()}-content`, m = T(null), h = T(null), [g, _] = Y({
|
|
4305
4315
|
value: t,
|
|
4306
4316
|
defaultValue: n,
|
|
4307
4317
|
onChange: r
|
|
4308
|
-
}),
|
|
4309
|
-
c ||
|
|
4310
|
-
},
|
|
4311
|
-
open:
|
|
4312
|
-
onOpenChange:
|
|
4318
|
+
}), v = (e) => {
|
|
4319
|
+
c || _(e);
|
|
4320
|
+
}, y = Di({
|
|
4321
|
+
open: g,
|
|
4322
|
+
onOpenChange: v,
|
|
4313
4323
|
placement: i,
|
|
4314
4324
|
offset: a,
|
|
4315
4325
|
avoidCollisions: u,
|
|
4316
4326
|
matchTriggerWidth: f
|
|
4317
|
-
}),
|
|
4318
|
-
context:
|
|
4319
|
-
delay:
|
|
4327
|
+
}), b = Ti(o, s), x = Ei({
|
|
4328
|
+
context: y.context,
|
|
4329
|
+
delay: b,
|
|
4320
4330
|
disabled: c,
|
|
4321
4331
|
interactive: l
|
|
4322
|
-
}),
|
|
4323
|
-
active:
|
|
4324
|
-
id:
|
|
4332
|
+
}), C = Ae({
|
|
4333
|
+
active: g,
|
|
4334
|
+
id: p,
|
|
4325
4335
|
zIndexLevel: "tooltip",
|
|
4326
|
-
contentRef:
|
|
4327
|
-
ignoreRefs: [
|
|
4336
|
+
contentRef: m,
|
|
4337
|
+
ignoreRefs: [h],
|
|
4328
4338
|
closeOnEscape: !0,
|
|
4329
4339
|
closeOnOutsidePress: !l,
|
|
4330
|
-
requestClose: () =>
|
|
4340
|
+
requestClose: () => v(!1)
|
|
4331
4341
|
});
|
|
4332
4342
|
return /* @__PURE__ */ d(vi, {
|
|
4333
4343
|
value: {
|
|
4334
|
-
contentId:
|
|
4335
|
-
open:
|
|
4344
|
+
contentId: p,
|
|
4345
|
+
open: g,
|
|
4336
4346
|
disabled: c,
|
|
4337
4347
|
interactive: l,
|
|
4338
|
-
contentRef:
|
|
4339
|
-
arrowRef:
|
|
4340
|
-
arrowX:
|
|
4341
|
-
arrowY:
|
|
4342
|
-
placement:
|
|
4348
|
+
contentRef: m,
|
|
4349
|
+
arrowRef: y.arrowRef,
|
|
4350
|
+
arrowX: y.arrowX,
|
|
4351
|
+
arrowY: y.arrowY,
|
|
4352
|
+
placement: y.placement,
|
|
4343
4353
|
floatingStyles: {
|
|
4344
|
-
...
|
|
4345
|
-
zIndex:
|
|
4354
|
+
...y.floatingStyles,
|
|
4355
|
+
zIndex: C.zIndex
|
|
4346
4356
|
},
|
|
4347
|
-
setOpen:
|
|
4348
|
-
setTriggerRef: hi(
|
|
4349
|
-
setContentRef: hi(
|
|
4350
|
-
getTriggerProps:
|
|
4351
|
-
getContentProps:
|
|
4357
|
+
setOpen: v,
|
|
4358
|
+
setTriggerRef: hi(h, y.setRef),
|
|
4359
|
+
setContentRef: hi(m, y.setFloatingRef),
|
|
4360
|
+
getTriggerProps: x.getReferenceProps,
|
|
4361
|
+
getContentProps: x.getFloatingProps
|
|
4352
4362
|
},
|
|
4353
4363
|
children: e
|
|
4354
4364
|
});
|
|
@@ -4738,14 +4748,14 @@ var $ = {
|
|
|
4738
4748
|
}
|
|
4739
4749
|
return i;
|
|
4740
4750
|
}, Vi = (e, t) => t ? typeof t == "function" ? t(e) : Bi(e, t) : e, Hi = _(({ id: e, label: t, name: n, description: r, placeholder: i, value: a, defaultValue: o, type: s = "text", size: c, color: l = "primary", variant: p = "outline", error: m, invalid: h = !1, disabled: g = !1, required: _ = !1, loading: v = !1, className: b, style: x, wrapperClassName: C, autoComplete: w, 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: z, mask: ee, format: V, parse: H, startIconTone: te = "default", endIconTone: ne = "default", clearIconTone: ie = "danger", autoFocus: W, maxLength: G, onMouseEnter: K, onMouseLeave: ae, "aria-describedby": oe, "aria-invalid": se, "aria-labelledby": ce, ...q }, le) => {
|
|
4741
|
-
let ue = S(), de = xr(),
|
|
4751
|
+
let ue = S(), de = xr(), J = !!(t || r || m), fe = e ?? (J ? void 0 : de?.controlId) ?? ue, pe = T(null), [me, he] = E(!1), [ge, _e] = E(o ?? ""), ve = a !== void 0, ye = String((ve ? a : ge) ?? ""), be = V ? V(ye) : ye, xe = ye.length > 0, Se = c ?? de?.size ?? "md", Ce = B[Se], we = {
|
|
4742
4752
|
"--input-height": `${Ce.height}px`,
|
|
4743
4753
|
"--input-font-size": `${Ce.fontSize}px`,
|
|
4744
4754
|
"--input-line-height": `${Ce.lineHeight}px`,
|
|
4745
4755
|
"--input-icon-size": `${Ce.iconSize}px`
|
|
4746
|
-
}, Te = h || !!m || !
|
|
4756
|
+
}, Te = h || !!m || !J && !!de?.invalid, Ee = g || !J && !!de?.disabled, De = _ || !J && !!de?.required, Oe = D || v, ke = s === "password", Ae = ke && j && me ? "text" : s, je = N ?? (s === "search" ? /* @__PURE__ */ d(re, {}) : null), Me = P, Ne = zi(s, w), Pe = v && !Ee, Fe = O && xe && !Ee && !Oe && !Pe, Ie = j && ke && !Ee && !Pe && !Fe, Le = !Pe && !Fe && !Ie && !!Me, Re = !!(M && G), Y = r ? `${fe}-description` : void 0, ze = m ? `${fe}-error` : void 0, Be = Re ? `${fe}-counter` : void 0, Ve = [
|
|
4747
4757
|
oe,
|
|
4748
|
-
!
|
|
4758
|
+
!J && !oe ? de?.ariaDescribedBy : void 0,
|
|
4749
4759
|
Y,
|
|
4750
4760
|
ze,
|
|
4751
4761
|
Be
|
|
@@ -4801,7 +4811,7 @@ var $ = {
|
|
|
4801
4811
|
/* @__PURE__ */ d("input", {
|
|
4802
4812
|
...q,
|
|
4803
4813
|
ref: Je,
|
|
4804
|
-
id:
|
|
4814
|
+
id: fe,
|
|
4805
4815
|
name: n,
|
|
4806
4816
|
type: Ae,
|
|
4807
4817
|
autoComplete: Ne,
|
|
@@ -4819,7 +4829,7 @@ var $ = {
|
|
|
4819
4829
|
autoFocus: W,
|
|
4820
4830
|
maxLength: G,
|
|
4821
4831
|
"aria-invalid": Te ? !0 : se,
|
|
4822
|
-
"aria-labelledby": ce ?? (
|
|
4832
|
+
"aria-labelledby": ce ?? (J ? void 0 : de?.ariaLabelledBy),
|
|
4823
4833
|
"aria-describedby": Ve || void 0,
|
|
4824
4834
|
"aria-busy": v || void 0,
|
|
4825
4835
|
onMouseEnter: K,
|
|
@@ -4874,8 +4884,8 @@ var $ = {
|
|
|
4874
4884
|
G
|
|
4875
4885
|
]
|
|
4876
4886
|
})] });
|
|
4877
|
-
return !
|
|
4878
|
-
id:
|
|
4887
|
+
return !J && de ? Ze : /* @__PURE__ */ d(jr, {
|
|
4888
|
+
id: fe,
|
|
4879
4889
|
label: t,
|
|
4880
4890
|
description: r,
|
|
4881
4891
|
error: m,
|