@true-engineering/true-react-common-ui-kit 4.0.0-alpha16 → 4.0.0-alpha18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@true-engineering/true-react-common-ui-kit",
3
- "version": "4.0.0-alpha16",
3
+ "version": "4.0.0-alpha18",
4
4
  "description": "True Engineering React UI Kit with theming support",
5
5
  "author": "True Engineering (https://trueengineering.ru)",
6
6
  "keywords": [
@@ -4,7 +4,7 @@ import { addDataAttributes } from '../../helpers';
4
4
  import { useTweakStyles } from '../../hooks';
5
5
  import { ICommonProps } from '../../types';
6
6
  import { Button } from '../Button';
7
- import { Icon } from '../Icon';
7
+ import { IIcon, renderIcon } from '../Icon';
8
8
  import { FilterWrapper, IFiltersPaneSearchProps, FiltersPaneSearch } from './components';
9
9
  import { getLocale } from './helpers';
10
10
  import { ConfigType, IFilterLocaleKey, IPartialFilterLocale } from './types';
@@ -25,6 +25,8 @@ export interface IFiltersPaneProps<Values extends Record<string, unknown>, Conte
25
25
  hasClearButton?: boolean;
26
26
  /** @default false */
27
27
  shouldRenderDataId?: boolean;
28
+ /** @default 'filter' */
29
+ settingsIcon?: IIcon;
28
30
  onChangeFilters: (values: Partial<Values>) => void;
29
31
  onSettingsButtonClick?: () => void;
30
32
  onClear?: () => void;
@@ -42,6 +44,7 @@ export function FiltersPane<Values extends Record<string, unknown>, Content = Va
42
44
  isDisabled = false,
43
45
  hasClearButton = true,
44
46
  shouldRenderDataId = false,
47
+ settingsIcon = 'filter',
45
48
  testId,
46
49
  onChangeFilters,
47
50
  onSettingsButtonClick,
@@ -107,9 +110,7 @@ export function FiltersPane<Values extends Record<string, unknown>, Content = Va
107
110
  {...addDataTestId(testId, 'settings-button')}
108
111
  onClick={!isDisabled ? onSettingsButtonClick : undefined}
109
112
  >
110
- <div className={classes.settingsIcon}>
111
- <Icon type="filter" />
112
- </div>
113
+ <div className={classes.settingsIcon}>{renderIcon(settingsIcon)}</div>
113
114
  </div>
114
115
  )}
115
116
  {/* Search */}
@@ -24,13 +24,14 @@ import { ITextAreaStyles, useStyles } from './TextArea.styles';
24
24
  export interface ITextAreaProps
25
25
  extends ICommonProps<ITextAreaStyles>,
26
26
  Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'onChange'>,
27
- Pick<IControlWrapperProps, 'label' | 'isInvalid' | 'isRequired' | 'isDisabled' | 'size'>,
27
+ Pick<
28
+ IControlWrapperProps,
29
+ 'label' | 'isInvalid' | 'isRequired' | 'isDisabled' | 'size' | 'groupPlacement'
30
+ >,
28
31
  Pick<IWithMessagesProps, 'infoMessage' | 'errorMessage'> {
29
32
  value?: string;
30
33
  placeholder?: string;
31
34
  /** @default false */
32
- isDisabled?: boolean;
33
- /** @default false */
34
35
  isActive?: boolean;
35
36
  /**
36
37
  * Должна ли высота и ширина textarea подстраиваться под содержимое
@@ -54,7 +55,6 @@ export const TextArea = forwardRef<HTMLTextAreaElement, ITextAreaProps>(
54
55
  (
55
56
  {
56
57
  value = DEFAULT_VALUE,
57
- label,
58
58
  placeholder,
59
59
  name,
60
60
  shouldFocusOnMount,
@@ -62,7 +62,6 @@ export const TextArea = forwardRef<HTMLTextAreaElement, ITextAreaProps>(
62
62
  shouldTrimAfterMaxLength,
63
63
  isAutoSized = true,
64
64
  shouldAlwaysShowPlaceholder,
65
- isDisabled,
66
65
  isActive,
67
66
  maxLength,
68
67
  rows,
@@ -77,9 +76,12 @@ export const TextArea = forwardRef<HTMLTextAreaElement, ITextAreaProps>(
77
76
  infoMessage,
78
77
  errorMessage,
79
78
  // Пропсы ControlWrapper
79
+ label,
80
+ isDisabled,
80
81
  isInvalid,
81
82
  isRequired,
82
83
  size,
84
+ groupPlacement,
83
85
  ...textAreaProps
84
86
  },
85
87
  ref,
@@ -135,6 +137,7 @@ export const TextArea = forwardRef<HTMLTextAreaElement, ITextAreaProps>(
135
137
  hasValue={hasValue}
136
138
  isInvalid={isInvalid}
137
139
  isRequired={isRequired}
140
+ groupPlacement={groupPlacement}
138
141
  size={size}
139
142
  isFullWidth
140
143
  >