@sis-cc/dotstatsuite-visions 7.4.0 → 7.4.1

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.
@@ -33,6 +33,7 @@ var Item = function Item(_ref) {
33
33
  var classes = _ref.classes,
34
34
  id = _ref.id,
35
35
  label = _ref.label,
36
+ description = _ref.description,
36
37
  _ref$nodePath = _ref.nodePath,
37
38
  nodePath = _ref$nodePath === undefined ? [] : _ref$nodePath,
38
39
  isSelected = _ref.isSelected,
@@ -103,14 +104,24 @@ var Item = function Item(_ref) {
103
104
  React.createElement('path', { d: svgPath })
104
105
  ),
105
106
  React.createElement(
106
- Typography,
107
+ Tooltip,
107
108
  {
108
- 'data-testid': testId + '_value_' + id,
109
- color: 'inherit',
110
- variant: 'body2',
111
- className: cx(classes.label, (_cx6 = {}, _cx6[classes.disabledLabel] = isDisabled, _cx6))
109
+ title: R.isNil(description) ? '' : description,
110
+ tabIndex: 0,
111
+ 'aria-label': description,
112
+ 'aria-hidden': false,
113
+ placement: 'top'
112
114
  },
113
- label
115
+ React.createElement(
116
+ Typography,
117
+ {
118
+ 'data-testid': testId + '_value_' + id,
119
+ color: 'inherit',
120
+ variant: 'body2',
121
+ className: cx(classes.label, (_cx6 = {}, _cx6[classes.disabledLabel] = isDisabled, _cx6[classes.tooltipNotice] = !R.isNil(description), _cx6))
122
+ },
123
+ label
124
+ )
114
125
  ),
115
126
  R.not(R.isNil(count)) && React.createElement(
116
127
  Typography,
@@ -181,6 +192,7 @@ Item.propTypes = process.env.NODE_ENV !== "production" ? {
181
192
  classes: PropTypes.object,
182
193
  id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
183
194
  label: PropTypes.string,
195
+ description: PropTypes.string,
184
196
  parentId: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
185
197
  nodePath: PropTypes.array,
186
198
  ariaLabel: PropTypes.string,
@@ -143,6 +143,9 @@ export var useStyles = makeStyles(function (theme) {
143
143
  },
144
144
  bulkSelectionIcon: {
145
145
  minWidth: 50
146
+ },
147
+ tooltipNotice: {
148
+ textDecoration: 'underline dotted'
146
149
  }
147
150
  };
148
151
  });
@@ -71,6 +71,7 @@ var Item = function Item(_ref) {
71
71
  var classes = _ref.classes,
72
72
  id = _ref.id,
73
73
  label = _ref.label,
74
+ description = _ref.description,
74
75
  _ref$nodePath = _ref.nodePath,
75
76
  nodePath = _ref$nodePath === undefined ? [] : _ref$nodePath,
76
77
  isSelected = _ref.isSelected,
@@ -141,14 +142,24 @@ var Item = function Item(_ref) {
141
142
  _react2.default.createElement('path', { d: svgPath })
142
143
  ),
143
144
  _react2.default.createElement(
144
- _Typography2.default,
145
+ _.Tooltip,
145
146
  {
146
- 'data-testid': testId + '_value_' + id,
147
- color: 'inherit',
148
- variant: 'body2',
149
- className: (0, _classnames2.default)(classes.label, (_cx6 = {}, _cx6[classes.disabledLabel] = isDisabled, _cx6))
147
+ title: R.isNil(description) ? '' : description,
148
+ tabIndex: 0,
149
+ 'aria-label': description,
150
+ 'aria-hidden': false,
151
+ placement: 'top'
150
152
  },
151
- label
153
+ _react2.default.createElement(
154
+ _Typography2.default,
155
+ {
156
+ 'data-testid': testId + '_value_' + id,
157
+ color: 'inherit',
158
+ variant: 'body2',
159
+ className: (0, _classnames2.default)(classes.label, (_cx6 = {}, _cx6[classes.disabledLabel] = isDisabled, _cx6[classes.tooltipNotice] = !R.isNil(description), _cx6))
160
+ },
161
+ label
162
+ )
152
163
  ),
153
164
  R.not(R.isNil(count)) && _react2.default.createElement(
154
165
  _Typography2.default,
@@ -219,6 +230,7 @@ Item.propTypes = process.env.NODE_ENV !== "production" ? {
219
230
  classes: _propTypes2.default.object,
220
231
  id: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.number]),
221
232
  label: _propTypes2.default.string,
233
+ description: _propTypes2.default.string,
222
234
  parentId: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.number]),
223
235
  nodePath: _propTypes2.default.array,
224
236
  ariaLabel: _propTypes2.default.string,
@@ -149,6 +149,9 @@ var useStyles = exports.useStyles = (0, _styles.makeStyles)(function (theme) {
149
149
  },
150
150
  bulkSelectionIcon: {
151
151
  minWidth: 50
152
+ },
153
+ tooltipNotice: {
154
+ textDecoration: 'underline dotted'
152
155
  }
153
156
  };
154
157
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sis-cc/dotstatsuite-visions",
3
- "version": "7.4.0",
3
+ "version": "7.4.1",
4
4
  "description": "Library of visual components",
5
5
  "author": "OECD",
6
6
  "homepage": "https://visions-qa.siscc.org/#o",