carbon-addons-iot-react 2.149.0-next.44 → 2.149.0-next.45

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,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.149.0-next.45](https://github.com/carbon-design-system/carbon-addons-iot-react/compare/v2.149.0-next.44...v2.149.0-next.45) (2022-04-04)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **card:** accessibility violation in card header tooltip ([475e9f6](https://github.com/carbon-design-system/carbon-addons-iot-react/commit/475e9f6b097e64b9580b8a879d20c3fdae71287a)), closes [#3395](https://github.com/carbon-design-system/carbon-addons-iot-react/issues/3395)
12
+
13
+
14
+
15
+
16
+
6
17
  # [2.149.0-next.44](https://github.com/carbon-design-system/carbon-addons-iot-react/compare/v2.149.0-next.43...v2.149.0-next.44) (2022-03-31)
7
18
 
8
19
 
@@ -235,7 +235,8 @@ var defaultProps = {
235
235
  expandLabel: 'Expand to fullscreen',
236
236
  overflowMenuDescription: 'Open and close list of options',
237
237
  toLabel: 'to',
238
- extraActionLabel: 'Action Label'
238
+ extraActionLabel: 'Action Label',
239
+ titleTooltipIconDescription: 'Tooltip info icon'
239
240
  },
240
241
  onMouseDown: undefined,
241
242
  onMouseUp: undefined,
@@ -445,6 +446,8 @@ var Card = function Card(props) {
445
446
  title: title,
446
447
  titleTextTooltip: titleTextTooltip,
447
448
  infoIconTooltip: tooltip,
449
+ titleTooltipIconDescription: strings.titleTooltipIconDescription // To fix accessibility violation.
450
+ ,
448
451
  testId: "".concat(testID || testId)
449
452
  }), cardToolbar), /*#__PURE__*/React__default.createElement(CardContent // TODO: remove deprecated testID prop in v3
450
453
  , {
@@ -637,7 +640,7 @@ Card.__docgenInfo = {
637
640
  },
638
641
  "i18n": {
639
642
  "defaultValue": {
640
- "value": "{\n noDataLabel: 'No data is available for this time range.',\n noDataShortLabel: 'No data',\n errorLoadingDataLabel: 'Error loading data for this card: ',\n errorLoadingDataShortLabel: 'Data error.',\n timeRangeLabel: 'Time range',\n rollingPeriodLabel: 'Rolling period',\n defaultLabel: 'Default',\n last24HoursLabel: 'Last 24 hrs',\n last7DaysLabel: 'Last 7 days',\n lastMonthLabel: 'Last month',\n lastQuarterLabel: 'Last quarter',\n lastYearLabel: 'Last year',\n periodToDateLabel: 'Period to date',\n thisWeekLabel: 'This week',\n thisMonthLabel: 'This month',\n thisQuarterLabel: 'This quarter',\n thisYearLabel: 'This year',\n selectTimeRangeLabel: 'Select time range',\n hourlyLabel: 'Hourly',\n dailyLabel: 'Daily',\n weeklyLabel: 'Weekly',\n monthlyLabel: 'Monthly',\n editCardLabel: 'Edit card',\n cloneCardLabel: 'Clone card',\n deleteCardLabel: 'Delete card',\n closeLabel: 'Close',\n expandLabel: 'Expand to fullscreen',\n overflowMenuDescription: 'Open and close list of options',\n toLabel: 'to',\n extraActionLabel: 'Action Label',\n}",
643
+ "value": "{\n noDataLabel: 'No data is available for this time range.',\n noDataShortLabel: 'No data',\n errorLoadingDataLabel: 'Error loading data for this card: ',\n errorLoadingDataShortLabel: 'Data error.',\n timeRangeLabel: 'Time range',\n rollingPeriodLabel: 'Rolling period',\n defaultLabel: 'Default',\n last24HoursLabel: 'Last 24 hrs',\n last7DaysLabel: 'Last 7 days',\n lastMonthLabel: 'Last month',\n lastQuarterLabel: 'Last quarter',\n lastYearLabel: 'Last year',\n periodToDateLabel: 'Period to date',\n thisWeekLabel: 'This week',\n thisMonthLabel: 'This month',\n thisQuarterLabel: 'This quarter',\n thisYearLabel: 'This year',\n selectTimeRangeLabel: 'Select time range',\n hourlyLabel: 'Hourly',\n dailyLabel: 'Daily',\n weeklyLabel: 'Weekly',\n monthlyLabel: 'Monthly',\n editCardLabel: 'Edit card',\n cloneCardLabel: 'Clone card',\n deleteCardLabel: 'Delete card',\n closeLabel: 'Close',\n expandLabel: 'Expand to fullscreen',\n overflowMenuDescription: 'Open and close list of options',\n toLabel: 'to',\n extraActionLabel: 'Action Label',\n titleTooltipIconDescription: 'Tooltip info icon',\n}",
641
644
  "computed": false
642
645
  },
643
646
  "required": false
@@ -23,7 +23,8 @@ var propTypes = {
23
23
  /** Adds tooltip to the title (no info icon) that when clicked shows a tooltip with this content.
24
24
  * Cannot be used together with the tooltip prop or the or the hasTitleWrap prop.
25
25
  */
26
- titleTextTooltip: PropTypes.element
26
+ titleTextTooltip: PropTypes.element,
27
+ titleTooltipIconDescription: PropTypes.string.isRequired
27
28
  };
28
29
  var defaultProps = {
29
30
  infoIconTooltip: undefined,
@@ -39,7 +40,8 @@ var CardTitle = function CardTitle(_ref // eslint-disable-line react/prop-types
39
40
  subtitle = _ref.subtitle,
40
41
  testId = _ref.testId,
41
42
  title = _ref.title,
42
- titleTextTooltip = _ref.titleTextTooltip;
43
+ titleTextTooltip = _ref.titleTextTooltip,
44
+ titleTooltipIconDescription = _ref.titleTooltipIconDescription;
43
45
  var titleRef = useRef();
44
46
  var subTitleRef = useRef();
45
47
  var truncatesTitle = useHasTextOverflow(titleRef, title);
@@ -96,7 +98,8 @@ var CardTitle = function CardTitle(_ref // eslint-disable-line react/prop-types
96
98
  triggerClassName: "".concat(iotPrefix, "--card--header--tooltip"),
97
99
  id: "card-tooltip-".concat(id) // https://github.com/carbon-design-system/carbon/pull/6744
98
100
  ,
99
- triggerText: ""
101
+ triggerText: "",
102
+ iconDescription: titleTooltipIconDescription
100
103
  }, infoIconTooltip), renderSubTitle());
101
104
  };
102
105
  CardTitle.propTypes = propTypes;
@@ -170,6 +173,13 @@ CardTitle.__docgenInfo = {
170
173
  },
171
174
  "required": true,
172
175
  "description": ""
176
+ },
177
+ "titleTooltipIconDescription": {
178
+ "type": {
179
+ "name": "string"
180
+ },
181
+ "required": true,
182
+ "description": ""
173
183
  }
174
184
  }
175
185
  };
@@ -753,7 +753,8 @@ var CardPropTypes = {
753
753
  closeLabel: PropTypes.string,
754
754
  loadingDataLabel: PropTypes.string,
755
755
  overflowMenuDescription: PropTypes.string,
756
- toLabel: PropTypes.string
756
+ toLabel: PropTypes.string,
757
+ titleTooltipIconDescription: PropTypes.string
757
758
  }),
758
759
 
759
760
  /** Adds an info icon after the title that when clicked shows a tooltip with this content.
@@ -250,7 +250,8 @@ var defaultProps = {
250
250
  expandLabel: 'Expand to fullscreen',
251
251
  overflowMenuDescription: 'Open and close list of options',
252
252
  toLabel: 'to',
253
- extraActionLabel: 'Action Label'
253
+ extraActionLabel: 'Action Label',
254
+ titleTooltipIconDescription: 'Tooltip info icon'
254
255
  },
255
256
  onMouseDown: undefined,
256
257
  onMouseUp: undefined,
@@ -460,6 +461,8 @@ var Card = function Card(props) {
460
461
  title: title,
461
462
  titleTextTooltip: titleTextTooltip,
462
463
  infoIconTooltip: tooltip,
464
+ titleTooltipIconDescription: strings.titleTooltipIconDescription // To fix accessibility violation.
465
+ ,
463
466
  testId: "".concat(testID || testId)
464
467
  }), cardToolbar), /*#__PURE__*/React__default['default'].createElement(CardContent // TODO: remove deprecated testID prop in v3
465
468
  , {
@@ -652,7 +655,7 @@ Card.__docgenInfo = {
652
655
  },
653
656
  "i18n": {
654
657
  "defaultValue": {
655
- "value": "{\n noDataLabel: 'No data is available for this time range.',\n noDataShortLabel: 'No data',\n errorLoadingDataLabel: 'Error loading data for this card: ',\n errorLoadingDataShortLabel: 'Data error.',\n timeRangeLabel: 'Time range',\n rollingPeriodLabel: 'Rolling period',\n defaultLabel: 'Default',\n last24HoursLabel: 'Last 24 hrs',\n last7DaysLabel: 'Last 7 days',\n lastMonthLabel: 'Last month',\n lastQuarterLabel: 'Last quarter',\n lastYearLabel: 'Last year',\n periodToDateLabel: 'Period to date',\n thisWeekLabel: 'This week',\n thisMonthLabel: 'This month',\n thisQuarterLabel: 'This quarter',\n thisYearLabel: 'This year',\n selectTimeRangeLabel: 'Select time range',\n hourlyLabel: 'Hourly',\n dailyLabel: 'Daily',\n weeklyLabel: 'Weekly',\n monthlyLabel: 'Monthly',\n editCardLabel: 'Edit card',\n cloneCardLabel: 'Clone card',\n deleteCardLabel: 'Delete card',\n closeLabel: 'Close',\n expandLabel: 'Expand to fullscreen',\n overflowMenuDescription: 'Open and close list of options',\n toLabel: 'to',\n extraActionLabel: 'Action Label',\n}",
658
+ "value": "{\n noDataLabel: 'No data is available for this time range.',\n noDataShortLabel: 'No data',\n errorLoadingDataLabel: 'Error loading data for this card: ',\n errorLoadingDataShortLabel: 'Data error.',\n timeRangeLabel: 'Time range',\n rollingPeriodLabel: 'Rolling period',\n defaultLabel: 'Default',\n last24HoursLabel: 'Last 24 hrs',\n last7DaysLabel: 'Last 7 days',\n lastMonthLabel: 'Last month',\n lastQuarterLabel: 'Last quarter',\n lastYearLabel: 'Last year',\n periodToDateLabel: 'Period to date',\n thisWeekLabel: 'This week',\n thisMonthLabel: 'This month',\n thisQuarterLabel: 'This quarter',\n thisYearLabel: 'This year',\n selectTimeRangeLabel: 'Select time range',\n hourlyLabel: 'Hourly',\n dailyLabel: 'Daily',\n weeklyLabel: 'Weekly',\n monthlyLabel: 'Monthly',\n editCardLabel: 'Edit card',\n cloneCardLabel: 'Clone card',\n deleteCardLabel: 'Delete card',\n closeLabel: 'Close',\n expandLabel: 'Expand to fullscreen',\n overflowMenuDescription: 'Open and close list of options',\n toLabel: 'to',\n extraActionLabel: 'Action Label',\n titleTooltipIconDescription: 'Tooltip info icon',\n}",
656
659
  "computed": false
657
660
  },
658
661
  "required": false
@@ -34,7 +34,8 @@ var propTypes = {
34
34
  /** Adds tooltip to the title (no info icon) that when clicked shows a tooltip with this content.
35
35
  * Cannot be used together with the tooltip prop or the or the hasTitleWrap prop.
36
36
  */
37
- titleTextTooltip: PropTypes__default['default'].element
37
+ titleTextTooltip: PropTypes__default['default'].element,
38
+ titleTooltipIconDescription: PropTypes__default['default'].string.isRequired
38
39
  };
39
40
  var defaultProps = {
40
41
  infoIconTooltip: undefined,
@@ -50,7 +51,8 @@ var CardTitle = function CardTitle(_ref // eslint-disable-line react/prop-types
50
51
  subtitle = _ref.subtitle,
51
52
  testId = _ref.testId,
52
53
  title = _ref.title,
53
- titleTextTooltip = _ref.titleTextTooltip;
54
+ titleTextTooltip = _ref.titleTextTooltip,
55
+ titleTooltipIconDescription = _ref.titleTooltipIconDescription;
54
56
  var titleRef = React.useRef();
55
57
  var subTitleRef = React.useRef();
56
58
  var truncatesTitle = useHasTextOverflow(titleRef, title);
@@ -107,7 +109,8 @@ var CardTitle = function CardTitle(_ref // eslint-disable-line react/prop-types
107
109
  triggerClassName: "".concat(iotPrefix, "--card--header--tooltip"),
108
110
  id: "card-tooltip-".concat(id) // https://github.com/carbon-design-system/carbon/pull/6744
109
111
  ,
110
- triggerText: ""
112
+ triggerText: "",
113
+ iconDescription: titleTooltipIconDescription
111
114
  }, infoIconTooltip), renderSubTitle());
112
115
  };
113
116
  CardTitle.propTypes = propTypes;
@@ -181,6 +184,13 @@ CardTitle.__docgenInfo = {
181
184
  },
182
185
  "required": true,
183
186
  "description": ""
187
+ },
188
+ "titleTooltipIconDescription": {
189
+ "type": {
190
+ "name": "string"
191
+ },
192
+ "required": true,
193
+ "description": ""
184
194
  }
185
195
  }
186
196
  };
@@ -762,7 +762,8 @@ var CardPropTypes = {
762
762
  closeLabel: PropTypes__default['default'].string,
763
763
  loadingDataLabel: PropTypes__default['default'].string,
764
764
  overflowMenuDescription: PropTypes__default['default'].string,
765
- toLabel: PropTypes__default['default'].string
765
+ toLabel: PropTypes__default['default'].string,
766
+ titleTooltipIconDescription: PropTypes__default['default'].string
766
767
  }),
767
768
 
768
769
  /** Adds an info icon after the title that when clicked shows a tooltip with this content.
package/package.json CHANGED
@@ -340,10 +340,10 @@
340
340
  "whatwg-fetch": "^3.0.0"
341
341
  },
342
342
  "sideEffects": false,
343
- "version": "2.149.0-next.44",
343
+ "version": "2.149.0-next.45",
344
344
  "resolutions": {
345
345
  "chokidar": "3.3.1",
346
346
  "react-grid-layout": "1.2.2"
347
347
  },
348
- "gitHead": "3c9e91926acdb193a42ff4883747fc67b38d1013"
348
+ "gitHead": "756238a81745c1e43182efd8869919433fe963ab"
349
349
  }
@@ -103251,7 +103251,8 @@
103251
103251
  closeLabel: PropTypes__default['default'].string,
103252
103252
  loadingDataLabel: PropTypes__default['default'].string,
103253
103253
  overflowMenuDescription: PropTypes__default['default'].string,
103254
- toLabel: PropTypes__default['default'].string
103254
+ toLabel: PropTypes__default['default'].string,
103255
+ titleTooltipIconDescription: PropTypes__default['default'].string
103255
103256
  }),
103256
103257
 
103257
103258
  /** Adds an info icon after the title that when clicked shows a tooltip with this content.
@@ -106356,7 +106357,8 @@
106356
106357
  /** Adds tooltip to the title (no info icon) that when clicked shows a tooltip with this content.
106357
106358
  * Cannot be used together with the tooltip prop or the or the hasTitleWrap prop.
106358
106359
  */
106359
- titleTextTooltip: PropTypes__default['default'].element
106360
+ titleTextTooltip: PropTypes__default['default'].element,
106361
+ titleTooltipIconDescription: PropTypes__default['default'].string.isRequired
106360
106362
  };
106361
106363
  var defaultProps$1E = {
106362
106364
  infoIconTooltip: undefined,
@@ -106372,7 +106374,8 @@
106372
106374
  subtitle = _ref.subtitle,
106373
106375
  testId = _ref.testId,
106374
106376
  title = _ref.title,
106375
- titleTextTooltip = _ref.titleTextTooltip;
106377
+ titleTextTooltip = _ref.titleTextTooltip,
106378
+ titleTooltipIconDescription = _ref.titleTooltipIconDescription;
106376
106379
  var titleRef = React$1.useRef();
106377
106380
  var subTitleRef = React$1.useRef();
106378
106381
  var truncatesTitle = useHasTextOverflow(titleRef, title);
@@ -106429,7 +106432,8 @@
106429
106432
  triggerClassName: "".concat(iotPrefix$1h, "--card--header--tooltip"),
106430
106433
  id: "card-tooltip-".concat(id) // https://github.com/carbon-design-system/carbon/pull/6744
106431
106434
  ,
106432
- triggerText: ""
106435
+ triggerText: "",
106436
+ iconDescription: titleTooltipIconDescription
106433
106437
  }, infoIconTooltip), renderSubTitle());
106434
106438
  };
106435
106439
  CardTitle.propTypes = propTypes$1x;
@@ -106503,6 +106507,13 @@
106503
106507
  },
106504
106508
  "required": true,
106505
106509
  "description": ""
106510
+ },
106511
+ "titleTooltipIconDescription": {
106512
+ "type": {
106513
+ "name": "string"
106514
+ },
106515
+ "required": true,
106516
+ "description": ""
106506
106517
  }
106507
106518
  }
106508
106519
  };
@@ -106710,7 +106721,8 @@
106710
106721
  expandLabel: 'Expand to fullscreen',
106711
106722
  overflowMenuDescription: 'Open and close list of options',
106712
106723
  toLabel: 'to',
106713
- extraActionLabel: 'Action Label'
106724
+ extraActionLabel: 'Action Label',
106725
+ titleTooltipIconDescription: 'Tooltip info icon'
106714
106726
  },
106715
106727
  onMouseDown: undefined,
106716
106728
  onMouseUp: undefined,
@@ -106920,6 +106932,8 @@
106920
106932
  title: title,
106921
106933
  titleTextTooltip: titleTextTooltip,
106922
106934
  infoIconTooltip: tooltip,
106935
+ titleTooltipIconDescription: strings.titleTooltipIconDescription // To fix accessibility violation.
106936
+ ,
106923
106937
  testId: "".concat(testID || testId)
106924
106938
  }), cardToolbar), /*#__PURE__*/React__default['default'].createElement(CardContent // TODO: remove deprecated testID prop in v3
106925
106939
  , {
@@ -107112,7 +107126,7 @@
107112
107126
  },
107113
107127
  "i18n": {
107114
107128
  "defaultValue": {
107115
- "value": "{\n noDataLabel: 'No data is available for this time range.',\n noDataShortLabel: 'No data',\n errorLoadingDataLabel: 'Error loading data for this card: ',\n errorLoadingDataShortLabel: 'Data error.',\n timeRangeLabel: 'Time range',\n rollingPeriodLabel: 'Rolling period',\n defaultLabel: 'Default',\n last24HoursLabel: 'Last 24 hrs',\n last7DaysLabel: 'Last 7 days',\n lastMonthLabel: 'Last month',\n lastQuarterLabel: 'Last quarter',\n lastYearLabel: 'Last year',\n periodToDateLabel: 'Period to date',\n thisWeekLabel: 'This week',\n thisMonthLabel: 'This month',\n thisQuarterLabel: 'This quarter',\n thisYearLabel: 'This year',\n selectTimeRangeLabel: 'Select time range',\n hourlyLabel: 'Hourly',\n dailyLabel: 'Daily',\n weeklyLabel: 'Weekly',\n monthlyLabel: 'Monthly',\n editCardLabel: 'Edit card',\n cloneCardLabel: 'Clone card',\n deleteCardLabel: 'Delete card',\n closeLabel: 'Close',\n expandLabel: 'Expand to fullscreen',\n overflowMenuDescription: 'Open and close list of options',\n toLabel: 'to',\n extraActionLabel: 'Action Label',\n}",
107129
+ "value": "{\n noDataLabel: 'No data is available for this time range.',\n noDataShortLabel: 'No data',\n errorLoadingDataLabel: 'Error loading data for this card: ',\n errorLoadingDataShortLabel: 'Data error.',\n timeRangeLabel: 'Time range',\n rollingPeriodLabel: 'Rolling period',\n defaultLabel: 'Default',\n last24HoursLabel: 'Last 24 hrs',\n last7DaysLabel: 'Last 7 days',\n lastMonthLabel: 'Last month',\n lastQuarterLabel: 'Last quarter',\n lastYearLabel: 'Last year',\n periodToDateLabel: 'Period to date',\n thisWeekLabel: 'This week',\n thisMonthLabel: 'This month',\n thisQuarterLabel: 'This quarter',\n thisYearLabel: 'This year',\n selectTimeRangeLabel: 'Select time range',\n hourlyLabel: 'Hourly',\n dailyLabel: 'Daily',\n weeklyLabel: 'Weekly',\n monthlyLabel: 'Monthly',\n editCardLabel: 'Edit card',\n cloneCardLabel: 'Clone card',\n deleteCardLabel: 'Delete card',\n closeLabel: 'Close',\n expandLabel: 'Expand to fullscreen',\n overflowMenuDescription: 'Open and close list of options',\n toLabel: 'to',\n extraActionLabel: 'Action Label',\n titleTooltipIconDescription: 'Tooltip info icon',\n}",
107116
107130
  "computed": false
107117
107131
  },
107118
107132
  "required": false