@thecb/components 10.12.3-beta.0 → 10.12.3-beta.1

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.
Files changed (211) hide show
  1. package/README.md +0 -4
  2. package/dist/index.cjs.js +2526 -1617
  3. package/dist/index.cjs.js.map +1 -1
  4. package/dist/index.d.ts +4 -5
  5. package/dist/index.esm.js +2527 -1617
  6. package/dist/index.esm.js.map +1 -1
  7. package/package.json +13 -25
  8. package/src/components/atoms/alert/Alert.stories.js +26 -148
  9. package/src/components/atoms/badge/Badge.js +2 -2
  10. package/src/components/atoms/badge/Badge.stories.js +29 -143
  11. package/src/components/atoms/breadcrumb/Breadcrumb.stories.js +29 -38
  12. package/src/components/atoms/button-with-action/ButtonWithAction.stories.js +55 -108
  13. package/src/components/atoms/button-with-link/ButtonWithLink.stories.js +31 -160
  14. package/src/components/atoms/checkbox/Checkbox.stories.js +29 -148
  15. package/src/components/atoms/country-dropdown/CountryDropdown.stories.js +27 -61
  16. package/src/components/atoms/detail/Detail.js +26 -0
  17. package/src/components/atoms/display-box/DisplayBox.stories.js +21 -65
  18. package/src/components/atoms/display-card/DisplayCard.stories.js +22 -163
  19. package/src/components/atoms/dropdown/Dropdown.stories.js +10 -91
  20. package/src/components/atoms/form-layouts/FormInput.stories.js +26 -212
  21. package/src/components/atoms/form-select/FormSelect.stories.js +29 -55
  22. package/src/components/atoms/formatted-address/FormattedAddress.stories.js +27 -133
  23. package/src/components/atoms/icons/icons.stories.js +116 -0
  24. package/src/components/atoms/labeled-amount/LabeledAmount.stories.js +34 -110
  25. package/src/components/atoms/line-item/LineItem.stories.js +22 -89
  26. package/src/components/atoms/link/Link.stories.js +49 -155
  27. package/src/components/atoms/loading-line/LoadingLine.js +10 -14
  28. package/src/components/atoms/loading-line/LoadingLine.stories.js +28 -132
  29. package/src/components/atoms/nav-footer/NavFooter.stories.js +22 -235
  30. package/src/components/atoms/nav-header/NavHeader.stories.js +21 -122
  31. package/src/components/atoms/password-requirements/PasswordRequirements.stories.js +44 -108
  32. package/src/components/atoms/placeholder/Placeholder.stories.js +36 -164
  33. package/src/components/atoms/searchable-select/SearchableSelect.stories.js +28 -103
  34. package/src/components/atoms/state-province-dropdown/StateProvinceDropdown.stories.js +40 -65
  35. package/src/components/atoms/table/Table.stories.js +75 -59
  36. package/src/components/atoms/table/TableRow.js +0 -1
  37. package/src/components/atoms/title/Title.js +23 -0
  38. package/src/components/atoms/toggle-switch/ToggleSwitch.stories.js +20 -103
  39. package/src/components/atoms/toggle-switch/ToggleSwitch.theme.js +5 -8
  40. package/src/components/molecules/address-form/AddressForm.stories.js +20 -223
  41. package/src/components/molecules/banner/Banner.stories.js +26 -122
  42. package/src/components/molecules/change-password-form/ChangePasswordForm.stories.js +19 -203
  43. package/src/components/molecules/collapsible-section/CollapsibleSection.stories.js +61 -210
  44. package/src/components/molecules/edit-name-form/EdidNameForm.stories.js +24 -0
  45. package/src/components/molecules/index.js +0 -1
  46. package/src/components/molecules/link-card/LinkCard.stories.js +72 -287
  47. package/src/components/molecules/login-form/LoginForm.stories.js +21 -117
  48. package/src/components/molecules/modal/Modal.stories.js +128 -342
  49. package/src/components/molecules/module/Module.stories.js +25 -267
  50. package/src/components/molecules/multiple-select-filter/MultipleSelectFilter.js +61 -295
  51. package/src/components/molecules/multiple-select-filter/{MultipleSelectFilter.oldstories.js → MultipleSelectFilter.stories.js} +1 -1
  52. package/src/components/molecules/multiple-select-filter/MultipleSelectFilter.styled.js +4 -4
  53. package/src/components/molecules/multiple-select-filter/__private__/ActionLinkButton.js +24 -0
  54. package/src/components/molecules/multiple-select-filter/__private__/FilterButton.js +85 -0
  55. package/src/components/molecules/multiple-select-filter/__private__/FilterDropdown.js +23 -0
  56. package/src/components/molecules/multiple-select-filter/__private__/FilterableList.js +144 -0
  57. package/src/components/molecules/multiple-select-filter/__private__/FilterableListItem.js +67 -0
  58. package/src/components/molecules/multiple-select-filter/__private__/SearchBox.js +38 -0
  59. package/src/components/molecules/multiple-select-filter/__private__/useKeyboardNavigation.js +84 -0
  60. package/src/components/molecules/multiple-select-filter/__private__/util.js +31 -0
  61. package/src/components/molecules/obligation/icons/PropertyPersonalIcon.js +1 -1
  62. package/src/components/molecules/pagination/Pagination.stories.js +28 -177
  63. package/src/components/molecules/tabs/Tabs.stories.js +227 -135
  64. package/src/components/molecules/toast-notification/ToastNotification.stories.js +105 -0
  65. package/src/hooks/use-outside-click/index.js +4 -5
  66. package/src/util/index.js +1 -3
  67. package/src/components/atoms/alert/Alert.mdx +0 -19
  68. package/src/components/atoms/badge/Badge.mdx +0 -27
  69. package/src/components/atoms/breadcrumb/Breadcrumb.mdx +0 -21
  70. package/src/components/atoms/button-with-link/ButtonWithLink.mdx +0 -21
  71. package/src/components/atoms/card/Card.mdx +0 -41
  72. package/src/components/atoms/card/Card.stories.js +0 -360
  73. package/src/components/atoms/checkbox/Checkbox.mdx +0 -15
  74. package/src/components/atoms/checkbox/Checkbox.oldstories.js +0 -30
  75. package/src/components/atoms/country-dropdown/CountryDropdown.mdx +0 -36
  76. package/src/components/atoms/detail/Detail.mdx +0 -32
  77. package/src/components/atoms/detail/Detail.stories.js +0 -156
  78. package/src/components/atoms/display-box/DisplayBox.mdx +0 -11
  79. package/src/components/atoms/display-card/DisplayCard.mdx +0 -13
  80. package/src/components/atoms/dropdown/Dropdown.mdx +0 -65
  81. package/src/components/atoms/form-layouts/FormInput.mdx +0 -38
  82. package/src/components/atoms/form-select/FormSelect.mdx +0 -42
  83. package/src/components/atoms/formatted-address/FormattedAddress.mdx +0 -13
  84. package/src/components/atoms/formatted-bank-account/FormattedBankAccount.mdx +0 -17
  85. package/src/components/atoms/formatted-bank-account/FormattedBankAccount.stories.js +0 -57
  86. package/src/components/atoms/formatted-credit-card/FormattedCreditCard.mdx +0 -40
  87. package/src/components/atoms/formatted-credit-card/FormattedCreditCard.stories.js +0 -74
  88. package/src/components/atoms/icons/Icons.mdx +0 -40
  89. package/src/components/atoms/icons/Icons.stories.js +0 -325
  90. package/src/components/atoms/labeled-amount/LabeledAmount.mdx +0 -23
  91. package/src/components/atoms/line-item/LineItem.mdx +0 -28
  92. package/src/components/atoms/link/Link.mdx +0 -19
  93. package/src/components/atoms/loading/Loading.mdx +0 -13
  94. package/src/components/atoms/loading/Loading.stories.js +0 -22
  95. package/src/components/atoms/loading-line/LoadingLine.mdx +0 -15
  96. package/src/components/atoms/nav-footer/NavFooter.mdx +0 -15
  97. package/src/components/atoms/nav-header/NavHeader.mdx +0 -13
  98. package/src/components/atoms/nav-tabs/NavTabs.mdx +0 -30
  99. package/src/components/atoms/nav-tabs/NavTabs.stories.js +0 -49
  100. package/src/components/atoms/password-requirements/PasswordRequirements.mdx +0 -39
  101. package/src/components/atoms/placeholder/Placeholder.mdx +0 -19
  102. package/src/components/atoms/searchable-select/SearchableSelect.mdx +0 -44
  103. package/src/components/atoms/state-province-dropdown/StateProvinceDropdown.mdx +0 -36
  104. package/src/components/atoms/table/Table.mdx +0 -71
  105. package/src/components/atoms/table/Table.oldstories.js +0 -84
  106. package/src/components/atoms/title/Title.mdx +0 -26
  107. package/src/components/atoms/title/Title.stories.js +0 -144
  108. package/src/components/atoms/toggle-switch/ToggleSwitch.mdx +0 -17
  109. package/src/components/atoms/typeahead-input/TypeaheadInput.mdx +0 -13
  110. package/src/components/atoms/typeahead-input/TypeaheadInput.stories.js +0 -63
  111. package/src/components/molecules/address-form/AddressForm.mdx +0 -18
  112. package/src/components/molecules/banner/Banner.mdx +0 -23
  113. package/src/components/molecules/change-password-form/ChangePasswordForm.mdx +0 -15
  114. package/src/components/molecules/collapsible-section/CollapsibleSection.mdx +0 -15
  115. package/src/components/molecules/edit-name-form/EditNameForm.mdx +0 -13
  116. package/src/components/molecules/edit-name-form/EditNameForm.stories.js +0 -117
  117. package/src/components/molecules/idle-modal/IdleModal.js +0 -101
  118. package/src/components/molecules/idle-modal/IdleModal.mdx +0 -17
  119. package/src/components/molecules/idle-modal/IdleModal.stories.js +0 -180
  120. package/src/components/molecules/idle-modal/index.d.ts +0 -16
  121. package/src/components/molecules/idle-modal/index.js +0 -3
  122. package/src/components/molecules/link-card/LinkCard.mdx +0 -17
  123. package/src/components/molecules/login-form/LoginForm.mdx +0 -16
  124. package/src/components/molecules/modal/Modal.mdx +0 -17
  125. package/src/components/molecules/module/Module.mdx +0 -17
  126. package/src/components/molecules/obligation/Obligation.mdx +0 -23
  127. package/src/components/molecules/obligation/Obligation.stories.js +0 -460
  128. package/src/components/molecules/pagination/Pagination.mdx +0 -15
  129. package/src/components/molecules/popover/Popover.mdx +0 -15
  130. package/src/components/molecules/popover/Popover.stories.js +0 -220
  131. package/src/components/molecules/tabs/Tabs.mdx +0 -17
  132. package/src/components/molecules/toast-notification/Toast.mdx +0 -15
  133. package/src/components/molecules/toast-notification/Toast.stories.js +0 -183
  134. package/src/stories/Button.stories.ts +0 -53
  135. package/src/stories/Button.tsx +0 -48
  136. package/src/stories/Configure.mdx +0 -364
  137. package/src/stories/Header.stories.ts +0 -33
  138. package/src/stories/Header.tsx +0 -56
  139. package/src/stories/Page.stories.ts +0 -32
  140. package/src/stories/Page.tsx +0 -73
  141. package/src/stories/assets/accessibility.png +0 -0
  142. package/src/stories/assets/accessibility.svg +0 -5
  143. package/src/stories/assets/addon-library.png +0 -0
  144. package/src/stories/assets/assets.png +0 -0
  145. package/src/stories/assets/avif-test-image.avif +0 -0
  146. package/src/stories/assets/context.png +0 -0
  147. package/src/stories/assets/discord.svg +0 -15
  148. package/src/stories/assets/docs.png +0 -0
  149. package/src/stories/assets/figma-plugin.png +0 -0
  150. package/src/stories/assets/github.svg +0 -3
  151. package/src/stories/assets/share.png +0 -0
  152. package/src/stories/assets/styling.png +0 -0
  153. package/src/stories/assets/testing.png +0 -0
  154. package/src/stories/assets/theming.png +0 -0
  155. package/src/stories/assets/tutorials.svg +0 -12
  156. package/src/stories/assets/youtube.svg +0 -4
  157. package/src/stories/button.css +0 -30
  158. package/src/stories/header.css +0 -32
  159. package/src/stories/page.css +0 -69
  160. package/src/util/idleTimerUtils.js +0 -36
  161. /package/src/components/atoms/add-obligation/{AddObligation.oldstories.js → AddObligation.stories.js} +0 -0
  162. /package/src/components/atoms/amount-callout/{AmountCallout.oldstories.js → AmountCallout.stories.js} +0 -0
  163. /package/src/components/atoms/checkbox-list/{CheckboxList.oldstories.js → CheckboxList.stories.js} +0 -0
  164. /package/src/components/atoms/form-layouts/{FormLayouts.oldstories.js → FormLayouts.stories.js} +0 -0
  165. /package/src/components/atoms/hamburger-button/{HamburgerButton.oldstories.js → HamburgerButton.stories.js} +0 -0
  166. /package/src/components/atoms/heading/{Heading.oldstories.js → Heading.stories.js} +0 -0
  167. /package/src/components/atoms/layouts/examples/box-example/{BoxExample.oldstories.js → BoxExample.stories.js} +0 -0
  168. /package/src/components/atoms/layouts/examples/center-example/{CenterExample.oldstories.js → CenterExample.stories.js} +0 -0
  169. /package/src/components/atoms/layouts/examples/cluster-example/{ClusterExample.oldstories.js → ClusterExample.stories.js} +0 -0
  170. /package/src/components/atoms/layouts/examples/cover-example/{CoverExample.oldstories.js → CoverExample.stories.js} +0 -0
  171. /package/src/components/atoms/layouts/examples/frame-example/{FrameExample.oldstories.js → FrameExample.stories.js} +0 -0
  172. /package/src/components/atoms/layouts/examples/grid-example/{GridExample.oldstories.js → GridExample.stories.js} +0 -0
  173. /package/src/components/atoms/layouts/examples/imposter-example/{ImposterExample.oldstories.js → ImposterExample.stories.js} +0 -0
  174. /package/src/components/atoms/layouts/examples/motion-example/{MotionExample.oldstories.js → MotionExample.stories.js} +0 -0
  175. /package/src/components/atoms/layouts/examples/reel-example/{ReelExample.oldstories.js → ReelExample.stories.js} +0 -0
  176. /package/src/components/atoms/layouts/examples/sidebar-example/{SidebarExample.oldstories.js → SidebarExample.stories.js} +0 -0
  177. /package/src/components/atoms/layouts/examples/stack-example/{StackExample.oldstories.js → StackExample.stories.js} +0 -0
  178. /package/src/components/atoms/layouts/examples/switcher-example/{SwitcherExample.oldstories.js → SwitcherExample.stories.js} +0 -0
  179. /package/src/components/atoms/paragraph/{Paragraph.oldstories.js → Paragraph.stories.js} +0 -0
  180. /package/src/components/atoms/processing-fee/{ProcessingFee.oldstories.js → ProcessingFee.stories.js} +0 -0
  181. /package/src/components/atoms/search/{Search.oldstories.js → Search.stories.js} +0 -0
  182. /package/src/components/atoms/solid-divider/{SolidDivider.oldstories.js → SolidDivider.stories.js} +0 -0
  183. /package/src/components/atoms/sortable-table-heading/{SortableTableHeading.oldstories.js → SortableTableHeading.stories.js} +0 -0
  184. /package/src/components/atoms/spinner/{Spinner.oldstories.js → Spinner.stories.js} +0 -0
  185. /package/src/components/atoms/tab/{Tab.oldstories.js → Tab.stories.js} +0 -0
  186. /package/src/components/atoms/text/{Text.oldstories.js → Text.stories.js} +0 -0
  187. /package/src/components/atoms/typeahead-input/{TypeaheadIinput.oldstories.js → TypeaheadIinput.stories.js} +0 -0
  188. /package/src/components/atoms/wallet-name/{WalletName.oldstories.js → WalletName.stories.js} +0 -0
  189. /package/src/components/molecules/account-and-routing-modal/{AccountAndRoutingModal.oldstories.js → AccountAndRoutingModal.stories.js} +0 -0
  190. /package/src/components/molecules/editable-list/{EditableList.oldstories.js → EditableList.stories.js} +0 -0
  191. /package/src/components/molecules/email-form/{EmailForm.oldstories.js → EmailForm.stories.js} +0 -0
  192. /package/src/components/molecules/forgot-password-form/{ForgotPasswordForm.oldstories.js → ForgotPasswordForm.stories.js} +0 -0
  193. /package/src/components/molecules/highlight-tab-row/{HighlightTabRow.oldstories.js → HighlightTabRow.stories.js} +0 -0
  194. /package/src/components/molecules/obligation/modules/{AmountModule.oldstories.js → AmountModule.stories.js} +0 -0
  195. /package/src/components/molecules/payment-button-bar/{PaymentButtonBar.oldstories.js → PaymentButtonBar.stories.js} +0 -0
  196. /package/src/components/molecules/payment-details/{PaymentDetails.oldstories.js → PaymentDetails.stories.js} +0 -0
  197. /package/src/components/molecules/payment-form-ach/{PaymentFormACH.oldstories.js → PaymentFormACH.stories.js} +0 -0
  198. /package/src/components/molecules/payment-form-card/{PaymentFormCard.oldstories.js → PaymentFormCard.stories.js} +0 -0
  199. /package/src/components/molecules/periscope-dashboard-iframe/{PeriscopeDashBoardIframe.oldstories.js → PeriscopeDashBoardIframe.stories.js} +0 -0
  200. /package/src/components/molecules/phone-form/{PhoneForm.oldstories.js → PhoneForm.stories.js} +0 -0
  201. /package/src/components/molecules/popup-menu/{PopupMenu.oldstories.js → PopupMenu.stories.js} +0 -0
  202. /package/src/components/molecules/radio-group/{RadioGroup.oldstories.js → RadioGroup.stories.js} +0 -0
  203. /package/src/components/molecules/radio-section/{RadioSection.oldstories.js → RadioSection.stories.js} +0 -0
  204. /package/src/components/molecules/registration-form/{RegistrationForm.oldstories.js → RegistrationForm.stories.js} +0 -0
  205. /package/src/components/molecules/reset-confirmation-form/{ResetConfirmationForm.oldstories.js → ResetConfirmationForm.stories.js} +0 -0
  206. /package/src/components/molecules/reset-password-form/{ResetPasswordForm.oldstories.js → ResetPasswordForm.stories.js} +0 -0
  207. /package/src/components/molecules/reset-password-success/{ResetPasswordSuccess.oldstories.js → ResetPasswordSuccess.stories.js} +0 -0
  208. /package/src/components/molecules/tab-sidebar/{TabSidebar.oldstories.js → TabSidebar.stories.js} +0 -0
  209. /package/src/components/molecules/terms-and-conditions/{TermsAndConditions.oldstories.js → TermsAndConditions.stories.js} +0 -0
  210. /package/src/components/molecules/terms-and-conditions-modal/{TermsAndConditionsModal.oldstories.js → TermsAndConditionsModal.stories.js} +0 -0
  211. /package/src/components/molecules/workflow-tile/{WorkflowTile.oldstories.js → WorkflowTile.stories.js} +0 -0
@@ -1,138 +1,32 @@
1
- import FormattedAddress from "./FormattedAddress";
2
1
  import React from "react";
2
+ import { select, text } from "@storybook/addon-knobs";
3
+ import FormattedAddress from "./FormattedAddress";
4
+ import page from "../../../../.storybook/page";
3
5
 
4
- const meta = {
5
- title: "Atoms/FormattedAddress",
6
- component: FormattedAddress,
7
- parameters: {
8
- layout: "centered",
9
- controls: { expanded: true }
10
- },
11
- tags: ["!autodocs"],
12
- args: {
13
- street1: undefined,
14
- city: undefined,
15
- stateProvince: undefined,
16
- country: undefined,
17
- zip: undefined,
18
- street2: null,
19
- name: null,
20
- themeValues: undefined,
21
- qaPrefix: "address"
22
- },
23
- argTypes: {
24
- street1: {
25
- control: { type: "text" },
26
- table: {
27
- type: { summary: "string" },
28
- defaultValue: { summary: undefined }
29
- }
30
- },
31
- street2: {
32
- description: "Optional",
33
- control: { type: "text" },
34
- table: {
35
- type: { summary: "string" },
36
- defaultValue: { summary: null }
37
- }
38
- },
39
- city: {
40
- control: { type: "text" },
41
- table: {
42
- type: { summary: "string" },
43
- defaultValue: { summary: undefined }
44
- }
45
- },
46
- stateProvince: {
47
- control: { type: "text" },
48
- table: {
49
- type: { summary: "string" },
50
- defaultValue: { summary: undefined }
51
- }
52
- },
53
- country: {
54
- description: "Optional",
55
- control: { type: "text" },
56
- table: {
57
- type: { summary: "string" },
58
- defaultValue: { summary: undefined }
59
- }
60
- },
61
- zip: {
62
- control: { type: "text" },
63
- table: {
64
- type: { summary: "string" },
65
- defaultValue: { summary: undefined }
66
- }
67
- },
68
- name: {
69
- description: "Optional",
70
- control: { type: "text" },
71
- table: {
72
- type: { summary: "string" },
73
- defaultValue: { summary: null }
74
- }
75
- },
76
- qaPrefix: {
77
- control: { type: "text" },
78
- table: {
79
- type: { summary: "string" },
80
- defaultValue: { summary: "address" }
81
- }
82
- }
83
- }
84
- };
85
-
86
- export default meta;
87
-
88
- export const Basic = {
89
- args: {
90
- street1: "363 W. Erie St.",
91
- city: "Chicago",
92
- stateProvince: "IL",
93
- zip: "60654"
94
- }
95
- };
96
-
97
- export const WithName = {
98
- args: {
99
- street1: "363 W. Erie St.",
100
- city: "Chicago",
101
- stateProvince: "IL",
102
- zip: "60654",
103
- name: "John Doe"
104
- }
6
+ const variantsLabel = "variant";
7
+ const variants = {
8
+ default: "default",
9
+ radio: "radio",
10
+ None: undefined
105
11
  };
12
+ const defaultValue = "default";
13
+ const groupId = "props";
106
14
 
107
- export const WithStreet2 = {
108
- args: {
109
- street1: "363 W. Erie St.",
110
- city: "Chicago",
111
- stateProvince: "IL",
112
- zip: "60654",
113
- street2: "Floor 7"
114
- }
115
- };
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
+ );
116
27
 
117
- export const WithCountry = {
118
- args: {
119
- street1: "363 W. Erie St.",
120
- city: "Chicago",
121
- stateProvince: "IL",
122
- zip: "60654",
123
- country: "USA"
124
- }
125
- };
126
-
127
- export const WithAllProps = {
128
- args: {
129
- name: "John Doe",
130
- street1: "363 W. Erie St.",
131
- street2: "Floor 7",
132
- city: "Chicago",
133
- stateProvince: "IL",
134
- zip: "60654",
135
- country: "USA",
136
- qaPrefix: "all-props"
137
- }
138
- };
28
+ const story = page({
29
+ title: "Components|Atoms/FormattedAddress",
30
+ Component: FormattedAddress
31
+ });
32
+ export default story;
@@ -0,0 +1,116 @@
1
+ import React from "react";
2
+
3
+ import page from "../../../../.storybook/page";
4
+ import {
5
+ AccountsIcon,
6
+ AccountsAddIcon,
7
+ CaretArrowDown,
8
+ CaretArrowUp,
9
+ ForgotPasswordIcon,
10
+ GoToEmailIcon,
11
+ VerifiedEmailIcon,
12
+ PaymentMethodIcon,
13
+ AccountsIconSmall,
14
+ PaymentsIconSmall,
15
+ ProfileIconSmall,
16
+ SettingsIconSmall,
17
+ ChevronIcon,
18
+ PropertiesAddIcon,
19
+ PropertiesIconSmall,
20
+ AccountNumberImage,
21
+ RoutingNumberImage,
22
+ CheckmarkIcon,
23
+ BankIcon,
24
+ GenericCard,
25
+ AutopayOnIcon,
26
+ SearchIcon,
27
+ AchReturnIcon,
28
+ AllocatedIcon,
29
+ CalendarIcon,
30
+ ChargebackIcon,
31
+ ChargebackReversalIcon,
32
+ DuplicateIcon,
33
+ ErroredIcon,
34
+ FailedIcon,
35
+ PencilIcon,
36
+ PendingIcon,
37
+ PlusCircleIcon,
38
+ RefundIcon,
39
+ RejectedIcon,
40
+ RejectedVelocityIcon,
41
+ SuccessfulIcon,
42
+ VoidedIcon,
43
+ StatusUnknownIcon,
44
+ AutopayIcon,
45
+ KebabMenuIcon,
46
+ MultiCartIcon,
47
+ NoResultsIcon,
48
+ CloseIcon,
49
+ TrashIconV2,
50
+ DisabledPropertiesAddIcon,
51
+ DisabledAccountsAddIcon,
52
+ DisabledPaymentMethodsAddIcon,
53
+ ReversalNeededIcon,
54
+ OverageIcon,
55
+ ShortageIcon
56
+ } from "./index";
57
+
58
+ const story = page({
59
+ title: "Components|atoms/Icons",
60
+ Component: AccountsIcon
61
+ });
62
+ export default story;
63
+
64
+ export const accountNumberImage = () => <AccountNumberImage />;
65
+ export const accountsAddIcon = () => <AccountsAddIcon />;
66
+ export const accountsIcon = () => <AccountsIcon />;
67
+ export const accountsIconSmall = () => <AccountsIconSmall />;
68
+ export const achReturnIcon = () => <AchReturnIcon />;
69
+ export const allocatedIcon = () => <AllocatedIcon />;
70
+ export const autopayIcon = () => <AutopayIcon />;
71
+ export const autopayOnIcon = () => <AutopayOnIcon />;
72
+ export const bankIcon = () => <BankIcon />;
73
+ export const calendarIcon = () => <CalendarIcon />;
74
+ export const caretArrowDown = () => <CaretArrowDown />;
75
+ export const caretArrowUp = () => <CaretArrowUp />;
76
+ export const chargebackIcon = () => <ChargebackIcon />;
77
+ export const chargebackReversalIcon = () => <ChargebackReversalIcon />;
78
+ export const checkmarkIcon = () => <CheckmarkIcon />;
79
+ export const chevronIcon = () => <ChevronIcon />;
80
+ export const closeIcon = () => <CloseIcon />;
81
+ export const disabledAccountsAddIcon = () => <DisabledAccountsAddIcon />;
82
+ export const disabledPaymentMethodsAddIcon = () => (
83
+ <DisabledPaymentMethodsAddIcon />
84
+ );
85
+ export const disabledPropertiesAddIcon = () => <DisabledPropertiesAddIcon />;
86
+ export const duplicateIcon = () => <DuplicateIcon />;
87
+ export const erroredIcon = () => <ErroredIcon />;
88
+ export const failedIcon = () => <FailedIcon />;
89
+ export const forgotPasswordIcon = () => <ForgotPasswordIcon />;
90
+ export const genericCard = () => <GenericCard />;
91
+ export const goToEmailIcon = () => <GoToEmailIcon />;
92
+ export const kebabMenuIcon = () => <KebabMenuIcon />;
93
+ export const multiCartIcon = () => <MultiCartIcon />;
94
+ export const noResultsIcon = () => <NoResultsIcon />;
95
+ export const overageIcon = () => <OverageIcon />;
96
+ export const paymentMethodIcon = () => <PaymentMethodIcon />;
97
+ export const paymentsIconSmall = () => <PaymentsIconSmall />;
98
+ export const pencilIcon = () => <PencilIcon />;
99
+ export const pendingIcon = () => <PendingIcon />;
100
+ export const plusCircleIcon = () => <PlusCircleIcon />;
101
+ export const profileIconSmall = () => <ProfileIconSmall />;
102
+ export const propertiesAddIcon = () => <PropertiesAddIcon />;
103
+ export const propertiesIconSmall = () => <PropertiesIconSmall />;
104
+ export const refundIcon = () => <RefundIcon />;
105
+ export const rejectedIcon = () => <RejectedIcon />;
106
+ export const rejectedVelocityIcon = () => <RejectedVelocityIcon />;
107
+ export const reversalNeededIcon = () => <ReversalNeededIcon />;
108
+ export const routingNumberImage = () => <RoutingNumberImage />;
109
+ export const searchIcon = () => <SearchIcon />;
110
+ export const settingsIconSmall = () => <SettingsIconSmall />;
111
+ export const shortageIcon = () => <ShortageIcon />;
112
+ export const statusUnknownIcon = () => <StatusUnknownIcon />;
113
+ export const successfulIcon = () => <SuccessfulIcon />;
114
+ export const trashIconV2 = () => <TrashIconV2 />;
115
+ export const verifiedEmailIcon = () => <VerifiedEmailIcon />;
116
+ export const voidedIcon = () => <VoidedIcon />;
@@ -1,118 +1,42 @@
1
+ import React from "react";
2
+ import { text, select } from "@storybook/addon-knobs";
1
3
  import LabeledAmount from "./LabeledAmount";
2
- import { Box } from "../layouts";
4
+ import page from "../../../../.storybook/page";
3
5
 
4
- const meta = {
5
- title: "Atoms/LabeledAmount",
6
- component: LabeledAmount,
7
- parameters: {
8
- layout: "centered"
9
- },
10
- tags: ["!autodocs"],
11
- args: {
12
- version: "v2",
13
- variant: "regular",
14
- label: "Subtotal:",
15
- amount: "$102.55",
16
- as: "h3",
17
- extraStyles: undefined
18
- },
19
- argTypes: {
20
- version: {
21
- description:
22
- "The verison (v1 or v2) of the LabeledAmount component to use",
23
- table: {
24
- type: { summary: "string" },
25
- defaultValue: { summary: "v1" }
26
- }
27
- },
28
- variant: {
29
- description:
30
- "The variant (regular, extraSmall, small, large) of the LabeledAmount component to use",
31
- table: {
32
- type: { summary: "string" },
33
- defaultValue: { summary: "regular" }
34
- }
35
- },
36
- label: {
37
- description: "The label to place before the amount",
38
- table: {
39
- type: { summary: "string" },
40
- defaultValue: { summary: undefined }
41
- }
42
- },
43
- amount: {
44
- description: "The formatted amount value to display, as a money string",
45
- table: {
46
- type: { summary: "string" },
47
- defaultValue: { summary: undefined }
48
- }
49
- },
50
- as: {
51
- description:
52
- "The HTML element to render the component as, generally h or p element",
53
- table: {
54
- type: { summary: "string" },
55
- defaultValue: { summary: "p" }
56
- }
57
- },
58
- extraStyles: {
59
- description: "Extra styles used for wrapping container",
60
- table: {
61
- type: { summary: "string" },
62
- defaultvalue: { summary: undefined }
63
- }
64
- }
65
- }
6
+ const variantsLabel = "variant";
7
+ const variants = {
8
+ default: "default",
9
+ p: "p",
10
+ pL: "pL",
11
+ h6: "h6",
12
+ small: "small",
13
+ regular: "regular",
14
+ large: "large",
15
+ None: undefined
66
16
  };
17
+ const defaultValue = "default";
67
18
 
68
- export default meta;
69
-
70
- export const LabeledAmountDefault = {
71
- render: args => (
72
- <Box minWidth="300px" padding="0">
73
- <LabeledAmount {...args} />
74
- </Box>
75
- )
19
+ const versionsLabel = "version";
20
+ const versions = {
21
+ v1: "v1",
22
+ v2: "v2"
76
23
  };
24
+ const defaultVersion = "v1";
77
25
 
78
- export const LabeledAmountHeading = {
79
- render: args => (
80
- <Box minWidth="450px" padding="0">
81
- <LabeledAmount {...args} />
82
- </Box>
83
- ),
84
- args: {
85
- as: "h3",
86
- label: "Total paid:",
87
- amount: "$626.93",
88
- variant: "large"
89
- }
90
- };
26
+ const groupId = "props";
91
27
 
92
- export const ExtraSmallLabeledAmount = {
93
- render: args => (
94
- <Box minWidth="150px" padding="0">
95
- <LabeledAmount {...args} />
96
- </Box>
97
- ),
98
- args: {
99
- as: "h6",
100
- label: "Fees:",
101
- amount: "$2.50",
102
- variant: "extraSmall"
103
- }
104
- };
28
+ export const labeledAmount = () => (
29
+ <LabeledAmount
30
+ variant={select(variantsLabel, variants, defaultValue, groupId)}
31
+ as={text("as", "p", groupId)}
32
+ label={text("label", "Amount", groupId)}
33
+ amount={text("amount", "$1.23", groupId)}
34
+ version={select(versionsLabel, versions, defaultVersion, groupId)}
35
+ />
36
+ );
105
37
 
106
- export const SmallLabeledAmount = {
107
- render: args => (
108
- <Box minWidth="150px" padding="0">
109
- <LabeledAmount {...args} />
110
- </Box>
111
- ),
112
- args: {
113
- as: "h4",
114
- label: "Tax:",
115
- amount: "$20.75",
116
- variant: "small"
117
- }
118
- };
38
+ const story = page({
39
+ title: "Components|Atoms/LabeledAmount",
40
+ Component: LabeledAmount
41
+ });
42
+ export default story;
@@ -1,95 +1,28 @@
1
1
  import React from "react";
2
- import LineItem from "./LineItem";
3
- import DisplayBox from "../display-box/DisplayBox";
4
- import { Box } from "../layouts";
5
-
6
- const meta = {
7
- title: "Atoms/LineItem",
8
- component: LineItem,
9
- parameters: {
10
- layout: "centered"
11
- },
12
- tags: ["!autodocs"],
13
- args: {
14
- description: "",
15
- subDescription: "",
16
- amount: "",
17
- customAttributes: undefined,
18
- visibleFields: [],
19
- displayQuantity: null
20
- },
21
- argTypes: {
22
- description: {
23
- description: "The main description of the lineItem",
24
- table: {
25
- type: { summary: "string" },
26
- defaultValue: { summary: undefined }
27
- }
28
- },
29
- subDescription: {
30
- description: "Secondary description of the lineItem",
31
- table: {
32
- type: { summary: "string" },
33
- defaultValue: { summary: undefined }
34
- }
35
- },
36
- amount: {
37
- description: "The amount in a formatted string of the lineItem",
38
- table: {
39
- type: { summary: "string" },
40
- defaultValue: { summary: undefined }
41
- }
42
- },
43
- customAttributes: {
44
- description:
45
- "A lineItem's custom attributes, currently unused functionality",
46
- table: {
47
- type: { summary: "array" },
48
- defaultValue: { summary: undefined }
49
- }
50
- },
51
- visibleFields: {
52
- description:
53
- "An array of customAttributes to display below the subDescription, currently unused",
54
- table: {
55
- type: { summary: "array" },
56
- defaultValue: { summary: [] }
57
- }
58
- },
59
- displayQuantity: {
60
- description:
61
- "The quantity of the lineItem. Will only display if provided.",
62
- table: {
63
- type: { summary: "number" },
64
- defaultValue: { summary: undefined }
65
- }
66
- }
67
- }
68
- };
2
+ import { text } from "@storybook/addon-knobs";
69
3
 
70
- export default meta;
4
+ import LineItem from "./LineItem";
5
+ import page from "../../../../.storybook/page";
71
6
 
72
- export const BasicLineItem = {
73
- args: {
74
- description: "Dog Registration Permit",
75
- subDescription: "Small dogs under 50lbs (valid until 2026)",
76
- amount: "$75.00"
77
- }
78
- };
7
+ const story = page({
8
+ title: "Components|Atoms/LineItem",
9
+ Component: LineItem
10
+ });
11
+ export default story;
79
12
 
80
- const FancyLineItem = props => (
81
- <DisplayBox>
82
- <Box minWidth="400px" padding="0">
83
- <LineItem
84
- description="Masked Ball Permits"
85
- subDescription="One permit per 10 attendees"
86
- amount="$625.00"
87
- displayQuantity={25}
88
- />
89
- </Box>
90
- </DisplayBox>
13
+ export const lineItem = () => (
14
+ <LineItem
15
+ description={text("description", "Foo", "props")}
16
+ subDescription={text("subDescription", "Bar", "props")}
17
+ amount={text("amount", "$4.00", "props")}
18
+ />
91
19
  );
92
20
 
93
- export const LineItemWithQuantity = {
94
- render: args => <FancyLineItem {...args} />
95
- };
21
+ export const lineItemWithQuantity = () => (
22
+ <LineItem
23
+ description={text("description", "Foo", "props")}
24
+ subDescription={text("subDescription", "Bar", "props")}
25
+ amount={text("amount", "$4.00", "props")}
26
+ displayQuantity={2}
27
+ />
28
+ );