@true-engineering/true-react-common-ui-kit 3.1.1 → 3.4.0
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/README.md +12 -0
- package/dist/components/AccountInfo/AccountInfo.d.ts +1 -0
- package/dist/components/AddButton/AddButton.d.ts +4 -1
- package/dist/components/Button/Button.d.ts +11 -29
- package/dist/components/Checkbox/Checkbox.d.ts +7 -5
- package/dist/components/CloseButton/CloseButton.d.ts +2 -1
- package/dist/components/DateInput/DateInput.d.ts +5 -2
- package/dist/components/DatePicker/DatePicker.d.ts +7 -5
- package/dist/components/Description/Description.d.ts +2 -0
- package/dist/components/FiltersPane/FiltersPane.d.ts +6 -3
- package/dist/components/FiltersPane/components/FilterWithDates/FilterWithDates.d.ts +3 -3
- package/dist/components/FiltersPane/components/FilterWithPeriod/FilterWithPeriod.d.ts +2 -2
- package/dist/components/FiltersPane/components/FilterWrapper/FilterWrapper.d.ts +1 -1
- package/dist/components/Flag/Flag.d.ts +1 -0
- package/dist/components/FlexibleTable/FlexibleTable.d.ts +7 -4
- package/dist/components/FlexibleTable/FlexibleTable.stories.d.ts +1 -1
- package/dist/components/FlexibleTable/FlexibleTable.styles.d.ts +1 -1
- package/dist/components/FlexibleTable/components/FlexibleTableCell/FlexibleTableCell.d.ts +4 -2
- package/dist/components/FlexibleTable/components/FlexibleTableRow/FlexibleTableRow.d.ts +6 -4
- package/dist/components/FlexibleTable/components/FlexibleTableRow/FlexibleTableRow.styles.d.ts +1 -1
- package/dist/components/IncrementInput/IncrementInput.d.ts +1 -0
- package/dist/components/Input/Input.d.ts +17 -23
- package/dist/components/Input/Input.stories.d.ts +1 -1
- package/dist/components/Input/types.d.ts +2 -0
- package/dist/components/List/List.d.ts +1 -1
- package/dist/components/List/components/ListItem/ListItem.d.ts +1 -1
- package/dist/components/Modal/Modal.d.ts +11 -1
- package/dist/components/MoreMenu/MoreMenu.d.ts +4 -5
- package/dist/components/MultiSelect/MultiSelect.d.ts +7 -2
- package/dist/components/MultiSelect/components/MultiSelectInput/MultiSelectInput.d.ts +1 -1
- package/dist/components/MultiSelectList/MultiSelectList.d.ts +3 -0
- package/dist/components/Notification/Notification.d.ts +2 -6
- package/dist/components/Notification/Notification.styles.d.ts +1 -1
- package/dist/components/NumberInput/NumberInput.d.ts +5 -1
- package/dist/components/PhoneInput/PhoneInput.d.ts +5 -1
- package/dist/components/PhoneInput/components/PhoneInputCountryList/PhoneInputCountryList.d.ts +2 -2
- package/dist/components/RadioButton/RadioButton.d.ts +3 -1
- package/dist/components/Select/Select.d.ts +17 -12
- package/dist/components/Select/components/SelectList/SelectList.d.ts +6 -6
- package/dist/components/Select/components/SelectListItem/SelectListItem.d.ts +2 -2
- package/dist/components/SmartInput/SmartInput.d.ts +2 -0
- package/dist/components/SmartInput/SmartInput.stories.d.ts +1 -1
- package/dist/components/Switch/Switch.d.ts +6 -7
- package/dist/components/TextArea/TextArea.d.ts +13 -4
- package/dist/components/TextButton/TextButton.d.ts +1 -1
- package/dist/components/TextWithInfo/TextWithInfo.d.ts +2 -1
- package/dist/components/TextWithTooltip/TextWithTooltip.d.ts +7 -0
- package/dist/components/ThemedPreloader/ThemedPreloader.d.ts +2 -3
- package/dist/components/Toaster/Toaster.d.ts +5 -11
- package/dist/components/Tooltip/Tooltip.d.ts +2 -6
- package/dist/hooks/use-dropdown.d.ts +1 -1
- package/dist/true-react-common-ui-kit.js +138 -45
- package/dist/true-react-common-ui-kit.js.map +1 -1
- package/dist/true-react-common-ui-kit.umd.cjs +138 -45
- package/dist/true-react-common-ui-kit.umd.cjs.map +1 -1
- package/package.json +1 -1
- package/src/components/AccountInfo/AccountInfo.tsx +1 -0
- package/src/components/AddButton/AddButton.tsx +6 -3
- package/src/components/Button/Button.tsx +11 -29
- package/src/components/Checkbox/Checkbox.tsx +12 -10
- package/src/components/CloseButton/CloseButton.tsx +2 -1
- package/src/components/DateInput/DateInput.tsx +6 -3
- package/src/components/DatePicker/DatePicker.tsx +10 -8
- package/src/components/Description/Description.tsx +2 -0
- package/src/components/FiltersPane/FiltersPane.tsx +6 -3
- package/src/components/FiltersPane/components/FilterWithDates/FilterWithDates.tsx +3 -3
- package/src/components/FiltersPane/components/FilterWithPeriod/FilterWithPeriod.tsx +2 -2
- package/src/components/FiltersPane/components/FilterWrapper/FilterWrapper.tsx +1 -1
- package/src/components/Flag/Flag.tsx +1 -0
- package/src/components/FlexibleTable/FlexibleTable.styles.ts +14 -0
- package/src/components/FlexibleTable/FlexibleTable.tsx +53 -33
- package/src/components/FlexibleTable/components/FlexibleTableCell/FlexibleTableCell.tsx +8 -3
- package/src/components/FlexibleTable/components/FlexibleTableRow/FlexibleTableRow.styles.ts +2 -0
- package/src/components/FlexibleTable/components/FlexibleTableRow/FlexibleTableRow.tsx +17 -8
- package/src/components/IncrementInput/IncrementInput.tsx +1 -0
- package/src/components/Input/Input.tsx +28 -41
- package/src/components/Input/types.ts +26 -0
- package/src/components/List/List.tsx +1 -1
- package/src/components/List/components/ListItem/ListItem.tsx +1 -1
- package/src/components/Modal/Modal.tsx +12 -2
- package/src/components/MoreMenu/MoreMenu.tsx +5 -6
- package/src/components/MultiSelect/MultiSelect.tsx +9 -4
- package/src/components/MultiSelect/components/MultiSelectInput/MultiSelectInput.tsx +1 -1
- package/src/components/MultiSelectList/MultiSelectList.tsx +3 -0
- package/src/components/Notification/Notification.tsx +2 -6
- package/src/components/NumberInput/NumberInput.tsx +5 -1
- package/src/components/PhoneInput/PhoneInput.tsx +6 -2
- package/src/components/PhoneInput/components/PhoneInputCountryList/PhoneInputCountryList.tsx +2 -2
- package/src/components/RadioButton/RadioButton.tsx +5 -3
- package/src/components/Select/Select.tsx +18 -13
- package/src/components/Select/components/SelectList/SelectList.tsx +6 -6
- package/src/components/Select/components/SelectListItem/SelectListItem.tsx +2 -2
- package/src/components/SmartInput/SmartInput.tsx +11 -1
- package/src/components/Switch/Switch.tsx +8 -9
- package/src/components/TextArea/TextArea.tsx +16 -7
- package/src/components/TextButton/TextButton.tsx +1 -1
- package/src/components/TextWithInfo/TextWithInfo.tsx +2 -1
- package/src/components/TextWithTooltip/TextWithTooltip.tsx +8 -1
- package/src/components/ThemedPreloader/ThemedPreloader.tsx +2 -3
- package/src/components/Toaster/Toaster.tsx +5 -11
- package/src/components/Tooltip/Tooltip.tsx +2 -6
- package/src/hooks/use-dropdown.ts +1 -1
|
@@ -4,10 +4,14 @@ import { IInputProps } from '../Input';
|
|
|
4
4
|
import { IPhoneValue } from './types';
|
|
5
5
|
import { IPhoneInputStyles } from './PhoneInput.styles';
|
|
6
6
|
export interface IPhoneInputProps extends Omit<IInputProps, 'value' | 'onChange' | 'type' | 'mask' | 'units' | 'placeholder' | 'tweakStyles'>, ICommonProps<IPhoneInputStyles> {
|
|
7
|
+
/** @default 'ru' */
|
|
7
8
|
locale?: string;
|
|
9
|
+
/** @default 'Поиск' */
|
|
8
10
|
codeSearchPlaceholder?: string;
|
|
11
|
+
/** @default 'Ничего не найдено' */
|
|
9
12
|
noMatchesLabel?: string;
|
|
13
|
+
/** @default { phoneNumber: '', dialCode: '' } */
|
|
10
14
|
value?: IPhoneValue;
|
|
11
|
-
onChange(phone: IPhoneValue, event: MouseEvent | KeyboardEvent | FormEvent<HTMLInputElement>)
|
|
15
|
+
onChange: (phone: IPhoneValue, event: MouseEvent | KeyboardEvent | FormEvent<HTMLInputElement>) => void;
|
|
12
16
|
}
|
|
13
17
|
export declare const PhoneInput: FC<IPhoneInputProps>;
|
package/dist/components/PhoneInput/components/PhoneInputCountryList/PhoneInputCountryList.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export interface IPhoneInputCountryListProps extends Pick<ICommonProps<IPhoneInp
|
|
|
7
7
|
locale: string;
|
|
8
8
|
placeholder: string;
|
|
9
9
|
noMatchesLabel: string;
|
|
10
|
-
closeList()
|
|
11
|
-
onChange(country: IPhoneInfo, event: MouseEvent | KeyboardEvent)
|
|
10
|
+
closeList: () => void;
|
|
11
|
+
onChange: (country: IPhoneInfo, event: MouseEvent | KeyboardEvent) => void;
|
|
12
12
|
}
|
|
13
13
|
export declare const PhoneInputCountryList: FC<IPhoneInputCountryListProps>;
|
|
@@ -6,8 +6,10 @@ export interface IRadioButtonProps<Value extends string> extends ICommonProps<IR
|
|
|
6
6
|
value: Value;
|
|
7
7
|
groupName: string;
|
|
8
8
|
isChecked?: boolean;
|
|
9
|
+
/** @default false */
|
|
9
10
|
isDisabled?: boolean;
|
|
11
|
+
/** @default false */
|
|
10
12
|
isInvalid?: boolean;
|
|
11
|
-
onChange(value: Value)
|
|
13
|
+
onChange: (value: Value) => void | Promise<void>;
|
|
12
14
|
}
|
|
13
15
|
export declare function RadioButton<Value extends string>({ children, value, groupName, isChecked, isDisabled, isInvalid, data, testId, tweakStyles, onChange, }: IRadioButtonProps<Value>): JSX.Element;
|
|
@@ -10,33 +10,38 @@ export interface ISelectProps<Value> extends Omit<IInputProps, 'value' | 'onChan
|
|
|
10
10
|
allOptionsLabel?: string;
|
|
11
11
|
noMatchesLabel?: string;
|
|
12
12
|
loadingLabel?: ReactNode;
|
|
13
|
+
/** @default 'normal' */
|
|
13
14
|
optionsMode?: 'search' | 'dynamic' | 'normal';
|
|
15
|
+
/** @default 400 */
|
|
14
16
|
debounceTime?: number;
|
|
17
|
+
/** @default 0 */
|
|
15
18
|
minSymbolsCountToOpenList?: number;
|
|
16
19
|
dropdownOptions?: IDropdownWithPopperOptions;
|
|
20
|
+
/** @default 'chevron-down' */
|
|
17
21
|
dropdownIcon?: IIcon;
|
|
18
22
|
options: Value[];
|
|
19
23
|
value: Value | undefined;
|
|
24
|
+
/** @default true */
|
|
20
25
|
shouldScrollToList?: boolean;
|
|
21
26
|
isMultiSelect?: boolean;
|
|
22
27
|
searchInput?: {
|
|
23
28
|
shouldRenderInList: true;
|
|
24
29
|
} & Pick<ISearchInputProps, 'placeholder'>;
|
|
25
|
-
isOptionDisabled
|
|
26
|
-
onChange(value?: Value)
|
|
27
|
-
onBlur
|
|
28
|
-
onType
|
|
29
|
-
optionsFilter
|
|
30
|
-
onOpen
|
|
31
|
-
compareValuesOnChange
|
|
32
|
-
convertValueToString
|
|
33
|
-
convertValueToReactNode
|
|
34
|
-
convertValueToId
|
|
30
|
+
isOptionDisabled?: (option: Value) => boolean;
|
|
31
|
+
onChange: (value?: Value) => void;
|
|
32
|
+
onBlur?: (event: Event | SyntheticEvent) => void;
|
|
33
|
+
onType?: (value: string) => Promise<void>;
|
|
34
|
+
optionsFilter?: (options: Value[], query: string) => Value[];
|
|
35
|
+
onOpen?: () => void;
|
|
36
|
+
compareValuesOnChange?: (v1?: Value, v2?: Value) => boolean;
|
|
37
|
+
convertValueToString?: (value: Value) => string | undefined;
|
|
38
|
+
convertValueToReactNode?: (value: Value, isDisabled: boolean) => ReactNode;
|
|
39
|
+
convertValueToId?: (value: Value) => string | undefined;
|
|
35
40
|
}
|
|
36
41
|
export interface IMultipleSelectProps<Value> extends Omit<ISelectProps<Value>, 'value' | 'onChange' | 'compareValuesOnChange'> {
|
|
37
42
|
isMultiSelect: true;
|
|
38
43
|
value: IMultipleSelectValue<Value> | undefined;
|
|
39
|
-
onChange(value?: IMultipleSelectValue<Value>)
|
|
40
|
-
compareValuesOnChange
|
|
44
|
+
onChange: (value?: IMultipleSelectValue<Value>) => void;
|
|
45
|
+
compareValuesOnChange?: (v1?: IMultipleSelectValue<Value>, v2?: IMultipleSelectValue<Value>) => boolean;
|
|
41
46
|
}
|
|
42
47
|
export declare function Select<Value>(props: ISelectProps<Value> | IMultipleSelectProps<Value>): JSX.Element;
|
|
@@ -13,11 +13,11 @@ export interface ISelectListProps<Value> extends ICommonProps<ISelectListStyles>
|
|
|
13
13
|
areAllOptionsSelected?: boolean;
|
|
14
14
|
shouldScrollToList?: boolean;
|
|
15
15
|
customListHeader?: ReactNode;
|
|
16
|
-
onOptionSelect(index: number, event: MouseEvent<HTMLElement>)
|
|
17
|
-
onToggleCheckbox
|
|
18
|
-
isOptionDisabled(value: Value)
|
|
19
|
-
convertValueToString(value: Value)
|
|
20
|
-
convertValueToReactNode
|
|
21
|
-
convertValueToId(value: Value)
|
|
16
|
+
onOptionSelect: (index: number, event: MouseEvent<HTMLElement>) => void;
|
|
17
|
+
onToggleCheckbox?: (index: number, isSelected: boolean) => void;
|
|
18
|
+
isOptionDisabled: (value: Value) => boolean;
|
|
19
|
+
convertValueToString: (value: Value) => string | undefined;
|
|
20
|
+
convertValueToReactNode?: (value: Value, isDisabled: boolean) => ReactNode;
|
|
21
|
+
convertValueToId: (value: Value) => string | undefined;
|
|
22
22
|
}
|
|
23
23
|
export declare function SelectList<Value>({ options, focusedIndex, activeValue, defaultOptionLabel, noMatchesLabel, isLoading, loadingLabel, tweakStyles, testId, shouldScrollToList, areAllOptionsSelected, customListHeader, isOptionDisabled, allOptionsLabel, onOptionSelect, onToggleCheckbox, convertValueToString, convertValueToReactNode, convertValueToId, }: ISelectListProps<Value>): JSX.Element;
|
|
@@ -8,7 +8,7 @@ export interface ISelectListItemProps {
|
|
|
8
8
|
isFocused?: boolean;
|
|
9
9
|
children: ReactNode;
|
|
10
10
|
classes: Classes<'cellWithCheckbox' | 'cell' | 'focused' | 'active' | 'disabled'>;
|
|
11
|
-
onOptionSelect(index: number, event: MouseEvent<HTMLElement>)
|
|
12
|
-
onToggleCheckbox
|
|
11
|
+
onOptionSelect: (index: number, event: MouseEvent<HTMLElement>) => void;
|
|
12
|
+
onToggleCheckbox?: (index: number, isSelected: boolean) => void;
|
|
13
13
|
}
|
|
14
14
|
export declare const SelectListItem: FC<ISelectListItemProps>;
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
import { IInputProps } from '../Input';
|
|
3
3
|
import { ISmartType } from './types';
|
|
4
4
|
export interface ISmartInputProps extends IInputProps {
|
|
5
|
+
/** @default false */
|
|
5
6
|
isUpperCase?: boolean;
|
|
7
|
+
/** @default 'default' */
|
|
6
8
|
smartType?: ISmartType;
|
|
7
9
|
regExp?: RegExp;
|
|
8
10
|
onChange: (value: string) => void;
|
|
@@ -5,17 +5,16 @@ import { ISwitchStyles } from './Switch.styles';
|
|
|
5
5
|
export interface ISwitchProps<V extends string> extends ICommonProps<ISwitchStyles> {
|
|
6
6
|
children?: ReactNode;
|
|
7
7
|
value: V;
|
|
8
|
+
/** @default false */
|
|
8
9
|
isChecked: boolean | undefined;
|
|
10
|
+
/** @default false */
|
|
9
11
|
isDisabled?: boolean;
|
|
12
|
+
/** @default false */
|
|
10
13
|
isInvalid?: boolean;
|
|
11
|
-
/**
|
|
12
|
-
* @default `right`
|
|
13
|
-
*/
|
|
14
|
+
/** @default 'right' */
|
|
14
15
|
labelPosition?: 'left' | 'right';
|
|
15
|
-
/**
|
|
16
|
-
* @default `primary`
|
|
17
|
-
*/
|
|
16
|
+
/** @default 'primary' */
|
|
18
17
|
color?: 'primary' | 'secondary';
|
|
19
|
-
onChange(state: ISwitchState<V>)
|
|
18
|
+
onChange: (state: ISwitchState<V>) => void;
|
|
20
19
|
}
|
|
21
20
|
export declare const Switch: <V extends string>({ isDisabled, isChecked, isInvalid, value, children, labelPosition, color, data, tweakStyles, testId, onChange, }: ISwitchProps<V>) => JSX.Element;
|
|
@@ -5,23 +5,32 @@ export interface ITextAreaProps extends ICommonProps<ITextAreaStyles> {
|
|
|
5
5
|
value?: string;
|
|
6
6
|
label?: string;
|
|
7
7
|
placeholder?: string;
|
|
8
|
+
/** @default false */
|
|
8
9
|
isDisabled?: boolean;
|
|
10
|
+
/** @default true */
|
|
9
11
|
hasFloatingLabel?: boolean;
|
|
12
|
+
/** @default false */
|
|
10
13
|
isInvalid?: boolean;
|
|
14
|
+
/** @default false */
|
|
11
15
|
isActive?: boolean;
|
|
12
16
|
infoMessage?: string;
|
|
13
17
|
errorMessage?: string;
|
|
18
|
+
/** @default false */
|
|
14
19
|
isRequired?: boolean;
|
|
15
20
|
name?: string;
|
|
21
|
+
/** @default false */
|
|
16
22
|
hasRequiredLabel?: boolean;
|
|
23
|
+
/** @default false */
|
|
17
24
|
shouldFocusOnMount?: boolean;
|
|
25
|
+
/** @default true */
|
|
18
26
|
hasCounter?: boolean;
|
|
27
|
+
/** @default false */
|
|
19
28
|
shouldTrimAfterMaxLength?: boolean;
|
|
20
29
|
maxLength?: number;
|
|
21
30
|
rows?: number;
|
|
22
|
-
onChange(value: string, event?: FormEvent<HTMLTextAreaElement>)
|
|
23
|
-
onFocus
|
|
24
|
-
onBlur
|
|
25
|
-
onPaste
|
|
31
|
+
onChange: (value: string, event?: FormEvent<HTMLTextAreaElement>) => void;
|
|
32
|
+
onFocus?: (event: FocusEvent<HTMLTextAreaElement>) => void;
|
|
33
|
+
onBlur?: (event: FocusEvent<HTMLTextAreaElement>) => void;
|
|
34
|
+
onPaste?: (event: ClipboardEvent<HTMLTextAreaElement>) => void;
|
|
26
35
|
}
|
|
27
36
|
export declare const TextArea: FC<ITextAreaProps>;
|
|
@@ -24,7 +24,7 @@ export interface ITextButtonProps extends ICommonProps<ITextButtonStyles>, Omit<
|
|
|
24
24
|
size?: 'l' | 'xl';
|
|
25
25
|
/** @default 'left' */
|
|
26
26
|
iconPosition?: 'left' | 'right';
|
|
27
|
-
/** @default
|
|
27
|
+
/** @default 'dots' */
|
|
28
28
|
preloaderType?: IThemedPreloaderProps['type'];
|
|
29
29
|
}
|
|
30
30
|
export declare const TextButton: FC<ITextButtonProps>;
|
|
@@ -3,12 +3,13 @@ import { ICommonProps } from '../../types';
|
|
|
3
3
|
import { ITextWithInfoStyles } from './TextWithInfo.styles';
|
|
4
4
|
export interface ITextWithInfoProps extends ICommonProps<ITextWithInfoStyles> {
|
|
5
5
|
text: string;
|
|
6
|
+
/** @default false */
|
|
6
7
|
isSelected?: boolean;
|
|
7
8
|
textTooltip?: string;
|
|
8
9
|
info?: {
|
|
9
10
|
infoTooltip?: string;
|
|
10
11
|
link?: string;
|
|
11
12
|
};
|
|
12
|
-
onClick()
|
|
13
|
+
onClick: () => void;
|
|
13
14
|
}
|
|
14
15
|
export declare const TextWithInfo: FC<ITextWithInfoProps>;
|
|
@@ -6,14 +6,21 @@ import { ITextWithTooltipStyles } from './TextWithTooltip.styles';
|
|
|
6
6
|
export interface ITextWithTooltipProps extends ICommonProps<ITextWithTooltipStyles> {
|
|
7
7
|
children: ReactNode;
|
|
8
8
|
tooltipText: ITooltipProps['text'];
|
|
9
|
+
/** @default 'tooltip' */
|
|
9
10
|
tooltipView?: ITooltipProps['view'];
|
|
11
|
+
/** @default 'info' */
|
|
10
12
|
tooltipType?: ITooltipProps['type'];
|
|
13
|
+
/** @default 'top' */
|
|
11
14
|
tooltipPosition?: Placement;
|
|
15
|
+
/** @default [] */
|
|
12
16
|
tooltipModifiers?: Array<Partial<Modifier<any, any>>>;
|
|
13
17
|
tooltipOffsetOptions?: Record<string, unknown>;
|
|
18
|
+
/** @default 'hover' */
|
|
14
19
|
mouseEventType?: 'hover' | 'click';
|
|
15
20
|
hoverDelay?: number;
|
|
21
|
+
/** @default false */
|
|
16
22
|
isDisabled?: boolean;
|
|
23
|
+
/** @default true */
|
|
17
24
|
shouldRenderInBody?: boolean;
|
|
18
25
|
}
|
|
19
26
|
export declare const TextWithTooltip: FC<ITextWithTooltipProps>;
|
|
@@ -3,10 +3,9 @@ import { ICommonProps } from '../../types';
|
|
|
3
3
|
import { IPreloaderSvgType } from './types';
|
|
4
4
|
import { IThemedPreloaderStyles } from './ThemedPreloader.styles';
|
|
5
5
|
export interface IThemedPreloaderProps extends ICommonProps<IThemedPreloaderStyles> {
|
|
6
|
-
/**
|
|
7
|
-
* @default `default`
|
|
8
|
-
*/
|
|
6
|
+
/** @default 'default' */
|
|
9
7
|
type?: 'dots' | IPreloaderSvgType;
|
|
8
|
+
/** @default false */
|
|
10
9
|
useCurrentColor?: boolean;
|
|
11
10
|
}
|
|
12
11
|
export declare const ThemedPreloader: FC<IThemedPreloaderProps>;
|
|
@@ -3,9 +3,7 @@ import { ICommonProps } from '../../types';
|
|
|
3
3
|
import { IToasterType } from './types';
|
|
4
4
|
import { IToasterStyles } from './Toaster.styles';
|
|
5
5
|
export interface IToasterProps extends ICommonProps<IToasterStyles> {
|
|
6
|
-
/**
|
|
7
|
-
* @default `error`
|
|
8
|
-
*/
|
|
6
|
+
/** @default 'error' */
|
|
9
7
|
type?: IToasterType;
|
|
10
8
|
title?: string;
|
|
11
9
|
text?: string;
|
|
@@ -15,15 +13,11 @@ export interface IToasterProps extends ICommonProps<IToasterStyles> {
|
|
|
15
13
|
* @default 7000
|
|
16
14
|
*/
|
|
17
15
|
timeout?: number;
|
|
18
|
-
/**
|
|
19
|
-
* @default false
|
|
20
|
-
*/
|
|
16
|
+
/** @default false */
|
|
21
17
|
hasCloseButton?: boolean;
|
|
22
|
-
/**
|
|
23
|
-
* @default false
|
|
24
|
-
*/
|
|
18
|
+
/** @default false */
|
|
25
19
|
shouldCloseOnClick?: boolean;
|
|
26
|
-
onClose
|
|
27
|
-
onTimeEnd
|
|
20
|
+
onClose?: () => void;
|
|
21
|
+
onTimeEnd?: () => void;
|
|
28
22
|
}
|
|
29
23
|
export declare const Toaster: FC<IToasterProps>;
|
|
@@ -3,13 +3,9 @@ import { ICommonProps } from '../../types';
|
|
|
3
3
|
import { ITooltipStyles } from './Tooltip.styles';
|
|
4
4
|
export interface ITooltipProps extends ICommonProps<ITooltipStyles> {
|
|
5
5
|
text: ReactNode;
|
|
6
|
-
/**
|
|
7
|
-
* @default `tooltip`
|
|
8
|
-
*/
|
|
6
|
+
/** @default 'tooltip' */
|
|
9
7
|
view?: 'tooltip' | 'hint';
|
|
10
|
-
/**
|
|
11
|
-
* @default `info`
|
|
12
|
-
*/
|
|
8
|
+
/** @default 'info' */
|
|
13
9
|
type?: 'info' | 'error';
|
|
14
10
|
}
|
|
15
11
|
export declare const Tooltip: FC<ITooltipProps>;
|
|
@@ -7,5 +7,5 @@ export declare const useDropdown: ({ isOpen, onDropdownClose, referenceElement,
|
|
|
7
7
|
dropdownElement: HTMLElement | null | undefined;
|
|
8
8
|
options?: IDropdownWithPopperOptions | undefined;
|
|
9
9
|
dependenciesForPositionUpdating?: DependencyList | undefined;
|
|
10
|
-
onDropdownClose(event: Event)
|
|
10
|
+
onDropdownClose: (event: Event) => void;
|
|
11
11
|
}) => ReturnType<typeof usePopper> | undefined;
|