@carbon/ibm-products 2.33.0 → 2.35.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (262) hide show
  1. package/css/index-full-carbon.css +31990 -32061
  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 +38 -17
  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 +636 -24096
  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 +2342 -17830
  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/ActionSet/ActionSet.d.ts +38 -2
  18. package/es/components/ActionSet/ActionSet.js +3 -5
  19. package/es/components/CoachmarkFixed/CoachmarkFixed.js +1 -1
  20. package/es/components/ConditionBuilder/ConditionBuilder.d.ts +5 -0
  21. package/es/components/ConditionBuilder/ConditionBuilder.js +125 -0
  22. package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts +10 -0
  23. package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +92 -0
  24. package/es/components/ConditionBuilder/ConditionBuilderContext/DataTreeContext.d.ts +38 -0
  25. package/es/components/ConditionBuilder/ConditionBuilderContext/DataTreeContext.js +88 -0
  26. package/es/components/ConditionBuilder/assets/sampleInput.d.ts +58 -0
  27. package/es/components/ConditionBuilder/index.d.ts +1 -0
  28. package/es/components/CreateFullPage/CreateFullPage.js +3 -19
  29. package/es/components/CreateFullPage/CreateFullPageStep.js +22 -7
  30. package/es/components/CreateSidePanel/CreateSidePanel.d.ts +81 -2
  31. package/es/components/CreateSidePanel/CreateSidePanel.js +5 -2
  32. package/es/components/CreateTearsheetNarrow/CreateTearsheetNarrow.d.ts +82 -2
  33. package/es/components/DataSpreadsheet/DataSpreadsheet.js +5 -117
  34. package/es/components/DataSpreadsheet/DataSpreadsheetBody.js +12 -111
  35. package/es/components/DataSpreadsheet/utils/commonEventHandlers.d.ts +4 -0
  36. package/es/components/DataSpreadsheet/utils/commonEventHandlers.js +304 -0
  37. package/es/components/Datagrid/Datagrid/DatagridContent.js +2 -1
  38. package/es/components/Datagrid/Datagrid/DatagridEmptyBody.js +4 -1
  39. package/es/components/Datagrid/Datagrid/DatagridRefBody.js +3 -1
  40. package/es/components/Datagrid/Datagrid/DatagridSimpleBody.js +4 -1
  41. package/es/components/Datagrid/Datagrid/DatagridVirtualBody.js +6 -2
  42. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.d.ts +1 -1
  43. package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +4 -0
  44. package/es/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.d.ts +2 -1
  45. package/es/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.js +4 -3
  46. package/es/components/Datagrid/Datagrid/addons/stateReducer.js +2 -1
  47. package/es/components/Datagrid/useEditableCell.js +15 -0
  48. package/es/components/DelimitedList/DelimitedList.d.ts +27 -2
  49. package/es/components/DelimitedList/DelimitedList.js +0 -1
  50. package/es/components/EditInPlace/EditInPlace.d.ts +97 -5
  51. package/es/components/EditInPlace/EditInPlace.js +10 -6
  52. package/es/components/EditSidePanel/EditSidePanel.d.ts +92 -2
  53. package/es/components/EditSidePanel/EditSidePanel.js +8 -10
  54. package/es/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.d.ts +61 -2
  55. package/es/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +1 -3
  56. package/es/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.d.ts +61 -2
  57. package/es/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +1 -2
  58. package/es/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.d.ts +61 -2
  59. package/es/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +1 -3
  60. package/es/components/ExportModal/ExportModal.d.ts +110 -2
  61. package/es/components/ExportModal/ExportModal.js +10 -4
  62. package/es/components/FilterPanel/FilterPanelAccordion/FilterPanelAccordion.d.ts +5 -0
  63. package/es/components/FilterPanel/FilterPanelAccordion/FilterPanelAccordion.js +83 -0
  64. package/es/components/FilterPanel/FilterPanelAccordionItem/FilterPanelAccordionItem.d.ts +5 -0
  65. package/es/components/FilterPanel/FilterPanelAccordionItem/FilterPanelAccordionItem.js +94 -0
  66. package/es/components/FilterPanel/FilterPanelCheckbox/FilterPanelCheckbox.d.ts +5 -0
  67. package/es/components/FilterPanel/FilterPanelCheckbox/FilterPanelCheckbox.js +8 -10
  68. package/es/components/FilterPanel/FilterPanelCheckbox/index.d.ts +1 -0
  69. package/es/components/FilterPanel/FilterPanelCheckboxWithOverflow/FilterPanelCheckboxWithOverflow.d.ts +10 -0
  70. package/es/components/FilterPanel/FilterPanelCheckboxWithOverflow/FilterPanelCheckboxWithOverflow.js +157 -0
  71. package/es/components/FilterPanel/FilterPanelGroup/FilterPanelGroup.d.ts +5 -0
  72. package/es/components/FilterPanel/FilterPanelGroup/FilterPanelGroup.js +72 -0
  73. package/es/components/FilterPanel/FilterPanelLabel/FilterPanelLabel.js +2 -2
  74. package/es/components/FilterPanel/FilterPanelSearch/FilterPanelSearch.d.ts +5 -0
  75. package/es/components/FilterPanel/FilterPanelSearch/FilterPanelSearch.js +92 -0
  76. package/es/components/FilterPanel/index.d.ts +5 -0
  77. package/es/components/HTTPErrors/HTTPError403/HTTPError403.d.ts +40 -2
  78. package/es/components/HTTPErrors/HTTPError403/HTTPError403.js +1 -1
  79. package/es/components/HTTPErrors/HTTPError404/HTTPError404.d.ts +40 -2
  80. package/es/components/HTTPErrors/HTTPError404/HTTPError404.js +1 -1
  81. package/es/components/ImportModal/ImportModal.d.ts +136 -2
  82. package/es/components/ImportModal/ImportModal.js +3 -2
  83. package/es/components/InlineTip/InlineTip.d.ts +90 -2
  84. package/es/components/InlineTip/InlineTip.js +3 -2
  85. package/es/components/Nav/Nav.js +1 -1
  86. package/es/components/Nav/NavList.js +7 -7
  87. package/es/components/NotificationsPanel/NotificationsPanel.js +1 -1
  88. package/es/components/OptionsTile/OptionsTile.d.ts +77 -3
  89. package/es/components/OptionsTile/OptionsTile.js +9 -20
  90. package/es/components/PageHeader/PageHeader.js +3 -3
  91. package/es/components/PageHeader/PageHeaderUtils.d.ts +1 -1
  92. package/es/components/PageHeader/PageHeaderUtils.js +4 -3
  93. package/es/components/RemoveModal/RemoveModal.d.ts +81 -7
  94. package/es/components/RemoveModal/RemoveModal.js +1 -0
  95. package/es/components/ScrollGradient/ScrollGradient.d.ts +5 -0
  96. package/es/components/ScrollGradient/ScrollGradient.js +156 -0
  97. package/es/components/ScrollGradient/constants.d.ts +15 -0
  98. package/es/components/ScrollGradient/constants.js +121 -0
  99. package/es/components/ScrollGradient/index.d.ts +1 -0
  100. package/es/components/SidePanel/SidePanel.d.ts +144 -2
  101. package/es/components/SidePanel/SidePanel.js +100 -75
  102. package/es/components/StatusIcon/StatusIcon.d.ts +34 -2
  103. package/es/components/StatusIcon/StatusIcon.js +97 -95
  104. package/es/components/SteppedAnimatedMedia/SteppedAnimatedMedia.d.ts +23 -2
  105. package/es/components/SteppedAnimatedMedia/SteppedAnimatedMedia.js +6 -5
  106. package/es/components/TagOverflow/TagOverflow.d.ts +5 -0
  107. package/es/components/TagOverflow/TagOverflow.js +209 -0
  108. package/es/components/TagOverflow/constants.d.ts +14 -0
  109. package/es/components/TagOverflow/constants.js +30 -0
  110. package/es/components/TagOverflow/index.d.ts +1 -0
  111. package/es/components/Tearsheet/TearsheetNarrow.d.ts +105 -6
  112. package/es/components/Tearsheet/TearsheetNarrow.js +6 -1
  113. package/es/components/Toolbar/Toolbar.d.ts +23 -5
  114. package/es/components/Toolbar/Toolbar.js +30 -26
  115. package/es/components/TruncatedList/TruncatedList.js +5 -3
  116. package/es/components/UserAvatar/UserAvatar.js +7 -4
  117. package/es/components/index.d.ts +5 -2
  118. package/es/global/js/package-settings.d.ts +8 -0
  119. package/es/global/js/package-settings.js +8 -0
  120. package/es/index.js +9 -0
  121. package/es/settings.d.ts +8 -0
  122. package/lib/components/ActionSet/ActionSet.d.ts +38 -2
  123. package/lib/components/ActionSet/ActionSet.js +3 -5
  124. package/lib/components/CoachmarkFixed/CoachmarkFixed.js +1 -1
  125. package/lib/components/ConditionBuilder/ConditionBuilder.d.ts +5 -0
  126. package/lib/components/ConditionBuilder/ConditionBuilder.js +132 -0
  127. package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts +10 -0
  128. package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +100 -0
  129. package/lib/components/ConditionBuilder/ConditionBuilderContext/DataTreeContext.d.ts +38 -0
  130. package/lib/components/ConditionBuilder/ConditionBuilderContext/DataTreeContext.js +98 -0
  131. package/lib/components/ConditionBuilder/assets/sampleInput.d.ts +58 -0
  132. package/lib/components/ConditionBuilder/index.d.ts +1 -0
  133. package/lib/components/CreateFullPage/CreateFullPage.js +2 -18
  134. package/lib/components/CreateFullPage/CreateFullPageStep.js +20 -5
  135. package/lib/components/CreateSidePanel/CreateSidePanel.d.ts +81 -2
  136. package/lib/components/CreateSidePanel/CreateSidePanel.js +5 -2
  137. package/lib/components/CreateTearsheetNarrow/CreateTearsheetNarrow.d.ts +82 -2
  138. package/lib/components/DataSpreadsheet/DataSpreadsheet.js +5 -117
  139. package/lib/components/DataSpreadsheet/DataSpreadsheetBody.js +12 -111
  140. package/lib/components/DataSpreadsheet/utils/commonEventHandlers.d.ts +4 -0
  141. package/lib/components/DataSpreadsheet/utils/commonEventHandlers.js +311 -0
  142. package/lib/components/Datagrid/Datagrid/DatagridContent.js +2 -1
  143. package/lib/components/Datagrid/Datagrid/DatagridEmptyBody.js +4 -1
  144. package/lib/components/Datagrid/Datagrid/DatagridRefBody.js +3 -1
  145. package/lib/components/Datagrid/Datagrid/DatagridSimpleBody.js +4 -1
  146. package/lib/components/Datagrid/Datagrid/DatagridVirtualBody.js +5 -1
  147. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.d.ts +1 -1
  148. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +4 -0
  149. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.d.ts +2 -1
  150. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.js +4 -3
  151. package/lib/components/Datagrid/Datagrid/addons/stateReducer.js +2 -1
  152. package/lib/components/Datagrid/useEditableCell.js +19 -0
  153. package/lib/components/DelimitedList/DelimitedList.d.ts +27 -2
  154. package/lib/components/DelimitedList/DelimitedList.js +0 -1
  155. package/lib/components/EditInPlace/EditInPlace.d.ts +97 -5
  156. package/lib/components/EditInPlace/EditInPlace.js +10 -6
  157. package/lib/components/EditSidePanel/EditSidePanel.d.ts +92 -2
  158. package/lib/components/EditSidePanel/EditSidePanel.js +8 -10
  159. package/lib/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.d.ts +61 -2
  160. package/lib/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +1 -3
  161. package/lib/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.d.ts +61 -2
  162. package/lib/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +1 -2
  163. package/lib/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.d.ts +61 -2
  164. package/lib/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +1 -3
  165. package/lib/components/ExportModal/ExportModal.d.ts +110 -2
  166. package/lib/components/ExportModal/ExportModal.js +10 -4
  167. package/lib/components/FilterPanel/FilterPanelAccordion/FilterPanelAccordion.d.ts +5 -0
  168. package/lib/components/FilterPanel/FilterPanelAccordion/FilterPanelAccordion.js +90 -0
  169. package/lib/components/FilterPanel/FilterPanelAccordionItem/FilterPanelAccordionItem.d.ts +5 -0
  170. package/lib/components/FilterPanel/FilterPanelAccordionItem/FilterPanelAccordionItem.js +101 -0
  171. package/lib/components/FilterPanel/FilterPanelCheckbox/FilterPanelCheckbox.d.ts +5 -0
  172. package/lib/components/FilterPanel/FilterPanelCheckbox/FilterPanelCheckbox.js +8 -10
  173. package/lib/components/FilterPanel/FilterPanelCheckbox/index.d.ts +1 -0
  174. package/lib/components/FilterPanel/FilterPanelCheckboxWithOverflow/FilterPanelCheckboxWithOverflow.d.ts +10 -0
  175. package/lib/components/FilterPanel/FilterPanelCheckboxWithOverflow/FilterPanelCheckboxWithOverflow.js +164 -0
  176. package/lib/components/FilterPanel/FilterPanelGroup/FilterPanelGroup.d.ts +5 -0
  177. package/lib/components/FilterPanel/FilterPanelGroup/FilterPanelGroup.js +79 -0
  178. package/lib/components/FilterPanel/FilterPanelLabel/FilterPanelLabel.js +2 -2
  179. package/lib/components/FilterPanel/FilterPanelSearch/FilterPanelSearch.d.ts +5 -0
  180. package/lib/components/FilterPanel/FilterPanelSearch/FilterPanelSearch.js +99 -0
  181. package/lib/components/FilterPanel/index.d.ts +5 -0
  182. package/lib/components/HTTPErrors/HTTPError403/HTTPError403.d.ts +40 -2
  183. package/lib/components/HTTPErrors/HTTPError403/HTTPError403.js +1 -1
  184. package/lib/components/HTTPErrors/HTTPError404/HTTPError404.d.ts +40 -2
  185. package/lib/components/HTTPErrors/HTTPError404/HTTPError404.js +1 -1
  186. package/lib/components/ImportModal/ImportModal.d.ts +136 -2
  187. package/lib/components/ImportModal/ImportModal.js +3 -2
  188. package/lib/components/InlineTip/InlineTip.d.ts +90 -2
  189. package/lib/components/InlineTip/InlineTip.js +3 -2
  190. package/lib/components/Nav/Nav.js +1 -1
  191. package/lib/components/Nav/NavList.js +7 -7
  192. package/lib/components/NotificationsPanel/NotificationsPanel.js +1 -1
  193. package/lib/components/OptionsTile/OptionsTile.d.ts +77 -3
  194. package/lib/components/OptionsTile/OptionsTile.js +9 -20
  195. package/lib/components/PageHeader/PageHeader.js +3 -3
  196. package/lib/components/PageHeader/PageHeaderUtils.d.ts +1 -1
  197. package/lib/components/PageHeader/PageHeaderUtils.js +4 -3
  198. package/lib/components/RemoveModal/RemoveModal.d.ts +81 -7
  199. package/lib/components/RemoveModal/RemoveModal.js +1 -0
  200. package/lib/components/ScrollGradient/ScrollGradient.d.ts +5 -0
  201. package/lib/components/ScrollGradient/ScrollGradient.js +163 -0
  202. package/lib/components/ScrollGradient/constants.d.ts +15 -0
  203. package/lib/components/ScrollGradient/constants.js +128 -0
  204. package/lib/components/ScrollGradient/index.d.ts +1 -0
  205. package/lib/components/SidePanel/SidePanel.d.ts +144 -2
  206. package/lib/components/SidePanel/SidePanel.js +100 -75
  207. package/lib/components/StatusIcon/StatusIcon.d.ts +34 -2
  208. package/lib/components/StatusIcon/StatusIcon.js +97 -95
  209. package/lib/components/SteppedAnimatedMedia/SteppedAnimatedMedia.d.ts +23 -2
  210. package/lib/components/SteppedAnimatedMedia/SteppedAnimatedMedia.js +6 -5
  211. package/lib/components/TagOverflow/TagOverflow.d.ts +5 -0
  212. package/lib/components/TagOverflow/TagOverflow.js +216 -0
  213. package/lib/components/TagOverflow/constants.d.ts +14 -0
  214. package/lib/components/TagOverflow/constants.js +34 -0
  215. package/lib/components/TagOverflow/index.d.ts +1 -0
  216. package/lib/components/Tearsheet/TearsheetNarrow.d.ts +105 -6
  217. package/lib/components/Tearsheet/TearsheetNarrow.js +6 -1
  218. package/lib/components/Toolbar/Toolbar.d.ts +23 -5
  219. package/lib/components/Toolbar/Toolbar.js +30 -26
  220. package/lib/components/TruncatedList/TruncatedList.js +5 -3
  221. package/lib/components/UserAvatar/UserAvatar.js +7 -4
  222. package/lib/components/index.d.ts +5 -2
  223. package/lib/global/js/package-settings.d.ts +8 -0
  224. package/lib/global/js/package-settings.js +8 -0
  225. package/lib/index.js +42 -0
  226. package/lib/settings.d.ts +8 -0
  227. package/package.json +3 -3
  228. package/scss/components/Coachmark/_coachmark-dragbar.scss +0 -1
  229. package/scss/components/Coachmark/_coachmark-tagline.scss +2 -2
  230. package/scss/components/ConditionBuilder/_carbon-imports.scss +9 -0
  231. package/scss/components/ConditionBuilder/_condition-builder.scss +25 -0
  232. package/scss/components/ConditionBuilder/_index-with-carbon.scss +9 -0
  233. package/scss/components/ConditionBuilder/_index.scss +8 -0
  234. package/scss/components/CreateFullPage/_create-full-page.scss +10 -10
  235. package/scss/components/Datagrid/styles/_useNestedRows.scss +5 -1
  236. package/scss/components/FilterPanel/_carbon-imports.scss +5 -0
  237. package/scss/components/FilterPanel/_filter-panel-accordion-item.scss +54 -0
  238. package/scss/components/FilterPanel/_filter-panel-accordion.scss +6 -0
  239. package/scss/components/FilterPanel/_filter-panel-checkbox-with-overflow.scss +60 -0
  240. package/scss/components/FilterPanel/_filter-panel-checkbox.scss +24 -3
  241. package/scss/components/FilterPanel/_filter-panel-group.scss +39 -0
  242. package/scss/components/FilterPanel/_filter-panel-label.scss +0 -8
  243. package/scss/components/FilterPanel/_filter-panel-search.scss +38 -0
  244. package/scss/components/FilterPanel/_filter-panel.scss +2 -0
  245. package/scss/components/FilterPanel/_index-with-carbon.scss +5 -0
  246. package/scss/components/FilterPanel/_index.scss +5 -0
  247. package/scss/components/Guidebanner/_guidebanner.scss +1 -1
  248. package/scss/components/InlineTip/_inline-tip.scss +1 -1
  249. package/scss/components/ProductiveCard/_productive-card.scss +13 -0
  250. package/scss/components/ScrollGradient/_carbon-imports.scss +9 -0
  251. package/scss/components/ScrollGradient/_index-with-carbon.scss +9 -0
  252. package/scss/components/ScrollGradient/_index.scss +8 -0
  253. package/scss/components/ScrollGradient/_scroll-gradient.scss +102 -0
  254. package/scss/components/SidePanel/_side-panel.scss +9 -9
  255. package/scss/components/TagOverflow/_carbon-imports.scss +9 -0
  256. package/scss/components/TagOverflow/_index-with-carbon.scss +9 -0
  257. package/scss/components/TagOverflow/_index.scss +8 -0
  258. package/scss/components/TagOverflow/_tag-overflow.scss +55 -0
  259. package/scss/components/Tearsheet/_tearsheet.scss +10 -0
  260. package/scss/components/UserAvatar/_user-avatar.scss +38 -4
  261. package/scss/components/_index-with-carbon.scss +3 -0
  262. package/scss/components/_index.scss +3 -0
@@ -19,7 +19,6 @@ var _excluded = ["className", "description", "errorCodeLabel", "links", "title"]
19
19
  // The block part of our conventional BEM class names (blockClass__E--M).
20
20
  var blockClass = "".concat(pkg.prefix, "--http-errors");
21
21
  var componentName = 'HTTPError403';
22
-
23
22
  /**
24
23
  * HTTP errors are used in an attempt to access something that isn’t available or
25
24
  the user doesn’t have permission for. This HTTPError component is generic so you
@@ -71,6 +70,7 @@ HTTPError403.propTypes = {
71
70
  /**
72
71
  * Links that will display for extra context when receiving particular errors
73
72
  */
73
+ /**@ts-ignore*/
74
74
  links: propTypesExports.arrayOf(propTypesExports.shape({
75
75
  /**
76
76
  * The text to display for the link
@@ -1,7 +1,45 @@
1
+ /**
2
+ * Copyright IBM Corp. 2021, 2021
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
+ import React, { PropsWithChildren } from 'react';
8
+ interface HTTPError404Props extends PropsWithChildren {
9
+ /**
10
+ * Provide an optional class to be applied to the containing node
11
+ */
12
+ className?: string;
13
+ /**
14
+ * String that will provide the description for the HTTP error code
15
+ */
16
+ description: string;
17
+ /**
18
+ * String that will describe the error that occurred
19
+ */
20
+ errorCodeLabel: string;
21
+ /**
22
+ * Links that will display for extra context when receiving particular errors
23
+ */
24
+ links: Array<{
25
+ /**
26
+ * The text to display for the link
27
+ */
28
+ text: string;
29
+ /**
30
+ * The link's destination
31
+ */
32
+ href: string;
33
+ }>;
34
+ /**
35
+ * This will be for the main title of the HTTP error component
36
+ */
37
+ title: string;
38
+ }
1
39
  /**
2
40
  * HTTP errors are used in an attempt to access something that isn’t available or
3
41
  the user doesn’t have permission for. This HTTPError component is generic so you
4
42
  can use it when you receive an error code that isn't provided.
5
43
  */
6
- export let HTTPError404: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
7
- import React from 'react';
44
+ export declare let HTTPError404: React.ForwardRefExoticComponent<HTTPError404Props & React.RefAttributes<HTMLDivElement>>;
45
+ export {};
@@ -19,7 +19,6 @@ var _excluded = ["className", "description", "errorCodeLabel", "links", "title"]
19
19
  // The block part of our conventional BEM class names (blockClass__E--M).
20
20
  var blockClass = "".concat(pkg.prefix, "--http-errors");
21
21
  var componentName = 'HTTPError404';
22
-
23
22
  /**
24
23
  * HTTP errors are used in an attempt to access something that isn’t available or
25
24
  the user doesn’t have permission for. This HTTPError component is generic so you
@@ -71,6 +70,7 @@ HTTPError404.propTypes = {
71
70
  /**
72
71
  * Links that will display for extra context when receiving particular errors
73
72
  */
73
+ /**@ts-ignore */
74
74
  links: propTypesExports.arrayOf(propTypesExports.shape({
75
75
  /**
76
76
  * The text to display for the link
@@ -1,2 +1,136 @@
1
- export let ImportModal: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
2
- import React from 'react';
1
+ /**
2
+ * Copyright IBM Corp. 2021, 2024
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ import React, { ReactNode } from 'react';
8
+ type FileType = {
9
+ fetchError?: undefined | boolean;
10
+ fileData?: File;
11
+ fileSize?: number;
12
+ iconDescription?: string;
13
+ invalidFileType?: boolean;
14
+ name: string;
15
+ status?: string;
16
+ uuid?: string;
17
+ invalid?: boolean;
18
+ errorBody?: string;
19
+ errorSubject?: string;
20
+ };
21
+ interface ImportModalProps {
22
+ /**
23
+ * Specifies the file types that are valid for importing
24
+ */
25
+ accept?: string[];
26
+ /**
27
+ * Optional class name
28
+ */
29
+ className?: string;
30
+ /**
31
+ * The default message shown for an import error
32
+ */
33
+ defaultErrorBody: string;
34
+ /**
35
+ * The default header that is displayed to show an error message
36
+ */
37
+ defaultErrorHeader: string;
38
+ /**
39
+ * Content that is displayed inside the modal
40
+ */
41
+ description?: string;
42
+ /**
43
+ * Optional error body to display specifically for a fetch error
44
+ */
45
+ fetchErrorBody?: string;
46
+ /**
47
+ * Optional error header to display specifically for a fetch error
48
+ */
49
+ fetchErrorHeader?: string;
50
+ /**
51
+ * Header for the drag and drop box
52
+ */
53
+ fileDropHeader?: string;
54
+ /**
55
+ * Label for the drag and drop box
56
+ */
57
+ fileDropLabel?: string;
58
+ /**
59
+ * Label that appears when a file is uploaded to show number of files (1 / 1)
60
+ */
61
+ fileUploadLabel?: string;
62
+ /**
63
+ * Button icon for import by url button
64
+ */
65
+ inputButtonIcon?: boolean;
66
+ /**
67
+ * Button text for import by url button
68
+ */
69
+ inputButtonText: string;
70
+ /**
71
+ * ID for text input
72
+ */
73
+ inputId?: string;
74
+ /**
75
+ * Header to display above import by url
76
+ */
77
+ inputLabel?: string;
78
+ /**
79
+ * Placeholder for text input
80
+ */
81
+ inputPlaceholder?: string;
82
+ /**
83
+ * Optional error message to display specifically for a invalid file type error
84
+ */
85
+ invalidFileTypeErrorBody?: string;
86
+ /**
87
+ * Optional error header to display specifically for a invalid file type error
88
+ */
89
+ invalidFileTypeErrorHeader?: string;
90
+ /**
91
+ * Description for delete file icon
92
+ */
93
+ invalidIconDescription?: string;
94
+ /**
95
+ * File size limit in bytes
96
+ */
97
+ maxFileSize?: number;
98
+ /**
99
+ * Optional error message to display specifically for a max file size error
100
+ */
101
+ maxFileSizeErrorBody?: string;
102
+ /**
103
+ * Optional error header to display specifically for a max file size error
104
+ */
105
+ maxFileSizeErrorHeader?: string;
106
+ /**
107
+ * Specify a handler for closing modal
108
+ */
109
+ onClose?(): void;
110
+ /**
111
+ * Specify a handler for "submitting" modal. Access the imported file via `file => {}`
112
+ */
113
+ onRequestSubmit(files: FileType[]): void;
114
+ /**
115
+ * Specify whether the Modal is currently open
116
+ */
117
+ open: boolean;
118
+ /**
119
+ * The DOM node the tearsheet should be rendered within. Defaults to document.body.
120
+ */
121
+ portalTarget?: ReactNode;
122
+ /**
123
+ * Specify the text for the primary button
124
+ */
125
+ primaryButtonText: string;
126
+ /**
127
+ * Specify the text for the secondary button
128
+ */
129
+ secondaryButtonText: string;
130
+ /**
131
+ * The text displayed at the top of the modal
132
+ */
133
+ title: string;
134
+ }
135
+ export declare let ImportModal: React.FC<ImportModalProps>;
136
+ export {};
@@ -76,6 +76,7 @@ var ImportModal = /*#__PURE__*/forwardRef(function (_ref, ref) {
76
76
  };
77
77
  var updateFiles = function updateFiles(newFiles) {
78
78
  var updatedFiles = newFiles.map(function (file) {
79
+ var _newFile$fileSize;
79
80
  var newFile = {
80
81
  uuid: file.uuid || uuidv4(),
81
82
  status: 'edit',
@@ -94,7 +95,7 @@ var ImportModal = /*#__PURE__*/forwardRef(function (_ref, ref) {
94
95
  newFile.errorBody = invalidFileTypeErrorBody || defaultErrorBody;
95
96
  newFile.errorSubject = invalidFileTypeErrorHeader || defaultErrorHeader;
96
97
  newFile.invalid = true;
97
- } else if (maxFileSize && newFile.fileSize > maxFileSize) {
98
+ } else if (maxFileSize && ((_newFile$fileSize = newFile === null || newFile === void 0 ? void 0 : newFile.fileSize) !== null && _newFile$fileSize !== void 0 ? _newFile$fileSize : 0) > maxFileSize) {
98
99
  newFile.errorBody = maxFileSizeErrorBody || defaultErrorBody;
99
100
  newFile.errorSubject = maxFileSizeErrorHeader || defaultErrorHeader;
100
101
  newFile.invalid = true;
@@ -127,7 +128,7 @@ var ImportModal = /*#__PURE__*/forwardRef(function (_ref, ref) {
127
128
  _context.next = 10;
128
129
  break;
129
130
  }
130
- throw new Error(response.status);
131
+ throw new Error("".concat(response.status));
131
132
  case 10:
132
133
  _context.next = 12;
133
134
  return response.blob();
@@ -1,7 +1,95 @@
1
+ /**
2
+ * Copyright IBM Corp. 2023, 2023
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
+ import React, { ReactNode } from 'react';
8
+ type MediaType = {
9
+ render?: () => ReactNode;
10
+ filePaths?: string[];
11
+ };
12
+ interface InlineTipProps {
13
+ /**
14
+ * Optional "call to action" ghost button or link that can appear
15
+ * directly below the content. This component comes with pre-styled
16
+ * elements available to use: `InlineTipLink` and `InlineTipButton`.
17
+ */
18
+ action?: ReactNode;
19
+ /**
20
+ * Provide the contents of the InlineTip.
21
+ */
22
+ children: ReactNode;
23
+ /**
24
+ * Provide an optional class to be applied to the containing node.
25
+ */
26
+ className?: string;
27
+ /**
28
+ * Tooltip text and aria label for the Close button icon.
29
+ */
30
+ closeIconDescription?: string;
31
+ /**
32
+ * The label for the collapse button.
33
+ * This button is not visible if `media` is specified.
34
+ */
35
+ collapseButtonLabel?: string;
36
+ /**
37
+ * If set to `true`, it will truncate the body text to
38
+ * one line and expose an expand/collapse button toggle.
39
+ *
40
+ * This feature is disabled if `media` is specified.
41
+ */
42
+ collapsible?: boolean;
43
+ /**
44
+ * The label for the expand button.
45
+ * This button is not visible if `media` is specified.
46
+ */
47
+ expandButtonLabel?: string;
48
+ /**
49
+ * The object describing an image in one of two shapes.
50
+ * - If a single media element is required, use `{render}`.
51
+ * - If a stepped animation is required, use `{filePaths}`.
52
+ *
53
+ * Enabling `media` disables the `collapsible` feature.
54
+ */
55
+ media: MediaType;
56
+ /**
57
+ * Set to `true` to arrange the information in a format
58
+ * that is easier to read in a limited space.
59
+ */
60
+ narrow?: boolean;
61
+ /**
62
+ * Function to call when the tertiary button is clicked.
63
+ */
64
+ onClick?: () => void;
65
+ /**
66
+ * Function to call when the InlineTip is closed via the "X" button.
67
+ */
68
+ onClose?: () => void;
69
+ /**
70
+ * Defining the label will show a the tertiary button with the crossroads icon.
71
+ * You will still need to define the `onClose` method to trigger a callback.
72
+ */
73
+ tertiaryButtonLabel?: string;
74
+ /**
75
+ * The title of the InlineTip.
76
+ */
77
+ title: string;
78
+ /**
79
+ * If true, insert 1 rem of "space" on the left of the component.
80
+ * This will allow the component's content to line up with other
81
+ * content on the page under special circumstances.
82
+ *
83
+ * This will only be applied when `narrow` is false.
84
+ */
85
+ withLeftGutter?: boolean;
86
+ }
1
87
  /**
2
88
  * Inline tips are messages embedded within other components that
3
89
  * provide an ambient way to deliver learning content without
4
90
  * distracting the user from their flow.
5
91
  */
6
- export let InlineTip: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
7
- import React from 'react';
92
+ export declare let InlineTip: React.ForwardRefExoticComponent<InlineTipProps & {
93
+ children?: React.ReactNode;
94
+ } & React.RefAttributes<HTMLDivElement>>;
95
+ export {};
@@ -35,9 +35,9 @@ var defaults = {
35
35
  narrow: false,
36
36
  withLeftGutter: false,
37
37
  onClick: function onClick() {},
38
- onClose: function onClose() {}
38
+ onClose: function onClose() {},
39
+ title: 'Use case-specific heading'
39
40
  };
40
-
41
41
  /**
42
42
  * Inline tips are messages embedded within other components that
43
43
  * provide an ambient way to deliver learning content without
@@ -187,6 +187,7 @@ InlineTip.propTypes = {
187
187
  *
188
188
  * Enabling `media` disables the `collapsible` feature.
189
189
  */
190
+ /**@ts-ignore*/
190
191
  media: PropTypes.oneOfType([PropTypes.shape({
191
192
  render: PropTypes.func
192
193
  }), PropTypes.shape({
@@ -102,7 +102,7 @@ var Nav = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
102
102
  */
103
103
  var handleListClick = function handleListClick(id) {
104
104
  Object.keys(navigationLists.current).forEach(function (key) {
105
- if (key !== id && !navigationLists.current[key].isExpandedOnPageload) {
105
+ if (key !== id && !navigationLists.current[key].isExpandedOnPageLoad) {
106
106
  navigationLists.current[key].close();
107
107
  }
108
108
  });
@@ -22,7 +22,7 @@ var defaults = {
22
22
  className: '',
23
23
  children: null,
24
24
  id: '',
25
- isExpandedOnPageload: false,
25
+ isExpandedOnPageLoad: false,
26
26
  onItemClick: function onItemClick() {},
27
27
  onListClick: function onListClick() {},
28
28
  tabIndex: 0,
@@ -41,8 +41,8 @@ var NavList = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
41
41
  icon = _ref$icon === void 0 ? defaults.icon : _ref$icon,
42
42
  _ref$id = _ref.id,
43
43
  id = _ref$id === void 0 ? defaults.id : _ref$id,
44
- _ref$isExpandedOnPage = _ref.isExpandedOnPageload,
45
- isExpandedOnPageload = _ref$isExpandedOnPage === void 0 ? defaults.isExpandedOnPageload : _ref$isExpandedOnPage,
44
+ _ref$isExpandedOnPage = _ref.isExpandedOnPageLoad,
45
+ isExpandedOnPageLoad = _ref$isExpandedOnPage === void 0 ? defaults.isExpandedOnPageLoad : _ref$isExpandedOnPage,
46
46
  _ref$navigationItemTi = _ref.navigationItemTitle,
47
47
  navigationItemTitle = _ref$navigationItemTi === void 0 ? defaults.navigationItemTitle : _ref$navigationItemTi,
48
48
  _ref$onItemClick = _ref.onItemClick,
@@ -53,7 +53,7 @@ var NavList = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
53
53
  tabIndex = _ref$tabIndex === void 0 ? defaults.tabIndex : _ref$tabIndex,
54
54
  _ref$title = _ref.title,
55
55
  title = _ref$title === void 0 ? defaults.title : _ref$title;
56
- var _useState = useState(isExpandedOnPageload),
56
+ var _useState = useState(isExpandedOnPageLoad),
57
57
  _useState2 = _slicedToArray(_useState, 2),
58
58
  open = _useState2[0],
59
59
  setOpen = _useState2[1];
@@ -65,7 +65,7 @@ var NavList = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
65
65
  var childProps = _ref3.props;
66
66
  return childProps.href;
67
67
  });
68
- setOpen(hrefs.includes(activeHref) || isExpandedOnPageload);
68
+ setOpen(hrefs.includes(activeHref) || isExpandedOnPageLoad);
69
69
  // eslint-disable-next-line react-hooks/exhaustive-deps
70
70
  }, []);
71
71
 
@@ -99,7 +99,7 @@ var NavList = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
99
99
  useImperativeHandle(ref, function () {
100
100
  return {
101
101
  close: close,
102
- isExpandedOnPageload: isExpandedOnPageload
102
+ isExpandedOnPageLoad: isExpandedOnPageLoad
103
103
  };
104
104
  });
105
105
  var newChildren = React__default.Children.map(children, function (child, index) {
@@ -150,7 +150,7 @@ NavList.propTypes = {
150
150
  /** @type {string} ID of a list. */
151
151
  id: propTypesExports.string,
152
152
  /** @type {boolean} State of a list. */
153
- isExpandedOnPageload: propTypesExports.bool,
153
+ isExpandedOnPageLoad: propTypesExports.bool,
154
154
  /** @type {boolean} Title of nav. */
155
155
  navigationItemTitle: propTypesExports.string,
156
156
  /** @type {Function} Click handler for an item. */
@@ -317,7 +317,7 @@ var NotificationsPanel = /*#__PURE__*/React__default.forwardRef(function (_ref,
317
317
  id: blockClass,
318
318
  className: cx(blockClass, className, "".concat(blockClass, "__container")),
319
319
  style: {
320
- animation: !reducedMotion.matches ? "".concat(open ? 'fade-in 250ms' : 'fade-out 250ms') : null
320
+ animation: !reducedMotion.matches ? "".concat(open ? 'fade-in 250ms' : 'fade-out forwards 250ms') : null
321
321
  },
322
322
  onAnimationEnd: onAnimationEnd,
323
323
  ref: ref || notificationPanelRef
@@ -1,5 +1,79 @@
1
1
  /**
2
- * TODO: A description of the component.
2
+ * Copyright IBM Corp. 2021, 2024
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
3
6
  */
4
- export let OptionsTile: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
5
- import React from 'react';
7
+ import React, { ReactNode } from 'react';
8
+ interface OptionsTileProps {
9
+ /**
10
+ * Provide content to render as expandable OptionsTile. If no children
11
+ * are present, the OptionsTile will render as its variant.
12
+ */
13
+ children?: ReactNode;
14
+ /**
15
+ * Provide an optional class to be applied to the containing node.
16
+ */
17
+ className?: string;
18
+ /**
19
+ * Whether the toggle is enabled or disabled. If nothing is passed,
20
+ * no toggle will be rendered.
21
+ */
22
+ enabled?: boolean;
23
+ /**
24
+ * Whether the OptionsTile is in invalid validation state.
25
+ */
26
+ invalid?: boolean;
27
+ /**
28
+ * Provide a text explaining why the OptionsTile is in invalid state.
29
+ */
30
+ invalidText?: string;
31
+ /**
32
+ * Whether the OptionsTile is in locked validation state.
33
+ */
34
+ locked?: boolean;
35
+ /**
36
+ * Provide a text explaining why the OptionsTile is in locked state.
37
+ */
38
+ lockedText?: string;
39
+ /**
40
+ * Provide a function which will be called each time the user
41
+ * toggles the open state of the OptionsTile.
42
+ */
43
+ onChange?: (value: boolean) => void;
44
+ /**
45
+ * Provide a function which will be called each time the user
46
+ * interacts with the toggle.
47
+ */
48
+ onToggle: (value: boolean) => void;
49
+ /**
50
+ * Whether the OptionsTile is in open state.
51
+ */
52
+ open?: boolean;
53
+ /**
54
+ * Define the size of the OptionsTile.
55
+ */
56
+ size: 'lg' | 'xl';
57
+ /**
58
+ * Optionally provide a text summarizing the current state of the content.
59
+ */
60
+ summary?: string;
61
+ /**
62
+ * Provide the title for this OptionsTile.
63
+ */
64
+ title: string;
65
+ /**
66
+ * Optionally provide an id which should be used for the title.
67
+ */
68
+ titleId?: string;
69
+ /**
70
+ * Whether the OptionsTile is in warning validation state.
71
+ */
72
+ warn?: boolean;
73
+ /**
74
+ * Provide a text explaining why the OptionsTile is in warning state.
75
+ */
76
+ warnText?: string;
77
+ }
78
+ export declare let OptionsTile: React.ForwardRefExoticComponent<OptionsTileProps & React.RefAttributes<HTMLDivElement>>;
79
+ export {};
@@ -19,22 +19,12 @@ import { useControllableState } from '../../global/js/hooks/useControllableState
19
19
 
20
20
  var _Locked;
21
21
  var _excluded = ["children", "className", "enabled", "invalid", "invalidText", "locked", "lockedText", "onChange", "onToggle", "open", "size", "summary", "title", "titleId", "warn", "warnText"];
22
-
23
- // The block part of our conventional BEM class names (blockClass__E--M).
24
22
  var blockClass = "".concat(pkg.prefix, "--options-tile");
25
23
  var componentName = 'OptionsTile';
26
-
27
- // NOTE: the component SCSS is not imported here: it is rolled up separately.
28
-
29
24
  // Default values for props
30
25
  var defaults = {
31
- onChange: function onChange() {},
32
- size: 'xl'
26
+ size: 'lg'
33
27
  };
34
-
35
- /**
36
- * TODO: A description of the component.
37
- */
38
28
  var OptionsTile = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
39
29
  var children = _ref.children,
40
30
  className = _ref.className,
@@ -43,8 +33,7 @@ var OptionsTile = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
43
33
  invalidText = _ref.invalidText,
44
34
  locked = _ref.locked,
45
35
  lockedText = _ref.lockedText,
46
- _ref$onChange = _ref.onChange,
47
- _onChange = _ref$onChange === void 0 ? defaults.onChange : _ref$onChange,
36
+ _onChange = _ref.onChange,
48
37
  onToggle = _ref.onToggle,
49
38
  open = _ref.open,
50
39
  _ref$size = _ref.size,
@@ -64,11 +53,12 @@ var OptionsTile = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
64
53
  closing = _useState4[0],
65
54
  setClosing = _useState4[1];
66
55
  var _useControllableState = useControllableState({
67
- value: open,
68
56
  defaultValue: open || null,
57
+ name: 'OptionsTile',
69
58
  onChange: function onChange(value) {
70
- return _onChange(value);
71
- }
59
+ return _onChange === null || _onChange === void 0 ? void 0 : _onChange(value);
60
+ },
61
+ value: open
72
62
  }),
73
63
  _useControllableState2 = _slicedToArray(_useControllableState, 2),
74
64
  isOpen = _useControllableState2[0],
@@ -200,10 +190,7 @@ var OptionsTile = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
200
190
  }, text)));
201
191
  }
202
192
  return /*#__PURE__*/React__default.createElement("div", _extends({}, rest, {
203
- className: cx(blockClass,
204
- // Apply the block class to the main HTML element
205
- className, // Apply any supplied class names to the main HTML element.
206
- "".concat(blockClass, "--").concat(size), _defineProperty({}, "".concat(blockClass, "--closing"), closing)),
193
+ className: cx(blockClass, className, "".concat(blockClass, "--").concat(size), _defineProperty({}, "".concat(blockClass, "--closing"), closing)),
207
194
  ref: ref
208
195
  }, getDevtoolsProps(componentName)), enabled !== undefined && /*#__PURE__*/React__default.createElement("div", {
209
196
  className: "".concat(blockClass, "__toggle-container")
@@ -294,6 +281,7 @@ OptionsTile.propTypes = {
294
281
  * Provide a function which will be called each time the user
295
282
  * interacts with the toggle.
296
283
  */
284
+ /**@ts-ignore*/
297
285
  onToggle: PropTypes.func,
298
286
  /**
299
287
  * Whether the OptionsTile is in open state.
@@ -302,6 +290,7 @@ OptionsTile.propTypes = {
302
290
  /**
303
291
  * Define the size of the OptionsTile.
304
292
  */
293
+ /**@ts-ignore*/
305
294
  size: PropTypes.oneOf(['lg', 'xl']),
306
295
  /**
307
296
  * Optionally provide a text summarizing the current state of the content.
@@ -186,7 +186,7 @@ var PageHeader = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
186
186
  checkUpdateVerticalSpace();
187
187
  };
188
188
  var handleCollapseToggle = function handleCollapseToggle() {
189
- utilSetCollapsed(!fullyCollapsed, metrics.headerOffset, metrics.headerTopValue);
189
+ utilSetCollapsed(!fullyCollapsed, headerRef, metrics.headerOffset, metrics.headerTopValue);
190
190
  };
191
191
 
192
192
  // use effects
@@ -305,9 +305,9 @@ var PageHeader = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
305
305
  };
306
306
  useEffect(function () {
307
307
  if (collapseHeader === true) {
308
- utilSetCollapsed(collapseHeader, metrics.headerOffset, metrics.headerTopValue);
308
+ utilSetCollapsed(collapseHeader, headerRef, metrics.headerOffset, metrics.headerTopValue);
309
309
  }
310
- }, [collapseHeader, metrics.headerOffset, metrics.headerTopValue]);
310
+ }, [collapseHeader, metrics.headerOffset, metrics.headerTopValue, headerRef]);
311
311
  useResizeObserver(sizingContainerRef, handleResizeActionBarColumn);
312
312
  useResizeObserver(headerRef, handleResize);
313
313
 
@@ -1,6 +1,6 @@
1
1
  export const blockClass: string;
2
2
  export function utilCheckUpdateVerticalSpace(headerRef: {}, offsetTopMeasuringRef: {}, navigation: {}, enableBreadcrumbScroll: boolean, hasActionBar: boolean, widthIsNarrow: boolean, setMetrics: () => any): void;
3
- export function utilSetCollapsed(collapse: any, headerOffset: any, headerTopValue: any): void;
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;
6
6
  title: any;
@@ -139,16 +139,17 @@ var utilCheckUpdateVerticalSpace = function utilCheckUpdateVerticalSpace(headerR
139
139
  };
140
140
 
141
141
  // Trigger a window scroll, if necessary, to set the collapsed state.
142
- var utilSetCollapsed = function utilSetCollapsed(collapse, headerOffset, headerTopValue) {
142
+ var utilSetCollapsed = function utilSetCollapsed(collapse, headerRef, headerOffset, headerTopValue) {
143
143
  /* don't know how to test resize */
144
144
  /* istanbul ignore else */
145
+ var scrollableTarget = scrollableAncestor(headerRef.current);
145
146
  if (collapse) {
146
- window.scrollTo({
147
+ scrollableTarget.scrollTo({
147
148
  top: headerOffset - headerTopValue,
148
149
  behavior: 'smooth'
149
150
  });
150
151
  } else {
151
- window.scrollTo({
152
+ scrollableTarget.scrollTo({
152
153
  top: 0,
153
154
  behavior: 'smooth'
154
155
  });