fis-component 0.0.61 → 0.0.63
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/cjs/index.js +4 -4
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +4 -4
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -66358,7 +66358,7 @@ const PTitleSC$2 = styled.p `
|
|
|
66358
66358
|
${getTheme("Paragraph/Sm")}
|
|
66359
66359
|
color: ${getTheme("com/menu/item/action/label/color-text/default")};
|
|
66360
66360
|
`;
|
|
66361
|
-
|
|
66361
|
+
styled.div `
|
|
66362
66362
|
display: flex;
|
|
66363
66363
|
flex-direction: column;
|
|
66364
66364
|
height: 100%;
|
|
@@ -67469,7 +67469,7 @@ const FISMenuSelect = ({ placeholder, groups, size = "md", multi = false, select
|
|
|
67469
67469
|
onClickMenu?.();
|
|
67470
67470
|
}
|
|
67471
67471
|
};
|
|
67472
|
-
return (jsxRuntime.
|
|
67472
|
+
return (jsxRuntime.jsxs(DivContainerSC$4, { className: className, children: [showInput && !combobox && (jsxRuntime.jsx(DivSearchSC, { children: jsxRuntime.jsx(FISInputText, { iconPrefix: jsxRuntime.jsx(SearchIcon, {}), placeholder: placeholder, value: search, onChange: handleSearchChange }) })), (shouldShowNoResult || noResult) && (jsxRuntime.jsxs(DivLoaderSC, { children: [jsxRuntime.jsx(DivIconDataSC, { children: jsxRuntime.jsx(NoResultIcon, {}) }), jsxRuntime.jsx(PTitleSC$2, { children: noResultText })] })), noData && (jsxRuntime.jsxs(DivLoaderSC, { children: [jsxRuntime.jsx(DivIconDataSC, { children: jsxRuntime.jsx(NoDataIcon, {}) }), jsxRuntime.jsx(PTitleSC$2, { children: noDataText })] })), loading && (jsxRuntime.jsxs(DivLoaderSC, { children: [jsxRuntime.jsx(FISProgressCircular, { size: size, variant: "indeterminate" }), jsxRuntime.jsx(PTitleSC$2, { children: loadingText })] })), !shouldShowNoResult && !noData && !loading && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(MenuContent, { "$removeSelectedGroup": !!removeSelectedGroup, children: groupsToRender.map((group, index) => (jsxRuntime.jsxs(DivWrapperSC$4, { children: [index !== 0 && jsxRuntime.jsx(FISMenuSection, { withDivider: true }), group?.groupLabel && (jsxRuntime.jsx(FISMenuSection, { label: group?.groupLabel })), group.items.map((item, idx) => (jsxRuntime.jsx(FISMenuItem, { title: item.label, description: item.description, size: size, onClickMenu: () => handleItemClick(item), selected: selectedValues.includes(item.value), type: "select" }, idx)))] }, index))) }), removeSelectedGroup && (jsxRuntime.jsx(FixedBottomSection, { children: jsxRuntime.jsx(DivWrapperSC$4, { children: removeSelectedGroup.items.map((item, idx) => (jsxRuntime.jsx(FISMenuItem, { title: item.label, description: item.description, size: size, onClickMenu: () => onChangeSelected?.([]), type: "select", iconPrefix: jsxRuntime.jsx(RemoveIcon, {}), negative: true }, idx))) }) }))] }))] }));
|
|
67473
67473
|
};
|
|
67474
67474
|
FISMenuSelect.displayName = "FISMenuSelect";
|
|
67475
67475
|
|
|
@@ -73370,7 +73370,7 @@ const FISSelect = React.forwardRef(({ className, style, size = "md", options, va
|
|
|
73370
73370
|
];
|
|
73371
73371
|
}, [options, value, multi]);
|
|
73372
73372
|
const selectedItems = React.useMemo(() => {
|
|
73373
|
-
const allItems =
|
|
73373
|
+
const allItems = options.flatMap((group) => group.items);
|
|
73374
73374
|
if (multi) {
|
|
73375
73375
|
return allItems.filter((item) => value.includes(item.value));
|
|
73376
73376
|
}
|
|
@@ -73378,7 +73378,7 @@ const FISSelect = React.forwardRef(({ className, style, size = "md", options, va
|
|
|
73378
73378
|
const found = allItems.find((item) => item.value === value);
|
|
73379
73379
|
return found ? [found] : [];
|
|
73380
73380
|
}
|
|
73381
|
-
}, [value, multi]);
|
|
73381
|
+
}, [value, multi, options]);
|
|
73382
73382
|
const computedDisplayValue = () => {
|
|
73383
73383
|
if (multi) {
|
|
73384
73384
|
const count = value.length;
|