@synerise/ds-input 1.1.0 → 1.1.2
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 +19 -0
- package/dist/AutosizeInput/AutosizeInput.js +2 -9
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
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.1.2](https://github.com/synerise/synerise-design/compare/@synerise/ds-input@1.1.1...@synerise/ds-input@1.1.2) (2025-05-07)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @synerise/ds-input
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [1.1.1](https://github.com/synerise/synerise-design/compare/@synerise/ds-input@1.1.0...@synerise/ds-input@1.1.1) (2025-04-24)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* **inline-edit:** fix text flicker ([b151d33](https://github.com/synerise/synerise-design/commit/b151d3312fd546df7bf3087b4e509ce565f2df44))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
# [1.1.0](https://github.com/synerise/synerise-design/compare/@synerise/ds-input@1.0.4...@synerise/ds-input@1.1.0) (2025-04-16)
|
|
7
26
|
|
|
8
27
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
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); }
|
|
2
|
-
import React, { useEffect, useRef, useLayoutEffect, forwardRef, useImperativeHandle, useCallback, useMemo
|
|
2
|
+
import React, { useEffect, useRef, useLayoutEffect, forwardRef, useImperativeHandle, useCallback, useMemo } from 'react';
|
|
3
3
|
import { useResizeObserver } from '@synerise/ds-utils';
|
|
4
4
|
import { calculateInputWidth } from './utils';
|
|
5
5
|
var sizerStyle = {
|
|
@@ -32,9 +32,6 @@ var AutosizeInput = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) {
|
|
|
32
32
|
defaultValue = _ref.defaultValue,
|
|
33
33
|
style = _ref.style;
|
|
34
34
|
var usedValue = (_ref2 = value != null ? value : defaultValue) != null ? _ref2 : '';
|
|
35
|
-
var _useState = useState(usedValue),
|
|
36
|
-
sizerValue = _useState[0],
|
|
37
|
-
setSizerValue = _useState[1];
|
|
38
35
|
var inputRef = useRef(null);
|
|
39
36
|
var inputWrapperRef = useRef(null);
|
|
40
37
|
var sizerRef = useRef(null);
|
|
@@ -97,9 +94,6 @@ var AutosizeInput = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) {
|
|
|
97
94
|
useLayoutEffect(function () {
|
|
98
95
|
copyInputStyles();
|
|
99
96
|
}, []);
|
|
100
|
-
useEffect(function () {
|
|
101
|
-
inputRef.current && setSizerValue(inputRef.current.value);
|
|
102
|
-
}, [usedValue]);
|
|
103
97
|
useEffect(function () {
|
|
104
98
|
if (sizerRef.current) {
|
|
105
99
|
var sizerSibling = sizerRef.current.nextElementSibling;
|
|
@@ -111,7 +105,6 @@ var AutosizeInput = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) {
|
|
|
111
105
|
if (inputElement && !inputRef.current) {
|
|
112
106
|
if (inputElement && inputElement instanceof HTMLInputElement) {
|
|
113
107
|
inputRef.current = inputElement;
|
|
114
|
-
setSizerValue(inputRef.current.value);
|
|
115
108
|
inputRef.current.style.boxSizing = 'content-box';
|
|
116
109
|
handleInputRef && handleInputRef(inputElement, sizerSibling);
|
|
117
110
|
copyInputStyles();
|
|
@@ -143,7 +136,7 @@ var AutosizeInput = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) {
|
|
|
143
136
|
style: sizerStyle,
|
|
144
137
|
ref: sizerRef,
|
|
145
138
|
"data-testid": "sizer"
|
|
146
|
-
},
|
|
139
|
+
}, usedValue), children, placeholder ? /*#__PURE__*/React.createElement("div", {
|
|
147
140
|
ref: placeholderSizerRef,
|
|
148
141
|
style: sizerStyle,
|
|
149
142
|
"data-testid": "placeholder-sizer"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-input",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "Input UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "synerise/synerise-design",
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
],
|
|
35
35
|
"types": "dist/index.d.ts",
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@synerise/ds-form-field": "^1.1.
|
|
38
|
-
"@synerise/ds-icon": "^1.4.
|
|
39
|
-
"@synerise/ds-scrollbar": "^1.0.
|
|
40
|
-
"@synerise/ds-tooltip": "^1.1.
|
|
41
|
-
"@synerise/ds-utils": "^1.0
|
|
37
|
+
"@synerise/ds-form-field": "^1.1.2",
|
|
38
|
+
"@synerise/ds-icon": "^1.4.2",
|
|
39
|
+
"@synerise/ds-scrollbar": "^1.0.7",
|
|
40
|
+
"@synerise/ds-tooltip": "^1.1.6",
|
|
41
|
+
"@synerise/ds-utils": "^1.1.0",
|
|
42
42
|
"csstype": "2.6.9",
|
|
43
43
|
"uuid": "^8.3.2"
|
|
44
44
|
},
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"react": ">=16.9.0 <= 18.3.1",
|
|
49
49
|
"styled-components": "^5.3.3"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "90af7549cf0f556340bdd0deec4bb59bacf3e95e"
|
|
52
52
|
}
|