@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,28 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { text, select, boolean } from "@storybook/addon-knobs";
|
|
3
|
-
import Alert from "./Alert";
|
|
4
|
-
import page from "../../../../.storybook/page";
|
|
5
|
-
|
|
6
|
-
const variantsLabel = "variant";
|
|
7
|
-
const variants = {
|
|
8
|
-
info: "info",
|
|
9
|
-
warn: "warn",
|
|
10
|
-
error: "error",
|
|
11
|
-
success: "success"
|
|
12
|
-
};
|
|
13
|
-
const defaultValue = "info";
|
|
14
|
-
const groupId = "props";
|
|
15
|
-
|
|
16
|
-
export const alert = () => (
|
|
17
|
-
<Alert
|
|
18
|
-
variant={select(variantsLabel, variants, defaultValue, groupId)}
|
|
19
|
-
text={text("text", "Alert Bar", "props")}
|
|
20
|
-
showQuitLink={boolean("showQuitLink", true, "props")}
|
|
21
|
-
/>
|
|
22
|
-
);
|
|
23
|
-
|
|
24
|
-
const story = page({
|
|
25
|
-
title: "Components|Atoms/Alert",
|
|
26
|
-
Component: Alert
|
|
27
|
-
});
|
|
28
|
-
export default story;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { text, select } from "@storybook/addon-knobs";
|
|
3
|
-
import Badge from "./Badge";
|
|
4
|
-
import page from "../../../../.storybook/page";
|
|
5
|
-
import AutopayIcon from "../icons/AutopayIcon";
|
|
6
|
-
|
|
7
|
-
const variantsLabel = "variants";
|
|
8
|
-
const variants = {
|
|
9
|
-
info: "info",
|
|
10
|
-
warn: "warn",
|
|
11
|
-
primary: "primary",
|
|
12
|
-
success: "success",
|
|
13
|
-
disabled: "disabled"
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
const defaultValue = "success";
|
|
17
|
-
const groupId = "props";
|
|
18
|
-
const labelLabel = "label";
|
|
19
|
-
const iconLabel = "Icon";
|
|
20
|
-
|
|
21
|
-
export const badge = () => (
|
|
22
|
-
<Badge
|
|
23
|
-
variant={select(variantsLabel, variants, defaultValue, groupId)}
|
|
24
|
-
label={text(labelLabel, "Autopay Available", groupId)}
|
|
25
|
-
Icon={text(iconLabel, AutopayIcon, groupId)}
|
|
26
|
-
/>
|
|
27
|
-
);
|
|
28
|
-
|
|
29
|
-
const story = page({
|
|
30
|
-
title: "Components|Atoms/Badge",
|
|
31
|
-
Component: Badge
|
|
32
|
-
});
|
|
33
|
-
export default story;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { object } from "@storybook/addon-knobs";
|
|
3
|
-
import Breadcrumb from "./Breadcrumb";
|
|
4
|
-
import page from "../../../../.storybook/page";
|
|
5
|
-
|
|
6
|
-
const labelInactive = "Inactive Breadcrumb";
|
|
7
|
-
const defaultInactiveValue = {
|
|
8
|
-
linkText: "Home",
|
|
9
|
-
linkDestination: location.pathname,
|
|
10
|
-
isActive: false
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
const labelActive = "Active Breadcrumb";
|
|
14
|
-
const defaultActiveValue = {
|
|
15
|
-
linkText: "Page",
|
|
16
|
-
linkDestination: location.pathname,
|
|
17
|
-
isActive: true
|
|
18
|
-
};
|
|
19
|
-
const groupId = "props";
|
|
20
|
-
|
|
21
|
-
export const breadcrumb = () => (
|
|
22
|
-
<Breadcrumb
|
|
23
|
-
breadcrumbsList={[
|
|
24
|
-
{
|
|
25
|
-
...object(labelInactive, defaultInactiveValue, groupId)
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
...object(labelActive, defaultActiveValue, groupId)
|
|
29
|
-
}
|
|
30
|
-
]}
|
|
31
|
-
/>
|
|
32
|
-
);
|
|
33
|
-
|
|
34
|
-
const story = page({
|
|
35
|
-
title: "Components|Atoms/Breadcrumb",
|
|
36
|
-
Component: Breadcrumb
|
|
37
|
-
});
|
|
38
|
-
export default story;
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import React, { Fragment, useState } from "react";
|
|
2
|
-
import { text, select, boolean } from "@storybook/addon-knobs";
|
|
3
|
-
import { Box } from "../layouts";
|
|
4
|
-
import ButtonWithAction from "./ButtonWithAction";
|
|
5
|
-
import page from "../../../../.storybook/page";
|
|
6
|
-
|
|
7
|
-
const variantsLabel = "variant";
|
|
8
|
-
const variants = {
|
|
9
|
-
primary: "primary",
|
|
10
|
-
secondary: "secondary",
|
|
11
|
-
back: "back",
|
|
12
|
-
smallPrimary: "smallPrimary",
|
|
13
|
-
smallSecondary: "smallSecondary",
|
|
14
|
-
ghost: "ghost",
|
|
15
|
-
smallGhost: "smallGhost",
|
|
16
|
-
tertiary: "tertiary",
|
|
17
|
-
danger: "danger",
|
|
18
|
-
dangerSecondary: "dangerSecondary",
|
|
19
|
-
whiteSecondary: "whiteSecondary",
|
|
20
|
-
whitePrimary: "whitePrimary",
|
|
21
|
-
None: undefined
|
|
22
|
-
};
|
|
23
|
-
const defaultValue = "primary";
|
|
24
|
-
const groupId = "props";
|
|
25
|
-
|
|
26
|
-
const buttonHandler = () => window.alert("Button click!");
|
|
27
|
-
|
|
28
|
-
export const buttonWithAction = () => (
|
|
29
|
-
<Fragment>
|
|
30
|
-
{/* Uncomment to view buttons on a dark background */}
|
|
31
|
-
{/* <Box extraStyles="background-color: #000;">
|
|
32
|
-
<ButtonWithAction
|
|
33
|
-
variant={select(variantsLabel, variants, defaultValue, groupId)}
|
|
34
|
-
disabled={boolean("disabled", false, "props")}
|
|
35
|
-
text={text("text", "button", "props")}
|
|
36
|
-
isLoading={boolean("isLoading", false, "props")}
|
|
37
|
-
action={text("action", buttonHandler, "props")}
|
|
38
|
-
/>
|
|
39
|
-
</Box> */}
|
|
40
|
-
<Box extraStyles="background-color: #fff;">
|
|
41
|
-
<ButtonWithAction
|
|
42
|
-
variant={select(variantsLabel, variants, defaultValue, groupId)}
|
|
43
|
-
disabled={boolean("disabled", false, "props")}
|
|
44
|
-
text={text("text", "button", "props")}
|
|
45
|
-
isLoading={boolean("isLoading", false, "props")}
|
|
46
|
-
action={text("action", buttonHandler, "props")}
|
|
47
|
-
/>
|
|
48
|
-
</Box>
|
|
49
|
-
</Fragment>
|
|
50
|
-
);
|
|
51
|
-
|
|
52
|
-
const story = page({
|
|
53
|
-
title: "Components|Atoms/ButtonWithAction",
|
|
54
|
-
Component: ButtonWithAction
|
|
55
|
-
});
|
|
56
|
-
export default story;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { text, select, boolean } from "@storybook/addon-knobs";
|
|
3
|
-
import ButtonWithLink from "./ButtonWithLink";
|
|
4
|
-
import page from "../../../../.storybook/page";
|
|
5
|
-
|
|
6
|
-
const variants = {
|
|
7
|
-
primary: "primary",
|
|
8
|
-
secondary: "secondary",
|
|
9
|
-
back: "back",
|
|
10
|
-
smallPrimary: "smallPrimary",
|
|
11
|
-
smallSecondary: "smallSecondary",
|
|
12
|
-
ghost: "ghost",
|
|
13
|
-
smallGhost: "smallGhost",
|
|
14
|
-
danger: "danger",
|
|
15
|
-
None: undefined
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export const buttonWithLink = () => (
|
|
19
|
-
<ButtonWithLink
|
|
20
|
-
variant={select("variant", variants, "primary", "props")}
|
|
21
|
-
url={text("url", "/login", "props")}
|
|
22
|
-
disabled={boolean("disabled", false, "props")}
|
|
23
|
-
extraStyles={text("extraStyles", "", "props")}
|
|
24
|
-
text={text("text", "Lorem", "props")}
|
|
25
|
-
/>
|
|
26
|
-
);
|
|
27
|
-
|
|
28
|
-
const story = page({
|
|
29
|
-
title: "Components|Atoms/ButtonWithLink",
|
|
30
|
-
Component: ButtonWithLink
|
|
31
|
-
});
|
|
32
|
-
export default story;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { connect } from "react-redux";
|
|
3
|
-
import { createFormState, required } from "redux-freeform";
|
|
4
|
-
import { Box } from "../../atoms/layouts";
|
|
5
|
-
import CountryDropdown from "./CountryDropdown";
|
|
6
|
-
import { options } from "./options";
|
|
7
|
-
import page from "../../../../.storybook/page";
|
|
8
|
-
|
|
9
|
-
const { mapStateToProps, mapDispatchToProps, reducer } = createFormState({
|
|
10
|
-
country: {
|
|
11
|
-
validators: [required()]
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
const errorMessages = {
|
|
15
|
-
[required.error]: "country is required"
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
const story = page({
|
|
19
|
-
title: "Components|Atoms/CountryDropdown",
|
|
20
|
-
Component: CountryDropdown,
|
|
21
|
-
reducer,
|
|
22
|
-
mapStateToProps,
|
|
23
|
-
mapDispatchToProps
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
const CountryFormWrapper = ({ fields, actions }) => (
|
|
27
|
-
<Box minHeight="300px">
|
|
28
|
-
<CountryDropdown
|
|
29
|
-
errorMessages={errorMessages}
|
|
30
|
-
options={options}
|
|
31
|
-
field={fields.country}
|
|
32
|
-
fieldActions={actions.fields.country}
|
|
33
|
-
/>
|
|
34
|
-
</Box>
|
|
35
|
-
);
|
|
36
|
-
|
|
37
|
-
export default story;
|
|
38
|
-
const ConnectedForm = connect(
|
|
39
|
-
mapStateToProps,
|
|
40
|
-
mapDispatchToProps
|
|
41
|
-
)(CountryFormWrapper);
|
|
42
|
-
export const countryDropdown = () => <ConnectedForm />;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { boolean } from "@storybook/addon-knobs";
|
|
3
|
-
import DisplayBox from "./DisplayBox";
|
|
4
|
-
import FormattedAddress from "../formatted-address";
|
|
5
|
-
import page from "../../../../.storybook/page";
|
|
6
|
-
|
|
7
|
-
export const displayBox = () => (
|
|
8
|
-
<DisplayBox showError={boolean("showError", false, "props")}>
|
|
9
|
-
<FormattedAddress
|
|
10
|
-
qaPrefix="billing-info"
|
|
11
|
-
name="Citybase"
|
|
12
|
-
street1="30 North Lasalle"
|
|
13
|
-
city="Chicago"
|
|
14
|
-
country="USA"
|
|
15
|
-
stateProvince="Illinois"
|
|
16
|
-
zip="60606"
|
|
17
|
-
/>
|
|
18
|
-
</DisplayBox>
|
|
19
|
-
);
|
|
20
|
-
|
|
21
|
-
const story = page({
|
|
22
|
-
title: "Components|Atoms/DisplayBox",
|
|
23
|
-
Component: DisplayBox
|
|
24
|
-
});
|
|
25
|
-
export default story;
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import React, { Fragment } from "react";
|
|
2
|
-
import Stack from "../layouts/Stack";
|
|
3
|
-
import Box from "../layouts/Box";
|
|
4
|
-
import Text from "../text";
|
|
5
|
-
import Paragraph from "../paragraph";
|
|
6
|
-
import Cluster from "../layouts/Cluster";
|
|
7
|
-
import ButtonWithAction from "../button-with-action";
|
|
8
|
-
import ButtonWithLink from "../button-with-link";
|
|
9
|
-
import { WHITE, CHARADE_GREY, STORM_GREY } from "../../../constants/colors";
|
|
10
|
-
import Popover from "../../molecules/popover";
|
|
11
|
-
|
|
12
|
-
const DisplayCard = ({
|
|
13
|
-
title,
|
|
14
|
-
item,
|
|
15
|
-
buttonText,
|
|
16
|
-
buttonAction,
|
|
17
|
-
url,
|
|
18
|
-
link = false,
|
|
19
|
-
helpText,
|
|
20
|
-
hasPopover = false,
|
|
21
|
-
popoverTriggerText = "",
|
|
22
|
-
popoverContent = "",
|
|
23
|
-
popoverExtraStyles,
|
|
24
|
-
popoverTextExtraStyles
|
|
25
|
-
}) => (
|
|
26
|
-
<Box padding="0 0 16px">
|
|
27
|
-
<Stack childGap="0rem">
|
|
28
|
-
<Box padding="0 0 8px 0">
|
|
29
|
-
<Cluster justify="space-between" align="center" overflow>
|
|
30
|
-
<Paragraph
|
|
31
|
-
variant="pL"
|
|
32
|
-
color={CHARADE_GREY}
|
|
33
|
-
extraStyles={`letter-spacing: 0.29px`}
|
|
34
|
-
>
|
|
35
|
-
{title}
|
|
36
|
-
</Paragraph>
|
|
37
|
-
{hasPopover && (
|
|
38
|
-
<Popover
|
|
39
|
-
triggerText={popoverTriggerText}
|
|
40
|
-
content={popoverContent}
|
|
41
|
-
popoverExtraStyles={popoverExtraStyles}
|
|
42
|
-
popoverTextExtraStyles={popoverTextExtraStyles}
|
|
43
|
-
/>
|
|
44
|
-
)}
|
|
45
|
-
</Cluster>
|
|
46
|
-
</Box>
|
|
47
|
-
<Box padding="0">
|
|
48
|
-
<Box
|
|
49
|
-
padding="24px"
|
|
50
|
-
borderSize="1px"
|
|
51
|
-
borderRadius="4px"
|
|
52
|
-
background={WHITE}
|
|
53
|
-
boxShadow="0px 2px 14px 0px rgb(246, 246, 249),
|
|
54
|
-
0px 3px 8px 0px rgb(202, 206, 216)"
|
|
55
|
-
>
|
|
56
|
-
<Cluster justify="space-between" align="center">
|
|
57
|
-
<Text color={CHARADE_GREY}>{item}</Text>
|
|
58
|
-
{link ? (
|
|
59
|
-
<ButtonWithLink
|
|
60
|
-
text={buttonText}
|
|
61
|
-
url={url}
|
|
62
|
-
variant="smallGhost"
|
|
63
|
-
dataQa={buttonText}
|
|
64
|
-
extraStyles={`min-width: 0;`}
|
|
65
|
-
/>
|
|
66
|
-
) : buttonAction ? (
|
|
67
|
-
<ButtonWithAction
|
|
68
|
-
text={buttonText}
|
|
69
|
-
action={buttonAction}
|
|
70
|
-
variant="smallGhost"
|
|
71
|
-
dataQa={buttonText}
|
|
72
|
-
extraStyles={`min-width: 0;`}
|
|
73
|
-
/>
|
|
74
|
-
) : helpText ? (
|
|
75
|
-
<Text color={STORM_GREY} extraStyles={`font-style: italic;`}>
|
|
76
|
-
{helpText}
|
|
77
|
-
</Text>
|
|
78
|
-
) : (
|
|
79
|
-
<Fragment />
|
|
80
|
-
)}
|
|
81
|
-
</Cluster>
|
|
82
|
-
</Box>
|
|
83
|
-
</Box>
|
|
84
|
-
</Stack>
|
|
85
|
-
</Box>
|
|
86
|
-
);
|
|
87
|
-
|
|
88
|
-
export default DisplayCard;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { text, boolean } from "@storybook/addon-knobs";
|
|
3
|
-
|
|
4
|
-
import DisplayCard from "./DisplayCard";
|
|
5
|
-
import page from "../../../../.storybook/page";
|
|
6
|
-
|
|
7
|
-
const story = page({
|
|
8
|
-
title: "Components|Atoms/DisplayCard",
|
|
9
|
-
Component: DisplayCard
|
|
10
|
-
});
|
|
11
|
-
export default story;
|
|
12
|
-
|
|
13
|
-
export const displayCard = () => (
|
|
14
|
-
<DisplayCard
|
|
15
|
-
title={text("title", "Title", "props")}
|
|
16
|
-
buttonText={text("buttonText", "Lorem", "props")}
|
|
17
|
-
url={text("url", "http://google.com", "props")}
|
|
18
|
-
link={boolean("link", false, "props")}
|
|
19
|
-
buttonAction={text("buttonAction", () => {}, "props")}
|
|
20
|
-
item={text("item", "Foo", "props")}
|
|
21
|
-
>
|
|
22
|
-
{text("children", "Lorem Ipsum", "props")}
|
|
23
|
-
</DisplayCard>
|
|
24
|
-
);
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import React, { useState, useEffect } from "react";
|
|
2
|
-
import Dropdown from "./Dropdown";
|
|
3
|
-
import page from "../../../../.storybook/page";
|
|
4
|
-
|
|
5
|
-
const options = [
|
|
6
|
-
{ text: "Please select an option", value: "" },
|
|
7
|
-
{ text: "OPTION_1", value: "OPTION_1" },
|
|
8
|
-
{ text: "OPTION_2", value: "OPTION_2" },
|
|
9
|
-
{ text: "DISABLED_OPTION", value: "DISABLED_OPTION" }
|
|
10
|
-
];
|
|
11
|
-
|
|
12
|
-
const disabledValues = ["DISABLED_OPTION"];
|
|
13
|
-
|
|
14
|
-
export const dropdown = () => {
|
|
15
|
-
const [isOpen, setOpen] = useState(false);
|
|
16
|
-
const [value, setValue] = useState(null);
|
|
17
|
-
const [isError, setError] = useState(false);
|
|
18
|
-
|
|
19
|
-
useEffect(() => {
|
|
20
|
-
if (value === options[0].value) {
|
|
21
|
-
setError(true);
|
|
22
|
-
} else {
|
|
23
|
-
setError(false);
|
|
24
|
-
}
|
|
25
|
-
}, [value]);
|
|
26
|
-
|
|
27
|
-
return (
|
|
28
|
-
<Dropdown
|
|
29
|
-
placeholder={options[0].text}
|
|
30
|
-
options={options}
|
|
31
|
-
disabledValues={disabledValues}
|
|
32
|
-
value={value}
|
|
33
|
-
isOpen={isOpen}
|
|
34
|
-
isError={isError}
|
|
35
|
-
onSelect={setValue}
|
|
36
|
-
onClick={() => setOpen(!isOpen)}
|
|
37
|
-
/>
|
|
38
|
-
);
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
const story = page({
|
|
42
|
-
title: "Components|Atoms/Dropdown",
|
|
43
|
-
Component: Dropdown,
|
|
44
|
-
height: "500px"
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
export default story;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { connect } from "react-redux";
|
|
3
|
-
import { text } from "@storybook/addon-knobs";
|
|
4
|
-
import { createFormState, required } from "redux-freeform";
|
|
5
|
-
|
|
6
|
-
import FormSelect from "./FormSelect";
|
|
7
|
-
import page from "../../../../.storybook/page";
|
|
8
|
-
|
|
9
|
-
const { mapStateToProps, mapDispatchToProps, reducer } = createFormState({
|
|
10
|
-
thing: {
|
|
11
|
-
validators: [required()]
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
const errorMessages = {
|
|
15
|
-
[required.error]: "thing is required"
|
|
16
|
-
};
|
|
17
|
-
const options = [
|
|
18
|
-
{ value: "", text: "choose name" },
|
|
19
|
-
{ value: "foo", text: "foo" },
|
|
20
|
-
{ value: "bar", text: "bar" },
|
|
21
|
-
{ value: "baz", text: "baz" },
|
|
22
|
-
{ value: "disabled", text: "disabled" }
|
|
23
|
-
];
|
|
24
|
-
|
|
25
|
-
const story = page({
|
|
26
|
-
title: "Components|Atoms/FormSelect",
|
|
27
|
-
Component: FormSelect,
|
|
28
|
-
reducer,
|
|
29
|
-
mapStateToProps,
|
|
30
|
-
mapDispatchToProps,
|
|
31
|
-
height: "500px"
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
const FormWrapper = props => (
|
|
35
|
-
<FormSelect
|
|
36
|
-
autocompleteValue={props.autocompleteValue}
|
|
37
|
-
labelTextWhenNoError="Form Select"
|
|
38
|
-
errorMessages={errorMessages}
|
|
39
|
-
options={options}
|
|
40
|
-
field={props.fields.thing}
|
|
41
|
-
fieldActions={props.actions.fields.thing}
|
|
42
|
-
disabledValues={["disabled"]}
|
|
43
|
-
/>
|
|
44
|
-
);
|
|
45
|
-
|
|
46
|
-
export default story;
|
|
47
|
-
const ConnectedForm = connect(mapStateToProps, mapDispatchToProps)(FormWrapper);
|
|
48
|
-
export const formSelect = () => (
|
|
49
|
-
<ConnectedForm autocompleteValue={text("autocompleteValue", null, "props")} />
|
|
50
|
-
);
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { select, text } from "@storybook/addon-knobs";
|
|
3
|
-
import FormattedAddress from "./FormattedAddress";
|
|
4
|
-
import page from "../../../../.storybook/page";
|
|
5
|
-
|
|
6
|
-
const variantsLabel = "variant";
|
|
7
|
-
const variants = {
|
|
8
|
-
default: "default",
|
|
9
|
-
radio: "radio",
|
|
10
|
-
None: undefined
|
|
11
|
-
};
|
|
12
|
-
const defaultValue = "default";
|
|
13
|
-
const groupId = "props";
|
|
14
|
-
|
|
15
|
-
export const formattedAddress = () => (
|
|
16
|
-
<FormattedAddress
|
|
17
|
-
variant={select(variantsLabel, variants, defaultValue, groupId)}
|
|
18
|
-
street1={text("street1", "30 North Lasalle", groupId)}
|
|
19
|
-
city={text("city", "Chicago", groupId)}
|
|
20
|
-
stateProvince={text("stateProvince", "Illinois", groupId)}
|
|
21
|
-
country={text("country", "USA", groupId)}
|
|
22
|
-
zip={text("zip", "60606", groupId)}
|
|
23
|
-
street2={text("street2", "", groupId)}
|
|
24
|
-
name={text("name", "Citybase", groupId)}
|
|
25
|
-
/>
|
|
26
|
-
);
|
|
27
|
-
|
|
28
|
-
const story = page({
|
|
29
|
-
title: "Components|Atoms/FormattedAddress",
|
|
30
|
-
Component: FormattedAddress
|
|
31
|
-
});
|
|
32
|
-
export default story;
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
|
|
3
|
-
const NoPaymentResultsIcon = () => {
|
|
4
|
-
return (
|
|
5
|
-
<svg
|
|
6
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
7
|
-
width="366"
|
|
8
|
-
height="209"
|
|
9
|
-
viewBox="0 0 366 209"
|
|
10
|
-
>
|
|
11
|
-
<g fill="none" fillRule="evenodd" stroke="none" strokeWidth="1">
|
|
12
|
-
<g transform="translate(-537 -466)">
|
|
13
|
-
<g transform="translate(132 332)">
|
|
14
|
-
<g transform="translate(405 134)">
|
|
15
|
-
<path
|
|
16
|
-
fill="#FFF"
|
|
17
|
-
d="M73 25h224v144.75a2.25 2.25 0 01-2.25 2.25H75.25a2.25 2.25 0 01-2.25-2.25V25z"
|
|
18
|
-
></path>
|
|
19
|
-
<path
|
|
20
|
-
fill="#E4F4FD"
|
|
21
|
-
d="M220 47.5c14.084 0 25.5 11.416 25.5 25.5 0 14.083-11.416 25.5-25.5 25.5S194.5 87.083 194.5 73c0-14.084 11.416-25.5 25.5-25.5zm-70 0c14.084 0 25.5 11.416 25.5 25.5 0 14.083-11.416 25.5-25.5 25.5-14.083 0-25.5-11.417-25.5-25.5 0-14.084 11.417-25.5 25.5-25.5zM220.001 68c-4.206 0-7.903 2.689-9.348 6.641a2.5 2.5 0 004.634 1.87l.062-.152.083-.214c.786-1.896 2.574-3.145 4.57-3.145 1.994 0 3.782 1.249 4.568 3.145l.083.214.061.152a2.5 2.5 0 004.635-1.87C227.903 70.69 224.208 68 220 68zM150 68c-4.206 0-7.902 2.685-9.346 6.632a2.506 2.506 0 001.497 3.215 2.512 2.512 0 003.158-1.342l.061-.153.083-.212c.781-1.884 2.562-3.126 4.547-3.126 1.986 0 3.767 1.242 4.55 3.127l.082.212.062.153a2.512 2.512 0 003.158 1.34 2.506 2.506 0 001.496-3.215c-1.445-3.946-5.141-6.631-9.348-6.631z"
|
|
22
|
-
></path>
|
|
23
|
-
<path
|
|
24
|
-
fill="#E8FFEF"
|
|
25
|
-
d="M237 197c0 6.627-23.281 12-52 12-28.718 0-52-5.373-52-12s23.282-12 52-12c28.719 0 52 5.373 52 12"
|
|
26
|
-
></path>
|
|
27
|
-
<path
|
|
28
|
-
fill="#292A33"
|
|
29
|
-
fillRule="nonzero"
|
|
30
|
-
d="M294.625 0A6.376 6.376 0 01301 6.377V157h19a3 3 0 01.176 5.995L320 163h-19v6.623a6.376 6.376 0 01-6.375 6.377H75.374A6.375 6.375 0 0169 169.623V163H33a3 3 0 01-.176-5.995L33 157h36V6.377A6.375 6.375 0 0175.374 0h219.251zM297 25H73v144.623c0 1.259.976 2.288 2.211 2.372l.163.005h219.251a2.376 2.376 0 002.37-2.214l.005-.163V25zm39.953 132l26.112.082a2.952 2.952 0 012.935 2.969 2.953 2.953 0 01-2.78 2.945l-.173.004-26.112-.082a2.952 2.952 0 01-2.935-2.969 2.953 2.953 0 012.78-2.945l.173-.004zM17 157a3 3 0 01.176 5.995L17 163H3a3 3 0 01-.176-5.995L3 157h14zm179.832-42l.26.004c4.66.134 8.422 3.878 8.422 8.51a2.515 2.515 0 01-5.023.166l-.006-.166-.005-.183c-.096-1.763-1.573-3.2-3.446-3.297l-.202-.005h-23.664l-.196.005c-1.873.094-3.352 1.528-3.452 3.29l-.006.19-.005.166a2.515 2.515 0 01-5.023-.166c0-4.632 3.761-8.376 8.422-8.51l.26-.004h23.664zm23.169-72.5c16.845 0 30.499 13.654 30.499 30.5 0 16.845-13.655 30.5-30.5 30.5S189.5 89.845 189.5 73c0-.335.005-.668.016-1h-9.032l.012.499.004.5c0 16.846-13.655 30.501-30.5 30.501S119.5 89.845 119.5 73s13.655-30.5 30.5-30.5c10.22 0 19.266 5.026 24.8 12.742 3.73-1.495 7.226-2.242 10.491-2.242 3.304 0 6.593.765 9.87 2.296C200.69 47.55 209.755 42.5 220 42.5zm0 5C205.916 47.5 194.5 58.916 194.5 73c0 14.083 11.416 25.5 25.5 25.5s25.5-11.417 25.5-25.5c0-14.084-11.416-25.5-25.5-25.5zm-70 0C135.917 47.5 124.5 58.916 124.5 73c0 14.083 11.417 25.5 25.5 25.5 14.084 0 25.5-11.417 25.5-25.5 0-14.084-11.416-25.5-25.5-25.5zM185 59a3 3 0 100 6.002 3 3 0 000-6.002zM294.626 4H75.374a2.375 2.375 0 00-2.369 2.214L73 6.377V21h224V6.377a2.376 2.376 0 00-2.212-2.372L294.625 4zM81.5 10a2.5 2.5 0 110 5 2.5 2.5 0 010-5zm8 0a2.5 2.5 0 110 5 2.5 2.5 0 010-5zm8 0a2.5 2.5 0 110 5 2.5 2.5 0 010-5z"
|
|
31
|
-
></path>
|
|
32
|
-
<path
|
|
33
|
-
fill="#959CA8"
|
|
34
|
-
fillRule="nonzero"
|
|
35
|
-
d="M220.001 68c4.207 0 7.902 2.689 9.348 6.641a2.5 2.5 0 01-4.635 1.87l-.061-.152C223.916 74.343 222.07 73 220 73c-1.995 0-3.783 1.25-4.57 3.145l-.082.214a2.5 2.5 0 01-4.696-1.718C212.098 70.69 215.795 68 220 68zM150 68c4.207 0 7.903 2.685 9.348 6.631a2.506 2.506 0 01-1.496 3.216 2.512 2.512 0 01-3.158-1.34l-.062-.154c-.734-2.003-2.572-3.339-4.632-3.339-1.985 0-3.766 1.242-4.547 3.126l-.083.212a2.511 2.511 0 01-3.22 1.495 2.506 2.506 0 01-1.496-3.215C142.097 70.685 145.793 68 150 68z"
|
|
36
|
-
></path>
|
|
37
|
-
<path
|
|
38
|
-
fill="#E4E6EB"
|
|
39
|
-
d="M294.75 4A2.25 2.25 0 01297 6.25V21H73V6.25A2.25 2.25 0 0175.25 4zM81.5 10a2.5 2.5 0 100 5 2.5 2.5 0 000-5zm8 0a2.5 2.5 0 100 5 2.5 2.5 0 000-5zm8 0a2.5 2.5 0 100 5 2.5 2.5 0 000-5z"
|
|
40
|
-
></path>
|
|
41
|
-
<path
|
|
42
|
-
fill="#317D4F"
|
|
43
|
-
fillRule="nonzero"
|
|
44
|
-
d="M182 176v20a4 4 0 01-3.8 3.995l-.2.005h-14a4 4 0 01-.2-7.995l.2-.005h10v-16h8zm14 0v16h10a4 4 0 013.995 3.8l.005.2a4 4 0 01-3.8 3.995l-.2.005h-14a4 4 0 01-3.995-3.8L188 196v-20h8zM69 128.5v9l-7.875 4.429 32.876 6.953c1.81-4.055 5.877-6.882 10.604-6.882a4 4 0 01.2 7.995l-.2.005a3.605 3.605 0 00-3.604 3.628l-.001-.023a3.606 3.606 0 003.414 3.601l.191.005h6.644a4 4 0 01.2 7.995l-.2.005h-6.644c-5.246 0-9.679-3.48-11.115-8.259l-44.708-9.457c-3.58-.757-4.322-5.493-1.242-7.336l.175-.1L69 128.5zm193.321-62.228a42.836 42.836 0 01.704 8.714l53.02 37.735a4 4 0 01.661 5.926l-.148.157L301 134.5V123l6.557-6.5-45.68-32.513a42.337 42.337 0 01-2.193 6.683 4 4 0 01-7.368-3.116 34.513 34.513 0 002.719-13.477c0-2.149-.195-4.27-.58-6.349a4 4 0 117.866-1.456z"
|
|
45
|
-
></path>
|
|
46
|
-
</g>
|
|
47
|
-
</g>
|
|
48
|
-
</g>
|
|
49
|
-
</g>
|
|
50
|
-
</svg>
|
|
51
|
-
);
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
export default NoPaymentResultsIcon;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const PointOfSaleImage: JSX.Element;
|