@thecb/components 12.0.0-beta.0 → 12.0.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (421) hide show
  1. package/README.md +33 -11
  2. package/ai-docs/architecture.md +71 -0
  3. package/ai-docs/components.md +167 -0
  4. package/ai-docs/conventions.md +162 -0
  5. package/ai-docs/figma-mcp.md +66 -0
  6. package/ai-docs/integration-guidelines.md +142 -0
  7. package/dist/index.cjs.js +27805 -25779
  8. package/dist/index.cjs.js.map +1 -1
  9. package/dist/index.d.ts +286 -12
  10. package/dist/index.esm.js +26589 -24593
  11. package/dist/index.esm.js.map +1 -1
  12. package/package.json +17 -8
  13. package/src/components/atoms/alert/Alert.js +10 -1
  14. package/src/components/atoms/alert/Alert.mdx +19 -0
  15. package/src/components/atoms/alert/Alert.stories.js +150 -0
  16. package/src/components/atoms/badge/Badge.js +39 -25
  17. package/src/components/atoms/badge/Badge.mdx +27 -0
  18. package/src/components/atoms/badge/Badge.stories.js +168 -0
  19. package/src/components/atoms/badge/Badge.theme.js +49 -1
  20. package/src/components/atoms/badge/index.d.ts +11 -0
  21. package/src/components/atoms/breadcrumb/Breadcrumb.mdx +21 -0
  22. package/src/components/atoms/breadcrumb/Breadcrumb.stories.js +47 -0
  23. package/src/components/atoms/button-with-action/ButtonWithAction.js +3 -29
  24. package/src/components/atoms/button-with-action/ButtonWithAction.stories.js +14 -1
  25. package/src/components/atoms/button-with-action/ButtonWithAction.theme.js +97 -56
  26. package/src/components/atoms/button-with-action/index.d.ts +1 -0
  27. package/src/components/atoms/button-with-link/ButtonWithLink.mdx +21 -0
  28. package/src/components/atoms/button-with-link/ButtonWithLink.stories.js +161 -0
  29. package/src/components/atoms/card/Card.js +22 -1
  30. package/src/components/atoms/card/Card.mdx +41 -0
  31. package/src/components/atoms/card/Card.stories.js +360 -0
  32. package/src/components/atoms/card/Card.theme.js +2 -0
  33. package/src/components/atoms/card/CardText.js +39 -11
  34. package/src/components/atoms/card/index.d.ts +8 -1
  35. package/src/components/atoms/card-type/CardType.js +55 -0
  36. package/src/components/atoms/card-type/CardType.stories.js +86 -0
  37. package/src/components/atoms/card-type/index.js +3 -0
  38. package/src/components/atoms/checkbox/Checkbox.js +121 -93
  39. package/src/components/atoms/checkbox/Checkbox.mdx +15 -0
  40. package/src/components/atoms/checkbox/Checkbox.oldstories.js +17 -13
  41. package/src/components/atoms/checkbox/Checkbox.stories.js +149 -0
  42. package/src/components/atoms/checkbox/Checkbox.theme.js +6 -2
  43. package/src/components/atoms/country-dropdown/CountryDropdown.mdx +36 -0
  44. package/src/components/atoms/country-dropdown/CountryDropdown.stories.js +76 -0
  45. package/src/components/atoms/detail/Detail.js +0 -26
  46. package/src/components/atoms/detail/Detail.mdx +32 -0
  47. package/src/components/atoms/detail/Detail.stories.js +156 -0
  48. package/src/components/atoms/display-box/DisplayBox.mdx +11 -0
  49. package/src/components/atoms/display-box/DisplayBox.stories.js +69 -0
  50. package/src/components/atoms/dropdown/Dropdown.js +17 -5
  51. package/src/components/atoms/dropdown/Dropdown.mdx +65 -0
  52. package/src/components/atoms/dropdown/Dropdown.stories.js +128 -0
  53. package/src/components/atoms/dropdown/Dropdown.theme.js +6 -6
  54. package/src/components/atoms/dropdown/DropdownIcon.js +1 -0
  55. package/src/components/atoms/dropdown/DropdownIconV2.js +50 -0
  56. package/src/components/atoms/dropdown/index.d.ts +59 -0
  57. package/src/components/atoms/form-layouts/FormInput.js +105 -61
  58. package/src/components/atoms/form-layouts/FormInput.mdx +38 -0
  59. package/src/components/atoms/form-layouts/FormInput.stories.js +219 -0
  60. package/src/components/atoms/form-layouts/FormTextarea.js +207 -0
  61. package/src/components/atoms/form-layouts/FormTextarea.mdx +48 -0
  62. package/src/components/atoms/form-layouts/FormTextarea.stories.js +265 -0
  63. package/src/components/atoms/form-layouts/index.d.ts +34 -1
  64. package/src/components/atoms/form-layouts/index.js +3 -1
  65. package/src/components/atoms/form-select/FormSelect.js +5 -3
  66. package/src/components/atoms/form-select/FormSelect.mdx +42 -0
  67. package/src/components/atoms/form-select/FormSelect.stories.js +76 -0
  68. package/src/components/atoms/form-select/FormSelect.styled.js +2 -2
  69. package/src/components/atoms/form-select/FormSelect.theme.js +6 -3
  70. package/src/components/atoms/form-select/index.d.ts +3 -0
  71. package/src/components/atoms/formatted-address/FormattedAddress.mdx +13 -0
  72. package/src/components/atoms/formatted-address/FormattedAddress.stories.js +138 -0
  73. package/src/components/atoms/formatted-bank-account/FormattedBankAccount.js +2 -2
  74. package/src/components/atoms/formatted-bank-account/FormattedBankAccount.mdx +17 -0
  75. package/src/components/atoms/formatted-bank-account/FormattedBankAccount.stories.js +57 -0
  76. package/src/components/atoms/formatted-bank-account/FormattedBankAccount.theme.js +2 -2
  77. package/src/components/atoms/formatted-credit-card/FormattedCreditCard.js +14 -10
  78. package/src/components/atoms/formatted-credit-card/FormattedCreditCard.mdx +40 -0
  79. package/src/components/atoms/formatted-credit-card/FormattedCreditCard.stories.js +74 -0
  80. package/src/components/atoms/formatted-credit-card/FormattedCreditCard.theme.js +2 -2
  81. package/src/components/atoms/icons/AgencyIcon.js +24 -0
  82. package/src/components/atoms/icons/AmExLargeIcon.js +54 -0
  83. package/src/components/atoms/icons/AmExSmallIcon.js +54 -0
  84. package/src/components/atoms/icons/AutopayIcon.js +9 -1
  85. package/src/components/atoms/icons/BankGenericSmallIcon.js +48 -0
  86. package/src/components/atoms/icons/CaretArrowDown.d.ts +9 -0
  87. package/src/components/atoms/icons/CaretArrowDown.js +22 -0
  88. package/src/components/atoms/icons/CaretArrowUp.d.ts +9 -0
  89. package/src/components/atoms/icons/CaretArrowUp.js +22 -0
  90. package/src/components/atoms/icons/CarrotIcon.js +2 -0
  91. package/src/components/atoms/icons/CashSmallIcon.js +21 -0
  92. package/src/components/atoms/icons/CashieringImage.d.ts +1 -0
  93. package/src/components/atoms/icons/CashieringImage.js +254 -0
  94. package/src/components/atoms/icons/CheckboxCheckmarkIcon.js +45 -0
  95. package/src/components/atoms/icons/CustomerSearchIcon.js +30 -79
  96. package/src/components/atoms/icons/DiscoverLargeIcon.js +137 -0
  97. package/src/components/atoms/icons/DiscoverSmallIcon.js +137 -0
  98. package/src/components/atoms/icons/ExternalLinkIcon.js +10 -2
  99. package/src/components/atoms/icons/GenericCardLarge.js +1 -1
  100. package/src/components/atoms/icons/GenericSmallIcon.js +27 -0
  101. package/src/components/atoms/icons/GuidedCheckoutImage.js +105 -26
  102. package/src/components/atoms/icons/IconAdd.js +2 -2
  103. package/src/components/atoms/icons/Icons.mdx +40 -0
  104. package/src/components/atoms/icons/Icons.stories.js +343 -0
  105. package/src/components/atoms/icons/KioskImage.js +223 -338
  106. package/src/components/atoms/icons/MasterCardLargeIcon.js +35 -0
  107. package/src/components/atoms/icons/MasterCardSmallIcon.js +35 -0
  108. package/src/components/atoms/icons/{NoCustomerResultsIcon.js → NoResultsIcon.js} +10 -6
  109. package/src/components/atoms/icons/NotFoundIcon.js +70 -333
  110. package/src/components/atoms/icons/OverageIcon.js +27 -0
  111. package/src/components/atoms/icons/PaydotImage.d.ts +1 -0
  112. package/src/components/atoms/icons/PaydotImage.js +46 -0
  113. package/src/components/atoms/icons/PaymentSearchIcon.js +7 -42
  114. package/src/components/atoms/icons/PaymentStatusIcon.d.ts +1 -0
  115. package/src/components/atoms/icons/PaymentStatusIcon.js +28 -0
  116. package/src/components/atoms/icons/PeriscopeFailedIcon.js +2 -2
  117. package/src/components/atoms/icons/PersonIcon.d.ts +1 -0
  118. package/src/components/atoms/icons/PersonIcon.js +28 -0
  119. package/src/components/atoms/icons/ProfileImage.js +58 -37
  120. package/src/components/atoms/icons/RevenueManagementImage.js +138 -393
  121. package/src/components/atoms/icons/ReversalNeededIcon.js +27 -0
  122. package/src/components/atoms/icons/SearchIcon.js +4 -3
  123. package/src/components/atoms/icons/ShortageIcon.js +21 -0
  124. package/src/components/atoms/icons/StandardCheckoutImage.js +105 -336
  125. package/src/components/atoms/icons/SuccessfulIconMedium.js +3 -2
  126. package/src/components/atoms/icons/VisaLargeIcon.js +40 -0
  127. package/src/components/atoms/icons/VisaSmallIcon.js +40 -0
  128. package/src/components/atoms/icons/WireSmallIcon.js +22 -0
  129. package/src/components/atoms/icons/icons.oldstories.js +47 -31
  130. package/src/components/atoms/icons/index.d.ts +4 -1
  131. package/src/components/atoms/icons/index.js +47 -7
  132. package/src/components/atoms/index.d.ts +4 -0
  133. package/src/components/atoms/index.js +3 -1
  134. package/src/components/atoms/jumbo/Jumbo.js +18 -3
  135. package/src/components/atoms/labeled-amount/LabeledAmount.mdx +23 -0
  136. package/src/components/atoms/labeled-amount/LabeledAmount.stories.js +118 -0
  137. package/src/components/atoms/layouts/Box.styled.js +34 -22
  138. package/src/components/atoms/layouts/Center.styled.js +2 -0
  139. package/src/components/atoms/layouts/Motion.js +25 -6
  140. package/src/components/atoms/layouts/Motion.styled.js +36 -0
  141. package/src/components/atoms/layouts/Stack.js +2 -0
  142. package/src/components/atoms/layouts/Stack.styled.js +2 -0
  143. package/src/components/atoms/line-item/LineItem.mdx +28 -0
  144. package/src/components/atoms/line-item/LineItem.stories.js +95 -0
  145. package/src/components/atoms/link/ExternalLink.d.ts +1 -0
  146. package/src/components/atoms/link/ExternalLink.js +37 -19
  147. package/src/components/atoms/link/ExternalLink.styled.js +2 -0
  148. package/src/components/atoms/link/InternalLink.js +11 -1
  149. package/src/components/atoms/link/InternalLink.styled.js +22 -2
  150. package/src/components/atoms/link/Link.mdx +19 -0
  151. package/src/components/atoms/link/Link.stories.js +183 -0
  152. package/src/components/atoms/loading/Loading.mdx +13 -0
  153. package/src/components/atoms/loading/Loading.stories.js +22 -0
  154. package/src/components/atoms/loading-line/LoadingLine.js +23 -11
  155. package/src/components/atoms/loading-line/LoadingLine.mdx +15 -0
  156. package/src/components/atoms/loading-line/LoadingLine.stories.js +132 -0
  157. package/src/components/atoms/loading-line/LoadingPill.styled.js +7 -6
  158. package/src/components/atoms/nav-footer/NavFooter.mdx +15 -0
  159. package/src/components/atoms/nav-footer/NavFooter.stories.js +244 -0
  160. package/src/components/atoms/nav-header/NavHeader.mdx +13 -0
  161. package/src/components/atoms/nav-header/NavHeader.stories.js +130 -0
  162. package/src/components/atoms/nav-tabs/NavTabs.mdx +30 -0
  163. package/src/components/atoms/nav-tabs/NavTabs.stories.js +49 -0
  164. package/src/components/atoms/password-requirements/PasswordRequirements.js +3 -3
  165. package/src/components/atoms/password-requirements/PasswordRequirements.mdx +39 -0
  166. package/src/components/atoms/password-requirements/PasswordRequirements.stories.js +139 -0
  167. package/src/components/atoms/placeholder/Placeholder.mdx +19 -0
  168. package/src/components/atoms/placeholder/Placeholder.stories.js +170 -0
  169. package/src/components/atoms/radio-button-with-label/RadioButtonWithLabel.js +13 -7
  170. package/src/components/atoms/radio-button-with-label/RadioButtonWithLabel.theme.js +9 -3
  171. package/src/components/atoms/search/Search.js +123 -0
  172. package/src/components/atoms/search/Search.oldstories.js +58 -0
  173. package/src/components/atoms/search/Search.theme.js +9 -0
  174. package/src/components/atoms/search/index.d.ts +27 -0
  175. package/src/components/atoms/search/index.js +3 -0
  176. package/src/components/atoms/searchable-select/SearchableSelect.mdx +44 -0
  177. package/src/components/atoms/searchable-select/SearchableSelect.stories.js +137 -0
  178. package/src/components/atoms/sortable-table-heading/SortableTableHeading.js +47 -0
  179. package/src/components/atoms/sortable-table-heading/SortableTableHeading.oldstories.js +19 -0
  180. package/src/components/atoms/sortable-table-heading/SortableTableHeading.theme.js +9 -0
  181. package/src/components/atoms/sortable-table-heading/index.d.ts +15 -0
  182. package/src/components/atoms/sortable-table-heading/index.js +3 -0
  183. package/src/components/atoms/spinner/Spinner.js +2 -1
  184. package/src/components/atoms/state-province-dropdown/StateProvinceDropdown.mdx +36 -0
  185. package/src/components/atoms/state-province-dropdown/StateProvinceDropdown.stories.js +78 -0
  186. package/src/components/atoms/state-province-dropdown/options.js +4 -1
  187. package/src/components/atoms/tab/Tab.js +2 -2
  188. package/src/components/atoms/table/Table.mdx +71 -0
  189. package/src/components/atoms/table/Table.oldstories.js +84 -0
  190. package/src/components/atoms/table/Table.stories.js +65 -0
  191. package/src/components/atoms/table/TableRow.js +1 -0
  192. package/src/components/atoms/title/Title.js +0 -23
  193. package/src/components/atoms/title/Title.mdx +26 -0
  194. package/src/components/atoms/title/Title.stories.js +144 -0
  195. package/src/components/atoms/title/Title.theme.js +3 -0
  196. package/src/components/atoms/toggle-switch/ToggleSwitch.js +66 -48
  197. package/src/components/atoms/toggle-switch/ToggleSwitch.mdx +17 -0
  198. package/src/components/atoms/toggle-switch/ToggleSwitch.stories.js +111 -0
  199. package/src/components/atoms/toggle-switch/ToggleSwitch.theme.js +8 -5
  200. package/src/components/atoms/typeahead-input/TypeaheadInput.mdx +13 -0
  201. package/src/components/atoms/typeahead-input/TypeaheadInput.stories.js +63 -0
  202. package/src/components/atoms/wallet-name/WalletName.js +6 -4
  203. package/src/components/atoms/wallet-name/WalletName.oldstories.js +26 -1
  204. package/src/components/atoms/wallet-name/index.d.ts +2 -0
  205. package/src/components/molecules/address-form/AddressForm.mdx +18 -0
  206. package/src/components/molecules/address-form/AddressForm.stories.js +224 -0
  207. package/src/components/molecules/banner/Banner.mdx +23 -0
  208. package/src/components/molecules/banner/Banner.stories.js +125 -0
  209. package/src/components/molecules/change-password-form/ChangePasswordForm.mdx +15 -0
  210. package/src/components/molecules/change-password-form/ChangePasswordForm.stories.js +206 -0
  211. package/src/components/molecules/collapsible-section/CollapsibleSection.js +1 -1
  212. package/src/components/molecules/collapsible-section/CollapsibleSection.mdx +15 -0
  213. package/src/components/molecules/collapsible-section/CollapsibleSection.stories.js +217 -0
  214. package/src/components/molecules/collapsible-section/index.d.ts +2 -2
  215. package/src/components/molecules/contact-card/ContactCard.js +157 -0
  216. package/src/components/molecules/contact-card/ContactCard.stories.js +80 -0
  217. package/src/components/molecules/contact-card/ContactCard.styled.js +44 -0
  218. package/src/components/molecules/contact-card/index.d.ts +16 -0
  219. package/src/components/molecules/contact-card/index.js +3 -0
  220. package/src/components/molecules/edit-name-form/EditNameForm.mdx +13 -0
  221. package/src/components/molecules/edit-name-form/EditNameForm.stories.js +117 -0
  222. package/src/components/molecules/editable-list/EditableList.js +6 -1
  223. package/src/components/molecules/email-form/EmailForm.js +9 -1
  224. package/src/components/molecules/email-form/EmailForm.state.js +1 -1
  225. package/src/components/molecules/email-form/EmailForm.stories.js +210 -0
  226. package/src/components/molecules/forgot-password-form/ForgotPasswordForm.js +2 -1
  227. package/src/components/molecules/hero-image/HeroImage.js +135 -0
  228. package/src/components/molecules/hero-image/HeroImage.mdx +15 -0
  229. package/src/components/molecules/hero-image/HeroImage.stories.js +149 -0
  230. package/src/components/molecules/hero-image/HeroImage.styled.js +83 -0
  231. package/src/components/molecules/hero-image/HeroImage.theme.js +109 -0
  232. package/src/components/molecules/hero-image/index.js +3 -0
  233. package/src/components/molecules/idle-modal/IdleModal.js +101 -0
  234. package/src/components/molecules/idle-modal/IdleModal.mdx +17 -0
  235. package/src/components/molecules/idle-modal/IdleModal.stories.js +180 -0
  236. package/src/components/molecules/idle-modal/index.d.ts +16 -0
  237. package/src/components/molecules/idle-modal/index.js +3 -0
  238. package/src/components/molecules/index.d.ts +1 -0
  239. package/src/components/molecules/index.js +7 -0
  240. package/src/components/molecules/link-card/LinkCard.js +31 -20
  241. package/src/components/molecules/link-card/LinkCard.mdx +17 -0
  242. package/src/components/molecules/link-card/LinkCard.stories.js +528 -0
  243. package/src/components/molecules/link-card/LinkCard.styled.js +28 -21
  244. package/src/components/molecules/link-card/LinkCard.theme.js +6 -4
  245. package/src/components/molecules/link-card/index.d.ts +3 -1
  246. package/src/components/molecules/login-form/LoginForm.js +2 -1
  247. package/src/components/molecules/login-form/LoginForm.mdx +16 -0
  248. package/src/components/molecules/login-form/LoginForm.stories.js +120 -0
  249. package/src/components/molecules/modal/Modal.mdx +17 -0
  250. package/src/components/molecules/modal/Modal.stories.js +362 -0
  251. package/src/components/molecules/modal/ModalControlV1.js +3 -0
  252. package/src/components/molecules/modal/ModalControlV2.js +2 -0
  253. package/src/components/molecules/modal/__private__/CloseButton.js +2 -1
  254. package/src/components/molecules/module/Module.mdx +17 -0
  255. package/src/components/molecules/module/Module.stories.js +273 -0
  256. package/src/components/molecules/multiple-select-filter/MultipleSelectFilter.js +229 -0
  257. package/src/components/molecules/multiple-select-filter/MultipleSelectFilter.oldstories.js +74 -0
  258. package/src/components/molecules/multiple-select-filter/MultipleSelectFilter.styled.js +65 -0
  259. package/src/components/molecules/multiple-select-filter/MultipleSelectFilter.theme.js +13 -0
  260. package/src/components/molecules/multiple-select-filter/__private__/ActionLinkButton.js +27 -0
  261. package/src/components/molecules/multiple-select-filter/__private__/FilterButton.js +97 -0
  262. package/src/components/molecules/multiple-select-filter/__private__/FilterDropdown.js +27 -0
  263. package/src/components/molecules/multiple-select-filter/__private__/FilterableList.js +146 -0
  264. package/src/components/molecules/multiple-select-filter/__private__/FilterableListItem.js +78 -0
  265. package/src/components/molecules/multiple-select-filter/__private__/SearchBox.js +41 -0
  266. package/src/components/molecules/multiple-select-filter/__private__/useKeyboardNavigation.js +84 -0
  267. package/src/components/molecules/multiple-select-filter/__private__/util.js +44 -0
  268. package/src/components/molecules/multiple-select-filter/index.d.ts +34 -0
  269. package/src/components/molecules/multiple-select-filter/index.js +3 -0
  270. package/src/components/molecules/nav-menu/NavMenuMobile.js +27 -29
  271. package/src/components/molecules/nav-menu/NavMenuMobile.mdx +21 -0
  272. package/src/components/molecules/nav-menu/NavMenuMobile.stories.js +100 -0
  273. package/src/components/molecules/obligation/Obligation.js +141 -3
  274. package/src/components/molecules/obligation/Obligation.mdx +23 -0
  275. package/src/components/molecules/obligation/Obligation.stories.js +642 -0
  276. package/src/components/molecules/obligation/icons/PropertyBusinessIcon.js +2 -2
  277. package/src/components/molecules/obligation/icons/PropertyCarIcon.js +2 -2
  278. package/src/components/molecules/obligation/icons/PropertyCommercialVehicleIcon.js +2 -2
  279. package/src/components/molecules/obligation/icons/PropertyGarageIcon.js +2 -2
  280. package/src/components/molecules/obligation/icons/PropertyLandIcon.js +2 -2
  281. package/src/components/molecules/obligation/icons/PropertyMotorcycleIcon.js +2 -2
  282. package/src/components/molecules/obligation/icons/PropertyPersonalIcon.js +2 -2
  283. package/src/components/molecules/obligation/icons/PropertyStorefrontIcon.js +2 -2
  284. package/src/components/molecules/obligation/modules/AmountModule.js +64 -38
  285. package/src/components/molecules/obligation/modules/AutopayModalModule.js +37 -12
  286. package/src/components/molecules/obligation/modules/InactiveControlsModule.js +56 -12
  287. package/src/components/molecules/obligation/modules/InactiveTitleModule.js +1 -1
  288. package/src/components/molecules/obligation/modules/PaymentDetailsActions.js +42 -10
  289. package/src/components/molecules/obligation/modules/RemoveAccountModalModule.js +4 -1
  290. package/src/components/molecules/pagination/Pagination.mdx +15 -0
  291. package/src/components/molecules/pagination/Pagination.stories.js +181 -0
  292. package/src/components/molecules/partial-amount-form/PartialAmountField.js +68 -29
  293. package/src/components/molecules/partial-amount-form/PartialAmountField.theme.js +7 -0
  294. package/src/components/molecules/payment-button-bar/PaymentButtonBar.js +15 -8
  295. package/src/components/molecules/payment-details/PaymentDetails.js +1 -2
  296. package/src/components/molecules/payment-details/PaymentDetails.oldstories.js +0 -1
  297. package/src/components/molecules/payment-form-ach/PaymentFormACH.js +2 -0
  298. package/src/components/molecules/payment-form-ach/PaymentFormACH.state.js +2 -2
  299. package/src/components/molecules/payment-form-card/PaymentFormCard.js +6 -2
  300. package/src/components/molecules/payment-form-card/PaymentFormCard.state.js +2 -1
  301. package/src/components/molecules/phone-form/PhoneForm.js +7 -1
  302. package/src/components/molecules/phone-form/PhoneForm.state.js +1 -1
  303. package/src/components/molecules/popover/Popover.js +1 -15
  304. package/src/components/molecules/popover/Popover.mdx +15 -0
  305. package/src/components/molecules/popover/Popover.stories.js +220 -0
  306. package/src/components/molecules/radio-group/RadioGroup.js +8 -3
  307. package/src/components/molecules/radio-group/index.d.ts +1 -0
  308. package/src/components/molecules/radio-section/InnerRadioSection.js +3 -3
  309. package/src/components/molecules/radio-section/RadioSection.js +87 -44
  310. package/src/components/molecules/radio-section/RadioSection.stories.js +142 -0
  311. package/src/components/molecules/radio-section/radio-button/RadioButton.js +9 -5
  312. package/src/components/molecules/registration-banner/RegistrationBanner.js +115 -0
  313. package/src/components/molecules/registration-banner/RegistrationBanner.mdx +15 -0
  314. package/src/components/molecules/registration-banner/RegistrationBanner.stories.js +80 -0
  315. package/src/components/molecules/registration-banner/RegistrationBanner.styled.js +46 -0
  316. package/src/components/molecules/registration-banner/RegistrationBanner.theme.js +6 -0
  317. package/src/components/molecules/registration-banner/index.d.ts +15 -0
  318. package/src/components/molecules/registration-banner/index.js +3 -0
  319. package/src/components/molecules/registration-form/RegistrationForm.js +2 -1
  320. package/src/components/molecules/tab-sidebar/TabSidebar.js +5 -3
  321. package/src/components/molecules/tabs/Tabs.js +25 -9
  322. package/src/components/molecules/tabs/Tabs.mdx +17 -0
  323. package/src/components/molecules/tabs/Tabs.stories.js +149 -0
  324. package/src/components/molecules/tabs/index.d.ts +21 -0
  325. package/src/components/molecules/terms-and-conditions-modal/TermsAndConditionsModal.js +1 -1
  326. package/src/components/molecules/terms-and-conditions-modal/TermsAndConditionsModal.stories.js +110 -0
  327. package/src/components/molecules/toast-notification/Toast.mdx +15 -0
  328. package/src/components/molecules/toast-notification/Toast.stories.js +183 -0
  329. package/src/components/molecules/toast-notification/ToastNotification.js +74 -43
  330. package/src/components/molecules/tooltip/Tooltip.js +269 -0
  331. package/src/components/molecules/tooltip/Tooltip.mdx +25 -0
  332. package/src/components/molecules/tooltip/Tooltip.stories.js +287 -0
  333. package/src/components/molecules/tooltip/Tooltip.theme.js +18 -0
  334. package/src/components/molecules/tooltip/index.d.ts +34 -0
  335. package/src/components/molecules/tooltip/index.js +3 -0
  336. package/src/components/molecules/turnstile-widget/TurnstileWidget.js +183 -0
  337. package/src/components/molecules/turnstile-widget/index.js +3 -0
  338. package/src/components/templates/sidebar-stack-content/SidebarStackContent.js +1 -1
  339. package/src/constants/colors.d.ts +4 -0
  340. package/src/constants/colors.js +8 -1
  341. package/src/constants/regex_constants.js +1 -1
  342. package/src/constants/style_constants.js +13 -0
  343. package/src/deprecated/spinner/Spinner.js +8 -20
  344. package/src/hooks/index.js +2 -0
  345. package/src/hooks/use-conditionally-add-validator/index.js +20 -0
  346. package/src/hooks/use-outside-click/index.js +4 -5
  347. package/src/hooks/use-turnstile-script/index.js +49 -0
  348. package/src/util/formats.js +6 -3
  349. package/src/util/general.js +67 -4
  350. package/src/util/idleTimerUtils.js +36 -0
  351. package/src/util/index.js +3 -1
  352. package/src/util/themeUtils.js +24 -14
  353. package/src/.DS_Store +0 -0
  354. package/src/components/.DS_Store +0 -0
  355. package/src/components/atoms/alert/Alert.oldstories.js +0 -28
  356. package/src/components/atoms/badge/Badge.oldstories.js +0 -33
  357. package/src/components/atoms/breadcrumb/Breadcrumb.oldstories.js +0 -38
  358. package/src/components/atoms/button-with-action/ButtonWithAction.oldstories.js +0 -56
  359. package/src/components/atoms/button-with-link/ButtonWithLink.oldstories.js +0 -32
  360. package/src/components/atoms/country-dropdown/CountryDropdown.oldstories.js +0 -42
  361. package/src/components/atoms/display-box/DisplayBox.oldstories.js +0 -25
  362. package/src/components/atoms/display-card/DisplayCard.js +0 -88
  363. package/src/components/atoms/display-card/DisplayCard.oldstories.js +0 -24
  364. package/src/components/atoms/display-card/index.js +0 -3
  365. package/src/components/atoms/dropdown/Dropdown.oldstories.js +0 -47
  366. package/src/components/atoms/form-select/FormSelect.oldstories.js +0 -50
  367. package/src/components/atoms/formatted-address/FormattedAddress.oldstories.js +0 -32
  368. package/src/components/atoms/icons/NoPaymentResultsIcon.js +0 -54
  369. package/src/components/atoms/icons/PointOfSaleImage.d.ts +0 -1
  370. package/src/components/atoms/icons/PointOfSaleImage.js +0 -439
  371. package/src/components/atoms/labeled-amount/LabeledAmount.oldstories.js +0 -42
  372. package/src/components/atoms/line-item/LineItem.oldstories.js +0 -28
  373. package/src/components/atoms/link/Link.oldstories.js +0 -57
  374. package/src/components/atoms/loading-line/LoadingLine.oldstories.js +0 -28
  375. package/src/components/atoms/nav-footer/NavFooter.oldstories.js +0 -31
  376. package/src/components/atoms/nav-header/NavHeader.oldstories.js +0 -29
  377. package/src/components/atoms/password-requirements/PasswordRequirements.oldstories.js +0 -75
  378. package/src/components/atoms/placeholder/Placeholder.oldstories.js +0 -42
  379. package/src/components/atoms/searchable-select/SearchableSelect.oldstories.js +0 -62
  380. package/src/components/atoms/state-province-dropdown/StateProvinceDropdown.oldstories.js +0 -53
  381. package/src/components/atoms/toggle-switch/ToggleSwitch.oldstories.js +0 -28
  382. package/src/components/molecules/.DS_Store +0 -0
  383. package/src/components/molecules/address-form/AddressForm.oldstories.js +0 -21
  384. package/src/components/molecules/banner/Banner.oldstories.js +0 -29
  385. package/src/components/molecules/change-password-form/ChangePasswordForm.oldstories.js +0 -22
  386. package/src/components/molecules/collapsible-section/CollapsibleSection.oldstories.js +0 -68
  387. package/src/components/molecules/edit-name-form/EdidNameForm.oldstories.js +0 -24
  388. package/src/components/molecules/link-card/LinkCard.oldstories.js +0 -87
  389. package/src/components/molecules/login-form/LoginForm.oldstories.js +0 -24
  390. package/src/components/molecules/modal/Modal.oldstories.js +0 -139
  391. package/src/components/molecules/module/Module.oldstories.js +0 -31
  392. package/src/components/molecules/obligation/.DS_Store +0 -0
  393. package/src/components/molecules/pagination/Pagination.oldstories.js +0 -32
  394. package/src/components/molecules/tabs/Tabs.oldstories.js +0 -241
  395. package/src/components/molecules/toast-notification/ToastNotification.oldstories.js +0 -105
  396. package/src/stories/Button.stories.ts +0 -53
  397. package/src/stories/Button.tsx +0 -48
  398. package/src/stories/Configure.mdx +0 -364
  399. package/src/stories/Header.stories.ts +0 -33
  400. package/src/stories/Header.tsx +0 -56
  401. package/src/stories/Page.stories.ts +0 -32
  402. package/src/stories/Page.tsx +0 -73
  403. package/src/stories/assets/accessibility.png +0 -0
  404. package/src/stories/assets/accessibility.svg +0 -5
  405. package/src/stories/assets/addon-library.png +0 -0
  406. package/src/stories/assets/assets.png +0 -0
  407. package/src/stories/assets/avif-test-image.avif +0 -0
  408. package/src/stories/assets/context.png +0 -0
  409. package/src/stories/assets/discord.svg +0 -15
  410. package/src/stories/assets/docs.png +0 -0
  411. package/src/stories/assets/figma-plugin.png +0 -0
  412. package/src/stories/assets/github.svg +0 -3
  413. package/src/stories/assets/share.png +0 -0
  414. package/src/stories/assets/styling.png +0 -0
  415. package/src/stories/assets/testing.png +0 -0
  416. package/src/stories/assets/theming.png +0 -0
  417. package/src/stories/assets/tutorials.svg +0 -12
  418. package/src/stories/assets/youtube.svg +0 -4
  419. package/src/stories/button.css +0 -30
  420. package/src/stories/header.css +0 -32
  421. package/src/stories/page.css +0 -69
@@ -0,0 +1,132 @@
1
+ import LoadingLine from "./LoadingLine";
2
+ import { Box, Cluster, Stack } from "../layouts";
3
+
4
+ const meta = {
5
+ title: "Atoms/LoadingLine",
6
+ component: LoadingLine,
7
+ parameters: {
8
+ layout: "centered",
9
+ controls: { expanded: true }
10
+ },
11
+ tags: ["!autodocs"],
12
+ args: {
13
+ minWidth: undefined,
14
+ maxWidth: undefined,
15
+ exactWidth: undefined,
16
+ height: "16px",
17
+ margin: "0px"
18
+ },
19
+ argTypes: {
20
+ minWidth: {
21
+ description:
22
+ "The minimum width of the loading pill. Value will be appended with px in styles.",
23
+ table: {
24
+ type: { summary: "string or number" },
25
+ defaultValue: { summary: undefined }
26
+ }
27
+ },
28
+ maxWidth: {
29
+ description:
30
+ "The maximum width of the loading pill. Value will be appended with px in styles.",
31
+ table: {
32
+ type: { summary: "string or number" },
33
+ defaultValue: { summary: undefined }
34
+ }
35
+ },
36
+ exactWidth: {
37
+ description:
38
+ "Exact width value for the loading pill. Value will be appended with px in styles.",
39
+ table: {
40
+ type: { summary: "string or number" },
41
+ defaultValue: { summary: undefined }
42
+ }
43
+ },
44
+ height: {
45
+ description: "Height of the loading pill",
46
+ table: {
47
+ type: { summary: "string" },
48
+ defaultValue: { summary: "16px" }
49
+ }
50
+ },
51
+ margin: {
52
+ description: "Margin value around the pill",
53
+ table: {
54
+ type: { summary: "string" },
55
+ defaultValue: { summary: "0px" }
56
+ }
57
+ }
58
+ }
59
+ };
60
+
61
+ export default meta;
62
+
63
+ export const BasicLoadingLine = {
64
+ args: {
65
+ minWidth: "350",
66
+ maxWidth: "600",
67
+ height: "20px"
68
+ },
69
+ render: args => (
70
+ <Box minWidth="325px">
71
+ <LoadingLine {...args} />
72
+ </Box>
73
+ )
74
+ };
75
+
76
+ export const LoadingLineAsShape = {
77
+ args: {
78
+ exactWidth: "375",
79
+ height: "325px"
80
+ },
81
+ render: args => (
82
+ <Box minWidth="375px">
83
+ <LoadingLine {...args} />
84
+ </Box>
85
+ )
86
+ };
87
+
88
+ const minWidthFunc = () => Math.random() * 75 + 20;
89
+
90
+ const firstLineLength = Array.from({ length: 12 }, minWidthFunc);
91
+ const secondLineLength = Array.from({ length: 15 }, minWidthFunc);
92
+ const thirdLineLength = Array.from({ length: 8 }, minWidthFunc);
93
+ const fourthLineLength = Array.from({ length: 20 }, minWidthFunc);
94
+
95
+ const firstLine = firstLineLength.map(item => (
96
+ <LoadingLine key={`line-1-${item}`} minWidth={item} maxWidth="150" />
97
+ ));
98
+
99
+ const secondLine = secondLineLength.map(item => (
100
+ <LoadingLine key={`line-2-${item}`} minWidth={item} maxWidth="150" />
101
+ ));
102
+ const thirdLine = thirdLineLength.map(item => (
103
+ <LoadingLine key={`line-3-${item}`} minWidth={item} maxWidth="150" />
104
+ ));
105
+ const fourthLine = fourthLineLength.map(item => (
106
+ <LoadingLine key={`line-4-${item}`} minWidth={item} maxWidth="150" />
107
+ ));
108
+
109
+ export const LoadingTextContent = {
110
+ args: {
111
+ height: "12px",
112
+ margin: "0px"
113
+ },
114
+ render: args => (
115
+ <Box minWidth="400px" maxWidth="700px" minHeight="500px">
116
+ <Stack childGap="0.5rem">
117
+ <Cluster childGap="1rem" justify="flex-start" align="center">
118
+ {firstLine}
119
+ </Cluster>
120
+ <Cluster childGap="1rem" justify="flex-start" align="center">
121
+ {secondLine}
122
+ </Cluster>
123
+ <Cluster childGap="1rem" justify="flex-start" align="center">
124
+ {thirdLine}
125
+ </Cluster>
126
+ <Cluster childGap="1rem" justify="flex-start" align="center">
127
+ {fourthLine}
128
+ </Cluster>
129
+ </Stack>
130
+ </Box>
131
+ )
132
+ };
@@ -13,18 +13,19 @@ const shineFrames = keyframes`{
13
13
  }
14
14
  }`;
15
15
 
16
- export const LoadingPill = styled.div`
16
+ export const LoadingPill = styled.span`
17
+ display: block;
17
18
  width: ${({ width }) => width}px;
18
- background-color: ${colors.SEASHELL_WHITE};
19
+ background-color: ${({ backgroundColor }) => backgroundColor};
19
20
  margin: ${({ margin }) => margin};
20
21
  height: ${({ height }) => height};
21
22
  border-radius: 16px;
22
23
  background-image: linear-gradient(
23
24
  135deg,
24
- ${colors.SEASHELL_WHITE} 0%,
25
- ${colors.ALABASTER_WHITE} 40%,
26
- ${colors.SEASHELL_WHITE} 60%,
27
- ${colors.SEASHELL_WHITE} 100%
25
+ ${({ backgroundColor }) => backgroundColor} 0%,
26
+ ${({ foregroundColor }) => foregroundColor} 40%,
27
+ ${({ backgroundColor }) => backgroundColor} 60%,
28
+ ${({ backgroundColor }) => backgroundColor} 100%
28
29
  );
29
30
  background-size: 400%;
30
31
  animation: ${shineFrames} 2s infinite ease-in-out;
@@ -0,0 +1,15 @@
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 />
@@ -0,0 +1,244 @@
1
+ import NavFooter from "./NavFooter";
2
+ import { Box, Cluster, Stack } from "../layouts";
3
+ import ButtonWithAction from "../button-with-action";
4
+ import React from "react";
5
+ import { fn } from "@storybook/test";
6
+ import ImageBox from "../image-box/ImageBox";
7
+ import {
8
+ BRIGHT_GREY,
9
+ DUSTY_GREY,
10
+ ROYAL_BLUE_VIVID,
11
+ WHITE
12
+ } from "../../../constants/colors";
13
+ import { FONT_WEIGHT_SEMIBOLD } from "../../../constants/style_constants";
14
+ import ExternalLink from "../link/ExternalLink";
15
+ import ExternalLinkIcon from "../icons/ExternalLinkIcon";
16
+ import Text from "../text";
17
+
18
+ const meta = {
19
+ title: "Atoms/NavFooter",
20
+ component: NavFooter,
21
+ parameters: {
22
+ layout: "centered",
23
+ controls: { expanded: true }
24
+ },
25
+ tags: ["!autodocs"],
26
+ args: {
27
+ leftContent: undefined,
28
+ rightContent: undefined,
29
+ footerMinHeight: "104px",
30
+ largeSide: "right",
31
+ largeSideSize: "2",
32
+ footerPadding: "1.5rem 1rem",
33
+ isMobile: false,
34
+ backgroundColor: undefined,
35
+ footerWidth: undefined
36
+ },
37
+ argTypes: {
38
+ leftContent: {
39
+ description: "Content that appears on the left side of the footer",
40
+ table: {
41
+ type: { summary: "React Component" },
42
+ defaultValue: { summary: undefined }
43
+ }
44
+ },
45
+ rightContent: {
46
+ description: "Content that appears on the right side of the footer",
47
+ table: {
48
+ type: { summary: "React Component" },
49
+ defaultValue: { summary: undefined }
50
+ }
51
+ },
52
+ footerMinHeight: {
53
+ description: "Minimum height of the footer",
54
+ table: {
55
+ type: { summary: "string" },
56
+ defaultValue: { summary: "105px" }
57
+ }
58
+ },
59
+ isMobile: {
60
+ description:
61
+ "Whether the page is currently displaying on a mobile device",
62
+ table: {
63
+ type: { summary: "boolean" },
64
+ defaultValue: { summary: false }
65
+ }
66
+ },
67
+ backgroundColor: {
68
+ description: "Background color of the footer",
69
+ table: {
70
+ type: { summary: "string" },
71
+ defaultValue: { summary: undefined }
72
+ }
73
+ },
74
+ footerWidth: {
75
+ description:
76
+ "Optional value for maximum width of inner container. Component uses 76.5rem or 1224px if not specified. If page is larger than max width, container will be centered within.",
77
+ table: {
78
+ type: { summary: "string" },
79
+ defaultValue: { summary: undefined }
80
+ }
81
+ }
82
+ }
83
+ };
84
+
85
+ export default meta;
86
+
87
+ const logo = (
88
+ <ImageBox
89
+ maxWidth="150px"
90
+ minHeight="50px"
91
+ image={{
92
+ url:
93
+ "https://cb-public-assets.s3-us-west-2.amazonaws.com/cityville/logo-footer-white.svg",
94
+ altText: "Cityville Payment Portal Logo"
95
+ }}
96
+ />
97
+ );
98
+
99
+ const copyright = (
100
+ <Box padding="0.5rem">
101
+ <Text variant="pXS" color={WHITE}>
102
+ © 2024 City of Cityville
103
+ </Text>
104
+ </Box>
105
+ );
106
+
107
+ const logoutButton = (
108
+ <Box padding="0">
109
+ <ButtonWithAction
110
+ action={() => fn()}
111
+ variant="whitePrimary"
112
+ text="Log Out"
113
+ extraStyles={`
114
+ padding: 0.75rem 2rem;
115
+ border: 2px solid ${WHITE};
116
+ color: ${WHITE};
117
+ &:hover {
118
+ background-color: rgba(255, 255, 255, 0.1);
119
+ > * > span {
120
+ color: ${WHITE};
121
+ background-color: transparent;
122
+ }
123
+ }
124
+ &:active {
125
+ border: 2px solid ${WHITE};
126
+ background-color: rgba(255, 255, 255, 0.25);
127
+ > * > span {
128
+ color: ${WHITE};
129
+ background-color: transparent;
130
+ }
131
+ };
132
+ &:focus {
133
+ outline: 3px solid ${WHITE};
134
+ outline-offset: 2px;
135
+ }
136
+ > * > span {
137
+ color: ${WHITE};
138
+ }`}
139
+ />
140
+ </Box>
141
+ );
142
+
143
+ const subfooterLinkList = [
144
+ {
145
+ text: "Demo Home",
146
+ link: "/"
147
+ },
148
+ {
149
+ text: "Privacy Policy",
150
+ link: "/"
151
+ },
152
+ {
153
+ text: "Join Cityville Utilities",
154
+ link: "/"
155
+ },
156
+ {
157
+ text: "Utility Blog",
158
+ link: "/"
159
+ },
160
+ {
161
+ text: "Report an Outage",
162
+ link: "/"
163
+ }
164
+ ];
165
+
166
+ const subfooterLinks = subfooterLinkList.map((item, index) => (
167
+ <Box
168
+ padding="0"
169
+ key={`link-${item.text}`}
170
+ extraStyles={`max-height: 1.25rem;`}
171
+ >
172
+ <ExternalLink
173
+ newTab
174
+ href={item.link}
175
+ color={WHITE}
176
+ hoverColor={WHITE}
177
+ extraStyles={`text-decoration: none;
178
+ &:focus {
179
+ outline: 3px solid ${WHITE};
180
+ outline-offset: 2px;
181
+ }`}
182
+ size="0.875rem"
183
+ lineHeight="1.25rem"
184
+ weight={FONT_WEIGHT_SEMIBOLD}
185
+ ariaLabel={`Link to ${item.text} (opens in a new window)`}
186
+ >
187
+ <Cluster childGap="0.5rem" justify="center" align="center">
188
+ <Text
189
+ variant="pXS"
190
+ color={WHITE}
191
+ weight={FONT_WEIGHT_SEMIBOLD}
192
+ extraStyles={`cursor: pointer;
193
+ &:focus {
194
+ outline: 3px solid ${WHITE};
195
+ outline-offset: 2px;
196
+ }`}
197
+ >
198
+ {item.text}
199
+ </Text>
200
+ <ExternalLinkIcon linkColor={WHITE} text={`link-icon-${index}`} />
201
+ </Cluster>
202
+ </ExternalLink>
203
+ </Box>
204
+ ));
205
+
206
+ const subfooterLeftContent = (
207
+ <Cluster justify="flex-start" align="center" key="subfooter-left">
208
+ <Box padding={"0.5rem"} minWidth="100%">
209
+ <Stack direction={"row"} childGap={"2rem"}>
210
+ {[...subfooterLinks]}
211
+ </Stack>
212
+ </Box>
213
+ </Cluster>
214
+ );
215
+
216
+ export const BasicFooter = {
217
+ render: args => (
218
+ <Box minWidth="1200px">
219
+ <NavFooter
220
+ {...args}
221
+ leftContent={logo}
222
+ rightContent={logoutButton}
223
+ backgroundColor={ROYAL_BLUE_VIVID}
224
+ />
225
+ </Box>
226
+ )
227
+ };
228
+
229
+ export const BasicSubfooter = {
230
+ render: args => (
231
+ <Box minWidth="1200px" backgroundColor={DUSTY_GREY}>
232
+ <NavFooter
233
+ {...args}
234
+ leftContent={subfooterLeftContent}
235
+ rightContent={copyright}
236
+ backgroundColor={BRIGHT_GREY}
237
+ footerMinHeight="45px"
238
+ largeSide="left"
239
+ largeSideSize="4"
240
+ footerPadding="0 1rem"
241
+ />
242
+ </Box>
243
+ )
244
+ };
@@ -0,0 +1,13 @@
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 />
@@ -0,0 +1,130 @@
1
+ import NavHeader from "./NavHeader";
2
+ import { Box, Cover } from "../layouts";
3
+ import HamburgerButton from "../hamburger-button";
4
+ import React from "react";
5
+ import { fn } from "@storybook/test";
6
+ import ImageBox from "../image-box/ImageBox";
7
+ import {
8
+ CATSKILL_WHITE,
9
+ DUSTY_GREY,
10
+ ROYAL_BLUE_VIVID,
11
+ SEASHELL_WHITE
12
+ } from "../../../constants/colors";
13
+
14
+ const meta = {
15
+ title: "Atoms/NavHeader",
16
+ component: NavHeader,
17
+ parameters: {
18
+ layout: "centered",
19
+ controls: { expanded: true }
20
+ },
21
+ tags: ["!autodocs"],
22
+ args: {
23
+ leftContent: undefined,
24
+ rightContent: undefined,
25
+ headerHeight: "105px",
26
+ isMobile: false,
27
+ backgroundColor: undefined,
28
+ headerWidth: undefined
29
+ },
30
+ argTypes: {
31
+ leftContent: {
32
+ description: "Content that appears on the left side of the header",
33
+ table: {
34
+ type: { summary: "React Component" },
35
+ defaultValue: { summary: undefined }
36
+ }
37
+ },
38
+ rightContent: {
39
+ description: "Content that appears on the right side of the header",
40
+ table: {
41
+ type: { summary: "React Component" },
42
+ defaultValue: { summary: undefined }
43
+ }
44
+ },
45
+ headerHeight: {
46
+ description: "Height of the header container in pixels",
47
+ table: {
48
+ type: { summary: "string" },
49
+ defaultValue: { summary: "105px" }
50
+ }
51
+ },
52
+ isMobile: {
53
+ description:
54
+ "Whether the page is currently displaying on a mobile device",
55
+ table: {
56
+ type: { summary: "boolean" },
57
+ defaultValue: { summary: false }
58
+ }
59
+ },
60
+ backgroundColor: {
61
+ description: "Background color of the header",
62
+ table: {
63
+ type: { summary: "string" },
64
+ defaultValue: { summary: undefined }
65
+ }
66
+ },
67
+ headerWidth: {
68
+ description:
69
+ "Optional value for maximum width of inner container. Component uses 76.5rem or 1224px if not specified. If page is larger than max width, container will be centered within.",
70
+ table: {
71
+ type: { summary: "string" },
72
+ defaultValue: { summary: undefined }
73
+ }
74
+ }
75
+ }
76
+ };
77
+
78
+ export default meta;
79
+
80
+ const logo = (
81
+ <ImageBox
82
+ maxWidth="150px"
83
+ minHeight="50px"
84
+ image={{
85
+ url:
86
+ "https://cb-public-assets.s3-us-west-2.amazonaws.com/cityville/logo-blue.svg",
87
+ altText: "Cityville Payment Portal Logo"
88
+ }}
89
+ />
90
+ );
91
+
92
+ const hamburger = (
93
+ <Box padding="0">
94
+ <Cover singleChild fillCenter>
95
+ <HamburgerButton
96
+ isActive={false}
97
+ onClick={() => fn()}
98
+ activeColor={ROYAL_BLUE_VIVID}
99
+ inactiveColor={ROYAL_BLUE_VIVID}
100
+ />
101
+ </Cover>
102
+ </Box>
103
+ );
104
+
105
+ export const BasicHeader = {
106
+ render: args => (
107
+ <Box minWidth="1200px">
108
+ <NavHeader
109
+ {...args}
110
+ leftContent={logo}
111
+ rightContent={hamburger}
112
+ backgroundColor={SEASHELL_WHITE}
113
+ />
114
+ </Box>
115
+ )
116
+ };
117
+
118
+ export const HeaderSmallerThanPage = {
119
+ render: args => (
120
+ <Box minWidth="1200px" backgroundColor={DUSTY_GREY}>
121
+ <NavHeader
122
+ {...args}
123
+ leftContent={logo}
124
+ rightContent={hamburger}
125
+ backgroundColor={CATSKILL_WHITE}
126
+ headerWidth="800px"
127
+ />
128
+ </Box>
129
+ )
130
+ };
@@ -0,0 +1,30 @@
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 />
@@ -0,0 +1,49 @@
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
+ };
@@ -16,7 +16,7 @@ import {
16
16
  import {
17
17
  MINESHAFT_GREY,
18
18
  ATHENS_GREY,
19
- FOREST_GREEN,
19
+ SEA_GREEN,
20
20
  RAZZMATAZZ_RED
21
21
  } from "../../../constants/colors";
22
22
 
@@ -31,8 +31,8 @@ const PasswordRequirements = ({ password, isMobile }) => {
31
31
  color: RAZZMATAZZ_RED
32
32
  },
33
33
  [INPUT_STATE_VALID]: {
34
- icon: <IconValid margin="0 0.5rem 0 0" />,
35
- color: FOREST_GREEN
34
+ icon: <IconValid margin="0 0.5rem 0 0" bgFill={SEA_GREEN} />,
35
+ color: SEA_GREEN
36
36
  }
37
37
  };
38
38
 
@@ -0,0 +1,39 @@
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 />