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.
@@ -0,0 +1,3 @@
1
+ import { SvgIconProps } from "./SVGIconProps";
2
+ declare function PositiveIcon(props: SvgIconProps): import("react/jsx-runtime").JSX.Element;
3
+ export default PositiveIcon;
@@ -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").FastOmit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, never>> & string;
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
- } & import("../Select/types").SingleSelect<string> & import("react").RefAttributes<HTMLInputElement>, "ref"> & {
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
- } & import("../Select/types").MultiSelect<string> & import("react").RefAttributes<HTMLInputElement>, "ref"> & {
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 ComboboxStoryProps = SelectProps<string>;
4
- declare const _default: Meta<ComboboxStoryProps>;
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, ComboboxStoryProps>;
7
- export declare const DefaultMulti: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, ComboboxStoryProps>;
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: string;
9
+ value: T;
10
10
  }[];
11
11
  }
12
- export type SingleSelect<T> = {
13
- multi?: boolean;
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 MultiSelect<T> = {
19
- multi?: boolean;
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> = Partial<InputLabelProps> & Omit<MenuProps, "groups" | "multi" | "selectedValues" | "onChangeSelected" | "onClickMenu" | "size"> & Omit<SelectFieldProps, "value" | "onChange"> & {
25
- options: SelectOption[];
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 {};