fis-component 0.0.55 → 0.0.57
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 +13 -14
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/src/components/Pagination/styles.d.ts +0 -33
- package/dist/esm/index.js +13 -14
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/src/components/Pagination/styles.d.ts +0 -33
- 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
|
-
|
|
66360
|
+
styled.div `
|
|
66361
66361
|
display: flex;
|
|
66362
66362
|
flex-direction: column;
|
|
66363
66363
|
height: 100%;
|
|
@@ -66366,7 +66366,7 @@ const DivWrapperSC$4 = styled.div `
|
|
|
66366
66366
|
display: flex;
|
|
66367
66367
|
flex-direction: column;
|
|
66368
66368
|
gap: ${getTheme("com/menu/item/horizontal-gap")};
|
|
66369
|
-
min-width: ${getTheme("com/menu/item/min-width")};
|
|
66369
|
+
/* min-width: ${getTheme("com/menu/item/min-width")}; */
|
|
66370
66370
|
min-height: ${getTheme("com/menu/item/size-md/min-height")};
|
|
66371
66371
|
background-color: ${getTheme("com/menu/item/action/background-color/default")};
|
|
66372
66372
|
`;
|
|
@@ -66607,7 +66607,7 @@ const DivItemSC = styled.div `
|
|
|
66607
66607
|
box-sizing: border-box;
|
|
66608
66608
|
gap: ${getTheme("com/menu/item/horizontal-gap")};
|
|
66609
66609
|
border-radius: ${getTheme("com/menu/item/corner-radius")};
|
|
66610
|
-
min-width: ${getTheme("com/menu/item/min-width")};
|
|
66610
|
+
/* min-width: ${getTheme("com/menu/item/min-width")}; */
|
|
66611
66611
|
|
|
66612
66612
|
${(props) => {
|
|
66613
66613
|
switch (props.$size) {
|
|
@@ -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.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 && 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
|
|
|
@@ -70956,7 +70956,7 @@ const FISInputTime = React.forwardRef((props, ref) => {
|
|
|
70956
70956
|
setIsOpen(open);
|
|
70957
70957
|
}
|
|
70958
70958
|
};
|
|
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 })] }), message && (jsxRuntime.jsx(DivHintWrapperSC, { children: jsxRuntime.jsx(SpanHintSC, { className: classNames({
|
|
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({
|
|
70960
70960
|
disabled: disabled,
|
|
70961
70961
|
negative: negative,
|
|
70962
70962
|
positive: positive,
|
|
@@ -71050,7 +71050,7 @@ const FISInputDate = React.forwardRef((props, ref) => {
|
|
|
71050
71050
|
onChange?.(null);
|
|
71051
71051
|
}
|
|
71052
71052
|
};
|
|
71053
|
-
return (jsxRuntime.jsxs(DivWrapperSC$2, { children: [(textLabel || iconLabel) && (jsxRuntime.jsx(FISInputLabel, { textLabel: textLabel, required: required, iconLabel: iconLabel, onClickIconLabel: onClickIconLabel })), jsxRuntime.jsxs(DivInputWrapperSC$1, { children: [jsxRuntime.jsx(FISInputField, { ...restProps, ref: mergeRef, typeSuffix: "icon", iconSuffix: jsxRuntime.jsx(DateIcon, {}), value: inputValue, negative: negative, disabled: disabled, onFocus: () => setOpen(true), onChange: handleInputChange, onClickSuffix: () => setOpen(true) }), jsxRuntime.jsx(HiddenDatePickerSC, { open: open, value: dateValue, onChange: (value) => handleChange(value), onOpenChange: handleOpenChange, format: format
|
|
71053
|
+
return (jsxRuntime.jsxs(DivWrapperSC$2, { children: [(textLabel || iconLabel) && (jsxRuntime.jsx(FISInputLabel, { textLabel: textLabel, required: required, iconLabel: iconLabel, onClickIconLabel: onClickIconLabel })), jsxRuntime.jsxs(DivInputWrapperSC$1, { children: [jsxRuntime.jsx(FISInputField, { ...restProps, ref: mergeRef, typeSuffix: "icon", iconSuffix: jsxRuntime.jsx(DateIcon, {}), value: inputValue, negative: negative, disabled: disabled, onFocus: () => setOpen(true), onChange: handleInputChange, onClickSuffix: () => setOpen(true) }), jsxRuntime.jsx(HiddenDatePickerSC, { open: open, value: dateValue, onChange: (value) => handleChange(value), onOpenChange: handleOpenChange, format: format })] }), message && (jsxRuntime.jsx(DivHintWrapperSC$1, { children: jsxRuntime.jsx(SpanHintSC$3, { className: classNames({
|
|
71054
71054
|
disabled,
|
|
71055
71055
|
negative,
|
|
71056
71056
|
positive,
|
|
@@ -73311,7 +73311,7 @@ function isMenuSize(value) {
|
|
|
73311
73311
|
return value === "sm" || value === "md";
|
|
73312
73312
|
}
|
|
73313
73313
|
|
|
73314
|
-
const FISSelect = React.forwardRef(({ className, size = "md", options, value, disabled = false, textLabel = "", iconLabel, required, negative, message, positive, multi, placeholderSearch, loading, onChange, renderOption, onClickIconLabel, displayValue, multiDisplayText, searchValue, onSearchChange, portal, ...restProps }, ref) => {
|
|
73314
|
+
const FISSelect = React.forwardRef(({ className, style, size = "md", options, value, disabled = false, textLabel = "", iconLabel, required, negative, message, positive, multi, placeholderSearch, loading, onChange, renderOption, onClickIconLabel, displayValue, multiDisplayText, searchValue, onSearchChange, portal, ...restProps }, ref) => {
|
|
73315
73315
|
const [isOpen, setIsOpen] = React.useState(false);
|
|
73316
73316
|
const [referenceElement, setReferenceElement] = React.useState(null);
|
|
73317
73317
|
const [popperElement, setPopperElement] = React.useState(null);
|
|
@@ -73368,6 +73368,9 @@ const FISSelect = React.forwardRef(({ className, size = "md", options, value, di
|
|
|
73368
73368
|
const computedDisplayValue = React.useMemo(() => {
|
|
73369
73369
|
if (multi) {
|
|
73370
73370
|
const count = value.length;
|
|
73371
|
+
if (count === 0) {
|
|
73372
|
+
return "";
|
|
73373
|
+
}
|
|
73371
73374
|
return multiDisplayText
|
|
73372
73375
|
? multiDisplayText(count)
|
|
73373
73376
|
: `Selected ${count.toString().padStart(2, "0")} option${count !== 1 ? "s" : ""}`;
|
|
@@ -73377,7 +73380,7 @@ const FISSelect = React.forwardRef(({ className, size = "md", options, value, di
|
|
|
73377
73380
|
return "";
|
|
73378
73381
|
return (displayValue?.(selectedItems[0]) || selectedItems[0].label);
|
|
73379
73382
|
}
|
|
73380
|
-
}, [value, multi, displayValue, multiDisplayText, selectedItems]);
|
|
73383
|
+
}, [value, multi, displayValue, multiDisplayText, selectedItems, options]);
|
|
73381
73384
|
const handleToggle = React.useCallback(() => {
|
|
73382
73385
|
if (!disabled)
|
|
73383
73386
|
setIsOpen((prev) => !prev);
|
|
@@ -73443,7 +73446,7 @@ const FISSelect = React.forwardRef(({ className, size = "md", options, value, di
|
|
|
73443
73446
|
document.addEventListener("mousedown", handleClickOutside);
|
|
73444
73447
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
73445
73448
|
}, [referenceElement, popperElement]);
|
|
73446
|
-
return (jsxRuntime.jsxs(DivWrapperSC$1, { className: className, children: [(textLabel || iconLabel) && (jsxRuntime.jsx(FISInputLabel, { textLabel: textLabel, required: required, iconLabel: iconLabel, onClickIconLabel: onClickIconLabel })), jsxRuntime.jsx(DivInputWrapperSC, { ref: setReferenceElement, onClick: handleToggle, children: jsxRuntime.jsx(FISSelectItem, { ...restProps, ref: ref, size: size, iconSuffix: isOpen ? jsxRuntime.jsx(ArrowUpIcon, {}) : jsxRuntime.jsx(ArrowDownIcon, {}), value: computedDisplayValue, disabled: disabled, activeDropdown: isOpen }) }), message && (jsxRuntime.jsx(SpanHintSC$3, { className: classNames({ disabled, negative, positive }), children: message })), multi && value.length > 0 && (jsxRuntime.jsx(SelectedTagsWrapper, { children: jsxRuntime.jsx(MultipleValue, { options: selectedItems, onRemove: handleOptionRemove }) })), isOpen && (jsxRuntime.jsx(Portal, { portal: portal, children: jsxRuntime.jsx(DivDropdownMenuSC, { ref: setPopperElement, style: {
|
|
73449
|
+
return (jsxRuntime.jsxs(DivWrapperSC$1, { className: className, style: style, children: [(textLabel || iconLabel) && (jsxRuntime.jsx(FISInputLabel, { textLabel: textLabel, required: required, iconLabel: iconLabel, onClickIconLabel: onClickIconLabel })), jsxRuntime.jsx(DivInputWrapperSC, { ref: setReferenceElement, onClick: handleToggle, children: jsxRuntime.jsx(FISSelectItem, { ...restProps, ref: ref, size: size, iconSuffix: isOpen ? jsxRuntime.jsx(ArrowUpIcon, {}) : jsxRuntime.jsx(ArrowDownIcon, {}), value: computedDisplayValue, disabled: disabled, activeDropdown: isOpen }) }), message && (jsxRuntime.jsx(SpanHintSC$3, { className: classNames({ disabled, negative, positive }), children: message })), multi && value.length > 0 && (jsxRuntime.jsx(SelectedTagsWrapper, { children: jsxRuntime.jsx(MultipleValue, { options: selectedItems, onRemove: handleOptionRemove }) })), isOpen && (jsxRuntime.jsx(Portal, { portal: portal, children: jsxRuntime.jsx(DivDropdownMenuSC, { ref: setPopperElement, style: {
|
|
73447
73450
|
...styles.popper,
|
|
73448
73451
|
width: referenceElement?.offsetWidth,
|
|
73449
73452
|
zIndex: 9999,
|
|
@@ -73590,10 +73593,6 @@ const SpanTotalSC = styled.span `
|
|
|
73590
73593
|
${getTheme("Paragraph/Sm")};
|
|
73591
73594
|
color: ${getTheme("com/pagination/range-number/label/color-text")} !important;
|
|
73592
73595
|
`;
|
|
73593
|
-
const SelectPageSizeSC = styled(FISSelect) `
|
|
73594
|
-
// fixed
|
|
73595
|
-
width: 100px;
|
|
73596
|
-
`;
|
|
73597
73596
|
|
|
73598
73597
|
const LIMIT_DEFAULT = 10;
|
|
73599
73598
|
const FISPagination = ({ pageSize = LIMIT_DEFAULT, current = 1, total = 0, minimize, recordCounted, onIconPageRecordClick, showTotal, ...rest }) => {
|
|
@@ -73625,7 +73624,7 @@ const FISPagination = ({ pageSize = LIMIT_DEFAULT, current = 1, total = 0, minim
|
|
|
73625
73624
|
}
|
|
73626
73625
|
return originalElement;
|
|
73627
73626
|
};
|
|
73628
|
-
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(
|
|
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: "92px" }, size: "xs", options: [
|
|
73629
73628
|
{
|
|
73630
73629
|
groupLabel: "",
|
|
73631
73630
|
items: (rest.pageSizeOptions || [10, 20, 50, 100]).map((size) => ({
|