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/esm/index.js
CHANGED
|
@@ -66338,7 +66338,7 @@ const PTitleSC$2 = styled.p `
|
|
|
66338
66338
|
${getTheme("Paragraph/Sm")}
|
|
66339
66339
|
color: ${getTheme("com/menu/item/action/label/color-text/default")};
|
|
66340
66340
|
`;
|
|
66341
|
-
|
|
66341
|
+
styled.div `
|
|
66342
66342
|
display: flex;
|
|
66343
66343
|
flex-direction: column;
|
|
66344
66344
|
height: 100%;
|
|
@@ -67449,7 +67449,7 @@ const FISMenuSelect = ({ placeholder, groups, size = "md", multi = false, select
|
|
|
67449
67449
|
onClickMenu?.();
|
|
67450
67450
|
}
|
|
67451
67451
|
};
|
|
67452
|
-
return (
|
|
67452
|
+
return (jsxs(DivContainerSC$4, { className: className, children: [showInput && !combobox && (jsx(DivSearchSC, { children: jsx(FISInputText, { iconPrefix: jsx(SearchIcon, {}), placeholder: placeholder, value: search, onChange: handleSearchChange }) })), (shouldShowNoResult || noResult) && (jsxs(DivLoaderSC, { children: [jsx(DivIconDataSC, { children: jsx(NoResultIcon, {}) }), jsx(PTitleSC$2, { children: noResultText })] })), noData && (jsxs(DivLoaderSC, { children: [jsx(DivIconDataSC, { children: jsx(NoDataIcon, {}) }), jsx(PTitleSC$2, { children: noDataText })] })), loading && (jsxs(DivLoaderSC, { children: [jsx(FISProgressCircular, { size: size, variant: "indeterminate" }), jsx(PTitleSC$2, { children: loadingText })] })), !shouldShowNoResult && !noData && !loading && (jsxs(Fragment, { children: [jsx(MenuContent, { "$removeSelectedGroup": !!removeSelectedGroup, children: groupsToRender.map((group, index) => (jsxs(DivWrapperSC$4, { children: [index !== 0 && jsx(FISMenuSection, { withDivider: true }), group?.groupLabel && (jsx(FISMenuSection, { label: group?.groupLabel })), group.items.map((item, idx) => (jsx(FISMenuItem, { title: item.label, description: item.description, size: size, onClickMenu: () => handleItemClick(item), selected: selectedValues.includes(item.value), type: "select" }, idx)))] }, index))) }), removeSelectedGroup && (jsx(FixedBottomSection, { children: jsx(DivWrapperSC$4, { children: removeSelectedGroup.items.map((item, idx) => (jsx(FISMenuItem, { title: item.label, description: item.description, size: size, onClickMenu: () => onChangeSelected?.([]), type: "select", iconPrefix: jsx(RemoveIcon, {}), negative: true }, idx))) }) }))] }))] }));
|
|
67453
67453
|
};
|
|
67454
67454
|
FISMenuSelect.displayName = "FISMenuSelect";
|
|
67455
67455
|
|
|
@@ -73350,7 +73350,7 @@ const FISSelect = forwardRef(({ className, style, size = "md", options, value, d
|
|
|
73350
73350
|
];
|
|
73351
73351
|
}, [options, value, multi]);
|
|
73352
73352
|
const selectedItems = useMemo$1(() => {
|
|
73353
|
-
const allItems =
|
|
73353
|
+
const allItems = options.flatMap((group) => group.items);
|
|
73354
73354
|
if (multi) {
|
|
73355
73355
|
return allItems.filter((item) => value.includes(item.value));
|
|
73356
73356
|
}
|
|
@@ -73358,7 +73358,7 @@ const FISSelect = forwardRef(({ className, style, size = "md", options, value, d
|
|
|
73358
73358
|
const found = allItems.find((item) => item.value === value);
|
|
73359
73359
|
return found ? [found] : [];
|
|
73360
73360
|
}
|
|
73361
|
-
}, [value, multi]);
|
|
73361
|
+
}, [value, multi, options]);
|
|
73362
73362
|
const computedDisplayValue = () => {
|
|
73363
73363
|
if (multi) {
|
|
73364
73364
|
const count = value.length;
|