fis-component 0.1.34 → 0.1.35
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 +12 -14
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/src/components/Select/Select.stories.d.ts +56 -6
- package/dist/esm/index.js +12 -14
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/src/components/Select/Select.stories.d.ts +56 -6
- package/package.json +1 -1
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { SelectOption, SelectProps } from "./types";
|
|
2
|
-
type
|
|
3
|
-
type
|
|
4
|
-
type
|
|
1
|
+
import { FISSelectRef, SelectOption, SelectProps } from "./types";
|
|
2
|
+
type StoryArgs<P> = P extends unknown ? Omit<P, "renderOption" | "displayValue"> : never;
|
|
3
|
+
type SingleSelectStoryProps = StoryArgs<SelectProps<string>>;
|
|
4
|
+
type MultiSelectStoryProps = StoryArgs<SelectProps<string>>;
|
|
5
|
+
type NumberSelectStoryProps = StoryArgs<SelectProps<number>>;
|
|
5
6
|
declare const meta: {
|
|
6
7
|
title: string;
|
|
7
|
-
component: import("react").ForwardRefExoticComponent<SelectProps<string | number> & import("react").RefAttributes<
|
|
8
|
+
component: import("react").ForwardRefExoticComponent<SelectProps<string | number> & import("react").RefAttributes<FISSelectRef>>;
|
|
8
9
|
tags: string[];
|
|
9
10
|
parameters: {
|
|
10
11
|
controls: {
|
|
@@ -33,6 +34,10 @@ declare const meta: {
|
|
|
33
34
|
iconLabel: {
|
|
34
35
|
control: "select";
|
|
35
36
|
options: string[];
|
|
37
|
+
mapping: {
|
|
38
|
+
none: undefined;
|
|
39
|
+
info: import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
};
|
|
36
41
|
};
|
|
37
42
|
required: {
|
|
38
43
|
control: "boolean";
|
|
@@ -57,14 +62,50 @@ declare const meta: {
|
|
|
57
62
|
control: "text";
|
|
58
63
|
};
|
|
59
64
|
multiDisplayText: {
|
|
60
|
-
control:
|
|
65
|
+
control: false;
|
|
61
66
|
};
|
|
62
67
|
removeSelectedText: {
|
|
63
68
|
control: "text";
|
|
64
69
|
};
|
|
70
|
+
selectedGroupLabel: {
|
|
71
|
+
control: "text";
|
|
72
|
+
};
|
|
65
73
|
maxHeight: {
|
|
66
74
|
control: "number";
|
|
67
75
|
};
|
|
76
|
+
portal: {
|
|
77
|
+
control: "boolean";
|
|
78
|
+
};
|
|
79
|
+
hideChip: {
|
|
80
|
+
control: "boolean";
|
|
81
|
+
};
|
|
82
|
+
showSearch: {
|
|
83
|
+
control: "boolean";
|
|
84
|
+
};
|
|
85
|
+
searchDebounce: {
|
|
86
|
+
control: "number";
|
|
87
|
+
};
|
|
88
|
+
noData: {
|
|
89
|
+
control: "boolean";
|
|
90
|
+
};
|
|
91
|
+
noResult: {
|
|
92
|
+
control: "boolean";
|
|
93
|
+
};
|
|
94
|
+
noDataText: {
|
|
95
|
+
control: "text";
|
|
96
|
+
};
|
|
97
|
+
noResultText: {
|
|
98
|
+
control: "text";
|
|
99
|
+
};
|
|
100
|
+
virtualized: {
|
|
101
|
+
control: "boolean";
|
|
102
|
+
};
|
|
103
|
+
virtualItemHeight: {
|
|
104
|
+
control: "number";
|
|
105
|
+
};
|
|
106
|
+
onOpen: {
|
|
107
|
+
action: string;
|
|
108
|
+
};
|
|
68
109
|
};
|
|
69
110
|
args: {
|
|
70
111
|
options: SelectOption<string>[];
|
|
@@ -95,3 +136,12 @@ export declare const SimpleTooltip: import("@storybook/core/csf").AnnotatedStory
|
|
|
95
136
|
export declare const CustomTooltip: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, SingleSelectStoryProps>;
|
|
96
137
|
export declare const SecondaryTooltip: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, SingleSelectStoryProps>;
|
|
97
138
|
export declare const MultiSelectWithTooltip: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, MultiSelectStoryProps>;
|
|
139
|
+
export declare const Positive: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, SingleSelectStoryProps>;
|
|
140
|
+
export declare const MultiSelectCustomText: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, MultiSelectStoryProps>;
|
|
141
|
+
export declare const CustomRender: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, SingleSelectStoryProps>;
|
|
142
|
+
export declare const EmptyStates: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, SingleSelectStoryProps>;
|
|
143
|
+
export declare const SearchControl: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, SingleSelectStoryProps>;
|
|
144
|
+
export declare const Virtualized: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, SingleSelectStoryProps>;
|
|
145
|
+
export declare const LoadMore: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, SingleSelectStoryProps>;
|
|
146
|
+
export declare const NoPortal: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, SingleSelectStoryProps>;
|
|
147
|
+
export declare const WithRef: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, SingleSelectStoryProps>;
|
package/dist/esm/index.js
CHANGED
|
@@ -67176,10 +67176,6 @@ const DivContainerSC$4 = styled.div `
|
|
|
67176
67176
|
background-color: ${getTheme("com/input/field/disable/background-color")};
|
|
67177
67177
|
}
|
|
67178
67178
|
|
|
67179
|
-
&:has(${InputSC$1}:disabled) {
|
|
67180
|
-
pointer-events: none;
|
|
67181
|
-
}
|
|
67182
|
-
|
|
67183
67179
|
&.negative {
|
|
67184
67180
|
outline-color: ${getTheme("com/input/field/negative/border/default")};
|
|
67185
67181
|
background-color: ${getTheme("com/input/field/negative/background/default")};
|
|
@@ -72324,7 +72320,7 @@ const DivContainer = styled.div `
|
|
|
72324
72320
|
}
|
|
72325
72321
|
}}
|
|
72326
72322
|
|
|
72327
|
-
&:hover:not(:has(.button-icon:hover)) {
|
|
72323
|
+
&:hover:not(:has(.button-icon:hover)):not(.disabled) {
|
|
72328
72324
|
outline-offset: -${getTheme("com/chips-button/stroke-width/hover")};
|
|
72329
72325
|
${(props) => {
|
|
72330
72326
|
switch (props.$theme) {
|
|
@@ -72569,7 +72565,6 @@ const DivContainer = styled.div `
|
|
|
72569
72565
|
if ($disabled) {
|
|
72570
72566
|
return css `
|
|
72571
72567
|
cursor: not-allowed;
|
|
72572
|
-
pointer-events: none;
|
|
72573
72568
|
background-color: ${getTheme("com/chips-button/disable/background-color")};
|
|
72574
72569
|
outline: ${getTheme("com/chips-button/stroke-width/default")} solid
|
|
72575
72570
|
${getTheme("com/chips-button/disable/color-stroke")};
|
|
@@ -72660,11 +72655,11 @@ const DivIcon$1 = styled.div `
|
|
|
72660
72655
|
}
|
|
72661
72656
|
}}
|
|
72662
72657
|
|
|
72663
|
-
${DivContainer}:hover:not(:has(.button-icon:hover)) & {
|
|
72658
|
+
${DivContainer}:hover:not(:has(.button-icon:hover)):not(.disabled) & {
|
|
72664
72659
|
${iconStateColor("hover")}
|
|
72665
72660
|
}
|
|
72666
72661
|
|
|
72667
|
-
${DivContainer}:active & {
|
|
72662
|
+
${DivContainer}:active:not(.disabled) & {
|
|
72668
72663
|
${iconStateColor("pressed")}
|
|
72669
72664
|
}
|
|
72670
72665
|
|
|
@@ -72775,11 +72770,11 @@ const SpanLabel$1 = styled.span `
|
|
|
72775
72770
|
}
|
|
72776
72771
|
}}
|
|
72777
72772
|
|
|
72778
|
-
${DivContainer}:hover:not(:has(.button-icon:hover)) & {
|
|
72773
|
+
${DivContainer}:hover:not(:has(.button-icon:hover)):not(.disabled) & {
|
|
72779
72774
|
${labelStateColor("hover")}
|
|
72780
72775
|
}
|
|
72781
72776
|
|
|
72782
|
-
${DivContainer}:active & {
|
|
72777
|
+
${DivContainer}:active:not(.disabled) & {
|
|
72783
72778
|
${labelStateColor("pressed")}
|
|
72784
72779
|
}
|
|
72785
72780
|
|
|
@@ -72848,7 +72843,8 @@ const FISChipButton = forwardRef((props, ref) => {
|
|
|
72848
72843
|
: size === "md"
|
|
72849
72844
|
? "sm"
|
|
72850
72845
|
: "md";
|
|
72851
|
-
return (jsxs(DivContainer, { ...rest, ref: ref, "$size": size, "$theme": theme, "$rounded": rounded, "$disabled": disabled, className: classNames(className, {
|
|
72846
|
+
return (jsxs(DivContainer, { ...rest, ref: ref, "$size": size, "$theme": theme, "$rounded": rounded, "$disabled": disabled, onClick: disabled ? undefined : rest.onClick, className: classNames(className, {
|
|
72847
|
+
disabled,
|
|
72852
72848
|
selected,
|
|
72853
72849
|
"no-padding": closeable,
|
|
72854
72850
|
// "no-padding-horizontal": !closeable && !icon && !srcAvatar,
|
|
@@ -73784,8 +73780,10 @@ const DivColumnCellContainerSC = styled.div `
|
|
|
73784
73780
|
background-color: transparent;
|
|
73785
73781
|
}
|
|
73786
73782
|
background-color: ${getTheme("com/table/row-cell/disable/background-color")};
|
|
73787
|
-
pointer-events: none;
|
|
73788
73783
|
cursor: not-allowed;
|
|
73784
|
+
.icon-box {
|
|
73785
|
+
pointer-events: none;
|
|
73786
|
+
}
|
|
73789
73787
|
.content {
|
|
73790
73788
|
color: ${getTheme("com/table/row-cell/disable/label/color-text")};
|
|
73791
73789
|
}
|
|
@@ -73891,7 +73889,7 @@ const DivIconSC = styled.div `
|
|
|
73891
73889
|
`;
|
|
73892
73890
|
|
|
73893
73891
|
const FISTableCell = forwardRef(({ className, textAlign, variant = COLUMN_VARIANT.PRIMARY, content, description, icon, disabled, hasBorder, onChange, contentWrapText = false, tooltip = false, placement = "top", variantTooltip = "primary", ...rest }, ref) => {
|
|
73894
|
-
return (jsx(FISTooltip, { variant: variantTooltip, placement: placement, title: tooltip ? content || "" : undefined, children: jsx(DivColumnCellContainerSC, { "$hasBorder": hasBorder, "$disabled": disabled, "$variant": variant, "$textAlign": textAlign, "$contentWrapText": contentWrapText, "$hasContent": content ? "true" : undefined, "$hasDescription": description, ref: ref, className: classNames("column-cell-container", className), ...rest, children: textAlign === COLUMN_TEXT_ALIGN.SINGLE_LINE ? (jsxs("div", { className: "single-line-content", children: [icon && (jsx("div", { className: "icon-box", children: jsx(DivIconSC, { "$textAlign": textAlign, "$variant": variant, "$disabled": disabled, "$hasContent": content ? "true" : undefined, "$hasDescription": description, children: icon }) })), (content || description) && (jsxs("div", { className: "content-box", children: [content && jsx("div", { className: "content", children: content }), description && (jsx("div", { className: "description", children: description }))] }))] })) : (jsxs("div", { className: "left-right-content", children: [(icon || content) && (jsxs("div", { className: "content-box", children: [icon && (jsx(DivIconSC, { "$textAlign": textAlign, "$variant": variant, "$disabled": disabled, "$hasContent": content ? "true" : undefined, "$hasDescription": description, children: icon })), content && jsx("div", { className: "content", children: content })] })), description && jsx("div", { className: "description", children: description })] })) }) }));
|
|
73892
|
+
return (jsx(FISTooltip, { variant: variantTooltip, placement: placement, title: tooltip ? content || "" : undefined, children: jsx(DivColumnCellContainerSC, { "$hasBorder": hasBorder, "$disabled": disabled, "$variant": variant, "$textAlign": textAlign, "$contentWrapText": contentWrapText, "$hasContent": content ? "true" : undefined, "$hasDescription": description, ref: ref, className: classNames("column-cell-container", className), ...rest, onClick: disabled ? undefined : rest.onClick, children: textAlign === COLUMN_TEXT_ALIGN.SINGLE_LINE ? (jsxs("div", { className: "single-line-content", children: [icon && (jsx("div", { className: "icon-box", children: jsx(DivIconSC, { "$textAlign": textAlign, "$variant": variant, "$disabled": disabled, "$hasContent": content ? "true" : undefined, "$hasDescription": description, children: icon }) })), (content || description) && (jsxs("div", { className: "content-box", children: [content && jsx("div", { className: "content", children: content }), description && (jsx("div", { className: "description", children: description }))] }))] })) : (jsxs("div", { className: "left-right-content", children: [(icon || content) && (jsxs("div", { className: "content-box", children: [icon && (jsx(DivIconSC, { "$textAlign": textAlign, "$variant": variant, "$disabled": disabled, "$hasContent": content ? "true" : undefined, "$hasDescription": description, children: icon })), content && jsx("div", { className: "content", children: content })] })), description && jsx("div", { className: "description", children: description })] })) }) }));
|
|
73895
73893
|
});
|
|
73896
73894
|
FISTableCell.displayName = "FISTableCell";
|
|
73897
73895
|
|
|
@@ -75946,7 +75944,7 @@ const FISSelect = forwardRef(({ className, style, size = "md", options, value, d
|
|
|
75946
75944
|
}
|
|
75947
75945
|
}, [isOpen, multi]);
|
|
75948
75946
|
const renderSelectInput = () => {
|
|
75949
|
-
const selectInput = (jsx(DivInputWrapperSC, { ref: setReferenceElement, onClick: handleToggle, "$hasValue": !!value, children: jsx(FISSelectItem, { ...restProps, onBlur: handleBlur, ref: inputRef, size: size, placeholder: placeholder, iconSuffix: isOpen ? jsx(ArrowUpIcon, {}) : jsx(ArrowDownIcon, {}), value: computedDisplayValue, onChange: () => undefined, disabled: disabled, activeDropdown: isOpen, negative: negative }) }));
|
|
75947
|
+
const selectInput = (jsx(DivInputWrapperSC, { ref: setReferenceElement, onClick: handleToggle, "$hasValue": !!value && !disabled, children: jsx(FISSelectItem, { ...restProps, onBlur: handleBlur, ref: inputRef, size: size, placeholder: placeholder, iconSuffix: isOpen ? jsx(ArrowUpIcon, {}) : jsx(ArrowDownIcon, {}), value: computedDisplayValue, onChange: () => undefined, disabled: disabled, activeDropdown: isOpen, negative: negative }) }));
|
|
75950
75948
|
if (tooltipTitle) {
|
|
75951
75949
|
return (jsx(FISTooltip, { title: tooltipTitle, variant: tooltipVariant, smartPlacement: true, children: selectInput }));
|
|
75952
75950
|
}
|