@instructure/ui-text-area 7.13.0 → 7.14.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 +10 -0
- package/es/TextArea/index.js +2 -3
- package/lib/TextArea/index.js +2 -3
- package/package.json +14 -14
- package/src/TextArea/index.js +2 -3
- package/types/index.d.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,16 @@
|
|
|
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
|
+
# [7.14.0](https://github.com/instructure/instructure-ui/compare/v7.13.0...v7.14.0) (2021-12-01)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- **ui-text-area:** fix jumping scroll issue ([d0eec8f](https://github.com/instructure/instructure-ui/commit/d0eec8f))
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
- **ui-form-field:** make FormField messages accept `node` text, not just `string` ([d9e1a7a](https://github.com/instructure/instructure-ui/commit/d9e1a7a)), closes [PR#819](https://github.com/PR/issues/819)
|
|
15
|
+
|
|
6
16
|
# [7.13.0](https://github.com/instructure/instructure-ui/compare/v7.12.0...v7.13.0) (2021-11-18)
|
|
7
17
|
|
|
8
18
|
**Note:** Version bump only for package @instructure/ui-text-area
|
package/es/TextArea/index.js
CHANGED
|
@@ -91,7 +91,7 @@ var TextArea = (_dec = testable(), _dec2 = themeable(theme, styles), _dec(_class
|
|
|
91
91
|
|
|
92
92
|
var offset = _this._textarea.offsetHeight - _this._textarea.clientHeight;
|
|
93
93
|
var height = ''; // Notes:
|
|
94
|
-
// 1. height has be reset to `auto` every time this method runs, or scrollHeight will not reset
|
|
94
|
+
// 1. height has to be reset to `auto` every time this method runs, or scrollHeight will not reset
|
|
95
95
|
// 2. `this._textarea.scrollHeight` will not reset if assigned to a variable; it needs to be written out each time
|
|
96
96
|
|
|
97
97
|
_this._textarea.style.height = 'auto';
|
|
@@ -122,7 +122,6 @@ var TextArea = (_dec = testable(), _dec2 = themeable(theme, styles), _dec(_class
|
|
|
122
122
|
|
|
123
123
|
_this._height = height;
|
|
124
124
|
_this._textarea.style.height = height;
|
|
125
|
-
_this._textarea.scrollTop = _this._textarea.scrollHeight;
|
|
126
125
|
};
|
|
127
126
|
|
|
128
127
|
_this.handleChange = function (event) {
|
|
@@ -348,7 +347,7 @@ var TextArea = (_dec = testable(), _dec2 = themeable(theme, styles), _dec(_class
|
|
|
348
347
|
|
|
349
348
|
/**
|
|
350
349
|
* object with shape: `{
|
|
351
|
-
* text: PropTypes.
|
|
350
|
+
* text: PropTypes.node,
|
|
352
351
|
* type: PropTypes.oneOf(['error', 'hint', 'success', 'screenreader-only'])
|
|
353
352
|
* }`
|
|
354
353
|
*/
|
package/lib/TextArea/index.js
CHANGED
|
@@ -105,7 +105,7 @@ var TextArea = (_dec = (0, _testable.testable)(), _dec2 = (0, _themeable.themeab
|
|
|
105
105
|
|
|
106
106
|
var offset = _this._textarea.offsetHeight - _this._textarea.clientHeight;
|
|
107
107
|
var height = ''; // Notes:
|
|
108
|
-
// 1. height has be reset to `auto` every time this method runs, or scrollHeight will not reset
|
|
108
|
+
// 1. height has to be reset to `auto` every time this method runs, or scrollHeight will not reset
|
|
109
109
|
// 2. `this._textarea.scrollHeight` will not reset if assigned to a variable; it needs to be written out each time
|
|
110
110
|
|
|
111
111
|
_this._textarea.style.height = 'auto';
|
|
@@ -136,7 +136,6 @@ var TextArea = (_dec = (0, _testable.testable)(), _dec2 = (0, _themeable.themeab
|
|
|
136
136
|
|
|
137
137
|
_this._height = height;
|
|
138
138
|
_this._textarea.style.height = height;
|
|
139
|
-
_this._textarea.scrollTop = _this._textarea.scrollHeight;
|
|
140
139
|
};
|
|
141
140
|
|
|
142
141
|
_this.handleChange = function (event) {
|
|
@@ -363,7 +362,7 @@ var TextArea = (_dec = (0, _testable.testable)(), _dec2 = (0, _themeable.themeab
|
|
|
363
362
|
|
|
364
363
|
/**
|
|
365
364
|
* object with shape: `{
|
|
366
|
-
* text: PropTypes.
|
|
365
|
+
* text: PropTypes.node,
|
|
367
366
|
* type: PropTypes.oneOf(['error', 'hint', 'success', 'screenreader-only'])
|
|
368
367
|
* }`
|
|
369
368
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-text-area",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.14.0",
|
|
4
4
|
"description": "A styled HTML text area component",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -23,23 +23,23 @@
|
|
|
23
23
|
"license": "MIT",
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@babel/runtime": "^7.9.2",
|
|
26
|
-
"@instructure/debounce": "^7.
|
|
27
|
-
"@instructure/ui-dom-utils": "^7.
|
|
28
|
-
"@instructure/ui-form-field": "^7.
|
|
29
|
-
"@instructure/ui-prop-types": "^7.
|
|
30
|
-
"@instructure/ui-react-utils": "^7.
|
|
31
|
-
"@instructure/ui-testable": "^7.
|
|
32
|
-
"@instructure/ui-themeable": "^7.
|
|
33
|
-
"@instructure/ui-utils": "^7.
|
|
34
|
-
"@instructure/uid": "^7.
|
|
26
|
+
"@instructure/debounce": "^7.14.0",
|
|
27
|
+
"@instructure/ui-dom-utils": "^7.14.0",
|
|
28
|
+
"@instructure/ui-form-field": "^7.14.0",
|
|
29
|
+
"@instructure/ui-prop-types": "^7.14.0",
|
|
30
|
+
"@instructure/ui-react-utils": "^7.14.0",
|
|
31
|
+
"@instructure/ui-testable": "^7.14.0",
|
|
32
|
+
"@instructure/ui-themeable": "^7.14.0",
|
|
33
|
+
"@instructure/ui-utils": "^7.14.0",
|
|
34
|
+
"@instructure/uid": "^7.14.0",
|
|
35
35
|
"classnames": "^2",
|
|
36
36
|
"prop-types": "^15"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@instructure/ui-babel-preset": "^7.
|
|
40
|
-
"@instructure/ui-color-utils": "^7.
|
|
41
|
-
"@instructure/ui-test-locator": "^7.
|
|
42
|
-
"@instructure/ui-test-utils": "^7.
|
|
39
|
+
"@instructure/ui-babel-preset": "^7.14.0",
|
|
40
|
+
"@instructure/ui-color-utils": "^7.14.0",
|
|
41
|
+
"@instructure/ui-test-locator": "^7.14.0",
|
|
42
|
+
"@instructure/ui-test-utils": "^7.14.0"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"react": "^16.8"
|
package/src/TextArea/index.js
CHANGED
|
@@ -83,7 +83,7 @@ class TextArea extends Component {
|
|
|
83
83
|
maxHeight: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
84
84
|
/**
|
|
85
85
|
* object with shape: `{
|
|
86
|
-
* text: PropTypes.
|
|
86
|
+
* text: PropTypes.node,
|
|
87
87
|
* type: PropTypes.oneOf(['error', 'hint', 'success', 'screenreader-only'])
|
|
88
88
|
* }`
|
|
89
89
|
*/
|
|
@@ -220,7 +220,7 @@ class TextArea extends Component {
|
|
|
220
220
|
let height = ''
|
|
221
221
|
|
|
222
222
|
// Notes:
|
|
223
|
-
// 1. height has be reset to `auto` every time this method runs, or scrollHeight will not reset
|
|
223
|
+
// 1. height has to be reset to `auto` every time this method runs, or scrollHeight will not reset
|
|
224
224
|
// 2. `this._textarea.scrollHeight` will not reset if assigned to a variable; it needs to be written out each time
|
|
225
225
|
this._textarea.style.height = 'auto'
|
|
226
226
|
this._textarea.style.overflowY = 'hidden' // hide scrollbars for autoGrow textareas
|
|
@@ -250,7 +250,6 @@ class TextArea extends Component {
|
|
|
250
250
|
|
|
251
251
|
this._height = height
|
|
252
252
|
this._textarea.style.height = height
|
|
253
|
-
this._textarea.scrollTop = this._textarea.scrollHeight
|
|
254
253
|
}
|
|
255
254
|
|
|
256
255
|
focus() {
|
package/types/index.d.ts
CHANGED