@leabankab/component-library 8.2.0 → 8.3.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/CHANGELOG.md +6 -0
- package/dist/component-library.es.js +108 -95
- package/dist/component-library.es.js.map +1 -1
- package/dist/component-library.umd.js +2 -2
- package/dist/component-library.umd.js.map +1 -1
- package/dist/components/form/input.d.ts +11 -3
- package/dist/index.css +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 8.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- fa6fad5: `Input` takes `labelPlacement` and `tooltip`, as `NumberInput` does: `labelPlacement="outside"` puts the label above the field, where it can carry help text behind an info button. With the label outside, a start icon in `Input` or `NumberInput` is now centred on the value.
|
|
8
|
+
|
|
3
9
|
## 8.2.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { AnimatePresence as e, animate as t, motion as n, useMotionValue as r, useReducedMotion as i } from "motion/react";
|
|
3
3
|
import { Children as a, Fragment as o, createContext as s, isValidElement as c, useCallback as l, useContext as u, useEffect as d, useId as f, useLayoutEffect as p, useMemo as m, useRef as h, useState as g } from "react";
|
|
4
|
-
import { ArrowLeft as _, ArrowRight as v, Check as y, ChevronDown as b, CircleAlert as x, CircleCheck as S, CircleX as C, Info as w, InfoIcon as T, Minus as E, Plus as
|
|
4
|
+
import { ArrowLeft as _, ArrowRight as v, Check as y, ChevronDown as b, CircleAlert as x, CircleCheck as S, CircleX as C, Info as w, InfoIcon as T, Minus as E, Plus as ee, Search as D, TriangleAlert as O, X as k } from "lucide-react";
|
|
5
5
|
import { Fragment as A, jsx as j, jsxs as M } from "react/jsx-runtime";
|
|
6
6
|
import { Button as te } from "@base-ui/react/button";
|
|
7
7
|
import { useRender as N } from "@base-ui/react/use-render";
|
|
@@ -1018,7 +1018,7 @@ var kt = {
|
|
|
1018
1018
|
size: "1em",
|
|
1019
1019
|
"aria-hidden": !0
|
|
1020
1020
|
}),
|
|
1021
|
-
warning: /* @__PURE__ */ j(
|
|
1021
|
+
warning: /* @__PURE__ */ j(O, {
|
|
1022
1022
|
size: "1em",
|
|
1023
1023
|
"aria-hidden": !0
|
|
1024
1024
|
}),
|
|
@@ -1506,12 +1506,12 @@ function An({ id: e, htmlFor: t, tooltip: n, required: r, error: i, disabled: a,
|
|
|
1506
1506
|
});
|
|
1507
1507
|
}
|
|
1508
1508
|
var J = {
|
|
1509
|
-
Field: "
|
|
1510
|
-
Box: "
|
|
1511
|
-
Inner: "
|
|
1512
|
-
Adornment: "
|
|
1513
|
-
Control: "
|
|
1514
|
-
Label: "
|
|
1509
|
+
Field: "_Field_fj1it_11",
|
|
1510
|
+
Box: "_Box_fj1it_19",
|
|
1511
|
+
Inner: "_Inner_fj1it_87",
|
|
1512
|
+
Adornment: "_Adornment_fj1it_96",
|
|
1513
|
+
Control: "_Control_fj1it_100",
|
|
1514
|
+
Label: "_Label_fj1it_152"
|
|
1515
1515
|
}, Y = {
|
|
1516
1516
|
Positioner: "_Positioner_1lvwd_12",
|
|
1517
1517
|
Popup: "_Popup_1lvwd_17",
|
|
@@ -1564,8 +1564,8 @@ function Mn(e, t) {
|
|
|
1564
1564
|
//#endregion
|
|
1565
1565
|
//#region src/components/form/combo-field.tsx
|
|
1566
1566
|
var Nn = (...e) => e.filter(Boolean).join(" ") || void 0;
|
|
1567
|
-
function Pn({ label: e, helperText: t, error: n = !1, warning: r, required: i = !1, disabled: a = !1, placeholder: o, onBlur: s, id: c, "aria-label": l, "aria-labelledby": u, "aria-describedby": d, className: p, style: m, ref: _, renderRoot: v, inputProps: y, chips: x, filled: S = !1, clearable: C = !1, trigger: w = !1, selectTextOnClick: T = !1, children: E, afterHelperText:
|
|
1568
|
-
let
|
|
1567
|
+
function Pn({ label: e, helperText: t, error: n = !1, warning: r, required: i = !1, disabled: a = !1, placeholder: o, onBlur: s, id: c, "aria-label": l, "aria-labelledby": u, "aria-describedby": d, className: p, style: m, ref: _, renderRoot: v, inputProps: y, chips: x, filled: S = !1, clearable: C = !1, trigger: w = !1, selectTextOnClick: T = !1, children: E, afterHelperText: ee }) {
|
|
1568
|
+
let D = jn(), O = f(), te = c ?? O, N = f(), P = f(), F = e != null, I = kn(t, r, n), L = I.content != null, ne = x !== void 0, R = h(null), z = h(null), re = Mn(s, [R, z]), [ie, ae] = g(!1), V = h(!1), oe = /* @__PURE__ */ j(B.Input, {
|
|
1569
1569
|
...y,
|
|
1570
1570
|
ref: _,
|
|
1571
1571
|
id: te,
|
|
@@ -1616,7 +1616,7 @@ function Pn({ label: e, helperText: t, error: n = !1, warning: r, required: i =
|
|
|
1616
1616
|
className: q.Buttons,
|
|
1617
1617
|
children: [C && /* @__PURE__ */ j(B.Clear, {
|
|
1618
1618
|
className: Nn(q.Button, q.Clear),
|
|
1619
|
-
"aria-label":
|
|
1619
|
+
"aria-label": D.clear,
|
|
1620
1620
|
tabIndex: -1,
|
|
1621
1621
|
children: /* @__PURE__ */ j(k, { "aria-hidden": !0 })
|
|
1622
1622
|
}), w && /* @__PURE__ */ j(B.Trigger, {
|
|
@@ -1627,7 +1627,7 @@ function Pn({ label: e, helperText: t, error: n = !1, warning: r, required: i =
|
|
|
1627
1627
|
role: void 0,
|
|
1628
1628
|
"aria-haspopup": "listbox",
|
|
1629
1629
|
"aria-required": void 0,
|
|
1630
|
-
"aria-label": t.open ?
|
|
1630
|
+
"aria-label": t.open ? D.close : D.open
|
|
1631
1631
|
}),
|
|
1632
1632
|
children: /* @__PURE__ */ j(b, { "aria-hidden": !0 })
|
|
1633
1633
|
})]
|
|
@@ -1653,7 +1653,7 @@ function Pn({ label: e, helperText: t, error: n = !1, warning: r, required: i =
|
|
|
1653
1653
|
warning: I.warning,
|
|
1654
1654
|
children: I.content
|
|
1655
1655
|
}),
|
|
1656
|
-
|
|
1656
|
+
ee
|
|
1657
1657
|
]
|
|
1658
1658
|
});
|
|
1659
1659
|
}
|
|
@@ -2233,7 +2233,7 @@ function ei({ value: e, defaultValue: t = "", onValueChange: n, domains: r = Pr,
|
|
|
2233
2233
|
f || _(e), S(void 0), n?.(e);
|
|
2234
2234
|
}, T = () => {
|
|
2235
2235
|
x != null && (w(x), y.current?.focus());
|
|
2236
|
-
}, [E,
|
|
2236
|
+
}, [E, ee] = g(!1), D = m(() => Lr(v, r).slice(0, i), [
|
|
2237
2237
|
v,
|
|
2238
2238
|
r,
|
|
2239
2239
|
i
|
|
@@ -2269,10 +2269,10 @@ function ei({ value: e, defaultValue: t = "", onValueChange: n, domains: r = Pr,
|
|
|
2269
2269
|
spellCheck: !1
|
|
2270
2270
|
},
|
|
2271
2271
|
renderRoot: (e) => /* @__PURE__ */ j(ie.Root, {
|
|
2272
|
-
items:
|
|
2272
|
+
items: D,
|
|
2273
2273
|
filter: null,
|
|
2274
|
-
open: E &&
|
|
2275
|
-
onOpenChange:
|
|
2274
|
+
open: E && D.length > 0,
|
|
2275
|
+
onOpenChange: ee,
|
|
2276
2276
|
value: v,
|
|
2277
2277
|
onValueChange: w,
|
|
2278
2278
|
disabled: u.disabled,
|
|
@@ -2327,62 +2327,75 @@ function ii(e, t) {
|
|
|
2327
2327
|
};
|
|
2328
2328
|
}, [e, t]), n;
|
|
2329
2329
|
}
|
|
2330
|
-
function ai({ label: e,
|
|
2331
|
-
let
|
|
2332
|
-
if (
|
|
2333
|
-
|
|
2330
|
+
function ai({ label: e, labelPlacement: t = "inside", tooltip: n, helperText: r, error: i = !1, warning: a, value: o, defaultValue: s, onValueChange: c, startAdornment: l, endAdornment: u, multiline: d = !1, rows: p, minRows: m, maxRows: h, className: g, style: _, ref: v, id: y, disabled: b = !1, required: x = !1, placeholder: S, "aria-describedby": C, ...w }) {
|
|
2331
|
+
let T = f(), E = y ?? T, ee = f(), D = f(), O = e != null, k = O && t === "outside", A = kn(r, a, i), te = A.content != null, N = ii(d && p == null, h), P = (e) => {
|
|
2332
|
+
if (N.current = e, typeof v == "function") return v(e);
|
|
2333
|
+
v && (v.current = e);
|
|
2334
2334
|
};
|
|
2335
2335
|
return /* @__PURE__ */ M("div", {
|
|
2336
|
-
className: ni(J.Field,
|
|
2337
|
-
style:
|
|
2338
|
-
children: [
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2336
|
+
className: ni(J.Field, g),
|
|
2337
|
+
style: _,
|
|
2338
|
+
children: [
|
|
2339
|
+
k && /* @__PURE__ */ j(An, {
|
|
2340
|
+
id: ee,
|
|
2341
|
+
htmlFor: E,
|
|
2342
|
+
tooltip: n,
|
|
2343
|
+
required: x,
|
|
2344
|
+
error: i,
|
|
2345
|
+
disabled: b,
|
|
2346
|
+
children: e
|
|
2347
|
+
}),
|
|
2348
|
+
/* @__PURE__ */ M("div", {
|
|
2349
|
+
className: J.Box,
|
|
2350
|
+
"data-invalid": i ? "" : void 0,
|
|
2351
|
+
"data-disabled": b ? "" : void 0,
|
|
2352
|
+
"data-has-label": O && !k ? "" : void 0,
|
|
2353
|
+
"data-label-outside": k ? "" : void 0,
|
|
2354
|
+
onClick: (e) => {
|
|
2355
|
+
e.target.closest("button, a, input, textarea, select, [tabindex]") || e.currentTarget.querySelector("input, textarea")?.focus();
|
|
2356
|
+
},
|
|
2357
|
+
children: [
|
|
2358
|
+
l != null && /* @__PURE__ */ j("span", {
|
|
2359
|
+
className: J.Adornment,
|
|
2360
|
+
"data-position": "start",
|
|
2361
|
+
children: l
|
|
2362
|
+
}),
|
|
2363
|
+
/* @__PURE__ */ M("div", {
|
|
2364
|
+
className: J.Inner,
|
|
2365
|
+
children: [O && !k && /* @__PURE__ */ M("label", {
|
|
2366
|
+
htmlFor: E,
|
|
2367
|
+
className: J.Label,
|
|
2368
|
+
children: [e, x && /* @__PURE__ */ j(Dn, {})]
|
|
2369
|
+
}), /* @__PURE__ */ j(ce, {
|
|
2370
|
+
...w,
|
|
2371
|
+
ref: P,
|
|
2372
|
+
id: E,
|
|
2373
|
+
value: o,
|
|
2374
|
+
defaultValue: s,
|
|
2375
|
+
onValueChange: (e) => c?.(e),
|
|
2376
|
+
disabled: b,
|
|
2377
|
+
required: x,
|
|
2378
|
+
placeholder: S || " ",
|
|
2379
|
+
"aria-invalid": i,
|
|
2380
|
+
"aria-describedby": ni(te && D, C),
|
|
2381
|
+
className: J.Control,
|
|
2382
|
+
render: d ? /* @__PURE__ */ j("textarea", { rows: p ?? m ?? 1 }) : void 0
|
|
2383
|
+
})]
|
|
2384
|
+
}),
|
|
2385
|
+
u != null && /* @__PURE__ */ j("span", {
|
|
2386
|
+
className: J.Adornment,
|
|
2387
|
+
"data-position": "end",
|
|
2388
|
+
children: u
|
|
2389
|
+
})
|
|
2390
|
+
]
|
|
2391
|
+
}),
|
|
2392
|
+
te && /* @__PURE__ */ j(On, {
|
|
2393
|
+
id: D,
|
|
2394
|
+
error: i,
|
|
2395
|
+
warning: A.warning,
|
|
2396
|
+
children: A.content
|
|
2397
|
+
})
|
|
2398
|
+
]
|
|
2386
2399
|
});
|
|
2387
2400
|
}
|
|
2388
2401
|
var Q = {
|
|
@@ -2405,7 +2418,7 @@ function si({ side: e, onSideChange: t, ...n }) {
|
|
|
2405
2418
|
t(e === "top" ? "top" : "bottom");
|
|
2406
2419
|
}, [e, t]), /* @__PURE__ */ j("div", { ...n });
|
|
2407
2420
|
}
|
|
2408
|
-
function ci({ label: e, helperText: t, error: n = !1, required: r = !1, disabled: i = !1, placeholder: a, startAdornment: o, endAdornment: s, open: c, onOpenChange: l, onBlur: u, name: d, id: p, "aria-label": m, "aria-labelledby": _, "aria-describedby": v, className: y, style: x, ref: S, multiple: C, value: w, onValueChange: T, filled: E, display:
|
|
2421
|
+
function ci({ label: e, helperText: t, error: n = !1, required: r = !1, disabled: i = !1, placeholder: a, startAdornment: o, endAdornment: s, open: c, onOpenChange: l, onBlur: u, name: d, id: p, "aria-label": m, "aria-labelledby": _, "aria-describedby": v, className: y, style: x, ref: S, multiple: C, value: w, onValueChange: T, filled: E, display: ee, displayHidden: D = !1, valueText: O, children: k }) {
|
|
2409
2422
|
let A = f(), te = p ?? A, N = f(), P = f(), F = e != null, I = t != null, [L, ne] = g(!1), R = c ?? L, [z, B] = g("bottom"), re = h(null), ie = h(null), ae = Mn(u, [re, ie]);
|
|
2410
2423
|
return /* @__PURE__ */ M("div", {
|
|
2411
2424
|
className: oi(J.Field, Q.Field, y),
|
|
@@ -2447,7 +2460,7 @@ function ci({ label: e, helperText: t, error: n = !1, required: r = !1, disabled
|
|
|
2447
2460
|
className: Q.Trigger,
|
|
2448
2461
|
children: /* @__PURE__ */ j("span", {
|
|
2449
2462
|
className: Q.SrOnly,
|
|
2450
|
-
children:
|
|
2463
|
+
children: O
|
|
2451
2464
|
})
|
|
2452
2465
|
}),
|
|
2453
2466
|
o != null && /* @__PURE__ */ j("span", {
|
|
@@ -2463,8 +2476,8 @@ function ci({ label: e, helperText: t, error: n = !1, required: r = !1, disabled
|
|
|
2463
2476
|
children: [e, r && /* @__PURE__ */ j(Dn, {})]
|
|
2464
2477
|
}), /* @__PURE__ */ j("div", {
|
|
2465
2478
|
className: Q.Display,
|
|
2466
|
-
"aria-hidden":
|
|
2467
|
-
children: E ?
|
|
2479
|
+
"aria-hidden": D || void 0,
|
|
2480
|
+
children: E ? ee : a && /* @__PURE__ */ j("span", {
|
|
2468
2481
|
className: Q.Placeholder,
|
|
2469
2482
|
"aria-hidden": !0,
|
|
2470
2483
|
children: a
|
|
@@ -2663,13 +2676,13 @@ function _i(e, t, n) {
|
|
|
2663
2676
|
return new Intl.NumberFormat(r, a).formatToParts(e.type === "years" ? n ?? 0 : 0).find((t) => t.type === (e.type === "years" ? "unit" : "currency"))?.value ?? "";
|
|
2664
2677
|
}
|
|
2665
2678
|
var vi = {
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
Steppers: "
|
|
2669
|
-
Stepper: "
|
|
2679
|
+
Unit: "_Unit_1g5fk_11",
|
|
2680
|
+
Box: "_Box_1g5fk_25",
|
|
2681
|
+
Steppers: "_Steppers_1g5fk_29",
|
|
2682
|
+
Stepper: "_Stepper_1g5fk_29"
|
|
2670
2683
|
}, yi = (...e) => e.filter(Boolean).join(" ") || void 0;
|
|
2671
2684
|
function bi({ label: e, labelPlacement: t = "inside", tooltip: n, helperText: r, error: i = !1, warning: a, required: o = !1, disabled: s = !1, id: c, placeholder: l, startIcon: u, unit: d, showSteppers: p = !0, className: m, style: h, ref: _, value: v, defaultValue: y, onValueChange: b, ...x }) {
|
|
2672
|
-
let S = Te(), [C, w] = g(y ?? null), T = v === void 0 ? C : v,
|
|
2685
|
+
let S = Te(), [C, w] = g(y ?? null), T = v === void 0 ? C : v, D = gi(d) ? _i(d, S, T) : d, O = f(), k = c ?? O, A = f(), te = f(), N = f(), P = xi(), F = e != null, I = F && t === "outside", L = kn(r, a, i), ne = L.content != null, z = yi(ne && te, D != null && D !== "" && N), B = (e) => {
|
|
2673
2686
|
e.target.closest("button, a, input, [tabindex]") || e.currentTarget.querySelector("input")?.focus();
|
|
2674
2687
|
};
|
|
2675
2688
|
return /* @__PURE__ */ M(R.Root, {
|
|
@@ -2722,10 +2735,10 @@ function bi({ label: e, labelPlacement: t = "inside", tooltip: n, helperText: r,
|
|
|
2722
2735
|
className: J.Control
|
|
2723
2736
|
})]
|
|
2724
2737
|
}),
|
|
2725
|
-
|
|
2738
|
+
D != null && D !== "" && /* @__PURE__ */ j("span", {
|
|
2726
2739
|
id: N,
|
|
2727
2740
|
className: vi.Unit,
|
|
2728
|
-
children:
|
|
2741
|
+
children: D
|
|
2729
2742
|
}),
|
|
2730
2743
|
p && /* @__PURE__ */ M("span", {
|
|
2731
2744
|
className: vi.Steppers,
|
|
@@ -2739,7 +2752,7 @@ function bi({ label: e, labelPlacement: t = "inside", tooltip: n, helperText: r,
|
|
|
2739
2752
|
}), /* @__PURE__ */ j(R.Increment, {
|
|
2740
2753
|
"aria-label": P.increase,
|
|
2741
2754
|
className: vi.Stepper,
|
|
2742
|
-
children: /* @__PURE__ */ j(
|
|
2755
|
+
children: /* @__PURE__ */ j(ee, {
|
|
2743
2756
|
size: 16,
|
|
2744
2757
|
"aria-hidden": !0
|
|
2745
2758
|
})
|
|
@@ -2939,7 +2952,7 @@ function Ii({ options: e, value: t, onChange: n, ariaLabel: r, searchLabel: i, n
|
|
|
2939
2952
|
children: [
|
|
2940
2953
|
/* @__PURE__ */ M("div", {
|
|
2941
2954
|
className: $.Search,
|
|
2942
|
-
children: [/* @__PURE__ */ j(
|
|
2955
|
+
children: [/* @__PURE__ */ j(D, { "aria-hidden": !0 }), /* @__PURE__ */ j(B.Input, {
|
|
2943
2956
|
className: $.SearchInput,
|
|
2944
2957
|
placeholder: i,
|
|
2945
2958
|
"aria-label": i
|
|
@@ -2980,7 +2993,7 @@ function Ii({ options: e, value: t, onChange: n, ariaLabel: r, searchLabel: i, n
|
|
|
2980
2993
|
});
|
|
2981
2994
|
}
|
|
2982
2995
|
function Li({ label: e, helperText: t, error: n, required: r = !1, disabled: i = !1, id: a, country: o, defaultCountry: s, onCountryChange: c, value: l, defaultValue: u, onValueChange: d, onBlur: p, countries: _, mobileOnly: v = !1, validateOnBlur: y = !0, className: b, style: x, ref: S, "aria-describedby": C, ...w }) {
|
|
2983
|
-
let T = Te(), E = Mi(),
|
|
2996
|
+
let T = Te(), E = Mi(), ee = f(), D = a ?? ee, O = f(), k = f(), A = h(null), [te, N] = g(!1), P = _ != null && _.length > 0 ? _ : null, F = P?.length === 1, I = P?.join(","), L = m(() => {
|
|
2984
2997
|
let e = wi(Ei[T]), t = I?.split(",");
|
|
2985
2998
|
return t ? e.filter((e) => t.includes(e.code)) : e;
|
|
2986
2999
|
}, [T, I]), ne = s ?? Ti[T], [R, z] = g(P && !P.includes(ne) ? P[0] : ne), B = o ?? R, re = {
|
|
@@ -3058,7 +3071,7 @@ function Li({ label: e, helperText: t, error: n, required: r = !1, disabled: i =
|
|
|
3058
3071
|
}), /* @__PURE__ */ M("div", {
|
|
3059
3072
|
className: Ni(J.Inner, $.Inner),
|
|
3060
3073
|
children: [e != null && /* @__PURE__ */ M("label", {
|
|
3061
|
-
htmlFor:
|
|
3074
|
+
htmlFor: D,
|
|
3062
3075
|
className: Ni(J.Label, $.Label),
|
|
3063
3076
|
children: [e, r && /* @__PURE__ */ j(Dn, {})]
|
|
3064
3077
|
}), /* @__PURE__ */ j("input", {
|
|
@@ -3066,7 +3079,7 @@ function Li({ label: e, helperText: t, error: n, required: r = !1, disabled: i =
|
|
|
3066
3079
|
autoComplete: "tel-national",
|
|
3067
3080
|
...w,
|
|
3068
3081
|
ref: S,
|
|
3069
|
-
id:
|
|
3082
|
+
id: D,
|
|
3070
3083
|
type: "tel",
|
|
3071
3084
|
value: V,
|
|
3072
3085
|
onChange: U,
|
|
@@ -3074,12 +3087,12 @@ function Li({ label: e, helperText: t, error: n, required: r = !1, disabled: i =
|
|
|
3074
3087
|
disabled: i,
|
|
3075
3088
|
required: r,
|
|
3076
3089
|
"aria-invalid": de,
|
|
3077
|
-
"aria-describedby": Ni(ve && k, pe &&
|
|
3090
|
+
"aria-describedby": Ni(ve && k, pe && O, C),
|
|
3078
3091
|
className: J.Control
|
|
3079
3092
|
})]
|
|
3080
3093
|
})]
|
|
3081
3094
|
}), pe && /* @__PURE__ */ j(On, {
|
|
3082
|
-
id:
|
|
3095
|
+
id: O,
|
|
3083
3096
|
error: de,
|
|
3084
3097
|
children: fe
|
|
3085
3098
|
})]
|
|
@@ -3101,7 +3114,7 @@ var Ri = {
|
|
|
3101
3114
|
return t;
|
|
3102
3115
|
}, Gi = (...e) => e.filter(Boolean).join(" ") || void 0;
|
|
3103
3116
|
function Ki({ label: e, tooltip: t, helperText: n, error: r = !1, value: i, defaultValue: a, onValueChange: o, name: s, disabled: c = !1, required: l = !1, onBlur: u, id: d, "aria-label": p, "aria-labelledby": h, "aria-describedby": g, className: _, style: v, ref: y, size: b, cardSize: x, optionsClassName: S, optionsStyle: C, optionsDataColumns: w, children: T }) {
|
|
3104
|
-
let E = f(),
|
|
3117
|
+
let E = f(), ee = f(), D = e != null, O = n != null, k = m(() => ({
|
|
3105
3118
|
size: b,
|
|
3106
3119
|
cardSize: x
|
|
3107
3120
|
}), [b, x]);
|
|
@@ -3109,7 +3122,7 @@ function Ki({ label: e, tooltip: t, helperText: n, error: r = !1, value: i, defa
|
|
|
3109
3122
|
className: Gi(Hi.Group, _),
|
|
3110
3123
|
style: v,
|
|
3111
3124
|
children: [
|
|
3112
|
-
|
|
3125
|
+
D && /* @__PURE__ */ j(An, {
|
|
3113
3126
|
id: E,
|
|
3114
3127
|
tooltip: t,
|
|
3115
3128
|
required: l,
|
|
@@ -3129,8 +3142,8 @@ function Ki({ label: e, tooltip: t, helperText: n, error: r = !1, value: i, defa
|
|
|
3129
3142
|
disabled: c,
|
|
3130
3143
|
required: l,
|
|
3131
3144
|
"aria-label": p,
|
|
3132
|
-
"aria-labelledby":
|
|
3133
|
-
"aria-describedby": Gi(
|
|
3145
|
+
"aria-labelledby": D ? E : h,
|
|
3146
|
+
"aria-describedby": Gi(O && ee, g),
|
|
3134
3147
|
"aria-invalid": r ? !0 : void 0,
|
|
3135
3148
|
onBlur: (e) => {
|
|
3136
3149
|
e.currentTarget.contains(e.relatedTarget) || u?.(e);
|
|
@@ -3141,8 +3154,8 @@ function Ki({ label: e, tooltip: t, helperText: n, error: r = !1, value: i, defa
|
|
|
3141
3154
|
children: T
|
|
3142
3155
|
})
|
|
3143
3156
|
}),
|
|
3144
|
-
|
|
3145
|
-
id:
|
|
3157
|
+
O && /* @__PURE__ */ j(On, {
|
|
3158
|
+
id: ee,
|
|
3146
3159
|
error: r,
|
|
3147
3160
|
children: n
|
|
3148
3161
|
})
|