@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
|
@@ -0,0 +1,528 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Grid } from "../../atoms/layouts";
|
|
3
|
+
import {
|
|
4
|
+
COOL_GREY_05,
|
|
5
|
+
MANATEE_GREY,
|
|
6
|
+
ROYAL_BLUE_VIVID,
|
|
7
|
+
SEA_GREEN
|
|
8
|
+
} from "../../../constants/colors";
|
|
9
|
+
import { Box } from "../../atoms/layouts";
|
|
10
|
+
import LinkCard from "./LinkCard";
|
|
11
|
+
import Badge from "../../atoms/badge/Badge";
|
|
12
|
+
import AutopayIcon from "../../atoms/icons/AutopayIcon";
|
|
13
|
+
import ArrowRightIcon from "../../atoms/icons/ArrowRightIcon";
|
|
14
|
+
import PlusCircleIcon from "../../atoms/icons/PlusCircleIcon";
|
|
15
|
+
import Text from "../../atoms/text";
|
|
16
|
+
|
|
17
|
+
const meta = {
|
|
18
|
+
title: "Molecules/LinkCard",
|
|
19
|
+
component: LinkCard,
|
|
20
|
+
parameters: {
|
|
21
|
+
layout: "centered"
|
|
22
|
+
},
|
|
23
|
+
tags: ["!autodocs"],
|
|
24
|
+
args: {
|
|
25
|
+
title: "Test Workflow",
|
|
26
|
+
subtitle: "Link your benefit plan",
|
|
27
|
+
showLeft: undefined,
|
|
28
|
+
leftContent: undefined,
|
|
29
|
+
showRight: undefined,
|
|
30
|
+
rightContent: undefined,
|
|
31
|
+
href: "#",
|
|
32
|
+
extraStyles: "",
|
|
33
|
+
extraActiveStyles: "",
|
|
34
|
+
extraHoverStyles: "",
|
|
35
|
+
titleVariant: "h3",
|
|
36
|
+
disabled: false,
|
|
37
|
+
isExternalLink: false
|
|
38
|
+
},
|
|
39
|
+
argTypes: {
|
|
40
|
+
title: {
|
|
41
|
+
description: "Text to display in the LinkCard's title area",
|
|
42
|
+
table: {
|
|
43
|
+
type: { summary: "string" },
|
|
44
|
+
defaultValue: { summary: "Test Workflow" }
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
subtitle: {
|
|
48
|
+
description: "Text to display in the LinkCard's body area",
|
|
49
|
+
table: {
|
|
50
|
+
type: { summary: "string" },
|
|
51
|
+
defaultValue: { summary: "Link your benefit plan" }
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
showLeft: {
|
|
55
|
+
description: "Whether to show the LinkCard's left content",
|
|
56
|
+
table: {
|
|
57
|
+
type: { summary: "boolean" },
|
|
58
|
+
defaultValue: { summary: undefined }
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
leftContent: {
|
|
62
|
+
description: "Component to render on LinkCard's left side",
|
|
63
|
+
table: {
|
|
64
|
+
type: { summary: "React Component" },
|
|
65
|
+
defaultValue: { summary: undefined }
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
showRight: {
|
|
69
|
+
description: "Whether to show LinkCard's right content",
|
|
70
|
+
table: {
|
|
71
|
+
type: { summary: "boolean" },
|
|
72
|
+
defaultValue: { summary: undefined }
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
rightContent: {
|
|
76
|
+
description: "Component to render on LinkCard's right side",
|
|
77
|
+
table: {
|
|
78
|
+
type: { summary: "React Component" },
|
|
79
|
+
defaultValue: { summary: undefined }
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
href: {
|
|
83
|
+
description: "URL or path the LinkCard navigates to",
|
|
84
|
+
table: {
|
|
85
|
+
type: { summary: "string" },
|
|
86
|
+
defaultValue: { summary: "" }
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
extraStyles: {
|
|
90
|
+
description: "Extra styles to apply to the LinkCard",
|
|
91
|
+
table: {
|
|
92
|
+
type: { summary: "string" },
|
|
93
|
+
defaultValue: { summary: undefined }
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
extraActiveStyles: {
|
|
97
|
+
descripton:
|
|
98
|
+
"Extra styles to apply to the LinkCard when it is in an active state",
|
|
99
|
+
table: {
|
|
100
|
+
type: { summary: "string" },
|
|
101
|
+
defaultValue: { summary: undefined }
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
extraHoverStyles: {
|
|
105
|
+
description:
|
|
106
|
+
"Extra styles to apply to the LinkCard when it is being hovered",
|
|
107
|
+
table: {
|
|
108
|
+
type: { summary: "string" },
|
|
109
|
+
defaultValue: { summary: undefined }
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
titleVariant: {
|
|
113
|
+
description: "HTML element to use for title element, default is h3",
|
|
114
|
+
table: {
|
|
115
|
+
type: { summary: "string" },
|
|
116
|
+
defaultValue: { summary: "h3" }
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
disabled: {
|
|
120
|
+
description: "Whether the card is disabled",
|
|
121
|
+
table: {
|
|
122
|
+
type: { summary: "boolean" },
|
|
123
|
+
defaultValue: { summary: false }
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
isExternalLink: {
|
|
127
|
+
description:
|
|
128
|
+
"Whether the link associated with the LinkCard is external or not. External links have an external link icon displayed in the top right corner.",
|
|
129
|
+
table: {
|
|
130
|
+
type: { summary: "boolean" },
|
|
131
|
+
defaultValue: { summary: false }
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
export default meta;
|
|
138
|
+
|
|
139
|
+
export const BasicLinkCard = {
|
|
140
|
+
args: {
|
|
141
|
+
title: "Construction Permits",
|
|
142
|
+
subtitle: "Cityville Department of Building Inspection",
|
|
143
|
+
href: "/construction-permits"
|
|
144
|
+
},
|
|
145
|
+
render: args => {
|
|
146
|
+
return (
|
|
147
|
+
<LinkCard
|
|
148
|
+
{...args}
|
|
149
|
+
key="link-card-basic"
|
|
150
|
+
extraStyles={`transition: all .2s ease-in-out;`}
|
|
151
|
+
extraHoverStyles={`.show-on-hover {opacity: 1}`}
|
|
152
|
+
showLeft={false}
|
|
153
|
+
leftContent={
|
|
154
|
+
<Badge
|
|
155
|
+
label="Autopay Available"
|
|
156
|
+
variant={"success"}
|
|
157
|
+
Icon={() =>
|
|
158
|
+
AutopayIcon({
|
|
159
|
+
fill: SEA_GREEN
|
|
160
|
+
})
|
|
161
|
+
}
|
|
162
|
+
/>
|
|
163
|
+
}
|
|
164
|
+
showRight={true}
|
|
165
|
+
rightContent={
|
|
166
|
+
<Box
|
|
167
|
+
data-qa={`find-or-pay`}
|
|
168
|
+
extraStyles={`
|
|
169
|
+
display: flex;
|
|
170
|
+
gap: 6px;
|
|
171
|
+
justify-content: space-between;
|
|
172
|
+
align-items: center;
|
|
173
|
+
`}
|
|
174
|
+
padding="0"
|
|
175
|
+
hoverStyles=".show-on-hover {opacity: 1;}"
|
|
176
|
+
>
|
|
177
|
+
<Text
|
|
178
|
+
variant="pS"
|
|
179
|
+
className="show-on-hover"
|
|
180
|
+
color={ROYAL_BLUE_VIVID}
|
|
181
|
+
id={`workflow`}
|
|
182
|
+
extraStyles={`
|
|
183
|
+
transition: opacity .2s ease-in-out;
|
|
184
|
+
opacity: 0
|
|
185
|
+
`}
|
|
186
|
+
>
|
|
187
|
+
{"Pay"}
|
|
188
|
+
</Text>
|
|
189
|
+
<ArrowRightIcon labelledBy={`workflow`} color={ROYAL_BLUE_VIVID} />
|
|
190
|
+
</Box>
|
|
191
|
+
}
|
|
192
|
+
/>
|
|
193
|
+
);
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
export const ExternalLinkCard = {
|
|
198
|
+
args: {
|
|
199
|
+
title: "Construction Permits",
|
|
200
|
+
subtitle: "Cityville Department of Building Inspection",
|
|
201
|
+
href: "https://example.com/construction-permits"
|
|
202
|
+
},
|
|
203
|
+
render: args => {
|
|
204
|
+
return (
|
|
205
|
+
<LinkCard
|
|
206
|
+
{...args}
|
|
207
|
+
key="link-card-basic"
|
|
208
|
+
extraStyles={`transition: all .2s ease-in-out;`}
|
|
209
|
+
extraHoverStyles={`.show-on-hover {opacity: 1}`}
|
|
210
|
+
showLeft={false}
|
|
211
|
+
leftContent={
|
|
212
|
+
<Badge
|
|
213
|
+
label="Autopay Available"
|
|
214
|
+
variant={"success"}
|
|
215
|
+
Icon={() =>
|
|
216
|
+
AutopayIcon({
|
|
217
|
+
fill: SEA_GREEN
|
|
218
|
+
})
|
|
219
|
+
}
|
|
220
|
+
/>
|
|
221
|
+
}
|
|
222
|
+
showRight={true}
|
|
223
|
+
rightContent={
|
|
224
|
+
<Box
|
|
225
|
+
data-qa={`find-or-pay`}
|
|
226
|
+
extraStyles={`
|
|
227
|
+
display: flex;
|
|
228
|
+
gap: 6px;
|
|
229
|
+
justify-content: space-between;
|
|
230
|
+
align-items: center;
|
|
231
|
+
`}
|
|
232
|
+
padding="0"
|
|
233
|
+
hoverStyles=".show-on-hover {opacity: 1;}"
|
|
234
|
+
>
|
|
235
|
+
<Text
|
|
236
|
+
variant="pS"
|
|
237
|
+
className="show-on-hover"
|
|
238
|
+
color={ROYAL_BLUE_VIVID}
|
|
239
|
+
id={`workflow`}
|
|
240
|
+
extraStyles={`
|
|
241
|
+
transition: opacity .2s ease-in-out;
|
|
242
|
+
opacity: 0
|
|
243
|
+
`}
|
|
244
|
+
>
|
|
245
|
+
{"Pay"}
|
|
246
|
+
</Text>
|
|
247
|
+
<ArrowRightIcon labelledBy={`workflow`} color={ROYAL_BLUE_VIVID} />
|
|
248
|
+
</Box>
|
|
249
|
+
}
|
|
250
|
+
isExternalLink={true}
|
|
251
|
+
/>
|
|
252
|
+
);
|
|
253
|
+
}
|
|
254
|
+
};
|
|
255
|
+
|
|
256
|
+
export const GridOfLinkCards = {
|
|
257
|
+
args: {
|
|
258
|
+
title: "Water Bills - Autopay",
|
|
259
|
+
subtitle: "Cityville Water Management",
|
|
260
|
+
href: "/water-bills"
|
|
261
|
+
},
|
|
262
|
+
render: args => {
|
|
263
|
+
return (
|
|
264
|
+
<Grid columnGap="40px">
|
|
265
|
+
<LinkCard
|
|
266
|
+
{...args}
|
|
267
|
+
extraStyles={`transition: all .2s ease-in-out;`}
|
|
268
|
+
extraHoverStyles={`.show-on-hover {opacity: 1}`}
|
|
269
|
+
showLeft={true}
|
|
270
|
+
leftContent={
|
|
271
|
+
<Badge
|
|
272
|
+
label="Autopay Available"
|
|
273
|
+
variant={"success"}
|
|
274
|
+
Icon={() =>
|
|
275
|
+
AutopayIcon({
|
|
276
|
+
fill: SEA_GREEN
|
|
277
|
+
})
|
|
278
|
+
}
|
|
279
|
+
/>
|
|
280
|
+
}
|
|
281
|
+
showRight={true}
|
|
282
|
+
rightContent={
|
|
283
|
+
<Box
|
|
284
|
+
extraStyles={`
|
|
285
|
+
display: flex;
|
|
286
|
+
gap: 6px;
|
|
287
|
+
justify-content: space-between;
|
|
288
|
+
align-items: center;
|
|
289
|
+
`}
|
|
290
|
+
padding="0"
|
|
291
|
+
hoverStyles=".show-on-hover {opacity: 1;}"
|
|
292
|
+
>
|
|
293
|
+
<Text
|
|
294
|
+
variant="pS"
|
|
295
|
+
className="show-on-hover"
|
|
296
|
+
color={ROYAL_BLUE_VIVID}
|
|
297
|
+
id={`workflow-two`}
|
|
298
|
+
extraStyles={`
|
|
299
|
+
transition: opacity .2s ease-in-out;
|
|
300
|
+
opacity: 0
|
|
301
|
+
`}
|
|
302
|
+
>
|
|
303
|
+
{"Find"}
|
|
304
|
+
</Text>
|
|
305
|
+
<PlusCircleIcon
|
|
306
|
+
labelledBy={`workflow-two`}
|
|
307
|
+
color={ROYAL_BLUE_VIVID}
|
|
308
|
+
/>
|
|
309
|
+
</Box>
|
|
310
|
+
}
|
|
311
|
+
/>
|
|
312
|
+
<LinkCard
|
|
313
|
+
{...args}
|
|
314
|
+
extraStyles={`transition: all .2s ease-in-out;`}
|
|
315
|
+
extraHoverStyles={`.show-on-hover {opacity: 1}`}
|
|
316
|
+
showLeft={true}
|
|
317
|
+
leftContent={
|
|
318
|
+
<Badge
|
|
319
|
+
label="Autopay Available"
|
|
320
|
+
variant={"success"}
|
|
321
|
+
Icon={() =>
|
|
322
|
+
AutopayIcon({
|
|
323
|
+
fill: SEA_GREEN
|
|
324
|
+
})
|
|
325
|
+
}
|
|
326
|
+
/>
|
|
327
|
+
}
|
|
328
|
+
showRight={true}
|
|
329
|
+
rightContent={
|
|
330
|
+
<Box
|
|
331
|
+
extraStyles={`
|
|
332
|
+
display: flex;
|
|
333
|
+
gap: 6px;
|
|
334
|
+
justify-content: space-between;
|
|
335
|
+
align-items: center;
|
|
336
|
+
`}
|
|
337
|
+
padding="0"
|
|
338
|
+
hoverStyles=".show-on-hover {opacity: 1;}"
|
|
339
|
+
>
|
|
340
|
+
<Text
|
|
341
|
+
variant="pS"
|
|
342
|
+
className="show-on-hover"
|
|
343
|
+
color={ROYAL_BLUE_VIVID}
|
|
344
|
+
id={`workflow-two`}
|
|
345
|
+
extraStyles={`
|
|
346
|
+
transition: opacity .2s ease-in-out;
|
|
347
|
+
opacity: 0
|
|
348
|
+
`}
|
|
349
|
+
>
|
|
350
|
+
{"Find"}
|
|
351
|
+
</Text>
|
|
352
|
+
<PlusCircleIcon
|
|
353
|
+
labelledBy={`workflow-two`}
|
|
354
|
+
color={ROYAL_BLUE_VIVID}
|
|
355
|
+
/>
|
|
356
|
+
</Box>
|
|
357
|
+
}
|
|
358
|
+
/>
|
|
359
|
+
<LinkCard
|
|
360
|
+
{...args}
|
|
361
|
+
extraStyles={`transition: all .2s ease-in-out;`}
|
|
362
|
+
extraHoverStyles={`.show-on-hover {opacity: 1}`}
|
|
363
|
+
showLeft={true}
|
|
364
|
+
leftContent={
|
|
365
|
+
<Badge
|
|
366
|
+
label="Autopay Available"
|
|
367
|
+
variant={"success"}
|
|
368
|
+
Icon={() =>
|
|
369
|
+
AutopayIcon({
|
|
370
|
+
fill: SEA_GREEN
|
|
371
|
+
})
|
|
372
|
+
}
|
|
373
|
+
/>
|
|
374
|
+
}
|
|
375
|
+
showRight={true}
|
|
376
|
+
rightContent={
|
|
377
|
+
<Box
|
|
378
|
+
extraStyles={`
|
|
379
|
+
display: flex;
|
|
380
|
+
gap: 6px;
|
|
381
|
+
justify-content: space-between;
|
|
382
|
+
align-items: center;
|
|
383
|
+
`}
|
|
384
|
+
padding="0"
|
|
385
|
+
hoverStyles=".show-on-hover {opacity: 1;}"
|
|
386
|
+
>
|
|
387
|
+
<Text
|
|
388
|
+
variant="pS"
|
|
389
|
+
className="show-on-hover"
|
|
390
|
+
color={ROYAL_BLUE_VIVID}
|
|
391
|
+
id={`workflow-two`}
|
|
392
|
+
extraStyles={`
|
|
393
|
+
transition: opacity .2s ease-in-out;
|
|
394
|
+
opacity: 0
|
|
395
|
+
`}
|
|
396
|
+
>
|
|
397
|
+
{"Find"}
|
|
398
|
+
</Text>
|
|
399
|
+
<PlusCircleIcon
|
|
400
|
+
labelledBy={`workflow-two`}
|
|
401
|
+
color={ROYAL_BLUE_VIVID}
|
|
402
|
+
/>
|
|
403
|
+
</Box>
|
|
404
|
+
}
|
|
405
|
+
/>
|
|
406
|
+
</Grid>
|
|
407
|
+
);
|
|
408
|
+
}
|
|
409
|
+
};
|
|
410
|
+
|
|
411
|
+
export const CompleteLinkCard = {
|
|
412
|
+
args: {
|
|
413
|
+
title: "Water Bills - Autopay",
|
|
414
|
+
subtitle: "Cityville Water Management",
|
|
415
|
+
href: "/water-bills"
|
|
416
|
+
},
|
|
417
|
+
render: args => {
|
|
418
|
+
return (
|
|
419
|
+
<LinkCard
|
|
420
|
+
{...args}
|
|
421
|
+
extraStyles={`transition: all .2s ease-in-out;`}
|
|
422
|
+
extraHoverStyles={`.show-on-hover {opacity: 1}`}
|
|
423
|
+
showLeft={true}
|
|
424
|
+
leftContent={
|
|
425
|
+
<Badge
|
|
426
|
+
label="Autopay Available"
|
|
427
|
+
variant={"success"}
|
|
428
|
+
Icon={() =>
|
|
429
|
+
AutopayIcon({
|
|
430
|
+
fill: SEA_GREEN
|
|
431
|
+
})
|
|
432
|
+
}
|
|
433
|
+
/>
|
|
434
|
+
}
|
|
435
|
+
showRight={true}
|
|
436
|
+
rightContent={
|
|
437
|
+
<Box
|
|
438
|
+
extraStyles={`
|
|
439
|
+
display: flex;
|
|
440
|
+
gap: 6px;
|
|
441
|
+
justify-content: space-between;
|
|
442
|
+
align-items: center;
|
|
443
|
+
`}
|
|
444
|
+
padding="0"
|
|
445
|
+
hoverStyles=".show-on-hover {opacity: 1;}"
|
|
446
|
+
>
|
|
447
|
+
<Text
|
|
448
|
+
variant="pS"
|
|
449
|
+
className="show-on-hover"
|
|
450
|
+
color={ROYAL_BLUE_VIVID}
|
|
451
|
+
id={`workflow-two`}
|
|
452
|
+
extraStyles={`
|
|
453
|
+
transition: opacity .2s ease-in-out;
|
|
454
|
+
opacity: 0
|
|
455
|
+
`}
|
|
456
|
+
>
|
|
457
|
+
{"Find"}
|
|
458
|
+
</Text>
|
|
459
|
+
<PlusCircleIcon
|
|
460
|
+
labelledBy={`workflow-two`}
|
|
461
|
+
color={ROYAL_BLUE_VIVID}
|
|
462
|
+
/>
|
|
463
|
+
</Box>
|
|
464
|
+
}
|
|
465
|
+
/>
|
|
466
|
+
);
|
|
467
|
+
}
|
|
468
|
+
};
|
|
469
|
+
|
|
470
|
+
export const DisabledLinkCard = {
|
|
471
|
+
args: {
|
|
472
|
+
title: "Property Tax - Autopay",
|
|
473
|
+
subtitle: "",
|
|
474
|
+
href: "/property-tax"
|
|
475
|
+
},
|
|
476
|
+
render: args => {
|
|
477
|
+
return (
|
|
478
|
+
<LinkCard
|
|
479
|
+
{...args}
|
|
480
|
+
extraHoverStyles={`box-shadow: none; cursor: default; .show-on-hover {opacity: 0}`}
|
|
481
|
+
disabled={true}
|
|
482
|
+
showLeft={true}
|
|
483
|
+
leftContent={
|
|
484
|
+
<Badge
|
|
485
|
+
label="Autopay Available"
|
|
486
|
+
variant={"disabled"}
|
|
487
|
+
Icon={() =>
|
|
488
|
+
AutopayIcon({
|
|
489
|
+
fill: MANATEE_GREY
|
|
490
|
+
})
|
|
491
|
+
}
|
|
492
|
+
/>
|
|
493
|
+
}
|
|
494
|
+
showRight={true}
|
|
495
|
+
rightContent={
|
|
496
|
+
<Box
|
|
497
|
+
data-qa={`find-or-pay-disabled`}
|
|
498
|
+
extraStyles={`
|
|
499
|
+
display: flex;
|
|
500
|
+
gap: 6px;
|
|
501
|
+
justify-content: space-between;
|
|
502
|
+
align-items: center;
|
|
503
|
+
`}
|
|
504
|
+
padding="0"
|
|
505
|
+
hoverStyles=".show-on-hover {opacity: 1;}"
|
|
506
|
+
>
|
|
507
|
+
<Text
|
|
508
|
+
variant="pS"
|
|
509
|
+
className="show-on-hover"
|
|
510
|
+
color={COOL_GREY_05}
|
|
511
|
+
id={`workflow-disabled`}
|
|
512
|
+
extraStyles={`
|
|
513
|
+
transition: opacity .2s ease-in-out;
|
|
514
|
+
opacity: 0
|
|
515
|
+
`}
|
|
516
|
+
>
|
|
517
|
+
{"Find"}
|
|
518
|
+
</Text>
|
|
519
|
+
<PlusCircleIcon
|
|
520
|
+
labelledBy={`workflow-disabled`}
|
|
521
|
+
color={COOL_GREY_05}
|
|
522
|
+
/>
|
|
523
|
+
</Box>
|
|
524
|
+
}
|
|
525
|
+
/>
|
|
526
|
+
);
|
|
527
|
+
}
|
|
528
|
+
};
|
|
@@ -3,35 +3,42 @@ import Heading from "../../atoms/heading";
|
|
|
3
3
|
import Paragraph from "../../atoms/paragraph";
|
|
4
4
|
import Stack from "../../atoms/layouts/Stack";
|
|
5
5
|
import { Box } from "../../atoms/layouts";
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
SPACING,
|
|
8
|
+
FONT_SIZE,
|
|
9
|
+
BORDER_THIN,
|
|
10
|
+
FONT_WEIGHT_REGULAR,
|
|
11
|
+
FONT_WEIGHT_SEMIBOLD
|
|
12
|
+
} from "../../../constants/style_constants";
|
|
7
13
|
|
|
8
14
|
export const Container = styled(Box)`
|
|
9
15
|
display: flex;
|
|
10
16
|
flex-direction: column;
|
|
11
17
|
align-items: flex-start;
|
|
12
|
-
width: 100%;
|
|
13
|
-
gap: 40px;
|
|
14
|
-
flex-shrink: 0;
|
|
15
18
|
align-self: stretch;
|
|
16
19
|
border-radius: 8px;
|
|
17
|
-
|
|
20
|
+
padding: 24px;
|
|
21
|
+
${({ disabled, themeValues }) => `
|
|
18
22
|
background-color: ${
|
|
19
|
-
|
|
23
|
+
disabled
|
|
24
|
+
? themeValues.disabledBackgroundColor
|
|
25
|
+
: themeValues.backgroundColor
|
|
20
26
|
};
|
|
21
27
|
border: 1px solid ${
|
|
22
|
-
|
|
28
|
+
disabled ? themeValues.disabledBorderColor : themeValues.borderColor
|
|
23
29
|
};
|
|
24
30
|
`}
|
|
25
|
-
|
|
31
|
+
text-decoration: none;
|
|
32
|
+
transition: all 0.2s ease-in-out;
|
|
26
33
|
|
|
27
|
-
${({
|
|
28
|
-
|
|
34
|
+
${({ disabled, themeValues }) =>
|
|
35
|
+
disabled
|
|
29
36
|
? `
|
|
30
37
|
&:hover,
|
|
31
38
|
&:active {
|
|
32
39
|
cursor: default;
|
|
33
40
|
box-shadow: none;
|
|
34
|
-
border: 1px solid ${
|
|
41
|
+
border: 1px solid ${themeValues.disabledBorderColor};
|
|
35
42
|
}
|
|
36
43
|
`
|
|
37
44
|
: `
|
|
@@ -47,12 +54,12 @@ export const Container = styled(Box)`
|
|
|
47
54
|
}
|
|
48
55
|
|
|
49
56
|
&:hover:not(:active) {
|
|
50
|
-
border: 1px solid ${
|
|
57
|
+
border: 1px solid ${themeValues.borderColor};
|
|
51
58
|
}
|
|
52
59
|
|
|
53
60
|
&:active {
|
|
54
|
-
background-color: ${
|
|
55
|
-
border:
|
|
61
|
+
background-color: ${themeValues.activeBackgroundColor};
|
|
62
|
+
border: ${BORDER_THIN} solid ${themeValues.borderColor};
|
|
56
63
|
}
|
|
57
64
|
`}
|
|
58
65
|
`;
|
|
@@ -64,12 +71,12 @@ export const Title = styled(Heading)`
|
|
|
64
71
|
align-self: stretch;
|
|
65
72
|
overflow: hidden;
|
|
66
73
|
text-overflow: ellipsis;
|
|
67
|
-
font-size:
|
|
74
|
+
font-size: ${FONT_SIZE.MD};
|
|
68
75
|
line-height: 150%;
|
|
69
76
|
background-color: transparent;
|
|
70
77
|
font-weight: ${FONT_WEIGHT_SEMIBOLD};
|
|
71
|
-
${({
|
|
72
|
-
`color: ${
|
|
78
|
+
${({ disabled, themeValues }) =>
|
|
79
|
+
`color: ${disabled ? themeValues.disabledColor : themeValues.color};`};
|
|
73
80
|
`;
|
|
74
81
|
|
|
75
82
|
export const Subtitle = styled(Paragraph)`
|
|
@@ -79,12 +86,12 @@ export const Subtitle = styled(Paragraph)`
|
|
|
79
86
|
-webkit-box-orient: vertical;
|
|
80
87
|
-webkit-line-clamp: 2;
|
|
81
88
|
align-self: stretch;
|
|
82
|
-
font-size:
|
|
89
|
+
font-size: ${FONT_SIZE.SM};
|
|
83
90
|
line-height: 150%;
|
|
84
91
|
letter-spacing: 0.14px;
|
|
85
|
-
font-weight: ${
|
|
86
|
-
${({
|
|
87
|
-
`color: ${
|
|
92
|
+
font-weight: ${FONT_WEIGHT_REGULAR};
|
|
93
|
+
${({ disabled, themeValues }) =>
|
|
94
|
+
`color: ${disabled ? themeValues.disabledColor : themeValues.textColor};`};
|
|
88
95
|
`;
|
|
89
96
|
|
|
90
97
|
export const Footer = styled(Stack)`
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CORNFLOWER_BLUE,
|
|
3
3
|
LINK_WATER,
|
|
4
|
-
MOON_RAKER,
|
|
5
4
|
ROYAL_BLUE_VIVID,
|
|
6
5
|
MANATEE_GREY,
|
|
7
6
|
GHOST_GREY,
|
|
8
|
-
TRANSPARENT
|
|
7
|
+
TRANSPARENT,
|
|
8
|
+
BRIGHT_GREY
|
|
9
9
|
} from "../../../constants/colors";
|
|
10
10
|
|
|
11
11
|
const disabledBackgroundColor = TRANSPARENT;
|
|
@@ -13,8 +13,9 @@ const disabledBorderColor = GHOST_GREY;
|
|
|
13
13
|
const disabledColor = MANATEE_GREY;
|
|
14
14
|
const activeBackgroundColor = CORNFLOWER_BLUE;
|
|
15
15
|
const backgroundColor = LINK_WATER;
|
|
16
|
-
const borderColor =
|
|
16
|
+
const borderColor = MANATEE_GREY;
|
|
17
17
|
const color = ROYAL_BLUE_VIVID;
|
|
18
|
+
const textColor = BRIGHT_GREY;
|
|
18
19
|
|
|
19
20
|
export const fallbackValues = {
|
|
20
21
|
disabledBackgroundColor,
|
|
@@ -23,5 +24,6 @@ export const fallbackValues = {
|
|
|
23
24
|
activeBackgroundColor,
|
|
24
25
|
backgroundColor,
|
|
25
26
|
borderColor,
|
|
26
|
-
color
|
|
27
|
+
color,
|
|
28
|
+
textColor
|
|
27
29
|
};
|
|
@@ -10,11 +10,13 @@ export interface LinkCardProps {
|
|
|
10
10
|
leftContent?: JSX.Element;
|
|
11
11
|
showRight?: boolean;
|
|
12
12
|
rightContent?: JSX.Element;
|
|
13
|
-
|
|
13
|
+
href: string;
|
|
14
14
|
extraHoverStyles?: string;
|
|
15
15
|
extraStyles?: string;
|
|
16
16
|
extraActiveStyles?: string;
|
|
17
17
|
titleVariant?: string;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
isExternalLink?: boolean;
|
|
18
20
|
}
|
|
19
21
|
|
|
20
22
|
export const LinkCard: React.FC<Expand<LinkCardProps> &
|
|
@@ -15,7 +15,8 @@ const LoginForm = ({
|
|
|
15
15
|
}
|
|
16
16
|
const emailErrorMessages = {
|
|
17
17
|
[required.error]: "Email address is required",
|
|
18
|
-
[isProbablyEmail.error]:
|
|
18
|
+
[isProbablyEmail.error]:
|
|
19
|
+
"Please enter a valid email address in the format user@example.com"
|
|
19
20
|
};
|
|
20
21
|
const passwordErrorMessages = {
|
|
21
22
|
[required.error]: "Password is required"
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Canvas, Meta, Title, Story, Controls } from '@storybook/blocks';
|
|
2
|
+
|
|
3
|
+
import * as LoginFormStories from './LoginForm.stories.js';
|
|
4
|
+
|
|
5
|
+
<Meta of={LoginFormStories} />
|
|
6
|
+
|
|
7
|
+
<Title />
|
|
8
|
+
|
|
9
|
+
Renders a form for users to login to the NFE User Profile. Built with [FormInput](?path=/docs/atoms-form-layouts-forminput--docs).
|
|
10
|
+
|
|
11
|
+
The user is required to submit an email and password. Both inputs are validated as required inputs, while the email is also checked against the `isProbablyEmail` validator.
|
|
12
|
+
|
|
13
|
+
<Controls />
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
<Story />
|