fis-component 0.0.51 → 0.0.53
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 +313 -214
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/src/assets/icons/LineArrowsDown.d.ts +2 -0
- package/dist/cjs/types/src/assets/icons/LineArrowsUp.d.ts +3 -0
- package/dist/cjs/types/src/assets/icons/PositiveIcon.d.ts +3 -0
- package/dist/cjs/types/src/assets/icons/SortTableIcon.d.ts +3 -0
- package/dist/cjs/types/src/assets/icons/index.d.ts +4 -0
- package/dist/cjs/types/src/components/Input/InputField/index.d.ts +2 -0
- package/dist/cjs/types/src/components/Input/InputField/styles.d.ts +3 -1
- package/dist/cjs/types/src/components/MenuSelect/types.d.ts +2 -0
- package/dist/cjs/types/src/components/Pagination/styles.d.ts +18 -6
- package/dist/cjs/types/src/components/Select/Select.stories.d.ts +10 -4
- package/dist/cjs/types/src/components/Select/types.d.ts +20 -17
- package/dist/cjs/types/src/components/Table/Sorter/FISSorter.d.ts +1 -2
- package/dist/esm/index.js +313 -214
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/src/assets/icons/LineArrowsDown.d.ts +2 -0
- package/dist/esm/types/src/assets/icons/LineArrowsUp.d.ts +3 -0
- package/dist/esm/types/src/assets/icons/PositiveIcon.d.ts +3 -0
- package/dist/esm/types/src/assets/icons/SortTableIcon.d.ts +3 -0
- package/dist/esm/types/src/assets/icons/index.d.ts +4 -0
- package/dist/esm/types/src/components/Input/InputField/index.d.ts +2 -0
- package/dist/esm/types/src/components/Input/InputField/styles.d.ts +3 -1
- package/dist/esm/types/src/components/MenuSelect/types.d.ts +2 -0
- package/dist/esm/types/src/components/Pagination/styles.d.ts +18 -6
- package/dist/esm/types/src/components/Select/Select.stories.d.ts +10 -4
- package/dist/esm/types/src/components/Select/types.d.ts +20 -17
- package/dist/esm/types/src/components/Table/Sorter/FISSorter.d.ts +1 -2
- package/dist/index.d.ts +27 -22
- package/package.json +1 -1
|
@@ -22,6 +22,7 @@ export { default as InfoIcon } from "./InfoIcon";
|
|
|
22
22
|
export { default as CheckIcon } from "./CheckIcon";
|
|
23
23
|
export { default as WarningIcon } from "./WarningIcon";
|
|
24
24
|
export { default as ErrorIcon } from "./ErrorIcon";
|
|
25
|
+
export { default as PositiveIcon } from "./PositiveIcon";
|
|
25
26
|
export { default as ArrowDownIcon } from "./ArrowDownIcon";
|
|
26
27
|
export { default as ArrowUpIcon } from "./ArrowUpIcon";
|
|
27
28
|
export { default as CloseChipIcon } from "./CloseChipIcon";
|
|
@@ -39,3 +40,6 @@ export { default as NoResultIcon } from "./NoResultIcon";
|
|
|
39
40
|
export { default as RemoveIcon } from "./RemoveIcon";
|
|
40
41
|
export { default as ChevronLeftIcon } from "./ChevronLeftIcon";
|
|
41
42
|
export { default as ChevronRightIcon } from "./ChevronRightIcon";
|
|
43
|
+
export { default as SortTableIcon } from "./SortTableIcon";
|
|
44
|
+
export { default as LineArrowsDownIcon } from "./LineArrowsDown";
|
|
45
|
+
export { default as LineArrowsUpIcon } from "./LineArrowsUp";
|
|
@@ -27,6 +27,8 @@ export interface InputFieldProps extends Omit<ComponentPropsWithoutRef<"input">,
|
|
|
27
27
|
onClickSuffix?: () => void;
|
|
28
28
|
/** onClickPrefix for current field Button */
|
|
29
29
|
onClickPrefix?: () => void;
|
|
30
|
+
/** Control cursor style */
|
|
31
|
+
$isPointer?: boolean;
|
|
30
32
|
}
|
|
31
33
|
declare const FISInputField: import("react").ForwardRefExoticComponent<InputFieldProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
32
34
|
export default FISInputField;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
export declare const InputSC: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").
|
|
1
|
+
export declare const InputSC: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, {
|
|
2
|
+
$isPointer?: boolean;
|
|
3
|
+
}>> & string;
|
|
2
4
|
export declare const DivIconSC: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
3
5
|
export declare const DivIconSuffixSC: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
4
6
|
export declare const DivIconPrefixSC: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
@@ -14,6 +14,8 @@ export interface MenuProps {
|
|
|
14
14
|
groups: MenuGroup[];
|
|
15
15
|
size?: MenuSize;
|
|
16
16
|
multi?: boolean;
|
|
17
|
+
searchValue?: string;
|
|
18
|
+
onSearchChange?: (value: string) => void;
|
|
17
19
|
selectedValues?: string[];
|
|
18
20
|
onChangeSelected?: (values: string[]) => void;
|
|
19
21
|
loading?: boolean;
|
|
@@ -5,23 +5,35 @@ export declare const DivPaginationContainer: import("styled-components/dist/type
|
|
|
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
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[];
|
|
8
|
+
options: import("../Select/types").SelectOption<string>[];
|
|
9
9
|
message?: string;
|
|
10
|
+
disabled?: boolean;
|
|
10
11
|
placeholderSearch?: string;
|
|
11
12
|
positive?: boolean;
|
|
12
13
|
multiDisplayText?: (count: number) => string;
|
|
13
|
-
renderOption?: (option: import("../Select/types").SelectOption) => React.ReactNode;
|
|
14
|
+
renderOption?: ((option: import("../Select/types").SelectOption<string>) => React.ReactNode) | undefined;
|
|
14
15
|
portal?: boolean;
|
|
15
|
-
} &
|
|
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"> & {
|
|
16
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;
|
|
17
23
|
}) | (Omit<Partial<import("../Input/InputLabel").InputLabelProps> & Omit<import("../MenuSelect/types").MenuProps, "size" | "onClickMenu" | "groups" | "multi" | "selectedValues" | "onChangeSelected"> & Omit<import("../SelectItem").SelectFieldProps, "onChange" | "value"> & {
|
|
18
|
-
options: import("../Select/types").SelectOption[];
|
|
24
|
+
options: import("../Select/types").SelectOption<string>[];
|
|
19
25
|
message?: string;
|
|
26
|
+
disabled?: boolean;
|
|
20
27
|
placeholderSearch?: string;
|
|
21
28
|
positive?: boolean;
|
|
22
29
|
multiDisplayText?: (count: number) => string;
|
|
23
|
-
renderOption?: (option: import("../Select/types").SelectOption) => React.ReactNode;
|
|
30
|
+
renderOption?: ((option: import("../Select/types").SelectOption<string>) => React.ReactNode) | undefined;
|
|
24
31
|
portal?: boolean;
|
|
25
|
-
} &
|
|
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"> & {
|
|
26
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;
|
|
27
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>>;
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import { Meta } from "@storybook/react";
|
|
2
2
|
import { SelectProps } from "./types";
|
|
3
|
-
type
|
|
4
|
-
|
|
3
|
+
type SingleSelectStoryProps = SelectProps<string>;
|
|
4
|
+
type MultiSelectStoryProps = SelectProps<string>;
|
|
5
|
+
declare const _default: Meta<SingleSelectStoryProps>;
|
|
5
6
|
export default _default;
|
|
6
|
-
export declare const Default: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer,
|
|
7
|
-
export declare const
|
|
7
|
+
export declare const Default: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, SingleSelectStoryProps>;
|
|
8
|
+
export declare const WithSearch: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, SingleSelectStoryProps>;
|
|
9
|
+
export declare const MultiSelect: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, MultiSelectStoryProps>;
|
|
10
|
+
export declare const WithValidation: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, SingleSelectStoryProps>;
|
|
11
|
+
export declare const Loading: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, SingleSelectStoryProps>;
|
|
12
|
+
export declare const LargeSize: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, SingleSelectStoryProps>;
|
|
13
|
+
export declare const Disabled: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, SingleSelectStoryProps>;
|
|
@@ -1,32 +1,35 @@
|
|
|
1
1
|
import { InputLabelProps } from "../Input/InputLabel";
|
|
2
2
|
import { MenuProps } from "../MenuSelect/types";
|
|
3
3
|
import { SelectFieldProps } from "../SelectItem";
|
|
4
|
-
export interface SelectOption {
|
|
4
|
+
export interface SelectOption<T = string> {
|
|
5
5
|
groupLabel?: string;
|
|
6
6
|
items: {
|
|
7
7
|
label: string;
|
|
8
8
|
description?: string;
|
|
9
|
-
value:
|
|
9
|
+
value: T;
|
|
10
10
|
}[];
|
|
11
11
|
}
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
type BaseSelectProps<T> = Partial<InputLabelProps> & Omit<MenuProps, "groups" | "multi" | "selectedValues" | "onChangeSelected" | "onClickMenu" | "size"> & Omit<SelectFieldProps, "value" | "onChange"> & {
|
|
13
|
+
options: SelectOption<T>[];
|
|
14
|
+
message?: string;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
placeholderSearch?: string;
|
|
17
|
+
positive?: boolean;
|
|
18
|
+
multiDisplayText?: (count: number) => string;
|
|
19
|
+
renderOption?: (option: SelectOption<T>) => React.ReactNode;
|
|
20
|
+
portal?: boolean;
|
|
21
|
+
};
|
|
22
|
+
export type SingleSelectProps<T> = BaseSelectProps<T> & {
|
|
23
|
+
multi?: false;
|
|
14
24
|
value: T;
|
|
15
25
|
onChange: (value: T) => void;
|
|
16
|
-
displayValue?: (value: SelectOption) => string;
|
|
26
|
+
displayValue?: (value: SelectOption<T>) => string;
|
|
17
27
|
};
|
|
18
|
-
export type
|
|
19
|
-
multi
|
|
28
|
+
export type MultiSelectProps<T> = BaseSelectProps<T> & {
|
|
29
|
+
multi: true;
|
|
20
30
|
value: T[];
|
|
21
31
|
onChange: (value: T[]) => void;
|
|
22
|
-
displayValue?: (value: SelectOption[]) => string;
|
|
32
|
+
displayValue?: (value: SelectOption<T>[]) => string;
|
|
23
33
|
};
|
|
24
|
-
export type SelectProps<T> =
|
|
25
|
-
|
|
26
|
-
message?: string;
|
|
27
|
-
placeholderSearch?: string;
|
|
28
|
-
positive?: boolean;
|
|
29
|
-
multiDisplayText?: (count: number) => string;
|
|
30
|
-
renderOption?: (option: SelectOption) => React.ReactNode;
|
|
31
|
-
portal?: boolean;
|
|
32
|
-
} & (SingleSelect<T> | MultiSelect<T>);
|
|
34
|
+
export type SelectProps<T> = SingleSelectProps<T> | MultiSelectProps<T>;
|
|
35
|
+
export {};
|
|
@@ -6,7 +6,6 @@ interface FISSorterProps {
|
|
|
6
6
|
columnKey: string | null;
|
|
7
7
|
order: string | null;
|
|
8
8
|
};
|
|
9
|
-
colorActive?: string;
|
|
10
9
|
UpIcon?: ComponentType<{
|
|
11
10
|
style?: React.CSSProperties;
|
|
12
11
|
}>;
|
|
@@ -14,5 +13,5 @@ interface FISSorterProps {
|
|
|
14
13
|
style?: React.CSSProperties;
|
|
15
14
|
}>;
|
|
16
15
|
}
|
|
17
|
-
declare const FISSorter: ({ columnKey, onSort, sortedInfo,
|
|
16
|
+
declare const FISSorter: ({ columnKey, onSort, sortedInfo, UpIcon, DownIcon, }: FISSorterProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
17
|
export default FISSorter;
|
package/dist/index.d.ts
CHANGED
|
@@ -3725,6 +3725,8 @@ interface InputFieldProps extends Omit<ComponentPropsWithoutRef<"input">, "onCli
|
|
|
3725
3725
|
onClickSuffix?: () => void;
|
|
3726
3726
|
/** onClickPrefix for current field Button */
|
|
3727
3727
|
onClickPrefix?: () => void;
|
|
3728
|
+
/** Control cursor style */
|
|
3729
|
+
$isPointer?: boolean;
|
|
3728
3730
|
}
|
|
3729
3731
|
declare const FISInputField: React$1.ForwardRefExoticComponent<InputFieldProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
3730
3732
|
|
|
@@ -3859,6 +3861,8 @@ interface MenuProps {
|
|
|
3859
3861
|
groups: MenuGroup[];
|
|
3860
3862
|
size?: MenuSize;
|
|
3861
3863
|
multi?: boolean;
|
|
3864
|
+
searchValue?: string;
|
|
3865
|
+
onSearchChange?: (value: string) => void;
|
|
3862
3866
|
selectedValues?: string[];
|
|
3863
3867
|
onChangeSelected?: (values: string[]) => void;
|
|
3864
3868
|
loading?: boolean;
|
|
@@ -3988,13 +3992,13 @@ interface ComboboxOption {
|
|
|
3988
3992
|
value: string;
|
|
3989
3993
|
}[];
|
|
3990
3994
|
}
|
|
3991
|
-
type SingleSelect
|
|
3995
|
+
type SingleSelect<T> = {
|
|
3992
3996
|
multi?: boolean;
|
|
3993
3997
|
value: T;
|
|
3994
3998
|
onChange: (value: T) => void;
|
|
3995
3999
|
displayValue?: (value: ComboboxOption) => string;
|
|
3996
4000
|
};
|
|
3997
|
-
type MultiSelect
|
|
4001
|
+
type MultiSelect<T> = {
|
|
3998
4002
|
multi: true;
|
|
3999
4003
|
value: T[];
|
|
4000
4004
|
onChange: (value: T[]) => void;
|
|
@@ -4009,7 +4013,7 @@ type ComboboxProps<T> = Omit<InputFieldProps, "value" | "onChange"> & Partial<In
|
|
|
4009
4013
|
renderOption?: (option: ComboboxOption) => React.ReactNode;
|
|
4010
4014
|
noResult?: boolean;
|
|
4011
4015
|
noResultText?: string;
|
|
4012
|
-
} & (SingleSelect
|
|
4016
|
+
} & (SingleSelect<T> | MultiSelect<T>);
|
|
4013
4017
|
|
|
4014
4018
|
declare const FISCombobox: React$1.ForwardRefExoticComponent<ComboboxProps<string> & React$1.RefAttributes<HTMLInputElement>>;
|
|
4015
4019
|
|
|
@@ -4099,7 +4103,6 @@ interface FISSorterProps {
|
|
|
4099
4103
|
columnKey: string | null;
|
|
4100
4104
|
order: string | null;
|
|
4101
4105
|
};
|
|
4102
|
-
colorActive?: string;
|
|
4103
4106
|
UpIcon?: ComponentType<{
|
|
4104
4107
|
style?: React.CSSProperties;
|
|
4105
4108
|
}>;
|
|
@@ -4107,7 +4110,7 @@ interface FISSorterProps {
|
|
|
4107
4110
|
style?: React.CSSProperties;
|
|
4108
4111
|
}>;
|
|
4109
4112
|
}
|
|
4110
|
-
declare const FISSorter: ({ columnKey, onSort, sortedInfo,
|
|
4113
|
+
declare const FISSorter: ({ columnKey, onSort, sortedInfo, UpIcon, DownIcon, }: FISSorterProps) => react_jsx_runtime.JSX.Element;
|
|
4111
4114
|
|
|
4112
4115
|
type DateRangeProps = {
|
|
4113
4116
|
className?: string;
|
|
@@ -4217,35 +4220,37 @@ interface SelectFieldProps extends Omit<ComponentPropsWithoutRef<"input">, "onCl
|
|
|
4217
4220
|
}
|
|
4218
4221
|
declare const FISSelectItem: React$1.ForwardRefExoticComponent<SelectFieldProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
4219
4222
|
|
|
4220
|
-
interface SelectOption {
|
|
4223
|
+
interface SelectOption<T = string> {
|
|
4221
4224
|
groupLabel?: string;
|
|
4222
4225
|
items: {
|
|
4223
4226
|
label: string;
|
|
4224
4227
|
description?: string;
|
|
4225
|
-
value:
|
|
4228
|
+
value: T;
|
|
4226
4229
|
}[];
|
|
4227
4230
|
}
|
|
4228
|
-
type
|
|
4229
|
-
|
|
4231
|
+
type BaseSelectProps<T> = Partial<InputLabelProps> & Omit<MenuProps, "groups" | "multi" | "selectedValues" | "onChangeSelected" | "onClickMenu" | "size"> & Omit<SelectFieldProps, "value" | "onChange"> & {
|
|
4232
|
+
options: SelectOption<T>[];
|
|
4233
|
+
message?: string;
|
|
4234
|
+
disabled?: boolean;
|
|
4235
|
+
placeholderSearch?: string;
|
|
4236
|
+
positive?: boolean;
|
|
4237
|
+
multiDisplayText?: (count: number) => string;
|
|
4238
|
+
renderOption?: (option: SelectOption<T>) => React.ReactNode;
|
|
4239
|
+
portal?: boolean;
|
|
4240
|
+
};
|
|
4241
|
+
type SingleSelectProps<T> = BaseSelectProps<T> & {
|
|
4242
|
+
multi?: false;
|
|
4230
4243
|
value: T;
|
|
4231
4244
|
onChange: (value: T) => void;
|
|
4232
|
-
displayValue?: (value: SelectOption) => string;
|
|
4245
|
+
displayValue?: (value: SelectOption<T>) => string;
|
|
4233
4246
|
};
|
|
4234
|
-
type
|
|
4235
|
-
multi
|
|
4247
|
+
type MultiSelectProps<T> = BaseSelectProps<T> & {
|
|
4248
|
+
multi: true;
|
|
4236
4249
|
value: T[];
|
|
4237
4250
|
onChange: (value: T[]) => void;
|
|
4238
|
-
displayValue?: (value: SelectOption[]) => string;
|
|
4251
|
+
displayValue?: (value: SelectOption<T>[]) => string;
|
|
4239
4252
|
};
|
|
4240
|
-
type SelectProps<T> =
|
|
4241
|
-
options: SelectOption[];
|
|
4242
|
-
message?: string;
|
|
4243
|
-
placeholderSearch?: string;
|
|
4244
|
-
positive?: boolean;
|
|
4245
|
-
multiDisplayText?: (count: number) => string;
|
|
4246
|
-
renderOption?: (option: SelectOption) => React.ReactNode;
|
|
4247
|
-
portal?: boolean;
|
|
4248
|
-
} & (SingleSelect<T> | MultiSelect<T>);
|
|
4253
|
+
type SelectProps<T> = SingleSelectProps<T> | MultiSelectProps<T>;
|
|
4249
4254
|
|
|
4250
4255
|
declare const FISSelect: React$1.ForwardRefExoticComponent<SelectProps<string> & React$1.RefAttributes<HTMLInputElement>>;
|
|
4251
4256
|
|