@thecb/components 10.12.3-beta.0 → 10.12.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (211) hide show
  1. package/README.md +0 -4
  2. package/dist/index.cjs.js +2526 -1617
  3. package/dist/index.cjs.js.map +1 -1
  4. package/dist/index.d.ts +4 -5
  5. package/dist/index.esm.js +2527 -1617
  6. package/dist/index.esm.js.map +1 -1
  7. package/package.json +13 -25
  8. package/src/components/atoms/alert/Alert.stories.js +26 -148
  9. package/src/components/atoms/badge/Badge.js +2 -2
  10. package/src/components/atoms/badge/Badge.stories.js +29 -143
  11. package/src/components/atoms/breadcrumb/Breadcrumb.stories.js +29 -38
  12. package/src/components/atoms/button-with-action/ButtonWithAction.stories.js +55 -108
  13. package/src/components/atoms/button-with-link/ButtonWithLink.stories.js +31 -160
  14. package/src/components/atoms/checkbox/Checkbox.stories.js +29 -148
  15. package/src/components/atoms/country-dropdown/CountryDropdown.stories.js +27 -61
  16. package/src/components/atoms/detail/Detail.js +26 -0
  17. package/src/components/atoms/display-box/DisplayBox.stories.js +21 -65
  18. package/src/components/atoms/display-card/DisplayCard.stories.js +22 -163
  19. package/src/components/atoms/dropdown/Dropdown.stories.js +10 -91
  20. package/src/components/atoms/form-layouts/FormInput.stories.js +26 -212
  21. package/src/components/atoms/form-select/FormSelect.stories.js +29 -55
  22. package/src/components/atoms/formatted-address/FormattedAddress.stories.js +27 -133
  23. package/src/components/atoms/icons/icons.stories.js +116 -0
  24. package/src/components/atoms/labeled-amount/LabeledAmount.stories.js +34 -110
  25. package/src/components/atoms/line-item/LineItem.stories.js +22 -89
  26. package/src/components/atoms/link/Link.stories.js +49 -155
  27. package/src/components/atoms/loading-line/LoadingLine.js +10 -14
  28. package/src/components/atoms/loading-line/LoadingLine.stories.js +28 -132
  29. package/src/components/atoms/nav-footer/NavFooter.stories.js +22 -235
  30. package/src/components/atoms/nav-header/NavHeader.stories.js +21 -122
  31. package/src/components/atoms/password-requirements/PasswordRequirements.stories.js +44 -108
  32. package/src/components/atoms/placeholder/Placeholder.stories.js +36 -164
  33. package/src/components/atoms/searchable-select/SearchableSelect.stories.js +28 -103
  34. package/src/components/atoms/state-province-dropdown/StateProvinceDropdown.stories.js +40 -65
  35. package/src/components/atoms/table/Table.stories.js +75 -59
  36. package/src/components/atoms/table/TableRow.js +0 -1
  37. package/src/components/atoms/title/Title.js +23 -0
  38. package/src/components/atoms/toggle-switch/ToggleSwitch.stories.js +20 -103
  39. package/src/components/atoms/toggle-switch/ToggleSwitch.theme.js +5 -8
  40. package/src/components/molecules/address-form/AddressForm.stories.js +20 -223
  41. package/src/components/molecules/banner/Banner.stories.js +26 -122
  42. package/src/components/molecules/change-password-form/ChangePasswordForm.stories.js +19 -203
  43. package/src/components/molecules/collapsible-section/CollapsibleSection.stories.js +61 -210
  44. package/src/components/molecules/edit-name-form/EdidNameForm.stories.js +24 -0
  45. package/src/components/molecules/index.js +0 -1
  46. package/src/components/molecules/link-card/LinkCard.stories.js +72 -287
  47. package/src/components/molecules/login-form/LoginForm.stories.js +21 -117
  48. package/src/components/molecules/modal/Modal.stories.js +128 -342
  49. package/src/components/molecules/module/Module.stories.js +25 -267
  50. package/src/components/molecules/multiple-select-filter/MultipleSelectFilter.js +61 -295
  51. package/src/components/molecules/multiple-select-filter/{MultipleSelectFilter.oldstories.js → MultipleSelectFilter.stories.js} +1 -1
  52. package/src/components/molecules/multiple-select-filter/MultipleSelectFilter.styled.js +4 -4
  53. package/src/components/molecules/multiple-select-filter/__private__/ActionLinkButton.js +24 -0
  54. package/src/components/molecules/multiple-select-filter/__private__/FilterButton.js +85 -0
  55. package/src/components/molecules/multiple-select-filter/__private__/FilterDropdown.js +23 -0
  56. package/src/components/molecules/multiple-select-filter/__private__/FilterableList.js +144 -0
  57. package/src/components/molecules/multiple-select-filter/__private__/FilterableListItem.js +67 -0
  58. package/src/components/molecules/multiple-select-filter/__private__/SearchBox.js +38 -0
  59. package/src/components/molecules/multiple-select-filter/__private__/useKeyboardNavigation.js +84 -0
  60. package/src/components/molecules/multiple-select-filter/__private__/util.js +31 -0
  61. package/src/components/molecules/obligation/icons/PropertyPersonalIcon.js +1 -1
  62. package/src/components/molecules/pagination/Pagination.stories.js +28 -177
  63. package/src/components/molecules/tabs/Tabs.stories.js +227 -135
  64. package/src/components/molecules/toast-notification/ToastNotification.stories.js +105 -0
  65. package/src/hooks/use-outside-click/index.js +4 -5
  66. package/src/util/index.js +1 -3
  67. package/src/components/atoms/alert/Alert.mdx +0 -19
  68. package/src/components/atoms/badge/Badge.mdx +0 -27
  69. package/src/components/atoms/breadcrumb/Breadcrumb.mdx +0 -21
  70. package/src/components/atoms/button-with-link/ButtonWithLink.mdx +0 -21
  71. package/src/components/atoms/card/Card.mdx +0 -41
  72. package/src/components/atoms/card/Card.stories.js +0 -360
  73. package/src/components/atoms/checkbox/Checkbox.mdx +0 -15
  74. package/src/components/atoms/checkbox/Checkbox.oldstories.js +0 -30
  75. package/src/components/atoms/country-dropdown/CountryDropdown.mdx +0 -36
  76. package/src/components/atoms/detail/Detail.mdx +0 -32
  77. package/src/components/atoms/detail/Detail.stories.js +0 -156
  78. package/src/components/atoms/display-box/DisplayBox.mdx +0 -11
  79. package/src/components/atoms/display-card/DisplayCard.mdx +0 -13
  80. package/src/components/atoms/dropdown/Dropdown.mdx +0 -65
  81. package/src/components/atoms/form-layouts/FormInput.mdx +0 -38
  82. package/src/components/atoms/form-select/FormSelect.mdx +0 -42
  83. package/src/components/atoms/formatted-address/FormattedAddress.mdx +0 -13
  84. package/src/components/atoms/formatted-bank-account/FormattedBankAccount.mdx +0 -17
  85. package/src/components/atoms/formatted-bank-account/FormattedBankAccount.stories.js +0 -57
  86. package/src/components/atoms/formatted-credit-card/FormattedCreditCard.mdx +0 -40
  87. package/src/components/atoms/formatted-credit-card/FormattedCreditCard.stories.js +0 -74
  88. package/src/components/atoms/icons/Icons.mdx +0 -40
  89. package/src/components/atoms/icons/Icons.stories.js +0 -325
  90. package/src/components/atoms/labeled-amount/LabeledAmount.mdx +0 -23
  91. package/src/components/atoms/line-item/LineItem.mdx +0 -28
  92. package/src/components/atoms/link/Link.mdx +0 -19
  93. package/src/components/atoms/loading/Loading.mdx +0 -13
  94. package/src/components/atoms/loading/Loading.stories.js +0 -22
  95. package/src/components/atoms/loading-line/LoadingLine.mdx +0 -15
  96. package/src/components/atoms/nav-footer/NavFooter.mdx +0 -15
  97. package/src/components/atoms/nav-header/NavHeader.mdx +0 -13
  98. package/src/components/atoms/nav-tabs/NavTabs.mdx +0 -30
  99. package/src/components/atoms/nav-tabs/NavTabs.stories.js +0 -49
  100. package/src/components/atoms/password-requirements/PasswordRequirements.mdx +0 -39
  101. package/src/components/atoms/placeholder/Placeholder.mdx +0 -19
  102. package/src/components/atoms/searchable-select/SearchableSelect.mdx +0 -44
  103. package/src/components/atoms/state-province-dropdown/StateProvinceDropdown.mdx +0 -36
  104. package/src/components/atoms/table/Table.mdx +0 -71
  105. package/src/components/atoms/table/Table.oldstories.js +0 -84
  106. package/src/components/atoms/title/Title.mdx +0 -26
  107. package/src/components/atoms/title/Title.stories.js +0 -144
  108. package/src/components/atoms/toggle-switch/ToggleSwitch.mdx +0 -17
  109. package/src/components/atoms/typeahead-input/TypeaheadInput.mdx +0 -13
  110. package/src/components/atoms/typeahead-input/TypeaheadInput.stories.js +0 -63
  111. package/src/components/molecules/address-form/AddressForm.mdx +0 -18
  112. package/src/components/molecules/banner/Banner.mdx +0 -23
  113. package/src/components/molecules/change-password-form/ChangePasswordForm.mdx +0 -15
  114. package/src/components/molecules/collapsible-section/CollapsibleSection.mdx +0 -15
  115. package/src/components/molecules/edit-name-form/EditNameForm.mdx +0 -13
  116. package/src/components/molecules/edit-name-form/EditNameForm.stories.js +0 -117
  117. package/src/components/molecules/idle-modal/IdleModal.js +0 -101
  118. package/src/components/molecules/idle-modal/IdleModal.mdx +0 -17
  119. package/src/components/molecules/idle-modal/IdleModal.stories.js +0 -180
  120. package/src/components/molecules/idle-modal/index.d.ts +0 -16
  121. package/src/components/molecules/idle-modal/index.js +0 -3
  122. package/src/components/molecules/link-card/LinkCard.mdx +0 -17
  123. package/src/components/molecules/login-form/LoginForm.mdx +0 -16
  124. package/src/components/molecules/modal/Modal.mdx +0 -17
  125. package/src/components/molecules/module/Module.mdx +0 -17
  126. package/src/components/molecules/obligation/Obligation.mdx +0 -23
  127. package/src/components/molecules/obligation/Obligation.stories.js +0 -460
  128. package/src/components/molecules/pagination/Pagination.mdx +0 -15
  129. package/src/components/molecules/popover/Popover.mdx +0 -15
  130. package/src/components/molecules/popover/Popover.stories.js +0 -220
  131. package/src/components/molecules/tabs/Tabs.mdx +0 -17
  132. package/src/components/molecules/toast-notification/Toast.mdx +0 -15
  133. package/src/components/molecules/toast-notification/Toast.stories.js +0 -183
  134. package/src/stories/Button.stories.ts +0 -53
  135. package/src/stories/Button.tsx +0 -48
  136. package/src/stories/Configure.mdx +0 -364
  137. package/src/stories/Header.stories.ts +0 -33
  138. package/src/stories/Header.tsx +0 -56
  139. package/src/stories/Page.stories.ts +0 -32
  140. package/src/stories/Page.tsx +0 -73
  141. package/src/stories/assets/accessibility.png +0 -0
  142. package/src/stories/assets/accessibility.svg +0 -5
  143. package/src/stories/assets/addon-library.png +0 -0
  144. package/src/stories/assets/assets.png +0 -0
  145. package/src/stories/assets/avif-test-image.avif +0 -0
  146. package/src/stories/assets/context.png +0 -0
  147. package/src/stories/assets/discord.svg +0 -15
  148. package/src/stories/assets/docs.png +0 -0
  149. package/src/stories/assets/figma-plugin.png +0 -0
  150. package/src/stories/assets/github.svg +0 -3
  151. package/src/stories/assets/share.png +0 -0
  152. package/src/stories/assets/styling.png +0 -0
  153. package/src/stories/assets/testing.png +0 -0
  154. package/src/stories/assets/theming.png +0 -0
  155. package/src/stories/assets/tutorials.svg +0 -12
  156. package/src/stories/assets/youtube.svg +0 -4
  157. package/src/stories/button.css +0 -30
  158. package/src/stories/header.css +0 -32
  159. package/src/stories/page.css +0 -69
  160. package/src/util/idleTimerUtils.js +0 -36
  161. /package/src/components/atoms/add-obligation/{AddObligation.oldstories.js → AddObligation.stories.js} +0 -0
  162. /package/src/components/atoms/amount-callout/{AmountCallout.oldstories.js → AmountCallout.stories.js} +0 -0
  163. /package/src/components/atoms/checkbox-list/{CheckboxList.oldstories.js → CheckboxList.stories.js} +0 -0
  164. /package/src/components/atoms/form-layouts/{FormLayouts.oldstories.js → FormLayouts.stories.js} +0 -0
  165. /package/src/components/atoms/hamburger-button/{HamburgerButton.oldstories.js → HamburgerButton.stories.js} +0 -0
  166. /package/src/components/atoms/heading/{Heading.oldstories.js → Heading.stories.js} +0 -0
  167. /package/src/components/atoms/layouts/examples/box-example/{BoxExample.oldstories.js → BoxExample.stories.js} +0 -0
  168. /package/src/components/atoms/layouts/examples/center-example/{CenterExample.oldstories.js → CenterExample.stories.js} +0 -0
  169. /package/src/components/atoms/layouts/examples/cluster-example/{ClusterExample.oldstories.js → ClusterExample.stories.js} +0 -0
  170. /package/src/components/atoms/layouts/examples/cover-example/{CoverExample.oldstories.js → CoverExample.stories.js} +0 -0
  171. /package/src/components/atoms/layouts/examples/frame-example/{FrameExample.oldstories.js → FrameExample.stories.js} +0 -0
  172. /package/src/components/atoms/layouts/examples/grid-example/{GridExample.oldstories.js → GridExample.stories.js} +0 -0
  173. /package/src/components/atoms/layouts/examples/imposter-example/{ImposterExample.oldstories.js → ImposterExample.stories.js} +0 -0
  174. /package/src/components/atoms/layouts/examples/motion-example/{MotionExample.oldstories.js → MotionExample.stories.js} +0 -0
  175. /package/src/components/atoms/layouts/examples/reel-example/{ReelExample.oldstories.js → ReelExample.stories.js} +0 -0
  176. /package/src/components/atoms/layouts/examples/sidebar-example/{SidebarExample.oldstories.js → SidebarExample.stories.js} +0 -0
  177. /package/src/components/atoms/layouts/examples/stack-example/{StackExample.oldstories.js → StackExample.stories.js} +0 -0
  178. /package/src/components/atoms/layouts/examples/switcher-example/{SwitcherExample.oldstories.js → SwitcherExample.stories.js} +0 -0
  179. /package/src/components/atoms/paragraph/{Paragraph.oldstories.js → Paragraph.stories.js} +0 -0
  180. /package/src/components/atoms/processing-fee/{ProcessingFee.oldstories.js → ProcessingFee.stories.js} +0 -0
  181. /package/src/components/atoms/search/{Search.oldstories.js → Search.stories.js} +0 -0
  182. /package/src/components/atoms/solid-divider/{SolidDivider.oldstories.js → SolidDivider.stories.js} +0 -0
  183. /package/src/components/atoms/sortable-table-heading/{SortableTableHeading.oldstories.js → SortableTableHeading.stories.js} +0 -0
  184. /package/src/components/atoms/spinner/{Spinner.oldstories.js → Spinner.stories.js} +0 -0
  185. /package/src/components/atoms/tab/{Tab.oldstories.js → Tab.stories.js} +0 -0
  186. /package/src/components/atoms/text/{Text.oldstories.js → Text.stories.js} +0 -0
  187. /package/src/components/atoms/typeahead-input/{TypeaheadIinput.oldstories.js → TypeaheadIinput.stories.js} +0 -0
  188. /package/src/components/atoms/wallet-name/{WalletName.oldstories.js → WalletName.stories.js} +0 -0
  189. /package/src/components/molecules/account-and-routing-modal/{AccountAndRoutingModal.oldstories.js → AccountAndRoutingModal.stories.js} +0 -0
  190. /package/src/components/molecules/editable-list/{EditableList.oldstories.js → EditableList.stories.js} +0 -0
  191. /package/src/components/molecules/email-form/{EmailForm.oldstories.js → EmailForm.stories.js} +0 -0
  192. /package/src/components/molecules/forgot-password-form/{ForgotPasswordForm.oldstories.js → ForgotPasswordForm.stories.js} +0 -0
  193. /package/src/components/molecules/highlight-tab-row/{HighlightTabRow.oldstories.js → HighlightTabRow.stories.js} +0 -0
  194. /package/src/components/molecules/obligation/modules/{AmountModule.oldstories.js → AmountModule.stories.js} +0 -0
  195. /package/src/components/molecules/payment-button-bar/{PaymentButtonBar.oldstories.js → PaymentButtonBar.stories.js} +0 -0
  196. /package/src/components/molecules/payment-details/{PaymentDetails.oldstories.js → PaymentDetails.stories.js} +0 -0
  197. /package/src/components/molecules/payment-form-ach/{PaymentFormACH.oldstories.js → PaymentFormACH.stories.js} +0 -0
  198. /package/src/components/molecules/payment-form-card/{PaymentFormCard.oldstories.js → PaymentFormCard.stories.js} +0 -0
  199. /package/src/components/molecules/periscope-dashboard-iframe/{PeriscopeDashBoardIframe.oldstories.js → PeriscopeDashBoardIframe.stories.js} +0 -0
  200. /package/src/components/molecules/phone-form/{PhoneForm.oldstories.js → PhoneForm.stories.js} +0 -0
  201. /package/src/components/molecules/popup-menu/{PopupMenu.oldstories.js → PopupMenu.stories.js} +0 -0
  202. /package/src/components/molecules/radio-group/{RadioGroup.oldstories.js → RadioGroup.stories.js} +0 -0
  203. /package/src/components/molecules/radio-section/{RadioSection.oldstories.js → RadioSection.stories.js} +0 -0
  204. /package/src/components/molecules/registration-form/{RegistrationForm.oldstories.js → RegistrationForm.stories.js} +0 -0
  205. /package/src/components/molecules/reset-confirmation-form/{ResetConfirmationForm.oldstories.js → ResetConfirmationForm.stories.js} +0 -0
  206. /package/src/components/molecules/reset-password-form/{ResetPasswordForm.oldstories.js → ResetPasswordForm.stories.js} +0 -0
  207. /package/src/components/molecules/reset-password-success/{ResetPasswordSuccess.oldstories.js → ResetPasswordSuccess.stories.js} +0 -0
  208. /package/src/components/molecules/tab-sidebar/{TabSidebar.oldstories.js → TabSidebar.stories.js} +0 -0
  209. /package/src/components/molecules/terms-and-conditions/{TermsAndConditions.oldstories.js → TermsAndConditions.stories.js} +0 -0
  210. /package/src/components/molecules/terms-and-conditions-modal/{TermsAndConditionsModal.oldstories.js → TermsAndConditionsModal.stories.js} +0 -0
  211. /package/src/components/molecules/workflow-tile/{WorkflowTile.oldstories.js → WorkflowTile.stories.js} +0 -0
@@ -1,273 +1,31 @@
1
1
  import React from "react";
2
- import { INFO_BLUE } from "../../../constants/colors";
3
- import { Box, Stack, Cluster } from "../../atoms/layouts";
4
- import Heading from "../../atoms/heading";
5
- import Paragraph from "../../atoms/paragraph";
2
+ import { text, select } from "@storybook/addon-knobs";
6
3
  import Module from "./Module";
7
- import { fn } from "@storybook/test";
8
- import { FONT_WEIGHT_SEMIBOLD } from "../../../constants/style_constants";
9
- import WalletIcon from "../../atoms/icons/WalletIcon";
10
- import ButtonWithAction from "../../atoms/button-with-action";
4
+ import page from "../../../../.storybook/page";
11
5
 
12
- const meta = {
13
- title: "Molecules/Module",
14
- component: Module,
15
- parameters: {
16
- layout: "centered"
17
- },
18
- tags: ["!autodocs"],
19
- args: {
20
- variant: "default",
21
- as: undefined,
22
- disabled: undefined,
23
- heading: undefined,
24
- rightTitleContent: undefined,
25
- titleID: "",
26
- spacing: "1rem",
27
- padding: "0",
28
- margin: "0",
29
- spacingBottom: "2.5rem",
30
- fontSize: undefined,
31
- children: undefined,
32
- allowContentOverflow: false
33
- },
34
- argTypes: {
35
- variant: {
36
- description:
37
- "Variant of the module, one of `default`, `largeTitle`, or `small` ",
38
- table: {
39
- type: { summary: "string" },
40
- defaultValue: { summary: "default" }
41
- }
42
- },
43
- as: {
44
- description: "HTML element type for the module's title text",
45
- table: {
46
- type: { summary: "string" },
47
- defaultValue: { summary: undefined }
48
- }
49
- },
50
- disabled: {
51
- description: "Whether the module is disabled",
52
- table: {
53
- type: { summary: "boolean" },
54
- defaultValue: { summary: undefined }
55
- }
56
- },
57
- heading: {
58
- description:
59
- "Text or a React Component to use in the heading, if rightTitleContent is undefined, value is wrapped in a `<Title />` atom.",
60
- table: {
61
- type: { summary: "string/React Component" },
62
- defaultValue: { summary: undefined }
63
- }
64
- },
65
- rightTitleContent: {
66
- description: "Component to render right justified with heading text",
67
- table: {
68
- type: { summary: "React Component" },
69
- defaultValue: { summary: undefined }
70
- }
71
- },
72
- titleID: {
73
- description: "ID value for the heading title element",
74
- table: {
75
- type: { summary: "string" },
76
- defaultValue: { summary: undefined }
77
- }
78
- },
79
- spacing: {
80
- description: "Top margin for heading text",
81
- table: {
82
- type: { summary: "string" },
83
- defaultValue: { summary: "1rem" }
84
- }
85
- },
86
- padding: {
87
- description: "Padding value for the module container",
88
- table: {
89
- type: { summary: "string" },
90
- defaultValue: { summary: "0" }
91
- }
92
- },
93
- margin: {
94
- description: "Margin value for the module container",
95
- table: {
96
- type: { summary: "string" },
97
- defaultValue: { summary: "0" }
98
- }
99
- },
100
- spacingBottom: {
101
- descripton: "Padding below the module",
102
- table: {
103
- type: { summary: "string" },
104
- defaultValue: { summary: "2.5rem" }
105
- }
106
- },
107
- fontSize: {
108
- description: "Font size of the module's title text",
109
- table: {
110
- type: { summary: "string" },
111
- defaultValue: { summary: undefined }
112
- }
113
- },
114
- children: {
115
- description: "React Components to render as children of the module",
116
- table: {
117
- type: { summary: "React Component" },
118
- defaultValue: { summary: undefined }
119
- }
120
- },
121
- allowContentOverflow: {
122
- description:
123
- "Whether content can overflow the heading portion of the module",
124
- table: {
125
- type: { summary: "boolean" },
126
- defaultValue: { summary: false }
127
- }
128
- }
129
- }
6
+ const variantsLabel = "variant";
7
+ const variants = {
8
+ default: "default",
9
+ largeTitle: "largeTitle",
10
+ None: undefined
130
11
  };
12
+ const defaultValue = "default";
13
+ const groupId = "props";
131
14
 
132
- export default meta;
15
+ export const module = () => (
16
+ <Module
17
+ variant={select(variantsLabel, variants, defaultValue, groupId)}
18
+ heading={text("heading", "Module Title", groupId)}
19
+ spacing={text("spacing", "1rem", groupId)}
20
+ padding={text("padding", "1rem", groupId)}
21
+ spacingBottom={text("spacingBottom", "2.5rem", groupId)}
22
+ >
23
+ {text("child components", "child components go here", groupId)}
24
+ </Module>
25
+ );
133
26
 
134
- export const BasicModule = {
135
- args: {
136
- heading: "Guest Checkout",
137
- padding: "1.5rem",
138
- spacing: "0",
139
- spacingBottom: "0",
140
- as: "h2",
141
- fontSize: "1.5rem"
142
- },
143
- render: args => {
144
- return (
145
- <Module {...args}>
146
- <Cluster justify="center" align="center" childGap="1rem">
147
- <Box padding="0" extraStyles={`display: flex; flex: 1;`}>
148
- {false ? (
149
- <Paragraph>
150
- Make a payment without your previously saved payment methods and
151
- addresses.
152
- </Paragraph>
153
- ) : (
154
- <Paragraph>
155
- You can create a wallet after you finish checking out
156
- </Paragraph>
157
- )}
158
- </Box>
159
- <Box padding="0" extraStyles={`display: flex; flex: 1;`}>
160
- <ButtonWithAction
161
- text="Check out as Guest"
162
- variant={"secondary"}
163
- dataQa={"Check out as Guest"}
164
- action={fn()}
165
- aria-labelledby="guest-checkout-button"
166
- role="link"
167
- extraStyles={`width: 100%;`}
168
- />
169
- </Box>
170
- </Cluster>
171
- </Module>
172
- );
173
- }
174
- };
175
-
176
- export const DisabledModule = {
177
- args: {
178
- heading: "Guest Checkout",
179
- padding: "1.5rem",
180
- spacing: "0",
181
- spacingBottom: "0",
182
- as: "h2",
183
- fontSize: "1.5rem",
184
- disabled: true
185
- },
186
- render: args => {
187
- return (
188
- <Module {...args}>
189
- <Cluster justify="center" align="center" childGap="1rem">
190
- <Box padding="0" extraStyles={`display: flex; flex: 1;`}>
191
- {false ? (
192
- <Paragraph>
193
- Make a payment without your previously saved payment methods and
194
- addresses.
195
- </Paragraph>
196
- ) : (
197
- <Paragraph>
198
- You can create a wallet after you finish checking out
199
- </Paragraph>
200
- )}
201
- </Box>
202
- <Box padding="0" extraStyles={`display: flex; flex: 1;`}>
203
- <ButtonWithAction
204
- text="Check out as Guest"
205
- variant={"secondary"}
206
- dataQa={"Check out as Guest"}
207
- action={fn()}
208
- aria-labelledby="guest-checkout-button"
209
- role="link"
210
- extraStyles={`width: 100%;`}
211
- />
212
- </Box>
213
- </Cluster>
214
- </Module>
215
- );
216
- }
217
- };
218
-
219
- export const DeprecatedModule = {
220
- args: {
221
- padding: "0",
222
- spacing: "0",
223
- spacingBottom: "1.5rem"
224
- },
225
- render: args => {
226
- return (
227
- <Module {...args}>
228
- <Box background={INFO_BLUE} padding={"1rem"} minWidth="100%">
229
- <Stack childGap={"0"}>
230
- <Cluster
231
- justify="flex-start"
232
- align={"flex-start"}
233
- nowrap
234
- childGap="1rem"
235
- >
236
- <Box padding="0" extraStyles={`flex: 2;`}>
237
- <Stack childGap="0.5rem">
238
- <Box padding="0">
239
- <Heading variant="h6" as="h2" weight={FONT_WEIGHT_SEMIBOLD}>
240
- Register for Cityville Wallet
241
- </Heading>
242
- </Box>
243
- <Box padding="0">
244
- <Paragraph>
245
- Next time, use wallet to pay quicker with saved payment
246
- methods and personal information
247
- </Paragraph>
248
- </Box>
249
- </Stack>
250
- </Box>
251
- <Box
252
- padding="0"
253
- extraStyles={`> svg { width: 190px; height: 114px;
254
- } flex: 1;`}
255
- >
256
- <WalletIcon />
257
- </Box>
258
- </Cluster>
259
- <Box padding={"1rem 0 0"} extraStyles={`width: 100%;`}>
260
- <ButtonWithAction
261
- text="Register Now"
262
- variant="primary"
263
- action={fn()}
264
- extraStyles={`width: 100%;`}
265
- dataQa="Register Now Widget"
266
- />
267
- </Box>
268
- </Stack>
269
- </Box>
270
- </Module>
271
- );
272
- }
273
- };
27
+ const story = page({
28
+ title: "Components|Atoms/Module",
29
+ Component: Module
30
+ });
31
+ export default story;