@thecb/components 10.12.3-beta.0 → 10.12.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -4
- package/dist/index.cjs.js +2526 -1617
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +4 -5
- package/dist/index.esm.js +2527 -1617
- package/dist/index.esm.js.map +1 -1
- package/package.json +13 -25
- package/src/components/atoms/alert/Alert.stories.js +26 -148
- package/src/components/atoms/badge/Badge.js +2 -2
- package/src/components/atoms/badge/Badge.stories.js +29 -143
- package/src/components/atoms/breadcrumb/Breadcrumb.stories.js +29 -38
- package/src/components/atoms/button-with-action/ButtonWithAction.stories.js +55 -108
- package/src/components/atoms/button-with-link/ButtonWithLink.stories.js +31 -160
- package/src/components/atoms/checkbox/Checkbox.stories.js +29 -148
- package/src/components/atoms/country-dropdown/CountryDropdown.stories.js +27 -61
- package/src/components/atoms/detail/Detail.js +26 -0
- package/src/components/atoms/display-box/DisplayBox.stories.js +21 -65
- package/src/components/atoms/display-card/DisplayCard.stories.js +22 -163
- package/src/components/atoms/dropdown/Dropdown.stories.js +10 -91
- package/src/components/atoms/form-layouts/FormInput.stories.js +26 -212
- package/src/components/atoms/form-select/FormSelect.stories.js +29 -55
- package/src/components/atoms/formatted-address/FormattedAddress.stories.js +27 -133
- package/src/components/atoms/icons/icons.stories.js +116 -0
- package/src/components/atoms/labeled-amount/LabeledAmount.stories.js +34 -110
- package/src/components/atoms/line-item/LineItem.stories.js +22 -89
- package/src/components/atoms/link/Link.stories.js +49 -155
- package/src/components/atoms/loading-line/LoadingLine.js +10 -14
- package/src/components/atoms/loading-line/LoadingLine.stories.js +28 -132
- package/src/components/atoms/nav-footer/NavFooter.stories.js +22 -235
- package/src/components/atoms/nav-header/NavHeader.stories.js +21 -122
- package/src/components/atoms/password-requirements/PasswordRequirements.stories.js +44 -108
- package/src/components/atoms/placeholder/Placeholder.stories.js +36 -164
- package/src/components/atoms/searchable-select/SearchableSelect.stories.js +28 -103
- package/src/components/atoms/state-province-dropdown/StateProvinceDropdown.stories.js +40 -65
- package/src/components/atoms/table/Table.stories.js +75 -59
- package/src/components/atoms/table/TableRow.js +0 -1
- package/src/components/atoms/title/Title.js +23 -0
- package/src/components/atoms/toggle-switch/ToggleSwitch.stories.js +20 -103
- package/src/components/atoms/toggle-switch/ToggleSwitch.theme.js +5 -8
- package/src/components/molecules/address-form/AddressForm.stories.js +20 -223
- package/src/components/molecules/banner/Banner.stories.js +26 -122
- package/src/components/molecules/change-password-form/ChangePasswordForm.stories.js +19 -203
- package/src/components/molecules/collapsible-section/CollapsibleSection.stories.js +61 -210
- package/src/components/molecules/edit-name-form/EdidNameForm.stories.js +24 -0
- package/src/components/molecules/index.js +0 -1
- package/src/components/molecules/link-card/LinkCard.stories.js +72 -287
- package/src/components/molecules/login-form/LoginForm.stories.js +21 -117
- package/src/components/molecules/modal/Modal.stories.js +128 -342
- package/src/components/molecules/module/Module.stories.js +25 -267
- package/src/components/molecules/multiple-select-filter/MultipleSelectFilter.js +61 -295
- package/src/components/molecules/multiple-select-filter/{MultipleSelectFilter.oldstories.js → MultipleSelectFilter.stories.js} +1 -1
- package/src/components/molecules/multiple-select-filter/MultipleSelectFilter.styled.js +4 -4
- package/src/components/molecules/multiple-select-filter/__private__/ActionLinkButton.js +24 -0
- package/src/components/molecules/multiple-select-filter/__private__/FilterButton.js +85 -0
- package/src/components/molecules/multiple-select-filter/__private__/FilterDropdown.js +23 -0
- package/src/components/molecules/multiple-select-filter/__private__/FilterableList.js +144 -0
- package/src/components/molecules/multiple-select-filter/__private__/FilterableListItem.js +67 -0
- package/src/components/molecules/multiple-select-filter/__private__/SearchBox.js +38 -0
- package/src/components/molecules/multiple-select-filter/__private__/useKeyboardNavigation.js +84 -0
- package/src/components/molecules/multiple-select-filter/__private__/util.js +31 -0
- package/src/components/molecules/obligation/icons/PropertyPersonalIcon.js +1 -1
- package/src/components/molecules/pagination/Pagination.stories.js +28 -177
- package/src/components/molecules/tabs/Tabs.stories.js +227 -135
- package/src/components/molecules/toast-notification/ToastNotification.stories.js +105 -0
- package/src/hooks/use-outside-click/index.js +4 -5
- package/src/util/index.js +1 -3
- package/src/components/atoms/alert/Alert.mdx +0 -19
- package/src/components/atoms/badge/Badge.mdx +0 -27
- package/src/components/atoms/breadcrumb/Breadcrumb.mdx +0 -21
- package/src/components/atoms/button-with-link/ButtonWithLink.mdx +0 -21
- package/src/components/atoms/card/Card.mdx +0 -41
- package/src/components/atoms/card/Card.stories.js +0 -360
- package/src/components/atoms/checkbox/Checkbox.mdx +0 -15
- package/src/components/atoms/checkbox/Checkbox.oldstories.js +0 -30
- package/src/components/atoms/country-dropdown/CountryDropdown.mdx +0 -36
- package/src/components/atoms/detail/Detail.mdx +0 -32
- package/src/components/atoms/detail/Detail.stories.js +0 -156
- package/src/components/atoms/display-box/DisplayBox.mdx +0 -11
- package/src/components/atoms/display-card/DisplayCard.mdx +0 -13
- package/src/components/atoms/dropdown/Dropdown.mdx +0 -65
- package/src/components/atoms/form-layouts/FormInput.mdx +0 -38
- package/src/components/atoms/form-select/FormSelect.mdx +0 -42
- package/src/components/atoms/formatted-address/FormattedAddress.mdx +0 -13
- package/src/components/atoms/formatted-bank-account/FormattedBankAccount.mdx +0 -17
- package/src/components/atoms/formatted-bank-account/FormattedBankAccount.stories.js +0 -57
- package/src/components/atoms/formatted-credit-card/FormattedCreditCard.mdx +0 -40
- package/src/components/atoms/formatted-credit-card/FormattedCreditCard.stories.js +0 -74
- package/src/components/atoms/icons/Icons.mdx +0 -40
- package/src/components/atoms/icons/Icons.stories.js +0 -325
- package/src/components/atoms/labeled-amount/LabeledAmount.mdx +0 -23
- package/src/components/atoms/line-item/LineItem.mdx +0 -28
- package/src/components/atoms/link/Link.mdx +0 -19
- package/src/components/atoms/loading/Loading.mdx +0 -13
- package/src/components/atoms/loading/Loading.stories.js +0 -22
- package/src/components/atoms/loading-line/LoadingLine.mdx +0 -15
- package/src/components/atoms/nav-footer/NavFooter.mdx +0 -15
- package/src/components/atoms/nav-header/NavHeader.mdx +0 -13
- package/src/components/atoms/nav-tabs/NavTabs.mdx +0 -30
- package/src/components/atoms/nav-tabs/NavTabs.stories.js +0 -49
- package/src/components/atoms/password-requirements/PasswordRequirements.mdx +0 -39
- package/src/components/atoms/placeholder/Placeholder.mdx +0 -19
- package/src/components/atoms/searchable-select/SearchableSelect.mdx +0 -44
- package/src/components/atoms/state-province-dropdown/StateProvinceDropdown.mdx +0 -36
- package/src/components/atoms/table/Table.mdx +0 -71
- package/src/components/atoms/table/Table.oldstories.js +0 -84
- package/src/components/atoms/title/Title.mdx +0 -26
- package/src/components/atoms/title/Title.stories.js +0 -144
- package/src/components/atoms/toggle-switch/ToggleSwitch.mdx +0 -17
- package/src/components/atoms/typeahead-input/TypeaheadInput.mdx +0 -13
- package/src/components/atoms/typeahead-input/TypeaheadInput.stories.js +0 -63
- package/src/components/molecules/address-form/AddressForm.mdx +0 -18
- package/src/components/molecules/banner/Banner.mdx +0 -23
- package/src/components/molecules/change-password-form/ChangePasswordForm.mdx +0 -15
- package/src/components/molecules/collapsible-section/CollapsibleSection.mdx +0 -15
- package/src/components/molecules/edit-name-form/EditNameForm.mdx +0 -13
- package/src/components/molecules/edit-name-form/EditNameForm.stories.js +0 -117
- package/src/components/molecules/idle-modal/IdleModal.js +0 -101
- package/src/components/molecules/idle-modal/IdleModal.mdx +0 -17
- package/src/components/molecules/idle-modal/IdleModal.stories.js +0 -180
- package/src/components/molecules/idle-modal/index.d.ts +0 -16
- package/src/components/molecules/idle-modal/index.js +0 -3
- package/src/components/molecules/link-card/LinkCard.mdx +0 -17
- package/src/components/molecules/login-form/LoginForm.mdx +0 -16
- package/src/components/molecules/modal/Modal.mdx +0 -17
- package/src/components/molecules/module/Module.mdx +0 -17
- package/src/components/molecules/obligation/Obligation.mdx +0 -23
- package/src/components/molecules/obligation/Obligation.stories.js +0 -460
- package/src/components/molecules/pagination/Pagination.mdx +0 -15
- package/src/components/molecules/popover/Popover.mdx +0 -15
- package/src/components/molecules/popover/Popover.stories.js +0 -220
- package/src/components/molecules/tabs/Tabs.mdx +0 -17
- package/src/components/molecules/toast-notification/Toast.mdx +0 -15
- package/src/components/molecules/toast-notification/Toast.stories.js +0 -183
- package/src/stories/Button.stories.ts +0 -53
- package/src/stories/Button.tsx +0 -48
- package/src/stories/Configure.mdx +0 -364
- package/src/stories/Header.stories.ts +0 -33
- package/src/stories/Header.tsx +0 -56
- package/src/stories/Page.stories.ts +0 -32
- package/src/stories/Page.tsx +0 -73
- package/src/stories/assets/accessibility.png +0 -0
- package/src/stories/assets/accessibility.svg +0 -5
- package/src/stories/assets/addon-library.png +0 -0
- package/src/stories/assets/assets.png +0 -0
- package/src/stories/assets/avif-test-image.avif +0 -0
- package/src/stories/assets/context.png +0 -0
- package/src/stories/assets/discord.svg +0 -15
- package/src/stories/assets/docs.png +0 -0
- package/src/stories/assets/figma-plugin.png +0 -0
- package/src/stories/assets/github.svg +0 -3
- package/src/stories/assets/share.png +0 -0
- package/src/stories/assets/styling.png +0 -0
- package/src/stories/assets/testing.png +0 -0
- package/src/stories/assets/theming.png +0 -0
- package/src/stories/assets/tutorials.svg +0 -12
- package/src/stories/assets/youtube.svg +0 -4
- package/src/stories/button.css +0 -30
- package/src/stories/header.css +0 -32
- package/src/stories/page.css +0 -69
- package/src/util/idleTimerUtils.js +0 -36
- /package/src/components/atoms/add-obligation/{AddObligation.oldstories.js → AddObligation.stories.js} +0 -0
- /package/src/components/atoms/amount-callout/{AmountCallout.oldstories.js → AmountCallout.stories.js} +0 -0
- /package/src/components/atoms/checkbox-list/{CheckboxList.oldstories.js → CheckboxList.stories.js} +0 -0
- /package/src/components/atoms/form-layouts/{FormLayouts.oldstories.js → FormLayouts.stories.js} +0 -0
- /package/src/components/atoms/hamburger-button/{HamburgerButton.oldstories.js → HamburgerButton.stories.js} +0 -0
- /package/src/components/atoms/heading/{Heading.oldstories.js → Heading.stories.js} +0 -0
- /package/src/components/atoms/layouts/examples/box-example/{BoxExample.oldstories.js → BoxExample.stories.js} +0 -0
- /package/src/components/atoms/layouts/examples/center-example/{CenterExample.oldstories.js → CenterExample.stories.js} +0 -0
- /package/src/components/atoms/layouts/examples/cluster-example/{ClusterExample.oldstories.js → ClusterExample.stories.js} +0 -0
- /package/src/components/atoms/layouts/examples/cover-example/{CoverExample.oldstories.js → CoverExample.stories.js} +0 -0
- /package/src/components/atoms/layouts/examples/frame-example/{FrameExample.oldstories.js → FrameExample.stories.js} +0 -0
- /package/src/components/atoms/layouts/examples/grid-example/{GridExample.oldstories.js → GridExample.stories.js} +0 -0
- /package/src/components/atoms/layouts/examples/imposter-example/{ImposterExample.oldstories.js → ImposterExample.stories.js} +0 -0
- /package/src/components/atoms/layouts/examples/motion-example/{MotionExample.oldstories.js → MotionExample.stories.js} +0 -0
- /package/src/components/atoms/layouts/examples/reel-example/{ReelExample.oldstories.js → ReelExample.stories.js} +0 -0
- /package/src/components/atoms/layouts/examples/sidebar-example/{SidebarExample.oldstories.js → SidebarExample.stories.js} +0 -0
- /package/src/components/atoms/layouts/examples/stack-example/{StackExample.oldstories.js → StackExample.stories.js} +0 -0
- /package/src/components/atoms/layouts/examples/switcher-example/{SwitcherExample.oldstories.js → SwitcherExample.stories.js} +0 -0
- /package/src/components/atoms/paragraph/{Paragraph.oldstories.js → Paragraph.stories.js} +0 -0
- /package/src/components/atoms/processing-fee/{ProcessingFee.oldstories.js → ProcessingFee.stories.js} +0 -0
- /package/src/components/atoms/search/{Search.oldstories.js → Search.stories.js} +0 -0
- /package/src/components/atoms/solid-divider/{SolidDivider.oldstories.js → SolidDivider.stories.js} +0 -0
- /package/src/components/atoms/sortable-table-heading/{SortableTableHeading.oldstories.js → SortableTableHeading.stories.js} +0 -0
- /package/src/components/atoms/spinner/{Spinner.oldstories.js → Spinner.stories.js} +0 -0
- /package/src/components/atoms/tab/{Tab.oldstories.js → Tab.stories.js} +0 -0
- /package/src/components/atoms/text/{Text.oldstories.js → Text.stories.js} +0 -0
- /package/src/components/atoms/typeahead-input/{TypeaheadIinput.oldstories.js → TypeaheadIinput.stories.js} +0 -0
- /package/src/components/atoms/wallet-name/{WalletName.oldstories.js → WalletName.stories.js} +0 -0
- /package/src/components/molecules/account-and-routing-modal/{AccountAndRoutingModal.oldstories.js → AccountAndRoutingModal.stories.js} +0 -0
- /package/src/components/molecules/editable-list/{EditableList.oldstories.js → EditableList.stories.js} +0 -0
- /package/src/components/molecules/email-form/{EmailForm.oldstories.js → EmailForm.stories.js} +0 -0
- /package/src/components/molecules/forgot-password-form/{ForgotPasswordForm.oldstories.js → ForgotPasswordForm.stories.js} +0 -0
- /package/src/components/molecules/highlight-tab-row/{HighlightTabRow.oldstories.js → HighlightTabRow.stories.js} +0 -0
- /package/src/components/molecules/obligation/modules/{AmountModule.oldstories.js → AmountModule.stories.js} +0 -0
- /package/src/components/molecules/payment-button-bar/{PaymentButtonBar.oldstories.js → PaymentButtonBar.stories.js} +0 -0
- /package/src/components/molecules/payment-details/{PaymentDetails.oldstories.js → PaymentDetails.stories.js} +0 -0
- /package/src/components/molecules/payment-form-ach/{PaymentFormACH.oldstories.js → PaymentFormACH.stories.js} +0 -0
- /package/src/components/molecules/payment-form-card/{PaymentFormCard.oldstories.js → PaymentFormCard.stories.js} +0 -0
- /package/src/components/molecules/periscope-dashboard-iframe/{PeriscopeDashBoardIframe.oldstories.js → PeriscopeDashBoardIframe.stories.js} +0 -0
- /package/src/components/molecules/phone-form/{PhoneForm.oldstories.js → PhoneForm.stories.js} +0 -0
- /package/src/components/molecules/popup-menu/{PopupMenu.oldstories.js → PopupMenu.stories.js} +0 -0
- /package/src/components/molecules/radio-group/{RadioGroup.oldstories.js → RadioGroup.stories.js} +0 -0
- /package/src/components/molecules/radio-section/{RadioSection.oldstories.js → RadioSection.stories.js} +0 -0
- /package/src/components/molecules/registration-form/{RegistrationForm.oldstories.js → RegistrationForm.stories.js} +0 -0
- /package/src/components/molecules/reset-confirmation-form/{ResetConfirmationForm.oldstories.js → ResetConfirmationForm.stories.js} +0 -0
- /package/src/components/molecules/reset-password-form/{ResetPasswordForm.oldstories.js → ResetPasswordForm.stories.js} +0 -0
- /package/src/components/molecules/reset-password-success/{ResetPasswordSuccess.oldstories.js → ResetPasswordSuccess.stories.js} +0 -0
- /package/src/components/molecules/tab-sidebar/{TabSidebar.oldstories.js → TabSidebar.stories.js} +0 -0
- /package/src/components/molecules/terms-and-conditions/{TermsAndConditions.oldstories.js → TermsAndConditions.stories.js} +0 -0
- /package/src/components/molecules/terms-and-conditions-modal/{TermsAndConditionsModal.oldstories.js → TermsAndConditionsModal.stories.js} +0 -0
- /package/src/components/molecules/workflow-tile/{WorkflowTile.oldstories.js → WorkflowTile.stories.js} +0 -0
|
@@ -1,325 +0,0 @@
|
|
|
1
|
-
import * as icons from "./index";
|
|
2
|
-
import styled from "styled-components";
|
|
3
|
-
import { MANATEE_GREY } from "../../../constants/colors";
|
|
4
|
-
|
|
5
|
-
const meta = {
|
|
6
|
-
title: "Atoms/Icons",
|
|
7
|
-
component: icons.AccountsIcon,
|
|
8
|
-
parameters: {
|
|
9
|
-
layout: "centered"
|
|
10
|
-
},
|
|
11
|
-
tags: ["!autodocs"],
|
|
12
|
-
args: {
|
|
13
|
-
ariaLabel: undefined,
|
|
14
|
-
color: undefined,
|
|
15
|
-
colorOverride: undefined,
|
|
16
|
-
fill: undefined,
|
|
17
|
-
height: undefined,
|
|
18
|
-
iconFill: undefined,
|
|
19
|
-
iconHeight: undefined,
|
|
20
|
-
iconIndex: undefined,
|
|
21
|
-
iconWidth: undefined,
|
|
22
|
-
labelledBy: undefined,
|
|
23
|
-
linkColor: undefined,
|
|
24
|
-
strokeWidth: undefined,
|
|
25
|
-
text: undefined,
|
|
26
|
-
title: undefined,
|
|
27
|
-
titleID: undefined
|
|
28
|
-
},
|
|
29
|
-
argTypes: {
|
|
30
|
-
ariaLabel: {
|
|
31
|
-
description: "Sets the `aria-label` value on the `PencilIcon` icon",
|
|
32
|
-
table: {
|
|
33
|
-
type: { summary: "string" },
|
|
34
|
-
defaultValue: { summary: "Edit" }
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
color: {
|
|
38
|
-
description:
|
|
39
|
-
"Sets a color (usually for a `fill` attribute) on one or many elements within a component. The default value for this prop varies by component. Used in the following componenets: `ArrowDownCircleIconSmall`, `ArrowLeftCircleIconMedium`, `ArrowLeftCircleIconSmall`, `ArrowRightCircleIconSmall`, `ArrowUpCircleIconSmall`, `AutopayOnIcon`, `ChargebackIconMedium`, `ChargebackIconSmall`, `ChargebackReversalIconMedium`, `ChargebackReversalIconSmall`, `RefundIconMedium`, `RefundIconSmall`, `XCircleIconMedium`, `XCircleIconSmall`, `AutopayIcon`, `ArrowRightIcon`, `PlusCircleIcon`, `WarningIconXS`, `EmptyCartIconV2`",
|
|
40
|
-
table: {
|
|
41
|
-
type: { summary: "string" },
|
|
42
|
-
defaultValue: { summary: `varies` }
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
colorOverride: {
|
|
46
|
-
description:
|
|
47
|
-
"Overrides the theme values for some element's fill attribute in the `WalletIconSmall` component",
|
|
48
|
-
table: {
|
|
49
|
-
type: { summary: "string" },
|
|
50
|
-
defaultValue: { summary: undefined }
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
fill: {
|
|
54
|
-
description:
|
|
55
|
-
"Sets the fill attribute in the following components: `AutopayIcon`, `IconQuitLarge`, `PendingIcon`",
|
|
56
|
-
table: {
|
|
57
|
-
type: { summary: "string" },
|
|
58
|
-
defaultValue: { summary: `varies` }
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
height: {
|
|
62
|
-
description:
|
|
63
|
-
"Sets the `height` value in the `style` attribute for the `EmptyCartIconV2` component",
|
|
64
|
-
table: {
|
|
65
|
-
type: { summary: "string" },
|
|
66
|
-
defaultValue: { summary: "auto" }
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
iconFill: {
|
|
70
|
-
description:
|
|
71
|
-
"Sets the fill attribute in the following components: `ChevronIcon`, `TrashIcon`, `TrashIconV2`, `CloseIcon`, `MultiCartIcon`",
|
|
72
|
-
table: {
|
|
73
|
-
type: { summary: "string" },
|
|
74
|
-
defaultValue: { summary: `varies` }
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
iconHeight: {
|
|
78
|
-
description:
|
|
79
|
-
"Sets the height of the `CloseIcon` and `MultiCartIcon` icons",
|
|
80
|
-
table: {
|
|
81
|
-
type: { summary: "string" },
|
|
82
|
-
defaultValue: { summary: `varies` }
|
|
83
|
-
}
|
|
84
|
-
},
|
|
85
|
-
iconIndex: {
|
|
86
|
-
description:
|
|
87
|
-
"Used to create a unique id for a variety of elements in the following components: `BankIconLarge`, `SuccessfulIconMedium`, `SuccessfulIconSmall`, `WarningIconXS`, `XCircleIconSmall`, `XCircleIconMedium`, `RefundIconSmall`, `RefundIconMedium`, `ChargebackReversalIconSmall`, `ChargebackReversalIconMedium`, `ChargebackIconSmall`, `ChargebackIconMedium`, `AutopayOnIcon`, `ArrowUpCircleIconSmall`, `ArrowRightCircleIconSmall`, `ArrowLeftCircleIconSmall`, `ArrowLeftCircleIconMedium`, `ArrowDownCircleIconSmall`, `WalletIconSmall`, `FindIconSmall`",
|
|
88
|
-
table: {
|
|
89
|
-
type: { summary: "string | number" },
|
|
90
|
-
defaultValue: { summary: 0 }
|
|
91
|
-
}
|
|
92
|
-
},
|
|
93
|
-
iconWidth: {
|
|
94
|
-
description:
|
|
95
|
-
"Sets the width of the `CloseIcon` and `MultiCartIcon` icons",
|
|
96
|
-
table: {
|
|
97
|
-
type: { summary: "string | number" },
|
|
98
|
-
defaultValue: { summary: `varies` }
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
labelledBy: {
|
|
102
|
-
description:
|
|
103
|
-
"Sets the `aria-labelledby` value in the following components: `ArrowRightIcon`, `PlusCircleIcon`",
|
|
104
|
-
table: {
|
|
105
|
-
type: { summary: "string" },
|
|
106
|
-
defaultValue: { summary: "" }
|
|
107
|
-
}
|
|
108
|
-
},
|
|
109
|
-
linkColor: {
|
|
110
|
-
description:
|
|
111
|
-
"Sets the fill attribute on multiple elements in the `ExternalLinkIcon` component",
|
|
112
|
-
table: {
|
|
113
|
-
type: { summary: "string" },
|
|
114
|
-
defaultValue: { summary: undefined }
|
|
115
|
-
}
|
|
116
|
-
},
|
|
117
|
-
strokeWidth: {
|
|
118
|
-
description: "Set the stroke width on the circle in `IconAdd`",
|
|
119
|
-
table: {
|
|
120
|
-
type: { summary: "string | number" },
|
|
121
|
-
defaultValue: { summary: 1 }
|
|
122
|
-
}
|
|
123
|
-
},
|
|
124
|
-
text: {
|
|
125
|
-
description:
|
|
126
|
-
"Used to create a unique id for a `<mask />` element in `ExternalLinkIcon`",
|
|
127
|
-
table: {
|
|
128
|
-
type: { summary: "string" },
|
|
129
|
-
defaultValue: { summary: undefined }
|
|
130
|
-
}
|
|
131
|
-
},
|
|
132
|
-
title: {
|
|
133
|
-
description:
|
|
134
|
-
"Sets the text of the `<title />` element in the `WarningIconXS` component",
|
|
135
|
-
table: {
|
|
136
|
-
type: { summary: "string" },
|
|
137
|
-
defaultValue: { summary: undefined }
|
|
138
|
-
}
|
|
139
|
-
},
|
|
140
|
-
titleID: {
|
|
141
|
-
description:
|
|
142
|
-
"Used to build a unique id for the `<title />` element in the `WarningIconXS` component, which is matched with the `aria-labelledby` value",
|
|
143
|
-
table: {
|
|
144
|
-
type: { summary: "string" },
|
|
145
|
-
defaultValue: { summary: "warning-icon-title" }
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
};
|
|
150
|
-
|
|
151
|
-
const StyledIconLIst = styled.ul`
|
|
152
|
-
align-items: center;
|
|
153
|
-
display: flex;
|
|
154
|
-
flex-direction: column;
|
|
155
|
-
gap: 2em;
|
|
156
|
-
list-style: none;
|
|
157
|
-
|
|
158
|
-
li {
|
|
159
|
-
padding-bottom: 2em;
|
|
160
|
-
text-align: center;
|
|
161
|
-
width: 100%;
|
|
162
|
-
|
|
163
|
-
&:not(:last-child) {
|
|
164
|
-
border-bottom: 1px solid ${MANATEE_GREY};
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
.icon-name {
|
|
169
|
-
margin-top: 1em;
|
|
170
|
-
font-family: monospace
|
|
171
|
-
font-size: 2em;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
// for the IconAdd component
|
|
175
|
-
.fill { fill: ${MANATEE_GREY} }
|
|
176
|
-
.stroke { stroke: ${MANATEE_GREY} }
|
|
177
|
-
`;
|
|
178
|
-
|
|
179
|
-
const IconList = ({ iconNames }) => (
|
|
180
|
-
<StyledIconLIst>
|
|
181
|
-
{iconNames.map(icon => (
|
|
182
|
-
<li key={icon} style={{ textAlign: "center", paddingBottom: "2em" }}>
|
|
183
|
-
{icons[icon]({ linkColor: MANATEE_GREY })}
|
|
184
|
-
<div className="icon-name">{icon}</div>
|
|
185
|
-
</li>
|
|
186
|
-
))}
|
|
187
|
-
</StyledIconLIst>
|
|
188
|
-
);
|
|
189
|
-
|
|
190
|
-
const genericIcons = [
|
|
191
|
-
"DuplicateIcon",
|
|
192
|
-
"CalendarIcon",
|
|
193
|
-
"PendingIcon",
|
|
194
|
-
"StatusUnknownIcon",
|
|
195
|
-
"FailedIcon",
|
|
196
|
-
"ErroredIcon",
|
|
197
|
-
"SuccessfulIcon",
|
|
198
|
-
"SuccessfulIconMedium",
|
|
199
|
-
"SuccessfulIconSmall",
|
|
200
|
-
"VoidedIcon",
|
|
201
|
-
"XCircleIconMedium",
|
|
202
|
-
"XCircleIconSmall",
|
|
203
|
-
"ProfileIconSmall",
|
|
204
|
-
"SearchIcon",
|
|
205
|
-
"FindIconSmall",
|
|
206
|
-
"PencilIcon",
|
|
207
|
-
"AccountsIconSmall",
|
|
208
|
-
"TrashIcon",
|
|
209
|
-
"TrashIconV2",
|
|
210
|
-
"SettingsIconSmall",
|
|
211
|
-
"ShoppingCartIcon",
|
|
212
|
-
"PlusCircleIcon",
|
|
213
|
-
"IconAdd",
|
|
214
|
-
"ExternalLinkIcon",
|
|
215
|
-
"AutopayIcon",
|
|
216
|
-
"AutopayOnIcon",
|
|
217
|
-
"CloseIcon",
|
|
218
|
-
"IconQuitLarge",
|
|
219
|
-
"WarningIconXS",
|
|
220
|
-
"KebabMenuIcon",
|
|
221
|
-
"MultiCartIcon",
|
|
222
|
-
"EmptyCartIconV2",
|
|
223
|
-
"CheckmarkIcon"
|
|
224
|
-
];
|
|
225
|
-
|
|
226
|
-
const arrowIcons = [
|
|
227
|
-
"AchReturnIcon",
|
|
228
|
-
"RejectedIcon",
|
|
229
|
-
"RejectedVelocityIcon",
|
|
230
|
-
"ArrowDownCircleIconSmall",
|
|
231
|
-
"ArrowLeftCircleIconMedium",
|
|
232
|
-
"ArrowLeftCircleIconSmall",
|
|
233
|
-
"ArrowRightCircleIconSmall",
|
|
234
|
-
"ArrowUpCircleIconSmall",
|
|
235
|
-
"ArrowRightIcon",
|
|
236
|
-
"ChevronIcon",
|
|
237
|
-
"CarrotIcon"
|
|
238
|
-
];
|
|
239
|
-
|
|
240
|
-
const paymentIcons = [
|
|
241
|
-
"BankIcon",
|
|
242
|
-
"BankIconLarge",
|
|
243
|
-
"CashIcon",
|
|
244
|
-
"ChargebackIcon",
|
|
245
|
-
"ChargebackIconMedium",
|
|
246
|
-
"ChargebackIconSmall",
|
|
247
|
-
"ChargebackReversalIcon",
|
|
248
|
-
"ChargebackReversalIconMedium",
|
|
249
|
-
"ChargebackReversalIconSmall",
|
|
250
|
-
"CheckIcon",
|
|
251
|
-
"GenericCard",
|
|
252
|
-
"GenericCardLarge",
|
|
253
|
-
"PaymentMethodAddIcon",
|
|
254
|
-
"PaymentMethodIcon",
|
|
255
|
-
"PaymentsIconSmall",
|
|
256
|
-
"RefundIcon",
|
|
257
|
-
"RefundIconMedium",
|
|
258
|
-
"RefundIconSmall"
|
|
259
|
-
];
|
|
260
|
-
|
|
261
|
-
const checkIcons = ["RoutingNumberImage", "AccountNumberImage"];
|
|
262
|
-
|
|
263
|
-
const accountIcons = [
|
|
264
|
-
"AccountsAddIcon",
|
|
265
|
-
"AccountsIcon",
|
|
266
|
-
"DisabledAccountsAddIcon",
|
|
267
|
-
"DisabledPaymentMethodsAddIcon",
|
|
268
|
-
"ForgotPasswordIcon",
|
|
269
|
-
"GoToEmailIcon",
|
|
270
|
-
"ResetPasswordIcon",
|
|
271
|
-
"VerifiedEmailIcon"
|
|
272
|
-
];
|
|
273
|
-
|
|
274
|
-
const mascotIcons = [
|
|
275
|
-
"CustomerSearchIcon",
|
|
276
|
-
"EmptyCartIcon",
|
|
277
|
-
"GenericErrorIcon",
|
|
278
|
-
"NoCustomerResultsIcon",
|
|
279
|
-
"NoPaymentResultsIcon",
|
|
280
|
-
"NotFoundIcon",
|
|
281
|
-
"PaymentSearchIcon",
|
|
282
|
-
"PeriscopeFailedIcon",
|
|
283
|
-
"ProfileIcon",
|
|
284
|
-
"TimeoutImage",
|
|
285
|
-
"WalletIcon",
|
|
286
|
-
"GuidedCheckoutImage",
|
|
287
|
-
"KioskImage",
|
|
288
|
-
"PointOfSaleImage",
|
|
289
|
-
"RevenueManagementImage",
|
|
290
|
-
"ProfileImage",
|
|
291
|
-
"StandardCheckoutImage",
|
|
292
|
-
"WalletBannerIcon"
|
|
293
|
-
];
|
|
294
|
-
|
|
295
|
-
export const GenericIcons = () => <IconList iconNames={genericIcons} />;
|
|
296
|
-
|
|
297
|
-
export const ArrowIcons = () => <IconList iconNames={arrowIcons} />;
|
|
298
|
-
|
|
299
|
-
export const PaymentIcons = () => <IconList iconNames={paymentIcons} />;
|
|
300
|
-
|
|
301
|
-
export const CheckIcons = () => <IconList iconNames={checkIcons} />;
|
|
302
|
-
|
|
303
|
-
export const AccountIcons = () => <IconList iconNames={accountIcons} />;
|
|
304
|
-
|
|
305
|
-
export const MascotIcons = () => <IconList iconNames={mascotIcons} />;
|
|
306
|
-
|
|
307
|
-
export const OtherIcons = {
|
|
308
|
-
render: () => {
|
|
309
|
-
const groupedIcons = [
|
|
310
|
-
...checkIcons,
|
|
311
|
-
...mascotIcons,
|
|
312
|
-
...arrowIcons,
|
|
313
|
-
...genericIcons,
|
|
314
|
-
...accountIcons,
|
|
315
|
-
...paymentIcons
|
|
316
|
-
];
|
|
317
|
-
const otherIcons = Object.keys(icons).filter(
|
|
318
|
-
icon => !groupedIcons.includes(icon)
|
|
319
|
-
);
|
|
320
|
-
|
|
321
|
-
return <IconList iconNames={otherIcons} />;
|
|
322
|
-
}
|
|
323
|
-
};
|
|
324
|
-
|
|
325
|
-
export default meta;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { Canvas, Meta, Title, Story, Controls } from '@storybook/blocks';
|
|
2
|
-
|
|
3
|
-
import * as LabeledAmountStories from './LabeledAmount.stories.js';
|
|
4
|
-
|
|
5
|
-
<Meta of={LabeledAmountStories} />
|
|
6
|
-
|
|
7
|
-
<Title />
|
|
8
|
-
|
|
9
|
-
The LabeledAmount component is a component that combines a text label with a formatted money string, for use in checkout experiences (payment details, receipts, etc). The wrapping container for the text elements is styled using flexbox, by default using the `space-between` value for the `justify-content` property. This can be changed by passing an override using the `extraStyles` prop like so:
|
|
10
|
-
|
|
11
|
-
```
|
|
12
|
-
<LabeledAmount extraStyles={`justify-content: space-around`} />
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
Currently, there are two versions of this component: LabeledAmountV1 and LabeledAmountV2. While both versions are in active use in the codebase, LabeledAmountV1 is deprecated and should not be used in new code. The difference between the two is that LabeledAmountV2 has been updated to decouple the component's rendered HTML element from its theme size variant. This allows for arbitrary HTML elements (any heading size, paragraph, span) to be used as the underlying element regardless of the component size specified in the design, preserving proper HTML semantics and accessibility.
|
|
16
|
-
|
|
17
|
-
LabeledAmountV2 takes the following props:
|
|
18
|
-
|
|
19
|
-
<Controls />
|
|
20
|
-
|
|
21
|
-
<div style={{ marginBottom: "2em"}}>
|
|
22
|
-
<Story />
|
|
23
|
-
</div>
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { Canvas, Meta, Title, Story, Controls } from '@storybook/blocks';
|
|
2
|
-
|
|
3
|
-
import * as LineItemStories from './LineItem.stories.js';
|
|
4
|
-
|
|
5
|
-
<Meta of={LineItemStories} />
|
|
6
|
-
|
|
7
|
-
<Title />
|
|
8
|
-
|
|
9
|
-
The LineItem component is small component that formats the description, subDescription, amount, and optionally quantity of a line item. LineItems are typically used in checkout flows and as a part of transaction details.
|
|
10
|
-
|
|
11
|
-
The default styling of the LineItem uses flexbox. The description and subDescription are left-justified, while the formatted amount string is right-justified. An item's quantity, if displayed, sits evenly between the description and amount string. By default, elements of the LineItem have no gap between them. As shown below, the LineItem sizes itself to the width of its parent container, so gaps between items can be controlled by the size of the LineItem's parent.
|
|
12
|
-
|
|
13
|
-
LineItems are typically rendered inside of other display components, like a DisplayBox or Card, as seen in the Line Item With Quantity story.
|
|
14
|
-
|
|
15
|
-
The LineItem component can take the following props:
|
|
16
|
-
|
|
17
|
-
- description (required, main description of the lineItem),
|
|
18
|
-
- subDescription (optional, but should not be `null`),
|
|
19
|
-
- amount (required, pre-formatted money string),
|
|
20
|
-
- displayQuantity (optional, quantity of the item, if its display is desired)
|
|
21
|
-
- customAttributes (optional, array of item's custom attributes, used in conjunction with visibleFields)
|
|
22
|
-
- visibleFields (optional, an array that is a subset of customAttributes to display below the subDescription)
|
|
23
|
-
|
|
24
|
-
NOTE: The LineItem currently supports unused functionality that can display a subset of an item's custom attributes as "visible fields". If this functionality is used in the future, a new story should be added to demonstrate it.
|
|
25
|
-
|
|
26
|
-
<div style={{ marginBottom: "2em"}}>
|
|
27
|
-
<Story />
|
|
28
|
-
</div>
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Canvas, Meta, Title, Story, Controls } from '@storybook/blocks';
|
|
2
|
-
|
|
3
|
-
import * as LinkStories from './Link.stories.js';
|
|
4
|
-
|
|
5
|
-
<Meta of={LinkStories} />
|
|
6
|
-
|
|
7
|
-
<Title />
|
|
8
|
-
|
|
9
|
-
The Link component comes in two varieties: InternalLink and ExternalLink. We have two components because most of our frontend applications rely on some version of react-router for internal routing. The InternalLink component is a wrapper that applies react-router-dom's `<Link />` component, while ExternalLink uses a plain `<a />` tag. Either link component can be used as a wrapper around arbitrary children.
|
|
10
|
-
|
|
11
|
-
Due to the components being written at different times, they have similar, but not identical, props. The props table identifies which props apply to InternalLinks and which apply to ExternalLinks.
|
|
12
|
-
|
|
13
|
-
Currently, the InternalLink has a minor bug where it will not apply a theme color for a non-active, non-hover state. At the moment, the only way to get InternalLinks to apply the correct color is to pass the theme color in to the component using the `color` prop.
|
|
14
|
-
|
|
15
|
-
<Controls />
|
|
16
|
-
|
|
17
|
-
<div style={{ marginBottom: "2em"}}>
|
|
18
|
-
<Story />
|
|
19
|
-
</div>
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Canvas, Meta, Title, Story, Controls } from '@storybook/blocks';
|
|
2
|
-
|
|
3
|
-
import * as LoadingStories from './Loading.stories.js';
|
|
4
|
-
|
|
5
|
-
<Meta of={LoadingStories} />
|
|
6
|
-
|
|
7
|
-
<Title />
|
|
8
|
-
|
|
9
|
-
The Loading component is a small spinner animation that can be used to signal a loading state to a user. The spinner has a fixed size of 100px, and it is themed using the theme values in FCS. For a customizable size version, use the Spinner atom directly.
|
|
10
|
-
|
|
11
|
-
<Story />
|
|
12
|
-
|
|
13
|
-
<Controls />
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import Loading from "./Loading";
|
|
2
|
-
import { Box } from "../layouts";
|
|
3
|
-
|
|
4
|
-
const meta = {
|
|
5
|
-
title: "Atoms/Loading",
|
|
6
|
-
component: Loading,
|
|
7
|
-
parameters: {
|
|
8
|
-
layout: "centered",
|
|
9
|
-
controls: { expanded: true }
|
|
10
|
-
},
|
|
11
|
-
tags: ["!autodocs"]
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export default meta;
|
|
15
|
-
|
|
16
|
-
export const Spinner = {
|
|
17
|
-
render: () => (
|
|
18
|
-
<Box>
|
|
19
|
-
<Loading />
|
|
20
|
-
</Box>
|
|
21
|
-
)
|
|
22
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Canvas, Meta, Title, Story, Controls } from '@storybook/blocks';
|
|
2
|
-
|
|
3
|
-
import * as LoadingLineStories from './LoadingLine.stories.js';
|
|
4
|
-
|
|
5
|
-
<Meta of={LoadingLineStories} />
|
|
6
|
-
|
|
7
|
-
<Title />
|
|
8
|
-
|
|
9
|
-
The LoadingLine is a component with a gray ripple animation that can be used in place of an existing component as it renders. The LoadingLine can either be given an exact width and height using pixel strings, or it can be given an maximum and minimum width. If supplied with a maximum and minimum width, the component will have a random width within the range. Width values should be supplied as pixel values _without_ the "px" suffix. All supplied values will be applied as pixels in the component's style function.
|
|
10
|
-
|
|
11
|
-
Using the minimum and maximum width values can be useful to represent a series of items without a fixed width, like text content, list items, or table values.
|
|
12
|
-
|
|
13
|
-
<Story />
|
|
14
|
-
|
|
15
|
-
<Controls />
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Canvas, Meta, Title, Story, Controls } from '@storybook/blocks';
|
|
2
|
-
|
|
3
|
-
import * as NavFooterStories from './NavFooter.stories.js';
|
|
4
|
-
|
|
5
|
-
<Meta of={NavFooterStories} />
|
|
6
|
-
|
|
7
|
-
<Title />
|
|
8
|
-
|
|
9
|
-
The NavFooter component is a wrapper designed to create a page footer. The component accepts children components for its left and right side and sizes itself to the width of the page. The component can take a maxWidth value that will center the footer within it, no matter the overall size of the screen.
|
|
10
|
-
|
|
11
|
-
The NavFooter can also be used to create a smaller subfooter by changing the minimum height value. Multiple footers can exist on one page, as long as they have proper key and aria-label values. The `largeSide` and `largeSideSize` props dictate which side of the footer is given more flex space.
|
|
12
|
-
|
|
13
|
-
<Controls />
|
|
14
|
-
|
|
15
|
-
<Story />
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Canvas, Meta, Title, Story, Controls } from '@storybook/blocks';
|
|
2
|
-
|
|
3
|
-
import * as NavHeaderStories from './NavHeader.stories.js';
|
|
4
|
-
|
|
5
|
-
<Meta of={NavHeaderStories} />
|
|
6
|
-
|
|
7
|
-
<Title />
|
|
8
|
-
|
|
9
|
-
The NavHeader component is a wrapper designed to create a page header. The component accepts children components for its left and right side and sizes itself to the width of the page. The component can take a maxWidth value that will center the header within it, no matter the overall size of the screen.
|
|
10
|
-
|
|
11
|
-
<Controls />
|
|
12
|
-
|
|
13
|
-
<Story />
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { Canvas, Meta, Title, Story, Controls } from '@storybook/blocks';
|
|
2
|
-
|
|
3
|
-
import * as NavTabsStories from './NavTabs.stories.js';
|
|
4
|
-
|
|
5
|
-
<Meta of={NavTabsStories} />
|
|
6
|
-
|
|
7
|
-
<Title />
|
|
8
|
-
|
|
9
|
-
The NavTabs component renders a configurable row of links on desktop, and a stack of links on mobile.
|
|
10
|
-
|
|
11
|
-
- The links are horizontally centered
|
|
12
|
-
- Each tab uses the `InternalLink` component, which uses the `Link` component from `react-router-dom`.
|
|
13
|
-
- The current, or active, page is determined by checking if `location.pathname` from the `useLocation` hook from `react-router-dom` includes a tab's `path`.
|
|
14
|
-
- There is no default gap between links on desktop, so it's recommended to always provide a value for `tabGap`.
|
|
15
|
-
- The font, link color, and active color are themeable.
|
|
16
|
-
- Expands to fit the width of it's containing element.
|
|
17
|
-
|
|
18
|
-
## Example `tabsConfig` Format
|
|
19
|
-
|
|
20
|
-
```
|
|
21
|
-
const tabs = [
|
|
22
|
-
{ label: "Home", path: "/" },
|
|
23
|
-
{ label: "About", path: "/about" },
|
|
24
|
-
{ label: "Contact", path: "/contact" }
|
|
25
|
-
];
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
<Story />
|
|
29
|
-
|
|
30
|
-
<Controls />
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import NavTabs from "./NavTabs";
|
|
2
|
-
|
|
3
|
-
const meta = {
|
|
4
|
-
title: "Atoms/NavTabs",
|
|
5
|
-
component: NavTabs,
|
|
6
|
-
tags: ["!autodocs"],
|
|
7
|
-
parameters: {
|
|
8
|
-
layout: "centered",
|
|
9
|
-
controls: { expanded: true }
|
|
10
|
-
},
|
|
11
|
-
args: {
|
|
12
|
-
tabsConfig: undefined,
|
|
13
|
-
tabGap: undefined
|
|
14
|
-
},
|
|
15
|
-
argTypes: {
|
|
16
|
-
tabsConfig: {
|
|
17
|
-
description: "Array of tab objects",
|
|
18
|
-
control: { type: "object" },
|
|
19
|
-
table: {
|
|
20
|
-
type: { summary: "array" },
|
|
21
|
-
defaultValue: { summary: undefined }
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
tabGap: {
|
|
25
|
-
description:
|
|
26
|
-
"Gap between tabs. Passed to the Cluster component that wraps the tabs on desktop screens.",
|
|
27
|
-
control: { type: "text" },
|
|
28
|
-
table: {
|
|
29
|
-
type: { summary: "string" },
|
|
30
|
-
defaultValue: { summary: undefined }
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
const tabs = [
|
|
37
|
-
{ label: "Home", path: "/" },
|
|
38
|
-
{ label: "About", path: "/about" },
|
|
39
|
-
{ label: "Contact", path: "/contact" }
|
|
40
|
-
];
|
|
41
|
-
|
|
42
|
-
export default meta;
|
|
43
|
-
|
|
44
|
-
export const Basic = {
|
|
45
|
-
args: {
|
|
46
|
-
tabsConfig: tabs,
|
|
47
|
-
tabGap: "2rem"
|
|
48
|
-
}
|
|
49
|
-
};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { Canvas, Meta, Title, Story, Controls } from '@storybook/blocks';
|
|
2
|
-
|
|
3
|
-
import * as PasswordRequirementsStories from './PasswordRequirements.stories.js';
|
|
4
|
-
|
|
5
|
-
<Meta of={PasswordRequirementsStories} />
|
|
6
|
-
|
|
7
|
-
<Title />
|
|
8
|
-
|
|
9
|
-
PasswordRequirements is a small widget that can be used in addition to a form that requires a user to set a password. The widget displays a box listing requirements for the user's password, and whether the entered password meets those requirements.
|
|
10
|
-
|
|
11
|
-
The requirements are currently hardcoded to meet the requirements for Navigate Frontend: passwords must be a minimum length of 8 characters and contain a number, uppercase letter, lowercase letter, and special character. Requirements can be changed or added to by modifying the code in the PasswordRequirements component.
|
|
12
|
-
|
|
13
|
-
This component is *not* to be used with applications that support Okta SSO for user authentication, _unless_ they also support non-SSO-sign-on using User Management Service. For applications that exclusively use Okta SSO to manage user authentication, Okta provides its own password validation experience that can be used wholesale or forked.
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
## Form Integration
|
|
17
|
-
|
|
18
|
-
In order to properly demonstrate functionality, the PasswordRequirements story includes two FormInput components and Redux Freeform integration. The `password` prop required by PasswordRequirements takes the form of a Redux Freeform field object. This object _can_ be generated with [redux-freeform](https://github.com/CityBaseInc/redux-freeform). Below are example values for each prop with the minimum properties needed for a password field object.
|
|
19
|
-
|
|
20
|
-
### field
|
|
21
|
-
|
|
22
|
-
```
|
|
23
|
-
{
|
|
24
|
-
"dirty": false,
|
|
25
|
-
"rawValue": "",
|
|
26
|
-
"errors": [
|
|
27
|
-
"error/REQUIRED",
|
|
28
|
-
"error/HAS_LENGTH",
|
|
29
|
-
"error/HAS_NUMBER",
|
|
30
|
-
"error/HAS_UPPERCASE_LETTER",
|
|
31
|
-
"error/HAS_LOWERCASE_LETTER",
|
|
32
|
-
"error/HAS_SPECIAL_CHARACTER"
|
|
33
|
-
],
|
|
34
|
-
"hasErrors": true
|
|
35
|
-
}
|
|
36
|
-
```
|
|
37
|
-
<Controls />
|
|
38
|
-
|
|
39
|
-
<Story />
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Canvas, Meta, Title, Story, Controls } from '@storybook/blocks';
|
|
2
|
-
|
|
3
|
-
import * as PlaceholderStories from './Placeholder.stories.js';
|
|
4
|
-
|
|
5
|
-
<Meta of={PlaceholderStories} />
|
|
6
|
-
|
|
7
|
-
<Title />
|
|
8
|
-
|
|
9
|
-
The Placeholder component is a component that is used to occupy space that would normally contain some sort of data, like user accounts or payment methods. When the data is in an empty state, the Placeholder can be rendered to inform the user about what content would normally appear, and provide the user with an opportunity to take an action or visit a destination. If the action is unavailable, a Placeholder can be set to a disabled state.
|
|
10
|
-
|
|
11
|
-
Placeholders come with two variants: default and large. The default variant uses only text and a generic plus icon, while the large variant displays text and an icon specific to the Placeholder's use. Currently large Placeholders are only used in NFE in the following varieties: accounts, properties, and payments. New types of large Placeholders can be added by updating the large icons function inside of the Placeholder component.
|
|
12
|
-
|
|
13
|
-
The Placeholder uses flexbox styling and takes its width from its parent container.
|
|
14
|
-
|
|
15
|
-
<Controls />
|
|
16
|
-
|
|
17
|
-
<div style={{ marginBottom: "2em"}}>
|
|
18
|
-
<Story />
|
|
19
|
-
</div>
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { Canvas, Meta, Title, Story, Controls } from '@storybook/blocks';
|
|
2
|
-
|
|
3
|
-
import * as SearchableSelectStories from './SearchableSelect.stories.js';
|
|
4
|
-
|
|
5
|
-
<Meta of={SearchableSelectStories} />
|
|
6
|
-
|
|
7
|
-
<Title />
|
|
8
|
-
|
|
9
|
-
SearchableSelect creates a list of checkboxes from an array of options that is filterable through an input.
|
|
10
|
-
|
|
11
|
-
## Notes
|
|
12
|
-
|
|
13
|
-
- the `items` array will be sorted by the `name` property
|
|
14
|
-
- a `SELECT_ALL` constant is also exported by SearchableSelect
|
|
15
|
-
- if an item with a name matching `SELECT_ALL` is included in `items` it will be rendered to the top
|
|
16
|
-
- filtering through the input is _always_ case-insensitive
|
|
17
|
-
|
|
18
|
-
## Form Integration
|
|
19
|
-
|
|
20
|
-
SearchableSelect requires a `fields` and `actions` prop. Both are objects that _can_ be generated with [redux-freeform](https://github.com/CityBaseInc/redux-freeform).
|
|
21
|
-
|
|
22
|
-
Unlike other similar form components where the specific `field` and `fieldActions` for one field are passed as props, SearchableSelect expect the `fields` and `fieldActions` from the entire form to be passed, with a field named `searchTerm`. Below are example values for each prop with the minimum properties needed for a FormSelect component.
|
|
23
|
-
|
|
24
|
-
### fields
|
|
25
|
-
|
|
26
|
-
```
|
|
27
|
-
{
|
|
28
|
-
searchTerm: {
|
|
29
|
-
"rawValue": ""
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
### actions
|
|
35
|
-
|
|
36
|
-
```
|
|
37
|
-
{
|
|
38
|
-
searchTerm: {
|
|
39
|
-
set: (value) => {...}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
`actions.searchTerm.set()` is used to to update the filter term in the input.
|