@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,120 @@
1
+ import React from "react";
2
+ import LoginForm from "./LoginForm";
3
+ import { Box } from "../../atoms/layouts";
4
+ import { connect, Provider } from "react-redux";
5
+ import { createStore } from "redux";
6
+ import {
7
+ createFormState,
8
+ required,
9
+ hasLength,
10
+ isProbablyEmail
11
+ } from "redux-freeform";
12
+ import { noop } from "../../../util/general";
13
+ import { fn } from "@storybook/test";
14
+
15
+ const formConfig = {
16
+ email: {
17
+ validators: [required(), isProbablyEmail()]
18
+ },
19
+ password: {
20
+ validators: [required()]
21
+ }
22
+ };
23
+
24
+ const { mapStateToProps, mapDispatchToProps, reducer } = createFormState(
25
+ formConfig
26
+ );
27
+
28
+ const store = createStore(
29
+ reducer,
30
+ window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()
31
+ );
32
+
33
+ const FormWrapper = props => (
34
+ <Box minWidth="600px">
35
+ <LoginForm {...props} />
36
+ </Box>
37
+ );
38
+
39
+ const ConnectedLoginForm = connect(
40
+ mapStateToProps,
41
+ mapDispatchToProps
42
+ )(FormWrapper);
43
+
44
+ export default {
45
+ title: "Molecules/LoginForm",
46
+ component: ConnectedLoginForm,
47
+ tags: ["!autodocs"],
48
+ parameters: {
49
+ layout: "centered",
50
+ controls: { expanded: true }
51
+ },
52
+ args: {
53
+ clearOnDismount: undefined,
54
+ fields: undefined,
55
+ actions: undefined,
56
+ handleSubmit: noop,
57
+ showErrors: undefined
58
+ },
59
+ argTypes: {
60
+ actions: {
61
+ description:
62
+ "Field actions, usually generated with [redux-freeform](https://github.com/CityBaseInc/redux-freeform).",
63
+ control: { type: "object" },
64
+ table: {
65
+ type: { summary: "object" },
66
+ defaultValue: { summary: undefined }
67
+ }
68
+ },
69
+ fields: {
70
+ description:
71
+ "Field data, usually generated with [redux-freeform](https://github.com/CityBaseInc/redux-freeform).",
72
+ control: { type: "object" },
73
+ table: {
74
+ type: { summary: "object" },
75
+ defaultValue: { summary: undefined }
76
+ }
77
+ },
78
+ clearOnDismount: {
79
+ description:
80
+ "If `true`, `actions.form.clear()` will be called when the component unmounts.",
81
+ control: { type: "boolean" },
82
+ table: {
83
+ type: { summary: "boolean" },
84
+ defaultValue: { summary: undefined }
85
+ }
86
+ },
87
+ handleSubmit: {
88
+ description:
89
+ "Function called when the `Enter` key is pressed on any of the text inputs (`onKeyDown`). The React event form the will be passed as a parameter.",
90
+ control: { type: "object" },
91
+ table: {
92
+ type: { summary: "function" },
93
+ defaultValue: { summary: undefined }
94
+ }
95
+ }
96
+ },
97
+ decorators: [
98
+ Story => (
99
+ <Provider store={store}>
100
+ <Story />
101
+ </Provider>
102
+ )
103
+ ]
104
+ };
105
+
106
+ export const Basic = args => <ConnectedLoginForm {...args} />;
107
+
108
+ export const ShowErrors = {
109
+ args: {
110
+ showErrors: true
111
+ },
112
+ render: args => <ConnectedLoginForm {...args} />
113
+ };
114
+
115
+ export const HandleSubmit = {
116
+ args: {
117
+ handleSubmit: fn()
118
+ },
119
+ render: args => <ConnectedLoginForm {...args} />
120
+ };
@@ -0,0 +1,17 @@
1
+ import { Canvas, Meta, Title, Story, Controls } from '@storybook/blocks';
2
+
3
+ import * as ModalStories from './Modal.stories.js';
4
+
5
+ <Meta of={ModalStories} />
6
+
7
+ <Title />
8
+
9
+ The Modal component is used to display modal popups to users. It uses the react-aria-modal package under the hood to ensure proper accessibility.
10
+
11
+ The modal comes in two versions: v1 and v2. Version 1 is currently the most used version of the modal across our applications. In 2024, a refactored and redesigned version of the modal was built. This version, in addition to changing the design of the modal, fixed some longstanding issues with focus trapping and modals without buttons. All new implementations of modals should use v2, and the plan is to eventually transition all existing implementations of v1 modals to v2 modals.
12
+
13
+ <Controls />
14
+
15
+ <div style={{ marginBottom: "2em"}}>
16
+ <Story />
17
+ </div>
@@ -0,0 +1,362 @@
1
+ import React, { useState, useEffect } from "react";
2
+ import Modal from "./Modal";
3
+ import { fn } from "@storybook/test";
4
+ import { Stack, Box, Center } from "../../atoms/layouts";
5
+ import ButtonWithAction from "../../atoms/button-with-action/ButtonWithAction";
6
+ import Spinner from "../../atoms/spinner/Spinner";
7
+
8
+ const meta = {
9
+ title: "Molecules/Modal",
10
+ component: Modal,
11
+ parameters: {
12
+ layout: "centered"
13
+ },
14
+ tags: ["!autodocs"],
15
+ args: {
16
+ version: "v1",
17
+ hideModal: fn(),
18
+ continueAction: fn(),
19
+ isContinueActionDisabled: false,
20
+ isCloseActionDisabled: false,
21
+ modalOpen: false,
22
+ cancelButtonText: "Cancel",
23
+ continueButtonText: "Continue",
24
+ closeButtonText: "Close",
25
+ modalHeaderText: "Basic v1 Modal",
26
+ modalBodyText: "Modal body text",
27
+ modalHeaderBg: "white",
28
+ modalBodyBg: "#F6F6F9",
29
+ defaultWrapper: true,
30
+ noBorder: true,
31
+ noButtons: false,
32
+ maxHeight: undefined,
33
+ blurUnderlay: true,
34
+ onlyCloseButton: false,
35
+ onlyContinueButton: false,
36
+ useDangerButton: false,
37
+ continueURL: "",
38
+ showCloseIconButton: false,
39
+ underlayClickExits: true,
40
+ customWidth: undefined,
41
+ isLoading: false,
42
+ buttonExtraStyles: "",
43
+ cancelButtonVariant: "secondary",
44
+ continueButtonVariant: "primary"
45
+ },
46
+ argTypes: {
47
+ version: {
48
+ description:
49
+ "The version (v1/v2) of the Modal. V1 is the most used version in most applications, but all new implementations should use the redesigned v2 version.",
50
+ table: {
51
+ type: { summary: "string" },
52
+ defaultValue: { summary: `v1` }
53
+ }
54
+ },
55
+ hideModal: {
56
+ description: "Function that hides the modal",
57
+ table: {
58
+ type: { summary: "function" },
59
+ defaultValue: { summary: undefined }
60
+ }
61
+ },
62
+ continueAction: {
63
+ description: "Function that fires when user clicks the continue button",
64
+ table: {
65
+ type: { summary: "function" },
66
+ defaultValue: { summary: undefined }
67
+ }
68
+ },
69
+ modalOpen: {
70
+ description: "Whether the modal is open",
71
+ table: {
72
+ type: { summary: "boolean" },
73
+ defaultValue: { summary: false }
74
+ }
75
+ },
76
+ cancelButtonText: {
77
+ description: "Text on the cancel button",
78
+ table: {
79
+ type: { summary: "string" },
80
+ defaultValue: { summary: undefined }
81
+ }
82
+ },
83
+ continueButtonText: {
84
+ description: "Text on the continue button",
85
+ table: {
86
+ type: { summary: "string" },
87
+ defaultValue: { summary: undefined }
88
+ }
89
+ },
90
+ modalHeaderText: {
91
+ description: "A basic v1 modal",
92
+ table: {
93
+ type: { summary: "string" },
94
+ defaultValue: { summary: undefined }
95
+ }
96
+ },
97
+ modalBodyText: {
98
+ description: "Text in the modal body",
99
+ table: {
100
+ type: { summary: "string" },
101
+ defaultValue: { summary: undefined }
102
+ }
103
+ },
104
+ modalHeaderBg: {
105
+ description: "Background color of the modal header",
106
+ table: {
107
+ type: { summary: "object" },
108
+ defaultValue: { summary: `undefined` }
109
+ }
110
+ },
111
+ modalBodyBg: {
112
+ description: "Background color of the modal body",
113
+ table: {
114
+ type: { summary: "string" },
115
+ defaultValue: { summary: "#F6F6F9" }
116
+ }
117
+ },
118
+ defaultWrapper: {
119
+ description:
120
+ "Whether to use a Paragraph component to wrap the body text, or a regular div",
121
+ table: {
122
+ type: { summary: "boolean" },
123
+ defaultValue: { summary: true }
124
+ }
125
+ },
126
+ noBorder: {
127
+ description: "Whether the modal has a border",
128
+ table: {
129
+ type: { summary: "boolean" },
130
+ defaultValue: { summary: true }
131
+ }
132
+ },
133
+ noButtons: {
134
+ description:
135
+ "Whether the modal has buttons. Use true for auto-closing modals.",
136
+ table: {
137
+ type: { summary: "boolean" },
138
+ defaultValue: { summary: false }
139
+ }
140
+ },
141
+ maxHeight: {
142
+ description: "Max height for the modal",
143
+ table: {
144
+ type: { summary: "string" },
145
+ defaultValue: { summary: "" }
146
+ }
147
+ },
148
+ blurUnderlay: {
149
+ description:
150
+ "Whether the underlay behind the modal should be blurred when the modal is open",
151
+ table: {
152
+ type: { summary: "boolean" },
153
+ defaultValue: { summary: true }
154
+ }
155
+ },
156
+ onlyCloseButton: {
157
+ description: "Whether the modal should have only a close button",
158
+ table: {
159
+ type: { summary: "boolean" },
160
+ defaultValue: { summary: false }
161
+ }
162
+ },
163
+ isCloseActionDisabled: {
164
+ description:
165
+ "Whether the close button should be disabled, only used when `onlyCloseButton` is `true`",
166
+ table: {
167
+ type: { summary: "boolean" },
168
+ defaultValue: { summary: false }
169
+ }
170
+ },
171
+ onlyContinueButton: {
172
+ description: "Whether the modal should have only a continue button",
173
+ table: {
174
+ type: { summary: "boolean" },
175
+ defaultValue: { summary: false }
176
+ }
177
+ },
178
+ useDangerButton: {
179
+ description:
180
+ "Whether the modal should use the 'danger' button variant for the continue button",
181
+ table: {
182
+ type: { summary: "boolean" },
183
+ defaultValue: { summary: false }
184
+ }
185
+ },
186
+ continueURL: {
187
+ description:
188
+ "URL destination to use if continue button is a ButtonWithLink (v2 only)",
189
+ table: {
190
+ type: { summary: "string" },
191
+ defaultValue: { summary: undefined }
192
+ }
193
+ },
194
+ showCloseIconButton: {
195
+ description:
196
+ "Whether to show the close icon button in the modal (v2 only)",
197
+ table: {
198
+ type: { summary: "boolean" },
199
+ defaultValue: { summary: false }
200
+ }
201
+ },
202
+ underlayClickExits: {
203
+ description:
204
+ "Whether clicking the underlay behind the modal closes the modal",
205
+ table: {
206
+ type: { summary: "boolean" },
207
+ defaultValue: { summary: false }
208
+ }
209
+ },
210
+ customWidth: {
211
+ description: "Custom width value for the modal",
212
+ table: {
213
+ type: { summary: "string" },
214
+ defaultValue: { summary: "" }
215
+ }
216
+ },
217
+ isLoading: {
218
+ description: "Whether to show loading spinner on modal buttons",
219
+ table: {
220
+ type: { summary: "boolean" },
221
+ defaultValue: { summary: false }
222
+ }
223
+ },
224
+ buttonExtraStyles: {
225
+ description:
226
+ "Extra styles to apply to modal buttons. Applies to all buttons.",
227
+ table: {
228
+ type: { summary: "string" },
229
+ defaultValue: { summary: undefined }
230
+ }
231
+ },
232
+ cancelButtonVariant: {
233
+ description: "Button variant for cancel button (v2 only)",
234
+ table: {
235
+ type: { summary: "string" },
236
+ defaultValue: { summary: "secondary" }
237
+ }
238
+ },
239
+ continueButtonVariant: {
240
+ description: "Button variant for continue button (v2 only)",
241
+ table: {
242
+ type: { summary: "string" },
243
+ defaultValue: { summary: "primary" }
244
+ }
245
+ }
246
+ }
247
+ };
248
+
249
+ export default meta;
250
+
251
+ export const BasicV1Modal = {
252
+ args: {
253
+ version: "v1",
254
+ modalHeaderText: "Payment Method in Use",
255
+ modalBodyText:
256
+ "To remove this payment method, you must first turn off autopay payments scheduled with it. Go to your Account Details page to turn off autopay for these payments.",
257
+ continueButtonText: "Go to Account Details"
258
+ },
259
+ render: args => {
260
+ const [modalOpen, setModalOpen] = useState(false);
261
+
262
+ return (
263
+ <Stack childGap="3rem">
264
+ <Box>
265
+ <ButtonWithAction
266
+ action={() => setModalOpen(true)}
267
+ text="Open Modal"
268
+ />
269
+ </Box>
270
+ <Modal
271
+ {...args}
272
+ modalOpen={modalOpen}
273
+ hideModal={() => setModalOpen(false)}
274
+ cancelAction={() => setModalOpen(false)}
275
+ />
276
+ </Stack>
277
+ );
278
+ }
279
+ };
280
+
281
+ export const BasicV2Modal = {
282
+ args: {
283
+ version: "v2",
284
+ showCloseIconButton: true,
285
+ modalHeaderText: "Total out of balance",
286
+ modalBodyText:
287
+ "Your total is out of balance. If you continue you will closeout out of balance. There is no undoing this action.",
288
+ cancelButtonText: "Edit totals",
289
+ continueButtonText: "Continue Closeout",
290
+ useDangerButton: true
291
+ },
292
+ render: args => {
293
+ const [modalOpen, setModalOpen] = useState(false);
294
+
295
+ return (
296
+ <Stack childGap="3rem">
297
+ <Box>
298
+ <ButtonWithAction
299
+ action={() => setModalOpen(true)}
300
+ text="Open Modal"
301
+ />
302
+ </Box>
303
+ <Modal
304
+ {...args}
305
+ modalOpen={modalOpen}
306
+ hideModal={() => setModalOpen(false)}
307
+ cancelAction={() => setModalOpen(false)}
308
+ />
309
+ </Stack>
310
+ );
311
+ }
312
+ };
313
+
314
+ export const ModalWithoutButtons = {
315
+ args: {
316
+ version: "v2",
317
+ noButtons: true,
318
+ blurUnderlay: false,
319
+ modalHeaderText: "Invoice #12375934 No Longer Valid",
320
+ modalBodyText:
321
+ "The invoice has expired. Please go back to check your balance."
322
+ },
323
+ render: args => {
324
+ const [isModalOpen, setIsModalOpen] = useState(true);
325
+ useEffect(() => {
326
+ setTimeout(() => {
327
+ // some async action or timer closes the modal instead
328
+ setIsModalOpen(false);
329
+ }, 3000);
330
+ }, []);
331
+ return <Modal {...args} modalOpen={isModalOpen} />;
332
+ }
333
+ };
334
+
335
+ export const LoadingModal = {
336
+ args: {
337
+ version: "v2",
338
+ noButtons: true,
339
+ blurUnderlay: false,
340
+ modalHeaderText: "Retrieving Invoice #12375934"
341
+ },
342
+ render: args => {
343
+ const [isModalOpen, setIsModalOpen] = useState(true);
344
+ useEffect(() => {
345
+ setTimeout(() => {
346
+ // some async action or timer closes the modal instead
347
+ setIsModalOpen(false);
348
+ }, 10000);
349
+ }, []);
350
+ return (
351
+ <Modal
352
+ {...args}
353
+ modalOpen={isModalOpen}
354
+ modalBodyText={
355
+ <Center tabIndex={0}>
356
+ <Spinner size="100" />
357
+ </Center>
358
+ }
359
+ />
360
+ );
361
+ }
362
+ };
@@ -25,6 +25,7 @@ const Modal = ({
25
25
  onExit = hideModal,
26
26
  continueAction,
27
27
  isContinueActionDisabled = false,
28
+ isCloseActionDisabled = false,
28
29
  cancelAction,
29
30
  modalOpen,
30
31
  modalHeaderText,
@@ -206,10 +207,12 @@ const Modal = ({
206
207
  ) : (
207
208
  <Box padding="0.5rem">
208
209
  <ButtonWithAction
210
+ tabIndex="0"
209
211
  action={hideModal}
210
212
  variant="primary"
211
213
  text={closeButtonText}
212
214
  dataQa={closeButtonText}
215
+ disabled={isCloseActionDisabled}
213
216
  extraStyles={buttonExtraStyles}
214
217
  className="modal-close-button"
215
218
  role="button"
@@ -42,6 +42,7 @@ const Modal = ({
42
42
  cancelButtonVariant = "secondary",
43
43
  children = [],
44
44
  closeButtonText = "Close",
45
+ closeButtonVariant = "primary",
45
46
  continueAction = noop,
46
47
  continueButtonText = "Continue",
47
48
  continueButtonVariant = "primary",
@@ -202,6 +203,7 @@ const Modal = ({
202
203
  <CloseButton
203
204
  buttonExtraStyles={buttonExtraStyles}
204
205
  closeButtonText={closeButtonText}
206
+ closeButtonVariant={closeButtonVariant}
205
207
  hideModal={hideModal}
206
208
  isMobile={isMobile}
207
209
  key="close"
@@ -9,6 +9,7 @@ import ButtonWithAction from "../../../atoms/button-with-action/ButtonWithAction
9
9
  export const CloseButton = ({
10
10
  buttonExtraStyles = "",
11
11
  closeButtonText = "",
12
+ closeButtonVariant = "primary",
12
13
  hideModal = noop,
13
14
  isMobile = false
14
15
  }) => {
@@ -26,7 +27,7 @@ export const CloseButton = ({
26
27
  role="button"
27
28
  text={closeButtonText}
28
29
  textExtraStyles={`${fontSize}`}
29
- variant="primary"
30
+ variant={closeButtonVariant}
30
31
  />
31
32
  );
32
33
  };
@@ -0,0 +1,17 @@
1
+ import { Canvas, Meta, Title, Story, Controls } from '@storybook/blocks';
2
+
3
+ import * as ModuleStories from './Module.stories.js';
4
+
5
+ <Meta of={ModuleStories} />
6
+
7
+ <Title />
8
+
9
+ The Module is a component that is used to wrap content in a box with a preset box-shadow value. The component can take heading text to display above the child content, or just child content.
10
+
11
+ If title text is supplied via the `heading` prop, current guidelines require use of the `as` and `fontSize` props to specify the HTML element and font size of the title text. Previous (now deprecated) versions of the Module relied on the `variant` prop to specify the element and font size of title text. For purposes of backwards compatability, that method is still supported, but all new use cases should try to use `as` and `fontSize` instead of `variant`.
12
+
13
+ <Controls />
14
+
15
+ <div style={{ marginBottom: "2em"}}>
16
+ <Story />
17
+ </div>