@carbon/ibm-products 2.22.0 → 2.24.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (205) hide show
  1. package/README.md +2 -1
  2. package/css/index-full-carbon.css +29490 -28295
  3. package/css/index-full-carbon.css.map +1 -1
  4. package/css/index-full-carbon.min.css +1 -1
  5. package/css/index-full-carbon.min.css.map +1 -1
  6. package/css/index-without-carbon-released-only.css +81 -104
  7. package/css/index-without-carbon-released-only.css.map +1 -1
  8. package/css/index-without-carbon-released-only.min.css +1 -1
  9. package/css/index-without-carbon-released-only.min.css.map +1 -1
  10. package/css/index-without-carbon.css +24399 -350
  11. package/css/index-without-carbon.css.map +1 -1
  12. package/css/index-without-carbon.min.css +1 -1
  13. package/css/index-without-carbon.min.css.map +1 -1
  14. package/css/index.css +17204 -123
  15. package/css/index.css.map +1 -1
  16. package/css/index.min.css +1 -1
  17. package/css/index.min.css.map +1 -1
  18. package/es/components/Card/Card.js +1 -2
  19. package/es/components/Card/CardHeader.js +2 -2
  20. package/es/components/Carousel/Carousel.js +5 -3
  21. package/es/components/Coachmark/Coachmark.js +255 -0
  22. package/es/components/Coachmark/CoachmarkDragbar.js +146 -0
  23. package/es/components/Coachmark/CoachmarkHeader.js +91 -0
  24. package/es/components/Coachmark/CoachmarkOverlay.js +235 -0
  25. package/es/components/Coachmark/CoachmarkTagline.js +97 -0
  26. package/es/components/Coachmark/index.js +10 -0
  27. package/es/components/Coachmark/utils/constants.js +76 -0
  28. package/es/components/Coachmark/utils/context.js +5 -0
  29. package/es/components/Coachmark/utils/enums.js +40 -0
  30. package/es/components/Coachmark/utils/helpers.js +11 -0
  31. package/es/components/Coachmark/utils/hooks.js +54 -0
  32. package/es/components/CoachmarkBeacon/CoachmarkBeacon.js +93 -0
  33. package/es/components/CoachmarkBeacon/index.js +8 -0
  34. package/es/components/CoachmarkButton/CoachmarkButton.js +90 -0
  35. package/es/components/CoachmarkButton/index.js +8 -0
  36. package/es/components/CoachmarkFixed/CoachmarkFixed.js +226 -0
  37. package/es/components/CoachmarkFixed/index.js +8 -0
  38. package/es/components/CoachmarkOverlayElement/CoachmarkOverlayElement.js +86 -0
  39. package/es/components/CoachmarkOverlayElement/index.js +8 -0
  40. package/es/components/CoachmarkOverlayElements/CoachmarkOverlayElements.js +216 -0
  41. package/es/components/CoachmarkOverlayElements/index.js +8 -0
  42. package/es/components/CoachmarkStack/CoachmarkStack.js +283 -0
  43. package/es/components/CoachmarkStack/CoachmarkStackHome.js +192 -0
  44. package/es/components/CoachmarkStack/index.js +8 -0
  45. package/es/components/Datagrid/Datagrid/DatagridHeaderRow.js +14 -4
  46. package/es/components/Datagrid/Datagrid/DatagridSelectAll.js +4 -1
  47. package/es/components/Datagrid/Datagrid/DraggableElement.js +1 -1
  48. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/ButtonWrapper.js +1 -1
  49. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.js +4 -1
  50. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +1 -1
  51. package/es/components/Datagrid/Datagrid/addons/Slug/ColumnHeaderSlug.js +26 -0
  52. package/es/components/Datagrid/Datagrid.docs-page.js +2 -2
  53. package/es/components/Datagrid/useActionsColumn.js +16 -12
  54. package/es/components/Datagrid/useDefaultStringRenderer.js +3 -3
  55. package/es/components/Datagrid/useNestedRowExpander.js +2 -2
  56. package/es/components/Datagrid/useSortableColumns.js +15 -5
  57. package/es/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +7 -2
  58. package/es/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +8 -3
  59. package/es/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +7 -2
  60. package/es/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +7 -2
  61. package/es/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +7 -2
  62. package/es/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +7 -2
  63. package/es/components/EmptyStates/assets/ErrorIllustration.js +5 -5
  64. package/es/components/EmptyStates/assets/NoDataIllustration.js +5 -5
  65. package/es/components/EmptyStates/assets/NoTagsIllustration.js +5 -5
  66. package/es/components/EmptyStates/assets/NotFoundIllustration.js +5 -5
  67. package/es/components/EmptyStates/assets/NotificationsIllustration.js +5 -5
  68. package/es/components/EmptyStates/assets/UnauthorizedIllustration.js +5 -5
  69. package/es/components/FilterSummary/FilterSummary.js +100 -19
  70. package/es/components/InterstitialScreen/InterstitialScreen.js +427 -0
  71. package/es/components/InterstitialScreen/index.js +8 -0
  72. package/es/components/InterstitialScreenView/InterstitialScreenView.js +75 -0
  73. package/es/components/InterstitialScreenView/index.js +8 -0
  74. package/es/components/InterstitialScreenViewModule/InterstitialScreenViewModule.js +83 -0
  75. package/es/components/InterstitialScreenViewModule/index.js +8 -0
  76. package/es/components/PageHeader/PageHeaderUtils.js +2 -2
  77. package/es/components/SearchBar/SearchBar.js +227 -0
  78. package/es/components/SearchBar/index.js +8 -0
  79. package/es/components/TagSet/TagSet.js +11 -3
  80. package/es/components/index.js +12 -1
  81. package/es/global/js/hooks/useResizeObserver.js +2 -2
  82. package/es/global/js/package-settings.js +14 -0
  83. package/lib/components/Card/Card.js +3 -4
  84. package/lib/components/Card/CardHeader.js +2 -2
  85. package/lib/components/Carousel/Carousel.js +5 -3
  86. package/lib/components/Coachmark/Coachmark.js +264 -0
  87. package/lib/components/Coachmark/CoachmarkDragbar.js +151 -0
  88. package/lib/components/Coachmark/CoachmarkHeader.js +95 -0
  89. package/lib/components/Coachmark/CoachmarkOverlay.js +243 -0
  90. package/lib/components/Coachmark/CoachmarkTagline.js +101 -0
  91. package/lib/components/Coachmark/index.js +38 -0
  92. package/lib/components/Coachmark/utils/constants.js +81 -0
  93. package/lib/components/Coachmark/utils/context.js +11 -0
  94. package/lib/components/Coachmark/utils/enums.js +46 -0
  95. package/lib/components/Coachmark/utils/helpers.js +17 -0
  96. package/lib/components/Coachmark/utils/hooks.js +59 -0
  97. package/lib/components/CoachmarkBeacon/CoachmarkBeacon.js +97 -0
  98. package/lib/components/CoachmarkBeacon/index.js +12 -0
  99. package/lib/components/CoachmarkButton/CoachmarkButton.js +93 -0
  100. package/lib/components/CoachmarkButton/index.js +12 -0
  101. package/lib/components/CoachmarkFixed/CoachmarkFixed.js +232 -0
  102. package/lib/components/CoachmarkFixed/index.js +12 -0
  103. package/lib/components/CoachmarkOverlayElement/CoachmarkOverlayElement.js +90 -0
  104. package/lib/components/CoachmarkOverlayElement/index.js +12 -0
  105. package/lib/components/CoachmarkOverlayElements/CoachmarkOverlayElements.js +222 -0
  106. package/lib/components/CoachmarkOverlayElements/index.js +12 -0
  107. package/lib/components/CoachmarkStack/CoachmarkStack.js +288 -0
  108. package/lib/components/CoachmarkStack/CoachmarkStackHome.js +198 -0
  109. package/lib/components/CoachmarkStack/index.js +12 -0
  110. package/lib/components/Datagrid/Datagrid/DatagridHeaderRow.js +14 -4
  111. package/lib/components/Datagrid/Datagrid/DatagridSelectAll.js +4 -1
  112. package/lib/components/Datagrid/Datagrid/DraggableElement.js +1 -1
  113. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/ButtonWrapper.js +1 -1
  114. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.js +4 -1
  115. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +1 -1
  116. package/lib/components/Datagrid/Datagrid/addons/Slug/ColumnHeaderSlug.js +36 -0
  117. package/lib/components/Datagrid/Datagrid.docs-page.js +2 -2
  118. package/lib/components/Datagrid/useActionsColumn.js +15 -11
  119. package/lib/components/Datagrid/useDefaultStringRenderer.js +3 -3
  120. package/lib/components/Datagrid/useNestedRowExpander.js +2 -2
  121. package/lib/components/Datagrid/useSortableColumns.js +15 -5
  122. package/lib/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +7 -2
  123. package/lib/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +8 -3
  124. package/lib/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +7 -2
  125. package/lib/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +7 -2
  126. package/lib/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +7 -2
  127. package/lib/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +7 -2
  128. package/lib/components/EmptyStates/assets/ErrorIllustration.js +5 -5
  129. package/lib/components/EmptyStates/assets/NoDataIllustration.js +5 -5
  130. package/lib/components/EmptyStates/assets/NoTagsIllustration.js +5 -5
  131. package/lib/components/EmptyStates/assets/NotFoundIllustration.js +5 -5
  132. package/lib/components/EmptyStates/assets/NotificationsIllustration.js +5 -5
  133. package/lib/components/EmptyStates/assets/UnauthorizedIllustration.js +5 -5
  134. package/lib/components/FilterSummary/FilterSummary.js +103 -23
  135. package/lib/components/InterstitialScreen/InterstitialScreen.js +434 -0
  136. package/lib/components/InterstitialScreen/index.js +12 -0
  137. package/lib/components/InterstitialScreenView/InterstitialScreenView.js +77 -0
  138. package/lib/components/InterstitialScreenView/index.js +12 -0
  139. package/lib/components/InterstitialScreenViewModule/InterstitialScreenViewModule.js +85 -0
  140. package/lib/components/InterstitialScreenViewModule/index.js +12 -0
  141. package/lib/components/PageHeader/PageHeaderUtils.js +2 -2
  142. package/lib/components/SearchBar/SearchBar.js +233 -0
  143. package/lib/components/SearchBar/index.js +12 -0
  144. package/lib/components/TagSet/TagSet.js +11 -3
  145. package/lib/components/index.js +78 -1
  146. package/lib/global/js/hooks/useResizeObserver.js +2 -2
  147. package/lib/global/js/package-settings.js +14 -0
  148. package/package.json +5 -5
  149. package/scss/components/Card/_card.scss +6 -5
  150. package/scss/components/Coachmark/_carbon-imports.scss +10 -0
  151. package/scss/components/Coachmark/_coachmark-dragbar.scss +27 -0
  152. package/scss/components/Coachmark/_coachmark-header.scss +20 -0
  153. package/scss/components/Coachmark/_coachmark-overlay.scss +431 -0
  154. package/scss/components/Coachmark/_coachmark-tagline.scss +140 -0
  155. package/scss/components/Coachmark/_coachmark.scss +30 -0
  156. package/scss/components/Coachmark/_index-with-carbon.scss +9 -0
  157. package/scss/components/Coachmark/_index.scss +8 -0
  158. package/scss/components/CoachmarkBeacon/_carbon-imports.scss +9 -0
  159. package/scss/components/CoachmarkBeacon/_coachmark-beacon.scss +166 -0
  160. package/scss/components/CoachmarkBeacon/_index-with-carbon.scss +9 -0
  161. package/scss/components/CoachmarkBeacon/_index.scss +8 -0
  162. package/scss/components/CoachmarkButton/_carbon-imports.scss +9 -0
  163. package/scss/components/CoachmarkButton/_coachmark-button.scss +25 -0
  164. package/scss/components/CoachmarkButton/_index-with-carbon.scss +9 -0
  165. package/scss/components/CoachmarkButton/_index.scss +8 -0
  166. package/scss/components/CoachmarkFixed/_carbon-imports.scss +9 -0
  167. package/scss/components/CoachmarkFixed/_coachmark-fixed.scss +25 -0
  168. package/scss/components/CoachmarkFixed/_index-with-carbon.scss +9 -0
  169. package/scss/components/CoachmarkFixed/_index.scss +8 -0
  170. package/scss/components/CoachmarkOverlayElement/_carbon-imports.scss +9 -0
  171. package/scss/components/CoachmarkOverlayElement/_coachmark-overlay-element.scss +52 -0
  172. package/scss/components/CoachmarkOverlayElement/_index-with-carbon.scss +9 -0
  173. package/scss/components/CoachmarkOverlayElement/_index.scss +8 -0
  174. package/scss/components/CoachmarkOverlayElements/_carbon-imports.scss +9 -0
  175. package/scss/components/CoachmarkOverlayElements/_coachmark-overlay-elements.scss +47 -0
  176. package/scss/components/CoachmarkOverlayElements/_index-with-carbon.scss +9 -0
  177. package/scss/components/CoachmarkOverlayElements/_index.scss +8 -0
  178. package/scss/components/CoachmarkStack/_carbon-imports.scss +9 -0
  179. package/scss/components/CoachmarkStack/_coachmark-stack.scss +95 -0
  180. package/scss/components/CoachmarkStack/_index-with-carbon.scss +9 -0
  181. package/scss/components/CoachmarkStack/_index.scss +8 -0
  182. package/scss/components/CreateSidePanel/_create-side-panel.scss +1 -38
  183. package/scss/components/Datagrid/styles/_datagrid.scss +15 -0
  184. package/scss/components/EditSidePanel/_edit-side-panel.scss +0 -18
  185. package/scss/components/FilterSummary/_filter-summary.scss +22 -1
  186. package/scss/components/InterstitialScreen/_carbon-imports.scss +9 -0
  187. package/scss/components/InterstitialScreen/_index-with-carbon.scss +9 -0
  188. package/scss/components/InterstitialScreen/_index.scss +8 -0
  189. package/scss/components/InterstitialScreen/_interstitial-screen.scss +276 -0
  190. package/scss/components/InterstitialScreenView/_carbon-imports.scss +9 -0
  191. package/scss/components/InterstitialScreenView/_index-with-carbon.scss +9 -0
  192. package/scss/components/InterstitialScreenView/_index.scss +8 -0
  193. package/scss/components/InterstitialScreenView/_interstitial-screen-view.scss +25 -0
  194. package/scss/components/InterstitialScreenViewModule/_carbon-imports.scss +9 -0
  195. package/scss/components/InterstitialScreenViewModule/_index-with-carbon.scss +9 -0
  196. package/scss/components/InterstitialScreenViewModule/_index.scss +8 -0
  197. package/scss/components/InterstitialScreenViewModule/_interstitial-screen-view-module.scss +59 -0
  198. package/scss/components/PageHeader/_page-header.scss +0 -1
  199. package/scss/components/SearchBar/_carbon-imports.scss +9 -0
  200. package/scss/components/SearchBar/_index-with-carbon.scss +9 -0
  201. package/scss/components/SearchBar/_index.scss +8 -0
  202. package/scss/components/SearchBar/_search-bar.scss +26 -0
  203. package/scss/components/SidePanel/_side-panel.scss +12 -7
  204. package/scss/components/_index-with-carbon.scss +11 -0
  205. package/scss/components/_index.scss +11 -0
@@ -1,4 +1,5 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
+ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
3
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
4
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
5
  var _excluded = ["className", "clearFiltersText", "clearFilters", "filters", "renderLabel", "overflowType", "clearButtonInline"],
@@ -6,22 +7,28 @@ var _excluded = ["className", "clearFiltersText", "clearFilters", "filters", "re
6
7
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
7
8
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
8
9
  /**
9
- * Copyright IBM Corp. 2022, 2023
10
+ * Copyright IBM Corp. 2022, 2024
10
11
  *
11
12
  * This source code is licensed under the Apache-2.0 license found in the
12
13
  * LICENSE file in the root directory of this source tree.
13
14
  */
14
- import { Button } from '@carbon/react';
15
- import React, { useRef } from 'react';
15
+
16
+ import React, { useRef, useState } from 'react';
17
+ import { Button, IconButton } from '@carbon/react';
18
+ import { AnimatePresence, motion } from 'framer-motion';
19
+ import { ChevronDown } from '@carbon/react/icons';
16
20
  import PropTypes from 'prop-types';
17
21
  import cx from 'classnames';
18
22
  import { TagSet } from '../TagSet';
19
23
  import { pkg } from '../../settings';
20
24
  import uuidv4 from '../../global/js/utils/uuidv4';
25
+ import { DURATIONS, EASINGS } from '../../global/js/utils/motionConstants';
26
+ import { useWindowResize, usePreviousValue } from '../../global/js/hooks';
27
+ import debounce from 'lodash/debounce';
21
28
  import { getDevtoolsProps } from '../../global/js/utils/devtools';
22
29
  var blockClass = "".concat(pkg.prefix, "--filter-summary");
23
30
  var FilterSummary = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
24
- var _filterSummaryClearBu;
31
+ var _viewAllButtonRef$cur, _filterSummaryClearBu;
25
32
  var _ref$className = _ref.className,
26
33
  className = _ref$className === void 0 ? '' : _ref$className,
27
34
  _ref$clearFiltersText = _ref.clearFiltersText,
@@ -47,29 +54,103 @@ var FilterSummary = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
47
54
  });
48
55
  });
49
56
  var filterSummaryClearButton = useRef();
57
+ var viewAllButtonRef = useRef();
50
58
  var filterSummaryRef = useRef();
51
- var localRef = ref || filterSummaryRef;
59
+ var localRef = filterSummaryRef || ref;
60
+ var _useState = useState(0),
61
+ _useState2 = _slicedToArray(_useState, 2),
62
+ overflowCount = _useState2[0],
63
+ setOverflowCount = _useState2[1];
64
+ var _useState3 = useState(false),
65
+ _useState4 = _slicedToArray(_useState3, 2),
66
+ multiline = _useState4[0],
67
+ setMultiline = _useState4[1];
68
+ var previousState = usePreviousValue({
69
+ multiline: multiline
70
+ });
71
+ var handleViewAll = function handleViewAll() {
72
+ if (overflowCount === 0) {
73
+ setMultiline(false);
74
+ return;
75
+ }
76
+ setMultiline(function (prev) {
77
+ return !prev;
78
+ });
79
+ };
80
+ var viewAllWidth = typeof (viewAllButtonRef === null || viewAllButtonRef === void 0 || (_viewAllButtonRef$cur = viewAllButtonRef.current) === null || _viewAllButtonRef$cur === void 0 ? void 0 : _viewAllButtonRef$cur.offsetWidth) === 'undefined' ? 0 : overflowCount > 0 ? 48 : 0;
81
+ var measurementOffset = (filterSummaryClearButton === null || filterSummaryClearButton === void 0 || (_filterSummaryClearBu = filterSummaryClearButton.current) === null || _filterSummaryClearBu === void 0 ? void 0 : _filterSummaryClearBu.offsetWidth) + viewAllWidth;
82
+ var renderTagSet = function renderTagSet(type) {
83
+ return /*#__PURE__*/React.createElement(motion.div, {
84
+ key: type,
85
+ initial: {
86
+ opacity: 0,
87
+ y: -16
88
+ },
89
+ animate: {
90
+ opacity: 1,
91
+ y: 0
92
+ },
93
+ exit: {
94
+ opacity: 0,
95
+ y: -16
96
+ },
97
+ transition: {
98
+ duration: DURATIONS.moderate01,
99
+ ease: EASINGS.productive.entrance
100
+ }
101
+ }, /*#__PURE__*/React.createElement(TagSet, {
102
+ allTagsModalSearchLabel: "Search all tags",
103
+ allTagsModalSearchPlaceholderText: "Search all tags",
104
+ allTagsModalTitle: "All tags",
105
+ showAllTagsLabel: "View all tags",
106
+ tags: tagFilters,
107
+ overflowType: overflowType,
108
+ className: cx(_defineProperty({}, "".concat(blockClass, "__clear-button-inline"), clearButtonInline)),
109
+ containingElementRef: localRef,
110
+ measurementOffset: measurementOffset,
111
+ onOverflowTagChange: function onOverflowTagChange(overflowTags) {
112
+ return setOverflowCount(overflowTags.length);
113
+ },
114
+ multiline: multiline
115
+ }));
116
+ };
117
+ useWindowResize(function () {
118
+ var handleFilterSummaryResize = function handleFilterSummaryResize() {
119
+ var _localRef$current;
120
+ if (multiline && (localRef === null || localRef === void 0 || (_localRef$current = localRef.current) === null || _localRef$current === void 0 ? void 0 : _localRef$current.offsetHeight) <= 50) {
121
+ setMultiline(false);
122
+ }
123
+ };
124
+ var filterResize = debounce(handleFilterSummaryResize, 500);
125
+ filterResize();
126
+ }, [previousState === null || previousState === void 0 ? void 0 : previousState.multiline, multiline]);
52
127
  return /*#__PURE__*/React.createElement("div", _extends({}, getDevtoolsProps(componentName), {
53
128
  id: filterSummaryId
54
129
  }, rest, {
55
130
  ref: localRef,
56
- className: cx([blockClass, className])
57
- }), /*#__PURE__*/React.createElement(TagSet, {
58
- allTagsModalSearchLabel: "Search all tags",
59
- allTagsModalSearchPlaceholderText: "Search all tags",
60
- allTagsModalTitle: "All tags",
61
- showAllTagsLabel: "View all tags",
62
- tags: tagFilters,
63
- overflowType: overflowType,
64
- className: cx(_defineProperty({}, "".concat(blockClass, "__clear-button-inline"), clearButtonInline)),
65
- containingElementRef: localRef,
66
- measurementOffset: filterSummaryClearButton === null || filterSummaryClearButton === void 0 || (_filterSummaryClearBu = filterSummaryClearButton.current) === null || _filterSummaryClearBu === void 0 ? void 0 : _filterSummaryClearBu.offsetWidth
67
- }), /*#__PURE__*/React.createElement(Button, {
131
+ className: cx([blockClass, className], _defineProperty({}, "".concat(blockClass, "__expanded"), multiline))
132
+ }), /*#__PURE__*/React.createElement(AnimatePresence, {
133
+ mode: "wait",
134
+ exitBeforeEnter: true
135
+ }, !multiline && renderTagSet('single'), multiline && renderTagSet('multiline')), /*#__PURE__*/React.createElement(Button, {
68
136
  kind: "ghost",
69
137
  size: "sm",
70
138
  onClick: clearFilters,
71
- ref: filterSummaryClearButton
72
- }, clearFiltersText));
139
+ ref: filterSummaryClearButton,
140
+ className: "".concat(blockClass, "__clear-all-button")
141
+ }, clearFiltersText), (overflowCount > 0 || multiline) && /*#__PURE__*/React.createElement("div", {
142
+ className: "".concat(blockClass, "__view-all--wrapper")
143
+ }, /*#__PURE__*/React.createElement(IconButton, {
144
+ ref: viewAllButtonRef,
145
+ kind: "ghost",
146
+ label: 'View all',
147
+ className: "".concat(blockClass, "__view-all--trigger"),
148
+ align: "left",
149
+ onClick: handleViewAll,
150
+ size: "sm"
151
+ }, /*#__PURE__*/React.createElement(ChevronDown, {
152
+ className: cx("".concat(blockClass, "__view-all--chevron"), _defineProperty({}, "".concat(blockClass, "__view-all--chevron-multiline"), multiline))
153
+ }))));
73
154
  });
74
155
  var componentName = 'FilterSummary';
75
156
  FilterSummary.displayName = componentName;
@@ -0,0 +1,427 @@
1
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ import _extends from "@babel/runtime/helpers/extends";
3
+ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
5
+ var _excluded = ["children", "className", "closeIconDescription", "domainName", "hideProgressIndicator", "interstitialAriaLabel", "isFullScreen", "isOpen", "media", "nextButtonLabel", "onClose", "previousButtonLabel", "productName", "headerClassName", "headerTitle", "startButtonLabel", "skipButtonLabel"];
6
+ /**
7
+ * Copyright IBM Corp. 2024, 2024
8
+ *
9
+ * This source code is licensed under the Apache-2.0 license found in the
10
+ * LICENSE file in the root directory of this source tree.
11
+ */
12
+
13
+ // Import portions of React that are needed.
14
+ import React, { Children, useCallback, useEffect, useRef, useState } from 'react';
15
+
16
+ // Other standard imports.
17
+ import PropTypes from 'prop-types';
18
+ import cx from 'classnames';
19
+ import { getDevtoolsProps } from '../../global/js/utils/devtools';
20
+ import { pkg /*, carbon */ } from '../../settings';
21
+
22
+ // Other standard imports.
23
+ import { clamp } from 'lodash';
24
+ import { ArrowRight } from '@carbon/icons-react'; //Close16
25
+ import { Button, Column, ComposedModal, ModalBody, ModalHeader, ModalFooter, FlexGrid, ProgressIndicator, ProgressStep, Row } from '@carbon/react';
26
+ import { Carousel } from '../Carousel';
27
+ import { SteppedAnimatedMedia } from '../SteppedAnimatedMedia';
28
+
29
+ // The block part of our conventional BEM class names (blockClass__E--M).
30
+ var blockClass = "".concat(pkg.prefix, "--interstitial-screen");
31
+ var headerBlockClass = "".concat(blockClass, "--internal-header");
32
+ var bodyBlockClass = "".concat(blockClass, "--internal-body");
33
+ var componentName = 'InterstitialScreen';
34
+
35
+ // NOTE: the component SCSS is not imported here: it is rolled up separately.
36
+
37
+ // Default values can be included here and then assigned to the prop params,
38
+ // e.g. prop = defaults.prop,
39
+ // This gathers default values together neatly and ensures non-primitive
40
+ // values are initialized early to avoid react making unnecessary re-renders.
41
+ // Note that default values are not required for props that are 'required',
42
+ // nor for props where the component can apply undefined values reasonably.
43
+ // Default values should be provided when the component needs to make a choice
44
+ // or assumption when a prop is not supplied.
45
+
46
+ // Default values for props
47
+ var defaults = {
48
+ closeIconDescription: 'Close',
49
+ domainName: '',
50
+ hideProgressIndicator: false,
51
+ interstitialAriaLabel: 'Interstitial screen',
52
+ isFullScreen: false,
53
+ isOpen: false,
54
+ nextButtonLabel: 'Next',
55
+ onClose: function onClose() {},
56
+ previousButtonLabel: 'Back',
57
+ productName: '',
58
+ skipButtonLabel: '',
59
+ startButtonLabel: 'Get started'
60
+ };
61
+
62
+ /**
63
+ * InterstitialScreen can be a full page or an overlay, and are
64
+ * shown on the first time a user accesses a new experience
65
+ * (e.g. upon first login or first time opening a page where a
66
+ * newly purchased capability is presented).
67
+ */
68
+ export var InterstitialScreen = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
69
+ var _media$breakpoints, _media$breakpoints2;
70
+ var children = _ref.children,
71
+ className = _ref.className,
72
+ _ref$closeIconDescrip = _ref.closeIconDescription,
73
+ closeIconDescription = _ref$closeIconDescrip === void 0 ? defaults.closeIconDescription : _ref$closeIconDescrip,
74
+ _ref$domainName = _ref.domainName,
75
+ domainName = _ref$domainName === void 0 ? defaults.domainName : _ref$domainName,
76
+ _ref$hideProgressIndi = _ref.hideProgressIndicator,
77
+ hideProgressIndicator = _ref$hideProgressIndi === void 0 ? defaults.hideProgressIndicator : _ref$hideProgressIndi,
78
+ _ref$interstitialAria = _ref.interstitialAriaLabel,
79
+ interstitialAriaLabel = _ref$interstitialAria === void 0 ? defaults.interstitialAriaLabel : _ref$interstitialAria,
80
+ _ref$isFullScreen = _ref.isFullScreen,
81
+ isFullScreen = _ref$isFullScreen === void 0 ? defaults.isFullScreen : _ref$isFullScreen,
82
+ _ref$isOpen = _ref.isOpen,
83
+ isOpen = _ref$isOpen === void 0 ? defaults.isOpen : _ref$isOpen,
84
+ media = _ref.media,
85
+ _ref$nextButtonLabel = _ref.nextButtonLabel,
86
+ nextButtonLabel = _ref$nextButtonLabel === void 0 ? defaults.nextButtonLabel : _ref$nextButtonLabel,
87
+ _ref$onClose = _ref.onClose,
88
+ onClose = _ref$onClose === void 0 ? defaults.onClose : _ref$onClose,
89
+ _ref$previousButtonLa = _ref.previousButtonLabel,
90
+ previousButtonLabel = _ref$previousButtonLa === void 0 ? defaults.previousButtonLabel : _ref$previousButtonLa,
91
+ _ref$productName = _ref.productName,
92
+ productName = _ref$productName === void 0 ? defaults.productName : _ref$productName,
93
+ headerClassName = _ref.headerClassName,
94
+ headerTitle = _ref.headerTitle,
95
+ _ref$startButtonLabel = _ref.startButtonLabel,
96
+ startButtonLabel = _ref$startButtonLabel === void 0 ? defaults.startButtonLabel : _ref$startButtonLabel,
97
+ _ref$skipButtonLabel = _ref.skipButtonLabel,
98
+ skipButtonLabel = _ref$skipButtonLabel === void 0 ? defaults.skipButtonLabel : _ref$skipButtonLabel,
99
+ rest = _objectWithoutProperties(_ref, _excluded);
100
+ var backupRef = useRef();
101
+ var _forwardedRef = ref || backupRef;
102
+ var scrollRef = useRef();
103
+ var startButtonRef = useRef();
104
+ var nextButtonRef = useRef();
105
+ var _useState = useState(null),
106
+ _useState2 = _slicedToArray(_useState, 2),
107
+ isVisibleClass = _useState2[0],
108
+ setIsVisibleClass = _useState2[1];
109
+ var _useState3 = useState(0),
110
+ _useState4 = _slicedToArray(_useState3, 2),
111
+ progStep = _useState4[0],
112
+ setProgStep = _useState4[1];
113
+ var childArray = Children.toArray(children);
114
+ var isMultiStep = childArray.length > 1;
115
+ var mediaIsDefined = (media === null || media === void 0 ? void 0 : media.render) || (media === null || media === void 0 ? void 0 : media.filePaths);
116
+ var bodyScrollRef = useRef();
117
+ var mediaBreakpoints = {
118
+ xlg: (media === null || media === void 0 || (_media$breakpoints = media.breakpoints) === null || _media$breakpoints === void 0 ? void 0 : _media$breakpoints.xlg) || 0,
119
+ lg: (media === null || media === void 0 || (_media$breakpoints2 = media.breakpoints) === null || _media$breakpoints2 === void 0 ? void 0 : _media$breakpoints2.lg) || 0,
120
+ md: 0,
121
+ sm: 0
122
+ };
123
+ var contentBreakpoints = {
124
+ xlg: 16 - mediaBreakpoints.xlg,
125
+ lg: 16 - mediaBreakpoints.lg,
126
+ md: 8,
127
+ sm: 4
128
+ };
129
+ var variantClass = isFullScreen ? "".concat(blockClass, "--full-screen") : "".concat(blockClass, "--modal");
130
+ var progStepFloor = 0;
131
+ var progStepCeil = childArray.length - 1;
132
+ var handleClose = useCallback(function () {
133
+ setProgStep(0);
134
+ onClose();
135
+ }, [onClose]);
136
+ var scrollBodyToTop = function scrollBodyToTop() {
137
+ bodyScrollRef.current.scroll({
138
+ top: 0,
139
+ behavior: 'smooth'
140
+ });
141
+ };
142
+ var handleClickPrev = function handleClickPrev() {
143
+ var targetStep = clamp(progStep - 1, progStepFloor, progStepCeil);
144
+ scrollRef.current.scrollPrev();
145
+ scrollBodyToTop();
146
+ setProgStep(targetStep);
147
+ };
148
+ var handleClickNext = function handleClickNext() {
149
+ var targetStep = clamp(progStep + 1, progStepFloor, progStepCeil);
150
+ scrollRef.current.scrollNext();
151
+ scrollBodyToTop();
152
+ setProgStep(targetStep);
153
+ };
154
+ useEffect(function () {
155
+ var _startButtonRef$curre;
156
+ if (!isOpen) {
157
+ setProgStep(0);
158
+ }
159
+ (_startButtonRef$curre = startButtonRef.current) === null || _startButtonRef$curre === void 0 || _startButtonRef$curre.focus();
160
+ }, [isOpen, progStep, onClose]);
161
+ useEffect(function () {
162
+ var _nextButtonRef$curren;
163
+ // for modal only, "is-visible" triggers animation
164
+ setIsVisibleClass(!isFullScreen && isOpen ? 'is-visible' : null);
165
+ nextButtonRef === null || nextButtonRef === void 0 || (_nextButtonRef$curren = nextButtonRef.current) === null || _nextButtonRef$curren === void 0 || _nextButtonRef$curren.focus();
166
+ }, [isFullScreen, isOpen]);
167
+
168
+ // hitting escape key also closes this component
169
+ useEffect(function () {
170
+ var close = function close(e) {
171
+ var key = e.key;
172
+ if (key === 'Escape') {
173
+ handleClose();
174
+ }
175
+ };
176
+ window.addEventListener('keydown', close);
177
+ return function () {
178
+ return window.removeEventListener('keydown', close);
179
+ };
180
+ }, [handleClose]);
181
+ if (!isOpen) {
182
+ return null;
183
+ }
184
+ var domainProductDelimiter = domainName !== '' && productName !== '' ? ' | ' : '';
185
+ var renderModal = function renderModal(childElements) {
186
+ return /*#__PURE__*/React.createElement(ComposedModal, _extends({}, rest, {
187
+ preventCloseOnClickOutside: true,
188
+ className: cx(blockClass,
189
+ // Apply the block class to the main HTML element
190
+ className // Apply any supplied class names to the main HTML element.
191
+ ),
192
+
193
+ size: "lg",
194
+ onClose: onClose,
195
+ open: isOpen,
196
+ ref: _forwardedRef,
197
+ "aria-label": interstitialAriaLabel
198
+ }, getDevtoolsProps(componentName)), /*#__PURE__*/React.createElement(ModalHeader, {
199
+ className: cx(headerBlockClass, headerTitle && "".concat(headerBlockClass, "--has-title"), headerClassName),
200
+ iconDescription: closeIconDescription,
201
+ buttonOnClick: handleClose
202
+ }, headerTitle && /*#__PURE__*/React.createElement("h2", null, headerTitle), !hideProgressIndicator && /*#__PURE__*/React.createElement("div", {
203
+ className: "".concat(blockClass, "--progress")
204
+ }, /*#__PURE__*/React.createElement(ProgressIndicator, {
205
+ vertical: false,
206
+ currentIndex: progStep
207
+ }, childArray.map(function (child, idx) {
208
+ return /*#__PURE__*/React.createElement(ProgressStep, {
209
+ key: idx,
210
+ label: child.props.stepTitle
211
+ });
212
+ })))), /*#__PURE__*/React.createElement(ModalBody, {
213
+ className: bodyBlockClass
214
+ }, childElements), /*#__PURE__*/React.createElement(ModalFooter, null, renderFooter()));
215
+ };
216
+ var renderFullScreen = function renderFullScreen(childElements) {
217
+ return /*#__PURE__*/React.createElement("div", _extends({}, rest, {
218
+ className: cx(blockClass,
219
+ // Apply the block class to the main HTML element
220
+ className,
221
+ // Apply any supplied class names to the main HTML element.
222
+ variantClass, isVisibleClass),
223
+ "aria-label": interstitialAriaLabel,
224
+ ref: ref
225
+ }, getDevtoolsProps(componentName)), /*#__PURE__*/React.createElement("div", {
226
+ className: cx([_defineProperty({}, "".concat(blockClass, "--container"), isFullScreen)])
227
+ }, /*#__PURE__*/React.createElement("div", {
228
+ className: "".concat(blockClass, "--header")
229
+ }, domainName, domainProductDelimiter, /*#__PURE__*/React.createElement("strong", null, productName)), /*#__PURE__*/React.createElement("header", {
230
+ className: cx(headerBlockClass, headerTitle && "".concat(headerBlockClass, "--has-title"), headerClassName)
231
+ }, headerTitle && /*#__PURE__*/React.createElement("h2", null, headerTitle), !hideProgressIndicator && /*#__PURE__*/React.createElement("div", {
232
+ className: "".concat(blockClass, "--progress")
233
+ }, /*#__PURE__*/React.createElement(ProgressIndicator, {
234
+ vertical: false,
235
+ currentIndex: progStep
236
+ }, childArray.map(function (child, idx) {
237
+ return /*#__PURE__*/React.createElement(ProgressStep, {
238
+ key: idx,
239
+ label: child.props.stepTitle
240
+ });
241
+ })))), childElements, renderFooter()));
242
+ };
243
+ var renderBody = function renderBody() {
244
+ return /*#__PURE__*/React.createElement("div", {
245
+ className: cx("".concat(blockClass, "--body")),
246
+ ref: bodyScrollRef
247
+ }, mediaIsDefined ? /*#__PURE__*/React.createElement(FlexGrid, {
248
+ fullWidth: true,
249
+ className: cx("".concat(blockClass, "--body-grid"))
250
+ }, /*#__PURE__*/React.createElement(Row, {
251
+ className: cx("".concat(blockClass, "--body-row"))
252
+ }, /*#__PURE__*/React.createElement(Column, {
253
+ xlg: contentBreakpoints.xlg,
254
+ lg: contentBreakpoints.lg,
255
+ md: contentBreakpoints.md,
256
+ sm: contentBreakpoints.sm
257
+ }, /*#__PURE__*/React.createElement("div", {
258
+ className: cx("".concat(blockClass, "--content"))
259
+ }, isMultiStep ? /*#__PURE__*/React.createElement("div", {
260
+ className: "".concat(blockClass, "__carousel")
261
+ }, /*#__PURE__*/React.createElement(Carousel, {
262
+ disableArrowScroll: true,
263
+ ref: scrollRef
264
+ }, children)) : childArray[0])), mediaIsDefined && /*#__PURE__*/React.createElement(Column, {
265
+ xlg: mediaBreakpoints.xlg,
266
+ lg: mediaBreakpoints.lg,
267
+ md: mediaBreakpoints.md,
268
+ sm: mediaBreakpoints.sm,
269
+ className: cx("".concat(blockClass, "--media-container"))
270
+ }, /*#__PURE__*/React.createElement("div", {
271
+ className: "".concat(blockClass, "--media")
272
+ }, media.render ? media.render() : /*#__PURE__*/React.createElement(SteppedAnimatedMedia, {
273
+ className: "".concat(blockClass, "--stepped-animated-media"),
274
+ filePaths: media.filePaths,
275
+ playStep: progStep
276
+ }))))) : /*#__PURE__*/React.createElement("div", {
277
+ className: cx("".concat(blockClass, "--content"))
278
+ }, isMultiStep ? /*#__PURE__*/React.createElement("div", {
279
+ className: "".concat(blockClass, "__carousel")
280
+ }, /*#__PURE__*/React.createElement(Carousel, {
281
+ disableArrowScroll: true,
282
+ ref: scrollRef
283
+ }, children)) : /*#__PURE__*/React.createElement("div", null, childArray[0])));
284
+ };
285
+ var renderFooter = function renderFooter() {
286
+ return /*#__PURE__*/React.createElement("div", {
287
+ className: "".concat(blockClass, "--footer")
288
+ }, isMultiStep && skipButtonLabel !== '' && /*#__PURE__*/React.createElement(Button, {
289
+ className: "".concat(blockClass, "--skip-btn"),
290
+ kind: "ghost",
291
+ size: "lg",
292
+ title: skipButtonLabel,
293
+ onClick: handleClose
294
+ }, skipButtonLabel), /*#__PURE__*/React.createElement("div", {
295
+ className: "".concat(blockClass, "--footer-controls")
296
+ }, isMultiStep && progStep > 0 && /*#__PURE__*/React.createElement(Button, {
297
+ className: "".concat(blockClass, "--prev-btn"),
298
+ kind: "secondary",
299
+ size: "lg",
300
+ title: previousButtonLabel,
301
+ onClick: handleClickPrev
302
+ }, previousButtonLabel), isMultiStep && progStep < progStepCeil && /*#__PURE__*/React.createElement(Button, {
303
+ className: "".concat(blockClass, "--next-btn"),
304
+ renderIcon: ArrowRight,
305
+ ref: nextButtonRef,
306
+ size: "lg",
307
+ title: nextButtonLabel,
308
+ onClick: handleClickNext
309
+ }, nextButtonLabel), isMultiStep && progStep === progStepCeil && /*#__PURE__*/React.createElement(Button, {
310
+ className: "".concat(blockClass, "--start-btn"),
311
+ ref: startButtonRef,
312
+ renderIcon: ArrowRight,
313
+ size: "lg",
314
+ title: startButtonLabel,
315
+ onClick: handleClose
316
+ }, startButtonLabel), !isMultiStep && /*#__PURE__*/React.createElement(Button, {
317
+ className: "".concat(blockClass, "--start-btn"),
318
+ ref: startButtonRef,
319
+ size: "lg",
320
+ title: startButtonLabel,
321
+ onClick: handleClose
322
+ }, startButtonLabel)));
323
+ };
324
+ return isFullScreen ? renderFullScreen(renderBody()) : renderModal(renderBody());
325
+ });
326
+
327
+ // Return a placeholder if not released and not enabled by feature flag
328
+ InterstitialScreen = pkg.checkComponentEnabled(InterstitialScreen, componentName);
329
+
330
+ // The display name of the component, used by React. Note that displayName
331
+ // is used in preference to relying on function.name.
332
+ InterstitialScreen.displayName = componentName;
333
+
334
+ // The types and DocGen commentary for the component props,
335
+ // in alphabetical order (for consistency).
336
+ // See https://www.npmjs.com/package/prop-types#usage.
337
+ InterstitialScreen.propTypes = {
338
+ /**
339
+ * Provide the contents of the InterstitialScreen.
340
+ */
341
+ children: PropTypes.node.isRequired,
342
+ /**
343
+ * Provide an optional class to be applied to the containing node.
344
+ */
345
+ className: PropTypes.string,
346
+ /**
347
+ * Tooltip text and aria label for the Close button icon.
348
+ */
349
+ closeIconDescription: PropTypes.string,
350
+ /**
351
+ * The domain this app belongs to, e.g. "IBM Cloud Pak".
352
+ */
353
+ domainName: PropTypes.string,
354
+ /**
355
+ * Provide an optional class to be applied to the <header> element >.
356
+ */
357
+ headerClassName: PropTypes.string,
358
+ /**
359
+ * Provide an optional class to be applied to the <header> element >.
360
+ */
361
+ headerTitle: PropTypes.string,
362
+ /**
363
+ * Optional parameter to hide the progress indicator when multiple steps are used.
364
+ */
365
+ hideProgressIndicator: PropTypes.bool,
366
+ /**
367
+ * The aria label applied to the Interstitial Screen component
368
+ */
369
+ interstitialAriaLabel: PropTypes.string,
370
+ /**
371
+ * Specifies whether the component is shown as a full-screen
372
+ * experience, else it is shown as a modal by default.
373
+ */
374
+ isFullScreen: PropTypes.bool,
375
+ /**
376
+ * Specifies whether the component is currently open.
377
+ */
378
+ isOpen: PropTypes.bool,
379
+ /**
380
+ * The object describing an image in one of two shapes.
381
+ *
382
+ * If a single media element is required, use `{render}`.
383
+ *
384
+ * If a stepped animation is required, use `{filePaths}`.
385
+ *
386
+ * Breakpoints are used to set the media content column size as well as the remainder for the main content areas column size.
387
+ * Medium and small breakpoints will be set to 0 internally to focus on the main content area.
388
+ * @see {@link MEDIA_PROP_TYPE}.
389
+ */
390
+ media: PropTypes.oneOfType([PropTypes.shape({
391
+ render: PropTypes.func,
392
+ breakpoints: PropTypes.shape({
393
+ xlg: PropTypes.number,
394
+ lg: PropTypes.number
395
+ })
396
+ }), PropTypes.shape({
397
+ filePaths: PropTypes.arrayOf(PropTypes.string),
398
+ breakpoints: PropTypes.shape({
399
+ xlg: PropTypes.number,
400
+ lg: PropTypes.number
401
+ })
402
+ })]),
403
+ /**
404
+ * The label for the Next button.
405
+ */
406
+ nextButtonLabel: PropTypes.string,
407
+ /**
408
+ * Function to call when the close button is clicked.
409
+ */
410
+ onClose: PropTypes.func,
411
+ /**
412
+ * The label for the Previous button.
413
+ */
414
+ previousButtonLabel: PropTypes.string,
415
+ /**
416
+ * The name of this app, e.g. "QRadar".
417
+ */
418
+ productName: PropTypes.string,
419
+ /**
420
+ * The label for the skip button.
421
+ */
422
+ skipButtonLabel: PropTypes.string,
423
+ /**
424
+ * The label for the start button.
425
+ */
426
+ startButtonLabel: PropTypes.string
427
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Copyright IBM Corp. 2024, 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
+ export { InterstitialScreen } from './InterstitialScreen';
@@ -0,0 +1,75 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
+ var _excluded = ["children", "className", "stepTitle"];
4
+ /**
5
+ * Copyright IBM Corp. 2023, 2023
6
+ *
7
+ * This source code is licensed under the Apache-2.0 license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */
10
+
11
+ // Import portions of React that are needed.
12
+ import React from 'react';
13
+
14
+ // Other standard imports.
15
+ import PropTypes from 'prop-types';
16
+ import cx from 'classnames';
17
+ import { getDevtoolsProps } from '../../global/js/utils/devtools';
18
+ import { pkg /*, carbon */ } from '../../settings';
19
+
20
+ // Carbon and package components we use.
21
+ /* TODO: @import(s) of carbon components and other package components. */
22
+
23
+ // The block part of our conventional BEM class names (blockClass__E--M).
24
+ var blockClass = "".concat(pkg.prefix, "--interstitial-screen-view");
25
+ var componentName = 'InterstitialScreenView';
26
+
27
+ /**
28
+ * A Novice to Pro component intended to be used as the child elements of the InterstitialScreen component.
29
+ */
30
+ export var InterstitialScreenView = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
31
+ var children = _ref.children,
32
+ className = _ref.className,
33
+ stepTitle = _ref.stepTitle,
34
+ rest = _objectWithoutProperties(_ref, _excluded);
35
+ return /*#__PURE__*/React.createElement("div", _extends({
36
+ role: "complementary",
37
+ "aria-label": stepTitle
38
+ }, rest, {
39
+ className: cx(blockClass,
40
+ // Apply the block class to the main HTML element
41
+ className,
42
+ // Apply any supplied class names to the main HTML element.
43
+ // example: `${blockClass}__template-string-class-${kind}-n-${size}`,
44
+ {
45
+ // switched classes dependant on props or state
46
+ // example: [`${blockClass}__here-if-small`]: size === 'sm',
47
+ }),
48
+ ref: ref
49
+ }, getDevtoolsProps(componentName)), children);
50
+ });
51
+
52
+ // Return a placeholder if not released and not enabled by feature flag
53
+ InterstitialScreenView = pkg.checkComponentEnabled(InterstitialScreenView, componentName);
54
+
55
+ // The display name of the component, used by React. Note that displayName
56
+ // is used in preference to relying on function.name.
57
+ InterstitialScreenView.displayName = componentName;
58
+
59
+ // The types and DocGen commentary for the component props,
60
+ // in alphabetical order (for consistency).
61
+ // See https://www.npmjs.com/package/prop-types#usage.
62
+ InterstitialScreenView.propTypes = {
63
+ /**
64
+ * Provide the contents of the InterstitialScreenView.
65
+ */
66
+ children: PropTypes.node,
67
+ /**
68
+ * Optional class name for this component.
69
+ */
70
+ className: PropTypes.string,
71
+ /**
72
+ * The label to pass to the ProgressStep component.
73
+ */
74
+ stepTitle: PropTypes.string.isRequired
75
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Copyright IBM Corp. 2024, 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
+ export { InterstitialScreenView } from './InterstitialScreenView';