@cloudflare/component-textarea 2.5.93 → 2.6.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 +35 -0
- package/dist/Textarea.d.ts +1 -0
- package/es/Textarea.js +17 -27
- package/lib/Textarea.js +17 -27
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,41 @@
|
|
|
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
|
+
## [2.6.2](http://stash.cfops.it:7999/fe/stratus/compare/@cloudflare/component-textarea@2.6.1...@cloudflare/component-textarea@2.6.2) (2022-02-01)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @cloudflare/component-textarea
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [2.6.1](http://stash.cfops.it:7999/fe/stratus/compare/@cloudflare/component-textarea@2.6.0...@cloudflare/component-textarea@2.6.1) (2022-01-19)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @cloudflare/component-textarea
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# [2.6.0](http://stash.cfops.it:7999/fe/stratus/compare/@cloudflare/component-textarea@2.5.94...@cloudflare/component-textarea@2.6.0) (2022-01-07)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Features
|
|
26
|
+
|
|
27
|
+
* **component-textarea:** A11Y-584 Add invalid prop, update styling ([7f4fabb](http://stash.cfops.it:7999/fe/stratus/commits/7f4fabb))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
## [2.5.94](http://stash.cfops.it:7999/fe/stratus/compare/@cloudflare/component-textarea@2.5.93...@cloudflare/component-textarea@2.5.94) (2021-12-28)
|
|
34
|
+
|
|
35
|
+
**Note:** Version bump only for package @cloudflare/component-textarea
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
6
41
|
## [2.5.93](http://stash.cfops.it:7999/fe/stratus/compare/@cloudflare/component-textarea@2.5.91...@cloudflare/component-textarea@2.5.93) (2021-12-21)
|
|
7
42
|
|
|
8
43
|
**Note:** Version bump only for package @cloudflare/component-textarea
|
package/dist/Textarea.d.ts
CHANGED
|
@@ -334,6 +334,7 @@ declare const Textarea: import("react").ComponentType<{
|
|
|
334
334
|
px?: import("csstype").PaddingLeftProperty<string | number> | [import("csstype").PaddingLeftProperty<string | number> | undefined, import("csstype").PaddingLeftProperty<string | number> | undefined] | [import("csstype").PaddingLeftProperty<string | number> | undefined, import("csstype").PaddingLeftProperty<string | number> | undefined, import("csstype").PaddingLeftProperty<string | number> | undefined] | undefined;
|
|
335
335
|
py?: import("csstype").PaddingTopProperty<string | number> | [import("csstype").PaddingTopProperty<string | number> | undefined, import("csstype").PaddingTopProperty<string | number> | undefined] | [import("csstype").PaddingTopProperty<string | number> | undefined, import("csstype").PaddingTopProperty<string | number> | undefined, import("csstype").PaddingTopProperty<string | number> | undefined] | undefined;
|
|
336
336
|
borderbottomRightRadius?: ([never, never] | [never, never, never]) | undefined;
|
|
337
|
+
invalid?: boolean | undefined;
|
|
337
338
|
innerRef?: import("react").Ref<HTMLTextAreaElement> | undefined;
|
|
338
339
|
}>;
|
|
339
340
|
export default Textarea;
|
package/es/Textarea.js
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? Object(arguments[i]) : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }
|
|
2
|
+
|
|
3
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
4
|
+
|
|
1
5
|
import PropTypes from 'prop-types';
|
|
2
6
|
import requiredIf from 'react-required-if';
|
|
3
7
|
import { createStyledComponent } from '@cloudflare/style-container';
|
|
4
8
|
const Textarea = createStyledComponent(({
|
|
5
|
-
theme
|
|
6
|
-
|
|
9
|
+
theme,
|
|
10
|
+
invalid,
|
|
11
|
+
disabled
|
|
12
|
+
}) => _objectSpread({
|
|
7
13
|
height: 'initial',
|
|
8
14
|
lineHeight: 'initial',
|
|
9
15
|
wordBreak: 'initial',
|
|
@@ -16,35 +22,19 @@ const Textarea = createStyledComponent(({
|
|
|
16
22
|
mx: 0,
|
|
17
23
|
mt: 0,
|
|
18
24
|
mb: 3,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
transition: 'border-color 0.2s ease',
|
|
28
|
-
'&:hover': {
|
|
29
|
-
borderColor: theme.colors.blue[3]
|
|
30
|
-
},
|
|
31
|
-
'&:focus': {
|
|
32
|
-
outline: '5px auto -webkit-focus-ring-color',
|
|
33
|
-
outlineOffset: '-1px'
|
|
34
|
-
},
|
|
35
|
-
'&:disabled': {
|
|
36
|
-
background: theme.colors.gray[8],
|
|
37
|
-
color: theme.colors.gray[1],
|
|
38
|
-
opacity: 0.5,
|
|
39
|
-
'&:hover': {
|
|
40
|
-
borderColor: theme.colors.gray[5]
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}), 'textarea');
|
|
25
|
+
verticalAlign: 'middle'
|
|
26
|
+
}, theme.mixins.focus({
|
|
27
|
+
invalid,
|
|
28
|
+
border: true
|
|
29
|
+
}), theme.mixins.input({
|
|
30
|
+
invalid,
|
|
31
|
+
disabled
|
|
32
|
+
})), 'textarea');
|
|
44
33
|
Textarea.propTypes = {
|
|
45
34
|
height: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
46
35
|
name: PropTypes.string.isRequired,
|
|
47
36
|
value: PropTypes.string.isRequired,
|
|
37
|
+
invalid: PropTypes.bool,
|
|
48
38
|
disabled: PropTypes.bool,
|
|
49
39
|
readOnly: PropTypes.bool,
|
|
50
40
|
rows: PropTypes.number,
|
package/lib/Textarea.js
CHANGED
|
@@ -13,9 +13,15 @@ var _styleContainer = require("@cloudflare/style-container");
|
|
|
13
13
|
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
15
|
|
|
16
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? Object(arguments[i]) : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }
|
|
17
|
+
|
|
18
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
19
|
+
|
|
16
20
|
var Textarea = (0, _styleContainer.createStyledComponent)(function (_ref) {
|
|
17
|
-
var theme = _ref.theme
|
|
18
|
-
|
|
21
|
+
var theme = _ref.theme,
|
|
22
|
+
invalid = _ref.invalid,
|
|
23
|
+
disabled = _ref.disabled;
|
|
24
|
+
return _objectSpread({
|
|
19
25
|
height: 'initial',
|
|
20
26
|
lineHeight: 'initial',
|
|
21
27
|
wordBreak: 'initial',
|
|
@@ -28,36 +34,20 @@ var Textarea = (0, _styleContainer.createStyledComponent)(function (_ref) {
|
|
|
28
34
|
mx: 0,
|
|
29
35
|
mt: 0,
|
|
30
36
|
mb: 3,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
transition: 'border-color 0.2s ease',
|
|
40
|
-
'&:hover': {
|
|
41
|
-
borderColor: theme.colors.blue[3]
|
|
42
|
-
},
|
|
43
|
-
'&:focus': {
|
|
44
|
-
outline: '5px auto -webkit-focus-ring-color',
|
|
45
|
-
outlineOffset: '-1px'
|
|
46
|
-
},
|
|
47
|
-
'&:disabled': {
|
|
48
|
-
background: theme.colors.gray[8],
|
|
49
|
-
color: theme.colors.gray[1],
|
|
50
|
-
opacity: 0.5,
|
|
51
|
-
'&:hover': {
|
|
52
|
-
borderColor: theme.colors.gray[5]
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
};
|
|
37
|
+
verticalAlign: 'middle'
|
|
38
|
+
}, theme.mixins.focus({
|
|
39
|
+
invalid: invalid,
|
|
40
|
+
border: true
|
|
41
|
+
}), theme.mixins.input({
|
|
42
|
+
invalid: invalid,
|
|
43
|
+
disabled: disabled
|
|
44
|
+
}));
|
|
56
45
|
}, 'textarea');
|
|
57
46
|
Textarea.propTypes = {
|
|
58
47
|
height: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]),
|
|
59
48
|
name: _propTypes.default.string.isRequired,
|
|
60
49
|
value: _propTypes.default.string.isRequired,
|
|
50
|
+
invalid: _propTypes.default.bool,
|
|
61
51
|
disabled: _propTypes.default.bool,
|
|
62
52
|
readOnly: _propTypes.default.bool,
|
|
63
53
|
rows: _propTypes.default.number,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudflare/component-textarea",
|
|
3
3
|
"description": "Cloudflare Textarea Component",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.6.2",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
"access": "public"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@cloudflare/style-container": "^7.
|
|
17
|
-
"@cloudflare/types": "^6.
|
|
16
|
+
"@cloudflare/style-container": "^7.6.2",
|
|
17
|
+
"@cloudflare/types": "^6.12.0",
|
|
18
18
|
"prop-types": "^15.6.0",
|
|
19
19
|
"react-required-if": "^1.0.0"
|
|
20
20
|
},
|
|
@@ -32,5 +32,5 @@
|
|
|
32
32
|
"test-coverage": "stratus test --coverage",
|
|
33
33
|
"test-watch": "stratus test --watch"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "d620f573304f8c7cf4948ebaaaa06029883e0594"
|
|
36
36
|
}
|