lizaui 5.0.0 → 5.0.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/components/select-input/select.d.ts.map +1 -1
- package/dist/select-input/index.cjs.js +3 -3
- package/dist/select-input/index.cjs.js.map +1 -1
- package/dist/select-input/index.es.js +48 -46
- package/dist/select-input/index.es.js.map +1 -1
- package/dist/types/select/select-main.type.d.ts +1 -1
- package/dist/types/select/select-main.type.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -131,19 +131,19 @@ function mn(t) {
|
|
|
131
131
|
}, [s]), Y = se(function(Q, ue) {
|
|
132
132
|
var ie;
|
|
133
133
|
typeof c == "function" && (ie = c(Q, ue)), y(ie !== void 0 ? ie : Q);
|
|
134
|
-
}, [c]),
|
|
134
|
+
}, [c]), te = se(function() {
|
|
135
135
|
typeof v == "function" && v(), G(!0);
|
|
136
136
|
}, [v]), K = se(function() {
|
|
137
137
|
typeof d == "function" && d(), G(!1);
|
|
138
|
-
}, [d]), J = l !== void 0 ? l : m, D = u !== void 0 ? u : g,
|
|
138
|
+
}, [d]), J = l !== void 0 ? l : m, D = u !== void 0 ? u : g, q = I !== void 0 ? I : Z;
|
|
139
139
|
return E(E({}, p), {}, {
|
|
140
140
|
inputValue: J,
|
|
141
141
|
menuIsOpen: D,
|
|
142
142
|
onChange: U,
|
|
143
143
|
onInputChange: Y,
|
|
144
144
|
onMenuClose: K,
|
|
145
|
-
onMenuOpen:
|
|
146
|
-
value:
|
|
145
|
+
onMenuOpen: te,
|
|
146
|
+
value: q
|
|
147
147
|
});
|
|
148
148
|
}
|
|
149
149
|
function B() {
|
|
@@ -308,7 +308,7 @@ function Le(t, e) {
|
|
|
308
308
|
function Lr(t, e) {
|
|
309
309
|
return t.map(e).join("");
|
|
310
310
|
}
|
|
311
|
-
var rt = 1, Pe = 1, xn = 0, ce = 0,
|
|
311
|
+
var rt = 1, Pe = 1, xn = 0, ce = 0, ee = 0, We = "";
|
|
312
312
|
function it(t, e, r, i, n, a, o) {
|
|
313
313
|
return { value: t, root: e, parent: r, type: i, props: n, children: a, line: rt, column: Pe, length: o, return: "" };
|
|
314
314
|
}
|
|
@@ -316,13 +316,13 @@ function Oe(t, e) {
|
|
|
316
316
|
return Mr(it("", null, null, "", null, null, 0), t, { length: -t.length }, e);
|
|
317
317
|
}
|
|
318
318
|
function Yr() {
|
|
319
|
-
return
|
|
319
|
+
return ee;
|
|
320
320
|
}
|
|
321
321
|
function Jr() {
|
|
322
|
-
return
|
|
322
|
+
return ee = ce > 0 ? oe(We, --ce) : 0, Pe--, ee === 10 && (Pe = 1, rt--), ee;
|
|
323
323
|
}
|
|
324
324
|
function be() {
|
|
325
|
-
return
|
|
325
|
+
return ee = ce < xn ? oe(We, ce++) : 0, Pe++, ee === 10 && (Pe = 1, rt++), ee;
|
|
326
326
|
}
|
|
327
327
|
function he() {
|
|
328
328
|
return oe(We, ce);
|
|
@@ -381,25 +381,25 @@ function Ue(t) {
|
|
|
381
381
|
return An(De(ce - 1, At(t === 91 ? t + 2 : t === 40 ? t + 1 : t)));
|
|
382
382
|
}
|
|
383
383
|
function zr(t) {
|
|
384
|
-
for (; (
|
|
384
|
+
for (; (ee = he()) && ee < 33; )
|
|
385
385
|
be();
|
|
386
|
-
return we(t) > 2 || we(
|
|
386
|
+
return we(t) > 2 || we(ee) > 3 ? "" : " ";
|
|
387
387
|
}
|
|
388
388
|
function jr(t, e) {
|
|
389
|
-
for (; --e && be() && !(
|
|
389
|
+
for (; --e && be() && !(ee < 48 || ee > 102 || ee > 57 && ee < 65 || ee > 70 && ee < 97); )
|
|
390
390
|
;
|
|
391
391
|
return De(t, ke() + (e < 6 && he() == 32 && be() == 32));
|
|
392
392
|
}
|
|
393
393
|
function At(t) {
|
|
394
394
|
for (; be(); )
|
|
395
|
-
switch (
|
|
395
|
+
switch (ee) {
|
|
396
396
|
// ] ) " '
|
|
397
397
|
case t:
|
|
398
398
|
return ce;
|
|
399
399
|
// " '
|
|
400
400
|
case 34:
|
|
401
401
|
case 39:
|
|
402
|
-
t !== 34 && t !== 39 && At(
|
|
402
|
+
t !== 34 && t !== 39 && At(ee);
|
|
403
403
|
break;
|
|
404
404
|
// (
|
|
405
405
|
case 40:
|
|
@@ -413,8 +413,8 @@ function At(t) {
|
|
|
413
413
|
return ce;
|
|
414
414
|
}
|
|
415
415
|
function kr(t, e) {
|
|
416
|
-
for (; be() && t +
|
|
417
|
-
if (t +
|
|
416
|
+
for (; be() && t + ee !== 57; )
|
|
417
|
+
if (t + ee === 84 && he() === 47)
|
|
418
418
|
break;
|
|
419
419
|
return "/*" + De(e, ce - 1) + "*" + nt(t === 47 ? t : be());
|
|
420
420
|
}
|
|
@@ -960,7 +960,7 @@ function ci() {
|
|
|
960
960
|
}
|
|
961
961
|
}
|
|
962
962
|
}
|
|
963
|
-
var g = u, G = s, x = l, V = o, Z = e, H = c, U = i, Y = p,
|
|
963
|
+
var g = u, G = s, x = l, V = o, Z = e, H = c, U = i, Y = p, te = I, K = r, J = a, D = n, q = d, Q = !1;
|
|
964
964
|
function ue(C) {
|
|
965
965
|
return Q || (Q = !0), ie(C) || A(C) === u;
|
|
966
966
|
}
|
|
@@ -1000,7 +1000,7 @@ function ci() {
|
|
|
1000
1000
|
function k(C) {
|
|
1001
1001
|
return A(C) === d;
|
|
1002
1002
|
}
|
|
1003
|
-
M.AsyncMode = g, M.ConcurrentMode = G, M.ContextConsumer = x, M.ContextProvider = V, M.Element = Z, M.ForwardRef = H, M.Fragment = U, M.Lazy = Y, M.Memo =
|
|
1003
|
+
M.AsyncMode = g, M.ConcurrentMode = G, M.ContextConsumer = x, M.ContextProvider = V, M.Element = Z, M.ForwardRef = H, M.Fragment = U, M.Lazy = Y, M.Memo = te, M.Portal = K, M.Profiler = J, M.StrictMode = D, M.Suspense = q, M.isAsyncMode = ue, M.isConcurrentMode = ie, M.isContextConsumer = de, M.isContextProvider = X, M.isElement = F, M.isForwardRef = P, M.isFragment = L, M.isLazy = ne, M.isMemo = _, M.isPortal = z, M.isProfiler = me, M.isStrictMode = Ge, M.isSuspense = k, M.isValidElementType = h, M.typeOf = A;
|
|
1004
1004
|
})()), M;
|
|
1005
1005
|
}
|
|
1006
1006
|
var Lt;
|
|
@@ -1526,10 +1526,10 @@ function Ui(t) {
|
|
|
1526
1526
|
};
|
|
1527
1527
|
if (!o && Z >= i || o && x >= i) {
|
|
1528
1528
|
a && Je(u, H, Y);
|
|
1529
|
-
var
|
|
1529
|
+
var te = o ? x - A : Z - A;
|
|
1530
1530
|
return {
|
|
1531
1531
|
placement: "bottom",
|
|
1532
|
-
maxHeight:
|
|
1532
|
+
maxHeight: te
|
|
1533
1533
|
};
|
|
1534
1534
|
}
|
|
1535
1535
|
if (n === "auto" || o) {
|
|
@@ -2289,9 +2289,9 @@ var cu = process.env.NODE_ENV === "production" ? {
|
|
|
2289
2289
|
}, [d]), Z = Ee(function() {
|
|
2290
2290
|
var J = "";
|
|
2291
2291
|
if (r && V.onChange) {
|
|
2292
|
-
var D = r.option,
|
|
2292
|
+
var D = r.option, q = r.options, Q = r.removedValue, ue = r.removedValues, ie = r.value, de = function(z) {
|
|
2293
2293
|
return Array.isArray(z) ? null : z;
|
|
2294
|
-
}, X = Q || D || de(ie), F = X ? v(X) : "", P =
|
|
2294
|
+
}, X = Q || D || de(ie), F = X ? v(X) : "", P = q || ue || void 0, L = P ? P.map(v) : [], ne = E({
|
|
2295
2295
|
// multiSelected items are usually items that have already been selected
|
|
2296
2296
|
// or set by the user as a default value so we assume they are not disabled
|
|
2297
2297
|
isDisabled: X && f(X, l),
|
|
@@ -2302,13 +2302,13 @@ var cu = process.env.NODE_ENV === "production" ? {
|
|
|
2302
2302
|
}
|
|
2303
2303
|
return J;
|
|
2304
2304
|
}, [r, V, f, l, v]), H = Ee(function() {
|
|
2305
|
-
var J = "", D = i || n,
|
|
2305
|
+
var J = "", D = i || n, q = !!(i && l && l.includes(i));
|
|
2306
2306
|
if (D && V.onFocus) {
|
|
2307
2307
|
var Q = {
|
|
2308
2308
|
focused: D,
|
|
2309
2309
|
label: v(D),
|
|
2310
2310
|
isDisabled: f(D, l),
|
|
2311
|
-
isSelected:
|
|
2311
|
+
isSelected: q,
|
|
2312
2312
|
options: a,
|
|
2313
2313
|
context: D === i ? "menu" : "value",
|
|
2314
2314
|
selectValue: l,
|
|
@@ -2329,7 +2329,7 @@ var cu = process.env.NODE_ENV === "production" ? {
|
|
|
2329
2329
|
});
|
|
2330
2330
|
}
|
|
2331
2331
|
return J;
|
|
2332
|
-
}, [a, I, m, V, y, h, g]), Y = r?.action === "initial-input-focus",
|
|
2332
|
+
}, [a, I, m, V, y, h, g]), Y = r?.action === "initial-input-focus", te = Ee(function() {
|
|
2333
2333
|
var J = "";
|
|
2334
2334
|
if (V.guidance) {
|
|
2335
2335
|
var D = n ? "value" : m ? "menu" : "input";
|
|
@@ -2352,7 +2352,7 @@ var cu = process.env.NODE_ENV === "production" ? {
|
|
|
2352
2352
|
id: "aria-results"
|
|
2353
2353
|
}, U), S("span", {
|
|
2354
2354
|
id: "aria-guidance"
|
|
2355
|
-
},
|
|
2355
|
+
}, te));
|
|
2356
2356
|
return S(It, null, S(Kt, {
|
|
2357
2357
|
id: s
|
|
2358
2358
|
}, Y && K), S(Kt, {
|
|
@@ -3663,8 +3663,8 @@ var _n = function(e) {
|
|
|
3663
3663
|
onTouchEnd: function() {
|
|
3664
3664
|
return n.removeValue(V);
|
|
3665
3665
|
},
|
|
3666
|
-
onMouseDown: function(
|
|
3667
|
-
|
|
3666
|
+
onMouseDown: function(te) {
|
|
3667
|
+
te.preventDefault();
|
|
3668
3668
|
}
|
|
3669
3669
|
},
|
|
3670
3670
|
data: V
|
|
@@ -3738,7 +3738,7 @@ var _n = function(e) {
|
|
|
3738
3738
|
}, {
|
|
3739
3739
|
key: "renderMenu",
|
|
3740
3740
|
value: function() {
|
|
3741
|
-
var n = this, a = this.getComponents(), o = a.Group, l = a.GroupHeading, u = a.Menu, s = a.MenuList, c = a.MenuPortal, d = a.LoadingMessage, v = a.NoOptionsMessage, I = a.Option, p = this.commonProps, f = this.state.focusedOption, b = this.props, m = b.captureMenuScroll, y = b.inputValue, h = b.isLoading, A = b.loadingMessage, g = b.minMenuHeight, G = b.maxMenuHeight, x = b.menuIsOpen, V = b.menuPlacement, Z = b.menuPosition, H = b.menuPortalTarget, U = b.menuShouldBlockScroll, Y = b.menuShouldScrollIntoView,
|
|
3741
|
+
var n = this, a = this.getComponents(), o = a.Group, l = a.GroupHeading, u = a.Menu, s = a.MenuList, c = a.MenuPortal, d = a.LoadingMessage, v = a.NoOptionsMessage, I = a.Option, p = this.commonProps, f = this.state.focusedOption, b = this.props, m = b.captureMenuScroll, y = b.inputValue, h = b.isLoading, A = b.loadingMessage, g = b.minMenuHeight, G = b.maxMenuHeight, x = b.menuIsOpen, V = b.menuPlacement, Z = b.menuPosition, H = b.menuPortalTarget, U = b.menuShouldBlockScroll, Y = b.menuShouldScrollIntoView, te = b.noOptionsMessage, K = b.onMenuScrollToTop, J = b.onMenuScrollToBottom;
|
|
3742
3742
|
if (!x) return null;
|
|
3743
3743
|
var D = function(F, P) {
|
|
3744
3744
|
var L = F.type, ne = F.data, _ = F.isDisabled, z = F.isSelected, me = F.label, Ge = F.value, k = f === ne, C = _ ? void 0 : function() {
|
|
@@ -3767,9 +3767,9 @@ var _n = function(e) {
|
|
|
3767
3767
|
isFocused: k,
|
|
3768
3768
|
innerRef: k ? n.getFocusedOptionRef : void 0
|
|
3769
3769
|
}), n.formatOptionLabel(F.data, "menu"));
|
|
3770
|
-
},
|
|
3770
|
+
}, q;
|
|
3771
3771
|
if (this.hasOptions())
|
|
3772
|
-
|
|
3772
|
+
q = this.getCategorizedOptions().map(function(X) {
|
|
3773
3773
|
if (X.type === "group") {
|
|
3774
3774
|
var F = X.data, P = X.options, L = X.index, ne = "".concat(n.getElementId("group"), "-").concat(L), _ = "".concat(ne, "-heading");
|
|
3775
3775
|
return /* @__PURE__ */ R.createElement(o, B({}, p, {
|
|
@@ -3793,13 +3793,13 @@ var _n = function(e) {
|
|
|
3793
3793
|
inputValue: y
|
|
3794
3794
|
});
|
|
3795
3795
|
if (Q === null) return null;
|
|
3796
|
-
|
|
3796
|
+
q = /* @__PURE__ */ R.createElement(d, p, Q);
|
|
3797
3797
|
} else {
|
|
3798
|
-
var ue =
|
|
3798
|
+
var ue = te({
|
|
3799
3799
|
inputValue: y
|
|
3800
3800
|
});
|
|
3801
3801
|
if (ue === null) return null;
|
|
3802
|
-
|
|
3802
|
+
q = /* @__PURE__ */ R.createElement(v, p, ue);
|
|
3803
3803
|
}
|
|
3804
3804
|
var ie = {
|
|
3805
3805
|
minMenuHeight: g,
|
|
@@ -3835,7 +3835,7 @@ var _n = function(e) {
|
|
|
3835
3835
|
isLoading: h,
|
|
3836
3836
|
maxHeight: ne,
|
|
3837
3837
|
focusedOption: f
|
|
3838
|
-
}),
|
|
3838
|
+
}), q);
|
|
3839
3839
|
}));
|
|
3840
3840
|
});
|
|
3841
3841
|
return H || Z === "fixed" ? /* @__PURE__ */ R.createElement(c, B({}, p, {
|
|
@@ -4145,10 +4145,10 @@ const rr = (t) => /* @__PURE__ */ T.jsx(ye.NoOptionsMessage, { ...t, className:
|
|
|
4145
4145
|
pattern: H = "",
|
|
4146
4146
|
isCheckMultiOptions: U = !0,
|
|
4147
4147
|
label: Y,
|
|
4148
|
-
required:
|
|
4148
|
+
required: te = !1,
|
|
4149
4149
|
id: K
|
|
4150
4150
|
}, J) => {
|
|
4151
|
-
const D = mt(),
|
|
4151
|
+
const D = mt(), q = K || D, ue = pn("block font-normal text-sm text-foreground mb-1", {
|
|
4152
4152
|
"text-danger": !m && !!f && b
|
|
4153
4153
|
}), ie = Ee(() => p ? e && Array.isArray(p) ? a.filter((X) => p.includes(X.id.toString())) : a.find((X) => X.id.toString() === p.toString()) ?? null : null, [p, a, e]), de = (X, F) => {
|
|
4154
4154
|
let P = X, L = null;
|
|
@@ -4177,16 +4177,16 @@ const rr = (t) => /* @__PURE__ */ T.jsx(ye.NoOptionsMessage, { ...t, className:
|
|
|
4177
4177
|
l && l({ item: L, data: P, action: ne });
|
|
4178
4178
|
};
|
|
4179
4179
|
return /* @__PURE__ */ T.jsxs("div", { className: gn("w-full relative flex flex-col", o), children: [
|
|
4180
|
-
Y && /* @__PURE__ */ T.jsxs("label", { htmlFor:
|
|
4180
|
+
Y && /* @__PURE__ */ T.jsxs("label", { htmlFor: q, className: ue, children: [
|
|
4181
4181
|
Y,
|
|
4182
4182
|
" ",
|
|
4183
|
-
|
|
4183
|
+
te && /* @__PURE__ */ T.jsx("span", { className: "text-danger", children: "*" })
|
|
4184
4184
|
] }),
|
|
4185
4185
|
/* @__PURE__ */ T.jsx("div", { children: /* @__PURE__ */ T.jsx(
|
|
4186
4186
|
Ku,
|
|
4187
4187
|
{
|
|
4188
4188
|
ref: J,
|
|
4189
|
-
id:
|
|
4189
|
+
id: q,
|
|
4190
4190
|
menuIsOpen: V,
|
|
4191
4191
|
name: t,
|
|
4192
4192
|
isMulti: e,
|
|
@@ -4217,7 +4217,9 @@ const rr = (t) => /* @__PURE__ */ T.jsx(ye.NoOptionsMessage, { ...t, className:
|
|
|
4217
4217
|
maxMenuHeight: r,
|
|
4218
4218
|
placeholder: n,
|
|
4219
4219
|
onChange: de,
|
|
4220
|
-
onBlur:
|
|
4220
|
+
onBlur: () => {
|
|
4221
|
+
u && u?.({ target: { name: t || q } });
|
|
4222
|
+
},
|
|
4221
4223
|
styles: or({
|
|
4222
4224
|
color: v,
|
|
4223
4225
|
widthMenu: I,
|
|
@@ -4246,7 +4248,7 @@ var no = ["defaultOptions", "cacheOptions", "loadOptions", "options", "isLoading
|
|
|
4246
4248
|
function ro(t) {
|
|
4247
4249
|
var e = t.defaultOptions, r = e === void 0 ? !1 : e, i = t.cacheOptions, n = i === void 0 ? !1 : i, a = t.loadOptions;
|
|
4248
4250
|
t.options;
|
|
4249
|
-
var o = t.isLoading, l = o === void 0 ? !1 : o, u = t.onInputChange, s = t.filterOption, c = s === void 0 ? null : s, d = Ae(t, no), v = d.inputValue, I = Ie(void 0), p = Ie(!1), f = re(Array.isArray(r) ? r : void 0), b = ae(f, 2), m = b[0], y = b[1], h = re(typeof v < "u" ? v : ""), A = ae(h, 2), g = A[0], G = A[1], x = re(r === !0), V = ae(x, 2), Z = V[0], H = V[1], U = re(void 0), Y = ae(U, 2),
|
|
4251
|
+
var o = t.isLoading, l = o === void 0 ? !1 : o, u = t.onInputChange, s = t.filterOption, c = s === void 0 ? null : s, d = Ae(t, no), v = d.inputValue, I = Ie(void 0), p = Ie(!1), f = re(Array.isArray(r) ? r : void 0), b = ae(f, 2), m = b[0], y = b[1], h = re(typeof v < "u" ? v : ""), A = ae(h, 2), g = A[0], G = A[1], x = re(r === !0), V = ae(x, 2), Z = V[0], H = V[1], U = re(void 0), Y = ae(U, 2), te = Y[0], K = Y[1], J = re([]), D = ae(J, 2), q = D[0], Q = D[1], ue = re(!1), ie = ae(ue, 2), de = ie[0], X = ie[1], F = re({}), P = ae(F, 2), L = P[0], ne = P[1], _ = re(void 0), z = ae(_, 2), me = z[0], Ge = z[1], k = re(void 0), C = ae(k, 2), W = C[0], j = C[1];
|
|
4250
4252
|
n !== W && (ne({}), j(n)), r !== me && (y(Array.isArray(r) ? r : void 0), Ge(r)), Xe(function() {
|
|
4251
4253
|
return p.current = !0, function() {
|
|
4252
4254
|
p.current = !1;
|
|
@@ -4274,11 +4276,11 @@ function ro(t) {
|
|
|
4274
4276
|
G(ge), K(ge), Q(L[ge]), H(!1), X(!1);
|
|
4275
4277
|
else {
|
|
4276
4278
|
var sr = I.current = {};
|
|
4277
|
-
G(ge), H(!0), X(!
|
|
4279
|
+
G(ge), H(!0), X(!te), pe(ge, function(ut) {
|
|
4278
4280
|
p && sr === I.current && (I.current = void 0, H(!1), K(ge), Q(ut || []), X(!1), ne(ut ? E(E({}, L), {}, Re({}, ge, ut)) : L));
|
|
4279
4281
|
});
|
|
4280
4282
|
}
|
|
4281
|
-
}, [n, pe,
|
|
4283
|
+
}, [n, pe, te, L, u]), xe = de ? [] : g && te ? q : m || [];
|
|
4282
4284
|
return E(E({}, d), {}, {
|
|
4283
4285
|
options: xe,
|
|
4284
4286
|
isLoading: Z || l,
|
|
@@ -4323,11 +4325,11 @@ const ho = He(
|
|
|
4323
4325
|
isClearable: H = !0,
|
|
4324
4326
|
pattern: U = "",
|
|
4325
4327
|
isCheckMultiOptions: Y = !0,
|
|
4326
|
-
id:
|
|
4328
|
+
id: te,
|
|
4327
4329
|
label: K,
|
|
4328
4330
|
required: J = !1
|
|
4329
4331
|
}, D) => {
|
|
4330
|
-
const
|
|
4332
|
+
const q = mt(), Q = mt(), ue = te || Q, [ie, de] = re(null), [X, F] = re([]), [P, L] = re([]), _ = pn("block font-normal text-sm text-gray-700 mb-1", {
|
|
4331
4333
|
"text-danger": !m && !!f && b
|
|
4332
4334
|
});
|
|
4333
4335
|
Xe(() => {
|
|
@@ -4399,7 +4401,7 @@ const ho = He(
|
|
|
4399
4401
|
ao,
|
|
4400
4402
|
{
|
|
4401
4403
|
ref: D,
|
|
4402
|
-
id:
|
|
4404
|
+
id: q,
|
|
4403
4405
|
inputId: ue,
|
|
4404
4406
|
menuIsOpen: Z,
|
|
4405
4407
|
isLoading: A,
|