@true-engineering/true-react-common-ui-kit 3.44.0 → 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 +13 -0
- package/dist/components/Input/types.d.ts +1 -1
- package/dist/components/SearchInput/SearchInput.d.ts +3 -1
- package/dist/components/SearchInput/SearchInput.stories.d.ts +1 -8
- package/dist/true-react-common-ui-kit.js +10 -7
- package/dist/true-react-common-ui-kit.js.map +1 -1
- package/dist/true-react-common-ui-kit.umd.cjs +10 -7
- package/dist/true-react-common-ui-kit.umd.cjs.map +1 -1
- package/package.json +1 -1
- package/src/components/Input/types.ts +1 -0
- package/src/components/SearchInput/SearchInput.tsx +27 -18
- package/src/components/WithPopup/WithPopup.tsx +1 -1
package/README.md
CHANGED
|
@@ -11,6 +11,19 @@
|
|
|
11
11
|
|
|
12
12
|
# Release Notes
|
|
13
13
|
|
|
14
|
+
## 3.45.0
|
|
15
|
+
|
|
16
|
+
### Changes
|
|
17
|
+
|
|
18
|
+
- **Input**: Добавлена стандартная пропса `inputMode`
|
|
19
|
+
- **SearchInput**: Добавлена пропса `onSearchIconClick`
|
|
20
|
+
|
|
21
|
+
## 3.44.1
|
|
22
|
+
|
|
23
|
+
### Changes
|
|
24
|
+
|
|
25
|
+
- **WithPopup**: Явный рендер попапа в `document.body`
|
|
26
|
+
|
|
14
27
|
## 3.44.0
|
|
15
28
|
|
|
16
29
|
### 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
|
|
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,
|
|
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>;
|
|
@@ -8067,7 +8067,7 @@ var WithPopup = function(param) {
|
|
|
8067
8067
|
children: triggerElement
|
|
8068
8068
|
})) : triggerElement,
|
|
8069
8069
|
isMounted && /* @__PURE__ */ jsx(FloatingPortal, {
|
|
8070
|
-
root:
|
|
8070
|
+
root: shouldRenderInBody ? document.body : refs.reference.current,
|
|
8071
8071
|
children: /* @__PURE__ */ jsx("div", _object_spread_props$R(_object_spread$_({
|
|
8072
8072
|
ref: refs.setFloating,
|
|
8073
8073
|
style: floatingStyles,
|
|
@@ -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
|
-
},
|
|
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"),
|