@carbon/ibm-products 2.64.0 → 2.65.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/css/index-full-carbon.css +59 -143
  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 +8 -0
  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 +59 -143
  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 +59 -143
  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/Checklist/Checklist.js +8 -7
  18. package/es/components/CoachmarkStack/CoachmarkStack.d.ts +5 -0
  19. package/es/components/CoachmarkStack/CoachmarkStack.js +9 -3
  20. package/es/components/CoachmarkStack/CoachmarkStackHome.d.ts +5 -0
  21. package/es/components/CoachmarkStack/CoachmarkStackHome.js +39 -6
  22. package/es/components/CreateFullPage/CreateFullPage.d.ts +1 -1
  23. package/es/components/CreateFullPage/CreateFullPage.js +23 -18
  24. package/es/components/Datagrid/Datagrid/DraggableElement.d.ts +3 -1
  25. package/es/components/Datagrid/Datagrid/DraggableElement.js +3 -1
  26. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/DraggableItemsList.js +3 -0
  27. package/es/components/InlineTip/InlineTip.js +3 -3
  28. package/es/components/InterstitialScreen/InterstitialScreen.d.ts +36 -59
  29. package/es/components/InterstitialScreen/InterstitialScreen.js +75 -271
  30. package/es/components/InterstitialScreen/InterstitialScreenBody.d.ts +27 -0
  31. package/es/components/InterstitialScreen/InterstitialScreenBody.js +110 -0
  32. package/es/components/InterstitialScreen/InterstitialScreenFooter.d.ts +47 -0
  33. package/es/components/InterstitialScreen/InterstitialScreenFooter.js +184 -0
  34. package/es/components/InterstitialScreen/InterstitialScreenHeader.d.ts +35 -0
  35. package/es/components/InterstitialScreen/InterstitialScreenHeader.js +90 -0
  36. package/es/components/{InterstitialScreenView → InterstitialScreen/_story-assets/InterstitialScreenView}/InterstitialScreenView.d.ts +1 -0
  37. package/{lib/components → es/components/InterstitialScreen/_story-assets}/InterstitialScreenViewModule/InterstitialScreenViewModule.d.ts +8 -0
  38. package/es/components/NotificationsPanel/NotificationsPanel.js +15 -10
  39. package/es/components/PageHeader/PageHeader.js +1 -1
  40. package/es/components/SidePanel/SidePanel.js +3 -2
  41. package/es/components/Tearsheet/Tearsheet.js +3 -2
  42. package/es/components/index.d.ts +0 -2
  43. package/es/global/js/hooks/useOverflowItems/useOverflowItems.d.ts +2 -2
  44. package/es/global/js/package-settings.d.ts +0 -2
  45. package/es/global/js/package-settings.js +0 -2
  46. package/es/index.js +0 -2
  47. package/es/settings.d.ts +0 -2
  48. package/lib/components/Checklist/Checklist.js +7 -6
  49. package/lib/components/CoachmarkStack/CoachmarkStack.d.ts +5 -0
  50. package/lib/components/CoachmarkStack/CoachmarkStack.js +9 -3
  51. package/lib/components/CoachmarkStack/CoachmarkStackHome.d.ts +5 -0
  52. package/lib/components/CoachmarkStack/CoachmarkStackHome.js +37 -4
  53. package/lib/components/CreateFullPage/CreateFullPage.d.ts +1 -1
  54. package/lib/components/CreateFullPage/CreateFullPage.js +22 -17
  55. package/lib/components/Datagrid/Datagrid/DraggableElement.d.ts +3 -1
  56. package/lib/components/Datagrid/Datagrid/DraggableElement.js +3 -1
  57. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/DraggableItemsList.js +3 -0
  58. package/lib/components/InlineTip/InlineTip.js +2 -2
  59. package/lib/components/InterstitialScreen/InterstitialScreen.d.ts +36 -59
  60. package/lib/components/InterstitialScreen/InterstitialScreen.js +73 -267
  61. package/lib/components/InterstitialScreen/InterstitialScreenBody.d.ts +27 -0
  62. package/lib/components/InterstitialScreen/InterstitialScreenBody.js +114 -0
  63. package/lib/components/InterstitialScreen/InterstitialScreenFooter.d.ts +47 -0
  64. package/lib/components/InterstitialScreen/InterstitialScreenFooter.js +188 -0
  65. package/lib/components/InterstitialScreen/InterstitialScreenHeader.d.ts +35 -0
  66. package/lib/components/InterstitialScreen/InterstitialScreenHeader.js +94 -0
  67. package/lib/components/{InterstitialScreenView → InterstitialScreen/_story-assets/InterstitialScreenView}/InterstitialScreenView.d.ts +1 -0
  68. package/{es/components → lib/components/InterstitialScreen/_story-assets}/InterstitialScreenViewModule/InterstitialScreenViewModule.d.ts +8 -0
  69. package/lib/components/NotificationsPanel/NotificationsPanel.js +14 -9
  70. package/lib/components/PageHeader/PageHeader.js +1 -1
  71. package/lib/components/SidePanel/SidePanel.js +3 -2
  72. package/lib/components/Tearsheet/Tearsheet.js +3 -2
  73. package/lib/components/index.d.ts +0 -2
  74. package/lib/global/js/hooks/useOverflowItems/useOverflowItems.d.ts +2 -2
  75. package/lib/global/js/package-settings.d.ts +0 -2
  76. package/lib/global/js/package-settings.js +0 -2
  77. package/lib/index.js +0 -10
  78. package/lib/settings.d.ts +0 -2
  79. package/package.json +7 -7
  80. package/scss/components/Coachmark/_coachmark-overlay.scss +2 -0
  81. package/scss/components/CoachmarkOverlayElements/_coachmark-overlay-elements.scss +1 -0
  82. package/scss/components/CoachmarkStack/_coachmark-stack.scss +25 -0
  83. package/scss/components/InterstitialScreen/_interstitial-screen.scss +29 -137
  84. package/scss/components/NotificationsPanel/_notifications-panel.scss +2 -0
  85. package/scss/components/PageHeader/_page-header.scss +5 -0
  86. package/scss/components/_index-with-carbon.scss +0 -2
  87. package/scss/components/_index.scss +0 -2
  88. package/telemetry.yml +17 -8
  89. package/es/components/InterstitialScreenView/InterstitialScreenView.js +0 -78
  90. package/es/components/InterstitialScreenView/index.d.ts +0 -8
  91. package/es/components/InterstitialScreenViewModule/InterstitialScreenViewModule.js +0 -81
  92. package/es/components/InterstitialScreenViewModule/index.d.ts +0 -8
  93. package/lib/components/InterstitialScreenView/InterstitialScreenView.js +0 -78
  94. package/lib/components/InterstitialScreenView/index.d.ts +0 -8
  95. package/lib/components/InterstitialScreenViewModule/InterstitialScreenViewModule.js +0 -81
  96. package/lib/components/InterstitialScreenViewModule/index.d.ts +0 -8
  97. package/scss/components/InterstitialScreenView/_carbon-imports.scss +0 -9
  98. package/scss/components/InterstitialScreenView/_index-with-carbon.scss +0 -9
  99. package/scss/components/InterstitialScreenView/_index.scss +0 -8
  100. package/scss/components/InterstitialScreenView/_interstitial-screen-view.scss +0 -25
  101. package/scss/components/InterstitialScreenViewModule/_carbon-imports.scss +0 -9
  102. package/scss/components/InterstitialScreenViewModule/_index-with-carbon.scss +0 -9
  103. package/scss/components/InterstitialScreenViewModule/_index.scss +0 -8
  104. package/scss/components/InterstitialScreenViewModule/_interstitial-screen-view-module.scss +0 -59
@@ -0,0 +1,184 @@
1
+ /**
2
+ * Copyright IBM Corp. 2020, 2025
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 { slicedToArray as _slicedToArray, extends as _extends, asyncToGenerator as _asyncToGenerator, regeneratorRuntime as _regeneratorRuntime } from '../../_virtual/_rollupPluginBabelHelpers.js';
9
+ import React__default, { useContext, useRef, useState, useMemo } from 'react';
10
+ import { pkg } from '../../settings.js';
11
+ import PropTypes from '../../_virtual/index.js';
12
+ import { InterstitialScreenContext } from './InterstitialScreen.js';
13
+ import { ModalFooter, Button, InlineLoading } from '@carbon/react';
14
+ import { clamp } from '../../global/js/utils/clamp.js';
15
+ import { ArrowRight } from '@carbon/react/icons';
16
+
17
+ var _InlineLoading, _InlineLoading2, _InlineLoading3, _InlineLoading4;
18
+ var InterstitialScreenFooter = /*#__PURE__*/React__default.forwardRef(function (props) {
19
+ var _props$className = props.className,
20
+ className = _props$className === void 0 ? '' : _props$className,
21
+ _props$skipButtonLabe = props.skipButtonLabel,
22
+ skipButtonLabel = _props$skipButtonLabe === void 0 ? 'Skip' : _props$skipButtonLabe,
23
+ _props$previousButton = props.previousButtonLabel,
24
+ previousButtonLabel = _props$previousButton === void 0 ? 'Back' : _props$previousButton,
25
+ _props$nextButtonLabe = props.nextButtonLabel,
26
+ nextButtonLabel = _props$nextButtonLabe === void 0 ? 'Next' : _props$nextButtonLabe,
27
+ _props$startButtonLab = props.startButtonLabel,
28
+ startButtonLabel = _props$startButtonLab === void 0 ? 'Get Started' : _props$startButtonLab,
29
+ actionButtonRenderer = props.actionButtonRenderer,
30
+ onAction = props.onAction;
31
+ var blockClass = "".concat(pkg.prefix, "--interstitial-screen");
32
+ var _useContext = useContext(InterstitialScreenContext),
33
+ handleClose = _useContext.handleClose,
34
+ progStep = _useContext.progStep,
35
+ handleGotoStep = _useContext.handleGotoStep,
36
+ stepCount = _useContext.stepCount,
37
+ disableButtonConfig = _useContext.disableButtonConfig,
38
+ isFullScreen = _useContext.isFullScreen;
39
+ var startButtonRef = useRef(undefined);
40
+ var nextButtonRef = useRef(undefined);
41
+ var _useState = useState(''),
42
+ _useState2 = _slicedToArray(_useState, 2),
43
+ loadingAction = _useState2[0],
44
+ setLoadingAction = _useState2[1];
45
+ var isMultiStep = !!stepCount;
46
+ var progStepFloor = 0;
47
+ var progStepCeil = stepCount - 1;
48
+ var handleAction = /*#__PURE__*/function () {
49
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(actionType) {
50
+ var stepDelta, targetStep;
51
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
52
+ while (1) switch (_context.prev = _context.next) {
53
+ case 0:
54
+ setLoadingAction(actionType);
55
+ _context.next = 3;
56
+ return onAction === null || onAction === void 0 ? void 0 : onAction(actionType, {
57
+ handleGotoStep: handleGotoStep,
58
+ progStep: progStep,
59
+ stepCount: stepCount,
60
+ disableButtonConfig: disableButtonConfig
61
+ });
62
+ case 3:
63
+ setLoadingAction('');
64
+ if (actionType === 'next' || actionType === 'back') {
65
+ stepDelta = actionType === 'next' ? 1 : -1;
66
+ targetStep = clamp(progStep + stepDelta, progStepFloor, progStepCeil);
67
+ handleGotoStep === null || handleGotoStep === void 0 || handleGotoStep(targetStep);
68
+ } else {
69
+ handleClose === null || handleClose === void 0 || handleClose(actionType);
70
+ }
71
+ case 5:
72
+ case "end":
73
+ return _context.stop();
74
+ }
75
+ }, _callee);
76
+ }));
77
+ return function handleAction(_x) {
78
+ return _ref.apply(this, arguments);
79
+ };
80
+ }();
81
+
82
+ // Usage
83
+ var handleStart = function handleStart() {
84
+ return handleAction('start');
85
+ };
86
+ var handleSkip = function handleSkip() {
87
+ return handleAction('skip');
88
+ };
89
+ var handleClickNext = function handleClickNext() {
90
+ return handleAction('next');
91
+ };
92
+ var handleClickPrev = function handleClickPrev() {
93
+ return handleAction('back');
94
+ };
95
+ var getRenderIcon = useMemo(function () {
96
+ if (loadingAction !== 'start' && isMultiStep && progStep === progStepCeil) {
97
+ return {
98
+ renderIcon: ArrowRight
99
+ };
100
+ }
101
+ return {};
102
+ }, [loadingAction, isMultiStep, progStep, progStepCeil]);
103
+ var getFooterContent = function getFooterContent() {
104
+ return /*#__PURE__*/React__default.createElement("div", {
105
+ className: "".concat(blockClass, "--footer ").concat(className)
106
+ }, isMultiStep && skipButtonLabel !== '' && /*#__PURE__*/React__default.createElement(Button, {
107
+ className: "".concat(blockClass, "--skip-btn"),
108
+ kind: "ghost",
109
+ size: "lg",
110
+ title: skipButtonLabel,
111
+ onClick: handleSkip,
112
+ disabled: disableButtonConfig === null || disableButtonConfig === void 0 ? void 0 : disableButtonConfig.skip
113
+ }, skipButtonLabel, loadingAction === 'skip' && (_InlineLoading || (_InlineLoading = /*#__PURE__*/React__default.createElement(InlineLoading, null)))), /*#__PURE__*/React__default.createElement("div", {
114
+ className: "".concat(blockClass, "--footer-controls")
115
+ }, isMultiStep && progStep > 0 && /*#__PURE__*/React__default.createElement(Button, {
116
+ className: "".concat(blockClass, "--prev-btn"),
117
+ kind: "secondary",
118
+ size: "lg",
119
+ title: previousButtonLabel,
120
+ disabled: disableButtonConfig === null || disableButtonConfig === void 0 ? void 0 : disableButtonConfig.back,
121
+ onClick: handleClickPrev
122
+ }, previousButtonLabel, loadingAction === 'back' && (_InlineLoading2 || (_InlineLoading2 = /*#__PURE__*/React__default.createElement(InlineLoading, null)))), isMultiStep && progStep < progStepCeil && /*#__PURE__*/React__default.createElement(Button, {
123
+ className: "".concat(blockClass, "--next-btn"),
124
+ renderIcon: loadingAction !== 'next' ? ArrowRight : null,
125
+ ref: nextButtonRef,
126
+ size: "lg",
127
+ title: nextButtonLabel,
128
+ disabled: disableButtonConfig === null || disableButtonConfig === void 0 ? void 0 : disableButtonConfig.next,
129
+ onClick: handleClickNext
130
+ }, nextButtonLabel, loadingAction === 'next' && (_InlineLoading3 || (_InlineLoading3 = /*#__PURE__*/React__default.createElement(InlineLoading, null)))), (isMultiStep && progStep === progStepCeil || !isMultiStep) && /*#__PURE__*/React__default.createElement(Button, _extends({
131
+ className: "".concat(blockClass, "--start-btn"),
132
+ ref: startButtonRef,
133
+ size: "lg",
134
+ title: startButtonLabel,
135
+ disabled: disableButtonConfig === null || disableButtonConfig === void 0 ? void 0 : disableButtonConfig.start,
136
+ onClick: handleStart
137
+ }, getRenderIcon), startButtonLabel, loadingAction === 'start' && (_InlineLoading4 || (_InlineLoading4 = /*#__PURE__*/React__default.createElement(InlineLoading, null))))));
138
+ };
139
+ if (actionButtonRenderer) {
140
+ return /*#__PURE__*/React__default.createElement("div", {
141
+ className: "".concat(blockClass, "--footer")
142
+ }, actionButtonRenderer({
143
+ handleGotoStep: handleGotoStep,
144
+ progStep: progStep,
145
+ stepCount: stepCount,
146
+ disableButtonConfig: disableButtonConfig
147
+ }));
148
+ }
149
+ return isFullScreen ? getFooterContent() : /*#__PURE__*/React__default.createElement(ModalFooter, null, getFooterContent());
150
+ });
151
+ InterstitialScreenFooter.propTypes = {
152
+ /**
153
+ * This is an optional callback prop that allows to render your custom footer action buttons.
154
+ */
155
+ actionButtonRenderer: PropTypes.func,
156
+ /**
157
+ * Provide an optional class to be applied to the containing node.
158
+ */
159
+ className: PropTypes.string,
160
+ /**
161
+ * The label for the Next button.
162
+ */
163
+ nextButtonLabel: PropTypes.string,
164
+ /**
165
+ * optional asynchronous callback on action button click (skip, previous, next and start)
166
+ * note: this is applicable when not using custom actionButtonRenderer
167
+ */
168
+ onAction: PropTypes.func,
169
+ /**
170
+ * The label for the Previous button.
171
+ *
172
+ */
173
+ previousButtonLabel: PropTypes.string,
174
+ /**
175
+ * The label for the skip button.
176
+ */
177
+ skipButtonLabel: PropTypes.string,
178
+ /**
179
+ * The label for the start button.
180
+ */
181
+ startButtonLabel: PropTypes.string
182
+ };
183
+
184
+ export { InterstitialScreenFooter as default };
@@ -0,0 +1,35 @@
1
+ import React from 'react';
2
+ export interface InterstitialScreenHeaderProps {
3
+ /**
4
+ * Provide the optional content for header section and will be render after header titles and before progress indicator.
5
+ * People can make use of this if they want to have custom header.
6
+ */
7
+ children?: React.ReactNode;
8
+ /**
9
+ * Provide an optional class to be applied to the containing node.
10
+ */
11
+ className?: string;
12
+ /**
13
+ * Provide an optional title to be applied to the header >.
14
+ */
15
+ headerTitle?: string;
16
+ /**
17
+ * Provide an optional sub title to be applied to the header >.
18
+ */
19
+ headerSubTitle?: string;
20
+ /**
21
+ * Tooltip text and aria label for the Close button icon.
22
+ */
23
+ closeIconDescription?: string;
24
+ /**
25
+ * Optional parameter to hide the progress indicator when multiple steps are used.
26
+ */
27
+ hideProgressIndicator?: boolean;
28
+ }
29
+ export type EnrichedChildren = {
30
+ children: React.ReactNode;
31
+ stepTitle: string;
32
+ translateWithId?: (id: string) => string;
33
+ };
34
+ declare const InterstitialScreenHeader: React.ForwardRefExoticComponent<InterstitialScreenHeaderProps & React.RefAttributes<HTMLDivElement>>;
35
+ export default InterstitialScreenHeader;
@@ -0,0 +1,90 @@
1
+ /**
2
+ * Copyright IBM Corp. 2020, 2025
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 { defineProperty as _defineProperty } from '../../_virtual/_rollupPluginBabelHelpers.js';
9
+ import { ModalHeader, ProgressIndicator, ProgressStep } from '@carbon/react';
10
+ import React__default from 'react';
11
+ import PropTypes from '../../_virtual/index.js';
12
+ import { pkg } from '../../settings.js';
13
+ import cx from 'classnames';
14
+ import { InterstitialScreenContext } from './InterstitialScreen.js';
15
+ import { useId } from '../../global/js/utils/useId.js';
16
+
17
+ var InterstitialScreenHeader = /*#__PURE__*/React__default.forwardRef(function (props) {
18
+ var _h, _h2;
19
+ var _props$className = props.className,
20
+ className = _props$className === void 0 ? '' : _props$className,
21
+ headerTitle = props.headerTitle,
22
+ headerSubTitle = props.headerSubTitle,
23
+ closeIconDescription = props.closeIconDescription,
24
+ hideProgressIndicator = props.hideProgressIndicator,
25
+ children = props.children;
26
+ var _React$useContext = React__default.useContext(InterstitialScreenContext),
27
+ bodyChildrenData = _React$useContext.bodyChildrenData,
28
+ isFullScreen = _React$useContext.isFullScreen,
29
+ progStep = _React$useContext.progStep,
30
+ handleClose = _React$useContext.handleClose;
31
+ var blockClass = "".concat(pkg.prefix, "--interstitial-screen");
32
+ var headerBlockClass = "".concat(blockClass, "--internal-header");
33
+ var _useId = useId();
34
+ var headerContent = function headerContent() {
35
+ return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, (headerTitle || headerSubTitle) && /*#__PURE__*/React__default.createElement("div", {
36
+ className: "".concat(blockClass, "--titleContainer")
37
+ }, headerTitle && (_h || (_h = /*#__PURE__*/React__default.createElement("h2", null, headerTitle))), headerSubTitle && (_h2 || (_h2 = /*#__PURE__*/React__default.createElement("h3", null, headerSubTitle)))), children, !hideProgressIndicator && bodyChildrenData && Array.isArray(bodyChildrenData) && /*#__PURE__*/React__default.createElement("div", {
38
+ className: "".concat(blockClass, "--progress")
39
+ }, /*#__PURE__*/React__default.createElement(ProgressIndicator, {
40
+ vertical: false,
41
+ currentIndex: progStep
42
+ }, bodyChildrenData === null || bodyChildrenData === void 0 ? void 0 : bodyChildrenData.map(function (child, idx) {
43
+ if (/*#__PURE__*/React__default.isValidElement(child)) {
44
+ var _child$props;
45
+ var stepKey = "".concat(_useId, "_").concat(((_child$props = child.props) === null || _child$props === void 0 || (_child$props = _child$props.stepTitle) === null || _child$props === void 0 ? void 0 : _child$props.replace(/\s+/g, '')) || idx);
46
+ return /*#__PURE__*/React__default.createElement(ProgressStep, {
47
+ key: stepKey,
48
+ label: child.props.stepTitle || '',
49
+ translateWithId: child.props.translateWithId
50
+ });
51
+ }
52
+ }))));
53
+ };
54
+ return isFullScreen ? /*#__PURE__*/React__default.createElement("header", {
55
+ className: cx(headerBlockClass, className, _defineProperty({}, "".concat(headerBlockClass, "--has-title"), headerTitle || headerSubTitle || children))
56
+ }, headerContent()) : /*#__PURE__*/React__default.createElement(ModalHeader, {
57
+ className: cx(headerBlockClass, className, _defineProperty({}, "".concat(headerBlockClass, "--has-title"), headerTitle || headerSubTitle || children)),
58
+ closeModal: handleClose,
59
+ iconDescription: closeIconDescription
60
+ }, headerContent());
61
+ });
62
+ InterstitialScreenHeader.propTypes = {
63
+ /**
64
+ * Provide the optional content for header section and will be render after header titles and before progress indicator.
65
+ * People can make use of this if they want to have custom header.
66
+ */
67
+ children: PropTypes.node,
68
+ /**
69
+ * Provide an optional class to be applied to the containing node.
70
+ */
71
+ className: PropTypes.string,
72
+ /**
73
+ * Tooltip text and aria label for the Close button icon.
74
+ */
75
+ closeIconDescription: PropTypes.string,
76
+ /**
77
+ * Provide an optional sub title to be applied to the header >.
78
+ */
79
+ headerSubTitle: PropTypes.string,
80
+ /**
81
+ * Provide an optional title to be applied to the header >.
82
+ */
83
+ headerTitle: PropTypes.string,
84
+ /**
85
+ * Optional parameter to hide the progress indicator when multiple steps are used.
86
+ */
87
+ hideProgressIndicator: PropTypes.bool
88
+ };
89
+
90
+ export { InterstitialScreenHeader as default };
@@ -5,6 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
  import React, { PropsWithChildren, ReactNode } from 'react';
8
+ import './_interstitial-screen-view.scss';
8
9
  export interface InterstitialScreenViewProps extends PropsWithChildren {
9
10
  /**
10
11
  * Provide the contents of the InterstitialScreenView.
@@ -5,6 +5,8 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
  import React from 'react';
8
+ import { disableButtonConfigType } from '../../InterstitialScreen';
9
+ import './_interstitial-screen-view-module.scss';
8
10
  export interface InterstitialScreenViewModuleProps {
9
11
  /**
10
12
  * Provide an optional class to be applied to the containing node.
@@ -18,6 +20,12 @@ export interface InterstitialScreenViewModuleProps {
18
20
  * The title of this component.
19
21
  */
20
22
  title: string;
23
+ /**
24
+ *
25
+ * @param value This is callback to disable any action button dynamically
26
+ * @returns void
27
+ */
28
+ disableActionButton?: (value: disableButtonConfigType) => void;
21
29
  }
22
30
  /**
23
31
  * View module to help in building interstitial screen views.
@@ -6,7 +6,7 @@
6
6
  */
7
7
 
8
8
  import { objectWithoutProperties as _objectWithoutProperties, slicedToArray as _slicedToArray, defineProperty as _defineProperty, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
9
- import { usePrefix, Button, Toggle, Link, IconButton } from '@carbon/react';
9
+ import { usePrefix, Section, Heading, Button, Toggle, Link, IconButton } from '@carbon/react';
10
10
  import { dateTimeFormat } from '@carbon/utilities';
11
11
  import { Settings, ErrorFilled, CheckmarkFilled, WarningAltFilled, InformationSquareFilled, Close, ChevronDown } from '@carbon/react/icons';
12
12
  import React__default, { useRef, useState, useEffect } from 'react';
@@ -24,6 +24,7 @@ import { usePrefersReducedMotion } from '../../global/js/hooks/usePrefersReduced
24
24
  import { getDevtoolsProps } from '../../global/js/utils/devtools.js';
25
25
  import { prepareProps } from '../../global/js/utils/props-helper.js';
26
26
  import { getSupportedLocale } from '../../global/js/utils/getSupportedLocale.js';
27
+ import { useId } from '../../global/js/utils/useId.js';
27
28
  import { pkg } from '../../settings.js';
28
29
  import { timeAgo } from './utils.js';
29
30
  import { usePresence } from '../../global/js/hooks/usePresence.js';
@@ -184,6 +185,7 @@ var NotificationsPanel = /*#__PURE__*/React__default.forwardRef(function (_ref,
184
185
  setAllNotifications = _useState2[1];
185
186
  var supportedLocale = getSupportedLocale(dateTimeLocale, DefaultLocale);
186
187
  var carbonPrefix = usePrefix();
188
+ var headingId = useId();
187
189
  var reducedMotion = usePrefersReducedMotion();
188
190
  var exitAnimationName = reducedMotion ? 'notifications-panel-exit-reduced' : 'notifications-panel-fade-out';
189
191
  var _usePresence = usePresence(open, notificationPanelRef, exitAnimationName),
@@ -300,9 +302,10 @@ var NotificationsPanel = /*#__PURE__*/React__default.forwardRef(function (_ref,
300
302
  var renderNotification = function renderNotification(group, notification, index) {
301
303
  var notificationClassName = cx(["".concat(blockClass, "__notification"), "".concat(blockClass, "__notification-").concat(group)]);
302
304
  var notificationHeaderClassName = cx(["".concat(blockClass, "__notification-title"), _defineProperty({}, "".concat(blockClass, "__notification-title-unread"), notification.unread)]);
303
- return /*#__PURE__*/React__default.createElement("div", {
305
+ return /*#__PURE__*/React__default.createElement(Section, {
304
306
  key: "".concat(notification.timestamp, "-").concat(notification.title, "-").concat(index),
305
307
  className: notificationClassName,
308
+ as: "div",
306
309
  role: "button",
307
310
  tabIndex: 0,
308
311
  onClick: function onClick() {
@@ -349,7 +352,7 @@ var NotificationsPanel = /*#__PURE__*/React__default.forwardRef(function (_ref,
349
352
  yearsAgoText: yearsAgoText,
350
353
  yearAgoText: yearAgoText,
351
354
  nowText: nowText
352
- })), /*#__PURE__*/React__default.createElement("h6", {
355
+ })), /*#__PURE__*/React__default.createElement(Heading, {
353
356
  className: notificationHeaderClassName
354
357
  }, notification.title), notification.description && notification.description.length && renderDescription(notification.id), notification.link && notification.link.text && notification.link.url && /*#__PURE__*/React__default.createElement(Link, _extends({
355
358
  href: notification.link.url,
@@ -377,9 +380,10 @@ var NotificationsPanel = /*#__PURE__*/React__default.forwardRef(function (_ref,
377
380
  type: "button",
378
381
  className: "".concat(carbonPrefix, "--visually-hidden"),
379
382
  ref: startSentinel
380
- }, "Focus sentinel start"), /*#__PURE__*/React__default.createElement("div", _extends({
383
+ }, "Focus sentinel start"), /*#__PURE__*/React__default.createElement(Section, _extends({
384
+ as: "div",
381
385
  role: "dialog",
382
- "aria-label": "Notification Panel",
386
+ "aria-labelledby": headingId,
383
387
  onKeyDown: handleKeydown,
384
388
  tabIndex: 0
385
389
  }, rest, {
@@ -392,7 +396,8 @@ var NotificationsPanel = /*#__PURE__*/React__default.forwardRef(function (_ref,
392
396
  className: "".concat(blockClass, "__header-container")
393
397
  }, /*#__PURE__*/React__default.createElement("div", {
394
398
  className: "".concat(blockClass, "__header-flex")
395
- }, /*#__PURE__*/React__default.createElement("h2", {
399
+ }, /*#__PURE__*/React__default.createElement(Heading, {
400
+ id: headingId,
396
401
  className: "".concat(blockClass, "__header")
397
402
  }, title), /*#__PURE__*/React__default.createElement(Button, {
398
403
  size: "sm",
@@ -411,17 +416,17 @@ var NotificationsPanel = /*#__PURE__*/React__default.forwardRef(function (_ref,
411
416
  defaultToggled: doNotDisturbDefaultToggled,
412
417
  "aria-label": doNotDisturbLabel,
413
418
  labelText: doNotDisturbLabel
414
- })), /*#__PURE__*/React__default.createElement("div", {
419
+ })), /*#__PURE__*/React__default.createElement(Section, {
415
420
  className: mainSectionClassName
416
- }, withinLastDayNotifications && withinLastDayNotifications.length ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("h6", {
421
+ }, withinLastDayNotifications && withinLastDayNotifications.length ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Heading, {
417
422
  className: "".concat(blockClass, "__time-section-label")
418
423
  }, todayLabel), withinLastDayNotifications.map(function (notification, index) {
419
424
  return renderNotification('today', notification, index);
420
- })) : null, previousDayNotifications && previousDayNotifications.length ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("h6", {
425
+ })) : null, previousDayNotifications && previousDayNotifications.length ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Heading, {
421
426
  className: "".concat(blockClass, "__time-section-label")
422
427
  }, yesterdayLabel), previousDayNotifications.map(function (notification, index) {
423
428
  return renderNotification('yesterday', notification, index);
424
- })) : null, previousNotifications && previousNotifications.length ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("h6", {
429
+ })) : null, previousNotifications && previousNotifications.length ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Heading, {
425
430
  className: "".concat(blockClass, "__time-section-label")
426
431
  }, previousLabel), previousNotifications.map(function (notification, index) {
427
432
  return renderNotification('previous', notification, index);
@@ -384,7 +384,7 @@ var PageHeader = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
384
384
  className: "".concat(blockClass, "--offset-top-measuring-element"),
385
385
  ref: offsetTopMeasuringRef
386
386
  }), /*#__PURE__*/React__default.createElement("section", _extends({}, rest, {
387
- className: cx([blockClass, "".concat(blockClass, "--no-margins-below-row"), className, _defineProperty(_defineProperty({}, "".concat(blockClass, "--has-navigation"), navigation || tags), "".concat(blockClass, "--has-navigation-tags-only"), !navigation && tags)]),
387
+ className: cx([blockClass, "".concat(blockClass, "--no-margins-below-row"), className, _defineProperty(_defineProperty(_defineProperty({}, "".concat(blockClass, "--has-navigation"), navigation || tags), "".concat(blockClass, "--has-navigation-tags-only"), !navigation && tags), "".concat(blockClass, "--without-background"), withoutBackground)]),
388
388
  ref: headerRef
389
389
  }, getDevtoolsProps(componentName)), /*#__PURE__*/React__default.createElement(FlexGrid, {
390
390
  fullWidth: fullWidthGrid === true || fullWidthGrid === 'xl',
@@ -393,7 +393,8 @@ var SidePanel = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
393
393
  },
394
394
  iconDescription: navigationBackIconDescription,
395
395
  className: "".concat(blockClass, "__navigation-back-button"),
396
- onClick: onNavigationBack
396
+ onClick: onNavigationBack,
397
+ "aria-label": navigationBackIconDescription
397
398
  }), title && title.length && labelText && labelText.length && /*#__PURE__*/React__default.createElement("p", {
398
399
  className: "".concat(blockClass, "__label-text"),
399
400
  ref: labelTextRef
@@ -467,7 +468,7 @@ var SidePanel = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
467
468
  className: mainPanelClassNames,
468
469
  ref: sidePanelRef,
469
470
  role: "complementary",
470
- "aria-label": title,
471
+ "aria-label": title || rest['aria-label'],
471
472
  onAnimationEnd: onAnimationEnd,
472
473
  onAnimationStart: onAnimationStart,
473
474
  onKeyDown: handleKeyDown
@@ -15,7 +15,7 @@ import { allPropTypes } from '../../global/js/utils/props-helper.js';
15
15
  import { getDevtoolsProps } from '../../global/js/utils/devtools.js';
16
16
  import { pkg } from '../../settings.js';
17
17
 
18
- var _excluded = ["influencerPosition", "influencerWidth"];
18
+ var _excluded = ["influencerPosition", "influencerWidth", "children"];
19
19
  var componentName = 'Tearsheet';
20
20
 
21
21
  // NOTE: the component SCSS is not imported here: it is rolled up separately.
@@ -43,13 +43,14 @@ var Tearsheet = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
43
43
  influencerPosition = _ref$influencerPositi === void 0 ? 'left' : _ref$influencerPositi,
44
44
  _ref$influencerWidth = _ref.influencerWidth,
45
45
  influencerWidth = _ref$influencerWidth === void 0 ? 'narrow' : _ref$influencerWidth,
46
+ children = _ref.children,
46
47
  rest = _objectWithoutProperties(_ref, _excluded);
47
48
  return /*#__PURE__*/React__default.createElement(TearsheetShell, _objectSpread2(_objectSpread2(_objectSpread2({}, getDevtoolsProps(componentName)), rest), {}, {
48
49
  influencerPosition: influencerPosition,
49
50
  influencerWidth: influencerWidth,
50
51
  ref: ref,
51
52
  size: 'wide'
52
- }));
53
+ }), children);
53
54
  });
54
55
 
55
56
  // Return a placeholder if not released and not enabled by feature flag
@@ -50,8 +50,6 @@ export * from './NonLinearReading';
50
50
  export * from './BigNumbers';
51
51
  export * from './TruncatedList';
52
52
  export * from './InterstitialScreen';
53
- export * from './InterstitialScreenView';
54
- export * from './InterstitialScreenViewModule';
55
53
  export * from './DelimitedList';
56
54
  export * from './Decorator';
57
55
  export * from './DecoratorLink';
@@ -14,8 +14,8 @@ export declare function useOverflowItems<T extends Item>(items: T[] | undefined,
14
14
  maxWidth?: number;
15
15
  }) => void): {
16
16
  visibleItems: T[];
17
- itemRefHandler: (id: string, node: HTMLElement | null) => () => void;
17
+ itemRefHandler: (id: string, node: HTMLElement | null) => void;
18
18
  hiddenItems: T[];
19
- offsetRefHandler: (node: any) => any;
19
+ offsetRefHandler: (node: HTMLElement | null) => HTMLElement;
20
20
  };
21
21
  export {};
@@ -125,8 +125,6 @@ declare namespace defaults {
125
125
  let InlineTipButton: boolean;
126
126
  let InlineTipLink: boolean;
127
127
  let InterstitialScreen: boolean;
128
- let InterstitialScreenView: boolean;
129
- let InterstitialScreenViewModule: boolean;
130
128
  let NonLinearReading: boolean;
131
129
  }
132
130
  export { component_1 as component };
@@ -130,8 +130,6 @@ var defaults = {
130
130
  InlineTipButton: false,
131
131
  InlineTipLink: false,
132
132
  InterstitialScreen: false,
133
- InterstitialScreenView: false,
134
- InterstitialScreenViewModule: false,
135
133
  NonLinearReading: false
136
134
  },
137
135
  // feature level flags
package/es/index.js CHANGED
@@ -96,8 +96,6 @@ export { NonLinearReading } from './components/NonLinearReading/NonLinearReading
96
96
  export { BigNumbers } from './components/BigNumbers/BigNumbers.js';
97
97
  export { TruncatedList } from './components/TruncatedList/TruncatedList.js';
98
98
  export { InterstitialScreen } from './components/InterstitialScreen/InterstitialScreen.js';
99
- export { InterstitialScreenView } from './components/InterstitialScreenView/InterstitialScreenView.js';
100
- export { InterstitialScreenViewModule } from './components/InterstitialScreenViewModule/InterstitialScreenViewModule.js';
101
99
  export { DelimitedList } from './components/DelimitedList/DelimitedList.js';
102
100
  export { FullPageError } from './components/FullPageError/FullPageError.js';
103
101
  export { SearchBar } from './components/SearchBar/SearchBar.js';
package/es/settings.d.ts CHANGED
@@ -111,8 +111,6 @@ export const pkg: {
111
111
  InlineTipButton: boolean;
112
112
  InlineTipLink: boolean;
113
113
  InterstitialScreen: boolean;
114
- InterstitialScreenView: boolean;
115
- InterstitialScreenViewModule: boolean;
116
114
  NonLinearReading: boolean;
117
115
  };
118
116
  feature: {
@@ -114,8 +114,9 @@ exports.Checklist = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
114
114
  React.useEffect(function () {
115
115
  setIsOpen(open);
116
116
  }, [open]);
117
- return /*#__PURE__*/React.createElement("aside", _rollupPluginBabelHelpers.extends({}, rest, {
117
+ return /*#__PURE__*/React.createElement(react.Section, _rollupPluginBabelHelpers.extends({}, rest, {
118
118
  "aria-label": checklistAriaLabel,
119
+ as: "aside",
119
120
  className: cx(blockClass,
120
121
  // Apply the block class to the main HTML element
121
122
  className, // Apply any supplied class names to the main HTML element.
@@ -130,9 +131,9 @@ exports.Checklist = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
130
131
  value: chartValue
131
132
  }), /*#__PURE__*/React.createElement("div", {
132
133
  className: "".concat(blockClass, "__titles")
133
- }, title && /*#__PURE__*/React.createElement("h2", {
134
+ }, title && /*#__PURE__*/React.createElement(react.Heading, {
134
135
  className: "".concat(blockClass, "__title")
135
- }, title), chartLabelAndValue && /*#__PURE__*/React.createElement("h3", {
136
+ }, title), chartLabelAndValue && /*#__PURE__*/React.createElement("p", {
136
137
  id: chartLabelId,
137
138
  className: "".concat(blockClass, "__chart-label")
138
139
  }, chartLabel)), enableToggle && /*#__PURE__*/React.createElement(react.IconButton, {
@@ -153,13 +154,13 @@ exports.Checklist = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
153
154
  className: "".concat(blockClass, "__content-outer")
154
155
  }, /*#__PURE__*/React.createElement("div", {
155
156
  className: "".concat(blockClass, "__content-inner")
156
- }, /*#__PURE__*/React.createElement("section", {
157
+ }, /*#__PURE__*/React.createElement("div", {
157
158
  className: cx("".concat(blockClass, "__body"))
158
159
  }, taskLists.map(function (list, index) {
159
- return /*#__PURE__*/React.createElement("div", {
160
+ return /*#__PURE__*/React.createElement(react.Section, {
160
161
  className: "".concat(blockClass, "__list-group"),
161
162
  key: "".concat(list.title, "-").concat(index)
162
- }, list.title && /*#__PURE__*/React.createElement("h3", {
163
+ }, list.title && /*#__PURE__*/React.createElement(react.Heading, {
163
164
  title: list.title,
164
165
  className: "".concat(blockClass, "__list-title")
165
166
  }, list.title), /*#__PURE__*/React.createElement("ol", {
@@ -5,6 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
  import React, { ReactNode } from 'react';
8
+ type TooltipAlignment = 'top' | 'bottom';
8
9
  interface CoachmarkStackProps {
9
10
  /**
10
11
  * CoachmarkStack should use a single CoachmarkOverlayElements component as a child.
@@ -51,6 +52,10 @@ interface CoachmarkStackProps {
51
52
  * The title of the Coachmark.
52
53
  */
53
54
  title: string;
55
+ /**
56
+ * Label's tooltip position
57
+ */
58
+ tooltipAlign?: TooltipAlignment;
54
59
  }
55
60
  /**
56
61
  * Stacked coachmarks are used to call out specific functionality or concepts
@@ -21,7 +21,7 @@ var context = require('../Coachmark/utils/context.js');
21
21
  var enums = require('../Coachmark/utils/enums.js');
22
22
  var useIsomorphicEffect = require('../../global/js/hooks/useIsomorphicEffect.js');
23
23
 
24
- var _excluded = ["children", "className", "onClose", "description", "renderMedia", "navLinkLabels", "portalTarget", "closeButtonLabel", "tagline", "theme", "title"];
24
+ var _excluded = ["children", "className", "onClose", "description", "renderMedia", "navLinkLabels", "portalTarget", "closeButtonLabel", "tagline", "theme", "title", "tooltipAlign"];
25
25
 
26
26
  // Carbon and package components we use.
27
27
  /* TODO: @import(s) of carbon components and other package components. */
@@ -65,6 +65,7 @@ exports.CoachmarkStack = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
65
65
  _ref$theme = _ref.theme,
66
66
  theme = _ref$theme === void 0 ? defaults.theme : _ref$theme,
67
67
  title = _ref.title,
68
+ tooltipAlign = _ref.tooltipAlign,
68
69
  rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
69
70
  var portalNode = React.useRef(null);
70
71
  useIsomorphicEffect.useIsomorphicEffect(function () {
@@ -222,7 +223,8 @@ exports.CoachmarkStack = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
222
223
  },
223
224
  portalTarget: portalTarget,
224
225
  closeButtonLabel: closeButtonLabel,
225
- title: title
226
+ title: title,
227
+ tooltipAlign: tooltipAlign
226
228
  }), portalNode !== null && portalNode !== void 0 && portalNode.current ? /*#__PURE__*/reactDom.createPortal(wrappedChildren, portalNode === null || portalNode === void 0 ? void 0 : portalNode.current) : null));
227
229
  });
228
230
 
@@ -282,5 +284,9 @@ exports.CoachmarkStack.propTypes = {
282
284
  /**
283
285
  * The title of the Coachmark.
284
286
  */
285
- title: index.default.string.isRequired
287
+ title: index.default.string.isRequired,
288
+ /**
289
+ * Label's tooltip position
290
+ */
291
+ tooltipAlign: index.default.oneOf(['top', 'bottom'])
286
292
  };