@carbon/ibm-products 2.19.2 → 2.21.0
Sign up to get free protection for your applications and to get access to all the features.
- package/css/index-full-carbon.css +147 -111
- package/css/index-full-carbon.css.map +1 -1
- package/css/index-full-carbon.min.css +1 -1
- package/css/index-full-carbon.min.css.map +1 -1
- package/css/index-without-carbon-released-only.css +28 -20
- package/css/index-without-carbon-released-only.css.map +1 -1
- package/css/index-without-carbon-released-only.min.css +1 -1
- package/css/index-without-carbon-released-only.min.css.map +1 -1
- package/css/index-without-carbon.css +28 -20
- package/css/index-without-carbon.css.map +1 -1
- package/css/index-without-carbon.min.css +1 -1
- package/css/index-without-carbon.min.css.map +1 -1
- package/css/index.css +51 -22
- package/css/index.css.map +1 -1
- package/css/index.min.css +1 -1
- package/css/index.min.css.map +1 -1
- package/es/components/ActionSet/ActionSet.js +3 -4
- package/es/components/AddSelect/AddSelectBody.js +2 -2
- package/es/components/AddSelect/AddSelectRow.js +2 -2
- package/es/components/Card/Card.js +1 -2
- package/es/components/Card/CardHeader.js +1 -2
- package/es/components/CreateFullPage/CreateFullPageStep.js +1 -2
- package/es/components/CreateTearsheet/CreateTearsheetStep.js +1 -2
- package/es/components/DataSpreadsheet/DataSpreadsheet.js +1 -2
- package/es/components/DataSpreadsheet/DataSpreadsheetBody.js +1 -2
- package/es/components/DataSpreadsheet/DataSpreadsheetHeader.js +1 -2
- package/es/components/Datagrid/Datagrid/DatagridContent.js +2 -7
- package/es/components/Datagrid/Datagrid/DatagridHeaderRow.js +6 -11
- package/es/components/Datagrid/Datagrid/DatagridRow.js +9 -10
- package/es/components/Datagrid/Datagrid/DraggableElement.js +1 -2
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +61 -11
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +28 -14
- package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +1 -2
- package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useShouldDisableButtons.js +2 -3
- package/es/components/Datagrid/Datagrid/addons/Filtering/motion/variants.js +63 -41
- package/es/components/Datagrid/Datagrid/addons/Filtering/utils.js +1 -5
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditButton/InlineEditButton.js +2 -3
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +2 -2
- package/es/components/Datagrid/useActionsColumn.js +1 -2
- package/es/components/Datagrid/useDefaultStringRenderer.js +1 -2
- package/es/components/Datagrid/useFiltering.js +1 -0
- package/es/components/Datagrid/useNestedRowExpander.js +1 -2
- package/es/components/Datagrid/useNestedRows.js +49 -33
- package/es/components/Datagrid/useOnRowClick.js +1 -1
- package/es/components/Datagrid/useSelectRows.js +1 -2
- package/es/components/Datagrid/useSortableColumns.js +1 -2
- package/es/components/Datagrid/useStickyColumn.js +3 -4
- package/es/components/Datagrid/utils/filterPropsForTesting.js +149 -0
- package/es/components/EditInPlace/EditInPlace.js +1 -2
- package/es/components/EditTearsheet/EditTearsheetForm.js +1 -2
- package/es/components/FilterSummary/FilterSummary.js +15 -12
- package/es/components/NotificationsPanel/NotificationsPanel.js +2 -3
- package/es/components/PageHeader/PageHeader.js +9 -11
- package/es/components/Saving/Saving.js +6 -6
- package/es/components/SidePanel/SidePanel.js +12 -7
- package/es/components/TagSet/TagSetOverflow.js +1 -2
- package/es/components/Tearsheet/Tearsheet.js +5 -0
- package/es/components/Tearsheet/TearsheetNarrow.js +5 -0
- package/es/components/Tearsheet/TearsheetShell.js +10 -10
- package/es/components/WebTerminal/WebTerminal.js +1 -2
- package/lib/components/ActionSet/ActionSet.js +3 -4
- package/lib/components/AddSelect/AddSelectBody.js +2 -2
- package/lib/components/AddSelect/AddSelectRow.js +2 -2
- package/lib/components/Card/Card.js +1 -2
- package/lib/components/Card/CardHeader.js +1 -2
- package/lib/components/CreateFullPage/CreateFullPageStep.js +1 -2
- package/lib/components/CreateTearsheet/CreateTearsheetStep.js +1 -2
- package/lib/components/DataSpreadsheet/DataSpreadsheet.js +1 -2
- package/lib/components/DataSpreadsheet/DataSpreadsheetBody.js +1 -2
- package/lib/components/DataSpreadsheet/DataSpreadsheetHeader.js +1 -2
- package/lib/components/Datagrid/Datagrid/DatagridContent.js +2 -7
- package/lib/components/Datagrid/Datagrid/DatagridHeaderRow.js +6 -11
- package/lib/components/Datagrid/Datagrid/DatagridRow.js +9 -10
- package/lib/components/Datagrid/Datagrid/DraggableElement.js +1 -2
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +60 -10
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +27 -13
- package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +1 -2
- package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useShouldDisableButtons.js +2 -3
- package/lib/components/Datagrid/Datagrid/addons/Filtering/motion/variants.js +63 -41
- package/lib/components/Datagrid/Datagrid/addons/Filtering/utils.js +1 -5
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditButton/InlineEditButton.js +2 -3
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +2 -2
- package/lib/components/Datagrid/useActionsColumn.js +1 -2
- package/lib/components/Datagrid/useDefaultStringRenderer.js +1 -2
- package/lib/components/Datagrid/useFiltering.js +1 -0
- package/lib/components/Datagrid/useNestedRowExpander.js +1 -2
- package/lib/components/Datagrid/useNestedRows.js +49 -33
- package/lib/components/Datagrid/useOnRowClick.js +1 -1
- package/lib/components/Datagrid/useSelectRows.js +1 -2
- package/lib/components/Datagrid/useSortableColumns.js +1 -2
- package/lib/components/Datagrid/useStickyColumn.js +3 -4
- package/lib/components/Datagrid/utils/filterPropsForTesting.js +156 -0
- package/lib/components/EditInPlace/EditInPlace.js +1 -2
- package/lib/components/EditTearsheet/EditTearsheetForm.js +1 -2
- package/lib/components/FilterSummary/FilterSummary.js +15 -12
- package/lib/components/NotificationsPanel/NotificationsPanel.js +2 -3
- package/lib/components/PageHeader/PageHeader.js +9 -11
- package/lib/components/Saving/Saving.js +6 -6
- package/lib/components/SidePanel/SidePanel.js +12 -7
- package/lib/components/TagSet/TagSetOverflow.js +1 -2
- package/lib/components/Tearsheet/Tearsheet.js +5 -0
- package/lib/components/Tearsheet/TearsheetNarrow.js +5 -0
- package/lib/components/Tearsheet/TearsheetShell.js +10 -10
- package/lib/components/WebTerminal/WebTerminal.js +1 -2
- package/package.json +4 -4
- package/scss/components/Datagrid/styles/_datagrid.scss +8 -0
- package/scss/components/Datagrid/styles/addons/_FilterFlyout.scss +11 -8
- package/scss/components/Saving/_saving.scss +6 -0
- package/scss/components/SidePanel/_side-panel.scss +9 -3
- package/scss/components/TagSet/_tag-set.scss +4 -1
@@ -18,7 +18,7 @@ import { getDevtoolsProps } from '../../global/js/utils/devtools';
|
|
18
18
|
import { pkg } from '../../settings';
|
19
19
|
var componentName = 'Saving';
|
20
20
|
export var Saving = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
21
|
-
var _statusObj
|
21
|
+
var _statusObj$status, _statusObj$status2, _statusObj$status3, _statusObj$status4;
|
22
22
|
var secondaryButtonText = _ref.secondaryButtonText,
|
23
23
|
className = _ref.className,
|
24
24
|
defaultIconDescription = _ref.defaultIconDescription,
|
@@ -34,7 +34,7 @@ export var Saving = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
34
34
|
successText = _ref.successText,
|
35
35
|
type = _ref.type,
|
36
36
|
rest = _objectWithoutProperties(_ref, _excluded);
|
37
|
-
var statusObj = (
|
37
|
+
var statusObj = _defineProperty(_defineProperty(_defineProperty({
|
38
38
|
default: {
|
39
39
|
text: defaultText,
|
40
40
|
iconDescription: defaultIconDescription,
|
@@ -44,7 +44,7 @@ export var Saving = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
44
44
|
}, props));
|
45
45
|
}
|
46
46
|
}
|
47
|
-
},
|
47
|
+
}, 'in-progress', {
|
48
48
|
text: inProgressText,
|
49
49
|
iconDescription: inProgressIconDescription,
|
50
50
|
icon: function icon(props) {
|
@@ -52,7 +52,7 @@ export var Saving = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
52
52
|
size: 16
|
53
53
|
}, props));
|
54
54
|
}
|
55
|
-
}),
|
55
|
+
}), "success", {
|
56
56
|
text: successText,
|
57
57
|
iconDescription: successIconDescription,
|
58
58
|
icon: function icon(props) {
|
@@ -60,7 +60,7 @@ export var Saving = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
60
60
|
size: 16
|
61
61
|
}, props));
|
62
62
|
}
|
63
|
-
}),
|
63
|
+
}), "fail", {
|
64
64
|
text: failText,
|
65
65
|
iconDescription: failIconDescription,
|
66
66
|
icon: function icon(props) {
|
@@ -68,7 +68,7 @@ export var Saving = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
68
68
|
size: 16
|
69
69
|
}, props));
|
70
70
|
}
|
71
|
-
})
|
71
|
+
});
|
72
72
|
var blockClass = "".concat(pkg.prefix, "--saving");
|
73
73
|
return /*#__PURE__*/React.createElement("div", _extends({}, rest, {
|
74
74
|
ref: ref,
|
@@ -34,6 +34,7 @@ import { Button } from '@carbon/react';
|
|
34
34
|
import { Close, ArrowLeft } from '@carbon/react/icons';
|
35
35
|
import { ActionSet } from '../ActionSet';
|
36
36
|
import { overlayVariants, panelVariants } from './motion/variants';
|
37
|
+
import pconsole from '../../global/js/utils/pconsole';
|
37
38
|
var blockClass = "".concat(pkg.prefix, "--side-panel");
|
38
39
|
var componentName = 'SidePanel';
|
39
40
|
|
@@ -53,7 +54,7 @@ var defaults = {
|
|
53
54
|
* Side panels keep users in-context of a page while performing tasks like navigating, editing, viewing details, or configuring something new.
|
54
55
|
*/
|
55
56
|
export var SidePanel = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
56
|
-
var _window
|
57
|
+
var _window;
|
57
58
|
var actionToolbarButtons = _ref.actionToolbarButtons,
|
58
59
|
actions = _ref.actions,
|
59
60
|
_ref$animateTitle = _ref.animateTitle,
|
@@ -345,7 +346,11 @@ export var SidePanel = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
345
346
|
useEffect(function () {
|
346
347
|
if (open && slideIn) {
|
347
348
|
var pageContentElement = document.querySelector(selectorPageContent);
|
348
|
-
pageContentElement
|
349
|
+
if (pageContentElement) {
|
350
|
+
pageContentElement.style.inlineSize = 'auto';
|
351
|
+
} else {
|
352
|
+
pconsole.warn('SidePanel prop `selectorPageContent` was not provided a selector that matches any element on your page. If an element is not found, the panel will render as a slide over.');
|
353
|
+
}
|
349
354
|
if (placement && placement === 'right' && pageContentElement) {
|
350
355
|
pageContentElement.style.marginInlineEnd = 0;
|
351
356
|
pageContentElement.style.transition = !reducedMotion.matches ? "margin-inline-end ".concat(moderate02) : null;
|
@@ -375,9 +380,9 @@ export var SidePanel = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
375
380
|
}
|
376
381
|
};
|
377
382
|
var primaryActionContainerClassNames = cx(["".concat(blockClass, "__actions-container"), _defineProperty({}, "".concat(blockClass, "__actions-container-condensed"), condensedActions)]);
|
378
|
-
var mainPanelClassNames = cx([blockClass, className, "".concat(blockClass, "__container"), "".concat(blockClass, "__container--").concat(size), (
|
383
|
+
var mainPanelClassNames = cx([blockClass, className, "".concat(blockClass, "__container"), "".concat(blockClass, "__container--").concat(size), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(blockClass, "__container-right-placement"), placement === 'right'), "".concat(blockClass, "__container-left-placement"), placement === 'left'), "".concat(blockClass, "__container-with-action-toolbar"), actionToolbarButtons && actionToolbarButtons.length), "".concat(blockClass, "__container-without-overlay"), !includeOverlay && !slideIn), "".concat(blockClass, "__container-is-animating"), !animationComplete || !open), "".concat(blockClass, "__container--has-slug"), slug)]);
|
379
384
|
var renderHeader = function renderHeader() {
|
380
|
-
var _slug$type
|
385
|
+
var _slug$type;
|
381
386
|
var slugCloseSize = actions && actions.length && /l/.test(size) ? 'md' : 'sm';
|
382
387
|
var normalizedSlug;
|
383
388
|
if (slug && (slug === null || slug === void 0 || (_slug$type = slug.type) === null || _slug$type === void 0 ? void 0 : _slug$type.displayName) === 'Slug') {
|
@@ -387,7 +392,7 @@ export var SidePanel = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
387
392
|
});
|
388
393
|
}
|
389
394
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
390
|
-
className: cx("".concat(blockClass, "__title-container"), (
|
395
|
+
className: cx("".concat(blockClass, "__title-container"), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(blockClass, "__on-detail-step"), currentStep > 0), "".concat(blockClass, "__on-detail-step-without-title"), currentStep > 0 && !title), "".concat(blockClass, "__title-container--no-title-animation"), !animateTitle), "".concat(blockClass, "__title-container-is-animating"), !animationComplete || !open), "".concat(blockClass, "__title-container-without-title"), !title), "".concat(blockClass, "__title-container--reduced-motion"), reducedMotion.matches))
|
391
396
|
}, currentStep > 0 && /*#__PURE__*/React.createElement(Button, {
|
392
397
|
"aria-label": navigationBackIconDescription,
|
393
398
|
kind: "ghost",
|
@@ -419,7 +424,7 @@ export var SidePanel = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
419
424
|
onClick: onRequestClose,
|
420
425
|
ref: sidePanelCloseRef
|
421
426
|
})), subtitle && /*#__PURE__*/React.createElement("p", {
|
422
|
-
className: cx("".concat(blockClass, "__subtitle-text"), (
|
427
|
+
className: cx("".concat(blockClass, "__subtitle-text"), _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(blockClass, "__subtitle-text-no-animation"), !animateTitle), "".concat(blockClass, "__subtitle-text-no-animation-no-action-toolbar"), !animateTitle && (!actionToolbarButtons || !actionToolbarButtons.length)), "".concat(blockClass, "__subtitle-text-is-animating"), !animationComplete && animateTitle), "".concat(blockClass, "__subtitle-without-title"), !title))
|
423
428
|
}, subtitle), actionToolbarButtons && actionToolbarButtons.length && /*#__PURE__*/React.createElement("div", {
|
424
429
|
className: cx("".concat(blockClass, "__action-toolbar"), _defineProperty({}, "".concat(blockClass, "__action-toolbar-no-animation"), !animateTitle))
|
425
430
|
}, actionToolbarButtons.map(function (_ref6) {
|
@@ -484,7 +489,7 @@ export var SidePanel = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
484
489
|
className: "".concat(blockClass, "__visually-hidden")
|
485
490
|
}, "Focus sentinel"), !animateTitle && renderHeader(), /*#__PURE__*/React.createElement("div", {
|
486
491
|
ref: sidePanelInnerRef,
|
487
|
-
className: cx("".concat(blockClass, "__inner-content"), (
|
492
|
+
className: cx("".concat(blockClass, "__inner-content"), _defineProperty(_defineProperty(_defineProperty({}, "".concat(blockClass, "__static-inner-content"), !animateTitle), "".concat(blockClass, "__static-inner-content-no-actions"), !animateTitle && !(actions !== null && actions !== void 0 && actions.length)), "".concat(blockClass, "__inner-content-with-actions"), actions && actions.length))
|
488
493
|
}, animateTitle && renderHeader(), /*#__PURE__*/React.createElement("div", {
|
489
494
|
className: "".concat(blockClass, "__body-content")
|
490
495
|
}, children), /*#__PURE__*/React.createElement(ActionSet, {
|
@@ -82,7 +82,6 @@ export var TagSetOverflow = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
82
82
|
}, overflowTags.filter(function (_, index) {
|
83
83
|
return overflowTags.length > allTagsModalSearchThreshold ? index < allTagsModalSearchThreshold : index <= allTagsModalSearchThreshold;
|
84
84
|
}).map(function (tag, index) {
|
85
|
-
var _cx2;
|
86
85
|
var tagProps = {};
|
87
86
|
if (overflowType === 'tag') {
|
88
87
|
tagProps.type = 'high-contrast';
|
@@ -91,7 +90,7 @@ export var TagSetOverflow = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
91
90
|
tagProps.filter = false;
|
92
91
|
}
|
93
92
|
return /*#__PURE__*/React.createElement("li", {
|
94
|
-
className: cx("".concat(blockClass, "__tag-item"), (
|
93
|
+
className: cx("".concat(blockClass, "__tag-item"), _defineProperty(_defineProperty({}, "".concat(blockClass, "__tag-item--default"), overflowType === 'default'), "".concat(blockClass, "__tag-item--tag"), overflowType === 'tag')),
|
95
94
|
key: index
|
96
95
|
}, /*#__PURE__*/React.cloneElement(tag, tagProps));
|
97
96
|
})), overflowTags.length > allTagsModalSearchThreshold && /*#__PURE__*/React.createElement(Link, {
|
@@ -112,6 +112,11 @@ Tearsheet.propTypes = _objectSpread({
|
|
112
112
|
// we duplicate this Button prop to improve the DocGen here
|
113
113
|
onClick: Button.propTypes.onClick
|
114
114
|
})))]),
|
115
|
+
/**
|
116
|
+
* The aria-label for the tearsheet, which is optional.
|
117
|
+
* if it is not passed, the title will be used as the aria-label.
|
118
|
+
*/
|
119
|
+
ariaLabel: PropTypes.string,
|
115
120
|
/**
|
116
121
|
* An optional class or classes to be added to the outermost element.
|
117
122
|
*/
|
@@ -100,6 +100,11 @@ TearsheetNarrow.propTypes = _objectSpread({
|
|
100
100
|
// we duplicate this Button prop to improve the DocGen here
|
101
101
|
onClick: Button.propTypes.onClick
|
102
102
|
})))]),
|
103
|
+
/**
|
104
|
+
* The aria-label for the tearsheet, which is optional.
|
105
|
+
* if it is not passed, the title will be used as the aria-label.
|
106
|
+
*/
|
107
|
+
ariaLabel: PropTypes.string,
|
103
108
|
/**
|
104
109
|
* An optional class or classes to be added to the outermost element.
|
105
110
|
*/
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
5
|
-
var _excluded = ["actions", "children", "className", "closeIconDescription", "description", "hasCloseIcon", "headerActions", "influencer", "influencerPosition", "influencerWidth", "label", "navigation", "onClose", "open", "selectorPrimaryFocus", "size", "portalTarget", "title", "verticalPosition"];
|
5
|
+
var _excluded = ["actions", "ariaLabel", "children", "className", "closeIconDescription", "description", "hasCloseIcon", "headerActions", "influencer", "influencerPosition", "influencerWidth", "label", "navigation", "onClose", "open", "selectorPrimaryFocus", "size", "portalTarget", "title", "verticalPosition"];
|
6
6
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
7
7
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
8
8
|
/**
|
@@ -65,6 +65,7 @@ export var tearsheetHasCloseIcon = function tearsheetHasCloseIcon(actions, hasCl
|
|
65
65
|
* */
|
66
66
|
export var TearsheetShell = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
67
67
|
var actions = _ref.actions,
|
68
|
+
ariaLabel = _ref.ariaLabel,
|
68
69
|
children = _ref.children,
|
69
70
|
className = _ref.className,
|
70
71
|
closeIconDescription = _ref.closeIconDescription,
|
@@ -122,7 +123,7 @@ export var TearsheetShell = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
122
123
|
}
|
123
124
|
handleStackChange.checkFocus = function () {
|
124
125
|
// if we are now the topmost tearsheet, ensure we have focus
|
125
|
-
if (position === depth && modalRef.current && !modalRef.current.contains(document.activeElement)) {
|
126
|
+
if (open && position === depth && modalRef.current && !modalRef.current.contains(document.activeElement)) {
|
126
127
|
handleStackChange.claimFocus();
|
127
128
|
}
|
128
129
|
};
|
@@ -179,7 +180,6 @@ export var TearsheetShell = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
179
180
|
}
|
180
181
|
}
|
181
182
|
if (position <= depth) {
|
182
|
-
var _cx, _ref2, _cx3, _cx5, _cx6;
|
183
183
|
// Include a modal header if and only if one or more of these is given.
|
184
184
|
// We can't use a Wrap for the ModalHeader because ComposedModal requires
|
185
185
|
// the direct child to be the ModalHeader instance.
|
@@ -188,11 +188,11 @@ export var TearsheetShell = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
188
188
|
// Include an ActionSet if and only if one or more actions is given.
|
189
189
|
var includeActions = actions && (actions === null || actions === void 0 ? void 0 : actions.length) > 0;
|
190
190
|
return renderPortalUse( /*#__PURE__*/React.createElement(ComposedModal, _extends({}, rest, {
|
191
|
-
"aria-label": getNodeTextContent(title),
|
192
|
-
className: cx(bc, className, (
|
191
|
+
"aria-label": ariaLabel || getNodeTextContent(title),
|
192
|
+
className: cx(bc, className, _defineProperty(_defineProperty(_defineProperty({}, "".concat(bc, "--stacked-").concat(position, "-of-").concat(depth),
|
193
193
|
// Don't apply this on the initial open of a single tearsheet.
|
194
|
-
depth > 1 || depth === 1 && prevDepth.current > 1),
|
195
|
-
style: (
|
194
|
+
depth > 1 || depth === 1 && prevDepth.current > 1), "".concat(bc, "--wide"), wide), "".concat(bc, "--narrow"), !wide)),
|
195
|
+
style: _defineProperty(_defineProperty({}, "--".concat(bc, "--stacking-scale-factor-single"), (width - 32) / width), "--".concat(bc, "--stacking-scale-factor-double"), (width - 64) / width),
|
196
196
|
containerClassName: cx("".concat(bc, "__container"), _defineProperty({}, "".concat(bc, "__container--lower"), verticalPosition === 'lower')),
|
197
197
|
onClose: onClose,
|
198
198
|
open: open,
|
@@ -203,7 +203,7 @@ export var TearsheetShell = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
203
203
|
selectorsFloatingMenus: [".".concat(carbonPrefix, "--overflow-menu-options"), ".".concat(carbonPrefix, "--tooltip"), '.flatpickr-calendar', ".".concat(bc, "__container")],
|
204
204
|
size: "sm"
|
205
205
|
}), includeHeader && /*#__PURE__*/React.createElement(ModalHeader, {
|
206
|
-
className: cx("".concat(bc, "__header"), (
|
206
|
+
className: cx("".concat(bc, "__header"), _defineProperty(_defineProperty({}, "".concat(bc, "__header--with-close-icon"), effectiveHasCloseIcon), "".concat(bc, "__header--with-nav"), navigation)),
|
207
207
|
closeClassName: cx(_defineProperty({}, "".concat(bc, "__header--no-close-icon"), !effectiveHasCloseIcon)),
|
208
208
|
closeModal: onClose,
|
209
209
|
iconDescription: closeIconDescription
|
@@ -228,7 +228,7 @@ export var TearsheetShell = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
228
228
|
element: ModalBody,
|
229
229
|
className: "".concat(bc, "__body")
|
230
230
|
}, /*#__PURE__*/React.createElement(Wrap, {
|
231
|
-
className: cx((
|
231
|
+
className: cx(_defineProperty(_defineProperty({}, "".concat(bc, "__influencer"), true), "".concat(bc, "__influencer--wide"), influencerWidth === 'wide')),
|
232
232
|
neverRender: influencerPosition === 'right'
|
233
233
|
}, influencer), /*#__PURE__*/React.createElement(Wrap, {
|
234
234
|
className: "".concat(bc, "__right")
|
@@ -239,7 +239,7 @@ export var TearsheetShell = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
239
239
|
className: "".concat(bc, "__content"),
|
240
240
|
alwaysRender: influencer && influencerPosition === 'right'
|
241
241
|
}, children), /*#__PURE__*/React.createElement(Wrap, {
|
242
|
-
className: cx((
|
242
|
+
className: cx(_defineProperty(_defineProperty({}, "".concat(bc, "__influencer"), true), "".concat(bc, "__influencer--wide"), influencerWidth === 'wide')),
|
243
243
|
neverRender: influencerPosition !== 'right'
|
244
244
|
}, influencer)), includeActions && /*#__PURE__*/React.createElement(Wrap, {
|
245
245
|
className: "".concat(bc, "__button-container")
|
@@ -44,7 +44,6 @@ var defaults = {
|
|
44
44
|
* The `WebTerminal` is prompted by the user and is persistent until dismissed. The purpose of a web terminal is to provide users with the ability to type commands manually instead of using the GUI.
|
45
45
|
*/
|
46
46
|
export var WebTerminal = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
47
|
-
var _ref3;
|
48
47
|
var _ref$actions = _ref.actions,
|
49
48
|
actions = _ref$actions === void 0 ? defaults.actions : _ref$actions,
|
50
49
|
children = _ref.children,
|
@@ -108,7 +107,7 @@ export var WebTerminal = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
108
107
|
};
|
109
108
|
return shouldRender ? /*#__PURE__*/React.createElement("div", _extends({}, _objectSpread(_objectSpread({}, rest), getDevtoolsProps(componentName)), {
|
110
109
|
ref: ref,
|
111
|
-
className: cx([blockClass, className, (
|
110
|
+
className: cx([blockClass, className, _defineProperty(_defineProperty({}, "".concat(blockClass, "--open"), open), "".concat(blockClass, "--closed"), !open)]),
|
112
111
|
style: {
|
113
112
|
animation: !prefersReducedMotion && webTerminalAnimationName
|
114
113
|
},
|
@@ -33,7 +33,6 @@ var componentName = 'ActionSet';
|
|
33
33
|
// NOTE: the component SCSS is not imported here: it is rolled up separately.
|
34
34
|
|
35
35
|
var ActionSetButton = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
|
36
|
-
var _ref2;
|
37
36
|
var className = _ref.className,
|
38
37
|
disabled = _ref.disabled,
|
39
38
|
kind = _ref.kind,
|
@@ -44,7 +43,7 @@ var ActionSetButton = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref
|
|
44
43
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
45
44
|
return /*#__PURE__*/_react.default.createElement(_react2.Button, (0, _extends2.default)({}, rest, {
|
46
45
|
isExpressive: isExpressive,
|
47
|
-
className: (0, _classnames.default)(className, ["".concat(blockClass, "__action-button"), (
|
46
|
+
className: (0, _classnames.default)(className, ["".concat(blockClass, "__action-button"), (0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(blockClass, "__action-button--ghost"), kind === 'ghost' || kind === 'danger--ghost'), "".concat(blockClass, "__action-button--expressive"), isExpressive)]),
|
48
47
|
disabled: disabled || loading || false,
|
49
48
|
kind: kind,
|
50
49
|
ref: ref
|
@@ -79,7 +78,7 @@ var defaults = {
|
|
79
78
|
* right.
|
80
79
|
*/
|
81
80
|
var ActionSet = exports.ActionSet = /*#__PURE__*/_react.default.forwardRef(function (_ref3, ref) {
|
82
|
-
var _actions$slice
|
81
|
+
var _actions$slice;
|
83
82
|
var actions = _ref3.actions,
|
84
83
|
buttonSize = _ref3.buttonSize,
|
85
84
|
className = _ref3.className,
|
@@ -109,7 +108,7 @@ var ActionSet = exports.ActionSet = /*#__PURE__*/_react.default.forwardRef(funct
|
|
109
108
|
return (buttonOrder(action1.kind || defaultKind) - buttonOrder(action2.kind || defaultKind)) * (stacking ? -1 : 1);
|
110
109
|
});
|
111
110
|
return /*#__PURE__*/_react.default.createElement(_react2.ButtonSet, (0, _extends2.default)({}, rest, {
|
112
|
-
className: (0, _classnames.default)(blockClass, className, (
|
111
|
+
className: (0, _classnames.default)(blockClass, className, (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(blockClass, "--row-single"), !stacking && buttons.length === 1), "".concat(blockClass, "--row-double"), !stacking && buttons.length === 2), "".concat(blockClass, "--row-triple"), !stacking && buttons.length === 3), "".concat(blockClass, "--row-quadruple"), !stacking && buttons.length >= 4), "".concat(blockClass, "--stacking"), stacking), "".concat(blockClass, "--").concat(size)),
|
113
112
|
ref: ref,
|
114
113
|
role: "presentation",
|
115
114
|
stacked: stacking
|
@@ -40,7 +40,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
40
40
|
var blockClass = "".concat(_settings.pkg.prefix, "--add-select");
|
41
41
|
var componentName = 'AddSelectBody';
|
42
42
|
var AddSelectBody = exports.AddSelectBody = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
43
|
-
var
|
43
|
+
var _path$;
|
44
44
|
var className = _ref.className,
|
45
45
|
clearFiltersText = _ref.clearFiltersText,
|
46
46
|
closeIconDescription = _ref.closeIconDescription,
|
@@ -135,7 +135,7 @@ var AddSelectBody = exports.AddSelectBody = /*#__PURE__*/(0, _react.forwardRef)(
|
|
135
135
|
resetState();
|
136
136
|
onClose();
|
137
137
|
};
|
138
|
-
var tearsheetClassnames = (0, _classnames.default)(className, blockClass, (
|
138
|
+
var tearsheetClassnames = (0, _classnames.default)(className, blockClass, (0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(blockClass, "__single"), !multi), "".concat(blockClass, "__multi"), multi));
|
139
139
|
var globalFilterKeys = Object.keys(appliedGlobalFilters);
|
140
140
|
var globalFiltersApplied = globalFilterKeys.length > 0;
|
141
141
|
|
@@ -28,7 +28,7 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
28
28
|
var blockClass = "".concat(_settings.pkg.prefix, "--add-select__selections");
|
29
29
|
var componentName = 'AddSelectList';
|
30
30
|
var AddSelectRow = exports.AddSelectRow = function AddSelectRow(_ref) {
|
31
|
-
var _modifiers$options
|
31
|
+
var _modifiers$options;
|
32
32
|
var appliedModifiers = _ref.appliedModifiers,
|
33
33
|
displayMetalPanel = _ref.displayMetalPanel,
|
34
34
|
index = _ref.index,
|
@@ -132,7 +132,7 @@ var AddSelectRow = exports.AddSelectRow = function AddSelectRow(_ref) {
|
|
132
132
|
var selected = isSelected();
|
133
133
|
var expanded = parentSelected === item.id;
|
134
134
|
return /*#__PURE__*/_react.default.createElement("div", {
|
135
|
-
className: (0, _classnames.default)("".concat(blockClass, "-row"), (
|
135
|
+
className: (0, _classnames.default)("".concat(blockClass, "-row"), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(blockClass, "-row--selected"), isSelected()), "".concat(blockClass, "-row-meta--selected"), isInMetaPanel(item.id)), "".concat(blockClass, "-row--active"), expanded)),
|
136
136
|
onKeyDown: onSelectKeyDown,
|
137
137
|
tabIndex: tabIndex,
|
138
138
|
ref: ref,
|
@@ -166,11 +166,10 @@ var Card = exports.Card = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, re
|
|
166
166
|
return icons;
|
167
167
|
};
|
168
168
|
var getCardProps = function getCardProps() {
|
169
|
-
var _cx;
|
170
169
|
var clickable = hasClickEvent && !productive || hasClickEvent && productive && clickZone === 'one';
|
171
170
|
var cardProps = _objectSpread(_objectSpread({}, rest), {}, {
|
172
171
|
ref: ref,
|
173
|
-
className: (0, _classnames.default)(blockClass, (
|
172
|
+
className: (0, _classnames.default)(blockClass, (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(blockClass, "__productive"), productive), "".concat(blockClass, "__clickable"), clickable), "".concat(blockClass, "__media-left"), mediaPosition === 'left'), "".concat(blockClass, "--has-slug"), clickable && slug === true || (0, _typeof2.default)(slug) === 'object'), className)
|
174
173
|
}, clickable && clickableProps);
|
175
174
|
return cardProps;
|
176
175
|
};
|
@@ -24,7 +24,6 @@ var defaults = {
|
|
24
24
|
titleSize: 'default'
|
25
25
|
};
|
26
26
|
var CardHeader = exports.CardHeader = function CardHeader(_ref) {
|
27
|
-
var _cx;
|
28
27
|
var actions = _ref.actions,
|
29
28
|
noActionIcons = _ref.noActionIcons,
|
30
29
|
onPrimaryButtonClick = _ref.onPrimaryButtonClick,
|
@@ -50,7 +49,7 @@ var CardHeader = exports.CardHeader = function CardHeader(_ref) {
|
|
50
49
|
var carbonPrefix = (0, _react2.usePrefix)();
|
51
50
|
var blockClass = "".concat(_settings.pkg.prefix, "--card");
|
52
51
|
var headerClass = "".concat(blockClass, "__header");
|
53
|
-
var headerClasses = (0, _classnames.default)(headerClass, (
|
52
|
+
var headerClasses = (0, _classnames.default)(headerClass, (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(headerClass, "-label-only"), label && !title && !description), "".concat(headerClass, "-has-label"), !!label), "".concat(blockClass, "__title-lg"), titleSize === 'large'));
|
54
53
|
var actionGhostButton = "".concat(blockClass, "__actions-header-ghost-button");
|
55
54
|
var actionGhostButtonClass = (0, _classnames.default)(actionGhostButton, (0, _defineProperty2.default)({}, "".concat(actionGhostButton, "--only"), noActionIcons));
|
56
55
|
var hollowSlugIcon = /*#__PURE__*/_react.default.createElement("svg", {
|
@@ -35,7 +35,6 @@ var defaults = {
|
|
35
35
|
includeStep: true
|
36
36
|
};
|
37
37
|
var CreateFullPageStep = exports.CreateFullPageStep = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
38
|
-
var _cx;
|
39
38
|
var children = _ref.children,
|
40
39
|
className = _ref.className,
|
41
40
|
subtitle = _ref.subtitle,
|
@@ -95,7 +94,7 @@ var CreateFullPageStep = exports.CreateFullPageStep = /*#__PURE__*/(0, _react.fo
|
|
95
94
|
}; // Half.
|
96
95
|
|
97
96
|
return stepsContext ? /*#__PURE__*/_react.default.createElement("section", (0, _extends2.default)({}, rest, {
|
98
|
-
className: (0, _classnames.default)(blockClass, className, (
|
97
|
+
className: (0, _classnames.default)(blockClass, className, (0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(blockClass, "__step--hidden-step"), stepNumber !== (stepsContext === null || stepsContext === void 0 ? void 0 : stepsContext.currentStep)), "".concat(blockClass, "__step--visible-step"), stepNumber === (stepsContext === null || stepsContext === void 0 ? void 0 : stepsContext.currentStep))),
|
99
98
|
ref: ref
|
100
99
|
}), /*#__PURE__*/_react.default.createElement(_react2.Grid, null, /*#__PURE__*/_react.default.createElement(_react2.Column, span, /*#__PURE__*/_react.default.createElement(_react2.Grid, null, /*#__PURE__*/_react.default.createElement(_react2.Column, (0, _extends2.default)({
|
101
100
|
className: "".concat(blockClass, "-title"),
|
@@ -36,7 +36,6 @@ var defaults = {
|
|
36
36
|
includeStep: true
|
37
37
|
};
|
38
38
|
var CreateTearsheetStep = exports.CreateTearsheetStep = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
39
|
-
var _cx;
|
40
39
|
var children = _ref.children,
|
41
40
|
className = _ref.className,
|
42
41
|
description = _ref.description,
|
@@ -112,7 +111,7 @@ var CreateTearsheetStep = exports.CreateTearsheetStep = /*#__PURE__*/(0, _react.
|
|
112
111
|
return null;
|
113
112
|
};
|
114
113
|
return stepsContext ? /*#__PURE__*/_react.default.createElement(_react2.Grid, (0, _extends2.default)({}, rest, {
|
115
|
-
className: (0, _classnames.default)(blockClass, className, (
|
114
|
+
className: (0, _classnames.default)(blockClass, className, (0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(blockClass, "__step--hidden-step"), stepNumber !== (stepsContext === null || stepsContext === void 0 ? void 0 : stepsContext.currentStep)), "".concat(blockClass, "__step--visible-step"), stepNumber === (stepsContext === null || stepsContext === void 0 ? void 0 : stepsContext.currentStep))),
|
116
115
|
ref: ref
|
117
116
|
}), /*#__PURE__*/_react.default.createElement(_react2.Column, {
|
118
117
|
xlg: 12,
|
@@ -68,7 +68,6 @@ var defaults = {
|
|
68
68
|
* DataSpreadsheet: used to organize and display large amounts of structured data, separated by columns and rows in a grid-like format.
|
69
69
|
*/
|
70
70
|
var DataSpreadsheet = exports.DataSpreadsheet = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
|
71
|
-
var _cx;
|
72
71
|
var _ref$cellSize = _ref.cellSize,
|
73
72
|
cellSize = _ref$cellSize === void 0 ? defaults.cellSize : _ref$cellSize,
|
74
73
|
className = _ref.className,
|
@@ -710,7 +709,7 @@ var DataSpreadsheet = exports.DataSpreadsheet = /*#__PURE__*/_react.default.forw
|
|
710
709
|
handleActiveCellMouseEnterCallback(selectionAreas, clickAndHoldActive);
|
711
710
|
}, [clickAndHoldActive, selectionAreas, handleActiveCellMouseEnterCallback]);
|
712
711
|
return /*#__PURE__*/_react.default.createElement("div", (0, _extends2.default)({}, rest, getTableProps(), (0, _devtools.getDevtoolsProps)(componentName), {
|
713
|
-
className: (0, _classnames.default)(blockClass, className, "".concat(blockClass, "--interactive-cell-element"), (
|
712
|
+
className: (0, _classnames.default)(blockClass, className, "".concat(blockClass, "--interactive-cell-element"), (0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(blockClass, "__container-has-focus"), containerHasFocus), "".concat(blockClass, "__").concat(theme), theme === 'dark')),
|
714
713
|
ref: spreadsheetRef,
|
715
714
|
role: "grid",
|
716
715
|
tabIndex: 0,
|
@@ -364,7 +364,6 @@ var DataSpreadsheetBody = exports.DataSpreadsheetBody = /*#__PURE__*/(0, _react.
|
|
364
364
|
style = _ref3.style;
|
365
365
|
var row = rows[index];
|
366
366
|
if (rows && rows.length) {
|
367
|
-
var _cx;
|
368
367
|
prepareRow(row);
|
369
368
|
return /*#__PURE__*/_react.default.createElement("div", (0, _extends2.default)({}, row.getRowProps({
|
370
369
|
style: style
|
@@ -383,7 +382,7 @@ var DataSpreadsheetBody = exports.DataSpreadsheetBody = /*#__PURE__*/(0, _react.
|
|
383
382
|
"data-column-index": "header",
|
384
383
|
type: "button",
|
385
384
|
onClick: handleRowHeaderClick(index),
|
386
|
-
className: (0, _classnames.default)("".concat(blockClass, "__td"), "".concat(blockClass, "__td-th"), "".concat(blockClass, "--interactive-cell-element"), (
|
385
|
+
className: (0, _classnames.default)("".concat(blockClass, "__td"), "".concat(blockClass, "__td-th"), "".concat(blockClass, "--interactive-cell-element"), (0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(blockClass, "__td-th--active-header"), (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.row) === index || (0, _checkActiveHeaderCell.checkActiveHeaderCell)(index, selectionAreas, 'row')), "".concat(blockClass, "__td-th--selected-header"), (0, _checkSelectedHeaderCell.checkSelectedHeaderCell)(index, selectionAreas, 'row', columns))),
|
387
386
|
style: {
|
388
387
|
width: defaultColumn === null || defaultColumn === void 0 ? void 0 : defaultColumn.rowHeaderWidth
|
389
388
|
}
|
@@ -176,7 +176,6 @@ var DataSpreadsheetHeader = exports.DataSpreadsheetHeader = /*#__PURE__*/(0, _re
|
|
176
176
|
onClick: handleSelectAllClick,
|
177
177
|
className: (0, _classnames.default)("".concat(blockClass, "__th"), "".concat(blockClass, "--interactive-cell-element"), "".concat(blockClass, "__th--select-all"), (0, _defineProperty2.default)({}, "".concat(blockClass, "__th--active-header"), (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.column) === 'header' && (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.row) === 'header'))
|
178
178
|
}, "\xA0")), headerGroup.headers.map(function (column, index) {
|
179
|
-
var _cx2;
|
180
179
|
var selectedHeader = (0, _checkSelectedHeaderCell.checkSelectedHeaderCell)(index, selectionAreas, 'column', rows);
|
181
180
|
return /*#__PURE__*/_react.default.createElement("div", (0, _extends2.default)({
|
182
181
|
key: "column_".concat(index),
|
@@ -196,7 +195,7 @@ var DataSpreadsheetHeader = exports.DataSpreadsheetHeader = /*#__PURE__*/(0, _re
|
|
196
195
|
height: defaultColumn === null || defaultColumn === void 0 ? void 0 : defaultColumn.rowHeight,
|
197
196
|
width: (column === null || column === void 0 ? void 0 : column.width) || (defaultColumn === null || defaultColumn === void 0 ? void 0 : defaultColumn.width)
|
198
197
|
},
|
199
|
-
className: (0, _classnames.default)("".concat(blockClass, "__th"), "".concat(blockClass, "--interactive-cell-element"), (
|
198
|
+
className: (0, _classnames.default)("".concat(blockClass, "__th"), "".concat(blockClass, "--interactive-cell-element"), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(blockClass, "__th--active-header"), (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.column) === index || (0, _checkActiveHeaderCell.checkActiveHeaderCell)(index, selectionAreas, 'column')), "".concat(blockClass, "__th--selected-header"), selectedHeader), "".concat(blockClass, "__th--selected-header-reorder-active"), selectedHeaderReorderActive)),
|
200
199
|
type: "button"
|
201
200
|
}, column.render('Header')));
|
202
201
|
}));
|
@@ -39,7 +39,6 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
39
39
|
var blockClass = "".concat(_settings.pkg.prefix, "--datagrid");
|
40
40
|
var gcClass = "".concat(blockClass, "__grid-container");
|
41
41
|
var DatagridContent = exports.DatagridContent = function DatagridContent(_ref) {
|
42
|
-
var _cx5;
|
43
42
|
var datagridState = _ref.datagridState,
|
44
43
|
title = _ref.title;
|
45
44
|
var _useContext = (0, _react.useContext)(_InlineEditContext.InlineEditContext),
|
@@ -142,8 +141,6 @@ var DatagridContent = exports.DatagridContent = function DatagridContent(_ref) {
|
|
142
141
|
(0, _hooks3.useSubscribeToEventEmitter)(_constants.CLEAR_SINGLE_FILTER, function (id) {
|
143
142
|
return (0, _FilterProvider.clearSingleFilter)(id, setAllFilters, state);
|
144
143
|
});
|
145
|
-
|
146
|
-
/* istanbul ignore next */
|
147
144
|
var renderFilterSummary = function renderFilterSummary() {
|
148
145
|
return state.filters.length > 0 && /*#__PURE__*/_react.default.createElement(_FilterSummary.FilterSummary, {
|
149
146
|
className: "".concat(blockClass, "__filter-summary"),
|
@@ -156,15 +153,13 @@ var DatagridContent = exports.DatagridContent = function DatagridContent(_ref) {
|
|
156
153
|
});
|
157
154
|
};
|
158
155
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_react2.TableContainer, {
|
159
|
-
className: (0, _classnames.default)("".concat(gcClass), (
|
156
|
+
className: (0, _classnames.default)("".concat(gcClass), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(gcClass, "-active"), gridActive), "".concat(gcClass, "-active--without-toolbar"), withInlineEdit && !DatagridActions), "".concat(gcClass, "-inline-edit"), withInlineEdit), "".concat(blockClass, "__full-height"), withVirtualScroll || fullHeightDatagrid), "".concat(blockClass, "__with-pagination"), DatagridPagination), "".concat(blockClass, "__dense-header"), useDenseHeader)),
|
160
157
|
title: gridTitle,
|
161
158
|
description: gridDescription
|
162
159
|
}, /*#__PURE__*/_react.default.createElement(_DatagridToolbar.default, datagridState), /*#__PURE__*/_react.default.createElement("div", {
|
163
160
|
className: (0, _classnames.default)("".concat(blockClass, "__table-container"), (0, _defineProperty2.default)({}, "".concat(blockClass, "__table-container--filter-open"), panelOpen)),
|
164
161
|
ref: gridAreaRef
|
165
|
-
}, (filterProps === null || filterProps === void 0 ? void 0 : filterProps.variation) === 'panel' && /*#__PURE__*/_react.default.createElement(_Filtering.FilterPanel, (0, _extends2.default)({
|
166
|
-
updateMethod: "batch"
|
167
|
-
}, getFilterFlyoutProps(), {
|
162
|
+
}, (filterProps === null || filterProps === void 0 ? void 0 : filterProps.variation) === 'panel' && /*#__PURE__*/_react.default.createElement(_Filtering.FilterPanel, (0, _extends2.default)({}, getFilterFlyoutProps(), {
|
168
163
|
title: filterProps.panelTitle,
|
169
164
|
filterSections: filterProps.sections,
|
170
165
|
autoHideFilters: filterProps.autoHideFilters,
|
@@ -55,6 +55,7 @@ var ResizeHeader = function ResizeHeader(_ref) {
|
|
55
55
|
dispatch = _ref.dispatch,
|
56
56
|
onColResizeEnd = _ref.onColResizeEnd,
|
57
57
|
resizerAriaLabel = _ref.resizerAriaLabel;
|
58
|
+
// eslint-disable-next-line no-unused-vars
|
58
59
|
var role = resizerProps.role,
|
59
60
|
headerProps = (0, _objectWithoutProperties2.default)(resizerProps, _excluded);
|
60
61
|
var mouseDownHandler = function mouseDownHandler(evt) {
|
@@ -80,9 +81,7 @@ var ResizeHeader = function ResizeHeader(_ref) {
|
|
80
81
|
var keyUpHandler = function keyUpHandler() {
|
81
82
|
(0, _stateReducer.handleColumnResizeEndEvent)(dispatch, onColResizeEnd, header.id, true);
|
82
83
|
};
|
83
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("input", (0, _extends2.default)({}, headerProps,
|
84
|
-
role: role
|
85
|
-
}, {
|
84
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("input", (0, _extends2.default)({}, headerProps, {
|
86
85
|
onMouseDown: mouseDownHandler,
|
87
86
|
onKeyDown: keyDownHandler,
|
88
87
|
onKeyUp: keyUpHandler,
|
@@ -137,16 +136,14 @@ var HeaderRow = function HeaderRow(datagridState, headRef, headerGroup) {
|
|
137
136
|
headerGroupClassName = _headerGroup$getHeade.className,
|
138
137
|
role = _headerGroup$getHeade.role,
|
139
138
|
headerGroupProps = (0, _objectWithoutProperties2.default)(_headerGroup$getHeade, _excluded2);
|
140
|
-
return /*#__PURE__*/_react.default.createElement(_react2.TableRow, (0, _extends2.default)({}, headerGroupProps,
|
141
|
-
role: role
|
142
|
-
}, {
|
139
|
+
return /*#__PURE__*/_react.default.createElement(_react2.TableRow, (0, _extends2.default)({}, headerGroupProps, {
|
143
140
|
className: (0, _classnames.default)("".concat(blockClass, "__head"), headerGroupClassName),
|
144
141
|
ref: headRef
|
145
142
|
}), datagridState.headers.filter(function (_ref3) {
|
146
143
|
var isVisible = _ref3.isVisible;
|
147
144
|
return isVisible;
|
148
145
|
}).map(function (header, index) {
|
149
|
-
var _header$getResizerPro
|
146
|
+
var _header$getResizerPro;
|
150
147
|
if (header.id === _commonColumnIds.selectionColumnId) {
|
151
148
|
// render directly without the wrapper TableHeader
|
152
149
|
return header.render('Header', {
|
@@ -169,12 +166,10 @@ var HeaderRow = function HeaderRow(datagridState, headRef, headerGroup) {
|
|
169
166
|
headerProps = (0, _objectWithoutProperties2.default)(_header$getHeaderProp, _excluded3);
|
170
167
|
var resizerProps = header === null || header === void 0 || (_header$getResizerPro = header.getResizerProps) === null || _header$getResizerPro === void 0 ? void 0 : _header$getResizerPro.call(header);
|
171
168
|
return /*#__PURE__*/_react.default.createElement(_react2.TableHeader, (0, _extends2.default)({}, headerProps, {
|
172
|
-
className: (0, _classnames.default)(headerClassName, (
|
169
|
+
className: (0, _classnames.default)(headerClassName, (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(blockClass, "__resizableColumn"), resizerProps), "".concat(blockClass, "__isResizing"), header.isResizing), "".concat(blockClass, "__sortableColumn"), datagridState.isTableSortable && header.id !== 'spacer'), "".concat(blockClass, "__isSorted"), header.isSorted), "".concat(blockClass, "__header-actions-column"), header.isAction)),
|
173
170
|
key: header.id,
|
174
171
|
"aria-hidden": header.id === 'spacer' && 'true'
|
175
|
-
}, getAccessibilityProps(header),
|
176
|
-
role: role
|
177
|
-
}), header.render('Header'), resizerProps && !header.isAction && /*#__PURE__*/_react.default.createElement(ResizeHeader, {
|
172
|
+
}, getAccessibilityProps(header)), header.render('Header'), resizerProps && !header.isAction && /*#__PURE__*/_react.default.createElement(ResizeHeader, {
|
178
173
|
resizerProps: resizerProps,
|
179
174
|
header: header,
|
180
175
|
handleOnMouseDownResize: handleOnMouseDownResize,
|