@carbon/ibm-products 2.2.0 → 2.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (225) hide show
  1. package/css/index-full-carbon.css +965 -434
  2. package/css/index-full-carbon.css.map +1 -1
  3. package/css/index-full-carbon.min.css +4 -4
  4. package/css/index-full-carbon.min.css.map +1 -1
  5. package/css/index-without-carbon-released-only.css +354 -155
  6. package/css/index-without-carbon-released-only.css.map +1 -1
  7. package/css/index-without-carbon-released-only.min.css +2 -2
  8. package/css/index-without-carbon-released-only.min.css.map +1 -1
  9. package/css/index-without-carbon.css +600 -236
  10. package/css/index-without-carbon.css.map +1 -1
  11. package/css/index-without-carbon.min.css +4 -4
  12. package/css/index-without-carbon.min.css.map +1 -1
  13. package/css/index.css +516 -293
  14. package/css/index.css.map +1 -1
  15. package/css/index.min.css +4 -4
  16. package/css/index.min.css.map +1 -1
  17. package/es/components/APIKeyModal/APIKeyModal.docs-page.js +26 -0
  18. package/es/components/AboutModal/AboutModal.docs-page.js +21 -0
  19. package/es/components/AboutModal/AboutModal.js +2 -4
  20. package/es/components/ActionBar/ActionBar.js +2 -6
  21. package/es/components/AddSelect/AddSelectFormControl.js +6 -6
  22. package/es/components/AddSelect/AddSelectRow.js +15 -5
  23. package/es/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +5 -6
  24. package/es/components/ButtonMenu/ButtonMenu.js +4 -4
  25. package/es/components/ButtonSetWithOverflow/ButtonSetWithOverflow.js +3 -9
  26. package/es/components/Cascade/Cascade.docs-page.js +22 -0
  27. package/es/components/Cascade/Cascade.js +11 -1
  28. package/es/components/CreateFullPage/CreateFullPage.docs-page.js +39 -0
  29. package/es/components/CreateFullPage/CreateFullPage.js +13 -0
  30. package/es/components/CreateModal/CreateModal.docs-page.js +24 -0
  31. package/es/components/CreateModal/CreateModal.js +7 -0
  32. package/es/components/CreateSidePanel/CreateSidePanel.docs-page.js +18 -0
  33. package/es/components/CreateSidePanel/CreateSidePanel.js +1 -1
  34. package/es/components/CreateTearsheet/CreateTearsheet.docs-page.js +29 -0
  35. package/es/components/DataSpreadsheet/DataSpreadsheet.js +3 -3
  36. package/es/components/Datagrid/Datagrid/DatagridContent.js +1 -1
  37. package/es/components/Datagrid/Datagrid/DatagridSelectAllWithToggle.js +3 -3
  38. package/es/components/Datagrid/Datagrid/DatagridToolbar.js +25 -10
  39. package/es/components/Datagrid/Datagrid/DatagridVirtualBody.js +1 -3
  40. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/TearsheetWrapper.js +1 -1
  41. package/es/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +39 -47
  42. package/es/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +20 -24
  43. package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/index.js +2 -2
  44. package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilterContext.js +13 -0
  45. package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +44 -15
  46. package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +16 -30
  47. package/es/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.js +2 -2
  48. package/es/components/Datagrid/index.js +2 -1
  49. package/es/components/Datagrid/useActionsColumn.js +10 -7
  50. package/es/components/Datagrid/useCustomizeColumns.js +9 -7
  51. package/es/components/Datagrid/useExpandedRow.js +11 -7
  52. package/es/components/Datagrid/useFiltering.js +12 -8
  53. package/es/components/Datagrid/useInlineEdit.js +3 -0
  54. package/es/components/Datagrid/useNestedRows.js +10 -6
  55. package/es/components/Datagrid/useStickyColumn.js +10 -3
  56. package/es/components/Datagrid/utils/DatagridActions.js +12 -20
  57. package/es/components/EditFullPage/EditFullPage.docs-page.js +39 -0
  58. package/es/components/EditFullPage/EditFullPage.js +2 -1
  59. package/es/components/EditSidePanel/EditSidePanel.js +1 -1
  60. package/es/components/EditTearsheet/EditTearsheet.docs-page.js +25 -0
  61. package/es/components/EditTearsheet/EditTearsheet.js +4 -0
  62. package/es/components/EditTearsheetNarrow/EditTearsheetNarrow.js +1 -1
  63. package/es/components/EditUpdateCards/EditUpdateCards.js +3 -2
  64. package/es/components/EmptyStates/EmptyState.js +4 -0
  65. package/es/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +4 -0
  66. package/es/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +4 -0
  67. package/es/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +4 -0
  68. package/es/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +4 -0
  69. package/es/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +4 -0
  70. package/es/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +4 -0
  71. package/es/components/ExampleComponent/ExampleComponent.docs-page.js +22 -0
  72. package/es/components/ExportModal/ExportModal.js +4 -0
  73. package/es/components/HTTPErrors/HTTPError403/HTTPError403.js +6 -0
  74. package/es/components/HTTPErrors/HTTPError404/HTTPError404.js +6 -0
  75. package/es/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.js +6 -0
  76. package/es/components/ImportModal/ImportModal.docs-page.js +18 -0
  77. package/es/components/ImportModal/ImportModal.js +13 -6
  78. package/es/components/MultiAddSelect/MultiAddSelect.docs-page.js +17 -0
  79. package/es/components/MultiAddSelect/MultiAddSelect.js +4 -0
  80. package/es/components/NotificationsPanel/preview-components/UnreadNotificationBell.js +2 -17
  81. package/es/components/PageHeader/PageHeader.js +2 -6
  82. package/es/components/PageHeader/PageHeaderUtils.js +2 -2
  83. package/es/components/RemoveModal/RemoveModal.docs-page.js +18 -0
  84. package/es/components/RemoveModal/RemoveModal.js +6 -0
  85. package/es/components/SidePanel/SidePanel.js +1 -3
  86. package/es/components/SingleAddSelect/SingleAddSelect.docs-page.js +15 -0
  87. package/es/components/SingleAddSelect/SingleAddSelect.js +4 -0
  88. package/es/components/StatusIcon/StatusIcon.docs-page.js +17 -0
  89. package/es/components/StatusIcon/StatusIcon.js +10 -0
  90. package/es/components/TagSet/TagSet.js +4 -7
  91. package/es/components/Tearsheet/TearsheetShell.js +11 -6
  92. package/es/components/Toolbar/Toolbar.docs-page.js +14 -0
  93. package/es/components/UserProfileImage/UserProfileImage.docs-page.js +17 -0
  94. package/es/components/UserProfileImage/UserProfileImage.js +14 -3
  95. package/es/components/WebTerminal/WebTerminal.docs-page.js +52 -0
  96. package/es/components/WebTerminal/WebTerminal.js +4 -0
  97. package/es/components/index.js +1 -1
  98. package/es/global/js/hooks/useCreateComponentStepChange.js +16 -15
  99. package/es/global/js/hooks/useResizeObserver.js +14 -28
  100. package/es/global/js/package-settings.js +14 -1
  101. package/es/global/js/utils/StoryDocsPage.js +218 -0
  102. package/es/global/js/utils/story-helper.js +108 -6
  103. package/lib/components/APIKeyModal/APIKeyModal.docs-page.js +37 -0
  104. package/lib/components/AboutModal/AboutModal.docs-page.js +32 -0
  105. package/lib/components/AboutModal/AboutModal.js +2 -4
  106. package/lib/components/ActionBar/ActionBar.js +2 -6
  107. package/lib/components/AddSelect/AddSelectFormControl.js +6 -6
  108. package/lib/components/AddSelect/AddSelectRow.js +15 -5
  109. package/lib/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +5 -6
  110. package/lib/components/ButtonMenu/ButtonMenu.js +4 -4
  111. package/lib/components/ButtonSetWithOverflow/ButtonSetWithOverflow.js +3 -9
  112. package/lib/components/Cascade/Cascade.docs-page.js +33 -0
  113. package/lib/components/Cascade/Cascade.js +11 -1
  114. package/lib/components/CreateFullPage/CreateFullPage.docs-page.js +50 -0
  115. package/lib/components/CreateFullPage/CreateFullPage.js +13 -0
  116. package/lib/components/CreateModal/CreateModal.docs-page.js +35 -0
  117. package/lib/components/CreateModal/CreateModal.js +7 -0
  118. package/lib/components/CreateSidePanel/CreateSidePanel.docs-page.js +29 -0
  119. package/lib/components/CreateSidePanel/CreateSidePanel.js +1 -1
  120. package/lib/components/CreateTearsheet/CreateTearsheet.docs-page.js +40 -0
  121. package/lib/components/DataSpreadsheet/DataSpreadsheet.js +3 -3
  122. package/lib/components/Datagrid/Datagrid/DatagridContent.js +1 -1
  123. package/lib/components/Datagrid/Datagrid/DatagridSelectAllWithToggle.js +3 -3
  124. package/lib/components/Datagrid/Datagrid/DatagridToolbar.js +25 -10
  125. package/lib/components/Datagrid/Datagrid/DatagridVirtualBody.js +1 -3
  126. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/TearsheetWrapper.js +1 -1
  127. package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +37 -45
  128. package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +20 -24
  129. package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/index.js +6 -6
  130. package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilterContext.js +20 -0
  131. package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +42 -13
  132. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +16 -30
  133. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.js +2 -2
  134. package/lib/components/Datagrid/index.js +8 -1
  135. package/lib/components/Datagrid/useActionsColumn.js +12 -7
  136. package/lib/components/Datagrid/useCustomizeColumns.js +10 -8
  137. package/lib/components/Datagrid/useExpandedRow.js +9 -6
  138. package/lib/components/Datagrid/useFiltering.js +10 -7
  139. package/lib/components/Datagrid/useInlineEdit.js +3 -0
  140. package/lib/components/Datagrid/useNestedRows.js +9 -6
  141. package/lib/components/Datagrid/useStickyColumn.js +10 -3
  142. package/lib/components/Datagrid/utils/DatagridActions.js +49 -57
  143. package/lib/components/EditFullPage/EditFullPage.docs-page.js +50 -0
  144. package/lib/components/EditFullPage/EditFullPage.js +2 -1
  145. package/lib/components/EditSidePanel/EditSidePanel.js +1 -1
  146. package/lib/components/EditTearsheet/EditTearsheet.docs-page.js +36 -0
  147. package/lib/components/EditTearsheet/EditTearsheet.js +4 -0
  148. package/lib/components/EditTearsheetNarrow/EditTearsheetNarrow.js +1 -1
  149. package/lib/components/EditUpdateCards/EditUpdateCards.js +3 -2
  150. package/lib/components/EmptyStates/EmptyState.js +4 -0
  151. package/lib/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +4 -0
  152. package/lib/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +4 -0
  153. package/lib/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +4 -0
  154. package/lib/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +4 -0
  155. package/lib/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +4 -0
  156. package/lib/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +4 -0
  157. package/lib/components/ExampleComponent/ExampleComponent.docs-page.js +33 -0
  158. package/lib/components/ExportModal/ExportModal.js +4 -0
  159. package/lib/components/HTTPErrors/HTTPError403/HTTPError403.js +6 -0
  160. package/lib/components/HTTPErrors/HTTPError404/HTTPError404.js +6 -0
  161. package/lib/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.js +6 -0
  162. package/lib/components/ImportModal/ImportModal.docs-page.js +26 -0
  163. package/lib/components/ImportModal/ImportModal.js +13 -6
  164. package/lib/components/MultiAddSelect/MultiAddSelect.docs-page.js +25 -0
  165. package/lib/components/MultiAddSelect/MultiAddSelect.js +4 -0
  166. package/lib/components/NotificationsPanel/preview-components/UnreadNotificationBell.js +2 -17
  167. package/lib/components/PageHeader/PageHeader.js +2 -6
  168. package/lib/components/PageHeader/PageHeaderUtils.js +2 -2
  169. package/lib/components/RemoveModal/RemoveModal.docs-page.js +26 -0
  170. package/lib/components/RemoveModal/RemoveModal.js +6 -0
  171. package/lib/components/SidePanel/SidePanel.js +1 -3
  172. package/lib/components/SingleAddSelect/SingleAddSelect.docs-page.js +23 -0
  173. package/lib/components/SingleAddSelect/SingleAddSelect.js +4 -0
  174. package/lib/components/StatusIcon/StatusIcon.docs-page.js +28 -0
  175. package/lib/components/StatusIcon/StatusIcon.js +10 -0
  176. package/lib/components/TagSet/TagSet.js +4 -7
  177. package/lib/components/Tearsheet/TearsheetShell.js +11 -6
  178. package/lib/components/Toolbar/Toolbar.docs-page.js +25 -0
  179. package/lib/components/UserProfileImage/UserProfileImage.docs-page.js +28 -0
  180. package/lib/components/UserProfileImage/UserProfileImage.js +14 -3
  181. package/lib/components/WebTerminal/WebTerminal.docs-page.js +63 -0
  182. package/lib/components/WebTerminal/WebTerminal.js +4 -0
  183. package/lib/components/index.js +6 -0
  184. package/lib/global/js/hooks/useCreateComponentStepChange.js +16 -15
  185. package/lib/global/js/hooks/useResizeObserver.js +13 -27
  186. package/lib/global/js/package-settings.js +14 -1
  187. package/lib/global/js/utils/StoryDocsPage.js +225 -0
  188. package/lib/global/js/utils/story-helper.js +115 -7
  189. package/package.json +4 -4
  190. package/scss/components/AddSelect/_add-select.scss +10 -6
  191. package/scss/components/BreadcrumbWithOverflow/_breadcrumb-with-overflow.scss +0 -1
  192. package/scss/components/ButtonMenu/_button-menu.scss +32 -1
  193. package/scss/components/Cascade/_storybook-styles.scss +3 -2
  194. package/scss/components/CreateFullPage/_create-full-page.scss +3 -3
  195. package/scss/components/CreateModal/_create-modal.scss +3 -3
  196. package/scss/components/CreateSidePanel/_create-side-panel.scss +4 -4
  197. package/scss/components/CreateTearsheet/_create-tearsheet.scss +2 -2
  198. package/scss/components/CreateTearsheet/_storybook-styles.scss +1 -1
  199. package/scss/components/CreateTearsheetNarrow/_create-tearsheet-narrow.scss +2 -2
  200. package/scss/components/DataSpreadsheet/_data-spreadsheet.scss +5 -5
  201. package/scss/components/DataSpreadsheet/_storybook-styles.scss +6 -0
  202. package/scss/components/Datagrid/_datagrid.scss +4 -2
  203. package/scss/components/Datagrid/_storybook-styles.scss +18 -4
  204. package/scss/components/Datagrid/styles/_datagrid.scss +26 -13
  205. package/scss/components/Datagrid/styles/addons/_FilterFlyout.scss +7 -0
  206. package/scss/components/Datagrid/styles/addons/_FilterPanel.scss +4 -0
  207. package/scss/components/EditSidePanel/_edit-side-panel.scss +2 -2
  208. package/scss/components/EditTearsheet/_edit-tearsheet.scss +2 -2
  209. package/scss/components/EditTearsheet/_storybook-styles.scss +1 -1
  210. package/scss/components/ImportModal/_import-modal.scss +1 -1
  211. package/scss/components/NotificationsPanel/_notifications-panel.scss +3 -3
  212. package/scss/components/NotificationsPanel/_storybook-styles.scss +10 -2
  213. package/scss/components/OptionsTile/_storybook-styles.scss +1 -1
  214. package/scss/components/PageHeader/_page-header.scss +4 -5
  215. package/scss/components/PageHeader/_storybook-styles.scss +24 -14
  216. package/scss/components/Saving/_saving.scss +1 -1
  217. package/scss/components/SidePanel/_side-panel.scss +3 -5
  218. package/scss/components/TagSet/_tag-set.scss +1 -1
  219. package/scss/components/Tearsheet/_tearsheet.scss +9 -8
  220. package/scss/components/UserProfileImage/_user-profile-image.scss +2 -2
  221. package/scss/components/WebTerminal/_storybook-styles.scss +11 -1
  222. package/scss/global/styles/_display-box.scss +1 -0
  223. package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useInitialStateFromFilters.js +0 -21
  224. package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useInitialStateFromFilters.js +0 -30
  225. package/scss/components/HTTPErrors/_storybook-styles.scss +0 -6
@@ -0,0 +1,39 @@
1
+ import React from 'react';
2
+ import { StoryDocsPage } from '../../global/js/utils/StoryDocsPage';
3
+ import * as stories from './EditFullPage.stories';
4
+ var DocsPage = function DocsPage() {
5
+ return /*#__PURE__*/React.createElement(StoryDocsPage, {
6
+ altGuidelinesHref: "https://pages.github.ibm.com/cdai-design/pal/patterns/edit/usage#full-page-edit",
7
+ blocks: [{
8
+ description: "There are **2** components that make up a Create Full Page component, which can\nbe used in unison to create the desired look, or flow. Please note, to utilize\nthe Create Full Page component, you'll need to have a minimum of two steps. If\nyou are looking for a one step creation flow, consider Create Tearsheet, Create\nSide Panel, or Create Modal."
9
+ }, {
10
+ story: stories.editFullPage,
11
+ description: "This is used when you have one section per step. This can be created by passing\nin the overall `<CreateFullPage />` component and the `<CreateFullPageStep />`\ncomponent with form items as children:",
12
+ source: {
13
+ code: "<CreateFullPage {...props}>\n <CreateFullPageStep\n title=\"Required title\"\n subtitle=\"Optional subtitle\"\n description=\"Optional description\"\n onNext={() => {'Optional function'}}\n >\n <Row>\n <Column xlg={5} lg={5} md={4} sm={4}>\n <TextInput\n id=\"test-1\"\n invalidText=\"A valid value is required\"\n labelText=\"Topic name\"\n placeholder=\"Enter topic name\"\n />\n </Column>\n </Row>\n </CreateFullPageStep>\n </CreateFullPage>"
14
+ }
15
+ }, {
16
+ story: stories.editFullPageWithSections,
17
+ description: "This is used when you have several sections per step. This can be created by\npassing in the overall `<CreateFullPage />` component and the\n`<CreateFullPageStep />` component for the first `section`. All additional\n`sections` must be passed in as children, as shown below:",
18
+ source: {
19
+ code: "<CreateFullPageStep\n title=\"Required title\"\n subtitle=\"Optional subtitle\"\n description=\"Optional description\"\n onNext={() => {'Optional function'}}\n >\n <Row>\n <Column xlg={5} lg={5} md={4} sm={4}>\n <fieldset className={`#{$pkg-prefix}--create-full-page__step-fieldset`}>\n <TextInput\n id=\"test-1\"\n invalidText=\"A valid value is required\"\n labelText=\"Topic name\"\n placeholder=\"Enter topic name\"\n />\n </fieldset>\n </Column>\n </Row>\n <span className={`#{$pkg-prefix}--create-full-page__section-divider`} />\n <h5 className={`#{$pkg-prefix}--create-full-page__step-title`}>Required title</h5>\n <h6 className={`#{$pkg-prefix}--create-full-page__step-subtitle`}>\n Optional subtitle\n </h6>\n <p className={`#{$pkg-prefix}--create-full-page__step-description`}>\n Optional description\n </p>\n <Row>\n <Column xlg={5} lg={5} md={4} sm={4}>\n <fieldset className={`#{$pkg-prefix}--create-full-page__step-fieldset`}>\n <TextInput\n id=\"test-2\"\n invalidText=\"A valid value is required\"\n labelText=\"Topic name\"\n placeholder=\"Enter topic name\"\n />\n </fieldset>\n </Column>\n </Row>\n</CreateFullPageStep>"
20
+ }
21
+ }, {
22
+ title: 'Using custom components',
23
+ description: "It is possible to use custom components that return `CreateFullPageStep`s in\norder to help reduce the amount of logic in the component that contains the main\n`CreateFullPage`. _It is required that each child of the `CreateFullPage` either\nbe a custom step or a `CreateFullPageStep`_. An example of this could look like\nthe following:",
24
+ source: {
25
+ code: "const CreateStepCustom = ({ subtitle, ...rest }) => {\n return (\n <CreateFullPageStep\n {...rest}\n subtitle={subtitle}\n title=\"Step 1\"\n onNext={() => console.log('optional validation check')}\n onMount={() => console.log('optional onMount fn')}\n disableSubmit={false}\n >\n step content here\n </CreateFullPageStep>\n );\n};\n\nconst CreateComponent = () => {\n return (\n <CreateFullPage {...createFullPageProps}>\n <CreateStepCustom subtitle=\"Custom step subtitle\" />\n <CreateFullPageStep\n title=\"Topic name\"\n fieldsetLegendText=\"Topic information\"\n disableSubmit={!value}\n subtitle=\"This is the unique name used to recognize your topic\"\n description=\"It will also be used by your producers and consumers as part of the\n connection information, so make it something easy to recognize.\"\n >\n Content for second step\n </CreateFullPageStep>\n </CreateFullPage>\n );\n};"
26
+ }
27
+ }, {
28
+ title: 'Using dynamic steps',
29
+ description: "The use of dynamic steps can be utilized in a scenario when the user makes a\ncertain selection on one step that effects which steps will follow it, this is\ncontrolled via the `includeStep` prop. See abbreviated example below:",
30
+ source: {
31
+ code: "import { useState } from 'react';\n\nconst CreateFlow = () => {\n const [shouldIncludeAdditionalStep, setShouldIncludeAdditionalStep] =\n useState(false);\n return (\n <CreateFullPage {...createFullPageProps}>\n <CreateFullPageStep {...step1Props}>\n Step 1 content\n <Checkbox\n labelText={`Include additional step`}\n id=\"include-additional-step-checkbox\"\n onChange={(value) => setShouldIncludeAdditionalStep(value)}\n checked={shouldIncludeAdditionalStep}\n />\n </CreateFullPageStep>\n <CreateFullPageStep\n {...step2Props}\n includeStep={shouldIncludeAdditionalStep}\n >\n Dynamic step content\n </CreateFullPageStep>\n <CreateFullPageStep {...step3Props}>\n Final step content\n </CreateFullPageStep>\n </CreateFullPage>\n );\n};"
32
+ }
33
+ }, {
34
+ title: 'Class names',
35
+ description: "Additionally, to get the preferred styling when including your own children as\nsections, you can utilize the below included class names.\n\n| Class name | Element | Features |\n| ---------------------------------------------------- | ----------- | ---------------------------------------------------------- |\n| `#{$pkg-prefix}--create-full-page__step-title` | title | `productive-heading-04` & `margin-bottom` of `$spacing-05` |\n| `#{$pkg-prefix}--create-full-page__step-subtitle` | subtitle | `productive-heading-01` & `margin-bottom` of `$spacing-03` |\n| `#{$pkg-prefix}--create-full-page__step-description` | description | `body-long-01` & `margin-bottom` of `$spacing-06` |\n| `#{$pkg-prefix}--create-full-page__step-fieldset` | fieldset | `margin-bottom` of `$spacing-05` to all children elements |\n| `#{$pkg-prefix}--create-full-page__section-divider` | divider | Includes a `1px` divider line inside the `main` content |\n"
36
+ }]
37
+ });
38
+ };
39
+ export default DocsPage;
@@ -41,7 +41,8 @@ var componentName = 'EditFullPage';
41
41
  // };
42
42
 
43
43
  /**
44
- * TODO: A description of the component.
44
+ * Use when settings on a page need to always be shown in edit mode, or when the context of the page is needed to make several changes.
45
+ * See usage guidance for further details.
45
46
  */
46
47
  export var EditFullPage = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
47
48
  var children = _ref.children,
@@ -38,7 +38,7 @@ var defaults = {
38
38
  };
39
39
 
40
40
  /**
41
- * TODO: A description of the component.
41
+ * Use with medium complexity edits if the user needs page context.
42
42
  */
43
43
  export var EditSidePanel = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
44
44
  var children = _ref.children,
@@ -0,0 +1,25 @@
1
+ import React from 'react';
2
+ import { StoryDocsPage } from '../../global/js/utils/StoryDocsPage';
3
+ import * as stories from './EditTearsheet.stories';
4
+ var DocsPage = function DocsPage() {
5
+ return /*#__PURE__*/React.createElement(StoryDocsPage, {
6
+ altGuidelinesHref: "https://pages.github.ibm.com/cdai-design/pal/patterns/edit/usage#tearsheet-edit",
7
+ blocks: [{
8
+ story: stories.multiFormEditTearsheet,
9
+ description: "This is used when you have one section per step. This can be created by passing\nin the overall `<EditTearsheet />` component and the `<EditTearsheetForm />`\ncomponent with form items as children:",
10
+ source: {
11
+ code: "<EditTearsheet {...props}>\n <EditTearsheetForm\n title=\"Required title\"\n subtitle=\"Optional subtitle\"\n description=\"Optional description\"\n onNext={() => {\n 'Optional function';\n }}\n >\n <TextInput\n id=\"test-1\"\n invalidText=\"A valid value is required\"\n labelText=\"Topic name\"\n placeholder=\"Enter topic name\"\n />\n </EditTearsheetForm>\n</EditTearsheet>"
12
+ }
13
+ }, {
14
+ title: 'Using custom components',
15
+ description: "It is possible to use custom components that return `EditTearsheetForms` in\norder to help reduce the amount of logic in the component that contains the main\n`EditTearsheet`. _It is required that each child of the `EditTearsheet` either\nbe a custom step or a `EditTearsheetForm`_. An example of this could look like\nthe following:",
16
+ source: {
17
+ code: "const CreateFormCustom = ({ subtitle, ...rest }) => {\n return (\n <EditTearsheetForm {...rest} subtitle={subtitle} title=\"Form 1\">\n form content here\n </EditTearsheetForm>\n );\n};\n\nconst CreateComponent = () => {\n return (\n <EditTearsheet {...EditTearsheetProps}>\n <CreateFormCustom subtitle=\"Custom form subtitle\" />\n <EditTearsheetForm\n title=\"Topic name\"\n fieldsetLegendText=\"Topic information\"\n subtitle=\"This is the unique name used to recognize your topic\"\n description=\"It will also be used by your producers and consumers as part of the\n connection information, so make it something easy to recognize.\"\n >\n Content for second form\n </EditTearsheetForm>\n </EditTearsheet>\n );\n};"
18
+ }
19
+ }, {
20
+ title: "Class names",
21
+ description: "Additionally, to get the preferred styling when including your own children as\nsections, you can utilize the below included class names.\n\n| Class name | Element | Features |\n| ----------------------------------------------------- | ----------- | ---------------------------------------------------------- |\n| `#{$pkg-prefix}--create-tearsheet__form--title` | title | `productive-heading-04` & `margin-bottom` of `$spacing-05` |\n| `#{$pkg-prefix}--create-tearsheet__form--subtitle` | subtitle | `productive-heading-01` & `margin-bottom` of `$spacing-03` |\n| `#{$pkg-prefix}--create-tearsheet__form--description` | description | `body-long-01` & `margin-bottom` of `$spacing-06` |\n| `#{$pkg-prefix}--create-tearsheet__form--fieldset` | fieldset | `margin-bottom` of `$spacing-05` to all children elements |\n"
22
+ }]
23
+ });
24
+ };
25
+ export default DocsPage;
@@ -33,6 +33,10 @@ var defaults = {
33
33
  verticalPosition: 'normal',
34
34
  influencerWidth: 'narrow'
35
35
  };
36
+
37
+ /**
38
+ * Use Tearsheet with medium to complex edits. See usage guidance for further information.
39
+ */
36
40
  export var EditTearsheet = /*#__PURE__*/forwardRef(function (_ref, ref) {
37
41
  var cancelButtonText = _ref.cancelButtonText,
38
42
  children = _ref.children,
@@ -41,7 +41,7 @@ var componentName = 'EditTearsheetNarrow';
41
41
  // };
42
42
 
43
43
  /**
44
- * TODO: A description of the component.
44
+ * Use a narrow tearsheet as an alternative to a modal when there is scrolling. See usage guidance for further information.
45
45
  */
46
46
  export var EditTearsheetNarrow = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
47
47
  var children = _ref.children,
@@ -44,9 +44,10 @@ var componentName = 'EditUpdateCards';
44
44
  // };
45
45
 
46
46
  /**
47
- * TODO: A description of the component.
47
+ Editable cards allow a user to view, modify, and save the content contained within the card.
48
+ These cards are generally used in instances where a user needs to make changes to a resource instances
49
+ (ex. configuration details), account plan, etc. Editable cards allow a user to edit something within context.
48
50
  */
49
-
50
51
  export var EditUpdateCards = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
51
52
  var actionIcons = _ref.actionIcons,
52
53
  actionsPlacement = _ref.actionsPlacement,
@@ -32,6 +32,10 @@ export var defaults = {
32
32
  position: 'top',
33
33
  size: 'lg'
34
34
  };
35
+
36
+ /**
37
+ * The `EmptyState` component follows the Carbon guidelines for empty states with some added specifications around illustration usage. For additional usage guidelines and documentation please refer to the links above.
38
+ */
35
39
  export var EmptyState = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
36
40
  var action = _ref.action,
37
41
  className = _ref.className,
@@ -27,6 +27,10 @@ import { defaults } from '../EmptyState';
27
27
  // The block part of our conventional BEM class names (blockClass__E--M).
28
28
  var blockClass = "".concat(pkg.prefix, "--empty-state");
29
29
  var componentName = 'ErrorEmptyState';
30
+
31
+ /**
32
+ * The `EmptyState` component follows the Carbon guidelines for empty states with some added specifications around illustration usage. For additional usage guidelines and documentation please refer to the links above.
33
+ */
30
34
  export var ErrorEmptyState = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
31
35
  var action = _ref.action,
32
36
  className = _ref.className,
@@ -27,6 +27,10 @@ import { defaults } from '../EmptyState';
27
27
  // The block part of our conventional BEM class names (blockClass__E--M).
28
28
  var blockClass = "".concat(pkg.prefix, "--empty-state");
29
29
  var componentName = 'NoDataEmptyState';
30
+
31
+ /**
32
+ * The `EmptyState` component follows the Carbon guidelines for empty states with some added specifications around illustration usage. For additional usage guidelines and documentation please refer to the links above.
33
+ */
30
34
  export var NoDataEmptyState = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
31
35
  var action = _ref.action,
32
36
  className = _ref.className,
@@ -27,6 +27,10 @@ import { defaults } from '../EmptyState';
27
27
  // The block part of our conventional BEM class names (blockClass__E--M).
28
28
  var blockClass = "".concat(pkg.prefix, "--empty-state");
29
29
  var componentName = 'NoTagsEmptyState';
30
+
31
+ /**
32
+ * The `EmptyState` component follows the Carbon guidelines for empty states with some added specifications around illustration usage. For additional usage guidelines and documentation please refer to the links above.
33
+ */
30
34
  export var NoTagsEmptyState = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
31
35
  var action = _ref.action,
32
36
  className = _ref.className,
@@ -27,6 +27,10 @@ import { defaults } from '../EmptyState';
27
27
  // The block part of our conventional BEM class names (blockClass__E--M).
28
28
  var blockClass = "".concat(pkg.prefix, "--empty-state");
29
29
  var componentName = 'NotFoundEmptyState';
30
+
31
+ /**
32
+ * The `EmptyState` component follows the Carbon guidelines for empty states with some added specifications around illustration usage. For additional usage guidelines and documentation please refer to the links above.
33
+ */
30
34
  export var NotFoundEmptyState = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
31
35
  var action = _ref.action,
32
36
  className = _ref.className,
@@ -27,6 +27,10 @@ import { defaults } from '../EmptyState';
27
27
  // The block part of our conventional BEM class names (blockClass__E--M).
28
28
  var blockClass = "".concat(pkg.prefix, "--empty-state");
29
29
  var componentName = 'NotificationsEmptyState';
30
+
31
+ /**
32
+ * The `EmptyState` component follows the Carbon guidelines for empty states with some added specifications around illustration usage. For additional usage guidelines and documentation please refer to the links above.
33
+ */
30
34
  export var NotificationsEmptyState = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
31
35
  var action = _ref.action,
32
36
  className = _ref.className,
@@ -27,6 +27,10 @@ import { defaults } from '../EmptyState';
27
27
  // The block part of our conventional BEM class names (blockClass__E--M).
28
28
  var blockClass = "".concat(pkg.prefix, "--empty-state");
29
29
  var componentName = 'UnauthorizedEmptyState';
30
+
31
+ /**
32
+ * The `EmptyState` component follows the Carbon guidelines for empty states with some added specifications around illustration usage. For additional usage guidelines and documentation please refer to the links above.
33
+ */
30
34
  export var UnauthorizedEmptyState = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
31
35
  var action = _ref.action,
32
36
  className = _ref.className,
@@ -0,0 +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 from 'react';
8
+ import { StoryDocsPage } from '../../global/js/utils/StoryDocsPage';
9
+ import * as stories from './ExampleComponent.stories';
10
+
11
+ /**
12
+ * OPTIONAL: required only to customize default docs page
13
+ */
14
+ var DocsPage = function DocsPage() {
15
+ return /*#__PURE__*/React.createElement(StoryDocsPage, {
16
+ blocks: [{
17
+ description: 'Here it is in use.',
18
+ story: stories.exampleComponent
19
+ }]
20
+ });
21
+ };
22
+ export default DocsPage;
@@ -28,6 +28,10 @@ var defaults = {
28
28
  preformattedExtensions: Object.freeze([]),
29
29
  validExtensions: Object.freeze([])
30
30
  };
31
+
32
+ /**
33
+ * Modal dialog version of the export pattern
34
+ */
31
35
  export var ExportModal = /*#__PURE__*/forwardRef(function (_ref, ref) {
32
36
  var body = _ref.body,
33
37
  className = _ref.className,
@@ -22,6 +22,12 @@ import { pkg } from '../../../settings';
22
22
  // The block part of our conventional BEM class names (blockClass__E--M).
23
23
  var blockClass = "".concat(pkg.prefix, "--http-errors");
24
24
  var componentName = 'HTTPError403';
25
+
26
+ /**
27
+ * HTTP errors are used in an attempt to access something that isn’t available or
28
+ the user doesn’t have permission for. This HTTPError component is generic so you
29
+ can use it when you receive an error code that isn't provided.
30
+ */
25
31
  export var HTTPError403 = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
26
32
  var className = _ref.className,
27
33
  description = _ref.description,
@@ -22,6 +22,12 @@ import { pkg } from '../../../settings';
22
22
  // The block part of our conventional BEM class names (blockClass__E--M).
23
23
  var blockClass = "".concat(pkg.prefix, "--http-errors");
24
24
  var componentName = 'HTTPError404';
25
+
26
+ /**
27
+ * HTTP errors are used in an attempt to access something that isn’t available or
28
+ the user doesn’t have permission for. This HTTPError component is generic so you
29
+ can use it when you receive an error code that isn't provided.
30
+ */
25
31
  export var HTTPError404 = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
26
32
  var className = _ref.className,
27
33
  description = _ref.description,
@@ -22,6 +22,12 @@ import { pkg } from '../../../settings';
22
22
  // The block part of our conventional BEM class names (blockClass__E--M).
23
23
  var blockClass = "".concat(pkg.prefix, "--http-errors");
24
24
  var componentName = 'HTTPErrorOther';
25
+
26
+ /**
27
+ * HTTP errors are used in an attempt to access something that isn’t available or
28
+ the user doesn’t have permission for. This HTTPError component is generic so you
29
+ can use it when you receive an error code that isn't provided.
30
+ */
25
31
  export var HTTPErrorOther = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
26
32
  var className = _ref.className,
27
33
  description = _ref.description,
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ import { StoryDocsPage } from '../../global/js/utils/StoryDocsPage';
3
+ import { useOf } from '@storybook/blocks';
4
+ import { storyDocsGuidelines } from '../../global/js/utils/story-helper';
5
+ var DocsPage = function DocsPage() {
6
+ var _useOf = useOf('meta', ['meta']),
7
+ csfFile = _useOf.csfFile;
8
+ return /*#__PURE__*/React.createElement(StoryDocsPage, {
9
+ altGuidelinesHref: [storyDocsGuidelines(csfFile), {
10
+ href: 'https://www.carbondesignsystem.com/components/modal/usage',
11
+ label: 'Carbon Modal usage guidelines'
12
+ }, {
13
+ href: 'https://react.carbondesignsystem.com/?path=/docs/modal--default',
14
+ label: 'Carbon Modal documentation'
15
+ }]
16
+ });
17
+ };
18
+ export default DocsPage;
@@ -179,6 +179,13 @@ export var ImportModal = /*#__PURE__*/forwardRef(function (_ref, ref) {
179
179
  var inputHandler = function inputHandler(evt) {
180
180
  setImportUrl(evt.target.value);
181
181
  };
182
+ var onCloseHandler = function onCloseHandler() {
183
+ setFiles([]);
184
+ setImportUrl('');
185
+ if (onClose) {
186
+ onClose();
187
+ }
188
+ };
182
189
  var numberOfFiles = files.length;
183
190
  var numberOfValidFiles = files.filter(function (f) {
184
191
  return !f.invalid;
@@ -190,13 +197,13 @@ export var ImportModal = /*#__PURE__*/forwardRef(function (_ref, ref) {
190
197
  var blockClass = "".concat(pkg.prefix, "--import-modal");
191
198
  return /*#__PURE__*/React.createElement(ComposedModal, _extends({}, rest, _objectSpread({
192
199
  open: open,
193
- ref: ref,
194
- onClose: onClose
200
+ ref: ref
195
201
  }, getDevtoolsProps(componentName)), {
196
202
  "aria-label": title,
197
203
  className: cx(blockClass, className),
198
204
  size: "sm",
199
- preventCloseOnClickOutside: true
205
+ preventCloseOnClickOutside: true,
206
+ onClose: onCloseHandler
200
207
  }), /*#__PURE__*/React.createElement(ModalHeader, {
201
208
  className: "".concat(blockClass, "__header"),
202
209
  title: title
@@ -259,7 +266,7 @@ export var ImportModal = /*#__PURE__*/forwardRef(function (_ref, ref) {
259
266
  }, /*#__PURE__*/React.createElement(Button, {
260
267
  type: "button",
261
268
  kind: "secondary",
262
- onClick: onClose
269
+ onClick: onCloseHandler
263
270
  }, secondaryButtonText), /*#__PURE__*/React.createElement(Button, {
264
271
  type: "submit",
265
272
  kind: "primary",
@@ -362,11 +369,11 @@ ImportModal.propTypes = {
362
369
  /**
363
370
  * Specify a handler for "submitting" modal. Access the imported file via `file => {}`
364
371
  */
365
- onRequestSubmit: PropTypes.func,
372
+ onRequestSubmit: PropTypes.func.isRequired,
366
373
  /**
367
374
  * Specify whether the Modal is currently open
368
375
  */
369
- open: PropTypes.bool,
376
+ open: PropTypes.bool.isRequired,
370
377
  /**
371
378
  * Specify the text for the primary button
372
379
  */
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import { StoryDocsPage } from '../../global/js/utils/StoryDocsPage';
3
+ var DocsPage = function DocsPage() {
4
+ return /*#__PURE__*/React.createElement(StoryDocsPage, {
5
+ altGuidelinesHref: "https://pages.github.ibm.com/cdai-design/pal/patterns/add-and-select/usage",
6
+ blocks: [{
7
+ title: 'Structuring items',
8
+ description: "The `items` object has a lot of customization potential and can greatly effect\nthe way the component is displayed and how you interact with it.\n\nLet's walk through an example.",
9
+ source: {
10
+ code: "items: {\n modifiers: { // adds a modifier dropdown inside the items\n label: PropTypes.string, // label for the dropdown\n options: PropTypes.array, // list of options / values for the dropdown\n },\n sortBy: ['title'], // designates which properties should be used to sort the column when using a hierarchy\n entries: [ // the actual list of items / entries\n {\n id: '1', // required unique id for the entry\n value: '1', // required value of the entry\n title: 'item 1', // required title to display\n subtitle: 'item 1 subtitle', // subtitle to display\n children: { // designates if entry has children. if the children prop is found a hierarchy list will be used\n sortBy: ['title', 'size'],\n filterBy: 'fileType', // designates which property should be used to filter the column of items\n entries: [\n {\n id: '1-1',\n value: 'file1.pdf',\n title: 'file1.pdf',\n fileType: 'pdf',\n size: '100',\n icon: Document16, // designates if an icon should be displayed. While similar to avatar icon, both have different displays.\n tag: 'business',\n avatar: { // designates if an avatar should be displayed\n alt: 'alt text',\n icon: <Icon />,\n src: 'avatar.png',\n },\n },\n ],\n },\n },\n ],\n}"
11
+ }
12
+ }, {
13
+ description: "The properties that have been commented on like `id`, `value`, and `icon` have\nspecific use within the component and are generally required. Other properties\nlike `fileType` and `size` do not and will simply show up as details in the\nsidebar when selected."
14
+ }]
15
+ });
16
+ };
17
+ export default DocsPage;
@@ -12,6 +12,10 @@ import { AddSelect } from '../AddSelect';
12
12
  import { getDevtoolsProps } from '../../global/js/utils/devtools';
13
13
  import { pkg } from '../../settings';
14
14
  var componentName = 'MultiAddSelect';
15
+
16
+ /**
17
+ * Used to add or select multiple or more items from larger lists or hierarchies.
18
+ */
15
19
  export var MultiAddSelect = /*#__PURE__*/forwardRef(function (props, ref) {
16
20
  return /*#__PURE__*/React.createElement(AddSelect, _extends({}, props, {
17
21
  multi: true,
@@ -15,34 +15,19 @@ var UnreadNotificationBell = function UnreadNotificationBell() {
15
15
  xmlns: "http://www.w3.org/2000/svg",
16
16
  xmlnsXlink: "http://www.w3.org/1999/xlink"
17
17
  }, /*#__PURE__*/React.createElement("title", null, "Unread notification bell"), /*#__PURE__*/React.createElement("g", {
18
- id: "Page-1",
19
- stroke: "none",
20
- strokeWidth: "1",
21
- fill: "none",
22
- fillRule: "evenodd"
23
- }, /*#__PURE__*/React.createElement("g", {
24
18
  id: "Group",
25
19
  transform: "translate(-1.000000, 0.000000)"
26
- }, /*#__PURE__*/React.createElement("g", {
27
- id: "notification"
28
20
  }, /*#__PURE__*/React.createElement("path", {
29
21
  d: "M17.9419375,12.058125 L16.25,10.3661875 L16.25,8.125 C16.245845,4.91692673 13.816599,2.23147626 10.625,1.90675 L10.625,0.625 L9.375,0.625 L9.375,1.90675 C6.183401,2.23147626 3.754155,4.91692673 3.75,8.125 L3.75,10.3661875 L2.0580625,12.058125 C1.94086706,12.1753182 1.875,12.3342622 1.875,12.5 L1.875,14.375 C1.875,14.720178 2.15482203,15 2.5,15 L6.875,15 L6.875,15.4855 C6.84694527,17.1272367 8.05869477,18.5271305 9.6875,18.7346875 C10.5660567,18.8218694 11.4405518,18.5337871 12.0952737,17.9415019 C12.7499955,17.3492167 13.1239886,16.5078712 13.125,15.625 L13.125,15 L17.5,15 C17.845178,15 18.125,14.720178 18.125,14.375 L18.125,12.5 C18.125,12.3342622 18.0591329,12.1753182 17.9419375,12.058125 Z M11.875,15.625 C11.875,16.6605339 11.0355339,17.5 10,17.5 C8.96446609,17.5 8.125,16.6605339 8.125,15.625 L8.125,15 L11.875,15 L11.875,15.625 Z M16.875,13.75 L3.125,13.75 L3.125,12.7588125 L4.816875,11.066875 C4.93409336,10.949692 4.9999646,10.7907468 5,10.625 L5,8.125 C5,5.36357625 7.23857625,3.125 10,3.125 C12.7614237,3.125 15,5.36357625 15,8.125 L15,10.625 C15.0000354,10.7907468 15.0659066,10.949692 15.183125,11.066875 L16.875,12.7588125 L16.875,13.75 Z",
30
22
  id: "Shape",
31
- fill: "#FFFFFF",
32
23
  fillRule: "nonzero"
33
- }), /*#__PURE__*/React.createElement("rect", {
34
- id: "_Transparent_Rectangle_",
35
- x: "0",
36
- y: "0",
37
- width: "20",
38
- height: "20"
39
- })), /*#__PURE__*/React.createElement("circle", {
24
+ }), /*#__PURE__*/React.createElement("circle", {
40
25
  id: "Oval",
41
26
  stroke: "#161616",
42
27
  fill: "#DA1E28",
43
28
  cx: "15",
44
29
  cy: "4.375",
45
30
  r: "2.5"
46
- }))));
31
+ })));
47
32
  };
48
33
  export { UnreadNotificationBell };
@@ -314,12 +314,8 @@ export var PageHeader = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
314
314
  utilSetCollapsed(collapseHeader, metrics.headerOffset, metrics.headerTopValue);
315
315
  }
316
316
  }, [collapseHeader, metrics.headerOffset, metrics.headerTopValue]);
317
- useResizeObserver(sizingContainerRef, {
318
- callback: handleResizeActionBarColumn
319
- });
320
- useResizeObserver(headerRef, {
321
- callback: handleResize
322
- });
317
+ useResizeObserver(sizingContainerRef, handleResizeActionBarColumn);
318
+ useResizeObserver(headerRef, handleResize);
323
319
 
324
320
  // Determine what form of title to display in the breadcrumb
325
321
  var breadcrumbItemForTitle = utilGetBreadcrumbItemForTitle(blockClass, collapseTitle, title);
@@ -65,11 +65,11 @@ export var utilCheckUpdateVerticalSpace = function utilCheckUpdateVerticalSpace(
65
65
  var scrollableContainer = scrollableAncestor(headerRef.current);
66
66
 
67
67
  /* istanbul ignore next */
68
- var scrollableContainerTop = scrollableContainer ? scrollableContainer.scrollTop - scrollableContainer.offsetTop : 0;
68
+ var scrollableContainerTop = scrollableContainer ? scrollableContainer.scrollTop - scrollableContainer.getBoundingClientRect().top : 0;
69
69
 
70
70
  // The header offset calculation is either going to work out at 0 if we have no gap between scrolling container
71
71
  // top and the measuring ref top, or the difference between. It does not change on scroll or resize.
72
- update.headerOffset = scrollableContainerTop + offsetTopMeasuringRef.current.getBoundingClientRect().top;
72
+ update.headerOffset = (offsetTopMeasuringRef.current ? offsetTopMeasuringRef.current.getBoundingClientRect().top : 0) + scrollableContainerTop;
73
73
 
74
74
  /* istanbul ignore next */
75
75
  update.breadcrumbRowHeight = breadcrumbRowEl ? breadcrumbRowEl.clientHeight : 0;
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ import { StoryDocsPage } from '../../global/js/utils/StoryDocsPage';
3
+ import { useOf } from '@storybook/blocks';
4
+ import { storyDocsGuidelines } from '../../global/js/utils/story-helper';
5
+ var DocsPage = function DocsPage() {
6
+ var _useOf = useOf('meta', ['meta']),
7
+ csfFile = _useOf.csfFile;
8
+ return /*#__PURE__*/React.createElement(StoryDocsPage, {
9
+ altGuidelinesHref: [storyDocsGuidelines(csfFile), {
10
+ href: 'https://www.carbondesignsystem.com/components/modal/usage',
11
+ label: 'Carbon Modal usage guidelines'
12
+ }, {
13
+ href: 'https://react.carbondesignsystem.com/?path=/docs/modal--default',
14
+ label: 'Carbon Modal documentation'
15
+ }]
16
+ });
17
+ };
18
+ export default DocsPage;
@@ -21,6 +21,12 @@ import uuidv4 from '../../global/js/utils/uuidv4';
21
21
  import { pkg } from '../../settings';
22
22
  import { usePreviousValue } from '../../global/js/hooks';
23
23
  var componentName = 'RemoveModal';
24
+
25
+ /**
26
+ The `RemoveModal` covers what is known as high impact and medium impact deleting.
27
+ Enabling `textConfirmation` enables what would be considered the high impact state of the modal.
28
+ For additional information on differentiating between delete / remove and low / medium / high impact please refer to the usage guidelines.
29
+ */
24
30
  export var RemoveModal = /*#__PURE__*/forwardRef(function (_ref, ref) {
25
31
  var body = _ref.body,
26
32
  className = _ref.className,
@@ -444,9 +444,7 @@ export var SidePanel = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
444
444
  }, title));
445
445
  };
446
446
  var contentRef = ref || sidePanelRef;
447
- useResizeObserver(contentRef, {
448
- callback: handleResize
449
- });
447
+ useResizeObserver(contentRef, handleResize);
450
448
  return /*#__PURE__*/React.createElement(AnimatePresence, null, open && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(motion.div, _extends({}, getDevtoolsProps(componentName), rest, {
451
449
  id: "".concat(blockClass, "-outer"),
452
450
  className: mainPanelClassNames,
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import { StoryDocsPage } from '../../global/js/utils/StoryDocsPage';
3
+ var DocsPage = function DocsPage() {
4
+ return /*#__PURE__*/React.createElement(StoryDocsPage, {
5
+ altGuidelinesHref: "https://pages.github.ibm.com/cdai-design/pal/patterns/add-and-select/usage",
6
+ blocks: [{
7
+ title: 'Structuring items',
8
+ description: "The `items` object has a lot of customization potential and can greatly effect\nthe way the component is displayed and how you interact with it..\n\nLet's walk through an example.",
9
+ source: {
10
+ code: "items: {\n entries: [ // the actual list of items / entries\n {\n id: '1', // required unique id for the entry\n value: '1', // required value of the entry\n title: 'item 1', // required title to display\n subtitle: 'item 1 subtitle', // subtitle to display\n children: { // designates if entry has children. if the children prop is found a hierarchy list will be used\n entries: [\n {\n id: '1-1',\n value: 'file1.pdf',\n title: 'file1.pdf',\n },\n ],\n },\n },\n ],\n}"
11
+ }
12
+ }]
13
+ });
14
+ };
15
+ export default DocsPage;
@@ -13,6 +13,10 @@ import { getDevtoolsProps } from '../../global/js/utils/devtools';
13
13
  import { pkg } from '../../settings';
14
14
  import { prepareProps } from '../../global/js/utils/props-helper';
15
15
  var componentName = 'SingleAddSelect';
16
+
17
+ /**
18
+ * Used to add or select one or more items from larger lists or hierarchies.
19
+ */
16
20
  export var SingleAddSelect = /*#__PURE__*/forwardRef(function (props, ref) {
17
21
  // remove multi add select specific props
18
22
  var validProps = prepareProps(props, ['columnInputPlaceholder', 'globalFilters', 'globalFiltersIconDescription', 'globalFiltersPlaceholderText', 'globalFiltersPrimaryButtonText', 'globalFiltersSecondaryButtonText', 'influencerTitle', 'multi', 'noSelectionDescription', 'noSelectionTitle', 'removeIconDescription']);
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import { StoryDocsPage } from '../../global/js/utils/StoryDocsPage';
3
+ import * as stories from './StatusIcon.stories';
4
+ var DocsPage = function DocsPage() {
5
+ return /*#__PURE__*/React.createElement(StoryDocsPage, {
6
+ blocks: [{
7
+ story: stories.Default
8
+ }, {
9
+ title: 'Accessibility',
10
+ description: "The `StatusIcon` component follows the Carbon guidelines for status icons with\nsome added specifications around illustration usage. For additional usage\nguidelines and documentation please refer to the links above.\n\n_Status icons_ are an important method of communicating severity level\ninformation to users. The shapes and colors, communicate severity that enable\nusers to quickly assess and identify status and respond accordingly."
11
+ }, {
12
+ title: 'Sizing',
13
+ description: "\n| Size | Pixels |\n| ------- | ------- |\n| small | 16 x 16 |\n| medium | 20 x 20 |\n| large | 24 x 24 |\n| x-large | 32 x 32 |\n "
14
+ }]
15
+ });
16
+ };
17
+ export default DocsPage;
@@ -16,6 +16,16 @@ import { getDevtoolsProps } from '../../global/js/utils/devtools';
16
16
  import { pkg } from '../../settings';
17
17
  var blockClass = "".concat(pkg.prefix, "--status-icon");
18
18
  var componentName = 'StatusIcon';
19
+
20
+ /**
21
+ The `StatusIcon` component follows the Carbon guidelines for status icons with
22
+ some added specifications around illustration usage. For additional usage
23
+ guidelines and documentation please refer to the links above.
24
+
25
+ _Status icons_ are an important method of communicating severity level
26
+ information to users. The shapes and colors, communicate severity that enable
27
+ users to quickly assess and identify status and respond accordingly.
28
+ */
19
29
  export var StatusIcon = /*#__PURE__*/forwardRef(function (_ref, ref) {
20
30
  var _icons$kind;
21
31
  var kind = _ref.kind,
@@ -156,7 +156,8 @@ export var TagSet = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
156
156
  if (sizingTags.length > 0) {
157
157
  var spaceAvailable = tagSetRef.current.offsetWidth;
158
158
  for (var i in sizingTags) {
159
- var tagWidth = sizingTags[i].offsetWidth;
159
+ var _sizingTags$i;
160
+ var tagWidth = ((_sizingTags$i = sizingTags[i]) === null || _sizingTags$i === void 0 ? void 0 : _sizingTags$i.offsetWidth) || 0;
160
161
  if (spaceAvailable >= tagWidth) {
161
162
  spaceAvailable -= tagWidth;
162
163
  willFit += 1;
@@ -198,12 +199,8 @@ export var TagSet = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
198
199
  var handleModalClose = function handleModalClose() {
199
200
  setShowAllModalOpen(false);
200
201
  };
201
- useResizeObserver(sizingContainerRef, {
202
- callback: handleSizerTagsResize
203
- });
204
- useResizeObserver(tagSetRef, {
205
- callback: handleResize
206
- });
202
+ useResizeObserver(sizingContainerRef, handleSizerTagsResize);
203
+ useResizeObserver(tagSetRef, handleResize);
207
204
  return /*#__PURE__*/React.createElement("div", _extends({}, rest, {
208
205
  className: cx([blockClass, className]),
209
206
  ref: tagSetRef