@thecb/components 10.12.2-beta.0 → 10.12.3-beta.0
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.
- package/README.md +4 -0
- package/dist/index.cjs.js +1476 -2489
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +8 -6
- package/dist/index.esm.js +1476 -2488
- package/dist/index.esm.js.map +1 -1
- package/package.json +25 -13
- package/src/components/atoms/.DS_Store +0 -0
- package/src/components/atoms/alert/Alert.mdx +19 -0
- package/src/components/atoms/alert/Alert.stories.js +148 -26
- package/src/components/atoms/badge/Badge.js +2 -2
- package/src/components/atoms/badge/Badge.mdx +27 -0
- package/src/components/atoms/badge/Badge.stories.js +143 -29
- package/src/components/atoms/breadcrumb/Breadcrumb.mdx +21 -0
- package/src/components/atoms/breadcrumb/Breadcrumb.stories.js +38 -29
- package/src/components/atoms/button-with-action/ButtonWithAction.stories.js +108 -55
- package/src/components/atoms/button-with-link/ButtonWithLink.mdx +21 -0
- package/src/components/atoms/button-with-link/ButtonWithLink.stories.js +160 -31
- package/src/components/atoms/card/Card.js +13 -1
- package/src/components/atoms/card/Card.mdx +41 -0
- package/src/components/atoms/card/Card.stories.js +360 -0
- package/src/components/atoms/card/Card.theme.js +2 -0
- package/src/components/atoms/card/index.d.ts +1 -0
- package/src/components/atoms/checkbox/Checkbox.js +8 -14
- package/src/components/atoms/checkbox/Checkbox.mdx +15 -0
- package/src/components/atoms/checkbox/Checkbox.oldstories.js +30 -0
- package/src/components/atoms/checkbox/Checkbox.stories.js +148 -29
- package/src/components/atoms/country-dropdown/CountryDropdown.mdx +36 -0
- package/src/components/atoms/country-dropdown/CountryDropdown.stories.js +61 -27
- package/src/components/atoms/detail/Detail.js +0 -26
- package/src/components/atoms/detail/Detail.mdx +32 -0
- package/src/components/atoms/detail/Detail.stories.js +156 -0
- package/src/components/atoms/display-box/DisplayBox.mdx +11 -0
- package/src/components/atoms/display-box/DisplayBox.stories.js +65 -21
- package/src/components/atoms/display-card/DisplayCard.mdx +13 -0
- package/src/components/atoms/display-card/DisplayCard.stories.js +163 -22
- package/src/components/atoms/dropdown/Dropdown.mdx +65 -0
- package/src/components/atoms/dropdown/Dropdown.stories.js +91 -10
- package/src/components/atoms/form-layouts/FormInput.mdx +38 -0
- package/src/components/atoms/form-layouts/FormInput.stories.js +212 -26
- package/src/components/atoms/form-select/FormSelect.mdx +42 -0
- package/src/components/atoms/form-select/FormSelect.stories.js +55 -29
- package/src/components/atoms/formatted-address/FormattedAddress.mdx +13 -0
- package/src/components/atoms/formatted-address/FormattedAddress.stories.js +133 -27
- package/src/components/atoms/formatted-bank-account/FormattedBankAccount.mdx +17 -0
- package/src/components/atoms/formatted-bank-account/FormattedBankAccount.stories.js +57 -0
- package/src/components/atoms/formatted-credit-card/FormattedCreditCard.mdx +40 -0
- package/src/components/atoms/formatted-credit-card/FormattedCreditCard.stories.js +74 -0
- package/src/components/atoms/icons/Icons.mdx +40 -0
- package/src/components/atoms/icons/Icons.stories.js +325 -0
- package/src/components/atoms/icons/index.js +1 -5
- package/src/components/atoms/labeled-amount/LabeledAmount.mdx +23 -0
- package/src/components/atoms/labeled-amount/LabeledAmount.stories.js +110 -34
- package/src/components/atoms/line-item/LineItem.mdx +28 -0
- package/src/components/atoms/line-item/LineItem.stories.js +89 -22
- package/src/components/atoms/link/Link.mdx +19 -0
- package/src/components/atoms/link/Link.stories.js +155 -49
- package/src/components/atoms/loading/Loading.mdx +13 -0
- package/src/components/atoms/loading/Loading.stories.js +22 -0
- package/src/components/atoms/loading-line/LoadingLine.js +14 -10
- package/src/components/atoms/loading-line/LoadingLine.mdx +15 -0
- package/src/components/atoms/loading-line/LoadingLine.stories.js +132 -28
- package/src/components/atoms/nav-footer/NavFooter.mdx +15 -0
- package/src/components/atoms/nav-footer/NavFooter.stories.js +235 -22
- package/src/components/atoms/nav-header/NavHeader.mdx +13 -0
- package/src/components/atoms/nav-header/NavHeader.stories.js +122 -21
- package/src/components/atoms/nav-tabs/NavTabs.mdx +30 -0
- package/src/components/atoms/nav-tabs/NavTabs.stories.js +49 -0
- package/src/components/atoms/password-requirements/PasswordRequirements.mdx +39 -0
- package/src/components/atoms/password-requirements/PasswordRequirements.stories.js +108 -44
- package/src/components/atoms/placeholder/Placeholder.mdx +19 -0
- package/src/components/atoms/placeholder/Placeholder.stories.js +164 -36
- package/src/components/atoms/searchable-select/SearchableSelect.mdx +44 -0
- package/src/components/atoms/searchable-select/SearchableSelect.stories.js +103 -28
- package/src/components/atoms/state-province-dropdown/StateProvinceDropdown.mdx +36 -0
- package/src/components/atoms/state-province-dropdown/StateProvinceDropdown.stories.js +65 -40
- package/src/components/atoms/table/Table.mdx +71 -0
- package/src/components/atoms/table/Table.oldstories.js +84 -0
- package/src/components/atoms/table/Table.stories.js +59 -75
- package/src/components/atoms/table/TableRow.js +1 -0
- package/src/components/atoms/title/Title.js +0 -23
- package/src/components/atoms/title/Title.mdx +26 -0
- package/src/components/atoms/title/Title.stories.js +144 -0
- package/src/components/atoms/toggle-switch/ToggleSwitch.mdx +17 -0
- package/src/components/atoms/toggle-switch/ToggleSwitch.stories.js +103 -20
- package/src/components/atoms/toggle-switch/ToggleSwitch.theme.js +8 -5
- package/src/components/atoms/typeahead-input/TypeaheadInput.mdx +13 -0
- package/src/components/atoms/typeahead-input/TypeaheadInput.stories.js +63 -0
- package/src/components/molecules/address-form/AddressForm.mdx +18 -0
- package/src/components/molecules/address-form/AddressForm.stories.js +223 -20
- package/src/components/molecules/banner/Banner.mdx +23 -0
- package/src/components/molecules/banner/Banner.stories.js +122 -26
- package/src/components/molecules/change-password-form/ChangePasswordForm.mdx +15 -0
- package/src/components/molecules/change-password-form/ChangePasswordForm.stories.js +203 -19
- package/src/components/molecules/collapsible-section/CollapsibleSection.mdx +15 -0
- package/src/components/molecules/collapsible-section/CollapsibleSection.stories.js +210 -61
- package/src/components/molecules/edit-name-form/EditNameForm.mdx +13 -0
- package/src/components/molecules/edit-name-form/EditNameForm.stories.js +117 -0
- package/src/components/molecules/idle-modal/IdleModal.js +101 -0
- package/src/components/molecules/idle-modal/IdleModal.mdx +17 -0
- package/src/components/molecules/idle-modal/IdleModal.stories.js +180 -0
- package/src/components/molecules/idle-modal/index.d.ts +16 -0
- package/src/components/molecules/idle-modal/index.js +3 -0
- package/src/components/molecules/index.js +1 -0
- package/src/components/molecules/link-card/LinkCard.mdx +17 -0
- package/src/components/molecules/link-card/LinkCard.stories.js +287 -72
- package/src/components/molecules/login-form/LoginForm.mdx +16 -0
- package/src/components/molecules/login-form/LoginForm.stories.js +117 -21
- package/src/components/molecules/modal/Modal.mdx +17 -0
- package/src/components/molecules/modal/Modal.stories.js +342 -128
- package/src/components/molecules/module/Module.mdx +17 -0
- package/src/components/molecules/module/Module.stories.js +267 -25
- package/src/components/molecules/multiple-select-filter/MultipleSelectFilter.js +309 -77
- package/src/components/molecules/multiple-select-filter/{MultipleSelectFilter.stories.js → MultipleSelectFilter.oldstories.js} +4 -2
- package/src/components/molecules/multiple-select-filter/MultipleSelectFilter.styled.js +6 -6
- package/src/components/molecules/multiple-select-filter/index.d.ts +2 -2
- package/src/components/molecules/obligation/Obligation.mdx +23 -0
- package/src/components/molecules/obligation/Obligation.stories.js +460 -0
- package/src/components/molecules/obligation/icons/PropertyPersonalIcon.js +1 -1
- package/src/components/molecules/pagination/Pagination.mdx +15 -0
- package/src/components/molecules/pagination/Pagination.stories.js +177 -28
- package/src/components/molecules/popover/Popover.mdx +15 -0
- package/src/components/molecules/popover/Popover.stories.js +220 -0
- package/src/components/molecules/tabs/Tabs.mdx +17 -0
- package/src/components/molecules/tabs/Tabs.stories.js +135 -227
- package/src/components/molecules/toast-notification/Toast.mdx +15 -0
- package/src/components/molecules/toast-notification/Toast.stories.js +183 -0
- package/src/hooks/use-outside-click/index.js +5 -4
- package/src/stories/Button.stories.ts +53 -0
- package/src/stories/Button.tsx +48 -0
- package/src/stories/Configure.mdx +364 -0
- package/src/stories/Header.stories.ts +33 -0
- package/src/stories/Header.tsx +56 -0
- package/src/stories/Page.stories.ts +32 -0
- package/src/stories/Page.tsx +73 -0
- package/src/stories/assets/accessibility.png +0 -0
- package/src/stories/assets/accessibility.svg +5 -0
- package/src/stories/assets/addon-library.png +0 -0
- package/src/stories/assets/assets.png +0 -0
- package/src/stories/assets/avif-test-image.avif +0 -0
- package/src/stories/assets/context.png +0 -0
- package/src/stories/assets/discord.svg +15 -0
- package/src/stories/assets/docs.png +0 -0
- package/src/stories/assets/figma-plugin.png +0 -0
- package/src/stories/assets/github.svg +3 -0
- package/src/stories/assets/share.png +0 -0
- package/src/stories/assets/styling.png +0 -0
- package/src/stories/assets/testing.png +0 -0
- package/src/stories/assets/theming.png +0 -0
- package/src/stories/assets/tutorials.svg +12 -0
- package/src/stories/assets/youtube.svg +4 -0
- package/src/stories/button.css +30 -0
- package/src/stories/header.css +32 -0
- package/src/stories/page.css +69 -0
- package/src/util/idleTimerUtils.js +36 -0
- package/src/util/index.js +3 -1
- package/src/components/atoms/icons/CheckboxCheckmarkIcon.js +0 -45
- package/src/components/atoms/icons/PaymentStatusIcon.d.ts +0 -1
- package/src/components/atoms/icons/PaymentStatusIcon.js +0 -28
- package/src/components/atoms/icons/PersonIcon.d.ts +0 -1
- package/src/components/atoms/icons/PersonIcon.js +0 -28
- package/src/components/atoms/icons/icons.stories.js +0 -120
- package/src/components/molecules/edit-name-form/EdidNameForm.stories.js +0 -24
- package/src/components/molecules/multiple-select-filter/__private__/ActionLinkButton.js +0 -27
- package/src/components/molecules/multiple-select-filter/__private__/FilterButton.js +0 -89
- package/src/components/molecules/multiple-select-filter/__private__/FilterDropdown.js +0 -27
- package/src/components/molecules/multiple-select-filter/__private__/FilterableList.js +0 -146
- package/src/components/molecules/multiple-select-filter/__private__/FilterableListItem.js +0 -79
- package/src/components/molecules/multiple-select-filter/__private__/SearchBox.js +0 -41
- package/src/components/molecules/multiple-select-filter/__private__/useKeyboardNavigation.js +0 -84
- package/src/components/molecules/multiple-select-filter/__private__/util.js +0 -31
- package/src/components/molecules/toast-notification/ToastNotification.stories.js +0 -105
- /package/src/components/atoms/add-obligation/{AddObligation.stories.js → AddObligation.oldstories.js} +0 -0
- /package/src/components/atoms/amount-callout/{AmountCallout.stories.js → AmountCallout.oldstories.js} +0 -0
- /package/src/components/atoms/checkbox-list/{CheckboxList.stories.js → CheckboxList.oldstories.js} +0 -0
- /package/src/components/atoms/form-layouts/{FormLayouts.stories.js → FormLayouts.oldstories.js} +0 -0
- /package/src/components/atoms/hamburger-button/{HamburgerButton.stories.js → HamburgerButton.oldstories.js} +0 -0
- /package/src/components/atoms/heading/{Heading.stories.js → Heading.oldstories.js} +0 -0
- /package/src/components/atoms/layouts/examples/box-example/{BoxExample.stories.js → BoxExample.oldstories.js} +0 -0
- /package/src/components/atoms/layouts/examples/center-example/{CenterExample.stories.js → CenterExample.oldstories.js} +0 -0
- /package/src/components/atoms/layouts/examples/cluster-example/{ClusterExample.stories.js → ClusterExample.oldstories.js} +0 -0
- /package/src/components/atoms/layouts/examples/cover-example/{CoverExample.stories.js → CoverExample.oldstories.js} +0 -0
- /package/src/components/atoms/layouts/examples/frame-example/{FrameExample.stories.js → FrameExample.oldstories.js} +0 -0
- /package/src/components/atoms/layouts/examples/grid-example/{GridExample.stories.js → GridExample.oldstories.js} +0 -0
- /package/src/components/atoms/layouts/examples/imposter-example/{ImposterExample.stories.js → ImposterExample.oldstories.js} +0 -0
- /package/src/components/atoms/layouts/examples/motion-example/{MotionExample.stories.js → MotionExample.oldstories.js} +0 -0
- /package/src/components/atoms/layouts/examples/reel-example/{ReelExample.stories.js → ReelExample.oldstories.js} +0 -0
- /package/src/components/atoms/layouts/examples/sidebar-example/{SidebarExample.stories.js → SidebarExample.oldstories.js} +0 -0
- /package/src/components/atoms/layouts/examples/stack-example/{StackExample.stories.js → StackExample.oldstories.js} +0 -0
- /package/src/components/atoms/layouts/examples/switcher-example/{SwitcherExample.stories.js → SwitcherExample.oldstories.js} +0 -0
- /package/src/components/atoms/paragraph/{Paragraph.stories.js → Paragraph.oldstories.js} +0 -0
- /package/src/components/atoms/processing-fee/{ProcessingFee.stories.js → ProcessingFee.oldstories.js} +0 -0
- /package/src/components/atoms/search/{Search.stories.js → Search.oldstories.js} +0 -0
- /package/src/components/atoms/solid-divider/{SolidDivider.stories.js → SolidDivider.oldstories.js} +0 -0
- /package/src/components/atoms/sortable-table-heading/{SortableTableHeading.stories.js → SortableTableHeading.oldstories.js} +0 -0
- /package/src/components/atoms/spinner/{Spinner.stories.js → Spinner.oldstories.js} +0 -0
- /package/src/components/atoms/tab/{Tab.stories.js → Tab.oldstories.js} +0 -0
- /package/src/components/atoms/text/{Text.stories.js → Text.oldstories.js} +0 -0
- /package/src/components/atoms/typeahead-input/{TypeaheadIinput.stories.js → TypeaheadIinput.oldstories.js} +0 -0
- /package/src/components/atoms/wallet-name/{WalletName.stories.js → WalletName.oldstories.js} +0 -0
- /package/src/components/molecules/account-and-routing-modal/{AccountAndRoutingModal.stories.js → AccountAndRoutingModal.oldstories.js} +0 -0
- /package/src/components/molecules/editable-list/{EditableList.stories.js → EditableList.oldstories.js} +0 -0
- /package/src/components/molecules/email-form/{EmailForm.stories.js → EmailForm.oldstories.js} +0 -0
- /package/src/components/molecules/forgot-password-form/{ForgotPasswordForm.stories.js → ForgotPasswordForm.oldstories.js} +0 -0
- /package/src/components/molecules/highlight-tab-row/{HighlightTabRow.stories.js → HighlightTabRow.oldstories.js} +0 -0
- /package/src/components/molecules/obligation/modules/{AmountModule.stories.js → AmountModule.oldstories.js} +0 -0
- /package/src/components/molecules/payment-button-bar/{PaymentButtonBar.stories.js → PaymentButtonBar.oldstories.js} +0 -0
- /package/src/components/molecules/payment-details/{PaymentDetails.stories.js → PaymentDetails.oldstories.js} +0 -0
- /package/src/components/molecules/payment-form-ach/{PaymentFormACH.stories.js → PaymentFormACH.oldstories.js} +0 -0
- /package/src/components/molecules/payment-form-card/{PaymentFormCard.stories.js → PaymentFormCard.oldstories.js} +0 -0
- /package/src/components/molecules/periscope-dashboard-iframe/{PeriscopeDashBoardIframe.stories.js → PeriscopeDashBoardIframe.oldstories.js} +0 -0
- /package/src/components/molecules/phone-form/{PhoneForm.stories.js → PhoneForm.oldstories.js} +0 -0
- /package/src/components/molecules/popup-menu/{PopupMenu.stories.js → PopupMenu.oldstories.js} +0 -0
- /package/src/components/molecules/radio-group/{RadioGroup.stories.js → RadioGroup.oldstories.js} +0 -0
- /package/src/components/molecules/radio-section/{RadioSection.stories.js → RadioSection.oldstories.js} +0 -0
- /package/src/components/molecules/registration-form/{RegistrationForm.stories.js → RegistrationForm.oldstories.js} +0 -0
- /package/src/components/molecules/reset-confirmation-form/{ResetConfirmationForm.stories.js → ResetConfirmationForm.oldstories.js} +0 -0
- /package/src/components/molecules/reset-password-form/{ResetPasswordForm.stories.js → ResetPasswordForm.oldstories.js} +0 -0
- /package/src/components/molecules/reset-password-success/{ResetPasswordSuccess.stories.js → ResetPasswordSuccess.oldstories.js} +0 -0
- /package/src/components/molecules/tab-sidebar/{TabSidebar.stories.js → TabSidebar.oldstories.js} +0 -0
- /package/src/components/molecules/terms-and-conditions/{TermsAndConditions.stories.js → TermsAndConditions.oldstories.js} +0 -0
- /package/src/components/molecules/terms-and-conditions-modal/{TermsAndConditionsModal.stories.js → TermsAndConditionsModal.oldstories.js} +0 -0
- /package/src/components/molecules/workflow-tile/{WorkflowTile.stories.js → WorkflowTile.oldstories.js} +0 -0
|
@@ -1,31 +1,273 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
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";
|
|
3
6
|
import Module from "./Module";
|
|
4
|
-
import
|
|
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";
|
|
5
11
|
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
+
}
|
|
11
130
|
};
|
|
12
|
-
const defaultValue = "default";
|
|
13
|
-
const groupId = "props";
|
|
14
131
|
|
|
15
|
-
export
|
|
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
|
-
);
|
|
132
|
+
export default meta;
|
|
26
133
|
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
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
|
+
};
|