@carbon/ibm-products 2.34.0 → 2.36.0-alpha.27

Sign up to get free protection for your applications and to get access to all the features.
Files changed (244) hide show
  1. package/css/index-full-carbon.css +32448 -32421
  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 +105 -91
  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 +765 -24496
  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 +2543 -18127
  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/Coachmark/utils/enums.d.ts +36 -22
  20. package/es/components/CoachmarkBeacon/CoachmarkBeacon.d.ts +26 -2
  21. package/es/components/CoachmarkBeacon/CoachmarkBeacon.js +1 -3
  22. package/es/components/CoachmarkFixed/CoachmarkFixed.js +1 -1
  23. package/es/components/CoachmarkOverlayElement/CoachmarkOverlayElement.d.ts +28 -2
  24. package/es/components/CoachmarkOverlayElement/CoachmarkOverlayElement.js +0 -1
  25. package/es/components/ConditionBuilder/ConditionBuilder.d.ts +5 -0
  26. package/es/components/ConditionBuilder/ConditionBuilder.js +125 -0
  27. package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts +10 -0
  28. package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +92 -0
  29. package/es/components/ConditionBuilder/ConditionBuilderContext/DataTreeContext.d.ts +38 -0
  30. package/es/components/ConditionBuilder/ConditionBuilderContext/DataTreeContext.js +88 -0
  31. package/es/components/ConditionBuilder/assets/sampleInput.d.ts +58 -0
  32. package/es/components/ConditionBuilder/index.d.ts +1 -0
  33. package/es/components/CreateFullPage/CreateFullPage.d.ts +121 -4
  34. package/es/components/CreateFullPage/CreateFullPage.js +14 -26
  35. package/es/components/CreateFullPage/CreateFullPageStep.js +22 -7
  36. package/es/components/CreateTearsheet/CreateTearsheet.js +2 -0
  37. package/es/components/CreateTearsheetNarrow/CreateTearsheetNarrow.d.ts +82 -2
  38. package/es/components/Datagrid/Datagrid/DatagridRow.js +4 -3
  39. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/DraggableItemsList.js +2 -1
  40. package/es/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +10 -6
  41. package/es/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +6 -2
  42. package/es/components/Datagrid/Datagrid/addons/stateReducer.js +2 -1
  43. package/es/components/Datagrid/useEditableCell.js +15 -0
  44. package/es/components/DelimitedList/DelimitedList.d.ts +27 -2
  45. package/es/components/DelimitedList/DelimitedList.js +0 -1
  46. package/es/components/EditFullPage/EditFullPage.d.ts +19 -2
  47. package/es/components/EditFullPage/EditFullPage.js +3 -3
  48. package/es/components/EditInPlace/EditInPlace.d.ts +97 -5
  49. package/es/components/EditInPlace/EditInPlace.js +10 -6
  50. package/es/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.d.ts +61 -2
  51. package/es/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +1 -3
  52. package/es/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.d.ts +61 -2
  53. package/es/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +1 -2
  54. package/es/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.d.ts +61 -2
  55. package/es/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +1 -3
  56. package/es/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.d.ts +61 -2
  57. package/es/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +1 -3
  58. package/es/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.d.ts +61 -2
  59. package/es/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +1 -2
  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.js +1 -1
  63. package/es/components/FilterPanel/FilterPanelAccordionItem/FilterPanelAccordionItem.js +2 -2
  64. package/es/components/FilterPanel/FilterPanelCheckbox/FilterPanelCheckbox.d.ts +5 -0
  65. package/es/components/FilterPanel/FilterPanelCheckbox/FilterPanelCheckbox.js +5 -9
  66. package/es/components/FilterPanel/FilterPanelCheckboxWithOverflow/FilterPanelCheckboxWithOverflow.js +1 -1
  67. package/es/components/FilterPanel/FilterPanelSearch/FilterPanelSearch.d.ts +5 -0
  68. package/es/components/FilterPanel/FilterPanelSearch/FilterPanelSearch.js +92 -0
  69. package/es/components/FilterPanel/index.d.ts +1 -0
  70. package/es/components/FullPageError/FullPageError.d.ts +2 -1
  71. package/es/components/FullPageError/FullPageError.js +24 -49
  72. package/es/components/HTTPErrors/HTTPError403/HTTPError403.d.ts +40 -2
  73. package/es/components/HTTPErrors/HTTPError403/HTTPError403.js +1 -1
  74. package/es/components/HTTPErrors/HTTPError404/HTTPError404.d.ts +40 -2
  75. package/es/components/HTTPErrors/HTTPError404/HTTPError404.js +1 -1
  76. package/es/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.d.ts +40 -2
  77. package/es/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.js +1 -1
  78. package/es/components/ImportModal/ImportModal.d.ts +136 -2
  79. package/es/components/ImportModal/ImportModal.js +3 -2
  80. package/es/components/InlineTip/InlineTip.d.ts +90 -2
  81. package/es/components/InlineTip/InlineTip.js +3 -2
  82. package/es/components/InlineTip/InlineTipLink.d.ts +19 -2
  83. package/es/components/InterstitialScreenView/InterstitialScreenView.d.ts +23 -2
  84. package/es/components/InterstitialScreenView/InterstitialScreenView.js +0 -1
  85. package/es/components/InterstitialScreenViewModule/InterstitialScreenViewModule.d.ts +23 -2
  86. package/es/components/Nav/Nav.js +1 -1
  87. package/es/components/Nav/NavList.js +7 -7
  88. package/es/components/NonLinearReading/NonLinearReading.d.ts +28 -2
  89. package/es/components/NonLinearReading/NonLinearReading.js +2 -7
  90. package/es/components/NotificationsPanel/NotificationsPanel.js +1 -1
  91. package/es/components/PageHeader/PageHeader.js +3 -3
  92. package/es/components/PageHeader/PageHeaderUtils.d.ts +1 -1
  93. package/es/components/PageHeader/PageHeaderUtils.js +4 -3
  94. package/es/components/SearchBar/SearchBar.d.ts +51 -3
  95. package/es/components/SearchBar/SearchBar.js +5 -6
  96. package/es/components/SidePanel/SidePanel.js +62 -41
  97. package/es/components/SteppedAnimatedMedia/SteppedAnimatedMedia.d.ts +23 -2
  98. package/es/components/SteppedAnimatedMedia/SteppedAnimatedMedia.js +6 -5
  99. package/es/components/TagOverflow/TagOverflow.d.ts +5 -0
  100. package/es/components/TagOverflow/TagOverflow.js +209 -0
  101. package/es/components/TagOverflow/constants.d.ts +14 -0
  102. package/es/components/TagOverflow/constants.js +30 -0
  103. package/es/components/TagOverflow/index.d.ts +1 -0
  104. package/es/components/Tearsheet/TearsheetNarrow.d.ts +105 -6
  105. package/es/components/Tearsheet/TearsheetNarrow.js +6 -1
  106. package/es/components/Toolbar/Toolbar.d.ts +23 -5
  107. package/es/components/Toolbar/Toolbar.js +30 -26
  108. package/es/components/TruncatedList/TruncatedList.d.ts +47 -2
  109. package/es/components/TruncatedList/TruncatedList.js +5 -4
  110. package/es/components/UserAvatar/UserAvatar.js +4 -2
  111. package/es/components/index.d.ts +4 -2
  112. package/es/global/js/package-settings.d.ts +3 -0
  113. package/es/global/js/package-settings.js +3 -0
  114. package/es/index.js +4 -0
  115. package/es/settings.d.ts +3 -0
  116. package/lib/components/ActionSet/ActionSet.d.ts +38 -2
  117. package/lib/components/ActionSet/ActionSet.js +3 -5
  118. package/lib/components/Coachmark/utils/enums.d.ts +36 -22
  119. package/lib/components/CoachmarkBeacon/CoachmarkBeacon.d.ts +26 -2
  120. package/lib/components/CoachmarkBeacon/CoachmarkBeacon.js +1 -3
  121. package/lib/components/CoachmarkFixed/CoachmarkFixed.js +1 -1
  122. package/lib/components/CoachmarkOverlayElement/CoachmarkOverlayElement.d.ts +28 -2
  123. package/lib/components/CoachmarkOverlayElement/CoachmarkOverlayElement.js +0 -1
  124. package/lib/components/ConditionBuilder/ConditionBuilder.d.ts +5 -0
  125. package/lib/components/ConditionBuilder/ConditionBuilder.js +132 -0
  126. package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts +10 -0
  127. package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +100 -0
  128. package/lib/components/ConditionBuilder/ConditionBuilderContext/DataTreeContext.d.ts +38 -0
  129. package/lib/components/ConditionBuilder/ConditionBuilderContext/DataTreeContext.js +98 -0
  130. package/lib/components/ConditionBuilder/assets/sampleInput.d.ts +58 -0
  131. package/lib/components/ConditionBuilder/index.d.ts +1 -0
  132. package/lib/components/CreateFullPage/CreateFullPage.d.ts +121 -4
  133. package/lib/components/CreateFullPage/CreateFullPage.js +13 -25
  134. package/lib/components/CreateFullPage/CreateFullPageStep.js +20 -5
  135. package/lib/components/CreateTearsheet/CreateTearsheet.js +2 -0
  136. package/lib/components/CreateTearsheetNarrow/CreateTearsheetNarrow.d.ts +82 -2
  137. package/lib/components/Datagrid/Datagrid/DatagridRow.js +4 -3
  138. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/DraggableItemsList.js +2 -1
  139. package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +11 -7
  140. package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +6 -2
  141. package/lib/components/Datagrid/Datagrid/addons/stateReducer.js +2 -1
  142. package/lib/components/Datagrid/useEditableCell.js +19 -0
  143. package/lib/components/DelimitedList/DelimitedList.d.ts +27 -2
  144. package/lib/components/DelimitedList/DelimitedList.js +0 -1
  145. package/lib/components/EditFullPage/EditFullPage.d.ts +19 -2
  146. package/lib/components/EditFullPage/EditFullPage.js +3 -3
  147. package/lib/components/EditInPlace/EditInPlace.d.ts +97 -5
  148. package/lib/components/EditInPlace/EditInPlace.js +10 -6
  149. package/lib/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.d.ts +61 -2
  150. package/lib/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +1 -3
  151. package/lib/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.d.ts +61 -2
  152. package/lib/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +1 -2
  153. package/lib/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.d.ts +61 -2
  154. package/lib/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +1 -3
  155. package/lib/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.d.ts +61 -2
  156. package/lib/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +1 -3
  157. package/lib/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.d.ts +61 -2
  158. package/lib/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +1 -2
  159. package/lib/components/ExportModal/ExportModal.d.ts +110 -2
  160. package/lib/components/ExportModal/ExportModal.js +10 -4
  161. package/lib/components/FilterPanel/FilterPanelAccordion/FilterPanelAccordion.js +1 -1
  162. package/lib/components/FilterPanel/FilterPanelAccordionItem/FilterPanelAccordionItem.js +2 -2
  163. package/lib/components/FilterPanel/FilterPanelCheckbox/FilterPanelCheckbox.d.ts +5 -0
  164. package/lib/components/FilterPanel/FilterPanelCheckbox/FilterPanelCheckbox.js +5 -9
  165. package/lib/components/FilterPanel/FilterPanelCheckboxWithOverflow/FilterPanelCheckboxWithOverflow.js +1 -1
  166. package/lib/components/FilterPanel/FilterPanelSearch/FilterPanelSearch.d.ts +5 -0
  167. package/lib/components/FilterPanel/FilterPanelSearch/FilterPanelSearch.js +99 -0
  168. package/lib/components/FilterPanel/index.d.ts +1 -0
  169. package/lib/components/FullPageError/FullPageError.d.ts +2 -1
  170. package/lib/components/FullPageError/FullPageError.js +24 -49
  171. package/lib/components/HTTPErrors/HTTPError403/HTTPError403.d.ts +40 -2
  172. package/lib/components/HTTPErrors/HTTPError403/HTTPError403.js +1 -1
  173. package/lib/components/HTTPErrors/HTTPError404/HTTPError404.d.ts +40 -2
  174. package/lib/components/HTTPErrors/HTTPError404/HTTPError404.js +1 -1
  175. package/lib/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.d.ts +40 -2
  176. package/lib/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.js +1 -1
  177. package/lib/components/ImportModal/ImportModal.d.ts +136 -2
  178. package/lib/components/ImportModal/ImportModal.js +3 -2
  179. package/lib/components/InlineTip/InlineTip.d.ts +90 -2
  180. package/lib/components/InlineTip/InlineTip.js +3 -2
  181. package/lib/components/InlineTip/InlineTipLink.d.ts +19 -2
  182. package/lib/components/InterstitialScreenView/InterstitialScreenView.d.ts +23 -2
  183. package/lib/components/InterstitialScreenView/InterstitialScreenView.js +0 -1
  184. package/lib/components/InterstitialScreenViewModule/InterstitialScreenViewModule.d.ts +23 -2
  185. package/lib/components/Nav/Nav.js +1 -1
  186. package/lib/components/Nav/NavList.js +7 -7
  187. package/lib/components/NonLinearReading/NonLinearReading.d.ts +28 -2
  188. package/lib/components/NonLinearReading/NonLinearReading.js +2 -7
  189. package/lib/components/NotificationsPanel/NotificationsPanel.js +1 -1
  190. package/lib/components/PageHeader/PageHeader.js +3 -3
  191. package/lib/components/PageHeader/PageHeaderUtils.d.ts +1 -1
  192. package/lib/components/PageHeader/PageHeaderUtils.js +4 -3
  193. package/lib/components/SearchBar/SearchBar.d.ts +51 -3
  194. package/lib/components/SearchBar/SearchBar.js +5 -6
  195. package/lib/components/SidePanel/SidePanel.js +62 -41
  196. package/lib/components/SteppedAnimatedMedia/SteppedAnimatedMedia.d.ts +23 -2
  197. package/lib/components/SteppedAnimatedMedia/SteppedAnimatedMedia.js +6 -5
  198. package/lib/components/TagOverflow/TagOverflow.d.ts +5 -0
  199. package/lib/components/TagOverflow/TagOverflow.js +216 -0
  200. package/lib/components/TagOverflow/constants.d.ts +14 -0
  201. package/lib/components/TagOverflow/constants.js +34 -0
  202. package/lib/components/TagOverflow/index.d.ts +1 -0
  203. package/lib/components/Tearsheet/TearsheetNarrow.d.ts +105 -6
  204. package/lib/components/Tearsheet/TearsheetNarrow.js +6 -1
  205. package/lib/components/Toolbar/Toolbar.d.ts +23 -5
  206. package/lib/components/Toolbar/Toolbar.js +30 -26
  207. package/lib/components/TruncatedList/TruncatedList.d.ts +47 -2
  208. package/lib/components/TruncatedList/TruncatedList.js +5 -4
  209. package/lib/components/UserAvatar/UserAvatar.js +4 -2
  210. package/lib/components/index.d.ts +4 -2
  211. package/lib/global/js/package-settings.d.ts +3 -0
  212. package/lib/global/js/package-settings.js +3 -0
  213. package/lib/index.js +17 -0
  214. package/lib/settings.d.ts +3 -0
  215. package/package.json +5 -5
  216. package/scss/components/Coachmark/_coachmark-dragbar.scss +0 -1
  217. package/scss/components/Coachmark/_coachmark-tagline.scss +2 -2
  218. package/scss/components/ConditionBuilder/_carbon-imports.scss +9 -0
  219. package/scss/components/ConditionBuilder/_condition-builder.scss +25 -0
  220. package/scss/components/ConditionBuilder/_index-with-carbon.scss +9 -0
  221. package/scss/components/ConditionBuilder/_index.scss +8 -0
  222. package/scss/components/CreateFullPage/_create-full-page.scss +10 -10
  223. package/scss/components/Datagrid/styles/_useNestedRows.scss +5 -1
  224. package/scss/components/Datagrid/styles/_useSortableColumns.scss +2 -0
  225. package/scss/components/FilterPanel/_carbon-imports.scss +5 -0
  226. package/scss/components/FilterPanel/_filter-panel-accordion-item.scss +1 -3
  227. package/scss/components/FilterPanel/_filter-panel-checkbox-with-overflow.scss +0 -2
  228. package/scss/components/FilterPanel/_filter-panel-checkbox.scss +0 -1
  229. package/scss/components/FilterPanel/_filter-panel-search.scss +38 -0
  230. package/scss/components/FilterPanel/_index-with-carbon.scss +1 -0
  231. package/scss/components/FilterPanel/_index.scss +1 -0
  232. package/scss/components/FullPageError/_full-page-error.scss +10 -10
  233. package/scss/components/Guidebanner/_guidebanner.scss +1 -1
  234. package/scss/components/InlineTip/_inline-tip.scss +1 -1
  235. package/scss/components/ProductiveCard/_productive-card.scss +13 -0
  236. package/scss/components/SidePanel/_side-panel.scss +9 -9
  237. package/scss/components/TagOverflow/_carbon-imports.scss +9 -0
  238. package/scss/components/TagOverflow/_index-with-carbon.scss +9 -0
  239. package/scss/components/TagOverflow/_index.scss +8 -0
  240. package/scss/components/TagOverflow/_tag-overflow.scss +55 -0
  241. package/scss/components/Tearsheet/_tearsheet.scss +10 -0
  242. package/scss/components/UserAvatar/_user-avatar.scss +7 -3
  243. package/scss/components/_index-with-carbon.scss +2 -0
  244. package/scss/components/_index.scss +2 -0
@@ -85,6 +85,7 @@ exports.ImportModal = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
85
85
  };
86
86
  var updateFiles = function updateFiles(newFiles) {
87
87
  var updatedFiles = newFiles.map(function (file) {
88
+ var _newFile$fileSize;
88
89
  var newFile = {
89
90
  uuid: file.uuid || uuidv4["default"](),
90
91
  status: 'edit',
@@ -103,7 +104,7 @@ exports.ImportModal = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
103
104
  newFile.errorBody = invalidFileTypeErrorBody || defaultErrorBody;
104
105
  newFile.errorSubject = invalidFileTypeErrorHeader || defaultErrorHeader;
105
106
  newFile.invalid = true;
106
- } else if (maxFileSize && newFile.fileSize > maxFileSize) {
107
+ } else if (maxFileSize && ((_newFile$fileSize = newFile === null || newFile === void 0 ? void 0 : newFile.fileSize) !== null && _newFile$fileSize !== void 0 ? _newFile$fileSize : 0) > maxFileSize) {
107
108
  newFile.errorBody = maxFileSizeErrorBody || defaultErrorBody;
108
109
  newFile.errorSubject = maxFileSizeErrorHeader || defaultErrorHeader;
109
110
  newFile.invalid = true;
@@ -136,7 +137,7 @@ exports.ImportModal = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
136
137
  _context.next = 10;
137
138
  break;
138
139
  }
139
- throw new Error(response.status);
140
+ throw new Error("".concat(response.status));
140
141
  case 10:
141
142
  _context.next = 12;
142
143
  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 {};
@@ -44,9 +44,9 @@ var defaults = {
44
44
  narrow: false,
45
45
  withLeftGutter: false,
46
46
  onClick: function onClick() {},
47
- onClose: function onClose() {}
47
+ onClose: function onClose() {},
48
+ title: 'Use case-specific heading'
48
49
  };
49
-
50
50
  /**
51
51
  * Inline tips are messages embedded within other components that
52
52
  * provide an ambient way to deliver learning content without
@@ -196,6 +196,7 @@ exports.InlineTip.propTypes = {
196
196
  *
197
197
  * Enabling `media` disables the `collapsible` feature.
198
198
  */
199
+ /**@ts-ignore*/
199
200
  media: index["default"].oneOfType([index["default"].shape({
200
201
  render: index["default"].func
201
202
  }), index["default"].shape({
@@ -1,5 +1,22 @@
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, { PropsWithChildren, ReactNode } from 'react';
8
+ interface InlineTipLinkProps extends PropsWithChildren {
9
+ /**
10
+ * Provide the contents of the InlineTipLink.
11
+ */
12
+ children: ReactNode;
13
+ /**
14
+ * Provide an optional class to be applied to the containing node.
15
+ */
16
+ className?: string;
17
+ }
1
18
  /**
2
19
  * This is a standard Carbon link, styled specifically for use inside InlineTip.
3
20
  */
4
- export let InlineTipLink: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
5
- import React from 'react';
21
+ export declare let InlineTipLink: React.ForwardRefExoticComponent<InlineTipLinkProps & React.RefAttributes<HTMLDivElement>>;
22
+ export {};
@@ -1,5 +1,26 @@
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, { PropsWithChildren, ReactNode } from 'react';
8
+ interface InterstitialScreenViewProps extends PropsWithChildren {
9
+ /**
10
+ * Provide the contents of the InterstitialScreenView.
11
+ */
12
+ children?: ReactNode;
13
+ /**
14
+ * Optional class name for this component.
15
+ */
16
+ className?: string;
17
+ /**
18
+ * The label to pass to the ProgressStep component.
19
+ */
20
+ stepTitle: string;
21
+ }
1
22
  /**
2
23
  * A Novice to Pro component intended to be used as the child elements of the InterstitialScreen component.
3
24
  */
4
- export let InterstitialScreenView: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
5
- import React from 'react';
25
+ export declare let InterstitialScreenView: React.ForwardRefExoticComponent<InterstitialScreenViewProps & React.RefAttributes<HTMLDivElement>>;
26
+ export {};
@@ -29,7 +29,6 @@ var _excluded = ["children", "className", "stepTitle"];
29
29
  // The block part of our conventional BEM class names (blockClass__E--M).
30
30
  var blockClass = "".concat(settings.pkg.prefix, "--interstitial-screen-view");
31
31
  var componentName = 'InterstitialScreenView';
32
-
33
32
  /**
34
33
  * A Novice to Pro component intended to be used as the child elements of the InterstitialScreen component.
35
34
  */
@@ -1,5 +1,26 @@
1
1
  /**
2
- * View module to help in building interstitial screen views.
2
+ * Copyright IBM Corp. 2024, 2024
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
3
6
  */
4
- export let InterstitialScreenViewModule: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
5
7
  import React from 'react';
8
+ interface InterstitialScreenViewModuleProps {
9
+ /**
10
+ * Provide an optional class to be applied to the containing node.
11
+ */
12
+ className?: string;
13
+ /**
14
+ * The description of this component.
15
+ */
16
+ description: string;
17
+ /**
18
+ * The title of this component.
19
+ */
20
+ title: string;
21
+ }
22
+ /**
23
+ * View module to help in building interstitial screen views.
24
+ */
25
+ export declare let InterstitialScreenViewModule: React.ForwardRefExoticComponent<InterstitialScreenViewModuleProps & React.RefAttributes<HTMLElement>>;
26
+ export {};
@@ -111,7 +111,7 @@ exports.Nav = /*#__PURE__*/React__default["default"].forwardRef(function (_ref,
111
111
  */
112
112
  var handleListClick = function handleListClick(id) {
113
113
  Object.keys(navigationLists.current).forEach(function (key) {
114
- if (key !== id && !navigationLists.current[key].isExpandedOnPageload) {
114
+ if (key !== id && !navigationLists.current[key].isExpandedOnPageLoad) {
115
115
  navigationLists.current[key].close();
116
116
  }
117
117
  });
@@ -31,7 +31,7 @@ var defaults = {
31
31
  className: '',
32
32
  children: null,
33
33
  id: '',
34
- isExpandedOnPageload: false,
34
+ isExpandedOnPageLoad: false,
35
35
  onItemClick: function onItemClick() {},
36
36
  onListClick: function onListClick() {},
37
37
  tabIndex: 0,
@@ -50,8 +50,8 @@ var NavList = /*#__PURE__*/React__default["default"].forwardRef(function (_ref,
50
50
  icon = _ref$icon === void 0 ? defaults.icon : _ref$icon,
51
51
  _ref$id = _ref.id,
52
52
  id = _ref$id === void 0 ? defaults.id : _ref$id,
53
- _ref$isExpandedOnPage = _ref.isExpandedOnPageload,
54
- isExpandedOnPageload = _ref$isExpandedOnPage === void 0 ? defaults.isExpandedOnPageload : _ref$isExpandedOnPage,
53
+ _ref$isExpandedOnPage = _ref.isExpandedOnPageLoad,
54
+ isExpandedOnPageLoad = _ref$isExpandedOnPage === void 0 ? defaults.isExpandedOnPageLoad : _ref$isExpandedOnPage,
55
55
  _ref$navigationItemTi = _ref.navigationItemTitle,
56
56
  navigationItemTitle = _ref$navigationItemTi === void 0 ? defaults.navigationItemTitle : _ref$navigationItemTi,
57
57
  _ref$onItemClick = _ref.onItemClick,
@@ -62,7 +62,7 @@ var NavList = /*#__PURE__*/React__default["default"].forwardRef(function (_ref,
62
62
  tabIndex = _ref$tabIndex === void 0 ? defaults.tabIndex : _ref$tabIndex,
63
63
  _ref$title = _ref.title,
64
64
  title = _ref$title === void 0 ? defaults.title : _ref$title;
65
- var _useState = React.useState(isExpandedOnPageload),
65
+ var _useState = React.useState(isExpandedOnPageLoad),
66
66
  _useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
67
67
  open = _useState2[0],
68
68
  setOpen = _useState2[1];
@@ -74,7 +74,7 @@ var NavList = /*#__PURE__*/React__default["default"].forwardRef(function (_ref,
74
74
  var childProps = _ref3.props;
75
75
  return childProps.href;
76
76
  });
77
- setOpen(hrefs.includes(activeHref) || isExpandedOnPageload);
77
+ setOpen(hrefs.includes(activeHref) || isExpandedOnPageLoad);
78
78
  // eslint-disable-next-line react-hooks/exhaustive-deps
79
79
  }, []);
80
80
 
@@ -108,7 +108,7 @@ var NavList = /*#__PURE__*/React__default["default"].forwardRef(function (_ref,
108
108
  React.useImperativeHandle(ref, function () {
109
109
  return {
110
110
  close: close,
111
- isExpandedOnPageload: isExpandedOnPageload
111
+ isExpandedOnPageLoad: isExpandedOnPageLoad
112
112
  };
113
113
  });
114
114
  var newChildren = React__default["default"].Children.map(children, function (child, index) {
@@ -159,7 +159,7 @@ NavList.propTypes = {
159
159
  /** @type {string} ID of a list. */
160
160
  id: index.propTypesExports.string,
161
161
  /** @type {boolean} State of a list. */
162
- isExpandedOnPageload: index.propTypesExports.bool,
162
+ isExpandedOnPageLoad: index.propTypesExports.bool,
163
163
  /** @type {boolean} Title of nav. */
164
164
  navigationItemTitle: index.propTypesExports.string,
165
165
  /** @type {Function} Click handler for an item. */
@@ -1,7 +1,33 @@
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 Theme = 'light' | 'dark';
9
+ interface NonLinearReadingProps {
10
+ /**
11
+ * The keyword of the component appears as a pill.
12
+ */
13
+ children: ReactNode;
14
+ /**
15
+ * Provide an optional class to be applied to the containing node.
16
+ */
17
+ className?: string;
18
+ /**
19
+ * The content that appears when the keyword is toggled open.
20
+ */
21
+ definition: ReactNode;
22
+ /**
23
+ * Determines the theme of the component.
24
+ */
25
+ theme?: Theme;
26
+ }
1
27
  /**
2
28
  * Use non-linear reading when space is limited to share a
3
29
  * brief, at-a-glance, summary of a concept that may require
4
30
  * more explanation for some users.
5
31
  */
6
- export let NonLinearReading: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
7
- import React from 'react';
32
+ export declare let NonLinearReading: React.ForwardRefExoticComponent<NonLinearReadingProps & React.RefAttributes<HTMLSpanElement>>;
33
+ export {};
@@ -29,12 +29,6 @@ var _excluded = ["children", "className", "definition", "theme"];
29
29
  // The block part of our conventional BEM class names (blockClass__E--M).
30
30
  var blockClass = "".concat(settings.pkg.prefix, "--non-linear-reading");
31
31
  var componentName = 'NonLinearReading';
32
-
33
- // Default values for props
34
- var defaults = {
35
- theme: 'light'
36
- };
37
-
38
32
  /**
39
33
  * Use non-linear reading when space is limited to share a
40
34
  * brief, at-a-glance, summary of a concept that may require
@@ -45,7 +39,7 @@ exports.NonLinearReading = /*#__PURE__*/React__default["default"].forwardRef(fun
45
39
  className = _ref.className,
46
40
  definition = _ref.definition,
47
41
  _ref$theme = _ref.theme,
48
- theme = _ref$theme === void 0 ? defaults.theme : _ref$theme,
42
+ theme = _ref$theme === void 0 ? 'light' : _ref$theme,
49
43
  rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
50
44
  var _useState = React.useState(false),
51
45
  _useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
@@ -82,6 +76,7 @@ exports.NonLinearReading.propTypes = {
82
76
  /**
83
77
  * The keyword of the component appears as a pill.
84
78
  */
79
+
85
80
  children: index["default"].node.isRequired,
86
81
  /**
87
82
  * Provide an optional class to be applied to the containing node.
@@ -326,7 +326,7 @@ exports.NotificationsPanel = /*#__PURE__*/React__default["default"].forwardRef(f
326
326
  id: blockClass,
327
327
  className: cx__default["default"](blockClass, className, "".concat(blockClass, "__container")),
328
328
  style: {
329
- animation: !reducedMotion.matches ? "".concat(open ? 'fade-in 250ms' : 'fade-out 250ms') : null
329
+ animation: !reducedMotion.matches ? "".concat(open ? 'fade-in 250ms' : 'fade-out forwards 250ms') : null
330
330
  },
331
331
  onAnimationEnd: onAnimationEnd,
332
332
  ref: ref || notificationPanelRef
@@ -195,7 +195,7 @@ exports.PageHeader = /*#__PURE__*/React__default["default"].forwardRef(function
195
195
  checkUpdateVerticalSpace();
196
196
  };
197
197
  var handleCollapseToggle = function handleCollapseToggle() {
198
- PageHeaderUtils.utilSetCollapsed(!fullyCollapsed, metrics.headerOffset, metrics.headerTopValue);
198
+ PageHeaderUtils.utilSetCollapsed(!fullyCollapsed, headerRef, metrics.headerOffset, metrics.headerTopValue);
199
199
  };
200
200
 
201
201
  // use effects
@@ -314,9 +314,9 @@ exports.PageHeader = /*#__PURE__*/React__default["default"].forwardRef(function
314
314
  };
315
315
  React.useEffect(function () {
316
316
  if (collapseHeader === true) {
317
- PageHeaderUtils.utilSetCollapsed(collapseHeader, metrics.headerOffset, metrics.headerTopValue);
317
+ PageHeaderUtils.utilSetCollapsed(collapseHeader, headerRef, metrics.headerOffset, metrics.headerTopValue);
318
318
  }
319
- }, [collapseHeader, metrics.headerOffset, metrics.headerTopValue]);
319
+ }, [collapseHeader, metrics.headerOffset, metrics.headerTopValue, headerRef]);
320
320
  useResizeObserver.useResizeObserver(sizingContainerRef, handleResizeActionBarColumn);
321
321
  useResizeObserver.useResizeObserver(headerRef, handleResize);
322
322
 
@@ -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;
@@ -148,16 +148,17 @@ var utilCheckUpdateVerticalSpace = function utilCheckUpdateVerticalSpace(headerR
148
148
  };
149
149
 
150
150
  // Trigger a window scroll, if necessary, to set the collapsed state.
151
- var utilSetCollapsed = function utilSetCollapsed(collapse, headerOffset, headerTopValue) {
151
+ var utilSetCollapsed = function utilSetCollapsed(collapse, headerRef, headerOffset, headerTopValue) {
152
152
  /* don't know how to test resize */
153
153
  /* istanbul ignore else */
154
+ var scrollableTarget = scrollableAncestor.scrollableAncestor(headerRef.current);
154
155
  if (collapse) {
155
- window.scrollTo({
156
+ scrollableTarget.scrollTo({
156
157
  top: headerOffset - headerTopValue,
157
158
  behavior: 'smooth'
158
159
  });
159
160
  } else {
160
- window.scrollTo({
161
+ scrollableTarget.scrollTo({
161
162
  top: 0,
162
163
  behavior: 'smooth'
163
164
  });
@@ -1,5 +1,53 @@
1
1
  /**
2
- * Search bar with input field and search button
2
+ * Copyright IBM Corp. 2024, 2024
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
3
6
  */
4
- export let SearchBar: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
5
- import React from 'react';
7
+ import React, { PropsWithChildren } from 'react';
8
+ type Scopes = string[] | object[];
9
+ interface SearchBarProps extends PropsWithChildren {
10
+ /** @type {string} Optional additional class name. */
11
+ className?: string;
12
+ /** @type {string} The label text for the search text input. */
13
+ clearButtonLabelText: string;
14
+ /**
15
+ * Whether or not the scopes MultiSelect label is visually hidden.
16
+ */
17
+ hideScopesLabel?: boolean;
18
+ /** @type {string} The label text for the search text input. */
19
+ labelText?: string;
20
+ /** @type {Function} Function handler for when the user changes their query search. */
21
+ onChange?: (event: any) => void;
22
+ /** @type {Function} Function handler for when the user submits a search. */
23
+ onSubmit?: (event: any) => void;
24
+ /** @type {string} Placeholder text to be displayed in the search input. */
25
+ placeHolderText: string;
26
+ /** @type {Function} Function to get the text for each scope to display in dropdown. */
27
+ scopeToString?: () => void;
28
+ /** @type {Array<any>} Array of allowed search scopes. */
29
+ scopes?: Scopes;
30
+ /** @type {string} The name text for the search scope type. */
31
+ scopesTypeLabel?: typeof conditionalScopePropValidator;
32
+ /** @type {Array<any> Array of initially selected search scopes. */
33
+ selectedScopes?: Scopes;
34
+ /**
35
+ * Optional custom sorting algorithm for an array of scope items.
36
+ * By default, scope items are sorted in ascending alphabetical order,
37
+ * with "selected" items moved to the start of the scope items array.
38
+ */
39
+ sortItems?: () => void;
40
+ /** @type {string} The label text for the search submit button. */
41
+ submitLabel: string;
42
+ /**
43
+ * Provide accessible label text for the scopes MultiSelect.
44
+ */
45
+ titleText?: string;
46
+ /** @type {func} Callback function for translating MultiSelect's child ListBoxMenuIcon SVG title. */
47
+ translateWithId?: () => void;
48
+ /** @type {string} Search query value. */
49
+ value?: string;
50
+ }
51
+ export declare let SearchBar: React.ForwardRefExoticComponent<SearchBarProps & React.RefAttributes<HTMLFormElement>>;
52
+ declare const conditionalScopePropValidator: (props: any, propName: any, componentName: any, ...rest: any[]) => Error | null;
53
+ export {};
@@ -38,10 +38,6 @@ var defaults = {
38
38
  selectedScopes: [],
39
39
  hideScopesLabel: true
40
40
  };
41
-
42
- /**
43
- * Search bar with input field and search button
44
- */
45
41
  exports.SearchBar = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
46
42
  var className = _ref.className,
47
43
  clearButtonLabelText = _ref.clearButtonLabelText,
@@ -54,11 +50,11 @@ exports.SearchBar = /*#__PURE__*/React__default["default"].forwardRef(function (
54
50
  onSubmit = _ref$onSubmit === void 0 ? defaults.onSubmit : _ref$onSubmit,
55
51
  placeHolderText = _ref.placeHolderText,
56
52
  _ref$scopes = _ref.scopes,
57
- scopes = _ref$scopes === void 0 ? defaults.scopes : _ref$scopes,
53
+ scopes = _ref$scopes === void 0 ? [] : _ref$scopes,
58
54
  scopesTypeLabel = _ref.scopesTypeLabel,
59
55
  scopeToString = _ref.scopeToString,
60
56
  _ref$selectedScopes = _ref.selectedScopes,
61
- selectedScopes = _ref$selectedScopes === void 0 ? defaults.selectedScopes : _ref$selectedScopes,
57
+ selectedScopes = _ref$selectedScopes === void 0 ? [] : _ref$selectedScopes,
62
58
  sortItems = _ref.sortItems,
63
59
  submitLabel = _ref.submitLabel,
64
60
  translateWithId = _ref.translateWithId,
@@ -171,6 +167,7 @@ var conditionalScopePropValidator = function conditionalScopePropValidator(props
171
167
  if (props.scopes && props.scopes.length > 0 && !props[propName]) {
172
168
  return new Error("Required `".concat(propName, "` when `scopes` prop type is supplied to `").concat(componentName, "`. Validation failed."));
173
169
  }
170
+ /**@ts-ignore */
174
171
  for (var _len = arguments.length, rest = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
175
172
  rest[_key - 3] = arguments[_key];
176
173
  }
@@ -200,11 +197,13 @@ exports.SearchBar.propTypes = {
200
197
  /** @type {Function} Function to get the text for each scope to display in dropdown. */
201
198
  scopeToString: index["default"].func,
202
199
  /** @type {Array<any>} Array of allowed search scopes. */
200
+ /**@ts-ignore */
203
201
  scopes: index["default"].arrayOf(index["default"].oneOfType([index["default"].string, index["default"].object])),
204
202
  /** @type {string} The name text for the search scope type. */
205
203
  // eslint-disable-next-line react/require-default-props
206
204
  scopesTypeLabel: conditionalScopePropValidator,
207
205
  /** @type {Array<any> Array of initially selected search scopes. */
206
+ /**@ts-ignore */
208
207
  selectedScopes: index["default"].arrayOf(index["default"].oneOfType([index["default"].string, index["default"].object])),
209
208
  /**
210
209
  * Optional custom sorting algorithm for an array of scope items.