@true-engineering/true-react-common-ui-kit 1.0.1 → 1.0.2

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.
Files changed (136) hide show
  1. package/LICENSE +1 -1
  2. package/dist/components/AccountInfo/AccountInfo.d.ts +4 -4
  3. package/dist/components/AccountInfo/AccountInfo.styles.d.ts +56 -60
  4. package/dist/components/AddButton/AddButton.d.ts +6 -6
  5. package/dist/components/AddButton/AddButton.styles.d.ts +23 -23
  6. package/dist/components/Button/Button.d.ts +33 -19
  7. package/dist/components/Button/Button.styles.d.ts +144 -144
  8. package/dist/components/Checkbox/Checkbox.d.ts +27 -16
  9. package/dist/components/Checkbox/Checkbox.styles.d.ts +42 -39
  10. package/dist/components/CloseButton/CloseButton.d.ts +4 -4
  11. package/dist/components/CloseButton/CloseButton.styles.d.ts +22 -22
  12. package/dist/components/Colors/Colors.styles.d.ts +28 -28
  13. package/dist/components/CssBaseline/CssBaseline.d.ts +1 -1
  14. package/dist/components/CssBaseline/CssBaseline.styles.d.ts +7 -7
  15. package/dist/components/DateInput/DateInput.d.ts +9 -8
  16. package/dist/components/DateInput/DateInput.styles.d.ts +7 -7
  17. package/dist/components/DatePicker/DatePicker.d.ts +36 -29
  18. package/dist/components/DatePicker/DatePicker.styles.d.ts +34 -38
  19. package/dist/components/DatePicker/DatePickerHeader/DatePickerHeader.d.ts +9 -9
  20. package/dist/components/DatePicker/DatePickerHeader/DatePickerHeader.styles.d.ts +59 -59
  21. package/dist/components/DatePicker/DatePickerInput/DatePickerInput.d.ts +9 -7
  22. package/dist/components/DatePicker/DatePickerInput/DatePickerInput.styles.d.ts +16 -16
  23. package/dist/components/Description/Description.d.ts +6 -6
  24. package/dist/components/Description/Description.styles.d.ts +18 -18
  25. package/dist/components/FiltersPane/FilterInterval/FilterInterval.d.ts +19 -19
  26. package/dist/components/FiltersPane/FilterInterval/FilterInterval.styles.d.ts +44 -44
  27. package/dist/components/FiltersPane/FilterMultiSelect/FilterMultiSelect.d.ts +8 -2
  28. package/dist/components/FiltersPane/FilterSelect/FilterSelect.d.ts +35 -17
  29. package/dist/components/FiltersPane/FilterSelect/FilterSelect.styles.d.ts +111 -111
  30. package/dist/components/FiltersPane/FilterSelect/locales.d.ts +10 -6
  31. package/dist/components/FiltersPane/FilterValueView/FilterValueView.d.ts +9 -1
  32. package/dist/components/FiltersPane/FilterValueView/FilterValueView.styles.d.ts +8 -8
  33. package/dist/components/FiltersPane/FilterWithDates/FilterWithDates.d.ts +21 -13
  34. package/dist/components/FiltersPane/FilterWithDates/FilterWithDates.styles.d.ts +41 -41
  35. package/dist/components/FiltersPane/FilterWithPeriod/FilterWithPeriod.d.ts +8 -8
  36. package/dist/components/FiltersPane/FilterWithPeriod/FilterWithPeriod.styles.d.ts +7 -7
  37. package/dist/components/FiltersPane/FilterWrapper/FilterWrapper.d.ts +41 -18
  38. package/dist/components/FiltersPane/FilterWrapper/FilterWrapper.styles.d.ts +92 -92
  39. package/dist/components/FiltersPane/FiltersPane.d.ts +34 -15
  40. package/dist/components/FiltersPane/FiltersPane.styles.d.ts +50 -50
  41. package/dist/components/FiltersPane/FiltersPaneSearch/FiltersPaneSearch.d.ts +37 -18
  42. package/dist/components/FiltersPane/FiltersPaneSearch/FiltersPaneSearch.styles.d.ts +82 -82
  43. package/dist/components/FiltersPane/locales.d.ts +28 -22
  44. package/dist/components/FiltersPane/types.d.ts +65 -38
  45. package/dist/components/Flag/Flag.d.ts +2 -2
  46. package/dist/components/Flag/Flag.styles.d.ts +8 -8
  47. package/dist/components/FlexibleTable/FlexibleTable.d.ts +45 -20
  48. package/dist/components/FlexibleTable/FlexibleTable.styles.d.ts +93 -93
  49. package/dist/components/FlexibleTable/TableRow.d.ts +38 -21
  50. package/dist/components/FlexibleTable/TableValue.d.ts +28 -16
  51. package/dist/components/FlexibleTable/types.d.ts +37 -31
  52. package/dist/components/Icon/ComplexIconBoilerplate.d.ts +1 -1
  53. package/dist/components/Icon/Icon.d.ts +2 -2
  54. package/dist/components/Icon/Icon.styles.d.ts +4 -4
  55. package/dist/components/Icon/IconBoilerplate.d.ts +1 -1
  56. package/dist/components/Icon/complexIcons/icons.d.ts +1 -1
  57. package/dist/components/Icon/icons/icons.d.ts +97 -5
  58. package/dist/components/IncrementInput/ChangeButton.d.ts +5 -5
  59. package/dist/components/IncrementInput/IncrementInput.d.ts +4 -3
  60. package/dist/components/IncrementInput/IncrementInput.styles.d.ts +52 -52
  61. package/dist/components/Input/Input.d.ts +48 -37
  62. package/dist/components/Input/Input.styles.d.ts +242 -242
  63. package/dist/components/List/List.d.ts +12 -12
  64. package/dist/components/List/List.styles.d.ts +35 -35
  65. package/dist/components/Modal/Modal.d.ts +19 -19
  66. package/dist/components/Modal/Modal.styles.d.ts +235 -235
  67. package/dist/components/MoreMenu/MoreMenu.d.ts +7 -7
  68. package/dist/components/MoreMenu/MoreMenu.styles.d.ts +45 -44
  69. package/dist/components/MultiSelect/MultiSelect.d.ts +28 -13
  70. package/dist/components/MultiSelect/MultiSelect.styles.d.ts +38 -38
  71. package/dist/components/MultiSelect/MultiSelectInput/MultiSelectInput.d.ts +12 -6
  72. package/dist/components/MultiSelect/MultiSelectInput/MultiSelectInput.styles.d.ts +58 -58
  73. package/dist/components/MultiSelectList/MultiSelectList.d.ts +43 -20
  74. package/dist/components/MultiSelectList/MultiSelectList.styles.d.ts +90 -90
  75. package/dist/components/MultiSelectList/locales.d.ts +10 -6
  76. package/dist/components/Notification/Notification.d.ts +14 -9
  77. package/dist/components/Notification/Notification.styles.d.ts +33 -30
  78. package/dist/components/NumberInput/NumberInput.d.ts +16 -10
  79. package/dist/components/NumberInput/helpers.d.ts +10 -2
  80. package/dist/components/PhoneInput/PhoneInput.d.ts +14 -7
  81. package/dist/components/PhoneInput/PhoneInput.styles.d.ts +60 -60
  82. package/dist/components/PhoneInput/PhoneInputCountryList/PhoneInputCountryList.d.ts +7 -7
  83. package/dist/components/PhoneInput/PhoneInputCountryList/PhoneInputCountryList.styles.d.ts +78 -74
  84. package/dist/components/PhoneInput/types.d.ts +11 -11
  85. package/dist/components/RadioButton/RadioButton.d.ts +18 -8
  86. package/dist/components/RadioButton/RadioButton.styles.d.ts +25 -25
  87. package/dist/components/ScrollIntoViewIfNeeded/ScrollIntoViewIfNeeded.d.ts +634 -374
  88. package/dist/components/SearchInput/SearchInput.d.ts +12 -2
  89. package/dist/components/SearchInput/SearchInput.styles.d.ts +32 -32
  90. package/dist/components/Select/Select.d.ts +50 -21
  91. package/dist/components/Select/Select.styles.d.ts +53 -53
  92. package/dist/components/Select/SelectList/SelectList.d.ts +30 -15
  93. package/dist/components/Select/SelectList/SelectList.styles.d.ts +37 -35
  94. package/dist/components/Select/helpers.d.ts +9 -2
  95. package/dist/components/SmartInput/SmartInput.d.ts +28 -16
  96. package/dist/components/SmartInput/helpers.d.ts +8 -4
  97. package/dist/components/Switch/Switch.d.ts +26 -13
  98. package/dist/components/Switch/Switch.styles.d.ts +58 -58
  99. package/dist/components/TextArea/TextArea.d.ts +26 -23
  100. package/dist/components/TextArea/TextArea.styles.d.ts +124 -124
  101. package/dist/components/TextWithInfo/TextWithInfo.d.ts +9 -9
  102. package/dist/components/TextWithInfo/TextWithInfo.styles.d.ts +40 -40
  103. package/dist/components/TextWithTooltip/TextWithTooltip.d.ts +12 -12
  104. package/dist/components/TextWithTooltip/TextWithTooltip.styles.d.ts +10 -10
  105. package/dist/components/ThemedPreloader/ThemedPreloader.d.ts +4 -4
  106. package/dist/components/ThemedPreloader/ThemedPreloader.styles.d.ts +10 -10
  107. package/dist/components/ThemedPreloader/components/DotsPreloader/DotsPreloader.d.ts +1 -1
  108. package/dist/components/ThemedPreloader/components/DotsPreloader/DotsPreloader.styles.d.ts +35 -35
  109. package/dist/components/ThemedPreloader/components/SvgPreloader/SvgPreloader.d.ts +2 -2
  110. package/dist/components/ThemedPreloader/components/SvgPreloader/SvgPreloader.styles.d.ts +5 -5
  111. package/dist/components/Toaster/Toaster.d.ts +16 -11
  112. package/dist/components/Toaster/Toaster.styles.d.ts +41 -41
  113. package/dist/components/Tooltip/Tooltip.d.ts +4 -4
  114. package/dist/components/Tooltip/Tooltip.styles.d.ts +25 -27
  115. package/dist/helpers/data-attributes.d.ts +11 -4
  116. package/dist/helpers/phone.d.ts +28 -8
  117. package/dist/helpers/utils.d.ts +28 -7
  118. package/dist/hooks/use-did-mount-effect.d.ts +4 -1
  119. package/dist/hooks/use-dropdown.d.ts +14 -7
  120. package/dist/hooks/use-is-mounted.d.ts +1 -1
  121. package/dist/hooks/use-on-click-outside.d.ts +25 -4
  122. package/dist/hooks/use-theme.d.ts +10 -5
  123. package/dist/hooks/use-tweak-styles.d.ts +5 -1
  124. package/dist/style.css +205 -90
  125. package/dist/theme.d.ts +51 -55
  126. package/dist/true-react-common-ui-kit.js +24375 -16679
  127. package/dist/true-react-common-ui-kit.js.map +1 -1
  128. package/dist/true-react-common-ui-kit.umd.cjs +300 -211
  129. package/dist/true-react-common-ui-kit.umd.cjs.map +1 -1
  130. package/dist/types.d.ts +77 -23
  131. package/package.json +1 -1
  132. package/src/components/List/List.tsx +9 -2
  133. package/src/components/Modal/Modal.tsx +1 -1
  134. package/src/components/MoreMenu/MoreMenu.styles.ts +2 -0
  135. package/src/components/MoreMenu/MoreMenu.tsx +35 -24
  136. package/src/types.ts +1 -1
@@ -1,7 +1,17 @@
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<IInputProps, 'type' | 'isInvalid' | 'errorMessage' | 'label' | 'isActive' | 'errorPosition' | 'hasFloatingLabel' | 'border'> & {
5
- tweakStyles?: SearchInputStyles;
4
+ export declare type ISearchInputProps = Omit<
5
+ IInputProps,
6
+ | 'type'
7
+ | 'isInvalid'
8
+ | 'errorMessage'
9
+ | 'label'
10
+ | 'isActive'
11
+ | 'errorPosition'
12
+ | 'hasFloatingLabel'
13
+ | 'border'
14
+ > & {
15
+ tweakStyles?: SearchInputStyles;
6
16
  };
7
17
  export declare const SearchInput: FC<ISearchInputProps>;
@@ -1,39 +1,39 @@
1
1
  import { ComponentStyles } from '../../types';
2
2
  export declare const styles: {
3
- root: {
4
- position: string;
3
+ root: {
4
+ position: string;
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;
5
24
  };
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";
25
+ focused: {
26
+ backgroundColor: '#ffffff';
27
+ borderColor: '#d0d6e1';
15
28
  };
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
- };
29
+ input: {
30
+ fontSize: number;
31
+ paddingLeft: number;
37
32
  };
33
+ label: {
34
+ left: number;
35
+ fontSize: number;
36
+ };
37
+ };
38
38
  };
39
39
  export declare type SearchInputStyles = ComponentStyles<typeof styles>;
@@ -3,25 +3,54 @@ 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> 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;
21
- onChange: (value?: Value) => void;
22
- compareValuesOnChange?: (v1: Value | undefined, v2: Value | undefined) => boolean;
23
- convertValueToString?: (value?: Value) => string | undefined;
24
- convertValueToReactNode?: (value?: Value) => ReactNode | undefined;
25
- convertValueToId?: (value?: Value) => string | undefined;
6
+ export interface ISelectProps<Value>
7
+ extends Omit<IInputProps, 'value' | 'onChange' | 'type'> {
8
+ tweakStyles?: SelectStyles;
9
+ defaultOptionLabel?: string;
10
+ noMatchesLabel?: string;
11
+ loadingLabel?: React.ReactNode;
12
+ optionsMode?: 'search' | 'dynamic' | 'normal';
13
+ onType?: (value: string) => Promise<void>;
14
+ debounceTime?: number;
15
+ minSymbolsCountToOpenList?: number;
16
+ dropdownOptions?: IDropdownWithPopperOptions;
17
+ dropdownIcon?: IIconType;
18
+ onOpen?: () => void;
19
+ optionsFilter?: (options: Value[], query: string) => Value[];
20
+ options: Value[];
21
+ value?: Value;
22
+ onChange: (value?: Value) => void;
23
+ compareValuesOnChange?: (
24
+ v1: Value | undefined,
25
+ v2: Value | undefined,
26
+ ) => boolean;
27
+ convertValueToString?: (value?: Value) => string | undefined;
28
+ convertValueToReactNode?: (value?: Value) => ReactNode | undefined;
29
+ convertValueToId?: (value?: Value) => string | undefined;
26
30
  }
27
- 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, ...inputProps }: ISelectProps<Value>): JSX.Element;
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;
@@ -1,61 +1,61 @@
1
1
  import { ComponentStyles } from '../../types';
2
2
  export declare const styles: {
3
- root: {
4
- width: string;
5
- position: string;
6
- boxSizing: string;
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;
3
+ root: {
4
+ width: string;
5
+ position: string;
6
+ boxSizing: string;
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;
40
49
  };
41
50
  disabled: {
42
- '& $arrow': {
43
- cursor: string;
44
- };
51
+ '& $input': {
52
+ cursor: string;
53
+ };
45
54
  };
46
- tweakInput: {
47
- input: {
48
- paddingRight: number;
49
- };
50
- disabled: {
51
- '& $input': {
52
- cursor: string;
53
- };
54
- };
55
- controls: {
56
- paddingRight: number;
57
- };
55
+ controls: {
56
+ paddingRight: number;
58
57
  };
59
- tweakSelectList: {};
58
+ };
59
+ tweakSelectList: {};
60
60
  };
61
61
  export declare type SelectStyles = ComponentStyles<typeof styles>;
@@ -2,20 +2,35 @@ 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
- 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 | undefined;
18
- convertValueToId?: (value?: Value) => string | undefined;
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 | undefined;
18
+ convertValueToId?: (value?: Value) => string | undefined;
19
19
  }
20
20
  export declare function isOptionDisabled<Value>(option: Value): boolean;
21
- export declare function SelectList<Value>({ options, onOptionClick, focusedIndex, activeValue, defaultOptionLabel, noMatchesLabel, isLoading, loadingLabel, convertValueToString, convertValueToReactNode, convertValueToId, tweakStyles, testId, shouldScrollToList, }: ISelectListProps<Value>): JSX.Element;
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;
@@ -1,46 +1,48 @@
1
1
  import { ComponentStyles } from '../../../types';
2
2
  export declare const ROW_HEIGHT = 40;
3
3
  export declare const styles: {
4
- root: {
5
- borderRadius: 6;
6
- boxShadow: string;
7
- boxSizing: string;
8
- padding: number[];
9
- fontSize: number;
10
- };
11
- list: {
4
+ root: {
5
+ borderRadius: 6;
6
+ boxShadow: string;
7
+ boxSizing: string;
8
+ padding: number[];
9
+ fontSize: number;
10
+ };
11
+ list:
12
+ | {
12
13
  height: string;
13
14
  maxHeight: number;
14
15
  cursor: string;
15
- backgroundColor: "#ffffff";
16
- } | {
16
+ backgroundColor: '#ffffff';
17
+ }
18
+ | {
17
19
  height: string;
18
20
  maxHeight: number;
19
21
  cursor: string;
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: {};
22
+ backgroundColor: '#ffffff';
23
+ };
24
+ cell: {
25
+ display: string;
26
+ cursor: string;
27
+ minHeight: number;
28
+ width: string;
29
+ padding: number[];
30
+ alignItems: string;
31
+ boxSizing: string;
32
+ fontSize: number;
33
+ };
34
+ noMatchesLabel: {
35
+ pointerEvents: string;
36
+ };
37
+ focused: {};
38
+ active: {};
39
+ disabled: {
40
+ cursor: string;
41
+ };
42
+ loading: {
43
+ cursor: string;
44
+ pointerEvents: string;
45
+ };
46
+ defaultCell: {};
45
47
  };
46
48
  export declare type SelectListStyles = ComponentStyles<typeof styles>;
@@ -1,3 +1,10 @@
1
1
  export declare const defaultConvertFunction: (v: unknown) => string | undefined;
2
- export declare const defaultCompareFunction: <Value>(v1: Value | undefined, v2: Value | undefined) => boolean;
3
- export declare const getActiveValueIndex: <Value>(options: Value[], value: Value | undefined, convertFunc: (v?: Value | undefined) => string | undefined) => number;
2
+ export declare const defaultCompareFunction: <Value>(
3
+ v1: Value | undefined,
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;
@@ -1,22 +1,34 @@
1
1
  import React from 'react';
2
2
  import { IInputProps } from '../Input';
3
- export declare type TSmartType = 'name' | 'nameRuEn' | 'surname' | 'surnameRuEn' | 'email' | 'agencyName' | 'default' | 'digits' | 'docNumber' | 'benefitCert';
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';
4
14
  export interface ISmartInputProps extends IInputProps {
5
- isUpperCase?: boolean;
6
- smartType?: TSmartType;
7
- regExp?: RegExp;
8
- onChange: (value: string) => void;
15
+ isUpperCase?: boolean;
16
+ smartType?: TSmartType;
17
+ regExp?: RegExp;
18
+ onChange: (value: string) => void;
9
19
  }
10
20
  export declare const SMART_INPUT_REGEX_MAP: {
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;
21
+ default: RegExp;
22
+ agencyName: RegExp;
23
+ surname: RegExp;
24
+ name: RegExp;
25
+ surnameRuEn: RegExp;
26
+ nameRuEn: RegExp;
27
+ email: RegExp;
28
+ digits: RegExp;
29
+ docNumber: RegExp;
30
+ benefitCert: RegExp;
21
31
  };
22
- export declare const SmartInput: React.ForwardRefExoticComponent<ISmartInputProps & React.RefAttributes<HTMLInputElement>>;
32
+ export declare const SmartInput: React.ForwardRefExoticComponent<
33
+ ISmartInputProps & React.RefAttributes<HTMLInputElement>
34
+ >;
@@ -1,10 +1,14 @@
1
1
  import { TSmartType } from './SmartInput';
2
- export declare const transformCaseSensitive: (smartType: TSmartType, map: {
2
+ export declare const transformCaseSensitive: (
3
+ smartType: TSmartType,
4
+ map: {
3
5
  [key: string]: string;
4
- }, symbol: string) => string;
6
+ },
7
+ symbol: string,
8
+ ) => string;
5
9
  export declare const CharactersMap: {
6
- [key: string]: string;
10
+ [key: string]: string;
7
11
  };
8
12
  export declare const TransliterationMap: {
9
- [key: string]: string;
13
+ [key: string]: string;
10
14
  };
@@ -2,19 +2,32 @@ 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
- name: V;
6
- isEnabled: boolean;
5
+ name: V;
6
+ isEnabled: boolean;
7
7
  }
8
8
  export interface ISwitchProps<V extends string> extends ICommonProps {
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;
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>({ isDisabled, isChecked, isInvalid, onChange, value, label, children, labelPosition, color, data, tweakStyles, testId, }: PropsWithChildren<ISwitchProps<V>>) => JSX.Element;
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;
@@ -1,62 +1,62 @@
1
1
  import { ComponentStyles } from '../../types';
2
2
  export declare const styles: {
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
- };
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>;