carbon-addons-iot-react 5.9.0 → 5.9.2
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/es/components/Table/TableBody/TableBodyRow/TableBodyRow.js +5 -5
- package/es/components/TearSheet/TearSheet.js +19 -4
- package/lib/components/Table/TableBody/TableBodyRow/TableBodyRow.js +5 -5
- package/lib/components/TearSheet/TearSheet.js +19 -4
- package/package.json +1 -1
- package/umd/carbon-addons-iot-react.js +24 -9
|
@@ -388,7 +388,7 @@ var TableBodyRow = function TableBodyRow(_ref) {
|
|
|
388
388
|
key: id
|
|
389
389
|
}, /*#__PURE__*/React__default.createElement(TableExpandRow, _extends({
|
|
390
390
|
expandHeaderId: "".concat(tableId, "-expand"),
|
|
391
|
-
className: classnames("".concat(iotPrefix, "--expandable-tablerow--expanded"), _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(iotPrefix, "--expandable-tablerow--indented"), parseInt(nestingOffset, 10) > 0), "".concat(iotPrefix, "--expandable-tablerow--childless"), hasRowNesting && nestingChildCount === 0), "".concat(iotPrefix, "--table__row--dragging"), isDragRow), "".concat(iotPrefix, "--table__row--softdeleted"), values === null || values === void 0 ? void 0 : values[deletedAttribute])),
|
|
391
|
+
className: classnames("".concat(iotPrefix, "--expandable-tablerow--expanded"), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(iotPrefix, "--expandable-tablerow--indented"), parseInt(nestingOffset, 10) > 0), "".concat(iotPrefix, "--expandable-tablerow--childless"), hasRowNesting && nestingChildCount === 0), "".concat(iotPrefix, "--table__row--dragging"), isDragRow), "".concat(iotPrefix, "--table__row--softdeleted"), values === null || values === void 0 ? void 0 : values[deletedAttribute]), "".concat(iotPrefix, "--table__row--updated"), values === null || values === void 0 ? void 0 : values._updated)),
|
|
392
392
|
ariaLabel: clickToCollapseAria,
|
|
393
393
|
expandIconDescription: clickToCollapseAria,
|
|
394
394
|
isExpanded: true,
|
|
@@ -416,13 +416,13 @@ var TableBodyRow = function TableBodyRow(_ref) {
|
|
|
416
416
|
rowId: id,
|
|
417
417
|
langDir: langDir
|
|
418
418
|
}, dragEnterLeaveHandlers), tableCells), !hasRowNesting && /*#__PURE__*/React__default.createElement(TableRow, _extends({
|
|
419
|
-
className: classnames("".concat(iotPrefix, "--expanded-tablerow"), _defineProperty(_defineProperty(_defineProperty({}, "".concat(iotPrefix, "--expanded-tablerow--singly-selected"), hasRowSelection === 'single' && isSelected && !useRadioButtonSingleSelect), "".concat(iotPrefix, "--table__row--dragging"), isDragRow), "".concat(iotPrefix, "--table__row--softdeleted"), values === null || values === void 0 ? void 0 : values[deletedAttribute]))
|
|
419
|
+
className: classnames("".concat(iotPrefix, "--expanded-tablerow"), _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(iotPrefix, "--expanded-tablerow--singly-selected"), hasRowSelection === 'single' && isSelected && !useRadioButtonSingleSelect), "".concat(iotPrefix, "--table__row--dragging"), isDragRow), "".concat(iotPrefix, "--table__row--softdeleted"), values === null || values === void 0 ? void 0 : values[deletedAttribute]), "".concat(iotPrefix, "--table__row--updated"), values === null || values === void 0 ? void 0 : values._updated))
|
|
420
420
|
}, dragEnterLeaveHandlers), /*#__PURE__*/React__default.createElement(TableCell, {
|
|
421
421
|
colSpan: totalColumns
|
|
422
422
|
}, rowDetails))) : /*#__PURE__*/React__default.createElement(TableExpandRow, _extends({
|
|
423
423
|
key: id,
|
|
424
424
|
expandHeaderId: "".concat(tableId, "-expand"),
|
|
425
|
-
className: classnames("".concat(iotPrefix, "--expandable-tablerow"), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(iotPrefix, "--expandable-tablerow--parent"), hasRowNesting && (hasRowNesting === null || hasRowNesting === void 0 ? void 0 : hasRowNesting.hasSingleNestedHierarchy) && nestingChildCount > 0), "".concat(iotPrefix, "--expandable-tablerow--childless"), hasRowNesting && nestingChildCount === 0), "".concat(iotPrefix, "--expandable-tablerow--indented"), parseInt(nestingOffset, 10) > 0), "".concat(iotPrefix, "--expandable-tablerow--singly-selected"), hasRowSelection === 'single' && isSelected && !useRadioButtonSingleSelect), "".concat(iotPrefix, "--expandable-tablerow--last-child"), isLastChild), "".concat(iotPrefix, "--table__row--dragging"), isDragRow), "".concat(iotPrefix, "--table__row--softdeleted"), values === null || values === void 0 ? void 0 : values[deletedAttribute])),
|
|
425
|
+
className: classnames("".concat(iotPrefix, "--expandable-tablerow"), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(iotPrefix, "--expandable-tablerow--parent"), hasRowNesting && (hasRowNesting === null || hasRowNesting === void 0 ? void 0 : hasRowNesting.hasSingleNestedHierarchy) && nestingChildCount > 0), "".concat(iotPrefix, "--expandable-tablerow--childless"), hasRowNesting && nestingChildCount === 0), "".concat(iotPrefix, "--expandable-tablerow--indented"), parseInt(nestingOffset, 10) > 0), "".concat(iotPrefix, "--expandable-tablerow--singly-selected"), hasRowSelection === 'single' && isSelected && !useRadioButtonSingleSelect), "".concat(iotPrefix, "--expandable-tablerow--last-child"), isLastChild), "".concat(iotPrefix, "--table__row--dragging"), isDragRow), "".concat(iotPrefix, "--table__row--softdeleted"), values === null || values === void 0 ? void 0 : values[deletedAttribute]), "".concat(iotPrefix, "--table__row--updated"), values === null || values === void 0 ? void 0 : values._updated)),
|
|
426
426
|
"data-row-nesting": hasRowNesting,
|
|
427
427
|
"data-child-count": nestingChildCount,
|
|
428
428
|
"data-nesting-offset": nestingOffset,
|
|
@@ -451,7 +451,7 @@ var TableBodyRow = function TableBodyRow(_ref) {
|
|
|
451
451
|
rowId: id,
|
|
452
452
|
langDir: langDir
|
|
453
453
|
}, dragEnterLeaveHandlers), tableCells) : hasRowSelection === 'single' && isSelected ? /*#__PURE__*/React__default.createElement(TableRow, _extends({
|
|
454
|
-
className: classnames("".concat(iotPrefix, "--table__row"), _defineProperty(_defineProperty(_defineProperty({}, "".concat(iotPrefix, "--table__row--singly-selected"), isSelected && !useRadioButtonSingleSelect), "".concat(iotPrefix, "--table__row--background"), isSelected), "".concat(iotPrefix, "--table__row--softdeleted"), values === null || values === void 0 ? void 0 : values[deletedAttribute])),
|
|
454
|
+
className: classnames("".concat(iotPrefix, "--table__row"), _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(iotPrefix, "--table__row--singly-selected"), isSelected && !useRadioButtonSingleSelect), "".concat(iotPrefix, "--table__row--background"), isSelected), "".concat(iotPrefix, "--table__row--softdeleted"), values === null || values === void 0 ? void 0 : values[deletedAttribute]), "".concat(iotPrefix, "--table__row--updated"), values === null || values === void 0 ? void 0 : values._updated)),
|
|
455
455
|
key: id,
|
|
456
456
|
onClick: function onClick() {
|
|
457
457
|
if (isSelectable !== false) {
|
|
@@ -462,7 +462,7 @@ var TableBodyRow = function TableBodyRow(_ref) {
|
|
|
462
462
|
}
|
|
463
463
|
}
|
|
464
464
|
}, dragEnterLeaveHandlers), tableCells) : /*#__PURE__*/React__default.createElement(TableRow, _extends({
|
|
465
|
-
className: classnames("".concat(iotPrefix, "--table__row"), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(iotPrefix, "--table__row--unselectable"), isSelectable === false), "".concat(iotPrefix, "--table__row--selectable"), isSelectable !== false), "".concat(iotPrefix, "--table__row--editing"), isEditMode), "".concat(iotPrefix, "--table__row--selected"), isSelected), "".concat(iotPrefix, "--table__row--dragging"), isDragRow), "".concat(iotPrefix, "--table__row--softdeleted"), values === null || values === void 0 ? void 0 : values[deletedAttribute])),
|
|
465
|
+
className: classnames("".concat(iotPrefix, "--table__row"), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(iotPrefix, "--table__row--unselectable"), isSelectable === false), "".concat(iotPrefix, "--table__row--selectable"), isSelectable !== false), "".concat(iotPrefix, "--table__row--editing"), isEditMode), "".concat(iotPrefix, "--table__row--selected"), isSelected), "".concat(iotPrefix, "--table__row--dragging"), isDragRow), "".concat(iotPrefix, "--table__row--softdeleted"), values === null || values === void 0 ? void 0 : values[deletedAttribute]), "".concat(iotPrefix, "--table__row--updated"), values === null || values === void 0 ? void 0 : values._updated)),
|
|
466
466
|
key: id,
|
|
467
467
|
onClick: function onClick() {
|
|
468
468
|
if (isSelectable !== false) {
|
|
@@ -39,7 +39,8 @@ var propTypes = {
|
|
|
39
39
|
}),
|
|
40
40
|
children: PropTypes.node,
|
|
41
41
|
testId: PropTypes.string,
|
|
42
|
-
shouldPreventClose: PropTypes.func
|
|
42
|
+
shouldPreventClose: PropTypes.func,
|
|
43
|
+
role: PropTypes.string
|
|
43
44
|
};
|
|
44
45
|
var defaultProps = {
|
|
45
46
|
idx: undefined,
|
|
@@ -61,7 +62,8 @@ var defaultProps = {
|
|
|
61
62
|
return new Promise(function (res) {
|
|
62
63
|
return res(false);
|
|
63
64
|
});
|
|
64
|
-
}
|
|
65
|
+
},
|
|
66
|
+
role: undefined
|
|
65
67
|
};
|
|
66
68
|
var TearSheet = function TearSheet(_ref) {
|
|
67
69
|
var idx = _ref.idx,
|
|
@@ -76,7 +78,8 @@ var TearSheet = function TearSheet(_ref) {
|
|
|
76
78
|
i18n = _ref.i18n,
|
|
77
79
|
children = _ref.children,
|
|
78
80
|
testId = _ref.testId,
|
|
79
|
-
shouldPreventClose = _ref.shouldPreventClose
|
|
81
|
+
shouldPreventClose = _ref.shouldPreventClose,
|
|
82
|
+
role = _ref.role;
|
|
80
83
|
var onCloseButton = useCallback(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
81
84
|
var preventClose;
|
|
82
85
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
@@ -101,7 +104,8 @@ var TearSheet = function TearSheet(_ref) {
|
|
|
101
104
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
102
105
|
// TODO: use only testId in v3.
|
|
103
106
|
"data-testid": testId || "".concat(iotPrefix, "--tear-sheet-").concat(idx),
|
|
104
|
-
className: classnames("".concat(iotPrefix, "--tear-sheet"), className)
|
|
107
|
+
className: classnames("".concat(iotPrefix, "--tear-sheet"), className),
|
|
108
|
+
role: role
|
|
105
109
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
106
110
|
className: classnames("".concat(iotPrefix, "--tear-sheet--header"), _defineProperty({}, "".concat(iotPrefix, "--tear-sheet--header__extraContent"), !!headerExtraContent))
|
|
107
111
|
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
@@ -284,6 +288,17 @@ TearSheet.__docgenInfo = {
|
|
|
284
288
|
"name": "func"
|
|
285
289
|
},
|
|
286
290
|
"required": false
|
|
291
|
+
},
|
|
292
|
+
"role": {
|
|
293
|
+
"defaultValue": {
|
|
294
|
+
"value": "undefined",
|
|
295
|
+
"computed": true
|
|
296
|
+
},
|
|
297
|
+
"description": "",
|
|
298
|
+
"type": {
|
|
299
|
+
"name": "string"
|
|
300
|
+
},
|
|
301
|
+
"required": false
|
|
287
302
|
}
|
|
288
303
|
}
|
|
289
304
|
};
|
|
@@ -398,7 +398,7 @@ var TableBodyRow = function TableBodyRow(_ref) {
|
|
|
398
398
|
key: id
|
|
399
399
|
}, /*#__PURE__*/React__default.default.createElement(TableExpandRow, _extends__default.default({
|
|
400
400
|
expandHeaderId: "".concat(tableId, "-expand"),
|
|
401
|
-
className: classnames__default.default("".concat(iotPrefix, "--expandable-tablerow--expanded"), _defineProperty__default.default(_defineProperty__default.default(_defineProperty__default.default(_defineProperty__default.default({}, "".concat(iotPrefix, "--expandable-tablerow--indented"), parseInt(nestingOffset, 10) > 0), "".concat(iotPrefix, "--expandable-tablerow--childless"), hasRowNesting && nestingChildCount === 0), "".concat(iotPrefix, "--table__row--dragging"), isDragRow), "".concat(iotPrefix, "--table__row--softdeleted"), values === null || values === void 0 ? void 0 : values[deletedAttribute])),
|
|
401
|
+
className: classnames__default.default("".concat(iotPrefix, "--expandable-tablerow--expanded"), _defineProperty__default.default(_defineProperty__default.default(_defineProperty__default.default(_defineProperty__default.default(_defineProperty__default.default({}, "".concat(iotPrefix, "--expandable-tablerow--indented"), parseInt(nestingOffset, 10) > 0), "".concat(iotPrefix, "--expandable-tablerow--childless"), hasRowNesting && nestingChildCount === 0), "".concat(iotPrefix, "--table__row--dragging"), isDragRow), "".concat(iotPrefix, "--table__row--softdeleted"), values === null || values === void 0 ? void 0 : values[deletedAttribute]), "".concat(iotPrefix, "--table__row--updated"), values === null || values === void 0 ? void 0 : values._updated)),
|
|
402
402
|
ariaLabel: clickToCollapseAria,
|
|
403
403
|
expandIconDescription: clickToCollapseAria,
|
|
404
404
|
isExpanded: true,
|
|
@@ -426,13 +426,13 @@ var TableBodyRow = function TableBodyRow(_ref) {
|
|
|
426
426
|
rowId: id,
|
|
427
427
|
langDir: langDir
|
|
428
428
|
}, dragEnterLeaveHandlers), tableCells), !hasRowNesting && /*#__PURE__*/React__default.default.createElement(react.TableRow, _extends__default.default({
|
|
429
|
-
className: classnames__default.default("".concat(iotPrefix, "--expanded-tablerow"), _defineProperty__default.default(_defineProperty__default.default(_defineProperty__default.default({}, "".concat(iotPrefix, "--expanded-tablerow--singly-selected"), hasRowSelection === 'single' && isSelected && !useRadioButtonSingleSelect), "".concat(iotPrefix, "--table__row--dragging"), isDragRow), "".concat(iotPrefix, "--table__row--softdeleted"), values === null || values === void 0 ? void 0 : values[deletedAttribute]))
|
|
429
|
+
className: classnames__default.default("".concat(iotPrefix, "--expanded-tablerow"), _defineProperty__default.default(_defineProperty__default.default(_defineProperty__default.default(_defineProperty__default.default({}, "".concat(iotPrefix, "--expanded-tablerow--singly-selected"), hasRowSelection === 'single' && isSelected && !useRadioButtonSingleSelect), "".concat(iotPrefix, "--table__row--dragging"), isDragRow), "".concat(iotPrefix, "--table__row--softdeleted"), values === null || values === void 0 ? void 0 : values[deletedAttribute]), "".concat(iotPrefix, "--table__row--updated"), values === null || values === void 0 ? void 0 : values._updated))
|
|
430
430
|
}, dragEnterLeaveHandlers), /*#__PURE__*/React__default.default.createElement(react.TableCell, {
|
|
431
431
|
colSpan: totalColumns
|
|
432
432
|
}, rowDetails))) : /*#__PURE__*/React__default.default.createElement(TableExpandRow, _extends__default.default({
|
|
433
433
|
key: id,
|
|
434
434
|
expandHeaderId: "".concat(tableId, "-expand"),
|
|
435
|
-
className: classnames__default.default("".concat(iotPrefix, "--expandable-tablerow"), _defineProperty__default.default(_defineProperty__default.default(_defineProperty__default.default(_defineProperty__default.default(_defineProperty__default.default(_defineProperty__default.default(_defineProperty__default.default({}, "".concat(iotPrefix, "--expandable-tablerow--parent"), hasRowNesting && (hasRowNesting === null || hasRowNesting === void 0 ? void 0 : hasRowNesting.hasSingleNestedHierarchy) && nestingChildCount > 0), "".concat(iotPrefix, "--expandable-tablerow--childless"), hasRowNesting && nestingChildCount === 0), "".concat(iotPrefix, "--expandable-tablerow--indented"), parseInt(nestingOffset, 10) > 0), "".concat(iotPrefix, "--expandable-tablerow--singly-selected"), hasRowSelection === 'single' && isSelected && !useRadioButtonSingleSelect), "".concat(iotPrefix, "--expandable-tablerow--last-child"), isLastChild), "".concat(iotPrefix, "--table__row--dragging"), isDragRow), "".concat(iotPrefix, "--table__row--softdeleted"), values === null || values === void 0 ? void 0 : values[deletedAttribute])),
|
|
435
|
+
className: classnames__default.default("".concat(iotPrefix, "--expandable-tablerow"), _defineProperty__default.default(_defineProperty__default.default(_defineProperty__default.default(_defineProperty__default.default(_defineProperty__default.default(_defineProperty__default.default(_defineProperty__default.default(_defineProperty__default.default({}, "".concat(iotPrefix, "--expandable-tablerow--parent"), hasRowNesting && (hasRowNesting === null || hasRowNesting === void 0 ? void 0 : hasRowNesting.hasSingleNestedHierarchy) && nestingChildCount > 0), "".concat(iotPrefix, "--expandable-tablerow--childless"), hasRowNesting && nestingChildCount === 0), "".concat(iotPrefix, "--expandable-tablerow--indented"), parseInt(nestingOffset, 10) > 0), "".concat(iotPrefix, "--expandable-tablerow--singly-selected"), hasRowSelection === 'single' && isSelected && !useRadioButtonSingleSelect), "".concat(iotPrefix, "--expandable-tablerow--last-child"), isLastChild), "".concat(iotPrefix, "--table__row--dragging"), isDragRow), "".concat(iotPrefix, "--table__row--softdeleted"), values === null || values === void 0 ? void 0 : values[deletedAttribute]), "".concat(iotPrefix, "--table__row--updated"), values === null || values === void 0 ? void 0 : values._updated)),
|
|
436
436
|
"data-row-nesting": hasRowNesting,
|
|
437
437
|
"data-child-count": nestingChildCount,
|
|
438
438
|
"data-nesting-offset": nestingOffset,
|
|
@@ -461,7 +461,7 @@ var TableBodyRow = function TableBodyRow(_ref) {
|
|
|
461
461
|
rowId: id,
|
|
462
462
|
langDir: langDir
|
|
463
463
|
}, dragEnterLeaveHandlers), tableCells) : hasRowSelection === 'single' && isSelected ? /*#__PURE__*/React__default.default.createElement(react.TableRow, _extends__default.default({
|
|
464
|
-
className: classnames__default.default("".concat(iotPrefix, "--table__row"), _defineProperty__default.default(_defineProperty__default.default(_defineProperty__default.default({}, "".concat(iotPrefix, "--table__row--singly-selected"), isSelected && !useRadioButtonSingleSelect), "".concat(iotPrefix, "--table__row--background"), isSelected), "".concat(iotPrefix, "--table__row--softdeleted"), values === null || values === void 0 ? void 0 : values[deletedAttribute])),
|
|
464
|
+
className: classnames__default.default("".concat(iotPrefix, "--table__row"), _defineProperty__default.default(_defineProperty__default.default(_defineProperty__default.default(_defineProperty__default.default({}, "".concat(iotPrefix, "--table__row--singly-selected"), isSelected && !useRadioButtonSingleSelect), "".concat(iotPrefix, "--table__row--background"), isSelected), "".concat(iotPrefix, "--table__row--softdeleted"), values === null || values === void 0 ? void 0 : values[deletedAttribute]), "".concat(iotPrefix, "--table__row--updated"), values === null || values === void 0 ? void 0 : values._updated)),
|
|
465
465
|
key: id,
|
|
466
466
|
onClick: function onClick() {
|
|
467
467
|
if (isSelectable !== false) {
|
|
@@ -472,7 +472,7 @@ var TableBodyRow = function TableBodyRow(_ref) {
|
|
|
472
472
|
}
|
|
473
473
|
}
|
|
474
474
|
}, dragEnterLeaveHandlers), tableCells) : /*#__PURE__*/React__default.default.createElement(react.TableRow, _extends__default.default({
|
|
475
|
-
className: classnames__default.default("".concat(iotPrefix, "--table__row"), _defineProperty__default.default(_defineProperty__default.default(_defineProperty__default.default(_defineProperty__default.default(_defineProperty__default.default(_defineProperty__default.default({}, "".concat(iotPrefix, "--table__row--unselectable"), isSelectable === false), "".concat(iotPrefix, "--table__row--selectable"), isSelectable !== false), "".concat(iotPrefix, "--table__row--editing"), isEditMode), "".concat(iotPrefix, "--table__row--selected"), isSelected), "".concat(iotPrefix, "--table__row--dragging"), isDragRow), "".concat(iotPrefix, "--table__row--softdeleted"), values === null || values === void 0 ? void 0 : values[deletedAttribute])),
|
|
475
|
+
className: classnames__default.default("".concat(iotPrefix, "--table__row"), _defineProperty__default.default(_defineProperty__default.default(_defineProperty__default.default(_defineProperty__default.default(_defineProperty__default.default(_defineProperty__default.default(_defineProperty__default.default({}, "".concat(iotPrefix, "--table__row--unselectable"), isSelectable === false), "".concat(iotPrefix, "--table__row--selectable"), isSelectable !== false), "".concat(iotPrefix, "--table__row--editing"), isEditMode), "".concat(iotPrefix, "--table__row--selected"), isSelected), "".concat(iotPrefix, "--table__row--dragging"), isDragRow), "".concat(iotPrefix, "--table__row--softdeleted"), values === null || values === void 0 ? void 0 : values[deletedAttribute]), "".concat(iotPrefix, "--table__row--updated"), values === null || values === void 0 ? void 0 : values._updated)),
|
|
476
476
|
key: id,
|
|
477
477
|
onClick: function onClick() {
|
|
478
478
|
if (isSelectable !== false) {
|
|
@@ -50,7 +50,8 @@ var propTypes = {
|
|
|
50
50
|
}),
|
|
51
51
|
children: PropTypes__default.default.node,
|
|
52
52
|
testId: PropTypes__default.default.string,
|
|
53
|
-
shouldPreventClose: PropTypes__default.default.func
|
|
53
|
+
shouldPreventClose: PropTypes__default.default.func,
|
|
54
|
+
role: PropTypes__default.default.string
|
|
54
55
|
};
|
|
55
56
|
var defaultProps = {
|
|
56
57
|
idx: undefined,
|
|
@@ -72,7 +73,8 @@ var defaultProps = {
|
|
|
72
73
|
return new Promise(function (res) {
|
|
73
74
|
return res(false);
|
|
74
75
|
});
|
|
75
|
-
}
|
|
76
|
+
},
|
|
77
|
+
role: undefined
|
|
76
78
|
};
|
|
77
79
|
var TearSheet = function TearSheet(_ref) {
|
|
78
80
|
var idx = _ref.idx,
|
|
@@ -87,7 +89,8 @@ var TearSheet = function TearSheet(_ref) {
|
|
|
87
89
|
i18n = _ref.i18n,
|
|
88
90
|
children = _ref.children,
|
|
89
91
|
testId = _ref.testId,
|
|
90
|
-
shouldPreventClose = _ref.shouldPreventClose
|
|
92
|
+
shouldPreventClose = _ref.shouldPreventClose,
|
|
93
|
+
role = _ref.role;
|
|
91
94
|
var onCloseButton = React.useCallback(/*#__PURE__*/_asyncToGenerator__default.default(/*#__PURE__*/_regeneratorRuntime__default.default.mark(function _callee() {
|
|
92
95
|
var preventClose;
|
|
93
96
|
return _regeneratorRuntime__default.default.wrap(function _callee$(_context) {
|
|
@@ -112,7 +115,8 @@ var TearSheet = function TearSheet(_ref) {
|
|
|
112
115
|
return /*#__PURE__*/React__default.default.createElement("div", {
|
|
113
116
|
// TODO: use only testId in v3.
|
|
114
117
|
"data-testid": testId || "".concat(iotPrefix, "--tear-sheet-").concat(idx),
|
|
115
|
-
className: classnames__default.default("".concat(iotPrefix, "--tear-sheet"), className)
|
|
118
|
+
className: classnames__default.default("".concat(iotPrefix, "--tear-sheet"), className),
|
|
119
|
+
role: role
|
|
116
120
|
}, /*#__PURE__*/React__default.default.createElement("div", {
|
|
117
121
|
className: classnames__default.default("".concat(iotPrefix, "--tear-sheet--header"), _defineProperty__default.default({}, "".concat(iotPrefix, "--tear-sheet--header__extraContent"), !!headerExtraContent))
|
|
118
122
|
}, /*#__PURE__*/React__default.default.createElement(Button, {
|
|
@@ -295,6 +299,17 @@ TearSheet.__docgenInfo = {
|
|
|
295
299
|
"name": "func"
|
|
296
300
|
},
|
|
297
301
|
"required": false
|
|
302
|
+
},
|
|
303
|
+
"role": {
|
|
304
|
+
"defaultValue": {
|
|
305
|
+
"value": "undefined",
|
|
306
|
+
"computed": true
|
|
307
|
+
},
|
|
308
|
+
"description": "",
|
|
309
|
+
"type": {
|
|
310
|
+
"name": "string"
|
|
311
|
+
},
|
|
312
|
+
"required": false
|
|
298
313
|
}
|
|
299
314
|
}
|
|
300
315
|
};
|
package/package.json
CHANGED
|
@@ -240412,7 +240412,7 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
240412
240412
|
key: id
|
|
240413
240413
|
}, /*#__PURE__*/React$1.createElement(TableExpandRow$1, _extends$4({
|
|
240414
240414
|
expandHeaderId: "".concat(tableId, "-expand"),
|
|
240415
|
-
className: classnames("".concat(iotPrefix$1$, "--expandable-tablerow--expanded"), _defineProperty$c(_defineProperty$c(_defineProperty$c(_defineProperty$c({}, "".concat(iotPrefix$1$, "--expandable-tablerow--indented"), parseInt(nestingOffset, 10) > 0), "".concat(iotPrefix$1$, "--expandable-tablerow--childless"), hasRowNesting && nestingChildCount === 0), "".concat(iotPrefix$1$, "--table__row--dragging"), isDragRow), "".concat(iotPrefix$1$, "--table__row--softdeleted"), values === null || values === void 0 ? void 0 : values[deletedAttribute])),
|
|
240415
|
+
className: classnames("".concat(iotPrefix$1$, "--expandable-tablerow--expanded"), _defineProperty$c(_defineProperty$c(_defineProperty$c(_defineProperty$c(_defineProperty$c({}, "".concat(iotPrefix$1$, "--expandable-tablerow--indented"), parseInt(nestingOffset, 10) > 0), "".concat(iotPrefix$1$, "--expandable-tablerow--childless"), hasRowNesting && nestingChildCount === 0), "".concat(iotPrefix$1$, "--table__row--dragging"), isDragRow), "".concat(iotPrefix$1$, "--table__row--softdeleted"), values === null || values === void 0 ? void 0 : values[deletedAttribute]), "".concat(iotPrefix$1$, "--table__row--updated"), values === null || values === void 0 ? void 0 : values._updated)),
|
|
240416
240416
|
ariaLabel: clickToCollapseAria,
|
|
240417
240417
|
expandIconDescription: clickToCollapseAria,
|
|
240418
240418
|
isExpanded: true,
|
|
@@ -240440,13 +240440,13 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
240440
240440
|
rowId: id,
|
|
240441
240441
|
langDir: langDir
|
|
240442
240442
|
}, dragEnterLeaveHandlers), tableCells), !hasRowNesting && /*#__PURE__*/React$1.createElement(react.TableRow, _extends$4({
|
|
240443
|
-
className: classnames("".concat(iotPrefix$1$, "--expanded-tablerow"), _defineProperty$c(_defineProperty$c(_defineProperty$c({}, "".concat(iotPrefix$1$, "--expanded-tablerow--singly-selected"), hasRowSelection === 'single' && isSelected && !useRadioButtonSingleSelect), "".concat(iotPrefix$1$, "--table__row--dragging"), isDragRow), "".concat(iotPrefix$1$, "--table__row--softdeleted"), values === null || values === void 0 ? void 0 : values[deletedAttribute]))
|
|
240443
|
+
className: classnames("".concat(iotPrefix$1$, "--expanded-tablerow"), _defineProperty$c(_defineProperty$c(_defineProperty$c(_defineProperty$c({}, "".concat(iotPrefix$1$, "--expanded-tablerow--singly-selected"), hasRowSelection === 'single' && isSelected && !useRadioButtonSingleSelect), "".concat(iotPrefix$1$, "--table__row--dragging"), isDragRow), "".concat(iotPrefix$1$, "--table__row--softdeleted"), values === null || values === void 0 ? void 0 : values[deletedAttribute]), "".concat(iotPrefix$1$, "--table__row--updated"), values === null || values === void 0 ? void 0 : values._updated))
|
|
240444
240444
|
}, dragEnterLeaveHandlers), /*#__PURE__*/React$1.createElement(react.TableCell, {
|
|
240445
240445
|
colSpan: totalColumns
|
|
240446
240446
|
}, rowDetails))) : /*#__PURE__*/React$1.createElement(TableExpandRow$1, _extends$4({
|
|
240447
240447
|
key: id,
|
|
240448
240448
|
expandHeaderId: "".concat(tableId, "-expand"),
|
|
240449
|
-
className: classnames("".concat(iotPrefix$1$, "--expandable-tablerow"), _defineProperty$c(_defineProperty$c(_defineProperty$c(_defineProperty$c(_defineProperty$c(_defineProperty$c(_defineProperty$c({}, "".concat(iotPrefix$1$, "--expandable-tablerow--parent"), hasRowNesting && (hasRowNesting === null || hasRowNesting === void 0 ? void 0 : hasRowNesting.hasSingleNestedHierarchy) && nestingChildCount > 0), "".concat(iotPrefix$1$, "--expandable-tablerow--childless"), hasRowNesting && nestingChildCount === 0), "".concat(iotPrefix$1$, "--expandable-tablerow--indented"), parseInt(nestingOffset, 10) > 0), "".concat(iotPrefix$1$, "--expandable-tablerow--singly-selected"), hasRowSelection === 'single' && isSelected && !useRadioButtonSingleSelect), "".concat(iotPrefix$1$, "--expandable-tablerow--last-child"), isLastChild), "".concat(iotPrefix$1$, "--table__row--dragging"), isDragRow), "".concat(iotPrefix$1$, "--table__row--softdeleted"), values === null || values === void 0 ? void 0 : values[deletedAttribute])),
|
|
240449
|
+
className: classnames("".concat(iotPrefix$1$, "--expandable-tablerow"), _defineProperty$c(_defineProperty$c(_defineProperty$c(_defineProperty$c(_defineProperty$c(_defineProperty$c(_defineProperty$c(_defineProperty$c({}, "".concat(iotPrefix$1$, "--expandable-tablerow--parent"), hasRowNesting && (hasRowNesting === null || hasRowNesting === void 0 ? void 0 : hasRowNesting.hasSingleNestedHierarchy) && nestingChildCount > 0), "".concat(iotPrefix$1$, "--expandable-tablerow--childless"), hasRowNesting && nestingChildCount === 0), "".concat(iotPrefix$1$, "--expandable-tablerow--indented"), parseInt(nestingOffset, 10) > 0), "".concat(iotPrefix$1$, "--expandable-tablerow--singly-selected"), hasRowSelection === 'single' && isSelected && !useRadioButtonSingleSelect), "".concat(iotPrefix$1$, "--expandable-tablerow--last-child"), isLastChild), "".concat(iotPrefix$1$, "--table__row--dragging"), isDragRow), "".concat(iotPrefix$1$, "--table__row--softdeleted"), values === null || values === void 0 ? void 0 : values[deletedAttribute]), "".concat(iotPrefix$1$, "--table__row--updated"), values === null || values === void 0 ? void 0 : values._updated)),
|
|
240450
240450
|
"data-row-nesting": hasRowNesting,
|
|
240451
240451
|
"data-child-count": nestingChildCount,
|
|
240452
240452
|
"data-nesting-offset": nestingOffset,
|
|
@@ -240475,7 +240475,7 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
240475
240475
|
rowId: id,
|
|
240476
240476
|
langDir: langDir
|
|
240477
240477
|
}, dragEnterLeaveHandlers), tableCells) : hasRowSelection === 'single' && isSelected ? /*#__PURE__*/React$1.createElement(react.TableRow, _extends$4({
|
|
240478
|
-
className: classnames("".concat(iotPrefix$1$, "--table__row"), _defineProperty$c(_defineProperty$c(_defineProperty$c({}, "".concat(iotPrefix$1$, "--table__row--singly-selected"), isSelected && !useRadioButtonSingleSelect), "".concat(iotPrefix$1$, "--table__row--background"), isSelected), "".concat(iotPrefix$1$, "--table__row--softdeleted"), values === null || values === void 0 ? void 0 : values[deletedAttribute])),
|
|
240478
|
+
className: classnames("".concat(iotPrefix$1$, "--table__row"), _defineProperty$c(_defineProperty$c(_defineProperty$c(_defineProperty$c({}, "".concat(iotPrefix$1$, "--table__row--singly-selected"), isSelected && !useRadioButtonSingleSelect), "".concat(iotPrefix$1$, "--table__row--background"), isSelected), "".concat(iotPrefix$1$, "--table__row--softdeleted"), values === null || values === void 0 ? void 0 : values[deletedAttribute]), "".concat(iotPrefix$1$, "--table__row--updated"), values === null || values === void 0 ? void 0 : values._updated)),
|
|
240479
240479
|
key: id,
|
|
240480
240480
|
onClick: function onClick() {
|
|
240481
240481
|
if (isSelectable !== false) {
|
|
@@ -240486,7 +240486,7 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
240486
240486
|
}
|
|
240487
240487
|
}
|
|
240488
240488
|
}, dragEnterLeaveHandlers), tableCells) : /*#__PURE__*/React$1.createElement(react.TableRow, _extends$4({
|
|
240489
|
-
className: classnames("".concat(iotPrefix$1$, "--table__row"), _defineProperty$c(_defineProperty$c(_defineProperty$c(_defineProperty$c(_defineProperty$c(_defineProperty$c({}, "".concat(iotPrefix$1$, "--table__row--unselectable"), isSelectable === false), "".concat(iotPrefix$1$, "--table__row--selectable"), isSelectable !== false), "".concat(iotPrefix$1$, "--table__row--editing"), isEditMode), "".concat(iotPrefix$1$, "--table__row--selected"), isSelected), "".concat(iotPrefix$1$, "--table__row--dragging"), isDragRow), "".concat(iotPrefix$1$, "--table__row--softdeleted"), values === null || values === void 0 ? void 0 : values[deletedAttribute])),
|
|
240489
|
+
className: classnames("".concat(iotPrefix$1$, "--table__row"), _defineProperty$c(_defineProperty$c(_defineProperty$c(_defineProperty$c(_defineProperty$c(_defineProperty$c(_defineProperty$c({}, "".concat(iotPrefix$1$, "--table__row--unselectable"), isSelectable === false), "".concat(iotPrefix$1$, "--table__row--selectable"), isSelectable !== false), "".concat(iotPrefix$1$, "--table__row--editing"), isEditMode), "".concat(iotPrefix$1$, "--table__row--selected"), isSelected), "".concat(iotPrefix$1$, "--table__row--dragging"), isDragRow), "".concat(iotPrefix$1$, "--table__row--softdeleted"), values === null || values === void 0 ? void 0 : values[deletedAttribute]), "".concat(iotPrefix$1$, "--table__row--updated"), values === null || values === void 0 ? void 0 : values._updated)),
|
|
240490
240490
|
key: id,
|
|
240491
240491
|
onClick: function onClick() {
|
|
240492
240492
|
if (isSelectable !== false) {
|
|
@@ -332058,7 +332058,8 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
332058
332058
|
}),
|
|
332059
332059
|
children: PropTypes.node,
|
|
332060
332060
|
testId: PropTypes.string,
|
|
332061
|
-
shouldPreventClose: PropTypes.func
|
|
332061
|
+
shouldPreventClose: PropTypes.func,
|
|
332062
|
+
role: PropTypes.string
|
|
332062
332063
|
};
|
|
332063
332064
|
var defaultProps$e = {
|
|
332064
332065
|
idx: undefined,
|
|
@@ -332080,7 +332081,8 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
332080
332081
|
return new Promise(function (res) {
|
|
332081
332082
|
return res(false);
|
|
332082
332083
|
});
|
|
332083
|
-
}
|
|
332084
|
+
},
|
|
332085
|
+
role: undefined
|
|
332084
332086
|
};
|
|
332085
332087
|
var TearSheet = function TearSheet(_ref) {
|
|
332086
332088
|
var idx = _ref.idx,
|
|
@@ -332095,7 +332097,8 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
332095
332097
|
i18n = _ref.i18n,
|
|
332096
332098
|
children = _ref.children,
|
|
332097
332099
|
testId = _ref.testId,
|
|
332098
|
-
shouldPreventClose = _ref.shouldPreventClose
|
|
332100
|
+
shouldPreventClose = _ref.shouldPreventClose,
|
|
332101
|
+
role = _ref.role;
|
|
332099
332102
|
var onCloseButton = React$1.useCallback(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/regenerator.mark(function _callee() {
|
|
332100
332103
|
var preventClose;
|
|
332101
332104
|
return regenerator.wrap(function _callee$(_context) {
|
|
@@ -332120,7 +332123,8 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
332120
332123
|
return /*#__PURE__*/React$1.createElement("div", {
|
|
332121
332124
|
// TODO: use only testId in v3.
|
|
332122
332125
|
"data-testid": testId || "".concat(iotPrefix$d, "--tear-sheet-").concat(idx),
|
|
332123
|
-
className: classnames("".concat(iotPrefix$d, "--tear-sheet"), className)
|
|
332126
|
+
className: classnames("".concat(iotPrefix$d, "--tear-sheet"), className),
|
|
332127
|
+
role: role
|
|
332124
332128
|
}, /*#__PURE__*/React$1.createElement("div", {
|
|
332125
332129
|
className: classnames("".concat(iotPrefix$d, "--tear-sheet--header"), _defineProperty$c({}, "".concat(iotPrefix$d, "--tear-sheet--header__extraContent"), !!headerExtraContent))
|
|
332126
332130
|
}, /*#__PURE__*/React$1.createElement(Button$2, {
|
|
@@ -332303,6 +332307,17 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
332303
332307
|
"name": "func"
|
|
332304
332308
|
},
|
|
332305
332309
|
"required": false
|
|
332310
|
+
},
|
|
332311
|
+
"role": {
|
|
332312
|
+
"defaultValue": {
|
|
332313
|
+
"value": "undefined",
|
|
332314
|
+
"computed": true
|
|
332315
|
+
},
|
|
332316
|
+
"description": "",
|
|
332317
|
+
"type": {
|
|
332318
|
+
"name": "string"
|
|
332319
|
+
},
|
|
332320
|
+
"required": false
|
|
332306
332321
|
}
|
|
332307
332322
|
}
|
|
332308
332323
|
};
|