@carbon/ibm-products 2.1.3 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (204) hide show
  1. package/css/index-full-carbon.css +246 -777
  2. package/css/index-full-carbon.css.map +1 -1
  3. package/css/index-full-carbon.min.css +3 -3
  4. package/css/index-full-carbon.min.css.map +1 -1
  5. package/css/index-without-carbon-released-only.css +11 -210
  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 +48 -412
  10. package/css/index-without-carbon.css.map +1 -1
  11. package/css/index-without-carbon.min.css +3 -3
  12. package/css/index-without-carbon.min.css.map +1 -1
  13. package/css/index.css +121 -344
  14. package/css/index.css.map +1 -1
  15. package/css/index.min.css +3 -3
  16. package/css/index.min.css.map +1 -1
  17. package/es/components/AboutModal/AboutModal.js +4 -2
  18. package/es/components/ActionBar/ActionBar.js +6 -2
  19. package/es/components/AddSelect/AddSelectFormControl.js +6 -6
  20. package/es/components/AddSelect/AddSelectRow.js +5 -15
  21. package/es/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +6 -5
  22. package/es/components/ButtonMenu/ButtonMenu.js +4 -4
  23. package/es/components/ButtonSetWithOverflow/ButtonSetWithOverflow.js +9 -3
  24. package/es/components/Cascade/Cascade.js +1 -11
  25. package/es/components/CreateFullPage/CreateFullPage.js +0 -13
  26. package/es/components/CreateModal/CreateModal.js +0 -7
  27. package/es/components/CreateSidePanel/CreateSidePanel.js +1 -1
  28. package/es/components/DataSpreadsheet/DataSpreadsheet.js +3 -3
  29. package/es/components/Datagrid/Datagrid/DatagridContent.js +1 -1
  30. package/es/components/Datagrid/Datagrid/DatagridSelectAllWithToggle.js +3 -3
  31. package/es/components/Datagrid/Datagrid/DatagridToolbar.js +2 -3
  32. package/es/components/Datagrid/Datagrid/DatagridVirtualBody.js +3 -1
  33. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/TearsheetWrapper.js +1 -1
  34. package/es/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +47 -39
  35. package/es/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +24 -20
  36. package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/index.js +1 -0
  37. package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +15 -44
  38. package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useInitialStateFromFilters.js +21 -0
  39. package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +10 -12
  40. package/es/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.js +2 -2
  41. package/es/components/Datagrid/useActionsColumn.js +7 -10
  42. package/es/components/Datagrid/useCustomizeColumns.js +7 -9
  43. package/es/components/Datagrid/useExpandedRow.js +7 -11
  44. package/es/components/Datagrid/useFiltering.js +8 -12
  45. package/es/components/Datagrid/useInlineEdit.js +0 -3
  46. package/es/components/Datagrid/useNestedRows.js +6 -10
  47. package/es/components/Datagrid/useStickyColumn.js +3 -10
  48. package/es/components/Datagrid/utils/DatagridActions.js +14 -6
  49. package/es/components/EditFullPage/EditFullPage.js +1 -2
  50. package/es/components/EditSidePanel/EditSidePanel.js +1 -1
  51. package/es/components/EditTearsheet/EditTearsheet.js +0 -4
  52. package/es/components/EditTearsheetNarrow/EditTearsheetNarrow.js +1 -1
  53. package/es/components/EditUpdateCards/EditUpdateCards.js +2 -3
  54. package/es/components/EmptyStates/EmptyState.js +0 -4
  55. package/es/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +0 -4
  56. package/es/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +0 -4
  57. package/es/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +0 -4
  58. package/es/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +0 -4
  59. package/es/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +0 -4
  60. package/es/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +0 -4
  61. package/es/components/ExportModal/ExportModal.js +0 -4
  62. package/es/components/HTTPErrors/HTTPError403/HTTPError403.js +0 -6
  63. package/es/components/HTTPErrors/HTTPError404/HTTPError404.js +0 -6
  64. package/es/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.js +0 -6
  65. package/es/components/ImportModal/ImportModal.js +6 -13
  66. package/es/components/MultiAddSelect/MultiAddSelect.js +0 -4
  67. package/es/components/NotificationsPanel/preview-components/UnreadNotificationBell.js +17 -2
  68. package/es/components/PageHeader/PageHeader.js +6 -2
  69. package/es/components/PageHeader/PageHeaderUtils.js +2 -2
  70. package/es/components/RemoveModal/RemoveModal.js +0 -6
  71. package/es/components/SidePanel/SidePanel.js +3 -1
  72. package/es/components/SingleAddSelect/SingleAddSelect.js +0 -4
  73. package/es/components/StatusIcon/StatusIcon.js +0 -10
  74. package/es/components/TagSet/TagSet.js +7 -4
  75. package/es/components/Tearsheet/TearsheetShell.js +6 -11
  76. package/es/components/UserProfileImage/UserProfileImage.js +3 -14
  77. package/es/components/WebTerminal/WebTerminal.js +0 -4
  78. package/es/global/js/hooks/useCreateComponentStepChange.js +15 -16
  79. package/es/global/js/hooks/useResizeObserver.js +28 -14
  80. package/es/global/js/package-settings.js +1 -14
  81. package/es/global/js/utils/story-helper.js +6 -108
  82. package/lib/components/AboutModal/AboutModal.js +4 -2
  83. package/lib/components/ActionBar/ActionBar.js +6 -2
  84. package/lib/components/AddSelect/AddSelectFormControl.js +6 -6
  85. package/lib/components/AddSelect/AddSelectRow.js +5 -15
  86. package/lib/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +6 -5
  87. package/lib/components/ButtonMenu/ButtonMenu.js +4 -4
  88. package/lib/components/ButtonSetWithOverflow/ButtonSetWithOverflow.js +9 -3
  89. package/lib/components/Cascade/Cascade.js +1 -11
  90. package/lib/components/CreateFullPage/CreateFullPage.js +0 -13
  91. package/lib/components/CreateModal/CreateModal.js +0 -7
  92. package/lib/components/CreateSidePanel/CreateSidePanel.js +1 -1
  93. package/lib/components/DataSpreadsheet/DataSpreadsheet.js +3 -3
  94. package/lib/components/Datagrid/Datagrid/DatagridContent.js +1 -1
  95. package/lib/components/Datagrid/Datagrid/DatagridSelectAllWithToggle.js +3 -3
  96. package/lib/components/Datagrid/Datagrid/DatagridToolbar.js +2 -3
  97. package/lib/components/Datagrid/Datagrid/DatagridVirtualBody.js +3 -1
  98. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/TearsheetWrapper.js +1 -1
  99. package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +45 -37
  100. package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +24 -20
  101. package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/index.js +7 -0
  102. package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +13 -42
  103. package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useInitialStateFromFilters.js +30 -0
  104. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +10 -12
  105. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.js +2 -2
  106. package/lib/components/Datagrid/useActionsColumn.js +7 -12
  107. package/lib/components/Datagrid/useCustomizeColumns.js +8 -10
  108. package/lib/components/Datagrid/useExpandedRow.js +6 -9
  109. package/lib/components/Datagrid/useFiltering.js +7 -10
  110. package/lib/components/Datagrid/useInlineEdit.js +0 -3
  111. package/lib/components/Datagrid/useNestedRows.js +6 -9
  112. package/lib/components/Datagrid/useStickyColumn.js +3 -10
  113. package/lib/components/Datagrid/utils/DatagridActions.js +13 -5
  114. package/lib/components/EditFullPage/EditFullPage.js +1 -2
  115. package/lib/components/EditSidePanel/EditSidePanel.js +1 -1
  116. package/lib/components/EditTearsheet/EditTearsheet.js +0 -4
  117. package/lib/components/EditTearsheetNarrow/EditTearsheetNarrow.js +1 -1
  118. package/lib/components/EditUpdateCards/EditUpdateCards.js +2 -3
  119. package/lib/components/EmptyStates/EmptyState.js +0 -4
  120. package/lib/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +0 -4
  121. package/lib/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +0 -4
  122. package/lib/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +0 -4
  123. package/lib/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +0 -4
  124. package/lib/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +0 -4
  125. package/lib/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +0 -4
  126. package/lib/components/ExportModal/ExportModal.js +0 -4
  127. package/lib/components/HTTPErrors/HTTPError403/HTTPError403.js +0 -6
  128. package/lib/components/HTTPErrors/HTTPError404/HTTPError404.js +0 -6
  129. package/lib/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.js +0 -6
  130. package/lib/components/ImportModal/ImportModal.js +6 -13
  131. package/lib/components/MultiAddSelect/MultiAddSelect.js +0 -4
  132. package/lib/components/NotificationsPanel/preview-components/UnreadNotificationBell.js +17 -2
  133. package/lib/components/PageHeader/PageHeader.js +6 -2
  134. package/lib/components/PageHeader/PageHeaderUtils.js +2 -2
  135. package/lib/components/RemoveModal/RemoveModal.js +0 -6
  136. package/lib/components/SidePanel/SidePanel.js +3 -1
  137. package/lib/components/SingleAddSelect/SingleAddSelect.js +0 -4
  138. package/lib/components/StatusIcon/StatusIcon.js +0 -10
  139. package/lib/components/TagSet/TagSet.js +7 -4
  140. package/lib/components/Tearsheet/TearsheetShell.js +6 -11
  141. package/lib/components/UserProfileImage/UserProfileImage.js +3 -14
  142. package/lib/components/WebTerminal/WebTerminal.js +0 -4
  143. package/lib/global/js/hooks/useCreateComponentStepChange.js +15 -16
  144. package/lib/global/js/hooks/useResizeObserver.js +27 -13
  145. package/lib/global/js/package-settings.js +1 -14
  146. package/lib/global/js/utils/story-helper.js +7 -115
  147. package/package.json +4 -4
  148. package/scss/components/AddSelect/_add-select.scss +0 -4
  149. package/scss/components/BreadcrumbWithOverflow/_breadcrumb-with-overflow.scss +1 -0
  150. package/scss/components/ButtonMenu/_button-menu.scss +1 -32
  151. package/scss/components/Cascade/_storybook-styles.scss +2 -3
  152. package/scss/components/DataSpreadsheet/_storybook-styles.scss +0 -6
  153. package/scss/components/Datagrid/_datagrid.scss +2 -4
  154. package/scss/components/Datagrid/_storybook-styles.scss +2 -16
  155. package/scss/components/Datagrid/styles/_datagrid.scss +13 -26
  156. package/scss/components/Datagrid/styles/addons/_FilterFlyout.scss +0 -7
  157. package/scss/components/Datagrid/styles/addons/_FilterPanel.scss +0 -4
  158. package/scss/components/HTTPErrors/_storybook-styles.scss +6 -0
  159. package/scss/components/NotificationsPanel/_notifications-panel.scss +1 -1
  160. package/scss/components/NotificationsPanel/_storybook-styles.scss +2 -10
  161. package/scss/components/PageHeader/_page-header.scss +1 -0
  162. package/scss/components/PageHeader/_storybook-styles.scss +14 -24
  163. package/scss/components/SidePanel/_side-panel.scss +2 -0
  164. package/scss/components/Tearsheet/_tearsheet.scss +6 -7
  165. package/scss/components/WebTerminal/_storybook-styles.scss +1 -11
  166. package/scss/global/styles/_display-box.scss +0 -1
  167. package/es/components/APIKeyModal/APIKeyModal.docs-page.js +0 -26
  168. package/es/components/AboutModal/AboutModal.docs-page.js +0 -21
  169. package/es/components/Cascade/Cascade.docs-page.js +0 -22
  170. package/es/components/CreateFullPage/CreateFullPage.docs-page.js +0 -39
  171. package/es/components/CreateModal/CreateModal.docs-page.js +0 -24
  172. package/es/components/CreateSidePanel/CreateSidePanel.docs-page.js +0 -18
  173. package/es/components/CreateTearsheet/CreateTearsheet.docs-page.js +0 -29
  174. package/es/components/EditFullPage/EditFullPage.docs-page.js +0 -39
  175. package/es/components/EditTearsheet/EditTearsheet.docs-page.js +0 -25
  176. package/es/components/ExampleComponent/ExampleComponent.docs-page.js +0 -22
  177. package/es/components/ImportModal/ImportModal.docs-page.js +0 -18
  178. package/es/components/MultiAddSelect/MultiAddSelect.docs-page.js +0 -17
  179. package/es/components/RemoveModal/RemoveModal.docs-page.js +0 -18
  180. package/es/components/SingleAddSelect/SingleAddSelect.docs-page.js +0 -15
  181. package/es/components/StatusIcon/StatusIcon.docs-page.js +0 -17
  182. package/es/components/Toolbar/Toolbar.docs-page.js +0 -14
  183. package/es/components/UserProfileImage/UserProfileImage.docs-page.js +0 -17
  184. package/es/components/WebTerminal/WebTerminal.docs-page.js +0 -52
  185. package/es/global/js/utils/StoryDocsPage.js +0 -218
  186. package/lib/components/APIKeyModal/APIKeyModal.docs-page.js +0 -37
  187. package/lib/components/AboutModal/AboutModal.docs-page.js +0 -32
  188. package/lib/components/Cascade/Cascade.docs-page.js +0 -33
  189. package/lib/components/CreateFullPage/CreateFullPage.docs-page.js +0 -50
  190. package/lib/components/CreateModal/CreateModal.docs-page.js +0 -35
  191. package/lib/components/CreateSidePanel/CreateSidePanel.docs-page.js +0 -29
  192. package/lib/components/CreateTearsheet/CreateTearsheet.docs-page.js +0 -40
  193. package/lib/components/EditFullPage/EditFullPage.docs-page.js +0 -50
  194. package/lib/components/EditTearsheet/EditTearsheet.docs-page.js +0 -36
  195. package/lib/components/ExampleComponent/ExampleComponent.docs-page.js +0 -33
  196. package/lib/components/ImportModal/ImportModal.docs-page.js +0 -26
  197. package/lib/components/MultiAddSelect/MultiAddSelect.docs-page.js +0 -25
  198. package/lib/components/RemoveModal/RemoveModal.docs-page.js +0 -26
  199. package/lib/components/SingleAddSelect/SingleAddSelect.docs-page.js +0 -23
  200. package/lib/components/StatusIcon/StatusIcon.docs-page.js +0 -28
  201. package/lib/components/Toolbar/Toolbar.docs-page.js +0 -25
  202. package/lib/components/UserProfileImage/UserProfileImage.docs-page.js +0 -28
  203. package/lib/components/WebTerminal/WebTerminal.docs-page.js +0 -63
  204. package/lib/global/js/utils/StoryDocsPage.js +0 -225
@@ -1,35 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- var _typeof = require("@babel/runtime/helpers/typeof");
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.default = void 0;
9
- var _react = _interopRequireDefault(require("react"));
10
- var _StoryDocsPage = require("../../global/js/utils/StoryDocsPage");
11
- var stories = _interopRequireWildcard(require("./CreateModal.stories"));
12
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
13
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
14
- var DocsPage = function DocsPage() {
15
- return /*#__PURE__*/_react.default.createElement(_StoryDocsPage.StoryDocsPage, {
16
- altGuidelinesHref: "https://pages.github.ibm.com/cdai-design/pal/patterns/creation-flows/usage#modal",
17
- blocks: [{
18
- story: stories.Default
19
- }, {
20
- title: 'Form validation',
21
- description: "All forms, including that within the `CreateModal` should follow C&CS guidelines\nfor form validation.\n\nThis includes the following:\n\n- The `Submit` button in the modal should be disabled, until all required inputs\n are filled in and valid\n- All required inputs should _only_ throw an invalid error _after_ the element\n loses focus\n- All optional form fields should have an `(optional)` text at the end of the\n input `labelText`. Optional should always be in parentheses\n\nYou can find more information on how to validate your form fields in\n[Carbon's Form usage page](https://www.carbondesignsystem.com/components/form/usage)."
22
- }, {
23
- title: 'Overriding Carbon theme',
24
- description: "The design recommendation is to use a dark theme for the CreateModal if the\napplication is currently using a light theme, and vice versa. The theme applied\nto the CreateModal can easily be customized as follows:\n\nIn SCSS:",
25
- source: {
26
- language: 'css',
27
- code: " .#{$pkg-prefix}--create-modal {\n @include carbon--theme(\n $theme: $carbon--theme--g90\n );\n }"
28
- }
29
- }, {
30
- description: "Alternatively, the required Carbon theme can be set as above in a custom CSS\nclass which is then applied to the CreateModal using the `className` prop."
31
- }]
32
- });
33
- };
34
- var _default = DocsPage;
35
- exports.default = _default;
@@ -1,29 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- var _typeof = require("@babel/runtime/helpers/typeof");
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.default = void 0;
9
- var _react = _interopRequireDefault(require("react"));
10
- var _StoryDocsPage = require("../../global/js/utils/StoryDocsPage");
11
- var stories = _interopRequireWildcard(require("./CreateSidePanel.stories"));
12
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
13
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
14
- var DocsPage = function DocsPage() {
15
- return /*#__PURE__*/_react.default.createElement(_StoryDocsPage.StoryDocsPage, {
16
- altGuidelinesHref: [{
17
- href: 'https://pages.github.ibm.com/cdai-design/pal/patterns/creation-flows/usage#side-panel',
18
- label: 'Carbon create flows side panel usage guidelines'
19
- }],
20
- blocks: [{
21
- story: stories.Default
22
- }, {
23
- title: 'Form validation',
24
- description: "All forms, including that within the `CreateSidePanel` should follow C&CS\nguidelines for form validation.\n\nThis includes the following:\n\n- The `Submit` button in the side panel should be disabled, until all required\n inputs are filled in and valid\n- All required inputs should _only_ throw an invalid error _after_ the element\n loses focus\n- All optional form fields should have an `(optional)` text at the end of the\n input `labelText`. Optional should always be in parentheses\n\nYou can find more information on how to validate your form fields in\n[Carbon's Form usage page](https://www.carbondesignsystem.com/components/form/usage)."
25
- }]
26
- });
27
- };
28
- var _default = DocsPage;
29
- exports.default = _default;
@@ -1,40 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- var _typeof = require("@babel/runtime/helpers/typeof");
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.default = void 0;
9
- var _react = _interopRequireDefault(require("react"));
10
- var _StoryDocsPage = require("../../global/js/utils/StoryDocsPage");
11
- var stories = _interopRequireWildcard(require("./CreateTearsheet.stories"));
12
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
13
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
14
- var DocsPage = function DocsPage() {
15
- return /*#__PURE__*/_react.default.createElement(_StoryDocsPage.StoryDocsPage, {
16
- altGuidelinesHref: "https://pages.github.ibm.com/cdai-design/pal/patterns/creation-flows/usage#wide-tearsheet",
17
- blocks: [{
18
- story: stories.multiStepTearsheet,
19
- description: "This is used when you have one section per step. This can be created by passing\nin the overall `<CreateTearsheet />` component and the `<CreateTearsheetStep />`\ncomponent with form items as children:",
20
- source: {
21
- code: " <CreateTearsheet {...props}>\n <CreateTearsheetStep\n title=\"Required title\"\n subtitle=\"Optional subtitle\"\n description=\"Optional description\"\n onNext={() => {'Optional function'}}\n disableSubmit={}\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 </CreateTearsheetStep>\n </CreateTearsheet>"
22
- }
23
- }, {
24
- title: 'Using custom components',
25
- description: "It is possible to use custom components that return `CreateTearsheetStep`s in\norder to help reduce the amount of logic in the component that contains the main\n`CreateTearsheet`. _It is required that each child of the `CreateTearsheet`\neither be a custom step or a `CreateTearsheetStep`_. An example of this could\nlook like the following:",
26
- source: {
27
- code: "const CreateStepCustom = ({ subtitle, ...rest }) => {\n return (\n <CreateTearsheetStep\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 </CreateTearsheetStep>\n );\n};\n\nconst CreateComponent = () => {\n return (\n <CreateTearsheet {...createTearsheetProps}>\n <CreateStepCustom subtitle=\"Custom step subtitle\" />\n <CreateTearsheetStep\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 </CreateTearsheetStep>\n </CreateTearsheet>\n );\n};"
28
- }
29
- }, {
30
- title: 'Using dynamic steps',
31
- 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:",
32
- code: "import { useState } from 'react';\n\nconst CreateFlow = () => {\n const [shouldIncludeAdditionalStep, setShouldIncludeAdditionalStep] =\n useState(false);\n return (\n <CreateTearsheet {...createTearsheetProps}>\n <CreateTearsheetStep {...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 </CreateTearsheetStep>\n <CreateTearsheetStep\n {...step2Props}\n includeStep={shouldIncludeAdditionalStep}\n >\n Dynamic step content\n </CreateTearsheetStep>\n <CreateTearsheetStep {...step3Props}>\n Final step content\n </CreateTearsheetStep>\n </CreateTearsheet>\n );\n};"
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-tearsheet__step--title` | title | `productive-heading-04` & `margin-bottom` of `$spacing-05` |\n| `#{$pkg-prefix}--create-tearsheet__step--subtitle` | subtitle | `productive-heading-01` & `margin-bottom` of `$spacing-03` |\n| `#{$pkg-prefix}--create-tearsheet__step--description` | description | `body-long-01` & `margin-bottom` of `$spacing-06` |\n| `#{$pkg-prefix}--create-tearsheet__step--fieldset` | fieldset | `margin-bottom` of `$spacing-05` to all children elements |\n| `#{$pkg-prefix}--create-tearsheet__section--divider` | divider | Includes a `1px` divider line inside the `main` content |\n"
36
- }]
37
- });
38
- };
39
- var _default = DocsPage;
40
- exports.default = _default;
@@ -1,50 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- var _typeof = require("@babel/runtime/helpers/typeof");
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.default = void 0;
9
- var _react = _interopRequireDefault(require("react"));
10
- var _StoryDocsPage = require("../../global/js/utils/StoryDocsPage");
11
- var stories = _interopRequireWildcard(require("./EditFullPage.stories"));
12
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
13
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
14
- var DocsPage = function DocsPage() {
15
- return /*#__PURE__*/_react.default.createElement(_StoryDocsPage.StoryDocsPage, {
16
- altGuidelinesHref: "https://pages.github.ibm.com/cdai-design/pal/patterns/edit/usage#full-page-edit",
17
- blocks: [{
18
- 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."
19
- }, {
20
- story: stories.editFullPage,
21
- 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:",
22
- source: {
23
- 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>"
24
- }
25
- }, {
26
- story: stories.editFullPageWithSections,
27
- 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:",
28
- source: {
29
- 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>"
30
- }
31
- }, {
32
- title: 'Using custom components',
33
- 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:",
34
- source: {
35
- 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};"
36
- }
37
- }, {
38
- title: 'Using dynamic steps',
39
- 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:",
40
- source: {
41
- 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};"
42
- }
43
- }, {
44
- title: 'Class names',
45
- 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"
46
- }]
47
- });
48
- };
49
- var _default = DocsPage;
50
- exports.default = _default;
@@ -1,36 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- var _typeof = require("@babel/runtime/helpers/typeof");
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.default = void 0;
9
- var _react = _interopRequireDefault(require("react"));
10
- var _StoryDocsPage = require("../../global/js/utils/StoryDocsPage");
11
- var stories = _interopRequireWildcard(require("./EditTearsheet.stories"));
12
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
13
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
14
- var DocsPage = function DocsPage() {
15
- return /*#__PURE__*/_react.default.createElement(_StoryDocsPage.StoryDocsPage, {
16
- altGuidelinesHref: "https://pages.github.ibm.com/cdai-design/pal/patterns/edit/usage#tearsheet-edit",
17
- blocks: [{
18
- story: stories.multiFormEditTearsheet,
19
- 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:",
20
- source: {
21
- 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>"
22
- }
23
- }, {
24
- title: 'Using custom components',
25
- 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:",
26
- source: {
27
- 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};"
28
- }
29
- }, {
30
- title: "Class names",
31
- 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"
32
- }]
33
- });
34
- };
35
- var _default = DocsPage;
36
- exports.default = _default;
@@ -1,33 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- var _typeof = require("@babel/runtime/helpers/typeof");
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.default = void 0;
9
- var _react = _interopRequireDefault(require("react"));
10
- var _StoryDocsPage = require("../../global/js/utils/StoryDocsPage");
11
- var stories = _interopRequireWildcard(require("./ExampleComponent.stories"));
12
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
13
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
14
- /**
15
- * Copyright IBM Corp. 2023, 2023
16
- *
17
- * This source code is licensed under the Apache-2.0 license found in the
18
- * LICENSE file in the root directory of this source tree.
19
- */
20
-
21
- /**
22
- * OPTIONAL: required only to customize default docs page
23
- */
24
- var DocsPage = function DocsPage() {
25
- return /*#__PURE__*/_react.default.createElement(_StoryDocsPage.StoryDocsPage, {
26
- blocks: [{
27
- description: 'Here it is in use.',
28
- story: stories.exampleComponent
29
- }]
30
- });
31
- };
32
- var _default = DocsPage;
33
- exports.default = _default;
@@ -1,26 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = void 0;
8
- var _react = _interopRequireDefault(require("react"));
9
- var _StoryDocsPage = require("../../global/js/utils/StoryDocsPage");
10
- var _blocks = require("@storybook/blocks");
11
- var _storyHelper = require("../../global/js/utils/story-helper");
12
- var DocsPage = function DocsPage() {
13
- var _useOf = (0, _blocks.useOf)('meta', ['meta']),
14
- csfFile = _useOf.csfFile;
15
- return /*#__PURE__*/_react.default.createElement(_StoryDocsPage.StoryDocsPage, {
16
- altGuidelinesHref: [(0, _storyHelper.storyDocsGuidelines)(csfFile), {
17
- href: 'https://www.carbondesignsystem.com/components/modal/usage',
18
- label: 'Carbon Modal usage guidelines'
19
- }, {
20
- href: 'https://react.carbondesignsystem.com/?path=/docs/modal--default',
21
- label: 'Carbon Modal documentation'
22
- }]
23
- });
24
- };
25
- var _default = DocsPage;
26
- exports.default = _default;
@@ -1,25 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = void 0;
8
- var _react = _interopRequireDefault(require("react"));
9
- var _StoryDocsPage = require("../../global/js/utils/StoryDocsPage");
10
- var DocsPage = function DocsPage() {
11
- return /*#__PURE__*/_react.default.createElement(_StoryDocsPage.StoryDocsPage, {
12
- altGuidelinesHref: "https://pages.github.ibm.com/cdai-design/pal/patterns/add-and-select/usage",
13
- blocks: [{
14
- title: 'Structuring items',
15
- 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.",
16
- source: {
17
- 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}"
18
- }
19
- }, {
20
- 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."
21
- }]
22
- });
23
- };
24
- var _default = DocsPage;
25
- exports.default = _default;
@@ -1,26 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = void 0;
8
- var _react = _interopRequireDefault(require("react"));
9
- var _StoryDocsPage = require("../../global/js/utils/StoryDocsPage");
10
- var _blocks = require("@storybook/blocks");
11
- var _storyHelper = require("../../global/js/utils/story-helper");
12
- var DocsPage = function DocsPage() {
13
- var _useOf = (0, _blocks.useOf)('meta', ['meta']),
14
- csfFile = _useOf.csfFile;
15
- return /*#__PURE__*/_react.default.createElement(_StoryDocsPage.StoryDocsPage, {
16
- altGuidelinesHref: [(0, _storyHelper.storyDocsGuidelines)(csfFile), {
17
- href: 'https://www.carbondesignsystem.com/components/modal/usage',
18
- label: 'Carbon Modal usage guidelines'
19
- }, {
20
- href: 'https://react.carbondesignsystem.com/?path=/docs/modal--default',
21
- label: 'Carbon Modal documentation'
22
- }]
23
- });
24
- };
25
- var _default = DocsPage;
26
- exports.default = _default;
@@ -1,23 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = void 0;
8
- var _react = _interopRequireDefault(require("react"));
9
- var _StoryDocsPage = require("../../global/js/utils/StoryDocsPage");
10
- var DocsPage = function DocsPage() {
11
- return /*#__PURE__*/_react.default.createElement(_StoryDocsPage.StoryDocsPage, {
12
- altGuidelinesHref: "https://pages.github.ibm.com/cdai-design/pal/patterns/add-and-select/usage",
13
- blocks: [{
14
- title: 'Structuring items',
15
- 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.",
16
- source: {
17
- 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}"
18
- }
19
- }]
20
- });
21
- };
22
- var _default = DocsPage;
23
- exports.default = _default;
@@ -1,28 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- var _typeof = require("@babel/runtime/helpers/typeof");
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.default = void 0;
9
- var _react = _interopRequireDefault(require("react"));
10
- var _StoryDocsPage = require("../../global/js/utils/StoryDocsPage");
11
- var stories = _interopRequireWildcard(require("./StatusIcon.stories"));
12
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
13
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
14
- var DocsPage = function DocsPage() {
15
- return /*#__PURE__*/_react.default.createElement(_StoryDocsPage.StoryDocsPage, {
16
- blocks: [{
17
- story: stories.Default
18
- }, {
19
- title: 'Accessibility',
20
- 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."
21
- }, {
22
- title: 'Sizing',
23
- 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 "
24
- }]
25
- });
26
- };
27
- var _default = DocsPage;
28
- exports.default = _default;
@@ -1,25 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- var _typeof = require("@babel/runtime/helpers/typeof");
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.default = void 0;
9
- var _react = _interopRequireDefault(require("react"));
10
- var _StoryDocsPage = require("../../global/js/utils/StoryDocsPage");
11
- var stories = _interopRequireWildcard(require("./Toolbar.stories"));
12
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
13
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
14
- var DocsPage = function DocsPage() {
15
- return /*#__PURE__*/_react.default.createElement(_StoryDocsPage.StoryDocsPage, {
16
- blocks: [{
17
- story: stories._Toolbar
18
- }, {
19
- story: stories.vertical,
20
- description: "A toolbar orientation for floating the toolbar on the canvas."
21
- }]
22
- });
23
- };
24
- var _default = DocsPage;
25
- exports.default = _default;
@@ -1,28 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- var _typeof = require("@babel/runtime/helpers/typeof");
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.default = void 0;
9
- var _react = _interopRequireDefault(require("react"));
10
- var _StoryDocsPage = require("../../global/js/utils/StoryDocsPage");
11
- var stories = _interopRequireWildcard(require("./UserProfileImage.stories"));
12
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
13
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
14
- var DocsPage = function DocsPage() {
15
- return /*#__PURE__*/_react.default.createElement(_StoryDocsPage.StoryDocsPage, {
16
- blocks: [{
17
- story: stories.Default
18
- }, {
19
- story: stories.WithGroupIcon,
20
- description: "By passing in icon prop with a value of `group`, the avatar will display the group icon"
21
- }, {
22
- story: stories.WithInitials,
23
- description: "When passing a display name to the component, the display name will be distilled down to the first and last initials of the display name. `Thomas Watson` and `Thomas J. Watson` will both display `TW` as the initials."
24
- }]
25
- });
26
- };
27
- var _default = DocsPage;
28
- exports.default = _default;
@@ -1,63 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- var _typeof = require("@babel/runtime/helpers/typeof");
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.default = void 0;
9
- var _react = _interopRequireDefault(require("react"));
10
- var _StoryDocsPage = require("../../global/js/utils/StoryDocsPage");
11
- var stories = _interopRequireWildcard(require("./WebTerminal.stories"));
12
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
13
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
14
- var DocsPage = function DocsPage() {
15
- return /*#__PURE__*/_react.default.createElement(_StoryDocsPage.StoryDocsPage, {
16
- blocks: [{
17
- description: "To get started using the WebTerminal, you have to first wrap your\n application with the `<WebTerminalProvider>`\n component. This will allow all the WebTerminal components to be\n used with the `useWebTerminal()` custom hook.\n ",
18
- title: 'Getting Started',
19
- source: {
20
- code: "import { WebTerminalProvider } from '@carbon/ibm-products';\n\nconst App = () => {\n return (\n <WebTerminalProvider>\n ...\n <WebTerminalProvider>\n )\n};"
21
- }
22
- }, {
23
- title: 'useWebTerminal()',
24
- source: {
25
- code: "const { open, openWebTerminal, closeWebTerminal, toggleWebTerminal } =\n useWebTerminal();"
26
- }
27
- }, {
28
- description: "The `useWebTerminal()` hook returns an object with 4 properties:\n1. Read the `open` state (true or false)\n2. `openWebTerminal` sets the `open` state to true\n3. `closeWebTerminal` sets the `open` state to false\n4. `toggleWebTerminal` toggles between true and false\n\nExample:\n",
29
- source: {
30
- code: "const MyComponent = () => {\n const { open, openWebTerminal, closeWebTerminal, toggleWebTerminal } =\n useWebTerminal();\n\n return (\n <div>\n <button onClick={() => openWebTerminal()}>Open web terminal</button>\n <button onClick={() => closeWebTerminal()}>Close web terminal</button>\n <button onClick={() => toggleWebTerminal()}>Toggle web terminal</button>\n <p>The web terminal is now {open}</p>\n\n <WebTerminal>...</WebTerminal>\n </div>\n );\n};"
31
- }
32
- }, {
33
- subTitle: 'Passing in your own terminal.',
34
- description: "The `WebTerminal` is wrapper component for your own\nterminal component that you may have been using for your product.\nSimply pass your own terminal component as children.\n "
35
- }, {
36
- subTitle: 'Optional wrapper component.',
37
- description: "Optionally you can import `WebTerminalContentWrapper` to have\n content adjust their width based off the `WebTerminal` width when\n it is opened.",
38
- source: {
39
- code: "<WebTerminalContentWrapper>\n content\n</WebTerminalContentWrapper>\n\n<WebTerminal>\n ...\n</WebTerminal>"
40
- }
41
- }, {
42
- description: 'The default web terminal is one which opens and the terminal loads. Then if the user desires to dismiss it they can click the close icon on the top right corner of the component.',
43
- story: stories.Default
44
- }, {
45
- story: stories.WithDocumentationLinks
46
- }, {
47
- subTitle: 'Help users with helpful documentation links',
48
- description: "Optionally you can pass documentation links to help point your users to useful\ndocumentation for your terminal, or kubernetes commands etc.\n\nThe documentation links should reflect the same props as `OverflowMenuItem` from\ncarbon.\n\nLearn more:\nhttps://react.carbondesignsystem.com/?path=/docs/components-overflowmenu--default\n",
49
- source: {
50
- code: "const documentationLinks = [\n {\n itemText: 'BX/ICP docs',\n href: '#',\n onClick: () => console.log('clicked'),\n },\n {\n itemText: 'Kubernetes docs',\n href: '#',\n onClick: () => console.log('clicked'),\n },\n {\n itemText: 'Docker docs',\n href: '#',\n onClick: () => console.log('clicked'),\n },\n {\n itemText: 'Helm docs',\n href: '#',\n onClick: () => console.log('clicked'),\n },\n];"
51
- }
52
- }, {
53
- story: stories.WithActions
54
- }, {
55
- description: "Optionally you can add actions to the web terminal header bar. To add actions\nyou need to pass in an array of actions with objects for each object.",
56
- source: {
57
- code: "<WebTerminal\n actions={[\n {\n renderIcon: Code32,\n onClick: () => {},\n iconDescription: 'Create new deployment',\n },\n ]}\n>\n ...\n</WebTerminal>"
58
- }
59
- }]
60
- });
61
- };
62
- var _default = DocsPage;
63
- exports.default = _default;