@cloudflare/component-card 4.0.16 → 4.0.17
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,14 @@
|
|
|
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
|
+
## [4.0.17](http://stash.cfops.it:7999/fe/stratus/compare/@cloudflare/component-card@4.0.16...@cloudflare/component-card@4.0.17) (2021-11-23)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @cloudflare/component-card
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [4.0.16](http://stash.cfops.it:7999/fe/stratus/compare/@cloudflare/component-card@4.0.15...@cloudflare/component-card@4.0.16) (2021-11-23)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @cloudflare/component-card
|
package/es/CardDrawers.js
CHANGED
|
@@ -62,7 +62,8 @@ class CardDrawers extends React.Component {
|
|
|
62
62
|
drawerComponent = _ref.drawerComponent,
|
|
63
63
|
onClick = _ref.onClick,
|
|
64
64
|
href = _ref.href,
|
|
65
|
-
|
|
65
|
+
ariaLabel = _ref.ariaLabel,
|
|
66
|
+
rest = _objectWithoutProperties(_ref, ["id", "name", "content", "drawerComponent", "onClick", "href", "ariaLabel"]);
|
|
66
67
|
|
|
67
68
|
// The component used for the drawer can be overridden
|
|
68
69
|
const Drawer = drawerComponent || CardDrawer;
|
|
@@ -82,7 +83,8 @@ class CardDrawers extends React.Component {
|
|
|
82
83
|
isActive: isActive,
|
|
83
84
|
onClick: () => this.handleLinkClick(drawerId),
|
|
84
85
|
ariaControls: drawerId,
|
|
85
|
-
ariaExpanded: isActive
|
|
86
|
+
ariaExpanded: isActive,
|
|
87
|
+
ariaLabel: ariaLabel
|
|
86
88
|
}, name) : /*#__PURE__*/React.createElement(CardToolbarLink, {
|
|
87
89
|
id: triggerId,
|
|
88
90
|
href: href
|
|
@@ -20,7 +20,8 @@ class CardToolbarDrawerTrigger extends React.Component {
|
|
|
20
20
|
children = _this$props.children,
|
|
21
21
|
isActive = _this$props.isActive,
|
|
22
22
|
ariaControls = _this$props.ariaControls,
|
|
23
|
-
ariaExpanded = _this$props.ariaExpanded
|
|
23
|
+
ariaExpanded = _this$props.ariaExpanded,
|
|
24
|
+
ariaLabel = _this$props.ariaLabel;
|
|
24
25
|
return /*#__PURE__*/React.createElement(TextButton, {
|
|
25
26
|
id: id,
|
|
26
27
|
onClick: this.handleClick,
|
|
@@ -29,7 +30,8 @@ class CardToolbarDrawerTrigger extends React.Component {
|
|
|
29
30
|
py: 2,
|
|
30
31
|
fontSize: 3,
|
|
31
32
|
"aria-controls": ariaControls,
|
|
32
|
-
"aria-expanded": ariaExpanded
|
|
33
|
+
"aria-expanded": ariaExpanded,
|
|
34
|
+
"aria-label": ariaLabel
|
|
33
35
|
}, children, /*#__PURE__*/React.createElement(ArrowSwivel, {
|
|
34
36
|
isActive: isActive,
|
|
35
37
|
duration: 50
|
|
@@ -44,7 +46,8 @@ CardToolbarDrawerTrigger.propTypes = {
|
|
|
44
46
|
id: PropTypes.string.isRequired,
|
|
45
47
|
children: PropTypes.node,
|
|
46
48
|
ariaControls: PropTypes.string.isRequired,
|
|
47
|
-
ariaExpanded: PropTypes.bool.isRequired
|
|
49
|
+
ariaExpanded: PropTypes.bool.isRequired,
|
|
50
|
+
ariaLabel: PropTypes.string
|
|
48
51
|
};
|
|
49
52
|
CardToolbarDrawerTrigger.defaultProps = {
|
|
50
53
|
isActive: false
|
package/lib/CardDrawers.js
CHANGED
|
@@ -118,7 +118,8 @@ var CardDrawers = /*#__PURE__*/function (_React$Component) {
|
|
|
118
118
|
drawerComponent = _ref2.drawerComponent,
|
|
119
119
|
onClick = _ref2.onClick,
|
|
120
120
|
href = _ref2.href,
|
|
121
|
-
|
|
121
|
+
ariaLabel = _ref2.ariaLabel,
|
|
122
|
+
rest = _objectWithoutProperties(_ref2, ["id", "name", "content", "drawerComponent", "onClick", "href", "ariaLabel"]);
|
|
122
123
|
|
|
123
124
|
// The component used for the drawer can be overridden
|
|
124
125
|
var Drawer = drawerComponent || _CardDrawer.default;
|
|
@@ -140,7 +141,8 @@ var CardDrawers = /*#__PURE__*/function (_React$Component) {
|
|
|
140
141
|
return _this3.handleLinkClick(drawerId);
|
|
141
142
|
},
|
|
142
143
|
ariaControls: drawerId,
|
|
143
|
-
ariaExpanded: isActive
|
|
144
|
+
ariaExpanded: isActive,
|
|
145
|
+
ariaLabel: ariaLabel
|
|
144
146
|
}, name) : /*#__PURE__*/_react.default.createElement(_CardToolbarLink.default, {
|
|
145
147
|
id: triggerId,
|
|
146
148
|
href: href
|
|
@@ -60,7 +60,8 @@ var CardToolbarDrawerTrigger = /*#__PURE__*/function (_React$Component) {
|
|
|
60
60
|
children = _this$props.children,
|
|
61
61
|
isActive = _this$props.isActive,
|
|
62
62
|
ariaControls = _this$props.ariaControls,
|
|
63
|
-
ariaExpanded = _this$props.ariaExpanded
|
|
63
|
+
ariaExpanded = _this$props.ariaExpanded,
|
|
64
|
+
ariaLabel = _this$props.ariaLabel;
|
|
64
65
|
return /*#__PURE__*/_react.default.createElement(_componentButton.TextButton, {
|
|
65
66
|
id: id,
|
|
66
67
|
onClick: this.handleClick,
|
|
@@ -69,7 +70,8 @@ var CardToolbarDrawerTrigger = /*#__PURE__*/function (_React$Component) {
|
|
|
69
70
|
py: 2,
|
|
70
71
|
fontSize: 3,
|
|
71
72
|
"aria-controls": ariaControls,
|
|
72
|
-
"aria-expanded": ariaExpanded
|
|
73
|
+
"aria-expanded": ariaExpanded,
|
|
74
|
+
"aria-label": ariaLabel
|
|
73
75
|
}, children, /*#__PURE__*/_react.default.createElement(_componentArrowSwivel.ArrowSwivel, {
|
|
74
76
|
isActive: isActive,
|
|
75
77
|
duration: 50
|
|
@@ -86,7 +88,8 @@ CardToolbarDrawerTrigger.propTypes = {
|
|
|
86
88
|
id: _propTypes.default.string.isRequired,
|
|
87
89
|
children: _propTypes.default.node,
|
|
88
90
|
ariaControls: _propTypes.default.string.isRequired,
|
|
89
|
-
ariaExpanded: _propTypes.default.bool.isRequired
|
|
91
|
+
ariaExpanded: _propTypes.default.bool.isRequired,
|
|
92
|
+
ariaLabel: _propTypes.default.string
|
|
90
93
|
};
|
|
91
94
|
CardToolbarDrawerTrigger.defaultProps = {
|
|
92
95
|
isActive: false
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudflare/component-card",
|
|
3
3
|
"description": "Cloudflare Card Component",
|
|
4
|
-
"version": "4.0.
|
|
4
|
+
"version": "4.0.17",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
7
7
|
"author": "James Kyle <jkyle@cloudflare.com>",
|
|
@@ -31,5 +31,5 @@
|
|
|
31
31
|
"test-coverage": "stratus test --coverage",
|
|
32
32
|
"test-watch": "stratus test --watch"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "66ff768ac439c1f6fe1050c964660e61385699c6"
|
|
35
35
|
}
|
package/src/CardDrawers.js
CHANGED
|
@@ -66,6 +66,7 @@ class CardDrawers extends React.Component {
|
|
|
66
66
|
drawerComponent,
|
|
67
67
|
onClick,
|
|
68
68
|
href,
|
|
69
|
+
ariaLabel,
|
|
69
70
|
...rest
|
|
70
71
|
}) => {
|
|
71
72
|
// The component used for the drawer can be overridden
|
|
@@ -93,6 +94,7 @@ class CardDrawers extends React.Component {
|
|
|
93
94
|
onClick={() => this.handleLinkClick(drawerId)}
|
|
94
95
|
ariaControls={drawerId}
|
|
95
96
|
ariaExpanded={isActive}
|
|
97
|
+
ariaLabel={ariaLabel}
|
|
96
98
|
>
|
|
97
99
|
{name}
|
|
98
100
|
</CardToolbarDrawerTrigger>
|
|
@@ -15,7 +15,14 @@ class CardToolbarDrawerTrigger extends React.Component {
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
render() {
|
|
18
|
-
const {
|
|
18
|
+
const {
|
|
19
|
+
id,
|
|
20
|
+
children,
|
|
21
|
+
isActive,
|
|
22
|
+
ariaControls,
|
|
23
|
+
ariaExpanded,
|
|
24
|
+
ariaLabel
|
|
25
|
+
} = this.props;
|
|
19
26
|
|
|
20
27
|
return (
|
|
21
28
|
<TextButton
|
|
@@ -27,6 +34,7 @@ class CardToolbarDrawerTrigger extends React.Component {
|
|
|
27
34
|
fontSize={3}
|
|
28
35
|
aria-controls={ariaControls}
|
|
29
36
|
aria-expanded={ariaExpanded}
|
|
37
|
+
aria-label={ariaLabel}
|
|
30
38
|
>
|
|
31
39
|
{children}
|
|
32
40
|
<ArrowSwivel isActive={isActive} duration={50} />
|
|
@@ -41,7 +49,8 @@ CardToolbarDrawerTrigger.propTypes = {
|
|
|
41
49
|
id: PropTypes.string.isRequired,
|
|
42
50
|
children: PropTypes.node,
|
|
43
51
|
ariaControls: PropTypes.string.isRequired,
|
|
44
|
-
ariaExpanded: PropTypes.bool.isRequired
|
|
52
|
+
ariaExpanded: PropTypes.bool.isRequired,
|
|
53
|
+
ariaLabel: PropTypes.string
|
|
45
54
|
};
|
|
46
55
|
|
|
47
56
|
CardToolbarDrawerTrigger.defaultProps = {
|