@true-engineering/true-react-common-ui-kit 3.44.1 → 3.45.0

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/README.md CHANGED
@@ -11,6 +11,13 @@
11
11
 
12
12
  # Release Notes
13
13
 
14
+ ## 3.45.0
15
+
16
+ ### Changes
17
+
18
+ - **Input**: Добавлена стандартная пропса `inputMode`
19
+ - **SearchInput**: Добавлена пропса `onSearchIconClick`
20
+
14
21
  ## 3.44.1
15
22
 
16
23
  ### Changes
@@ -1,4 +1,4 @@
1
1
  import { InputHTMLAttributes } from 'react';
2
2
  import { Props as ReactInputMaskBaseProps } from 'react-input-mask';
3
3
  export type IReactInputMaskProps = Pick<Partial<ReactInputMaskBaseProps>, 'mask' | 'maskPlaceholder' | 'alwaysShowMask' | 'beforeMaskedStateChange'>;
4
- export type IInputHTMLBaseProps = Pick<InputHTMLAttributes<HTMLInputElement>, 'maxLength' | 'name' | 'tabIndex' | 'placeholder' | 'type' | 'onBlur' | 'onFocus' | 'onInput' | 'onKeyDown' | 'onPaste'>;
4
+ export type IInputHTMLBaseProps = Pick<InputHTMLAttributes<HTMLInputElement>, 'maxLength' | 'name' | 'tabIndex' | 'placeholder' | 'type' | 'inputMode' | 'onBlur' | 'onFocus' | 'onInput' | 'onKeyDown' | 'onPaste'>;
@@ -2,5 +2,7 @@ import { FC } from 'react';
2
2
  import { ICommonProps } from '../../types';
3
3
  import { IInputProps } from '../Input';
4
4
  import { ISearchInputStyles } from './SearchInput.styles';
5
- export type ISearchInputProps = Omit<IInputProps, 'type' | 'isInvalid' | 'errorMessage' | 'label' | 'isActive' | 'errorPosition' | 'hasFloatingLabel' | 'border' | 'tweakStyles'> & ICommonProps<ISearchInputStyles>;
5
+ export interface ISearchInputProps extends ICommonProps<ISearchInputStyles>, Omit<IInputProps, 'type' | 'isInvalid' | 'errorMessage' | 'label' | 'isActive' | 'errorPosition' | 'hasFloatingLabel' | 'border' | 'tweakStyles'> {
6
+ onSearchIconClick?: () => void;
7
+ }
6
8
  export declare const SearchInput: FC<ISearchInputProps>;
@@ -3,11 +3,4 @@ declare const _default: {
3
3
  component: import("react").FC<import("./SearchInput").ISearchInputProps>;
4
4
  };
5
5
  export default _default;
6
- export declare const Default: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0fc72a6d").R, Omit<import("..").IInputProps, "border" | "tweakStyles" | "label" | "isInvalid" | "type" | "isActive" | "hasFloatingLabel" | "errorMessage" | "errorPosition"> & import("../..").IDataAttributesProps & import("../..").ITweakStylesProps<Partial<import("jss").Styles<"root" | "icon", unknown, undefined>> & Partial<{
7
- tweakInput: Partial<import("jss").Styles<"bottom" | "left" | "right" | "top" | "error" | "input" | "invalid" | "root" | "middle" | "icon" | "disabled" | "loading" | "label" | "requiredLabel" | "inputWrapper" | "info" | "autosize" | "clearIcon" | "focused" | "inputContent" | "unitsWrapper" | "fakeValue" | "units" | "withFloatingLabel" | "floatingLabelWithoutPadding" | "floating" | "activeLabel" | "required" | "floatingWithoutPadding" | "activeIcon" | "border-top" | "border-bottom" | "border-left" | "border-right" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "controls" | "inputIcon" | "withIcons" | "withControls" | "invalidLabel" | "error-top" | "error-bottom" | "withUnits", unknown, undefined>> & Partial<{
8
- tweakPreloader: Partial<import("jss").Styles<"root" | "default" | "currentColor" | "dots" | "logo", unknown, undefined>> & Partial<{
9
- tweakDotsPreloader: Partial<import("jss").Styles<"root" | "dot" | "fadedDot" | "@keyframes FadedDots", unknown, undefined>> & Partial<unknown>;
10
- tweakSvgPreloader: Partial<import("jss").Styles<"root", unknown, undefined>> & Partial<unknown>;
11
- }>;
12
- }>;
13
- }>>>;
6
+ export declare const Default: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0fc72a6d").R, import("./SearchInput").ISearchInputProps>;
@@ -10646,11 +10646,12 @@ function _object_without_properties_loose$e(source, excluded) {
10646
10646
  return target;
10647
10647
  }
10648
10648
  var SearchInput = function(_param) {
10649
- var _param_isClearable = _param.isClearable, isClearable = _param_isClearable === void 0 ? true : _param_isClearable, tweakStyles = _param.tweakStyles, testId = _param.testId, data = _param.data, props = _object_without_properties$e(_param, [
10649
+ var _param_isClearable = _param.isClearable, isClearable = _param_isClearable === void 0 ? true : _param_isClearable, tweakStyles = _param.tweakStyles, testId = _param.testId, data = _param.data, onSearchIconClick = _param.onSearchIconClick, props = _object_without_properties$e(_param, [
10650
10650
  "isClearable",
10651
10651
  "tweakStyles",
10652
10652
  "testId",
10653
- "data"
10653
+ "data",
10654
+ "onSearchIconClick"
10654
10655
  ]);
10655
10656
  var classes = useStyles$F({
10656
10657
  theme: tweakStyles
@@ -10663,15 +10664,17 @@ var SearchInput = function(_param) {
10663
10664
  });
10664
10665
  return /* @__PURE__ */ jsxs("div", _object_spread_props$G(_object_spread$N({
10665
10666
  className: classes.root
10666
- }, addDataTestId(testId), addDataAttributes(data)), {
10667
+ }, addDataAttributes$1(data, testId)), {
10667
10668
  children: [
10668
- /* @__PURE__ */ jsx("div", {
10669
- className: classes.icon,
10669
+ /* @__PURE__ */ jsx("div", _object_spread_props$G(_object_spread$N({
10670
+ className: classes.icon
10671
+ }, addClickHandler(onSearchIconClick)), {
10670
10672
  children: /* @__PURE__ */ jsx(Icon, {
10671
10673
  type: "search"
10672
10674
  })
10673
- }),
10675
+ })),
10674
10676
  /* @__PURE__ */ jsx(Input, _object_spread$N({
10677
+ inputMode: "search",
10675
10678
  isClearable,
10676
10679
  isActive: props.value !== "" && props.value !== void 0,
10677
10680
  testId: getTestId(testId, "input"),