@thecb/components 2.2.0

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 (308) hide show
  1. package/.eslintrc.json +29 -0
  2. package/.github/PULL_REQUEST_TEMPLATE.md +18 -0
  3. package/.github/stale.yml +17 -0
  4. package/.prettierignore +3 -0
  5. package/.tool-versions +1 -0
  6. package/README.md +149 -0
  7. package/dist/cb-components.cjs.js +77 -0
  8. package/package.json +96 -0
  9. package/rollup.config.js +35 -0
  10. package/src/components/atoms/alert/Alert.js +67 -0
  11. package/src/components/atoms/alert/Alert.theme.js +71 -0
  12. package/src/components/atoms/alert/index.js +3 -0
  13. package/src/components/atoms/amount-callout/AmountCallout.js +27 -0
  14. package/src/components/atoms/amount-callout/AmountCallout.theme.js +19 -0
  15. package/src/components/atoms/amount-callout/index.js +3 -0
  16. package/src/components/atoms/breadcrumb/Breadcrumb.js +50 -0
  17. package/src/components/atoms/breadcrumb/Breadcrumb.theme.js +25 -0
  18. package/src/components/atoms/breadcrumb/index.js +3 -0
  19. package/src/components/atoms/button-with-action/ButtonWithAction.js +128 -0
  20. package/src/components/atoms/button-with-action/ButtonWithAction.stories.js +125 -0
  21. package/src/components/atoms/button-with-action/ButtonWithAction.theme.js +360 -0
  22. package/src/components/atoms/button-with-action/index.js +3 -0
  23. package/src/components/atoms/button-with-link/ButtonWithLink.js +40 -0
  24. package/src/components/atoms/button-with-link/index.js +3 -0
  25. package/src/components/atoms/checkbox/Checkbox.js +143 -0
  26. package/src/components/atoms/checkbox/Checkbox.theme.js +54 -0
  27. package/src/components/atoms/checkbox/index.js +3 -0
  28. package/src/components/atoms/checkbox-list/CheckboxList.js +129 -0
  29. package/src/components/atoms/checkbox-list/CheckboxList.theme.js +42 -0
  30. package/src/components/atoms/checkbox-list/index.js +3 -0
  31. package/src/components/atoms/country-dropdown/CountryDropdown.js +24 -0
  32. package/src/components/atoms/country-dropdown/index.js +1 -0
  33. package/src/components/atoms/country-dropdown/options.js +249 -0
  34. package/src/components/atoms/display-box/DisplayBox.js +22 -0
  35. package/src/components/atoms/display-box/DisplayBox.theme.js +9 -0
  36. package/src/components/atoms/display-box/index.js +3 -0
  37. package/src/components/atoms/display-card/DisplayCard.js +65 -0
  38. package/src/components/atoms/display-card/index.js +3 -0
  39. package/src/components/atoms/dropdown/Dropdown.js +299 -0
  40. package/src/components/atoms/dropdown/Dropdown.theme.js +9 -0
  41. package/src/components/atoms/dropdown/DropdownIcon.js +31 -0
  42. package/src/components/atoms/dropdown/index.js +3 -0
  43. package/src/components/atoms/form-layouts/FormContainer.js +28 -0
  44. package/src/components/atoms/form-layouts/FormInput.js +218 -0
  45. package/src/components/atoms/form-layouts/FormInputColumn.js +15 -0
  46. package/src/components/atoms/form-layouts/FormInputRow.js +26 -0
  47. package/src/components/atoms/form-layouts/FormLayouts.theme.js +52 -0
  48. package/src/components/atoms/form-layouts/index.js +6 -0
  49. package/src/components/atoms/form-select/FormSelect.js +62 -0
  50. package/src/components/atoms/form-select/FormSelect.styled.js +65 -0
  51. package/src/components/atoms/form-select/index.js +3 -0
  52. package/src/components/atoms/formatted-address/FormattedAddress.js +53 -0
  53. package/src/components/atoms/formatted-address/FormattedAddress.theme.js +11 -0
  54. package/src/components/atoms/formatted-address/index.js +3 -0
  55. package/src/components/atoms/hamburger-button/HamburgerButton.js +113 -0
  56. package/src/components/atoms/hamburger-button/index.js +3 -0
  57. package/src/components/atoms/heading/Heading.js +37 -0
  58. package/src/components/atoms/heading/Heading.styled.js +14 -0
  59. package/src/components/atoms/heading/Heading.theme.js +18 -0
  60. package/src/components/atoms/heading/index.js +3 -0
  61. package/src/components/atoms/icons/AccountsAddIcon.js +42 -0
  62. package/src/components/atoms/icons/AccountsIcon.js +37 -0
  63. package/src/components/atoms/icons/AccountsIconSmall.js +63 -0
  64. package/src/components/atoms/icons/ChevronIcon.js +51 -0
  65. package/src/components/atoms/icons/ForgotPasswordIcon.js +46 -0
  66. package/src/components/atoms/icons/GoToEmailIcon.js +31 -0
  67. package/src/components/atoms/icons/Icons.theme.js +38 -0
  68. package/src/components/atoms/icons/PaymentMethodIcon.js +42 -0
  69. package/src/components/atoms/icons/PaymentsIconSmall.js +63 -0
  70. package/src/components/atoms/icons/ProfileIconSmall.js +44 -0
  71. package/src/components/atoms/icons/PropertiesAddIcon.js +70 -0
  72. package/src/components/atoms/icons/PropertiesIconSmall.js +32 -0
  73. package/src/components/atoms/icons/SettingsIconSmall.js +63 -0
  74. package/src/components/atoms/icons/VerifiedEmailIcon.js +53 -0
  75. package/src/components/atoms/icons/index.js +28 -0
  76. package/src/components/atoms/index.js +33 -0
  77. package/src/components/atoms/labeled-amount/LabeledAmount.js +35 -0
  78. package/src/components/atoms/labeled-amount/LabeledAmount.theme.js +10 -0
  79. package/src/components/atoms/labeled-amount/index.js +3 -0
  80. package/src/components/atoms/layouts/Box.js +83 -0
  81. package/src/components/atoms/layouts/Box.styled.js +131 -0
  82. package/src/components/atoms/layouts/Center.js +28 -0
  83. package/src/components/atoms/layouts/Center.styled.js +18 -0
  84. package/src/components/atoms/layouts/Cluster.js +37 -0
  85. package/src/components/atoms/layouts/Cluster.styled.js +21 -0
  86. package/src/components/atoms/layouts/Cover.js +49 -0
  87. package/src/components/atoms/layouts/Cover.styled.js +29 -0
  88. package/src/components/atoms/layouts/Frame.js +28 -0
  89. package/src/components/atoms/layouts/Frame.styled.js +27 -0
  90. package/src/components/atoms/layouts/Grid.js +38 -0
  91. package/src/components/atoms/layouts/Grid.styled.js +22 -0
  92. package/src/components/atoms/layouts/Imposter.js +52 -0
  93. package/src/components/atoms/layouts/Imposter.styled.js +19 -0
  94. package/src/components/atoms/layouts/Motion.js +51 -0
  95. package/src/components/atoms/layouts/Motion.styled.js +41 -0
  96. package/src/components/atoms/layouts/Reel.js +28 -0
  97. package/src/components/atoms/layouts/Reel.styled.js +17 -0
  98. package/src/components/atoms/layouts/Sidebar.js +42 -0
  99. package/src/components/atoms/layouts/Sidebar.styled.js +38 -0
  100. package/src/components/atoms/layouts/Stack.js +36 -0
  101. package/src/components/atoms/layouts/Stack.styled.js +30 -0
  102. package/src/components/atoms/layouts/Switcher.js +64 -0
  103. package/src/components/atoms/layouts/Switcher.styled.js +44 -0
  104. package/src/components/atoms/layouts/examples/FixedSizeContainer.js +22 -0
  105. package/src/components/atoms/layouts/examples/FixedSizeContainer.styled.js +20 -0
  106. package/src/components/atoms/layouts/examples/LayoutContentBlock.js +27 -0
  107. package/src/components/atoms/layouts/examples/LayoutContentBlock.styled.js +15 -0
  108. package/src/components/atoms/layouts/examples/ResizingContainer.js +49 -0
  109. package/src/components/atoms/layouts/examples/ResizingContainer.styled.js +39 -0
  110. package/src/components/atoms/layouts/examples/cluster-example/ClusterExample.js +10 -0
  111. package/src/components/atoms/layouts/examples/cluster-example/ClusterExample.stories.js +97 -0
  112. package/src/components/atoms/layouts/examples/grid-example/GridExample.js +49 -0
  113. package/src/components/atoms/layouts/examples/grid-example/GridExample.stories.js +44 -0
  114. package/src/components/atoms/layouts/examples/sidebar-example/SidebarExample.js +11 -0
  115. package/src/components/atoms/layouts/examples/sidebar-example/SidebarExample.stories.js +87 -0
  116. package/src/components/atoms/layouts/examples/stack-example/StackExample.js +27 -0
  117. package/src/components/atoms/layouts/examples/stack-example/StackExample.stories.js +69 -0
  118. package/src/components/atoms/layouts/examples/switcher-example/SwitcherExample.js +38 -0
  119. package/src/components/atoms/layouts/examples/switcher-example/SwitcherExample.stories.js +65 -0
  120. package/src/components/atoms/layouts/index.js +27 -0
  121. package/src/components/atoms/line-item/LineItem.js +30 -0
  122. package/src/components/atoms/line-item/LineItem.theme.js +7 -0
  123. package/src/components/atoms/line-item/index.js +3 -0
  124. package/src/components/atoms/link/ExternalLink.js +50 -0
  125. package/src/components/atoms/link/ExternalLink.styled.js +26 -0
  126. package/src/components/atoms/link/InternalLink.js +51 -0
  127. package/src/components/atoms/link/InternalLink.styled.js +39 -0
  128. package/src/components/atoms/link/Link.theme.js +8 -0
  129. package/src/components/atoms/link/index.js +4 -0
  130. package/src/components/atoms/nav-footer/NavFooter.js +57 -0
  131. package/src/components/atoms/nav-footer/index.js +3 -0
  132. package/src/components/atoms/nav-header/NavHeader.js +36 -0
  133. package/src/components/atoms/nav-header/index.js +3 -0
  134. package/src/components/atoms/paragraph/Paragraph.js +31 -0
  135. package/src/components/atoms/paragraph/Paragraph.styled.js +13 -0
  136. package/src/components/atoms/paragraph/Paragraph.theme.js +18 -0
  137. package/src/components/atoms/paragraph/index.js +3 -0
  138. package/src/components/atoms/password-requirements/PasswordRequirements.js +116 -0
  139. package/src/components/atoms/password-requirements/index.js +3 -0
  140. package/src/components/atoms/placeholder/Placeholder.js +122 -0
  141. package/src/components/atoms/placeholder/Placeholder.theme.js +9 -0
  142. package/src/components/atoms/placeholder/index.js +3 -0
  143. package/src/components/atoms/processing-fee/ProcessingFee.js +43 -0
  144. package/src/components/atoms/processing-fee/ProcessingFee.theme.js +7 -0
  145. package/src/components/atoms/processing-fee/index.js +3 -0
  146. package/src/components/atoms/radio-button/RadioButton.js +101 -0
  147. package/src/components/atoms/radio-button/RadioButton.theme.js +9 -0
  148. package/src/components/atoms/radio-button/index.js +3 -0
  149. package/src/components/atoms/solid-divider/SolidDivider.js +22 -0
  150. package/src/components/atoms/solid-divider/SolidDivider.theme.js +8 -0
  151. package/src/components/atoms/solid-divider/index.js +3 -0
  152. package/src/components/atoms/spinner/Spinner.js +61 -0
  153. package/src/components/atoms/spinner/Spinner.theme.js +5 -0
  154. package/src/components/atoms/spinner/index.js +3 -0
  155. package/src/components/atoms/state-province-dropdown/StateProvinceDropdown.js +28 -0
  156. package/src/components/atoms/state-province-dropdown/index.js +3 -0
  157. package/src/components/atoms/state-province-dropdown/options.js +3837 -0
  158. package/src/components/atoms/text/Text.js +37 -0
  159. package/src/components/atoms/text/Text.styled.js +32 -0
  160. package/src/components/atoms/text/Text.theme.js +22 -0
  161. package/src/components/atoms/text/index.js +3 -0
  162. package/src/components/atoms/toggle-switch/ToggleSwitch.js +212 -0
  163. package/src/components/atoms/toggle-switch/ToggleSwitch.theme.js +36 -0
  164. package/src/components/atoms/toggle-switch/index.js +3 -0
  165. package/src/components/index.js +3 -0
  166. package/src/components/molecules/address-form/AddressForm.js +110 -0
  167. package/src/components/molecules/address-form/AddressForm.state.js +52 -0
  168. package/src/components/molecules/address-form/index.js +11 -0
  169. package/src/components/molecules/change-password-form/ChangePasswordForm.js +92 -0
  170. package/src/components/molecules/change-password-form/ChangePasswordForm.state.js +33 -0
  171. package/src/components/molecules/change-password-form/index.js +11 -0
  172. package/src/components/molecules/collapsible-section/CollapsibleSection.js +126 -0
  173. package/src/components/molecules/collapsible-section/CollapsibleSection.theme.js +11 -0
  174. package/src/components/molecules/collapsible-section/index.js +3 -0
  175. package/src/components/molecules/edit-name-form/EditNameForm.js +51 -0
  176. package/src/components/molecules/edit-name-form/EditNameForm.state.js +14 -0
  177. package/src/components/molecules/edit-name-form/index.js +11 -0
  178. package/src/components/molecules/email-form/EmailForm.js +55 -0
  179. package/src/components/molecules/email-form/EmailForm.state.js +19 -0
  180. package/src/components/molecules/email-form/index.js +11 -0
  181. package/src/components/molecules/forgot-password-form/ForgotPasswordForm.js +32 -0
  182. package/src/components/molecules/forgot-password-form/ForgotPasswordForm.state.js +11 -0
  183. package/src/components/molecules/forgot-password-form/index.js +11 -0
  184. package/src/components/molecules/highlight-tab-row/HighlightTabRow.js +62 -0
  185. package/src/components/molecules/highlight-tab-row/HighlightTabRow.theme.js +7 -0
  186. package/src/components/molecules/highlight-tab-row/index.js +8 -0
  187. package/src/components/molecules/index.js +24 -0
  188. package/src/components/molecules/login-form/LoginForm.js +46 -0
  189. package/src/components/molecules/login-form/LoginForm.state.js +14 -0
  190. package/src/components/molecules/login-form/index.js +11 -0
  191. package/src/components/molecules/modal/Modal.js +138 -0
  192. package/src/components/molecules/modal/index.js +3 -0
  193. package/src/components/molecules/module/Module.js +42 -0
  194. package/src/components/molecules/module/Module.theme.js +30 -0
  195. package/src/components/molecules/module/index.js +8 -0
  196. package/src/components/molecules/nav-menu/NavMenu.theme.js +5 -0
  197. package/src/components/molecules/nav-menu/NavMenuDesktop.js +39 -0
  198. package/src/components/molecules/nav-menu/NavMenuMobile.js +63 -0
  199. package/src/components/molecules/nav-menu/index.js +4 -0
  200. package/src/components/molecules/obligation/Obligation.js +69 -0
  201. package/src/components/molecules/obligation/icons/AccountBillIcon.js +89 -0
  202. package/src/components/molecules/obligation/icons/AccountConstructionIcon.js +99 -0
  203. package/src/components/molecules/obligation/icons/AccountDentalIcon.js +94 -0
  204. package/src/components/molecules/obligation/icons/AccountElectricIcon.js +99 -0
  205. package/src/components/molecules/obligation/icons/AccountGarbageIcon.js +94 -0
  206. package/src/components/molecules/obligation/icons/AccountGasIcon.js +94 -0
  207. package/src/components/molecules/obligation/icons/AccountGenericIcon.js +89 -0
  208. package/src/components/molecules/obligation/icons/AccountMedicalIcon.js +94 -0
  209. package/src/components/molecules/obligation/icons/AccountWaterIcon.js +94 -0
  210. package/src/components/molecules/obligation/icons/PropertyApartmentIcon.js +99 -0
  211. package/src/components/molecules/obligation/icons/PropertyBusinessIcon.js +94 -0
  212. package/src/components/molecules/obligation/icons/PropertyCarIcon.js +99 -0
  213. package/src/components/molecules/obligation/icons/PropertyCommercialVehicleIcon.js +100 -0
  214. package/src/components/molecules/obligation/icons/PropertyGarageIcon.js +96 -0
  215. package/src/components/molecules/obligation/icons/PropertyLandIcon.js +99 -0
  216. package/src/components/molecules/obligation/icons/PropertyMotorcycleIcon.js +99 -0
  217. package/src/components/molecules/obligation/icons/PropertyPersonalIcon.js +94 -0
  218. package/src/components/molecules/obligation/icons/PropertyStorefrontIcon.js +100 -0
  219. package/src/components/molecules/obligation/icons/index.js +60 -0
  220. package/src/components/molecules/obligation/index.js +3 -0
  221. package/src/components/molecules/obligation/modules/AmountModule.js +36 -0
  222. package/src/components/molecules/obligation/modules/IconModule.js +29 -0
  223. package/src/components/molecules/obligation/modules/PaymentDetailsActions.js +67 -0
  224. package/src/components/molecules/obligation/modules/TitleModule.js +25 -0
  225. package/src/components/molecules/obligation/modules/index.js +6 -0
  226. package/src/components/molecules/payment-button-bar/PaymentButtonBar.js +80 -0
  227. package/src/components/molecules/payment-button-bar/index.js +3 -0
  228. package/src/components/molecules/payment-details/PaymentDetails.js +158 -0
  229. package/src/components/molecules/payment-details/PaymentDetails.theme.js +11 -0
  230. package/src/components/molecules/payment-details/index.js +1 -0
  231. package/src/components/molecules/phone-form/PhoneForm.js +44 -0
  232. package/src/components/molecules/phone-form/PhoneForm.state.js +17 -0
  233. package/src/components/molecules/phone-form/index.js +11 -0
  234. package/src/components/molecules/radio-section/RadioSection.js +205 -0
  235. package/src/components/molecules/radio-section/RadioSection.theme.js +15 -0
  236. package/src/components/molecules/radio-section/index.js +3 -0
  237. package/src/components/molecules/registration-form/RegistrationForm.js +104 -0
  238. package/src/components/molecules/registration-form/RegistrationForm.state.js +40 -0
  239. package/src/components/molecules/registration-form/index.js +11 -0
  240. package/src/components/molecules/reset-confirmation-form/ResetConfirmationForm.js +56 -0
  241. package/src/components/molecules/reset-confirmation-form/index.js +3 -0
  242. package/src/components/molecules/reset-password-form/ResetPasswordForm.js +67 -0
  243. package/src/components/molecules/reset-password-form/ResetPasswordForm.state.js +30 -0
  244. package/src/components/molecules/reset-password-form/index.js +11 -0
  245. package/src/components/molecules/reset-password-success/ResetPasswordSuccess.js +55 -0
  246. package/src/components/molecules/reset-password-success/index.js +3 -0
  247. package/src/components/molecules/tab-sidebar/TabSidebar.js +92 -0
  248. package/src/components/molecules/tab-sidebar/TabSidebar.theme.js +9 -0
  249. package/src/components/molecules/tab-sidebar/index.js +3 -0
  250. package/src/components/molecules/terms-and-conditions/TermsAndConditions.js +73 -0
  251. package/src/components/molecules/terms-and-conditions/index.js +3 -0
  252. package/src/components/molecules/terms-and-conditions-modal/TermsAndConditionsModal.js +64 -0
  253. package/src/components/molecules/terms-and-conditions-modal/TermsAndConditionsModal.theme.js +28 -0
  254. package/src/components/molecules/terms-and-conditions-modal/index.js +3 -0
  255. package/src/components/molecules/workflow-tile/WorkflowTile.js +58 -0
  256. package/src/components/molecules/workflow-tile/index.js +3 -0
  257. package/src/components/templates/center-single/CenterSingle.js +61 -0
  258. package/src/components/templates/center-single/index.js +3 -0
  259. package/src/components/templates/center-stack/CenterStack.js +49 -0
  260. package/src/components/templates/center-stack/index.js +3 -0
  261. package/src/components/templates/default-page-template/DefaultPageTemplate.js +49 -0
  262. package/src/components/templates/default-page-template/index.js +3 -0
  263. package/src/components/templates/index.js +5 -0
  264. package/src/components/templates/sidebar-single-content/SidebarSingleContent.js +60 -0
  265. package/src/components/templates/sidebar-single-content/index.js +3 -0
  266. package/src/components/templates/sidebar-stack-content/SidebarStackContent.js +81 -0
  267. package/src/components/templates/sidebar-stack-content/index.js +3 -0
  268. package/src/components/templates/templates.theme.js +5 -0
  269. package/src/components/withWindowSize.js +50 -0
  270. package/src/constants/colors.js +178 -0
  271. package/src/constants/regex_constants.js +1 -0
  272. package/src/constants/style_constants.js +21 -0
  273. package/src/deprecated/colors.js +154 -0
  274. package/src/deprecated/components/radio-button/index.js +3 -0
  275. package/src/deprecated/components/radio-button/radio-button.js +44 -0
  276. package/src/deprecated/icons/AlertErrorIcon.js +42 -0
  277. package/src/deprecated/icons/AlertInfoIcon.js +42 -0
  278. package/src/deprecated/icons/AlertSuccessIcon.js +42 -0
  279. package/src/deprecated/icons/AlertWarningIcon.js +36 -0
  280. package/src/deprecated/icons/BankIcon.js +82 -0
  281. package/src/deprecated/icons/GenericCard.js +39 -0
  282. package/src/deprecated/icons/IconAdd.js +44 -0
  283. package/src/deprecated/icons/IconCheck.js +23 -0
  284. package/src/deprecated/icons/IconCheckEmail.js +46 -0
  285. package/src/deprecated/icons/IconChevron.js +35 -0
  286. package/src/deprecated/icons/IconEmailVerified.js +62 -0
  287. package/src/deprecated/icons/IconEye.js +32 -0
  288. package/src/deprecated/icons/IconEyeSlash.js +48 -0
  289. package/src/deprecated/icons/IconInvalid.js +69 -0
  290. package/src/deprecated/icons/IconNeutral.js +27 -0
  291. package/src/deprecated/icons/IconQuit.js +32 -0
  292. package/src/deprecated/icons/IconValid.js +72 -0
  293. package/src/deprecated/icons/IconWarn.js +28 -0
  294. package/src/deprecated/icons/index.js +40 -0
  295. package/src/deprecated/index.js +1 -0
  296. package/src/deprecated/spinner/Spinner.js +68 -0
  297. package/src/deprecated/spinner/index.js +1 -0
  298. package/src/deprecated/utility/__tests__/safeConcat.spec.js +59 -0
  299. package/src/deprecated/utility/__tests__/validateKeyType.spec.js +116 -0
  300. package/src/deprecated/utility/index.js +2 -0
  301. package/src/deprecated/utility/safeConcat.js +10 -0
  302. package/src/deprecated/utility/validateKeyType.js +19 -0
  303. package/src/index.js +2 -0
  304. package/src/util/formats.js +30 -0
  305. package/src/util/general.js +15 -0
  306. package/src/util/inputValidationUtils.js +257 -0
  307. package/src/util/router-utils.js +23 -0
  308. package/src/util/themeUtils.js +144 -0
@@ -0,0 +1,57 @@
1
+ import React from "react";
2
+ import { Box, Switcher, Center, Cluster, Cover } from "../layouts";
3
+
4
+ const NavFooter = ({
5
+ leftContent,
6
+ rightContent,
7
+ footerMinHeight = "104px",
8
+ backgroundColor,
9
+ largeSide = "right",
10
+ largeSideSize = "2",
11
+ footerPadding = "1.5rem 1rem",
12
+ isMobile,
13
+ ...rest
14
+ }) => (
15
+ <Box
16
+ padding={footerPadding}
17
+ background={backgroundColor}
18
+ minHeight={footerMinHeight}
19
+ minWidth="100%"
20
+ extraStyles={
21
+ isMobile
22
+ ? `overflow: hidden;`
23
+ : `height: ${footerMinHeight}; > * { height: 100%; };`
24
+ }
25
+ {...rest}
26
+ >
27
+ <Center maxWidth="76.5rem">
28
+ <Cover singleChild minHeight="100%">
29
+ <Box minHeight="100%" padding="0">
30
+ <Switcher
31
+ breakpoint={isMobile ? "999px" : "700px"}
32
+ largeChild={largeSide === "right" ? "2" : "1"}
33
+ largeChildSize={largeSideSize}
34
+ childGap="0.25rem"
35
+ >
36
+ {leftContent}
37
+ <Cluster
38
+ justify={isMobile ? "flex-start" : "flex-end"}
39
+ align="center"
40
+ childGap="0.5rem"
41
+ >
42
+ <Switcher
43
+ maxChildrenOnly
44
+ maxChildren={isMobile ? 1 : 99}
45
+ childGap={isMobile ? "1rem" : "2rem"}
46
+ >
47
+ {rightContent}
48
+ </Switcher>
49
+ </Cluster>
50
+ </Switcher>
51
+ </Box>
52
+ </Cover>
53
+ </Center>
54
+ </Box>
55
+ );
56
+
57
+ export default NavFooter;
@@ -0,0 +1,3 @@
1
+ import NavFooter from "./NavFooter";
2
+
3
+ export default NavFooter;
@@ -0,0 +1,36 @@
1
+ import React from "react";
2
+ import { Box, Cluster, Center, Cover } from "../layouts";
3
+
4
+ const NavHeader = ({
5
+ leftContent,
6
+ rightContent,
7
+ headerHeight = "105px",
8
+ isMobile,
9
+ backgroundColor,
10
+ ...rest
11
+ }) => (
12
+ <Box
13
+ padding="0 1rem 0.25rem 1rem"
14
+ background={backgroundColor}
15
+ extraStyles={
16
+ isMobile
17
+ ? `height: 72px; > * { height: 100%; }; z-index: 2;`
18
+ : `height: ${headerHeight}; > * { height: 100%; }; z-index: 2;`
19
+ }
20
+ minWidth="100%"
21
+ {...rest}
22
+ >
23
+ <Center maxWidth="76.5rem">
24
+ <Box minHeight="100%" padding="0">
25
+ <Cover singleChild minHeight={isMobile ? "72px" : headerHeight}>
26
+ <Cluster justify="space-between" align="center" overflow>
27
+ <Box padding="0">{leftContent}</Box>
28
+ <Box padding="0">{rightContent}</Box>
29
+ </Cluster>
30
+ </Cover>
31
+ </Box>
32
+ </Center>
33
+ </Box>
34
+ );
35
+
36
+ export default NavHeader;
@@ -0,0 +1,3 @@
1
+ import NavHeader from "./NavHeader";
2
+
3
+ export default NavHeader;
@@ -0,0 +1,31 @@
1
+ import React from "react";
2
+ import { fallbackValues } from "./Paragraph.theme";
3
+ import { themeComponent } from "../../../util/themeUtils";
4
+ import { FONT_WEIGHT_REGULAR } from "../../../constants/style_constants";
5
+ import { FIREFLY_GREY } from "../../../constants/colors";
6
+ import { ParagraphText } from "./Paragraph.styled";
7
+ import { safeChildren } from "../../../util/general";
8
+
9
+ const Paragraph = ({
10
+ themeValues,
11
+ weight = FONT_WEIGHT_REGULAR,
12
+ color = FIREFLY_GREY,
13
+ margin = 0,
14
+ extraStyles = ``,
15
+ children,
16
+ ...rest
17
+ }) => (
18
+ <ParagraphText
19
+ weight={weight}
20
+ color={color}
21
+ margin={margin}
22
+ fontFamily={themeValues.fontFamily}
23
+ fontSize={themeValues.fontSize}
24
+ extraStyles={extraStyles}
25
+ {...rest}
26
+ >
27
+ {safeChildren(children, <span />)}
28
+ </ParagraphText>
29
+ );
30
+
31
+ export default themeComponent(Paragraph, "Paragraph", fallbackValues, "p");
@@ -0,0 +1,13 @@
1
+ import styled from "styled-components";
2
+
3
+ export const ParagraphText = styled.p`
4
+ --font-size: ${({ fontSize }) => fontSize};
5
+ font-size: var(--font-size);
6
+ line-height: calc(1.5 * var(--font-size));
7
+ font-weight: ${({ weight }) => weight};
8
+ font-family: ${({ fontFamily }) => fontFamily};
9
+ color: ${({ color }) => color};
10
+ margin: ${({ margin }) => margin};
11
+
12
+ ${({ extraStyles }) => extraStyles}
13
+ `;
@@ -0,0 +1,18 @@
1
+ const fontFamily = {
2
+ primary: "Public Sans",
3
+ secondary: "Open Sans"
4
+ };
5
+
6
+ const fontSize = {
7
+ p: "1rem",
8
+ pL: "1.125rem",
9
+ pS: "0.875rem",
10
+ pXS: "0.75rem",
11
+ pXXS: "0.65rem",
12
+ pXL: "1.5rem"
13
+ };
14
+
15
+ export const fallbackValues = {
16
+ fontFamily,
17
+ fontSize
18
+ };
@@ -0,0 +1,3 @@
1
+ import Paragraph from "./Paragraph";
2
+
3
+ export default Paragraph;
@@ -0,0 +1,116 @@
1
+ import React from "react";
2
+ import { IconNeutral, IconInvalid, IconValid } from "../../../deprecated/icons";
3
+ import Paragraph from "../paragraph";
4
+ import { Cluster, Stack, Box, Sidebar, Cover } from "../layouts";
5
+ import {
6
+ getInputState,
7
+ MIN_LENGTH_ERROR,
8
+ HAS_NUMBER_ERROR,
9
+ HAS_UPPERCASE_LETTER_ERROR,
10
+ HAS_LOWERCASE_LETTER_ERROR,
11
+ HAS_SPECIAL_CHARACTER_ERROR,
12
+ INPUT_STATE_INVALID,
13
+ INPUT_STATE_NEUTRAL,
14
+ INPUT_STATE_VALID
15
+ } from "../../../util/inputValidationUtils";
16
+ import {
17
+ MINESHAFT_GREY,
18
+ ATHENS_GREY,
19
+ FOREST_GREEN,
20
+ RAZZMATAZZ_RED
21
+ } from "../../../constants/colors";
22
+
23
+ const PasswordRequirements = ({ password, isMobile }) => {
24
+ const iconMap = {
25
+ [INPUT_STATE_NEUTRAL]: {
26
+ icon: <IconNeutral margin="0.125rem 0.5rem 0 0" />,
27
+ color: MINESHAFT_GREY
28
+ },
29
+ [INPUT_STATE_INVALID]: {
30
+ icon: <IconInvalid margin="0.125rem 0.5rem 0 0" />,
31
+ color: RAZZMATAZZ_RED
32
+ },
33
+ [INPUT_STATE_VALID]: {
34
+ icon: <IconValid margin="0.125rem 0.5rem 0 0" />,
35
+ color: FOREST_GREEN
36
+ }
37
+ };
38
+
39
+ const validationMap = {
40
+ charactersValidation: {
41
+ validationMessage: "Password must be 8 characters",
42
+ validationRequirement: [MIN_LENGTH_ERROR]
43
+ },
44
+ numbersValidation: {
45
+ validationMessage: "Password must contain at least one number",
46
+ validationRequirement: [HAS_NUMBER_ERROR]
47
+ },
48
+ letterCaseValidation: {
49
+ validationMessage: "Password must contain an upper and lower case letter",
50
+ validationRequirement: [
51
+ HAS_UPPERCASE_LETTER_ERROR,
52
+ HAS_LOWERCASE_LETTER_ERROR
53
+ ]
54
+ },
55
+ specialCharacterValidation: {
56
+ validationMessage:
57
+ "Password must contain a special character (!@#$%^&*.?)",
58
+ validationRequirement: [HAS_SPECIAL_CHARACTER_ERROR]
59
+ }
60
+ };
61
+
62
+ return (
63
+ <Box
64
+ background={ATHENS_GREY}
65
+ padding={isMobile ? "1rem" : "1.5rem"}
66
+ width="100%"
67
+ >
68
+ <Cluster justify="center" align="center">
69
+ <Stack>
70
+ {Object.values(validationMap).map(item => (
71
+ <Box padding="0" key={item.validationMessage}>
72
+ <Sidebar width="24px" childGap="0rem">
73
+ <Box padding="0" minHeight="100%">
74
+ <Cover minHeight="100%" singleChild>
75
+ <Box padding="0">
76
+ {
77
+ iconMap[
78
+ getInputState(password, item.validationRequirement)
79
+ ].icon
80
+ }
81
+ </Box>
82
+ </Cover>
83
+ </Box>
84
+ <Box padding="0">
85
+ <Sidebar onRight childGap="0rem">
86
+ <Box padding="0rem">
87
+ <Cluster justify="flex-start" align="center">
88
+ <Stack fullHeight childGap="0.25rem">
89
+ <Paragraph
90
+ variant="pS"
91
+ color={
92
+ iconMap[
93
+ getInputState(
94
+ password,
95
+ item.validationRequirement
96
+ )
97
+ ].color
98
+ }
99
+ >
100
+ {item.validationMessage}
101
+ </Paragraph>
102
+ </Stack>
103
+ </Cluster>
104
+ </Box>
105
+ </Sidebar>
106
+ </Box>
107
+ </Sidebar>
108
+ </Box>
109
+ ))}
110
+ </Stack>
111
+ </Cluster>
112
+ </Box>
113
+ );
114
+ };
115
+
116
+ export default PasswordRequirements;
@@ -0,0 +1,3 @@
1
+ import PasswordRequirements from "./PasswordRequirements";
2
+
3
+ export default PasswordRequirements;
@@ -0,0 +1,122 @@
1
+ import React, { useContext } from "react";
2
+ import { ThemeContext } from "styled-components";
3
+ import { Link } from "react-router-dom";
4
+ import Text from "../text";
5
+ import { Box, Switcher, Center, Cluster } from "../layouts";
6
+ import { fallbackValues } from "./Placeholder.theme";
7
+ import { themeComponent } from "../../../util/themeUtils";
8
+ import { IconAdd } from "../../../deprecated/icons";
9
+ import { STORM_GREY } from "../../../constants/colors";
10
+ import { AccountsAddIcon, PropertiesAddIcon } from "../icons";
11
+ import { FONT_WEIGHT_REGULAR } from "../../../constants/style_constants";
12
+ import withWindowSize from "../../withWindowSize";
13
+
14
+ const PlaceholderContentWrapper = ({
15
+ isLink,
16
+ action,
17
+ destination,
18
+ children,
19
+ dataQa
20
+ }) =>
21
+ isLink ? (
22
+ <Link to={destination} dataQa={dataQa}>
23
+ <Box padding="0" minHeight="100%" extraStyles={`cursor: pointer;`}>
24
+ {children}
25
+ </Box>
26
+ </Link>
27
+ ) : (
28
+ <Box
29
+ onClick={action}
30
+ padding="0"
31
+ minHeight="100%"
32
+ extraStyles={`cursor: pointer;`}
33
+ dataQa={dataQa}
34
+ >
35
+ {children}
36
+ </Box>
37
+ );
38
+
39
+ const Placeholder = ({
40
+ text,
41
+ action,
42
+ visible = true,
43
+ iconID,
44
+ isLink = false,
45
+ destination,
46
+ variant,
47
+ largeIcon,
48
+ themeValues,
49
+ dataQa
50
+ }) => {
51
+ const { isMobile } = useContext(ThemeContext);
52
+
53
+ return (
54
+ <Box
55
+ padding="0"
56
+ borderRadius="4px"
57
+ border="none"
58
+ minHeight={themeValues.height}
59
+ hiddenStyles={!visible}
60
+ extraStyles={`
61
+ background: linear-gradient(
62
+ to right,
63
+ ${STORM_GREY} 40%,
64
+ rgba(255, 255, 255, 0) 0%
65
+ ),
66
+ linear-gradient(${STORM_GREY} 40%, rgba(255, 255, 255, 0) 0%),
67
+ linear-gradient(to right, ${STORM_GREY} 40%, rgba(255, 255, 255, 0) 0%),
68
+ linear-gradient(${STORM_GREY} 40%, rgba(255, 255, 255, 0) 0%);
69
+ background-position: top, right, bottom, left;
70
+ background-repeat: repeat-x, repeat-y;
71
+ background-size: 5px 1px, 1px 5px;
72
+ display: flex;
73
+ justify-content: center;
74
+ align-items:center;`}
75
+ >
76
+ <PlaceholderContentWrapper
77
+ isLink={isLink}
78
+ action={action}
79
+ destination={destination}
80
+ dataQa={dataQa}
81
+ >
82
+ <Center maxWidth="300px">
83
+ <Box padding="0px 0px 0px 0px">
84
+ <Cluster justify="center" align="center" minHeight="100%">
85
+ <Switcher maxChildren={2} childGap="0">
86
+ {variant === "large" && <div></div>}
87
+ <Cluster justify="center" align="center" minHeight="100%">
88
+ {variant === "large" ? (
89
+ largeIcon === "accounts" ? (
90
+ <AccountsAddIcon />
91
+ ) : (
92
+ <PropertiesAddIcon />
93
+ )
94
+ ) : (
95
+ <IconAdd iconID={iconID} isMobile={isMobile} />
96
+ )}
97
+ </Cluster>
98
+ <Center intrinsic>
99
+ <Text
100
+ variant="pS"
101
+ color={themeValues.color}
102
+ weight={FONT_WEIGHT_REGULAR}
103
+ textAlign="center"
104
+ extraStyles={variant !== "large" && `padding: 0 0 0 8px;`}
105
+ >
106
+ {text}
107
+ </Text>
108
+ </Center>
109
+ </Switcher>
110
+ </Cluster>
111
+ </Box>
112
+ </Center>
113
+ </PlaceholderContentWrapper>
114
+ </Box>
115
+ );
116
+ };
117
+ export default themeComponent(
118
+ withWindowSize(Placeholder),
119
+ "Placeholder",
120
+ fallbackValues,
121
+ "default"
122
+ );
@@ -0,0 +1,9 @@
1
+ import { BRIGHT_GREY, CHARADE_GREY } from "../../../constants/colors";
2
+
3
+ const color = { default: `${CHARADE_GREY}`, large: `${BRIGHT_GREY}` };
4
+ const height = { default: "3rem", large: "192px" };
5
+
6
+ export const fallbackValues = {
7
+ color,
8
+ height
9
+ };
@@ -0,0 +1,3 @@
1
+ import Placeholder from "./Placeholder";
2
+
3
+ export default Placeholder;
@@ -0,0 +1,43 @@
1
+ import React from "react";
2
+ import { ifElse, isNil, always } from "ramda";
3
+ import { fallbackValues } from "./ProcessingFee.theme";
4
+ import { themeComponent } from "../../../util/themeUtils";
5
+ import Box from "../layouts/Box";
6
+ import Alert from "../alert";
7
+ import { displayCurrency } from "../../../util/general";
8
+ const ProcessingFee = ({
9
+ feeValue = 0,
10
+ feeName = "",
11
+ feeType,
12
+ feeMinimum = 0,
13
+ hide,
14
+ themeValues
15
+ }) => (
16
+ <Box
17
+ padding="0 1.5rem 1.5rem"
18
+ background={themeValues.backgroundColor}
19
+ hiddenStyles={hide}
20
+ >
21
+ <Alert
22
+ heading="Processing Fee"
23
+ text={`There is a processing fee of ${
24
+ feeType === "FLAT"
25
+ ? `${displayCurrency(feeValue)}`
26
+ : `${feeValue * 100}%`
27
+ } ${ifElse(
28
+ isNil,
29
+ always(""),
30
+ a => `with a minimum of ${displayCurrency(a)} `
31
+ )(feeMinimum)}on all ${feeName} payments.`}
32
+ variant="info"
33
+ showQuitLink={false}
34
+ />
35
+ </Box>
36
+ );
37
+
38
+ export default themeComponent(
39
+ ProcessingFee,
40
+ "ProcessingFee",
41
+ fallbackValues,
42
+ "default"
43
+ );
@@ -0,0 +1,7 @@
1
+ import { WHITE } from "../../../constants/colors";
2
+
3
+ const backgroundColor = { default: `${WHITE}` };
4
+
5
+ export const fallbackValues = {
6
+ backgroundColor
7
+ };
@@ -0,0 +1,3 @@
1
+ import ProcessingFee from "./ProcessingFee";
2
+
3
+ export default ProcessingFee;
@@ -0,0 +1,101 @@
1
+ import React from "react";
2
+ import { themeComponent } from "../../../util/themeUtils";
3
+ import { fallbackValues } from "./RadioButton.theme";
4
+ import { Motion } from "../layouts";
5
+ import styled from "styled-components";
6
+
7
+ const HiddenRadioButton = styled.input`
8
+ opacity: 0;
9
+ position: absolute;
10
+ cursor: ${({ disabled }) => (disabled ? "auto" : "pointer")};
11
+ `;
12
+
13
+ const RadioButton = ({
14
+ radioOn = false,
15
+ radioFocused = false,
16
+ toggleRadio,
17
+ name,
18
+ disabled = false,
19
+ themeValues
20
+ }) => {
21
+ const buttonBorder = {
22
+ onFocused: {
23
+ borderColor: themeValues.activeColor,
24
+ boxShadow: `0px 0px 4px 0px ${themeValues.activeColor}`
25
+ },
26
+ offFocused: {
27
+ borderColor: themeValues.activeColor,
28
+ boxShadow: `0px 0px 4px 0px ${themeValues.activeColor}`
29
+ },
30
+ on: {
31
+ borderColor: themeValues.activeColor,
32
+ boxShadow: "0px 0px 0px 0px #FFFFFF"
33
+ },
34
+ off: {
35
+ borderColor: themeValues.inactiveColor,
36
+ boxShadow: "0px 0px 0px 0px #FFFFFF"
37
+ }
38
+ };
39
+
40
+ const buttonCenter = {
41
+ on: {
42
+ backgroundColor: themeValues.activeColor,
43
+ height: "1rem",
44
+ width: "1rem"
45
+ },
46
+ onFocused: {
47
+ backgroundColor: themeValues.activeColor,
48
+ height: "1rem",
49
+ width: "1rem"
50
+ },
51
+ offFocused: {
52
+ backgroundColor: "transparent",
53
+ height: "0px",
54
+ width: "0px"
55
+ },
56
+ off: {
57
+ backgroundColor: "transparent",
58
+ height: "0px",
59
+ width: "0px"
60
+ }
61
+ };
62
+
63
+ return (
64
+ <Motion
65
+ position="relative"
66
+ padding="0"
67
+ initial="off"
68
+ animate={
69
+ radioOn
70
+ ? radioFocused
71
+ ? "onFocused"
72
+ : "on"
73
+ : radioFocused
74
+ ? "offFocused"
75
+ : "off"
76
+ }
77
+ >
78
+ <HiddenRadioButton
79
+ id={`#radio-${name}`}
80
+ disabled={disabled}
81
+ onClick={toggleRadio}
82
+ tabIndex="-1"
83
+ />
84
+ <Motion
85
+ borderWidth="1px"
86
+ borderStyle="solid"
87
+ borderRadius="0.75rem"
88
+ margin="0.25rem 0.875rem 0.25rem 0.25rem"
89
+ height="1.5rem"
90
+ width="1.5rem"
91
+ variants={buttonBorder}
92
+ display="flex"
93
+ extraStyles={`justify-content: center; align-items: center;`}
94
+ >
95
+ <Motion variants={buttonCenter} borderRadius="0.5rem" />
96
+ </Motion>
97
+ </Motion>
98
+ );
99
+ };
100
+
101
+ export default themeComponent(RadioButton, "RadioButton", fallbackValues);
@@ -0,0 +1,9 @@
1
+ import { MATISSE_BLUE, GREY_CHATEAU } from "../../../constants/colors";
2
+
3
+ const activeColor = `${MATISSE_BLUE}`;
4
+ const inactiveColor = `${GREY_CHATEAU}`;
5
+
6
+ export const fallbackValues = {
7
+ activeColor,
8
+ inactiveColor
9
+ };
@@ -0,0 +1,3 @@
1
+ import RadioButton from "./RadioButton";
2
+
3
+ export default RadioButton;
@@ -0,0 +1,22 @@
1
+ import React from "react";
2
+ import { fallbackValues } from "./SolidDivider.theme";
3
+ import { themeComponent } from "../../../util/themeUtils";
4
+ import { Box } from "../layouts";
5
+
6
+ const SolidDivider = ({ themeValues }) => (
7
+ <Box
8
+ padding="0"
9
+ minWidth="100%"
10
+ minHeight="1px"
11
+ borderColor={themeValues.borderColor}
12
+ borderSize={themeValues.borderSize}
13
+ borderWidthOverride={`0px 0px ${themeValues.borderSize} 0px`}
14
+ />
15
+ );
16
+
17
+ export default themeComponent(
18
+ SolidDivider,
19
+ "SolidDivider",
20
+ fallbackValues,
21
+ "default"
22
+ );
@@ -0,0 +1,8 @@
1
+ import { GREY_CHATEAU } from "../../../constants/colors";
2
+
3
+ const borderColor = { default: `${GREY_CHATEAU}` };
4
+ const borderSize = { default: "1px" };
5
+ export const fallbackValues = {
6
+ borderColor,
7
+ borderSize
8
+ };
@@ -0,0 +1,3 @@
1
+ import SolidDivider from "./SolidDivider";
2
+
3
+ export default SolidDivider;