@thecb/components 12.0.0-beta.0 → 12.0.0-beta.2
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 +33 -11
- package/ai-docs/architecture.md +71 -0
- package/ai-docs/components.md +167 -0
- package/ai-docs/conventions.md +162 -0
- package/ai-docs/figma-mcp.md +66 -0
- package/ai-docs/integration-guidelines.md +142 -0
- package/dist/index.cjs.js +27805 -25779
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +286 -12
- package/dist/index.esm.js +26589 -24593
- package/dist/index.esm.js.map +1 -1
- package/package.json +17 -8
- package/src/components/atoms/alert/Alert.js +10 -1
- package/src/components/atoms/alert/Alert.mdx +19 -0
- package/src/components/atoms/alert/Alert.stories.js +150 -0
- package/src/components/atoms/badge/Badge.js +39 -25
- package/src/components/atoms/badge/Badge.mdx +27 -0
- package/src/components/atoms/badge/Badge.stories.js +168 -0
- package/src/components/atoms/badge/Badge.theme.js +49 -1
- package/src/components/atoms/badge/index.d.ts +11 -0
- package/src/components/atoms/breadcrumb/Breadcrumb.mdx +21 -0
- package/src/components/atoms/breadcrumb/Breadcrumb.stories.js +47 -0
- package/src/components/atoms/button-with-action/ButtonWithAction.js +3 -29
- package/src/components/atoms/button-with-action/ButtonWithAction.stories.js +14 -1
- package/src/components/atoms/button-with-action/ButtonWithAction.theme.js +97 -56
- package/src/components/atoms/button-with-action/index.d.ts +1 -0
- package/src/components/atoms/button-with-link/ButtonWithLink.mdx +21 -0
- package/src/components/atoms/button-with-link/ButtonWithLink.stories.js +161 -0
- package/src/components/atoms/card/Card.js +22 -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/CardText.js +39 -11
- package/src/components/atoms/card/index.d.ts +8 -1
- package/src/components/atoms/card-type/CardType.js +55 -0
- package/src/components/atoms/card-type/CardType.stories.js +86 -0
- package/src/components/atoms/card-type/index.js +3 -0
- package/src/components/atoms/checkbox/Checkbox.js +121 -93
- package/src/components/atoms/checkbox/Checkbox.mdx +15 -0
- package/src/components/atoms/checkbox/Checkbox.oldstories.js +17 -13
- package/src/components/atoms/checkbox/Checkbox.stories.js +149 -0
- package/src/components/atoms/checkbox/Checkbox.theme.js +6 -2
- package/src/components/atoms/country-dropdown/CountryDropdown.mdx +36 -0
- package/src/components/atoms/country-dropdown/CountryDropdown.stories.js +76 -0
- 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 +69 -0
- package/src/components/atoms/dropdown/Dropdown.js +17 -5
- package/src/components/atoms/dropdown/Dropdown.mdx +65 -0
- package/src/components/atoms/dropdown/Dropdown.stories.js +128 -0
- package/src/components/atoms/dropdown/Dropdown.theme.js +6 -6
- package/src/components/atoms/dropdown/DropdownIcon.js +1 -0
- package/src/components/atoms/dropdown/DropdownIconV2.js +50 -0
- package/src/components/atoms/dropdown/index.d.ts +59 -0
- package/src/components/atoms/form-layouts/FormInput.js +105 -61
- package/src/components/atoms/form-layouts/FormInput.mdx +38 -0
- package/src/components/atoms/form-layouts/FormInput.stories.js +219 -0
- package/src/components/atoms/form-layouts/FormTextarea.js +207 -0
- package/src/components/atoms/form-layouts/FormTextarea.mdx +48 -0
- package/src/components/atoms/form-layouts/FormTextarea.stories.js +265 -0
- package/src/components/atoms/form-layouts/index.d.ts +34 -1
- package/src/components/atoms/form-layouts/index.js +3 -1
- package/src/components/atoms/form-select/FormSelect.js +5 -3
- package/src/components/atoms/form-select/FormSelect.mdx +42 -0
- package/src/components/atoms/form-select/FormSelect.stories.js +76 -0
- package/src/components/atoms/form-select/FormSelect.styled.js +2 -2
- package/src/components/atoms/form-select/FormSelect.theme.js +6 -3
- package/src/components/atoms/form-select/index.d.ts +3 -0
- package/src/components/atoms/formatted-address/FormattedAddress.mdx +13 -0
- package/src/components/atoms/formatted-address/FormattedAddress.stories.js +138 -0
- package/src/components/atoms/formatted-bank-account/FormattedBankAccount.js +2 -2
- 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-bank-account/FormattedBankAccount.theme.js +2 -2
- package/src/components/atoms/formatted-credit-card/FormattedCreditCard.js +14 -10
- 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/formatted-credit-card/FormattedCreditCard.theme.js +2 -2
- package/src/components/atoms/icons/AgencyIcon.js +24 -0
- package/src/components/atoms/icons/AmExLargeIcon.js +54 -0
- package/src/components/atoms/icons/AmExSmallIcon.js +54 -0
- package/src/components/atoms/icons/AutopayIcon.js +9 -1
- package/src/components/atoms/icons/BankGenericSmallIcon.js +48 -0
- package/src/components/atoms/icons/CaretArrowDown.d.ts +9 -0
- package/src/components/atoms/icons/CaretArrowDown.js +22 -0
- package/src/components/atoms/icons/CaretArrowUp.d.ts +9 -0
- package/src/components/atoms/icons/CaretArrowUp.js +22 -0
- package/src/components/atoms/icons/CarrotIcon.js +2 -0
- package/src/components/atoms/icons/CashSmallIcon.js +21 -0
- package/src/components/atoms/icons/CashieringImage.d.ts +1 -0
- package/src/components/atoms/icons/CashieringImage.js +254 -0
- package/src/components/atoms/icons/CheckboxCheckmarkIcon.js +45 -0
- package/src/components/atoms/icons/CustomerSearchIcon.js +30 -79
- package/src/components/atoms/icons/DiscoverLargeIcon.js +137 -0
- package/src/components/atoms/icons/DiscoverSmallIcon.js +137 -0
- package/src/components/atoms/icons/ExternalLinkIcon.js +10 -2
- package/src/components/atoms/icons/GenericCardLarge.js +1 -1
- package/src/components/atoms/icons/GenericSmallIcon.js +27 -0
- package/src/components/atoms/icons/GuidedCheckoutImage.js +105 -26
- package/src/components/atoms/icons/IconAdd.js +2 -2
- package/src/components/atoms/icons/Icons.mdx +40 -0
- package/src/components/atoms/icons/Icons.stories.js +343 -0
- package/src/components/atoms/icons/KioskImage.js +223 -338
- package/src/components/atoms/icons/MasterCardLargeIcon.js +35 -0
- package/src/components/atoms/icons/MasterCardSmallIcon.js +35 -0
- package/src/components/atoms/icons/{NoCustomerResultsIcon.js → NoResultsIcon.js} +10 -6
- package/src/components/atoms/icons/NotFoundIcon.js +70 -333
- package/src/components/atoms/icons/OverageIcon.js +27 -0
- package/src/components/atoms/icons/PaydotImage.d.ts +1 -0
- package/src/components/atoms/icons/PaydotImage.js +46 -0
- package/src/components/atoms/icons/PaymentSearchIcon.js +7 -42
- package/src/components/atoms/icons/PaymentStatusIcon.d.ts +1 -0
- package/src/components/atoms/icons/PaymentStatusIcon.js +28 -0
- package/src/components/atoms/icons/PeriscopeFailedIcon.js +2 -2
- package/src/components/atoms/icons/PersonIcon.d.ts +1 -0
- package/src/components/atoms/icons/PersonIcon.js +28 -0
- package/src/components/atoms/icons/ProfileImage.js +58 -37
- package/src/components/atoms/icons/RevenueManagementImage.js +138 -393
- package/src/components/atoms/icons/ReversalNeededIcon.js +27 -0
- package/src/components/atoms/icons/SearchIcon.js +4 -3
- package/src/components/atoms/icons/ShortageIcon.js +21 -0
- package/src/components/atoms/icons/StandardCheckoutImage.js +105 -336
- package/src/components/atoms/icons/SuccessfulIconMedium.js +3 -2
- package/src/components/atoms/icons/VisaLargeIcon.js +40 -0
- package/src/components/atoms/icons/VisaSmallIcon.js +40 -0
- package/src/components/atoms/icons/WireSmallIcon.js +22 -0
- package/src/components/atoms/icons/icons.oldstories.js +47 -31
- package/src/components/atoms/icons/index.d.ts +4 -1
- package/src/components/atoms/icons/index.js +47 -7
- package/src/components/atoms/index.d.ts +4 -0
- package/src/components/atoms/index.js +3 -1
- package/src/components/atoms/jumbo/Jumbo.js +18 -3
- package/src/components/atoms/labeled-amount/LabeledAmount.mdx +23 -0
- package/src/components/atoms/labeled-amount/LabeledAmount.stories.js +118 -0
- package/src/components/atoms/layouts/Box.styled.js +34 -22
- package/src/components/atoms/layouts/Center.styled.js +2 -0
- package/src/components/atoms/layouts/Motion.js +25 -6
- package/src/components/atoms/layouts/Motion.styled.js +36 -0
- package/src/components/atoms/layouts/Stack.js +2 -0
- package/src/components/atoms/layouts/Stack.styled.js +2 -0
- package/src/components/atoms/line-item/LineItem.mdx +28 -0
- package/src/components/atoms/line-item/LineItem.stories.js +95 -0
- package/src/components/atoms/link/ExternalLink.d.ts +1 -0
- package/src/components/atoms/link/ExternalLink.js +37 -19
- package/src/components/atoms/link/ExternalLink.styled.js +2 -0
- package/src/components/atoms/link/InternalLink.js +11 -1
- package/src/components/atoms/link/InternalLink.styled.js +22 -2
- package/src/components/atoms/link/Link.mdx +19 -0
- package/src/components/atoms/link/Link.stories.js +183 -0
- 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 +23 -11
- package/src/components/atoms/loading-line/LoadingLine.mdx +15 -0
- package/src/components/atoms/loading-line/LoadingLine.stories.js +132 -0
- package/src/components/atoms/loading-line/LoadingPill.styled.js +7 -6
- package/src/components/atoms/nav-footer/NavFooter.mdx +15 -0
- package/src/components/atoms/nav-footer/NavFooter.stories.js +244 -0
- package/src/components/atoms/nav-header/NavHeader.mdx +13 -0
- package/src/components/atoms/nav-header/NavHeader.stories.js +130 -0
- 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.js +3 -3
- package/src/components/atoms/password-requirements/PasswordRequirements.mdx +39 -0
- package/src/components/atoms/password-requirements/PasswordRequirements.stories.js +139 -0
- package/src/components/atoms/placeholder/Placeholder.mdx +19 -0
- package/src/components/atoms/placeholder/Placeholder.stories.js +170 -0
- package/src/components/atoms/radio-button-with-label/RadioButtonWithLabel.js +13 -7
- package/src/components/atoms/radio-button-with-label/RadioButtonWithLabel.theme.js +9 -3
- package/src/components/atoms/search/Search.js +123 -0
- package/src/components/atoms/search/Search.oldstories.js +58 -0
- package/src/components/atoms/search/Search.theme.js +9 -0
- package/src/components/atoms/search/index.d.ts +27 -0
- package/src/components/atoms/search/index.js +3 -0
- package/src/components/atoms/searchable-select/SearchableSelect.mdx +44 -0
- package/src/components/atoms/searchable-select/SearchableSelect.stories.js +137 -0
- package/src/components/atoms/sortable-table-heading/SortableTableHeading.js +47 -0
- package/src/components/atoms/sortable-table-heading/SortableTableHeading.oldstories.js +19 -0
- package/src/components/atoms/sortable-table-heading/SortableTableHeading.theme.js +9 -0
- package/src/components/atoms/sortable-table-heading/index.d.ts +15 -0
- package/src/components/atoms/sortable-table-heading/index.js +3 -0
- package/src/components/atoms/spinner/Spinner.js +2 -1
- package/src/components/atoms/state-province-dropdown/StateProvinceDropdown.mdx +36 -0
- package/src/components/atoms/state-province-dropdown/StateProvinceDropdown.stories.js +78 -0
- package/src/components/atoms/state-province-dropdown/options.js +4 -1
- package/src/components/atoms/tab/Tab.js +2 -2
- 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 +65 -0
- 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/title/Title.theme.js +3 -0
- package/src/components/atoms/toggle-switch/ToggleSwitch.js +66 -48
- package/src/components/atoms/toggle-switch/ToggleSwitch.mdx +17 -0
- package/src/components/atoms/toggle-switch/ToggleSwitch.stories.js +111 -0
- 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/atoms/wallet-name/WalletName.js +6 -4
- package/src/components/atoms/wallet-name/WalletName.oldstories.js +26 -1
- package/src/components/atoms/wallet-name/index.d.ts +2 -0
- package/src/components/molecules/address-form/AddressForm.mdx +18 -0
- package/src/components/molecules/address-form/AddressForm.stories.js +224 -0
- package/src/components/molecules/banner/Banner.mdx +23 -0
- package/src/components/molecules/banner/Banner.stories.js +125 -0
- package/src/components/molecules/change-password-form/ChangePasswordForm.mdx +15 -0
- package/src/components/molecules/change-password-form/ChangePasswordForm.stories.js +206 -0
- package/src/components/molecules/collapsible-section/CollapsibleSection.js +1 -1
- package/src/components/molecules/collapsible-section/CollapsibleSection.mdx +15 -0
- package/src/components/molecules/collapsible-section/CollapsibleSection.stories.js +217 -0
- package/src/components/molecules/collapsible-section/index.d.ts +2 -2
- package/src/components/molecules/contact-card/ContactCard.js +157 -0
- package/src/components/molecules/contact-card/ContactCard.stories.js +80 -0
- package/src/components/molecules/contact-card/ContactCard.styled.js +44 -0
- package/src/components/molecules/contact-card/index.d.ts +16 -0
- package/src/components/molecules/contact-card/index.js +3 -0
- 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/editable-list/EditableList.js +6 -1
- package/src/components/molecules/email-form/EmailForm.js +9 -1
- package/src/components/molecules/email-form/EmailForm.state.js +1 -1
- package/src/components/molecules/email-form/EmailForm.stories.js +210 -0
- package/src/components/molecules/forgot-password-form/ForgotPasswordForm.js +2 -1
- package/src/components/molecules/hero-image/HeroImage.js +135 -0
- package/src/components/molecules/hero-image/HeroImage.mdx +15 -0
- package/src/components/molecules/hero-image/HeroImage.stories.js +149 -0
- package/src/components/molecules/hero-image/HeroImage.styled.js +83 -0
- package/src/components/molecules/hero-image/HeroImage.theme.js +109 -0
- package/src/components/molecules/hero-image/index.js +3 -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.d.ts +1 -0
- package/src/components/molecules/index.js +7 -0
- package/src/components/molecules/link-card/LinkCard.js +31 -20
- package/src/components/molecules/link-card/LinkCard.mdx +17 -0
- package/src/components/molecules/link-card/LinkCard.stories.js +528 -0
- package/src/components/molecules/link-card/LinkCard.styled.js +28 -21
- package/src/components/molecules/link-card/LinkCard.theme.js +6 -4
- package/src/components/molecules/link-card/index.d.ts +3 -1
- package/src/components/molecules/login-form/LoginForm.js +2 -1
- package/src/components/molecules/login-form/LoginForm.mdx +16 -0
- package/src/components/molecules/login-form/LoginForm.stories.js +120 -0
- package/src/components/molecules/modal/Modal.mdx +17 -0
- package/src/components/molecules/modal/Modal.stories.js +362 -0
- package/src/components/molecules/modal/ModalControlV1.js +3 -0
- package/src/components/molecules/modal/ModalControlV2.js +2 -0
- package/src/components/molecules/modal/__private__/CloseButton.js +2 -1
- package/src/components/molecules/module/Module.mdx +17 -0
- package/src/components/molecules/module/Module.stories.js +273 -0
- package/src/components/molecules/multiple-select-filter/MultipleSelectFilter.js +229 -0
- package/src/components/molecules/multiple-select-filter/MultipleSelectFilter.oldstories.js +74 -0
- package/src/components/molecules/multiple-select-filter/MultipleSelectFilter.styled.js +65 -0
- package/src/components/molecules/multiple-select-filter/MultipleSelectFilter.theme.js +13 -0
- package/src/components/molecules/multiple-select-filter/__private__/ActionLinkButton.js +27 -0
- package/src/components/molecules/multiple-select-filter/__private__/FilterButton.js +97 -0
- package/src/components/molecules/multiple-select-filter/__private__/FilterDropdown.js +27 -0
- package/src/components/molecules/multiple-select-filter/__private__/FilterableList.js +146 -0
- package/src/components/molecules/multiple-select-filter/__private__/FilterableListItem.js +78 -0
- package/src/components/molecules/multiple-select-filter/__private__/SearchBox.js +41 -0
- package/src/components/molecules/multiple-select-filter/__private__/useKeyboardNavigation.js +84 -0
- package/src/components/molecules/multiple-select-filter/__private__/util.js +44 -0
- package/src/components/molecules/multiple-select-filter/index.d.ts +34 -0
- package/src/components/molecules/multiple-select-filter/index.js +3 -0
- package/src/components/molecules/nav-menu/NavMenuMobile.js +27 -29
- package/src/components/molecules/nav-menu/NavMenuMobile.mdx +21 -0
- package/src/components/molecules/nav-menu/NavMenuMobile.stories.js +100 -0
- package/src/components/molecules/obligation/Obligation.js +141 -3
- package/src/components/molecules/obligation/Obligation.mdx +23 -0
- package/src/components/molecules/obligation/Obligation.stories.js +642 -0
- package/src/components/molecules/obligation/icons/PropertyBusinessIcon.js +2 -2
- package/src/components/molecules/obligation/icons/PropertyCarIcon.js +2 -2
- package/src/components/molecules/obligation/icons/PropertyCommercialVehicleIcon.js +2 -2
- package/src/components/molecules/obligation/icons/PropertyGarageIcon.js +2 -2
- package/src/components/molecules/obligation/icons/PropertyLandIcon.js +2 -2
- package/src/components/molecules/obligation/icons/PropertyMotorcycleIcon.js +2 -2
- package/src/components/molecules/obligation/icons/PropertyPersonalIcon.js +2 -2
- package/src/components/molecules/obligation/icons/PropertyStorefrontIcon.js +2 -2
- package/src/components/molecules/obligation/modules/AmountModule.js +64 -38
- package/src/components/molecules/obligation/modules/AutopayModalModule.js +37 -12
- package/src/components/molecules/obligation/modules/InactiveControlsModule.js +56 -12
- package/src/components/molecules/obligation/modules/InactiveTitleModule.js +1 -1
- package/src/components/molecules/obligation/modules/PaymentDetailsActions.js +42 -10
- package/src/components/molecules/obligation/modules/RemoveAccountModalModule.js +4 -1
- package/src/components/molecules/pagination/Pagination.mdx +15 -0
- package/src/components/molecules/pagination/Pagination.stories.js +181 -0
- package/src/components/molecules/partial-amount-form/PartialAmountField.js +68 -29
- package/src/components/molecules/partial-amount-form/PartialAmountField.theme.js +7 -0
- package/src/components/molecules/payment-button-bar/PaymentButtonBar.js +15 -8
- package/src/components/molecules/payment-details/PaymentDetails.js +1 -2
- package/src/components/molecules/payment-details/PaymentDetails.oldstories.js +0 -1
- package/src/components/molecules/payment-form-ach/PaymentFormACH.js +2 -0
- package/src/components/molecules/payment-form-ach/PaymentFormACH.state.js +2 -2
- package/src/components/molecules/payment-form-card/PaymentFormCard.js +6 -2
- package/src/components/molecules/payment-form-card/PaymentFormCard.state.js +2 -1
- package/src/components/molecules/phone-form/PhoneForm.js +7 -1
- package/src/components/molecules/phone-form/PhoneForm.state.js +1 -1
- package/src/components/molecules/popover/Popover.js +1 -15
- package/src/components/molecules/popover/Popover.mdx +15 -0
- package/src/components/molecules/popover/Popover.stories.js +220 -0
- package/src/components/molecules/radio-group/RadioGroup.js +8 -3
- package/src/components/molecules/radio-group/index.d.ts +1 -0
- package/src/components/molecules/radio-section/InnerRadioSection.js +3 -3
- package/src/components/molecules/radio-section/RadioSection.js +87 -44
- package/src/components/molecules/radio-section/RadioSection.stories.js +142 -0
- package/src/components/molecules/radio-section/radio-button/RadioButton.js +9 -5
- package/src/components/molecules/registration-banner/RegistrationBanner.js +115 -0
- package/src/components/molecules/registration-banner/RegistrationBanner.mdx +15 -0
- package/src/components/molecules/registration-banner/RegistrationBanner.stories.js +80 -0
- package/src/components/molecules/registration-banner/RegistrationBanner.styled.js +46 -0
- package/src/components/molecules/registration-banner/RegistrationBanner.theme.js +6 -0
- package/src/components/molecules/registration-banner/index.d.ts +15 -0
- package/src/components/molecules/registration-banner/index.js +3 -0
- package/src/components/molecules/registration-form/RegistrationForm.js +2 -1
- package/src/components/molecules/tab-sidebar/TabSidebar.js +5 -3
- package/src/components/molecules/tabs/Tabs.js +25 -9
- package/src/components/molecules/tabs/Tabs.mdx +17 -0
- package/src/components/molecules/tabs/Tabs.stories.js +149 -0
- package/src/components/molecules/tabs/index.d.ts +21 -0
- package/src/components/molecules/terms-and-conditions-modal/TermsAndConditionsModal.js +1 -1
- package/src/components/molecules/terms-and-conditions-modal/TermsAndConditionsModal.stories.js +110 -0
- package/src/components/molecules/toast-notification/Toast.mdx +15 -0
- package/src/components/molecules/toast-notification/Toast.stories.js +183 -0
- package/src/components/molecules/toast-notification/ToastNotification.js +74 -43
- package/src/components/molecules/tooltip/Tooltip.js +269 -0
- package/src/components/molecules/tooltip/Tooltip.mdx +25 -0
- package/src/components/molecules/tooltip/Tooltip.stories.js +287 -0
- package/src/components/molecules/tooltip/Tooltip.theme.js +18 -0
- package/src/components/molecules/tooltip/index.d.ts +34 -0
- package/src/components/molecules/tooltip/index.js +3 -0
- package/src/components/molecules/turnstile-widget/TurnstileWidget.js +183 -0
- package/src/components/molecules/turnstile-widget/index.js +3 -0
- package/src/components/templates/sidebar-stack-content/SidebarStackContent.js +1 -1
- package/src/constants/colors.d.ts +4 -0
- package/src/constants/colors.js +8 -1
- package/src/constants/regex_constants.js +1 -1
- package/src/constants/style_constants.js +13 -0
- package/src/deprecated/spinner/Spinner.js +8 -20
- package/src/hooks/index.js +2 -0
- package/src/hooks/use-conditionally-add-validator/index.js +20 -0
- package/src/hooks/use-outside-click/index.js +4 -5
- package/src/hooks/use-turnstile-script/index.js +49 -0
- package/src/util/formats.js +6 -3
- package/src/util/general.js +67 -4
- package/src/util/idleTimerUtils.js +36 -0
- package/src/util/index.js +3 -1
- package/src/util/themeUtils.js +24 -14
- package/src/.DS_Store +0 -0
- package/src/components/.DS_Store +0 -0
- package/src/components/atoms/alert/Alert.oldstories.js +0 -28
- package/src/components/atoms/badge/Badge.oldstories.js +0 -33
- package/src/components/atoms/breadcrumb/Breadcrumb.oldstories.js +0 -38
- package/src/components/atoms/button-with-action/ButtonWithAction.oldstories.js +0 -56
- package/src/components/atoms/button-with-link/ButtonWithLink.oldstories.js +0 -32
- package/src/components/atoms/country-dropdown/CountryDropdown.oldstories.js +0 -42
- package/src/components/atoms/display-box/DisplayBox.oldstories.js +0 -25
- package/src/components/atoms/display-card/DisplayCard.js +0 -88
- package/src/components/atoms/display-card/DisplayCard.oldstories.js +0 -24
- package/src/components/atoms/display-card/index.js +0 -3
- package/src/components/atoms/dropdown/Dropdown.oldstories.js +0 -47
- package/src/components/atoms/form-select/FormSelect.oldstories.js +0 -50
- package/src/components/atoms/formatted-address/FormattedAddress.oldstories.js +0 -32
- package/src/components/atoms/icons/NoPaymentResultsIcon.js +0 -54
- package/src/components/atoms/icons/PointOfSaleImage.d.ts +0 -1
- package/src/components/atoms/icons/PointOfSaleImage.js +0 -439
- package/src/components/atoms/labeled-amount/LabeledAmount.oldstories.js +0 -42
- package/src/components/atoms/line-item/LineItem.oldstories.js +0 -28
- package/src/components/atoms/link/Link.oldstories.js +0 -57
- package/src/components/atoms/loading-line/LoadingLine.oldstories.js +0 -28
- package/src/components/atoms/nav-footer/NavFooter.oldstories.js +0 -31
- package/src/components/atoms/nav-header/NavHeader.oldstories.js +0 -29
- package/src/components/atoms/password-requirements/PasswordRequirements.oldstories.js +0 -75
- package/src/components/atoms/placeholder/Placeholder.oldstories.js +0 -42
- package/src/components/atoms/searchable-select/SearchableSelect.oldstories.js +0 -62
- package/src/components/atoms/state-province-dropdown/StateProvinceDropdown.oldstories.js +0 -53
- package/src/components/atoms/toggle-switch/ToggleSwitch.oldstories.js +0 -28
- package/src/components/molecules/.DS_Store +0 -0
- package/src/components/molecules/address-form/AddressForm.oldstories.js +0 -21
- package/src/components/molecules/banner/Banner.oldstories.js +0 -29
- package/src/components/molecules/change-password-form/ChangePasswordForm.oldstories.js +0 -22
- package/src/components/molecules/collapsible-section/CollapsibleSection.oldstories.js +0 -68
- package/src/components/molecules/edit-name-form/EdidNameForm.oldstories.js +0 -24
- package/src/components/molecules/link-card/LinkCard.oldstories.js +0 -87
- package/src/components/molecules/login-form/LoginForm.oldstories.js +0 -24
- package/src/components/molecules/modal/Modal.oldstories.js +0 -139
- package/src/components/molecules/module/Module.oldstories.js +0 -31
- package/src/components/molecules/obligation/.DS_Store +0 -0
- package/src/components/molecules/pagination/Pagination.oldstories.js +0 -32
- package/src/components/molecules/tabs/Tabs.oldstories.js +0 -241
- package/src/components/molecules/toast-notification/ToastNotification.oldstories.js +0 -105
- 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
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { boolean } from "@storybook/addon-knobs";
|
|
3
|
-
import PasswordRequirements from "./PasswordRequirements";
|
|
4
|
-
import { FormInput } from "../form-layouts";
|
|
5
|
-
import { Box } from "../layouts";
|
|
6
|
-
import page from "../../../../.storybook/page";
|
|
7
|
-
import { connect } from "react-redux";
|
|
8
|
-
import {
|
|
9
|
-
createFormState,
|
|
10
|
-
required,
|
|
11
|
-
hasLength,
|
|
12
|
-
hasNumber,
|
|
13
|
-
hasLowercaseLetter,
|
|
14
|
-
hasUppercaseLetter,
|
|
15
|
-
hasSpecialCharacter
|
|
16
|
-
} from "redux-freeform";
|
|
17
|
-
|
|
18
|
-
const formConfig = {
|
|
19
|
-
password: {
|
|
20
|
-
validators: [
|
|
21
|
-
required(),
|
|
22
|
-
hasLength(8, 100),
|
|
23
|
-
hasNumber(),
|
|
24
|
-
hasLowercaseLetter(),
|
|
25
|
-
hasUppercaseLetter(),
|
|
26
|
-
hasSpecialCharacter()
|
|
27
|
-
]
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
const passwordForm = createFormState(formConfig);
|
|
32
|
-
|
|
33
|
-
const passwordRequirementsWrapper = ({ fields, actions, showErrors }) => {
|
|
34
|
-
const passwordErrorMessages = {
|
|
35
|
-
[required.error]: "Password is required",
|
|
36
|
-
[hasLength.error]: "Password must have at least 8 characters",
|
|
37
|
-
[hasNumber.error]: "Password must contain at least one number",
|
|
38
|
-
[hasLowercaseLetter.error]:
|
|
39
|
-
"Password must contain at least one lowercase letter",
|
|
40
|
-
[hasUppercaseLetter.error]:
|
|
41
|
-
"Password must contain at least one uppercase letter",
|
|
42
|
-
[hasSpecialCharacter.error]:
|
|
43
|
-
"Password must contain at least one special character (!@#$%^&*.?)"
|
|
44
|
-
};
|
|
45
|
-
return (
|
|
46
|
-
<Box>
|
|
47
|
-
<FormInput
|
|
48
|
-
labelTextWhenNoError="Type in password"
|
|
49
|
-
errorMessages={passwordErrorMessages}
|
|
50
|
-
field={fields.password}
|
|
51
|
-
fieldActions={actions.fields.password}
|
|
52
|
-
showErrors={showErrors}
|
|
53
|
-
/>
|
|
54
|
-
<PasswordRequirements password={fields.password} />
|
|
55
|
-
</Box>
|
|
56
|
-
);
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
const story = page({
|
|
60
|
-
title: "Components|Atoms/PasswordRequirements",
|
|
61
|
-
Component: PasswordRequirements,
|
|
62
|
-
reducer: passwordForm.reducer,
|
|
63
|
-
mapStateToProps: passwordForm.mapStateToProps,
|
|
64
|
-
mapDispatchToProps: passwordForm.mapDispatchToProps
|
|
65
|
-
});
|
|
66
|
-
export default story;
|
|
67
|
-
|
|
68
|
-
const ConnectedForm = connect(
|
|
69
|
-
passwordForm.mapStateToProps,
|
|
70
|
-
passwordForm.mapDispatchToProps
|
|
71
|
-
)(passwordRequirementsWrapper);
|
|
72
|
-
|
|
73
|
-
export const passwordRequirements = () => (
|
|
74
|
-
<ConnectedForm showErrors={boolean("showErrors", false, "props")} />
|
|
75
|
-
);
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { boolean, text, select } from "@storybook/addon-knobs";
|
|
3
|
-
import Placeholder from "./Placeholder";
|
|
4
|
-
import page from "../../../../.storybook/page";
|
|
5
|
-
|
|
6
|
-
const variantsLabel = "variant";
|
|
7
|
-
const variants = {
|
|
8
|
-
default: "default",
|
|
9
|
-
large: "large"
|
|
10
|
-
};
|
|
11
|
-
const defaultValue = "default";
|
|
12
|
-
const groupId = "props";
|
|
13
|
-
|
|
14
|
-
const icons = {
|
|
15
|
-
accounts: "accounts",
|
|
16
|
-
properties: "properties",
|
|
17
|
-
payments: "payments"
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
const iconLabel = "largeIcon";
|
|
21
|
-
|
|
22
|
-
const defaultIcon = "accounts";
|
|
23
|
-
|
|
24
|
-
export const placeholder = () => (
|
|
25
|
-
<Placeholder
|
|
26
|
-
variant={select(variantsLabel, variants, defaultValue, groupId)}
|
|
27
|
-
isLink={boolean("isLink", true, "props")}
|
|
28
|
-
destination={text("destination", "add-account", "props")}
|
|
29
|
-
text={text("text", "Add an Account", "props")}
|
|
30
|
-
largeIcon={select(iconLabel, icons, defaultIcon, groupId)}
|
|
31
|
-
key="placeholder"
|
|
32
|
-
isDisabled={boolean("isDisabled", false, "props")}
|
|
33
|
-
action={() => console.log("placeholder action")}
|
|
34
|
-
/>
|
|
35
|
-
);
|
|
36
|
-
|
|
37
|
-
const story = page({
|
|
38
|
-
title: "Components|Atoms/Placeholder",
|
|
39
|
-
Component: Placeholder
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
export default story;
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import React, { useState } from "react";
|
|
2
|
-
import { connect } from "react-redux";
|
|
3
|
-
import { text } from "@storybook/addon-knobs";
|
|
4
|
-
import { createFormState } from "redux-freeform";
|
|
5
|
-
|
|
6
|
-
import SearchableSelect, { SELECT_ALL } from "./SearchableSelect";
|
|
7
|
-
import page from "../../../../.storybook/page";
|
|
8
|
-
|
|
9
|
-
const { mapStateToProps, mapDispatchToProps, reducer } = createFormState({
|
|
10
|
-
searchTerm: {
|
|
11
|
-
validators: []
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
const items = [
|
|
16
|
-
{ name: "Foo", value: "foo-value" },
|
|
17
|
-
{ name: "Baz", value: "baz-value" },
|
|
18
|
-
{ name: SELECT_ALL, value: SELECT_ALL },
|
|
19
|
-
{ name: "Bar", value: "bar-value" }
|
|
20
|
-
];
|
|
21
|
-
|
|
22
|
-
const FormWrapper = props => {
|
|
23
|
-
const [selectedItems, setSelectedItems] = useState(props.selectedItems || []);
|
|
24
|
-
const selectValues = items => items.map(item => item.value);
|
|
25
|
-
|
|
26
|
-
const selectItem = selectedItem => {
|
|
27
|
-
if (selectValues(selectedItems).includes(selectedItem.value)) {
|
|
28
|
-
const fewerItems = selectedItems.filter(
|
|
29
|
-
item => item.value !== selectedItem.value
|
|
30
|
-
);
|
|
31
|
-
setSelectedItems(fewerItems);
|
|
32
|
-
} else {
|
|
33
|
-
const moreItems = selectedItems.concat(selectedItem);
|
|
34
|
-
setSelectedItems(moreItems);
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
return (
|
|
39
|
-
<SearchableSelect
|
|
40
|
-
autocompleteValue={props.autocompleteValue}
|
|
41
|
-
items={items}
|
|
42
|
-
fields={props.fields}
|
|
43
|
-
actions={props.actions}
|
|
44
|
-
selectedItems={selectedItems}
|
|
45
|
-
selectItem={item => selectItem(item)}
|
|
46
|
-
/>
|
|
47
|
-
);
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
const story = page({
|
|
51
|
-
title: "Components|Atoms/SearchableSelect",
|
|
52
|
-
Component: SearchableSelect,
|
|
53
|
-
reducer,
|
|
54
|
-
mapStateToProps,
|
|
55
|
-
mapDispatchToProps
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
export default story;
|
|
59
|
-
const ConnectedForm = connect(mapStateToProps, mapDispatchToProps)(FormWrapper);
|
|
60
|
-
export const searchableSelect = () => (
|
|
61
|
-
<ConnectedForm autocompleteValue={text("autocompleteValue", null, "props")} />
|
|
62
|
-
);
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { connect } from "react-redux";
|
|
3
|
-
import { text, boolean } from "@storybook/addon-knobs";
|
|
4
|
-
import { createFormState, required } from "redux-freeform";
|
|
5
|
-
|
|
6
|
-
import StateProvinceDropDown from ".";
|
|
7
|
-
import page from "../../../../.storybook/page";
|
|
8
|
-
|
|
9
|
-
const { mapStateToProps, mapDispatchToProps, reducer } = createFormState({
|
|
10
|
-
state: {
|
|
11
|
-
validators: [required()]
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
const errorMessages = {
|
|
15
|
-
[required.error]: "State is required"
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
const story = page({
|
|
19
|
-
title: "Components|Atoms/StateProvinceDropDown",
|
|
20
|
-
Component: StateProvinceDropDown,
|
|
21
|
-
reducer,
|
|
22
|
-
mapStateToProps,
|
|
23
|
-
mapDispatchToProps,
|
|
24
|
-
height: "500px"
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
const FormWrapper = ({
|
|
28
|
-
autocompleteValue,
|
|
29
|
-
fields,
|
|
30
|
-
actions,
|
|
31
|
-
countryCode,
|
|
32
|
-
labelTextWhenNoError,
|
|
33
|
-
showErrors
|
|
34
|
-
}) => (
|
|
35
|
-
<StateProvinceDropDown
|
|
36
|
-
errorMessages={errorMessages}
|
|
37
|
-
field={fields.state}
|
|
38
|
-
fieldActions={actions.fields.state}
|
|
39
|
-
countryCode={countryCode}
|
|
40
|
-
labelTextWhenNoError={labelTextWhenNoError}
|
|
41
|
-
showErrors={showErrors}
|
|
42
|
-
/>
|
|
43
|
-
);
|
|
44
|
-
|
|
45
|
-
export default story;
|
|
46
|
-
const ConnectedForm = connect(mapStateToProps, mapDispatchToProps)(FormWrapper);
|
|
47
|
-
export const stateProvinceDropDown = () => (
|
|
48
|
-
<ConnectedForm
|
|
49
|
-
labelTextWhenNoError={text("State/Province", "", "props")}
|
|
50
|
-
countryCode={text("countryCode", "US", "props")}
|
|
51
|
-
showErrors={boolean("showErrors", false, "props")}
|
|
52
|
-
/>
|
|
53
|
-
);
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import React, { useState, Fragment } from "react";
|
|
2
|
-
import { boolean, text } from "@storybook/addon-knobs";
|
|
3
|
-
import ToggleSwitch from "./ToggleSwitch";
|
|
4
|
-
import page from "../../../../.storybook/page";
|
|
5
|
-
|
|
6
|
-
export const toggleSwitchDefault = () => {
|
|
7
|
-
const [isOn, onToggle] = useState(false);
|
|
8
|
-
|
|
9
|
-
const disabled = boolean("disabled", false, "props");
|
|
10
|
-
return (
|
|
11
|
-
<Fragment>
|
|
12
|
-
<ToggleSwitch
|
|
13
|
-
name="toggle-switch"
|
|
14
|
-
label={text("label", "Toggle Switch Label", "props")}
|
|
15
|
-
isOn={isOn}
|
|
16
|
-
onToggle={() => onToggle(!isOn)}
|
|
17
|
-
disabled={disabled}
|
|
18
|
-
/>
|
|
19
|
-
</Fragment>
|
|
20
|
-
);
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
const story = page({
|
|
24
|
-
title: "Components|Atoms/ToggleSwitch",
|
|
25
|
-
Component: ToggleSwitch
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
export default story;
|
|
Binary file
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { connect } from "react-redux";
|
|
3
|
-
|
|
4
|
-
import AddressForm from "./AddressForm";
|
|
5
|
-
import page from "../../../../.storybook/page";
|
|
6
|
-
import * as AddressFormState from "./AddressForm.state";
|
|
7
|
-
|
|
8
|
-
const story = page({
|
|
9
|
-
title: "Components|Molecules/AddressForm",
|
|
10
|
-
Component: AddressForm,
|
|
11
|
-
reducer: AddressFormState.reducer,
|
|
12
|
-
mapStateToProps: AddressFormState.mapStateToProps,
|
|
13
|
-
mapDispatchToProps: AddressFormState.mapDispatchToProps
|
|
14
|
-
});
|
|
15
|
-
export default story;
|
|
16
|
-
|
|
17
|
-
const ConnectedForm = connect(
|
|
18
|
-
AddressFormState.mapStateToProps,
|
|
19
|
-
AddressFormState.mapDispatchToProps
|
|
20
|
-
)(AddressForm);
|
|
21
|
-
export const addressForm = () => <ConnectedForm />;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import React, { useEffect, useState } from "react";
|
|
2
|
-
import { text, boolean } from "@storybook/addon-knobs";
|
|
3
|
-
import Banner from "./Banner";
|
|
4
|
-
import { WalletBannerIcon } from "../../atoms/icons";
|
|
5
|
-
|
|
6
|
-
import page from "../../../../.storybook/page";
|
|
7
|
-
|
|
8
|
-
const groupId = "props";
|
|
9
|
-
export const banner = () => (
|
|
10
|
-
<Banner
|
|
11
|
-
heading={text("bannerHeading", "Banner Heading Text", groupId)}
|
|
12
|
-
subHeading={text("bannerSubheading", "Banner Description", groupId)}
|
|
13
|
-
image={WalletBannerIcon}
|
|
14
|
-
padding={text("padding", null, groupId)}
|
|
15
|
-
mobilePadding={text("mobilePadding", null, groupId)}
|
|
16
|
-
minWidth={text("minWidth", null, groupId)}
|
|
17
|
-
minHeight={text("minHeight", null, groupId)}
|
|
18
|
-
contentSpacing={text("contentSpacing", null, groupId)}
|
|
19
|
-
mobileContentSpacing={text("mobileContentSpacing", null, groupId)}
|
|
20
|
-
/>
|
|
21
|
-
);
|
|
22
|
-
|
|
23
|
-
banner.storyName = "Welcome to Wallet Banner";
|
|
24
|
-
|
|
25
|
-
const story = page({
|
|
26
|
-
title: "Components|Molecules/Banner",
|
|
27
|
-
Component: Banner
|
|
28
|
-
});
|
|
29
|
-
export default story;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { connect } from "react-redux";
|
|
3
|
-
import { boolean } from "@storybook/addon-knobs";
|
|
4
|
-
|
|
5
|
-
import ChangePasswordForm from "./ChangePasswordForm";
|
|
6
|
-
import page from "../../../../.storybook/page";
|
|
7
|
-
import * as ChangePasswordFormState from "./ChangePasswordForm.state";
|
|
8
|
-
|
|
9
|
-
const story = page({
|
|
10
|
-
title: "Components|Molecules/ChangePasswordForm",
|
|
11
|
-
Component: ChangePasswordForm,
|
|
12
|
-
reducer: ChangePasswordFormState.reducer
|
|
13
|
-
});
|
|
14
|
-
export default story;
|
|
15
|
-
|
|
16
|
-
const ConnectedForm = connect(
|
|
17
|
-
ChangePasswordFormState.mapStateToProps,
|
|
18
|
-
ChangePasswordFormState.mapDispatchToProps
|
|
19
|
-
)(ChangePasswordForm);
|
|
20
|
-
export const changePasswordForm = () => (
|
|
21
|
-
<ConnectedForm showErrors={boolean("showErrors", false, "props")} />
|
|
22
|
-
);
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import React, { useState } from "react";
|
|
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";
|
|
7
|
-
|
|
8
|
-
const content = {
|
|
9
|
-
open: {
|
|
10
|
-
x: "0",
|
|
11
|
-
opacity: 1
|
|
12
|
-
},
|
|
13
|
-
closed: {
|
|
14
|
-
x: "-7.5%",
|
|
15
|
-
opacity: 0
|
|
16
|
-
}
|
|
17
|
-
};
|
|
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
|
-
);
|
|
62
|
-
};
|
|
63
|
-
const story = page({
|
|
64
|
-
title: "Components|Molecules/CollapsibleSection",
|
|
65
|
-
Component: CollapsibleSection
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
export default story;
|
|
@@ -1,24 +0,0 @@
|
|
|
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
|
-
);
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import page from "../../../../.storybook/page";
|
|
2
|
-
import { boolean, text } from "@storybook/addon-knobs";
|
|
3
|
-
import React from "react";
|
|
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";
|
|
8
|
-
import Badge from "../../atoms/badge/Badge";
|
|
9
|
-
import PlusCircleIcon from "../../atoms/icons/PlusCircleIcon";
|
|
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";
|
|
20
|
-
|
|
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
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
const groupId = "props";
|
|
32
|
-
const disabled = false;
|
|
33
|
-
const showLeft = true;
|
|
34
|
-
|
|
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">
|
|
47
|
-
<Badge
|
|
48
|
-
label="Autopay Available"
|
|
49
|
-
Icon={AutopayIcon}
|
|
50
|
-
variant={disabled ? "disabled" : "success"}
|
|
51
|
-
/>
|
|
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
|
-
}`}
|
|
64
|
-
>
|
|
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
|
-
);
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
const story = page({
|
|
83
|
-
title: "Components|Molecules/LinkCard",
|
|
84
|
-
Component: LinkCard
|
|
85
|
-
});
|
|
86
|
-
|
|
87
|
-
export default story;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { connect } from "react-redux";
|
|
3
|
-
import { boolean } from "@storybook/addon-knobs";
|
|
4
|
-
|
|
5
|
-
import LoginForm from "./LoginForm";
|
|
6
|
-
import page from "../../../../.storybook/page";
|
|
7
|
-
import * as LoginFormState from "./LoginForm.state";
|
|
8
|
-
|
|
9
|
-
const story = page({
|
|
10
|
-
title: "Components|Molecules/LoginForm",
|
|
11
|
-
Component: LoginForm,
|
|
12
|
-
reducer: LoginFormState.reducer,
|
|
13
|
-
mapStateToProps: LoginFormState.mapStateToProps,
|
|
14
|
-
mapDispatchToProps: LoginFormState.mapDispatchToProps
|
|
15
|
-
});
|
|
16
|
-
export default story;
|
|
17
|
-
|
|
18
|
-
const ConnectedForm = connect(
|
|
19
|
-
LoginFormState.mapStateToProps,
|
|
20
|
-
LoginFormState.mapDispatchToProps
|
|
21
|
-
)(LoginForm);
|
|
22
|
-
export const loginForm = () => (
|
|
23
|
-
<ConnectedForm showErrors={boolean("showErrors", false, "props")} />
|
|
24
|
-
);
|
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
import React, { useEffect, useState } from "react";
|
|
2
|
-
import { text, boolean } from "@storybook/addon-knobs";
|
|
3
|
-
import Modal from "./Modal";
|
|
4
|
-
import page from "../../../../.storybook/page";
|
|
5
|
-
|
|
6
|
-
import Text from "../../atoms/text";
|
|
7
|
-
import { noop } from "../../../util/general";
|
|
8
|
-
import Spinner from "../../atoms/spinner/Spinner";
|
|
9
|
-
import { Center } from "../../atoms/layouts";
|
|
10
|
-
|
|
11
|
-
const groupId = "props";
|
|
12
|
-
|
|
13
|
-
export const modalV1 = () => (
|
|
14
|
-
<Modal
|
|
15
|
-
version="v1"
|
|
16
|
-
ModalLink={() => (
|
|
17
|
-
<Text
|
|
18
|
-
onClick={noop}
|
|
19
|
-
color={"#347BB2"}
|
|
20
|
-
fontSize="18px"
|
|
21
|
-
lineHeight="2rem"
|
|
22
|
-
extraStyles={`cursor: pointer;`}
|
|
23
|
-
>
|
|
24
|
-
Modal Link
|
|
25
|
-
</Text>
|
|
26
|
-
)}
|
|
27
|
-
blurUnderlay={boolean("blurUnderlay", true, groupId)}
|
|
28
|
-
cancelButtonText={text("cancelButtonText", "Cancel", groupId)}
|
|
29
|
-
continueAction={noop}
|
|
30
|
-
continueButtonText={text("continueButtonText", "Continue", groupId)}
|
|
31
|
-
defaultWrapper={boolean("defaultWrapper", true, groupId)}
|
|
32
|
-
hideModal={noop}
|
|
33
|
-
maxHeight={text("maxHeight", "", groupId)}
|
|
34
|
-
modalBodyBg={text("modalBodyBg", "#F6F6F9", groupId)}
|
|
35
|
-
modalBodyText={text("modalBodyText", "Modal Body Text", groupId)}
|
|
36
|
-
modalHeaderBg={text("modalHeaderBg", "white", groupId)}
|
|
37
|
-
modalHeaderText={text("modalHeaderText", "Modal Header Text", groupId)}
|
|
38
|
-
modalOpen={boolean("modalOpen", true, groupId)}
|
|
39
|
-
noBorder={boolean("noBorder", true, groupId)}
|
|
40
|
-
noButtons={boolean("noButtons", false, groupId)}
|
|
41
|
-
onlyCloseButton={boolean("onlyCloseButton", false, groupId)}
|
|
42
|
-
onlyContinueButton={boolean("onlyContinueButton", false, groupId)}
|
|
43
|
-
useDangerButton={boolean("useDangerButton", false, groupId)}
|
|
44
|
-
/>
|
|
45
|
-
);
|
|
46
|
-
|
|
47
|
-
modalV1.storyName = "Standard Modal (V1)";
|
|
48
|
-
|
|
49
|
-
export const modalV2 = () => (
|
|
50
|
-
<Modal
|
|
51
|
-
version="v2"
|
|
52
|
-
ModalLink={() => (
|
|
53
|
-
<Text
|
|
54
|
-
onClick={noop}
|
|
55
|
-
color={"#347BB2"}
|
|
56
|
-
fontSize="18px"
|
|
57
|
-
lineHeight="2rem"
|
|
58
|
-
extraStyles={`cursor: pointer;`}
|
|
59
|
-
>
|
|
60
|
-
Modal Link
|
|
61
|
-
</Text>
|
|
62
|
-
)}
|
|
63
|
-
blurUnderlay={boolean("blurUnderlay", true, groupId)}
|
|
64
|
-
cancelButtonText={text("cancelButtonText", "Cancel", groupId)}
|
|
65
|
-
continueAction={noop}
|
|
66
|
-
continueButtonText={text("continueButtonText", "Continue", groupId)}
|
|
67
|
-
continueURL={text("continueURL", "", groupId)}
|
|
68
|
-
defaultWrapper={boolean("defaultWrapper", true, groupId)}
|
|
69
|
-
hideModal={noop}
|
|
70
|
-
maxHeight={text("maxHeight", "", groupId)}
|
|
71
|
-
modalBodyBg={text("modalBodyBg", "", groupId)}
|
|
72
|
-
modalBodyText={text("modalBodyText", "Modal Body Text", groupId)}
|
|
73
|
-
modalHeaderBg={text("modalHeaderBg", "", groupId)}
|
|
74
|
-
modalHeaderText={text("modalHeaderText", "Modal Header Text", groupId)}
|
|
75
|
-
modalOpen={boolean("modalOpen", true, groupId)}
|
|
76
|
-
noButtons={boolean("noButtons", false, groupId)}
|
|
77
|
-
onlyCloseButton={boolean("onlyCloseButton", false, groupId)}
|
|
78
|
-
onlyContinueButton={boolean("onlyContinueButton", false, groupId)}
|
|
79
|
-
showCloseIconButton={boolean("showCloseIconButton", true, groupId)}
|
|
80
|
-
useDangerButton={boolean("useDangerButton", false, groupId)}
|
|
81
|
-
/>
|
|
82
|
-
);
|
|
83
|
-
|
|
84
|
-
modalV2.storyName = "Standard Modal (V2)";
|
|
85
|
-
|
|
86
|
-
export const modalWithoutButtons = () => {
|
|
87
|
-
const [isModalOpen, setIsModalOpen] = useState(true);
|
|
88
|
-
useEffect(() => {
|
|
89
|
-
setTimeout(() => {
|
|
90
|
-
// some async action or timer closes the modal instead
|
|
91
|
-
setIsModalOpen(false);
|
|
92
|
-
}, 3000);
|
|
93
|
-
}, []);
|
|
94
|
-
return (
|
|
95
|
-
<Modal
|
|
96
|
-
version="v1"
|
|
97
|
-
ModalLink={() => (
|
|
98
|
-
<Text
|
|
99
|
-
tabIndex={0}
|
|
100
|
-
onClick={noop}
|
|
101
|
-
color={"#347BB2"}
|
|
102
|
-
fontSize="18px"
|
|
103
|
-
lineHeight="2rem"
|
|
104
|
-
extraStyles={`cursor: pointer;`}
|
|
105
|
-
>
|
|
106
|
-
Modal Link
|
|
107
|
-
</Text>
|
|
108
|
-
)}
|
|
109
|
-
hideModal={noop}
|
|
110
|
-
continueAction={noop}
|
|
111
|
-
modalOpen={isModalOpen}
|
|
112
|
-
modalHeaderText={text(
|
|
113
|
-
"modalHeaderText",
|
|
114
|
-
"Modal Without Buttons",
|
|
115
|
-
groupId
|
|
116
|
-
)}
|
|
117
|
-
modalBodyText={
|
|
118
|
-
<Center tabIndex={0}>
|
|
119
|
-
<Spinner size="100" />
|
|
120
|
-
</Center>
|
|
121
|
-
}
|
|
122
|
-
modalHeaderBg={text("modalHeaderBg", "white", groupId)}
|
|
123
|
-
modalBodyBg={text("modalBodyBg", "#F6F6F9", groupId)}
|
|
124
|
-
defaultWrapper={boolean("defaultWrapper", true, groupId)}
|
|
125
|
-
noButtons={boolean("noButtons", true, groupId)}
|
|
126
|
-
maxHeight={text("maxHeight", "", groupId)}
|
|
127
|
-
blurUnderlay={boolean("blurUnderlay", false, groupId)}
|
|
128
|
-
/>
|
|
129
|
-
);
|
|
130
|
-
};
|
|
131
|
-
|
|
132
|
-
modalWithoutButtons.storyName = "Modal (V1) Without Buttons";
|
|
133
|
-
|
|
134
|
-
const story = page({
|
|
135
|
-
title: "Components|Molecules/Modal",
|
|
136
|
-
Component: Modal
|
|
137
|
-
});
|
|
138
|
-
|
|
139
|
-
export default story;
|