@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,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
|
|
3
|
-
const PropertyGarageIcon = () => (
|
|
3
|
+
const PropertyGarageIcon = ({ color }) => (
|
|
4
4
|
<svg
|
|
5
5
|
width="48"
|
|
6
6
|
height="48"
|
|
@@ -10,7 +10,7 @@ const PropertyGarageIcon = () => (
|
|
|
10
10
|
>
|
|
11
11
|
<path
|
|
12
12
|
d="M0 18C0 9.51472 0 5.27208 2.63604 2.63604C5.27208 0 9.51472 0 18 0H30C38.4853 0 42.7279 0 45.364 2.63604C48 5.27208 48 9.51472 48 18V30C48 38.4853 48 42.7279 45.364 45.364C42.7279 48 38.4853 48 30 48H18C9.51472 48 5.27208 48 2.63604 45.364C0 42.7279 0 38.4853 0 30V18Z"
|
|
13
|
-
fill=
|
|
13
|
+
fill={color}
|
|
14
14
|
/>
|
|
15
15
|
<path
|
|
16
16
|
d="M14.463 34.1481C14.5417 34.1481 14.6138 34.1153 14.6794 34.0497C14.745 33.9841 14.7778 33.912 14.7778 33.8333V24.074C14.7778 23.733 14.9024 23.4379 15.1516 23.1886C15.4008 22.9394 15.7091 22.8148 16.0764 22.8148H31.1087C31.476 22.8148 31.7843 22.9394 32.0335 23.1886C32.2827 23.4379 32.4074 23.733 32.4074 24.074V33.8333C32.4074 33.912 32.4401 33.9841 32.5057 34.0497C32.5713 34.1153 32.6435 34.1481 32.7222 34.1481H35.8703C35.949 34.1481 36.0212 34.1153 36.0867 34.0497C36.1523 33.9841 36.1851 33.912 36.1851 33.8333V20.3356C36.1851 19.9683 36.0802 19.6273 35.8703 19.3125C35.6604 18.9977 35.3719 18.7616 35.0046 18.6042H35.0439L24.3009 14.1574C23.8287 13.9475 23.3565 13.9475 22.8842 14.1574L12.1806 18.6042C11.8133 18.7616 11.5247 18.9977 11.3148 19.3125C11.1049 19.6273 11 19.9683 11 20.3356V33.8333C11 33.912 11.0328 33.9841 11.0984 34.0497C11.164 34.1153 11.2361 34.1481 11.3148 34.1481H14.463ZM30.8333 26.5926C30.912 26.5926 30.9841 26.5598 31.0497 26.4942C31.1153 26.4286 31.1481 26.3565 31.1481 26.2778V24.3889C31.1481 24.3102 31.1153 24.238 31.0497 24.1724C30.9841 24.1068 30.912 24.074 30.8333 24.074H16.3912C16.2863 24.074 16.2075 24.1068 16.1551 24.1724C16.1026 24.238 16.0764 24.3102 16.0764 24.3889V26.2778C16.0764 26.3565 16.1026 26.4286 16.1551 26.4942C16.2075 26.5598 16.2863 26.5926 16.3912 26.5926H30.8333ZM30.8333 30.3703C30.912 30.3703 30.9841 30.3375 31.0497 30.272C31.1153 30.2064 31.1481 30.1342 31.1481 30.0555V28.1666C31.1481 28.0879 31.1153 28.0158 31.0497 27.9502C30.9841 27.8846 30.912 27.8518 30.8333 27.8518H16.3518C16.2731 27.8518 16.201 27.8846 16.1354 27.9502C16.0698 28.0158 16.037 28.0879 16.037 28.1666V30.0555C16.037 30.1342 16.0698 30.2064 16.1354 30.272C16.201 30.3375 16.2731 30.3703 16.3518 30.3703H30.8333ZM30.8333 34.1481C30.912 34.1481 30.9841 34.1153 31.0497 34.0497C31.1153 33.9841 31.1481 33.912 31.1481 33.8333V31.9444C31.1481 31.8657 31.1153 31.7936 31.0497 31.728C30.9841 31.6624 30.912 31.6296 30.8333 31.6296H16.3518C16.2731 31.6296 16.201 31.6624 16.1354 31.728C16.0698 31.7936 16.037 31.8657 16.037 31.9444V33.8333C16.037 33.912 16.0698 33.9841 16.1354 34.0497C16.201 34.1153 16.2731 34.1481 16.3518 34.1481H30.8333Z"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
|
|
3
|
-
const PropertyLandIcon = () => (
|
|
3
|
+
const PropertyLandIcon = ({ color }) => (
|
|
4
4
|
<svg
|
|
5
5
|
width="48"
|
|
6
6
|
height="48"
|
|
@@ -10,7 +10,7 @@ const PropertyLandIcon = () => (
|
|
|
10
10
|
>
|
|
11
11
|
<path
|
|
12
12
|
d="M0 18C0 9.51472 0 5.27208 2.63604 2.63604C5.27208 0 9.51472 0 18 0H30C38.4853 0 42.7279 0 45.364 2.63604C48 5.27208 48 9.51472 48 18V30C48 38.4853 48 42.7279 45.364 45.364C42.7279 48 38.4853 48 30 48H18C9.51472 48 5.27208 48 2.63604 45.364C0 42.7279 0 38.4853 0 30V18Z"
|
|
13
|
-
fill=
|
|
13
|
+
fill={color}
|
|
14
14
|
/>
|
|
15
15
|
<path
|
|
16
16
|
d="M25.8629 35.15C26.1342 35.15 26.3376 35.037 26.4733 34.8109C26.6089 34.5848 26.6164 34.3512 26.4959 34.1101L25.1394 31.8945V30.8094H31.3339C31.5449 30.8094 31.7333 30.7566 31.899 30.6511C32.0648 30.5456 32.1929 30.4024 32.2834 30.2216C32.3738 30.0407 32.4039 29.8523 32.3738 29.6564C32.3437 29.4605 32.2532 29.2721 32.1025 29.0912L28.4853 25.0219H29.887C30.3391 25.0219 30.6556 24.8259 30.8365 24.4341C31.0174 24.0422 30.9721 23.6805 30.7009 23.3489L27.1289 19.2344H28.4401C28.6511 19.2344 28.847 19.1816 29.0279 19.0761C29.2088 18.9706 29.3369 18.8199 29.4122 18.624C29.4876 18.428 29.5102 18.2321 29.4801 18.0362C29.4499 17.8403 29.3595 17.6669 29.2088 17.5162L24.2351 12.2261C24.0844 12.0754 23.9036 12 23.6926 12C23.4816 12 23.3007 12.0754 23.15 12.2261L18.1763 17.5162C18.0256 17.6669 17.9352 17.8403 17.9051 18.0362C17.8749 18.2321 17.8975 18.428 17.9729 18.624C18.0482 18.8199 18.1763 18.9706 18.3572 19.0761C18.5381 19.1816 18.734 19.2344 18.945 19.2344H20.2562L16.6843 23.3489C16.413 23.6805 16.3677 24.0422 16.5486 24.4341C16.7295 24.8259 17.046 25.0219 17.4981 25.0219H18.8998L15.2826 29.0912C15.1319 29.2721 15.0414 29.4605 15.0113 29.6564C14.9812 29.8523 15.0113 30.0407 15.1017 30.2216C15.1922 30.4024 15.3203 30.5456 15.4861 30.6511C15.6518 30.7566 15.8402 30.8094 16.0512 30.8094H22.2457V31.8945L20.8892 34.1101C20.7687 34.3512 20.7762 34.5848 20.9118 34.8109C21.0475 35.037 21.251 35.15 21.5222 35.15H25.8629Z"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
|
|
3
|
-
const PropertyMotorcycleIcon = () => (
|
|
3
|
+
const PropertyMotorcycleIcon = ({ color }) => (
|
|
4
4
|
<svg
|
|
5
5
|
width="48"
|
|
6
6
|
height="48"
|
|
@@ -10,7 +10,7 @@ const PropertyMotorcycleIcon = () => (
|
|
|
10
10
|
>
|
|
11
11
|
<path
|
|
12
12
|
d="M0 18C0 9.51472 0 5.27208 2.63604 2.63604C5.27208 0 9.51472 0 18 0H30C38.4853 0 42.7279 0 45.364 2.63604C48 5.27208 48 9.51472 48 18V30C48 38.4853 48 42.7279 45.364 45.364C42.7279 48 38.4853 48 30 48H18C9.51472 48 5.27208 48 2.63604 45.364C0 42.7279 0 38.4853 0 30V18Z"
|
|
13
|
-
fill=
|
|
13
|
+
fill={color}
|
|
14
14
|
/>
|
|
15
15
|
<path
|
|
16
16
|
d="M32.7935 32.11C33.8183 32.11 34.7763 31.8575 35.6675 31.3525C36.5586 30.8475 37.2567 30.1495 37.7617 29.2583C38.2666 28.3672 38.5191 27.4092 38.5191 26.3844C38.5191 25.3596 38.2592 24.4164 37.7394 23.555C37.2196 22.6936 36.5289 22.0029 35.6675 21.4831C34.806 20.9633 33.8703 20.7033 32.8604 20.7033C32.2069 20.7033 31.5831 20.8073 30.989 21.0152L29.5186 18.5646H33.1723C33.4693 18.5646 33.7218 18.4606 33.9297 18.2527C34.1377 18.0447 34.2416 17.7923 34.2416 17.4952V16.0694C34.2416 15.7723 34.1377 15.5198 33.9297 15.3119C33.7218 15.104 33.4693 15 33.1723 15H31.1672C30.8404 15 30.5731 15.1188 30.3652 15.3565L28.672 17.2279L27.6917 15.5347C27.4838 15.1782 27.1719 15 26.756 15H23.1914C22.9835 15 22.8127 15.0668 22.679 15.2005C22.5454 15.3342 22.4785 15.505 22.4785 15.7129V16.4258C22.4785 16.6338 22.5454 16.8046 22.679 16.9382C22.8127 17.0719 22.9835 17.1388 23.1914 17.1388H26.1322L27.0234 18.5646H20.1615C19.716 18.0002 19.1813 17.5695 18.5575 17.2724C17.8149 16.9457 16.8643 16.7823 15.7058 16.7823H13.2552C12.9284 16.7823 12.6611 16.8863 12.4531 17.0942C12.2452 17.3021 12.1412 17.5546 12.1412 17.8517C12.1412 18.1487 12.2452 18.4012 12.4531 18.6091C12.6611 18.8171 12.9136 18.921 13.2106 18.921H15.7058C16.6564 18.921 17.3693 19.2924 17.8446 20.035L17.3099 20.9261C16.7158 20.7479 16.1068 20.6736 15.483 20.7033C14.5028 20.733 13.5968 21.0004 12.765 21.5054C11.9333 22.0103 11.2724 22.6861 10.7822 23.5327C10.2921 24.3793 10.0322 25.2927 10.0025 26.273C9.97277 27.3127 10.2104 28.2855 10.7154 29.1915C11.2204 30.0975 11.9184 30.8104 12.8096 31.3302C13.7007 31.8501 14.6661 32.11 15.7058 32.11C17.0128 32.11 18.1787 31.709 19.2036 30.907C20.2284 30.1049 20.9042 29.0801 21.2309 27.8325H24.9737C25.2708 27.8325 25.5307 27.7211 25.7535 27.4983C25.9763 27.2755 26.0728 27.0156 26.0431 26.7186C26.0134 25.6492 26.2139 24.6244 26.6446 23.6441C27.0753 22.6639 27.7066 21.8321 28.5383 21.1489L29.1176 22.0846C28.4937 22.6193 28.0036 23.2654 27.6472 24.0229C27.2907 24.7803 27.1125 25.5898 27.1125 26.4512C27.1125 27.4612 27.365 28.3969 27.8699 29.2583C28.3749 30.1198 29.0656 30.8104 29.9419 31.3302C30.8182 31.8501 31.7687 32.11 32.7935 32.11ZM15.7058 29.9713C14.7255 29.9713 13.8864 29.6222 13.1883 28.9242C12.4903 28.2261 12.1412 27.3869 12.1412 26.4067C12.1412 25.4264 12.4903 24.5872 13.1883 23.8892C13.8864 23.1911 14.7255 22.8421 15.7058 22.8421C15.884 22.8421 16.0623 22.8569 16.2405 22.8866L14.4136 26.2284C14.2057 26.5849 14.2057 26.9414 14.4136 27.2978C14.6216 27.6543 14.9335 27.8325 15.3494 27.8325H18.9585C18.6911 28.486 18.2604 29.0058 17.6663 29.392C17.0722 29.7782 16.4187 29.9713 15.7058 29.9713ZM32.994 29.9713C31.9841 30.0307 31.1078 29.7039 30.3652 28.991C29.6225 28.2781 29.2512 27.4166 29.2512 26.4067C29.2512 25.4561 29.578 24.6392 30.2315 23.956L32.4593 27.6097C32.5485 27.7879 32.6896 27.8993 32.8826 27.9439C33.0757 27.9885 33.2465 27.9662 33.3951 27.8771L34.0189 27.476C34.1971 27.3869 34.3085 27.2458 34.353 27.0527C34.3976 26.8597 34.3753 26.6889 34.2862 26.5403L32.1029 22.9312C32.3405 22.8718 32.5782 22.8421 32.8158 22.8421C33.8258 22.8421 34.6872 23.2134 35.4001 23.956C36.113 24.6986 36.4398 25.5749 36.3804 26.5849C36.321 27.5057 35.9719 28.2855 35.3333 28.9242C34.6946 29.5628 33.9149 29.9118 32.994 29.9713Z"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
|
|
3
|
-
const
|
|
3
|
+
const PropertyPersonalIcon = ({ color }) => (
|
|
4
4
|
<svg
|
|
5
5
|
width="48"
|
|
6
6
|
height="48"
|
|
@@ -10,7 +10,7 @@ const PropertyBusinessIcon = () => (
|
|
|
10
10
|
>
|
|
11
11
|
<path
|
|
12
12
|
d="M0 18C0 9.51472 0 5.27208 2.63604 2.63604C5.27208 0 9.51472 0 18 0H30C38.4853 0 42.7279 0 45.364 2.63604C48 5.27208 48 9.51472 48 18V30C48 38.4853 48 42.7279 45.364 45.364C42.7279 48 38.4853 48 30 48H18C9.51472 48 5.27208 48 2.63604 45.364C0 42.7279 0 38.4853 0 30V18Z"
|
|
13
|
-
fill=
|
|
13
|
+
fill={color}
|
|
14
14
|
/>
|
|
15
15
|
<path
|
|
16
16
|
fillRule="evenodd"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
|
|
3
|
-
const PropertyStorefrontIcon = () => (
|
|
3
|
+
const PropertyStorefrontIcon = ({ color }) => (
|
|
4
4
|
<svg
|
|
5
5
|
width="48"
|
|
6
6
|
height="48"
|
|
@@ -10,7 +10,7 @@ const PropertyStorefrontIcon = () => (
|
|
|
10
10
|
>
|
|
11
11
|
<path
|
|
12
12
|
d="M0 18C0 9.51472 0 5.27208 2.63604 2.63604C5.27208 0 9.51472 0 18 0H30C38.4853 0 42.7279 0 45.364 2.63604C48 5.27208 48 9.51472 48 18V30C48 38.4853 48 42.7279 45.364 45.364C42.7279 48 38.4853 48 30 48H18C9.51472 48 5.27208 48 2.63604 45.364C0 42.7279 0 38.4853 0 30V18Z"
|
|
13
|
-
fill=
|
|
13
|
+
fill={color}
|
|
14
14
|
/>
|
|
15
15
|
<path
|
|
16
16
|
d="M36.5244 20.7878C36.8705 20.7878 37.1734 20.6724 37.4329 20.4417C37.6925 20.2109 37.8439 19.9297 37.8872 19.5981C37.9305 19.2664 37.8656 18.9419 37.6925 18.6247L33.972 13.0872C33.7124 12.6834 33.3375 12.4815 32.8472 12.4815H15.2829C14.7926 12.4815 14.4177 12.6834 14.1581 13.0872L10.4809 18.6247C10.279 18.9419 10.1997 19.2664 10.243 19.5981C10.2862 19.9297 10.4376 20.2109 10.6972 20.4417C10.9568 20.6724 11.2596 20.7878 11.6057 20.7878H36.5244ZM25.4495 34.6315C25.8244 34.6315 26.1488 34.4945 26.4228 34.2205C26.6968 33.9465 26.8338 33.6221 26.8338 33.2471V22.1721H24.0651V29.094H15.7588V22.1721H12.9901V33.2471C12.9901 33.6221 13.1271 33.9465 13.4011 34.2205C13.6751 34.4945 13.9995 34.6315 14.3745 34.6315H25.4495ZM34.4479 34.6315C34.6498 34.6315 34.8156 34.5666 34.9454 34.4368C35.0752 34.307 35.1401 34.1412 35.1401 33.9393V22.1721H32.3713V33.9393C32.3713 34.1412 32.4362 34.307 32.566 34.4368C32.6958 34.5666 32.8616 34.6315 33.0635 34.6315H34.4479Z"
|
|
@@ -5,6 +5,8 @@ import Text from "../../../atoms/text";
|
|
|
5
5
|
import { FONT_WEIGHT_SEMIBOLD } from "../../../../constants/style_constants";
|
|
6
6
|
import { displayCurrency, noop } from "../../../../util/general";
|
|
7
7
|
import AutopayModalModule from "./AutopayModalModule";
|
|
8
|
+
import LoadingLine from "../../../atoms/loading-line";
|
|
9
|
+
import { GRECIAN_GREY } from "../../../../constants/colors";
|
|
8
10
|
|
|
9
11
|
const AmountModule = ({
|
|
10
12
|
totalAmountDue,
|
|
@@ -19,7 +21,8 @@ const AmountModule = ({
|
|
|
19
21
|
description,
|
|
20
22
|
subDescription,
|
|
21
23
|
allowedPaymentInstruments,
|
|
22
|
-
disableActions = false
|
|
24
|
+
disableActions = false,
|
|
25
|
+
isLoading = false
|
|
23
26
|
}) => {
|
|
24
27
|
const [modalOpen, toggleModal] = useState(false);
|
|
25
28
|
return (
|
|
@@ -30,43 +33,66 @@ const AmountModule = ({
|
|
|
30
33
|
Amount Due
|
|
31
34
|
</Text>
|
|
32
35
|
)}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
36
|
+
{isLoading ? (
|
|
37
|
+
<>
|
|
38
|
+
<LoadingLine
|
|
39
|
+
minWidth={"70"}
|
|
40
|
+
maxWidth={"80"}
|
|
41
|
+
height={"26px"}
|
|
42
|
+
margin={isMobile ? "0" : "0 0 0 auto"}
|
|
43
|
+
foregroundColor={GRECIAN_GREY}
|
|
44
|
+
style={{ borderRadius: "0.125rem" }}
|
|
45
|
+
/>
|
|
46
|
+
<LoadingLine
|
|
47
|
+
minWidth={"134"}
|
|
48
|
+
maxWidth={"178"}
|
|
49
|
+
height={"21px"}
|
|
50
|
+
margin={isMobile ? "0.25rem 0 0 0" : "0.25rem 0 0 auto"}
|
|
51
|
+
foregroundColor={GRECIAN_GREY}
|
|
52
|
+
style={{ borderRadius: "0.125rem" }}
|
|
53
|
+
/>
|
|
54
|
+
</>
|
|
55
|
+
) : (
|
|
56
|
+
<>
|
|
57
|
+
<AmountCallout
|
|
58
|
+
amount={displayCurrency(totalAmountDue)}
|
|
59
|
+
textAlign={isMobile ? "left" : "right"}
|
|
60
|
+
/>
|
|
61
|
+
{autoPayEnabled && (
|
|
62
|
+
<AutopayModalModule
|
|
63
|
+
autoPayActive={autoPayEnabled}
|
|
64
|
+
autoPaySchedule={autoPaySchedule}
|
|
65
|
+
toggleModal={toggleModal}
|
|
66
|
+
modalOpen={modalOpen}
|
|
67
|
+
navigateToSettings={navigateToSettings}
|
|
68
|
+
deactivatePaymentSchedule={deactivatePaymentSchedule}
|
|
69
|
+
isMobile={isMobile}
|
|
70
|
+
paymentPlanSchedule={paymentPlanSchedule}
|
|
71
|
+
isPaymentPlan={isPaymentPlan}
|
|
72
|
+
nextAutopayDate={nextAutopayDate}
|
|
73
|
+
controlType="link"
|
|
74
|
+
description={description}
|
|
75
|
+
subDescription={subDescription}
|
|
76
|
+
allowedPaymentInstruments={allowedPaymentInstruments}
|
|
77
|
+
disableActions={disableActions}
|
|
78
|
+
action={disableActions ? noop : () => toggleModal(true)}
|
|
79
|
+
onClick={
|
|
80
|
+
disableActions
|
|
81
|
+
? noop
|
|
82
|
+
: () => {
|
|
83
|
+
toggleModal(true);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
onKeyPress={
|
|
87
|
+
disableActions
|
|
88
|
+
? noop
|
|
89
|
+
: e => {
|
|
90
|
+
e.key === "Enter" && toggleModal(true);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
/>
|
|
94
|
+
)}
|
|
95
|
+
</>
|
|
70
96
|
)}
|
|
71
97
|
</Stack>
|
|
72
98
|
</Box>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { useEffect } from "react";
|
|
2
2
|
import Modal from "../../modal";
|
|
3
3
|
import ButtonWithAction from "../../../atoms/button-with-action";
|
|
4
4
|
import Text from "../../../atoms/text";
|
|
@@ -8,6 +8,7 @@ import { SEA_GREEN } from "../../../../constants/colors";
|
|
|
8
8
|
import { ACH_METHOD, CC_METHOD } from "../../../../constants/general";
|
|
9
9
|
import { titleCaseString, noop } from "../../../../util/general";
|
|
10
10
|
import { FONT_WEIGHT_REGULAR } from "../../../../constants/style_constants";
|
|
11
|
+
import Paragraph from "../../../atoms/paragraph/index";
|
|
11
12
|
|
|
12
13
|
const AutopayModalModule = ({
|
|
13
14
|
autoPayActive,
|
|
@@ -16,6 +17,7 @@ const AutopayModalModule = ({
|
|
|
16
17
|
toggleModal,
|
|
17
18
|
modalOpen,
|
|
18
19
|
deactivatePaymentSchedule,
|
|
20
|
+
deactivatingSchedule,
|
|
19
21
|
navigateToSettings,
|
|
20
22
|
controlType = "tertiary",
|
|
21
23
|
isMobile,
|
|
@@ -32,8 +34,8 @@ const AutopayModalModule = ({
|
|
|
32
34
|
onKeyPress
|
|
33
35
|
}) => {
|
|
34
36
|
const generateMethodNeededText = (planText, allowedPaymentInstruments) => {
|
|
35
|
-
const allowsCard = allowedPaymentInstruments
|
|
36
|
-
const allowsACH = allowedPaymentInstruments
|
|
37
|
+
const allowsCard = allowedPaymentInstruments?.includes(CC_METHOD);
|
|
38
|
+
const allowsACH = allowedPaymentInstruments?.includes(ACH_METHOD);
|
|
37
39
|
const methodRequired =
|
|
38
40
|
allowsCard && !allowsACH
|
|
39
41
|
? "debit or credit card payment method"
|
|
@@ -52,15 +54,38 @@ const AutopayModalModule = ({
|
|
|
52
54
|
description
|
|
53
55
|
)}: ${titleCaseString(subDescription)}`;
|
|
54
56
|
const nextDate = dueDate || nextAutopayDate;
|
|
57
|
+
|
|
58
|
+
// Close modal when deactivation successfully completes.
|
|
59
|
+
useEffect(() => {
|
|
60
|
+
if (autoPayActive && deactivatingSchedule === false) {
|
|
61
|
+
toggleModal(false);
|
|
62
|
+
}
|
|
63
|
+
}, [autoPayActive, deactivatingSchedule]);
|
|
64
|
+
|
|
55
65
|
const modalExtraProps = {
|
|
56
66
|
modalHeaderText: autoPayActive ? deactivateText : activateText,
|
|
57
|
-
modalBodyText: autoPayActive
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
67
|
+
modalBodyText: autoPayActive ? (
|
|
68
|
+
<>
|
|
69
|
+
<Paragraph>
|
|
70
|
+
Are you sure you want to stop {plan}?
|
|
71
|
+
{!inactive && nextDate && nextDate !== "On"
|
|
72
|
+
? " Your next payment will be due on " + nextDate + "."
|
|
73
|
+
: ""}
|
|
74
|
+
</Paragraph>
|
|
75
|
+
{!isPaymentPlan && (
|
|
76
|
+
<>
|
|
77
|
+
<br />
|
|
78
|
+
<Paragraph>
|
|
79
|
+
If your next autopayment is scheduled to run today, you may be
|
|
80
|
+
billed today and autopay will then stop for the next billing
|
|
81
|
+
cycle.
|
|
82
|
+
</Paragraph>
|
|
83
|
+
</>
|
|
84
|
+
)}
|
|
85
|
+
</>
|
|
86
|
+
) : (
|
|
87
|
+
generateMethodNeededText(plan, allowedPaymentInstruments)
|
|
88
|
+
),
|
|
64
89
|
continueButtonText: autoPayActive ? `Stop ${shortPlan}` : "Add",
|
|
65
90
|
useDangerButton: autoPayActive,
|
|
66
91
|
continueAction: autoPayActive
|
|
@@ -69,9 +94,9 @@ const AutopayModalModule = ({
|
|
|
69
94
|
isPaymentPlan ? paymentPlanSchedule : autoPaySchedule,
|
|
70
95
|
isPaymentPlan
|
|
71
96
|
);
|
|
72
|
-
toggleModal(false);
|
|
73
97
|
}
|
|
74
|
-
: navigateToSettings
|
|
98
|
+
: navigateToSettings,
|
|
99
|
+
isLoading: deactivatingSchedule
|
|
75
100
|
};
|
|
76
101
|
const modalLinkHoverFocus = `
|
|
77
102
|
outline: none;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import React, { useState } from "react";
|
|
2
2
|
import { GHOST_GREY } from "../../../../constants/colors";
|
|
3
3
|
import { Box, Cluster } from "../../../atoms/layouts";
|
|
4
|
+
import ButtonWithAction from "../../../atoms/button-with-action";
|
|
4
5
|
import AutopayModalModule from "./AutopayModalModule";
|
|
5
6
|
import RemoveAccountModalModule from "./RemoveAccountModalModule";
|
|
6
7
|
import { noop } from "../../../../util/general";
|
|
7
8
|
|
|
8
9
|
const InactiveControlsModule = ({
|
|
10
|
+
obligations,
|
|
9
11
|
autoPayEnabled,
|
|
10
12
|
autoPaySchedule,
|
|
11
13
|
navigateToSettings,
|
|
@@ -17,16 +19,38 @@ const InactiveControlsModule = ({
|
|
|
17
19
|
obligationAssocID,
|
|
18
20
|
dueDate,
|
|
19
21
|
agencyName,
|
|
22
|
+
config,
|
|
20
23
|
configType,
|
|
21
24
|
actions,
|
|
22
25
|
description,
|
|
23
26
|
subDescription,
|
|
24
27
|
allowedPaymentInstruments,
|
|
25
|
-
disableActions = false
|
|
28
|
+
disableActions = false,
|
|
29
|
+
showRemoveButton = true,
|
|
30
|
+
inactiveCanNavigateToAccountDetails = false
|
|
26
31
|
}) => {
|
|
27
32
|
const [modalOpen, toggleModal] = useState(false);
|
|
28
|
-
const {
|
|
29
|
-
|
|
33
|
+
const {
|
|
34
|
+
deleteObligationAssoc,
|
|
35
|
+
setDetailedObligation,
|
|
36
|
+
navigateToDetailedObligation
|
|
37
|
+
} = actions;
|
|
38
|
+
const { obligationSlug } = config;
|
|
39
|
+
const detailsSlug =
|
|
40
|
+
config.type === "ACCOUNT"
|
|
41
|
+
? `/profile/accounts/details/${obligationSlug}`
|
|
42
|
+
: `/profile/properties/details/${obligationSlug}`;
|
|
43
|
+
const handleDetailsClick = () => {
|
|
44
|
+
setDetailedObligation(obligations, config, obligationAssocID);
|
|
45
|
+
navigateToDetailedObligation(detailsSlug);
|
|
46
|
+
};
|
|
47
|
+
const handleRemoveAccount = () => {
|
|
48
|
+
const payload = {
|
|
49
|
+
id: obligationAssocID,
|
|
50
|
+
obligationSlug: config?.obligationSlug
|
|
51
|
+
};
|
|
52
|
+
deleteObligationAssoc(payload);
|
|
53
|
+
};
|
|
30
54
|
return (
|
|
31
55
|
<Box
|
|
32
56
|
padding={isMobile ? "18px 0 0 0" : "0"}
|
|
@@ -39,6 +63,24 @@ const InactiveControlsModule = ({
|
|
|
39
63
|
justify={isMobile && autoPayEnabled && "center"}
|
|
40
64
|
align={isMobile && autoPayEnabled && "center"}
|
|
41
65
|
>
|
|
66
|
+
{inactiveCanNavigateToAccountDetails && (
|
|
67
|
+
<Box
|
|
68
|
+
padding={isMobile ? "0 8px 0 0" : "0"}
|
|
69
|
+
extraStyles={isMobile && `flex-grow: 1;`}
|
|
70
|
+
>
|
|
71
|
+
<ButtonWithAction
|
|
72
|
+
variant="tertiary"
|
|
73
|
+
text={
|
|
74
|
+
config.type === "ACCOUNT"
|
|
75
|
+
? "Account Details"
|
|
76
|
+
: "Property Details"
|
|
77
|
+
}
|
|
78
|
+
action={handleDetailsClick}
|
|
79
|
+
dataQa="Account Details"
|
|
80
|
+
extraStyles={isMobile && `flex-grow: 1; width: 100%;`}
|
|
81
|
+
/>
|
|
82
|
+
</Box>
|
|
83
|
+
)}
|
|
42
84
|
{autoPayEnabled && (
|
|
43
85
|
<Box padding="0" extraStyles={`flex-grow: 1;`}>
|
|
44
86
|
<AutopayModalModule
|
|
@@ -63,15 +105,17 @@ const InactiveControlsModule = ({
|
|
|
63
105
|
/>
|
|
64
106
|
</Box>
|
|
65
107
|
)}
|
|
66
|
-
|
|
67
|
-
<
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
108
|
+
{showRemoveButton && (
|
|
109
|
+
<Box padding="0" extraStyles={`flex-grow: 1;`}>
|
|
110
|
+
<RemoveAccountModalModule
|
|
111
|
+
agencyName={agencyName}
|
|
112
|
+
removeAccount={disableActions ? noop : handleRemoveAccount}
|
|
113
|
+
accountType={configType === "ACCOUNT" ? "Account" : "Property"}
|
|
114
|
+
isMobile={isMobile}
|
|
115
|
+
disableActions={disableActions}
|
|
116
|
+
/>
|
|
117
|
+
</Box>
|
|
118
|
+
)}
|
|
75
119
|
</Cluster>
|
|
76
120
|
</Box>
|
|
77
121
|
);
|
|
@@ -28,7 +28,7 @@ const InactiveTitleModule = ({ title, subtitle, autoPayEnabled }) => (
|
|
|
28
28
|
Unable to load account details
|
|
29
29
|
</Detail>
|
|
30
30
|
<Detail variant="extraSmall" as="p" color={BLACK}>
|
|
31
|
-
{`This may mean that the
|
|
31
|
+
{`This may mean that the account has been paid off or there was an error loading it. If you have questions about this account, please contact us.${
|
|
32
32
|
autoPayEnabled
|
|
33
33
|
? " You may disable autopay for this account by pressing the 'Turn off Autopay' button."
|
|
34
34
|
: ""
|
|
@@ -15,6 +15,7 @@ const PaymentDetailsActions = ({
|
|
|
15
15
|
autoPayAvailable,
|
|
16
16
|
handleAutopayAction,
|
|
17
17
|
deactivatePaymentSchedule,
|
|
18
|
+
deactivatingSchedule,
|
|
18
19
|
navigateToSettings,
|
|
19
20
|
autoPaySchedule,
|
|
20
21
|
paymentPlanSchedule,
|
|
@@ -25,7 +26,11 @@ const PaymentDetailsActions = ({
|
|
|
25
26
|
description,
|
|
26
27
|
subDescription,
|
|
27
28
|
allowedPaymentInstruments,
|
|
28
|
-
disableActions = false
|
|
29
|
+
disableActions = false,
|
|
30
|
+
cartEnabled,
|
|
31
|
+
cartConfig,
|
|
32
|
+
isInCart,
|
|
33
|
+
isContentLoading
|
|
29
34
|
}) => {
|
|
30
35
|
const planType = isPaymentPlan ? "Payment Plan" : "Autopay";
|
|
31
36
|
const [isLoading, setIsLoading] = useState(false);
|
|
@@ -33,21 +38,46 @@ const PaymentDetailsActions = ({
|
|
|
33
38
|
const { obligationSlug } = config;
|
|
34
39
|
const {
|
|
35
40
|
createPaymentFromProfile,
|
|
41
|
+
configureMultiCart,
|
|
42
|
+
addToMultiCart,
|
|
36
43
|
setDetailedObligation,
|
|
37
|
-
navigateToDetailedObligation
|
|
44
|
+
navigateToDetailedObligation,
|
|
45
|
+
openCartSlider
|
|
38
46
|
} = actions;
|
|
39
47
|
const detailsSlug =
|
|
40
48
|
config.type === "ACCOUNT"
|
|
41
49
|
? `/profile/accounts/details/${obligationSlug}`
|
|
42
50
|
: `/profile/properties/details/${obligationSlug}`;
|
|
43
51
|
const handleClick = obligations => {
|
|
44
|
-
|
|
45
|
-
|
|
52
|
+
if (isInCart) {
|
|
53
|
+
openCartSlider();
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
if (cartEnabled && cartConfig) {
|
|
57
|
+
const { subClientSlug, addToCartConfig } = cartConfig;
|
|
58
|
+
configureMultiCart({ cartId: subClientSlug, config: cartConfig });
|
|
59
|
+
addToMultiCart({
|
|
60
|
+
cartId: subClientSlug,
|
|
61
|
+
items: addToCartConfig.items,
|
|
62
|
+
itemType: addToCartConfig.itemType
|
|
63
|
+
});
|
|
64
|
+
} else {
|
|
65
|
+
setIsLoading(true);
|
|
66
|
+
createPaymentFromProfile(obligations, config);
|
|
67
|
+
}
|
|
46
68
|
};
|
|
47
69
|
const handleDetailsClick = () => {
|
|
48
70
|
setDetailedObligation(obligations, config, obligationAssocID);
|
|
49
71
|
navigateToDetailedObligation(detailsSlug);
|
|
50
72
|
};
|
|
73
|
+
const variant = cartEnabled
|
|
74
|
+
? isInCart
|
|
75
|
+
? "greenPrimary"
|
|
76
|
+
: "secondary"
|
|
77
|
+
: isMobile
|
|
78
|
+
? "smallSecondary"
|
|
79
|
+
: "secondary";
|
|
80
|
+
const text = cartEnabled ? (isInCart ? "In Cart" : "Add to Cart") : "Pay Now";
|
|
51
81
|
return (
|
|
52
82
|
<Box
|
|
53
83
|
padding={isMobile ? "0" : "16px 0 0"}
|
|
@@ -82,6 +112,7 @@ const PaymentDetailsActions = ({
|
|
|
82
112
|
subDescription={subDescription}
|
|
83
113
|
allowedPaymentInstruments={allowedPaymentInstruments}
|
|
84
114
|
isInCustomerManagement={disableActions}
|
|
115
|
+
isLoading={isContentLoading}
|
|
85
116
|
/>
|
|
86
117
|
</Cluster>
|
|
87
118
|
</Box>
|
|
@@ -132,6 +163,7 @@ const PaymentDetailsActions = ({
|
|
|
132
163
|
modalOpen={modalOpen}
|
|
133
164
|
navigateToSettings={navigateToSettings}
|
|
134
165
|
deactivatePaymentSchedule={deactivatePaymentSchedule}
|
|
166
|
+
deactivatingSchedule={deactivatingSchedule}
|
|
135
167
|
controlType="tertiary"
|
|
136
168
|
isMobile={isMobile}
|
|
137
169
|
paymentPlanSchedule={paymentPlanSchedule}
|
|
@@ -150,9 +182,9 @@ const PaymentDetailsActions = ({
|
|
|
150
182
|
<ButtonWithAction
|
|
151
183
|
isLoading={isLoading}
|
|
152
184
|
action={disableActions ? noop : () => handleClick(obligations)}
|
|
153
|
-
text=
|
|
154
|
-
variant={
|
|
155
|
-
dataQa=
|
|
185
|
+
text={text}
|
|
186
|
+
variant={variant}
|
|
187
|
+
dataQa={text}
|
|
156
188
|
disabled={disableActions}
|
|
157
189
|
/>
|
|
158
190
|
</Box>
|
|
@@ -163,9 +195,9 @@ const PaymentDetailsActions = ({
|
|
|
163
195
|
<ButtonWithAction
|
|
164
196
|
isLoading={isLoading}
|
|
165
197
|
action={disableActions ? noop : () => handleClick(obligations)}
|
|
166
|
-
text=
|
|
167
|
-
variant={
|
|
168
|
-
dataQa=
|
|
198
|
+
text={text}
|
|
199
|
+
variant={variant}
|
|
200
|
+
dataQa={text}
|
|
169
201
|
extraStyles={isMobile && `flex-grow: 1; width: 100%; margin: 0;`}
|
|
170
202
|
disabled={disableActions}
|
|
171
203
|
/>
|
|
@@ -30,6 +30,7 @@ const RemoveAccountModalModule = ({
|
|
|
30
30
|
: accountType === "Property" && obligations.length > 1
|
|
31
31
|
? "properties"
|
|
32
32
|
: accountType.toLowerCase();
|
|
33
|
+
const accountsText = (accounts ?? "").trim();
|
|
33
34
|
|
|
34
35
|
return (
|
|
35
36
|
<Modal
|
|
@@ -37,7 +38,9 @@ const RemoveAccountModalModule = ({
|
|
|
37
38
|
hideModal={() => setModalIsOpen(false)}
|
|
38
39
|
modalOpen={modalIsOpen}
|
|
39
40
|
modalHeaderText={`Remove ${accountType}`}
|
|
40
|
-
modalBodyText={`Are you sure you want to remove the ${identifier}
|
|
41
|
+
modalBodyText={`Are you sure you want to remove the ${identifier}${
|
|
42
|
+
accountsText ? ` ${accountsText}` : ""
|
|
43
|
+
}? Any autopay scheduled against ${
|
|
41
44
|
obligations.length > 1 ? "them" : "it"
|
|
42
45
|
} will be deactivated.`}
|
|
43
46
|
continueButtonText="Remove"
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Canvas, Meta, Title, Story, Controls } from '@storybook/blocks';
|
|
2
|
+
|
|
3
|
+
import * as PaginationStories from './Pagination.stories.js';
|
|
4
|
+
|
|
5
|
+
<Meta of={PaginationStories} />
|
|
6
|
+
|
|
7
|
+
<Title />
|
|
8
|
+
|
|
9
|
+
Pagination renders a control panel that can be used to interact with paginated tables of data. The component takes some props to customize the look of the controls, as well as callback functions to run when a user interacts with the previous, next, and numerical page buttons. The Pagination component should also be supplied with a number to indicate the current page the user is on as well as the total number of pages.
|
|
10
|
+
|
|
11
|
+
<Controls />
|
|
12
|
+
|
|
13
|
+
<div style={{ marginBottom: "2em"}}>
|
|
14
|
+
<Story />
|
|
15
|
+
</div>
|