@cloudflare/component-text 2.2.99 → 2.3.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/es/Text.js +5 -2
- package/index.d.ts +1 -0
- package/lib/Text.js +5 -2
- package/package.json +2 -2
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
|
+
# [2.3.0](http://stash.cfops.it:7999/fe/stratus/compare/@cloudflare/component-text@2.2.99...@cloudflare/component-text@2.3.0) (2022-02-11)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **component-text:** A11Y-43 Add role prop ([6158091](http://stash.cfops.it:7999/fe/stratus/commits/6158091))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [2.2.99](http://stash.cfops.it:7999/fe/stratus/compare/@cloudflare/component-text@2.2.98...@cloudflare/component-text@2.2.99) (2022-02-10)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @cloudflare/component-text
|
package/es/Text.js
CHANGED
|
@@ -49,9 +49,11 @@ class Text extends React.Component {
|
|
|
49
49
|
render() {
|
|
50
50
|
const _this$props = this.props,
|
|
51
51
|
className = _this$props.className,
|
|
52
|
+
role = _this$props.role,
|
|
52
53
|
children = _this$props.children;
|
|
53
54
|
return /*#__PURE__*/React.createElement("div", {
|
|
54
|
-
className: className
|
|
55
|
+
className: className,
|
|
56
|
+
role: role
|
|
55
57
|
}, children);
|
|
56
58
|
}
|
|
57
59
|
|
|
@@ -63,6 +65,7 @@ Text.propTypes = {
|
|
|
63
65
|
align: PropTypes.oneOf(['start', 'center', 'justify', 'end']),
|
|
64
66
|
type: PropTypes.oneOf(['info', 'success', 'warning', 'error', 'muted']),
|
|
65
67
|
case: PropTypes.oneOf(['capitalize', 'titlecase', 'lowercase', 'uppercase']),
|
|
68
|
+
role: PropTypes.string,
|
|
66
69
|
className: PropTypes.string.isRequired,
|
|
67
70
|
children: PropTypes.node
|
|
68
71
|
};
|
|
@@ -70,4 +73,4 @@ Text.defaultProps = {
|
|
|
70
73
|
weight: 'normal'
|
|
71
74
|
};
|
|
72
75
|
Text.displayName = 'Text';
|
|
73
|
-
export default createStyledComponent(styles, Text);
|
|
76
|
+
export default createStyledComponent(styles, Text, ['role']);
|
package/index.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export interface ITextProps {
|
|
|
10
10
|
type?: 'info' | 'success' | 'warning' | 'error' | 'muted';
|
|
11
11
|
case?: 'capitalize' | 'titlecase' | 'lowercase' | 'uppercase';
|
|
12
12
|
display?: 'block' | 'inline-block' | 'inline';
|
|
13
|
+
role?: string;
|
|
13
14
|
}
|
|
14
15
|
|
|
15
16
|
export class Text extends React.Component<ITextProps & TfelaMProps, Object> {}
|
package/lib/Text.js
CHANGED
|
@@ -90,9 +90,11 @@ var Text = /*#__PURE__*/function (_React$Component) {
|
|
|
90
90
|
value: function render() {
|
|
91
91
|
var _this$props = this.props,
|
|
92
92
|
className = _this$props.className,
|
|
93
|
+
role = _this$props.role,
|
|
93
94
|
children = _this$props.children;
|
|
94
95
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
95
|
-
className: className
|
|
96
|
+
className: className,
|
|
97
|
+
role: role
|
|
96
98
|
}, children);
|
|
97
99
|
}
|
|
98
100
|
}]);
|
|
@@ -106,6 +108,7 @@ Text.propTypes = {
|
|
|
106
108
|
align: _propTypes.default.oneOf(['start', 'center', 'justify', 'end']),
|
|
107
109
|
type: _propTypes.default.oneOf(['info', 'success', 'warning', 'error', 'muted']),
|
|
108
110
|
case: _propTypes.default.oneOf(['capitalize', 'titlecase', 'lowercase', 'uppercase']),
|
|
111
|
+
role: _propTypes.default.string,
|
|
109
112
|
className: _propTypes.default.string.isRequired,
|
|
110
113
|
children: _propTypes.default.node
|
|
111
114
|
};
|
|
@@ -114,6 +117,6 @@ Text.defaultProps = {
|
|
|
114
117
|
};
|
|
115
118
|
Text.displayName = 'Text';
|
|
116
119
|
|
|
117
|
-
var _default = (0, _styleContainer.createStyledComponent)(styles, Text);
|
|
120
|
+
var _default = (0, _styleContainer.createStyledComponent)(styles, Text, ['role']);
|
|
118
121
|
|
|
119
122
|
exports.default = _default;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudflare/component-text",
|
|
3
3
|
"description": "Cloudflare Text Component",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.3.0",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
7
7
|
"author": "James Kyle <jkyle@cloudflare.com>",
|
|
@@ -28,5 +28,5 @@
|
|
|
28
28
|
"test-coverage": "stratus test --coverage",
|
|
29
29
|
"test-watch": "stratus test --watch"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "777cd22be2cdf1e40320b91a6276b713d923bf59"
|
|
32
32
|
}
|