@carbon/ibm-products 2.39.0 → 2.40.1-canary.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (174) hide show
  1. package/css/index-full-carbon.css +47 -38
  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 +7 -1
  6. package/css/index-without-carbon-released-only.css.map +1 -1
  7. package/css/index-without-carbon-released-only.min.css +1 -1
  8. package/css/index-without-carbon-released-only.min.css.map +1 -1
  9. package/css/index-without-carbon.css +47 -38
  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 +710 -38
  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/AddSelect/AddSelect.d.ts +44 -2
  18. package/es/components/AddSelect/AddSelect.js +8 -4
  19. package/es/components/AddSelect/AddSelectBody.d.ts +44 -2
  20. package/es/components/AddSelect/AddSelectBody.js +10 -12
  21. package/es/components/AddSelect/AddSelectSort.d.ts +16 -17
  22. package/es/components/AddSelect/AddSelectSort.js +5 -5
  23. package/es/components/AddSelect/types/index.d.ts +44 -0
  24. package/es/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.d.ts +5 -1
  25. package/es/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +12 -6
  26. package/es/components/Card/Card.js +1 -1
  27. package/es/components/ConditionBuilder/ConditionBlock/ConditionBlock.js +3 -3
  28. package/es/components/ConditionBuilder/ConditionBuilder.js +6 -1
  29. package/es/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.js +3 -3
  30. package/es/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.js +1 -1
  31. package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +2 -2
  32. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +3 -3
  33. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.js +1 -1
  34. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemNumber/ConditionBuilderItemNumber.js +1 -1
  35. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ConditionBuilderItemOption.js +30 -18
  36. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemText/ConditionBuilderItemText.js +3 -3
  37. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemTime/ConditionBuilderItemTime.js +7 -7
  38. package/es/components/ConditionBuilder/ConditionConnector/ConditionConnector.js +6 -6
  39. package/es/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.js +11 -11
  40. package/es/components/ConditionBuilder/utils/checkForHoldingKey.d.ts +1 -0
  41. package/es/components/ConditionBuilder/utils/checkForHoldingKey.js +16 -0
  42. package/es/components/ConditionBuilder/utils/handleKeyboardEvents.d.ts +1 -0
  43. package/es/components/ConditionBuilder/utils/handleKeyboardEvents.js +125 -0
  44. package/es/components/ConditionBuilder/utils/util.d.ts +1 -1
  45. package/es/components/ConditionBuilder/utils/util.js +34 -5
  46. package/es/components/CreateInfluencer/CreateInfluencer.js +1 -1
  47. package/es/components/CreateTearsheet/CreateTearsheetStep.d.ts +95 -2
  48. package/es/components/CreateTearsheet/CreateTearsheetStep.js +7 -5
  49. package/es/components/DataSpreadsheet/DataSpreadsheet.js +4 -3
  50. package/es/components/DataSpreadsheet/DataSpreadsheetHeader.js +5 -0
  51. package/es/components/Datagrid/Datagrid/DatagridContent.js +2 -2
  52. package/es/components/Datagrid/Datagrid/DatagridHeaderRow.js +3 -4
  53. package/es/components/Datagrid/Datagrid/DatagridVirtualBody.js +5 -1
  54. package/es/components/ExpressiveCard/ExpressiveCard.d.ts +2 -1
  55. package/es/components/Guidebanner/Guidebanner.d.ts +62 -2
  56. package/es/components/Guidebanner/Guidebanner.js +8 -7
  57. package/es/components/Guidebanner/GuidebannerElement.d.ts +30 -17
  58. package/es/components/Guidebanner/GuidebannerElement.js +4 -4
  59. package/es/components/Guidebanner/GuidebannerElementButton.d.ts +29 -15
  60. package/es/components/Guidebanner/GuidebannerElementButton.js +10 -4
  61. package/es/components/Guidebanner/GuidebannerElementLink.d.ts +20 -13
  62. package/es/components/Guidebanner/GuidebannerElementLink.js +3 -3
  63. package/es/components/InterstitialScreen/InterstitialScreen.js +3 -1
  64. package/es/components/MultiAddSelect/MultiAddSelect.d.ts +134 -2
  65. package/es/components/MultiAddSelect/MultiAddSelect.js +2 -1
  66. package/es/components/NotificationsPanel/NotificationsPanel.js +0 -1
  67. package/es/components/PageHeader/PageHeader.d.ts +298 -5
  68. package/es/components/PageHeader/PageHeader.js +99 -47
  69. package/es/components/PageHeader/PageHeaderUtils.d.ts +1 -1
  70. package/es/components/PageHeader/PageHeaderUtils.js +4 -1
  71. package/es/components/SidePanel/SidePanel.d.ts +6 -2
  72. package/es/components/SidePanel/SidePanel.js +17 -2
  73. package/es/components/SidePanel/constants.d.ts +1 -0
  74. package/es/components/SidePanel/constants.js +1 -0
  75. package/es/components/SingleAddSelect/SingleAddSelect.d.ts +69 -2
  76. package/es/components/SingleAddSelect/SingleAddSelect.js +2 -1
  77. package/es/components/TagOverflow/TagOverflow.js +35 -20
  78. package/es/components/TagOverflow/TagOverflowModal.d.ts +3 -1
  79. package/es/components/TagOverflow/TagOverflowModal.js +14 -20
  80. package/es/components/TagOverflow/TagOverflowPopover.js +19 -4
  81. package/es/components/Tearsheet/Tearsheet.d.ts +132 -6
  82. package/es/components/Tearsheet/Tearsheet.js +25 -13
  83. package/es/components/Tearsheet/TearsheetShell.d.ts +5 -1
  84. package/es/components/Tearsheet/TearsheetShell.js +26 -4
  85. package/es/components/WebTerminal/WebTerminal.d.ts +4 -0
  86. package/es/components/WebTerminal/WebTerminal.js +11 -3
  87. package/es/global/js/hooks/useFocus.d.ts +3 -1
  88. package/es/global/js/hooks/useFocus.js +6 -3
  89. package/es/global/js/hooks/useRetrieveStepData.d.ts +1 -1
  90. package/es/global/js/hooks/useRetrieveStepData.js +1 -1
  91. package/lib/components/AddSelect/AddSelect.d.ts +44 -2
  92. package/lib/components/AddSelect/AddSelect.js +7 -3
  93. package/lib/components/AddSelect/AddSelectBody.d.ts +44 -2
  94. package/lib/components/AddSelect/AddSelectBody.js +10 -12
  95. package/lib/components/AddSelect/AddSelectSort.d.ts +16 -17
  96. package/lib/components/AddSelect/AddSelectSort.js +5 -5
  97. package/lib/components/AddSelect/types/index.d.ts +44 -0
  98. package/lib/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.d.ts +5 -1
  99. package/lib/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +12 -6
  100. package/lib/components/Card/Card.js +1 -1
  101. package/lib/components/ConditionBuilder/ConditionBlock/ConditionBlock.js +3 -3
  102. package/lib/components/ConditionBuilder/ConditionBuilder.js +6 -1
  103. package/lib/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.js +3 -3
  104. package/lib/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.js +1 -1
  105. package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +2 -2
  106. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +3 -3
  107. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.js +1 -1
  108. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemNumber/ConditionBuilderItemNumber.js +1 -1
  109. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ConditionBuilderItemOption.js +29 -17
  110. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemText/ConditionBuilderItemText.js +3 -3
  111. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemTime/ConditionBuilderItemTime.js +7 -7
  112. package/lib/components/ConditionBuilder/ConditionConnector/ConditionConnector.js +6 -6
  113. package/lib/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.js +11 -11
  114. package/lib/components/ConditionBuilder/utils/checkForHoldingKey.d.ts +1 -0
  115. package/lib/components/ConditionBuilder/utils/checkForHoldingKey.js +20 -0
  116. package/lib/components/ConditionBuilder/utils/handleKeyboardEvents.d.ts +1 -0
  117. package/lib/components/ConditionBuilder/utils/handleKeyboardEvents.js +129 -0
  118. package/lib/components/ConditionBuilder/utils/util.d.ts +1 -1
  119. package/lib/components/ConditionBuilder/utils/util.js +36 -4
  120. package/lib/components/CreateInfluencer/CreateInfluencer.js +1 -1
  121. package/lib/components/CreateTearsheet/CreateTearsheetStep.d.ts +95 -2
  122. package/lib/components/CreateTearsheet/CreateTearsheetStep.js +7 -5
  123. package/lib/components/DataSpreadsheet/DataSpreadsheet.js +4 -3
  124. package/lib/components/DataSpreadsheet/DataSpreadsheetHeader.js +5 -0
  125. package/lib/components/Datagrid/Datagrid/DatagridContent.js +2 -2
  126. package/lib/components/Datagrid/Datagrid/DatagridHeaderRow.js +3 -4
  127. package/lib/components/Datagrid/Datagrid/DatagridVirtualBody.js +5 -1
  128. package/lib/components/ExpressiveCard/ExpressiveCard.d.ts +2 -1
  129. package/lib/components/Guidebanner/Guidebanner.d.ts +62 -2
  130. package/lib/components/Guidebanner/Guidebanner.js +8 -7
  131. package/lib/components/Guidebanner/GuidebannerElement.d.ts +30 -17
  132. package/lib/components/Guidebanner/GuidebannerElement.js +4 -4
  133. package/lib/components/Guidebanner/GuidebannerElementButton.d.ts +29 -15
  134. package/lib/components/Guidebanner/GuidebannerElementButton.js +10 -4
  135. package/lib/components/Guidebanner/GuidebannerElementLink.d.ts +20 -13
  136. package/lib/components/Guidebanner/GuidebannerElementLink.js +3 -3
  137. package/lib/components/InterstitialScreen/InterstitialScreen.js +3 -1
  138. package/lib/components/MultiAddSelect/MultiAddSelect.d.ts +134 -2
  139. package/lib/components/MultiAddSelect/MultiAddSelect.js +2 -1
  140. package/lib/components/NotificationsPanel/NotificationsPanel.js +0 -1
  141. package/lib/components/PageHeader/PageHeader.d.ts +298 -5
  142. package/lib/components/PageHeader/PageHeader.js +99 -47
  143. package/lib/components/PageHeader/PageHeaderUtils.d.ts +1 -1
  144. package/lib/components/PageHeader/PageHeaderUtils.js +4 -1
  145. package/lib/components/SidePanel/SidePanel.d.ts +6 -2
  146. package/lib/components/SidePanel/SidePanel.js +17 -2
  147. package/lib/components/SidePanel/constants.d.ts +1 -0
  148. package/lib/components/SidePanel/constants.js +1 -0
  149. package/lib/components/SingleAddSelect/SingleAddSelect.d.ts +69 -2
  150. package/lib/components/SingleAddSelect/SingleAddSelect.js +2 -1
  151. package/lib/components/TagOverflow/TagOverflow.js +34 -19
  152. package/lib/components/TagOverflow/TagOverflowModal.d.ts +3 -1
  153. package/lib/components/TagOverflow/TagOverflowModal.js +14 -20
  154. package/lib/components/TagOverflow/TagOverflowPopover.js +19 -4
  155. package/lib/components/Tearsheet/Tearsheet.d.ts +132 -6
  156. package/lib/components/Tearsheet/Tearsheet.js +25 -13
  157. package/lib/components/Tearsheet/TearsheetShell.d.ts +5 -1
  158. package/lib/components/Tearsheet/TearsheetShell.js +26 -4
  159. package/lib/components/WebTerminal/WebTerminal.d.ts +4 -0
  160. package/lib/components/WebTerminal/WebTerminal.js +11 -3
  161. package/lib/global/js/hooks/useFocus.d.ts +3 -1
  162. package/lib/global/js/hooks/useFocus.js +6 -3
  163. package/lib/global/js/hooks/useRetrieveStepData.d.ts +1 -1
  164. package/lib/global/js/hooks/useRetrieveStepData.js +1 -1
  165. package/package.json +3 -3
  166. package/scss/components/CoachmarkStack/_coachmark-stack.scss +4 -2
  167. package/scss/components/ConditionBuilder/styles/_conditionBuilderCondition.scss +4 -4
  168. package/scss/components/ConditionBuilder/styles/_conditionBuilderItem.scss +34 -34
  169. package/scss/components/Datagrid/styles/_datagrid.scss +2 -1
  170. package/scss/components/SidePanel/_side-panel-variables.scss +1 -0
  171. package/scss/components/StringFormatter/_string-formatter.scss +1 -1
  172. package/scss/components/TagOverflow/_tag-overflow.scss +5 -2
  173. package/scss/components/_index-with-carbon.scss +1 -0
  174. package/telemetry.yml +2 -0
@@ -27,6 +27,7 @@ import { ButtonSetWithOverflow } from '../ButtonSetWithOverflow/ButtonSetWithOve
27
27
 
28
28
  var _excluded = ["actionBarItems", "actionBarMenuOptionsClass", "actionBarOverflowAriaLabel", "allTagsModalSearchLabel", "allTagsModalSearchPlaceholderText", "allTagsModalTitle", "hasBackgroundAlways", "breadcrumbOverflowAriaLabel", "breadcrumbs", "children", "className", "collapseHeader", "collapseHeaderIconDescription", "collapseTitle", "disableBreadcrumbScroll", "enableBreadcrumbScroll", "expandHeaderIconDescription", "fullWidthGrid", "hasCollapseHeaderToggle", "narrowGrid", "navigation", "pageActions", "pageActionsOverflowLabel", "pageActionsMenuOptionsClass", "showAllTagsLabel", "subtitle", "tags", "title", "withoutBackground", "breadcrumbOverflowTooltipAlign"];
29
29
  var componentName = 'PageHeader';
30
+ pkg.component.ActionBar = true;
30
31
 
31
32
  // Default values for props
32
33
  var defaults = {
@@ -81,7 +82,7 @@ var PageHeader = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
81
82
  _useState2 = _slicedToArray(_useState, 2),
82
83
  metrics = _useState2[0],
83
84
  setMetrics = _useState2[1];
84
- var _useState3 = useState(_objectSpread2({}, rest.style)),
85
+ var _useState3 = useState(_objectSpread2({}, rest === null || rest === void 0 ? void 0 : rest.style)),
85
86
  _useState4 = _slicedToArray(_useState3, 2),
86
87
  pageHeaderStyles = _useState4[0],
87
88
  setPageHeaderStyles = _useState4[1];
@@ -89,16 +90,30 @@ var PageHeader = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
89
90
  // refs
90
91
  var localHeaderRef = useRef(null);
91
92
  var headerRef = ref || localHeaderRef;
92
- var sizingContainerRef = useRef();
93
+ var sizingContainerRef = useRef(null);
93
94
  var offsetTopMeasuringRef = useRef(null);
94
95
 
95
96
  // state based on props only
96
97
  var hasActionBar = actionBarItems && actionBarItems.length > 0;
97
98
  var hasBreadcrumbRow = !!breadcrumbs || !!actionBarItems;
99
+ if (tags && (tags === null || tags === void 0 ? void 0 : tags.length) > 10) {
100
+ if (!allTagsModalSearchLabel) {
101
+ throw new Error("allTagsModalSearchLabel' is required.");
102
+ }
103
+ if (!allTagsModalSearchPlaceholderText) {
104
+ throw new Error("'allTagsModalSearchPlaceholderText' is required.");
105
+ }
106
+ if (!allTagsModalTitle) {
107
+ throw new Error("'allTagsModalTitle' is required.");
108
+ }
109
+ if (!showAllTagsLabel) {
110
+ throw new Error("'showAllTagsLabel' is required.");
111
+ }
112
+ }
98
113
 
99
114
  // utility functions
100
115
  var checkUpdateVerticalSpace = function checkUpdateVerticalSpace() {
101
- return utilCheckUpdateVerticalSpace(headerRef, offsetTopMeasuringRef, navigation, enableBreadcrumbScroll, hasActionBar, widthIsNarrow, setMetrics);
116
+ return utilCheckUpdateVerticalSpace(headerRef, offsetTopMeasuringRef, navigation, enableBreadcrumbScroll, hasActionBar || false, widthIsNarrow, setMetrics);
102
117
  };
103
118
 
104
119
  // NOTE: The buffer is used to add space between the bottom of the header and the last content
@@ -189,15 +204,16 @@ var PageHeader = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
189
204
  checkUpdateVerticalSpace();
190
205
  };
191
206
  var handleCollapseToggle = function handleCollapseToggle() {
192
- utilSetCollapsed(!fullyCollapsed, headerRef, metrics.headerOffset, metrics.headerTopValue);
207
+ utilSetCollapsed(!fullyCollapsed, headerRef, metrics === null || metrics === void 0 ? void 0 : metrics.headerOffset, metrics === null || metrics === void 0 ? void 0 : metrics.headerTopValue);
193
208
  };
194
209
 
195
210
  // use effects
196
211
  useEffect(function () {
197
212
  /* istanbul ignore else */
198
213
  if (pageActions !== null && pageActions !== void 0 && pageActions.content) {
199
- var minWidth = pageActions.minWidth,
200
- maxWidth = pageActions.maxWidth;
214
+ var _ref5 = pageActions,
215
+ minWidth = _ref5.minWidth,
216
+ maxWidth = _ref5.maxWidth;
201
217
  handlePageActionWidthChange({
202
218
  minWidth: minWidth,
203
219
  maxWidth: maxWidth
@@ -207,7 +223,9 @@ var PageHeader = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
207
223
  useEffect(function () {
208
224
  // Determine the location of the pageAction buttons
209
225
  /* istanbul ignore next */
210
- setPageActionsInBreadcrumbRow(collapseTitle || hasActionBar && scrollYValue > metrics.titleRowSpaceAbove || widthIsNarrow && scrollYValue > metrics.pageActionsSpaceAbove);
226
+ if (metrics !== null && metrics !== void 0 && metrics.titleRowSpaceAbove && metrics !== null && metrics !== void 0 && metrics.pageActionsSpaceAbove) {
227
+ setPageActionsInBreadcrumbRow(collapseTitle || hasActionBar && scrollYValue > (metrics === null || metrics === void 0 ? void 0 : metrics.titleRowSpaceAbove) || widthIsNarrow && scrollYValue > (metrics === null || metrics === void 0 ? void 0 : metrics.pageActionsSpaceAbove));
228
+ }
211
229
  }, [hasActionBar, metrics.breadcrumbRowSpaceBelow, metrics.titleRowSpaceAbove, metrics.pageActionsSpaceAbove, collapseTitle, scrollYValue, widthIsNarrow]);
212
230
  useEffect(function () {
213
231
  // Assesses the size of the action bar and page action area and their required
@@ -240,15 +258,15 @@ var PageHeader = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
240
258
  // Updates custom CSS props used to manage scroll behavior
241
259
  /* istanbul ignore next */
242
260
  setPageHeaderStyles(function (prev) {
243
- return _objectSpread2(_objectSpread2({}, prev), {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "--".concat(blockClass, "--height-px"), "".concat(metrics.headerHeight, "px")), "--".concat(blockClass, "--width-px"), "".concat(metrics.headerWidth, "px")), "--".concat(blockClass, "--header-top"), "".concat(metrics.headerTopValue + metrics.headerOffset, "px")), "--".concat(blockClass, "--breadcrumb-title-visibility"), scrollYValue > 0 ? 'visible' : 'hidden'), "--".concat(blockClass, "--scroll"), "".concat(scrollYValue)), "--".concat(blockClass, "--breadcrumb-title-top"), "".concat(Math.max(0, metrics.breadcrumbTitleHeight + metrics.titleRowSpaceAbove - scrollYValue), "px")), "--".concat(blockClass, "--breadcrumb-title-opacity"), "".concat(Math.min(1, Math.max(0, (scrollYValue - (metrics.titleRowSpaceAbove || 0)) / (metrics.breadcrumbTitleHeight || 1) // don't want to divide by zero
244
- )))), "--".concat(blockClass, "--breadcrumb-row-width-px"), "".concat(metrics.breadcrumbRowWidth, "px")));
261
+ return _objectSpread2(_objectSpread2({}, prev), {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "--".concat(blockClass, "--height-px"), "".concat(metrics.headerHeight, "px")), "--".concat(blockClass, "--width-px"), "".concat(metrics.headerWidth, "px")), "--".concat(blockClass, "--header-top"), "".concat(((metrics === null || metrics === void 0 ? void 0 : metrics.headerTopValue) || 0) + ((metrics === null || metrics === void 0 ? void 0 : metrics.headerOffset) || 0), "px")), "--".concat(blockClass, "--breadcrumb-title-visibility"), scrollYValue > 0 ? 'visible' : 'hidden'), "--".concat(blockClass, "--scroll"), "".concat(scrollYValue)), "--".concat(blockClass, "--breadcrumb-title-top"), "".concat(metrics.breadcrumbTitleHeight && metrics.titleRowSpaceAbove && Math.max(0, metrics.breadcrumbTitleHeight + metrics.titleRowSpaceAbove - scrollYValue), "px")), "--".concat(blockClass, "--breadcrumb-title-opacity"), "".concat(Math.min(1, Math.max(0, (scrollYValue - (metrics.titleRowSpaceAbove || 0)) / (metrics.breadcrumbTitleHeight || 1) // don't want to divide by zero
262
+ )))), "--".concat(blockClass, "--breadcrumb-row-width-px"), "".concat(metrics === null || metrics === void 0 ? void 0 : metrics.breadcrumbRowWidth, "px")));
245
263
  });
246
264
  }, [headerRef, enableBreadcrumbScroll, metrics, metrics.breadcrumbRowHeight, metrics.breadcrumbRowSpaceBelow, metrics.breadcrumbTitleHeight, metrics.breadcrumbRowWidth, metrics.headerHeight, metrics.headerWidth, metrics.headerOffset, metrics.headerTopValue, metrics.navigationRowHeight, navigation, scrollYValue, tags]);
247
265
  useNearestScroll(headerRef,
248
266
  // on scroll or various layout changes check updates if needed
249
267
  // istanbul ignore next
250
- function (_ref5) {
251
- var current = _ref5.current;
268
+ function (_ref6) {
269
+ var current = _ref6.current;
252
270
  setPageHeaderStyles(function (prev) {
253
271
  return _objectSpread2(_objectSpread2({}, prev), {}, _defineProperty({}, "--".concat(blockClass, "--breadcrumb-top"), "".concat(metrics.headerOffset, "px")));
254
272
  });
@@ -257,15 +275,15 @@ var PageHeader = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
257
275
 
258
276
  // set offset for tagset tooltip
259
277
  /* istanbul ignore next */
260
- var tagsetTooltipOffset = fullyCollapsed ? metrics.headerHeight + metrics.headerTopValue + metrics.headerOffset : metrics.headerHeight + metrics.headerOffset;
278
+ var tagsetTooltipOffset = fullyCollapsed && metrics !== null && metrics !== void 0 && metrics.headerHeight && metrics !== null && metrics !== void 0 && metrics.headerTopValue && metrics !== null && metrics !== void 0 && metrics.headerOffset ? metrics.headerHeight + metrics.headerTopValue + metrics.headerOffset : (metrics.headerHeight || 0) + (metrics.headerOffset || 0);
261
279
 
262
280
  /* istanbul ignore next */
263
281
  document.documentElement.style.setProperty("--".concat(blockClass, "--tagset-tooltip-position"), fullyCollapsed ? 'fixed' : 'absolute');
264
282
  document.documentElement.style.setProperty("--".concat(blockClass, "--tagset-tooltip-offset"), "".concat(tagsetTooltipOffset, "px"));
265
283
  setScrollYValue(current.scrollY);
266
284
  }, [metrics.headerHeight, metrics.headerTopValue, metrics.headerOffset, enableBreadcrumbScroll]);
267
- useWindowResize(function (_ref6) {
268
- var current = _ref6.current;
285
+ useWindowResize(function (_ref7) {
286
+ var current = _ref7.current;
269
287
  // on window resize and other updates some values may have changed
270
288
  checkUpdateVerticalSpace();
271
289
  setWidthIsNarrow(current.innerWidth / 16 < parseInt(breakpoints.md.width)); // small (below medium) media query
@@ -277,14 +295,14 @@ var PageHeader = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
277
295
  useEffect(function () {
278
296
  // Determines the appropriate header background opacity based on the header config/height/scroll and the withoutBackground setting
279
297
  var result = withoutBackground ? 0 : 1;
280
- if (!result && metrics.headerHeight > 0 && (breadcrumbs || actionBarItems || tags || navigation)) {
281
- var startAddingAt = parseFloat(spacing10, 10) * parseInt(baseFontSize);
298
+ if (!result && metrics !== null && metrics !== void 0 && metrics.headerHeight && metrics.headerHeight > 0 && (breadcrumbs || actionBarItems || tags || navigation)) {
299
+ var startAddingAt = parseFloat(spacing10) * parseInt(baseFontSize);
282
300
  var scrollRemaining = metrics.headerHeight - scrollYValue;
283
301
 
284
302
  /* don't know how to test resize */
285
303
  /* istanbul ignore if */
286
304
  if (scrollRemaining < startAddingAt) {
287
- var distanceAddingOver = startAddingAt - metrics.breadcrumbRowHeight;
305
+ var distanceAddingOver = startAddingAt - ((metrics === null || metrics === void 0 ? void 0 : metrics.breadcrumbRowHeight) || 0);
288
306
  result = Math.min(1, (startAddingAt - scrollRemaining) / distanceAddingOver);
289
307
  }
290
308
  }
@@ -296,15 +314,19 @@ var PageHeader = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
296
314
  // only has toggle if requested and withoutBackground is unset/falsy
297
315
  // NOTE: prop-types isRequired.if for the expand and collapse
298
316
  // icon descriptions depends on the this.
299
- setHasCollapseButton(hasCollapseHeaderToggle && !withoutBackground);
317
+ setHasCollapseButton(hasCollapseHeaderToggle && !withoutBackground || false);
300
318
  }, [withoutBackground, hasCollapseHeaderToggle]);
301
319
  useEffect(function () {
302
320
  // Determine if space is needed in the breadcrumb for a collapse button
303
- setSpaceForCollapseButton(hasCollapseButton && !(navigation || tags) && metrics.headerHeight);
321
+ if (hasCollapseButton && !(navigation || tags) && metrics !== null && metrics !== void 0 && metrics.headerHeight) {
322
+ setSpaceForCollapseButton(true);
323
+ } else {
324
+ setSpaceForCollapseButton(false);
325
+ }
304
326
  }, [hasCollapseButton, navigation, tags, metrics.headerHeight]);
305
327
  var nextToTabsCheck = function nextToTabsCheck() {
306
328
  /* istanbul ignore next */
307
- return enableBreadcrumbScroll && !actionBarItems && scrollYValue + metrics.headerTopValue >= 0;
329
+ return enableBreadcrumbScroll && !actionBarItems && metrics.headerTopValue && scrollYValue + metrics.headerTopValue >= 0;
308
330
  };
309
331
  useEffect(function () {
310
332
  if (collapseHeader === true) {
@@ -316,6 +338,18 @@ var PageHeader = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
316
338
 
317
339
  // Determine what form of title to display in the breadcrumb
318
340
  var breadcrumbItemForTitle = utilGetBreadcrumbItemForTitle(blockClass, collapseTitle, title);
341
+ var getBreadcrumbs = function getBreadcrumbs() {
342
+ if (breadcrumbs && breadcrumbItemForTitle) {
343
+ return breadcrumbs.concat(breadcrumbItemForTitle);
344
+ } else {
345
+ if (breadcrumbItemForTitle) {
346
+ return [breadcrumbItemForTitle];
347
+ } else {
348
+ return breadcrumbs;
349
+ }
350
+ }
351
+ };
352
+ var displayedBreadcrumbs = getBreadcrumbs();
319
353
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
320
354
  className: "".concat(blockClass, "--offset-top-measuring-element"),
321
355
  ref: offsetTopMeasuringRef
@@ -335,14 +369,14 @@ var PageHeader = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
335
369
  className: "".concat(blockClass, "__breadcrumb-row--container")
336
370
  }, /*#__PURE__*/React__default.createElement(Column, {
337
371
  className: cx("".concat(blockClass, "__breadcrumb-column"), _defineProperty({}, "".concat(blockClass, "__breadcrumb-column--background"), !!breadcrumbs || hasActionBar || widthIsNarrow))
338
- }, breadcrumbs || breadcrumbItemForTitle ? /*#__PURE__*/React__default.createElement(BreadcrumbWithOverflow, {
372
+ }, (breadcrumbs || breadcrumbItemForTitle) && /*#__PURE__*/React__default.createElement(BreadcrumbWithOverflow, {
339
373
  className: "".concat(blockClass, "__breadcrumb"),
340
374
  noTrailingSlash: !!title,
341
375
  overflowAriaLabel: breadcrumbOverflowAriaLabel,
342
- breadcrumbs: breadcrumbs && breadcrumbItemForTitle ? breadcrumbs.concat(breadcrumbItemForTitle) : breadcrumbItemForTitle ? [breadcrumbItemForTitle] : breadcrumbs // breadcrumbs may be null or undefined
343
- ,
344
- overflowTooltipAlign: breadcrumbOverflowTooltipAlign
345
- }) : null), /*#__PURE__*/React__default.createElement(Column, {
376
+ breadcrumbs: displayedBreadcrumbs,
377
+ overflowTooltipAlign: breadcrumbOverflowTooltipAlign,
378
+ maxVisible: undefined
379
+ })), /*#__PURE__*/React__default.createElement(Column, {
346
380
  className: cx(["".concat(blockClass, "__action-bar-column ").concat(blockClass, "__action-bar-column--background"), _defineProperty(_defineProperty({}, "".concat(blockClass, "__action-bar-column--has-page-actions"), pageActions), "".concat(blockClass, "__action-bar-column--influenced-by-collapse-button"), spaceForCollapseButton)])
347
381
  }, /*#__PURE__*/React__default.createElement("div", {
348
382
  className: "".concat(blockClass, "__action-bar-column-content"),
@@ -351,11 +385,11 @@ var PageHeader = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
351
385
  /*#__PURE__*/
352
386
  // Investigate the responsive behavior or this and the title also fix the ActionBar Item and PageAction story css
353
387
  React__default.createElement(React__default.Fragment, null, thePageActions(true, pageActionsInBreadcrumbRow), /*#__PURE__*/React__default.createElement(ActionBar, {
354
- menuOptionsClass: cx(actionBarMenuOptionsClass, "".concat(blockClass, "__action-bar-menu-options")),
355
- overflowAriaLabel: actionBarOverflowAriaLabel,
356
388
  actions: actionBarItems,
357
389
  className: "".concat(blockClass, "__action-bar"),
390
+ menuOptionsClass: "".concat(cx(actionBarMenuOptionsClass, "".concat(blockClass, "__action-bar-menu-options"))),
358
391
  onWidthChange: handleActionBarWidthChange,
392
+ overflowAriaLabel: actionBarOverflowAriaLabel,
359
393
  rightAlign: true
360
394
  })) : widthIsNarrow && thePageActions(true, pageActionsInBreadcrumbRow))))) : null, !collapseTitle && (title || pageActions) ? /*#__PURE__*/React__default.createElement(Row, {
361
395
  className: cx("".concat(blockClass, "__title-row"), _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(blockClass, "__title-row--no-breadcrumb-row"), !hasBreadcrumbRow), "".concat(blockClass, "__title-row--under-action-bar"), hasActionBar || widthIsNarrow), "".concat(blockClass, "__title-row--has-page-actions"), !!pageActions), "".concat(blockClass, "__title-row--sticky"), !!pageActions && !actionBarItems && hasBreadcrumbRow))
@@ -386,9 +420,9 @@ var PageHeader = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
386
420
  allTagsModalSearchLabel: allTagsModalSearchLabel,
387
421
  allTagsModalSearchPlaceholderText: allTagsModalSearchPlaceholderText,
388
422
  allTagsModalTitle: allTagsModalTitle,
389
- showAllTagsLabel: showAllTagsLabel,
390
423
  tags: tags,
391
- overflowClassName: "".concat(blockClass, "__navigation-tags-overflow")
424
+ overflowClassName: "".concat(blockClass, "__navigation-tags-overflow"),
425
+ showAllTagsLabel: showAllTagsLabel || ''
392
426
  }))) : null),
393
427
  // this navigation pushes the breadcrumb off or settles underneath it depending on enableBreadcrumbScroll
394
428
  navigation ? /*#__PURE__*/React__default.createElement(Row, {
@@ -402,7 +436,7 @@ var PageHeader = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
402
436
  allTagsModalSearchLabel: allTagsModalSearchLabel,
403
437
  allTagsModalSearchPlaceholderText: allTagsModalSearchPlaceholderText,
404
438
  allTagsModalTitle: allTagsModalTitle,
405
- showAllTagsLabel: showAllTagsLabel,
439
+ showAllTagsLabel: showAllTagsLabel || '',
406
440
  tags: tags,
407
441
  overflowClassName: "".concat(blockClass, "__navigation-tags-overflow")
408
442
  })) : null) : null), hasCollapseButton ? /*#__PURE__*/React__default.createElement("div", {
@@ -425,7 +459,7 @@ var PageHeader = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
425
459
  })) : null));
426
460
  function thePageActions(isBreadcrumbRow, inBreadcrumbRow) {
427
461
  if (pageActions) {
428
- var _pageActions$content;
462
+ var _content;
429
463
  var _Tag = isBreadcrumbRow ? 'div' : Column;
430
464
  // Only report size change of version action bar is rendered as part of the breadcrumb row.
431
465
  // and when there is an actionBar
@@ -434,8 +468,8 @@ var PageHeader = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
434
468
  className: cx("".concat(blockClass, "__page-actions"), _defineProperty({}, "".concat(blockClass, "__page-actions--in-breadcrumb"), inBreadcrumbRow))
435
469
  }, /*#__PURE__*/React__default.createElement("div", {
436
470
  className: cx("".concat(blockClass, "__page-actions-content"))
437
- }, (_pageActions$content = pageActions.content) !== null && _pageActions$content !== void 0 ? _pageActions$content : /*#__PURE__*/React__default.createElement(ButtonSetWithOverflow, {
438
- classname: "".concat(blockClass, "__button-set-with-overflow"),
471
+ }, (_content = pageActions === null || pageActions === void 0 ? void 0 : pageActions.content) !== null && _content !== void 0 ? _content : /*#__PURE__*/React__default.createElement(ButtonSetWithOverflow, {
472
+ className: "".concat(blockClass, "__button-set-with-overflow"),
439
473
  menuOptionsClass: cx(pageActionsMenuOptionsClass, "".concat(blockClass, "__button-set-menu-options")),
440
474
  onWidthChange: handleWidthChange,
441
475
  buttons: pageActions,
@@ -475,6 +509,8 @@ var deprecatedProps = {
475
509
  */
476
510
  hasBackgroundAlways: deprecateProp(PropTypes.bool, 'Property replaced by `withoutBackground`')
477
511
  };
512
+
513
+ /**@ts-ignore */
478
514
  PageHeader.tagTypes = tagTypes;
479
515
  PageHeader.propTypes = _objectSpread2({
480
516
  /**
@@ -482,6 +518,7 @@ PageHeader.propTypes = _objectSpread2({
482
518
  * Each item is specified as an object with the properties of a Carbon Button in icon only form.
483
519
  * Button kind, size, tooltipPosition, tooltipAlignment and type are ignored.
484
520
  */
521
+ /**@ts-ignore */
485
522
  actionBarItems: PropTypes.arrayOf(PropTypes.shape(_objectSpread2(_objectSpread2({}, prepareProps(Button.propTypes, ['kind', 'size', 'tooltipPosition', 'tooltipAlignment'])), {}, {
486
523
  iconDescription: PropTypes.string.isRequired,
487
524
  onClick: Button.propTypes.onClick,
@@ -497,8 +534,9 @@ PageHeader.propTypes = _objectSpread2({
497
534
  *
498
535
  * NOTE: This prop is required if actionBarItems are supplied
499
536
  */
500
- actionBarOverflowAriaLabel: PropTypes.string.isRequired.if(function (_ref10) {
501
- var actionBarItems = _ref10.actionBarItems;
537
+ /**@ts-ignore */
538
+ actionBarOverflowAriaLabel: PropTypes.string.isRequired.if(function (_ref11) {
539
+ var actionBarItems = _ref11.actionBarItems;
502
540
  return actionBarItems && actionBarItems.length > 0;
503
541
  }),
504
542
  /**
@@ -529,8 +567,9 @@ PageHeader.propTypes = _objectSpread2({
529
567
  * If the user supplies breadcrumbs then this property is required.
530
568
  * It is used in an overflow menu when there is insufficient space to display all breadcrumbs inline.
531
569
  */
532
- breadcrumbOverflowAriaLabel: PropTypes.string.isRequired.if(function (_ref11) {
533
- var breadcrumbs = _ref11.breadcrumbs;
570
+ /**@ts-ignore */
571
+ breadcrumbOverflowAriaLabel: PropTypes.string.isRequired.if(function (_ref12) {
572
+ var breadcrumbs = _ref12.breadcrumbs;
534
573
  return breadcrumbs && breadcrumbs.length > 0;
535
574
  }),
536
575
  /**
@@ -548,6 +587,7 @@ PageHeader.propTypes = _objectSpread2({
548
587
  * fields in the object will be passed through to the breadcrumb element as
549
588
  * HTML attributes.
550
589
  */
590
+ /**@ts-ignore */
551
591
  breadcrumbs: PropTypes.arrayOf(PropTypes.shape({
552
592
  /**
553
593
  * Optional string representing the link location for the BreadcrumbItem
@@ -568,8 +608,9 @@ PageHeader.propTypes = _objectSpread2({
568
608
  /**
569
609
  * A text version of the `label` for display, required if `label` is not a string.
570
610
  */
571
- title: PropTypes.string.isRequired.if(function (_ref12) {
572
- var label = _ref12.label;
611
+ /**@ts-ignore */
612
+ title: PropTypes.string.isRequired.if(function (_ref13) {
613
+ var label = _ref13.label;
573
614
  return typeof label !== 'string';
574
615
  })
575
616
  })),
@@ -595,9 +636,10 @@ PageHeader.propTypes = _objectSpread2({
595
636
  * If `hasCollapseHeaderToggle` is set and `withoutBackground` is unset/falsy then assistive text is
596
637
  * required for both the expend and collapse states of the button component used.
597
638
  */
598
- collapseHeaderIconDescription: PropTypes.string.isRequired.if(function (_ref13) {
599
- var withoutBackground = _ref13.withoutBackground,
600
- hasCollapseHeaderToggle = _ref13.hasCollapseHeaderToggle;
639
+ /**@ts-ignore */
640
+ collapseHeaderIconDescription: PropTypes.string.isRequired.if(function (_ref14) {
641
+ var withoutBackground = _ref14.withoutBackground,
642
+ hasCollapseHeaderToggle = _ref14.hasCollapseHeaderToggle;
601
643
  return !withoutBackground && hasCollapseHeaderToggle;
602
644
  }),
603
645
  /**
@@ -614,15 +656,17 @@ PageHeader.propTypes = _objectSpread2({
614
656
  * If `hasCollapseHeaderToggle` is set and `withoutBackground` is unset/falsy then assistive text is
615
657
  * required for both the expend and collapse states of the button component used.
616
658
  */
617
- expandHeaderIconDescription: PropTypes.string.isRequired.if(function (_ref14) {
618
- var withoutBackground = _ref14.withoutBackground,
619
- hasCollapseHeaderToggle = _ref14.hasCollapseHeaderToggle;
659
+ /**@ts-ignore */
660
+ expandHeaderIconDescription: PropTypes.string.isRequired.if(function (_ref15) {
661
+ var withoutBackground = _ref15.withoutBackground,
662
+ hasCollapseHeaderToggle = _ref15.hasCollapseHeaderToggle;
620
663
  return !withoutBackground && hasCollapseHeaderToggle;
621
664
  }),
622
665
  /**
623
666
  * The PageHeader is hosted in a Carbon grid, this value is passed through to the Carbon grid fullWidth prop.
624
667
  * 'xl' is used to override the grid width setting. Can be used with narrowGrid: true to get the largest size.
625
668
  */
669
+ /**@ts-ignore */
626
670
  fullWidthGrid: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['xl'])]),
627
671
  /**
628
672
  * Adds a button as the last element of the bottom row which collapses and expands the header.
@@ -630,6 +674,7 @@ PageHeader.propTypes = _objectSpread2({
630
674
  * NOTE: The header is collapsed by setting the scroll position to hide part of the header.
631
675
  * Collapsing has no effect if there is insufficient content to scroll.
632
676
  */
677
+ /**@ts-ignore */
633
678
  hasCollapseHeaderToggle: PropTypes.bool,
634
679
  /**
635
680
  * The PageHeader is hosted in a Carbon grid, this value is passed through to the Carbon grid narrow prop
@@ -656,6 +701,7 @@ PageHeader.propTypes = _objectSpread2({
656
701
  * - maxWidth: maximum number of pixels the content will grow to
657
702
  * Carbon Button API https://react.carbondesignsystem.com/?path=/docs/components-button--default#component-api
658
703
  */
704
+ /**@ts-ignore */
659
705
  pageActions: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.shape(_objectSpread2(_objectSpread2({}, Button.propTypes), {}, {
660
706
  key: PropTypes.string.isRequired,
661
707
  kind: Button.propTypes.kind,
@@ -680,8 +726,9 @@ PageHeader.propTypes = _objectSpread2({
680
726
  *
681
727
  * NOTE: This prop is required if pageActions are supplied
682
728
  */
683
- pageActionsOverflowLabel: PropTypes.node.isRequired.if(function (_ref15) {
684
- var pageActions = _ref15.pageActions;
729
+ /**@ts-ignore */
730
+ pageActionsOverflowLabel: PropTypes.node.isRequired.if(function (_ref16) {
731
+ var pageActions = _ref16.pageActions;
685
732
  return pageActions && pageActions.length > 0 && !pageActions.content;
686
733
  }),
687
734
  /**
@@ -709,6 +756,7 @@ PageHeader.propTypes = _objectSpread2({
709
756
  *
710
757
  * See https://react.carbondesignsystem.com/?path=/docs/components-tag--default
711
758
  */
759
+ /**@ts-ignore */
712
760
  tags: PropTypes.arrayOf(PropTypes.shape(_objectSpread2(_objectSpread2({}, prepareProps(Tag.propTypes, 'filter')), {}, {
713
761
  label: PropTypes.string.isRequired,
714
762
  // we duplicate this prop to improve the DocGen
@@ -721,6 +769,7 @@ PageHeader.propTypes = _objectSpread2({
721
769
  * - String
722
770
  * - Object containing
723
771
  * - text: title string
772
+ * - shortTitle: alternative title for exceptionally long titles
724
773
  * - icon: optional icon
725
774
  * - loading: boolean shows loading indicator if true
726
775
  * - onChange: function to process the live value (React change === HTML Input)
@@ -733,9 +782,11 @@ PageHeader.propTypes = _objectSpread2({
733
782
  * - breadcrumbContent: version of content used in the breadcrumb on scroll. If not supplied
734
783
  * - asText: String based representation of the title
735
784
  */
785
+ /**@ts-ignore */
736
786
  title: PropTypes.oneOfType([PropTypes.shape({
737
787
  // Update docgen if changed
738
788
  text: PropTypes.string.isRequired,
789
+ shortTitle: PropTypes.string,
739
790
  icon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
740
791
  loading: PropTypes.bool,
741
792
  // inline edit version properties
@@ -761,6 +812,7 @@ PageHeader.propTypes = _objectSpread2({
761
812
  * Specifies if the PageHeader should appear without a background color, and defaults to the preferred `false` (a background color is shown).
762
813
  * Note that when `true` some parts of the header still gain a background if and when they stick to the top of the PageHeader on scroll.
763
814
  */
815
+ /**@ts-ignore */
764
816
  withoutBackground: PropTypes.bool
765
817
  }, deprecatedProps);
766
818
  PageHeader.displayName = componentName;
@@ -1,5 +1,5 @@
1
1
  export const blockClass: string;
2
- export function utilCheckUpdateVerticalSpace(headerRef: {}, offsetTopMeasuringRef: {}, navigation: {}, enableBreadcrumbScroll: boolean, hasActionBar: boolean, widthIsNarrow: boolean, setMetrics: () => any): void;
2
+ export function utilCheckUpdateVerticalSpace(headerRef: {}, offsetTopMeasuringRef: {}, navigation: object, enableBreadcrumbScroll: boolean, hasActionBar: boolean, widthIsNarrow: boolean, setMetrics: () => any): void;
3
3
  export function utilSetCollapsed(collapse: any, headerRef: any, headerOffset: any, headerTopValue: any): void;
4
4
  export function utilGetBreadcrumbItemForTitle(blockClass: any, collapseTitle: any, title: any): {
5
5
  label: any;
@@ -19,7 +19,7 @@ var blockClass = "".concat(pkg.prefix, "--page-header");
19
19
  * Assesses the vertical height of various elements and calls setMetrics with update
20
20
  * @param {{}} headerRef
21
21
  * @param {{}} offsetTopMeasuringRef
22
- * @param {{}} navigation
22
+ * @param {object} navigation
23
23
  * @param {boolean} enableBreadcrumbScroll
24
24
  * @param {boolean} hasActionBar
25
25
  * @param {boolean} widthIsNarrow
@@ -182,6 +182,9 @@ var utilGetBreadcrumbItemForTitle = function utilGetBreadcrumbItemForTitle(block
182
182
  breadcrumbTitle.isCurrentPage = true;
183
183
  breadcrumbTitle.className = cx(["".concat(blockClass, "__breadcrumb-title"), _defineProperty({}, "".concat(blockClass, "__breadcrumb-title--pre-collapsed"), collapseTitle)]);
184
184
  }
185
+ if (title.shortTitle) {
186
+ breadcrumbTitle.shortTitle = title.shortTitle;
187
+ }
185
188
  return breadcrumbTitle;
186
189
  }
187
190
  };
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
  /// <reference path="../../../src/custom-typings/index.d.ts" />
8
- import React, { ReactNode } from 'react';
8
+ import React, { ReactNode, RefObject } from 'react';
9
9
  import { ButtonProps } from '@carbon/react';
10
10
  type SidePanelBaseProps = {
11
11
  /**
@@ -57,6 +57,10 @@ type SidePanelBaseProps = {
57
57
  * Sets the label text which will display above the title text
58
58
  */
59
59
  labelText?: string;
60
+ /**
61
+ * Provide a ref to return focus to once the side panel is closed.
62
+ */
63
+ launcherButtonRef?: RefObject<any>;
60
64
  /**
61
65
  * Sets the icon description for the navigation back icon button
62
66
  */
@@ -100,7 +104,7 @@ type SidePanelBaseProps = {
100
104
  /**
101
105
  * Sets the size of the side panel
102
106
  */
103
- size: 'xs' | 'sm' | 'md' | 'lg' | '2xl';
107
+ size: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
104
108
  /**
105
109
  * Determines if this panel slides in
106
110
  */
@@ -23,7 +23,7 @@ import { ActionSet } from '../ActionSet/ActionSet.js';
23
23
  import { usePreviousValue } from '../../global/js/hooks/usePreviousValue.js';
24
24
  import { useFocus } from '../../global/js/hooks/useFocus.js';
25
25
 
26
- var _excluded = ["actionToolbarButtons", "actions", "animateTitle", "children", "className", "closeIconDescription", "condensedActions", "currentStep", "id", "includeOverlay", "labelText", "navigationBackIconDescription", "onNavigationBack", "onRequestClose", "onUnmount", "open", "placement", "preventCloseOnClickOutside", "selectorPageContent", "selectorPrimaryFocus", "size", "slideIn", "slug", "subtitle", "title"],
26
+ var _excluded = ["actionToolbarButtons", "actions", "animateTitle", "children", "className", "closeIconDescription", "condensedActions", "currentStep", "id", "includeOverlay", "labelText", "navigationBackIconDescription", "onNavigationBack", "onRequestClose", "onUnmount", "open", "placement", "preventCloseOnClickOutside", "selectorPageContent", "selectorPrimaryFocus", "size", "slideIn", "slug", "subtitle", "title", "launcherButtonRef"],
27
27
  _excluded2 = ["label", "kind", "hasIconOnly", "icon", "renderIcon", "tooltipPosition", "tooltipAlignment", "leading", "disabled", "className", "onClick"];
28
28
  var blockClass = "".concat(pkg.prefix, "--side-panel");
29
29
  var componentName = 'SidePanel';
@@ -77,6 +77,7 @@ var SidePanel = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
77
77
  slug = _ref.slug,
78
78
  subtitle = _ref.subtitle,
79
79
  title = _ref.title,
80
+ launcherButtonRef = _ref.launcherButtonRef,
80
81
  rest = _objectWithoutProperties(_ref, _excluded);
81
82
  var _useState = useState(false),
82
83
  _useState2 = _slicedToArray(_useState, 2),
@@ -108,6 +109,7 @@ var SidePanel = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
108
109
  firstElement = _useFocus.firstElement,
109
110
  keyDownListener = _useFocus.keyDownListener;
110
111
  var panelRefValue = sidePanelRef.current;
112
+ var previousOpen = usePreviousValue(open);
111
113
  var shouldReduceMotion = useReducedMotion();
112
114
 
113
115
  // Title animation on scroll related state
@@ -179,6 +181,14 @@ var SidePanel = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
179
181
  console.warn("".concat(componentName, ": The prop `labelText` was provided without a `title`. It is required to have a `title` when using the `labelText` prop."));
180
182
  }
181
183
  }, [labelText, title]);
184
+ useEffect(function () {
185
+ if (previousOpen && !open && launcherButtonRef) {
186
+ setTimeout(function () {
187
+ var _launcherButtonRef$cu;
188
+ launcherButtonRef === null || launcherButtonRef === void 0 || (_launcherButtonRef$cu = launcherButtonRef.current) === null || _launcherButtonRef$cu === void 0 || _launcherButtonRef$cu.focus();
189
+ }, 0);
190
+ }
191
+ }, [launcherButtonRef, open, previousOpen]);
182
192
  var checkSetDoAnimateTitle = function checkSetDoAnimateTitle() {
183
193
  var canDoAnimateTitle = false;
184
194
  if (panelRefValue && open && animateTitle && animationComplete && titleRef !== null && titleRef !== void 0 && titleRef.current && title && title.length && !reducedMotion.matches) {
@@ -532,6 +542,11 @@ SidePanel.propTypes = {
532
542
  * Sets the label text which will display above the title text
533
543
  */
534
544
  labelText: PropTypes.string,
545
+ /**
546
+ * Provide a ref to return focus to once the modal is closed.
547
+ */
548
+ /**@ts-ignore */
549
+ launcherButtonRef: PropTypes.any,
535
550
  /**
536
551
  * Sets the icon description for the navigation back icon button
537
552
  */
@@ -581,7 +596,7 @@ SidePanel.propTypes = {
581
596
  * Sets the size of the side panel
582
597
  */
583
598
  /**@ts-ignore*/
584
- size: PropTypes.oneOf(['xs', 'sm', 'md', 'lg', '2xl']),
599
+ size: PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl', '2xl']),
585
600
  /**
586
601
  * Determines if this panel slides in
587
602
  */
@@ -3,5 +3,6 @@ export namespace SIDE_PANEL_SIZES {
3
3
  let sm: string;
4
4
  let md: string;
5
5
  let lg: string;
6
+ let xl: string;
6
7
  let max: string;
7
8
  }
@@ -10,6 +10,7 @@ var SIDE_PANEL_SIZES = {
10
10
  sm: '20rem',
11
11
  md: '30rem',
12
12
  lg: '40rem',
13
+ xl: '65rem',
13
14
  max: '75%'
14
15
  };
15
16
 
@@ -1,5 +1,72 @@
1
+ import React from 'react';
2
+ import { Entry } from '../AddSelect/types';
3
+ interface SingleAddSelectProps {
4
+ /**
5
+ * optional class name
6
+ */
7
+ className?: string;
8
+ /**
9
+ * text description that appears under the title
10
+ */
11
+ description?: string;
12
+ /**
13
+ * label for global search input
14
+ */
15
+ globalSearchLabel?: string;
16
+ /**
17
+ * placeholder for global search input
18
+ */
19
+ globalSearchPlaceholder?: string;
20
+ /**
21
+ * object that contains the item data. for more information reference the
22
+ * "Structuring items" section in the docs tab
23
+ */
24
+ items?: {
25
+ entries: Entry[];
26
+ };
27
+ /**
28
+ * label that display above the list of items
29
+ */
30
+ itemsLabel?: string;
31
+ /**
32
+ * text to display when no results are found from the global search
33
+ */
34
+ noResultsDescription?: string;
35
+ /**
36
+ * title to display when no results are found from the global search
37
+ */
38
+ noResultsTitle?: string;
39
+ /**
40
+ * function to call when the close button clicked
41
+ */
42
+ onClose?: () => void;
43
+ /**
44
+ * text for close button
45
+ */
46
+ onCloseButtonText?: string;
47
+ /**
48
+ * function to call when the submit button is clicked. returns a selection
49
+ */
50
+ onSubmit?: () => void;
51
+ /**
52
+ * text for the submit button
53
+ */
54
+ onSubmitButtonText?: string;
55
+ /**
56
+ * specifies if the component is open or not
57
+ */
58
+ open?: boolean;
59
+ /**
60
+ * text that displays when displaying filtered items
61
+ */
62
+ searchResultsLabel?: string;
63
+ /**
64
+ * header text
65
+ */
66
+ title?: string;
67
+ }
1
68
  /**
2
69
  * Used to add or select one or more items from larger lists or hierarchies.
3
70
  */
4
- export let SingleAddSelect: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
5
- import React from 'react';
71
+ export declare let SingleAddSelect: React.ForwardRefExoticComponent<SingleAddSelectProps & React.RefAttributes<HTMLDivElement>>;
72
+ export {};
@@ -14,7 +14,6 @@ import { prepareProps } from '../../global/js/utils/props-helper.js';
14
14
  import { AddSelect } from '../AddSelect/AddSelect.js';
15
15
 
16
16
  var componentName = 'SingleAddSelect';
17
-
18
17
  /**
19
18
  * Used to add or select one or more items from larger lists or hierarchies.
20
19
  */
@@ -30,6 +29,7 @@ SingleAddSelect.propTypes = {
30
29
  /**
31
30
  * optional class name
32
31
  */
32
+ /**@ts-ignore */
33
33
  className: PropTypes.string,
34
34
  /**
35
35
  * text description that appears under the title
@@ -47,6 +47,7 @@ SingleAddSelect.propTypes = {
47
47
  * object that contains the item data. for more information reference the
48
48
  * "Structuring items" section in the docs tab
49
49
  */
50
+ /**@ts-ignore */
50
51
  items: PropTypes.shape({
51
52
  entries: PropTypes.arrayOf(PropTypes.shape({
52
53
  children: PropTypes.object,