@carbon/ibm-products 2.23.0 → 2.24.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (186) hide show
  1. package/css/index-full-carbon.css +29484 -28211
  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 +49 -10
  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 +24418 -291
  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 +17172 -13
  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/Card/Card.js +1 -2
  18. package/es/components/Card/CardHeader.js +2 -2
  19. package/es/components/Carousel/Carousel.js +5 -3
  20. package/es/components/Coachmark/Coachmark.js +255 -0
  21. package/es/components/Coachmark/CoachmarkDragbar.js +146 -0
  22. package/es/components/Coachmark/CoachmarkHeader.js +91 -0
  23. package/es/components/Coachmark/CoachmarkOverlay.js +235 -0
  24. package/es/components/Coachmark/CoachmarkTagline.js +97 -0
  25. package/es/components/Coachmark/index.js +10 -0
  26. package/es/components/Coachmark/utils/constants.js +76 -0
  27. package/es/components/Coachmark/utils/context.js +5 -0
  28. package/es/components/Coachmark/utils/enums.js +40 -0
  29. package/es/components/Coachmark/utils/helpers.js +11 -0
  30. package/es/components/Coachmark/utils/hooks.js +54 -0
  31. package/es/components/CoachmarkBeacon/CoachmarkBeacon.js +93 -0
  32. package/es/components/CoachmarkBeacon/index.js +8 -0
  33. package/es/components/CoachmarkButton/CoachmarkButton.js +90 -0
  34. package/es/components/CoachmarkButton/index.js +8 -0
  35. package/es/components/CoachmarkFixed/CoachmarkFixed.js +226 -0
  36. package/es/components/CoachmarkFixed/index.js +8 -0
  37. package/es/components/CoachmarkOverlayElement/CoachmarkOverlayElement.js +86 -0
  38. package/es/components/CoachmarkOverlayElement/index.js +8 -0
  39. package/es/components/CoachmarkOverlayElements/CoachmarkOverlayElements.js +216 -0
  40. package/es/components/CoachmarkOverlayElements/index.js +8 -0
  41. package/es/components/CoachmarkStack/CoachmarkStack.js +283 -0
  42. package/es/components/CoachmarkStack/CoachmarkStackHome.js +192 -0
  43. package/es/components/CoachmarkStack/index.js +8 -0
  44. package/es/components/Datagrid/Datagrid/DatagridSelectAll.js +4 -1
  45. package/es/components/Datagrid/Datagrid/DraggableElement.js +1 -1
  46. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/ButtonWrapper.js +1 -1
  47. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.js +4 -1
  48. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +1 -1
  49. package/es/components/Datagrid/Datagrid.docs-page.js +2 -2
  50. package/es/components/Datagrid/useActionsColumn.js +16 -12
  51. package/es/components/Datagrid/useNestedRowExpander.js +2 -2
  52. package/es/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +7 -2
  53. package/es/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +8 -3
  54. package/es/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +7 -2
  55. package/es/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +7 -2
  56. package/es/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +7 -2
  57. package/es/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +7 -2
  58. package/es/components/EmptyStates/assets/ErrorIllustration.js +5 -5
  59. package/es/components/EmptyStates/assets/NoDataIllustration.js +5 -5
  60. package/es/components/EmptyStates/assets/NoTagsIllustration.js +5 -5
  61. package/es/components/EmptyStates/assets/NotFoundIllustration.js +5 -5
  62. package/es/components/EmptyStates/assets/NotificationsIllustration.js +5 -5
  63. package/es/components/EmptyStates/assets/UnauthorizedIllustration.js +5 -5
  64. package/es/components/InterstitialScreen/InterstitialScreen.js +427 -0
  65. package/es/components/InterstitialScreen/index.js +8 -0
  66. package/es/components/InterstitialScreenView/InterstitialScreenView.js +75 -0
  67. package/es/components/InterstitialScreenView/index.js +8 -0
  68. package/es/components/InterstitialScreenViewModule/InterstitialScreenViewModule.js +83 -0
  69. package/es/components/InterstitialScreenViewModule/index.js +8 -0
  70. package/es/components/PageHeader/PageHeaderUtils.js +2 -2
  71. package/es/components/SearchBar/SearchBar.js +227 -0
  72. package/es/components/SearchBar/index.js +8 -0
  73. package/es/components/index.js +12 -1
  74. package/es/global/js/package-settings.js +14 -0
  75. package/lib/components/Card/Card.js +3 -4
  76. package/lib/components/Card/CardHeader.js +2 -2
  77. package/lib/components/Carousel/Carousel.js +5 -3
  78. package/lib/components/Coachmark/Coachmark.js +264 -0
  79. package/lib/components/Coachmark/CoachmarkDragbar.js +151 -0
  80. package/lib/components/Coachmark/CoachmarkHeader.js +95 -0
  81. package/lib/components/Coachmark/CoachmarkOverlay.js +243 -0
  82. package/lib/components/Coachmark/CoachmarkTagline.js +101 -0
  83. package/lib/components/Coachmark/index.js +38 -0
  84. package/lib/components/Coachmark/utils/constants.js +81 -0
  85. package/lib/components/Coachmark/utils/context.js +11 -0
  86. package/lib/components/Coachmark/utils/enums.js +46 -0
  87. package/lib/components/Coachmark/utils/helpers.js +17 -0
  88. package/lib/components/Coachmark/utils/hooks.js +59 -0
  89. package/lib/components/CoachmarkBeacon/CoachmarkBeacon.js +97 -0
  90. package/lib/components/CoachmarkBeacon/index.js +12 -0
  91. package/lib/components/CoachmarkButton/CoachmarkButton.js +93 -0
  92. package/lib/components/CoachmarkButton/index.js +12 -0
  93. package/lib/components/CoachmarkFixed/CoachmarkFixed.js +232 -0
  94. package/lib/components/CoachmarkFixed/index.js +12 -0
  95. package/lib/components/CoachmarkOverlayElement/CoachmarkOverlayElement.js +90 -0
  96. package/lib/components/CoachmarkOverlayElement/index.js +12 -0
  97. package/lib/components/CoachmarkOverlayElements/CoachmarkOverlayElements.js +222 -0
  98. package/lib/components/CoachmarkOverlayElements/index.js +12 -0
  99. package/lib/components/CoachmarkStack/CoachmarkStack.js +288 -0
  100. package/lib/components/CoachmarkStack/CoachmarkStackHome.js +198 -0
  101. package/lib/components/CoachmarkStack/index.js +12 -0
  102. package/lib/components/Datagrid/Datagrid/DatagridSelectAll.js +4 -1
  103. package/lib/components/Datagrid/Datagrid/DraggableElement.js +1 -1
  104. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/ButtonWrapper.js +1 -1
  105. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.js +4 -1
  106. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +1 -1
  107. package/lib/components/Datagrid/Datagrid.docs-page.js +2 -2
  108. package/lib/components/Datagrid/useActionsColumn.js +15 -11
  109. package/lib/components/Datagrid/useNestedRowExpander.js +2 -2
  110. package/lib/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +7 -2
  111. package/lib/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +8 -3
  112. package/lib/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +7 -2
  113. package/lib/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +7 -2
  114. package/lib/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +7 -2
  115. package/lib/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +7 -2
  116. package/lib/components/EmptyStates/assets/ErrorIllustration.js +5 -5
  117. package/lib/components/EmptyStates/assets/NoDataIllustration.js +5 -5
  118. package/lib/components/EmptyStates/assets/NoTagsIllustration.js +5 -5
  119. package/lib/components/EmptyStates/assets/NotFoundIllustration.js +5 -5
  120. package/lib/components/EmptyStates/assets/NotificationsIllustration.js +5 -5
  121. package/lib/components/EmptyStates/assets/UnauthorizedIllustration.js +5 -5
  122. package/lib/components/InterstitialScreen/InterstitialScreen.js +434 -0
  123. package/lib/components/InterstitialScreen/index.js +12 -0
  124. package/lib/components/InterstitialScreenView/InterstitialScreenView.js +77 -0
  125. package/lib/components/InterstitialScreenView/index.js +12 -0
  126. package/lib/components/InterstitialScreenViewModule/InterstitialScreenViewModule.js +85 -0
  127. package/lib/components/InterstitialScreenViewModule/index.js +12 -0
  128. package/lib/components/PageHeader/PageHeaderUtils.js +2 -2
  129. package/lib/components/SearchBar/SearchBar.js +233 -0
  130. package/lib/components/SearchBar/index.js +12 -0
  131. package/lib/components/index.js +78 -1
  132. package/lib/global/js/package-settings.js +14 -0
  133. package/package.json +5 -5
  134. package/scss/components/Card/_card.scss +6 -5
  135. package/scss/components/Coachmark/_carbon-imports.scss +10 -0
  136. package/scss/components/Coachmark/_coachmark-dragbar.scss +27 -0
  137. package/scss/components/Coachmark/_coachmark-header.scss +20 -0
  138. package/scss/components/Coachmark/_coachmark-overlay.scss +431 -0
  139. package/scss/components/Coachmark/_coachmark-tagline.scss +140 -0
  140. package/scss/components/Coachmark/_coachmark.scss +30 -0
  141. package/scss/components/Coachmark/_index-with-carbon.scss +9 -0
  142. package/scss/components/Coachmark/_index.scss +8 -0
  143. package/scss/components/CoachmarkBeacon/_carbon-imports.scss +9 -0
  144. package/scss/components/CoachmarkBeacon/_coachmark-beacon.scss +166 -0
  145. package/scss/components/CoachmarkBeacon/_index-with-carbon.scss +9 -0
  146. package/scss/components/CoachmarkBeacon/_index.scss +8 -0
  147. package/scss/components/CoachmarkButton/_carbon-imports.scss +9 -0
  148. package/scss/components/CoachmarkButton/_coachmark-button.scss +25 -0
  149. package/scss/components/CoachmarkButton/_index-with-carbon.scss +9 -0
  150. package/scss/components/CoachmarkButton/_index.scss +8 -0
  151. package/scss/components/CoachmarkFixed/_carbon-imports.scss +9 -0
  152. package/scss/components/CoachmarkFixed/_coachmark-fixed.scss +25 -0
  153. package/scss/components/CoachmarkFixed/_index-with-carbon.scss +9 -0
  154. package/scss/components/CoachmarkFixed/_index.scss +8 -0
  155. package/scss/components/CoachmarkOverlayElement/_carbon-imports.scss +9 -0
  156. package/scss/components/CoachmarkOverlayElement/_coachmark-overlay-element.scss +52 -0
  157. package/scss/components/CoachmarkOverlayElement/_index-with-carbon.scss +9 -0
  158. package/scss/components/CoachmarkOverlayElement/_index.scss +8 -0
  159. package/scss/components/CoachmarkOverlayElements/_carbon-imports.scss +9 -0
  160. package/scss/components/CoachmarkOverlayElements/_coachmark-overlay-elements.scss +47 -0
  161. package/scss/components/CoachmarkOverlayElements/_index-with-carbon.scss +9 -0
  162. package/scss/components/CoachmarkOverlayElements/_index.scss +8 -0
  163. package/scss/components/CoachmarkStack/_carbon-imports.scss +9 -0
  164. package/scss/components/CoachmarkStack/_coachmark-stack.scss +95 -0
  165. package/scss/components/CoachmarkStack/_index-with-carbon.scss +9 -0
  166. package/scss/components/CoachmarkStack/_index.scss +8 -0
  167. package/scss/components/InterstitialScreen/_carbon-imports.scss +9 -0
  168. package/scss/components/InterstitialScreen/_index-with-carbon.scss +9 -0
  169. package/scss/components/InterstitialScreen/_index.scss +8 -0
  170. package/scss/components/InterstitialScreen/_interstitial-screen.scss +276 -0
  171. package/scss/components/InterstitialScreenView/_carbon-imports.scss +9 -0
  172. package/scss/components/InterstitialScreenView/_index-with-carbon.scss +9 -0
  173. package/scss/components/InterstitialScreenView/_index.scss +8 -0
  174. package/scss/components/InterstitialScreenView/_interstitial-screen-view.scss +25 -0
  175. package/scss/components/InterstitialScreenViewModule/_carbon-imports.scss +9 -0
  176. package/scss/components/InterstitialScreenViewModule/_index-with-carbon.scss +9 -0
  177. package/scss/components/InterstitialScreenViewModule/_index.scss +8 -0
  178. package/scss/components/InterstitialScreenViewModule/_interstitial-screen-view-module.scss +59 -0
  179. package/scss/components/PageHeader/_page-header.scss +0 -1
  180. package/scss/components/SearchBar/_carbon-imports.scss +9 -0
  181. package/scss/components/SearchBar/_index-with-carbon.scss +9 -0
  182. package/scss/components/SearchBar/_index.scss +8 -0
  183. package/scss/components/SearchBar/_search-bar.scss +26 -0
  184. package/scss/components/SidePanel/_side-panel.scss +12 -7
  185. package/scss/components/_index-with-carbon.scss +11 -0
  186. package/scss/components/_index.scss +11 -0
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "InterstitialScreen", {
7
+ enumerable: true,
8
+ get: function get() {
9
+ return _InterstitialScreen.InterstitialScreen;
10
+ }
11
+ });
12
+ var _InterstitialScreen = require("./InterstitialScreen");
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.InterstitialScreenView = void 0;
8
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
10
+ var _react = _interopRequireDefault(require("react"));
11
+ var _propTypes = _interopRequireDefault(require("prop-types"));
12
+ var _classnames = _interopRequireDefault(require("classnames"));
13
+ var _devtools = require("../../global/js/utils/devtools");
14
+ var _settings = require("../../settings");
15
+ var _excluded = ["children", "className", "stepTitle"];
16
+ /**
17
+ * Copyright IBM Corp. 2023, 2023
18
+ *
19
+ * This source code is licensed under the Apache-2.0 license found in the
20
+ * LICENSE file in the root directory of this source tree.
21
+ */
22
+ // Import portions of React that are needed.
23
+ // Other standard imports.
24
+ // Carbon and package components we use.
25
+ /* TODO: @import(s) of carbon components and other package components. */ // The block part of our conventional BEM class names (blockClass__E--M).
26
+ var blockClass = "".concat(_settings.pkg.prefix, "--interstitial-screen-view");
27
+ var componentName = 'InterstitialScreenView';
28
+
29
+ /**
30
+ * A Novice to Pro component intended to be used as the child elements of the InterstitialScreen component.
31
+ */
32
+ var InterstitialScreenView = exports.InterstitialScreenView = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
33
+ var children = _ref.children,
34
+ className = _ref.className,
35
+ stepTitle = _ref.stepTitle,
36
+ rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
37
+ return /*#__PURE__*/_react.default.createElement("div", (0, _extends2.default)({
38
+ role: "complementary",
39
+ "aria-label": stepTitle
40
+ }, rest, {
41
+ className: (0, _classnames.default)(blockClass,
42
+ // Apply the block class to the main HTML element
43
+ className,
44
+ // Apply any supplied class names to the main HTML element.
45
+ // example: `${blockClass}__template-string-class-${kind}-n-${size}`,
46
+ {
47
+ // switched classes dependant on props or state
48
+ // example: [`${blockClass}__here-if-small`]: size === 'sm',
49
+ }),
50
+ ref: ref
51
+ }, (0, _devtools.getDevtoolsProps)(componentName)), children);
52
+ });
53
+
54
+ // Return a placeholder if not released and not enabled by feature flag
55
+ exports.InterstitialScreenView = InterstitialScreenView = _settings.pkg.checkComponentEnabled(InterstitialScreenView, componentName);
56
+
57
+ // The display name of the component, used by React. Note that displayName
58
+ // is used in preference to relying on function.name.
59
+ InterstitialScreenView.displayName = componentName;
60
+
61
+ // The types and DocGen commentary for the component props,
62
+ // in alphabetical order (for consistency).
63
+ // See https://www.npmjs.com/package/prop-types#usage.
64
+ InterstitialScreenView.propTypes = {
65
+ /**
66
+ * Provide the contents of the InterstitialScreenView.
67
+ */
68
+ children: _propTypes.default.node,
69
+ /**
70
+ * Optional class name for this component.
71
+ */
72
+ className: _propTypes.default.string,
73
+ /**
74
+ * The label to pass to the ProgressStep component.
75
+ */
76
+ stepTitle: _propTypes.default.string.isRequired
77
+ };
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "InterstitialScreenView", {
7
+ enumerable: true,
8
+ get: function get() {
9
+ return _InterstitialScreenView.InterstitialScreenView;
10
+ }
11
+ });
12
+ var _InterstitialScreenView = require("./InterstitialScreenView");
@@ -0,0 +1,85 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.InterstitialScreenViewModule = void 0;
8
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
10
+ var _react = _interopRequireDefault(require("react"));
11
+ var _propTypes = _interopRequireDefault(require("prop-types"));
12
+ var _classnames = _interopRequireDefault(require("classnames"));
13
+ var _devtools = require("../../global/js/utils/devtools");
14
+ var _settings = require("../../settings");
15
+ var _excluded = ["className", "title", "description"];
16
+ /**
17
+ * Copyright IBM Corp. 2024, 2024
18
+ *
19
+ * This source code is licensed under the Apache-2.0 license found in the
20
+ * LICENSE file in the root directory of this source tree.
21
+ */
22
+ // Import portions of React that are needed.
23
+ // Other standard imports.
24
+ // Carbon and package components we use.
25
+ /* TODO: @import(s) of carbon components and other package components. */ // The block part of our conventional BEM class names (blockClass__E--M).
26
+ var blockClass = "".concat(_settings.pkg.prefix, "--interstitial-screen-view-module");
27
+ var componentName = 'InterstitialScreenViewModule';
28
+
29
+ // NOTE: the component SCSS is not imported here: it is rolled up separately.
30
+
31
+ // Default values can be included here and then assigned to the prop params,
32
+ // e.g. prop = defaults.prop,
33
+ // This gathers default values together neatly and ensures non-primitive
34
+ // values are initialized early to avoid react making unnecessary re-renders.
35
+ // Note that default values are not required for props that are 'required',
36
+ // nor for props where the component can apply undefined values reasonably.
37
+ // Default values should be provided when the component needs to make a choice
38
+ // or assumption when a prop is not supplied.
39
+
40
+ /**
41
+ * View module to help in building interstitial screen views.
42
+ */
43
+ var InterstitialScreenViewModule = exports.InterstitialScreenViewModule = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
44
+ var className = _ref.className,
45
+ title = _ref.title,
46
+ description = _ref.description,
47
+ rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
48
+ return /*#__PURE__*/_react.default.createElement("section", (0, _extends2.default)({}, rest, {
49
+ className: (0, _classnames.default)(blockClass,
50
+ // Apply the block class to the main HTML element
51
+ className // Apply any supplied class names to the main HTML element.
52
+ ),
53
+
54
+ ref: ref
55
+ }, (0, _devtools.getDevtoolsProps)(componentName)), /*#__PURE__*/_react.default.createElement("h1", {
56
+ className: "".concat(blockClass, "--heading")
57
+ }, title), /*#__PURE__*/_react.default.createElement("p", {
58
+ className: "".concat(blockClass, "--body")
59
+ }, description));
60
+ });
61
+
62
+ // Return a placeholder if not released and not enabled by feature flag
63
+ exports.InterstitialScreenViewModule = InterstitialScreenViewModule = _settings.pkg.checkComponentEnabled(InterstitialScreenViewModule, componentName);
64
+
65
+ // The display name of the component, used by React. Note that displayName
66
+ // is used in preference to relying on function.name.
67
+ InterstitialScreenViewModule.displayName = componentName;
68
+
69
+ // The types and DocGen commentary for the component props,
70
+ // in alphabetical order (for consistency).
71
+ // See https://www.npmjs.com/package/prop-types#usage.
72
+ InterstitialScreenViewModule.propTypes = {
73
+ /**
74
+ * Provide an optional class to be applied to the containing node.
75
+ */
76
+ className: _propTypes.default.string,
77
+ /**
78
+ * The description of this component.
79
+ */
80
+ description: _propTypes.default.string.isRequired,
81
+ /**
82
+ * The title of this component.
83
+ */
84
+ title: _propTypes.default.string.isRequired
85
+ };
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "InterstitialScreenViewModule", {
7
+ enumerable: true,
8
+ get: function get() {
9
+ return _InterstitialScreenViewModule.InterstitialScreenViewModule;
10
+ }
11
+ });
12
+ var _InterstitialScreenViewModule = require("./InterstitialScreenViewModule");
@@ -76,8 +76,8 @@ var utilCheckUpdateVerticalSpace = exports.utilCheckUpdateVerticalSpace = functi
76
76
  var offsetMeasuringTop = offsetTopMeasuringRef.current ? offsetTopMeasuringRef.current.getBoundingClientRect().top : 0;
77
77
 
78
78
  // The header offset calculation is either going to work out at 0 if we have no gap between scrolling container
79
- // top and the measuring ref top, or the difference between. It does not change on scroll or resize.
80
- update.headerOffset = offsetMeasuringTop - scrollableContainerTop;
79
+ // top and the measuring ref top, or the difference between.
80
+ update.headerOffset = offsetMeasuringTop === 0 ? offsetMeasuringTop - scrollableContainerTop : 0;
81
81
 
82
82
  /* istanbul ignore next */
83
83
  update.breadcrumbRowHeight = breadcrumbRowEl ? breadcrumbRowEl.clientHeight : 0;
@@ -0,0 +1,233 @@
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.SearchBar = void 0;
9
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
12
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
13
+ var _react = _interopRequireWildcard(require("react"));
14
+ var _propTypes = _interopRequireDefault(require("prop-types"));
15
+ var _classnames = _interopRequireDefault(require("classnames"));
16
+ var _devtools = require("../../global/js/utils/devtools");
17
+ var _settings = require("../../settings");
18
+ var _react2 = require("@carbon/react");
19
+ var _excluded = ["className", "clearButtonLabelText", "hideScopesLabel", "labelText", "onChange", "onSubmit", "placeHolderText", "scopes", "scopesTypeLabel", "scopeToString", "selectedScopes", "sortItems", "submitLabel", "translateWithId", "value"];
20
+ /**
21
+ * Copyright IBM Corp. 2024, 2024
22
+ *
23
+ * This source code is licensed under the Apache-2.0 license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */
26
+ // Import portions of React that are needed.
27
+ // Other standard imports.
28
+ // Carbon and package components we use.
29
+ 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); }
30
+ 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; }
31
+ // The block part of our conventional BEM class names (blockClass__E--M).
32
+ var blockClass = "".concat(_settings.pkg.prefix, "--search-bar");
33
+ var componentName = 'SearchBar';
34
+
35
+ // NOTE: the component SCSS is not imported here: it is rolled up separately.
36
+
37
+ // Default values for props
38
+ var defaults = {
39
+ onSubmit: function onSubmit() {},
40
+ onChange: function onChange() {},
41
+ scopes: [],
42
+ selectedScopes: [],
43
+ hideScopesLabel: true
44
+ };
45
+
46
+ /**
47
+ * Search bar with input field and search button
48
+ */
49
+ var SearchBar = exports.SearchBar = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
50
+ var className = _ref.className,
51
+ clearButtonLabelText = _ref.clearButtonLabelText,
52
+ _ref$hideScopesLabel = _ref.hideScopesLabel,
53
+ hideScopesLabel = _ref$hideScopesLabel === void 0 ? defaults.hideScopesLabel : _ref$hideScopesLabel,
54
+ labelText = _ref.labelText,
55
+ _ref$onChange = _ref.onChange,
56
+ onChange = _ref$onChange === void 0 ? defaults.onChange : _ref$onChange,
57
+ _ref$onSubmit = _ref.onSubmit,
58
+ onSubmit = _ref$onSubmit === void 0 ? defaults.onSubmit : _ref$onSubmit,
59
+ placeHolderText = _ref.placeHolderText,
60
+ _ref$scopes = _ref.scopes,
61
+ scopes = _ref$scopes === void 0 ? defaults.scopes : _ref$scopes,
62
+ scopesTypeLabel = _ref.scopesTypeLabel,
63
+ scopeToString = _ref.scopeToString,
64
+ _ref$selectedScopes = _ref.selectedScopes,
65
+ selectedScopes = _ref$selectedScopes === void 0 ? defaults.selectedScopes : _ref$selectedScopes,
66
+ sortItems = _ref.sortItems,
67
+ submitLabel = _ref.submitLabel,
68
+ translateWithId = _ref.translateWithId,
69
+ value = _ref.value,
70
+ rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
71
+ var _useState = (0, _react.useState)(value || ''),
72
+ _useState2 = (0, _slicedToArray2.default)(_useState, 2),
73
+ text = _useState2[0],
74
+ setText = _useState2[1];
75
+ var _useState3 = (0, _react.useState)(selectedScopes || []),
76
+ _useState4 = (0, _slicedToArray2.default)(_useState3, 2),
77
+ _selectedScopes = _useState4[0],
78
+ setSelectedScopes = _useState4[1];
79
+ var _useState5 = (0, _react.useState)(false),
80
+ _useState6 = (0, _slicedToArray2.default)(_useState5, 2),
81
+ isInputDirty = _useState6[0],
82
+ setIsInputDirty = _useState6[1];
83
+ (0, _react.useEffect)(function () {
84
+ if (!text || !text.length) {
85
+ setIsInputDirty(false);
86
+ } else {
87
+ setIsInputDirty(true);
88
+ }
89
+ }, [text]);
90
+ /**
91
+ * Handler for form submit that calls onSubmit prop.
92
+ * @param {Event} event Submit event generated.
93
+ */
94
+ var handleSubmit = function handleSubmit(event) {
95
+ event.preventDefault();
96
+ var eventObject = {
97
+ value: text
98
+ };
99
+ if (scopes.length > 0) {
100
+ eventObject.selectedScopes = _selectedScopes;
101
+ }
102
+ onSubmit(eventObject);
103
+ };
104
+
105
+ /**
106
+ * Handler for when scope selection changes that calls onChangeProp.
107
+ * @param {{selectedItems: Array<any>}} {selectedItems} Object containing array of selected items.
108
+ */
109
+ var handleSearchScopeChange = function handleSearchScopeChange(_ref2) {
110
+ var selectedItems = _ref2.selectedItems;
111
+ setSelectedScopes(selectedItems);
112
+ onChange({
113
+ selectedScopes: selectedItems,
114
+ value: text
115
+ });
116
+ };
117
+
118
+ /**
119
+ * Handler for search input changes that calls onChange prop.
120
+ * @param {KeyboardEvent} event Event object from input change.
121
+ */
122
+ var handleInputChange = function handleInputChange(event) {
123
+ var value = event.target.value;
124
+ var eventObject = {
125
+ value: value
126
+ };
127
+ if (scopes.length > 0) {
128
+ eventObject.selectedScopes = selectedScopes;
129
+ }
130
+ setText(value);
131
+ onChange(eventObject);
132
+ };
133
+ return /*#__PURE__*/_react.default.createElement("form", (0, _extends2.default)({}, rest, {
134
+ ref: ref
135
+ }, (0, _devtools.getDevtoolsProps)(componentName), {
136
+ className: (0, _classnames.default)(blockClass, className, (0, _defineProperty2.default)({}, "".concat(blockClass, "--hide-scopes-label"), hideScopesLabel)),
137
+ onSubmit: handleSubmit
138
+ }), scopes !== null && scopes !== void 0 && scopes.length ? /*#__PURE__*/_react.default.createElement(_react2.MultiSelect, {
139
+ id: "".concat(blockClass, "__multi-select"),
140
+ name: "search-scopes",
141
+ className: "".concat(blockClass, "__scopes"),
142
+ label: scopesTypeLabel,
143
+ onChange: handleSearchScopeChange,
144
+ initialSelectedItems: selectedScopes,
145
+ items: scopes,
146
+ itemToString: scopeToString,
147
+ translateWithId: translateWithId,
148
+ sortItems: sortItems,
149
+ size: "lg"
150
+ }) : null, /*#__PURE__*/_react.default.createElement(_react2.Search, {
151
+ className: "".concat(blockClass, "__input"),
152
+ closeButtonLabelText: clearButtonLabelText,
153
+ labelText: labelText || '',
154
+ name: "search-input",
155
+ onChange: handleInputChange,
156
+ placeholder: placeHolderText,
157
+ value: text,
158
+ size: "lg"
159
+ }), /*#__PURE__*/_react.default.createElement(_react2.Button, {
160
+ name: "search-submit",
161
+ kind: "primary",
162
+ type: "submit",
163
+ className: "".concat(blockClass, "__submit"),
164
+ disabled: !isInputDirty
165
+ }, submitLabel));
166
+ });
167
+
168
+ // Return a placeholder if not released and not enabled by feature flag
169
+ exports.SearchBar = SearchBar = _settings.pkg.checkComponentEnabled(SearchBar, componentName);
170
+
171
+ // The display name of the component, used by React. Note that displayName
172
+ // is used in preference to relying on function.name.
173
+ SearchBar.displayName = componentName;
174
+ var conditionalScopePropValidator = function conditionalScopePropValidator(props, propName, componentName) {
175
+ if (props.scopes && props.scopes.length > 0 && !props[propName]) {
176
+ return new Error("Required `".concat(propName, "` when `scopes` prop type is supplied to `").concat(componentName, "`. Validation failed."));
177
+ }
178
+ for (var _len = arguments.length, rest = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
179
+ rest[_key - 3] = arguments[_key];
180
+ }
181
+ return _propTypes.default.string.apply(_propTypes.default, [props, propName, componentName].concat(rest));
182
+ };
183
+
184
+ // The types and DocGen commentary for the component props,
185
+ // in alphabetical order (for consistency).
186
+ // See https://www.npmjs.com/package/prop-types#usage.
187
+ SearchBar.propTypes = {
188
+ /** @type {string} Optional additional class name. */
189
+ className: _propTypes.default.string,
190
+ /** @type {string} The label text for the search text input. */
191
+ clearButtonLabelText: _propTypes.default.string.isRequired,
192
+ /**
193
+ * Whether or not the scopes MultiSelect label is visually hidden.
194
+ */
195
+ hideScopesLabel: _propTypes.default.bool,
196
+ /** @type {string} The label text for the search text input. */
197
+ labelText: _propTypes.default.string,
198
+ /** @type {Function} Function handler for when the user changes their query search. */
199
+ onChange: _propTypes.default.func,
200
+ /** @type {Function} Function handler for when the user submits a search. */
201
+ onSubmit: _propTypes.default.func,
202
+ /** @type {string} Placeholder text to be displayed in the search input. */
203
+ placeHolderText: _propTypes.default.string.isRequired,
204
+ /** @type {Function} Function to get the text for each scope to display in dropdown. */
205
+ scopeToString: _propTypes.default.func,
206
+ /** @type {Array<any>} Array of allowed search scopes. */
207
+ scopes: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.object])),
208
+ /** @type {string} The name text for the search scope type. */
209
+ // eslint-disable-next-line react/require-default-props
210
+ scopesTypeLabel: conditionalScopePropValidator,
211
+ /** @type {Array<any> Array of initially selected search scopes. */
212
+ selectedScopes: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.object])),
213
+ /**
214
+ * Optional custom sorting algorithm for an array of scope items.
215
+ * By default, scope items are sorted in ascending alphabetical order,
216
+ * with "selected" items moved to the start of the scope items array.
217
+ */
218
+ sortItems: _propTypes.default.func,
219
+ // eslint-disable-line react/require-default-props
220
+
221
+ /** @type {string} The label text for the search submit button. */
222
+ submitLabel: _propTypes.default.string.isRequired,
223
+ /**
224
+ * Provide accessible label text for the scopes MultiSelect.
225
+ */
226
+ titleText: _propTypes.default.string,
227
+ /** @type {func} Callback function for translating MultiSelect's child ListBoxMenuIcon SVG title. */
228
+ translateWithId: _propTypes.default.func,
229
+ // eslint-disable-line react/require-default-props
230
+
231
+ /** @type {string} Search query value. */
232
+ value: _propTypes.default.string
233
+ };
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "SearchBar", {
7
+ enumerable: true,
8
+ get: function get() {
9
+ return _SearchBar.SearchBar;
10
+ }
11
+ });
12
+ var _SearchBar = require("./SearchBar");
@@ -27,6 +27,48 @@ Object.defineProperty(exports, "Checklist", {
27
27
  return _Checklist.Checklist;
28
28
  }
29
29
  });
30
+ Object.defineProperty(exports, "Coachmark", {
31
+ enumerable: true,
32
+ get: function get() {
33
+ return _Coachmark.Coachmark;
34
+ }
35
+ });
36
+ Object.defineProperty(exports, "CoachmarkBeacon", {
37
+ enumerable: true,
38
+ get: function get() {
39
+ return _CoachmarkBeacon.CoachmarkBeacon;
40
+ }
41
+ });
42
+ Object.defineProperty(exports, "CoachmarkButton", {
43
+ enumerable: true,
44
+ get: function get() {
45
+ return _CoachmarkButton.CoachmarkButton;
46
+ }
47
+ });
48
+ Object.defineProperty(exports, "CoachmarkFixed", {
49
+ enumerable: true,
50
+ get: function get() {
51
+ return _CoachmarkFixed.CoachmarkFixed;
52
+ }
53
+ });
54
+ Object.defineProperty(exports, "CoachmarkOverlayElement", {
55
+ enumerable: true,
56
+ get: function get() {
57
+ return _CoachmarkOverlayElement.CoachmarkOverlayElement;
58
+ }
59
+ });
60
+ Object.defineProperty(exports, "CoachmarkOverlayElements", {
61
+ enumerable: true,
62
+ get: function get() {
63
+ return _CoachmarkOverlayElements.CoachmarkOverlayElements;
64
+ }
65
+ });
66
+ Object.defineProperty(exports, "CoachmarkStack", {
67
+ enumerable: true,
68
+ get: function get() {
69
+ return _CoachmarkStack.CoachmarkStack;
70
+ }
71
+ });
30
72
  Object.defineProperty(exports, "ComboButton", {
31
73
  enumerable: true,
32
74
  get: function get() {
@@ -237,6 +279,24 @@ Object.defineProperty(exports, "InlineTipLink", {
237
279
  return _InlineTip.InlineTipLink;
238
280
  }
239
281
  });
282
+ Object.defineProperty(exports, "InterstitialScreen", {
283
+ enumerable: true,
284
+ get: function get() {
285
+ return _InterstitialScreen.InterstitialScreen;
286
+ }
287
+ });
288
+ Object.defineProperty(exports, "InterstitialScreenView", {
289
+ enumerable: true,
290
+ get: function get() {
291
+ return _InterstitialScreenView.InterstitialScreenView;
292
+ }
293
+ });
294
+ Object.defineProperty(exports, "InterstitialScreenViewModule", {
295
+ enumerable: true,
296
+ get: function get() {
297
+ return _InterstitialScreenViewModule.InterstitialScreenViewModule;
298
+ }
299
+ });
240
300
  Object.defineProperty(exports, "MultiAddSelect", {
241
301
  enumerable: true,
242
302
  get: function get() {
@@ -309,6 +369,12 @@ Object.defineProperty(exports, "Saving", {
309
369
  return _Saving.Saving;
310
370
  }
311
371
  });
372
+ Object.defineProperty(exports, "SearchBar", {
373
+ enumerable: true,
374
+ get: function get() {
375
+ return _SearchBar.SearchBar;
376
+ }
377
+ });
312
378
  Object.defineProperty(exports, "SidePanel", {
313
379
  enumerable: true,
314
380
  get: function get() {
@@ -557,7 +623,18 @@ var _EditTearsheetNarrow = require("./EditTearsheetNarrow");
557
623
  var _EditFullPage = require("./EditFullPage");
558
624
  var _EditUpdateCards = require("./EditUpdateCards");
559
625
  var _Checklist = require("./Checklist");
626
+ var _Coachmark = require("./Coachmark");
627
+ var _CoachmarkBeacon = require("./CoachmarkBeacon");
628
+ var _CoachmarkButton = require("./CoachmarkButton");
629
+ var _CoachmarkFixed = require("./CoachmarkFixed");
630
+ var _CoachmarkOverlayElement = require("./CoachmarkOverlayElement");
631
+ var _CoachmarkOverlayElements = require("./CoachmarkOverlayElements");
632
+ var _CoachmarkStack = require("./CoachmarkStack");
560
633
  var _Guidebanner = require("./Guidebanner");
561
634
  var _InlineTip = require("./InlineTip");
562
635
  var _NonLinearReading = require("./NonLinearReading");
563
- var _DelimitedList = require("./DelimitedList");
636
+ var _InterstitialScreen = require("./InterstitialScreen");
637
+ var _InterstitialScreenView = require("./InterstitialScreenView");
638
+ var _InterstitialScreenViewModule = require("./InterstitialScreenViewModule");
639
+ var _DelimitedList = require("./DelimitedList");
640
+ var _SearchBar = require("./SearchBar");
@@ -74,7 +74,18 @@ var defaults = {
74
74
  EditTearsheetNarrow: false,
75
75
  EditFullPage: false,
76
76
  EditUpdateCards: false,
77
+ /* new component flags here - comment used by generate CLI */
78
+
79
+ // Novice to pro components not yet reviewed and released:
80
+ Coachmark: false,
81
+ CoachmarkBeacon: false,
82
+ CoachmarkButton: false,
83
+ CoachmarkFixed: false,
84
+ CoachmarkOverlayElement: false,
85
+ CoachmarkOverlayElements: false,
86
+ CoachmarkStack: false,
77
87
  DelimitedList: false,
88
+ SearchBar: false,
78
89
  /* new component flags here - comment used by generate CLI */
79
90
 
80
91
  // Novice to pro components not yet reviewed and released:
@@ -86,6 +97,9 @@ var defaults = {
86
97
  InlineTip: false,
87
98
  InlineTipButton: false,
88
99
  InlineTipLink: false,
100
+ InterstitialScreen: false,
101
+ InterstitialScreenView: false,
102
+ InterstitialScreenViewModule: false,
89
103
  NonLinearReading: false
90
104
  },
91
105
  // feature level flags
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.23.0",
4
+ "version": "2.24.0",
5
5
  "license": "Apache-2.0",
6
6
  "main": "lib/index.js",
7
7
  "module": "es/index.js",
@@ -76,7 +76,7 @@
76
76
  },
77
77
  "dependencies": {
78
78
  "@babel/runtime": "^7.22.10",
79
- "@carbon/ibm-products-styles": "^2.22.0",
79
+ "@carbon/ibm-products-styles": "^2.23.0",
80
80
  "@dnd-kit/core": "^6.0.8",
81
81
  "@dnd-kit/sortable": "^7.0.2",
82
82
  "@dnd-kit/utilities": "^3.2.1",
@@ -92,11 +92,11 @@
92
92
  "@carbon/grid": "^11.21.1",
93
93
  "@carbon/layout": "^11.20.1",
94
94
  "@carbon/motion": "^11.16.1",
95
- "@carbon/react": "^1.48.1",
96
- "@carbon/themes": "^11.29.1",
95
+ "@carbon/react": "^1.49.0",
96
+ "@carbon/themes": "^11.30.0",
97
97
  "@carbon/type": "^11.25.1",
98
98
  "react": "^16.8.6 || ^17.0.1 || ^18.2.0",
99
99
  "react-dom": "^16.8.6 || ^17.0.1 || ^18.2.0"
100
100
  },
101
- "gitHead": "53994e2a9217f53da099f5599541618fbfbc7790"
101
+ "gitHead": "02ec3178179d8ff6b55530e2d72ea1727f85ff69"
102
102
  }
@@ -143,8 +143,6 @@ $block-class: #{c4p-settings.$pkg-prefix}--card;
143
143
  }
144
144
 
145
145
  .#{$block-class} .#{c4p-settings.$carbon-prefix}--slug {
146
- @include utilities.callout-gradient();
147
-
148
146
  position: absolute;
149
147
  top: $spacing-05;
150
148
  right: $spacing-05;
@@ -173,17 +171,20 @@ $block-class: #{c4p-settings.$pkg-prefix}--card;
173
171
  }
174
172
 
175
173
  .#{$block-class}--has-slug {
176
- @include utilities.callout-gradient();
174
+ @include utilities.callout-gradient('default', 0, 'layer');
177
175
 
178
- border: 1px solid $border-tile;
176
+ border: 1px solid transparent;
177
+ box-shadow: inset 0 -80px 70px -65px $ai-inner-shadow,
178
+ 0 4px 10px 2px $ai-drop-shadow;
179
179
  }
180
180
 
181
181
  .#{$block-class}__clickable.#{$block-class}--has-slug::before {
182
- @include utilities.callout-gradient('hover');
182
+ @include utilities.callout-gradient('hover', 0, 'layer');
183
183
 
184
184
  position: absolute;
185
185
  display: block;
186
186
  block-size: 100%;
187
+ box-shadow: inset 0 -80px 70px -65px $ai-inner-shadow;
187
188
  content: '';
188
189
  inline-size: 100%;
189
190
  inset-block-start: 0;
@@ -0,0 +1,10 @@
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
+
8
+ // Import any Carbon component styles used from Coachmark in this file.
9
+ // Coachmark uses the following Carbon components:
10
+ @use '@carbon/react/scss/components/button';