fis-component 0.0.54 → 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
|
@@ -4,36 +4,3 @@ export declare const PaginationAntdSC: import("styled-components/dist/types").IS
|
|
|
4
4
|
export declare const DivPaginationContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
5
5
|
export declare const DivPaginationContent: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
6
6
|
export declare const SpanTotalSC: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
|
|
7
|
-
export declare const SelectPageSizeSC: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<(Omit<Partial<import("../Input/InputLabel").InputLabelProps> & Omit<import("../MenuSelect/types").MenuProps, "size" | "onClickMenu" | "groups" | "multi" | "selectedValues" | "onChangeSelected"> & Omit<import("../SelectItem").SelectFieldProps, "onChange" | "value"> & {
|
|
8
|
-
options: import("../Select/types").SelectOption<string>[];
|
|
9
|
-
message?: string;
|
|
10
|
-
disabled?: boolean;
|
|
11
|
-
placeholderSearch?: string;
|
|
12
|
-
positive?: boolean;
|
|
13
|
-
multiDisplayText?: (count: number) => string;
|
|
14
|
-
renderOption?: ((option: import("../Select/types").SelectOption<string>) => React.ReactNode) | undefined;
|
|
15
|
-
portal?: boolean;
|
|
16
|
-
} & {
|
|
17
|
-
multi?: false;
|
|
18
|
-
value: string;
|
|
19
|
-
onChange: (value: string) => void;
|
|
20
|
-
displayValue?: ((value: import("../Select/types").SelectOption<string>) => string) | undefined;
|
|
21
|
-
} & import("react").RefAttributes<HTMLInputElement>, "ref"> & {
|
|
22
|
-
ref?: ((instance: HTMLInputElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLInputElement> | null | undefined;
|
|
23
|
-
}) | (Omit<Partial<import("../Input/InputLabel").InputLabelProps> & Omit<import("../MenuSelect/types").MenuProps, "size" | "onClickMenu" | "groups" | "multi" | "selectedValues" | "onChangeSelected"> & Omit<import("../SelectItem").SelectFieldProps, "onChange" | "value"> & {
|
|
24
|
-
options: import("../Select/types").SelectOption<string>[];
|
|
25
|
-
message?: string;
|
|
26
|
-
disabled?: boolean;
|
|
27
|
-
placeholderSearch?: string;
|
|
28
|
-
positive?: boolean;
|
|
29
|
-
multiDisplayText?: (count: number) => string;
|
|
30
|
-
renderOption?: ((option: import("../Select/types").SelectOption<string>) => React.ReactNode) | undefined;
|
|
31
|
-
portal?: boolean;
|
|
32
|
-
} & {
|
|
33
|
-
multi: true;
|
|
34
|
-
value: string[];
|
|
35
|
-
onChange: (value: string[]) => void;
|
|
36
|
-
displayValue?: ((value: import("../Select/types").SelectOption<string>[]) => string) | undefined;
|
|
37
|
-
} & import("react").RefAttributes<HTMLInputElement>, "ref"> & {
|
|
38
|
-
ref?: ((instance: HTMLInputElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLInputElement> | null | undefined;
|
|
39
|
-
}), import("styled-components/dist/types").BaseObject>> & string & Omit<import("react").ForwardRefExoticComponent<import("../Select/types").SelectProps<string> & import("react").RefAttributes<HTMLInputElement>>, keyof import("react").Component<any, {}, any>>;
|
package/dist/esm/index.js
CHANGED
|
@@ -66337,7 +66337,7 @@ const PTitleSC$2 = styled.p `
|
|
|
66337
66337
|
${getTheme("Paragraph/Sm")}
|
|
66338
66338
|
color: ${getTheme("com/menu/item/action/label/color-text/default")};
|
|
66339
66339
|
`;
|
|
66340
|
-
|
|
66340
|
+
styled.div `
|
|
66341
66341
|
display: flex;
|
|
66342
66342
|
flex-direction: column;
|
|
66343
66343
|
height: 100%;
|
|
@@ -66346,7 +66346,7 @@ const DivWrapperSC$4 = styled.div `
|
|
|
66346
66346
|
display: flex;
|
|
66347
66347
|
flex-direction: column;
|
|
66348
66348
|
gap: ${getTheme("com/menu/item/horizontal-gap")};
|
|
66349
|
-
min-width: ${getTheme("com/menu/item/min-width")};
|
|
66349
|
+
/* min-width: ${getTheme("com/menu/item/min-width")}; */
|
|
66350
66350
|
min-height: ${getTheme("com/menu/item/size-md/min-height")};
|
|
66351
66351
|
background-color: ${getTheme("com/menu/item/action/background-color/default")};
|
|
66352
66352
|
`;
|
|
@@ -66587,7 +66587,7 @@ const DivItemSC = styled.div `
|
|
|
66587
66587
|
box-sizing: border-box;
|
|
66588
66588
|
gap: ${getTheme("com/menu/item/horizontal-gap")};
|
|
66589
66589
|
border-radius: ${getTheme("com/menu/item/corner-radius")};
|
|
66590
|
-
min-width: ${getTheme("com/menu/item/min-width")};
|
|
66590
|
+
/* min-width: ${getTheme("com/menu/item/min-width")}; */
|
|
66591
66591
|
|
|
66592
66592
|
${(props) => {
|
|
66593
66593
|
switch (props.$size) {
|
|
@@ -67448,7 +67448,7 @@ const FISMenuSelect = ({ placeholder, groups, size = "md", multi = false, select
|
|
|
67448
67448
|
onClickMenu?.();
|
|
67449
67449
|
}
|
|
67450
67450
|
};
|
|
67451
|
-
return (
|
|
67451
|
+
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 && 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))) }) }))] }))] }));
|
|
67452
67452
|
};
|
|
67453
67453
|
FISMenuSelect.displayName = "FISMenuSelect";
|
|
67454
67454
|
|
|
@@ -70936,7 +70936,7 @@ const FISInputTime = forwardRef((props, ref) => {
|
|
|
70936
70936
|
setIsOpen(open);
|
|
70937
70937
|
}
|
|
70938
70938
|
};
|
|
70939
|
-
return (jsxs(DivContainerSC$2, { className: className, children: [(textLabel || iconLabel) && (jsx(FISInputLabel, { textLabel: textLabel, required: required, iconLabel: iconLabel, onClickIconLabel: onClickIconLabel })), jsxs(DivInputTimeSC, { children: [jsx(FISInputField, { ...rest, ref: ref, typeSuffix: "icon", iconSuffix: jsx(TimeIcon, {}), negative: negative, value: inputValue, onChange: handleInputChange, onFocus: handleClickInput, onClickSuffix: handleClickInput }), jsx(HiddenTimePickerSC, { format: format, value: timeValue, onChange: handleTimeChange, open: isOpen, onOpenChange: handleOpenChange })] }), message && (jsx(DivHintWrapperSC, { children: jsx(SpanHintSC, { className: classNames({
|
|
70939
|
+
return (jsxs(DivContainerSC$2, { className: className, children: [(textLabel || iconLabel) && (jsx(FISInputLabel, { textLabel: textLabel, required: required, iconLabel: iconLabel, onClickIconLabel: onClickIconLabel })), jsxs(DivInputTimeSC, { children: [jsx(FISInputField, { ...rest, ref: ref, typeSuffix: "icon", iconSuffix: jsx(TimeIcon, {}), negative: negative, value: inputValue, onChange: handleInputChange, onFocus: handleClickInput, onClickSuffix: handleClickInput }), jsx(HiddenTimePickerSC, { format: format, value: timeValue, onChange: handleTimeChange, open: isOpen, onOpenChange: handleOpenChange, getPopupContainer: (triggerNode) => triggerNode.parentElement || document.body })] }), message && (jsx(DivHintWrapperSC, { children: jsx(SpanHintSC, { className: classNames({
|
|
70940
70940
|
disabled: disabled,
|
|
70941
70941
|
negative: negative,
|
|
70942
70942
|
positive: positive,
|
|
@@ -71030,7 +71030,7 @@ const FISInputDate = forwardRef((props, ref) => {
|
|
|
71030
71030
|
onChange?.(null);
|
|
71031
71031
|
}
|
|
71032
71032
|
};
|
|
71033
|
-
return (jsxs(DivWrapperSC$2, { children: [(textLabel || iconLabel) && (jsx(FISInputLabel, { textLabel: textLabel, required: required, iconLabel: iconLabel, onClickIconLabel: onClickIconLabel })), jsxs(DivInputWrapperSC$1, { children: [jsx(FISInputField, { ...restProps, ref: mergeRef, typeSuffix: "icon", iconSuffix: jsx(DateIcon, {}), value: inputValue, negative: negative, disabled: disabled, onFocus: () => setOpen(true), onChange: handleInputChange, onClickSuffix: () => setOpen(true) }), jsx(HiddenDatePickerSC, { open: open, value: dateValue, onChange: (value) => handleChange(value), onOpenChange: handleOpenChange, format: format
|
|
71033
|
+
return (jsxs(DivWrapperSC$2, { children: [(textLabel || iconLabel) && (jsx(FISInputLabel, { textLabel: textLabel, required: required, iconLabel: iconLabel, onClickIconLabel: onClickIconLabel })), jsxs(DivInputWrapperSC$1, { children: [jsx(FISInputField, { ...restProps, ref: mergeRef, typeSuffix: "icon", iconSuffix: jsx(DateIcon, {}), value: inputValue, negative: negative, disabled: disabled, onFocus: () => setOpen(true), onChange: handleInputChange, onClickSuffix: () => setOpen(true) }), jsx(HiddenDatePickerSC, { open: open, value: dateValue, onChange: (value) => handleChange(value), onOpenChange: handleOpenChange, format: format })] }), message && (jsx(DivHintWrapperSC$1, { children: jsx(SpanHintSC$3, { className: classNames({
|
|
71034
71034
|
disabled,
|
|
71035
71035
|
negative,
|
|
71036
71036
|
positive,
|
|
@@ -73348,6 +73348,9 @@ const FISSelect = forwardRef(({ className, size = "md", options, value, disabled
|
|
|
73348
73348
|
const computedDisplayValue = useMemo$1(() => {
|
|
73349
73349
|
if (multi) {
|
|
73350
73350
|
const count = value.length;
|
|
73351
|
+
if (count === 0) {
|
|
73352
|
+
return "";
|
|
73353
|
+
}
|
|
73351
73354
|
return multiDisplayText
|
|
73352
73355
|
? multiDisplayText(count)
|
|
73353
73356
|
: `Selected ${count.toString().padStart(2, "0")} option${count !== 1 ? "s" : ""}`;
|
|
@@ -73357,7 +73360,7 @@ const FISSelect = forwardRef(({ className, size = "md", options, value, disabled
|
|
|
73357
73360
|
return "";
|
|
73358
73361
|
return (displayValue?.(selectedItems[0]) || selectedItems[0].label);
|
|
73359
73362
|
}
|
|
73360
|
-
}, [value, multi, displayValue, multiDisplayText, selectedItems]);
|
|
73363
|
+
}, [value, multi, displayValue, multiDisplayText, selectedItems, options]);
|
|
73361
73364
|
const handleToggle = useCallback(() => {
|
|
73362
73365
|
if (!disabled)
|
|
73363
73366
|
setIsOpen((prev) => !prev);
|
|
@@ -73447,6 +73450,7 @@ const useToast = () => {
|
|
|
73447
73450
|
return context;
|
|
73448
73451
|
};
|
|
73449
73452
|
|
|
73453
|
+
// import FISSelect from "../Select";
|
|
73450
73454
|
const PaginationAntdSC = styled(Pagination) `
|
|
73451
73455
|
display: flex;
|
|
73452
73456
|
align-items: center;
|
|
@@ -73570,10 +73574,10 @@ const SpanTotalSC = styled.span `
|
|
|
73570
73574
|
${getTheme("Paragraph/Sm")};
|
|
73571
73575
|
color: ${getTheme("com/pagination/range-number/label/color-text")} !important;
|
|
73572
73576
|
`;
|
|
73573
|
-
const SelectPageSizeSC = styled(FISSelect)
|
|
73574
|
-
|
|
73575
|
-
|
|
73576
|
-
`;
|
|
73577
|
+
// export const SelectPageSizeSC = styled(FISSelect)`
|
|
73578
|
+
// // fixed
|
|
73579
|
+
// width: 100px;
|
|
73580
|
+
// `;
|
|
73577
73581
|
|
|
73578
73582
|
const LIMIT_DEFAULT = 10;
|
|
73579
73583
|
const FISPagination = ({ pageSize = LIMIT_DEFAULT, current = 1, total = 0, minimize, recordCounted, onIconPageRecordClick, showTotal, ...rest }) => {
|
|
@@ -73605,7 +73609,7 @@ const FISPagination = ({ pageSize = LIMIT_DEFAULT, current = 1, total = 0, minim
|
|
|
73605
73609
|
}
|
|
73606
73610
|
return originalElement;
|
|
73607
73611
|
};
|
|
73608
|
-
return (jsxs(DivPaginationContainer, { children: [jsx(SpanTotalSC, { children: showTotal ? showTotal(total, rangeRecords) : defaultShowTotal }), jsxs(DivPaginationContent, { children: [jsx(PaginationAntdSC, { ...mergedProps, "$minimize": Boolean(minimize), showSizeChanger: false, itemRender: itemRender }), jsx(
|
|
73612
|
+
return (jsxs(DivPaginationContainer, { children: [jsx(SpanTotalSC, { children: showTotal ? showTotal(total, rangeRecords) : defaultShowTotal }), jsxs(DivPaginationContent, { children: [jsx(PaginationAntdSC, { ...mergedProps, "$minimize": Boolean(minimize), showSizeChanger: false, itemRender: itemRender }), jsx(FISSelect, { size: "xs", options: [
|
|
73609
73613
|
{
|
|
73610
73614
|
groupLabel: "",
|
|
73611
73615
|
items: (rest.pageSizeOptions || [10, 20, 50, 100]).map((size) => ({
|