@cloudflare/component-tooltip 2.7.127 → 2.7.128

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
+ ## [2.7.128](http://stash.cfops.it:7999/fe/stratus/compare/@cloudflare/component-tooltip@2.7.127...@cloudflare/component-tooltip@2.7.128) (2022-03-18)
7
+
8
+ **Note:** Version bump only for package @cloudflare/component-tooltip
9
+
10
+
11
+
12
+
13
+
6
14
  ## [2.7.127](http://stash.cfops.it:7999/fe/stratus/compare/@cloudflare/component-tooltip@2.7.126...@cloudflare/component-tooltip@2.7.127) (2022-03-16)
7
15
 
8
16
  **Note:** Version bump only for package @cloudflare/component-tooltip
package/es/Tooltip.js CHANGED
@@ -101,7 +101,8 @@ class Tooltip extends React.PureComponent {
101
101
  type = _this$props.type,
102
102
  anchored = _this$props.anchored,
103
103
  isCapture = _this$props.isCapture,
104
- display = _this$props.display;
104
+ display = _this$props.display,
105
+ ariaLabel = _this$props.ariaLabel;
105
106
  const id = this.props.id ? this.props.id : this.id;
106
107
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ReactTooltip, {
107
108
  id: id,
@@ -136,7 +137,8 @@ class Tooltip extends React.PureComponent {
136
137
  },
137
138
  onMouseOver: () => ReactTooltip.show(this.tooltipElement),
138
139
  onMouseOut: () => ReactTooltip.hide(this.tooltipElement),
139
- "aria-controls": id
140
+ "aria-controls": id,
141
+ "aria-label": ariaLabel
140
142
  }, children));
141
143
  }
142
144
 
@@ -158,7 +160,8 @@ Tooltip.propTypes = {
158
160
  getContent: PropTypes.func,
159
161
  forceRebuild: PropTypes.bool,
160
162
  onClick: PropTypes.func,
161
- display: PropTypes.string
163
+ display: PropTypes.string,
164
+ ariaLabel: PropTypes.string
162
165
  };
163
166
  Tooltip.defaultProps = {
164
167
  disable: false,
package/index.d.ts CHANGED
@@ -15,6 +15,7 @@ interface TooltipProps extends React.CSSProperties, TfelaMProps {
15
15
  getContent?: (...args: any[]) => void;
16
16
  forceRebuild?: boolean;
17
17
  onClick?: (...args: any[]) => void;
18
+ ariaLabel?: string;
18
19
  }
19
20
 
20
21
  export const Tooltip: React.FC<TooltipProps>;
package/lib/Tooltip.js CHANGED
@@ -156,7 +156,8 @@ var Tooltip = /*#__PURE__*/function (_React$PureComponent) {
156
156
  type = _this$props.type,
157
157
  anchored = _this$props.anchored,
158
158
  isCapture = _this$props.isCapture,
159
- display = _this$props.display;
159
+ display = _this$props.display,
160
+ ariaLabel = _this$props.ariaLabel;
160
161
  var id = this.props.id ? this.props.id : this.id;
161
162
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactTooltip.default, {
162
163
  id: id,
@@ -201,7 +202,8 @@ var Tooltip = /*#__PURE__*/function (_React$PureComponent) {
201
202
  onMouseOut: function onMouseOut() {
202
203
  return _reactTooltip.default.hide(_this3.tooltipElement);
203
204
  },
204
- "aria-controls": id
205
+ "aria-controls": id,
206
+ "aria-label": ariaLabel
205
207
  }, children));
206
208
  }
207
209
  }]);
@@ -225,7 +227,8 @@ Tooltip.propTypes = {
225
227
  getContent: _propTypes.default.func,
226
228
  forceRebuild: _propTypes.default.bool,
227
229
  onClick: _propTypes.default.func,
228
- display: _propTypes.default.string
230
+ display: _propTypes.default.string,
231
+ ariaLabel: _propTypes.default.string
229
232
  };
230
233
  Tooltip.defaultProps = {
231
234
  disable: false,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudflare/component-tooltip",
3
3
  "description": "Cloudflare Tooltip Component",
4
- "version": "2.7.127",
4
+ "version": "2.7.128",
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": "698f4aeafa1c656214a4060be27aa6b194d82b10"
34
+ "gitHead": "a8c84ce9c72d72db671eaf6221497af6533e727f"
35
35
  }