@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
@@ -36,3 +36,39 @@ export const MotionWrapper = styled(motion.div)`
36
36
 
37
37
  ${({ extraStyles }) => extraStyles};
38
38
  `;
39
+
40
+ export const MotionSpanWrapper = styled(motion.span)`
41
+ position: ${({ position }) => position};
42
+ display: ${({ display }) => display};
43
+ box-sizing: border-box;
44
+ padding: ${({ padding }) => padding};
45
+ border: ${({ borderShorthand }) => borderShorthand};
46
+ border-color: ${({ borderColor }) => borderColor};
47
+ border-size: ${({ borderSize }) => borderSize};
48
+ border-style: ${({ borderStyle }) => borderStyle};
49
+ border-width: ${({ borderWidth }) => borderWidth};
50
+ border-radius: ${({ borderRadius }) => borderRadius};
51
+ background-color: ${({ backgroundColor }) => backgroundColor};
52
+ box-shadow: ${({ boxShadow }) => boxShadow};
53
+ min-height: ${({ minHeight }) => minHeight};
54
+ min-width: ${({ minWidth }) => minWidth};
55
+ height: ${({ height }) => height};
56
+ width: ${({ width }) => width};
57
+ text-align: ${({ textAlign }) => textAlign};
58
+ margin: ${({ margin }) => margin};
59
+
60
+ &:hover,
61
+ &:focus {
62
+ ${({ hoverStyles }) => hoverStyles};
63
+ }
64
+
65
+ &:active {
66
+ ${({ activeStyles }) => activeStyles};
67
+ }
68
+
69
+ &:disabled {
70
+ ${({ disabledStyles }) => disabledStyles};
71
+ }
72
+
73
+ ${({ extraStyles }) => extraStyles};
74
+ `;
@@ -19,6 +19,7 @@ const Stack = ({
19
19
  children,
20
20
  direction = "column",
21
21
  justify,
22
+ extraStyles,
22
23
  ...rest
23
24
  }) => (
24
25
  <StackWrapper
@@ -27,6 +28,7 @@ const Stack = ({
27
28
  fullHeight={fullHeight}
28
29
  direction={direction}
29
30
  justify={justify}
31
+ extraStyles={extraStyles}
30
32
  {...rest}
31
33
  >
32
34
  {safeChildren(children, <Fragment />)}
@@ -27,4 +27,6 @@ export const StackWrapper = styled.div`
27
27
  }
28
28
  `
29
29
  : ``};
30
+
31
+ ${({ extraStyles }) => extraStyles}
30
32
  `;
@@ -0,0 +1,28 @@
1
+ import { Canvas, Meta, Title, Story, Controls } from '@storybook/blocks';
2
+
3
+ import * as LineItemStories from './LineItem.stories.js';
4
+
5
+ <Meta of={LineItemStories} />
6
+
7
+ <Title />
8
+
9
+ The LineItem component is small component that formats the description, subDescription, amount, and optionally quantity of a line item. LineItems are typically used in checkout flows and as a part of transaction details.
10
+
11
+ The default styling of the LineItem uses flexbox. The description and subDescription are left-justified, while the formatted amount string is right-justified. An item's quantity, if displayed, sits evenly between the description and amount string. By default, elements of the LineItem have no gap between them. As shown below, the LineItem sizes itself to the width of its parent container, so gaps between items can be controlled by the size of the LineItem's parent.
12
+
13
+ LineItems are typically rendered inside of other display components, like a DisplayBox or Card, as seen in the Line Item With Quantity story.
14
+
15
+ The LineItem component can take the following props:
16
+
17
+ - description (required, main description of the lineItem),
18
+ - subDescription (optional, but should not be `null`),
19
+ - amount (required, pre-formatted money string),
20
+ - displayQuantity (optional, quantity of the item, if its display is desired)
21
+ - customAttributes (optional, array of item's custom attributes, used in conjunction with visibleFields)
22
+ - visibleFields (optional, an array that is a subset of customAttributes to display below the subDescription)
23
+
24
+ NOTE: The LineItem currently supports unused functionality that can display a subset of an item's custom attributes as "visible fields". If this functionality is used in the future, a new story should be added to demonstrate it.
25
+
26
+ <div style={{ marginBottom: "2em"}}>
27
+ <Story />
28
+ </div>
@@ -0,0 +1,95 @@
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
+ };
69
+
70
+ export default meta;
71
+
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
+ };
79
+
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>
91
+ );
92
+
93
+ export const LineItemWithQuantity = {
94
+ render: args => <FancyLineItem {...args} />
95
+ };
@@ -9,6 +9,7 @@ export interface ExternalLinkProps {
9
9
  weight?: string;
10
10
  extraStyles?: string;
11
11
  variant?: string;
12
+ containerTabIndex?: string;
12
13
  tabIndex?: string;
13
14
  dataQa?: string;
14
15
  ariaLabel?: string;
@@ -5,6 +5,8 @@ import { createThemeValues } from "../../../util/themeUtils";
5
5
  import { StyledExternalLink } from "./ExternalLink.styled";
6
6
  import { FONT_WEIGHT_REGULAR } from "../../../constants/style_constants";
7
7
  import { safeChildren } from "../../../util/general";
8
+ import { Box } from "../layouts";
9
+ import { LINK_TEXT_DECORATION } from "../../../constants/style_constants";
8
10
 
9
11
  const ExternalLink = forwardRef(
10
12
  (
@@ -16,9 +18,11 @@ const ExternalLink = forwardRef(
16
18
  weight = FONT_WEIGHT_REGULAR,
17
19
  extraStyles = ``,
18
20
  variant = "primary",
21
+ containerTabIndex = "-1",
19
22
  tabIndex = "0",
20
23
  dataQa,
21
24
  ariaLabel,
25
+ isUnderlined = true,
22
26
  children
23
27
  },
24
28
  ref
@@ -30,27 +34,41 @@ const ExternalLink = forwardRef(
30
34
  "Link",
31
35
  variant
32
36
  );
37
+ const handleKeyDown = event => {
38
+ // This is to address an issue on Safari where the link's tab order and Enter key were not being recognized
39
+ if (event.key === "Enter" || event.keyCode === 13) {
40
+ if (newTab) {
41
+ window.open(href, "_blank");
42
+ } else {
43
+ window.location.href = href;
44
+ }
45
+ }
46
+ };
33
47
 
34
48
  return (
35
- <StyledExternalLink
36
- href={href}
37
- target={newTab ? "_blank" : ""}
38
- color={themeValues.externalLinkColor}
39
- size={size}
40
- lineheight={lineHeight}
41
- weight={weight}
42
- hovercolor={themeValues.hoverColor}
43
- activeColor={themeValues.activeColor}
44
- fontFamily={themeValues.fontFamily}
45
- tabIndex={tabIndex}
46
- extrastyles={extraStyles}
47
- rel={newTab ? "noopener" : ""}
48
- data-qa={dataQa}
49
- aria-label={ariaLabel}
50
- ref={ref}
51
- >
52
- {safeChildren(children, <span />)}
53
- </StyledExternalLink>
49
+ <Box padding="0" tabIndex={containerTabIndex} onKeyDown={handleKeyDown}>
50
+ <StyledExternalLink
51
+ href={href}
52
+ target={newTab ? "_blank" : ""}
53
+ color={themeValues.externalLinkColor}
54
+ size={size}
55
+ lineheight={lineHeight}
56
+ weight={weight}
57
+ hovercolor={themeValues.hoverColor}
58
+ activeColor={themeValues.activeColor}
59
+ fontFamily={themeValues.fontFamily}
60
+ tabIndex={tabIndex}
61
+ extrastyles={`text-decoration: ${
62
+ isUnderlined ? LINK_TEXT_DECORATION : "none"
63
+ }; ${extraStyles}`}
64
+ rel={newTab ? "noopener" : ""}
65
+ data-qa={dataQa}
66
+ aria-label={ariaLabel}
67
+ ref={ref}
68
+ >
69
+ {safeChildren(children, <span />)}
70
+ </StyledExternalLink>
71
+ </Box>
54
72
  );
55
73
  }
56
74
  );
@@ -26,11 +26,13 @@ export const StyledExternalLink = styled(
26
26
 
27
27
  &:hover {
28
28
  color: ${({ hoverColor }) => hoverColor};
29
+ text-decoration: ${LINK_TEXT_DECORATION};
29
30
  }
30
31
 
31
32
  &:focus {
32
33
  outline: 3px solid ${ROYAL_BLUE};
33
34
  outline-offset: 2px;
35
+ text-decoration: ${LINK_TEXT_DECORATION};
34
36
  }
35
37
 
36
38
  &:active {
@@ -19,7 +19,12 @@ const InternalLink = forwardRef(
19
19
  margin,
20
20
  tabIndex = "0",
21
21
  dataQa,
22
- extraStyles = ``
22
+ extraStyles = ``,
23
+ isUnderlined = true,
24
+ hoverUnderline = true,
25
+ extraHoverStyles = ``,
26
+ extraActiveStyles = ``,
27
+ extraFocusStyles = ``
23
28
  },
24
29
  ref
25
30
  ) => {
@@ -44,7 +49,12 @@ const InternalLink = forwardRef(
44
49
  hoverColor={themeValues.hoverColor}
45
50
  activeColor={themeValues.activeColor}
46
51
  tabIndex={tabIndex}
52
+ underlined={isUnderlined}
53
+ hoverUnderline={hoverUnderline}
47
54
  extrastyles={extraStyles}
55
+ extraHoverStyles={extraHoverStyles}
56
+ extraActiveStyles={extraActiveStyles}
57
+ extraFocusStyles={extraFocusStyles}
48
58
  data-qa={dataQa}
49
59
  ref={ref}
50
60
  >
@@ -15,7 +15,19 @@ const { LINK_TEXT_DECORATION } = styleConstants;
15
15
  export const StyledInternalLink = styled(
16
16
  forwardRef(
17
17
  (
18
- { hoverColor, activeColor, active, color, extrastyles, ...props },
18
+ {
19
+ hoverColor,
20
+ activeColor,
21
+ active,
22
+ color,
23
+ extrastyles,
24
+ underlined,
25
+ hoverUnderline,
26
+ extraHoverStyles,
27
+ extraActiveStyles,
28
+ extraFocusStyles,
29
+ ...props
30
+ },
19
31
  ref
20
32
  ) => <Link {...props} ref={ref} />
21
33
  )
@@ -28,19 +40,27 @@ export const StyledInternalLink = styled(
28
40
  font-size: ${({ fontSize }) => fontSize};
29
41
  font-family: ${({ fontFamily }) => fontFamily};
30
42
  margin: ${({ margin }) => margin};
31
- text-decoration: ${LINK_TEXT_DECORATION};
43
+ text-decoration: ${({ underlined }) =>
44
+ underlined ? LINK_TEXT_DECORATION : "none"};
32
45
 
33
46
  &:hover {
34
47
  color: ${({ hoverColor }) => hoverColor};
48
+ text-decoration: ${({ hoverUnderline }) =>
49
+ hoverUnderline ? LINK_TEXT_DECORATION : "none"};
50
+ ${({ extraHoverStyles }) => extraHoverStyles}
35
51
  }
36
52
 
37
53
  &:focus {
38
54
  outline: 3px solid ${ROYAL_BLUE};
39
55
  outline-offset: 2px;
56
+ text-decoration: ${({ hoverUnderline }) =>
57
+ hoverUnderline ? LINK_TEXT_DECORATION : "none"};
58
+ ${({ extraFocusStyles }) => extraFocusStyles}
40
59
  }
41
60
 
42
61
  &:active {
43
62
  color: ${({ activeColor }) => activeColor};
63
+ ${({ extraActiveStyles }) => extraActiveStyles}
44
64
  }
45
65
 
46
66
  ${({ extrastyles }) => extrastyles}
@@ -0,0 +1,19 @@
1
+ import { Canvas, Meta, Title, Story, Controls } from '@storybook/blocks';
2
+
3
+ import * as LinkStories from './Link.stories.js';
4
+
5
+ <Meta of={LinkStories} />
6
+
7
+ <Title />
8
+
9
+ The Link component comes in two varieties: InternalLink and ExternalLink. We have two components because most of our frontend applications rely on some version of react-router for internal routing. The InternalLink component is a wrapper that applies react-router-dom's `<Link />` component, while ExternalLink uses a plain `<a />` tag. Either link component can be used as a wrapper around arbitrary children.
10
+
11
+ Due to the components being written at different times, they have similar, but not identical, props. The props table identifies which props apply to InternalLinks and which apply to ExternalLinks.
12
+
13
+ Currently, the InternalLink has a minor bug where it will not apply a theme color for a non-active, non-hover state. At the moment, the only way to get InternalLinks to apply the correct color is to pass the theme color in to the component using the `color` prop.
14
+
15
+ <Controls />
16
+
17
+ <div style={{ marginBottom: "2em"}}>
18
+ <Story />
19
+ </div>
@@ -0,0 +1,183 @@
1
+ import React from "react";
2
+ import InternalLink from "./InternalLink";
3
+ import ExternalLink from "./ExternalLink";
4
+
5
+ const meta = {
6
+ title: "Atoms/Link",
7
+ component: InternalLink,
8
+ parameters: {
9
+ layout: "centered"
10
+ },
11
+ tags: ["!autodocs"],
12
+ args: {
13
+ to: undefined,
14
+ href: undefined,
15
+ size: undefined,
16
+ weight: undefined,
17
+ color: undefined,
18
+ lineHeight: undefined,
19
+ active: undefined,
20
+ fontWeight: undefined,
21
+ fontSize: undefined,
22
+ margin: undefined,
23
+ containerTabIndex: undefined,
24
+ tabIndex: undefined,
25
+ extraStyles: undefined,
26
+ dataQa: undefined,
27
+ ref: undefined,
28
+ ariaLabel: undefined,
29
+ newTab: false,
30
+ children: undefined
31
+ },
32
+ argTypes: {
33
+ to: {
34
+ description: "The destination for an InternalLink like /activities",
35
+ table: {
36
+ type: { summary: "string" },
37
+ defaultValue: { summary: undefined }
38
+ }
39
+ },
40
+ href: {
41
+ description:
42
+ "The destination for an ExternalLink like www.eunasolutions.com",
43
+ table: {
44
+ type: { summary: "string" },
45
+ defaultValue: { summary: undefined }
46
+ }
47
+ },
48
+ size: {
49
+ description: "Font size for an ExternalLink",
50
+ table: {
51
+ type: { summary: "string" },
52
+ defaultValue: { summary: undefined }
53
+ }
54
+ },
55
+ weight: {
56
+ description: "Font weight for an ExternalLink",
57
+ table: {
58
+ type: { summary: "string" },
59
+ defaultValue: { summary: undefined }
60
+ }
61
+ },
62
+ fontWeight: {
63
+ description: "Font weight for an InternalLink",
64
+ table: {
65
+ type: { summary: "string" },
66
+ defaultValue: { summary: undefined }
67
+ }
68
+ },
69
+ fontSize: {
70
+ description: "Font size for an InternalLink",
71
+ table: {
72
+ type: { summary: "string" },
73
+ defaultValue: { summary: undefined }
74
+ }
75
+ },
76
+ color: {
77
+ description: "Color value to use for InternalLinks",
78
+ table: {
79
+ type: { summary: "string" },
80
+ defaultValue: { summary: undefined }
81
+ }
82
+ },
83
+ lineHeight: {
84
+ description: "Line height for a link",
85
+ table: {
86
+ type: { summary: "string" },
87
+ defaultValue: { summary: undefined }
88
+ }
89
+ },
90
+ active: {
91
+ description: "Whether an InternalLink should use active color styling",
92
+ table: {
93
+ type: { summary: "string" },
94
+ defaultValue: { summary: undefined }
95
+ }
96
+ },
97
+ margin: {
98
+ description: "Margin to apply to InternalLink element",
99
+ table: {
100
+ type: { summary: "string" },
101
+ defaultValue: { summary: undefined }
102
+ }
103
+ },
104
+ containerTabIndex: {
105
+ description: "Override for tab index value for link's container",
106
+ table: {
107
+ type: { summary: "string" },
108
+ defaultValue: { summary: undefined }
109
+ }
110
+ },
111
+ tabIndex: {
112
+ description: "Override for tab index value for link",
113
+ table: {
114
+ type: { summary: "string" },
115
+ defaultValue: { summary: undefined }
116
+ }
117
+ },
118
+ extraStyles: {
119
+ description: "Optional extra css styles to apply to link",
120
+ table: {
121
+ type: { summary: "string" },
122
+ defaultValue: { summary: undefined }
123
+ }
124
+ },
125
+ dataQa: {
126
+ description: "data-qa value to use for E2E testing libraries",
127
+ table: {
128
+ type: { summary: "string" },
129
+ defaultValue: { summary: undefined }
130
+ }
131
+ },
132
+ ariaLabel: {
133
+ description: "aria-label value for an ExternalLink",
134
+ table: {
135
+ type: { summary: "string" },
136
+ defaultValue: { summary: undefined }
137
+ }
138
+ },
139
+ newTab: {
140
+ description: "Whether an ExternalLink should open in a new browser tab",
141
+ table: {
142
+ type: { summary: "boolean" },
143
+ defaultValue: { summary: false }
144
+ }
145
+ }
146
+ }
147
+ };
148
+
149
+ export default meta;
150
+
151
+ export const StandardInternalLink = {
152
+ render: args => (
153
+ <InternalLink {...args}>Cityville Activities Calendar</InternalLink>
154
+ ),
155
+ args: {
156
+ active: false,
157
+ to: "/activities-calendar"
158
+ }
159
+ };
160
+
161
+ export const InternalLinkNoUnderline = {
162
+ render: args => (
163
+ <InternalLink {...args} isUnderlined={false}>
164
+ Cityville Activities Calendar
165
+ </InternalLink>
166
+ ),
167
+ args: {
168
+ active: true,
169
+ to: "/activities-calendar"
170
+ }
171
+ };
172
+
173
+ export const StandardExternalLink = {
174
+ render: args => <ExternalLink {...args}>Austin City Hall</ExternalLink>
175
+ };
176
+
177
+ export const ActiveInternalLink = {
178
+ render: args => <InternalLink {...args}>Transaction History</InternalLink>,
179
+ args: {
180
+ active: "true",
181
+ to: "/transaction-history"
182
+ }
183
+ };
@@ -0,0 +1,13 @@
1
+ import { Canvas, Meta, Title, Story, Controls } from '@storybook/blocks';
2
+
3
+ import * as LoadingStories from './Loading.stories.js';
4
+
5
+ <Meta of={LoadingStories} />
6
+
7
+ <Title />
8
+
9
+ The Loading component is a small spinner animation that can be used to signal a loading state to a user. The spinner has a fixed size of 100px, and it is themed using the theme values in FCS. For a customizable size version, use the Spinner atom directly.
10
+
11
+ <Story />
12
+
13
+ <Controls />
@@ -0,0 +1,22 @@
1
+ import Loading from "./Loading";
2
+ import { Box } from "../layouts";
3
+
4
+ const meta = {
5
+ title: "Atoms/Loading",
6
+ component: Loading,
7
+ parameters: {
8
+ layout: "centered",
9
+ controls: { expanded: true }
10
+ },
11
+ tags: ["!autodocs"]
12
+ };
13
+
14
+ export default meta;
15
+
16
+ export const Spinner = {
17
+ render: () => (
18
+ <Box>
19
+ <Loading />
20
+ </Box>
21
+ )
22
+ };
@@ -1,21 +1,33 @@
1
1
  import React from "react";
2
2
  import { LoadingPill } from "./LoadingPill.styled";
3
+ import { colors } from "../../../constants";
3
4
 
4
5
  const LoadingLine = ({
5
6
  minWidth,
6
7
  maxWidth,
7
8
  exactWidth = null,
8
9
  height = "16px",
9
- margin = "0px"
10
- }) => (
11
- <LoadingPill
12
- margin={margin}
13
- height={height}
14
- width={
15
- exactWidth ||
16
- Math.floor(Math.random() * (maxWidth - minWidth + 1)) + minWidth
17
- }
18
- />
19
- );
10
+ margin = "0px",
11
+ backgroundColor = colors.SEASHELL_WHITE,
12
+ foregroundColor = colors.ALABASTER_WHITE,
13
+ ...props
14
+ }) => {
15
+ const calculatedWidth = Math.floor(
16
+ Math.random() * (parseInt(maxWidth) - parseInt(minWidth) + 1) +
17
+ parseInt(minWidth)
18
+ );
19
+
20
+ return (
21
+ <LoadingPill
22
+ aria-label="loading"
23
+ margin={margin}
24
+ height={height}
25
+ width={exactWidth || calculatedWidth}
26
+ backgroundColor={backgroundColor}
27
+ foregroundColor={foregroundColor}
28
+ {...props}
29
+ />
30
+ );
31
+ };
20
32
 
21
33
  export default LoadingLine;
@@ -0,0 +1,15 @@
1
+ import { Canvas, Meta, Title, Story, Controls } from '@storybook/blocks';
2
+
3
+ import * as LoadingLineStories from './LoadingLine.stories.js';
4
+
5
+ <Meta of={LoadingLineStories} />
6
+
7
+ <Title />
8
+
9
+ The LoadingLine is a component with a gray ripple animation that can be used in place of an existing component as it renders. The LoadingLine can either be given an exact width and height using pixel strings, or it can be given an maximum and minimum width. If supplied with a maximum and minimum width, the component will have a random width within the range. Width values should be supplied as pixel values _without_ the "px" suffix. All supplied values will be applied as pixels in the component's style function.
10
+
11
+ Using the minimum and maximum width values can be useful to represent a series of items without a fixed width, like text content, list items, or table values.
12
+
13
+ <Story />
14
+
15
+ <Controls />