@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,217 +1,68 @@
|
|
|
1
1
|
import React, { useState } from "react";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import { text, boolean } from "@storybook/addon-knobs";
|
|
3
|
+
import CollapsibleSection from "./CollapsibleSection";
|
|
4
|
+
import DisplayCard from "../../atoms/display-card";
|
|
5
|
+
import { Stack, Motion } from "../../atoms/layouts";
|
|
6
|
+
import page from "../../../../.storybook/page";
|
|
4
7
|
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
layout: "centered"
|
|
8
|
+
const content = {
|
|
9
|
+
open: {
|
|
10
|
+
x: "0",
|
|
11
|
+
opacity: 1
|
|
10
12
|
},
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
toggleSection: fn(),
|
|
15
|
-
themeValues: {},
|
|
16
|
-
isMobile: undefined,
|
|
17
|
-
supportsTouch: undefined,
|
|
18
|
-
title: "Example Title",
|
|
19
|
-
customPadding: undefined,
|
|
20
|
-
initiallyOpen: true,
|
|
21
|
-
openHeight: "auto",
|
|
22
|
-
children: <p>The children prop will populate this content.</p>,
|
|
23
|
-
customTitle: false,
|
|
24
|
-
stackTitle: false,
|
|
25
|
-
stackTitleContent: "StackTitleContent Prop Value",
|
|
26
|
-
sectionGap: "0.5rem",
|
|
27
|
-
name: "",
|
|
28
|
-
index: 1,
|
|
29
|
-
extraStyles: ""
|
|
30
|
-
},
|
|
31
|
-
argTypes: {
|
|
32
|
-
isOpen: {
|
|
33
|
-
description:
|
|
34
|
-
"Boolean indicating whether the section is expanded (true) or collapsed (false).",
|
|
35
|
-
control: { type: "boolean" },
|
|
36
|
-
table: {
|
|
37
|
-
type: { summary: "boolean" },
|
|
38
|
-
defaultValue: { summary: `undefined` }
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
toggleSection: {
|
|
42
|
-
description:
|
|
43
|
-
"Function that toggles the expanded versus collapsed state for a given 'CollapsibleSection'",
|
|
44
|
-
table: {
|
|
45
|
-
type: { summary: "object" },
|
|
46
|
-
defaultValue: { summary: `undefined` }
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
isMobile: {
|
|
50
|
-
description:
|
|
51
|
-
"Whether user is on a mobile device (typically screen size smaller than 768px)",
|
|
52
|
-
table: {
|
|
53
|
-
type: { summary: "boolean" },
|
|
54
|
-
defaultValue: { summary: `undefined` }
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
supportsTouch: {
|
|
58
|
-
description: "Whether a device supports touch events",
|
|
59
|
-
table: {
|
|
60
|
-
type: { summary: "boolean" },
|
|
61
|
-
defaultValue: { summary: `undefined` }
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
title: {
|
|
65
|
-
description:
|
|
66
|
-
"The title of the collapsible section, that, when clicked or tapped will toggle the component's expanded/collapsed state",
|
|
67
|
-
table: {
|
|
68
|
-
type: { summary: "string" },
|
|
69
|
-
defaultValue: { summary: `undefined` }
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
customPadding: {
|
|
73
|
-
description:
|
|
74
|
-
"The amount of padding to apply to the title prop's containing `Box` element",
|
|
75
|
-
table: {
|
|
76
|
-
type: { summary: "string" },
|
|
77
|
-
defaultValue: { summary: `undefined` }
|
|
78
|
-
}
|
|
79
|
-
},
|
|
80
|
-
initiallyOpen: {
|
|
81
|
-
description: "Whether the component should render itself open by default",
|
|
82
|
-
table: {
|
|
83
|
-
type: { summary: "boolean" },
|
|
84
|
-
defaultValue: { summary: true }
|
|
85
|
-
}
|
|
86
|
-
},
|
|
87
|
-
openHeight: {
|
|
88
|
-
description: "Sets the height of the component when it is expanded",
|
|
89
|
-
table: {
|
|
90
|
-
type: { summary: "string" },
|
|
91
|
-
defaultValue: { summary: "auto" }
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
|
-
children: {
|
|
95
|
-
description:
|
|
96
|
-
"Content that will show when the component is expanded and be hidden when the component is collapsed",
|
|
97
|
-
table: {
|
|
98
|
-
type: { summary: "object" },
|
|
99
|
-
defaultValue: { summary: `undefined` }
|
|
100
|
-
}
|
|
101
|
-
},
|
|
102
|
-
customTitle: {
|
|
103
|
-
description:
|
|
104
|
-
"Renders a differently styled title element when true, and is also used to help compute an appropriate label for the wrapper",
|
|
105
|
-
table: {
|
|
106
|
-
type: { summary: "boolean" },
|
|
107
|
-
defaultValue: { summary: false }
|
|
108
|
-
}
|
|
109
|
-
},
|
|
110
|
-
stackTitle: {
|
|
111
|
-
description:
|
|
112
|
-
"Whether or not to include an additional title (content provided by StackTitleContent prop) above the CollapsibleSection",
|
|
113
|
-
table: {
|
|
114
|
-
type: { summary: "boolean" },
|
|
115
|
-
defaultValue: { summary: false }
|
|
116
|
-
}
|
|
117
|
-
},
|
|
118
|
-
stackTitleContent: {
|
|
119
|
-
description:
|
|
120
|
-
"When stackTitle prop is true, this content is used for a header located _above_ the CollapsibleSection",
|
|
121
|
-
table: {
|
|
122
|
-
type: { summary: "string" },
|
|
123
|
-
defaultValue: { summary: `undefined` }
|
|
124
|
-
}
|
|
125
|
-
},
|
|
126
|
-
sectionGap: {
|
|
127
|
-
description:
|
|
128
|
-
"When the CollapsibleSection is open and not on a mobile screen, this prop determines the wrapping Stack component's 'childGap' prop value.",
|
|
129
|
-
table: {
|
|
130
|
-
type: { summary: "string" },
|
|
131
|
-
defaultValue: { summary: `undefined` }
|
|
132
|
-
}
|
|
133
|
-
},
|
|
134
|
-
name: {
|
|
135
|
-
description:
|
|
136
|
-
"When it's not empty, 'name' provides the label value for the Box instance with a role of 'heading.'",
|
|
137
|
-
table: {
|
|
138
|
-
type: { summary: "string" },
|
|
139
|
-
defaultValue: { summary: "" }
|
|
140
|
-
}
|
|
141
|
-
},
|
|
142
|
-
index: {
|
|
143
|
-
description:
|
|
144
|
-
"The index value of the current CollapsibleSection in a list of CollapsibleSections. It is used to create a unique ID string for each component.",
|
|
145
|
-
table: {
|
|
146
|
-
type: { summary: "number" },
|
|
147
|
-
defaultValue: { summary: 1 }
|
|
148
|
-
}
|
|
149
|
-
},
|
|
150
|
-
extraStyles: {
|
|
151
|
-
description:
|
|
152
|
-
"A string containing additional CSS to apply to the title's Box container (the one with role='button').",
|
|
153
|
-
table: {
|
|
154
|
-
type: { summary: "string" },
|
|
155
|
-
defaultValue: { summary: `undefined` }
|
|
156
|
-
}
|
|
157
|
-
}
|
|
13
|
+
closed: {
|
|
14
|
+
x: "-7.5%",
|
|
15
|
+
opacity: 0
|
|
158
16
|
}
|
|
159
17
|
};
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
18
|
+
export const collapsibleSection = () => {
|
|
19
|
+
const [open, setOpen] = useState(false);
|
|
20
|
+
return (
|
|
21
|
+
<CollapsibleSection
|
|
22
|
+
title={text("title", "Collapsible Section Storybook", "props")}
|
|
23
|
+
toggleSection={() => setOpen(!open)}
|
|
24
|
+
initiallyOpen={boolean("initiallyOpen", false, "props")}
|
|
25
|
+
isOpen={open}
|
|
26
|
+
key="security-section"
|
|
27
|
+
>
|
|
28
|
+
<Stack childGap="16px">
|
|
29
|
+
<Motion
|
|
30
|
+
padding="0"
|
|
31
|
+
variants={content}
|
|
32
|
+
transition={{ duration: 0.3 }}
|
|
33
|
+
positionTransition
|
|
34
|
+
extraStyles={`transform-origin: 100% 0;`}
|
|
35
|
+
>
|
|
36
|
+
<DisplayCard
|
|
37
|
+
title="Password"
|
|
38
|
+
item="•••••••••••••"
|
|
39
|
+
buttonText="Change Password"
|
|
40
|
+
link
|
|
41
|
+
url=""
|
|
42
|
+
/>
|
|
43
|
+
</Motion>
|
|
44
|
+
<Motion
|
|
45
|
+
padding="0"
|
|
46
|
+
variants={content}
|
|
47
|
+
transition={{ duration: 0.3 }}
|
|
48
|
+
positionTransition
|
|
49
|
+
extraStyles={`transform-origin: 100% 0;`}
|
|
50
|
+
>
|
|
51
|
+
<DisplayCard
|
|
52
|
+
title="Name"
|
|
53
|
+
item="Hello Citybase"
|
|
54
|
+
buttonText="Edit Name"
|
|
55
|
+
link
|
|
56
|
+
url=""
|
|
57
|
+
/>
|
|
58
|
+
</Motion>
|
|
59
|
+
</Stack>
|
|
60
|
+
</CollapsibleSection>
|
|
61
|
+
);
|
|
167
62
|
};
|
|
63
|
+
const story = page({
|
|
64
|
+
title: "Components|Molecules/CollapsibleSection",
|
|
65
|
+
Component: CollapsibleSection
|
|
66
|
+
});
|
|
168
67
|
|
|
169
|
-
export
|
|
170
|
-
render: args => {
|
|
171
|
-
const [isOpen, setIsOpen] = useState(true);
|
|
172
|
-
return (
|
|
173
|
-
<CollapsibleSection
|
|
174
|
-
{...args}
|
|
175
|
-
title="ToggleSection Title"
|
|
176
|
-
isOpen={isOpen}
|
|
177
|
-
toggleSection={() => setIsOpen(!isOpen)}
|
|
178
|
-
/>
|
|
179
|
-
);
|
|
180
|
-
}
|
|
181
|
-
};
|
|
182
|
-
|
|
183
|
-
export const Mobile = {
|
|
184
|
-
args: {
|
|
185
|
-
title: "Mobile Title",
|
|
186
|
-
isMobile: true
|
|
187
|
-
}
|
|
188
|
-
};
|
|
189
|
-
|
|
190
|
-
export const CustomTitle = {
|
|
191
|
-
args: {
|
|
192
|
-
title: "Custom Title",
|
|
193
|
-
customTitle: true
|
|
194
|
-
}
|
|
195
|
-
};
|
|
196
|
-
|
|
197
|
-
export const CustomPadding = {
|
|
198
|
-
args: {
|
|
199
|
-
title: "CustomPadding Title",
|
|
200
|
-
customPadding: "3rem"
|
|
201
|
-
}
|
|
202
|
-
};
|
|
203
|
-
|
|
204
|
-
export const StackTitleContentAndStackTitle = {
|
|
205
|
-
args: {
|
|
206
|
-
title: "StackTitleContentAndStackTitle Title",
|
|
207
|
-
stackTitle: true,
|
|
208
|
-
stackTitleContent: <h1>Stack Title Content</h1>
|
|
209
|
-
}
|
|
210
|
-
};
|
|
211
|
-
|
|
212
|
-
export const SectionGap = {
|
|
213
|
-
args: {
|
|
214
|
-
title: "SectionGap Title",
|
|
215
|
-
sectionGap: "100px"
|
|
216
|
-
}
|
|
217
|
-
};
|
|
68
|
+
export default story;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { connect } from "react-redux";
|
|
3
|
+
import { boolean } from "@storybook/addon-knobs";
|
|
4
|
+
|
|
5
|
+
import EditNameForm from "./EditNameForm";
|
|
6
|
+
import page from "../../../../.storybook/page";
|
|
7
|
+
import * as EditNameFormState from "./EditNameForm.state";
|
|
8
|
+
|
|
9
|
+
const story = page({
|
|
10
|
+
title: "Components|Molecules/EditNameForm",
|
|
11
|
+
Component: EditNameForm,
|
|
12
|
+
reducer: EditNameFormState.reducer,
|
|
13
|
+
mapStateToProps: EditNameFormState.mapStateToProps,
|
|
14
|
+
mapDispatchToProps: EditNameFormState.mapDispatchToProps
|
|
15
|
+
});
|
|
16
|
+
export default story;
|
|
17
|
+
|
|
18
|
+
const ConnectedForm = connect(
|
|
19
|
+
EditNameFormState.mapStateToProps,
|
|
20
|
+
EditNameFormState.mapDispatchToProps
|
|
21
|
+
)(EditNameForm);
|
|
22
|
+
export const editNameForm = () => (
|
|
23
|
+
<ConnectedForm showErrors={boolean("showErrors", false, "props")} />
|
|
24
|
+
);
|
|
@@ -10,7 +10,6 @@ export { default as EmailForm } from "./email-form";
|
|
|
10
10
|
export { default as FooterWithSubfooter } from "./footer-with-subfooter";
|
|
11
11
|
export { default as ForgotPasswordForm } from "./forgot-password-form";
|
|
12
12
|
export { default as HighlightTabRow } from "./highlight-tab-row";
|
|
13
|
-
export { default as IdleModal } from "./idle-modal";
|
|
14
13
|
export { iconsMap as ObligationIcons } from "./obligation/icons";
|
|
15
14
|
export { default as LinkCard } from "./link-card";
|
|
16
15
|
export { default as LoginForm } from "./login-form";
|
|
@@ -1,302 +1,87 @@
|
|
|
1
|
+
import page from "../../../../.storybook/page";
|
|
2
|
+
import { boolean, text } from "@storybook/addon-knobs";
|
|
1
3
|
import React from "react";
|
|
2
|
-
import {
|
|
3
|
-
COOL_GREY_05,
|
|
4
|
-
MANATEE_GREY,
|
|
5
|
-
ROYAL_BLUE_VIVID,
|
|
6
|
-
SEA_GREEN
|
|
7
|
-
} from "../../../constants/colors";
|
|
8
|
-
import { Box } from "../../atoms/layouts";
|
|
9
4
|
import LinkCard from "./LinkCard";
|
|
5
|
+
import Box from "../../atoms/layouts/Box";
|
|
6
|
+
import Stack from "../../atoms/layouts/Stack";
|
|
7
|
+
import Text from "../../atoms/text/Text";
|
|
10
8
|
import Badge from "../../atoms/badge/Badge";
|
|
11
|
-
import { fn } from "@storybook/test";
|
|
12
|
-
import AutopayIcon from "../../atoms/icons/AutopayIcon";
|
|
13
|
-
import ArrowRightIcon from "../../atoms/icons/ArrowRightIcon";
|
|
14
9
|
import PlusCircleIcon from "../../atoms/icons/PlusCircleIcon";
|
|
15
|
-
import
|
|
10
|
+
import AutopayIcon from "../../atoms/icons/AutopayIcon";
|
|
11
|
+
import {
|
|
12
|
+
CORNFLOWER_BLUE,
|
|
13
|
+
ROYAL_BLUE_VIVID,
|
|
14
|
+
LINK_WATER,
|
|
15
|
+
WHITE,
|
|
16
|
+
MANATEE_GREY,
|
|
17
|
+
GHOST_GREY,
|
|
18
|
+
TRANSPARENT
|
|
19
|
+
} from "../../../constants/colors";
|
|
16
20
|
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
title: "Test Workflow",
|
|
26
|
-
subtitle: "Link your benefit plan",
|
|
27
|
-
showLeft: undefined,
|
|
28
|
-
leftContent: undefined,
|
|
29
|
-
showRight: undefined,
|
|
30
|
-
rightContent: undefined,
|
|
31
|
-
onClick: fn(),
|
|
32
|
-
extraStyles: "",
|
|
33
|
-
extraActiveStyles: "",
|
|
34
|
-
extraHoverStyles: "",
|
|
35
|
-
titleVariant: "h3",
|
|
36
|
-
disabled: false
|
|
37
|
-
},
|
|
38
|
-
argTypes: {
|
|
39
|
-
title: {
|
|
40
|
-
description: "Text to display in the LinkCard's title area",
|
|
41
|
-
table: {
|
|
42
|
-
type: { summary: "string" },
|
|
43
|
-
defaultValue: { summary: "Test Workflow" }
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
subtitle: {
|
|
47
|
-
description: "Text to display in the LinkCard's body area",
|
|
48
|
-
table: {
|
|
49
|
-
type: { summary: "string" },
|
|
50
|
-
defaultValue: { summary: "Link your benefit plan" }
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
showLeft: {
|
|
54
|
-
description: "Whether to show the LinkCard's left content",
|
|
55
|
-
table: {
|
|
56
|
-
type: { summary: "boolean" },
|
|
57
|
-
defaultValue: { summary: undefined }
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
leftContent: {
|
|
61
|
-
description: "Component to render on LinkCard's left side",
|
|
62
|
-
table: {
|
|
63
|
-
type: { summary: "React Component" },
|
|
64
|
-
defaultValue: { summary: undefined }
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
showRight: {
|
|
68
|
-
description: "Whether to show LinkCard's right content",
|
|
69
|
-
table: {
|
|
70
|
-
type: { summary: "boolean" },
|
|
71
|
-
defaultValue: { summary: undefined }
|
|
72
|
-
}
|
|
73
|
-
},
|
|
74
|
-
rightContent: {
|
|
75
|
-
description: "Component to render on LinkCard's right side",
|
|
76
|
-
table: {
|
|
77
|
-
type: { summary: "React Component" },
|
|
78
|
-
defaultValue: { summary: undefined }
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
onClick: {
|
|
82
|
-
description: "Function to execute on click of LinkCard",
|
|
83
|
-
table: {
|
|
84
|
-
type: { summary: "function" },
|
|
85
|
-
defaultValue: { summary: undefined }
|
|
86
|
-
}
|
|
87
|
-
},
|
|
88
|
-
extraStyles: {
|
|
89
|
-
description: "Extra styles to apply to the LinkCard",
|
|
90
|
-
table: {
|
|
91
|
-
type: { summary: "string" },
|
|
92
|
-
defaultValue: { summary: undefined }
|
|
93
|
-
}
|
|
94
|
-
},
|
|
95
|
-
extraActiveStyles: {
|
|
96
|
-
descripton:
|
|
97
|
-
"Extra styles to apply to the LinkCard when it is in an active state",
|
|
98
|
-
table: {
|
|
99
|
-
type: { summary: "string" },
|
|
100
|
-
defaultValue: { summary: undefined }
|
|
101
|
-
}
|
|
102
|
-
},
|
|
103
|
-
extraHoverStyles: {
|
|
104
|
-
description:
|
|
105
|
-
"Extra styles to apply to the LinkCard when it is being hovered",
|
|
106
|
-
table: {
|
|
107
|
-
type: { summary: "string" },
|
|
108
|
-
defaultValue: { summary: undefined }
|
|
109
|
-
}
|
|
110
|
-
},
|
|
111
|
-
titleVariant: {
|
|
112
|
-
description: "HTML element to use for title element, default is h3",
|
|
113
|
-
table: {
|
|
114
|
-
type: { summary: "string" },
|
|
115
|
-
defaultValue: { summary: "h3" }
|
|
116
|
-
}
|
|
117
|
-
},
|
|
118
|
-
disabled: {
|
|
119
|
-
description: "Whether the card is disabled",
|
|
120
|
-
table: {
|
|
121
|
-
type: { summary: "boolean" },
|
|
122
|
-
defaultValue: { summary: false }
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
}
|
|
21
|
+
const theme = {
|
|
22
|
+
disabledBackgroundColor: TRANSPARENT,
|
|
23
|
+
disabledBorderColor: GHOST_GREY,
|
|
24
|
+
disabledColor: MANATEE_GREY,
|
|
25
|
+
activeBackgroundColor: CORNFLOWER_BLUE,
|
|
26
|
+
backgroundColor: WHITE,
|
|
27
|
+
borderColor: LINK_WATER,
|
|
28
|
+
color: ROYAL_BLUE_VIVID
|
|
126
29
|
};
|
|
127
30
|
|
|
128
|
-
|
|
31
|
+
const groupId = "props";
|
|
32
|
+
const disabled = false;
|
|
33
|
+
const showLeft = true;
|
|
129
34
|
|
|
130
|
-
export const
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
showLeft={false}
|
|
143
|
-
leftContent={
|
|
35
|
+
export const linkCard = () => {
|
|
36
|
+
return (
|
|
37
|
+
<LinkCard
|
|
38
|
+
disabled={boolean("disabled", disabled, groupId)}
|
|
39
|
+
title={text("title", "Link Card Title", groupId)}
|
|
40
|
+
subtitle={text("subtitle", "Link card description", groupId)}
|
|
41
|
+
path={text("path", "/service/animal-care-and-control", groupId)}
|
|
42
|
+
themeValues={theme}
|
|
43
|
+
showLeft={boolean("showLeft", true, groupId)}
|
|
44
|
+
onClick={() => window.alert("Click event!")}
|
|
45
|
+
leftContent={
|
|
46
|
+
<Box background="transparent" borderWidthOverride="0 0 0 0" padding="0">
|
|
144
47
|
<Badge
|
|
145
48
|
label="Autopay Available"
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
AutopayIcon({
|
|
149
|
-
fill: SEA_GREEN
|
|
150
|
-
})
|
|
151
|
-
}
|
|
49
|
+
Icon={AutopayIcon}
|
|
50
|
+
variant={disabled ? "disabled" : "success"}
|
|
152
51
|
/>
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
hoverStyles=".show-on-hover {opacity: 1;}"
|
|
52
|
+
</Box>
|
|
53
|
+
}
|
|
54
|
+
showRight={boolean("showRight", true, groupId)}
|
|
55
|
+
rightContent={
|
|
56
|
+
<Stack direction="row" childGap="6px">
|
|
57
|
+
<Text
|
|
58
|
+
variant="pS"
|
|
59
|
+
className="show-on-hover"
|
|
60
|
+
color={ROYAL_BLUE_VIVID}
|
|
61
|
+
extraStyles={`text-align: right; color: transparent; ${
|
|
62
|
+
!showLeft ? "margin-left: auto;" : ""
|
|
63
|
+
}`}
|
|
166
64
|
>
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
/>
|
|
183
|
-
);
|
|
184
|
-
}
|
|
65
|
+
Find
|
|
66
|
+
</Text>
|
|
67
|
+
<PlusCircleIcon color={ROYAL_BLUE_VIVID} />
|
|
68
|
+
</Stack>
|
|
69
|
+
}
|
|
70
|
+
extraHoverStyles={`
|
|
71
|
+
.show-on-hover {
|
|
72
|
+
color: ${ROYAL_BLUE_VIVID};
|
|
73
|
+
}
|
|
74
|
+
`}
|
|
75
|
+
extraActiveStyles={`
|
|
76
|
+
background-color: ${disabled ? TRANSPARENT : CORNFLOWER_BLUE};
|
|
77
|
+
`}
|
|
78
|
+
/>
|
|
79
|
+
);
|
|
185
80
|
};
|
|
186
81
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
},
|
|
192
|
-
render: args => {
|
|
193
|
-
return (
|
|
194
|
-
<LinkCard
|
|
195
|
-
{...args}
|
|
196
|
-
extraStyles={`transition: all .2s ease-in-out;`}
|
|
197
|
-
extraHoverStyles={`.show-on-hover {opacity: 1}`}
|
|
198
|
-
showLeft={true}
|
|
199
|
-
leftContent={
|
|
200
|
-
<Badge
|
|
201
|
-
label="Autopay Available"
|
|
202
|
-
variant={"success"}
|
|
203
|
-
Icon={() =>
|
|
204
|
-
AutopayIcon({
|
|
205
|
-
fill: SEA_GREEN
|
|
206
|
-
})
|
|
207
|
-
}
|
|
208
|
-
/>
|
|
209
|
-
}
|
|
210
|
-
showRight={true}
|
|
211
|
-
rightContent={
|
|
212
|
-
<Box
|
|
213
|
-
extraStyles={`
|
|
214
|
-
display: flex;
|
|
215
|
-
gap: 6px;
|
|
216
|
-
justify-content: space-between;
|
|
217
|
-
align-items: center;
|
|
218
|
-
`}
|
|
219
|
-
padding="0"
|
|
220
|
-
hoverStyles=".show-on-hover {opacity: 1;}"
|
|
221
|
-
>
|
|
222
|
-
<Text
|
|
223
|
-
variant="pS"
|
|
224
|
-
className="show-on-hover"
|
|
225
|
-
color={ROYAL_BLUE_VIVID}
|
|
226
|
-
id={`workflow-two`}
|
|
227
|
-
extraStyles={`
|
|
228
|
-
transition: opacity .2s ease-in-out;
|
|
229
|
-
opacity: 0
|
|
230
|
-
`}
|
|
231
|
-
>
|
|
232
|
-
{"Find"}
|
|
233
|
-
</Text>
|
|
234
|
-
<PlusCircleIcon
|
|
235
|
-
labelledBy={`workflow-two`}
|
|
236
|
-
color={ROYAL_BLUE_VIVID}
|
|
237
|
-
/>
|
|
238
|
-
</Box>
|
|
239
|
-
}
|
|
240
|
-
/>
|
|
241
|
-
);
|
|
242
|
-
}
|
|
243
|
-
};
|
|
82
|
+
const story = page({
|
|
83
|
+
title: "Components|Molecules/LinkCard",
|
|
84
|
+
Component: LinkCard
|
|
85
|
+
});
|
|
244
86
|
|
|
245
|
-
export
|
|
246
|
-
args: {
|
|
247
|
-
title: "Property Tax - Autopay",
|
|
248
|
-
subtitle: ""
|
|
249
|
-
},
|
|
250
|
-
render: args => {
|
|
251
|
-
return (
|
|
252
|
-
<LinkCard
|
|
253
|
-
{...args}
|
|
254
|
-
extraHoverStyles={`box-shadow: none; cursor: default; .show-on-hover {opacity: 0}`}
|
|
255
|
-
disabled={true}
|
|
256
|
-
showLeft={true}
|
|
257
|
-
leftContent={
|
|
258
|
-
<Badge
|
|
259
|
-
label="Autopay Available"
|
|
260
|
-
variant={"disabled"}
|
|
261
|
-
Icon={() =>
|
|
262
|
-
AutopayIcon({
|
|
263
|
-
fill: MANATEE_GREY
|
|
264
|
-
})
|
|
265
|
-
}
|
|
266
|
-
/>
|
|
267
|
-
}
|
|
268
|
-
showRight={true}
|
|
269
|
-
rightContent={
|
|
270
|
-
<Box
|
|
271
|
-
data-qa={`find-or-pay-disabled`}
|
|
272
|
-
extraStyles={`
|
|
273
|
-
display: flex;
|
|
274
|
-
gap: 6px;
|
|
275
|
-
justify-content: space-between;
|
|
276
|
-
align-items: center;
|
|
277
|
-
`}
|
|
278
|
-
padding="0"
|
|
279
|
-
hoverStyles=".show-on-hover {opacity: 1;}"
|
|
280
|
-
>
|
|
281
|
-
<Text
|
|
282
|
-
variant="pS"
|
|
283
|
-
className="show-on-hover"
|
|
284
|
-
color={COOL_GREY_05}
|
|
285
|
-
id={`workflow-disabled`}
|
|
286
|
-
extraStyles={`
|
|
287
|
-
transition: opacity .2s ease-in-out;
|
|
288
|
-
opacity: 0
|
|
289
|
-
`}
|
|
290
|
-
>
|
|
291
|
-
{"Find"}
|
|
292
|
-
</Text>
|
|
293
|
-
<PlusCircleIcon
|
|
294
|
-
labelledBy={`workflow-disabled`}
|
|
295
|
-
color={COOL_GREY_05}
|
|
296
|
-
/>
|
|
297
|
-
</Box>
|
|
298
|
-
}
|
|
299
|
-
/>
|
|
300
|
-
);
|
|
301
|
-
}
|
|
302
|
-
};
|
|
87
|
+
export default story;
|