@synerise/ds-input 1.4.2 → 1.5.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/CHANGELOG.md +11 -0
- package/dist/Input.d.ts +18 -1
- package/dist/Input.js +6 -4
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [1.5.0](https://github.com/synerise/synerise-design/compare/@synerise/ds-input@1.4.2...@synerise/ds-input@1.5.0) (2025-11-06)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **dropdown:** dropdownMenu component ([f0ec827](https://github.com/synerise/synerise-design/commit/f0ec82792cdcb021fa9a454912f6e7a892e53895))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [1.4.2](https://github.com/synerise/synerise-design/compare/@synerise/ds-input@1.4.1...@synerise/ds-input@1.4.2) (2025-10-31)
|
|
7
18
|
|
|
8
19
|
|
package/dist/Input.d.ts
CHANGED
|
@@ -2,7 +2,24 @@ import React from 'react';
|
|
|
2
2
|
import '@synerise/ds-core/dist/js/style';
|
|
3
3
|
import type { InputProps } from './Input.types';
|
|
4
4
|
import './style/index.less';
|
|
5
|
-
export declare const Input:
|
|
5
|
+
export declare const Input: React.ForwardRefExoticComponent<{
|
|
6
|
+
error?: boolean;
|
|
7
|
+
className?: string;
|
|
8
|
+
counterLimit?: number;
|
|
9
|
+
renderCustomCounter?: (count?: number) => React.ReactNode;
|
|
10
|
+
icon1?: React.ReactElement;
|
|
11
|
+
icon1Tooltip?: React.ReactElement;
|
|
12
|
+
icon2?: React.ReactElement;
|
|
13
|
+
icon2Tooltip?: React.ReactElement;
|
|
14
|
+
resetMargin?: boolean;
|
|
15
|
+
handleInputRef?: ((ref: React.MutableRefObject<HTMLInputElement | null>) => void) | undefined;
|
|
16
|
+
prefixel?: React.ReactNode;
|
|
17
|
+
suffixel?: React.ReactNode;
|
|
18
|
+
autoResize?: import("./Input.types").AutoResizeProp;
|
|
19
|
+
autoResizeProps?: Partial<Pick<import("./AutosizeInput/AutosizeInput.types").AutosizeInputProps, "placeholderIsMinWidth" | "wrapperClassName" | "wrapperStyle" | "extraWidth">>;
|
|
20
|
+
expandable?: boolean;
|
|
21
|
+
expandableTooltip?: React.ReactNode;
|
|
22
|
+
} & Omit<import("@synerise/ds-form-field").ContentAboveProps, "id" | "rightSide"> & import("@synerise/ds-form-field").ContentBelowProps & import("antd/lib/input").InputProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
23
|
export declare const RawInput: (props: InputProps) => React.JSX.Element;
|
|
7
24
|
export { default as InputGroup } from './InputGroup';
|
|
8
25
|
export { default as InputMultivalue } from './InputMultivalue/InputMultivalue';
|
package/dist/Input.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
var _excluded = ["className", "errorText", "label", "description", "counterLimit", "tooltip", "tooltipConfig", "icon1", "icon1Tooltip", "autoResize", "icon2", "icon2Tooltip", "resetMargin", "handleInputRef", "prefixel", "suffixel", "error", "expandable", "expandableTooltip", "renderCustomCounter", "autoResizeProps"];
|
|
2
2
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
3
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
4
|
-
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
4
|
+
import React, { forwardRef, useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
5
5
|
import { v4 as uuid } from 'uuid';
|
|
6
|
+
import { useMergeRefs } from '@floating-ui/react';
|
|
6
7
|
import '@synerise/ds-core/dist/js/style';
|
|
7
8
|
import FormField from '@synerise/ds-form-field';
|
|
8
9
|
import { useResizeObserver } from '@synerise/ds-utils';
|
|
@@ -13,7 +14,7 @@ import { useCounterLimit } from './hooks/useCounterLimit';
|
|
|
13
14
|
import "./style/index.css";
|
|
14
15
|
import { getCharCount } from './utils';
|
|
15
16
|
var VERTICAL_BORDER_OFFSET = 2;
|
|
16
|
-
export var Input = function
|
|
17
|
+
export var Input = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) {
|
|
17
18
|
var className = _ref.className,
|
|
18
19
|
errorText = _ref.errorText,
|
|
19
20
|
label = _ref.label,
|
|
@@ -54,6 +55,7 @@ export var Input = function Input(_ref) {
|
|
|
54
55
|
var autosizeRef = useRef(null);
|
|
55
56
|
var externalRef = useRef(null);
|
|
56
57
|
var elementRef = useRef(null);
|
|
58
|
+
var mergedRef = useMergeRefs([elementRef, forwardedRef]);
|
|
57
59
|
var iconCount = useMemo(function () {
|
|
58
60
|
return Number(!!icon1) + Number(!!icon2) + Number(!!expandable);
|
|
59
61
|
}, [icon1, icon2, expandable]);
|
|
@@ -186,7 +188,7 @@ export var Input = function Input(_ref) {
|
|
|
186
188
|
ref: inputRef
|
|
187
189
|
})));
|
|
188
190
|
return /*#__PURE__*/React.createElement(S.OuterWrapper, {
|
|
189
|
-
ref:
|
|
191
|
+
ref: mergedRef,
|
|
190
192
|
autoResize: autoResize,
|
|
191
193
|
className: className,
|
|
192
194
|
resetMargin: resetMargin,
|
|
@@ -221,7 +223,7 @@ export var Input = function Input(_ref) {
|
|
|
221
223
|
value: antdInputProps.value,
|
|
222
224
|
expanded: expanded
|
|
223
225
|
}, autoSizedComponent) : autoSizedComponent)));
|
|
224
|
-
};
|
|
226
|
+
});
|
|
225
227
|
export var RawInput = function RawInput(props) {
|
|
226
228
|
var error = props.error;
|
|
227
229
|
return /*#__PURE__*/React.createElement(S.AntdInput, _extends({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-input",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "Input UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "synerise/synerise-design",
|
|
@@ -35,10 +35,10 @@
|
|
|
35
35
|
],
|
|
36
36
|
"types": "dist/index.d.ts",
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@synerise/ds-form-field": "^1.1.
|
|
39
|
-
"@synerise/ds-icon": "^1.
|
|
40
|
-
"@synerise/ds-scrollbar": "^1.
|
|
41
|
-
"@synerise/ds-tooltip": "^1.
|
|
38
|
+
"@synerise/ds-form-field": "^1.1.19",
|
|
39
|
+
"@synerise/ds-icon": "^1.8.0",
|
|
40
|
+
"@synerise/ds-scrollbar": "^1.2.0",
|
|
41
|
+
"@synerise/ds-tooltip": "^1.3.0",
|
|
42
42
|
"@synerise/ds-utils": "^1.5.0",
|
|
43
43
|
"classnames": "^2.3.2",
|
|
44
44
|
"csstype": "^2.6.9",
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"react": ">=16.9.0 <= 18.3.1",
|
|
51
51
|
"styled-components": "^5.3.3"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "cbbb7d9f155735bcc4035d8fd8a7813878d6e051"
|
|
54
54
|
}
|