@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.
@@ -1,5 +1,6 @@
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';
@@ -17,8 +18,10 @@ export interface IFiltersPaneProps<Values extends Record<string, unknown>, Conte
17
18
  hasClearButton?: boolean;
18
19
  /** @default false */
19
20
  shouldRenderDataId?: boolean;
21
+ /** @default 'filter' */
22
+ settingsIcon?: IIcon;
20
23
  onChangeFilters: (values: Partial<Values>) => void;
21
24
  onSettingsButtonClick?: () => void;
22
25
  onClear?: () => void;
23
26
  }
24
- export declare function FiltersPane<Values extends Record<string, unknown>, Content = Values>({ data, tweakStyles, filtersConfig, enabledFilters, values, localeKey, locale, search, isDisabled, hasClearButton, shouldRenderDataId, 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;
@@ -3,12 +3,10 @@ import { ICommonProps } from '../../types';
3
3
  import { IControlWrapperProps } from '../ControlWrapper';
4
4
  import { IWithMessagesProps } from '../WithMessages';
5
5
  import { ITextAreaStyles } from './TextArea.styles';
6
- export interface ITextAreaProps extends ICommonProps<ITextAreaStyles>, Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'onChange'>, Pick<IControlWrapperProps, 'label' | 'isInvalid' | 'isRequired' | 'isDisabled' | 'size'>, Pick<IWithMessagesProps, 'infoMessage' | 'errorMessage'> {
6
+ export interface ITextAreaProps extends ICommonProps<ITextAreaStyles>, Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'onChange'>, Pick<IControlWrapperProps, 'label' | 'isInvalid' | 'isRequired' | 'isDisabled' | 'size' | 'groupPlacement'>, Pick<IWithMessagesProps, 'infoMessage' | 'errorMessage'> {
7
7
  value?: string;
8
8
  placeholder?: string;
9
9
  /** @default false */
10
- isDisabled?: boolean;
11
- /** @default false */
12
10
  isActive?: boolean;
13
11
  /**
14
12
  * Должна ли высота и ширина textarea подстраиваться под содержимое
@@ -20544,7 +20544,7 @@ function _object_spread_props$n(target, source) {
20544
20544
  return target;
20545
20545
  }
20546
20546
  function FiltersPane(param) {
20547
- var data = param.data, tweakStyles = param.tweakStyles, filtersConfig = param.filtersConfig, enabledFilters = param.enabledFilters, _param_values = param.values, values = _param_values === void 0 ? {} : _param_values, localeKey = param.localeKey, locale2 = param.locale, search = param.search, _param_isDisabled = param.isDisabled, isDisabled = _param_isDisabled === void 0 ? false : _param_isDisabled, _param_hasClearButton = param.hasClearButton, hasClearButton = _param_hasClearButton === void 0 ? true : _param_hasClearButton, _param_shouldRenderDataId = param.shouldRenderDataId, shouldRenderDataId = _param_shouldRenderDataId === void 0 ? false : _param_shouldRenderDataId, testId = param.testId, onChangeFilters = param.onChangeFilters, onSettingsButtonClick = param.onSettingsButtonClick, onClear = param.onClear;
20547
+ var data = param.data, tweakStyles = param.tweakStyles, filtersConfig = param.filtersConfig, enabledFilters = param.enabledFilters, _param_values = param.values, values = _param_values === void 0 ? {} : _param_values, localeKey = param.localeKey, locale2 = param.locale, search = param.search, _param_isDisabled = param.isDisabled, isDisabled = _param_isDisabled === void 0 ? false : _param_isDisabled, _param_hasClearButton = param.hasClearButton, hasClearButton = _param_hasClearButton === void 0 ? true : _param_hasClearButton, _param_shouldRenderDataId = param.shouldRenderDataId, shouldRenderDataId = _param_shouldRenderDataId === void 0 ? false : _param_shouldRenderDataId, _param_settingsIcon = param.settingsIcon, settingsIcon = _param_settingsIcon === void 0 ? "filter" : _param_settingsIcon, testId = param.testId, onChangeFilters = param.onChangeFilters, onSettingsButtonClick = param.onSettingsButtonClick, onClear = param.onClear;
20548
20548
  var classes = useStyles$u({
20549
20549
  theme: tweakStyles
20550
20550
  });
@@ -20603,9 +20603,7 @@ function FiltersPane(param) {
20603
20603
  onClick: !isDisabled ? onSettingsButtonClick : void 0,
20604
20604
  children: /* @__PURE__ */ jsx("div", {
20605
20605
  className: classes.settingsIcon,
20606
- children: /* @__PURE__ */ jsx(Icon, {
20607
- type: "filter"
20608
- })
20606
+ children: renderIcon(settingsIcon)
20609
20607
  })
20610
20608
  })),
20611
20609
  search !== void 0 && /* @__PURE__ */ jsx(FiltersPaneSearch, _object_spread_props$n(_object_spread$o({}, search), {
@@ -31410,9 +31408,8 @@ function _unsupported_iterable_to_array(o, minLen) {
31410
31408
  }
31411
31409
  var DEFAULT_VALUE = "";
31412
31410
  var TextArea = /* @__PURE__ */ forwardRef(function(_param, ref) {
31413
- var _param_value = _param.value, value = _param_value === void 0 ? DEFAULT_VALUE : _param_value, label = _param.label, placeholder = _param.placeholder, name = _param.name, shouldFocusOnMount = _param.shouldFocusOnMount, _param_hasCounter = _param.hasCounter, hasCounter = _param_hasCounter === void 0 ? true : _param_hasCounter, shouldTrimAfterMaxLength = _param.shouldTrimAfterMaxLength, _param_isAutoSized = _param.isAutoSized, isAutoSized = _param_isAutoSized === void 0 ? true : _param_isAutoSized, shouldAlwaysShowPlaceholder = _param.shouldAlwaysShowPlaceholder, isDisabled = _param.isDisabled, isActive = _param.isActive, maxLength = _param.maxLength, rows = _param.rows, data = _param.data, testId = _param.testId, tweakStyles = _param.tweakStyles, onChange = _param.onChange, onPaste = _param.onPaste, onFocus = _param.onFocus, onBlur = _param.onBlur, infoMessage = _param.infoMessage, errorMessage = _param.errorMessage, isInvalid = _param.isInvalid, isRequired = _param.isRequired, size2 = _param.size, textAreaProps = _object_without_properties$3(_param, [
31411
+ var _param_value = _param.value, value = _param_value === void 0 ? DEFAULT_VALUE : _param_value, placeholder = _param.placeholder, name = _param.name, shouldFocusOnMount = _param.shouldFocusOnMount, _param_hasCounter = _param.hasCounter, hasCounter = _param_hasCounter === void 0 ? true : _param_hasCounter, shouldTrimAfterMaxLength = _param.shouldTrimAfterMaxLength, _param_isAutoSized = _param.isAutoSized, isAutoSized = _param_isAutoSized === void 0 ? true : _param_isAutoSized, shouldAlwaysShowPlaceholder = _param.shouldAlwaysShowPlaceholder, isActive = _param.isActive, maxLength = _param.maxLength, rows = _param.rows, data = _param.data, testId = _param.testId, tweakStyles = _param.tweakStyles, onChange = _param.onChange, onPaste = _param.onPaste, onFocus = _param.onFocus, onBlur = _param.onBlur, infoMessage = _param.infoMessage, errorMessage = _param.errorMessage, label = _param.label, isDisabled = _param.isDisabled, isInvalid = _param.isInvalid, isRequired = _param.isRequired, size2 = _param.size, groupPlacement = _param.groupPlacement, textAreaProps = _object_without_properties$3(_param, [
31414
31412
  "value",
31415
- "label",
31416
31413
  "placeholder",
31417
31414
  "name",
31418
31415
  "shouldFocusOnMount",
@@ -31420,7 +31417,6 @@ var TextArea = /* @__PURE__ */ forwardRef(function(_param, ref) {
31420
31417
  "shouldTrimAfterMaxLength",
31421
31418
  "isAutoSized",
31422
31419
  "shouldAlwaysShowPlaceholder",
31423
- "isDisabled",
31424
31420
  "isActive",
31425
31421
  "maxLength",
31426
31422
  "rows",
@@ -31433,9 +31429,12 @@ var TextArea = /* @__PURE__ */ forwardRef(function(_param, ref) {
31433
31429
  "onBlur",
31434
31430
  "infoMessage",
31435
31431
  "errorMessage",
31432
+ "label",
31433
+ "isDisabled",
31436
31434
  "isInvalid",
31437
31435
  "isRequired",
31438
- "size"
31436
+ "size",
31437
+ "groupPlacement"
31439
31438
  ]);
31440
31439
  var classes = useStyles$4({
31441
31440
  theme: tweakStyles
@@ -31481,6 +31480,7 @@ var TextArea = /* @__PURE__ */ forwardRef(function(_param, ref) {
31481
31480
  hasValue,
31482
31481
  isInvalid,
31483
31482
  isRequired,
31483
+ groupPlacement,
31484
31484
  size: size2,
31485
31485
  isFullWidth: true,
31486
31486
  children: /* @__PURE__ */ jsx("div", _object_spread_props$5(_object_spread$5({