@carbon/ibm-products 2.15.2 → 2.16.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. package/css/index-full-carbon.css +195 -1
  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 +1 -1
  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 +195 -1
  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 +5 -1
  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/DatagridContent.js +12 -9
  18. package/es/components/Datagrid/Datagrid/DatagridExpandedRow.js +3 -3
  19. package/es/components/Datagrid/Datagrid/DatagridHeaderRow.js +36 -22
  20. package/es/components/Datagrid/Datagrid/DatagridSelectAll.js +12 -11
  21. package/es/components/Datagrid/Datagrid/DatagridVirtualBody.js +24 -13
  22. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/DraggableItemsList.js +2 -2
  23. package/es/components/Datagrid/Datagrid/addons/stateReducer.js +50 -14
  24. package/es/components/Datagrid/Datagrid.docs-page.js +3 -3
  25. package/es/components/Datagrid/useDatagrid.js +5 -1
  26. package/es/components/Datagrid/useOnRowClick.js +6 -7
  27. package/es/components/Datagrid/useSelectRows.js +8 -5
  28. package/es/components/Datagrid/useSortableColumns.js +5 -7
  29. package/es/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +2 -1
  30. package/es/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +2 -1
  31. package/es/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +2 -1
  32. package/es/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +2 -1
  33. package/es/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +2 -1
  34. package/es/components/EmptyStates/assets/ErrorIllustration.js +5 -3
  35. package/es/components/EmptyStates/assets/NoDataIllustration.js +5 -3
  36. package/es/components/EmptyStates/assets/NoTagsIllustration.js +5 -3
  37. package/es/components/EmptyStates/assets/NotFoundIllustration.js +5 -3
  38. package/es/components/EmptyStates/assets/NotificationsIllustration.js +5 -3
  39. package/es/components/EmptyStates/assets/UnauthorizedIllustration.js +5 -3
  40. package/es/components/InlineTip/InlineTip.docs-page.js +13 -0
  41. package/es/components/InlineTip/InlineTip.js +217 -0
  42. package/es/components/InlineTip/InlineTipButton.js +53 -0
  43. package/es/components/InlineTip/InlineTipLink.js +57 -0
  44. package/es/components/InlineTip/index.js +10 -0
  45. package/es/components/InlineTip/utils.js +36 -0
  46. package/es/components/SteppedAnimatedMedia/SteppedAnimatedMedia.docs-page.js +11 -0
  47. package/es/components/SteppedAnimatedMedia/SteppedAnimatedMedia.js +140 -0
  48. package/es/components/SteppedAnimatedMedia/assets/index.js +4 -0
  49. package/es/components/SteppedAnimatedMedia/index.js +8 -0
  50. package/es/global/js/package-settings.js +2 -1
  51. package/lib/components/Datagrid/Datagrid/DatagridContent.js +12 -9
  52. package/lib/components/Datagrid/Datagrid/DatagridExpandedRow.js +3 -3
  53. package/lib/components/Datagrid/Datagrid/DatagridHeaderRow.js +41 -29
  54. package/lib/components/Datagrid/Datagrid/DatagridSelectAll.js +11 -11
  55. package/lib/components/Datagrid/Datagrid/DatagridVirtualBody.js +23 -12
  56. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/DraggableItemsList.js +2 -2
  57. package/lib/components/Datagrid/Datagrid/addons/stateReducer.js +51 -15
  58. package/lib/components/Datagrid/Datagrid.docs-page.js +3 -3
  59. package/lib/components/Datagrid/useDatagrid.js +5 -1
  60. package/lib/components/Datagrid/useOnRowClick.js +6 -7
  61. package/lib/components/Datagrid/useSelectRows.js +8 -5
  62. package/lib/components/Datagrid/useSortableColumns.js +5 -7
  63. package/lib/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +2 -1
  64. package/lib/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +2 -1
  65. package/lib/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +2 -1
  66. package/lib/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +2 -1
  67. package/lib/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +2 -1
  68. package/lib/components/EmptyStates/assets/ErrorIllustration.js +5 -3
  69. package/lib/components/EmptyStates/assets/NoDataIllustration.js +5 -3
  70. package/lib/components/EmptyStates/assets/NoTagsIllustration.js +5 -3
  71. package/lib/components/EmptyStates/assets/NotFoundIllustration.js +5 -3
  72. package/lib/components/EmptyStates/assets/NotificationsIllustration.js +5 -3
  73. package/lib/components/EmptyStates/assets/UnauthorizedIllustration.js +5 -3
  74. package/lib/components/InlineTip/InlineTip.docs-page.js +23 -0
  75. package/lib/components/InlineTip/InlineTip.js +224 -0
  76. package/lib/components/InlineTip/InlineTipButton.js +57 -0
  77. package/lib/components/InlineTip/InlineTipLink.js +61 -0
  78. package/lib/components/InlineTip/index.js +26 -0
  79. package/lib/components/InlineTip/utils.js +43 -0
  80. package/lib/components/SteppedAnimatedMedia/SteppedAnimatedMedia.docs-page.js +21 -0
  81. package/lib/components/SteppedAnimatedMedia/SteppedAnimatedMedia.js +148 -0
  82. package/lib/components/SteppedAnimatedMedia/assets/index.js +9 -0
  83. package/lib/components/SteppedAnimatedMedia/index.js +12 -0
  84. package/lib/global/js/package-settings.js +2 -1
  85. package/package.json +2 -2
  86. package/scss/components/Datagrid/styles/_datagrid.scss +5 -0
  87. package/scss/components/InlineTip/_index.scss +8 -0
  88. package/scss/components/InlineTip/_inline-tip.scss +229 -0
  89. package/scss/components/InlineTip/_storybook-styles.scss +20 -0
  90. package/scss/components/SidePanel/_side-panel.scss +1 -4
  91. package/scss/components/SteppedAnimatedMedia/_index.scss +8 -0
  92. package/scss/components/SteppedAnimatedMedia/_stepped-animated-media.scss +6 -0
  93. package/scss/components/SteppedAnimatedMedia/_storybook-styles.scss +13 -0
  94. package/scss/components/_index.scss +1 -0
@@ -0,0 +1,43 @@
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 = exports.getComponentText = function getComponentText(reactNode) {
17
+ var _reactNode$props;
18
+ var tmpChildren = (reactNode === null || reactNode === 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
+ };
@@ -0,0 +1,21 @@
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.default = void 0;
9
+ var _react = _interopRequireDefault(require("react"));
10
+ var _StoryDocsPage = require("../../global/js/utils/StoryDocsPage");
11
+ var stories = _interopRequireWildcard(require("./SteppedAnimatedMedia.stories"));
12
+ 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); }
13
+ 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; }
14
+ var DocsPage = function DocsPage() {
15
+ return /*#__PURE__*/_react.default.createElement(_StoryDocsPage.StoryDocsPage, {
16
+ blocks: [{
17
+ story: stories.steppedAnimatedMedia
18
+ }]
19
+ });
20
+ };
21
+ var _default = exports.default = DocsPage;
@@ -0,0 +1,148 @@
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
+ /**
23
+ * Copyright IBM Corp. 2023, 2023
24
+ *
25
+ * This source code is licensed under the Apache-2.0 license found in the
26
+ * LICENSE file in the root directory of this source tree.
27
+ */
28
+ // Import portions of React that are needed.
29
+ // Other standard imports.
30
+ 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); }
31
+ 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; }
32
+ // The block part of our conventional BEM class names (blockClass__E--M).
33
+ var blockClass = "".concat(_settings.pkg.prefix, "--stepped-animated-media");
34
+ var componentName = 'SteppedAnimatedMedia';
35
+
36
+ // NOTE: the component SCSS is not imported here: it is rolled up separately.
37
+
38
+ // Default values for props
39
+ var defaults = {
40
+ playStep: 0
41
+ };
42
+
43
+ /**
44
+ * The SteppedAnimatedMedia is a Novice to Pro internal component and is not intended for general use.
45
+ */
46
+ var SteppedAnimatedMedia = exports.SteppedAnimatedMedia = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
47
+ var className = _ref.className,
48
+ _ref$playStep = _ref.playStep,
49
+ playStep = _ref$playStep === void 0 ? defaults.playStep : _ref$playStep,
50
+ filePaths = _ref.filePaths,
51
+ rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
52
+ var _useState = (0, _react.useState)([]),
53
+ _useState2 = (0, _slicedToArray2.default)(_useState, 2),
54
+ jsonData = _useState2[0],
55
+ setJsonData = _useState2[1];
56
+ var animRef = (0, _react.useRef)();
57
+ var backupRef = (0, _react.useRef)();
58
+ var localRef = ref !== null && ref !== void 0 ? ref : backupRef;
59
+ // load animation source
60
+ (0, _react.useEffect)(function () {
61
+ var isJsonFile = function isJsonFile(filePath) {
62
+ return filePath.includes('.json');
63
+ };
64
+ function loadArtifact() {
65
+ return _loadArtifact.apply(this, arguments);
66
+ }
67
+ function _loadArtifact() {
68
+ _loadArtifact = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
69
+ var allJsonArtifacts, rawResponse, jsonResponse, fileData;
70
+ return _regenerator.default.wrap(function _callee$(_context) {
71
+ while (1) switch (_context.prev = _context.next) {
72
+ case 0:
73
+ if (!(filePaths && filePaths.every(isJsonFile))) {
74
+ _context.next = 10;
75
+ break;
76
+ }
77
+ allJsonArtifacts = filePaths.map(function (el) {
78
+ return fetch(el);
79
+ });
80
+ _context.next = 4;
81
+ return Promise.all(allJsonArtifacts);
82
+ case 4:
83
+ rawResponse = _context.sent;
84
+ jsonResponse = rawResponse.map(function (el) {
85
+ return el.json();
86
+ });
87
+ _context.next = 8;
88
+ return Promise.all(jsonResponse);
89
+ case 8:
90
+ fileData = _context.sent;
91
+ setJsonData(fileData);
92
+ case 10:
93
+ case "end":
94
+ return _context.stop();
95
+ }
96
+ }, _callee);
97
+ }));
98
+ return _loadArtifact.apply(this, arguments);
99
+ }
100
+ loadArtifact();
101
+ }, [filePaths]);
102
+ (0, _react.useEffect)(function () {
103
+ var _window;
104
+ var prefersReducedMotion = (_window = window) !== null && _window !== void 0 && _window.matchMedia ? window.matchMedia('(prefers-reduced-motion: reduce)').matches : true;
105
+ if (localRef.current) {
106
+ var _animRef$current, _animRef$current2, _animRef$current3;
107
+ (_animRef$current = animRef.current) === null || _animRef$current === void 0 || _animRef$current.destroy();
108
+ animRef.current = _lottieWeb.default.loadAnimation({
109
+ container: localRef.current,
110
+ renderer: 'svg',
111
+ animationData: jsonData[(0, _clamp.default)(playStep, 0, jsonData.length - 1)],
112
+ loop: false,
113
+ autoplay: false,
114
+ rendererSettings: {
115
+ preserveAspectRatio: 'xMidYMid slice'
116
+ }
117
+ });
118
+ 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);
119
+ }
120
+ return function () {
121
+ var _animRef$current4;
122
+ return (_animRef$current4 = animRef.current) === null || _animRef$current4 === void 0 ? void 0 : _animRef$current4.destroy();
123
+ };
124
+ }, [jsonData, localRef, playStep]);
125
+ if (!jsonData) {
126
+ return null;
127
+ }
128
+ return /*#__PURE__*/_react.default.createElement("div", (0, _extends2.default)({}, rest, {
129
+ className: (0, _classnames.default)(blockClass, className),
130
+ role: "img",
131
+ ref: localRef
132
+ }, (0, _devtools.getDevtoolsProps)(componentName)));
133
+ });
134
+ SteppedAnimatedMedia.displayName = componentName;
135
+ SteppedAnimatedMedia.propTypes = {
136
+ /**
137
+ * Optional class name for this component.
138
+ */
139
+ className: _propTypes.default.string,
140
+ /**
141
+ * The file path(s) to json formatted Lottie animation files.
142
+ */
143
+ filePaths: _propTypes.default.arrayOf(_propTypes.default.string).isRequired,
144
+ /**
145
+ * Which animation step from the filePaths array to play.
146
+ */
147
+ playStep: _propTypes.default.number
148
+ };
@@ -0,0 +1,9 @@
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 = exports.HowACaseIsCreated1 = new URL('./illustrations/how-a-case-is-created-1', import.meta.url).pathname;
8
+ var HowACaseIsCreated2 = exports.HowACaseIsCreated2 = new URL('./illustrations/how-a-case-is-created-2', import.meta.url).pathname;
9
+ var HowACaseIsCreated3 = exports.HowACaseIsCreated3 = new URL('./illustrations/how-a-case-is-created-3', import.meta.url).pathname;
@@ -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");
@@ -77,7 +77,8 @@ var defaults = {
77
77
  /* new component flags here - comment used by generate CLI */
78
78
 
79
79
  // Novice to pro components not yet reviewed and released:
80
- Checklist: false
80
+ Checklist: false,
81
+ InlineTip: false
81
82
  },
82
83
  // feature level flags
83
84
  feature: {
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.15.2",
4
+ "version": "2.16.0",
5
5
  "license": "Apache-2.0",
6
6
  "main": "lib/index.js",
7
7
  "module": "es/index.js",
@@ -96,5 +96,5 @@
96
96
  "react": "^16.8.6 || ^17.0.1 || ^18.2.0",
97
97
  "react-dom": "^16.8.6 || ^17.0.1 || ^18.2.0"
98
98
  },
99
- "gitHead": "61217220d3b66f869e36c29d8263b1b56c756475"
99
+ "gitHead": "ed97e8fd254f759b49c99165ded03c0105389b99"
100
100
  }
@@ -321,6 +321,11 @@
321
321
  background-color: $background-selected-hover;
322
322
  }
323
323
 
324
+ .#{$block-class}__grid-container
325
+ table.#{$block-class}__table-simple.#{c4p-settings.$carbon-prefix}--data-table.#{$block-class}__table-is-resizing {
326
+ overflow-y: hidden;
327
+ }
328
+
324
329
  .#{$block-class}__resizableColumn {
325
330
  &.#{$block-class}__isResizing {
326
331
  .#{$block-class}__resizer {
@@ -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
+ @use './inline-tip';
@@ -0,0 +1,229 @@
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
+ /**
9
+ * The InlineTip specifically is theme-agnostic, and so we have to
10
+ * use color tokens to keep the colors static instead of theme tokens
11
+ * that will change depending on the selected theme.
12
+ *
13
+ * We are triggering a *large* amount of linting errors.
14
+ * So, we're using the following "disable" rules for the entire file
15
+ * instead of many individual rules.
16
+ */
17
+
18
+ /* stylelint-disable carbon/layout-token-use */
19
+ /* stylelint-disable carbon/theme-token-use */
20
+ /* stylelint-disable declaration-no-important */
21
+ /* stylelint-disable function-no-unknown */
22
+ /* stylelint-disable max-nesting-depth */
23
+
24
+ // Standard imports.
25
+ @use '../../global/styles/project-settings' as c4p-settings;
26
+ @use '@carbon/react/scss/colors' as *;
27
+ @use '@carbon/layout/scss/convert' as *;
28
+ @use '@carbon/styles/scss/spacing' as *;
29
+ @use '@carbon/styles/scss/theme' as *;
30
+ @use '@carbon/styles/scss/type' as *;
31
+
32
+ $block-class: #{c4p-settings.$pkg-prefix}--inline-tip;
33
+ // Images and animation are the same fixed size
34
+ $media-height: to-rem(118px);
35
+ $media-width: calc(#{$media-height} * 2);
36
+ $purple: #7f3ae7;
37
+
38
+ .#{$block-class} {
39
+ position: relative;
40
+ display: flex;
41
+ background: linear-gradient(90deg, $blue-90 0%, $purple-70 100%);
42
+ }
43
+ // layout only: wide
44
+ .#{$block-class}__wide {
45
+ padding: $spacing-05 $spacing-10 $spacing-05 $spacing-09;
46
+ }
47
+ // layout: wide, with image
48
+ .#{$block-class}__wide.#{$block-class}__has-media {
49
+ padding-right: $spacing-09;
50
+ }
51
+
52
+ .#{$block-class}__wide.#{$block-class}__has-media .#{$block-class}__media {
53
+ padding-left: $spacing-10;
54
+ }
55
+
56
+ .#{$block-class}__wide.#{$block-class}__has-media .#{$block-class}__media img {
57
+ display: block;
58
+ height: $media-height;
59
+ }
60
+
61
+ .#{$block-class}__wide.#{$block-class}__has-media .#{$block-class}__media svg {
62
+ // Overrides the inline CSS of "100%".
63
+ width: $media-width !important;
64
+ height: $media-height !important;
65
+ }
66
+
67
+ // layout only: narrow
68
+ .#{$block-class}__narrow {
69
+ flex-direction: column-reverse;
70
+ padding: to-rem(52px) $spacing-07 $spacing-05 $spacing-05;
71
+ }
72
+ // layout: narrow, with image
73
+ .#{$block-class}__narrow.#{$block-class}__has-media {
74
+ padding-top: $spacing-07;
75
+ padding-right: $spacing-05;
76
+ }
77
+
78
+ .#{$block-class}__narrow.#{$block-class}__has-media .#{$block-class}__media {
79
+ padding-bottom: $spacing-05;
80
+
81
+ img {
82
+ width: 100%;
83
+ }
84
+ }
85
+
86
+ .#{$block-class}__narrow.#{$block-class}__has-media .#{$block-class}__content {
87
+ padding-right: $spacing-05;
88
+ }
89
+
90
+ .#{$block-class}__narrow.#{$block-class}__has-media .#{$block-class}__footer {
91
+ justify-content: space-between;
92
+ }
93
+ .#{$block-class}__narrow.#{$block-class}__has-media
94
+ .#{$block-class}__footer
95
+ .#{$block-class}__close-btn {
96
+ margin-right: calc(-1 * $spacing-05);
97
+ }
98
+
99
+ // All links in use by this component and provided by the user must reflect the 'dark' theme.
100
+ .#{$block-class} a {
101
+ color: $blue-30;
102
+
103
+ &:visited,
104
+ &:hover,
105
+ &:visited:hover {
106
+ color: $blue-30;
107
+ }
108
+ }
109
+
110
+ .#{$block-class}__title {
111
+ @include type-style('productive-heading-01');
112
+
113
+ color: $white-0;
114
+ }
115
+
116
+ .#{$block-class}__body {
117
+ @include type-style('body-short-01');
118
+
119
+ color: $gray-10;
120
+ }
121
+ .#{$block-class}__body p {
122
+ @include type-style('body-short-01');
123
+
124
+ margin-bottom: $spacing-03;
125
+ font-size: inherit;
126
+ line-height: inherit;
127
+
128
+ &:last-of-type {
129
+ margin-bottom: 0;
130
+ }
131
+ }
132
+
133
+ .#{$block-class}__body .#{$block-class}__secondary-btn {
134
+ margin-top: $spacing-03;
135
+ }
136
+ .#{$block-class}__body
137
+ .#{$block-class}__secondary-btn
138
+ .#{$block-class}__button {
139
+ margin-left: calc(-1 * $spacing-05);
140
+ color: $blue-30;
141
+
142
+ &:active,
143
+ &:hover {
144
+ background-color: $purple;
145
+ color: $gray-10;
146
+ }
147
+ }
148
+
149
+ .#{$block-class}__footer {
150
+ display: flex;
151
+ padding-top: $spacing-05;
152
+
153
+ &:empty {
154
+ display: none;
155
+ }
156
+ }
157
+
158
+ // When 'collapsed', a text-only preview with ellipsis is shown.
159
+ .#{$block-class}__preview-text {
160
+ display: -webkit-box;
161
+ overflow: hidden;
162
+ -webkit-box-orient: vertical;
163
+ -webkit-line-clamp: 1;
164
+ }
165
+
166
+ .#{$block-class}__icon-idea {
167
+ position: absolute;
168
+ width: to-rem(20px);
169
+ color: $white-0;
170
+ inset: $spacing-05 0 0 $spacing-05;
171
+ }
172
+
173
+ .#{$block-class}__close-icon-wrapper {
174
+ position: absolute;
175
+ top: 0;
176
+ right: 0;
177
+ }
178
+
179
+ .#{$block-class} .#{$block-class}__close-icon {
180
+ padding: to-rem(6px) 0 0 0;
181
+ block-size: $spacing-07;
182
+ color: $white-0;
183
+ inline-size: $spacing-07;
184
+ min-block-size: $spacing-07;
185
+
186
+ &:active,
187
+ &:hover {
188
+ background-color: $purple;
189
+ color: $text-primary;
190
+ }
191
+
192
+ path {
193
+ margin: 0;
194
+ fill: $white-0;
195
+ }
196
+ }
197
+
198
+ .#{$block-class} .#{$block-class}__toggle-btn {
199
+ border: none;
200
+ margin: 0 $spacing-05 0 calc(-1 * $spacing-05);
201
+ color: $blue-30;
202
+
203
+ &:hover {
204
+ background-color: $purple-70-hover;
205
+ color: $gray-10;
206
+ }
207
+ }
208
+
209
+ .#{$block-class} .#{$block-class}__close-btn {
210
+ border: to-rem(1px) solid $white-0;
211
+ color: $white-0;
212
+
213
+ &:active,
214
+ &:hover {
215
+ background-color: $gray-10;
216
+ color: $gray-100;
217
+ }
218
+
219
+ // The "render icon" CSS seems to be missing in the latest Carbon button.
220
+ // Specifically, getting the icon to move to right-hand side of the content area.
221
+ // Repeating here.
222
+ svg {
223
+ position: absolute;
224
+ right: 1rem;
225
+ width: 1rem;
226
+ height: 1rem;
227
+ flex-shrink: 0;
228
+ }
229
+ }
@@ -0,0 +1,20 @@
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
+ @use '@carbon/styles/scss/spacing' as *;
9
+ @use '../../global/styles/project-settings';
10
+
11
+ .storybook--inline-tip-wide {
12
+ max-width: 784px;
13
+ // Allow enough space above the component to show the "X" tooltip.
14
+ margin-top: $spacing-07;
15
+ }
16
+
17
+ .storybook--inline-tip-narrow {
18
+ max-width: 348px;
19
+ margin-top: $spacing-07;
20
+ }
@@ -110,10 +110,6 @@ $action-set-block-class: #{c4p-settings.$pkg-prefix}--action-set;
110
110
  position: sticky;
111
111
  z-index: 4;
112
112
  top: 0;
113
- height: calc(
114
- var(--#{$block-class}--title-container-height) -
115
- var(--#{$block-class}--label-text-height)
116
- );
117
113
  padding: $spacing-05 $spacing-05 $spacing-03 $spacing-05;
118
114
  background-color: $layer-01;
119
115
 
@@ -169,6 +165,7 @@ $action-set-block-class: #{c4p-settings.$pkg-prefix}--action-set;
169
165
 
170
166
  position: inherit;
171
167
  z-index: 4;
168
+ margin-bottom: calc(-1 * var(--#{$block-class}--label-text-height));
172
169
  background-color: $layer-01;
173
170
  opacity: var(--#{$block-class}--subtitle-opacity);
174
171
  transform: translateY(var(--#{$block-class}--title-y-position));
@@ -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 './stepped-animated-media';
@@ -0,0 +1,6 @@
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
+ //
@@ -0,0 +1,13 @@
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
+ @use '@carbon/layout/scss/convert' as *;
9
+
10
+ .stepped-animated-media-stories__viewport {
11
+ /* stylelint-disable-next-line function-no-unknown */
12
+ width: to-rem(50px);
13
+ }
@@ -51,3 +51,4 @@
51
51
  @use './EditFullPage';
52
52
  @use './EditUpdateCards';
53
53
  @use './Checklist';
54
+ @use './InlineTip';