@carbon/ibm-products 1.54.1 → 1.55.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (110) hide show
  1. package/css/index-full-carbon.css +1309 -110
  2. package/css/index-full-carbon.css.map +1 -1
  3. package/css/index-full-carbon.min.css +3 -3
  4. package/css/index-full-carbon.min.css.map +1 -1
  5. package/css/index-without-carbon.css +1304 -110
  6. package/css/index-without-carbon.css.map +1 -1
  7. package/css/index-without-carbon.min.css +2 -2
  8. package/css/index-without-carbon.min.css.map +1 -1
  9. package/css/index.css +1312 -113
  10. package/css/index.css.map +1 -1
  11. package/css/index.min.css +3 -3
  12. package/css/index.min.css.map +1 -1
  13. package/es/components/APIKeyModal/APIKeyModal.js +25 -21
  14. package/es/components/ActionBar/ActionBar.js +5 -5
  15. package/es/components/Carousel/Carousel.js +237 -0
  16. package/es/components/Carousel/CarouselItem.js +66 -0
  17. package/es/components/Carousel/index.js +9 -0
  18. package/es/components/Carousel/utils.js +98 -0
  19. package/es/components/CreateFullPage/CreateFullPage.js +4 -2
  20. package/es/components/CreateModal/CreateModal.js +2 -1
  21. package/es/components/CreateSidePanel/CreateSidePanel.js +6 -2
  22. package/es/components/CreateTearsheet/CreateTearsheet.js +3 -1
  23. package/es/components/CreateTearsheetNarrow/CreateTearsheetNarrow.js +6 -2
  24. package/es/components/Datagrid/Datagrid/DatagridHeaderRow.js +1 -1
  25. package/es/components/Datagrid/Datagrid/DatagridToolbar.js +3 -2
  26. package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/index.js +2 -1
  27. package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilterContext.js +13 -0
  28. package/es/components/Datagrid/index.js +2 -1
  29. package/es/components/Datagrid/useActionsColumn.js +13 -7
  30. package/es/components/Datagrid/useOnRowClick.js +20 -4
  31. package/es/components/Datagrid/useSortableColumns.js +27 -3
  32. package/es/components/Datagrid/useStickyColumn.js +10 -3
  33. package/es/components/Datagrid/utils/DatagridActions.js +6 -6
  34. package/es/components/Datagrid/utils/getArgTypes.js +4 -0
  35. package/es/components/EditSidePanel/EditSidePanel.js +7 -3
  36. package/es/components/FilterSummary/FilterSummary.js +7 -3
  37. package/es/components/Guidebanner/Guidebanner.js +229 -0
  38. package/es/components/Guidebanner/GuidebannerElement.js +71 -0
  39. package/es/components/Guidebanner/GuidebannerElementButton.js +76 -0
  40. package/es/components/Guidebanner/GuidebannerElementLink.js +56 -0
  41. package/es/components/Guidebanner/index.js +11 -0
  42. package/es/components/InlineTip/InlineTip.js +228 -0
  43. package/es/components/InlineTip/InlineTipButton.js +89 -0
  44. package/es/components/InlineTip/InlineTipLink.js +89 -0
  45. package/es/components/InlineTip/index.js +10 -0
  46. package/es/components/InlineTip/utils.js +36 -0
  47. package/es/components/SteppedAnimatedMedia/SteppedAnimatedMedia.js +164 -0
  48. package/es/components/SteppedAnimatedMedia/assets/index.js +4 -0
  49. package/es/components/SteppedAnimatedMedia/index.js +8 -0
  50. package/es/components/Tearsheet/TearsheetShell.js +2 -1
  51. package/es/components/index.js +4 -2
  52. package/es/global/js/hooks/useResizeObserver.js +1 -1
  53. package/es/global/js/package-settings.js +2 -0
  54. package/lib/components/APIKeyModal/APIKeyModal.js +25 -21
  55. package/lib/components/ActionBar/ActionBar.js +5 -5
  56. package/lib/components/Carousel/Carousel.js +238 -0
  57. package/lib/components/Carousel/CarouselItem.js +66 -0
  58. package/lib/components/Carousel/index.js +19 -0
  59. package/lib/components/Carousel/utils.js +108 -0
  60. package/lib/components/CreateFullPage/CreateFullPage.js +4 -2
  61. package/lib/components/CreateModal/CreateModal.js +2 -1
  62. package/lib/components/CreateSidePanel/CreateSidePanel.js +6 -2
  63. package/lib/components/CreateTearsheet/CreateTearsheet.js +3 -1
  64. package/lib/components/CreateTearsheetNarrow/CreateTearsheetNarrow.js +6 -2
  65. package/lib/components/Datagrid/Datagrid/DatagridHeaderRow.js +1 -1
  66. package/lib/components/Datagrid/Datagrid/DatagridToolbar.js +3 -2
  67. package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/index.js +8 -1
  68. package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilterContext.js +20 -0
  69. package/lib/components/Datagrid/index.js +8 -1
  70. package/lib/components/Datagrid/useActionsColumn.js +13 -7
  71. package/lib/components/Datagrid/useOnRowClick.js +20 -4
  72. package/lib/components/Datagrid/useSortableColumns.js +27 -3
  73. package/lib/components/Datagrid/useStickyColumn.js +10 -3
  74. package/lib/components/Datagrid/utils/DatagridActions.js +6 -6
  75. package/lib/components/Datagrid/utils/getArgTypes.js +4 -0
  76. package/lib/components/EditSidePanel/EditSidePanel.js +7 -3
  77. package/lib/components/FilterSummary/FilterSummary.js +7 -3
  78. package/lib/components/Guidebanner/Guidebanner.js +229 -0
  79. package/lib/components/Guidebanner/GuidebannerElement.js +67 -0
  80. package/lib/components/Guidebanner/GuidebannerElementButton.js +71 -0
  81. package/lib/components/Guidebanner/GuidebannerElementLink.js +52 -0
  82. package/lib/components/Guidebanner/index.js +33 -0
  83. package/lib/components/InlineTip/InlineTip.js +228 -0
  84. package/lib/components/InlineTip/InlineTipButton.js +86 -0
  85. package/lib/components/InlineTip/InlineTipLink.js +86 -0
  86. package/lib/components/InlineTip/index.js +26 -0
  87. package/lib/components/InlineTip/utils.js +44 -0
  88. package/lib/components/SteppedAnimatedMedia/SteppedAnimatedMedia.js +165 -0
  89. package/lib/components/SteppedAnimatedMedia/assets/index.js +12 -0
  90. package/lib/components/SteppedAnimatedMedia/index.js +12 -0
  91. package/lib/components/Tearsheet/TearsheetShell.js +2 -1
  92. package/lib/components/index.js +21 -1
  93. package/lib/global/js/hooks/useResizeObserver.js +1 -1
  94. package/lib/global/js/package-settings.js +2 -0
  95. package/package.json +5 -5
  96. package/scss/components/Carousel/_carousel.scss +80 -0
  97. package/scss/components/Carousel/_index.scss +8 -0
  98. package/scss/components/Carousel/_storybook-styles.scss +10 -0
  99. package/scss/components/Datagrid/_storybook-styles.scss +13 -0
  100. package/scss/components/Datagrid/styles/_datagrid.scss +1 -6
  101. package/scss/components/Guidebanner/_guidebanner.scss +257 -0
  102. package/scss/components/Guidebanner/_index.scss +8 -0
  103. package/scss/components/Guidebanner/_storybook-styles.scss +20 -0
  104. package/scss/components/InlineTip/_index.scss +8 -0
  105. package/scss/components/InlineTip/_inline-tip.scss +231 -0
  106. package/scss/components/InlineTip/_storybook-styles.scss +21 -0
  107. package/scss/components/SteppedAnimatedMedia/_index.scss +8 -0
  108. package/scss/components/SteppedAnimatedMedia/_stepped-animated-media.scss +34 -0
  109. package/scss/components/SteppedAnimatedMedia/_storybook-styles.scss +12 -0
  110. package/scss/components/_index.scss +4 -0
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.getComponentText = void 0;
8
+ var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
9
+ /**
10
+ * Copyright IBM Corp. 2023, 2023
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
+
16
+ var getComponentText = function getComponentText(reactNode) {
17
+ var _reactNode$props;
18
+ var tmpChildren = (reactNode === null || reactNode === void 0 ? void 0 : (_reactNode$props = reactNode.props) === null || _reactNode$props === void 0 ? void 0 : _reactNode$props.children) || undefined;
19
+ if (Array.isArray(reactNode)) {
20
+ var joinedNodes = [];
21
+ reactNode.forEach(function (node) {
22
+ if ((0, _typeof2.default)(node) === 'object') {
23
+ joinedNodes.push(getComponentText(node));
24
+ } else if (typeof node === 'string') {
25
+ joinedNodes.push(node);
26
+ }
27
+ });
28
+ return joinedNodes.join(' ');
29
+ }
30
+ if (tmpChildren === undefined) {
31
+ if (typeof reactNode === 'string') {
32
+ return reactNode;
33
+ } else {
34
+ return ' ';
35
+ }
36
+ }
37
+ if ((0, _typeof2.default)(tmpChildren) === 'object') {
38
+ return getComponentText(reactNode.props.children);
39
+ }
40
+ if (typeof tmpChildren === 'string') {
41
+ return reactNode.props.children;
42
+ }
43
+ };
44
+ exports.getComponentText = getComponentText;
@@ -0,0 +1,165 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ var _typeof = require("@babel/runtime/helpers/typeof");
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.SteppedAnimatedMedia = void 0;
9
+ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
10
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
+ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
12
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
13
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
14
+ var _react = _interopRequireWildcard(require("react"));
15
+ var _lottieWeb = _interopRequireDefault(require("lottie-web"));
16
+ var _clamp = _interopRequireDefault(require("lodash/clamp"));
17
+ var _propTypes = _interopRequireDefault(require("prop-types"));
18
+ var _classnames = _interopRequireDefault(require("classnames"));
19
+ var _devtools = require("../../global/js/utils/devtools");
20
+ var _settings = require("../../settings");
21
+ var _excluded = ["className", "playStep", "filePaths"];
22
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
23
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
24
+ // The block part of our conventional BEM class names (blockClass__E--M).
25
+ var blockClass = "".concat(_settings.pkg.prefix, "--stepped-animated-media");
26
+ var componentName = 'SteppedAnimatedMedia';
27
+
28
+ // NOTE: the component SCSS is not imported here: it is rolled up separately.
29
+
30
+ // Default values can be included here and then assigned to the prop params,
31
+ // e.g. prop = defaults.prop,
32
+ // This gathers default values together neatly and ensures non-primitive
33
+ // values are initialized early to avoid react making unnecessary re-renders.
34
+ // Note that default values are not required for props that are 'required',
35
+ // nor for props where the component can apply undefined values reasonably.
36
+ // Default values should be provided when the component needs to make a choice
37
+ // or assumption when a prop is not supplied.
38
+
39
+ // Default values for props
40
+ var defaults = {
41
+ playStep: 0
42
+ };
43
+
44
+ /**
45
+ * The SteppedAnimatedMedia is a Novice to Pro internal component and is not intended for general use.
46
+ */
47
+ var SteppedAnimatedMedia = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
48
+ var className = _ref.className,
49
+ _ref$playStep = _ref.playStep,
50
+ playStep = _ref$playStep === void 0 ? defaults.playStep : _ref$playStep,
51
+ filePaths = _ref.filePaths,
52
+ rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
53
+ var _useState = (0, _react.useState)([]),
54
+ _useState2 = (0, _slicedToArray2.default)(_useState, 2),
55
+ jsonData = _useState2[0],
56
+ setJsonData = _useState2[1];
57
+ var animRef = (0, _react.useRef)();
58
+ var backupRef = (0, _react.useRef)();
59
+ var localRef = ref !== null && ref !== void 0 ? ref : backupRef;
60
+ // load animation source
61
+ (0, _react.useEffect)(function () {
62
+ var isJsonFile = function isJsonFile(filePath) {
63
+ return filePath.includes('.json');
64
+ };
65
+ function loadArtifact() {
66
+ return _loadArtifact.apply(this, arguments);
67
+ }
68
+ function _loadArtifact() {
69
+ _loadArtifact = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
70
+ var allJsonArtifacts, rawResponse, jsonResponse, fileData;
71
+ return _regenerator.default.wrap(function _callee$(_context) {
72
+ while (1) switch (_context.prev = _context.next) {
73
+ case 0:
74
+ if (!(filePaths && filePaths.every(isJsonFile))) {
75
+ _context.next = 10;
76
+ break;
77
+ }
78
+ allJsonArtifacts = filePaths.map(function (el) {
79
+ return fetch(el);
80
+ });
81
+ _context.next = 4;
82
+ return Promise.all(allJsonArtifacts);
83
+ case 4:
84
+ rawResponse = _context.sent;
85
+ jsonResponse = rawResponse.map(function (el) {
86
+ return el.json();
87
+ });
88
+ _context.next = 8;
89
+ return Promise.all(jsonResponse);
90
+ case 8:
91
+ fileData = _context.sent;
92
+ setJsonData(fileData);
93
+ case 10:
94
+ case "end":
95
+ return _context.stop();
96
+ }
97
+ }, _callee);
98
+ }));
99
+ return _loadArtifact.apply(this, arguments);
100
+ }
101
+ loadArtifact();
102
+ }, [filePaths]);
103
+ (0, _react.useEffect)(function () {
104
+ var _window;
105
+ var prefersReducedMotion = (_window = window) !== null && _window !== void 0 && _window.matchMedia ? window.matchMedia('(prefers-reduced-motion: reduce)').matches : true;
106
+ if (localRef.current) {
107
+ var _animRef$current, _animRef$current2, _animRef$current3;
108
+ (_animRef$current = animRef.current) === null || _animRef$current === void 0 ? void 0 : _animRef$current.destroy();
109
+ animRef.current = _lottieWeb.default.loadAnimation({
110
+ container: localRef.current,
111
+ renderer: 'svg',
112
+ animationData: jsonData[(0, _clamp.default)(playStep, 0, jsonData.length - 1)],
113
+ loop: false,
114
+ autoplay: false,
115
+ rendererSettings: {
116
+ preserveAspectRatio: 'xMidYMid slice'
117
+ }
118
+ });
119
+ prefersReducedMotion ? (_animRef$current2 = animRef.current) === null || _animRef$current2 === void 0 ? void 0 : _animRef$current2.goToAndStop(0) : (_animRef$current3 = animRef.current) === null || _animRef$current3 === void 0 ? void 0 : _animRef$current3.goToAndPlay(0);
120
+ }
121
+ return function () {
122
+ var _animRef$current4;
123
+ return (_animRef$current4 = animRef.current) === null || _animRef$current4 === void 0 ? void 0 : _animRef$current4.destroy();
124
+ };
125
+ }, [jsonData, localRef, playStep]);
126
+ if (!jsonData) {
127
+ return null;
128
+ }
129
+ return /*#__PURE__*/_react.default.createElement("div", (0, _extends2.default)({}, rest, {
130
+ className: (0, _classnames.default)(blockClass,
131
+ // Apply the block class to the main HTML element
132
+ className,
133
+ // Apply any supplied class names to the main HTML element.
134
+ // example: `${blockClass}__template-string-class-${kind}-n-${size}`,
135
+ {
136
+ // switched classes dependant on props or state
137
+ // example: [`${blockClass}__here-if-small`]: size === 'sm',
138
+ }),
139
+ role: "img",
140
+ ref: localRef
141
+ }, (0, _devtools.getDevtoolsProps)(componentName)));
142
+ });
143
+
144
+ // The display name of the component, used by React. Note that displayName
145
+ // is used in preference to relying on function.name.
146
+ exports.SteppedAnimatedMedia = SteppedAnimatedMedia;
147
+ SteppedAnimatedMedia.displayName = componentName;
148
+
149
+ // The types and DocGen commentary for the component props,
150
+ // in alphabetical order (for consistency).
151
+ // See https://www.npmjs.com/package/prop-types#usage.
152
+ SteppedAnimatedMedia.propTypes = {
153
+ /**
154
+ * Optional class name for this component.
155
+ */
156
+ className: _propTypes.default.string,
157
+ /**
158
+ * The file path(s) to json formatted Lottie animation files.
159
+ */
160
+ filePaths: _propTypes.default.arrayOf(_propTypes.default.string).isRequired,
161
+ /**
162
+ * Which animation step from the filePaths array to play.
163
+ */
164
+ playStep: _propTypes.default.number
165
+ };
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.HowACaseIsCreated3 = exports.HowACaseIsCreated2 = exports.HowACaseIsCreated1 = void 0;
7
+ var HowACaseIsCreated1 = new URL('./illustrations/how-a-case-is-created-1', import.meta.url).pathname;
8
+ exports.HowACaseIsCreated1 = HowACaseIsCreated1;
9
+ var HowACaseIsCreated2 = new URL('./illustrations/how-a-case-is-created-2', import.meta.url).pathname;
10
+ exports.HowACaseIsCreated2 = HowACaseIsCreated2;
11
+ var HowACaseIsCreated3 = new URL('./illustrations/how-a-case-is-created-3', import.meta.url).pathname;
12
+ exports.HowACaseIsCreated3 = HowACaseIsCreated3;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "SteppedAnimatedMedia", {
7
+ enumerable: true,
8
+ get: function get() {
9
+ return _SteppedAnimatedMedia.SteppedAnimatedMedia;
10
+ }
11
+ });
12
+ var _SteppedAnimatedMedia = require("./SteppedAnimatedMedia");
@@ -251,7 +251,8 @@ var TearsheetShell = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref)
251
251
  actions: actions,
252
252
  buttonSize: size === 'wide' ? 'xl' : null,
253
253
  className: "".concat(bc, "__buttons"),
254
- size: size === 'wide' ? 'max' : 'lg'
254
+ size: size === 'wide' ? 'max' : 'lg',
255
+ "aria-hidden": !open
255
256
  })))), /*#__PURE__*/_react.default.createElement("div", {
256
257
  className: "".concat(bc, "__resize-detector"),
257
258
  ref: resizer
@@ -153,6 +153,12 @@ Object.defineProperty(exports, "ExpressiveCard", {
153
153
  return _ExpressiveCard.ExpressiveCard;
154
154
  }
155
155
  });
156
+ Object.defineProperty(exports, "Guidebanner", {
157
+ enumerable: true,
158
+ get: function get() {
159
+ return _Guidebanner.Guidebanner;
160
+ }
161
+ });
156
162
  Object.defineProperty(exports, "HTTPError403", {
157
163
  enumerable: true,
158
164
  get: function get() {
@@ -183,6 +189,12 @@ Object.defineProperty(exports, "InlineEdit", {
183
189
  return _InlineEdit.InlineEdit;
184
190
  }
185
191
  });
192
+ Object.defineProperty(exports, "InlineTip", {
193
+ enumerable: true,
194
+ get: function get() {
195
+ return _InlineTip.InlineTip;
196
+ }
197
+ });
186
198
  Object.defineProperty(exports, "ModifiedTabs", {
187
199
  enumerable: true,
188
200
  get: function get() {
@@ -405,6 +417,12 @@ Object.defineProperty(exports, "useExpandedRow", {
405
417
  return _Datagrid.useExpandedRow;
406
418
  }
407
419
  });
420
+ Object.defineProperty(exports, "useFilterContext", {
421
+ enumerable: true,
422
+ get: function get() {
423
+ return _Datagrid.useFilterContext;
424
+ }
425
+ });
408
426
  Object.defineProperty(exports, "useFiltering", {
409
427
  enumerable: true,
410
428
  get: function get() {
@@ -510,4 +528,6 @@ var _EditFullPage = require("./EditFullPage");
510
528
  var _EditUpdateCards = require("./EditUpdateCards");
511
529
  var _InlineEdit = require("./InlineEdit");
512
530
  var _EditInPlace = require("./EditInPlace");
513
- var _NonLinearReading = require("./NonLinearReading");
531
+ var _Guidebanner = require("./Guidebanner");
532
+ var _NonLinearReading = require("./NonLinearReading");
533
+ var _InlineTip = require("./InlineTip");
@@ -60,7 +60,7 @@ var useResizeObserver = function useResizeObserver(ref, callback) {
60
60
  observer = null;
61
61
  };
62
62
  // eslint-disable-next-line react-hooks/exhaustive-deps
63
- }, [ref]);
63
+ }, [ref.current]);
64
64
  return {
65
65
  width: width,
66
66
  height: height
@@ -72,6 +72,8 @@ var defaults = {
72
72
  EditUpdateCards: false,
73
73
  ButtonMenu: false,
74
74
  // Novice to pro components not yet reviewed and released:
75
+ InlineTip: false,
76
+ Guidebanner: false,
75
77
  NonLinearReading: false
76
78
  /* new component flags here - comment used by generate CLI */
77
79
  },
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": "1.54.1",
4
+ "version": "1.55.0",
5
5
  "license": "Apache-2.0",
6
6
  "main": "lib/index.js",
7
7
  "module": "es/index.js",
@@ -61,7 +61,7 @@
61
61
  "fs-extra": "^11.1.0",
62
62
  "glob": "^8.1.0",
63
63
  "jest": "^29.4.2",
64
- "jest-config-ibm-cloud-cognitive": "^0.24.15",
64
+ "jest-config-ibm-cloud-cognitive": "^0.25.0",
65
65
  "jest-environment-jsdom": "^29.4.2",
66
66
  "namor": "^1.1.2",
67
67
  "npm-check-updates": "^16.7.4",
@@ -89,11 +89,11 @@
89
89
  "@carbon/motion": "^10.29.0",
90
90
  "@carbon/themes": "^10.55.1",
91
91
  "@carbon/type": "^10.45.1",
92
- "carbon-components": "^10.58.6",
93
- "carbon-components-react": "^7.59.6",
92
+ "carbon-components": "^10.58.7",
93
+ "carbon-components-react": "^7.59.8",
94
94
  "carbon-icons": "^7.0.7",
95
95
  "react": "^16.8.6 || ^17.0.1",
96
96
  "react-dom": "^16.8.6 || ^17.0.1"
97
97
  },
98
- "gitHead": "d492e0ac9ef45929459680ea97274be0fcee61e5"
98
+ "gitHead": "4a7110b38042c4dabcddc49901ce68169dd7f18b"
99
99
  }
@@ -0,0 +1,80 @@
1
+ //
2
+ // Copyright IBM Corp. 2023, 2023
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
+
8
+ // Standard imports.
9
+ @import '../../global/styles/project-settings';
10
+ @import '../../global/styles/mixins';
11
+
12
+ // Other Carbon settings.
13
+ // TODO: @import 'carbon-components/scss/globals/grid/grid'; if needed
14
+
15
+ // Carousel uses the following Carbon components:
16
+ // TODO: @import(s) of Carbon component styles used by Carousel
17
+
18
+ // Carousel uses the following Carbon for IBM Products components:
19
+ // TODO: @import(s) of IBM Products component styles used by Carousel
20
+
21
+ // Define all component styles in a mixin which is then exported using
22
+ // the Carbon import-once mechanism.
23
+ @mixin carousel {
24
+ // The block part of our conventional BEM class names (blockClass__E--M).
25
+ $block-class: #{$pkg-prefix}--carousel;
26
+
27
+ .#{$block-class} {
28
+ position: relative;
29
+
30
+ &:focus {
31
+ outline: none;
32
+ }
33
+
34
+ &__elements-container {
35
+ overflow-x: hidden;
36
+
37
+ &--scrolled,
38
+ &--scroll-max {
39
+ position: absolute;
40
+ z-index: 1;
41
+ top: 0;
42
+ bottom: 0;
43
+ width: $spacing-07;
44
+ pointer-events: none;
45
+ }
46
+
47
+ &--scrolled {
48
+ left: 0;
49
+ }
50
+
51
+ &--scroll-max {
52
+ right: 0;
53
+ }
54
+ }
55
+
56
+ &__elements {
57
+ &::-webkit-scrollbar {
58
+ display: none;
59
+ }
60
+
61
+ display: flex;
62
+ -ms-overflow-style: none;
63
+ overflow-x: scroll;
64
+ overflow-y: hidden;
65
+ scroll-behavior: smooth;
66
+ scroll-snap-type: x mandatory;
67
+ scrollbar-width: none;
68
+ -webkit-touch-callout: none;
69
+ -webkit-user-select: none;
70
+ -khtml-user-select: none;
71
+ -moz-user-select: none;
72
+ -ms-user-select: none;
73
+ user-select: none;
74
+ }
75
+ }
76
+ }
77
+
78
+ @include exports('carousel') {
79
+ @include carousel;
80
+ }
@@ -0,0 +1,8 @@
1
+ //
2
+ // Copyright IBM Corp. 2023, 2023
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
+
8
+ @import './carousel';
@@ -0,0 +1,10 @@
1
+ //
2
+ // Copyright IBM Corp. 2023, 2023
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
+
8
+ @import '../../global/styles/project-settings';
9
+
10
+ // TODO: add any additional styles used by Carousel.stories.js
@@ -54,6 +54,11 @@ $block-class: #{$pkg-prefix}--datagrid;
54
54
  padding-bottom: $spacing-06;
55
55
  }
56
56
 
57
+ .#{$block-class}__side-panel-link {
58
+ padding-top: $spacing-01;
59
+ padding-bottom: $spacing-06;
60
+ }
61
+
57
62
  .#{$block-class}__side-panel-section-inner {
58
63
  display: flex;
59
64
  padding: $spacing-01 0;
@@ -134,3 +139,11 @@ $block-class: #{$pkg-prefix}--datagrid;
134
139
  flex: 0 1 calc($spacing-05 * 30);
135
140
  margin-right: $spacing-07;
136
141
  }
142
+
143
+ .#{$carbon-prefix}--body--with-modal-open {
144
+ .#{$block-class}__mobile-toolbar-modal.#{$carbon-prefix}--modal {
145
+ top: calc($spacing-07 * -1);
146
+ left: calc($spacing-07 * -1);
147
+ width: 100vw;
148
+ }
149
+ }
@@ -500,7 +500,7 @@
500
500
 
501
501
  .#{$block-class}
502
502
  .#{$carbon-prefix}--data-table--selected:not(.#{$block-class}__active-row)
503
- ::before {
503
+ :first-child:not(.#{$carbon-prefix}--checkbox--inline)::before {
504
504
  position: absolute;
505
505
  top: 0;
506
506
  left: 0;
@@ -575,11 +575,6 @@
575
575
  width: 100%;
576
576
  }
577
577
 
578
- .#{$carbon-prefix}--body--with-modal-open .#{$block-class}__grid-container {
579
- overflow: hidden;
580
- height: 100vh;
581
- }
582
-
583
578
  .#{$carbon-prefix}--overflow-menu.#{$block-class}__toolbar-menu__trigger {
584
579
  flex-shrink: 0;
585
580
  background-color: $interactive-01;