@true-engineering/true-react-common-ui-kit 4.0.0-alpha0 → 4.0.0-alpha10

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 (156) hide show
  1. package/README.md +11 -567
  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.styles.d.ts +1 -1
  5. package/dist/components/DatePicker/DatePicker.d.ts +2 -2
  6. package/dist/components/DatePicker/helpers.d.ts +3 -0
  7. package/dist/components/DatePicker/types.d.ts +3 -1
  8. package/dist/components/FiltersPane/FiltersPane.d.ts +4 -2
  9. package/dist/components/FiltersPane/FiltersPane.stories.d.ts +3 -3
  10. package/dist/components/FiltersPane/components/Filter/Filter.d.ts +2 -2
  11. package/dist/components/FiltersPane/components/Filter/helpers.d.ts +4 -0
  12. package/dist/components/FiltersPane/components/FilterInterval/FilterInterval.styles.d.ts +1 -1
  13. package/dist/components/FiltersPane/components/FilterSelect/FilterSelect.styles.d.ts +1 -1
  14. package/dist/components/FiltersPane/components/FilterValueView/FilterValueView.d.ts +3 -1
  15. package/dist/components/FiltersPane/components/FilterWithDates/FilterWithDates.styles.d.ts +2 -2
  16. package/dist/components/FiltersPane/components/FilterWrapper/FilterWrapper.d.ts +2 -2
  17. package/dist/components/FiltersPane/types.d.ts +15 -5
  18. package/dist/components/Flag/customFlags/customFlags.d.ts +10 -0
  19. package/dist/components/Flag/customFlags/index.d.ts +1 -0
  20. package/dist/components/FlexibleTable/FlexibleTable.d.ts +4 -2
  21. package/dist/components/FlexibleTable/components/FlexibleTableRow/FlexibleTableRow.d.ts +6 -6
  22. package/dist/components/FlexibleTable/constants.d.ts +18 -2
  23. package/dist/components/FlexibleTable/types.d.ts +1 -1
  24. package/dist/components/Input/Input.d.ts +3 -3
  25. package/dist/components/Input/Input.stories.d.ts +2 -2
  26. package/dist/components/Input/Input.styles.d.ts +3 -3
  27. package/dist/components/List/List.d.ts +1 -1
  28. package/dist/components/List/index.d.ts +2 -1
  29. package/dist/components/List/types.d.ts +4 -0
  30. package/dist/components/SearchInput/SearchInput.d.ts +2 -2
  31. package/dist/components/SearchInput/SearchInput.stories.d.ts +3 -12
  32. package/dist/components/SearchInput/SearchInput.styles.d.ts +3 -5
  33. package/dist/components/Select/Select.d.ts +5 -3
  34. package/dist/components/Select/Select.styles.d.ts +8 -8
  35. package/dist/components/Select/index.d.ts +1 -1
  36. package/dist/components/TextArea/TextArea.d.ts +2 -2
  37. package/dist/components/TextArea/TextArea.styles.d.ts +3 -3
  38. package/dist/components/Tooltip/Tooltip.d.ts +1 -1
  39. package/dist/components/Tooltip/Tooltip.styles.d.ts +1 -1
  40. package/dist/components/WithMessages/WithMessages.d.ts +10 -0
  41. package/dist/components/{ControlGroup/ControlGroup.stories.d.ts → WithMessages/WithMessages.stories.d.ts} +2 -2
  42. package/dist/components/WithMessages/WithMessages.styles.d.ts +3 -0
  43. package/dist/components/WithMessages/index.d.ts +2 -0
  44. package/dist/components/WithPopup/WithPopup.d.ts +21 -6
  45. package/dist/components/WithPopup/WithPopup.styles.d.ts +1 -1
  46. package/dist/components/WithPopup/helpers.d.ts +2 -0
  47. package/dist/components/WithPopup/types.d.ts +3 -0
  48. package/dist/components/WithTooltip/WithTooltip.styles.d.ts +1 -0
  49. package/dist/components/index.d.ts +1 -1
  50. package/dist/hooks/index.d.ts +1 -0
  51. package/dist/hooks/use-merge.d.ts +1 -0
  52. package/dist/hooks/use-mixed-styles.d.ts +3 -1
  53. package/dist/hooks/use-tweak-styles.d.ts +5 -5
  54. package/dist/theme/Provider.d.ts +6 -3
  55. package/dist/theme/common.d.ts +4 -2
  56. package/dist/theme/create-themed-styles.d.ts +2 -0
  57. package/dist/theme/helpers.d.ts +9 -3
  58. package/dist/theme/index.d.ts +2 -0
  59. package/dist/theme/true-jss/ThemedStylesManager.d.ts +18 -0
  60. package/dist/theme/true-jss/TweakStylesManager.d.ts +34 -0
  61. package/dist/theme/true-jss/index.d.ts +2 -0
  62. package/dist/theme/true-jss/jss-context.d.ts +9 -0
  63. package/dist/theme/types.d.ts +6 -4
  64. package/dist/true-react-common-ui-kit.js +7304 -6380
  65. package/dist/true-react-common-ui-kit.js.map +1 -1
  66. package/dist/true-react-common-ui-kit.umd.cjs +7071 -6148
  67. package/dist/true-react-common-ui-kit.umd.cjs.map +1 -1
  68. package/dist/types.d.ts +2 -1
  69. package/package.json +1 -1
  70. package/src/components/ControlWrapper/ControlWrapper.styles.ts +5 -5
  71. package/src/components/ControlWrapper/ControlWrapper.tsx +1 -1
  72. package/src/components/DatePicker/DatePicker.tsx +9 -4
  73. package/src/components/DatePicker/components/DatePickerHeader/DatePickerHeader.styles.ts +1 -1
  74. package/src/components/DatePicker/helpers.ts +13 -1
  75. package/src/components/DatePicker/types.ts +4 -1
  76. package/src/components/FiltersPane/FiltersPane.stories.tsx +4 -2
  77. package/src/components/FiltersPane/FiltersPane.tsx +14 -9
  78. package/src/components/FiltersPane/components/Filter/Filter.tsx +24 -17
  79. package/src/components/FiltersPane/components/Filter/helpers.ts +18 -0
  80. package/src/components/FiltersPane/components/FilterInterval/FilterInterval.styles.ts +1 -1
  81. package/src/components/FiltersPane/components/FilterInterval/FilterInterval.tsx +6 -1
  82. package/src/components/FiltersPane/components/FilterSelect/FilterSelect.styles.ts +2 -2
  83. package/src/components/FiltersPane/components/FilterValueView/FilterValueView.tsx +27 -22
  84. package/src/components/FiltersPane/components/FilterWithDates/FilterWithDates.styles.ts +1 -0
  85. package/src/components/FiltersPane/components/FilterWithPeriod/FilterWithPeriod.tsx +1 -1
  86. package/src/components/FiltersPane/components/FilterWrapper/FilterWrapper.tsx +7 -5
  87. package/src/components/FiltersPane/components/FiltersPaneSearch/FiltersPaneSearch.styles.ts +8 -2
  88. package/src/components/FiltersPane/types.ts +23 -5
  89. package/src/components/Flag/Flag.stories.tsx +2 -1
  90. package/src/components/Flag/Flag.styles.ts +4 -0
  91. package/src/components/Flag/Flag.tsx +23 -9
  92. package/src/components/Flag/customFlags/AB.svg +1 -0
  93. package/src/components/Flag/customFlags/OS.svg +1 -0
  94. package/src/components/Flag/customFlags/augment.d.ts +1 -0
  95. package/src/components/Flag/customFlags/customFlags.ts +13 -0
  96. package/src/components/Flag/customFlags/index.ts +1 -0
  97. package/src/components/FlexibleTable/FlexibleTable.tsx +13 -12
  98. package/src/components/FlexibleTable/components/FlexibleTableRow/FlexibleTableRow.tsx +9 -8
  99. package/src/components/FlexibleTable/constants.ts +6 -3
  100. package/src/components/FlexibleTable/types.ts +1 -5
  101. package/src/components/IncrementInput/IncrementInput.styles.ts +1 -1
  102. package/src/components/Input/Input.styles.ts +5 -2
  103. package/src/components/Input/Input.tsx +9 -8
  104. package/src/components/Input/InputBase.tsx +2 -1
  105. package/src/components/List/List.tsx +5 -2
  106. package/src/components/List/index.ts +2 -1
  107. package/src/components/List/types.ts +5 -0
  108. package/src/components/MultiSelectList/MultiSelectList.styles.ts +1 -1
  109. package/src/components/PhoneInput/PhoneInput.stories.tsx +2 -1
  110. package/src/components/PhoneInput/PhoneInput.styles.ts +2 -2
  111. package/src/components/PhoneInput/PhoneInput.tsx +5 -2
  112. package/src/components/PhoneInput/components/PhoneInputCountryList/PhoneInputCountryList.styles.ts +1 -1
  113. package/src/components/SearchInput/SearchInput.styles.ts +17 -30
  114. package/src/components/SearchInput/SearchInput.tsx +17 -30
  115. package/src/components/Select/CustomSelect.stories.tsx +2 -2
  116. package/src/components/Select/Select.styles.ts +8 -2
  117. package/src/components/Select/Select.tsx +19 -31
  118. package/src/components/Select/components/SelectList/SelectList.tsx +1 -1
  119. package/src/components/Select/index.ts +1 -1
  120. package/src/components/TextArea/TextArea.styles.ts +7 -3
  121. package/src/components/TextArea/TextArea.tsx +16 -11
  122. package/src/components/Tooltip/Tooltip.styles.ts +2 -0
  123. package/src/components/Tooltip/Tooltip.tsx +1 -1
  124. package/src/components/{ControlGroup/ControlGroup.stories.tsx → WithMessages/WithMessages.stories.tsx} +10 -10
  125. package/src/components/{ControlGroup/ControlGroup.styles.ts → WithMessages/WithMessages.styles.ts} +4 -3
  126. package/src/components/{ControlGroup/ControlGroup.tsx → WithMessages/WithMessages.tsx} +13 -9
  127. package/src/components/WithMessages/index.ts +2 -0
  128. package/src/components/WithPopup/WithPopup.stories.tsx +1 -0
  129. package/src/components/WithPopup/WithPopup.styles.ts +2 -0
  130. package/src/components/WithPopup/WithPopup.tsx +64 -16
  131. package/src/components/WithPopup/helpers.ts +9 -0
  132. package/src/components/WithPopup/types.ts +7 -0
  133. package/src/components/WithTooltip/WithTooltip.styles.ts +6 -0
  134. package/src/components/WithTooltip/WithTooltip.tsx +7 -2
  135. package/src/components/index.ts +1 -1
  136. package/src/constants/phone-info.ts +20 -33
  137. package/src/helpers/phone.ts +19 -15
  138. package/src/hooks/index.ts +1 -0
  139. package/src/hooks/use-merge.ts +8 -0
  140. package/src/hooks/use-mixed-styles.ts +9 -11
  141. package/src/hooks/use-tweak-styles.ts +49 -27
  142. package/src/theme/Provider.tsx +10 -5
  143. package/src/theme/common.ts +5 -2
  144. package/src/theme/create-themed-styles.ts +78 -0
  145. package/src/theme/helpers.ts +39 -39
  146. package/src/theme/index.ts +2 -0
  147. package/src/theme/true-jss/ThemedStylesManager.ts +92 -0
  148. package/src/theme/true-jss/TweakStylesManager.ts +157 -0
  149. package/src/theme/true-jss/index.ts +2 -0
  150. package/src/theme/true-jss/jss-context.tsx +34 -0
  151. package/src/theme/types.ts +6 -4
  152. package/src/types.ts +2 -1
  153. package/dist/components/ControlGroup/ControlGroup.d.ts +0 -10
  154. package/dist/components/ControlGroup/ControlGroup.styles.d.ts +0 -3
  155. package/dist/components/ControlGroup/index.d.ts +0 -2
  156. package/src/components/ControlGroup/index.ts +0 -2
@@ -1,5 +1,5 @@
1
1
  import { IFiltersPaneProps } from './FiltersPane';
2
- interface IFiltersPaneWithCustomProps<Values, Content> extends IFiltersPaneProps<Values, Content> {
2
+ interface IFiltersPaneWithCustomProps<Values extends Record<string, unknown>, Content> extends IFiltersPaneProps<Values, Content> {
3
3
  containerWidth: number;
4
4
  isSearchDisabled: boolean;
5
5
  shouldShowSettingsButton: boolean;
@@ -8,7 +8,7 @@ interface IFiltersPaneWithCustomProps<Values, Content> extends IFiltersPaneProps
8
8
  checkboxPosition: 'left' | 'right';
9
9
  isClearableFields: boolean;
10
10
  }
11
- declare function FiltersPaneWithCustomProps<Values, Content>({ containerWidth, isSearchDisabled, shouldShowSettingsButton, withFieldNameInLabel, isGroupingEnabled, checkboxPosition, isClearableFields, ...args }: IFiltersPaneWithCustomProps<Values, Content>): import("react/jsx-runtime").JSX.Element;
11
+ declare function FiltersPaneWithCustomProps<Values extends Record<string, unknown>, Content>({ containerWidth, isSearchDisabled, shouldShowSettingsButton, withFieldNameInLabel, isGroupingEnabled, checkboxPosition, isClearableFields, ...args }: IFiltersPaneWithCustomProps<Values, Content>): import("react/jsx-runtime").JSX.Element;
12
12
  declare const _default: {
13
13
  title: string;
14
14
  component: typeof FiltersPaneWithCustomProps;
@@ -28,4 +28,4 @@ declare const _default: {
28
28
  };
29
29
  };
30
30
  export default _default;
31
- export declare const Default: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0fc72a6d").R, IFiltersPaneWithCustomProps<unknown, unknown>>;
31
+ export declare const Default: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0fc72a6d").R, IFiltersPaneWithCustomProps<Record<string, unknown>, unknown>>;
@@ -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" | "children" | "root" | "inline" | "text" | "icon" | "active" | "disabled" | "fullWidth" | "primary" | "secondary" | "warning" | "destructive" | "custom" | "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" | "children" | "root" | "inline" | "text" | "icon" | "active" | "disabled" | "fullWidth" | "primary" | "secondary" | "warning" | "destructive" | "custom" | "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" | "children" | "root" | "inline" | "text" | "icon" | "active" | "disabled" | "fullWidth" | "primary" | "secondary" | "warning" | "destructive" | "custom" | "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" | "children" | "root" | "inline" | "text" | "icon" | "active" | "disabled" | "fullWidth" | "primary" | "secondary" | "warning" | "destructive" | "custom" | "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;
@@ -54,20 +54,30 @@ export type IDateRangeConfigItem<Value> = IConfigItemBasicBase<Value> & {
54
54
  type: 'dateRange';
55
55
  dateFormat?: string;
56
56
  } & Omit<IFilterWithPeriodProps, 'value' | 'onChange' | 'setIsOpen'>;
57
- export type CustomComponent<Value> = FC<{
57
+ export interface ICustomComponentProps<Value> {
58
58
  value?: Value;
59
59
  onChange: (v?: Value) => void;
60
60
  onClose?: () => void;
61
61
  filter: ICustomConfigItem<Value>;
62
62
  localeKey?: IFilterLocaleKey;
63
63
  locale?: IPartialFilterLocale;
64
- }>;
65
- export interface ICustomConfigItem<Value> extends IConfigItemBasicBase<Value> {
66
- [key: string]: any;
64
+ }
65
+ export type CustomComponent<Value> = FC<ICustomComponentProps<Value>>;
66
+ export type ICustomValue<V> = V extends Array<infer T> ? T : never;
67
+ export interface ICustomRangeConfigItem<Value> extends IConfigItemBasicBase<Value> {
68
+ [key: string & {}]: any;
69
+ type: 'custom';
70
+ component: CustomComponent<Value>;
71
+ valueViewType?: 'range';
72
+ }
73
+ export interface ICustomMultipleConfigItem<Value> extends IConfigItemBasicBase<Value> {
74
+ [key: string & {}]: any;
67
75
  type: 'custom';
68
76
  component: CustomComponent<Value>;
69
- valueViewType?: 'range' | 'multiple';
77
+ valueViewType?: 'multiple';
78
+ getSelectedValue?: (v: ICustomValue<Value>) => ReactNode;
70
79
  }
80
+ export type ICustomConfigItem<Value> = ICustomRangeConfigItem<Value> | ICustomMultipleConfigItem<Value>;
71
81
  export type ConfigItem<Value> = ISelectConfigItem<Value> | IMultiSelectConfigItem<Value> | ICustomConfigItem<Value> | IDateRangeWithoutPeriodConfigItem<Value> | IDateRangeConfigItem<Value> | IIntervalConfigItem<Value> | IBooleanConfigItem<Value>;
72
82
  export type ConfigType<Values> = {
73
83
  [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, renderMode, refForScroll, nothingFoundContent, data, testId, tweakStyles, shouldRenderHeader, onHeadClick, isExpandableRowComponentInitiallyOpen: isRowInitiallyOpen, ...restProps }: IFlexibleTableProps<Row, HeaderContent, UniqueField>): 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> {
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { IControlGroupProps } from '../ControlGroup';
2
+ import { IWithMessagesProps } from '../WithMessages';
3
3
  import { IInputBaseProps } from './InputBase';
4
- export type IInputProps = IInputBaseProps & Pick<IControlGroupProps, 'infoMessage' | 'errorMessage'>;
5
- export declare const Input: import("react").ForwardRefExoticComponent<IInputBaseProps & Pick<IControlGroupProps, "infoMessage" | "errorMessage"> & import("react").RefAttributes<HTMLInputElement>>;
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>>;
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  declare const _default: {
3
3
  title: string;
4
- component: import("react").ForwardRefExoticComponent<import("./InputBase").IInputBaseProps & Pick<import("..").IControlGroupProps, "infoMessage" | "errorMessage"> & import("react").RefAttributes<HTMLInputElement>>;
4
+ component: import("react").ForwardRefExoticComponent<import("./InputBase").IInputBaseProps & Pick<import("..").IWithMessagesProps, "infoMessage" | "errorMessage"> & import("react").RefAttributes<HTMLInputElement>>;
5
5
  argTypes: {
6
6
  type: {
7
7
  control: string;
@@ -22,4 +22,4 @@ declare const _default: {
22
22
  };
23
23
  };
24
24
  export default _default;
25
- export declare const Default: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0fc72a6d").R, import("./InputBase").IInputBaseProps & Pick<import("..").IControlGroupProps, "infoMessage" | "errorMessage"> & import("react").RefAttributes<HTMLInputElement>>;
25
+ export declare const Default: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0fc72a6d").R, import("./InputBase").IInputBaseProps & Pick<import("..").IWithMessagesProps, "infoMessage" | "errorMessage"> & import("react").RefAttributes<HTMLInputElement>>;
@@ -1,8 +1,8 @@
1
1
  import { ITweakStyles } from '../../theme';
2
- import { IControlGroupStyles } from '../ControlGroup';
3
2
  import { IControlWrapperStyles } from '../ControlWrapper';
4
- export declare const useStyles: import("../../theme").IUseStyles<"input" | "inputContent" | "autoSizeWrapper" | "autoSized" | "withUnits" | "withLabel" | "fakeValue" | "units" | "focusedInput" | "disabledInput" | "invalidInput", unknown>;
3
+ import { IWithMessagesStyles } from '../WithMessages';
4
+ export declare const useStyles: import("../../theme").IUseStyles<"input" | "withValue" | "inputContent" | "autoSizeWrapper" | "autoSized" | "withUnits" | "withLabel" | "fakeValue" | "units" | "focusedInput" | "disabledInput" | "invalidInput", unknown>;
5
5
  export type IInputStyles = ITweakStyles<typeof useStyles, {
6
6
  tweakControlWrapper: IControlWrapperStyles;
7
- tweakControlGroup: IControlGroupStyles;
7
+ tweakWithMessages: IWithMessagesStyles;
8
8
  }>;
@@ -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
- 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,16 +1,7 @@
1
+ /// <reference types="react" />
1
2
  declare const _default: {
2
3
  title: string;
3
- component: import("react").FC<import("./SearchInput").ISearchInputProps>;
4
+ component: import("react").ForwardRefExoticComponent<Omit<import("..").IInputProps, "tweakStyles" | "label" | "isInvalid" | "type" | "isActive" | "errorMessage"> & import("../..").IDataAttributesProps & import("../..").ITweakStylesProps<import("./SearchInput.styles").ISearchInputStyles> & import("react").RefAttributes<HTMLInputElement>>;
4
5
  };
5
6
  export default _default;
6
- export declare const Default: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0fc72a6d").R, Omit<import("..").IInputProps, "tweakStyles" | "label" | "isInvalid" | "type" | "isActive" | "errorMessage"> & import("../..").IDataAttributesProps & import("../..").ITweakStylesProps<Partial<import("jss").Styles<"root" | "icon", unknown, undefined>> & Partial<{
7
- tweakInput: Partial<import("jss").Styles<"input" | "inputContent" | "autoSizeWrapper" | "autoSized" | "withUnits" | "withLabel" | "fakeValue" | "units" | "focusedInput" | "disabledInput" | "invalidInput", unknown, undefined>> & Partial<{
8
- tweakControlWrapper: Partial<import("jss").Styles<"invalid" | "root" | "icon" | "disabled" | "loader" | "loading" | "label" | "requiredLabel" | "withValue" | "clearIcon" | "focused" | "minContent" | "activeLabel" | "disabledLabel" | "wrapper" | "controls" | "iconInner" | "customIcon" | "endIcon" | "activeIcon" | "placement-top" | "placement-bottom" | "placement-top-left" | "placement-top-right" | "placement-bottom-left" | "placement-bottom-right" | "placement-left" | "placement-right" | "placement-middle", unknown, undefined>> & Partial<{
9
- tweakPreloader: Partial<import("jss").Styles<"root" | "default" | "currentColor" | "dots" | "logo", unknown, undefined>> & Partial<{
10
- tweakDotsPreloader: Partial<import("jss").Styles<"root" | "dot" | "fadedDot" | "@keyframes FadedDots", unknown, undefined>> & Partial<unknown>;
11
- tweakSvgPreloader: Partial<import("jss").Styles<"root", unknown, undefined>> & Partial<unknown>;
12
- }>;
13
- }>;
14
- tweakControlGroup: Partial<import("jss").Styles<"error" | "root" | "horizontal" | "vertical" | "children" | "info" | "message", unknown, undefined>> & Partial<unknown>;
15
- }>;
16
- }>>>;
7
+ export declare const Default: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0fc72a6d").R, Omit<import("..").IInputProps, "tweakStyles" | "label" | "isInvalid" | "type" | "isActive" | "errorMessage"> & import("../..").IDataAttributesProps & import("../..").ITweakStylesProps<import("./SearchInput.styles").ISearchInputStyles> & import("react").RefAttributes<HTMLInputElement>>;
@@ -1,7 +1,5 @@
1
- import { ITweakStyles } from '../../theme';
2
1
  import { IInputStyles } from '../Input';
3
- export declare const useStyles: import("../../theme").IUseStyles<"root" | "icon", unknown>;
4
2
  export declare const inputStyles: IInputStyles;
5
- export type ISearchInputStyles = ITweakStyles<typeof useStyles, {
6
- tweakInput: IInputStyles;
7
- }>;
3
+ export interface ISearchInputStyles {
4
+ tweakInput?: IInputStyles;
5
+ }
@@ -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;
@@ -1,33 +1,33 @@
1
1
  import { type ITweakStyles } from '../../theme';
2
- import { IControlGroupStyles } from '../ControlGroup';
3
2
  import { type IInputStyles } from '../Input';
4
3
  import { type ISearchInputStyles } from '../SearchInput';
4
+ import { IWithMessagesStyles } from '../WithMessages';
5
5
  import { type ISelectListStyles } from './components';
6
6
  export declare const useStyles: import("../../theme").IUseStyles<"root" | "icon" | "disabled" | "inputWrapper" | "arrow" | "listWrapper" | "withoutPopper" | "listWrapperInBody" | "activeArrow" | "counter" | "iconWrapper", unknown>;
7
- export declare const readonlyInputStyles: Partial<import("jss").Styles<"input" | "inputContent" | "autoSizeWrapper" | "autoSized" | "withUnits" | "withLabel" | "fakeValue" | "units" | "focusedInput" | "disabledInput" | "invalidInput", unknown, undefined>> & Partial<{
8
- tweakControlWrapper: Partial<import("jss").Styles<"invalid" | "root" | "icon" | "disabled" | "loader" | "loading" | "label" | "requiredLabel" | "withValue" | "clearIcon" | "focused" | "minContent" | "activeLabel" | "disabledLabel" | "wrapper" | "controls" | "iconInner" | "customIcon" | "endIcon" | "activeIcon" | "placement-top" | "placement-bottom" | "placement-top-left" | "placement-top-right" | "placement-bottom-left" | "placement-bottom-right" | "placement-left" | "placement-right" | "placement-middle", unknown, undefined>> & Partial<{
7
+ export declare const readonlyInputStyles: Partial<import("jss").Styles<"input" | "withValue" | "inputContent" | "autoSizeWrapper" | "autoSized" | "withUnits" | "withLabel" | "fakeValue" | "units" | "focusedInput" | "disabledInput" | "invalidInput", unknown, undefined>> & Partial<{
8
+ tweakControlWrapper: Partial<import("jss").Styles<"invalid" | "icon" | "disabled" | "loader" | "loading" | "label" | "requiredLabel" | "withValue" | "clearIcon" | "focused" | "wrapper" | "controlWrapper" | "minContent" | "activeLabel" | "disabledLabel" | "controls" | "iconInner" | "customIcon" | "endIcon" | "activeIcon" | "placement-top" | "placement-bottom" | "placement-top-left" | "placement-top-right" | "placement-bottom-left" | "placement-bottom-right" | "placement-left" | "placement-right" | "placement-middle", unknown, undefined>> & Partial<{
9
9
  tweakPreloader: Partial<import("jss").Styles<"root" | "default" | "currentColor" | "dots" | "logo", unknown, undefined>> & Partial<{
10
10
  tweakDotsPreloader: Partial<import("jss").Styles<"root" | "dot" | "fadedDot" | "@keyframes FadedDots", unknown, undefined>> & Partial<unknown>;
11
11
  tweakSvgPreloader: Partial<import("jss").Styles<"root", unknown, undefined>> & Partial<unknown>;
12
12
  }>;
13
13
  }>;
14
- tweakControlGroup: Partial<import("jss").Styles<"error" | "root" | "horizontal" | "vertical" | "children" | "info" | "message", unknown, undefined>> & Partial<unknown>;
14
+ tweakWithMessages: Partial<import("jss").Styles<"error" | "children" | "horizontal" | "vertical" | "info" | "withMessages" | "message", unknown, undefined>> & Partial<unknown>;
15
15
  }>;
16
- export declare const readonlyMultiSelectStyles: Partial<import("jss").Styles<"input" | "inputContent" | "autoSizeWrapper" | "autoSized" | "withUnits" | "withLabel" | "fakeValue" | "units" | "focusedInput" | "disabledInput" | "invalidInput", unknown, undefined>> & Partial<{
17
- tweakControlWrapper: Partial<import("jss").Styles<"invalid" | "root" | "icon" | "disabled" | "loader" | "loading" | "label" | "requiredLabel" | "withValue" | "clearIcon" | "focused" | "minContent" | "activeLabel" | "disabledLabel" | "wrapper" | "controls" | "iconInner" | "customIcon" | "endIcon" | "activeIcon" | "placement-top" | "placement-bottom" | "placement-top-left" | "placement-top-right" | "placement-bottom-left" | "placement-bottom-right" | "placement-left" | "placement-right" | "placement-middle", unknown, undefined>> & Partial<{
16
+ export declare const readonlyMultiSelectStyles: Partial<import("jss").Styles<"input" | "withValue" | "inputContent" | "autoSizeWrapper" | "autoSized" | "withUnits" | "withLabel" | "fakeValue" | "units" | "focusedInput" | "disabledInput" | "invalidInput", unknown, undefined>> & Partial<{
17
+ tweakControlWrapper: Partial<import("jss").Styles<"invalid" | "icon" | "disabled" | "loader" | "loading" | "label" | "requiredLabel" | "withValue" | "clearIcon" | "focused" | "wrapper" | "controlWrapper" | "minContent" | "activeLabel" | "disabledLabel" | "controls" | "iconInner" | "customIcon" | "endIcon" | "activeIcon" | "placement-top" | "placement-bottom" | "placement-top-left" | "placement-top-right" | "placement-bottom-left" | "placement-bottom-right" | "placement-left" | "placement-right" | "placement-middle", unknown, undefined>> & Partial<{
18
18
  tweakPreloader: Partial<import("jss").Styles<"root" | "default" | "currentColor" | "dots" | "logo", unknown, undefined>> & Partial<{
19
19
  tweakDotsPreloader: Partial<import("jss").Styles<"root" | "dot" | "fadedDot" | "@keyframes FadedDots", unknown, undefined>> & Partial<unknown>;
20
20
  tweakSvgPreloader: Partial<import("jss").Styles<"root", unknown, undefined>> & Partial<unknown>;
21
21
  }>;
22
22
  }>;
23
- tweakControlGroup: Partial<import("jss").Styles<"error" | "root" | "horizontal" | "vertical" | "children" | "info" | "message", unknown, undefined>> & Partial<unknown>;
23
+ tweakWithMessages: Partial<import("jss").Styles<"error" | "children" | "horizontal" | "vertical" | "info" | "withMessages" | "message", unknown, undefined>> & Partial<unknown>;
24
24
  }>;
25
25
  export declare const getInputStyles: ({ hasReadonlyInput, isMultiSelect, }: {
26
26
  hasReadonlyInput: boolean;
27
27
  isMultiSelect?: boolean | undefined;
28
28
  }) => IInputStyles;
29
29
  export type ISelectStyles = ITweakStyles<typeof useStyles, {
30
- tweakControlGroup: IControlGroupStyles;
30
+ tweakWithMessages: IWithMessagesStyles;
31
31
  tweakInput: IInputStyles;
32
32
  tweakSelectList: ISelectListStyles;
33
33
  tweakSearchInput: ISearchInputStyles;
@@ -1,4 +1,4 @@
1
1
  export * from './Select';
2
2
  export * from './types';
3
3
  export type { ISelectStyles } from './Select.styles';
4
- export type { ISelectListStyles } from './components';
4
+ export { type ISelectListStyles, SelectList } from './components';
@@ -1,10 +1,10 @@
1
1
  import { FormEvent } from 'react';
2
2
  import { ICommonProps } from '../../types';
3
- import { IControlGroupProps } from '../ControlGroup';
4
3
  import { IControlWrapperProps } from '../ControlWrapper';
4
+ import { IWithMessagesProps } from '../WithMessages';
5
5
  import { ITextAreaHTMLBaseProps } from './types';
6
6
  import { ITextAreaStyles } from './TextArea.styles';
7
- export interface ITextAreaProps extends ICommonProps<ITextAreaStyles>, Pick<IControlWrapperProps, 'label' | 'isInvalid' | 'isRequired' | 'isDisabled'>, Pick<IControlGroupProps, 'infoMessage' | 'errorMessage'>, Pick<ITextAreaHTMLBaseProps, 'name' | 'maxLength' | 'rows' | 'onPaste' | 'onFocus' | 'onBlur'> {
7
+ export interface ITextAreaProps extends ICommonProps<ITextAreaStyles>, Pick<IControlWrapperProps, 'label' | 'isInvalid' | 'isRequired' | 'isDisabled'>, Pick<IWithMessagesProps, 'infoMessage' | 'errorMessage'>, Pick<ITextAreaHTMLBaseProps, 'name' | 'maxLength' | 'rows' | 'onPaste' | 'onFocus' | 'onBlur'> {
8
8
  value?: string;
9
9
  placeholder?: string;
10
10
  /** @default false */
@@ -1,9 +1,9 @@
1
1
  import { ITweakStyles } from '../../theme';
2
- import { IControlGroupStyles } from '../ControlGroup';
3
2
  import { IControlWrapperStyles } from '../ControlWrapper';
4
- export declare const useStyles: import("../../theme").IUseStyles<"textarea" | "autoSized" | "symbolsCount" | "symbolsCountError", unknown>;
3
+ import { IWithMessagesStyles } from '../WithMessages';
4
+ export declare const useStyles: import("../../theme").IUseStyles<"textarea" | "autoSized" | "wrapper" | "symbolsCount" | "symbolsCountError", unknown>;
5
5
  export declare const controlWrapperStyles: IControlWrapperStyles;
6
6
  export type ITextAreaStyles = ITweakStyles<typeof useStyles, {
7
- tweakControlGroup: IControlGroupStyles;
7
+ tweakWithMessages: IWithMessagesStyles;
8
8
  tweakControlWrapper: IControlWrapperStyles;
9
9
  }>;
@@ -4,7 +4,7 @@ import { ITooltipStyles } from './Tooltip.styles';
4
4
  export interface ITooltipProps extends ICommonProps<ITooltipStyles> {
5
5
  text: ReactNode;
6
6
  /** @default 'tooltip' */
7
- view?: 'tooltip' | 'hint';
7
+ view?: 'tooltip' | 'hint' | 'custom';
8
8
  /** @default 'info' */
9
9
  type?: 'info' | 'error';
10
10
  }
@@ -1,3 +1,3 @@
1
1
  import { ITweakStyles } from '../../theme';
2
- export declare const useStyles: import("../../theme").IUseStyles<"error" | "root" | "tooltip" | "info" | "hint", unknown>;
2
+ export declare const useStyles: import("../../theme").IUseStyles<"error" | "root" | "tooltip" | "custom" | "info" | "hint", unknown>;
3
3
  export type ITooltipStyles = ITweakStyles<typeof useStyles>;
@@ -0,0 +1,10 @@
1
+ import { ReactNode } from 'react';
2
+ import { ICommonProps } from '../../types';
3
+ import { IWithMessagesStyles } from './WithMessages.styles';
4
+ export interface IWithMessagesProps extends ICommonProps<IWithMessagesStyles> {
5
+ children: ReactNode;
6
+ infoMessage?: ReactNode;
7
+ errorMessage?: ReactNode;
8
+ controlsDirection?: 'horizontal' | 'vertical';
9
+ }
10
+ export declare const WithMessages: import("react").ForwardRefExoticComponent<IWithMessagesProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  declare const _default: {
3
3
  title: string;
4
- component: import("react").ForwardRefExoticComponent<import("./ControlGroup").IControlGroupProps & import("react").RefAttributes<HTMLDivElement>>;
4
+ component: import("react").ForwardRefExoticComponent<import("./WithMessages").IWithMessagesProps & import("react").RefAttributes<HTMLDivElement>>;
5
5
  };
6
6
  export default _default;
7
- export declare const Default: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0fc72a6d").R, import("./ControlGroup").IControlGroupProps & import("react").RefAttributes<HTMLDivElement>>;
7
+ export declare const Default: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0fc72a6d").R, import("./WithMessages").IWithMessagesProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,3 @@
1
+ import { ITweakStyles } from '../../theme';
2
+ export declare const useStyles: import("../../theme").IUseStyles<"error" | "children" | "horizontal" | "vertical" | "info" | "withMessages" | "message", unknown>;
3
+ export type IWithMessagesStyles = ITweakStyles<typeof useStyles>;
@@ -0,0 +1,2 @@
1
+ export * from './WithMessages';
2
+ export type { IWithMessagesStyles } from './WithMessages.styles';
@@ -1,7 +1,7 @@
1
1
  import { FC } from 'react';
2
- import { Placement, Middleware, OffsetOptions, UseHoverProps } from '@floating-ui/react';
3
- import { ICommonProps, IRenderNode } from '../../types';
4
- import { IPopupEventType, IWithPopupChildrenProps, IWithPopupToggleEvent, IWithPopupTriggerProps } from './types';
2
+ import { Placement, Middleware, OffsetOptions, UseHoverProps, UseClickProps, UseFocusProps, UseDismissProps, UseTransitionStatusProps } from '@floating-ui/react';
3
+ import { ICommonProps, IDataAttributes, IRenderNode } from '../../types';
4
+ import { IPopupArrowProps, IPopupEventType, IWithPopupChildrenProps, IWithPopupToggleEvent, IWithPopupTriggerProps } from './types';
5
5
  import { IWithPopupStyles } from './WithPopup.styles';
6
6
  export interface IWithPopupProps extends ICommonProps<IWithPopupStyles> {
7
7
  trigger: IRenderNode<IWithPopupTriggerProps>;
@@ -11,11 +11,16 @@ export interface IWithPopupProps extends ICommonProps<IWithPopupStyles> {
11
11
  placement?: Placement;
12
12
  /** @default 'click' */
13
13
  eventType?: IPopupEventType;
14
- /** @default 0 */
15
- hoverDelay?: UseHoverProps['delay'];
14
+ /**
15
+ * @deprecated Используйте hoverOptions
16
+ * @default 0
17
+ */
18
+ hoverDelay?: number;
16
19
  /** @default 6 */
17
20
  popupOffset?: OffsetOptions;
18
- /** @default true */
21
+ arrowProps?: IPopupArrowProps;
22
+ popupData?: IDataAttributes;
23
+ /** @default true, if eventType === click */
19
24
  shouldStopPropagation?: boolean;
20
25
  /** @default false */
21
26
  shouldHideOnScroll?: boolean;
@@ -28,6 +33,16 @@ export interface IWithPopupProps extends ICommonProps<IWithPopupStyles> {
28
33
  canBeFlipped?: boolean;
29
34
  /** @default false */
30
35
  isDisabled?: boolean;
36
+ /** @default false */
37
+ shouldShowArrow?: boolean;
38
+ /** Должна ли минимальная ширина попапа быть равна ширине триггера
39
+ * @default false */
40
+ isMinWidthSameAsTrigger?: boolean;
41
+ hoverOptions?: UseHoverProps;
42
+ clickOptions?: UseClickProps;
43
+ focusOptions?: UseFocusProps;
44
+ dismissOptions?: UseDismissProps;
45
+ transitionOptions?: UseTransitionStatusProps;
31
46
  onToggle?: (isActive: boolean, event?: IWithPopupToggleEvent) => void;
32
47
  }
33
48
  export declare const WithPopup: FC<IWithPopupProps>;
@@ -1,3 +1,3 @@
1
1
  import { ITweakStyles } from '../../theme';
2
- export declare const useStyles: import("../../theme").IUseStyles<"active" | "disabled" | "clickable" | "animationEnd" | "animationStart" | "trigger" | "popup" | "dropdown-initial" | "dropdown-open" | "dropdown-close" | "dropdown-unmounted", unknown>;
2
+ export declare const useStyles: import("../../theme").IUseStyles<"active" | "disabled" | "clickable" | "animationEnd" | "animationStart" | "arrow" | "trigger" | "popup" | "dropdown-initial" | "dropdown-open" | "dropdown-close" | "dropdown-unmounted", unknown>;
3
3
  export type IWithPopupStyles = ITweakStyles<typeof useStyles>;
@@ -0,0 +1,2 @@
1
+ import { Middleware } from '@floating-ui/react';
2
+ export declare const minWidthRelativeToTrigger: Middleware;