@babylonlabs-io/core-ui 1.4.0 → 1.4.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.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.es.js +96 -96
- package/dist/index.es.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -13,7 +13,6 @@ export * from './components/Popover';
|
|
|
13
13
|
export * from './components/Card';
|
|
14
14
|
export * from './components/Toggle';
|
|
15
15
|
export * from './components/List';
|
|
16
|
-
export * from './components/ListLegacy';
|
|
17
16
|
export * from './components/Badge';
|
|
18
17
|
export * from './widgets/form/Form';
|
|
19
18
|
export * from './widgets/form/NumberField';
|
|
@@ -23,5 +22,6 @@ export * from './widgets/form/RadioField';
|
|
|
23
22
|
export * from './widgets/form/SelectField';
|
|
24
23
|
export * from './widgets/form/HiddenField';
|
|
25
24
|
export * from './widgets/form/hooks';
|
|
25
|
+
export * from './components/ListLegacy';
|
|
26
26
|
export { ScrollLocker } from './context/Dialog.context';
|
|
27
27
|
export { useFormContext, useFormState, useWatch } from 'react-hook-form';
|
package/dist/index.es.js
CHANGED
|
@@ -5624,45 +5624,7 @@ function qm({ className: r, orientation: u = "horizontal", title: i, value: a, s
|
|
|
5624
5624
|
] })
|
|
5625
5625
|
] });
|
|
5626
5626
|
}
|
|
5627
|
-
|
|
5628
|
-
adaptive: "adaptive",
|
|
5629
|
-
horizontal: "vertical",
|
|
5630
|
-
vertical: "horizontal"
|
|
5631
|
-
};
|
|
5632
|
-
function zm({ className: r, orientation: u = "vertical", children: i }) {
|
|
5633
|
-
return /* @__PURE__ */ P("div", { className: Ji("bbn-list-legacy", `bbn-list-legacy-${u}`, r), children: $i.map(
|
|
5634
|
-
i,
|
|
5635
|
-
(a) => As(a) ? Os(a, {
|
|
5636
|
-
orientation: nm[u]
|
|
5637
|
-
}) : a
|
|
5638
|
-
) });
|
|
5639
|
-
}
|
|
5640
|
-
function Gm({ className: r, orientation: u = "horizontal", title: i, value: a, suffix: f }) {
|
|
5641
|
-
return /* @__PURE__ */ Ne("div", { className: ne("bbn-list-item-legacy", `bbn-list-item-legacy-${u}`, r), children: [
|
|
5642
|
-
/* @__PURE__ */ P(
|
|
5643
|
-
En,
|
|
5644
|
-
{
|
|
5645
|
-
as: "div",
|
|
5646
|
-
className: ne("bbn-list-title-legacy", `bbn-list-title-legacy-${u}`),
|
|
5647
|
-
variant: u === "horizontal" ? "body1" : "body2",
|
|
5648
|
-
children: i
|
|
5649
|
-
}
|
|
5650
|
-
),
|
|
5651
|
-
/* @__PURE__ */ Ne(
|
|
5652
|
-
En,
|
|
5653
|
-
{
|
|
5654
|
-
as: "div",
|
|
5655
|
-
className: ne("bbn-list-value-legacy", `bbn-list-value-legacy-${u}`),
|
|
5656
|
-
variant: "body1",
|
|
5657
|
-
children: [
|
|
5658
|
-
a,
|
|
5659
|
-
f
|
|
5660
|
-
]
|
|
5661
|
-
}
|
|
5662
|
-
)
|
|
5663
|
-
] });
|
|
5664
|
-
}
|
|
5665
|
-
function Zm({
|
|
5627
|
+
function zm({
|
|
5666
5628
|
children: r,
|
|
5667
5629
|
count: u = 0,
|
|
5668
5630
|
max: i = 99,
|
|
@@ -5680,7 +5642,7 @@ function Zm({
|
|
|
5680
5642
|
}
|
|
5681
5643
|
var Zr = (r) => r.type === "checkbox", $n = (r) => r instanceof Date, it = (r) => r == null;
|
|
5682
5644
|
const fl = (r) => typeof r == "object";
|
|
5683
|
-
var We = (r) => !it(r) && !Array.isArray(r) && fl(r) && !$n(r), ll = (r) => We(r) && r.target ? Zr(r.target) ? r.target.checked : r.target.value : r,
|
|
5645
|
+
var We = (r) => !it(r) && !Array.isArray(r) && fl(r) && !$n(r), ll = (r) => We(r) && r.target ? Zr(r.target) ? r.target.checked : r.target.value : r, nm = (r) => r.substring(0, r.search(/\.\d+(\.|$)/)) || r, cl = (r, u) => r.has(nm(u)), rm = (r) => {
|
|
5684
5646
|
const u = r.constructor && r.constructor.prototype;
|
|
5685
5647
|
return We(u) && u.hasOwnProperty("isPrototypeOf");
|
|
5686
5648
|
}, Ms = typeof window < "u" && typeof window.HTMLElement < "u" && typeof document < "u";
|
|
@@ -5692,7 +5654,7 @@ function lt(r) {
|
|
|
5692
5654
|
else if (r instanceof Set)
|
|
5693
5655
|
u = new Set(r);
|
|
5694
5656
|
else if (!(Ms && (r instanceof Blob || a)) && (i || We(r)))
|
|
5695
|
-
if (u = i ? [] : {}, !i && !
|
|
5657
|
+
if (u = i ? [] : {}, !i && !rm(r))
|
|
5696
5658
|
u = r;
|
|
5697
5659
|
else
|
|
5698
5660
|
for (const f in r)
|
|
@@ -5740,7 +5702,7 @@ const Gi = {
|
|
|
5740
5702
|
pattern: "pattern",
|
|
5741
5703
|
required: "required",
|
|
5742
5704
|
validate: "validate"
|
|
5743
|
-
}, hl = pe.createContext(null), Yr = () => pe.useContext(hl),
|
|
5705
|
+
}, hl = pe.createContext(null), Yr = () => pe.useContext(hl), im = (r) => {
|
|
5744
5706
|
const { children: u, ...i } = r;
|
|
5745
5707
|
return pe.createElement(hl.Provider, { value: i }, u);
|
|
5746
5708
|
};
|
|
@@ -5795,7 +5757,7 @@ function _l(r) {
|
|
|
5795
5757
|
}), [i]), pe.useMemo(() => pl(v, i, O.current, !1), [v, i]);
|
|
5796
5758
|
}
|
|
5797
5759
|
var Kt = (r) => typeof r == "string", yl = (r, u, i, a, f) => Kt(r) ? (a && u.watch.add(r), M(i, r, f)) : Array.isArray(r) ? r.map((c) => (a && u.watch.add(c), M(i, c))) : (a && (u.watchAll = !0), i);
|
|
5798
|
-
function
|
|
5760
|
+
function um(r) {
|
|
5799
5761
|
const u = Yr(), { control: i = u.control, name: a, defaultValue: f, disabled: c, exact: v } = r || {}, p = pe.useRef(a);
|
|
5800
5762
|
p.current = a, Vs({
|
|
5801
5763
|
disabled: c,
|
|
@@ -5807,8 +5769,8 @@ function sm(r) {
|
|
|
5807
5769
|
const [y, O] = pe.useState(i._getWatch(a, f));
|
|
5808
5770
|
return pe.useEffect(() => i._removeUnmounted()), y;
|
|
5809
5771
|
}
|
|
5810
|
-
function
|
|
5811
|
-
const u = Yr(), { name: i, disabled: a, control: f = u.control, shouldUnregister: c } = r, v = cl(f._names.array, i), p =
|
|
5772
|
+
function sm(r) {
|
|
5773
|
+
const u = Yr(), { name: i, disabled: a, control: f = u.control, shouldUnregister: c } = r, v = cl(f._names.array, i), p = um({
|
|
5812
5774
|
control: f,
|
|
5813
5775
|
name: i,
|
|
5814
5776
|
defaultValue: M(f._formValues, i, M(f._defaultValues, i, r.defaultValue)),
|
|
@@ -5932,7 +5894,7 @@ const $r = (r, u, i, a) => {
|
|
|
5932
5894
|
}
|
|
5933
5895
|
}
|
|
5934
5896
|
};
|
|
5935
|
-
var
|
|
5897
|
+
var am = (r, u, i) => {
|
|
5936
5898
|
const a = Ur(M(r, i));
|
|
5937
5899
|
return xe(a, "root", u[i]), xe(r, i, a), r;
|
|
5938
5900
|
}, Us = (r) => r.type === "file", Yt = (r) => typeof r == "function", Zi = (r) => {
|
|
@@ -6058,22 +6020,22 @@ var sr = (r) => We(r) && !Yi(r) ? r : {
|
|
|
6058
6020
|
}
|
|
6059
6021
|
return k(!0), $;
|
|
6060
6022
|
};
|
|
6061
|
-
function
|
|
6023
|
+
function om(r, u) {
|
|
6062
6024
|
const i = u.slice(0, -1).length;
|
|
6063
6025
|
let a = 0;
|
|
6064
6026
|
for (; a < i; )
|
|
6065
6027
|
r = Ie(r) ? a++ : r[u[a++]];
|
|
6066
6028
|
return r;
|
|
6067
6029
|
}
|
|
6068
|
-
function
|
|
6030
|
+
function fm(r) {
|
|
6069
6031
|
for (const u in r)
|
|
6070
6032
|
if (r.hasOwnProperty(u) && !Ie(r[u]))
|
|
6071
6033
|
return !1;
|
|
6072
6034
|
return !0;
|
|
6073
6035
|
}
|
|
6074
6036
|
function He(r, u) {
|
|
6075
|
-
const i = Array.isArray(u) ? u : Ws(u) ? [u] : dl(u), a = i.length === 1 ? r :
|
|
6076
|
-
return a && delete a[c], f !== 0 && (We(a) && ct(a) || Array.isArray(a) &&
|
|
6037
|
+
const i = Array.isArray(u) ? u : Ws(u) ? [u] : dl(u), a = i.length === 1 ? r : om(r, i), f = i.length - 1, c = i[f];
|
|
6038
|
+
return a && delete a[c], f !== 0 && (We(a) && ct(a) || Array.isArray(a) && fm(a)) && He(r, i.slice(0, -1)), r;
|
|
6077
6039
|
}
|
|
6078
6040
|
var vs = () => {
|
|
6079
6041
|
let r = [];
|
|
@@ -6115,7 +6077,7 @@ function Cn(r, u) {
|
|
|
6115
6077
|
}
|
|
6116
6078
|
return !0;
|
|
6117
6079
|
}
|
|
6118
|
-
var xl = (r) => r.type === "select-multiple",
|
|
6080
|
+
var xl = (r) => r.type === "select-multiple", lm = (r) => $s(r) || Zr(r), gs = (r) => Zi(r) && r.isConnected, Al = (r) => {
|
|
6119
6081
|
for (const u in r)
|
|
6120
6082
|
if (Yt(r[u]))
|
|
6121
6083
|
return !0;
|
|
@@ -6141,7 +6103,7 @@ function _s(r) {
|
|
|
6141
6103
|
if (!(r.refs ? r.refs.every((i) => i.disabled) : u.disabled))
|
|
6142
6104
|
return Us(u) ? u.files : $s(u) ? wl(r.refs).value : xl(u) ? [...u.selectedOptions].map(({ value: i }) => i) : Zr(u) ? bl(r.refs).value : Sl(Ie(u.value) ? r.ref.value : u.value, r);
|
|
6143
6105
|
}
|
|
6144
|
-
var
|
|
6106
|
+
var cm = (r, u, i, a) => {
|
|
6145
6107
|
const f = {};
|
|
6146
6108
|
for (const c of r) {
|
|
6147
6109
|
const v = M(u, c);
|
|
@@ -6155,7 +6117,7 @@ var dm = (r, u, i, a) => {
|
|
|
6155
6117
|
};
|
|
6156
6118
|
}, Mr = (r) => Ie(r) ? r : Yi(r) ? r.source : We(r) ? Yi(r.value) ? r.value.source : r.value : r;
|
|
6157
6119
|
const Vf = "AsyncFunction";
|
|
6158
|
-
var
|
|
6120
|
+
var dm = (r) => !!r && !!r.validate && !!(Yt(r.validate) && r.validate.constructor.name === Vf || We(r.validate) && Object.values(r.validate).find((u) => u.constructor.name === Vf)), hm = (r) => r.mount && (r.required || r.min || r.max || r.maxLength || r.minLength || r.pattern || r.validate);
|
|
6159
6121
|
function Uf(r, u, i) {
|
|
6160
6122
|
const a = M(r, i);
|
|
6161
6123
|
if (a || Ws(i))
|
|
@@ -6179,15 +6141,15 @@ function Uf(r, u, i) {
|
|
|
6179
6141
|
name: i
|
|
6180
6142
|
};
|
|
6181
6143
|
}
|
|
6182
|
-
var
|
|
6183
|
-
const
|
|
6144
|
+
var pm = (r, u, i, a, f) => f.isOnAll ? !1 : !i && f.isOnTouch ? !(u || r) : (i ? a.isOnBlur : f.isOnBlur) ? !r : (i ? a.isOnChange : f.isOnChange) ? r : !0, vm = (r, u) => !eu(M(r, u)).length && He(r, u);
|
|
6145
|
+
const gm = {
|
|
6184
6146
|
mode: Ht.onSubmit,
|
|
6185
6147
|
reValidateMode: Ht.onChange,
|
|
6186
6148
|
shouldFocusError: !0
|
|
6187
6149
|
};
|
|
6188
|
-
function
|
|
6150
|
+
function _m(r = {}) {
|
|
6189
6151
|
let u = {
|
|
6190
|
-
...
|
|
6152
|
+
...gm,
|
|
6191
6153
|
...r
|
|
6192
6154
|
}, i = {
|
|
6193
6155
|
submitCount: 0,
|
|
@@ -6249,7 +6211,7 @@ function ym(r = {}) {
|
|
|
6249
6211
|
}
|
|
6250
6212
|
if (F && Array.isArray(M(i.errors, g))) {
|
|
6251
6213
|
const X = S(M(i.errors, g), D.argA, D.argB);
|
|
6252
|
-
I && xe(i.errors, g, X),
|
|
6214
|
+
I && xe(i.errors, g, X), vm(i.errors, g);
|
|
6253
6215
|
}
|
|
6254
6216
|
if (w.touchedFields && F && Array.isArray(M(i.touchedFields, g))) {
|
|
6255
6217
|
const X = S(M(i.touchedFields, g), D.argA, D.argB);
|
|
@@ -6314,7 +6276,7 @@ function ym(r = {}) {
|
|
|
6314
6276
|
}
|
|
6315
6277
|
}, fe = async (g) => {
|
|
6316
6278
|
Z(g, !0);
|
|
6317
|
-
const x = await u.resolver(c, u.context,
|
|
6279
|
+
const x = await u.resolver(c, u.context, cm(g || p.mount, a, u.criteriaMode, u.shouldUseNativeValidation));
|
|
6318
6280
|
return Z(g), x;
|
|
6319
6281
|
}, ve = async (g) => {
|
|
6320
6282
|
const { errors: x } = await fe(g);
|
|
@@ -6334,12 +6296,12 @@ function ym(r = {}) {
|
|
|
6334
6296
|
if (I) {
|
|
6335
6297
|
const { _f: F, ...X } = I;
|
|
6336
6298
|
if (F) {
|
|
6337
|
-
const ie = p.array.has(F.name), Fe = I._f &&
|
|
6299
|
+
const ie = p.array.has(F.name), Fe = I._f && dm(I._f);
|
|
6338
6300
|
Fe && w.validatingFields && Z([D], !0);
|
|
6339
6301
|
const Se = await Wf(I, c, V, u.shouldUseNativeValidation && !x, ie);
|
|
6340
6302
|
if (Fe && w.validatingFields && Z([D]), Se[F.name] && (S.valid = !1, x))
|
|
6341
6303
|
break;
|
|
6342
|
-
!x && (M(Se, F.name) ? ie ?
|
|
6304
|
+
!x && (M(Se, F.name) ? ie ? am(i.errors, Se, F.name) : xe(i.errors, F.name, Se[F.name]) : He(i.errors, F.name));
|
|
6343
6305
|
}
|
|
6344
6306
|
!ct(X) && await ae(X, x, S);
|
|
6345
6307
|
}
|
|
@@ -6391,7 +6353,7 @@ function ym(r = {}) {
|
|
|
6391
6353
|
};
|
|
6392
6354
|
if (I) {
|
|
6393
6355
|
let ie, Fe;
|
|
6394
|
-
const Se = F(), Ze = g.type === Gi.BLUR || g.type === Gi.FOCUS_OUT, gr = !
|
|
6356
|
+
const Se = F(), Ze = g.type === Gi.BLUR || g.type === Gi.FOCUS_OUT, gr = !hm(I._f) && !u.resolver && !M(i.errors, S) && !I._f.deps || pm(Ze, M(i.touchedFields, S), i.isSubmitted, N, B), Tn = If(S, p, Ze);
|
|
6395
6357
|
xe(c, S, Se), Ze ? (I._f.onBlur && I._f.onBlur(g), y && y(0)) : I._f.onChange && I._f.onChange(g);
|
|
6396
6358
|
const Ln = J(S, Se, Ze, !1), _r = !ct(Ln) || Tn;
|
|
6397
6359
|
if (!Ze && C.values.next({
|
|
@@ -6502,7 +6464,7 @@ function ym(r = {}) {
|
|
|
6502
6464
|
ref: (I) => {
|
|
6503
6465
|
if (I) {
|
|
6504
6466
|
Ge(g, x), S = M(a, g);
|
|
6505
|
-
const F = Ie(I.value) && I.querySelectorAll && I.querySelectorAll("input,select,textarea")[0] || I, X =
|
|
6467
|
+
const F = Ie(I.value) && I.querySelectorAll && I.querySelectorAll("input,select,textarea")[0] || I, X = lm(F), ie = S._f.refs || [];
|
|
6506
6468
|
if (X ? ie.find((Fe) => Fe === F) : F === S._f.ref)
|
|
6507
6469
|
return;
|
|
6508
6470
|
xe(a, g, {
|
|
@@ -6704,7 +6666,7 @@ function ym(r = {}) {
|
|
|
6704
6666
|
getFieldState: qt
|
|
6705
6667
|
};
|
|
6706
6668
|
}
|
|
6707
|
-
function
|
|
6669
|
+
function ym(r = {}) {
|
|
6708
6670
|
const u = pe.useRef(), i = pe.useRef(), [a, f] = pe.useState({
|
|
6709
6671
|
isDirty: !1,
|
|
6710
6672
|
isValidating: !1,
|
|
@@ -6722,7 +6684,7 @@ function mm(r = {}) {
|
|
|
6722
6684
|
defaultValues: Yt(r.defaultValues) ? void 0 : r.defaultValues
|
|
6723
6685
|
});
|
|
6724
6686
|
u.current || (u.current = {
|
|
6725
|
-
...
|
|
6687
|
+
..._m(r),
|
|
6726
6688
|
formState: a
|
|
6727
6689
|
});
|
|
6728
6690
|
const c = u.current.control;
|
|
@@ -6763,19 +6725,19 @@ const $f = (r, u, i) => {
|
|
|
6763
6725
|
const a = u.fields[i];
|
|
6764
6726
|
a && a.ref && "reportValidity" in a.ref ? $f(a.ref, i, r) : a.refs && a.refs.forEach((f) => $f(f, i, r));
|
|
6765
6727
|
}
|
|
6766
|
-
},
|
|
6728
|
+
}, mm = (r, u) => {
|
|
6767
6729
|
u.shouldUseNativeValidation && Cl(r, u);
|
|
6768
6730
|
const i = {};
|
|
6769
6731
|
for (const a in r) {
|
|
6770
6732
|
const f = M(u.fields, a), c = Object.assign(r[a] || {}, { ref: f && f.ref });
|
|
6771
|
-
if (
|
|
6733
|
+
if (bm(u.names || Object.keys(r), a)) {
|
|
6772
6734
|
const v = Object.assign({}, M(i, a));
|
|
6773
6735
|
xe(v, "root", c), xe(i, a, v);
|
|
6774
6736
|
} else xe(i, a, c);
|
|
6775
6737
|
}
|
|
6776
6738
|
return i;
|
|
6777
|
-
},
|
|
6778
|
-
function
|
|
6739
|
+
}, bm = (r, u) => r.some((i) => i.startsWith(u + "."));
|
|
6740
|
+
function wm(r, u, i) {
|
|
6779
6741
|
return u === void 0 && (u = {}), i === void 0 && (i = {}), function(a, f, c) {
|
|
6780
6742
|
try {
|
|
6781
6743
|
return Promise.resolve(function(v, p) {
|
|
@@ -6789,7 +6751,7 @@ function xm(r, u, i) {
|
|
|
6789
6751
|
return y && y.then ? y.then(void 0, p) : y;
|
|
6790
6752
|
}(0, function(v) {
|
|
6791
6753
|
if (!v.inner) throw v;
|
|
6792
|
-
return { values: {}, errors:
|
|
6754
|
+
return { values: {}, errors: mm((p = v, y = !c.shouldUseNativeValidation && c.criteriaMode === "all", (p.inner || []).reduce(function(O, w) {
|
|
6793
6755
|
if (O[w.path] || (O[w.path] = { message: w.message, type: w.type }), y) {
|
|
6794
6756
|
var C = O[w.path].types, B = C && C[w.type];
|
|
6795
6757
|
O[w.path] = ml(w.path, y, O, w.type, B ? [].concat(B, w.message) : w.message);
|
|
@@ -6803,7 +6765,7 @@ function xm(r, u, i) {
|
|
|
6803
6765
|
}
|
|
6804
6766
|
};
|
|
6805
6767
|
}
|
|
6806
|
-
function
|
|
6768
|
+
function Gm({
|
|
6807
6769
|
className: r,
|
|
6808
6770
|
name: u,
|
|
6809
6771
|
children: i,
|
|
@@ -6815,17 +6777,17 @@ function Ym({
|
|
|
6815
6777
|
onSubmit: y = () => null,
|
|
6816
6778
|
onChange: O
|
|
6817
6779
|
}) {
|
|
6818
|
-
const w =
|
|
6780
|
+
const w = ym({
|
|
6819
6781
|
mode: a,
|
|
6820
6782
|
reValidateMode: f,
|
|
6821
6783
|
defaultValues: c,
|
|
6822
|
-
resolver: v ?
|
|
6784
|
+
resolver: v ? wm(v) : void 0
|
|
6823
6785
|
});
|
|
6824
6786
|
return xt(() => {
|
|
6825
6787
|
if (!O) return;
|
|
6826
6788
|
const { unsubscribe: C } = w.watch(O);
|
|
6827
6789
|
return C;
|
|
6828
|
-
}, [O, w.watch]), /* @__PURE__ */ P(
|
|
6790
|
+
}, [O, w.watch]), /* @__PURE__ */ P(im, { ...w, children: /* @__PURE__ */ P(
|
|
6829
6791
|
"form",
|
|
6830
6792
|
{
|
|
6831
6793
|
className: ne("bbn-form", r),
|
|
@@ -6844,7 +6806,7 @@ function hr({
|
|
|
6844
6806
|
shouldUnregister: f = !1,
|
|
6845
6807
|
validateOnMount: c = !0
|
|
6846
6808
|
}) {
|
|
6847
|
-
const { setFocus: v, trigger: p } = Yr(), { field: y, fieldState: O } =
|
|
6809
|
+
const { setFocus: v, trigger: p } = Yr(), { field: y, fieldState: O } = sm({ name: r, defaultValue: u, disabled: i, shouldUnregister: f }), { invalid: w, isTouched: C, error: B } = O;
|
|
6848
6810
|
return xt(() => {
|
|
6849
6811
|
c ? p(r, { shouldFocus: a }) : a && v(r);
|
|
6850
6812
|
}, [r, c]), {
|
|
@@ -6854,12 +6816,12 @@ function hr({
|
|
|
6854
6816
|
error: (B == null ? void 0 : B.message) ?? ""
|
|
6855
6817
|
};
|
|
6856
6818
|
}
|
|
6857
|
-
function
|
|
6819
|
+
function Zm(r) {
|
|
6858
6820
|
const { getFieldState: u } = Yr(), i = _l({ name: r });
|
|
6859
6821
|
return Array.isArray(r) ? r.map((f) => u(f, i)) : u(r, i);
|
|
6860
6822
|
}
|
|
6861
|
-
const
|
|
6862
|
-
function
|
|
6823
|
+
const xm = /^-?\d*\.?\d*$/;
|
|
6824
|
+
function Ym({
|
|
6863
6825
|
name: r,
|
|
6864
6826
|
id: u = r,
|
|
6865
6827
|
label: i,
|
|
@@ -6903,13 +6865,13 @@ function Xm({
|
|
|
6903
6865
|
prefix: B,
|
|
6904
6866
|
state: J,
|
|
6905
6867
|
onChange: (ve) => {
|
|
6906
|
-
|
|
6868
|
+
xm.test(ve.target.value) && k(ve.target.value);
|
|
6907
6869
|
},
|
|
6908
6870
|
onBlur: $
|
|
6909
6871
|
}
|
|
6910
6872
|
) });
|
|
6911
6873
|
}
|
|
6912
|
-
function
|
|
6874
|
+
function Km({
|
|
6913
6875
|
name: r,
|
|
6914
6876
|
id: u = r,
|
|
6915
6877
|
label: i,
|
|
@@ -6955,7 +6917,7 @@ function Jm({
|
|
|
6955
6917
|
}
|
|
6956
6918
|
) });
|
|
6957
6919
|
}
|
|
6958
|
-
function
|
|
6920
|
+
function Xm({
|
|
6959
6921
|
name: r,
|
|
6960
6922
|
id: u = r,
|
|
6961
6923
|
label: i,
|
|
@@ -6985,7 +6947,7 @@ function Qm({
|
|
|
6985
6947
|
}
|
|
6986
6948
|
);
|
|
6987
6949
|
}
|
|
6988
|
-
function
|
|
6950
|
+
function Jm({
|
|
6989
6951
|
name: r,
|
|
6990
6952
|
id: u = r,
|
|
6991
6953
|
label: i,
|
|
@@ -7019,7 +6981,7 @@ function jm({
|
|
|
7019
6981
|
}
|
|
7020
6982
|
);
|
|
7021
6983
|
}
|
|
7022
|
-
function
|
|
6984
|
+
function Qm({
|
|
7023
6985
|
open: r,
|
|
7024
6986
|
defaultOpen: u,
|
|
7025
6987
|
options: i,
|
|
@@ -7076,56 +7038,94 @@ function e1({
|
|
|
7076
7038
|
}
|
|
7077
7039
|
) });
|
|
7078
7040
|
}
|
|
7079
|
-
function
|
|
7041
|
+
function jm({ displayError: r = !1, ...u }) {
|
|
7080
7042
|
const { error: i, value: a, onChange: f, onBlur: c, disabled: v, name: p, ref: y } = hr(u), O = /* @__PURE__ */ P("input", { ref: y, type: "hidden", name: p, disabled: v, value: a, onChange: f, onBlur: c });
|
|
7081
7043
|
return r ? /* @__PURE__ */ P(ji, { hint: r ? i : "", state: r ? "error" : "default", children: O }) : O;
|
|
7082
7044
|
}
|
|
7045
|
+
const Am = {
|
|
7046
|
+
adaptive: "adaptive",
|
|
7047
|
+
horizontal: "vertical",
|
|
7048
|
+
vertical: "horizontal"
|
|
7049
|
+
};
|
|
7050
|
+
function e1({ className: r, orientation: u = "vertical", children: i }) {
|
|
7051
|
+
return /* @__PURE__ */ P("div", { className: Ji("bbn-list-legacy", `bbn-list-legacy-${u}`, r), children: $i.map(
|
|
7052
|
+
i,
|
|
7053
|
+
(a) => As(a) ? Os(a, {
|
|
7054
|
+
orientation: Am[u]
|
|
7055
|
+
}) : a
|
|
7056
|
+
) });
|
|
7057
|
+
}
|
|
7058
|
+
function t1({ className: r, orientation: u = "horizontal", title: i, value: a, suffix: f }) {
|
|
7059
|
+
return /* @__PURE__ */ Ne("div", { className: ne("bbn-list-item-legacy", `bbn-list-item-legacy-${u}`, r), children: [
|
|
7060
|
+
/* @__PURE__ */ P(
|
|
7061
|
+
En,
|
|
7062
|
+
{
|
|
7063
|
+
as: "div",
|
|
7064
|
+
className: ne("bbn-list-title-legacy", `bbn-list-title-legacy-${u}`),
|
|
7065
|
+
variant: u === "horizontal" ? "body1" : "body2",
|
|
7066
|
+
children: i
|
|
7067
|
+
}
|
|
7068
|
+
),
|
|
7069
|
+
/* @__PURE__ */ Ne(
|
|
7070
|
+
En,
|
|
7071
|
+
{
|
|
7072
|
+
as: "div",
|
|
7073
|
+
className: ne("bbn-list-value-legacy", `bbn-list-value-legacy-${u}`),
|
|
7074
|
+
variant: "body1",
|
|
7075
|
+
children: [
|
|
7076
|
+
a,
|
|
7077
|
+
f
|
|
7078
|
+
]
|
|
7079
|
+
}
|
|
7080
|
+
)
|
|
7081
|
+
] });
|
|
7082
|
+
}
|
|
7083
7083
|
export {
|
|
7084
7084
|
Rm as Accordion,
|
|
7085
7085
|
Lm as AccordionDetails,
|
|
7086
7086
|
Tm as AccordionSummary,
|
|
7087
7087
|
d_ as Avatar,
|
|
7088
7088
|
Fm as AvatarGroup,
|
|
7089
|
-
|
|
7089
|
+
zm as Badge,
|
|
7090
7090
|
l_ as Button,
|
|
7091
7091
|
$m as Card,
|
|
7092
7092
|
Qy as Cell,
|
|
7093
7093
|
p_ as Checkbox,
|
|
7094
|
-
|
|
7094
|
+
Xm as CheckboxField,
|
|
7095
7095
|
Wm as Chip,
|
|
7096
7096
|
Xy as Column,
|
|
7097
7097
|
Im as Dialog,
|
|
7098
7098
|
Bm as DialogBody,
|
|
7099
7099
|
Mm as DialogFooter,
|
|
7100
7100
|
Pm as DialogHeader,
|
|
7101
|
-
|
|
7101
|
+
Gm as Form,
|
|
7102
7102
|
ji as FormControl,
|
|
7103
7103
|
qf as Heading,
|
|
7104
|
-
|
|
7104
|
+
jm as HiddenField,
|
|
7105
7105
|
kf as IconButton,
|
|
7106
7106
|
Bs as Input,
|
|
7107
7107
|
km as List,
|
|
7108
7108
|
qm as ListItem,
|
|
7109
|
-
|
|
7110
|
-
|
|
7109
|
+
t1 as ListItemLegacy,
|
|
7110
|
+
e1 as ListLegacy,
|
|
7111
7111
|
Vm as Loader,
|
|
7112
7112
|
Nm as MobileDialog,
|
|
7113
|
-
|
|
7113
|
+
Ym as NumberField,
|
|
7114
7114
|
qy as Popover,
|
|
7115
7115
|
Ps as Portal,
|
|
7116
7116
|
g_ as Radio,
|
|
7117
|
-
|
|
7117
|
+
Jm as RadioField,
|
|
7118
7118
|
Dm as ScrollLocker,
|
|
7119
7119
|
il as Select,
|
|
7120
|
-
|
|
7120
|
+
Qm as SelectField,
|
|
7121
7121
|
Um as Table,
|
|
7122
7122
|
En as Text,
|
|
7123
|
-
|
|
7123
|
+
Km as TextField,
|
|
7124
7124
|
Hm as Toggle,
|
|
7125
7125
|
hr as useField,
|
|
7126
|
-
|
|
7126
|
+
Zm as useFieldState,
|
|
7127
7127
|
Yr as useFormContext,
|
|
7128
7128
|
_l as useFormState,
|
|
7129
|
-
|
|
7129
|
+
um as useWatch
|
|
7130
7130
|
};
|
|
7131
7131
|
//# sourceMappingURL=index.es.js.map
|