@true-engineering/true-react-common-ui-kit 4.0.0-alpha3 → 4.0.0-alpha30

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 (221) hide show
  1. package/README.md +11 -607
  2. package/dist/components/Button/Button.styles.d.ts +1 -1
  3. package/dist/components/Checkbox/Checkbox.styles.d.ts +1 -1
  4. package/dist/components/ControlWrapper/ControlWrapper.d.ts +4 -2
  5. package/dist/components/ControlWrapper/ControlWrapper.styles.d.ts +2 -1
  6. package/dist/components/ControlWrapper/helpers.d.ts +4 -0
  7. package/dist/components/ControlWrapper/index.d.ts +2 -0
  8. package/dist/components/ControlWrapper/types.d.ts +12 -0
  9. package/dist/components/DatePicker/DatePicker.d.ts +3 -3
  10. package/dist/components/DatePicker/DatePicker.styles.d.ts +1 -1
  11. package/dist/components/DatePicker/components/PopperContainer/PopperContainer.d.ts +2 -4
  12. package/dist/components/DatePicker/helpers.d.ts +3 -0
  13. package/dist/components/DatePicker/types.d.ts +5 -3
  14. package/dist/components/FiltersPane/FiltersPane.d.ts +7 -2
  15. package/dist/components/FiltersPane/components/Filter/Filter.d.ts +2 -2
  16. package/dist/components/FiltersPane/components/Filter/helpers.d.ts +4 -0
  17. package/dist/components/FiltersPane/components/FilterInterval/FilterInterval.styles.d.ts +1 -1
  18. package/dist/components/FiltersPane/components/FilterSelect/FilterSelect.styles.d.ts +1 -1
  19. package/dist/components/FiltersPane/components/FilterValueView/FilterValueView.d.ts +3 -1
  20. package/dist/components/FiltersPane/components/FilterWithDates/FilterWithDates.styles.d.ts +2 -2
  21. package/dist/components/FiltersPane/components/FilterWrapper/FilterWrapper.d.ts +2 -2
  22. package/dist/components/FiltersPane/components/FiltersPaneSearch/FiltersPaneSearch.styles.d.ts +1 -1
  23. package/dist/components/FiltersPane/types.d.ts +16 -5
  24. package/dist/components/Flag/customFlags/customFlags.d.ts +10 -0
  25. package/dist/components/Flag/customFlags/index.d.ts +1 -0
  26. package/dist/components/FlexibleTable/FlexibleTable.d.ts +4 -2
  27. package/dist/components/FlexibleTable/components/FlexibleTableCell/FlexibleTableCell.d.ts +4 -3
  28. package/dist/components/FlexibleTable/components/FlexibleTableRow/FlexibleTableRow.d.ts +6 -6
  29. package/dist/components/FlexibleTable/constants.d.ts +18 -2
  30. package/dist/components/FlexibleTable/types.d.ts +20 -12
  31. package/dist/components/Icon/icons-list.d.ts +1 -1
  32. package/dist/components/IconButton/IconButton.styles.d.ts +1 -1
  33. package/dist/components/IncrementInput/IncrementInput.styles.d.ts +1 -3
  34. package/dist/components/Input/Input.d.ts +3 -2
  35. package/dist/components/Input/InputBase.d.ts +2 -2
  36. package/dist/components/List/List.d.ts +1 -1
  37. package/dist/components/List/index.d.ts +2 -1
  38. package/dist/components/List/types.d.ts +4 -0
  39. package/dist/components/Modal/Modal.styles.d.ts +1 -1
  40. package/dist/components/Notification/Notification.styles.d.ts +1 -1
  41. package/dist/components/ScrollIntoViewIfNeeded/ScrollIntoViewIfNeeded.d.ts +1 -1
  42. package/dist/components/SearchInput/SearchInput.d.ts +2 -2
  43. package/dist/components/Select/Select.d.ts +5 -3
  44. package/dist/components/Select/Select.styles.d.ts +5 -5
  45. package/dist/components/Select/components/SelectListItem/SelectListItem.d.ts +2 -1
  46. package/dist/components/Select/index.d.ts +1 -1
  47. package/dist/components/Status/Status.styles.d.ts +3 -2
  48. package/dist/components/Status/constants.d.ts +0 -1
  49. package/dist/components/Status/index.d.ts +1 -0
  50. package/dist/components/Status/types.d.ts +5 -2
  51. package/dist/components/TextArea/TextArea.d.ts +4 -5
  52. package/dist/components/TextArea/TextArea.styles.d.ts +5 -4
  53. package/dist/components/TextArea/index.d.ts +1 -1
  54. package/dist/components/TextArea/types.d.ts +4 -2
  55. package/dist/components/TextButton/TextButton.styles.d.ts +1 -1
  56. package/dist/components/Tooltip/Tooltip.d.ts +1 -1
  57. package/dist/components/Tooltip/Tooltip.styles.d.ts +1 -1
  58. package/dist/components/WithMessages/WithMessages.styles.d.ts +1 -1
  59. package/dist/components/WithPopup/WithPopup.d.ts +11 -3
  60. package/dist/hooks/index.d.ts +2 -0
  61. package/dist/hooks/use-intersection-ref.d.ts +8 -0
  62. package/dist/hooks/use-merge.d.ts +1 -0
  63. package/dist/hooks/use-mixed-styles.d.ts +3 -1
  64. package/dist/hooks/use-tweak-styles.d.ts +5 -5
  65. package/dist/style.css +78 -142
  66. package/dist/theme/Provider.d.ts +6 -3
  67. package/dist/theme/create-themed-styles.d.ts +2 -0
  68. package/dist/theme/helpers.d.ts +9 -3
  69. package/dist/theme/index.d.ts +2 -0
  70. package/dist/theme/true-jss/ThemedStylesManager.d.ts +18 -0
  71. package/dist/theme/true-jss/TweakStylesManager.d.ts +34 -0
  72. package/dist/theme/true-jss/index.d.ts +2 -0
  73. package/dist/theme/true-jss/jss-context.d.ts +9 -0
  74. package/dist/theme/types.d.ts +5 -3
  75. package/dist/true-react-common-ui-kit.js +7593 -6483
  76. package/dist/true-react-common-ui-kit.js.map +1 -1
  77. package/dist/true-react-common-ui-kit.umd.cjs +7618 -6509
  78. package/dist/true-react-common-ui-kit.umd.cjs.map +1 -1
  79. package/dist/types.d.ts +10 -3
  80. package/package.json +4 -5
  81. package/src/components/ControlWrapper/ControlWrapper.stories.tsx +8 -3
  82. package/src/components/ControlWrapper/ControlWrapper.styles.ts +7 -6
  83. package/src/components/ControlWrapper/ControlWrapper.tsx +31 -20
  84. package/src/components/ControlWrapper/helpers.ts +11 -0
  85. package/src/components/ControlWrapper/index.ts +2 -0
  86. package/src/components/ControlWrapper/types.ts +16 -0
  87. package/src/components/DateInput/DateInput.stories.tsx +0 -1
  88. package/src/components/DatePicker/DatePicker.stories.tsx +24 -11
  89. package/src/components/DatePicker/DatePicker.styles.ts +3 -1
  90. package/src/components/DatePicker/DatePicker.tsx +18 -10
  91. package/src/components/DatePicker/components/PopperContainer/PopperContainer.tsx +4 -4
  92. package/src/components/DatePicker/helpers.ts +13 -1
  93. package/src/components/DatePicker/types.ts +9 -4
  94. package/src/components/FiltersPane/FiltersPane.stories.tsx +4 -2
  95. package/src/components/FiltersPane/FiltersPane.tsx +28 -19
  96. package/src/components/FiltersPane/components/Filter/Filter.tsx +36 -30
  97. package/src/components/FiltersPane/components/Filter/helpers.ts +18 -0
  98. package/src/components/FiltersPane/components/FilterSelect/FilterSelect.tsx +22 -23
  99. package/src/components/FiltersPane/components/FilterValueView/FilterValueView.tsx +27 -22
  100. package/src/components/FiltersPane/components/FilterWithDates/FilterWithDates.styles.ts +2 -1
  101. package/src/components/FiltersPane/components/FilterWithDates/FilterWithDates.tsx +3 -4
  102. package/src/components/FiltersPane/components/FilterWithPeriod/FilterWithPeriod.tsx +4 -3
  103. package/src/components/FiltersPane/components/FilterWrapper/FilterWrapper.tsx +14 -10
  104. package/src/components/FiltersPane/components/FiltersPaneSearch/FiltersPaneSearch.styles.ts +5 -0
  105. package/src/components/FiltersPane/components/FiltersPaneSearch/FiltersPaneSearch.tsx +16 -19
  106. package/src/components/FiltersPane/types.ts +24 -5
  107. package/src/components/Flag/Flag.stories.tsx +2 -1
  108. package/src/components/Flag/Flag.styles.ts +4 -0
  109. package/src/components/Flag/Flag.tsx +23 -9
  110. package/src/components/Flag/customFlags/AB.svg +1 -0
  111. package/src/components/Flag/customFlags/OS.svg +1 -0
  112. package/src/components/Flag/customFlags/augment.d.ts +1 -0
  113. package/src/components/Flag/customFlags/customFlags.ts +13 -0
  114. package/src/components/Flag/customFlags/index.ts +1 -0
  115. package/src/components/FlexibleTable/FlexibleTable.tsx +40 -63
  116. package/src/components/FlexibleTable/components/FlexibleTableCell/FlexibleTableCell.tsx +8 -5
  117. package/src/components/FlexibleTable/components/FlexibleTableRow/FlexibleTableRow.tsx +13 -12
  118. package/src/components/FlexibleTable/constants.ts +6 -3
  119. package/src/components/FlexibleTable/types.ts +20 -16
  120. package/src/components/IncrementInput/IncrementInput.stories.tsx +2 -0
  121. package/src/components/IncrementInput/IncrementInput.styles.ts +31 -39
  122. package/src/components/IncrementInput/IncrementInput.tsx +28 -25
  123. package/src/components/Input/Input.stories.tsx +1 -6
  124. package/src/components/Input/Input.tsx +5 -3
  125. package/src/components/Input/InputBase.tsx +27 -25
  126. package/src/components/List/List.tsx +5 -2
  127. package/src/components/List/index.ts +2 -1
  128. package/src/components/List/types.ts +5 -0
  129. package/src/components/MultiSelectList/MultiSelectList.tsx +15 -11
  130. package/src/components/NumberInput/NumberInput.stories.tsx +5 -1
  131. package/src/components/PhoneInput/PhoneInput.stories.tsx +2 -1
  132. package/src/components/PhoneInput/PhoneInput.tsx +5 -2
  133. package/src/components/SearchInput/SearchInput.tsx +20 -29
  134. package/src/components/Select/CustomSelect.stories.tsx +1 -0
  135. package/src/components/Select/MultiSelect.stories.tsx +5 -0
  136. package/src/components/Select/Select.stories.tsx +6 -0
  137. package/src/components/Select/Select.styles.ts +5 -40
  138. package/src/components/Select/Select.tsx +36 -22
  139. package/src/components/Select/components/SelectList/SelectList.tsx +4 -2
  140. package/src/components/Select/components/SelectListItem/SelectListItem.tsx +5 -2
  141. package/src/components/Select/index.ts +1 -1
  142. package/src/components/Status/Status.stories.tsx +54 -1
  143. package/src/components/Status/Status.styles.ts +2 -37
  144. package/src/components/Status/constants.ts +0 -10
  145. package/src/components/Status/index.ts +1 -1
  146. package/src/components/Status/types.ts +7 -3
  147. package/src/components/TextArea/TextArea.stories.tsx +15 -1
  148. package/src/components/TextArea/TextArea.styles.ts +15 -8
  149. package/src/components/TextArea/TextArea.tsx +96 -62
  150. package/src/components/TextArea/index.ts +1 -1
  151. package/src/components/TextArea/types.ts +5 -5
  152. package/src/components/TextButton/TextButton.styles.ts +1 -0
  153. package/src/components/Tooltip/Tooltip.styles.ts +2 -0
  154. package/src/components/Tooltip/Tooltip.tsx +1 -1
  155. package/src/components/WithMessages/WithMessages.stories.tsx +1 -1
  156. package/src/components/WithPopup/WithPopup.tsx +36 -15
  157. package/src/constants/phone-info.ts +20 -33
  158. package/src/helpers/phone.ts +19 -15
  159. package/src/hooks/index.ts +2 -0
  160. package/src/hooks/use-intersection-ref.ts +30 -0
  161. package/src/hooks/use-merge.ts +8 -0
  162. package/src/hooks/use-mixed-styles.ts +9 -11
  163. package/src/hooks/use-tweak-styles.ts +49 -27
  164. package/src/theme/Provider.tsx +10 -5
  165. package/src/theme/create-themed-styles.ts +78 -0
  166. package/src/theme/helpers.ts +39 -39
  167. package/src/theme/index.ts +2 -0
  168. package/src/theme/true-jss/ThemedStylesManager.ts +92 -0
  169. package/src/theme/true-jss/TweakStylesManager.ts +157 -0
  170. package/src/theme/true-jss/index.ts +2 -0
  171. package/src/theme/true-jss/jss-context.tsx +34 -0
  172. package/src/theme/types.ts +5 -3
  173. package/src/types.ts +17 -4
  174. package/dist/components/AccountInfo/AccountInfo.stories.d.ts +0 -6
  175. package/dist/components/AddButton/AddButton.stories.d.ts +0 -6
  176. package/dist/components/Button/Button.stories.d.ts +0 -6
  177. package/dist/components/Checkbox/Checkbox.stories.d.ts +0 -8
  178. package/dist/components/CloseButton/CloseButton.stories.d.ts +0 -5
  179. package/dist/components/Colors/Colors.stories.d.ts +0 -5
  180. package/dist/components/ControlWrapper/ControlWrapper.stories.d.ts +0 -6
  181. package/dist/components/DateInput/DateInput.stories.d.ts +0 -7
  182. package/dist/components/DatePicker/DatePicker.stories.d.ts +0 -7
  183. package/dist/components/Description/Description.stories.d.ts +0 -16
  184. package/dist/components/FileInput/FileInput.stories.d.ts +0 -7
  185. package/dist/components/FileItem/FileItem.stories.d.ts +0 -8
  186. package/dist/components/FiltersPane/FiltersPane.stories.d.ts +0 -31
  187. package/dist/components/Flag/Flag.stories.d.ts +0 -12
  188. package/dist/components/FlexibleTable/FlexibleTable.stories.d.ts +0 -19
  189. package/dist/components/Icon/Icon.stories.d.ts +0 -6
  190. package/dist/components/IconButton/IconButton.stories.d.ts +0 -6
  191. package/dist/components/IncrementInput/IncrementInput.stories.d.ts +0 -6
  192. package/dist/components/Input/Input.stories.d.ts +0 -25
  193. package/dist/components/List/List.stories.d.ts +0 -5
  194. package/dist/components/Modal/Modal.stories.d.ts +0 -29
  195. package/dist/components/MoreMenu/MoreMenu.stories.d.ts +0 -6
  196. package/dist/components/MultiSelect/MultiSelect.stories.d.ts +0 -13
  197. package/dist/components/NewMoreMenu/NewMoreMenu.stories.d.ts +0 -12
  198. package/dist/components/Notification/Notification.stories.d.ts +0 -8
  199. package/dist/components/NumberInput/NumberInput.stories.d.ts +0 -7
  200. package/dist/components/PhoneInput/PhoneInput.stories.d.ts +0 -28
  201. package/dist/components/PhoneInput/components/PhoneInputCountryList/PhoneInputCountryList.stories.d.ts +0 -5
  202. package/dist/components/RadioButton/RadioButton.stories.d.ts +0 -7
  203. package/dist/components/SearchInput/SearchInput.stories.d.ts +0 -6
  204. package/dist/components/Select/CustomSelect.stories.d.ts +0 -11
  205. package/dist/components/Select/MultiSelect.stories.d.ts +0 -15
  206. package/dist/components/Select/Select.stories.d.ts +0 -15
  207. package/dist/components/Selector/Selector.stories.d.ts +0 -7
  208. package/dist/components/Skeleton/Skeleton.stories.d.ts +0 -6
  209. package/dist/components/SmartInput/SmartInput.stories.d.ts +0 -18
  210. package/dist/components/Status/Status.stories.d.ts +0 -6
  211. package/dist/components/Switch/Switch.stories.d.ts +0 -16
  212. package/dist/components/TextArea/TextArea.stories.d.ts +0 -17
  213. package/dist/components/TextButton/TextButton.stories.d.ts +0 -6
  214. package/dist/components/TextWithInfo/TextWithInfo.stories.d.ts +0 -12
  215. package/dist/components/TextWithTooltip/TextWithTooltip.stories.d.ts +0 -24
  216. package/dist/components/ThemedPreloader/ThemedPreloader.stories.d.ts +0 -17
  217. package/dist/components/Toaster/Toaster.stories.d.ts +0 -5
  218. package/dist/components/Tooltip/Tooltip.stories.d.ts +0 -5
  219. package/dist/components/WithMessages/WithMessages.stories.d.ts +0 -7
  220. package/dist/components/WithPopup/WithPopup.stories.d.ts +0 -16
  221. package/dist/components/WithTooltip/WithTooltip.stories.d.ts +0 -6
@@ -0,0 +1,12 @@
1
+ import { type Key } from 'react';
2
+ import { IClickHandlerEvent } from '../../types';
3
+ import { IIcon } from '../Icon';
4
+ export interface IControlWrapperSizes {
5
+ }
6
+ export type IControlWrapperSize = keyof IControlWrapperSizes;
7
+ export interface IControlWrapperIcon {
8
+ key?: Key;
9
+ iconComponent: IIcon;
10
+ onClick?: (event: IClickHandlerEvent) => void;
11
+ shouldResetSize?: boolean;
12
+ }
@@ -3,11 +3,11 @@ import ReactDatePicker from 'react-datepicker';
3
3
  import 'react-datepicker/dist/react-datepicker.css';
4
4
  import { ICommonProps } from '../../types';
5
5
  import { IDateInputProps } from '../DateInput';
6
- import { IDatePickerBaseProps, IRange } from './types';
6
+ import { IDatePickerBaseProps, IDatePickerLocale, IRange } from './types';
7
7
  import { IDatePickerStyles } from './DatePicker.styles';
8
8
  export interface IDatePickerProps extends IDatePickerBaseProps, ICommonProps<IDatePickerStyles> {
9
9
  selectedDate?: Date | null;
10
- locale: Locale;
10
+ locale: IDatePickerLocale;
11
11
  months?: string[];
12
12
  /** @default 'dd.MM.yyyy' */
13
13
  dateFormat?: string;
@@ -23,4 +23,4 @@ export interface IDatePickerProps extends IDatePickerBaseProps, ICommonProps<IDa
23
23
  onChangeDate?: (date: Date | null, event?: SyntheticEvent) => void;
24
24
  onChangeRange?: (date: IRange, event?: SyntheticEvent) => void;
25
25
  }
26
- export declare const DatePicker: import("react").ForwardRefExoticComponent<IDatePickerProps & import("react").RefAttributes<ReactDatePicker<never, undefined>>>;
26
+ export declare const DatePicker: import("react").ForwardRefExoticComponent<IDatePickerProps & import("react").RefAttributes<ReactDatePicker>>;
@@ -1,6 +1,6 @@
1
1
  import { ITweakStyles } from '../../theme';
2
2
  import { IDateInputStyles } from '../DateInput';
3
- export declare const useStyles: import("../../theme").IUseStyles<"popper" | "root" | "day" | "datepicker", unknown>;
3
+ export declare const useStyles: import("../../theme").IUseStyles<"popper" | "root" | "day" | "dayInner" | "datepicker", unknown>;
4
4
  export type IDatePickerStyles = ITweakStyles<typeof useStyles, {
5
5
  tweakDateInput: IDateInputStyles;
6
6
  }>;
@@ -1,4 +1,2 @@
1
- import { FC, ReactNode } from 'react';
2
- export declare const PopperContainer: FC<{
3
- children: ReactNode;
4
- }>;
1
+ import { FC, PropsWithChildren } from 'react';
2
+ export declare const PopperContainer: FC<PropsWithChildren>;
@@ -1,3 +1,6 @@
1
+ import { type Locale } from 'date-fns';
2
+ import { IDatePickerLocale } from './types';
1
3
  export declare const getDateFormatter: (dateFormat: string) => (date?: Date | null) => string;
2
4
  export declare const getDateValueParser: (dateFormat: string) => (value: string) => Date | null;
3
5
  export declare const areDatesEquals: (date1?: Date | null, date2?: Date | null) => boolean;
6
+ export declare const preparateDatePickerLocale: (locale: IDatePickerLocale) => Locale;
@@ -1,4 +1,6 @@
1
- import { ReactDatePickerProps } from 'react-datepicker';
2
- import { IDateInputProps } from '../DateInput';
1
+ import { DatePickerProps } from 'react-datepicker';
2
+ import { type Locale } from 'date-fns';
3
+ import { type IDateInputProps } from '../DateInput';
3
4
  export type IRange = [Date | null, Date | null] | null;
4
- export type IDatePickerBaseProps = Pick<ReactDatePickerProps, 'startDate' | 'endDate' | 'minDate' | 'maxDate' | 'allowSameDay' | 'disabledKeyboardNavigation' | 'monthsShown' | 'popperModifiers' | 'popperPlacement' | 'filterDate' | 'dayClassName' | 'calendarContainer' | 'onCalendarOpen' | 'onCalendarClose' | 'onYearChange' | 'onMonthChange' | 'focusSelectedMonth' | 'shouldCloseOnSelect' | 'showPreviousMonths' | 'todayButton' | 'renderCustomHeader' | 'customInputRef' | 'preventOpenOnFocus' | 'strictParsing' | 'highlightDates' | 'fixedHeight' | 'excludeScrollbar'> & Omit<IDateInputProps, 'date' | 'startDate' | 'endDate' | 'isRange' | 'isActive' | 'icon' | 'maxLength' | 'onChange' | 'onClick' | 'tweakStyles'>;
5
+ export type IDatePickerLocale = 'ru' | 'en' | Locale;
6
+ export type IDatePickerBaseProps = Pick<DatePickerProps, 'startDate' | 'endDate' | 'minDate' | 'maxDate' | 'allowSameDay' | 'disabledKeyboardNavigation' | 'monthsShown' | 'popperModifiers' | 'popperPlacement' | 'filterDate' | 'dayClassName' | 'calendarContainer' | 'onCalendarOpen' | 'onCalendarClose' | 'onYearChange' | 'onMonthChange' | 'focusSelectedMonth' | 'shouldCloseOnSelect' | 'showPreviousMonths' | 'todayButton' | 'renderCustomHeader' | 'customInputRef' | 'preventOpenOnFocus' | 'strictParsing' | 'highlightDates' | 'fixedHeight' | 'swapRange' | 'onKeyDown'> & Omit<IDateInputProps, 'date' | 'startDate' | 'endDate' | 'isRange' | 'isActive' | 'icon' | 'maxLength' | 'onChange' | 'onClick' | 'tweakStyles' | 'onKeyDown'>;
@@ -1,9 +1,10 @@
1
1
  /// <reference types="react" />
2
2
  import { ICommonProps } from '../../types';
3
+ import { IIcon } from '../Icon';
3
4
  import { IFiltersPaneSearchProps } from './components';
4
5
  import { ConfigType, IFilterLocaleKey, IPartialFilterLocale } from './types';
5
6
  import { IFiltersPaneStyles } from './FiltersPane.styles';
6
- export interface IFiltersPaneProps<Values, Content = Values> extends ICommonProps<IFiltersPaneStyles> {
7
+ export interface IFiltersPaneProps<Values extends Record<string, unknown>, Content = Values> extends ICommonProps<IFiltersPaneStyles> {
7
8
  filtersConfig: ConfigType<Values>;
8
9
  enabledFilters?: Array<keyof ConfigType<Values>>;
9
10
  /** @default {} */
@@ -15,8 +16,12 @@ export interface IFiltersPaneProps<Values, Content = Values> extends ICommonProp
15
16
  isDisabled?: boolean;
16
17
  /** @default true */
17
18
  hasClearButton?: boolean;
19
+ /** @default false */
20
+ shouldRenderDataId?: boolean;
21
+ /** @default 'filter' */
22
+ settingsIcon?: IIcon;
18
23
  onChangeFilters: (values: Partial<Values>) => void;
19
24
  onSettingsButtonClick?: () => void;
20
25
  onClear?: () => void;
21
26
  }
22
- export declare function FiltersPane<Values extends Record<string, unknown>, Content = Values>({ data, tweakStyles, filtersConfig, enabledFilters, values, localeKey, locale, search, isDisabled, hasClearButton, testId, onChangeFilters, onSettingsButtonClick, onClear, }: IFiltersPaneProps<Values, Content>): JSX.Element;
27
+ export declare function FiltersPane<Values extends Record<string, unknown>, Content = Values>({ data, tweakStyles, filtersConfig, enabledFilters, values, localeKey, locale, search, isDisabled, hasClearButton, shouldRenderDataId, settingsIcon, testId, onChangeFilters, onSettingsButtonClick, onClear, }: IFiltersPaneProps<Values, Content>): JSX.Element;
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import type { IFilterWrapperProps } from '../FilterWrapper';
3
- export interface IFilterProps<Values, Key extends keyof Values> extends IFilterWrapperProps<Values, Key> {
3
+ export interface IFilterProps<Values extends Record<string, unknown>, Key extends keyof Values> extends IFilterWrapperProps<Values, Key> {
4
4
  onChange: <V>(v: V) => void;
5
5
  onClose?: () => void;
6
6
  }
7
- export declare function Filter<Values, Key extends keyof Values>(props: IFilterProps<Values, Key>): JSX.Element | null;
7
+ export declare function Filter<Values extends Record<string, unknown>, Key extends keyof Values>(props: IFilterProps<Values, Key>): JSX.Element | null;
@@ -0,0 +1,4 @@
1
+ import { IDatePeriod, IFilterMultiSelectValues, IPeriod } from '../../types';
2
+ export declare const isDatePeriodValue: (value: any) => value is IDatePeriod;
3
+ export declare const isPeriodValue: (value: any) => value is IPeriod;
4
+ export declare const isMultiSelectValue: <T extends string>(value: any) => value is IFilterMultiSelectValues<T>;
@@ -3,7 +3,7 @@ import { IButtonStyles } from '../../../Button';
3
3
  import { IInputStyles } from '../../../Input';
4
4
  export declare const useStyles: import("../../../../theme").IUseStyles<"clear" | "root" | "inputWrapper" | "autosize", unknown>;
5
5
  export declare const inputStyles: IInputStyles;
6
- export declare const clearButtonStyles: Partial<import("jss").Styles<"content" | "outline" | "root" | "inline" | "text" | "icon" | "active" | "disabled" | "fullWidth" | "primary" | "secondary" | "warning" | "destructive" | "custom" | "children" | "iconFromLeft" | "iconFromRight" | "onlyIcon" | "withIcon" | "s" | "m" | "l" | "xl" | "loader" | "loading", unknown, undefined>> & Partial<{
6
+ export declare const clearButtonStyles: Partial<import("jss").Styles<"content" | "outline" | "custom" | "children" | "root" | "inline" | "text" | "icon" | "active" | "disabled" | "fullWidth" | "primary" | "secondary" | "warning" | "destructive" | "iconFromLeft" | "iconFromRight" | "onlyIcon" | "withIcon" | "s" | "m" | "l" | "xl" | "loader" | "loading", unknown, undefined>> & Partial<{
7
7
  tweakPreloader: Partial<import("jss").Styles<"root" | "default" | "currentColor" | "dots" | "logo", unknown, undefined>> & Partial<{
8
8
  tweakDotsPreloader: Partial<import("jss").Styles<"root" | "dot" | "fadedDot" | "@keyframes FadedDots", unknown, undefined>> & Partial<unknown>;
9
9
  tweakSvgPreloader: Partial<import("jss").Styles<"root", unknown, undefined>> & Partial<unknown>;
@@ -3,7 +3,7 @@ import { IButtonStyles } from '../../../Button';
3
3
  import { ISearchInputStyles } from '../../../SearchInput';
4
4
  export declare const useStyles: import("../../../../theme").IUseStyles<"clear" | "item" | "root" | "icon" | "label" | "preloader" | "footer" | "list" | "labelChosen" | "withoutTopGap" | "withClearButton" | "option" | "panel" | "panelWithFooter" | "dropdownInput" | "nothingFound", unknown>;
5
5
  export declare const searchInputStyles: ISearchInputStyles;
6
- export declare const clearButtonStyles: Partial<import("jss").Styles<"content" | "outline" | "root" | "inline" | "text" | "icon" | "active" | "disabled" | "fullWidth" | "primary" | "secondary" | "warning" | "destructive" | "custom" | "children" | "iconFromLeft" | "iconFromRight" | "onlyIcon" | "withIcon" | "s" | "m" | "l" | "xl" | "loader" | "loading", unknown, undefined>> & Partial<{
6
+ export declare const clearButtonStyles: Partial<import("jss").Styles<"content" | "outline" | "custom" | "children" | "root" | "inline" | "text" | "icon" | "active" | "disabled" | "fullWidth" | "primary" | "secondary" | "warning" | "destructive" | "iconFromLeft" | "iconFromRight" | "onlyIcon" | "withIcon" | "s" | "m" | "l" | "xl" | "loader" | "loading", unknown, undefined>> & Partial<{
7
7
  tweakPreloader: Partial<import("jss").Styles<"root" | "default" | "currentColor" | "dots" | "logo", unknown, undefined>> & Partial<{
8
8
  tweakDotsPreloader: Partial<import("jss").Styles<"root" | "dot" | "fadedDot" | "@keyframes FadedDots", unknown, undefined>> & Partial<unknown>;
9
9
  tweakSvgPreloader: Partial<import("jss").Styles<"root", unknown, undefined>> & Partial<unknown>;
@@ -2,4 +2,6 @@
2
2
  import { ICommonProps } from '../../../../types';
3
3
  import type { IFilterWrapperProps } from '../FilterWrapper';
4
4
  import { IFilterValueViewStyles } from './FilterValueView.styles';
5
- export declare function FilterValueView<Values, Key extends keyof Values>({ locale, localeKey, filter, value, tweakStyles, }: Omit<IFilterWrapperProps<Values, Key>, 'onChange' | 'filtersPaneRef' | 'tweakStyles'> & ICommonProps<IFilterValueViewStyles>): JSX.Element;
5
+ export interface IFilterValueView<Values extends Record<string, unknown>, Key extends keyof Values> extends Omit<IFilterWrapperProps<Values, Key>, 'filtersPaneRef' | 'tweakStyles' | 'onChange'>, ICommonProps<IFilterValueViewStyles> {
6
+ }
7
+ export declare function FilterValueView<Values extends Record<string, unknown>, Key extends keyof Values>({ value, filter, locale, localeKey, tweakStyles, }: IFilterValueView<Values, Key>): JSX.Element;
@@ -2,13 +2,13 @@ import { ITweakStyles } from '../../../../theme';
2
2
  import { IButtonStyles } from '../../../Button';
3
3
  import { IDatePickerStyles } from '../../../DatePicker';
4
4
  export declare const useStyles: import("../../../../theme").IUseStyles<"container" | "root" | "datepicker" | "containerItem" | "btnRow", unknown>;
5
- export declare const clearButtonStyles: Partial<import("jss").Styles<"content" | "outline" | "root" | "inline" | "text" | "icon" | "active" | "disabled" | "fullWidth" | "primary" | "secondary" | "warning" | "destructive" | "custom" | "children" | "iconFromLeft" | "iconFromRight" | "onlyIcon" | "withIcon" | "s" | "m" | "l" | "xl" | "loader" | "loading", unknown, undefined>> & Partial<{
5
+ export declare const clearButtonStyles: Partial<import("jss").Styles<"content" | "outline" | "custom" | "children" | "root" | "inline" | "text" | "icon" | "active" | "disabled" | "fullWidth" | "primary" | "secondary" | "warning" | "destructive" | "iconFromLeft" | "iconFromRight" | "onlyIcon" | "withIcon" | "s" | "m" | "l" | "xl" | "loader" | "loading", unknown, undefined>> & Partial<{
6
6
  tweakPreloader: Partial<import("jss").Styles<"root" | "default" | "currentColor" | "dots" | "logo", unknown, undefined>> & Partial<{
7
7
  tweakDotsPreloader: Partial<import("jss").Styles<"root" | "dot" | "fadedDot" | "@keyframes FadedDots", unknown, undefined>> & Partial<unknown>;
8
8
  tweakSvgPreloader: Partial<import("jss").Styles<"root", unknown, undefined>> & Partial<unknown>;
9
9
  }>;
10
10
  }>;
11
- export declare const backButtonStyles: Partial<import("jss").Styles<"content" | "outline" | "root" | "inline" | "text" | "icon" | "active" | "disabled" | "fullWidth" | "primary" | "secondary" | "warning" | "destructive" | "custom" | "children" | "iconFromLeft" | "iconFromRight" | "onlyIcon" | "withIcon" | "s" | "m" | "l" | "xl" | "loader" | "loading", unknown, undefined>> & Partial<{
11
+ export declare const backButtonStyles: Partial<import("jss").Styles<"content" | "outline" | "custom" | "children" | "root" | "inline" | "text" | "icon" | "active" | "disabled" | "fullWidth" | "primary" | "secondary" | "warning" | "destructive" | "iconFromLeft" | "iconFromRight" | "onlyIcon" | "withIcon" | "s" | "m" | "l" | "xl" | "loader" | "loading", unknown, undefined>> & Partial<{
12
12
  tweakPreloader: Partial<import("jss").Styles<"root" | "default" | "currentColor" | "dots" | "logo", unknown, undefined>> & Partial<{
13
13
  tweakDotsPreloader: Partial<import("jss").Styles<"root" | "dot" | "fadedDot" | "@keyframes FadedDots", unknown, undefined>> & Partial<unknown>;
14
14
  tweakSvgPreloader: Partial<import("jss").Styles<"root", unknown, undefined>> & Partial<unknown>;
@@ -2,7 +2,7 @@
2
2
  import { ICommonProps } from '../../../../types';
3
3
  import { ConfigItem, IFilterLocaleKey, IPartialFilterLocale } from '../../types';
4
4
  import { IFilterWrapperStyles } from './FilterWrapper.styles';
5
- export interface IFilterWrapperProps<Values, Key extends keyof Values> extends ICommonProps<IFilterWrapperStyles> {
5
+ export interface IFilterWrapperProps<Values extends Record<string, unknown>, Key extends keyof Values> extends ICommonProps<IFilterWrapperStyles> {
6
6
  filter: ConfigItem<Values[Key]>;
7
7
  value?: Values[Key];
8
8
  isDisabled?: boolean;
@@ -10,4 +10,4 @@ export interface IFilterWrapperProps<Values, Key extends keyof Values> extends I
10
10
  locale?: IPartialFilterLocale;
11
11
  onChange: <V>(value: V) => void;
12
12
  }
13
- export declare function FilterWrapper<Values, Key extends keyof Values>({ filter, value, isDisabled, locale, localeKey, data, testId, tweakStyles, onChange, }: IFilterWrapperProps<Values, Key>): JSX.Element;
13
+ export declare function FilterWrapper<Values extends Record<string, unknown>, Key extends keyof Values>({ filter, value, isDisabled, locale, localeKey, data, testId, tweakStyles, onChange, }: IFilterWrapperProps<Values, Key>): JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import { ITweakStyles } from '../../../../theme';
2
2
  import { ISearchInputStyles } from '../../../SearchInput';
3
3
  import { ISelectStyles } from '../../../Select';
4
- export declare const useStyles: import("../../../../theme").IUseStyles<"root" | "open" | "active" | "disabled" | "dropdownInput" | "chevronIcon" | "dropdown" | "focused" | "selectWrapper" | "selectBlock" | "selectLabel", unknown>;
4
+ export declare const useStyles: import("../../../../theme").IUseStyles<"root" | "open" | "active" | "disabled" | "dropdownInput" | "chevronIcon" | "dropdown" | "focused" | "hasValue" | "selectWrapper" | "selectBlock" | "selectLabel", unknown>;
5
5
  export declare const searchInputStyles: ISearchInputStyles;
6
6
  export declare const selectStyles: ISelectStyles;
7
7
  export type IFiltersPaneSearchStyles = ITweakStyles<typeof useStyles, {
@@ -1,4 +1,5 @@
1
1
  import { FC, ReactNode } from 'react';
2
+ import { ITestIdProps } from '../../types';
2
3
  import { IDatePickerProps } from '../DatePicker';
3
4
  import { IMultiSelectListValues } from '../MultiSelectList';
4
5
  import type { IFilterIntervalProps, IFilterMultiSelectProps, IFilterSelectProps, IFilterWithDatesProps, IFilterWithPeriodProps } from './components';
@@ -54,20 +55,30 @@ export type IDateRangeConfigItem<Value> = IConfigItemBasicBase<Value> & {
54
55
  type: 'dateRange';
55
56
  dateFormat?: string;
56
57
  } & Omit<IFilterWithPeriodProps, 'value' | 'onChange' | 'setIsOpen'>;
57
- export type CustomComponent<Value> = FC<{
58
+ export interface ICustomComponentProps<Value> extends ITestIdProps {
58
59
  value?: Value;
59
60
  onChange: (v?: Value) => void;
60
61
  onClose?: () => void;
61
62
  filter: ICustomConfigItem<Value>;
62
63
  localeKey?: IFilterLocaleKey;
63
64
  locale?: IPartialFilterLocale;
64
- }>;
65
- export interface ICustomConfigItem<Value> extends IConfigItemBasicBase<Value> {
66
- [key: string]: any;
65
+ }
66
+ export type CustomComponent<Value> = FC<ICustomComponentProps<Value>>;
67
+ export type ICustomValue<V> = V extends Array<infer T> ? T : never;
68
+ export interface ICustomRangeConfigItem<Value> extends IConfigItemBasicBase<Value> {
69
+ [key: string & {}]: any;
70
+ type: 'custom';
71
+ component: CustomComponent<Value>;
72
+ valueViewType?: 'range';
73
+ }
74
+ export interface ICustomMultipleConfigItem<Value> extends IConfigItemBasicBase<Value> {
75
+ [key: string & {}]: any;
67
76
  type: 'custom';
68
77
  component: CustomComponent<Value>;
69
- valueViewType?: 'range' | 'multiple';
78
+ valueViewType?: 'multiple';
79
+ getSelectedValue?: (v: ICustomValue<Value>) => ReactNode;
70
80
  }
81
+ export type ICustomConfigItem<Value> = ICustomRangeConfigItem<Value> | ICustomMultipleConfigItem<Value>;
71
82
  export type ConfigItem<Value> = ISelectConfigItem<Value> | IMultiSelectConfigItem<Value> | ICustomConfigItem<Value> | IDateRangeWithoutPeriodConfigItem<Value> | IDateRangeConfigItem<Value> | IIntervalConfigItem<Value> | IBooleanConfigItem<Value>;
72
83
  export type ConfigType<Values> = {
73
84
  [K in keyof Values]: ConfigItem<Values[K]>;
@@ -0,0 +1,10 @@
1
+ export declare const customFlags: {
2
+ /**
3
+ * Абхазия
4
+ */
5
+ AB: string;
6
+ /**
7
+ * Южная осетия
8
+ */
9
+ OS: string;
10
+ };
@@ -0,0 +1 @@
1
+ export * from './customFlags';
@@ -3,7 +3,7 @@ import { ICommonProps } from '../../types';
3
3
  import { IFlexibleTableRowProps } from './components';
4
4
  import { ITableRow, IFlexibleTableConfigType, IInfinityScrollConfig, IFlexibleTableRenderMode, IHeaderContent } from './types';
5
5
  import { IFlexibleTableStyles } from './FlexibleTable.styles';
6
- export interface IFlexibleTableProps<Row extends ITableRow, HeaderContent extends IHeaderContent<Row>, UniqueField extends keyof Row> extends ICommonProps<IFlexibleTableStyles>, Pick<IFlexibleTableRowProps<Row, HeaderContent, UniqueField>, 'uniqueField' | 'rowAttributes' | 'isFirstColumnSticky' | 'isExpandableRowComponentInitiallyOpen' | 'expandableRowComponent' | 'onRowClick' | 'onRowHover'> {
6
+ export interface IFlexibleTableProps<Row extends ITableRow, HeaderContent extends IHeaderContent<Row>, UniqueField extends keyof Row> extends ICommonProps<IFlexibleTableStyles>, Pick<IFlexibleTableRowProps<Row, HeaderContent, UniqueField>, 'uniqueField' | 'rowAttributes' | 'isFirstColumnSticky' | 'expandableRowComponent' | 'onRowClick' | 'onRowHover' | 'rowRef'> {
7
7
  content: Row[];
8
8
  /** @default 'table' */
9
9
  renderMode?: IFlexibleTableRenderMode;
@@ -27,5 +27,7 @@ export interface IFlexibleTableProps<Row extends ITableRow, HeaderContent extend
27
27
  nothingFoundContent?: ReactNode;
28
28
  /** @default true */
29
29
  shouldRenderHeader?: boolean;
30
+ /** @default false */
31
+ isExpandableRowComponentInitiallyOpen?: boolean | ((row: Row, index: number) => boolean);
30
32
  }
31
- export declare function FlexibleTable<Row extends ITableRow, HeaderContent extends IHeaderContent<Row> = IHeaderContent<Row>, UniqueField extends keyof Row = keyof Row>({ content, headerContent, config, enabledColumns, activeRows, uniqueField, isLoading, isFirstColumnSticky, isHorizontallyScrollable, isRowFocusable, infinityScrollConfig, renderMode, refForScroll, nothingFoundContent, data, testId, tweakStyles, shouldRenderHeader, onHeadClick, ...restProps }: IFlexibleTableProps<Row, HeaderContent, UniqueField>): JSX.Element;
33
+ export declare function FlexibleTable<Row extends ITableRow, HeaderContent extends IHeaderContent<Row> = IHeaderContent<Row>, UniqueField extends keyof Row = keyof Row>({ content, headerContent, config, enabledColumns, activeRows, uniqueField, isLoading, isFirstColumnSticky, isHorizontallyScrollable, isRowFocusable, infinityScrollConfig: infinityScrollConfigDeprecated, renderMode, refForScroll, nothingFoundContent, data, testId, tweakStyles, shouldRenderHeader, onHeadClick, isExpandableRowComponentInitiallyOpen: isRowInitiallyOpen, ...restProps }: IFlexibleTableProps<Row, HeaderContent, UniqueField>): JSX.Element;
@@ -1,14 +1,15 @@
1
- /// <reference types="react" />
1
+ import { ReactNode } from 'react';
2
2
  import { ICommonProps } from '../../../../types';
3
3
  import { ITableRow, IValueComponentProps, IFlexibleTableConfigType, IFlexibleTableRenderMode, IHeaderContent } from '../../types';
4
4
  import { IFlexibleTableCellStyles } from './FlexibleTableCell.styles';
5
- export interface IFlexibleTableCellProps<Row extends ITableRow, HeaderContent extends IHeaderContent<Row>> extends Pick<ICommonProps<IFlexibleTableCellStyles>, 'tweakStyles'>, Pick<IValueComponentProps<Row, unknown>, 'isFocusedRow' | 'isActiveRow' | 'isNestedComponentExpanded' | 'isRowNestedComponentExpanded' | 'onSetNestedComponent'> {
5
+ export interface IFlexibleTableCellProps<Row extends ITableRow, HeaderContent extends IHeaderContent<Row>> extends Pick<ICommonProps<IFlexibleTableCellStyles>, 'tweakStyles'>, Pick<IValueComponentProps<Row, unknown>, 'isFocusedRow' | 'isActiveRow' | 'isNestedComponentExpanded' | 'isRowNestedComponentExpanded'> {
6
6
  row: Row;
7
7
  columnName: keyof Row;
8
+ updateNestedComponent: (component: ReactNode, cellKey: keyof Row) => void;
8
9
  config: IFlexibleTableConfigType<Row, HeaderContent>;
9
10
  renderMode: IFlexibleTableRenderMode;
10
11
  isSecond?: boolean;
11
12
  isSticky?: boolean;
12
13
  isLoading?: boolean;
13
14
  }
14
- export declare function FlexibleTableCell<Row extends ITableRow, HeaderContent extends IHeaderContent<Row>>({ row, columnName, config, renderMode, isSecond, isSticky: isOldSticky, isLoading, tweakStyles, ...valueComponentProps }: IFlexibleTableCellProps<Row, HeaderContent>): JSX.Element;
15
+ export declare function FlexibleTableCell<Row extends ITableRow, HeaderContent extends IHeaderContent<Row>>({ row, columnName, config, renderMode, isSecond, isSticky: isOldSticky, isLoading, updateNestedComponent, tweakStyles, ...valueComponentProps }: IFlexibleTableCellProps<Row, HeaderContent>): JSX.Element;
@@ -1,10 +1,9 @@
1
- import { ReactNode } from 'react';
2
- import { ICommonProps } from '../../../../types';
1
+ import { ReactNode, RefCallback } from 'react';
2
+ import { ITweakStylesProps } from '../../../../types';
3
3
  import { ITableRow, IFlexibleTableConfigType, IFlexibleTableRenderMode, IHeaderContent } from '../../types';
4
4
  import { IFlexibleTableRowStyles } from './FlexibleTableRow.styles';
5
- export interface IFlexibleTableRowProps<Row extends ITableRow, HeaderContent extends IHeaderContent<Row>, UniqueField extends keyof Row> extends Pick<ICommonProps<IFlexibleTableRowStyles>, 'tweakStyles'> {
5
+ export interface IFlexibleTableRowProps<Row extends ITableRow, HeaderContent extends IHeaderContent<Row>, UniqueField extends keyof Row> extends ITweakStylesProps<IFlexibleTableRowStyles> {
6
6
  item: Row;
7
- index: number;
8
7
  uniqueField?: UniqueField;
9
8
  renderMode: IFlexibleTableRenderMode;
10
9
  /** @default false */
@@ -20,12 +19,13 @@ export interface IFlexibleTableRowProps<Row extends ITableRow, HeaderContent ext
20
19
  columns: Array<keyof Row & string>;
21
20
  rowAttributes?: Array<keyof Row>;
22
21
  /** @default false */
23
- isExpandableRowComponentInitiallyOpen?: boolean | ((row: Row, index: number) => boolean);
22
+ isExpandableRowComponentInitiallyOpen?: boolean;
23
+ rowRef?: RefCallback<HTMLTableRowElement>;
24
24
  /** Возвращает React-элемент, который отрисуется под строкой при нажатии на неё */
25
25
  expandableRowComponent?: (item: Row, isOpen: boolean, close: () => void) => ReactNode;
26
26
  onRowHover?: (id?: Row[UniqueField]) => void;
27
27
  onRowClick?: (id: Row[UniqueField]) => void;
28
28
  }
29
- declare function FlexibleTableRowInner<Row extends ITableRow, HeaderContent extends IHeaderContent<Row>, UniqueField extends keyof Row>({ item, index, config, columns, uniqueField, renderMode, isActive, isFocusable, isFirstColumnSticky, isLoading, rowAttributes, isExpandableRowComponentInitiallyOpen, tweakStyles, expandableRowComponent, onRowHover, onRowClick, }: IFlexibleTableRowProps<Row, HeaderContent, UniqueField>): JSX.Element;
29
+ declare function FlexibleTableRowInner<Row extends ITableRow, HeaderContent extends IHeaderContent<Row>, UniqueField extends keyof Row>({ item, config, columns, uniqueField, renderMode, isActive, isFocusable, isFirstColumnSticky, isLoading, rowAttributes, isExpandableRowComponentInitiallyOpen, rowRef, tweakStyles, expandableRowComponent, onRowHover, onRowClick, }: IFlexibleTableRowProps<Row, HeaderContent, UniqueField>): JSX.Element;
30
30
  export declare const FlexibleTableRow: typeof FlexibleTableRowInner;
31
31
  export {};
@@ -1,3 +1,19 @@
1
- import { IFlexibleTableRenderMode, IFlexibleTableRender } from './types';
2
1
  export declare const DEFAULT_DATE_FORMAT = "dd.MM.yyyy";
3
- export declare const TableRenders: Record<IFlexibleTableRenderMode, IFlexibleTableRender>;
2
+ export declare const TableRenders: {
3
+ table: {
4
+ Root: "table";
5
+ Head: "thead";
6
+ Body: "tbody";
7
+ Row: "tr";
8
+ Header: "th";
9
+ Cell: "td";
10
+ };
11
+ divs: {
12
+ Root: "div";
13
+ Head: "div";
14
+ Body: "div";
15
+ Row: "div";
16
+ Header: "div";
17
+ Cell: "div";
18
+ };
19
+ };
@@ -1,7 +1,7 @@
1
1
  import { CSSProperties, MouseEvent, ReactNode } from 'react';
2
2
  import { IRenderNode } from '../../types';
3
3
  export type IFlexibleTableRenderMode = 'table' | 'divs';
4
- export type IFlexibleTableRender = Record<'Root' | 'Head' | 'Body' | 'Row' | 'Header' | 'Cell', keyof JSX.IntrinsicElements>;
4
+ export type IFlexibleTableRenderElement = 'Root' | 'Head' | 'Body' | 'Row' | 'Header' | 'Cell';
5
5
  export type ITableRow = Record<string, any>;
6
6
  export type IHeaderContent<T extends ITableRow> = Partial<Record<keyof T, unknown>>;
7
7
  export interface ITitleComponentProps<Value> {
@@ -21,16 +21,16 @@ export interface IFlexibleTableRowConfig<Values extends ITableRow, Key extends k
21
21
  title?: IRenderNode<ITitleComponentProps<HeaderContent[Key]>>;
22
22
  component?: IRenderNode<IValueComponentProps<Values, NonNullable<Values[Key]>>>;
23
23
  dateFormat?: string;
24
- minWidth?: string | number;
25
- width?: string | number;
26
- maxWidth?: string | number;
24
+ minWidth?: CSSProperties['minWidth'];
25
+ width?: CSSProperties['width'];
26
+ maxWidth?: CSSProperties['maxWidth'];
27
27
  /** @default 'left' */
28
28
  titleAlign?: CSSProperties['textAlign'];
29
29
  cellAlign?: CSSProperties['textAlign'];
30
30
  cellVerticalAlign?: CSSProperties['verticalAlign'];
31
31
  position?: CSSProperties['position'];
32
- right?: number;
33
- left?: number;
32
+ right?: CSSProperties['right'];
33
+ left?: CSSProperties['left'];
34
34
  shouldRenderDataId?: boolean;
35
35
  /**
36
36
  * Проверка, нужно ли отрисовать component
@@ -44,14 +44,22 @@ export type IFlexibleTableConfigType<Values extends ITableRow, HeaderContent ext
44
44
  [Key in keyof Values]?: IFlexibleTableRowConfig<Values, Key, HeaderContent>;
45
45
  };
46
46
  export interface IInfinityScrollConfig {
47
- activePage: number;
48
- totalPages: number;
47
+ isEnabled?: boolean;
49
48
  isLoading: boolean;
50
- isLastPage: boolean;
51
- onInfinityScroll: (skip: number) => void;
49
+ onInfinityScroll: {
50
+ (_: never): void;
51
+ /** @deprecated use activePage directly */
52
+ (skip: number): void;
53
+ };
54
+ /** @deprecated use activePage in onInfinityScroll */
55
+ activePage?: number;
56
+ /** @deprecated use isEnabled */
57
+ isLastPage?: boolean;
58
+ /** @deprecated use isEnabled */
59
+ totalPages?: number;
52
60
  }
53
- export interface INestedComponent {
61
+ export interface INestedComponent<T extends PropertyKey = string> {
54
62
  isOpen: boolean;
55
63
  component?: ReactNode;
56
- cellKey?: string;
64
+ cellKey?: T;
57
65
  }
@@ -1 +1 @@
1
- export declare const iconsList: Record<"direction" | "filter" | "document" | "copy" | "cancel" | "close" | "search" | "repeat" | "link" | "sort" | "size" | "menu" | "check" | "settings" | "list" | "arrow" | "vendor-service" | "aircraft-takeoff" | "archive" | "arrow-right" | "baggage" | "balloon" | "bluetooth" | "bonus" | "book" | "box" | "business" | "calendar" | "check-big" | "check-all" | "chevron-down" | "chevron-left" | "chevron-right" | "chevron-up" | "chevron-down-small" | "chevron-left-small" | "chevron-right-small" | "chevron-up-small" | "circle-check" | "close-large" | "close-window" | "copy-outline" | "crane" | "danger" | "download" | "email" | "eye" | "eye-closed" | "female" | "folder" | "folder-add" | "food" | "import" | "information" | "insurance" | "lock" | "lock-open" | "male" | "minus" | "burger-menu" | "pencil" | "pin" | "plane" | "plane-circle" | "plus" | "presentation" | "print" | "question" | "refresh" | "rocket" | "round-trip" | "vendor-logo" | "scan" | "send-email" | "sign-out" | "sort-asc" | "sort-desc" | "sort-list-asc" | "sort-list-desc" | "star" | "status-error" | "status-info" | "status-not-ok" | "status-ok" | "status-warning" | "three-circles" | "ticket-revert" | "ticket" | "time" | "trash-can" | "upgrade" | "user" | "user-group" | "voucher" | "upload", import("./types").ISvgIcon>;
1
+ export declare const iconsList: Record<"direction" | "filter" | "document" | "search" | "repeat" | "link" | "copy" | "cancel" | "close" | "sort" | "size" | "menu" | "check" | "settings" | "list" | "arrow" | "vendor-service" | "aircraft-takeoff" | "archive" | "arrow-right" | "baggage" | "balloon" | "bluetooth" | "bonus" | "book" | "box" | "business" | "calendar" | "check-big" | "check-all" | "chevron-down" | "chevron-left" | "chevron-right" | "chevron-up" | "chevron-down-small" | "chevron-left-small" | "chevron-right-small" | "chevron-up-small" | "circle-check" | "close-large" | "close-window" | "copy-outline" | "crane" | "danger" | "download" | "email" | "eye" | "eye-closed" | "female" | "folder" | "folder-add" | "food" | "import" | "information" | "insurance" | "lock" | "lock-open" | "male" | "minus" | "burger-menu" | "pencil" | "pin" | "plane" | "plane-circle" | "plus" | "presentation" | "print" | "question" | "refresh" | "rocket" | "round-trip" | "vendor-logo" | "scan" | "send-email" | "sign-out" | "sort-asc" | "sort-desc" | "sort-list-asc" | "sort-list-desc" | "star" | "status-error" | "status-info" | "status-not-ok" | "status-ok" | "status-warning" | "three-circles" | "ticket-revert" | "ticket" | "time" | "trash-can" | "upgrade" | "user" | "user-group" | "voucher" | "upload", import("./types").ISvgIcon>;
@@ -1,3 +1,3 @@
1
1
  import { ITweakStyles } from '../../theme';
2
- export declare const useStyles: import("../../theme").IUseStyles<"main" | "cancel" | "root" | "icon" | "active" | "disabled" | "custom" | "s" | "m" | "loader" | "loading" | "cancel-light", unknown>;
2
+ export declare const useStyles: import("../../theme").IUseStyles<"main" | "custom" | "cancel" | "root" | "icon" | "active" | "disabled" | "s" | "m" | "loader" | "loading" | "cancel-light", unknown>;
3
3
  export type IIconButtonStyles = ITweakStyles<typeof useStyles>;
@@ -1,9 +1,7 @@
1
1
  import { ITweakStyles } from '../../theme';
2
2
  import { IInputStyles } from '../Input';
3
- export declare const BUTTONS_WIDTH = 36;
4
- export declare const BUTTONS_GAP = 2;
5
- export declare const useStyles: import("../../theme").IUseStyles<"root" | "button" | "buttons" | "disabledButton" | "errorButton", unknown>;
6
3
  export declare const inputStyles: IInputStyles;
4
+ export declare const useStyles: import("../../theme").IUseStyles<"button" | "icon" | "buttons" | "disabledButton" | "errorButton", unknown>;
7
5
  export type IIncrementInputStyles = ITweakStyles<typeof useStyles, {
8
6
  tweakInput: IInputStyles;
9
7
  }>;
@@ -1,5 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { IWithMessagesProps } from '../WithMessages';
3
3
  import { IInputBaseProps } from './InputBase';
4
- export type IInputProps = IInputBaseProps & Pick<IWithMessagesProps, 'infoMessage' | 'errorMessage'>;
5
- export declare const Input: import("react").ForwardRefExoticComponent<IInputBaseProps & Pick<IWithMessagesProps, "infoMessage" | "errorMessage"> & import("react").RefAttributes<HTMLInputElement>>;
4
+ export interface IInputProps extends IInputBaseProps, Pick<IWithMessagesProps, 'infoMessage' | 'errorMessage'> {
5
+ }
6
+ export declare const Input: import("react").ForwardRefExoticComponent<IInputProps & import("react").RefAttributes<HTMLInputElement>>;
@@ -4,7 +4,7 @@ import { ICommonProps } from '../../types';
4
4
  import { IControlWrapperProps } from '../ControlWrapper';
5
5
  import { IChangeInputEvent } from './types';
6
6
  import { IInputStyles } from './Input.styles';
7
- export interface IInputBaseProps extends ICommonProps<IInputStyles>, Pick<IControlWrapperProps, 'label' | 'icon' | 'groupPlacement' | 'isInvalid' | 'isRequired' | 'isLoading' | 'isDisabled' | 'onIconClick'>, Pick<InputHTMLAttributes<HTMLInputElement>, 'type' | 'inputMode' | 'autoComplete' | 'name' | 'maxLength' | 'tabIndex' | 'placeholder' | 'onFocus' | 'onBlur' | 'onPaste' | 'onKeyDown'>, Pick<Partial<ReactInputMaskBaseProps>, 'mask' | 'maskPlaceholder' | 'alwaysShowMask' | 'beforeMaskedStateChange'> {
7
+ export interface IInputBaseProps extends ICommonProps<IInputStyles>, Omit<InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'size'>, Pick<IControlWrapperProps, 'label' | 'icon' | 'size' | 'groupPlacement' | 'isInvalid' | 'isRequired' | 'isLoading' | 'isDisabled'>, Pick<Partial<ReactInputMaskBaseProps>, 'mask' | 'maskPlaceholder' | 'alwaysShowMask' | 'beforeMaskedStateChange'> {
8
8
  value?: string;
9
9
  units?: ReactNode;
10
10
  /** @default false */
@@ -19,6 +19,6 @@ export interface IInputBaseProps extends ICommonProps<IInputStyles>, Pick<IContr
19
19
  isAutoSized?: boolean;
20
20
  /** @default false */
21
21
  shouldAlwaysShowPlaceholder?: boolean;
22
- onChange(value: string, event: IChangeInputEvent): void;
22
+ onChange: (value: string, event: IChangeInputEvent) => void;
23
23
  }
24
24
  export declare const InputBase: import("react").ForwardRefExoticComponent<IInputBaseProps & import("react").RefAttributes<HTMLInputElement>>;
@@ -1,6 +1,6 @@
1
1
  import { FC, KeyboardEvent, MouseEvent } from 'react';
2
2
  import { ICommonProps } from '../../types';
3
- import { IListItemProps as IListItem } from './components';
3
+ import { IListItem } from './types';
4
4
  import { IListStyles } from './List.styles';
5
5
  export interface IListProps extends ICommonProps<IListStyles> {
6
6
  items: IListItem[];
@@ -1,3 +1,4 @@
1
1
  export * from './List';
2
2
  export type { IListStyles } from './List.styles';
3
- export { type IListItemStyles, type IListItemProps as IListItem, ListItem } from './components';
3
+ export type { IListItem } from './types';
4
+ export { type IListItemStyles, type IListItemProps, ListItem } from './components';
@@ -0,0 +1,4 @@
1
+ import { IListItemProps } from './components';
2
+ export interface IListItem extends IListItemProps {
3
+ isHidden?: boolean;
4
+ }
@@ -1,6 +1,6 @@
1
1
  import { ITweakStyles } from '../../theme';
2
2
  import { IIconButtonStyles } from '../IconButton';
3
- export declare const useStyles: import("../../theme").IUseStyles<"content" | "close" | "overlay" | "root" | "s" | "m" | "l" | "footer" | "fixedPosition" | "innerOverlay" | "sideBar" | "position-static" | "position-left" | "position-right" | "position-center" | "modal" | "title" | "titleWithCloseButton" | "stickyFooterWrapper" | "stickyFooter" | "buttons-left" | "buttons-center" | "buttons-right" | "withoutFooter" | "withStickyFooter" | "footerWrapper" | "modalWrapper" | "animationEnd" | "animationStart" | "modal-enter" | "modal-enter-active" | "modal-exit" | "modal-exit-active", unknown>;
3
+ export declare const useStyles: import("../../theme").IUseStyles<"content" | "overlay" | "close" | "root" | "s" | "m" | "l" | "footer" | "fixedPosition" | "innerOverlay" | "sideBar" | "position-static" | "position-left" | "position-right" | "position-center" | "modal" | "title" | "titleWithCloseButton" | "stickyFooterWrapper" | "stickyFooter" | "buttons-left" | "buttons-center" | "buttons-right" | "withoutFooter" | "withStickyFooter" | "footerWrapper" | "modalWrapper" | "animationEnd" | "animationStart" | "modal-enter" | "modal-enter-active" | "modal-exit" | "modal-exit-active", unknown>;
4
4
  export declare const closeButtonStyles: IIconButtonStyles;
5
5
  export type IModalStyles = ITweakStyles<typeof useStyles, {
6
6
  tweakCloseButton: IIconButtonStyles;
@@ -1,3 +1,3 @@
1
1
  import { ITweakStyles } from '../../theme';
2
- export declare const useStyles: import("../../theme").IUseStyles<"content" | "error" | "root" | "inline" | "text" | "icon" | "warning" | "custom" | "s" | "m" | "l" | "info" | "body" | "title" | "withText" | "withTitle" | "ok" | "not-ok", unknown>;
2
+ export declare const useStyles: import("../../theme").IUseStyles<"content" | "custom" | "error" | "root" | "inline" | "text" | "icon" | "warning" | "s" | "m" | "l" | "info" | "body" | "title" | "withText" | "withTitle" | "ok" | "not-ok", unknown>;
3
3
  export type INotificationStyles = ITweakStyles<typeof useStyles>;
@@ -180,7 +180,7 @@ export declare class ScrollIntoViewIfNeeded extends PureComponent<IScrollIntoVie
180
180
  "aria-description"?: string | undefined;
181
181
  "aria-details"?: string | undefined;
182
182
  "aria-disabled"?: (boolean | "false" | "true") | undefined;
183
- "aria-dropeffect"?: "copy" | "link" | "none" | "move" | "popup" | "execute" | undefined;
183
+ "aria-dropeffect"?: "link" | "copy" | "none" | "move" | "popup" | "execute" | undefined;
184
184
  "aria-errormessage"?: string | undefined;
185
185
  "aria-expanded"?: (boolean | "false" | "true") | undefined;
186
186
  "aria-flowto"?: string | undefined;
@@ -1,6 +1,6 @@
1
- import { FC } from 'react';
1
+ /// <reference types="react" />
2
2
  import { ICommonProps } from '../../types';
3
3
  import { IInputProps } from '../Input';
4
4
  import { ISearchInputStyles } from './SearchInput.styles';
5
5
  export type ISearchInputProps = Omit<IInputProps, 'type' | 'label' | 'isInvalid' | 'errorMessage' | 'isActive' | 'tweakStyles'> & ICommonProps<ISearchInputStyles>;
6
- export declare const SearchInput: FC<ISearchInputProps>;
6
+ export declare const SearchInput: import("react").ForwardRefExoticComponent<Omit<IInputProps, "tweakStyles" | "label" | "isInvalid" | "type" | "isActive" | "errorMessage"> & import("../../types").IDataAttributesProps & import("../../types").ITweakStylesProps<ISearchInputStyles> & import("react").RefAttributes<HTMLInputElement>>;
@@ -1,4 +1,4 @@
1
- import { ReactNode, SyntheticEvent } from 'react';
1
+ import { ReactNode, Ref, SyntheticEvent } from 'react';
2
2
  import { ICommonProps, IDropdownWithPopperOptions } from '../../types';
3
3
  import { IIcon } from '../Icon';
4
4
  import { IInputProps } from '../Input';
@@ -27,8 +27,10 @@ export interface ISelectProps<Value> extends Omit<IInputProps, 'value' | 'onChan
27
27
  shouldScrollToList?: boolean;
28
28
  isMultiSelect?: false;
29
29
  searchInput?: {
30
- shouldRenderInList: true;
31
- } & Pick<ISearchInputProps, 'placeholder'>;
30
+ /** @default false */
31
+ shouldRenderInList?: boolean;
32
+ ref?: Ref<HTMLInputElement>;
33
+ } & Pick<ISearchInputProps, 'placeholder' | 'shouldFocusOnMount'>;
32
34
  isOptionDisabled?: (option: Value) => boolean;
33
35
  onChange: (value: Value | undefined, event: IChangeSelectEvent) => void;
34
36
  onBlur?: (event: Event | SyntheticEvent) => void;