@true-engineering/true-react-common-ui-kit 1.0.2 → 1.1.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/dist/components/AccountInfo/AccountInfo.d.ts +4 -4
- package/dist/components/AccountInfo/AccountInfo.styles.d.ts +60 -56
- package/dist/components/AddButton/AddButton.d.ts +6 -6
- package/dist/components/AddButton/AddButton.styles.d.ts +23 -23
- package/dist/components/Button/Button.d.ts +19 -33
- package/dist/components/Button/Button.styles.d.ts +144 -144
- package/dist/components/Checkbox/Checkbox.d.ts +16 -27
- package/dist/components/Checkbox/Checkbox.styles.d.ts +39 -42
- package/dist/components/CloseButton/CloseButton.d.ts +4 -4
- package/dist/components/CloseButton/CloseButton.styles.d.ts +22 -22
- package/dist/components/Colors/Colors.styles.d.ts +28 -28
- package/dist/components/CssBaseline/CssBaseline.d.ts +1 -1
- package/dist/components/CssBaseline/CssBaseline.styles.d.ts +7 -7
- package/dist/components/DateInput/DateInput.d.ts +8 -9
- package/dist/components/DateInput/DateInput.styles.d.ts +7 -7
- package/dist/components/DatePicker/DatePicker.d.ts +29 -36
- package/dist/components/DatePicker/DatePicker.styles.d.ts +38 -34
- package/dist/components/DatePicker/DatePickerHeader/DatePickerHeader.d.ts +9 -9
- package/dist/components/DatePicker/DatePickerHeader/DatePickerHeader.styles.d.ts +59 -59
- package/dist/components/DatePicker/DatePickerInput/DatePickerInput.d.ts +7 -9
- package/dist/components/DatePicker/DatePickerInput/DatePickerInput.styles.d.ts +16 -16
- package/dist/components/Description/Description.d.ts +6 -6
- package/dist/components/Description/Description.styles.d.ts +18 -18
- package/dist/components/FiltersPane/FilterInterval/FilterInterval.d.ts +19 -19
- package/dist/components/FiltersPane/FilterInterval/FilterInterval.styles.d.ts +44 -44
- package/dist/components/FiltersPane/FilterMultiSelect/FilterMultiSelect.d.ts +2 -8
- package/dist/components/FiltersPane/FilterSelect/FilterSelect.d.ts +17 -35
- package/dist/components/FiltersPane/FilterSelect/FilterSelect.styles.d.ts +111 -111
- package/dist/components/FiltersPane/FilterSelect/locales.d.ts +6 -10
- package/dist/components/FiltersPane/FilterValueView/FilterValueView.d.ts +1 -9
- package/dist/components/FiltersPane/FilterValueView/FilterValueView.styles.d.ts +8 -8
- package/dist/components/FiltersPane/FilterWithDates/FilterWithDates.d.ts +13 -21
- package/dist/components/FiltersPane/FilterWithDates/FilterWithDates.styles.d.ts +41 -41
- package/dist/components/FiltersPane/FilterWithPeriod/FilterWithPeriod.d.ts +8 -8
- package/dist/components/FiltersPane/FilterWithPeriod/FilterWithPeriod.styles.d.ts +7 -7
- package/dist/components/FiltersPane/FilterWrapper/FilterWrapper.d.ts +18 -41
- package/dist/components/FiltersPane/FilterWrapper/FilterWrapper.styles.d.ts +92 -92
- package/dist/components/FiltersPane/FiltersPane.d.ts +15 -34
- package/dist/components/FiltersPane/FiltersPane.styles.d.ts +50 -50
- package/dist/components/FiltersPane/FiltersPaneSearch/FiltersPaneSearch.d.ts +18 -37
- package/dist/components/FiltersPane/FiltersPaneSearch/FiltersPaneSearch.styles.d.ts +82 -82
- package/dist/components/FiltersPane/locales.d.ts +22 -28
- package/dist/components/FiltersPane/types.d.ts +38 -65
- package/dist/components/Flag/Flag.d.ts +2 -2
- package/dist/components/Flag/Flag.styles.d.ts +8 -8
- package/dist/components/FlexibleTable/FlexibleTable.d.ts +20 -45
- package/dist/components/FlexibleTable/FlexibleTable.styles.d.ts +93 -93
- package/dist/components/FlexibleTable/TableRow.d.ts +21 -38
- package/dist/components/FlexibleTable/TableValue.d.ts +16 -28
- package/dist/components/FlexibleTable/types.d.ts +31 -37
- package/dist/components/Icon/ComplexIconBoilerplate.d.ts +1 -1
- package/dist/components/Icon/Icon.d.ts +2 -2
- package/dist/components/Icon/Icon.styles.d.ts +4 -4
- package/dist/components/Icon/IconBoilerplate.d.ts +1 -1
- package/dist/components/Icon/complexIcons/icons.d.ts +1 -1
- package/dist/components/Icon/icons/icons.d.ts +5 -97
- package/dist/components/IncrementInput/ChangeButton.d.ts +5 -5
- package/dist/components/IncrementInput/IncrementInput.d.ts +3 -4
- package/dist/components/IncrementInput/IncrementInput.styles.d.ts +52 -52
- package/dist/components/Input/Input.d.ts +37 -48
- package/dist/components/Input/Input.styles.d.ts +242 -242
- package/dist/components/List/List.d.ts +12 -12
- package/dist/components/List/List.styles.d.ts +35 -35
- package/dist/components/Modal/Modal.d.ts +19 -19
- package/dist/components/Modal/Modal.styles.d.ts +235 -235
- package/dist/components/MoreMenu/MoreMenu.d.ts +7 -7
- package/dist/components/MoreMenu/MoreMenu.styles.d.ts +45 -45
- package/dist/components/MultiSelect/MultiSelect.d.ts +13 -28
- package/dist/components/MultiSelect/MultiSelect.styles.d.ts +38 -38
- package/dist/components/MultiSelect/MultiSelectInput/MultiSelectInput.d.ts +6 -12
- package/dist/components/MultiSelect/MultiSelectInput/MultiSelectInput.styles.d.ts +58 -58
- package/dist/components/MultiSelectList/MultiSelectList.d.ts +20 -43
- package/dist/components/MultiSelectList/MultiSelectList.styles.d.ts +90 -90
- package/dist/components/MultiSelectList/locales.d.ts +6 -10
- package/dist/components/Notification/Notification.d.ts +9 -14
- package/dist/components/Notification/Notification.styles.d.ts +30 -33
- package/dist/components/NumberInput/NumberInput.d.ts +10 -16
- package/dist/components/NumberInput/helpers.d.ts +2 -10
- package/dist/components/PhoneInput/PhoneInput.d.ts +7 -14
- package/dist/components/PhoneInput/PhoneInput.styles.d.ts +60 -60
- package/dist/components/PhoneInput/PhoneInputCountryList/PhoneInputCountryList.d.ts +7 -7
- package/dist/components/PhoneInput/PhoneInputCountryList/PhoneInputCountryList.styles.d.ts +74 -78
- package/dist/components/PhoneInput/types.d.ts +11 -11
- package/dist/components/RadioButton/RadioButton.d.ts +8 -18
- package/dist/components/RadioButton/RadioButton.styles.d.ts +25 -25
- package/dist/components/ScrollIntoViewIfNeeded/ScrollIntoViewIfNeeded.d.ts +374 -634
- package/dist/components/SearchInput/SearchInput.d.ts +2 -12
- package/dist/components/SearchInput/SearchInput.styles.d.ts +32 -32
- package/dist/components/Select/Select.d.ts +22 -50
- package/dist/components/Select/Select.styles.d.ts +53 -53
- package/dist/components/Select/SelectList/SelectList.d.ts +15 -30
- package/dist/components/Select/SelectList/SelectList.styles.d.ts +35 -37
- package/dist/components/Select/helpers.d.ts +2 -9
- package/dist/components/SmartInput/SmartInput.d.ts +16 -28
- package/dist/components/SmartInput/helpers.d.ts +4 -8
- package/dist/components/Switch/Switch.d.ts +13 -26
- package/dist/components/Switch/Switch.styles.d.ts +58 -58
- package/dist/components/TextArea/TextArea.d.ts +23 -26
- package/dist/components/TextArea/TextArea.styles.d.ts +124 -124
- package/dist/components/TextWithInfo/TextWithInfo.d.ts +9 -9
- package/dist/components/TextWithInfo/TextWithInfo.styles.d.ts +40 -40
- package/dist/components/TextWithTooltip/TextWithTooltip.d.ts +12 -12
- package/dist/components/TextWithTooltip/TextWithTooltip.styles.d.ts +10 -10
- package/dist/components/ThemedPreloader/ThemedPreloader.d.ts +4 -4
- package/dist/components/ThemedPreloader/ThemedPreloader.styles.d.ts +10 -10
- package/dist/components/ThemedPreloader/components/DotsPreloader/DotsPreloader.d.ts +1 -1
- package/dist/components/ThemedPreloader/components/DotsPreloader/DotsPreloader.styles.d.ts +35 -35
- package/dist/components/ThemedPreloader/components/SvgPreloader/SvgPreloader.d.ts +2 -2
- package/dist/components/ThemedPreloader/components/SvgPreloader/SvgPreloader.styles.d.ts +5 -5
- package/dist/components/Toaster/Toaster.d.ts +11 -16
- package/dist/components/Toaster/Toaster.styles.d.ts +41 -41
- package/dist/components/Tooltip/Tooltip.d.ts +4 -4
- package/dist/components/Tooltip/Tooltip.styles.d.ts +27 -25
- package/dist/helpers/data-attributes.d.ts +4 -11
- package/dist/helpers/phone.d.ts +8 -28
- package/dist/helpers/utils.d.ts +7 -28
- package/dist/hooks/use-did-mount-effect.d.ts +1 -4
- package/dist/hooks/use-dropdown.d.ts +7 -14
- package/dist/hooks/use-is-mounted.d.ts +1 -1
- package/dist/hooks/use-on-click-outside.d.ts +4 -25
- package/dist/hooks/use-theme.d.ts +5 -10
- package/dist/hooks/use-tweak-styles.d.ts +1 -5
- package/dist/style.css +90 -205
- package/dist/theme.d.ts +55 -51
- package/dist/true-react-common-ui-kit.js +16713 -24318
- package/dist/true-react-common-ui-kit.js.map +1 -1
- package/dist/true-react-common-ui-kit.umd.cjs +18 -16
- package/dist/true-react-common-ui-kit.umd.cjs.map +1 -1
- package/dist/types.d.ts +23 -77
- package/package.json +1 -1
- package/src/components/Select/Select.tsx +21 -13
- package/src/components/Select/SelectList/SelectList.tsx +8 -6
- package/src/components/Select/helpers.ts +9 -6
- package/src/components/SmartInput/SmartInput.tsx +130 -127
|
@@ -1,17 +1,7 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { IInputProps } from '../Input';
|
|
3
3
|
import { SearchInputStyles } from './SearchInput.styles';
|
|
4
|
-
export declare type ISearchInputProps = Omit<
|
|
5
|
-
|
|
6
|
-
| 'type'
|
|
7
|
-
| 'isInvalid'
|
|
8
|
-
| 'errorMessage'
|
|
9
|
-
| 'label'
|
|
10
|
-
| 'isActive'
|
|
11
|
-
| 'errorPosition'
|
|
12
|
-
| 'hasFloatingLabel'
|
|
13
|
-
| 'border'
|
|
14
|
-
> & {
|
|
15
|
-
tweakStyles?: SearchInputStyles;
|
|
4
|
+
export declare type ISearchInputProps = Omit<IInputProps, 'type' | 'isInvalid' | 'errorMessage' | 'label' | 'isActive' | 'errorPosition' | 'hasFloatingLabel' | 'border'> & {
|
|
5
|
+
tweakStyles?: SearchInputStyles;
|
|
16
6
|
};
|
|
17
7
|
export declare const SearchInput: FC<ISearchInputProps>;
|
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
import { ComponentStyles } from '../../types';
|
|
2
2
|
export declare const styles: {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
};
|
|
6
|
-
icon: {
|
|
7
|
-
display: string;
|
|
8
|
-
alignItems: string;
|
|
9
|
-
position: string;
|
|
10
|
-
left: number;
|
|
11
|
-
height: string;
|
|
12
|
-
width: number;
|
|
13
|
-
zIndex: number;
|
|
14
|
-
color: '#95a0b3';
|
|
15
|
-
};
|
|
16
|
-
tweakInput: {
|
|
17
|
-
inputWrapper: {
|
|
18
|
-
height: number;
|
|
19
|
-
borderColor: string;
|
|
20
|
-
backgroundColor: string;
|
|
21
|
-
borderRadius: number;
|
|
22
|
-
paddingLeft: number;
|
|
23
|
-
transitionProperty: string;
|
|
3
|
+
root: {
|
|
4
|
+
position: string;
|
|
24
5
|
};
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
6
|
+
icon: {
|
|
7
|
+
display: string;
|
|
8
|
+
alignItems: string;
|
|
9
|
+
position: string;
|
|
10
|
+
left: number;
|
|
11
|
+
height: string;
|
|
12
|
+
width: number;
|
|
13
|
+
zIndex: number;
|
|
14
|
+
color: "#95a0b3";
|
|
28
15
|
};
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
16
|
+
tweakInput: {
|
|
17
|
+
inputWrapper: {
|
|
18
|
+
height: number;
|
|
19
|
+
borderColor: string;
|
|
20
|
+
backgroundColor: string;
|
|
21
|
+
borderRadius: number;
|
|
22
|
+
paddingLeft: number;
|
|
23
|
+
transitionProperty: string;
|
|
24
|
+
};
|
|
25
|
+
focused: {
|
|
26
|
+
backgroundColor: "#ffffff";
|
|
27
|
+
borderColor: "#d0d6e1";
|
|
28
|
+
};
|
|
29
|
+
input: {
|
|
30
|
+
fontSize: number;
|
|
31
|
+
paddingLeft: number;
|
|
32
|
+
};
|
|
33
|
+
label: {
|
|
34
|
+
left: number;
|
|
35
|
+
fontSize: number;
|
|
36
|
+
};
|
|
32
37
|
};
|
|
33
|
-
label: {
|
|
34
|
-
left: number;
|
|
35
|
-
fontSize: number;
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
38
|
};
|
|
39
39
|
export declare type SearchInputStyles = ComponentStyles<typeof styles>;
|
|
@@ -3,54 +3,26 @@ import { IInputProps } from '../Input';
|
|
|
3
3
|
import { IIconType } from '../Icon';
|
|
4
4
|
import { IDropdownWithPopperOptions } from '../../types';
|
|
5
5
|
import { SelectStyles } from './Select.styles';
|
|
6
|
-
export interface ISelectProps<Value>
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
convertValueToString?: (value?: Value) => string | undefined;
|
|
28
|
-
convertValueToReactNode?: (value?: Value) => ReactNode | undefined;
|
|
29
|
-
convertValueToId?: (value?: Value) => string | undefined;
|
|
6
|
+
export interface ISelectProps<Value> extends Omit<IInputProps, 'value' | 'onChange' | 'type'> {
|
|
7
|
+
tweakStyles?: SelectStyles;
|
|
8
|
+
defaultOptionLabel?: string;
|
|
9
|
+
noMatchesLabel?: string;
|
|
10
|
+
loadingLabel?: React.ReactNode;
|
|
11
|
+
optionsMode?: 'search' | 'dynamic' | 'normal';
|
|
12
|
+
onType?: (value: string) => Promise<void>;
|
|
13
|
+
debounceTime?: number;
|
|
14
|
+
minSymbolsCountToOpenList?: number;
|
|
15
|
+
dropdownOptions?: IDropdownWithPopperOptions;
|
|
16
|
+
dropdownIcon?: IIconType;
|
|
17
|
+
onOpen?: () => void;
|
|
18
|
+
optionsFilter?: (options: Value[], query: string) => Value[];
|
|
19
|
+
options: Value[];
|
|
20
|
+
value: Value | undefined;
|
|
21
|
+
shouldScrollToList?: boolean;
|
|
22
|
+
onChange(value: Value | undefined): void;
|
|
23
|
+
compareValuesOnChange?(v1: Value | undefined, v2: Value | undefined): boolean;
|
|
24
|
+
convertValueToString?(value: Value): string | undefined;
|
|
25
|
+
convertValueToReactNode?(value: Value): ReactNode;
|
|
26
|
+
convertValueToId?(value: Value): string | undefined;
|
|
30
27
|
}
|
|
31
|
-
export declare function Select<Value>({
|
|
32
|
-
options,
|
|
33
|
-
value,
|
|
34
|
-
onChange,
|
|
35
|
-
compareValuesOnChange,
|
|
36
|
-
convertValueToString,
|
|
37
|
-
convertValueToId,
|
|
38
|
-
convertValueToReactNode,
|
|
39
|
-
defaultOptionLabel,
|
|
40
|
-
onFocus,
|
|
41
|
-
onBlur,
|
|
42
|
-
onType,
|
|
43
|
-
onOpen,
|
|
44
|
-
debounceTime,
|
|
45
|
-
optionsMode,
|
|
46
|
-
optionsFilter,
|
|
47
|
-
noMatchesLabel,
|
|
48
|
-
loadingLabel,
|
|
49
|
-
tweakStyles,
|
|
50
|
-
testId,
|
|
51
|
-
isDisabled,
|
|
52
|
-
dropdownOptions,
|
|
53
|
-
minSymbolsCountToOpenList,
|
|
54
|
-
dropdownIcon,
|
|
55
|
-
...inputProps
|
|
56
|
-
}: ISelectProps<Value>): JSX.Element;
|
|
28
|
+
export declare function Select<Value>({ options, value, onChange, compareValuesOnChange, convertValueToString, convertValueToId, convertValueToReactNode, defaultOptionLabel, onFocus, onBlur, onType, onOpen, debounceTime, optionsMode, optionsFilter, noMatchesLabel, loadingLabel, tweakStyles, testId, isDisabled, dropdownOptions, minSymbolsCountToOpenList, dropdownIcon, shouldScrollToList, ...inputProps }: ISelectProps<Value>): JSX.Element;
|
|
@@ -1,61 +1,61 @@
|
|
|
1
1
|
import { ComponentStyles } from '../../types';
|
|
2
2
|
export declare const styles: {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
};
|
|
8
|
-
inputWrapper: {
|
|
9
|
-
width: string;
|
|
10
|
-
cursor: string;
|
|
11
|
-
position: string;
|
|
12
|
-
};
|
|
13
|
-
listWrapper: {
|
|
14
|
-
left: number;
|
|
15
|
-
zIndex: number;
|
|
16
|
-
width: string;
|
|
17
|
-
minWidth: string;
|
|
18
|
-
};
|
|
19
|
-
withoutPopper: {
|
|
20
|
-
position: string;
|
|
21
|
-
top: string;
|
|
22
|
-
};
|
|
23
|
-
listWrapperInBody: {
|
|
24
|
-
minWidth: string;
|
|
25
|
-
width: string;
|
|
26
|
-
maxWidth: string;
|
|
27
|
-
};
|
|
28
|
-
arrow: {
|
|
29
|
-
position: string;
|
|
30
|
-
right: number;
|
|
31
|
-
top: number;
|
|
32
|
-
width: number;
|
|
33
|
-
height: number;
|
|
34
|
-
cursor: string;
|
|
35
|
-
zIndex: number;
|
|
36
|
-
transition: string;
|
|
37
|
-
};
|
|
38
|
-
activeArrow: {
|
|
39
|
-
transform: string;
|
|
40
|
-
};
|
|
41
|
-
disabled: {
|
|
42
|
-
'& $arrow': {
|
|
43
|
-
cursor: string;
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
tweakInput: {
|
|
47
|
-
input: {
|
|
48
|
-
paddingRight: number;
|
|
3
|
+
root: {
|
|
4
|
+
width: string;
|
|
5
|
+
position: string;
|
|
6
|
+
boxSizing: string;
|
|
49
7
|
};
|
|
50
|
-
|
|
51
|
-
|
|
8
|
+
inputWrapper: {
|
|
9
|
+
width: string;
|
|
52
10
|
cursor: string;
|
|
53
|
-
|
|
11
|
+
position: string;
|
|
12
|
+
};
|
|
13
|
+
listWrapper: {
|
|
14
|
+
left: number;
|
|
15
|
+
zIndex: number;
|
|
16
|
+
width: string;
|
|
17
|
+
minWidth: string;
|
|
18
|
+
};
|
|
19
|
+
withoutPopper: {
|
|
20
|
+
position: string;
|
|
21
|
+
top: string;
|
|
22
|
+
};
|
|
23
|
+
listWrapperInBody: {
|
|
24
|
+
minWidth: string;
|
|
25
|
+
width: string;
|
|
26
|
+
maxWidth: string;
|
|
27
|
+
};
|
|
28
|
+
arrow: {
|
|
29
|
+
position: string;
|
|
30
|
+
right: number;
|
|
31
|
+
top: number;
|
|
32
|
+
width: number;
|
|
33
|
+
height: number;
|
|
34
|
+
cursor: string;
|
|
35
|
+
zIndex: number;
|
|
36
|
+
transition: string;
|
|
37
|
+
};
|
|
38
|
+
activeArrow: {
|
|
39
|
+
transform: string;
|
|
40
|
+
};
|
|
41
|
+
disabled: {
|
|
42
|
+
'& $arrow': {
|
|
43
|
+
cursor: string;
|
|
44
|
+
};
|
|
54
45
|
};
|
|
55
|
-
|
|
56
|
-
|
|
46
|
+
tweakInput: {
|
|
47
|
+
input: {
|
|
48
|
+
paddingRight: number;
|
|
49
|
+
};
|
|
50
|
+
disabled: {
|
|
51
|
+
'& $input': {
|
|
52
|
+
cursor: string;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
controls: {
|
|
56
|
+
paddingRight: number;
|
|
57
|
+
};
|
|
57
58
|
};
|
|
58
|
-
|
|
59
|
-
tweakSelectList: {};
|
|
59
|
+
tweakSelectList: {};
|
|
60
60
|
};
|
|
61
61
|
export declare type SelectStyles = ComponentStyles<typeof styles>;
|
|
@@ -2,35 +2,20 @@ import React, { ReactNode } from 'react';
|
|
|
2
2
|
import { ICommonProps } from '../../../types';
|
|
3
3
|
import { SelectListStyles } from './SelectList.styles';
|
|
4
4
|
export interface ISelectListProps<Value> extends ICommonProps {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
5
|
+
tweakStyles?: SelectListStyles;
|
|
6
|
+
options: Value[];
|
|
7
|
+
focusedIndex?: number;
|
|
8
|
+
activeValue?: Value;
|
|
9
|
+
noMatchesLabel?: string;
|
|
10
|
+
isLoading?: boolean;
|
|
11
|
+
loadingLabel?: React.ReactNode;
|
|
12
|
+
defaultOptionLabel?: string;
|
|
13
|
+
onOptionClick: (index: number) => void;
|
|
14
|
+
testId?: string;
|
|
15
|
+
shouldScrollToList?: boolean;
|
|
16
|
+
convertValueToString: (value: Value) => string | undefined;
|
|
17
|
+
convertValueToReactNode?: (value: Value) => ReactNode;
|
|
18
|
+
convertValueToId?: (value: Value) => string | undefined;
|
|
19
19
|
}
|
|
20
20
|
export declare function isOptionDisabled<Value>(option: Value): boolean;
|
|
21
|
-
export declare function SelectList<Value>({
|
|
22
|
-
options,
|
|
23
|
-
onOptionClick,
|
|
24
|
-
focusedIndex,
|
|
25
|
-
activeValue,
|
|
26
|
-
defaultOptionLabel,
|
|
27
|
-
noMatchesLabel,
|
|
28
|
-
isLoading,
|
|
29
|
-
loadingLabel,
|
|
30
|
-
convertValueToString,
|
|
31
|
-
convertValueToReactNode,
|
|
32
|
-
convertValueToId,
|
|
33
|
-
tweakStyles,
|
|
34
|
-
testId,
|
|
35
|
-
shouldScrollToList,
|
|
36
|
-
}: ISelectListProps<Value>): JSX.Element;
|
|
21
|
+
export declare function SelectList<Value>({ options, onOptionClick, focusedIndex, activeValue, defaultOptionLabel, noMatchesLabel, isLoading, loadingLabel, convertValueToString, convertValueToReactNode, convertValueToId, tweakStyles, testId, shouldScrollToList, }: ISelectListProps<Value>): JSX.Element;
|
|
@@ -1,48 +1,46 @@
|
|
|
1
1
|
import { ComponentStyles } from '../../../types';
|
|
2
2
|
export declare const ROW_HEIGHT = 40;
|
|
3
3
|
export declare const styles: {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
| {
|
|
4
|
+
root: {
|
|
5
|
+
borderRadius: 6;
|
|
6
|
+
boxShadow: string;
|
|
7
|
+
boxSizing: string;
|
|
8
|
+
padding: number[];
|
|
9
|
+
fontSize: number;
|
|
10
|
+
};
|
|
11
|
+
list: {
|
|
13
12
|
height: string;
|
|
14
13
|
maxHeight: number;
|
|
15
14
|
cursor: string;
|
|
16
|
-
backgroundColor:
|
|
17
|
-
|
|
18
|
-
| {
|
|
15
|
+
backgroundColor: "#ffffff";
|
|
16
|
+
} | {
|
|
19
17
|
height: string;
|
|
20
18
|
maxHeight: number;
|
|
21
19
|
cursor: string;
|
|
22
|
-
backgroundColor:
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
20
|
+
backgroundColor: "#ffffff";
|
|
21
|
+
};
|
|
22
|
+
cell: {
|
|
23
|
+
display: string;
|
|
24
|
+
cursor: string;
|
|
25
|
+
minHeight: number;
|
|
26
|
+
width: string;
|
|
27
|
+
padding: number[];
|
|
28
|
+
alignItems: string;
|
|
29
|
+
boxSizing: string;
|
|
30
|
+
fontSize: number;
|
|
31
|
+
};
|
|
32
|
+
noMatchesLabel: {
|
|
33
|
+
pointerEvents: string;
|
|
34
|
+
};
|
|
35
|
+
focused: {};
|
|
36
|
+
active: {};
|
|
37
|
+
disabled: {
|
|
38
|
+
cursor: string;
|
|
39
|
+
};
|
|
40
|
+
loading: {
|
|
41
|
+
cursor: string;
|
|
42
|
+
pointerEvents: string;
|
|
43
|
+
};
|
|
44
|
+
defaultCell: {};
|
|
47
45
|
};
|
|
48
46
|
export declare type SelectListStyles = ComponentStyles<typeof styles>;
|
|
@@ -1,10 +1,3 @@
|
|
|
1
1
|
export declare const defaultConvertFunction: (v: unknown) => string | undefined;
|
|
2
|
-
export declare const defaultCompareFunction: <Value>(
|
|
3
|
-
|
|
4
|
-
v2: Value | undefined,
|
|
5
|
-
) => boolean;
|
|
6
|
-
export declare const getActiveValueIndex: <Value>(
|
|
7
|
-
options: Value[],
|
|
8
|
-
value: Value | undefined,
|
|
9
|
-
convertFunc: (v?: Value | undefined) => string | undefined,
|
|
10
|
-
) => number;
|
|
2
|
+
export declare const defaultCompareFunction: <Value>(v1: Value, v2: Value) => boolean;
|
|
3
|
+
export declare const getActiveValueIndex: <Value>(options: Value[], value: Value | undefined, convertFunc: (v: Value) => string | undefined) => number;
|
|
@@ -1,34 +1,22 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { IInputProps } from '../Input';
|
|
3
|
-
export declare type TSmartType =
|
|
4
|
-
| 'name'
|
|
5
|
-
| 'nameRuEn'
|
|
6
|
-
| 'surname'
|
|
7
|
-
| 'surnameRuEn'
|
|
8
|
-
| 'email'
|
|
9
|
-
| 'agencyName'
|
|
10
|
-
| 'default'
|
|
11
|
-
| 'digits'
|
|
12
|
-
| 'docNumber'
|
|
13
|
-
| 'benefitCert';
|
|
3
|
+
export declare type TSmartType = 'name' | 'nameRuEn' | 'surname' | 'surnameRuEn' | 'email' | 'agencyName' | 'default' | 'digits' | 'docNumber' | 'benefitCert';
|
|
14
4
|
export interface ISmartInputProps extends IInputProps {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
5
|
+
isUpperCase?: boolean;
|
|
6
|
+
smartType?: TSmartType;
|
|
7
|
+
regExp?: RegExp;
|
|
8
|
+
onChange: (value: string) => void;
|
|
19
9
|
}
|
|
20
10
|
export declare const SMART_INPUT_REGEX_MAP: {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
11
|
+
default: RegExp;
|
|
12
|
+
agencyName: RegExp;
|
|
13
|
+
surname: RegExp;
|
|
14
|
+
name: RegExp;
|
|
15
|
+
surnameRuEn: RegExp;
|
|
16
|
+
nameRuEn: RegExp;
|
|
17
|
+
email: RegExp;
|
|
18
|
+
digits: RegExp;
|
|
19
|
+
docNumber: RegExp;
|
|
20
|
+
benefitCert: RegExp;
|
|
31
21
|
};
|
|
32
|
-
export declare const SmartInput: React.ForwardRefExoticComponent<
|
|
33
|
-
ISmartInputProps & React.RefAttributes<HTMLInputElement>
|
|
34
|
-
>;
|
|
22
|
+
export declare const SmartInput: React.ForwardRefExoticComponent<ISmartInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
import { TSmartType } from './SmartInput';
|
|
2
|
-
export declare const transformCaseSensitive: (
|
|
3
|
-
smartType: TSmartType,
|
|
4
|
-
map: {
|
|
2
|
+
export declare const transformCaseSensitive: (smartType: TSmartType, map: {
|
|
5
3
|
[key: string]: string;
|
|
6
|
-
|
|
7
|
-
symbol: string,
|
|
8
|
-
) => string;
|
|
4
|
+
}, symbol: string) => string;
|
|
9
5
|
export declare const CharactersMap: {
|
|
10
|
-
|
|
6
|
+
[key: string]: string;
|
|
11
7
|
};
|
|
12
8
|
export declare const TransliterationMap: {
|
|
13
|
-
|
|
9
|
+
[key: string]: string;
|
|
14
10
|
};
|
|
@@ -2,32 +2,19 @@ import { PropsWithChildren } from 'react';
|
|
|
2
2
|
import { ICommonProps } from '../../types';
|
|
3
3
|
import { SwitchStyles } from './Switch.styles';
|
|
4
4
|
export interface ISwitchState<V = string> {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
name: V;
|
|
6
|
+
isEnabled: boolean;
|
|
7
7
|
}
|
|
8
8
|
export interface ISwitchProps<V extends string> extends ICommonProps {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
9
|
+
tweakStyles?: SwitchStyles;
|
|
10
|
+
value: V;
|
|
11
|
+
isChecked: boolean;
|
|
12
|
+
isDisabled?: boolean;
|
|
13
|
+
isInvalid?: boolean;
|
|
14
|
+
label?: string;
|
|
15
|
+
labelPosition?: 'left' | 'right';
|
|
16
|
+
color?: 'primary' | 'secondary';
|
|
17
|
+
onChange: (state: ISwitchState<V>) => void;
|
|
18
|
+
testId?: string;
|
|
19
19
|
}
|
|
20
|
-
export declare const Switch: <V extends string>({
|
|
21
|
-
isDisabled,
|
|
22
|
-
isChecked,
|
|
23
|
-
isInvalid,
|
|
24
|
-
onChange,
|
|
25
|
-
value,
|
|
26
|
-
label,
|
|
27
|
-
children,
|
|
28
|
-
labelPosition,
|
|
29
|
-
color,
|
|
30
|
-
data,
|
|
31
|
-
tweakStyles,
|
|
32
|
-
testId,
|
|
33
|
-
}: PropsWithChildren<ISwitchProps<V>>) => JSX.Element;
|
|
20
|
+
export declare const Switch: <V extends string>({ isDisabled, isChecked, isInvalid, onChange, value, label, children, labelPosition, color, data, tweakStyles, testId, }: PropsWithChildren<ISwitchProps<V>>) => JSX.Element;
|
|
@@ -1,62 +1,62 @@
|
|
|
1
1
|
import { ComponentStyles } from '../../types';
|
|
2
2
|
export declare const styles: {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
3
|
+
root: {
|
|
4
|
+
display: string;
|
|
5
|
+
alignItems: string;
|
|
6
|
+
cursor: string;
|
|
7
|
+
};
|
|
8
|
+
primary: {};
|
|
9
|
+
secondary: {};
|
|
10
|
+
invalid: {};
|
|
11
|
+
disabled: {
|
|
12
|
+
pointerEvents: string;
|
|
13
|
+
cursor: string;
|
|
14
|
+
};
|
|
15
|
+
checked: {
|
|
16
|
+
'& $switch::before': {
|
|
17
|
+
left: number;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
switch: {
|
|
21
|
+
position: string;
|
|
22
|
+
flexShrink: number;
|
|
23
|
+
display: string;
|
|
24
|
+
width: number;
|
|
25
|
+
height: number;
|
|
26
|
+
backgroundColor: string;
|
|
27
|
+
borderRadius: number;
|
|
28
|
+
boxSizing: string;
|
|
29
|
+
transitionProperty: string;
|
|
30
|
+
transition: string;
|
|
31
|
+
'&::before': {
|
|
32
|
+
content: string;
|
|
33
|
+
position: string;
|
|
34
|
+
top: number;
|
|
35
|
+
left: number;
|
|
36
|
+
right: string;
|
|
37
|
+
display: string;
|
|
38
|
+
width: number;
|
|
39
|
+
height: number;
|
|
40
|
+
backgroundColor: string;
|
|
41
|
+
borderRadius: string;
|
|
42
|
+
zIndex: number;
|
|
43
|
+
transitionProperty: string;
|
|
44
|
+
transition: string;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
input: {
|
|
48
|
+
display: string;
|
|
49
|
+
};
|
|
50
|
+
label: {
|
|
51
|
+
transitionProperty: string;
|
|
52
|
+
transition: string;
|
|
53
|
+
};
|
|
54
|
+
labelLeft: {
|
|
55
|
+
order: number;
|
|
56
|
+
marginRight: number;
|
|
57
|
+
};
|
|
58
|
+
labelRight: {
|
|
59
|
+
marginLeft: number;
|
|
60
|
+
};
|
|
61
61
|
};
|
|
62
62
|
export declare type SwitchStyles = ComponentStyles<typeof styles>;
|