fis-component 0.0.57 → 0.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/cjs/index.js +18 -7
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/src/components/Combobox/types.d.ts +1 -1
- package/dist/cjs/types/src/components/MenuSelect/types.d.ts +3 -3
- package/dist/cjs/types/src/components/Select/Select.stories.d.ts +2 -0
- package/dist/cjs/types/src/components/Select/index.d.ts +1 -1
- package/dist/cjs/types/src/components/Select/types.d.ts +5 -5
- package/dist/esm/index.js +18 -7
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/src/components/Combobox/types.d.ts +1 -1
- package/dist/esm/types/src/components/MenuSelect/types.d.ts +3 -3
- package/dist/esm/types/src/components/Select/Select.stories.d.ts +2 -0
- package/dist/esm/types/src/components/Select/index.d.ts +1 -1
- package/dist/esm/types/src/components/Select/types.d.ts +5 -5
- package/dist/index.d.ts +10 -10
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -66357,7 +66357,7 @@ const PTitleSC$2 = styled.p `
|
|
|
66357
66357
|
${getTheme("Paragraph/Sm")}
|
|
66358
66358
|
color: ${getTheme("com/menu/item/action/label/color-text/default")};
|
|
66359
66359
|
`;
|
|
66360
|
-
styled.div `
|
|
66360
|
+
const DivWrapperMenuSC = styled.div `
|
|
66361
66361
|
display: flex;
|
|
66362
66362
|
flex-direction: column;
|
|
66363
66363
|
height: 100%;
|
|
@@ -67468,7 +67468,7 @@ const FISMenuSelect = ({ placeholder, groups, size = "md", multi = false, select
|
|
|
67468
67468
|
onClickMenu?.();
|
|
67469
67469
|
}
|
|
67470
67470
|
};
|
|
67471
|
-
return (jsxRuntime.
|
|
67471
|
+
return (jsxRuntime.jsx(DivContainerSC$4, { className: className, children: jsxRuntime.jsxs(DivWrapperMenuSC, { 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))) }) }))] }))] }) }));
|
|
67472
67472
|
};
|
|
67473
67473
|
FISMenuSelect.displayName = "FISMenuSelect";
|
|
67474
67474
|
|
|
@@ -70932,6 +70932,19 @@ const FISInputTime = React.forwardRef((props, ref) => {
|
|
|
70932
70932
|
const [inputValue, setInputValue] = React.useState("");
|
|
70933
70933
|
const [timeValue, setTimeValue] = React.useState(null);
|
|
70934
70934
|
const [isOpen, setIsOpen] = React.useState(false);
|
|
70935
|
+
const containerRef = React.useRef(null);
|
|
70936
|
+
React.useEffect(() => {
|
|
70937
|
+
const handleClickOutside = (event) => {
|
|
70938
|
+
if (containerRef.current &&
|
|
70939
|
+
!containerRef.current.contains(event.target)) {
|
|
70940
|
+
setIsOpen(false);
|
|
70941
|
+
}
|
|
70942
|
+
};
|
|
70943
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
70944
|
+
return () => {
|
|
70945
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
70946
|
+
};
|
|
70947
|
+
}, []);
|
|
70935
70948
|
const handleTimeChange = (time) => {
|
|
70936
70949
|
setTimeValue(time);
|
|
70937
70950
|
setInputValue(time ? time.format(format) : "");
|
|
@@ -70956,7 +70969,7 @@ const FISInputTime = React.forwardRef((props, ref) => {
|
|
|
70956
70969
|
setIsOpen(open);
|
|
70957
70970
|
}
|
|
70958
70971
|
};
|
|
70959
|
-
return (jsxRuntime.jsxs(DivContainerSC$2, { className: className, children: [(textLabel || iconLabel) && (jsxRuntime.jsx(FISInputLabel, { textLabel: textLabel, required: required, iconLabel: iconLabel, onClickIconLabel: onClickIconLabel })), jsxRuntime.jsxs(DivInputTimeSC, { children: [jsxRuntime.jsx(FISInputField, { ...rest, ref: ref, typeSuffix: "icon", iconSuffix: jsxRuntime.jsx(TimeIcon, {}), negative: negative, value: inputValue, onChange: handleInputChange, onFocus: handleClickInput, onClickSuffix: handleClickInput }), jsxRuntime.jsx(HiddenTimePickerSC, { format: format, value: timeValue, onChange: handleTimeChange, open: isOpen, onOpenChange: handleOpenChange, getPopupContainer: (triggerNode) => triggerNode.parentElement || document.body })] }), message && (jsxRuntime.jsx(DivHintWrapperSC, { children: jsxRuntime.jsx(SpanHintSC, { className: classNames({
|
|
70972
|
+
return (jsxRuntime.jsxs(DivContainerSC$2, { className: className, ref: containerRef, children: [(textLabel || iconLabel) && (jsxRuntime.jsx(FISInputLabel, { textLabel: textLabel, required: required, iconLabel: iconLabel, onClickIconLabel: onClickIconLabel })), jsxRuntime.jsxs(DivInputTimeSC, { children: [jsxRuntime.jsx(FISInputField, { ...rest, ref: ref, typeSuffix: "icon", iconSuffix: jsxRuntime.jsx(TimeIcon, {}), negative: negative, value: inputValue, onChange: handleInputChange, onFocus: handleClickInput, onClickSuffix: handleClickInput }), jsxRuntime.jsx(HiddenTimePickerSC, { format: format, value: timeValue, onChange: handleTimeChange, open: isOpen, onOpenChange: handleOpenChange, getPopupContainer: (triggerNode) => triggerNode.parentElement || document.body })] }), message && (jsxRuntime.jsx(DivHintWrapperSC, { children: jsxRuntime.jsx(SpanHintSC, { className: classNames({
|
|
70960
70973
|
disabled: disabled,
|
|
70961
70974
|
negative: negative,
|
|
70962
70975
|
positive: positive,
|
|
@@ -73368,9 +73381,6 @@ const FISSelect = React.forwardRef(({ className, style, size = "md", options, va
|
|
|
73368
73381
|
const computedDisplayValue = React.useMemo(() => {
|
|
73369
73382
|
if (multi) {
|
|
73370
73383
|
const count = value.length;
|
|
73371
|
-
if (count === 0) {
|
|
73372
|
-
return "";
|
|
73373
|
-
}
|
|
73374
73384
|
return multiDisplayText
|
|
73375
73385
|
? multiDisplayText(count)
|
|
73376
73386
|
: `Selected ${count.toString().padStart(2, "0")} option${count !== 1 ? "s" : ""}`;
|
|
@@ -73572,6 +73582,7 @@ const PaginationAntdSC = styled(Pagination) `
|
|
|
73572
73582
|
`}
|
|
73573
73583
|
`;
|
|
73574
73584
|
const DivPaginationContainer = styled.div `
|
|
73585
|
+
width: 100%;
|
|
73575
73586
|
display: flex;
|
|
73576
73587
|
align-items: center;
|
|
73577
73588
|
justify-content: space-between;
|
|
@@ -73624,7 +73635,7 @@ const FISPagination = ({ pageSize = LIMIT_DEFAULT, current = 1, total = 0, minim
|
|
|
73624
73635
|
}
|
|
73625
73636
|
return originalElement;
|
|
73626
73637
|
};
|
|
73627
|
-
return (jsxRuntime.jsxs(DivPaginationContainer, { children: [jsxRuntime.jsx(SpanTotalSC, { children: showTotal ? showTotal(total, rangeRecords) : defaultShowTotal }), jsxRuntime.jsxs(DivPaginationContent, { children: [jsxRuntime.jsx(PaginationAntdSC, { ...mergedProps, "$minimize": Boolean(minimize), showSizeChanger: false, itemRender: itemRender }), jsxRuntime.jsx(FISSelect, { style: { width: "
|
|
73638
|
+
return (jsxRuntime.jsxs(DivPaginationContainer, { children: [jsxRuntime.jsx(SpanTotalSC, { children: showTotal ? showTotal(total, rangeRecords) : defaultShowTotal }), jsxRuntime.jsxs(DivPaginationContent, { children: [jsxRuntime.jsx(PaginationAntdSC, { ...mergedProps, "$minimize": Boolean(minimize), showSizeChanger: false, itemRender: itemRender }), jsxRuntime.jsx(FISSelect, { style: { width: "94px" }, size: "xs", options: [
|
|
73628
73639
|
{
|
|
73629
73640
|
groupLabel: "",
|
|
73630
73641
|
items: (rest.pageSizeOptions || [10, 20, 50, 100]).map((size) => ({
|