fis-component 0.0.51 → 0.0.52
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 +243 -123
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/src/assets/icons/PositiveIcon.d.ts +3 -0
- package/dist/cjs/types/src/assets/icons/index.d.ts +1 -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/esm/index.js +243 -123
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/src/assets/icons/PositiveIcon.d.ts +3 -0
- package/dist/esm/types/src/assets/icons/index.d.ts +1 -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/index.d.ts +26 -20
- 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";
|
|
@@ -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 {};
|
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
|
|
|
@@ -4217,35 +4221,37 @@ interface SelectFieldProps extends Omit<ComponentPropsWithoutRef<"input">, "onCl
|
|
|
4217
4221
|
}
|
|
4218
4222
|
declare const FISSelectItem: React$1.ForwardRefExoticComponent<SelectFieldProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
4219
4223
|
|
|
4220
|
-
interface SelectOption {
|
|
4224
|
+
interface SelectOption<T = string> {
|
|
4221
4225
|
groupLabel?: string;
|
|
4222
4226
|
items: {
|
|
4223
4227
|
label: string;
|
|
4224
4228
|
description?: string;
|
|
4225
|
-
value:
|
|
4229
|
+
value: T;
|
|
4226
4230
|
}[];
|
|
4227
4231
|
}
|
|
4228
|
-
type
|
|
4229
|
-
|
|
4232
|
+
type BaseSelectProps<T> = Partial<InputLabelProps> & Omit<MenuProps, "groups" | "multi" | "selectedValues" | "onChangeSelected" | "onClickMenu" | "size"> & Omit<SelectFieldProps, "value" | "onChange"> & {
|
|
4233
|
+
options: SelectOption<T>[];
|
|
4234
|
+
message?: string;
|
|
4235
|
+
disabled?: boolean;
|
|
4236
|
+
placeholderSearch?: string;
|
|
4237
|
+
positive?: boolean;
|
|
4238
|
+
multiDisplayText?: (count: number) => string;
|
|
4239
|
+
renderOption?: (option: SelectOption<T>) => React.ReactNode;
|
|
4240
|
+
portal?: boolean;
|
|
4241
|
+
};
|
|
4242
|
+
type SingleSelectProps<T> = BaseSelectProps<T> & {
|
|
4243
|
+
multi?: false;
|
|
4230
4244
|
value: T;
|
|
4231
4245
|
onChange: (value: T) => void;
|
|
4232
|
-
displayValue?: (value: SelectOption) => string;
|
|
4246
|
+
displayValue?: (value: SelectOption<T>) => string;
|
|
4233
4247
|
};
|
|
4234
|
-
type
|
|
4235
|
-
multi
|
|
4248
|
+
type MultiSelectProps<T> = BaseSelectProps<T> & {
|
|
4249
|
+
multi: true;
|
|
4236
4250
|
value: T[];
|
|
4237
4251
|
onChange: (value: T[]) => void;
|
|
4238
|
-
displayValue?: (value: SelectOption[]) => string;
|
|
4252
|
+
displayValue?: (value: SelectOption<T>[]) => string;
|
|
4239
4253
|
};
|
|
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>);
|
|
4254
|
+
type SelectProps<T> = SingleSelectProps<T> | MultiSelectProps<T>;
|
|
4249
4255
|
|
|
4250
4256
|
declare const FISSelect: React$1.ForwardRefExoticComponent<SelectProps<string> & React$1.RefAttributes<HTMLInputElement>>;
|
|
4251
4257
|
|