@carbon/ibm-products 2.19.2 → 2.20.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (30) hide show
  1. package/css/index-full-carbon.css +128 -107
  2. package/css/index-full-carbon.css.map +1 -1
  3. package/css/index-full-carbon.min.css +1 -1
  4. package/css/index-full-carbon.min.css.map +1 -1
  5. package/css/index-without-carbon-released-only.css +17 -18
  6. package/css/index-without-carbon-released-only.css.map +1 -1
  7. package/css/index-without-carbon-released-only.min.css +1 -1
  8. package/css/index-without-carbon-released-only.min.css.map +1 -1
  9. package/css/index-without-carbon.css +17 -18
  10. package/css/index-without-carbon.css.map +1 -1
  11. package/css/index-without-carbon.min.css +1 -1
  12. package/css/index-without-carbon.min.css.map +1 -1
  13. package/css/index.css +39 -19
  14. package/css/index.css.map +1 -1
  15. package/css/index.min.css +1 -1
  16. package/css/index.min.css.map +1 -1
  17. package/es/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +47 -4
  18. package/es/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +6 -2
  19. package/es/components/Datagrid/Datagrid/addons/Filtering/motion/variants.js +63 -41
  20. package/es/components/SidePanel/SidePanel.js +6 -1
  21. package/es/components/Tearsheet/TearsheetShell.js +1 -1
  22. package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +46 -3
  23. package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +5 -1
  24. package/lib/components/Datagrid/Datagrid/addons/Filtering/motion/variants.js +63 -41
  25. package/lib/components/SidePanel/SidePanel.js +6 -1
  26. package/lib/components/Tearsheet/TearsheetShell.js +1 -1
  27. package/package.json +4 -4
  28. package/scss/components/Datagrid/styles/_datagrid.scss +8 -0
  29. package/scss/components/Datagrid/styles/addons/_FilterFlyout.scss +11 -8
  30. package/scss/components/SidePanel/_side-panel.scss +4 -2
@@ -1,55 +1,77 @@
1
+ /**
2
+ * Copyright IBM Corp. 2023, 2024
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
1
8
  import { DURATIONS, EASINGS } from '../../../../../../global/js/utils/motionConstants';
2
9
  import { ACTION_SET_HEIGHT, PANEL_WIDTH } from '../constants';
3
10
  export var panelVariants = {
4
- hidden: {
5
- width: 0,
6
- overflow: 'hidden',
7
- transition: {
8
- duration: DURATIONS.fast02,
9
- ease: EASINGS.productive.exit,
10
- when: 'afterChildren'
11
- }
11
+ hidden: function hidden(shouldReduceMotion) {
12
+ return {
13
+ width: 0,
14
+ overflow: 'hidden',
15
+ transition: {
16
+ duration: shouldReduceMotion ? 0 : DURATIONS.fast02,
17
+ ease: shouldReduceMotion ? 0 : EASINGS.productive.exit,
18
+ when: 'afterChildren'
19
+ }
20
+ };
12
21
  },
13
- visible: {
14
- width: PANEL_WIDTH,
15
- overflow: 'visible',
16
- transition: {
17
- duration: DURATIONS.moderate02,
18
- ease: EASINGS.productive.entrance,
19
- when: 'beforeChildren'
20
- }
22
+ visible: function visible(shouldReduceMotion) {
23
+ return {
24
+ width: PANEL_WIDTH,
25
+ overflow: 'visible',
26
+ transition: {
27
+ duration: shouldReduceMotion ? 0 : DURATIONS.moderate02,
28
+ ease: shouldReduceMotion ? 0 : EASINGS.productive.entrance,
29
+ when: 'beforeChildren'
30
+ }
31
+ };
21
32
  }
22
33
  };
23
34
  export var innerContainerVariants = {
24
- hidden: {
25
- opacity: 0,
26
- transition: {
27
- duration: DURATIONS.fast01,
28
- ease: EASINGS.productive.exit
29
- }
35
+ hidden: function hidden(shouldReduceMotion) {
36
+ return {
37
+ opacity: 0,
38
+ transition: {
39
+ duration: shouldReduceMotion ? DURATIONS.moderate01 : DURATIONS.fast01,
40
+ ease: shouldReduceMotion ? 0 : EASINGS.productive.exit
41
+ }
42
+ };
30
43
  },
31
- visible: {
32
- opacity: 1,
33
- transition: {
34
- duration: DURATIONS.fast02,
35
- ease: EASINGS.productive.entrance,
36
- when: 'beforeChildren'
37
- }
44
+ visible: function visible(shouldReduceMotion) {
45
+ return {
46
+ opacity: 1,
47
+ transition: {
48
+ duration: shouldReduceMotion ? DURATIONS.moderate01 : DURATIONS.fast02,
49
+ ease: shouldReduceMotion ? 0 : EASINGS.productive.entrance,
50
+ when: shouldReduceMotion ? null : 'beforeChildren'
51
+ }
52
+ };
38
53
  }
39
54
  };
40
55
  export var actionSetVariants = {
41
- hidden: {
42
- y: ACTION_SET_HEIGHT,
43
- transition: {
44
- duration: DURATIONS.fast01,
45
- ease: EASINGS.productive.exit
46
- }
56
+ hidden: function hidden(shouldReduceMotion) {
57
+ return {
58
+ y: shouldReduceMotion ? 0 : ACTION_SET_HEIGHT,
59
+ opacity: shouldReduceMotion ? 0 : 1,
60
+ transition: {
61
+ duration: shouldReduceMotion ? DURATIONS.moderate01 : DURATIONS.fast01,
62
+ ease: shouldReduceMotion ? 0 : EASINGS.productive.exit
63
+ }
64
+ };
47
65
  },
48
- visible: {
49
- y: 0,
50
- transition: {
51
- duration: DURATIONS.fast02,
52
- ease: EASINGS.productive.entrance
53
- }
66
+ visible: function visible(shouldReduceMotion) {
67
+ return {
68
+ y: 0,
69
+ opacity: 1,
70
+ transition: {
71
+ duration: shouldReduceMotion ? DURATIONS.moderate01 : DURATIONS.fast02,
72
+ ease: shouldReduceMotion ? 0 : EASINGS.productive.entrance,
73
+ delay: shouldReduceMotion ? 0.075 : 0
74
+ }
75
+ };
54
76
  }
55
77
  };
@@ -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
 
@@ -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.style.inlineSize = 'auto';
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;
@@ -122,7 +122,7 @@ export var TearsheetShell = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
122
122
  }
123
123
  handleStackChange.checkFocus = function () {
124
124
  // if we are now the topmost tearsheet, ensure we have focus
125
- if (position === depth && modalRef.current && !modalRef.current.contains(document.activeElement)) {
125
+ if (open && position === depth && modalRef.current && !modalRef.current.contains(document.activeElement)) {
126
126
  handleStackChange.claimFocus();
127
127
  }
128
128
  };
@@ -18,11 +18,12 @@ var _settings = require("../../../../../settings");
18
18
  var _ActionSet = require("../../../../ActionSet");
19
19
  var _constants = require("./constants");
20
20
  var _hooks2 = require("./hooks");
21
+ var _layout = require("@carbon/layout");
21
22
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
22
23
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
23
24
  // @flow
24
25
  /**
25
- * Copyright IBM Corp. 2022, 2023
26
+ * Copyright IBM Corp. 2022, 2024
26
27
  *
27
28
  * This source code is licensed under the Apache-2.0 license found in the
28
29
  * LICENSE file in the root directory of this source tree.
@@ -62,6 +63,10 @@ var FilterFlyout = function FilterFlyout(_ref) {
62
63
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
63
64
  open = _useState2[0],
64
65
  setOpen = _useState2[1];
66
+ var _useState3 = (0, _react2.useState)(false),
67
+ _useState4 = (0, _slicedToArray2.default)(_useState3, 2),
68
+ stackedLayout = _useState4[0],
69
+ setStackedLayout = _useState4[1];
65
70
  var _useFilters = (0, _hooks2.useFilters)({
66
71
  updateMethod: updateMethod,
67
72
  filters: filters,
@@ -78,9 +83,13 @@ var FilterFlyout = function FilterFlyout(_ref) {
78
83
  renderFilter = _useFilters.renderFilter,
79
84
  filtersObjectArray = _useFilters.filtersObjectArray,
80
85
  lastAppliedFilters = _useFilters.lastAppliedFilters;
86
+ var width = _layout.breakpoints.md.width;
87
+ var mdPxWidth = parseInt(width) * 16;
81
88
 
82
89
  /** Refs */
83
90
  var filterFlyoutRef = (0, _react2.useRef)(null);
91
+ var flyoutInnerRef = (0, _react2.useRef)(null);
92
+ var flyoutFiltersContainerRef = (0, _react2.useRef)(null);
84
93
 
85
94
  /** State from hooks */
86
95
  var _useShouldDisableButt = (0, _hooks2.useShouldDisableButtons)({
@@ -91,6 +100,33 @@ var FilterFlyout = function FilterFlyout(_ref) {
91
100
  _useShouldDisableButt2 = (0, _slicedToArray2.default)(_useShouldDisableButt, 2),
92
101
  shouldDisableButtons = _useShouldDisableButt2[0],
93
102
  setShouldDisableButtons = _useShouldDisableButt2[1];
103
+ var handleResize = function handleResize(current) {
104
+ var filterFlyoutRefPosition = flyoutInnerRef === null || flyoutInnerRef === void 0 ? void 0 : flyoutInnerRef.current.getBoundingClientRect();
105
+ var originalFlyoutWidth = parseInt(window.getComputedStyle(flyoutInnerRef === null || flyoutInnerRef === void 0 ? void 0 : flyoutInnerRef.current).getPropertyValue('width'));
106
+ // Check to see if left value from flyout getBoundingClientRect is a negative number
107
+ // If it is, that is the amount we need to subtract from the flyout width
108
+ if (Math.sign(filterFlyoutRefPosition.left) === -1) {
109
+ var newFlyoutWidth = originalFlyoutWidth - Math.abs(filterFlyoutRefPosition.left);
110
+ flyoutInnerRef.current.style.width = (0, _layout.px)(newFlyoutWidth);
111
+ }
112
+ // Check to see if left value from flyout getBoundingClientRect is a positive number or 0
113
+ // If it is, that is the amount we need to add to the flyout width until we reach the
114
+ // max-width of the flyout (642)
115
+ if (originalFlyoutWidth < 642 && Math.sign(filterFlyoutRefPosition.left) === 1 || Math.sign(filterFlyoutRefPosition.left).toString() === '0') {
116
+ var _newFlyoutWidth = originalFlyoutWidth + Math.abs(filterFlyoutRefPosition.left);
117
+ flyoutInnerRef.current.style.width = (0, _layout.px)(_newFlyoutWidth);
118
+ }
119
+ // Begin stacking filters at this specific point
120
+ if ((current === null || current === void 0 ? void 0 : current.innerWidth) <= mdPxWidth + 254) {
121
+ setStackedLayout(true);
122
+ } else {
123
+ setStackedLayout(false);
124
+ }
125
+ };
126
+ (0, _hooks.useWindowResize)(function (_ref2) {
127
+ var current = _ref2.current;
128
+ handleResize(current);
129
+ });
94
130
 
95
131
  /** Memos */
96
132
  var showActionSet = updateMethod === _constants.BATCH;
@@ -104,7 +140,12 @@ var FilterFlyout = function FilterFlyout(_ref) {
104
140
  var closeFlyout = function closeFlyout() {
105
141
  setOpen(false);
106
142
  onFlyoutClose();
143
+ flyoutInnerRef.current.style.width = (0, _layout.px)(642);
107
144
  };
145
+ (0, _react2.useEffect)(function () {
146
+ // Initialize flyout width
147
+ flyoutInnerRef.current.style.width = (0, _layout.px)(642);
148
+ }, []);
108
149
  var apply = function apply() {
109
150
  setAllFilters(filtersObjectArray);
110
151
  closeFlyout();
@@ -172,13 +213,15 @@ var FilterFlyout = function FilterFlyout(_ref) {
172
213
  className: (0, _classnames.default)("".concat(componentClass, "__trigger"), (0, _defineProperty2.default)({}, "".concat(componentClass, "__trigger--open"), open)),
173
214
  disabled: data.length === 0
174
215
  }, /*#__PURE__*/_react2.default.createElement(_icons.Filter, null)), /*#__PURE__*/_react2.default.createElement("div", {
175
- className: (0, _classnames.default)(componentClass, (_cx2 = {}, (0, _defineProperty2.default)(_cx2, "".concat(componentClass, "--open"), open), (0, _defineProperty2.default)(_cx2, "".concat(componentClass, "--batch"), showActionSet), (0, _defineProperty2.default)(_cx2, "".concat(componentClass, "--instant"), !showActionSet), _cx2))
216
+ className: (0, _classnames.default)(componentClass, (_cx2 = {}, (0, _defineProperty2.default)(_cx2, "".concat(componentClass, "--open"), open), (0, _defineProperty2.default)(_cx2, "".concat(componentClass, "--batch"), showActionSet), (0, _defineProperty2.default)(_cx2, "".concat(componentClass, "--instant"), !showActionSet), _cx2)),
217
+ ref: flyoutInnerRef
176
218
  }, /*#__PURE__*/_react2.default.createElement("div", {
177
219
  className: "".concat(componentClass, "__inner-container")
178
220
  }, /*#__PURE__*/_react2.default.createElement("span", {
179
221
  className: "".concat(componentClass, "__title")
180
222
  }, title), /*#__PURE__*/_react2.default.createElement("div", {
181
- className: "".concat(componentClass, "__filters")
223
+ className: (0, _classnames.default)("".concat(componentClass, "__filters"), (0, _defineProperty2.default)({}, "".concat(componentClass, "__stacked"), stackedLayout)),
224
+ ref: flyoutFiltersContainerRef
182
225
  }, renderFilters())), renderActionSet()));
183
226
  };
184
227
  FilterFlyout.propTypes = {
@@ -25,7 +25,7 @@ var _layout = require("@carbon/layout");
25
25
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
26
26
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
27
27
  /**
28
- * Copyright IBM Corp. 2022, 2023
28
+ * Copyright IBM Corp. 2022, 2024
29
29
  *
30
30
  * This source code is licensed under the Apache-2.0 license found in the
31
31
  * LICENSE file in the root directory of this source tree.
@@ -117,6 +117,7 @@ var FilterPanel = function FilterPanel(_ref) {
117
117
  _useShouldDisableButt2 = (0, _slicedToArray2.default)(_useShouldDisableButt, 2),
118
118
  shouldDisableButtons = _useShouldDisableButt2[0],
119
119
  setShouldDisableButtons = _useShouldDisableButt2[1];
120
+ var shouldReduceMotion = (0, _framerMotion.useReducedMotion)();
120
121
 
121
122
  /** Memos */
122
123
  var showActionSet = (0, _react2.useMemo)(function () {
@@ -159,6 +160,7 @@ var FilterPanel = function FilterPanel(_ref) {
159
160
  }],
160
161
  className: "".concat(componentClass, "__action-set"),
161
162
  ref: actionSetRef,
163
+ custom: shouldReduceMotion,
162
164
  variants: _variants.actionSetVariants
163
165
  });
164
166
  };
@@ -196,8 +198,10 @@ var FilterPanel = function FilterPanel(_ref) {
196
198
  className: (0, _classnames.default)(componentClass, "".concat(componentClass, "__container"), (_cx = {}, (0, _defineProperty2.default)(_cx, "".concat(componentClass, "--open"), panelOpen), (0, _defineProperty2.default)(_cx, "".concat(componentClass, "--batch"), showActionSet), (0, _defineProperty2.default)(_cx, "".concat(componentClass, "--instant"), !showActionSet), _cx)),
197
199
  initial: false,
198
200
  animate: panelOpen ? 'visible' : 'hidden',
201
+ custom: shouldReduceMotion,
199
202
  variants: _variants.panelVariants
200
203
  }, /*#__PURE__*/_react2.default.createElement(_framerMotion.motion.div, {
204
+ custom: shouldReduceMotion,
201
205
  variants: _variants.innerContainerVariants
202
206
  }, /*#__PURE__*/_react2.default.createElement("header", {
203
207
  ref: filterHeadingRef,
@@ -6,56 +6,78 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.panelVariants = exports.innerContainerVariants = exports.actionSetVariants = void 0;
7
7
  var _motionConstants = require("../../../../../../global/js/utils/motionConstants");
8
8
  var _constants = require("../constants");
9
+ /**
10
+ * Copyright IBM Corp. 2023, 2024
11
+ *
12
+ * This source code is licensed under the Apache-2.0 license found in the
13
+ * LICENSE file in the root directory of this source tree.
14
+ */
15
+
9
16
  var panelVariants = exports.panelVariants = {
10
- hidden: {
11
- width: 0,
12
- overflow: 'hidden',
13
- transition: {
14
- duration: _motionConstants.DURATIONS.fast02,
15
- ease: _motionConstants.EASINGS.productive.exit,
16
- when: 'afterChildren'
17
- }
17
+ hidden: function hidden(shouldReduceMotion) {
18
+ return {
19
+ width: 0,
20
+ overflow: 'hidden',
21
+ transition: {
22
+ duration: shouldReduceMotion ? 0 : _motionConstants.DURATIONS.fast02,
23
+ ease: shouldReduceMotion ? 0 : _motionConstants.EASINGS.productive.exit,
24
+ when: 'afterChildren'
25
+ }
26
+ };
18
27
  },
19
- visible: {
20
- width: _constants.PANEL_WIDTH,
21
- overflow: 'visible',
22
- transition: {
23
- duration: _motionConstants.DURATIONS.moderate02,
24
- ease: _motionConstants.EASINGS.productive.entrance,
25
- when: 'beforeChildren'
26
- }
28
+ visible: function visible(shouldReduceMotion) {
29
+ return {
30
+ width: _constants.PANEL_WIDTH,
31
+ overflow: 'visible',
32
+ transition: {
33
+ duration: shouldReduceMotion ? 0 : _motionConstants.DURATIONS.moderate02,
34
+ ease: shouldReduceMotion ? 0 : _motionConstants.EASINGS.productive.entrance,
35
+ when: 'beforeChildren'
36
+ }
37
+ };
27
38
  }
28
39
  };
29
40
  var innerContainerVariants = exports.innerContainerVariants = {
30
- hidden: {
31
- opacity: 0,
32
- transition: {
33
- duration: _motionConstants.DURATIONS.fast01,
34
- ease: _motionConstants.EASINGS.productive.exit
35
- }
41
+ hidden: function hidden(shouldReduceMotion) {
42
+ return {
43
+ opacity: 0,
44
+ transition: {
45
+ duration: shouldReduceMotion ? _motionConstants.DURATIONS.moderate01 : _motionConstants.DURATIONS.fast01,
46
+ ease: shouldReduceMotion ? 0 : _motionConstants.EASINGS.productive.exit
47
+ }
48
+ };
36
49
  },
37
- visible: {
38
- opacity: 1,
39
- transition: {
40
- duration: _motionConstants.DURATIONS.fast02,
41
- ease: _motionConstants.EASINGS.productive.entrance,
42
- when: 'beforeChildren'
43
- }
50
+ visible: function visible(shouldReduceMotion) {
51
+ return {
52
+ opacity: 1,
53
+ transition: {
54
+ duration: shouldReduceMotion ? _motionConstants.DURATIONS.moderate01 : _motionConstants.DURATIONS.fast02,
55
+ ease: shouldReduceMotion ? 0 : _motionConstants.EASINGS.productive.entrance,
56
+ when: shouldReduceMotion ? null : 'beforeChildren'
57
+ }
58
+ };
44
59
  }
45
60
  };
46
61
  var actionSetVariants = exports.actionSetVariants = {
47
- hidden: {
48
- y: _constants.ACTION_SET_HEIGHT,
49
- transition: {
50
- duration: _motionConstants.DURATIONS.fast01,
51
- ease: _motionConstants.EASINGS.productive.exit
52
- }
62
+ hidden: function hidden(shouldReduceMotion) {
63
+ return {
64
+ y: shouldReduceMotion ? 0 : _constants.ACTION_SET_HEIGHT,
65
+ opacity: shouldReduceMotion ? 0 : 1,
66
+ transition: {
67
+ duration: shouldReduceMotion ? _motionConstants.DURATIONS.moderate01 : _motionConstants.DURATIONS.fast01,
68
+ ease: shouldReduceMotion ? 0 : _motionConstants.EASINGS.productive.exit
69
+ }
70
+ };
53
71
  },
54
- visible: {
55
- y: 0,
56
- transition: {
57
- duration: _motionConstants.DURATIONS.fast02,
58
- ease: _motionConstants.EASINGS.productive.entrance
59
- }
72
+ visible: function visible(shouldReduceMotion) {
73
+ return {
74
+ y: 0,
75
+ opacity: 1,
76
+ transition: {
77
+ duration: shouldReduceMotion ? _motionConstants.DURATIONS.moderate01 : _motionConstants.DURATIONS.fast02,
78
+ ease: shouldReduceMotion ? 0 : _motionConstants.EASINGS.productive.entrance,
79
+ delay: shouldReduceMotion ? 0.075 : 0
80
+ }
81
+ };
60
82
  }
61
83
  };
@@ -26,6 +26,7 @@ var _react2 = require("@carbon/react");
26
26
  var _icons = require("@carbon/react/icons");
27
27
  var _ActionSet = require("../ActionSet");
28
28
  var _variants = require("./motion/variants");
29
+ var _pconsole = _interopRequireDefault(require("../../global/js/utils/pconsole"));
29
30
  var _excluded = ["actionToolbarButtons", "actions", "animateTitle", "children", "className", "closeIconDescription", "condensedActions", "currentStep", "id", "includeOverlay", "labelText", "navigationBackIconDescription", "onNavigationBack", "onRequestClose", "onUnmount", "open", "placement", "preventCloseOnClickOutside", "selectorPageContent", "selectorPrimaryFocus", "size", "slideIn", "slug", "subtitle", "title"],
30
31
  _excluded2 = ["label", "kind", "icon", "tooltipPosition", "tooltipAlignment", "leading", "disabled", "className", "onClick"];
31
32
  /**
@@ -352,7 +353,11 @@ var SidePanel = exports.SidePanel = /*#__PURE__*/_react.default.forwardRef(funct
352
353
  (0, _react.useEffect)(function () {
353
354
  if (open && slideIn) {
354
355
  var pageContentElement = document.querySelector(selectorPageContent);
355
- pageContentElement.style.inlineSize = 'auto';
356
+ if (pageContentElement) {
357
+ pageContentElement.style.inlineSize = 'auto';
358
+ } else {
359
+ _pconsole.default.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.');
360
+ }
356
361
  if (placement && placement === 'right' && pageContentElement) {
357
362
  pageContentElement.style.marginInlineEnd = 0;
358
363
  pageContentElement.style.transition = !reducedMotion.matches ? "margin-inline-end ".concat(_motion.moderate02) : null;
@@ -128,7 +128,7 @@ var TearsheetShell = exports.TearsheetShell = /*#__PURE__*/_react.default.forwar
128
128
  }
129
129
  handleStackChange.checkFocus = function () {
130
130
  // if we are now the topmost tearsheet, ensure we have focus
131
- if (position === depth && modalRef.current && !modalRef.current.contains(document.activeElement)) {
131
+ if (open && position === depth && modalRef.current && !modalRef.current.contains(document.activeElement)) {
132
132
  handleStackChange.claimFocus();
133
133
  }
134
134
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@carbon/ibm-products",
3
3
  "description": "Carbon for IBM Products",
4
- "version": "2.19.2",
4
+ "version": "2.20.0",
5
5
  "license": "Apache-2.0",
6
6
  "main": "lib/index.js",
7
7
  "module": "es/index.js",
@@ -75,7 +75,7 @@
75
75
  },
76
76
  "dependencies": {
77
77
  "@babel/runtime": "^7.22.10",
78
- "@carbon/ibm-products-styles": "^2.19.1",
78
+ "@carbon/ibm-products-styles": "^2.20.0",
79
79
  "@carbon/telemetry": "^0.1.0",
80
80
  "@dnd-kit/core": "^6.0.8",
81
81
  "@dnd-kit/sortable": "^7.0.2",
@@ -91,11 +91,11 @@
91
91
  "@carbon/grid": "^11.21.1",
92
92
  "@carbon/layout": "^11.20.1",
93
93
  "@carbon/motion": "^11.16.1",
94
- "@carbon/react": "^1.45.0",
94
+ "@carbon/react": "^1.46.1",
95
95
  "@carbon/themes": "^11.28.0",
96
96
  "@carbon/type": "^11.25.1",
97
97
  "react": "^16.8.6 || ^17.0.1 || ^18.2.0",
98
98
  "react-dom": "^16.8.6 || ^17.0.1 || ^18.2.0"
99
99
  },
100
- "gitHead": "6947a5b9d0e07a7a3d8e39abe152329e87200896"
100
+ "gitHead": "d97c3273a61bd1ee38cc29be2b7dd82609fd1c2b"
101
101
  }
@@ -279,6 +279,13 @@
279
279
  }
280
280
  }
281
281
 
282
+ .#{$block-class}__empty-state
283
+ .#{c4p-settings.$carbon-prefix}--data-table
284
+ tbody
285
+ tr:not([data-child-row]):hover {
286
+ background: inherit;
287
+ }
288
+
282
289
  .#{$block-class}__empty-state .#{$block-class}__table-simple tr:hover {
283
290
  background: transparent;
284
291
  }
@@ -375,6 +382,7 @@
375
382
 
376
383
  .#{$block-class}__head-hidden-select-all {
377
384
  padding-right: $spacing-09;
385
+
378
386
  &.#{$block-class}__select-all-sticky-left {
379
387
  position: sticky;
380
388
  z-index: 1;
@@ -1,10 +1,9 @@
1
- /*
2
- * Licensed Materials - Property of IBM
3
- * 5724-Q36
4
- * (c) Copyright IBM Corp. 2022
5
- * US Government Users Restricted Rights - Use, duplication or disclosure
6
- * restricted by GSA ADP Schedule Contract with IBM Corp.
7
- */
1
+ //
2
+ // Copyright IBM Corp. 2022, 2024
3
+ //
4
+ // This source code is licensed under the Apache-2.0 license found in the
5
+ // LICENSE file in the root directory of this source tree.
6
+ //
8
7
 
9
8
  // stylelint-disable carbon/layout-token-use
10
9
 
@@ -82,7 +81,7 @@ $action-set-height: to-rem(64px);
82
81
  display: grid;
83
82
  /* stylelint-disable-next-line -- to-rem carbon replacement for rem */
84
83
  gap: to-rem(16px) rem(32px);
85
- grid-template-columns: 1fr 1fr;
84
+ grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
86
85
  }
87
86
 
88
87
  // Carbon overrides
@@ -104,3 +103,7 @@ $action-set-height: to-rem(64px);
104
103
  .#{c4p-settings.$carbon-prefix}--fieldset {
105
104
  margin-bottom: 0;
106
105
  }
106
+
107
+ .#{variables.$block-class}-filter-flyout__stacked {
108
+ grid-template-columns: 1fr;
109
+ }
@@ -77,12 +77,14 @@ $action-set-block-class: #{c4p-settings.$pkg-prefix}--action-set;
77
77
  @include setPanelSize($size_value);
78
78
  .#{$block-class}__title-container.#{$block-class}__title-container--no-title-animation,
79
79
  .#{$block-class}__subtitle-text.#{$block-class}__subtitle-text-no-animation,
80
- .#{$block-class}__action-toolbar.#{$block-class}__action-toolbar-no-animation,
81
- .#{$block-class}__actions-container.#{$action-set-block-class}--#{$size} {
80
+ .#{$block-class}__action-toolbar.#{$block-class}__action-toolbar-no-animation {
82
81
  @include setPanelSize($size_value);
83
82
  }
84
83
  }
85
84
  }
85
+ .#{$block-class}__actions-container {
86
+ width: 100%;
87
+ }
86
88
  &.#{$block-class}__container-right-placement {
87
89
  right: 0;
88
90
  border-left: 1px solid $border-subtle-02;