@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
@@ -0,0 +1,434 @@
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.InterstitialScreen = void 0;
9
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
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 _lodash = require("lodash");
19
+ var _iconsReact = require("@carbon/icons-react");
20
+ var _react2 = require("@carbon/react");
21
+ var _Carousel = require("../Carousel");
22
+ var _SteppedAnimatedMedia = require("../SteppedAnimatedMedia");
23
+ var _excluded = ["children", "className", "closeIconDescription", "domainName", "hideProgressIndicator", "interstitialAriaLabel", "isFullScreen", "isOpen", "media", "nextButtonLabel", "onClose", "previousButtonLabel", "productName", "headerClassName", "headerTitle", "startButtonLabel", "skipButtonLabel"];
24
+ /**
25
+ * Copyright IBM Corp. 2024, 2024
26
+ *
27
+ * This source code is licensed under the Apache-2.0 license found in the
28
+ * LICENSE file in the root directory of this source tree.
29
+ */
30
+ // Import portions of React that are needed.
31
+ // Other standard imports.
32
+ // Other standard imports.
33
+ //Close16
34
+ 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); }
35
+ 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; }
36
+ // The block part of our conventional BEM class names (blockClass__E--M).
37
+ var blockClass = "".concat(_settings.pkg.prefix, "--interstitial-screen");
38
+ var headerBlockClass = "".concat(blockClass, "--internal-header");
39
+ var bodyBlockClass = "".concat(blockClass, "--internal-body");
40
+ var componentName = 'InterstitialScreen';
41
+
42
+ // NOTE: the component SCSS is not imported here: it is rolled up separately.
43
+
44
+ // Default values can be included here and then assigned to the prop params,
45
+ // e.g. prop = defaults.prop,
46
+ // This gathers default values together neatly and ensures non-primitive
47
+ // values are initialized early to avoid react making unnecessary re-renders.
48
+ // Note that default values are not required for props that are 'required',
49
+ // nor for props where the component can apply undefined values reasonably.
50
+ // Default values should be provided when the component needs to make a choice
51
+ // or assumption when a prop is not supplied.
52
+
53
+ // Default values for props
54
+ var defaults = {
55
+ closeIconDescription: 'Close',
56
+ domainName: '',
57
+ hideProgressIndicator: false,
58
+ interstitialAriaLabel: 'Interstitial screen',
59
+ isFullScreen: false,
60
+ isOpen: false,
61
+ nextButtonLabel: 'Next',
62
+ onClose: function onClose() {},
63
+ previousButtonLabel: 'Back',
64
+ productName: '',
65
+ skipButtonLabel: '',
66
+ startButtonLabel: 'Get started'
67
+ };
68
+
69
+ /**
70
+ * InterstitialScreen can be a full page or an overlay, and are
71
+ * shown on the first time a user accesses a new experience
72
+ * (e.g. upon first login or first time opening a page where a
73
+ * newly purchased capability is presented).
74
+ */
75
+ var InterstitialScreen = exports.InterstitialScreen = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
76
+ var _media$breakpoints, _media$breakpoints2;
77
+ var children = _ref.children,
78
+ className = _ref.className,
79
+ _ref$closeIconDescrip = _ref.closeIconDescription,
80
+ closeIconDescription = _ref$closeIconDescrip === void 0 ? defaults.closeIconDescription : _ref$closeIconDescrip,
81
+ _ref$domainName = _ref.domainName,
82
+ domainName = _ref$domainName === void 0 ? defaults.domainName : _ref$domainName,
83
+ _ref$hideProgressIndi = _ref.hideProgressIndicator,
84
+ hideProgressIndicator = _ref$hideProgressIndi === void 0 ? defaults.hideProgressIndicator : _ref$hideProgressIndi,
85
+ _ref$interstitialAria = _ref.interstitialAriaLabel,
86
+ interstitialAriaLabel = _ref$interstitialAria === void 0 ? defaults.interstitialAriaLabel : _ref$interstitialAria,
87
+ _ref$isFullScreen = _ref.isFullScreen,
88
+ isFullScreen = _ref$isFullScreen === void 0 ? defaults.isFullScreen : _ref$isFullScreen,
89
+ _ref$isOpen = _ref.isOpen,
90
+ isOpen = _ref$isOpen === void 0 ? defaults.isOpen : _ref$isOpen,
91
+ media = _ref.media,
92
+ _ref$nextButtonLabel = _ref.nextButtonLabel,
93
+ nextButtonLabel = _ref$nextButtonLabel === void 0 ? defaults.nextButtonLabel : _ref$nextButtonLabel,
94
+ _ref$onClose = _ref.onClose,
95
+ onClose = _ref$onClose === void 0 ? defaults.onClose : _ref$onClose,
96
+ _ref$previousButtonLa = _ref.previousButtonLabel,
97
+ previousButtonLabel = _ref$previousButtonLa === void 0 ? defaults.previousButtonLabel : _ref$previousButtonLa,
98
+ _ref$productName = _ref.productName,
99
+ productName = _ref$productName === void 0 ? defaults.productName : _ref$productName,
100
+ headerClassName = _ref.headerClassName,
101
+ headerTitle = _ref.headerTitle,
102
+ _ref$startButtonLabel = _ref.startButtonLabel,
103
+ startButtonLabel = _ref$startButtonLabel === void 0 ? defaults.startButtonLabel : _ref$startButtonLabel,
104
+ _ref$skipButtonLabel = _ref.skipButtonLabel,
105
+ skipButtonLabel = _ref$skipButtonLabel === void 0 ? defaults.skipButtonLabel : _ref$skipButtonLabel,
106
+ rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
107
+ var backupRef = (0, _react.useRef)();
108
+ var _forwardedRef = ref || backupRef;
109
+ var scrollRef = (0, _react.useRef)();
110
+ var startButtonRef = (0, _react.useRef)();
111
+ var nextButtonRef = (0, _react.useRef)();
112
+ var _useState = (0, _react.useState)(null),
113
+ _useState2 = (0, _slicedToArray2.default)(_useState, 2),
114
+ isVisibleClass = _useState2[0],
115
+ setIsVisibleClass = _useState2[1];
116
+ var _useState3 = (0, _react.useState)(0),
117
+ _useState4 = (0, _slicedToArray2.default)(_useState3, 2),
118
+ progStep = _useState4[0],
119
+ setProgStep = _useState4[1];
120
+ var childArray = _react.Children.toArray(children);
121
+ var isMultiStep = childArray.length > 1;
122
+ var mediaIsDefined = (media === null || media === void 0 ? void 0 : media.render) || (media === null || media === void 0 ? void 0 : media.filePaths);
123
+ var bodyScrollRef = (0, _react.useRef)();
124
+ var mediaBreakpoints = {
125
+ xlg: (media === null || media === void 0 || (_media$breakpoints = media.breakpoints) === null || _media$breakpoints === void 0 ? void 0 : _media$breakpoints.xlg) || 0,
126
+ lg: (media === null || media === void 0 || (_media$breakpoints2 = media.breakpoints) === null || _media$breakpoints2 === void 0 ? void 0 : _media$breakpoints2.lg) || 0,
127
+ md: 0,
128
+ sm: 0
129
+ };
130
+ var contentBreakpoints = {
131
+ xlg: 16 - mediaBreakpoints.xlg,
132
+ lg: 16 - mediaBreakpoints.lg,
133
+ md: 8,
134
+ sm: 4
135
+ };
136
+ var variantClass = isFullScreen ? "".concat(blockClass, "--full-screen") : "".concat(blockClass, "--modal");
137
+ var progStepFloor = 0;
138
+ var progStepCeil = childArray.length - 1;
139
+ var handleClose = (0, _react.useCallback)(function () {
140
+ setProgStep(0);
141
+ onClose();
142
+ }, [onClose]);
143
+ var scrollBodyToTop = function scrollBodyToTop() {
144
+ bodyScrollRef.current.scroll({
145
+ top: 0,
146
+ behavior: 'smooth'
147
+ });
148
+ };
149
+ var handleClickPrev = function handleClickPrev() {
150
+ var targetStep = (0, _lodash.clamp)(progStep - 1, progStepFloor, progStepCeil);
151
+ scrollRef.current.scrollPrev();
152
+ scrollBodyToTop();
153
+ setProgStep(targetStep);
154
+ };
155
+ var handleClickNext = function handleClickNext() {
156
+ var targetStep = (0, _lodash.clamp)(progStep + 1, progStepFloor, progStepCeil);
157
+ scrollRef.current.scrollNext();
158
+ scrollBodyToTop();
159
+ setProgStep(targetStep);
160
+ };
161
+ (0, _react.useEffect)(function () {
162
+ var _startButtonRef$curre;
163
+ if (!isOpen) {
164
+ setProgStep(0);
165
+ }
166
+ (_startButtonRef$curre = startButtonRef.current) === null || _startButtonRef$curre === void 0 || _startButtonRef$curre.focus();
167
+ }, [isOpen, progStep, onClose]);
168
+ (0, _react.useEffect)(function () {
169
+ var _nextButtonRef$curren;
170
+ // for modal only, "is-visible" triggers animation
171
+ setIsVisibleClass(!isFullScreen && isOpen ? 'is-visible' : null);
172
+ nextButtonRef === null || nextButtonRef === void 0 || (_nextButtonRef$curren = nextButtonRef.current) === null || _nextButtonRef$curren === void 0 || _nextButtonRef$curren.focus();
173
+ }, [isFullScreen, isOpen]);
174
+
175
+ // hitting escape key also closes this component
176
+ (0, _react.useEffect)(function () {
177
+ var close = function close(e) {
178
+ var key = e.key;
179
+ if (key === 'Escape') {
180
+ handleClose();
181
+ }
182
+ };
183
+ window.addEventListener('keydown', close);
184
+ return function () {
185
+ return window.removeEventListener('keydown', close);
186
+ };
187
+ }, [handleClose]);
188
+ if (!isOpen) {
189
+ return null;
190
+ }
191
+ var domainProductDelimiter = domainName !== '' && productName !== '' ? ' | ' : '';
192
+ var renderModal = function renderModal(childElements) {
193
+ return /*#__PURE__*/_react.default.createElement(_react2.ComposedModal, (0, _extends2.default)({}, rest, {
194
+ preventCloseOnClickOutside: true,
195
+ className: (0, _classnames.default)(blockClass,
196
+ // Apply the block class to the main HTML element
197
+ className // Apply any supplied class names to the main HTML element.
198
+ ),
199
+
200
+ size: "lg",
201
+ onClose: onClose,
202
+ open: isOpen,
203
+ ref: _forwardedRef,
204
+ "aria-label": interstitialAriaLabel
205
+ }, (0, _devtools.getDevtoolsProps)(componentName)), /*#__PURE__*/_react.default.createElement(_react2.ModalHeader, {
206
+ className: (0, _classnames.default)(headerBlockClass, headerTitle && "".concat(headerBlockClass, "--has-title"), headerClassName),
207
+ iconDescription: closeIconDescription,
208
+ buttonOnClick: handleClose
209
+ }, headerTitle && /*#__PURE__*/_react.default.createElement("h2", null, headerTitle), !hideProgressIndicator && /*#__PURE__*/_react.default.createElement("div", {
210
+ className: "".concat(blockClass, "--progress")
211
+ }, /*#__PURE__*/_react.default.createElement(_react2.ProgressIndicator, {
212
+ vertical: false,
213
+ currentIndex: progStep
214
+ }, childArray.map(function (child, idx) {
215
+ return /*#__PURE__*/_react.default.createElement(_react2.ProgressStep, {
216
+ key: idx,
217
+ label: child.props.stepTitle
218
+ });
219
+ })))), /*#__PURE__*/_react.default.createElement(_react2.ModalBody, {
220
+ className: bodyBlockClass
221
+ }, childElements), /*#__PURE__*/_react.default.createElement(_react2.ModalFooter, null, renderFooter()));
222
+ };
223
+ var renderFullScreen = function renderFullScreen(childElements) {
224
+ return /*#__PURE__*/_react.default.createElement("div", (0, _extends2.default)({}, rest, {
225
+ className: (0, _classnames.default)(blockClass,
226
+ // Apply the block class to the main HTML element
227
+ className,
228
+ // Apply any supplied class names to the main HTML element.
229
+ variantClass, isVisibleClass),
230
+ "aria-label": interstitialAriaLabel,
231
+ ref: ref
232
+ }, (0, _devtools.getDevtoolsProps)(componentName)), /*#__PURE__*/_react.default.createElement("div", {
233
+ className: (0, _classnames.default)([(0, _defineProperty2.default)({}, "".concat(blockClass, "--container"), isFullScreen)])
234
+ }, /*#__PURE__*/_react.default.createElement("div", {
235
+ className: "".concat(blockClass, "--header")
236
+ }, domainName, domainProductDelimiter, /*#__PURE__*/_react.default.createElement("strong", null, productName)), /*#__PURE__*/_react.default.createElement("header", {
237
+ className: (0, _classnames.default)(headerBlockClass, headerTitle && "".concat(headerBlockClass, "--has-title"), headerClassName)
238
+ }, headerTitle && /*#__PURE__*/_react.default.createElement("h2", null, headerTitle), !hideProgressIndicator && /*#__PURE__*/_react.default.createElement("div", {
239
+ className: "".concat(blockClass, "--progress")
240
+ }, /*#__PURE__*/_react.default.createElement(_react2.ProgressIndicator, {
241
+ vertical: false,
242
+ currentIndex: progStep
243
+ }, childArray.map(function (child, idx) {
244
+ return /*#__PURE__*/_react.default.createElement(_react2.ProgressStep, {
245
+ key: idx,
246
+ label: child.props.stepTitle
247
+ });
248
+ })))), childElements, renderFooter()));
249
+ };
250
+ var renderBody = function renderBody() {
251
+ return /*#__PURE__*/_react.default.createElement("div", {
252
+ className: (0, _classnames.default)("".concat(blockClass, "--body")),
253
+ ref: bodyScrollRef
254
+ }, mediaIsDefined ? /*#__PURE__*/_react.default.createElement(_react2.FlexGrid, {
255
+ fullWidth: true,
256
+ className: (0, _classnames.default)("".concat(blockClass, "--body-grid"))
257
+ }, /*#__PURE__*/_react.default.createElement(_react2.Row, {
258
+ className: (0, _classnames.default)("".concat(blockClass, "--body-row"))
259
+ }, /*#__PURE__*/_react.default.createElement(_react2.Column, {
260
+ xlg: contentBreakpoints.xlg,
261
+ lg: contentBreakpoints.lg,
262
+ md: contentBreakpoints.md,
263
+ sm: contentBreakpoints.sm
264
+ }, /*#__PURE__*/_react.default.createElement("div", {
265
+ className: (0, _classnames.default)("".concat(blockClass, "--content"))
266
+ }, isMultiStep ? /*#__PURE__*/_react.default.createElement("div", {
267
+ className: "".concat(blockClass, "__carousel")
268
+ }, /*#__PURE__*/_react.default.createElement(_Carousel.Carousel, {
269
+ disableArrowScroll: true,
270
+ ref: scrollRef
271
+ }, children)) : childArray[0])), mediaIsDefined && /*#__PURE__*/_react.default.createElement(_react2.Column, {
272
+ xlg: mediaBreakpoints.xlg,
273
+ lg: mediaBreakpoints.lg,
274
+ md: mediaBreakpoints.md,
275
+ sm: mediaBreakpoints.sm,
276
+ className: (0, _classnames.default)("".concat(blockClass, "--media-container"))
277
+ }, /*#__PURE__*/_react.default.createElement("div", {
278
+ className: "".concat(blockClass, "--media")
279
+ }, media.render ? media.render() : /*#__PURE__*/_react.default.createElement(_SteppedAnimatedMedia.SteppedAnimatedMedia, {
280
+ className: "".concat(blockClass, "--stepped-animated-media"),
281
+ filePaths: media.filePaths,
282
+ playStep: progStep
283
+ }))))) : /*#__PURE__*/_react.default.createElement("div", {
284
+ className: (0, _classnames.default)("".concat(blockClass, "--content"))
285
+ }, isMultiStep ? /*#__PURE__*/_react.default.createElement("div", {
286
+ className: "".concat(blockClass, "__carousel")
287
+ }, /*#__PURE__*/_react.default.createElement(_Carousel.Carousel, {
288
+ disableArrowScroll: true,
289
+ ref: scrollRef
290
+ }, children)) : /*#__PURE__*/_react.default.createElement("div", null, childArray[0])));
291
+ };
292
+ var renderFooter = function renderFooter() {
293
+ return /*#__PURE__*/_react.default.createElement("div", {
294
+ className: "".concat(blockClass, "--footer")
295
+ }, isMultiStep && skipButtonLabel !== '' && /*#__PURE__*/_react.default.createElement(_react2.Button, {
296
+ className: "".concat(blockClass, "--skip-btn"),
297
+ kind: "ghost",
298
+ size: "lg",
299
+ title: skipButtonLabel,
300
+ onClick: handleClose
301
+ }, skipButtonLabel), /*#__PURE__*/_react.default.createElement("div", {
302
+ className: "".concat(blockClass, "--footer-controls")
303
+ }, isMultiStep && progStep > 0 && /*#__PURE__*/_react.default.createElement(_react2.Button, {
304
+ className: "".concat(blockClass, "--prev-btn"),
305
+ kind: "secondary",
306
+ size: "lg",
307
+ title: previousButtonLabel,
308
+ onClick: handleClickPrev
309
+ }, previousButtonLabel), isMultiStep && progStep < progStepCeil && /*#__PURE__*/_react.default.createElement(_react2.Button, {
310
+ className: "".concat(blockClass, "--next-btn"),
311
+ renderIcon: _iconsReact.ArrowRight,
312
+ ref: nextButtonRef,
313
+ size: "lg",
314
+ title: nextButtonLabel,
315
+ onClick: handleClickNext
316
+ }, nextButtonLabel), isMultiStep && progStep === progStepCeil && /*#__PURE__*/_react.default.createElement(_react2.Button, {
317
+ className: "".concat(blockClass, "--start-btn"),
318
+ ref: startButtonRef,
319
+ renderIcon: _iconsReact.ArrowRight,
320
+ size: "lg",
321
+ title: startButtonLabel,
322
+ onClick: handleClose
323
+ }, startButtonLabel), !isMultiStep && /*#__PURE__*/_react.default.createElement(_react2.Button, {
324
+ className: "".concat(blockClass, "--start-btn"),
325
+ ref: startButtonRef,
326
+ size: "lg",
327
+ title: startButtonLabel,
328
+ onClick: handleClose
329
+ }, startButtonLabel)));
330
+ };
331
+ return isFullScreen ? renderFullScreen(renderBody()) : renderModal(renderBody());
332
+ });
333
+
334
+ // Return a placeholder if not released and not enabled by feature flag
335
+ exports.InterstitialScreen = InterstitialScreen = _settings.pkg.checkComponentEnabled(InterstitialScreen, componentName);
336
+
337
+ // The display name of the component, used by React. Note that displayName
338
+ // is used in preference to relying on function.name.
339
+ InterstitialScreen.displayName = componentName;
340
+
341
+ // The types and DocGen commentary for the component props,
342
+ // in alphabetical order (for consistency).
343
+ // See https://www.npmjs.com/package/prop-types#usage.
344
+ InterstitialScreen.propTypes = {
345
+ /**
346
+ * Provide the contents of the InterstitialScreen.
347
+ */
348
+ children: _propTypes.default.node.isRequired,
349
+ /**
350
+ * Provide an optional class to be applied to the containing node.
351
+ */
352
+ className: _propTypes.default.string,
353
+ /**
354
+ * Tooltip text and aria label for the Close button icon.
355
+ */
356
+ closeIconDescription: _propTypes.default.string,
357
+ /**
358
+ * The domain this app belongs to, e.g. "IBM Cloud Pak".
359
+ */
360
+ domainName: _propTypes.default.string,
361
+ /**
362
+ * Provide an optional class to be applied to the <header> element >.
363
+ */
364
+ headerClassName: _propTypes.default.string,
365
+ /**
366
+ * Provide an optional class to be applied to the <header> element >.
367
+ */
368
+ headerTitle: _propTypes.default.string,
369
+ /**
370
+ * Optional parameter to hide the progress indicator when multiple steps are used.
371
+ */
372
+ hideProgressIndicator: _propTypes.default.bool,
373
+ /**
374
+ * The aria label applied to the Interstitial Screen component
375
+ */
376
+ interstitialAriaLabel: _propTypes.default.string,
377
+ /**
378
+ * Specifies whether the component is shown as a full-screen
379
+ * experience, else it is shown as a modal by default.
380
+ */
381
+ isFullScreen: _propTypes.default.bool,
382
+ /**
383
+ * Specifies whether the component is currently open.
384
+ */
385
+ isOpen: _propTypes.default.bool,
386
+ /**
387
+ * The object describing an image in one of two shapes.
388
+ *
389
+ * If a single media element is required, use `{render}`.
390
+ *
391
+ * If a stepped animation is required, use `{filePaths}`.
392
+ *
393
+ * Breakpoints are used to set the media content column size as well as the remainder for the main content areas column size.
394
+ * Medium and small breakpoints will be set to 0 internally to focus on the main content area.
395
+ * @see {@link MEDIA_PROP_TYPE}.
396
+ */
397
+ media: _propTypes.default.oneOfType([_propTypes.default.shape({
398
+ render: _propTypes.default.func,
399
+ breakpoints: _propTypes.default.shape({
400
+ xlg: _propTypes.default.number,
401
+ lg: _propTypes.default.number
402
+ })
403
+ }), _propTypes.default.shape({
404
+ filePaths: _propTypes.default.arrayOf(_propTypes.default.string),
405
+ breakpoints: _propTypes.default.shape({
406
+ xlg: _propTypes.default.number,
407
+ lg: _propTypes.default.number
408
+ })
409
+ })]),
410
+ /**
411
+ * The label for the Next button.
412
+ */
413
+ nextButtonLabel: _propTypes.default.string,
414
+ /**
415
+ * Function to call when the close button is clicked.
416
+ */
417
+ onClose: _propTypes.default.func,
418
+ /**
419
+ * The label for the Previous button.
420
+ */
421
+ previousButtonLabel: _propTypes.default.string,
422
+ /**
423
+ * The name of this app, e.g. "QRadar".
424
+ */
425
+ productName: _propTypes.default.string,
426
+ /**
427
+ * The label for the skip button.
428
+ */
429
+ skipButtonLabel: _propTypes.default.string,
430
+ /**
431
+ * The label for the start button.
432
+ */
433
+ startButtonLabel: _propTypes.default.string
434
+ };
@@ -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;