kiban-design-system 1.1.10-hotfix.0 → 1.1.11-hotfix.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.css.map +1 -1
- package/dist/index.js +15 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -30541,6 +30541,7 @@ const AlphaZipCodeInput = ({ label, isRequired, items, onBlur, onFocus, onChange
|
|
|
30541
30541
|
const [isFocusActive, setIsFocusActive] = useState(false);
|
|
30542
30542
|
const [showPopover, setShowPopover] = useState(false);
|
|
30543
30543
|
const handleOnBlur = () => {
|
|
30544
|
+
setShowPopover(false);
|
|
30544
30545
|
setIsFocusActive(false);
|
|
30545
30546
|
if (onBlur)
|
|
30546
30547
|
onBlur();
|
|
@@ -30574,7 +30575,20 @@ const AlphaZipCodeInput = ({ label, isRequired, items, onBlur, onFocus, onChange
|
|
|
30574
30575
|
}));
|
|
30575
30576
|
const optionListMarkup = items.length > 0 ? (jsx(OptionList, { items: itemsOptions, selected: [''], onChange: handleOnSelectItem }, void 0)) : null;
|
|
30576
30577
|
const emptyItemsMarkup = items.length === 0 ? (jsx("div", Object.assign({ className: `${COMPONENT_NAME}__EmptyItems` }, { children: labelEmpty }), void 0)) : null;
|
|
30577
|
-
const popoverMarkup = useMemo(() => (jsx(Popover$1, Object.assign({ activator: inputMarkup, isActive: showPopover, isFullWidth: true, onClose: () => setShowPopover(false), isFixed: true }, { children: jsxs(Popover$1.Pane, { children: [optionListMarkup, emptyItemsMarkup] }, void 0) }),
|
|
30578
|
+
const popoverMarkup = useMemo(() => (jsx(Popover$1, Object.assign({ activator: inputMarkup, isActive: showPopover, isFullWidth: true, onClose: () => setShowPopover(false), isFixed: true }, { children: jsxs(Popover$1.Pane, { children: [optionListMarkup, emptyItemsMarkup] }, void 0) }), items.length)), [
|
|
30579
|
+
items,
|
|
30580
|
+
value,
|
|
30581
|
+
showPopover,
|
|
30582
|
+
emptyItemsMarkup,
|
|
30583
|
+
optionListMarkup,
|
|
30584
|
+
isFocusActive,
|
|
30585
|
+
]);
|
|
30586
|
+
useEffect(() => {
|
|
30587
|
+
if (showPopover) {
|
|
30588
|
+
setShowPopover(false);
|
|
30589
|
+
requestAnimationFrame(() => setShowPopover(true));
|
|
30590
|
+
}
|
|
30591
|
+
}, [items]);
|
|
30578
30592
|
return (jsxs("div", Object.assign({ className: `${COMPONENT_NAME}__Wrapper` }, { children: [labelMarkup, popoverMarkup] }), void 0));
|
|
30579
30593
|
};
|
|
30580
30594
|
|