nexaas-ui-components 1.0.56 → 1.0.58
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 +41 -19
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +42 -20
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1820,7 +1820,7 @@ var FilterOptions = ({
|
|
|
1820
1820
|
className: clsx9__default.default({
|
|
1821
1821
|
["text-label group-active:text-blue-500"]: !field.value && !open,
|
|
1822
1822
|
["text-blue-500"]: open && !field.value,
|
|
1823
|
-
["text-blue-500 group-hover:text-
|
|
1823
|
+
["text-blue-500 group-hover:text-white"]: open && field.value
|
|
1824
1824
|
}),
|
|
1825
1825
|
children: icon
|
|
1826
1826
|
}
|
|
@@ -1832,7 +1832,7 @@ var FilterOptions = ({
|
|
|
1832
1832
|
{
|
|
1833
1833
|
["text-paragraph group-active:text-blue-500"]: !field.value && !open,
|
|
1834
1834
|
["text-blue-500"]: open && !field.value,
|
|
1835
|
-
["text-blue-500 group-hover:text-
|
|
1835
|
+
["text-blue-500 group-hover:text-white"]: open && field.value
|
|
1836
1836
|
},
|
|
1837
1837
|
"truncate cursor-pointer"
|
|
1838
1838
|
),
|
|
@@ -1840,14 +1840,26 @@ var FilterOptions = ({
|
|
|
1840
1840
|
}
|
|
1841
1841
|
),
|
|
1842
1842
|
isMulti && field.value && field.value.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-blue-500 text-white text-p-xs px-1 py-[2px] rounded group-hover:bg-blue-500", children: field.value.length }),
|
|
1843
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1843
|
+
open ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1844
|
+
"i",
|
|
1845
|
+
{
|
|
1846
|
+
className: clsx9__default.default(
|
|
1847
|
+
{
|
|
1848
|
+
["text-label group-active:text-blue-500"]: !field.value && !open,
|
|
1849
|
+
["text-blue-500"]: open && !field.value,
|
|
1850
|
+
["text-blue-500 group-hover:text-white"]: open && field.value
|
|
1851
|
+
},
|
|
1852
|
+
"uil uil-angle-up text-[18px]"
|
|
1853
|
+
)
|
|
1854
|
+
}
|
|
1855
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
1844
1856
|
"i",
|
|
1845
1857
|
{
|
|
1846
1858
|
className: clsx9__default.default(
|
|
1847
1859
|
{
|
|
1848
1860
|
["text-label group-active:text-blue-500"]: !field.value && !open,
|
|
1849
1861
|
["text-blue-500"]: open && !field.value,
|
|
1850
|
-
["text-blue-500 group-hover:text-
|
|
1862
|
+
["text-blue-500 group-hover:text-white"]: open && field.value
|
|
1851
1863
|
},
|
|
1852
1864
|
"uil uil-angle-down text-[18px]"
|
|
1853
1865
|
)
|
|
@@ -3419,11 +3431,13 @@ var SelectFieldBip = React5.forwardRef(
|
|
|
3419
3431
|
onChange(fetchedOptions[0]);
|
|
3420
3432
|
setTimeout(() => {
|
|
3421
3433
|
var _a3, _b, _c;
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3434
|
+
if (clearAfterSelect) {
|
|
3435
|
+
setInputValue("");
|
|
3436
|
+
(_a3 = selectRef == null ? void 0 : selectRef.current) == null ? void 0 : _a3.clearValue();
|
|
3437
|
+
(_b = selectRef == null ? void 0 : selectRef.current) == null ? void 0 : _b.focus();
|
|
3438
|
+
(_c = selectRef == null ? void 0 : selectRef.current) == null ? void 0 : _c.onMenuClose();
|
|
3439
|
+
field.onChange(null);
|
|
3440
|
+
}
|
|
3427
3441
|
}, 10);
|
|
3428
3442
|
} else {
|
|
3429
3443
|
onErrorBip((_a2 = event == null ? void 0 : event.target) == null ? void 0 : _a2.value);
|
|
@@ -3434,7 +3448,7 @@ var SelectFieldBip = React5.forwardRef(
|
|
|
3434
3448
|
};
|
|
3435
3449
|
const handleInputChange = (value, actionMeta) => {
|
|
3436
3450
|
if (actionMeta.action === "input-change") {
|
|
3437
|
-
setInputValue(value);
|
|
3451
|
+
if (clearAfterSelect) setInputValue(value);
|
|
3438
3452
|
}
|
|
3439
3453
|
return value;
|
|
3440
3454
|
};
|
|
@@ -3450,15 +3464,19 @@ var SelectFieldBip = React5.forwardRef(
|
|
|
3450
3464
|
field.onChange(null);
|
|
3451
3465
|
} else {
|
|
3452
3466
|
field.onChange(value);
|
|
3453
|
-
|
|
3454
|
-
|
|
3467
|
+
if (clearAfterSelect) {
|
|
3468
|
+
setInputValue("");
|
|
3469
|
+
(_d = selectRef == null ? void 0 : selectRef.current) == null ? void 0 : _d.onMenuClose();
|
|
3470
|
+
}
|
|
3455
3471
|
}
|
|
3456
3472
|
}
|
|
3457
3473
|
if (action === "clear-value") {
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3474
|
+
if (clearAfterSelect) {
|
|
3475
|
+
setInputValue("");
|
|
3476
|
+
setCachedOptions([]);
|
|
3477
|
+
(_e = selectRef == null ? void 0 : selectRef.current) == null ? void 0 : _e.clearValue();
|
|
3478
|
+
field.onChange(null);
|
|
3479
|
+
}
|
|
3462
3480
|
}
|
|
3463
3481
|
};
|
|
3464
3482
|
const loadOptions = (value, callback) => {
|
|
@@ -3476,9 +3494,13 @@ var SelectFieldBip = React5.forwardRef(
|
|
|
3476
3494
|
...hasIcon,
|
|
3477
3495
|
ref: selectRef,
|
|
3478
3496
|
isDisabled: disabled,
|
|
3479
|
-
onBlur: () =>
|
|
3480
|
-
|
|
3481
|
-
|
|
3497
|
+
onBlur: () => {
|
|
3498
|
+
if (clearAfterSelect) {
|
|
3499
|
+
handleInputChange("", {
|
|
3500
|
+
action: "input-change"
|
|
3501
|
+
});
|
|
3502
|
+
}
|
|
3503
|
+
},
|
|
3482
3504
|
loadingMessage: () => /* @__PURE__ */ jsxRuntime.jsx("div", { children: messages.loading }),
|
|
3483
3505
|
isLoading: loading,
|
|
3484
3506
|
loadOptions,
|