fis-component 0.0.55 → 0.0.56
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 +16 -12
- 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 +16 -12
- 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,
|
|
@@ -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);
|
|
@@ -73467,6 +73470,7 @@ const useToast = () => {
|
|
|
73467
73470
|
return context;
|
|
73468
73471
|
};
|
|
73469
73472
|
|
|
73473
|
+
// import FISSelect from "../Select";
|
|
73470
73474
|
const PaginationAntdSC = styled(Pagination) `
|
|
73471
73475
|
display: flex;
|
|
73472
73476
|
align-items: center;
|
|
@@ -73590,10 +73594,10 @@ const SpanTotalSC = styled.span `
|
|
|
73590
73594
|
${getTheme("Paragraph/Sm")};
|
|
73591
73595
|
color: ${getTheme("com/pagination/range-number/label/color-text")} !important;
|
|
73592
73596
|
`;
|
|
73593
|
-
const SelectPageSizeSC = styled(FISSelect)
|
|
73594
|
-
|
|
73595
|
-
|
|
73596
|
-
`;
|
|
73597
|
+
// export const SelectPageSizeSC = styled(FISSelect)`
|
|
73598
|
+
// // fixed
|
|
73599
|
+
// width: 100px;
|
|
73600
|
+
// `;
|
|
73597
73601
|
|
|
73598
73602
|
const LIMIT_DEFAULT = 10;
|
|
73599
73603
|
const FISPagination = ({ pageSize = LIMIT_DEFAULT, current = 1, total = 0, minimize, recordCounted, onIconPageRecordClick, showTotal, ...rest }) => {
|
|
@@ -73625,7 +73629,7 @@ const FISPagination = ({ pageSize = LIMIT_DEFAULT, current = 1, total = 0, minim
|
|
|
73625
73629
|
}
|
|
73626
73630
|
return originalElement;
|
|
73627
73631
|
};
|
|
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(
|
|
73632
|
+
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, { size: "xs", options: [
|
|
73629
73633
|
{
|
|
73630
73634
|
groupLabel: "",
|
|
73631
73635
|
items: (rest.pageSizeOptions || [10, 20, 50, 100]).map((size) => ({
|