carbon-addons-iot-react 5.8.3 → 5.9.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.
|
@@ -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
|
};
|
|
@@ -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
|
@@ -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
|
};
|