@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.
- package/README.md +0 -4
- package/dist/index.cjs.js +2526 -1617
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +4 -5
- package/dist/index.esm.js +2527 -1617
- package/dist/index.esm.js.map +1 -1
- package/package.json +13 -25
- package/src/components/atoms/alert/Alert.stories.js +26 -148
- package/src/components/atoms/badge/Badge.js +2 -2
- package/src/components/atoms/badge/Badge.stories.js +29 -143
- package/src/components/atoms/breadcrumb/Breadcrumb.stories.js +29 -38
- package/src/components/atoms/button-with-action/ButtonWithAction.stories.js +55 -108
- package/src/components/atoms/button-with-link/ButtonWithLink.stories.js +31 -160
- package/src/components/atoms/checkbox/Checkbox.stories.js +29 -148
- package/src/components/atoms/country-dropdown/CountryDropdown.stories.js +27 -61
- package/src/components/atoms/detail/Detail.js +26 -0
- package/src/components/atoms/display-box/DisplayBox.stories.js +21 -65
- package/src/components/atoms/display-card/DisplayCard.stories.js +22 -163
- package/src/components/atoms/dropdown/Dropdown.stories.js +10 -91
- package/src/components/atoms/form-layouts/FormInput.stories.js +26 -212
- package/src/components/atoms/form-select/FormSelect.stories.js +29 -55
- package/src/components/atoms/formatted-address/FormattedAddress.stories.js +27 -133
- package/src/components/atoms/icons/icons.stories.js +116 -0
- package/src/components/atoms/labeled-amount/LabeledAmount.stories.js +34 -110
- package/src/components/atoms/line-item/LineItem.stories.js +22 -89
- package/src/components/atoms/link/Link.stories.js +49 -155
- package/src/components/atoms/loading-line/LoadingLine.js +10 -14
- package/src/components/atoms/loading-line/LoadingLine.stories.js +28 -132
- package/src/components/atoms/nav-footer/NavFooter.stories.js +22 -235
- package/src/components/atoms/nav-header/NavHeader.stories.js +21 -122
- package/src/components/atoms/password-requirements/PasswordRequirements.stories.js +44 -108
- package/src/components/atoms/placeholder/Placeholder.stories.js +36 -164
- package/src/components/atoms/searchable-select/SearchableSelect.stories.js +28 -103
- package/src/components/atoms/state-province-dropdown/StateProvinceDropdown.stories.js +40 -65
- package/src/components/atoms/table/Table.stories.js +75 -59
- package/src/components/atoms/table/TableRow.js +0 -1
- package/src/components/atoms/title/Title.js +23 -0
- package/src/components/atoms/toggle-switch/ToggleSwitch.stories.js +20 -103
- package/src/components/atoms/toggle-switch/ToggleSwitch.theme.js +5 -8
- package/src/components/molecules/address-form/AddressForm.stories.js +20 -223
- package/src/components/molecules/banner/Banner.stories.js +26 -122
- package/src/components/molecules/change-password-form/ChangePasswordForm.stories.js +19 -203
- package/src/components/molecules/collapsible-section/CollapsibleSection.stories.js +61 -210
- package/src/components/molecules/edit-name-form/EdidNameForm.stories.js +24 -0
- package/src/components/molecules/index.js +0 -1
- package/src/components/molecules/link-card/LinkCard.stories.js +72 -287
- package/src/components/molecules/login-form/LoginForm.stories.js +21 -117
- package/src/components/molecules/modal/Modal.stories.js +128 -342
- package/src/components/molecules/module/Module.stories.js +25 -267
- package/src/components/molecules/multiple-select-filter/MultipleSelectFilter.js +61 -295
- package/src/components/molecules/multiple-select-filter/{MultipleSelectFilter.oldstories.js → MultipleSelectFilter.stories.js} +1 -1
- package/src/components/molecules/multiple-select-filter/MultipleSelectFilter.styled.js +4 -4
- package/src/components/molecules/multiple-select-filter/__private__/ActionLinkButton.js +24 -0
- package/src/components/molecules/multiple-select-filter/__private__/FilterButton.js +85 -0
- package/src/components/molecules/multiple-select-filter/__private__/FilterDropdown.js +23 -0
- package/src/components/molecules/multiple-select-filter/__private__/FilterableList.js +144 -0
- package/src/components/molecules/multiple-select-filter/__private__/FilterableListItem.js +67 -0
- package/src/components/molecules/multiple-select-filter/__private__/SearchBox.js +38 -0
- package/src/components/molecules/multiple-select-filter/__private__/useKeyboardNavigation.js +84 -0
- package/src/components/molecules/multiple-select-filter/__private__/util.js +31 -0
- package/src/components/molecules/obligation/icons/PropertyPersonalIcon.js +1 -1
- package/src/components/molecules/pagination/Pagination.stories.js +28 -177
- package/src/components/molecules/tabs/Tabs.stories.js +227 -135
- package/src/components/molecules/toast-notification/ToastNotification.stories.js +105 -0
- package/src/hooks/use-outside-click/index.js +4 -5
- package/src/util/index.js +1 -3
- package/src/components/atoms/alert/Alert.mdx +0 -19
- package/src/components/atoms/badge/Badge.mdx +0 -27
- package/src/components/atoms/breadcrumb/Breadcrumb.mdx +0 -21
- package/src/components/atoms/button-with-link/ButtonWithLink.mdx +0 -21
- package/src/components/atoms/card/Card.mdx +0 -41
- package/src/components/atoms/card/Card.stories.js +0 -360
- package/src/components/atoms/checkbox/Checkbox.mdx +0 -15
- package/src/components/atoms/checkbox/Checkbox.oldstories.js +0 -30
- package/src/components/atoms/country-dropdown/CountryDropdown.mdx +0 -36
- package/src/components/atoms/detail/Detail.mdx +0 -32
- package/src/components/atoms/detail/Detail.stories.js +0 -156
- package/src/components/atoms/display-box/DisplayBox.mdx +0 -11
- package/src/components/atoms/display-card/DisplayCard.mdx +0 -13
- package/src/components/atoms/dropdown/Dropdown.mdx +0 -65
- package/src/components/atoms/form-layouts/FormInput.mdx +0 -38
- package/src/components/atoms/form-select/FormSelect.mdx +0 -42
- package/src/components/atoms/formatted-address/FormattedAddress.mdx +0 -13
- package/src/components/atoms/formatted-bank-account/FormattedBankAccount.mdx +0 -17
- package/src/components/atoms/formatted-bank-account/FormattedBankAccount.stories.js +0 -57
- package/src/components/atoms/formatted-credit-card/FormattedCreditCard.mdx +0 -40
- package/src/components/atoms/formatted-credit-card/FormattedCreditCard.stories.js +0 -74
- package/src/components/atoms/icons/Icons.mdx +0 -40
- package/src/components/atoms/icons/Icons.stories.js +0 -325
- package/src/components/atoms/labeled-amount/LabeledAmount.mdx +0 -23
- package/src/components/atoms/line-item/LineItem.mdx +0 -28
- package/src/components/atoms/link/Link.mdx +0 -19
- package/src/components/atoms/loading/Loading.mdx +0 -13
- package/src/components/atoms/loading/Loading.stories.js +0 -22
- package/src/components/atoms/loading-line/LoadingLine.mdx +0 -15
- package/src/components/atoms/nav-footer/NavFooter.mdx +0 -15
- package/src/components/atoms/nav-header/NavHeader.mdx +0 -13
- package/src/components/atoms/nav-tabs/NavTabs.mdx +0 -30
- package/src/components/atoms/nav-tabs/NavTabs.stories.js +0 -49
- package/src/components/atoms/password-requirements/PasswordRequirements.mdx +0 -39
- package/src/components/atoms/placeholder/Placeholder.mdx +0 -19
- package/src/components/atoms/searchable-select/SearchableSelect.mdx +0 -44
- package/src/components/atoms/state-province-dropdown/StateProvinceDropdown.mdx +0 -36
- package/src/components/atoms/table/Table.mdx +0 -71
- package/src/components/atoms/table/Table.oldstories.js +0 -84
- package/src/components/atoms/title/Title.mdx +0 -26
- package/src/components/atoms/title/Title.stories.js +0 -144
- package/src/components/atoms/toggle-switch/ToggleSwitch.mdx +0 -17
- package/src/components/atoms/typeahead-input/TypeaheadInput.mdx +0 -13
- package/src/components/atoms/typeahead-input/TypeaheadInput.stories.js +0 -63
- package/src/components/molecules/address-form/AddressForm.mdx +0 -18
- package/src/components/molecules/banner/Banner.mdx +0 -23
- package/src/components/molecules/change-password-form/ChangePasswordForm.mdx +0 -15
- package/src/components/molecules/collapsible-section/CollapsibleSection.mdx +0 -15
- package/src/components/molecules/edit-name-form/EditNameForm.mdx +0 -13
- package/src/components/molecules/edit-name-form/EditNameForm.stories.js +0 -117
- package/src/components/molecules/idle-modal/IdleModal.js +0 -101
- package/src/components/molecules/idle-modal/IdleModal.mdx +0 -17
- package/src/components/molecules/idle-modal/IdleModal.stories.js +0 -180
- package/src/components/molecules/idle-modal/index.d.ts +0 -16
- package/src/components/molecules/idle-modal/index.js +0 -3
- package/src/components/molecules/link-card/LinkCard.mdx +0 -17
- package/src/components/molecules/login-form/LoginForm.mdx +0 -16
- package/src/components/molecules/modal/Modal.mdx +0 -17
- package/src/components/molecules/module/Module.mdx +0 -17
- package/src/components/molecules/obligation/Obligation.mdx +0 -23
- package/src/components/molecules/obligation/Obligation.stories.js +0 -460
- package/src/components/molecules/pagination/Pagination.mdx +0 -15
- package/src/components/molecules/popover/Popover.mdx +0 -15
- package/src/components/molecules/popover/Popover.stories.js +0 -220
- package/src/components/molecules/tabs/Tabs.mdx +0 -17
- package/src/components/molecules/toast-notification/Toast.mdx +0 -15
- package/src/components/molecules/toast-notification/Toast.stories.js +0 -183
- package/src/stories/Button.stories.ts +0 -53
- package/src/stories/Button.tsx +0 -48
- package/src/stories/Configure.mdx +0 -364
- package/src/stories/Header.stories.ts +0 -33
- package/src/stories/Header.tsx +0 -56
- package/src/stories/Page.stories.ts +0 -32
- package/src/stories/Page.tsx +0 -73
- package/src/stories/assets/accessibility.png +0 -0
- package/src/stories/assets/accessibility.svg +0 -5
- 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 +0 -15
- package/src/stories/assets/docs.png +0 -0
- package/src/stories/assets/figma-plugin.png +0 -0
- package/src/stories/assets/github.svg +0 -3
- 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 +0 -12
- package/src/stories/assets/youtube.svg +0 -4
- package/src/stories/button.css +0 -30
- package/src/stories/header.css +0 -32
- package/src/stories/page.css +0 -69
- package/src/util/idleTimerUtils.js +0 -36
- /package/src/components/atoms/add-obligation/{AddObligation.oldstories.js → AddObligation.stories.js} +0 -0
- /package/src/components/atoms/amount-callout/{AmountCallout.oldstories.js → AmountCallout.stories.js} +0 -0
- /package/src/components/atoms/checkbox-list/{CheckboxList.oldstories.js → CheckboxList.stories.js} +0 -0
- /package/src/components/atoms/form-layouts/{FormLayouts.oldstories.js → FormLayouts.stories.js} +0 -0
- /package/src/components/atoms/hamburger-button/{HamburgerButton.oldstories.js → HamburgerButton.stories.js} +0 -0
- /package/src/components/atoms/heading/{Heading.oldstories.js → Heading.stories.js} +0 -0
- /package/src/components/atoms/layouts/examples/box-example/{BoxExample.oldstories.js → BoxExample.stories.js} +0 -0
- /package/src/components/atoms/layouts/examples/center-example/{CenterExample.oldstories.js → CenterExample.stories.js} +0 -0
- /package/src/components/atoms/layouts/examples/cluster-example/{ClusterExample.oldstories.js → ClusterExample.stories.js} +0 -0
- /package/src/components/atoms/layouts/examples/cover-example/{CoverExample.oldstories.js → CoverExample.stories.js} +0 -0
- /package/src/components/atoms/layouts/examples/frame-example/{FrameExample.oldstories.js → FrameExample.stories.js} +0 -0
- /package/src/components/atoms/layouts/examples/grid-example/{GridExample.oldstories.js → GridExample.stories.js} +0 -0
- /package/src/components/atoms/layouts/examples/imposter-example/{ImposterExample.oldstories.js → ImposterExample.stories.js} +0 -0
- /package/src/components/atoms/layouts/examples/motion-example/{MotionExample.oldstories.js → MotionExample.stories.js} +0 -0
- /package/src/components/atoms/layouts/examples/reel-example/{ReelExample.oldstories.js → ReelExample.stories.js} +0 -0
- /package/src/components/atoms/layouts/examples/sidebar-example/{SidebarExample.oldstories.js → SidebarExample.stories.js} +0 -0
- /package/src/components/atoms/layouts/examples/stack-example/{StackExample.oldstories.js → StackExample.stories.js} +0 -0
- /package/src/components/atoms/layouts/examples/switcher-example/{SwitcherExample.oldstories.js → SwitcherExample.stories.js} +0 -0
- /package/src/components/atoms/paragraph/{Paragraph.oldstories.js → Paragraph.stories.js} +0 -0
- /package/src/components/atoms/processing-fee/{ProcessingFee.oldstories.js → ProcessingFee.stories.js} +0 -0
- /package/src/components/atoms/search/{Search.oldstories.js → Search.stories.js} +0 -0
- /package/src/components/atoms/solid-divider/{SolidDivider.oldstories.js → SolidDivider.stories.js} +0 -0
- /package/src/components/atoms/sortable-table-heading/{SortableTableHeading.oldstories.js → SortableTableHeading.stories.js} +0 -0
- /package/src/components/atoms/spinner/{Spinner.oldstories.js → Spinner.stories.js} +0 -0
- /package/src/components/atoms/tab/{Tab.oldstories.js → Tab.stories.js} +0 -0
- /package/src/components/atoms/text/{Text.oldstories.js → Text.stories.js} +0 -0
- /package/src/components/atoms/typeahead-input/{TypeaheadIinput.oldstories.js → TypeaheadIinput.stories.js} +0 -0
- /package/src/components/atoms/wallet-name/{WalletName.oldstories.js → WalletName.stories.js} +0 -0
- /package/src/components/molecules/account-and-routing-modal/{AccountAndRoutingModal.oldstories.js → AccountAndRoutingModal.stories.js} +0 -0
- /package/src/components/molecules/editable-list/{EditableList.oldstories.js → EditableList.stories.js} +0 -0
- /package/src/components/molecules/email-form/{EmailForm.oldstories.js → EmailForm.stories.js} +0 -0
- /package/src/components/molecules/forgot-password-form/{ForgotPasswordForm.oldstories.js → ForgotPasswordForm.stories.js} +0 -0
- /package/src/components/molecules/highlight-tab-row/{HighlightTabRow.oldstories.js → HighlightTabRow.stories.js} +0 -0
- /package/src/components/molecules/obligation/modules/{AmountModule.oldstories.js → AmountModule.stories.js} +0 -0
- /package/src/components/molecules/payment-button-bar/{PaymentButtonBar.oldstories.js → PaymentButtonBar.stories.js} +0 -0
- /package/src/components/molecules/payment-details/{PaymentDetails.oldstories.js → PaymentDetails.stories.js} +0 -0
- /package/src/components/molecules/payment-form-ach/{PaymentFormACH.oldstories.js → PaymentFormACH.stories.js} +0 -0
- /package/src/components/molecules/payment-form-card/{PaymentFormCard.oldstories.js → PaymentFormCard.stories.js} +0 -0
- /package/src/components/molecules/periscope-dashboard-iframe/{PeriscopeDashBoardIframe.oldstories.js → PeriscopeDashBoardIframe.stories.js} +0 -0
- /package/src/components/molecules/phone-form/{PhoneForm.oldstories.js → PhoneForm.stories.js} +0 -0
- /package/src/components/molecules/popup-menu/{PopupMenu.oldstories.js → PopupMenu.stories.js} +0 -0
- /package/src/components/molecules/radio-group/{RadioGroup.oldstories.js → RadioGroup.stories.js} +0 -0
- /package/src/components/molecules/radio-section/{RadioSection.oldstories.js → RadioSection.stories.js} +0 -0
- /package/src/components/molecules/registration-form/{RegistrationForm.oldstories.js → RegistrationForm.stories.js} +0 -0
- /package/src/components/molecules/reset-confirmation-form/{ResetConfirmationForm.oldstories.js → ResetConfirmationForm.stories.js} +0 -0
- /package/src/components/molecules/reset-password-form/{ResetPasswordForm.oldstories.js → ResetPasswordForm.stories.js} +0 -0
- /package/src/components/molecules/reset-password-success/{ResetPasswordSuccess.oldstories.js → ResetPasswordSuccess.stories.js} +0 -0
- /package/src/components/molecules/tab-sidebar/{TabSidebar.oldstories.js → TabSidebar.stories.js} +0 -0
- /package/src/components/molecules/terms-and-conditions/{TermsAndConditions.oldstories.js → TermsAndConditions.stories.js} +0 -0
- /package/src/components/molecules/terms-and-conditions-modal/{TermsAndConditionsModal.oldstories.js → TermsAndConditionsModal.stories.js} +0 -0
- /package/src/components/molecules/workflow-tile/{WorkflowTile.oldstories.js → WorkflowTile.stories.js} +0 -0
|
@@ -1,138 +1,32 @@
|
|
|
1
|
-
import FormattedAddress from "./FormattedAddress";
|
|
2
1
|
import React from "react";
|
|
2
|
+
import { select, text } from "@storybook/addon-knobs";
|
|
3
|
+
import FormattedAddress from "./FormattedAddress";
|
|
4
|
+
import page from "../../../../.storybook/page";
|
|
3
5
|
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
controls: { expanded: true }
|
|
10
|
-
},
|
|
11
|
-
tags: ["!autodocs"],
|
|
12
|
-
args: {
|
|
13
|
-
street1: undefined,
|
|
14
|
-
city: undefined,
|
|
15
|
-
stateProvince: undefined,
|
|
16
|
-
country: undefined,
|
|
17
|
-
zip: undefined,
|
|
18
|
-
street2: null,
|
|
19
|
-
name: null,
|
|
20
|
-
themeValues: undefined,
|
|
21
|
-
qaPrefix: "address"
|
|
22
|
-
},
|
|
23
|
-
argTypes: {
|
|
24
|
-
street1: {
|
|
25
|
-
control: { type: "text" },
|
|
26
|
-
table: {
|
|
27
|
-
type: { summary: "string" },
|
|
28
|
-
defaultValue: { summary: undefined }
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
street2: {
|
|
32
|
-
description: "Optional",
|
|
33
|
-
control: { type: "text" },
|
|
34
|
-
table: {
|
|
35
|
-
type: { summary: "string" },
|
|
36
|
-
defaultValue: { summary: null }
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
city: {
|
|
40
|
-
control: { type: "text" },
|
|
41
|
-
table: {
|
|
42
|
-
type: { summary: "string" },
|
|
43
|
-
defaultValue: { summary: undefined }
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
stateProvince: {
|
|
47
|
-
control: { type: "text" },
|
|
48
|
-
table: {
|
|
49
|
-
type: { summary: "string" },
|
|
50
|
-
defaultValue: { summary: undefined }
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
country: {
|
|
54
|
-
description: "Optional",
|
|
55
|
-
control: { type: "text" },
|
|
56
|
-
table: {
|
|
57
|
-
type: { summary: "string" },
|
|
58
|
-
defaultValue: { summary: undefined }
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
zip: {
|
|
62
|
-
control: { type: "text" },
|
|
63
|
-
table: {
|
|
64
|
-
type: { summary: "string" },
|
|
65
|
-
defaultValue: { summary: undefined }
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
name: {
|
|
69
|
-
description: "Optional",
|
|
70
|
-
control: { type: "text" },
|
|
71
|
-
table: {
|
|
72
|
-
type: { summary: "string" },
|
|
73
|
-
defaultValue: { summary: null }
|
|
74
|
-
}
|
|
75
|
-
},
|
|
76
|
-
qaPrefix: {
|
|
77
|
-
control: { type: "text" },
|
|
78
|
-
table: {
|
|
79
|
-
type: { summary: "string" },
|
|
80
|
-
defaultValue: { summary: "address" }
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
export default meta;
|
|
87
|
-
|
|
88
|
-
export const Basic = {
|
|
89
|
-
args: {
|
|
90
|
-
street1: "363 W. Erie St.",
|
|
91
|
-
city: "Chicago",
|
|
92
|
-
stateProvince: "IL",
|
|
93
|
-
zip: "60654"
|
|
94
|
-
}
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
export const WithName = {
|
|
98
|
-
args: {
|
|
99
|
-
street1: "363 W. Erie St.",
|
|
100
|
-
city: "Chicago",
|
|
101
|
-
stateProvince: "IL",
|
|
102
|
-
zip: "60654",
|
|
103
|
-
name: "John Doe"
|
|
104
|
-
}
|
|
6
|
+
const variantsLabel = "variant";
|
|
7
|
+
const variants = {
|
|
8
|
+
default: "default",
|
|
9
|
+
radio: "radio",
|
|
10
|
+
None: undefined
|
|
105
11
|
};
|
|
12
|
+
const defaultValue = "default";
|
|
13
|
+
const groupId = "props";
|
|
106
14
|
|
|
107
|
-
export const
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
}
|
|
15
|
+
export const formattedAddress = () => (
|
|
16
|
+
<FormattedAddress
|
|
17
|
+
variant={select(variantsLabel, variants, defaultValue, groupId)}
|
|
18
|
+
street1={text("street1", "30 North Lasalle", groupId)}
|
|
19
|
+
city={text("city", "Chicago", groupId)}
|
|
20
|
+
stateProvince={text("stateProvince", "Illinois", groupId)}
|
|
21
|
+
country={text("country", "USA", groupId)}
|
|
22
|
+
zip={text("zip", "60606", groupId)}
|
|
23
|
+
street2={text("street2", "", groupId)}
|
|
24
|
+
name={text("name", "Citybase", groupId)}
|
|
25
|
+
/>
|
|
26
|
+
);
|
|
116
27
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
zip: "60654",
|
|
123
|
-
country: "USA"
|
|
124
|
-
}
|
|
125
|
-
};
|
|
126
|
-
|
|
127
|
-
export const WithAllProps = {
|
|
128
|
-
args: {
|
|
129
|
-
name: "John Doe",
|
|
130
|
-
street1: "363 W. Erie St.",
|
|
131
|
-
street2: "Floor 7",
|
|
132
|
-
city: "Chicago",
|
|
133
|
-
stateProvince: "IL",
|
|
134
|
-
zip: "60654",
|
|
135
|
-
country: "USA",
|
|
136
|
-
qaPrefix: "all-props"
|
|
137
|
-
}
|
|
138
|
-
};
|
|
28
|
+
const story = page({
|
|
29
|
+
title: "Components|Atoms/FormattedAddress",
|
|
30
|
+
Component: FormattedAddress
|
|
31
|
+
});
|
|
32
|
+
export default story;
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
import page from "../../../../.storybook/page";
|
|
4
|
+
import {
|
|
5
|
+
AccountsIcon,
|
|
6
|
+
AccountsAddIcon,
|
|
7
|
+
CaretArrowDown,
|
|
8
|
+
CaretArrowUp,
|
|
9
|
+
ForgotPasswordIcon,
|
|
10
|
+
GoToEmailIcon,
|
|
11
|
+
VerifiedEmailIcon,
|
|
12
|
+
PaymentMethodIcon,
|
|
13
|
+
AccountsIconSmall,
|
|
14
|
+
PaymentsIconSmall,
|
|
15
|
+
ProfileIconSmall,
|
|
16
|
+
SettingsIconSmall,
|
|
17
|
+
ChevronIcon,
|
|
18
|
+
PropertiesAddIcon,
|
|
19
|
+
PropertiesIconSmall,
|
|
20
|
+
AccountNumberImage,
|
|
21
|
+
RoutingNumberImage,
|
|
22
|
+
CheckmarkIcon,
|
|
23
|
+
BankIcon,
|
|
24
|
+
GenericCard,
|
|
25
|
+
AutopayOnIcon,
|
|
26
|
+
SearchIcon,
|
|
27
|
+
AchReturnIcon,
|
|
28
|
+
AllocatedIcon,
|
|
29
|
+
CalendarIcon,
|
|
30
|
+
ChargebackIcon,
|
|
31
|
+
ChargebackReversalIcon,
|
|
32
|
+
DuplicateIcon,
|
|
33
|
+
ErroredIcon,
|
|
34
|
+
FailedIcon,
|
|
35
|
+
PencilIcon,
|
|
36
|
+
PendingIcon,
|
|
37
|
+
PlusCircleIcon,
|
|
38
|
+
RefundIcon,
|
|
39
|
+
RejectedIcon,
|
|
40
|
+
RejectedVelocityIcon,
|
|
41
|
+
SuccessfulIcon,
|
|
42
|
+
VoidedIcon,
|
|
43
|
+
StatusUnknownIcon,
|
|
44
|
+
AutopayIcon,
|
|
45
|
+
KebabMenuIcon,
|
|
46
|
+
MultiCartIcon,
|
|
47
|
+
NoResultsIcon,
|
|
48
|
+
CloseIcon,
|
|
49
|
+
TrashIconV2,
|
|
50
|
+
DisabledPropertiesAddIcon,
|
|
51
|
+
DisabledAccountsAddIcon,
|
|
52
|
+
DisabledPaymentMethodsAddIcon,
|
|
53
|
+
ReversalNeededIcon,
|
|
54
|
+
OverageIcon,
|
|
55
|
+
ShortageIcon
|
|
56
|
+
} from "./index";
|
|
57
|
+
|
|
58
|
+
const story = page({
|
|
59
|
+
title: "Components|atoms/Icons",
|
|
60
|
+
Component: AccountsIcon
|
|
61
|
+
});
|
|
62
|
+
export default story;
|
|
63
|
+
|
|
64
|
+
export const accountNumberImage = () => <AccountNumberImage />;
|
|
65
|
+
export const accountsAddIcon = () => <AccountsAddIcon />;
|
|
66
|
+
export const accountsIcon = () => <AccountsIcon />;
|
|
67
|
+
export const accountsIconSmall = () => <AccountsIconSmall />;
|
|
68
|
+
export const achReturnIcon = () => <AchReturnIcon />;
|
|
69
|
+
export const allocatedIcon = () => <AllocatedIcon />;
|
|
70
|
+
export const autopayIcon = () => <AutopayIcon />;
|
|
71
|
+
export const autopayOnIcon = () => <AutopayOnIcon />;
|
|
72
|
+
export const bankIcon = () => <BankIcon />;
|
|
73
|
+
export const calendarIcon = () => <CalendarIcon />;
|
|
74
|
+
export const caretArrowDown = () => <CaretArrowDown />;
|
|
75
|
+
export const caretArrowUp = () => <CaretArrowUp />;
|
|
76
|
+
export const chargebackIcon = () => <ChargebackIcon />;
|
|
77
|
+
export const chargebackReversalIcon = () => <ChargebackReversalIcon />;
|
|
78
|
+
export const checkmarkIcon = () => <CheckmarkIcon />;
|
|
79
|
+
export const chevronIcon = () => <ChevronIcon />;
|
|
80
|
+
export const closeIcon = () => <CloseIcon />;
|
|
81
|
+
export const disabledAccountsAddIcon = () => <DisabledAccountsAddIcon />;
|
|
82
|
+
export const disabledPaymentMethodsAddIcon = () => (
|
|
83
|
+
<DisabledPaymentMethodsAddIcon />
|
|
84
|
+
);
|
|
85
|
+
export const disabledPropertiesAddIcon = () => <DisabledPropertiesAddIcon />;
|
|
86
|
+
export const duplicateIcon = () => <DuplicateIcon />;
|
|
87
|
+
export const erroredIcon = () => <ErroredIcon />;
|
|
88
|
+
export const failedIcon = () => <FailedIcon />;
|
|
89
|
+
export const forgotPasswordIcon = () => <ForgotPasswordIcon />;
|
|
90
|
+
export const genericCard = () => <GenericCard />;
|
|
91
|
+
export const goToEmailIcon = () => <GoToEmailIcon />;
|
|
92
|
+
export const kebabMenuIcon = () => <KebabMenuIcon />;
|
|
93
|
+
export const multiCartIcon = () => <MultiCartIcon />;
|
|
94
|
+
export const noResultsIcon = () => <NoResultsIcon />;
|
|
95
|
+
export const overageIcon = () => <OverageIcon />;
|
|
96
|
+
export const paymentMethodIcon = () => <PaymentMethodIcon />;
|
|
97
|
+
export const paymentsIconSmall = () => <PaymentsIconSmall />;
|
|
98
|
+
export const pencilIcon = () => <PencilIcon />;
|
|
99
|
+
export const pendingIcon = () => <PendingIcon />;
|
|
100
|
+
export const plusCircleIcon = () => <PlusCircleIcon />;
|
|
101
|
+
export const profileIconSmall = () => <ProfileIconSmall />;
|
|
102
|
+
export const propertiesAddIcon = () => <PropertiesAddIcon />;
|
|
103
|
+
export const propertiesIconSmall = () => <PropertiesIconSmall />;
|
|
104
|
+
export const refundIcon = () => <RefundIcon />;
|
|
105
|
+
export const rejectedIcon = () => <RejectedIcon />;
|
|
106
|
+
export const rejectedVelocityIcon = () => <RejectedVelocityIcon />;
|
|
107
|
+
export const reversalNeededIcon = () => <ReversalNeededIcon />;
|
|
108
|
+
export const routingNumberImage = () => <RoutingNumberImage />;
|
|
109
|
+
export const searchIcon = () => <SearchIcon />;
|
|
110
|
+
export const settingsIconSmall = () => <SettingsIconSmall />;
|
|
111
|
+
export const shortageIcon = () => <ShortageIcon />;
|
|
112
|
+
export const statusUnknownIcon = () => <StatusUnknownIcon />;
|
|
113
|
+
export const successfulIcon = () => <SuccessfulIcon />;
|
|
114
|
+
export const trashIconV2 = () => <TrashIconV2 />;
|
|
115
|
+
export const verifiedEmailIcon = () => <VerifiedEmailIcon />;
|
|
116
|
+
export const voidedIcon = () => <VoidedIcon />;
|
|
@@ -1,118 +1,42 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { text, select } from "@storybook/addon-knobs";
|
|
1
3
|
import LabeledAmount from "./LabeledAmount";
|
|
2
|
-
import
|
|
4
|
+
import page from "../../../../.storybook/page";
|
|
3
5
|
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
label: "Subtotal:",
|
|
15
|
-
amount: "$102.55",
|
|
16
|
-
as: "h3",
|
|
17
|
-
extraStyles: undefined
|
|
18
|
-
},
|
|
19
|
-
argTypes: {
|
|
20
|
-
version: {
|
|
21
|
-
description:
|
|
22
|
-
"The verison (v1 or v2) of the LabeledAmount component to use",
|
|
23
|
-
table: {
|
|
24
|
-
type: { summary: "string" },
|
|
25
|
-
defaultValue: { summary: "v1" }
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
variant: {
|
|
29
|
-
description:
|
|
30
|
-
"The variant (regular, extraSmall, small, large) of the LabeledAmount component to use",
|
|
31
|
-
table: {
|
|
32
|
-
type: { summary: "string" },
|
|
33
|
-
defaultValue: { summary: "regular" }
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
label: {
|
|
37
|
-
description: "The label to place before the amount",
|
|
38
|
-
table: {
|
|
39
|
-
type: { summary: "string" },
|
|
40
|
-
defaultValue: { summary: undefined }
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
amount: {
|
|
44
|
-
description: "The formatted amount value to display, as a money string",
|
|
45
|
-
table: {
|
|
46
|
-
type: { summary: "string" },
|
|
47
|
-
defaultValue: { summary: undefined }
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
as: {
|
|
51
|
-
description:
|
|
52
|
-
"The HTML element to render the component as, generally h or p element",
|
|
53
|
-
table: {
|
|
54
|
-
type: { summary: "string" },
|
|
55
|
-
defaultValue: { summary: "p" }
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
extraStyles: {
|
|
59
|
-
description: "Extra styles used for wrapping container",
|
|
60
|
-
table: {
|
|
61
|
-
type: { summary: "string" },
|
|
62
|
-
defaultvalue: { summary: undefined }
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
6
|
+
const variantsLabel = "variant";
|
|
7
|
+
const variants = {
|
|
8
|
+
default: "default",
|
|
9
|
+
p: "p",
|
|
10
|
+
pL: "pL",
|
|
11
|
+
h6: "h6",
|
|
12
|
+
small: "small",
|
|
13
|
+
regular: "regular",
|
|
14
|
+
large: "large",
|
|
15
|
+
None: undefined
|
|
66
16
|
};
|
|
17
|
+
const defaultValue = "default";
|
|
67
18
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
<Box minWidth="300px" padding="0">
|
|
73
|
-
<LabeledAmount {...args} />
|
|
74
|
-
</Box>
|
|
75
|
-
)
|
|
19
|
+
const versionsLabel = "version";
|
|
20
|
+
const versions = {
|
|
21
|
+
v1: "v1",
|
|
22
|
+
v2: "v2"
|
|
76
23
|
};
|
|
24
|
+
const defaultVersion = "v1";
|
|
77
25
|
|
|
78
|
-
|
|
79
|
-
render: args => (
|
|
80
|
-
<Box minWidth="450px" padding="0">
|
|
81
|
-
<LabeledAmount {...args} />
|
|
82
|
-
</Box>
|
|
83
|
-
),
|
|
84
|
-
args: {
|
|
85
|
-
as: "h3",
|
|
86
|
-
label: "Total paid:",
|
|
87
|
-
amount: "$626.93",
|
|
88
|
-
variant: "large"
|
|
89
|
-
}
|
|
90
|
-
};
|
|
26
|
+
const groupId = "props";
|
|
91
27
|
|
|
92
|
-
export const
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
amount: "$2.50",
|
|
102
|
-
variant: "extraSmall"
|
|
103
|
-
}
|
|
104
|
-
};
|
|
28
|
+
export const labeledAmount = () => (
|
|
29
|
+
<LabeledAmount
|
|
30
|
+
variant={select(variantsLabel, variants, defaultValue, groupId)}
|
|
31
|
+
as={text("as", "p", groupId)}
|
|
32
|
+
label={text("label", "Amount", groupId)}
|
|
33
|
+
amount={text("amount", "$1.23", groupId)}
|
|
34
|
+
version={select(versionsLabel, versions, defaultVersion, groupId)}
|
|
35
|
+
/>
|
|
36
|
+
);
|
|
105
37
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
),
|
|
112
|
-
args: {
|
|
113
|
-
as: "h4",
|
|
114
|
-
label: "Tax:",
|
|
115
|
-
amount: "$20.75",
|
|
116
|
-
variant: "small"
|
|
117
|
-
}
|
|
118
|
-
};
|
|
38
|
+
const story = page({
|
|
39
|
+
title: "Components|Atoms/LabeledAmount",
|
|
40
|
+
Component: LabeledAmount
|
|
41
|
+
});
|
|
42
|
+
export default story;
|
|
@@ -1,95 +1,28 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import
|
|
3
|
-
import DisplayBox from "../display-box/DisplayBox";
|
|
4
|
-
import { Box } from "../layouts";
|
|
5
|
-
|
|
6
|
-
const meta = {
|
|
7
|
-
title: "Atoms/LineItem",
|
|
8
|
-
component: LineItem,
|
|
9
|
-
parameters: {
|
|
10
|
-
layout: "centered"
|
|
11
|
-
},
|
|
12
|
-
tags: ["!autodocs"],
|
|
13
|
-
args: {
|
|
14
|
-
description: "",
|
|
15
|
-
subDescription: "",
|
|
16
|
-
amount: "",
|
|
17
|
-
customAttributes: undefined,
|
|
18
|
-
visibleFields: [],
|
|
19
|
-
displayQuantity: null
|
|
20
|
-
},
|
|
21
|
-
argTypes: {
|
|
22
|
-
description: {
|
|
23
|
-
description: "The main description of the lineItem",
|
|
24
|
-
table: {
|
|
25
|
-
type: { summary: "string" },
|
|
26
|
-
defaultValue: { summary: undefined }
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
subDescription: {
|
|
30
|
-
description: "Secondary description of the lineItem",
|
|
31
|
-
table: {
|
|
32
|
-
type: { summary: "string" },
|
|
33
|
-
defaultValue: { summary: undefined }
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
amount: {
|
|
37
|
-
description: "The amount in a formatted string of the lineItem",
|
|
38
|
-
table: {
|
|
39
|
-
type: { summary: "string" },
|
|
40
|
-
defaultValue: { summary: undefined }
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
customAttributes: {
|
|
44
|
-
description:
|
|
45
|
-
"A lineItem's custom attributes, currently unused functionality",
|
|
46
|
-
table: {
|
|
47
|
-
type: { summary: "array" },
|
|
48
|
-
defaultValue: { summary: undefined }
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
visibleFields: {
|
|
52
|
-
description:
|
|
53
|
-
"An array of customAttributes to display below the subDescription, currently unused",
|
|
54
|
-
table: {
|
|
55
|
-
type: { summary: "array" },
|
|
56
|
-
defaultValue: { summary: [] }
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
displayQuantity: {
|
|
60
|
-
description:
|
|
61
|
-
"The quantity of the lineItem. Will only display if provided.",
|
|
62
|
-
table: {
|
|
63
|
-
type: { summary: "number" },
|
|
64
|
-
defaultValue: { summary: undefined }
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
};
|
|
2
|
+
import { text } from "@storybook/addon-knobs";
|
|
69
3
|
|
|
70
|
-
|
|
4
|
+
import LineItem from "./LineItem";
|
|
5
|
+
import page from "../../../../.storybook/page";
|
|
71
6
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}
|
|
78
|
-
};
|
|
7
|
+
const story = page({
|
|
8
|
+
title: "Components|Atoms/LineItem",
|
|
9
|
+
Component: LineItem
|
|
10
|
+
});
|
|
11
|
+
export default story;
|
|
79
12
|
|
|
80
|
-
const
|
|
81
|
-
<
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
amount="$625.00"
|
|
87
|
-
displayQuantity={25}
|
|
88
|
-
/>
|
|
89
|
-
</Box>
|
|
90
|
-
</DisplayBox>
|
|
13
|
+
export const lineItem = () => (
|
|
14
|
+
<LineItem
|
|
15
|
+
description={text("description", "Foo", "props")}
|
|
16
|
+
subDescription={text("subDescription", "Bar", "props")}
|
|
17
|
+
amount={text("amount", "$4.00", "props")}
|
|
18
|
+
/>
|
|
91
19
|
);
|
|
92
20
|
|
|
93
|
-
export const
|
|
94
|
-
|
|
95
|
-
}
|
|
21
|
+
export const lineItemWithQuantity = () => (
|
|
22
|
+
<LineItem
|
|
23
|
+
description={text("description", "Foo", "props")}
|
|
24
|
+
subDescription={text("subDescription", "Bar", "props")}
|
|
25
|
+
amount={text("amount", "$4.00", "props")}
|
|
26
|
+
displayQuantity={2}
|
|
27
|
+
/>
|
|
28
|
+
);
|