@instructure/ui-text-area 7.10.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 CHANGED
@@ -3,6 +3,28 @@
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
+
16
+ # [7.13.0](https://github.com/instructure/instructure-ui/compare/v7.12.0...v7.13.0) (2021-11-18)
17
+
18
+ **Note:** Version bump only for package @instructure/ui-text-area
19
+
20
+ # [7.12.0](https://github.com/instructure/instructure-ui/compare/v7.11.0...v7.12.0) (2021-10-15)
21
+
22
+ **Note:** Version bump only for package @instructure/ui-text-area
23
+
24
+ # [7.11.0](https://github.com/instructure/instructure-ui/compare/v7.10.0...v7.11.0) (2021-09-17)
25
+
26
+ **Note:** Version bump only for package @instructure/ui-text-area
27
+
6
28
  # [7.10.0](https://github.com/instructure/instructure-ui/compare/v7.9.0...v7.10.0) (2021-08-27)
7
29
 
8
30
  **Note:** Version bump only for package @instructure/ui-text-area
@@ -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.string,
350
+ * text: PropTypes.node,
352
351
  * type: PropTypes.oneOf(['error', 'hint', 'success', 'screenreader-only'])
353
352
  * }`
354
353
  */
@@ -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.string,
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.10.0",
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.10.0",
27
- "@instructure/ui-dom-utils": "^7.10.0",
28
- "@instructure/ui-form-field": "^7.10.0",
29
- "@instructure/ui-prop-types": "^7.10.0",
30
- "@instructure/ui-react-utils": "^7.10.0",
31
- "@instructure/ui-testable": "^7.10.0",
32
- "@instructure/ui-themeable": "^7.10.0",
33
- "@instructure/ui-utils": "^7.10.0",
34
- "@instructure/uid": "^7.10.0",
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.10.0",
40
- "@instructure/ui-color-utils": "^7.10.0",
41
- "@instructure/ui-test-locator": "^7.10.0",
42
- "@instructure/ui-test-utils": "^7.10.0"
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"
@@ -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.string,
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
@@ -39,7 +39,7 @@ export interface TextAreaProps {
39
39
  maxHeight?: TextAreaMaxHeight;
40
40
  /**
41
41
  * object with shape: `{
42
- * text: PropTypes.string,
42
+ * text: PropTypes.node,
43
43
  * type: PropTypes.oneOf(['error', 'hint', 'success', 'screenreader-only'])
44
44
  * }`
45
45
  */