@codecademy/brand 6.0.0-alpha.0839dde39.0 → 6.0.0-alpha.d201d4c8f.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1077) hide show
  1. package/dist/AbbreviatedCommunityEventCard/index.cjs.map +1 -1
  2. package/dist/AbbreviatedCommunityEventCard/index.d.cts.map +1 -1
  3. package/dist/AbbreviatedCommunityEventCard/index.d.ts.map +1 -1
  4. package/dist/AbbreviatedCommunityEventCard/index.js.map +1 -1
  5. package/dist/AccordionAreaDeprecated/index.cjs.map +1 -1
  6. package/dist/AccordionAreaDeprecated/index.d.cts +0 -1
  7. package/dist/AccordionAreaDeprecated/index.d.cts.map +1 -1
  8. package/dist/AccordionAreaDeprecated/index.d.ts +0 -1
  9. package/dist/AccordionAreaDeprecated/index.d.ts.map +1 -1
  10. package/dist/AccordionAreaDeprecated/index.js.map +1 -1
  11. package/dist/AccordionButtonDeprecated/ButtonDeprecated/index.cjs +1 -0
  12. package/dist/AccordionButtonDeprecated/ButtonDeprecated/index.cjs.map +1 -1
  13. package/dist/AccordionButtonDeprecated/ButtonDeprecated/index.js +1 -1
  14. package/dist/AccordionButtonDeprecated/ButtonDeprecated/index.js.map +1 -1
  15. package/dist/AccordionButtonDeprecated/ButtonDeprecatedBase/index.cjs.map +1 -1
  16. package/dist/AccordionButtonDeprecated/ButtonDeprecatedBase/index.d.cts +0 -1
  17. package/dist/AccordionButtonDeprecated/ButtonDeprecatedBase/index.d.cts.map +1 -1
  18. package/dist/AccordionButtonDeprecated/ButtonDeprecatedBase/index.d.ts +0 -1
  19. package/dist/AccordionButtonDeprecated/ButtonDeprecatedBase/index.d.ts.map +1 -1
  20. package/dist/AccordionButtonDeprecated/ButtonDeprecatedBase/index.js.map +1 -1
  21. package/dist/AccordionButtonDeprecated/index.cjs.map +1 -1
  22. package/dist/AccordionButtonDeprecated/index.d.cts +0 -1
  23. package/dist/AccordionButtonDeprecated/index.d.cts.map +1 -1
  24. package/dist/AccordionButtonDeprecated/index.d.ts +0 -1
  25. package/dist/AccordionButtonDeprecated/index.d.ts.map +1 -1
  26. package/dist/AccordionButtonDeprecated/index.js.map +1 -1
  27. package/dist/AccordionDeprecated/index.cjs.map +1 -1
  28. package/dist/AccordionDeprecated/index.d.cts +0 -1
  29. package/dist/AccordionDeprecated/index.d.cts.map +1 -1
  30. package/dist/AccordionDeprecated/index.d.ts +0 -1
  31. package/dist/AccordionDeprecated/index.d.ts.map +1 -1
  32. package/dist/AccordionDeprecated/index.js.map +1 -1
  33. package/dist/AppBar/AppBarSection.cjs.map +1 -1
  34. package/dist/AppBar/AppBarSection.d.cts +0 -1
  35. package/dist/AppBar/AppBarSection.d.cts.map +1 -1
  36. package/dist/AppBar/AppBarSection.d.ts +0 -1
  37. package/dist/AppBar/AppBarSection.d.ts.map +1 -1
  38. package/dist/AppBar/AppBarSection.js.map +1 -1
  39. package/dist/AppBar/index.cjs +3 -4
  40. package/dist/AppBar/index.cjs.map +1 -1
  41. package/dist/AppBar/index.d.cts +1 -2
  42. package/dist/AppBar/index.d.cts.map +1 -1
  43. package/dist/AppBar/index.d.ts +1 -2
  44. package/dist/AppBar/index.d.ts.map +1 -1
  45. package/dist/AppBar/index.js +3 -4
  46. package/dist/AppBar/index.js.map +1 -1
  47. package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogDropdown/MarketingBanner.cjs.map +1 -1
  48. package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogDropdown/MarketingBanner.js.map +1 -1
  49. package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogDropdown/NavPanels.cjs +1 -0
  50. package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogDropdown/NavPanels.cjs.map +1 -1
  51. package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogDropdown/NavPanels.js +1 -1
  52. package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogDropdown/NavPanels.js.map +1 -1
  53. package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogDropdown/consts.cjs +1 -0
  54. package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogDropdown/consts.cjs.map +1 -1
  55. package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogDropdown/consts.js +1 -1
  56. package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogDropdown/consts.js.map +1 -1
  57. package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogDropdown/index.cjs.map +1 -1
  58. package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogDropdown/index.d.cts +2 -0
  59. package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogDropdown/index.d.cts.map +1 -1
  60. package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogDropdown/index.d.ts +2 -0
  61. package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogDropdown/index.d.ts.map +1 -1
  62. package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogDropdown/index.js.map +1 -1
  63. package/dist/AppHeader/AppHeaderElements/AppHeaderDietCard/index.cjs.map +1 -1
  64. package/dist/AppHeader/AppHeaderElements/AppHeaderDietCard/index.js.map +1 -1
  65. package/dist/AppHeader/AppHeaderElements/AppHeaderDropdown/index.cjs.map +1 -1
  66. package/dist/AppHeader/AppHeaderElements/AppHeaderDropdown/index.d.cts +1 -1
  67. package/dist/AppHeader/AppHeaderElements/AppHeaderDropdown/index.d.cts.map +1 -1
  68. package/dist/AppHeader/AppHeaderElements/AppHeaderDropdown/index.d.ts +1 -1
  69. package/dist/AppHeader/AppHeaderElements/AppHeaderDropdown/index.d.ts.map +1 -1
  70. package/dist/AppHeader/AppHeaderElements/AppHeaderDropdown/index.js.map +1 -1
  71. package/dist/AppHeader/AppHeaderElements/AppHeaderDropdownProvider/index.cjs.map +1 -1
  72. package/dist/AppHeader/AppHeaderElements/AppHeaderDropdownProvider/index.js.map +1 -1
  73. package/dist/AppHeader/AppHeaderElements/AppHeaderFeatureCard/index.cjs.map +1 -1
  74. package/dist/AppHeader/AppHeaderElements/AppHeaderFeatureCard/index.js.map +1 -1
  75. package/dist/AppHeader/AppHeaderElements/AppHeaderLink/index.cjs.map +1 -1
  76. package/dist/AppHeader/AppHeaderElements/AppHeaderLink/index.d.cts +1 -1
  77. package/dist/AppHeader/AppHeaderElements/AppHeaderLink/index.d.cts.map +1 -1
  78. package/dist/AppHeader/AppHeaderElements/AppHeaderLink/index.d.ts +1 -1
  79. package/dist/AppHeader/AppHeaderElements/AppHeaderLink/index.d.ts.map +1 -1
  80. package/dist/AppHeader/AppHeaderElements/AppHeaderLink/index.js.map +1 -1
  81. package/dist/AppHeader/AppHeaderElements/AppHeaderLinkSections/elements.cjs.map +1 -1
  82. package/dist/AppHeader/AppHeaderElements/AppHeaderLinkSections/elements.js.map +1 -1
  83. package/dist/AppHeader/AppHeaderElements/AppHeaderLinkSections/index.cjs.map +1 -1
  84. package/dist/AppHeader/AppHeaderElements/AppHeaderLinkSections/index.js.map +1 -1
  85. package/dist/AppHeader/AppHeaderElements/AppHeaderListItem/index.cjs +1 -0
  86. package/dist/AppHeader/AppHeaderElements/AppHeaderListItem/index.cjs.map +1 -1
  87. package/dist/AppHeader/AppHeaderElements/AppHeaderListItem/index.js +1 -1
  88. package/dist/AppHeader/AppHeaderElements/AppHeaderListItem/index.js.map +1 -1
  89. package/dist/AppHeader/AppHeaderElements/AppHeaderLogo/index.cjs.map +1 -1
  90. package/dist/AppHeader/AppHeaderElements/AppHeaderLogo/index.d.cts +1 -1
  91. package/dist/AppHeader/AppHeaderElements/AppHeaderLogo/index.d.cts.map +1 -1
  92. package/dist/AppHeader/AppHeaderElements/AppHeaderLogo/index.d.ts +1 -1
  93. package/dist/AppHeader/AppHeaderElements/AppHeaderLogo/index.d.ts.map +1 -1
  94. package/dist/AppHeader/AppHeaderElements/AppHeaderLogo/index.js.map +1 -1
  95. package/dist/AppHeader/AppHeaderElements/AppHeaderMenuProvider/index.cjs +1 -0
  96. package/dist/AppHeader/AppHeaderElements/AppHeaderMenuProvider/index.cjs.map +1 -1
  97. package/dist/AppHeader/AppHeaderElements/AppHeaderMenuProvider/index.js +1 -1
  98. package/dist/AppHeader/AppHeaderElements/AppHeaderMenuProvider/index.js.map +1 -1
  99. package/dist/AppHeader/AppHeaderElements/AppHeaderNavButton/index.cjs.map +1 -1
  100. package/dist/AppHeader/AppHeaderElements/AppHeaderNavButton/index.js.map +1 -1
  101. package/dist/AppHeader/AppHeaderElements/AppHeaderProvider/index.cjs +1 -0
  102. package/dist/AppHeader/AppHeaderElements/AppHeaderProvider/index.cjs.map +1 -1
  103. package/dist/AppHeader/AppHeaderElements/AppHeaderProvider/index.js +1 -1
  104. package/dist/AppHeader/AppHeaderElements/AppHeaderProvider/index.js.map +1 -1
  105. package/dist/AppHeader/AppHeaderElements/AppHeaderResourcesDropdown/NavPanels.cjs +1 -0
  106. package/dist/AppHeader/AppHeaderElements/AppHeaderResourcesDropdown/NavPanels.cjs.map +1 -1
  107. package/dist/AppHeader/AppHeaderElements/AppHeaderResourcesDropdown/NavPanels.js +1 -1
  108. package/dist/AppHeader/AppHeaderElements/AppHeaderResourcesDropdown/NavPanels.js.map +1 -1
  109. package/dist/AppHeader/AppHeaderElements/AppHeaderResourcesDropdown/consts.cjs.map +1 -1
  110. package/dist/AppHeader/AppHeaderElements/AppHeaderResourcesDropdown/consts.js.map +1 -1
  111. package/dist/AppHeader/AppHeaderElements/AppHeaderResourcesDropdown/index.cjs.map +1 -1
  112. package/dist/AppHeader/AppHeaderElements/AppHeaderResourcesDropdown/index.d.cts +2 -0
  113. package/dist/AppHeader/AppHeaderElements/AppHeaderResourcesDropdown/index.d.cts.map +1 -1
  114. package/dist/AppHeader/AppHeaderElements/AppHeaderResourcesDropdown/index.d.ts +2 -0
  115. package/dist/AppHeader/AppHeaderElements/AppHeaderResourcesDropdown/index.d.ts.map +1 -1
  116. package/dist/AppHeader/AppHeaderElements/AppHeaderResourcesDropdown/index.js.map +1 -1
  117. package/dist/AppHeader/AppHeaderElements/AppHeaderSection/MobileBackButton.cjs.map +1 -1
  118. package/dist/AppHeader/AppHeaderElements/AppHeaderSection/MobileBackButton.js.map +1 -1
  119. package/dist/AppHeader/AppHeaderElements/AppHeaderSection/MobileNavMenu.cjs.map +1 -1
  120. package/dist/AppHeader/AppHeaderElements/AppHeaderSection/MobileNavMenu.js.map +1 -1
  121. package/dist/AppHeader/AppHeaderElements/AppHeaderSection/NavTabs.cjs.map +1 -1
  122. package/dist/AppHeader/AppHeaderElements/AppHeaderSection/NavTabs.js.map +1 -1
  123. package/dist/AppHeader/AppHeaderElements/AppHeaderSection/PanelLayout.cjs.map +1 -1
  124. package/dist/AppHeader/AppHeaderElements/AppHeaderSection/PanelLayout.js.map +1 -1
  125. package/dist/AppHeader/AppHeaderElements/AppHeaderSection/elements.cjs.map +1 -1
  126. package/dist/AppHeader/AppHeaderElements/AppHeaderSection/elements.js.map +1 -1
  127. package/dist/AppHeader/AppHeaderElements/AppHeaderSection/index.cjs.map +1 -1
  128. package/dist/AppHeader/AppHeaderElements/AppHeaderSection/index.js.map +1 -1
  129. package/dist/AppHeader/AppHeaderElements/AppHeaderSkillTile/index.cjs.map +1 -1
  130. package/dist/AppHeader/AppHeaderElements/AppHeaderSkillTile/index.js.map +1 -1
  131. package/dist/AppHeader/Search/DefaultResults.cjs.map +1 -1
  132. package/dist/AppHeader/Search/DefaultResults.js.map +1 -1
  133. package/dist/AppHeader/Search/QuizAndHelpCenterLinks.cjs +1 -0
  134. package/dist/AppHeader/Search/QuizAndHelpCenterLinks.cjs.map +1 -1
  135. package/dist/AppHeader/Search/QuizAndHelpCenterLinks.js +1 -1
  136. package/dist/AppHeader/Search/QuizAndHelpCenterLinks.js.map +1 -1
  137. package/dist/AppHeader/Search/SearchButton.cjs.map +1 -1
  138. package/dist/AppHeader/Search/SearchButton.js.map +1 -1
  139. package/dist/AppHeader/Search/SearchPane.cjs.map +1 -1
  140. package/dist/AppHeader/Search/SearchPane.js.map +1 -1
  141. package/dist/AppHeader/Search/SearchTrackingProvider/index.cjs +1 -0
  142. package/dist/AppHeader/Search/SearchTrackingProvider/index.cjs.map +1 -1
  143. package/dist/AppHeader/Search/SearchTrackingProvider/index.js +1 -1
  144. package/dist/AppHeader/Search/SearchTrackingProvider/index.js.map +1 -1
  145. package/dist/AppHeader/Search/SearchWorker/PromiseLookup.cjs.map +1 -1
  146. package/dist/AppHeader/Search/SearchWorker/PromiseLookup.js.map +1 -1
  147. package/dist/AppHeader/Search/SearchWorker/index.d.cts +0 -1
  148. package/dist/AppHeader/Search/SearchWorker/index.d.cts.map +1 -1
  149. package/dist/AppHeader/Search/SearchWorker/index.d.ts +0 -1
  150. package/dist/AppHeader/Search/SearchWorker/index.d.ts.map +1 -1
  151. package/dist/AppHeader/Search/SearchWorker/types.cjs.map +1 -1
  152. package/dist/AppHeader/Search/SearchWorker/types.d.cts +1 -1
  153. package/dist/AppHeader/Search/SearchWorker/types.d.cts.map +1 -1
  154. package/dist/AppHeader/Search/SearchWorker/types.d.ts +1 -1
  155. package/dist/AppHeader/Search/SearchWorker/types.d.ts.map +1 -1
  156. package/dist/AppHeader/Search/SearchWorker/types.js.map +1 -1
  157. package/dist/AppHeader/Search/SearchWorker/worker.cjs.map +1 -1
  158. package/dist/AppHeader/Search/SearchWorker/worker.js.map +1 -1
  159. package/dist/AppHeader/Search/consts.cjs.map +1 -1
  160. package/dist/AppHeader/Search/consts.d.cts.map +1 -1
  161. package/dist/AppHeader/Search/consts.d.ts.map +1 -1
  162. package/dist/AppHeader/Search/consts.js.map +1 -1
  163. package/dist/AppHeader/Search/hooks/useUrlChangeDetection.cjs.map +1 -1
  164. package/dist/AppHeader/Search/hooks/useUrlChangeDetection.js.map +1 -1
  165. package/dist/AppHeader/Search/types.d.cts +2 -0
  166. package/dist/AppHeader/Search/types.d.cts.map +1 -1
  167. package/dist/AppHeader/Search/types.d.ts +2 -0
  168. package/dist/AppHeader/Search/types.d.ts.map +1 -1
  169. package/dist/AppHeader/Search/useHeaderSearch.cjs.map +1 -1
  170. package/dist/AppHeader/Search/useHeaderSearch.js.map +1 -1
  171. package/dist/AppHeader/index.cjs +10 -0
  172. package/dist/AppHeader/index.cjs.map +1 -1
  173. package/dist/AppHeader/index.d.cts +2 -2
  174. package/dist/AppHeader/index.d.cts.map +1 -1
  175. package/dist/AppHeader/index.d.ts +2 -2
  176. package/dist/AppHeader/index.d.ts.map +1 -1
  177. package/dist/AppHeader/index.js +1 -1
  178. package/dist/AppHeader/index.js.map +1 -1
  179. package/dist/AppHeader/shared/elements.cjs.map +1 -1
  180. package/dist/AppHeader/shared/elements.d.cts +2 -0
  181. package/dist/AppHeader/shared/elements.d.ts +3 -1
  182. package/dist/AppHeader/shared/elements.js.map +1 -1
  183. package/dist/AppHeader/shared/index.cjs +14 -0
  184. package/dist/AppHeader/shared/index.d.cts +5 -1
  185. package/dist/AppHeader/shared/index.d.ts +5 -1
  186. package/dist/AppHeader/shared/index.js +2 -0
  187. package/dist/AppHeader/shared/keyboardNav.d.cts +1 -1
  188. package/dist/AppHeader/shared/keyboardNav.d.ts +1 -1
  189. package/dist/AppHeader/shared/mockAppHeaderItems.d.cts +1 -1
  190. package/dist/AppHeader/shared/mockAppHeaderItems.d.ts +1 -1
  191. package/dist/AppHeader/shared/types.d.cts +2 -2
  192. package/dist/AppHeader/shared/types.d.cts.map +1 -1
  193. package/dist/AppHeader/shared/types.d.ts +2 -2
  194. package/dist/AppHeader/shared/types.d.ts.map +1 -1
  195. package/dist/AppHeader/shared/utils.cjs.map +1 -1
  196. package/dist/AppHeader/shared/utils.js.map +1 -1
  197. package/dist/AppHeaderMobile/AppHeaderMainMenuMobile/index.cjs.map +1 -1
  198. package/dist/AppHeaderMobile/AppHeaderMainMenuMobile/index.d.cts +1 -1
  199. package/dist/AppHeaderMobile/AppHeaderMainMenuMobile/index.d.cts.map +1 -1
  200. package/dist/AppHeaderMobile/AppHeaderMainMenuMobile/index.d.ts +1 -1
  201. package/dist/AppHeaderMobile/AppHeaderMainMenuMobile/index.d.ts.map +1 -1
  202. package/dist/AppHeaderMobile/AppHeaderMainMenuMobile/index.js.map +1 -1
  203. package/dist/AppHeaderMobile/AppHeaderSubMenuMobile/elements.cjs.map +1 -1
  204. package/dist/AppHeaderMobile/AppHeaderSubMenuMobile/elements.js.map +1 -1
  205. package/dist/AppHeaderMobile/AppHeaderSubMenuMobile/index.cjs.map +1 -1
  206. package/dist/AppHeaderMobile/AppHeaderSubMenuMobile/index.d.cts +0 -1
  207. package/dist/AppHeaderMobile/AppHeaderSubMenuMobile/index.d.cts.map +1 -1
  208. package/dist/AppHeaderMobile/AppHeaderSubMenuMobile/index.d.ts +0 -1
  209. package/dist/AppHeaderMobile/AppHeaderSubMenuMobile/index.d.ts.map +1 -1
  210. package/dist/AppHeaderMobile/AppHeaderSubMenuMobile/index.js.map +1 -1
  211. package/dist/AppHeaderMobile/AppHeaderSubMenuTarget/index.cjs.map +1 -1
  212. package/dist/AppHeaderMobile/AppHeaderSubMenuTarget/index.js.map +1 -1
  213. package/dist/AppHeaderMobile/index.cjs.map +1 -1
  214. package/dist/AppHeaderMobile/index.d.cts +3 -1
  215. package/dist/AppHeaderMobile/index.d.cts.map +1 -1
  216. package/dist/AppHeaderMobile/index.d.ts +3 -1
  217. package/dist/AppHeaderMobile/index.d.ts.map +1 -1
  218. package/dist/AppHeaderMobile/index.js.map +1 -1
  219. package/dist/Avatar/index.cjs.map +1 -1
  220. package/dist/Avatar/index.d.cts +0 -1
  221. package/dist/Avatar/index.d.cts.map +1 -1
  222. package/dist/Avatar/index.d.ts +0 -1
  223. package/dist/Avatar/index.d.ts.map +1 -1
  224. package/dist/Avatar/index.js.map +1 -1
  225. package/dist/AvatarChooser/index.cjs.map +1 -1
  226. package/dist/AvatarChooser/index.d.cts +0 -1
  227. package/dist/AvatarChooser/index.d.cts.map +1 -1
  228. package/dist/AvatarChooser/index.d.ts +0 -1
  229. package/dist/AvatarChooser/index.d.ts.map +1 -1
  230. package/dist/AvatarChooser/index.js.map +1 -1
  231. package/dist/BackToTopAnchor/index.cjs.map +1 -1
  232. package/dist/BackToTopAnchor/index.d.cts +7 -3
  233. package/dist/BackToTopAnchor/index.d.cts.map +1 -1
  234. package/dist/BackToTopAnchor/index.d.ts +7 -3
  235. package/dist/BackToTopAnchor/index.d.ts.map +1 -1
  236. package/dist/BackToTopAnchor/index.js.map +1 -1
  237. package/dist/Banner/CountdownTimer.cjs +2 -1
  238. package/dist/Banner/CountdownTimer.cjs.map +1 -1
  239. package/dist/Banner/CountdownTimer.d.cts +0 -1
  240. package/dist/Banner/CountdownTimer.d.cts.map +1 -1
  241. package/dist/Banner/CountdownTimer.d.ts +0 -1
  242. package/dist/Banner/CountdownTimer.d.ts.map +1 -1
  243. package/dist/Banner/CountdownTimer.js +2 -1
  244. package/dist/Banner/CountdownTimer.js.map +1 -1
  245. package/dist/Banner/EnhancedBanner.cjs.map +1 -1
  246. package/dist/Banner/EnhancedBanner.d.cts +0 -1
  247. package/dist/Banner/EnhancedBanner.d.cts.map +1 -1
  248. package/dist/Banner/EnhancedBanner.d.ts +0 -1
  249. package/dist/Banner/EnhancedBanner.d.ts.map +1 -1
  250. package/dist/Banner/EnhancedBanner.js.map +1 -1
  251. package/dist/Banner/index.cjs.map +1 -1
  252. package/dist/Banner/index.d.cts +0 -1
  253. package/dist/Banner/index.d.cts.map +1 -1
  254. package/dist/Banner/index.d.ts +0 -1
  255. package/dist/Banner/index.d.ts.map +1 -1
  256. package/dist/Banner/index.js.map +1 -1
  257. package/dist/BetaSticker/index.cjs.map +1 -1
  258. package/dist/BetaSticker/index.d.cts +0 -1
  259. package/dist/BetaSticker/index.d.cts.map +1 -1
  260. package/dist/BetaSticker/index.d.ts +0 -1
  261. package/dist/BetaSticker/index.d.ts.map +1 -1
  262. package/dist/BetaSticker/index.js.map +1 -1
  263. package/dist/CareerPathCard/index.cjs.map +1 -1
  264. package/dist/CareerPathCard/index.d.cts +0 -1
  265. package/dist/CareerPathCard/index.d.cts.map +1 -1
  266. package/dist/CareerPathCard/index.d.ts +0 -1
  267. package/dist/CareerPathCard/index.d.ts.map +1 -1
  268. package/dist/CareerPathCard/index.js.map +1 -1
  269. package/dist/Carousel/elements.cjs.map +1 -1
  270. package/dist/Carousel/elements.js.map +1 -1
  271. package/dist/Carousel/index.cjs.map +1 -1
  272. package/dist/Carousel/index.d.cts +1 -1
  273. package/dist/Carousel/index.d.cts.map +1 -1
  274. package/dist/Carousel/index.d.ts +1 -1
  275. package/dist/Carousel/index.d.ts.map +1 -1
  276. package/dist/Carousel/index.js.map +1 -1
  277. package/dist/CertificationPathCard/index.cjs.map +1 -1
  278. package/dist/CertificationPathCard/index.d.cts +0 -1
  279. package/dist/CertificationPathCard/index.d.cts.map +1 -1
  280. package/dist/CertificationPathCard/index.d.ts +0 -1
  281. package/dist/CertificationPathCard/index.d.ts.map +1 -1
  282. package/dist/CertificationPathCard/index.js.map +1 -1
  283. package/dist/Coaching/coachingOfferingIcons.d.cts +0 -1
  284. package/dist/Coaching/coachingOfferingIcons.d.cts.map +1 -1
  285. package/dist/Coaching/coachingOfferingIcons.d.ts +0 -1
  286. package/dist/Coaching/coachingOfferingIcons.d.ts.map +1 -1
  287. package/dist/Coaching/coachingOfferings.cjs.map +1 -1
  288. package/dist/Coaching/coachingOfferings.d.cts.map +1 -1
  289. package/dist/Coaching/coachingOfferings.d.ts.map +1 -1
  290. package/dist/Coaching/coachingOfferings.js.map +1 -1
  291. package/dist/Coaching/index.cjs +3 -0
  292. package/dist/Coaching/index.d.cts +2 -1
  293. package/dist/Coaching/index.d.ts +2 -1
  294. package/dist/Coaching/index.js +2 -0
  295. package/dist/CoachingSessionCard/index.cjs +28 -9
  296. package/dist/CoachingSessionCard/index.cjs.map +1 -1
  297. package/dist/CoachingSessionCard/index.d.cts.map +1 -1
  298. package/dist/CoachingSessionCard/index.d.ts.map +1 -1
  299. package/dist/CoachingSessionCard/index.js +29 -10
  300. package/dist/CoachingSessionCard/index.js.map +1 -1
  301. package/dist/CommunityEventCard/EventTypeIcon.cjs +1 -0
  302. package/dist/CommunityEventCard/EventTypeIcon.cjs.map +1 -1
  303. package/dist/CommunityEventCard/EventTypeIcon.js +1 -1
  304. package/dist/CommunityEventCard/EventTypeIcon.js.map +1 -1
  305. package/dist/CommunityEventCard/index.cjs.map +1 -1
  306. package/dist/CommunityEventCard/index.d.cts.map +1 -1
  307. package/dist/CommunityEventCard/index.d.ts.map +1 -1
  308. package/dist/CommunityEventCard/index.js.map +1 -1
  309. package/dist/CommunityEventToast/index.cjs.map +1 -1
  310. package/dist/CommunityEventToast/index.d.cts +0 -1
  311. package/dist/CommunityEventToast/index.d.cts.map +1 -1
  312. package/dist/CommunityEventToast/index.d.ts +0 -1
  313. package/dist/CommunityEventToast/index.d.ts.map +1 -1
  314. package/dist/CommunityEventToast/index.js.map +1 -1
  315. package/dist/ContentGroupBaseCard/helpers.d.cts +0 -1
  316. package/dist/ContentGroupBaseCard/helpers.d.cts.map +1 -1
  317. package/dist/ContentGroupBaseCard/helpers.d.ts +0 -1
  318. package/dist/ContentGroupBaseCard/helpers.d.ts.map +1 -1
  319. package/dist/ContentGroupBaseCard/index.cjs.map +1 -1
  320. package/dist/ContentGroupBaseCard/index.d.cts +0 -1
  321. package/dist/ContentGroupBaseCard/index.d.cts.map +1 -1
  322. package/dist/ContentGroupBaseCard/index.d.ts +0 -1
  323. package/dist/ContentGroupBaseCard/index.d.ts.map +1 -1
  324. package/dist/ContentGroupBaseCard/index.js.map +1 -1
  325. package/dist/ContentGroupBaseCard/shared.cjs.map +1 -1
  326. package/dist/ContentGroupBaseCard/shared.js.map +1 -1
  327. package/dist/ContentGroupBaseCard/types.cjs.map +1 -1
  328. package/dist/ContentGroupBaseCard/types.d.cts.map +1 -1
  329. package/dist/ContentGroupBaseCard/types.d.ts.map +1 -1
  330. package/dist/ContentGroupBaseCard/types.js.map +1 -1
  331. package/dist/CourseCard/index.cjs.map +1 -1
  332. package/dist/CourseCard/index.d.cts +0 -1
  333. package/dist/CourseCard/index.d.cts.map +1 -1
  334. package/dist/CourseCard/index.d.ts +0 -1
  335. package/dist/CourseCard/index.d.ts.map +1 -1
  336. package/dist/CourseCard/index.js.map +1 -1
  337. package/dist/CurriculumCard/BottomTag/index.cjs.map +1 -1
  338. package/dist/CurriculumCard/BottomTag/index.d.cts +1 -0
  339. package/dist/CurriculumCard/BottomTag/index.d.cts.map +1 -1
  340. package/dist/CurriculumCard/BottomTag/index.d.ts +1 -0
  341. package/dist/CurriculumCard/BottomTag/index.d.ts.map +1 -1
  342. package/dist/CurriculumCard/BottomTag/index.js.map +1 -1
  343. package/dist/CurriculumCard/Difficulty/helpers.d.cts +0 -1
  344. package/dist/CurriculumCard/Difficulty/helpers.d.cts.map +1 -1
  345. package/dist/CurriculumCard/Difficulty/helpers.d.ts +0 -1
  346. package/dist/CurriculumCard/Difficulty/helpers.d.ts.map +1 -1
  347. package/dist/CurriculumCard/Difficulty/index.cjs.map +1 -1
  348. package/dist/CurriculumCard/Difficulty/index.d.cts +0 -1
  349. package/dist/CurriculumCard/Difficulty/index.d.cts.map +1 -1
  350. package/dist/CurriculumCard/Difficulty/index.d.ts +0 -1
  351. package/dist/CurriculumCard/Difficulty/index.d.ts.map +1 -1
  352. package/dist/CurriculumCard/Difficulty/index.js.map +1 -1
  353. package/dist/CurriculumCard/Difficulty/types.cjs.map +1 -1
  354. package/dist/CurriculumCard/Difficulty/types.d.cts.map +1 -1
  355. package/dist/CurriculumCard/Difficulty/types.d.ts.map +1 -1
  356. package/dist/CurriculumCard/Difficulty/types.js.map +1 -1
  357. package/dist/CurriculumCard/Footer/index.cjs.map +1 -1
  358. package/dist/CurriculumCard/Footer/index.js.map +1 -1
  359. package/dist/CurriculumCard/Image/index.cjs.map +1 -1
  360. package/dist/CurriculumCard/Image/index.js.map +1 -1
  361. package/dist/CurriculumCard/Subtitle/index.cjs.map +1 -1
  362. package/dist/CurriculumCard/Subtitle/index.d.cts +1 -0
  363. package/dist/CurriculumCard/Subtitle/index.d.cts.map +1 -1
  364. package/dist/CurriculumCard/Subtitle/index.d.ts +1 -0
  365. package/dist/CurriculumCard/Subtitle/index.d.ts.map +1 -1
  366. package/dist/CurriculumCard/Subtitle/index.js.map +1 -1
  367. package/dist/CurriculumCard/index.cjs.map +1 -1
  368. package/dist/CurriculumCard/index.d.cts +0 -1
  369. package/dist/CurriculumCard/index.d.cts.map +1 -1
  370. package/dist/CurriculumCard/index.d.ts +0 -1
  371. package/dist/CurriculumCard/index.d.ts.map +1 -1
  372. package/dist/CurriculumCard/index.js.map +1 -1
  373. package/dist/DropdownButton/DropdownList.cjs +8 -2
  374. package/dist/DropdownButton/DropdownList.cjs.map +1 -1
  375. package/dist/DropdownButton/DropdownList.d.cts +1 -2
  376. package/dist/DropdownButton/DropdownList.d.cts.map +1 -1
  377. package/dist/DropdownButton/DropdownList.d.ts +1 -2
  378. package/dist/DropdownButton/DropdownList.d.ts.map +1 -1
  379. package/dist/DropdownButton/DropdownList.js +8 -2
  380. package/dist/DropdownButton/DropdownList.js.map +1 -1
  381. package/dist/DropdownButton/index.cjs.map +1 -1
  382. package/dist/DropdownButton/index.d.cts +0 -1
  383. package/dist/DropdownButton/index.d.cts.map +1 -1
  384. package/dist/DropdownButton/index.d.ts +0 -1
  385. package/dist/DropdownButton/index.d.ts.map +1 -1
  386. package/dist/DropdownButton/index.js.map +1 -1
  387. package/dist/EmptySection/index.cjs.map +1 -1
  388. package/dist/EmptySection/index.d.cts +1 -1
  389. package/dist/EmptySection/index.d.cts.map +1 -1
  390. package/dist/EmptySection/index.d.ts +1 -1
  391. package/dist/EmptySection/index.d.ts.map +1 -1
  392. package/dist/EmptySection/index.js.map +1 -1
  393. package/dist/ErrorContents/index.cjs.map +1 -1
  394. package/dist/ErrorContents/index.d.cts +0 -1
  395. package/dist/ErrorContents/index.d.cts.map +1 -1
  396. package/dist/ErrorContents/index.d.ts +0 -1
  397. package/dist/ErrorContents/index.d.ts.map +1 -1
  398. package/dist/ErrorContents/index.js.map +1 -1
  399. package/dist/FeatureList/index.cjs.map +1 -1
  400. package/dist/FeatureList/index.d.cts +1 -4
  401. package/dist/FeatureList/index.d.cts.map +1 -1
  402. package/dist/FeatureList/index.d.ts +1 -4
  403. package/dist/FeatureList/index.d.ts.map +1 -1
  404. package/dist/FeatureList/index.js.map +1 -1
  405. package/dist/GlobalFooter/FooterHeading.cjs.map +1 -1
  406. package/dist/GlobalFooter/FooterHeading.js.map +1 -1
  407. package/dist/GlobalFooter/FooterLegal/LegalLinks.cjs.map +1 -1
  408. package/dist/GlobalFooter/FooterLegal/LegalLinks.js.map +1 -1
  409. package/dist/GlobalFooter/FooterLegal/MadeIn.cjs.map +1 -1
  410. package/dist/GlobalFooter/FooterLegal/MadeIn.js.map +1 -1
  411. package/dist/GlobalFooter/FooterLegal/index.cjs.map +1 -1
  412. package/dist/GlobalFooter/FooterLegal/index.js.map +1 -1
  413. package/dist/GlobalFooter/FooterLinks.cjs.map +1 -1
  414. package/dist/GlobalFooter/FooterLinks.js.map +1 -1
  415. package/dist/GlobalFooter/FooterNavLinks/CatalogLinks.cjs.map +1 -1
  416. package/dist/GlobalFooter/FooterNavLinks/CatalogLinks.js.map +1 -1
  417. package/dist/GlobalFooter/FooterNavLinks/CompanyLinks.cjs.map +1 -1
  418. package/dist/GlobalFooter/FooterNavLinks/CompanyLinks.js.map +1 -1
  419. package/dist/GlobalFooter/FooterNavLinks/ReferralRock/ReferAFriendLinkWithModal.cjs.map +1 -1
  420. package/dist/GlobalFooter/FooterNavLinks/ReferralRock/ReferAFriendLinkWithModal.js.map +1 -1
  421. package/dist/GlobalFooter/FooterNavLinks/ReferralRock/ReferralFields.cjs.map +1 -1
  422. package/dist/GlobalFooter/FooterNavLinks/ReferralRock/ReferralFields.js.map +1 -1
  423. package/dist/GlobalFooter/FooterNavLinks/ReferralRock/ReferralForm.cjs.map +1 -1
  424. package/dist/GlobalFooter/FooterNavLinks/ReferralRock/ReferralForm.js.map +1 -1
  425. package/dist/GlobalFooter/FooterNavLinks/ReferralRock/ReferralLinkSocialMediaSharing.cjs.map +1 -1
  426. package/dist/GlobalFooter/FooterNavLinks/ReferralRock/ReferralLinkSocialMediaSharing.js.map +1 -1
  427. package/dist/GlobalFooter/FooterNavLinks/ReferralRock/types.d.cts.map +1 -1
  428. package/dist/GlobalFooter/FooterNavLinks/ReferralRock/types.d.ts.map +1 -1
  429. package/dist/GlobalFooter/FooterNavLinks/SocialMediaLinks.cjs.map +1 -1
  430. package/dist/GlobalFooter/FooterNavLinks/SocialMediaLinks.js.map +1 -1
  431. package/dist/GlobalFooter/FooterNavLinks/assets/download-on-the-app-store.cjs.map +1 -1
  432. package/dist/GlobalFooter/FooterNavLinks/assets/download-on-the-app-store.js.map +1 -1
  433. package/dist/GlobalFooter/FooterNavLinks/assets/get-it-on-google-play.cjs.map +1 -1
  434. package/dist/GlobalFooter/FooterNavLinks/assets/get-it-on-google-play.js.map +1 -1
  435. package/dist/GlobalFooter/FooterNavLinks/index.cjs.map +1 -1
  436. package/dist/GlobalFooter/FooterNavLinks/index.js.map +1 -1
  437. package/dist/GlobalFooter/index.cjs.map +1 -1
  438. package/dist/GlobalFooter/index.d.cts +0 -1
  439. package/dist/GlobalFooter/index.d.cts.map +1 -1
  440. package/dist/GlobalFooter/index.d.ts +0 -1
  441. package/dist/GlobalFooter/index.d.ts.map +1 -1
  442. package/dist/GlobalFooter/index.js.map +1 -1
  443. package/dist/GlobalFooter/types.d.cts +0 -1
  444. package/dist/GlobalFooter/types.d.cts.map +1 -1
  445. package/dist/GlobalFooter/types.d.ts +0 -1
  446. package/dist/GlobalFooter/types.d.ts.map +1 -1
  447. package/dist/GlobalHeader/GlobalHeaderItems.cjs.map +1 -1
  448. package/dist/GlobalHeader/GlobalHeaderItems.js.map +1 -1
  449. package/dist/GlobalHeader/GlobalHeaderVariants.cjs.map +1 -1
  450. package/dist/GlobalHeader/GlobalHeaderVariants.js.map +1 -1
  451. package/dist/GlobalHeader/index.cjs.map +1 -1
  452. package/dist/GlobalHeader/index.d.cts +1 -2
  453. package/dist/GlobalHeader/index.d.cts.map +1 -1
  454. package/dist/GlobalHeader/index.d.ts +1 -2
  455. package/dist/GlobalHeader/index.d.ts.map +1 -1
  456. package/dist/GlobalHeader/index.js.map +1 -1
  457. package/dist/GlobalHeader/types.d.cts +1 -1
  458. package/dist/GlobalHeader/types.d.cts.map +1 -1
  459. package/dist/GlobalHeader/types.d.ts +1 -1
  460. package/dist/GlobalHeader/types.d.ts.map +1 -1
  461. package/dist/GlobalPage/index.cjs.map +1 -1
  462. package/dist/GlobalPage/index.d.cts +0 -1
  463. package/dist/GlobalPage/index.d.cts.map +1 -1
  464. package/dist/GlobalPage/index.d.ts +0 -1
  465. package/dist/GlobalPage/index.d.ts.map +1 -1
  466. package/dist/GlobalPage/index.js.map +1 -1
  467. package/dist/Grid/GridCollapse.cjs.map +1 -1
  468. package/dist/Grid/GridCollapse.d.cts +1 -6
  469. package/dist/Grid/GridCollapse.d.cts.map +1 -1
  470. package/dist/Grid/GridCollapse.d.ts +1 -6
  471. package/dist/Grid/GridCollapse.d.ts.map +1 -1
  472. package/dist/Grid/GridCollapse.js.map +1 -1
  473. package/dist/Grid/Subgrid.d.cts +0 -1
  474. package/dist/Grid/Subgrid.d.cts.map +1 -1
  475. package/dist/Grid/Subgrid.d.ts +0 -1
  476. package/dist/Grid/Subgrid.d.ts.map +1 -1
  477. package/dist/Grid/getCSSFromColumnCount.d.cts +0 -1
  478. package/dist/Grid/getCSSFromColumnCount.d.cts.map +1 -1
  479. package/dist/Grid/getCSSFromColumnCount.d.ts +0 -1
  480. package/dist/Grid/getCSSFromColumnCount.d.ts.map +1 -1
  481. package/dist/Grid/index.cjs +6 -0
  482. package/dist/Grid/index.d.cts +2 -1
  483. package/dist/Grid/index.d.ts +2 -1
  484. package/dist/Grid/index.js +2 -0
  485. package/dist/HeaderHeightArea/index.cjs.map +1 -1
  486. package/dist/HeaderHeightArea/index.js.map +1 -1
  487. package/dist/HorizontalScrollMenu/index.cjs.map +1 -1
  488. package/dist/HorizontalScrollMenu/index.d.cts +1 -0
  489. package/dist/HorizontalScrollMenu/index.d.cts.map +1 -1
  490. package/dist/HorizontalScrollMenu/index.d.ts +1 -0
  491. package/dist/HorizontalScrollMenu/index.d.ts.map +1 -1
  492. package/dist/HorizontalScrollMenu/index.js.map +1 -1
  493. package/dist/HubCard/index.cjs.map +1 -1
  494. package/dist/HubCard/index.d.cts +0 -1
  495. package/dist/HubCard/index.d.cts.map +1 -1
  496. package/dist/HubCard/index.d.ts +0 -1
  497. package/dist/HubCard/index.d.ts.map +1 -1
  498. package/dist/HubCard/index.js.map +1 -1
  499. package/dist/InfoCard/index.cjs.map +1 -1
  500. package/dist/InfoCard/index.d.cts +0 -1
  501. package/dist/InfoCard/index.d.cts.map +1 -1
  502. package/dist/InfoCard/index.d.ts +0 -1
  503. package/dist/InfoCard/index.d.ts.map +1 -1
  504. package/dist/InfoCard/index.js.map +1 -1
  505. package/dist/InstructorCard/index.cjs.map +1 -1
  506. package/dist/InstructorCard/index.d.cts +13 -6
  507. package/dist/InstructorCard/index.d.cts.map +1 -1
  508. package/dist/InstructorCard/index.d.ts +13 -6
  509. package/dist/InstructorCard/index.d.ts.map +1 -1
  510. package/dist/InstructorCard/index.js.map +1 -1
  511. package/dist/Konamimojisplosion/Konamimojisplosion.d.cts +0 -1
  512. package/dist/Konamimojisplosion/Konamimojisplosion.d.cts.map +1 -1
  513. package/dist/Konamimojisplosion/Konamimojisplosion.d.ts +0 -1
  514. package/dist/Konamimojisplosion/Konamimojisplosion.d.ts.map +1 -1
  515. package/dist/Konamimojisplosion/index.cjs +3 -0
  516. package/dist/Konamimojisplosion/index.d.cts +2 -1
  517. package/dist/Konamimojisplosion/index.d.ts +2 -1
  518. package/dist/Konamimojisplosion/index.js +2 -0
  519. package/dist/Konamimojisplosion/useKonamimojisplosion.cjs.map +1 -1
  520. package/dist/Konamimojisplosion/useKonamimojisplosion.d.cts.map +1 -1
  521. package/dist/Konamimojisplosion/useKonamimojisplosion.d.ts.map +1 -1
  522. package/dist/Konamimojisplosion/useKonamimojisplosion.js.map +1 -1
  523. package/dist/LandingPage/Description.cjs.map +1 -1
  524. package/dist/LandingPage/Description.d.cts +0 -1
  525. package/dist/LandingPage/Description.d.cts.map +1 -1
  526. package/dist/LandingPage/Description.d.ts +0 -1
  527. package/dist/LandingPage/Description.d.ts.map +1 -1
  528. package/dist/LandingPage/Description.js.map +1 -1
  529. package/dist/LandingPage/PageFAQs.cjs.map +1 -1
  530. package/dist/LandingPage/PageFAQs.d.cts +0 -1
  531. package/dist/LandingPage/PageFAQs.d.cts.map +1 -1
  532. package/dist/LandingPage/PageFAQs.d.ts +0 -1
  533. package/dist/LandingPage/PageFAQs.d.ts.map +1 -1
  534. package/dist/LandingPage/PageFAQs.js.map +1 -1
  535. package/dist/LandingPage/Title.cjs.map +1 -1
  536. package/dist/LandingPage/Title.d.cts +0 -1
  537. package/dist/LandingPage/Title.d.cts.map +1 -1
  538. package/dist/LandingPage/Title.d.ts +0 -1
  539. package/dist/LandingPage/Title.d.ts.map +1 -1
  540. package/dist/LandingPage/Title.js.map +1 -1
  541. package/dist/LandingPage/TitleWithEyebrow.cjs.map +1 -1
  542. package/dist/LandingPage/TitleWithEyebrow.d.cts +0 -1
  543. package/dist/LandingPage/TitleWithEyebrow.d.cts.map +1 -1
  544. package/dist/LandingPage/TitleWithEyebrow.d.ts +0 -1
  545. package/dist/LandingPage/TitleWithEyebrow.d.ts.map +1 -1
  546. package/dist/LandingPage/TitleWithEyebrow.js.map +1 -1
  547. package/dist/LandingPage/index.cjs +7 -0
  548. package/dist/LandingPage/index.d.cts +2 -1
  549. package/dist/LandingPage/index.d.ts +2 -1
  550. package/dist/LandingPage/index.js +2 -0
  551. package/dist/LandingPage/types.d.cts.map +1 -1
  552. package/dist/LandingPage/types.d.ts.map +1 -1
  553. package/dist/LayoutMenu/AccordionMenu.cjs.map +1 -1
  554. package/dist/LayoutMenu/AccordionMenu.d.cts +0 -1
  555. package/dist/LayoutMenu/AccordionMenu.d.cts.map +1 -1
  556. package/dist/LayoutMenu/AccordionMenu.d.ts +0 -1
  557. package/dist/LayoutMenu/AccordionMenu.d.ts.map +1 -1
  558. package/dist/LayoutMenu/AccordionMenu.js.map +1 -1
  559. package/dist/LayoutMenu/LayoutMenu.cjs.map +1 -1
  560. package/dist/LayoutMenu/LayoutMenu.d.cts +0 -1
  561. package/dist/LayoutMenu/LayoutMenu.d.cts.map +1 -1
  562. package/dist/LayoutMenu/LayoutMenu.d.ts +0 -1
  563. package/dist/LayoutMenu/LayoutMenu.d.ts.map +1 -1
  564. package/dist/LayoutMenu/LayoutMenu.js.map +1 -1
  565. package/dist/LayoutMenu/LayoutMenuSection.cjs.map +1 -1
  566. package/dist/LayoutMenu/LayoutMenuSection.js.map +1 -1
  567. package/dist/LayoutMenu/SectionItemLink.cjs.map +1 -1
  568. package/dist/LayoutMenu/SectionItemLink.d.cts +0 -1
  569. package/dist/LayoutMenu/SectionItemLink.d.cts.map +1 -1
  570. package/dist/LayoutMenu/SectionItemLink.d.ts +0 -1
  571. package/dist/LayoutMenu/SectionItemLink.d.ts.map +1 -1
  572. package/dist/LayoutMenu/SectionItemLink.js.map +1 -1
  573. package/dist/LayoutMenu/SelectedSectionItem.cjs.map +1 -1
  574. package/dist/LayoutMenu/SelectedSectionItem.d.cts +0 -1
  575. package/dist/LayoutMenu/SelectedSectionItem.d.cts.map +1 -1
  576. package/dist/LayoutMenu/SelectedSectionItem.d.ts +0 -1
  577. package/dist/LayoutMenu/SelectedSectionItem.d.ts.map +1 -1
  578. package/dist/LayoutMenu/SelectedSectionItem.js.map +1 -1
  579. package/dist/LayoutMenu/index.cjs +4 -0
  580. package/dist/LayoutMenu/index.d.cts +2 -1
  581. package/dist/LayoutMenu/index.d.ts +2 -1
  582. package/dist/LayoutMenu/index.js +2 -0
  583. package/dist/LayoutMenuVariant/AccordionMenu.cjs.map +1 -1
  584. package/dist/LayoutMenuVariant/AccordionMenu.d.cts +0 -1
  585. package/dist/LayoutMenuVariant/AccordionMenu.d.cts.map +1 -1
  586. package/dist/LayoutMenuVariant/AccordionMenu.d.ts +0 -1
  587. package/dist/LayoutMenuVariant/AccordionMenu.d.ts.map +1 -1
  588. package/dist/LayoutMenuVariant/AccordionMenu.js.map +1 -1
  589. package/dist/LayoutMenuVariant/LayoutMenu.cjs.map +1 -1
  590. package/dist/LayoutMenuVariant/LayoutMenu.d.cts +0 -1
  591. package/dist/LayoutMenuVariant/LayoutMenu.d.cts.map +1 -1
  592. package/dist/LayoutMenuVariant/LayoutMenu.d.ts +0 -1
  593. package/dist/LayoutMenuVariant/LayoutMenu.d.ts.map +1 -1
  594. package/dist/LayoutMenuVariant/LayoutMenu.js.map +1 -1
  595. package/dist/LayoutMenuVariant/LayoutMenuSection.cjs.map +1 -1
  596. package/dist/LayoutMenuVariant/LayoutMenuSection.js.map +1 -1
  597. package/dist/LayoutMenuVariant/SectionItemLink.cjs.map +1 -1
  598. package/dist/LayoutMenuVariant/SectionItemLink.d.cts +0 -1
  599. package/dist/LayoutMenuVariant/SectionItemLink.d.cts.map +1 -1
  600. package/dist/LayoutMenuVariant/SectionItemLink.d.ts +0 -1
  601. package/dist/LayoutMenuVariant/SectionItemLink.d.ts.map +1 -1
  602. package/dist/LayoutMenuVariant/SectionItemLink.js.map +1 -1
  603. package/dist/LayoutMenuVariant/index.cjs +2 -0
  604. package/dist/LayoutMenuVariant/index.d.cts +1 -3
  605. package/dist/LayoutMenuVariant/index.d.ts +1 -3
  606. package/dist/LayoutMenuVariant/index.js +1 -1
  607. package/dist/LearningOutcomeAssessmentScores/AssessmentDetail.cjs.map +1 -1
  608. package/dist/LearningOutcomeAssessmentScores/AssessmentDetail.js.map +1 -1
  609. package/dist/LearningOutcomeAssessmentScores/index.cjs.map +1 -1
  610. package/dist/LearningOutcomeAssessmentScores/index.d.cts.map +1 -1
  611. package/dist/LearningOutcomeAssessmentScores/index.d.ts.map +1 -1
  612. package/dist/LearningOutcomeAssessmentScores/index.js.map +1 -1
  613. package/dist/LearningOutcomeBadges/LearningOutcomeLevelBadge.cjs.map +1 -1
  614. package/dist/LearningOutcomeBadges/LearningOutcomeLevelBadge.d.cts +0 -1
  615. package/dist/LearningOutcomeBadges/LearningOutcomeLevelBadge.d.cts.map +1 -1
  616. package/dist/LearningOutcomeBadges/LearningOutcomeLevelBadge.d.ts +0 -1
  617. package/dist/LearningOutcomeBadges/LearningOutcomeLevelBadge.d.ts.map +1 -1
  618. package/dist/LearningOutcomeBadges/LearningOutcomeLevelBadge.js.map +1 -1
  619. package/dist/LearningOutcomeBadges/LearningOutcomeLowAssessmentBadge.cjs.map +1 -1
  620. package/dist/LearningOutcomeBadges/LearningOutcomeLowAssessmentBadge.d.cts.map +1 -1
  621. package/dist/LearningOutcomeBadges/LearningOutcomeLowAssessmentBadge.d.ts.map +1 -1
  622. package/dist/LearningOutcomeBadges/LearningOutcomeLowAssessmentBadge.js.map +1 -1
  623. package/dist/LearningOutcomeBadges/index.cjs +11 -0
  624. package/dist/LearningOutcomeBadges/index.d.cts +2 -1
  625. package/dist/LearningOutcomeBadges/index.d.ts +2 -1
  626. package/dist/LearningOutcomeBadges/index.js +2 -0
  627. package/dist/LearningOutcomeCard/index.cjs.map +1 -1
  628. package/dist/LearningOutcomeCard/index.d.cts +1 -1
  629. package/dist/LearningOutcomeCard/index.d.cts.map +1 -1
  630. package/dist/LearningOutcomeCard/index.d.ts +1 -1
  631. package/dist/LearningOutcomeCard/index.d.ts.map +1 -1
  632. package/dist/LearningOutcomeCard/index.js.map +1 -1
  633. package/dist/LearningOutcomeFlyout/LearningOutcomeCardList.cjs.map +1 -1
  634. package/dist/LearningOutcomeFlyout/LearningOutcomeCardList.js.map +1 -1
  635. package/dist/LearningOutcomeFlyout/index.cjs.map +1 -1
  636. package/dist/LearningOutcomeFlyout/index.d.cts +1 -1
  637. package/dist/LearningOutcomeFlyout/index.d.cts.map +1 -1
  638. package/dist/LearningOutcomeFlyout/index.d.ts +1 -1
  639. package/dist/LearningOutcomeFlyout/index.d.ts.map +1 -1
  640. package/dist/LearningOutcomeFlyout/index.js.map +1 -1
  641. package/dist/LearningOutcomeFlyout/types.cjs.map +1 -1
  642. package/dist/LearningOutcomeFlyout/types.d.cts +2 -1
  643. package/dist/LearningOutcomeFlyout/types.d.cts.map +1 -1
  644. package/dist/LearningOutcomeFlyout/types.d.ts +2 -1
  645. package/dist/LearningOutcomeFlyout/types.d.ts.map +1 -1
  646. package/dist/LearningOutcomeFlyout/types.js.map +1 -1
  647. package/dist/LearningOutcomePopover/index.cjs.map +1 -1
  648. package/dist/LearningOutcomePopover/index.js.map +1 -1
  649. package/dist/LearningOutcomeTile/Tile.cjs.map +1 -1
  650. package/dist/LearningOutcomeTile/Tile.js.map +1 -1
  651. package/dist/LearningOutcomeTile/index.cjs.map +1 -1
  652. package/dist/LearningOutcomeTile/index.d.cts +0 -1
  653. package/dist/LearningOutcomeTile/index.d.cts.map +1 -1
  654. package/dist/LearningOutcomeTile/index.d.ts +0 -1
  655. package/dist/LearningOutcomeTile/index.d.ts.map +1 -1
  656. package/dist/LearningOutcomeTile/index.js.map +1 -1
  657. package/dist/LearningOutcomeTile/types.cjs.map +1 -1
  658. package/dist/LearningOutcomeTile/types.d.cts +2 -1
  659. package/dist/LearningOutcomeTile/types.d.cts.map +1 -1
  660. package/dist/LearningOutcomeTile/types.d.ts +2 -1
  661. package/dist/LearningOutcomeTile/types.d.ts.map +1 -1
  662. package/dist/LearningOutcomeTile/types.js.map +1 -1
  663. package/dist/ListSection/index.cjs.map +1 -1
  664. package/dist/ListSection/index.d.cts +1 -1
  665. package/dist/ListSection/index.d.cts.map +1 -1
  666. package/dist/ListSection/index.d.ts +1 -1
  667. package/dist/ListSection/index.d.ts.map +1 -1
  668. package/dist/ListSection/index.js.map +1 -1
  669. package/dist/Loading/elements.cjs +60 -0
  670. package/dist/Loading/elements.cjs.map +1 -0
  671. package/dist/Loading/elements.js +56 -0
  672. package/dist/Loading/elements.js.map +1 -0
  673. package/dist/Loading/index.cjs +42 -63
  674. package/dist/Loading/index.cjs.map +1 -1
  675. package/dist/Loading/index.d.cts +0 -1
  676. package/dist/Loading/index.d.cts.map +1 -1
  677. package/dist/Loading/index.d.ts +0 -1
  678. package/dist/Loading/index.d.ts.map +1 -1
  679. package/dist/Loading/index.js +43 -62
  680. package/dist/Loading/index.js.map +1 -1
  681. package/dist/LoadingCurriculumCard/index.cjs.map +1 -1
  682. package/dist/LoadingCurriculumCard/index.d.cts +0 -1
  683. package/dist/LoadingCurriculumCard/index.d.cts.map +1 -1
  684. package/dist/LoadingCurriculumCard/index.d.ts +0 -1
  685. package/dist/LoadingCurriculumCard/index.d.ts.map +1 -1
  686. package/dist/LoadingCurriculumCard/index.js.map +1 -1
  687. package/dist/Logos/LogoCodecademy/index.cjs.map +1 -1
  688. package/dist/Logos/LogoCodecademy/index.d.cts +0 -1
  689. package/dist/Logos/LogoCodecademy/index.d.cts.map +1 -1
  690. package/dist/Logos/LogoCodecademy/index.d.ts +0 -1
  691. package/dist/Logos/LogoCodecademy/index.d.ts.map +1 -1
  692. package/dist/Logos/LogoCodecademy/index.js.map +1 -1
  693. package/dist/Logos/LogoCodecademyMini/index.cjs.map +1 -1
  694. package/dist/Logos/LogoCodecademyMini/index.d.cts +0 -1
  695. package/dist/Logos/LogoCodecademyMini/index.d.cts.map +1 -1
  696. package/dist/Logos/LogoCodecademyMini/index.d.ts +0 -1
  697. package/dist/Logos/LogoCodecademyMini/index.d.ts.map +1 -1
  698. package/dist/Logos/LogoCodecademyMini/index.js.map +1 -1
  699. package/dist/Logos/LogoCodecademyPro/index.cjs.map +1 -1
  700. package/dist/Logos/LogoCodecademyPro/index.d.cts +0 -1
  701. package/dist/Logos/LogoCodecademyPro/index.d.cts.map +1 -1
  702. package/dist/Logos/LogoCodecademyPro/index.d.ts +0 -1
  703. package/dist/Logos/LogoCodecademyPro/index.d.ts.map +1 -1
  704. package/dist/Logos/LogoCodecademyPro/index.js.map +1 -1
  705. package/dist/Logos/LogoCodecademyTeams/index.cjs +11 -7
  706. package/dist/Logos/LogoCodecademyTeams/index.cjs.map +1 -1
  707. package/dist/Logos/LogoCodecademyTeams/index.d.cts +2 -2
  708. package/dist/Logos/LogoCodecademyTeams/index.d.cts.map +1 -1
  709. package/dist/Logos/LogoCodecademyTeams/index.d.ts +2 -2
  710. package/dist/Logos/LogoCodecademyTeams/index.d.ts.map +1 -1
  711. package/dist/Logos/LogoCodecademyTeams/index.js +10 -7
  712. package/dist/Logos/LogoCodecademyTeams/index.js.map +1 -1
  713. package/dist/Logos/LogoFromSkillsoft/index.cjs.map +1 -1
  714. package/dist/Logos/LogoFromSkillsoft/index.d.cts +0 -1
  715. package/dist/Logos/LogoFromSkillsoft/index.d.cts.map +1 -1
  716. package/dist/Logos/LogoFromSkillsoft/index.d.ts +0 -1
  717. package/dist/Logos/LogoFromSkillsoft/index.d.ts.map +1 -1
  718. package/dist/Logos/LogoFromSkillsoft/index.js.map +1 -1
  719. package/dist/Logos/LogoLXStudio/index.cjs.map +1 -1
  720. package/dist/Logos/LogoLXStudio/index.d.cts +0 -1
  721. package/dist/Logos/LogoLXStudio/index.d.cts.map +1 -1
  722. package/dist/Logos/LogoLXStudio/index.d.ts +0 -1
  723. package/dist/Logos/LogoLXStudio/index.d.ts.map +1 -1
  724. package/dist/Logos/LogoLXStudio/index.js.map +1 -1
  725. package/dist/Logos/LogoSkillsoft/index.cjs +26 -0
  726. package/dist/Logos/LogoSkillsoft/index.cjs.map +1 -0
  727. package/dist/Logos/LogoSkillsoft/index.d.cts +7 -0
  728. package/dist/Logos/LogoSkillsoft/index.d.cts.map +1 -0
  729. package/dist/Logos/LogoSkillsoft/index.d.ts +7 -0
  730. package/dist/Logos/LogoSkillsoft/index.d.ts.map +1 -0
  731. package/dist/Logos/LogoSkillsoft/index.js +25 -0
  732. package/dist/Logos/LogoSkillsoft/index.js.map +1 -0
  733. package/dist/Logos/ProLabel/ProLabelCutout/index.cjs.map +1 -1
  734. package/dist/Logos/ProLabel/ProLabelCutout/index.js.map +1 -1
  735. package/dist/Logos/ProLabel/ProLabelCutoutTransparent/index.cjs.map +1 -1
  736. package/dist/Logos/ProLabel/ProLabelCutoutTransparent/index.js.map +1 -1
  737. package/dist/Logos/ProLabel/index.d.cts +0 -1
  738. package/dist/Logos/ProLabel/index.d.cts.map +1 -1
  739. package/dist/Logos/ProLabel/index.d.ts +0 -1
  740. package/dist/Logos/ProLabel/index.d.ts.map +1 -1
  741. package/dist/Logos/index.cjs +12 -2
  742. package/dist/Logos/index.d.cts +3 -1
  743. package/dist/Logos/index.d.ts +3 -1
  744. package/dist/Logos/index.js +3 -0
  745. package/dist/Logos/shared.cjs.map +1 -1
  746. package/dist/Logos/shared.d.cts +2 -0
  747. package/dist/Logos/shared.d.cts.map +1 -1
  748. package/dist/Logos/shared.d.ts +2 -1
  749. package/dist/Logos/shared.d.ts.map +1 -1
  750. package/dist/Logos/shared.js.map +1 -1
  751. package/dist/MarketingToaster/index.cjs.map +1 -1
  752. package/dist/MarketingToaster/index.d.cts +0 -1
  753. package/dist/MarketingToaster/index.d.cts.map +1 -1
  754. package/dist/MarketingToaster/index.d.ts +0 -1
  755. package/dist/MarketingToaster/index.d.ts.map +1 -1
  756. package/dist/MarketingToaster/index.js.map +1 -1
  757. package/dist/NotFoundContent/404.cjs.map +1 -1
  758. package/dist/NotFoundContent/404.js.map +1 -1
  759. package/dist/NotFoundContent/index.cjs.map +1 -1
  760. package/dist/NotFoundContent/index.d.cts +0 -1
  761. package/dist/NotFoundContent/index.d.cts.map +1 -1
  762. package/dist/NotFoundContent/index.d.ts +0 -1
  763. package/dist/NotFoundContent/index.d.ts.map +1 -1
  764. package/dist/NotFoundContent/index.js.map +1 -1
  765. package/dist/NotificationList/EmptyNotification/emptyNotificationContents.cjs.map +1 -1
  766. package/dist/NotificationList/EmptyNotification/emptyNotificationContents.js.map +1 -1
  767. package/dist/NotificationList/EmptyNotification/index.cjs.map +1 -1
  768. package/dist/NotificationList/EmptyNotification/index.js.map +1 -1
  769. package/dist/NotificationList/NotificationItem.cjs.map +1 -1
  770. package/dist/NotificationList/NotificationItem.d.cts +0 -1
  771. package/dist/NotificationList/NotificationItem.d.cts.map +1 -1
  772. package/dist/NotificationList/NotificationItem.d.ts +0 -1
  773. package/dist/NotificationList/NotificationItem.d.ts.map +1 -1
  774. package/dist/NotificationList/NotificationItem.js.map +1 -1
  775. package/dist/NotificationList/index.cjs.map +1 -1
  776. package/dist/NotificationList/index.d.cts +0 -1
  777. package/dist/NotificationList/index.d.cts.map +1 -1
  778. package/dist/NotificationList/index.d.ts +0 -1
  779. package/dist/NotificationList/index.d.ts.map +1 -1
  780. package/dist/NotificationList/index.js.map +1 -1
  781. package/dist/NotificationList/typings.d.cts.map +1 -1
  782. package/dist/NotificationList/typings.d.ts.map +1 -1
  783. package/dist/Notifications/NotificationBell.cjs.map +1 -1
  784. package/dist/Notifications/NotificationBell.js.map +1 -1
  785. package/dist/Notifications/NotificationsContents.cjs.map +1 -1
  786. package/dist/Notifications/NotificationsContents.js.map +1 -1
  787. package/dist/Notifications/NotificationsDropdown.cjs.map +1 -1
  788. package/dist/Notifications/NotificationsDropdown.js.map +1 -1
  789. package/dist/Notifications/elements.cjs.map +1 -1
  790. package/dist/Notifications/elements.js.map +1 -1
  791. package/dist/Notifications/types.d.cts +2 -1
  792. package/dist/Notifications/types.d.cts.map +1 -1
  793. package/dist/Notifications/types.d.ts +2 -1
  794. package/dist/Notifications/types.d.ts.map +1 -1
  795. package/dist/Notifications/useHeaderNotifications.cjs.map +1 -1
  796. package/dist/Notifications/useHeaderNotifications.js.map +1 -1
  797. package/dist/Notifications/useNotificationButtons.cjs.map +1 -1
  798. package/dist/Notifications/useNotificationButtons.js.map +1 -1
  799. package/dist/PageAlerts/PageAlerts.cjs.map +1 -1
  800. package/dist/PageAlerts/PageAlerts.d.cts +0 -1
  801. package/dist/PageAlerts/PageAlerts.d.cts.map +1 -1
  802. package/dist/PageAlerts/PageAlerts.d.ts +0 -1
  803. package/dist/PageAlerts/PageAlerts.d.ts.map +1 -1
  804. package/dist/PageAlerts/PageAlerts.js.map +1 -1
  805. package/dist/PageAlerts/PageAlertsProvider.cjs.map +1 -1
  806. package/dist/PageAlerts/PageAlertsProvider.d.cts +0 -1
  807. package/dist/PageAlerts/PageAlertsProvider.d.cts.map +1 -1
  808. package/dist/PageAlerts/PageAlertsProvider.d.ts +0 -1
  809. package/dist/PageAlerts/PageAlertsProvider.d.ts.map +1 -1
  810. package/dist/PageAlerts/PageAlertsProvider.js.map +1 -1
  811. package/dist/PageAlerts/index.cjs +6 -0
  812. package/dist/PageAlerts/index.d.cts +2 -1
  813. package/dist/PageAlerts/index.d.ts +2 -1
  814. package/dist/PageAlerts/index.js +2 -0
  815. package/dist/PageAlerts/types.d.cts +1 -2
  816. package/dist/PageAlerts/types.d.cts.map +1 -1
  817. package/dist/PageAlerts/types.d.ts +1 -2
  818. package/dist/PageAlerts/types.d.ts.map +1 -1
  819. package/dist/PageLayoutWithSidebarMenu/PageLayoutWithSidebarMenu.cjs.map +1 -1
  820. package/dist/PageLayoutWithSidebarMenu/PageLayoutWithSidebarMenu.d.cts +0 -1
  821. package/dist/PageLayoutWithSidebarMenu/PageLayoutWithSidebarMenu.d.cts.map +1 -1
  822. package/dist/PageLayoutWithSidebarMenu/PageLayoutWithSidebarMenu.d.ts +0 -1
  823. package/dist/PageLayoutWithSidebarMenu/PageLayoutWithSidebarMenu.d.ts.map +1 -1
  824. package/dist/PageLayoutWithSidebarMenu/PageLayoutWithSidebarMenu.js.map +1 -1
  825. package/dist/PageLayoutWithSidebarMenu/index.cjs +2 -0
  826. package/dist/PageLayoutWithSidebarMenu/index.d.cts +2 -1
  827. package/dist/PageLayoutWithSidebarMenu/index.d.ts +2 -1
  828. package/dist/PageLayoutWithSidebarMenu/index.js +2 -0
  829. package/dist/PageSection/index.cjs.map +1 -1
  830. package/dist/PageSection/index.d.cts +0 -1
  831. package/dist/PageSection/index.d.cts.map +1 -1
  832. package/dist/PageSection/index.d.ts +0 -1
  833. package/dist/PageSection/index.d.ts.map +1 -1
  834. package/dist/PageSection/index.js.map +1 -1
  835. package/dist/PastDue/PastDueModalContents/index.cjs.map +1 -1
  836. package/dist/PastDue/PastDueModalContents/index.d.cts +0 -1
  837. package/dist/PastDue/PastDueModalContents/index.d.cts.map +1 -1
  838. package/dist/PastDue/PastDueModalContents/index.d.ts +0 -1
  839. package/dist/PastDue/PastDueModalContents/index.d.ts.map +1 -1
  840. package/dist/PastDue/PastDueModalContents/index.js.map +1 -1
  841. package/dist/PastDue/index.cjs +3 -0
  842. package/dist/PastDue/index.d.cts +2 -1
  843. package/dist/PastDue/index.d.ts +2 -1
  844. package/dist/PastDue/index.js +2 -0
  845. package/dist/PastDue/pastDueMessages.cjs.map +1 -1
  846. package/dist/PastDue/pastDueMessages.d.cts +0 -1
  847. package/dist/PastDue/pastDueMessages.d.cts.map +1 -1
  848. package/dist/PastDue/pastDueMessages.d.ts +0 -1
  849. package/dist/PastDue/pastDueMessages.d.ts.map +1 -1
  850. package/dist/PastDue/pastDueMessages.js.map +1 -1
  851. package/dist/PausableImage/BaseImage/index.cjs.map +1 -1
  852. package/dist/PausableImage/BaseImage/index.js.map +1 -1
  853. package/dist/PausableImage/index.cjs.map +1 -1
  854. package/dist/PausableImage/index.d.cts +0 -1
  855. package/dist/PausableImage/index.d.cts.map +1 -1
  856. package/dist/PausableImage/index.d.ts +0 -1
  857. package/dist/PausableImage/index.d.ts.map +1 -1
  858. package/dist/PausableImage/index.js.map +1 -1
  859. package/dist/PlanCard/PlanCardBanner.cjs.map +1 -1
  860. package/dist/PlanCard/PlanCardBanner.d.cts +0 -1
  861. package/dist/PlanCard/PlanCardBanner.d.cts.map +1 -1
  862. package/dist/PlanCard/PlanCardBanner.d.ts +0 -1
  863. package/dist/PlanCard/PlanCardBanner.d.ts.map +1 -1
  864. package/dist/PlanCard/PlanCardBanner.js.map +1 -1
  865. package/dist/PlanCard/PlanFeature.cjs.map +1 -1
  866. package/dist/PlanCard/PlanFeature.js.map +1 -1
  867. package/dist/PlanCard/PopularBadge.cjs.map +1 -1
  868. package/dist/PlanCard/PopularBadge.js.map +1 -1
  869. package/dist/PlanCard/PricingAmount.cjs.map +1 -1
  870. package/dist/PlanCard/PricingAmount.js.map +1 -1
  871. package/dist/PlanCard/RecommendedBadge.cjs.map +1 -1
  872. package/dist/PlanCard/RecommendedBadge.js.map +1 -1
  873. package/dist/PlanCard/consts.cjs.map +1 -1
  874. package/dist/PlanCard/consts.js.map +1 -1
  875. package/dist/PlanCard/index.cjs +45 -14
  876. package/dist/PlanCard/index.cjs.map +1 -1
  877. package/dist/PlanCard/index.d.cts +1 -1
  878. package/dist/PlanCard/index.d.cts.map +1 -1
  879. package/dist/PlanCard/index.d.ts +1 -1
  880. package/dist/PlanCard/index.d.ts.map +1 -1
  881. package/dist/PlanCard/index.js +45 -14
  882. package/dist/PlanCard/index.js.map +1 -1
  883. package/dist/PlanCard/types.cjs.map +1 -1
  884. package/dist/PlanCard/types.d.cts +6 -6
  885. package/dist/PlanCard/types.d.cts.map +1 -1
  886. package/dist/PlanCard/types.d.ts +6 -6
  887. package/dist/PlanCard/types.d.ts.map +1 -1
  888. package/dist/PlanCard/types.js.map +1 -1
  889. package/dist/PlanCardTeams/consts.cjs.map +1 -1
  890. package/dist/PlanCardTeams/consts.js.map +1 -1
  891. package/dist/PlanCardTeams/index.cjs.map +1 -1
  892. package/dist/PlanCardTeams/index.d.cts +0 -1
  893. package/dist/PlanCardTeams/index.d.cts.map +1 -1
  894. package/dist/PlanCardTeams/index.d.ts +0 -1
  895. package/dist/PlanCardTeams/index.d.ts.map +1 -1
  896. package/dist/PlanCardTeams/index.js.map +1 -1
  897. package/dist/PricingSection/ConditionalColorMode.cjs.map +1 -1
  898. package/dist/PricingSection/ConditionalColorMode.js.map +1 -1
  899. package/dist/PricingSection/PricingCard/PricingAmount.cjs.map +1 -1
  900. package/dist/PricingSection/PricingCard/PricingAmount.js.map +1 -1
  901. package/dist/PricingSection/PricingCard/RecommendedBadge.cjs.map +1 -1
  902. package/dist/PricingSection/PricingCard/RecommendedBadge.js.map +1 -1
  903. package/dist/PricingSection/PricingCard/index.cjs.map +1 -1
  904. package/dist/PricingSection/PricingCard/index.js.map +1 -1
  905. package/dist/PricingSection/PricingCard/types.cjs +18 -0
  906. package/dist/PricingSection/PricingCard/types.cjs.map +1 -1
  907. package/dist/PricingSection/PricingCard/types.d.cts +1 -1
  908. package/dist/PricingSection/PricingCard/types.d.cts.map +1 -1
  909. package/dist/PricingSection/PricingCard/types.d.ts +1 -1
  910. package/dist/PricingSection/PricingCard/types.d.ts.map +1 -1
  911. package/dist/PricingSection/PricingCard/types.js +1 -1
  912. package/dist/PricingSection/PricingCard/types.js.map +1 -1
  913. package/dist/PricingSection/ProductCTA.cjs +1 -0
  914. package/dist/PricingSection/ProductCTA.cjs.map +1 -1
  915. package/dist/PricingSection/ProductCTA.js +1 -1
  916. package/dist/PricingSection/ProductCTA.js.map +1 -1
  917. package/dist/PricingSection/Products.cjs.map +1 -1
  918. package/dist/PricingSection/Products.js.map +1 -1
  919. package/dist/PricingSection/index.cjs.map +1 -1
  920. package/dist/PricingSection/index.d.cts +1 -5
  921. package/dist/PricingSection/index.d.cts.map +1 -1
  922. package/dist/PricingSection/index.d.ts +1 -5
  923. package/dist/PricingSection/index.d.ts.map +1 -1
  924. package/dist/PricingSection/index.js.map +1 -1
  925. package/dist/PricingSection/types.cjs.map +1 -1
  926. package/dist/PricingSection/types.d.cts.map +1 -1
  927. package/dist/PricingSection/types.d.ts.map +1 -1
  928. package/dist/PricingSection/types.js.map +1 -1
  929. package/dist/ProLogoAlt/index.cjs.map +1 -1
  930. package/dist/ProLogoAlt/index.d.cts +0 -1
  931. package/dist/ProLogoAlt/index.d.cts.map +1 -1
  932. package/dist/ProLogoAlt/index.d.ts +0 -1
  933. package/dist/ProLogoAlt/index.d.ts.map +1 -1
  934. package/dist/ProLogoAlt/index.js.map +1 -1
  935. package/dist/ProductFeatureShowcase/index.cjs.map +1 -1
  936. package/dist/ProductFeatureShowcase/index.d.cts.map +1 -1
  937. package/dist/ProductFeatureShowcase/index.d.ts.map +1 -1
  938. package/dist/ProductFeatureShowcase/index.js.map +1 -1
  939. package/dist/QuizScore/index.cjs.map +1 -1
  940. package/dist/QuizScore/index.js.map +1 -1
  941. package/dist/RatingsBar/index.cjs.map +1 -1
  942. package/dist/RatingsBar/index.d.cts +0 -1
  943. package/dist/RatingsBar/index.d.cts.map +1 -1
  944. package/dist/RatingsBar/index.d.ts +0 -1
  945. package/dist/RatingsBar/index.d.ts.map +1 -1
  946. package/dist/RatingsBar/index.js.map +1 -1
  947. package/dist/Recurly/context/elements/index.cjs.map +1 -1
  948. package/dist/Recurly/context/elements/index.d.cts +2 -3
  949. package/dist/Recurly/context/elements/index.d.cts.map +1 -1
  950. package/dist/Recurly/context/elements/index.d.ts +2 -3
  951. package/dist/Recurly/context/elements/index.d.ts.map +1 -1
  952. package/dist/Recurly/context/elements/index.js.map +1 -1
  953. package/dist/Recurly/context/index.cjs +5 -0
  954. package/dist/Recurly/context/index.d.cts +2 -1
  955. package/dist/Recurly/context/index.d.ts +2 -1
  956. package/dist/Recurly/context/index.js +2 -0
  957. package/dist/Recurly/context/recurly/index.cjs.map +1 -1
  958. package/dist/Recurly/context/recurly/index.d.cts +1 -5
  959. package/dist/Recurly/context/recurly/index.d.cts.map +1 -1
  960. package/dist/Recurly/context/recurly/index.d.ts +1 -5
  961. package/dist/Recurly/context/recurly/index.d.ts.map +1 -1
  962. package/dist/Recurly/context/recurly/index.js.map +1 -1
  963. package/dist/Recurly/context/recurly/loadRecurly.d.cts +0 -1
  964. package/dist/Recurly/context/recurly/loadRecurly.d.cts.map +1 -1
  965. package/dist/Recurly/context/recurly/loadRecurly.d.ts +0 -1
  966. package/dist/Recurly/context/recurly/loadRecurly.d.ts.map +1 -1
  967. package/dist/Recurly/fields/RecurlyField.cjs.map +1 -1
  968. package/dist/Recurly/fields/RecurlyField.d.cts +1 -6
  969. package/dist/Recurly/fields/RecurlyField.d.cts.map +1 -1
  970. package/dist/Recurly/fields/RecurlyField.d.ts +1 -6
  971. package/dist/Recurly/fields/RecurlyField.d.ts.map +1 -1
  972. package/dist/Recurly/fields/RecurlyField.js.map +1 -1
  973. package/dist/Recurly/fields/elements.cjs.map +1 -1
  974. package/dist/Recurly/fields/elements.d.cts +0 -1
  975. package/dist/Recurly/fields/elements.d.cts.map +1 -1
  976. package/dist/Recurly/fields/elements.d.ts +0 -1
  977. package/dist/Recurly/fields/elements.d.ts.map +1 -1
  978. package/dist/Recurly/fields/elements.js.map +1 -1
  979. package/dist/Recurly/fields/index.cjs +6 -0
  980. package/dist/Recurly/fields/index.d.cts +2 -1
  981. package/dist/Recurly/fields/index.d.ts +2 -1
  982. package/dist/Recurly/fields/index.js +2 -0
  983. package/dist/Recurly/index.cjs +9 -0
  984. package/dist/Recurly/index.d.cts +4 -1
  985. package/dist/Recurly/index.d.ts +4 -1
  986. package/dist/Recurly/index.js +2 -0
  987. package/dist/ResourceCard/index.cjs.map +1 -1
  988. package/dist/ResourceCard/index.d.cts +0 -1
  989. package/dist/ResourceCard/index.d.cts.map +1 -1
  990. package/dist/ResourceCard/index.d.ts +0 -1
  991. package/dist/ResourceCard/index.d.ts.map +1 -1
  992. package/dist/ResourceCard/index.js.map +1 -1
  993. package/dist/ScoreSummary/SubScores.cjs.map +1 -1
  994. package/dist/ScoreSummary/SubScores.d.cts +1 -10
  995. package/dist/ScoreSummary/SubScores.d.cts.map +1 -1
  996. package/dist/ScoreSummary/SubScores.d.ts +1 -10
  997. package/dist/ScoreSummary/SubScores.d.ts.map +1 -1
  998. package/dist/ScoreSummary/SubScores.js.map +1 -1
  999. package/dist/ScoreSummary/helpers.cjs +1 -0
  1000. package/dist/ScoreSummary/helpers.js +1 -1
  1001. package/dist/ScoreSummary/index.cjs.map +1 -1
  1002. package/dist/ScoreSummary/index.d.cts +0 -1
  1003. package/dist/ScoreSummary/index.d.cts.map +1 -1
  1004. package/dist/ScoreSummary/index.d.ts +0 -1
  1005. package/dist/ScoreSummary/index.d.ts.map +1 -1
  1006. package/dist/ScoreSummary/index.js.map +1 -1
  1007. package/dist/ScoreSummary/types.d.cts.map +1 -1
  1008. package/dist/ScoreSummary/types.d.ts.map +1 -1
  1009. package/dist/SkillPathCard/index.cjs.map +1 -1
  1010. package/dist/SkillPathCard/index.d.cts +0 -1
  1011. package/dist/SkillPathCard/index.d.cts.map +1 -1
  1012. package/dist/SkillPathCard/index.d.ts +0 -1
  1013. package/dist/SkillPathCard/index.d.ts.map +1 -1
  1014. package/dist/SkillPathCard/index.js.map +1 -1
  1015. package/dist/SocialMediaSharing/SocialShareIconLink.cjs.map +1 -1
  1016. package/dist/SocialMediaSharing/SocialShareIconLink.d.cts +1 -0
  1017. package/dist/SocialMediaSharing/SocialShareIconLink.d.cts.map +1 -1
  1018. package/dist/SocialMediaSharing/SocialShareIconLink.d.ts +1 -1
  1019. package/dist/SocialMediaSharing/SocialShareIconLink.d.ts.map +1 -1
  1020. package/dist/SocialMediaSharing/SocialShareIconLink.js.map +1 -1
  1021. package/dist/SocialMediaSharing/index.cjs.map +1 -1
  1022. package/dist/SocialMediaSharing/index.d.cts +3 -14
  1023. package/dist/SocialMediaSharing/index.d.cts.map +1 -1
  1024. package/dist/SocialMediaSharing/index.d.ts +3 -14
  1025. package/dist/SocialMediaSharing/index.d.ts.map +1 -1
  1026. package/dist/SocialMediaSharing/index.js.map +1 -1
  1027. package/dist/SocialMediaSharingDropdown/index.cjs.map +1 -1
  1028. package/dist/SocialMediaSharingDropdown/index.d.cts +0 -1
  1029. package/dist/SocialMediaSharingDropdown/index.d.cts.map +1 -1
  1030. package/dist/SocialMediaSharingDropdown/index.d.ts +0 -1
  1031. package/dist/SocialMediaSharingDropdown/index.d.ts.map +1 -1
  1032. package/dist/SocialMediaSharingDropdown/index.js.map +1 -1
  1033. package/dist/Testimonial/index.cjs.map +1 -1
  1034. package/dist/Testimonial/index.d.cts +0 -1
  1035. package/dist/Testimonial/index.d.cts.map +1 -1
  1036. package/dist/Testimonial/index.d.ts +0 -1
  1037. package/dist/Testimonial/index.d.ts.map +1 -1
  1038. package/dist/Testimonial/index.js.map +1 -1
  1039. package/dist/assets/navyQuotes.cjs.map +1 -1
  1040. package/dist/assets/navyQuotes.js.map +1 -1
  1041. package/dist/index.cjs +21 -23
  1042. package/dist/index.d.cts +13 -3
  1043. package/dist/index.d.ts +13 -3
  1044. package/dist/index.js +2 -3
  1045. package/dist/lib/breakpointHooks/index.cjs +6 -3
  1046. package/dist/lib/breakpointHooks/index.cjs.map +1 -1
  1047. package/dist/lib/breakpointHooks/index.d.cts.map +1 -1
  1048. package/dist/lib/breakpointHooks/index.d.ts.map +1 -1
  1049. package/dist/lib/breakpointHooks/index.js +6 -3
  1050. package/dist/lib/breakpointHooks/index.js.map +1 -1
  1051. package/dist/lib/resourcesList/index.cjs.map +1 -1
  1052. package/dist/lib/resourcesList/index.js.map +1 -1
  1053. package/dist/typings/react.d.cts +0 -1
  1054. package/dist/typings/react.d.cts.map +1 -1
  1055. package/dist/typings/react.d.ts +0 -1
  1056. package/dist/typings/react.d.ts.map +1 -1
  1057. package/dist/utils/index.cjs +2 -0
  1058. package/dist/utils/index.js +2 -0
  1059. package/package.json +2 -2
  1060. package/dist/AppBarDeprecated/AppBarSectionDeprecated.cjs +0 -24
  1061. package/dist/AppBarDeprecated/AppBarSectionDeprecated.cjs.map +0 -1
  1062. package/dist/AppBarDeprecated/AppBarSectionDeprecated.d.cts +0 -19
  1063. package/dist/AppBarDeprecated/AppBarSectionDeprecated.d.cts.map +0 -1
  1064. package/dist/AppBarDeprecated/AppBarSectionDeprecated.d.ts +0 -19
  1065. package/dist/AppBarDeprecated/AppBarSectionDeprecated.d.ts.map +0 -1
  1066. package/dist/AppBarDeprecated/AppBarSectionDeprecated.js +0 -20
  1067. package/dist/AppBarDeprecated/AppBarSectionDeprecated.js.map +0 -1
  1068. package/dist/AppBarDeprecated/index.cjs +0 -27
  1069. package/dist/AppBarDeprecated/index.cjs.map +0 -1
  1070. package/dist/AppBarDeprecated/index.d.cts +0 -19
  1071. package/dist/AppBarDeprecated/index.d.cts.map +0 -1
  1072. package/dist/AppBarDeprecated/index.d.ts +0 -19
  1073. package/dist/AppBarDeprecated/index.d.ts.map +0 -1
  1074. package/dist/AppBarDeprecated/index.js +0 -23
  1075. package/dist/AppBarDeprecated/index.js.map +0 -1
  1076. package/dist/AppBarDeprecated/styles/index.module.scss +0 -37
  1077. package/dist/Loading/styles.module.scss +0 -129
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationItem.js","names":["Box","FlexBox","IconButton","Text","MiniDeleteIcon","MultipleUsersIcon","Bell","ChatBox","EmailAt","Envelope","Heart","Megaphone","New","CheckerDense","themed","styled","React","StyledLink","theme","colors","StyledImg","isInternalLink","href","URL","hostname","window","location","_e","NotificationItem","handleDismiss","notification","handleClick","date","imageUrl","link","text","type","id","notificationItemId","renderIllustration","Illustration","display","aria-hidden","height","width","renderIcon","Icon","justifyContent","alignItems","borderRadius","border","renderImage","src","alt","notificationContent","zIndex","position","textColor","flex","pl","variant","ml","dismissIcon","icon","onClick","aria-describedby","size","z-index","tip","tipProps","alignment","placement","separatorPattern","px","m","li","py","aria-label","rel","target","event"],"sources":["../../src/NotificationList/NotificationItem.tsx"],"sourcesContent":["import { Box, FlexBox, IconButton, Text } from '@codecademy/gamut';\nimport {\n GamutIconProps,\n MiniDeleteIcon,\n MultipleUsersIcon,\n} from '@codecademy/gamut-icons';\nimport {\n Bell,\n ChatBox,\n EmailAt,\n Envelope,\n Heart,\n IllustrationProps,\n Megaphone,\n New,\n} from '@codecademy/gamut-illustrations';\nimport { CheckerDense } from '@codecademy/gamut-patterns';\nimport { themed } from '@codecademy/gamut-styles';\nimport styled from '@emotion/styled';\nimport { ReactElement } from 'react';\nimport * as React from 'react';\n\nimport { Notification } from './typings';\n\nconst StyledLink = styled.a`\n text-decoration: none;\n display: block;\n z-index: 1;\n\n &:before,\n &:after {\n top: -1px;\n left: 0;\n z-index: 0;\n content: '';\n position: absolute;\n width: 100%;\n height: calc(100% + 2px);\n transition: background 250ms;\n }\n &:focus {\n outline: none;\n }\n &:focus-visible {\n &:after {\n border-radius: 4px;\n border: 2px solid ${themed('colors.navy')};\n }\n }\n &:hover {\n text-decoration: none;\n &:before {\n background-color: ${({ theme }) => theme.colors['gray-100']};\n }\n }\n`;\n\nconst StyledImg = styled.img`\n border-radius: 50%;\n border: 1px solid ${themed('colors.navy')};\n height: 3rem;\n width: 3rem;\n`;\n\nconst isInternalLink = (href: string) => {\n try {\n return new URL(href).hostname === window.location.hostname;\n } catch (_e) {}\n return false;\n};\n\nexport type NotificationItemProps = {\n notification: Notification;\n handleClick?: (event: object) => void;\n handleDismiss?: () => void;\n};\n\nexport const NotificationItem: React.FC<NotificationItemProps> = ({\n handleDismiss,\n notification,\n handleClick,\n}) => {\n const { date, imageUrl, link, text, type, id } = notification;\n const notificationItemId = `NotificationItem${id}`;\n\n const renderIllustration = (Illustration: React.FC<IllustrationProps>) => (\n <Box display=\"inline-flex\" aria-hidden>\n <Illustration height={48} width={48} />\n </Box>\n );\n\n const renderIcon = (Icon: React.FC<GamutIconProps>) => (\n <Box\n display=\"inline-flex\"\n justifyContent=\"center\"\n alignItems=\"center\"\n borderRadius=\"full\"\n border={1}\n width={50}\n height={50}\n aria-hidden\n >\n <Icon height={22} width={22} />\n </Box>\n );\n\n const renderImage = () => {\n if (imageUrl) return <StyledImg src={imageUrl} alt=\"\" />;\n\n switch (type) {\n case 'marketing_blast':\n return renderIllustration(Megaphone);\n case 'curriculum_blast':\n return renderIllustration(New);\n case 'cohort_blast':\n return renderIcon(MultipleUsersIcon);\n case 'forum_comment':\n return renderIllustration(ChatBox);\n case 'forum_message':\n return renderIllustration(Envelope);\n case 'forum_like':\n return renderIllustration(Heart);\n case 'forum_mention':\n return renderIllustration(EmailAt);\n default:\n return renderIllustration(Bell);\n }\n };\n\n const notificationContent: ReactElement = (\n <FlexBox zIndex={1} position=\"relative\" textColor=\"text\">\n {renderImage()}\n <Box flex={1} pl={12}>\n <Text id={notificationItemId} variant=\"p-small\">\n {text}\n </Text>\n <Text variant=\"p-small\" textColor=\"text-secondary\" ml={4}>\n {date}\n </Text>\n </Box>\n </FlexBox>\n );\n\n const dismissIcon: ReactElement = (\n <IconButton\n icon={MiniDeleteIcon}\n onClick={handleDismiss}\n aria-describedby={notificationItemId}\n size=\"small\"\n variant=\"secondary\"\n z-index={1}\n tip=\"Dismiss notification\"\n tipProps={{ alignment: 'bottom-center', placement: 'floating' }}\n />\n );\n\n const separatorPattern = (\n <Box px={32} m={0} aria-hidden=\"true\">\n <CheckerDense height=\"1px\" display=\"flex\" />\n </Box>\n );\n\n return (\n <li>\n <FlexBox\n py={24}\n px={32}\n alignItems=\"flex-start\"\n justifyContent=\"space-between\"\n position=\"relative\"\n >\n {link ? (\n <>\n <StyledLink\n href={link}\n aria-label={`${text}, ${date} ago`}\n rel={isInternalLink(link) ? '' : 'noopener noreferrer'}\n target={isInternalLink(link) ? '' : '_blank'}\n onClick={(event) => handleClick?.(event)}\n >\n {notificationContent}\n </StyledLink>\n </>\n ) : (\n <>{notificationContent}</>\n )}\n <FlexBox alignItems=\"flex-start\" zIndex={1}>\n {handleDismiss && dismissIcon}\n </FlexBox>\n </FlexBox>\n {separatorPattern}\n </li>\n );\n};\n"],"mappings":";;;;;;;;;AAwBA,MAAMiB,aAAaF,qBAAAA,KAAAA;;;6QAsBOD,OAAO,aAAA,GAAA,+DAMN,EAAEI,YAAYA,MAAMC,OAAO,aAAW,OAAA,6yNAAA;AAKjE,MAAMC,YAAYL,qBAAAA,OAAAA;;;0CAEID,OAAO,aAAA,GAAA,4BAAA,6yNAAA;AAK7B,MAAMO,kBAAkBC,SAAAA;CACtB,IAAI;EACF,OAAO,IAAIC,IAAID,IAAAA,CAAAA,CAAME,aAAaC,OAAOC,SAASF;CACpD,SAASG,IAAI,CAAC;CACd,OAAO;AACT;AAQA,MAAaC,oBAAqD,EAChEC,eACAC,cACAC,kBACD;CACC,MAAM,EAAEC,MAAMC,UAAUC,MAAMC,MAAMC,MAAMC,OAAOP;CACjD,MAAMQ,qBAAqB,mBAAmBD;CAE9C,MAAME,sBAAsBC,iBAC1B,sBAAA,cAACxC,KAAAA;EAAIyC,SAAQ;EAAcC,eAAAA;IACzB,sBAAA,cAACF,cAAAA;EAAaG,QAAQ;EAAIC,OAAO;;CAIrC,MAAMC,cAAcC,SAClB,sBAAA,cAAC9C,KAAAA;EACCyC,SAAQ;EACRM,gBAAe;EACfC,YAAW;EACXC,cAAa;EACbC,QAAQ;EACRN,OAAO;EACPD,QAAQ;EACRD,eAAAA;IAEA,sBAAA,cAACI,MAAAA;EAAKH,QAAQ;EAAIC,OAAO;;CAI7B,MAAMO,oBAAc;EAClB,IAAIlB,UAAU,OAAO,sBAAA,cAACb,WAAAA;GAAUgC,KAAKnB;GAAUoB,KAAI;;EAEnD,QAAQjB,MAAR;GACE,KAAK,mBACH,OAAOG,mBAAmB5B,SAAAA;GAC5B,KAAK,oBACH,OAAO4B,mBAAmB3B,GAAAA;GAC5B,KAAK,gBACH,OAAOiC,WAAWxC,iBAAAA;GACpB,KAAK,iBACH,OAAOkC,mBAAmBhC,OAAAA;GAC5B,KAAK,iBACH,OAAOgC,mBAAmB9B,QAAAA;GAC5B,KAAK,cACH,OAAO8B,mBAAmB7B,KAAAA;GAC5B,KAAK,iBACH,OAAO6B,mBAAmB/B,OAAAA;GAC5B,SACE,OAAO+B,mBAAmBjC,IAAAA;EAC9B;CACF;CAEA,MAAMgD,sBACJ,sBAAA,cAACrD,SAAAA;EAAQsD,QAAQ;EAAGC,UAAS;EAAWC,WAAU;IAC/CN,YAAAA,GACD,sBAAA,cAACnD,KAAAA;EAAI0D,MAAM;EAAGC,IAAI;IAChB,sBAAA,cAACxD,MAAAA;EAAKkC,IAAIC;EAAoBsB,SAAQ;IACnCzB,IAAAA,GAEH,sBAAA,cAAChC,MAAAA;EAAKyD,SAAQ;EAAUH,WAAU;EAAiBI,IAAI;IACpD7B,IAAAA,CAAAA,CAAAA;CAMT,MAAM8B,cACJ,sBAAA,cAAC5D,YAAAA;EACC6D,MAAM3D;EACN4D,SAASnC;EACToC,oBAAkB3B;EAClB4B,MAAK;EACLN,SAAQ;EACRO,WAAS;EACTC,KAAI;EACJC,UAAU;GAAEC,WAAW;GAAiBC,WAAW;EAAW;;CAIlE,MAAMC,mBACJ,sBAAA,cAACxE,KAAAA;EAAIyE,IAAI;EAAIC,GAAG;EAAGhC,eAAY;IAC7B,sBAAA,cAAC7B,cAAAA;EAAa8B,QAAO;EAAMF,SAAQ;;CAIvC,OACE,sBAAA,cAACkC,MAAAA,MACC,sBAAA,cAAC1E,SAAAA;EACC2E,IAAI;EACJH,IAAI;EACJzB,YAAW;EACXD,gBAAe;EACfS,UAAS;IAERtB,OACC,sBAAA,cAAA,QAAA,UAAA,MACE,sBAAA,cAACjB,YAAAA;EACCK,MAAMY;EACN2C,cAAY,GAAG1C,KAAK,IAAIH,KAAK;EAC7B8C,KAAKzD,eAAea,IAAAA,IAAQ,KAAK;EACjC6C,QAAQ1D,eAAea,IAAAA,IAAQ,KAAK;EACpC8B,UAAUgB,UAAUjD,cAAciD,KAAAA;IAEjC1B,mBAAAA,CAAAA,IAIL,sBAAA,cAAA,QAAA,UAAA,MAAGA,mBAAAA,GAEL,sBAAA,cAACrD,SAAAA;EAAQ+C,YAAW;EAAaO,QAAQ;IACtC1B,iBAAiBiC,WAAAA,CAAAA,GAGrBU,gBAAAA;AAGP"}
1
+ {"version":3,"file":"NotificationItem.js","names":["Box","FlexBox","IconButton","Text","MiniDeleteIcon","MultipleUsersIcon","Bell","ChatBox","EmailAt","Envelope","Heart","Megaphone","New","CheckerDense","themed","styled","React","StyledLink","theme","colors","StyledImg","isInternalLink","href","URL","hostname","window","location","_e","NotificationItem","handleDismiss","notification","handleClick","date","imageUrl","link","text","type","id","notificationItemId","renderIllustration","Illustration","display","aria-hidden","height","width","renderIcon","Icon","justifyContent","alignItems","borderRadius","border","renderImage","src","alt","notificationContent","zIndex","position","textColor","flex","pl","variant","ml","dismissIcon","icon","onClick","aria-describedby","size","z-index","tip","tipProps","alignment","placement","separatorPattern","px","m","li","py","aria-label","rel","target","event"],"sources":["../../src/NotificationList/NotificationItem.tsx"],"sourcesContent":["import { Box, FlexBox, IconButton, Text } from '@codecademy/gamut';\nimport {\n GamutIconProps,\n MiniDeleteIcon,\n MultipleUsersIcon,\n} from '@codecademy/gamut-icons';\nimport {\n Bell,\n ChatBox,\n EmailAt,\n Envelope,\n Heart,\n IllustrationProps,\n Megaphone,\n New,\n} from '@codecademy/gamut-illustrations';\nimport { CheckerDense } from '@codecademy/gamut-patterns';\nimport { themed } from '@codecademy/gamut-styles';\nimport styled from '@emotion/styled';\nimport { ReactElement } from 'react';\nimport * as React from 'react';\n\nimport { Notification } from './typings';\n\nconst StyledLink = styled.a`\n text-decoration: none;\n display: block;\n z-index: 1;\n\n &:before,\n &:after {\n top: -1px;\n left: 0;\n z-index: 0;\n content: '';\n position: absolute;\n width: 100%;\n height: calc(100% + 2px);\n transition: background 250ms;\n }\n &:focus {\n outline: none;\n }\n &:focus-visible {\n &:after {\n border-radius: 4px;\n border: 2px solid ${themed('colors.navy')};\n }\n }\n &:hover {\n text-decoration: none;\n &:before {\n background-color: ${({ theme }) => theme.colors['gray-100']};\n }\n }\n`;\n\nconst StyledImg = styled.img`\n border-radius: 50%;\n border: 1px solid ${themed('colors.navy')};\n height: 3rem;\n width: 3rem;\n`;\n\nconst isInternalLink = (href: string) => {\n try {\n return new URL(href).hostname === window.location.hostname;\n } catch (_e) {}\n return false;\n};\n\nexport type NotificationItemProps = {\n notification: Notification;\n handleClick?: (event: object) => void;\n handleDismiss?: () => void;\n};\n\nexport const NotificationItem: React.FC<NotificationItemProps> = ({\n handleDismiss,\n notification,\n handleClick,\n}) => {\n const { date, imageUrl, link, text, type, id } = notification;\n const notificationItemId = `NotificationItem${id}`;\n\n const renderIllustration = (Illustration: React.FC<IllustrationProps>) => (\n <Box display=\"inline-flex\" aria-hidden>\n <Illustration height={48} width={48} />\n </Box>\n );\n\n const renderIcon = (Icon: React.FC<GamutIconProps>) => (\n <Box\n display=\"inline-flex\"\n justifyContent=\"center\"\n alignItems=\"center\"\n borderRadius=\"full\"\n border={1}\n width={50}\n height={50}\n aria-hidden\n >\n <Icon height={22} width={22} />\n </Box>\n );\n\n const renderImage = () => {\n if (imageUrl) return <StyledImg src={imageUrl} alt=\"\" />;\n\n switch (type) {\n case 'marketing_blast':\n return renderIllustration(Megaphone);\n case 'curriculum_blast':\n return renderIllustration(New);\n case 'cohort_blast':\n return renderIcon(MultipleUsersIcon);\n case 'forum_comment':\n return renderIllustration(ChatBox);\n case 'forum_message':\n return renderIllustration(Envelope);\n case 'forum_like':\n return renderIllustration(Heart);\n case 'forum_mention':\n return renderIllustration(EmailAt);\n default:\n return renderIllustration(Bell);\n }\n };\n\n const notificationContent: ReactElement = (\n <FlexBox zIndex={1} position=\"relative\" textColor=\"text\">\n {renderImage()}\n <Box flex={1} pl={12}>\n <Text id={notificationItemId} variant=\"p-small\">\n {text}\n </Text>\n <Text variant=\"p-small\" textColor=\"text-secondary\" ml={4}>\n {date}\n </Text>\n </Box>\n </FlexBox>\n );\n\n const dismissIcon: ReactElement = (\n <IconButton\n icon={MiniDeleteIcon}\n onClick={handleDismiss}\n aria-describedby={notificationItemId}\n size=\"small\"\n variant=\"secondary\"\n z-index={1}\n tip=\"Dismiss notification\"\n tipProps={{ alignment: 'bottom-center', placement: 'floating' }}\n />\n );\n\n const separatorPattern = (\n <Box px={32} m={0} aria-hidden=\"true\">\n <CheckerDense height=\"1px\" display=\"flex\" />\n </Box>\n );\n\n return (\n <li>\n <FlexBox\n py={24}\n px={32}\n alignItems=\"flex-start\"\n justifyContent=\"space-between\"\n position=\"relative\"\n >\n {link ? (\n <>\n <StyledLink\n href={link}\n aria-label={`${text}, ${date} ago`}\n rel={isInternalLink(link) ? '' : 'noopener noreferrer'}\n target={isInternalLink(link) ? '' : '_blank'}\n onClick={(event) => handleClick?.(event)}\n >\n {notificationContent}\n </StyledLink>\n </>\n ) : (\n <>{notificationContent}</>\n )}\n <FlexBox alignItems=\"flex-start\" zIndex={1}>\n {handleDismiss && dismissIcon}\n </FlexBox>\n </FlexBox>\n {separatorPattern}\n </li>\n );\n};\n"],"mappings":";;;;;;;;;AAwBA,MAAMiB,aAAaF,qBAAAA,KAAAA;;;AAsBOD,CAAAA,CAAAA,CAAAA,0QAAAA,OAAO,aAAA,GAAA,+DAMN,EAAEI,YAAYA,MAAMC,OAAO,aAAW,OAAA,6yNAAA;AAKjE,MAAMC,YAAYL,qBAAAA,OAAAA;;;AAEID,CAAAA,CAAAA,CAAAA,uCAAAA,OAAO,aAAA,GAAA,4BAAA,6yNAAA;AAK7B,MAAMO,kBAAkBC,SAAAA;CACtB,IAAI;EACF,OAAO,IAAIC,IAAID,IAAAA,CAAAA,CAAME,aAAaC,OAAOC,SAASF;CACpD,SAASG,IAAI,CAAC;CACd,OAAO;AACT;AAQA,MAAaC,oBAAqD,EAChEC,eACAC,cACAC,kBACD;CACC,MAAM,EAAEC,MAAMC,UAAUC,MAAMC,MAAMC,MAAMC,OAAOP;CACjD,MAAMQ,qBAAqB,mBAAmBD;CAE9C,MAAME,sBAAsBC,iBAC1B,sBAAA,cAACxC,KAAAA;EAAIyC,SAAQ;EAAcC,eAAAA;CACzB,GAAA,sBAAA,cAACF,cAAAA;EAAaG,QAAQ;EAAIC,OAAO;;CAIrC,MAAMC,cAAcC,SAClB,sBAAA,cAAC9C,KAAAA;EACCyC,SAAQ;EACRM,gBAAe;EACfC,YAAW;EACXC,cAAa;EACbC,QAAQ;EACRN,OAAO;EACPD,QAAQ;EACRD,eAAAA;CAEA,GAAA,sBAAA,cAACI,MAAAA;EAAKH,QAAQ;EAAIC,OAAO;;CAI7B,MAAMO,oBAAc;EAClB,IAAIlB,UAAU,OAAO,sBAAA,cAACb,WAAAA;GAAUgC,KAAKnB;GAAUoB,KAAI;;EAEnD,QAAQjB,MAAR;GACE,KAAK,mBACH,OAAOG,mBAAmB5B,SAAAA;GAC5B,KAAK,oBACH,OAAO4B,mBAAmB3B,GAAAA;GAC5B,KAAK,gBACH,OAAOiC,WAAWxC,iBAAAA;GACpB,KAAK,iBACH,OAAOkC,mBAAmBhC,OAAAA;GAC5B,KAAK,iBACH,OAAOgC,mBAAmB9B,QAAAA;GAC5B,KAAK,cACH,OAAO8B,mBAAmB7B,KAAAA;GAC5B,KAAK,iBACH,OAAO6B,mBAAmB/B,OAAAA;GAC5B,SACE,OAAO+B,mBAAmBjC,IAAAA;EAC9B;CACF;CAEA,MAAMgD,sBACJ,sBAAA,cAACrD,SAAAA;EAAQsD,QAAQ;EAAGC,UAAS;EAAWC,WAAU;CAC/CN,GAAAA,YAAAA,GACD,sBAAA,cAACnD,KAAAA;EAAI0D,MAAM;EAAGC,IAAI;CAChB,GAAA,sBAAA,cAACxD,MAAAA;EAAKkC,IAAIC;EAAoBsB,SAAQ;CACnCzB,GAAAA,IAAAA,GAEH,sBAAA,cAAChC,MAAAA;EAAKyD,SAAQ;EAAUH,WAAU;EAAiBI,IAAI;CACpD7B,GAAAA,IAAAA,CAAAA,CAAAA;CAMT,MAAM8B,cACJ,sBAAA,cAAC5D,YAAAA;EACC6D,MAAM3D;EACN4D,SAASnC;EACToC,oBAAkB3B;EAClB4B,MAAK;EACLN,SAAQ;EACRO,WAAS;EACTC,KAAI;EACJC,UAAU;GAAEC,WAAW;GAAiBC,WAAW;EAAW;;CAIlE,MAAMC,mBACJ,sBAAA,cAACxE,KAAAA;EAAIyE,IAAI;EAAIC,GAAG;EAAGhC,eAAY;CAC7B,GAAA,sBAAA,cAAC7B,cAAAA;EAAa8B,QAAO;EAAMF,SAAQ;;CAIvC,OACE,sBAAA,cAACkC,MAAAA,MACC,sBAAA,cAAC1E,SAAAA;EACC2E,IAAI;EACJH,IAAI;EACJzB,YAAW;EACXD,gBAAe;EACfS,UAAS;CAERtB,GAAAA,OACC,sBAAA,cAAA,QAAA,UAAA,MACE,sBAAA,cAACjB,YAAAA;EACCK,MAAMY;EACN2C,cAAY,GAAG1C,KAAK,IAAIH,KAAK;EAC7B8C,KAAKzD,eAAea,IAAAA,IAAQ,KAAK;EACjC6C,QAAQ1D,eAAea,IAAAA,IAAQ,KAAK;EACpC8B,UAAUgB,UAAUjD,cAAciD,KAAAA;CAEjC1B,GAAAA,mBAAAA,CAAAA,IAIL,sBAAA,cAAA,QAAA,UAAA,MAAGA,mBAAAA,GAEL,sBAAA,cAACrD,SAAAA;EAAQ+C,YAAW;EAAaO,QAAQ;CACtC1B,GAAAA,iBAAiBiC,WAAAA,CAAAA,GAGrBU,gBAAAA;AAGP"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["focusVisibleStyle","Background","css","styled","isEmpty","React","EmptyNotification","NotificationItem","listFocusStyle","UnstyledUnorderedList","listStyle","padding","margin","NotificationList","notifications","onNotificationClick","onDismiss","headerElementId","listRef","useRef","onDismissHandler","notification","current","focus","aria-labelledby","aria-live","aria-relevant","as","bg","ref","tabIndex","map","key","id","handleClick","handleDismiss"],"sources":["../../src/NotificationList/index.tsx"],"sourcesContent":["import { focusVisibleStyle } from '@codecademy/gamut';\nimport { Background, css } from '@codecademy/gamut-styles';\nimport styled from '@emotion/styled';\nimport isEmpty from 'lodash/isEmpty';\nimport * as React from 'react';\n\nimport { EmptyNotification } from './EmptyNotification';\nimport { NotificationItem } from './NotificationItem';\nimport { Notification } from './typings';\n\nexport type NotificationListProps = {\n onDismiss?: (notification: Notification) => void;\n notifications: Notification[];\n onNotificationClick?: (notification: Notification) => void;\n headerElementId?: string; // Used for aria-labelledby for the list.\n};\n\nconst listFocusStyle = focusVisibleStyle('-4px');\n\nconst UnstyledUnorderedList = styled(Background)(\n css({\n listStyle: 'none',\n padding: 0,\n margin: 0,\n ...listFocusStyle,\n })\n);\n\nexport const NotificationList: React.FC<NotificationListProps> = ({\n notifications,\n onNotificationClick,\n onDismiss,\n headerElementId,\n}) => {\n const listRef = React.useRef<HTMLDivElement>(null);\n const onDismissHandler = async (notification: Notification) => {\n if (listRef?.current) {\n await listRef.current.focus();\n }\n await onDismiss?.(notification);\n };\n\n return (\n <UnstyledUnorderedList\n aria-labelledby={headerElementId}\n aria-live=\"polite\"\n aria-relevant=\"additions\"\n as=\"ul\"\n bg=\"background\"\n ref={listRef}\n tabIndex={-1}\n >\n {isEmpty(notifications) ? (\n <EmptyNotification />\n ) : (\n notifications.map((notification: Notification) => (\n <NotificationItem\n key={notification.id}\n notification={notification}\n handleClick={() => onNotificationClick?.(notification)}\n handleDismiss={() => onDismissHandler(notification)}\n />\n ))\n )}\n </UnstyledUnorderedList>\n );\n};\n"],"mappings":";;;;;;;;;;;;;AAiBA,MAAMQ,0DAAmC,MAAA;AAEzC,MAAMC,wBAAwBN,2CAAOF,qCAAAA;;;qCAC/B;CACFS,WAAW;CACXC,SAAS;CACTC,QAAQ;CACR,GAAGJ;AACL,CAAA,GAAA,q6FAAA;AAGF,MAAaK,oBAAqD,EAChEC,eACAC,qBACAC,WACAC,sBACD;CACC,MAAMC,UAAUb,MAAMc,OAAuB,IAAA;CAC7C,MAAMC,mBAAmB,OAAOC,iBAAAA;EAC9B,IAAIH,SAASI,SACX,MAAMJ,QAAQI,QAAQC,MAAK;EAE7B,MAAMP,YAAYK,YAAAA;CACpB;CAEA,OACE,oBAAA,cAACZ,uBAAAA;EACCe,mBAAiBP;EACjBQ,aAAU;EACVC,iBAAc;EACdC,IAAG;EACHC,IAAG;EACHC,KAAKX;EACLY,UAAU;mCAEDhB,aAAAA,IACP,oBAAA,cAACR,iCAAAA,IAAAA,IAEDQ,cAAciB,KAAKV,iBACjB,oBAAA,cAACd,2CAAAA;EACCyB,KAAKX,aAAaY;EACJZ;EACda,mBAAmBnB,sBAAsBM,YAAAA;EACzCc,qBAAqBf,iBAAiBC,YAAAA;;AAMlD"}
1
+ {"version":3,"file":"index.cjs","names":["focusVisibleStyle","Background","css","styled","isEmpty","React","EmptyNotification","NotificationItem","listFocusStyle","UnstyledUnorderedList","listStyle","padding","margin","NotificationList","notifications","onNotificationClick","onDismiss","headerElementId","listRef","useRef","onDismissHandler","notification","current","focus","aria-labelledby","aria-live","aria-relevant","as","bg","ref","tabIndex","map","key","id","handleClick","handleDismiss"],"sources":["../../src/NotificationList/index.tsx"],"sourcesContent":["import { focusVisibleStyle } from '@codecademy/gamut';\nimport { Background, css } from '@codecademy/gamut-styles';\nimport styled from '@emotion/styled';\nimport isEmpty from 'lodash/isEmpty';\nimport * as React from 'react';\n\nimport { EmptyNotification } from './EmptyNotification';\nimport { NotificationItem } from './NotificationItem';\nimport { Notification } from './typings';\n\nexport type NotificationListProps = {\n onDismiss?: (notification: Notification) => void;\n notifications: Notification[];\n onNotificationClick?: (notification: Notification) => void;\n headerElementId?: string; // Used for aria-labelledby for the list.\n};\n\nconst listFocusStyle = focusVisibleStyle('-4px');\n\nconst UnstyledUnorderedList = styled(Background)(\n css({\n listStyle: 'none',\n padding: 0,\n margin: 0,\n ...listFocusStyle,\n })\n);\n\nexport const NotificationList: React.FC<NotificationListProps> = ({\n notifications,\n onNotificationClick,\n onDismiss,\n headerElementId,\n}) => {\n const listRef = React.useRef<HTMLDivElement>(null);\n const onDismissHandler = async (notification: Notification) => {\n if (listRef?.current) {\n await listRef.current.focus();\n }\n await onDismiss?.(notification);\n };\n\n return (\n <UnstyledUnorderedList\n aria-labelledby={headerElementId}\n aria-live=\"polite\"\n aria-relevant=\"additions\"\n as=\"ul\"\n bg=\"background\"\n ref={listRef}\n tabIndex={-1}\n >\n {isEmpty(notifications) ? (\n <EmptyNotification />\n ) : (\n notifications.map((notification: Notification) => (\n <NotificationItem\n key={notification.id}\n notification={notification}\n handleClick={() => onNotificationClick?.(notification)}\n handleDismiss={() => onDismissHandler(notification)}\n />\n ))\n )}\n </UnstyledUnorderedList>\n );\n};\n"],"mappings":";;;;;;;;;;;;;AAiBA,MAAMQ,0DAAmC,MAAA;AAEzC,MAAMC,wBAAwBN,2CAAOF,qCAAAA;;;AACnCC,CAAAA,CAAAA,mCAAI;CACFQ,WAAW;CACXC,SAAS;CACTC,QAAQ;CACR,GAAGJ;AACL,CAAA,GAAA,q6FAAA;AAGF,MAAaK,oBAAqD,EAChEC,eACAC,qBACAC,WACAC,sBACD;CACC,MAAMC,UAAUb,MAAMc,OAAuB,IAAA;CAC7C,MAAMC,mBAAmB,OAAOC,iBAAAA;EAC9B,IAAIH,SAASI,SACX,MAAMJ,QAAQI,QAAQC,MAAK;EAE7B,MAAMP,YAAYK,YAAAA;CACpB;CAEA,OACE,oBAAA,cAACZ,uBAAAA;EACCe,mBAAiBP;EACjBQ,aAAU;EACVC,iBAAc;EACdC,IAAG;EACHC,IAAG;EACHC,KAAKX;EACLY,UAAU;CAET1B,kCAAQU,aAAAA,IACP,oBAAA,cAACR,iCAAAA,IAAAA,IAEDQ,cAAciB,KAAKV,iBACjB,oBAAA,cAACd,2CAAAA;EACCyB,KAAKX,aAAaY;EACJZ;EACda,mBAAmBnB,sBAAsBM,YAAAA;EACzCc,qBAAqBf,iBAAiBC,YAAAA;;AAMlD"}
@@ -1,6 +1,5 @@
1
1
  import { Notification } from "./typings.cjs";
2
2
  import * as React$1 from "react";
3
-
4
3
  //#region src/NotificationList/index.d.ts
5
4
  type NotificationListProps = {
6
5
  onDismiss?: (notification: Notification) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../../src/NotificationList/index.tsx"],"mappings":";;;;KAUY,qBAAA;EACV,SAAA,IAAa,YAAA,EAAc,YAAA;EAC3B,aAAA,EAAe,YAAA;EACf,mBAAA,IAAuB,YAAA,EAAc,YAAA;EACrC,eAAA;AAAA;AAAA,cAcW,gBAAA,EAAkB,OAAA,CAAM,EAAE,CAAC,qBAAA"}
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../../src/NotificationList/index.tsx"],"mappings":";;;KAUY;EACV,aAAa,cAAc;EAC3B,eAAe;EACf,uBAAuB,cAAc;EACrC;;cAcW,kBAAkB,QAAM,GAAG"}
@@ -1,6 +1,5 @@
1
1
  import { Notification } from "./typings.js";
2
2
  import * as React$1 from "react";
3
-
4
3
  //#region src/NotificationList/index.d.ts
5
4
  type NotificationListProps = {
6
5
  onDismiss?: (notification: Notification) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/NotificationList/index.tsx"],"mappings":";;;;KAUY,qBAAA;EACV,SAAA,IAAa,YAAA,EAAc,YAAA;EAC3B,aAAA,EAAe,YAAA;EACf,mBAAA,IAAuB,YAAA,EAAc,YAAA;EACrC,eAAA;AAAA;AAAA,cAcW,gBAAA,EAAkB,OAAA,CAAM,EAAA,CAAG,qBAAA"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/NotificationList/index.tsx"],"mappings":";;;KAUY;EACV,aAAa,cAAc;EAC3B,eAAe;EACf,uBAAuB,cAAc;EACrC;;cAcW,kBAAkB,QAAM,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["focusVisibleStyle","Background","css","styled","isEmpty","React","EmptyNotification","NotificationItem","listFocusStyle","UnstyledUnorderedList","listStyle","padding","margin","NotificationList","notifications","onNotificationClick","onDismiss","headerElementId","listRef","useRef","onDismissHandler","notification","current","focus","aria-labelledby","aria-live","aria-relevant","as","bg","ref","tabIndex","map","key","id","handleClick","handleDismiss"],"sources":["../../src/NotificationList/index.tsx"],"sourcesContent":["import { focusVisibleStyle } from '@codecademy/gamut';\nimport { Background, css } from '@codecademy/gamut-styles';\nimport styled from '@emotion/styled';\nimport isEmpty from 'lodash/isEmpty';\nimport * as React from 'react';\n\nimport { EmptyNotification } from './EmptyNotification';\nimport { NotificationItem } from './NotificationItem';\nimport { Notification } from './typings';\n\nexport type NotificationListProps = {\n onDismiss?: (notification: Notification) => void;\n notifications: Notification[];\n onNotificationClick?: (notification: Notification) => void;\n headerElementId?: string; // Used for aria-labelledby for the list.\n};\n\nconst listFocusStyle = focusVisibleStyle('-4px');\n\nconst UnstyledUnorderedList = styled(Background)(\n css({\n listStyle: 'none',\n padding: 0,\n margin: 0,\n ...listFocusStyle,\n })\n);\n\nexport const NotificationList: React.FC<NotificationListProps> = ({\n notifications,\n onNotificationClick,\n onDismiss,\n headerElementId,\n}) => {\n const listRef = React.useRef<HTMLDivElement>(null);\n const onDismissHandler = async (notification: Notification) => {\n if (listRef?.current) {\n await listRef.current.focus();\n }\n await onDismiss?.(notification);\n };\n\n return (\n <UnstyledUnorderedList\n aria-labelledby={headerElementId}\n aria-live=\"polite\"\n aria-relevant=\"additions\"\n as=\"ul\"\n bg=\"background\"\n ref={listRef}\n tabIndex={-1}\n >\n {isEmpty(notifications) ? (\n <EmptyNotification />\n ) : (\n notifications.map((notification: Notification) => (\n <NotificationItem\n key={notification.id}\n notification={notification}\n handleClick={() => onNotificationClick?.(notification)}\n handleDismiss={() => onDismissHandler(notification)}\n />\n ))\n )}\n </UnstyledUnorderedList>\n );\n};\n"],"mappings":";;;;;;;;;AAiBA,MAAMQ,iBAAiBR,kBAAkB,MAAA;AAEzC,MAAMS,wBAAwBN,qBAAOF,YAAAA;;;GACnCC,IAAI;CACFQ,WAAW;CACXC,SAAS;CACTC,QAAQ;CACR,GAAGJ;AACL,CAAA,GAAA,q6FAAA;AAGF,MAAaK,oBAAqD,EAChEC,eACAC,qBACAC,WACAC,sBACD;CACC,MAAMC,UAAUb,QAAMc,OAAuB,IAAA;CAC7C,MAAMC,mBAAmB,OAAOC,iBAAAA;EAC9B,IAAIH,SAASI,SACX,MAAMJ,QAAQI,QAAQC,MAAK;EAE7B,MAAMP,YAAYK,YAAAA;CACpB;CAEA,OACE,sBAAA,cAACZ,uBAAAA;EACCe,mBAAiBP;EACjBQ,aAAU;EACVC,iBAAc;EACdC,IAAG;EACHC,IAAG;EACHC,KAAKX;EACLY,UAAU;IAET1B,QAAQU,aAAAA,IACP,sBAAA,cAACR,mBAAAA,IAAAA,IAEDQ,cAAciB,KAAKV,iBACjB,sBAAA,cAACd,kBAAAA;EACCyB,KAAKX,aAAaY;EACJZ;EACda,mBAAmBnB,sBAAsBM,YAAAA;EACzCc,qBAAqBf,iBAAiBC,YAAAA;;AAMlD"}
1
+ {"version":3,"file":"index.js","names":["focusVisibleStyle","Background","css","styled","isEmpty","React","EmptyNotification","NotificationItem","listFocusStyle","UnstyledUnorderedList","listStyle","padding","margin","NotificationList","notifications","onNotificationClick","onDismiss","headerElementId","listRef","useRef","onDismissHandler","notification","current","focus","aria-labelledby","aria-live","aria-relevant","as","bg","ref","tabIndex","map","key","id","handleClick","handleDismiss"],"sources":["../../src/NotificationList/index.tsx"],"sourcesContent":["import { focusVisibleStyle } from '@codecademy/gamut';\nimport { Background, css } from '@codecademy/gamut-styles';\nimport styled from '@emotion/styled';\nimport isEmpty from 'lodash/isEmpty';\nimport * as React from 'react';\n\nimport { EmptyNotification } from './EmptyNotification';\nimport { NotificationItem } from './NotificationItem';\nimport { Notification } from './typings';\n\nexport type NotificationListProps = {\n onDismiss?: (notification: Notification) => void;\n notifications: Notification[];\n onNotificationClick?: (notification: Notification) => void;\n headerElementId?: string; // Used for aria-labelledby for the list.\n};\n\nconst listFocusStyle = focusVisibleStyle('-4px');\n\nconst UnstyledUnorderedList = styled(Background)(\n css({\n listStyle: 'none',\n padding: 0,\n margin: 0,\n ...listFocusStyle,\n })\n);\n\nexport const NotificationList: React.FC<NotificationListProps> = ({\n notifications,\n onNotificationClick,\n onDismiss,\n headerElementId,\n}) => {\n const listRef = React.useRef<HTMLDivElement>(null);\n const onDismissHandler = async (notification: Notification) => {\n if (listRef?.current) {\n await listRef.current.focus();\n }\n await onDismiss?.(notification);\n };\n\n return (\n <UnstyledUnorderedList\n aria-labelledby={headerElementId}\n aria-live=\"polite\"\n aria-relevant=\"additions\"\n as=\"ul\"\n bg=\"background\"\n ref={listRef}\n tabIndex={-1}\n >\n {isEmpty(notifications) ? (\n <EmptyNotification />\n ) : (\n notifications.map((notification: Notification) => (\n <NotificationItem\n key={notification.id}\n notification={notification}\n handleClick={() => onNotificationClick?.(notification)}\n handleDismiss={() => onDismissHandler(notification)}\n />\n ))\n )}\n </UnstyledUnorderedList>\n );\n};\n"],"mappings":";;;;;;;;;AAiBA,MAAMQ,iBAAiBR,kBAAkB,MAAA;AAEzC,MAAMS,wBAAwBN,qBAAOF,YAAAA;;;AACnCC,CAAAA,CAAAA,CAAAA,IAAI;CACFQ,WAAW;CACXC,SAAS;CACTC,QAAQ;CACR,GAAGJ;AACL,CAAA,GAAA,q6FAAA;AAGF,MAAaK,oBAAqD,EAChEC,eACAC,qBACAC,WACAC,sBACD;CACC,MAAMC,UAAUb,QAAMc,OAAuB,IAAA;CAC7C,MAAMC,mBAAmB,OAAOC,iBAAAA;EAC9B,IAAIH,SAASI,SACX,MAAMJ,QAAQI,QAAQC,MAAK;EAE7B,MAAMP,YAAYK,YAAAA;CACpB;CAEA,OACE,sBAAA,cAACZ,uBAAAA;EACCe,mBAAiBP;EACjBQ,aAAU;EACVC,iBAAc;EACdC,IAAG;EACHC,IAAG;EACHC,KAAKX;EACLY,UAAU;CAET1B,GAAAA,QAAQU,aAAAA,IACP,sBAAA,cAACR,mBAAAA,IAAAA,IAEDQ,cAAciB,KAAKV,iBACjB,sBAAA,cAACd,kBAAAA;EACCyB,KAAKX,aAAaY;EACJZ;EACda,mBAAmBnB,sBAAsBM,YAAAA;EACzCc,qBAAqBf,iBAAiBC,YAAAA;;AAMlD"}
@@ -1 +1 @@
1
- {"version":3,"file":"typings.d.cts","names":[],"sources":["../../src/NotificationList/typings.ts"],"mappings":";KAAY,wBAAA;EACV,eAAA;EACA,KAAK;AAAA;AAAA,KAGK,YAAA;EACV,IAAA;EACA,EAAA;EACA,YAAA,GAAe,wBAAwB;EACvC,QAAA;EACA,QAAA;EACA,IAAA;EACA,IAAA;EACA,IAAA;EACA,MAAA;EACA,QAAA;AAAA"}
1
+ {"version":3,"file":"typings.d.cts","names":[],"sources":["../../src/NotificationList/typings.ts"],"mappings":";KAAY;EACV;EACA;;KAGU;EACV;EACA;EACA,eAAe;EACf;EACA;EACA;EACA;EACA;EACA;EACA"}
@@ -1 +1 @@
1
- {"version":3,"file":"typings.d.ts","names":[],"sources":["../../src/NotificationList/typings.ts"],"mappings":";KAAY,wBAAA;EACV,eAAA;EACA,KAAA;AAAA;AAAA,KAGU,YAAA;EACV,IAAA;EACA,EAAA;EACA,YAAA,GAAe,wBAAA;EACf,QAAA;EACA,QAAA;EACA,IAAA;EACA,IAAA;EACA,IAAA;EACA,MAAA;EACA,QAAA;AAAA"}
1
+ {"version":3,"file":"typings.d.ts","names":[],"sources":["../../src/NotificationList/typings.ts"],"mappings":";KAAY;EACV;EACA;;KAGU;EACV;EACA;EACA,eAAe;EACf;EACA;EACA;EACA;EACA;EACA;EACA"}
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationBell.cjs","names":["FlexBox","IconButton","Text","BellIcon","useEffect","useMemo","useAppHeaderContext","notificationsID","NotificationBell","bellRef","isOpen","setIsOpen","notifications","lastOpenedDropdown","setLastOpenedDropdown","unread","filter","notification","length","favicon","window","document","querySelector","href","numOfUnread","Math","min","handleOnClick","aria-expanded","Boolean","aria-haspopup","tip","icon","onClick","ref","variant","tipProps","alignment","placement","alignItems","bg","borderRadius","height","justifyContent","left","position","textAlign","top","width","color","fontSize","fontWeight","mt"],"sources":["../../src/Notifications/NotificationBell.tsx"],"sourcesContent":["import {\n ButtonBaseElements,\n FlexBox,\n IconButton,\n Text,\n} from '@codecademy/gamut';\nimport { BellIcon } from '@codecademy/gamut-icons';\nimport { Dispatch, SetStateAction, useEffect, useMemo } from 'react';\n\nimport { useAppHeaderContext } from '../AppHeader/AppHeaderElements/AppHeaderProvider';\nimport { Notification } from '../NotificationList/typings';\n\nexport type NotificationBellProps = {\n bellRef: React.RefObject<ButtonBaseElements | null>;\n isOpen?: boolean;\n setIsOpen: Dispatch<SetStateAction<boolean>>;\n notifications: Notification[];\n};\n\nconst notificationsID = 'notifications';\n\nexport const NotificationBell: React.FC<NotificationBellProps> = ({\n bellRef,\n isOpen,\n setIsOpen,\n notifications,\n}) => {\n const { lastOpenedDropdown, setLastOpenedDropdown } = useAppHeaderContext();\n\n const unread = notifications.filter(\n (notification) => notification.unread\n ).length;\n\n useEffect(() => {\n const favicon = window?.document?.querySelector<HTMLLinkElement>(\n 'link[rel=\"shortcut icon\"]'\n );\n\n if (favicon) {\n favicon.href = `/favicon${unread ? '-unread' : ''}.ico`;\n }\n }, [unread]);\n\n useEffect(() => {\n if (lastOpenedDropdown !== notificationsID && isOpen) {\n setIsOpen(false);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [lastOpenedDropdown]);\n\n const numOfUnread = useMemo(() => Math.min(unread, 99), [unread]);\n\n const handleOnClick = () => {\n setIsOpen(!isOpen);\n\n if (!isOpen) {\n if (setLastOpenedDropdown) {\n setLastOpenedDropdown(notificationsID);\n }\n }\n };\n\n return (\n <>\n <IconButton\n aria-expanded={Boolean(isOpen)}\n aria-haspopup=\"dialog\"\n tip={\n unread\n ? `Notifications, ${numOfUnread} unread`\n : 'Notifications, no unread'\n }\n icon={BellIcon}\n onClick={handleOnClick}\n ref={bellRef}\n variant=\"interface\"\n tipProps={{ alignment: 'bottom-center', placement: 'floating' }}\n />\n {unread ? (\n <FlexBox\n alignItems=\"center\"\n bg=\"red-500\"\n borderRadius=\"md\"\n height={18}\n justifyContent=\"center\"\n left={22}\n position=\"absolute\"\n textAlign=\"center\"\n top={-2}\n width={20}\n >\n <Text color=\"white\" fontSize={14} fontWeight=\"bold\" mt={4}>\n {numOfUnread}\n </Text>\n </FlexBox>\n ) : null}\n </>\n );\n};\n"],"mappings":";;;;;;AAmBA,MAAMO,kBAAkB;AAExB,MAAaC,oBAAqD,EAChEC,SACAC,QACAC,WACAC,oBACD;CACC,MAAM,EAAEC,oBAAoBC,0BAA0BR,kCAAAA;CAEtD,MAAMS,SAASH,cAAcI,QAC1BC,iBAAiBA,aAAaF,MAAM,CAAA,CACrCG;CAEFd,2BAAU;EACR,MAAMe,UAAUC,QAAQC,UAAUC,cAChC,6BAAA;EAGF,IAAIH,SACFA,QAAQI,OAAO,WAAWR,SAAS,YAAY,GAAG;CAEtD,GAAG,CAACA,OAAO;CAEXX,2BAAU;EACR,IAAIS,uBAAuBN,mBAAmBG,QAC5CC,UAAU,KAAA;CAGd,GAAG,CAACE,mBAAmB;CAEvB,MAAMW,uCAA4BC,KAAKC,IAAIX,QAAQ,EAAA,GAAK,CAACA,OAAO;CAEhE,MAAMY,sBAAgB;EACpBhB,UAAU,CAACD,MAAAA;EAEX,IAAI,CAACA,QACH;OAAII,uBACFA,sBAAsBP,eAAAA;EACxB;CAEJ;CAEA,OACE,oBAAA,cAAA,MAAA,UAAA,MACE,oBAAA,cAACN,8BAAAA;EACC2B,iBAAeC,QAAQnB,MAAAA;EACvBoB,iBAAc;EACdC,KACEhB,SACI,kBAAkBS,YAAY,WAC9B;EAENQ,MAAM7B;EACN8B,SAASN;EACTO,KAAKzB;EACL0B,SAAQ;EACRC,UAAU;GAAEC,WAAW;GAAiBC,WAAW;EAAW;KAE/DvB,SACC,oBAAA,cAACf,2BAAAA;EACCuC,YAAW;EACXC,IAAG;EACHC,cAAa;EACbC,QAAQ;EACRC,gBAAe;EACfC,MAAM;EACNC,UAAS;EACTC,WAAU;EACVC,KAAK;EACLC,OAAO;IAEP,oBAAA,cAAC9C,wBAAAA;EAAK+C,OAAM;EAAQC,UAAU;EAAIC,YAAW;EAAOC,IAAI;IACrD5B,WAAAA,CAAAA,IAGH,IAAA;AAGV"}
1
+ {"version":3,"file":"NotificationBell.cjs","names":["FlexBox","IconButton","Text","BellIcon","useEffect","useMemo","useAppHeaderContext","notificationsID","NotificationBell","bellRef","isOpen","setIsOpen","notifications","lastOpenedDropdown","setLastOpenedDropdown","unread","filter","notification","length","favicon","window","document","querySelector","href","numOfUnread","Math","min","handleOnClick","aria-expanded","Boolean","aria-haspopup","tip","icon","onClick","ref","variant","tipProps","alignment","placement","alignItems","bg","borderRadius","height","justifyContent","left","position","textAlign","top","width","color","fontSize","fontWeight","mt"],"sources":["../../src/Notifications/NotificationBell.tsx"],"sourcesContent":["import {\n ButtonBaseElements,\n FlexBox,\n IconButton,\n Text,\n} from '@codecademy/gamut';\nimport { BellIcon } from '@codecademy/gamut-icons';\nimport { Dispatch, SetStateAction, useEffect, useMemo } from 'react';\n\nimport { useAppHeaderContext } from '../AppHeader/AppHeaderElements/AppHeaderProvider';\nimport { Notification } from '../NotificationList/typings';\n\nexport type NotificationBellProps = {\n bellRef: React.RefObject<ButtonBaseElements | null>;\n isOpen?: boolean;\n setIsOpen: Dispatch<SetStateAction<boolean>>;\n notifications: Notification[];\n};\n\nconst notificationsID = 'notifications';\n\nexport const NotificationBell: React.FC<NotificationBellProps> = ({\n bellRef,\n isOpen,\n setIsOpen,\n notifications,\n}) => {\n const { lastOpenedDropdown, setLastOpenedDropdown } = useAppHeaderContext();\n\n const unread = notifications.filter(\n (notification) => notification.unread\n ).length;\n\n useEffect(() => {\n const favicon = window?.document?.querySelector<HTMLLinkElement>(\n 'link[rel=\"shortcut icon\"]'\n );\n\n if (favicon) {\n favicon.href = `/favicon${unread ? '-unread' : ''}.ico`;\n }\n }, [unread]);\n\n useEffect(() => {\n if (lastOpenedDropdown !== notificationsID && isOpen) {\n setIsOpen(false);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [lastOpenedDropdown]);\n\n const numOfUnread = useMemo(() => Math.min(unread, 99), [unread]);\n\n const handleOnClick = () => {\n setIsOpen(!isOpen);\n\n if (!isOpen) {\n if (setLastOpenedDropdown) {\n setLastOpenedDropdown(notificationsID);\n }\n }\n };\n\n return (\n <>\n <IconButton\n aria-expanded={Boolean(isOpen)}\n aria-haspopup=\"dialog\"\n tip={\n unread\n ? `Notifications, ${numOfUnread} unread`\n : 'Notifications, no unread'\n }\n icon={BellIcon}\n onClick={handleOnClick}\n ref={bellRef}\n variant=\"interface\"\n tipProps={{ alignment: 'bottom-center', placement: 'floating' }}\n />\n {unread ? (\n <FlexBox\n alignItems=\"center\"\n bg=\"red-500\"\n borderRadius=\"md\"\n height={18}\n justifyContent=\"center\"\n left={22}\n position=\"absolute\"\n textAlign=\"center\"\n top={-2}\n width={20}\n >\n <Text color=\"white\" fontSize={14} fontWeight=\"bold\" mt={4}>\n {numOfUnread}\n </Text>\n </FlexBox>\n ) : null}\n </>\n );\n};\n"],"mappings":";;;;;;AAmBA,MAAMO,kBAAkB;AAExB,MAAaC,oBAAqD,EAChEC,SACAC,QACAC,WACAC,oBACD;CACC,MAAM,EAAEC,oBAAoBC,0BAA0BR,kCAAAA;CAEtD,MAAMS,SAASH,cAAcI,QAC1BC,iBAAiBA,aAAaF,MAAM,CAAA,CACrCG;CAEFd,2BAAU;EACR,MAAMe,UAAUC,QAAQC,UAAUC,cAChC,6BAAA;EAGF,IAAIH,SACFA,QAAQI,OAAO,WAAWR,SAAS,YAAY,GAAG;CAEtD,GAAG,CAACA,MAAO,CAAA;CAEXX,2BAAU;EACR,IAAIS,uBAAuBN,mBAAmBG,QAC5CC,UAAU,KAAA;CAGd,GAAG,CAACE,kBAAmB,CAAA;CAEvB,MAAMW,uCAA4BC,KAAKC,IAAIX,QAAQ,EAAA,GAAK,CAACA,MAAO,CAAA;CAEhE,MAAMY,sBAAgB;EACpBhB,UAAU,CAACD,MAAAA;EAEX,IAAI,CAACA,QACH;OAAII,uBACFA,sBAAsBP,eAAAA;EACxB;CAEJ;CAEA,OACE,oBAAA,cAAA,MAAA,UAAA,MACE,oBAAA,cAACN,8BAAAA;EACC2B,iBAAeC,QAAQnB,MAAAA;EACvBoB,iBAAc;EACdC,KACEhB,SACI,kBAAkBS,YAAY,WAC9B;EAENQ,MAAM7B;EACN8B,SAASN;EACTO,KAAKzB;EACL0B,SAAQ;EACRC,UAAU;GAAEC,WAAW;GAAiBC,WAAW;EAAW;CAE/DvB,CAAAA,GAAAA,SACC,oBAAA,cAACf,2BAAAA;EACCuC,YAAW;EACXC,IAAG;EACHC,cAAa;EACbC,QAAQ;EACRC,gBAAe;EACfC,MAAM;EACNC,UAAS;EACTC,WAAU;EACVC,KAAK;EACLC,OAAO;CAEP,GAAA,oBAAA,cAAC9C,wBAAAA;EAAK+C,OAAM;EAAQC,UAAU;EAAIC,YAAW;EAAOC,IAAI;CACrD5B,GAAAA,WAAAA,CAAAA,IAGH,IAAA;AAGV"}
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationBell.js","names":["FlexBox","IconButton","Text","BellIcon","useEffect","useMemo","useAppHeaderContext","notificationsID","NotificationBell","bellRef","isOpen","setIsOpen","notifications","lastOpenedDropdown","setLastOpenedDropdown","unread","filter","notification","length","favicon","window","document","querySelector","href","numOfUnread","Math","min","handleOnClick","aria-expanded","Boolean","aria-haspopup","tip","icon","onClick","ref","variant","tipProps","alignment","placement","alignItems","bg","borderRadius","height","justifyContent","left","position","textAlign","top","width","color","fontSize","fontWeight","mt"],"sources":["../../src/Notifications/NotificationBell.tsx"],"sourcesContent":["import {\n ButtonBaseElements,\n FlexBox,\n IconButton,\n Text,\n} from '@codecademy/gamut';\nimport { BellIcon } from '@codecademy/gamut-icons';\nimport { Dispatch, SetStateAction, useEffect, useMemo } from 'react';\n\nimport { useAppHeaderContext } from '../AppHeader/AppHeaderElements/AppHeaderProvider';\nimport { Notification } from '../NotificationList/typings';\n\nexport type NotificationBellProps = {\n bellRef: React.RefObject<ButtonBaseElements | null>;\n isOpen?: boolean;\n setIsOpen: Dispatch<SetStateAction<boolean>>;\n notifications: Notification[];\n};\n\nconst notificationsID = 'notifications';\n\nexport const NotificationBell: React.FC<NotificationBellProps> = ({\n bellRef,\n isOpen,\n setIsOpen,\n notifications,\n}) => {\n const { lastOpenedDropdown, setLastOpenedDropdown } = useAppHeaderContext();\n\n const unread = notifications.filter(\n (notification) => notification.unread\n ).length;\n\n useEffect(() => {\n const favicon = window?.document?.querySelector<HTMLLinkElement>(\n 'link[rel=\"shortcut icon\"]'\n );\n\n if (favicon) {\n favicon.href = `/favicon${unread ? '-unread' : ''}.ico`;\n }\n }, [unread]);\n\n useEffect(() => {\n if (lastOpenedDropdown !== notificationsID && isOpen) {\n setIsOpen(false);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [lastOpenedDropdown]);\n\n const numOfUnread = useMemo(() => Math.min(unread, 99), [unread]);\n\n const handleOnClick = () => {\n setIsOpen(!isOpen);\n\n if (!isOpen) {\n if (setLastOpenedDropdown) {\n setLastOpenedDropdown(notificationsID);\n }\n }\n };\n\n return (\n <>\n <IconButton\n aria-expanded={Boolean(isOpen)}\n aria-haspopup=\"dialog\"\n tip={\n unread\n ? `Notifications, ${numOfUnread} unread`\n : 'Notifications, no unread'\n }\n icon={BellIcon}\n onClick={handleOnClick}\n ref={bellRef}\n variant=\"interface\"\n tipProps={{ alignment: 'bottom-center', placement: 'floating' }}\n />\n {unread ? (\n <FlexBox\n alignItems=\"center\"\n bg=\"red-500\"\n borderRadius=\"md\"\n height={18}\n justifyContent=\"center\"\n left={22}\n position=\"absolute\"\n textAlign=\"center\"\n top={-2}\n width={20}\n >\n <Text color=\"white\" fontSize={14} fontWeight=\"bold\" mt={4}>\n {numOfUnread}\n </Text>\n </FlexBox>\n ) : null}\n </>\n );\n};\n"],"mappings":";;;;;;AAmBA,MAAMO,kBAAkB;AAExB,MAAaC,oBAAqD,EAChEC,SACAC,QACAC,WACAC,oBACD;CACC,MAAM,EAAEC,oBAAoBC,0BAA0BR,oBAAAA;CAEtD,MAAMS,SAASH,cAAcI,QAC1BC,iBAAiBA,aAAaF,MAAM,CAAA,CACrCG;CAEFd,gBAAU;EACR,MAAMe,UAAUC,QAAQC,UAAUC,cAChC,6BAAA;EAGF,IAAIH,SACFA,QAAQI,OAAO,WAAWR,SAAS,YAAY,GAAG;CAEtD,GAAG,CAACA,OAAO;CAEXX,gBAAU;EACR,IAAIS,uBAAuBN,mBAAmBG,QAC5CC,UAAU,KAAA;CAGd,GAAG,CAACE,mBAAmB;CAEvB,MAAMW,cAAcnB,cAAcoB,KAAKC,IAAIX,QAAQ,EAAA,GAAK,CAACA,OAAO;CAEhE,MAAMY,sBAAgB;EACpBhB,UAAU,CAACD,MAAAA;EAEX,IAAI,CAACA,QACH;OAAII,uBACFA,sBAAsBP,eAAAA;EACxB;CAEJ;CAEA,OACE,oBAAA,cAAA,MAAA,UAAA,MACE,oBAAA,cAACN,YAAAA;EACC2B,iBAAeC,QAAQnB,MAAAA;EACvBoB,iBAAc;EACdC,KACEhB,SACI,kBAAkBS,YAAY,WAC9B;EAENQ,MAAM7B;EACN8B,SAASN;EACTO,KAAKzB;EACL0B,SAAQ;EACRC,UAAU;GAAEC,WAAW;GAAiBC,WAAW;EAAW;KAE/DvB,SACC,oBAAA,cAACf,SAAAA;EACCuC,YAAW;EACXC,IAAG;EACHC,cAAa;EACbC,QAAQ;EACRC,gBAAe;EACfC,MAAM;EACNC,UAAS;EACTC,WAAU;EACVC,KAAK;EACLC,OAAO;IAEP,oBAAA,cAAC9C,MAAAA;EAAK+C,OAAM;EAAQC,UAAU;EAAIC,YAAW;EAAOC,IAAI;IACrD5B,WAAAA,CAAAA,IAGH,IAAA;AAGV"}
1
+ {"version":3,"file":"NotificationBell.js","names":["FlexBox","IconButton","Text","BellIcon","useEffect","useMemo","useAppHeaderContext","notificationsID","NotificationBell","bellRef","isOpen","setIsOpen","notifications","lastOpenedDropdown","setLastOpenedDropdown","unread","filter","notification","length","favicon","window","document","querySelector","href","numOfUnread","Math","min","handleOnClick","aria-expanded","Boolean","aria-haspopup","tip","icon","onClick","ref","variant","tipProps","alignment","placement","alignItems","bg","borderRadius","height","justifyContent","left","position","textAlign","top","width","color","fontSize","fontWeight","mt"],"sources":["../../src/Notifications/NotificationBell.tsx"],"sourcesContent":["import {\n ButtonBaseElements,\n FlexBox,\n IconButton,\n Text,\n} from '@codecademy/gamut';\nimport { BellIcon } from '@codecademy/gamut-icons';\nimport { Dispatch, SetStateAction, useEffect, useMemo } from 'react';\n\nimport { useAppHeaderContext } from '../AppHeader/AppHeaderElements/AppHeaderProvider';\nimport { Notification } from '../NotificationList/typings';\n\nexport type NotificationBellProps = {\n bellRef: React.RefObject<ButtonBaseElements | null>;\n isOpen?: boolean;\n setIsOpen: Dispatch<SetStateAction<boolean>>;\n notifications: Notification[];\n};\n\nconst notificationsID = 'notifications';\n\nexport const NotificationBell: React.FC<NotificationBellProps> = ({\n bellRef,\n isOpen,\n setIsOpen,\n notifications,\n}) => {\n const { lastOpenedDropdown, setLastOpenedDropdown } = useAppHeaderContext();\n\n const unread = notifications.filter(\n (notification) => notification.unread\n ).length;\n\n useEffect(() => {\n const favicon = window?.document?.querySelector<HTMLLinkElement>(\n 'link[rel=\"shortcut icon\"]'\n );\n\n if (favicon) {\n favicon.href = `/favicon${unread ? '-unread' : ''}.ico`;\n }\n }, [unread]);\n\n useEffect(() => {\n if (lastOpenedDropdown !== notificationsID && isOpen) {\n setIsOpen(false);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [lastOpenedDropdown]);\n\n const numOfUnread = useMemo(() => Math.min(unread, 99), [unread]);\n\n const handleOnClick = () => {\n setIsOpen(!isOpen);\n\n if (!isOpen) {\n if (setLastOpenedDropdown) {\n setLastOpenedDropdown(notificationsID);\n }\n }\n };\n\n return (\n <>\n <IconButton\n aria-expanded={Boolean(isOpen)}\n aria-haspopup=\"dialog\"\n tip={\n unread\n ? `Notifications, ${numOfUnread} unread`\n : 'Notifications, no unread'\n }\n icon={BellIcon}\n onClick={handleOnClick}\n ref={bellRef}\n variant=\"interface\"\n tipProps={{ alignment: 'bottom-center', placement: 'floating' }}\n />\n {unread ? (\n <FlexBox\n alignItems=\"center\"\n bg=\"red-500\"\n borderRadius=\"md\"\n height={18}\n justifyContent=\"center\"\n left={22}\n position=\"absolute\"\n textAlign=\"center\"\n top={-2}\n width={20}\n >\n <Text color=\"white\" fontSize={14} fontWeight=\"bold\" mt={4}>\n {numOfUnread}\n </Text>\n </FlexBox>\n ) : null}\n </>\n );\n};\n"],"mappings":";;;;;;AAmBA,MAAMO,kBAAkB;AAExB,MAAaC,oBAAqD,EAChEC,SACAC,QACAC,WACAC,oBACD;CACC,MAAM,EAAEC,oBAAoBC,0BAA0BR,oBAAAA;CAEtD,MAAMS,SAASH,cAAcI,QAC1BC,iBAAiBA,aAAaF,MAAM,CAAA,CACrCG;CAEFd,gBAAU;EACR,MAAMe,UAAUC,QAAQC,UAAUC,cAChC,6BAAA;EAGF,IAAIH,SACFA,QAAQI,OAAO,WAAWR,SAAS,YAAY,GAAG;CAEtD,GAAG,CAACA,MAAO,CAAA;CAEXX,gBAAU;EACR,IAAIS,uBAAuBN,mBAAmBG,QAC5CC,UAAU,KAAA;CAGd,GAAG,CAACE,kBAAmB,CAAA;CAEvB,MAAMW,cAAcnB,cAAcoB,KAAKC,IAAIX,QAAQ,EAAA,GAAK,CAACA,MAAO,CAAA;CAEhE,MAAMY,sBAAgB;EACpBhB,UAAU,CAACD,MAAAA;EAEX,IAAI,CAACA,QACH;OAAII,uBACFA,sBAAsBP,eAAAA;EACxB;CAEJ;CAEA,OACE,oBAAA,cAAA,MAAA,UAAA,MACE,oBAAA,cAACN,YAAAA;EACC2B,iBAAeC,QAAQnB,MAAAA;EACvBoB,iBAAc;EACdC,KACEhB,SACI,kBAAkBS,YAAY,WAC9B;EAENQ,MAAM7B;EACN8B,SAASN;EACTO,KAAKzB;EACL0B,SAAQ;EACRC,UAAU;GAAEC,WAAW;GAAiBC,WAAW;EAAW;CAE/DvB,CAAAA,GAAAA,SACC,oBAAA,cAACf,SAAAA;EACCuC,YAAW;EACXC,IAAG;EACHC,cAAa;EACbC,QAAQ;EACRC,gBAAe;EACfC,MAAM;EACNC,UAAS;EACTC,WAAU;EACVC,KAAK;EACLC,OAAO;CAEP,GAAA,oBAAA,cAAC9C,MAAAA;EAAK+C,OAAM;EAAQC,UAAU;EAAIC,YAAW;EAAOC,IAAI;CACrD5B,GAAAA,WAAAA,CAAAA,IAGH,IAAA;AAGV"}
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationsContents.cjs","names":["Box","FlexBox","Text","CheckerDense","useEffect","useRef","React","useOnEscHandler","NotificationList","NotificationDialog","useNotificationButtons","NotificationsContents","actions","handleClose","notifications","notificationListRef","clearAllButton","closeButton","showMoreButton","visibleNotifications","onKeyDown","onNotificationClick","notification","click","unread","read","current","focus","unreadVisibleNotifications","filter","length","aria-label","aria-modal","bg","data-autofocus","ref","role","tabIndex","alignItems","flexDirection","height","justifyContent","mb","px","as","fontSize","display","maxHeight","overflow","pb","onDismiss","dismiss"],"sources":["../../src/Notifications/NotificationsContents.tsx"],"sourcesContent":["import { Box, FlexBox, Text } from '@codecademy/gamut';\nimport { CheckerDense } from '@codecademy/gamut-patterns';\nimport { useEffect, useRef } from 'react';\nimport * as React from 'react';\n\nimport { useOnEscHandler } from '../AppHeader/shared';\nimport { NotificationList } from '../NotificationList';\nimport { Notification } from '../NotificationList/typings';\nimport { NotificationDialog } from './elements';\nimport { NotificationsProps } from './types';\nimport { useNotificationButtons } from './useNotificationButtons';\n\nexport const NotificationsContents: React.FC<NotificationsProps> = ({\n actions,\n handleClose,\n notifications,\n}) => {\n const notificationListRef = useRef<HTMLDivElement>(null);\n\n const {\n clearAllButton,\n closeButton,\n showMoreButton,\n notifications: visibleNotifications,\n } = useNotificationButtons({\n actions,\n handleClose,\n notificationListRef,\n notifications,\n });\n\n const onKeyDown = useOnEscHandler(handleClose);\n\n const onNotificationClick = (notification: Notification) => {\n actions.click(notification);\n\n if (notification.unread) {\n actions.read([notification]);\n }\n };\n\n useEffect(() => {\n notificationListRef?.current?.focus();\n }, [notificationListRef]);\n\n useEffect(() => {\n const unreadVisibleNotifications = visibleNotifications.filter(\n (notification) => notification.unread\n );\n\n if (unreadVisibleNotifications.length) {\n actions.read(unreadVisibleNotifications);\n }\n }, [actions, visibleNotifications]);\n\n return (\n <NotificationDialog\n aria-label={\n visibleNotifications.length\n ? `${notifications.length} unread notifications`\n : `My Notifications`\n }\n aria-modal=\"true\"\n bg=\"background\"\n data-autofocus\n onKeyDown={onKeyDown}\n ref={notificationListRef}\n role=\"dialog\"\n tabIndex={-1}\n >\n <FlexBox\n alignItems=\"center\"\n flexDirection=\"row\"\n height=\"40\"\n justifyContent=\"space-between\"\n mb={16}\n px={32}\n >\n <Text as=\"h1\" fontSize={22}>\n My Notifications\n </Text>\n <FlexBox>\n {clearAllButton}\n {closeButton}\n </FlexBox>\n </FlexBox>\n <Box px={32}>\n <CheckerDense height=\"1px\" display=\"flex\" />\n </Box>\n <Box maxHeight=\"520px\" overflow=\"auto\">\n <Box pb={16}>\n <NotificationList\n notifications={visibleNotifications}\n onDismiss={actions.dismiss}\n onNotificationClick={onNotificationClick}\n />\n </Box>\n {showMoreButton}\n </Box>\n </NotificationDialog>\n );\n};\n"],"mappings":";;;;;;;;;;;;AAYA,MAAaW,yBAAuD,EAClEC,SACAC,aACAC,oBACD;CACC,MAAMC,wCAA6C,IAAA;CAEnD,MAAM,EACJC,gBACAC,aACAC,gBACAJ,eAAeK,yBACbT,sDAAuB;EACzBE;EACAC;EACAE;EACAD;CACF,CAAA;CAEA,MAAMM,YAAYb,oCAAgBM,WAAAA;CAElC,MAAMQ,uBAAuBC,iBAAAA;EAC3BV,QAAQW,MAAMD,YAAAA;EAEd,IAAIA,aAAaE,QACfZ,QAAQa,KAAK,CAACH,aAAa;CAE/B;CAEAlB,2BAAU;EACRW,qBAAqBW,SAASC,MAAAA;CAChC,GAAG,CAACZ,oBAAoB;CAExBX,2BAAU;EACR,MAAMwB,6BAA6BT,qBAAqBU,QACrDP,iBAAiBA,aAAaE,MAAM;EAGvC,IAAII,2BAA2BE,QAC7BlB,QAAQa,KAAKG,0BAAAA;CAEjB,GAAG,CAAChB,SAASO,qBAAqB;CAElC,OACE,oBAAA,cAACV,qCAAAA;EACCsB,cACEZ,qBAAqBW,SACjB,GAAGhB,cAAcgB,OAAO,yBACxB;EAENE,cAAW;EACXC,IAAG;EACHC,kBAAAA;EACWd;EACXe,KAAKpB;EACLqB,MAAK;EACLC,UAAU;IAEV,oBAAA,cAACpC,2BAAAA;EACCqC,YAAW;EACXC,eAAc;EACdC,QAAO;EACPC,gBAAe;EACfC,IAAI;EACJC,IAAI;IAEJ,oBAAA,cAACzC,wBAAAA;EAAK0C,IAAG;EAAKC,UAAU;IAAI,kBAAA,GAG5B,oBAAA,cAAC5C,2BAAAA,MACEe,gBACAC,WAAAA,CAAAA,GAGL,oBAAA,cAACjB,uBAAAA,EAAI2C,IAAI,MACP,oBAAA,cAACxC,yCAAAA;EAAaqC,QAAO;EAAMM,SAAQ;MAErC,oBAAA,cAAC9C,uBAAAA;EAAI+C,WAAU;EAAQC,UAAS;IAC9B,oBAAA,cAAChD,uBAAAA,EAAIiD,IAAI,MACP,oBAAA,cAACzC,kCAAAA;EACCM,eAAeK;EACf+B,WAAWtC,QAAQuC;EACE9B;MAGxBH,cAAAA,CAAAA;AAIT"}
1
+ {"version":3,"file":"NotificationsContents.cjs","names":["Box","FlexBox","Text","CheckerDense","useEffect","useRef","React","useOnEscHandler","NotificationList","NotificationDialog","useNotificationButtons","NotificationsContents","actions","handleClose","notifications","notificationListRef","clearAllButton","closeButton","showMoreButton","visibleNotifications","onKeyDown","onNotificationClick","notification","click","unread","read","current","focus","unreadVisibleNotifications","filter","length","aria-label","aria-modal","bg","data-autofocus","ref","role","tabIndex","alignItems","flexDirection","height","justifyContent","mb","px","as","fontSize","display","maxHeight","overflow","pb","onDismiss","dismiss"],"sources":["../../src/Notifications/NotificationsContents.tsx"],"sourcesContent":["import { Box, FlexBox, Text } from '@codecademy/gamut';\nimport { CheckerDense } from '@codecademy/gamut-patterns';\nimport { useEffect, useRef } from 'react';\nimport * as React from 'react';\n\nimport { useOnEscHandler } from '../AppHeader/shared';\nimport { NotificationList } from '../NotificationList';\nimport { Notification } from '../NotificationList/typings';\nimport { NotificationDialog } from './elements';\nimport { NotificationsProps } from './types';\nimport { useNotificationButtons } from './useNotificationButtons';\n\nexport const NotificationsContents: React.FC<NotificationsProps> = ({\n actions,\n handleClose,\n notifications,\n}) => {\n const notificationListRef = useRef<HTMLDivElement>(null);\n\n const {\n clearAllButton,\n closeButton,\n showMoreButton,\n notifications: visibleNotifications,\n } = useNotificationButtons({\n actions,\n handleClose,\n notificationListRef,\n notifications,\n });\n\n const onKeyDown = useOnEscHandler(handleClose);\n\n const onNotificationClick = (notification: Notification) => {\n actions.click(notification);\n\n if (notification.unread) {\n actions.read([notification]);\n }\n };\n\n useEffect(() => {\n notificationListRef?.current?.focus();\n }, [notificationListRef]);\n\n useEffect(() => {\n const unreadVisibleNotifications = visibleNotifications.filter(\n (notification) => notification.unread\n );\n\n if (unreadVisibleNotifications.length) {\n actions.read(unreadVisibleNotifications);\n }\n }, [actions, visibleNotifications]);\n\n return (\n <NotificationDialog\n aria-label={\n visibleNotifications.length\n ? `${notifications.length} unread notifications`\n : `My Notifications`\n }\n aria-modal=\"true\"\n bg=\"background\"\n data-autofocus\n onKeyDown={onKeyDown}\n ref={notificationListRef}\n role=\"dialog\"\n tabIndex={-1}\n >\n <FlexBox\n alignItems=\"center\"\n flexDirection=\"row\"\n height=\"40\"\n justifyContent=\"space-between\"\n mb={16}\n px={32}\n >\n <Text as=\"h1\" fontSize={22}>\n My Notifications\n </Text>\n <FlexBox>\n {clearAllButton}\n {closeButton}\n </FlexBox>\n </FlexBox>\n <Box px={32}>\n <CheckerDense height=\"1px\" display=\"flex\" />\n </Box>\n <Box maxHeight=\"520px\" overflow=\"auto\">\n <Box pb={16}>\n <NotificationList\n notifications={visibleNotifications}\n onDismiss={actions.dismiss}\n onNotificationClick={onNotificationClick}\n />\n </Box>\n {showMoreButton}\n </Box>\n </NotificationDialog>\n );\n};\n"],"mappings":";;;;;;;;;;;;AAYA,MAAaW,yBAAuD,EAClEC,SACAC,aACAC,oBACD;CACC,MAAMC,wCAA6C,IAAA;CAEnD,MAAM,EACJC,gBACAC,aACAC,gBACAJ,eAAeK,yBACbT,sDAAuB;EACzBE;EACAC;EACAE;EACAD;CACF,CAAA;CAEA,MAAMM,YAAYb,oCAAgBM,WAAAA;CAElC,MAAMQ,uBAAuBC,iBAAAA;EAC3BV,QAAQW,MAAMD,YAAAA;EAEd,IAAIA,aAAaE,QACfZ,QAAQa,KAAK,CAACH,YAAa,CAAA;CAE/B;CAEAlB,2BAAU;EACRW,qBAAqBW,SAASC,MAAAA;CAChC,GAAG,CAACZ,mBAAoB,CAAA;CAExBX,2BAAU;EACR,MAAMwB,6BAA6BT,qBAAqBU,QACrDP,iBAAiBA,aAAaE,MAAM;EAGvC,IAAII,2BAA2BE,QAC7BlB,QAAQa,KAAKG,0BAAAA;CAEjB,GAAG,CAAChB,SAASO,oBAAqB,CAAA;CAElC,OACE,oBAAA,cAACV,qCAAAA;EACCsB,cACEZ,qBAAqBW,SACjB,GAAGhB,cAAcgB,OAAO,yBACxB;EAENE,cAAW;EACXC,IAAG;EACHC,kBAAAA;EACWd;EACXe,KAAKpB;EACLqB,MAAK;EACLC,UAAU;CAEV,GAAA,oBAAA,cAACpC,2BAAAA;EACCqC,YAAW;EACXC,eAAc;EACdC,QAAO;EACPC,gBAAe;EACfC,IAAI;EACJC,IAAI;CAEJ,GAAA,oBAAA,cAACzC,wBAAAA;EAAK0C,IAAG;EAAKC,UAAU;CAAI,GAAA,kBAAA,GAG5B,oBAAA,cAAC5C,2BAAAA,MACEe,gBACAC,WAAAA,CAAAA,GAGL,oBAAA,cAACjB,uBAAAA,EAAI2C,IAAI,GACP,GAAA,oBAAA,cAACxC,yCAAAA;EAAaqC,QAAO;EAAMM,SAAQ;CAErC,CAAA,CAAA,GAAA,oBAAA,cAAC9C,uBAAAA;EAAI+C,WAAU;EAAQC,UAAS;CAC9B,GAAA,oBAAA,cAAChD,uBAAAA,EAAIiD,IAAI,GACP,GAAA,oBAAA,cAACzC,kCAAAA;EACCM,eAAeK;EACf+B,WAAWtC,QAAQuC;EACE9B;CAGxBH,CAAAA,CAAAA,GAAAA,cAAAA,CAAAA;AAIT"}
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationsContents.js","names":["Box","FlexBox","Text","CheckerDense","useEffect","useRef","React","useOnEscHandler","NotificationList","NotificationDialog","useNotificationButtons","NotificationsContents","actions","handleClose","notifications","notificationListRef","clearAllButton","closeButton","showMoreButton","visibleNotifications","onKeyDown","onNotificationClick","notification","click","unread","read","current","focus","unreadVisibleNotifications","filter","length","aria-label","aria-modal","bg","data-autofocus","ref","role","tabIndex","alignItems","flexDirection","height","justifyContent","mb","px","as","fontSize","display","maxHeight","overflow","pb","onDismiss","dismiss"],"sources":["../../src/Notifications/NotificationsContents.tsx"],"sourcesContent":["import { Box, FlexBox, Text } from '@codecademy/gamut';\nimport { CheckerDense } from '@codecademy/gamut-patterns';\nimport { useEffect, useRef } from 'react';\nimport * as React from 'react';\n\nimport { useOnEscHandler } from '../AppHeader/shared';\nimport { NotificationList } from '../NotificationList';\nimport { Notification } from '../NotificationList/typings';\nimport { NotificationDialog } from './elements';\nimport { NotificationsProps } from './types';\nimport { useNotificationButtons } from './useNotificationButtons';\n\nexport const NotificationsContents: React.FC<NotificationsProps> = ({\n actions,\n handleClose,\n notifications,\n}) => {\n const notificationListRef = useRef<HTMLDivElement>(null);\n\n const {\n clearAllButton,\n closeButton,\n showMoreButton,\n notifications: visibleNotifications,\n } = useNotificationButtons({\n actions,\n handleClose,\n notificationListRef,\n notifications,\n });\n\n const onKeyDown = useOnEscHandler(handleClose);\n\n const onNotificationClick = (notification: Notification) => {\n actions.click(notification);\n\n if (notification.unread) {\n actions.read([notification]);\n }\n };\n\n useEffect(() => {\n notificationListRef?.current?.focus();\n }, [notificationListRef]);\n\n useEffect(() => {\n const unreadVisibleNotifications = visibleNotifications.filter(\n (notification) => notification.unread\n );\n\n if (unreadVisibleNotifications.length) {\n actions.read(unreadVisibleNotifications);\n }\n }, [actions, visibleNotifications]);\n\n return (\n <NotificationDialog\n aria-label={\n visibleNotifications.length\n ? `${notifications.length} unread notifications`\n : `My Notifications`\n }\n aria-modal=\"true\"\n bg=\"background\"\n data-autofocus\n onKeyDown={onKeyDown}\n ref={notificationListRef}\n role=\"dialog\"\n tabIndex={-1}\n >\n <FlexBox\n alignItems=\"center\"\n flexDirection=\"row\"\n height=\"40\"\n justifyContent=\"space-between\"\n mb={16}\n px={32}\n >\n <Text as=\"h1\" fontSize={22}>\n My Notifications\n </Text>\n <FlexBox>\n {clearAllButton}\n {closeButton}\n </FlexBox>\n </FlexBox>\n <Box px={32}>\n <CheckerDense height=\"1px\" display=\"flex\" />\n </Box>\n <Box maxHeight=\"520px\" overflow=\"auto\">\n <Box pb={16}>\n <NotificationList\n notifications={visibleNotifications}\n onDismiss={actions.dismiss}\n onNotificationClick={onNotificationClick}\n />\n </Box>\n {showMoreButton}\n </Box>\n </NotificationDialog>\n );\n};\n"],"mappings":";;;;;;;;;;;AAYA,MAAaW,yBAAuD,EAClEC,SACAC,aACAC,oBACD;CACC,MAAMC,sBAAsBV,OAAuB,IAAA;CAEnD,MAAM,EACJW,gBACAC,aACAC,gBACAJ,eAAeK,yBACbT,uBAAuB;EACzBE;EACAC;EACAE;EACAD;CACF,CAAA;CAEA,MAAMM,YAAYb,gBAAgBM,WAAAA;CAElC,MAAMQ,uBAAuBC,iBAAAA;EAC3BV,QAAQW,MAAMD,YAAAA;EAEd,IAAIA,aAAaE,QACfZ,QAAQa,KAAK,CAACH,aAAa;CAE/B;CAEAlB,gBAAU;EACRW,qBAAqBW,SAASC,MAAAA;CAChC,GAAG,CAACZ,oBAAoB;CAExBX,gBAAU;EACR,MAAMwB,6BAA6BT,qBAAqBU,QACrDP,iBAAiBA,aAAaE,MAAM;EAGvC,IAAII,2BAA2BE,QAC7BlB,QAAQa,KAAKG,0BAAAA;CAEjB,GAAG,CAAChB,SAASO,qBAAqB;CAElC,OACE,sBAAA,cAACV,oBAAAA;EACCsB,cACEZ,qBAAqBW,SACjB,GAAGhB,cAAcgB,OAAO,yBACxB;EAENE,cAAW;EACXC,IAAG;EACHC,kBAAAA;EACWd;EACXe,KAAKpB;EACLqB,MAAK;EACLC,UAAU;IAEV,sBAAA,cAACpC,SAAAA;EACCqC,YAAW;EACXC,eAAc;EACdC,QAAO;EACPC,gBAAe;EACfC,IAAI;EACJC,IAAI;IAEJ,sBAAA,cAACzC,MAAAA;EAAK0C,IAAG;EAAKC,UAAU;IAAI,kBAAA,GAG5B,sBAAA,cAAC5C,SAAAA,MACEe,gBACAC,WAAAA,CAAAA,GAGL,sBAAA,cAACjB,KAAAA,EAAI2C,IAAI,MACP,sBAAA,cAACxC,cAAAA;EAAaqC,QAAO;EAAMM,SAAQ;MAErC,sBAAA,cAAC9C,KAAAA;EAAI+C,WAAU;EAAQC,UAAS;IAC9B,sBAAA,cAAChD,KAAAA,EAAIiD,IAAI,MACP,sBAAA,cAACzC,kBAAAA;EACCM,eAAeK;EACf+B,WAAWtC,QAAQuC;EACE9B;MAGxBH,cAAAA,CAAAA;AAIT"}
1
+ {"version":3,"file":"NotificationsContents.js","names":["Box","FlexBox","Text","CheckerDense","useEffect","useRef","React","useOnEscHandler","NotificationList","NotificationDialog","useNotificationButtons","NotificationsContents","actions","handleClose","notifications","notificationListRef","clearAllButton","closeButton","showMoreButton","visibleNotifications","onKeyDown","onNotificationClick","notification","click","unread","read","current","focus","unreadVisibleNotifications","filter","length","aria-label","aria-modal","bg","data-autofocus","ref","role","tabIndex","alignItems","flexDirection","height","justifyContent","mb","px","as","fontSize","display","maxHeight","overflow","pb","onDismiss","dismiss"],"sources":["../../src/Notifications/NotificationsContents.tsx"],"sourcesContent":["import { Box, FlexBox, Text } from '@codecademy/gamut';\nimport { CheckerDense } from '@codecademy/gamut-patterns';\nimport { useEffect, useRef } from 'react';\nimport * as React from 'react';\n\nimport { useOnEscHandler } from '../AppHeader/shared';\nimport { NotificationList } from '../NotificationList';\nimport { Notification } from '../NotificationList/typings';\nimport { NotificationDialog } from './elements';\nimport { NotificationsProps } from './types';\nimport { useNotificationButtons } from './useNotificationButtons';\n\nexport const NotificationsContents: React.FC<NotificationsProps> = ({\n actions,\n handleClose,\n notifications,\n}) => {\n const notificationListRef = useRef<HTMLDivElement>(null);\n\n const {\n clearAllButton,\n closeButton,\n showMoreButton,\n notifications: visibleNotifications,\n } = useNotificationButtons({\n actions,\n handleClose,\n notificationListRef,\n notifications,\n });\n\n const onKeyDown = useOnEscHandler(handleClose);\n\n const onNotificationClick = (notification: Notification) => {\n actions.click(notification);\n\n if (notification.unread) {\n actions.read([notification]);\n }\n };\n\n useEffect(() => {\n notificationListRef?.current?.focus();\n }, [notificationListRef]);\n\n useEffect(() => {\n const unreadVisibleNotifications = visibleNotifications.filter(\n (notification) => notification.unread\n );\n\n if (unreadVisibleNotifications.length) {\n actions.read(unreadVisibleNotifications);\n }\n }, [actions, visibleNotifications]);\n\n return (\n <NotificationDialog\n aria-label={\n visibleNotifications.length\n ? `${notifications.length} unread notifications`\n : `My Notifications`\n }\n aria-modal=\"true\"\n bg=\"background\"\n data-autofocus\n onKeyDown={onKeyDown}\n ref={notificationListRef}\n role=\"dialog\"\n tabIndex={-1}\n >\n <FlexBox\n alignItems=\"center\"\n flexDirection=\"row\"\n height=\"40\"\n justifyContent=\"space-between\"\n mb={16}\n px={32}\n >\n <Text as=\"h1\" fontSize={22}>\n My Notifications\n </Text>\n <FlexBox>\n {clearAllButton}\n {closeButton}\n </FlexBox>\n </FlexBox>\n <Box px={32}>\n <CheckerDense height=\"1px\" display=\"flex\" />\n </Box>\n <Box maxHeight=\"520px\" overflow=\"auto\">\n <Box pb={16}>\n <NotificationList\n notifications={visibleNotifications}\n onDismiss={actions.dismiss}\n onNotificationClick={onNotificationClick}\n />\n </Box>\n {showMoreButton}\n </Box>\n </NotificationDialog>\n );\n};\n"],"mappings":";;;;;;;;;;;AAYA,MAAaW,yBAAuD,EAClEC,SACAC,aACAC,oBACD;CACC,MAAMC,sBAAsBV,OAAuB,IAAA;CAEnD,MAAM,EACJW,gBACAC,aACAC,gBACAJ,eAAeK,yBACbT,uBAAuB;EACzBE;EACAC;EACAE;EACAD;CACF,CAAA;CAEA,MAAMM,YAAYb,gBAAgBM,WAAAA;CAElC,MAAMQ,uBAAuBC,iBAAAA;EAC3BV,QAAQW,MAAMD,YAAAA;EAEd,IAAIA,aAAaE,QACfZ,QAAQa,KAAK,CAACH,YAAa,CAAA;CAE/B;CAEAlB,gBAAU;EACRW,qBAAqBW,SAASC,MAAAA;CAChC,GAAG,CAACZ,mBAAoB,CAAA;CAExBX,gBAAU;EACR,MAAMwB,6BAA6BT,qBAAqBU,QACrDP,iBAAiBA,aAAaE,MAAM;EAGvC,IAAII,2BAA2BE,QAC7BlB,QAAQa,KAAKG,0BAAAA;CAEjB,GAAG,CAAChB,SAASO,oBAAqB,CAAA;CAElC,OACE,sBAAA,cAACV,oBAAAA;EACCsB,cACEZ,qBAAqBW,SACjB,GAAGhB,cAAcgB,OAAO,yBACxB;EAENE,cAAW;EACXC,IAAG;EACHC,kBAAAA;EACWd;EACXe,KAAKpB;EACLqB,MAAK;EACLC,UAAU;CAEV,GAAA,sBAAA,cAACpC,SAAAA;EACCqC,YAAW;EACXC,eAAc;EACdC,QAAO;EACPC,gBAAe;EACfC,IAAI;EACJC,IAAI;CAEJ,GAAA,sBAAA,cAACzC,MAAAA;EAAK0C,IAAG;EAAKC,UAAU;CAAI,GAAA,kBAAA,GAG5B,sBAAA,cAAC5C,SAAAA,MACEe,gBACAC,WAAAA,CAAAA,GAGL,sBAAA,cAACjB,KAAAA,EAAI2C,IAAI,GACP,GAAA,sBAAA,cAACxC,cAAAA;EAAaqC,QAAO;EAAMM,SAAQ;CAErC,CAAA,CAAA,GAAA,sBAAA,cAAC9C,KAAAA;EAAI+C,WAAU;EAAQC,UAAS;CAC9B,GAAA,sBAAA,cAAChD,KAAAA,EAAIiD,IAAI,GACP,GAAA,sBAAA,cAACzC,kBAAAA;EACCM,eAAeK;EACf+B,WAAWtC,QAAQuC;EACE9B;CAGxBH,CAAAA,CAAAA,GAAAA,cAAAA,CAAAA;AAIT"}
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationsDropdown.cjs","names":["Popover","NotificationsWrapper","NotificationsContents","NotificationsDropdown","bellRef","handleClose","isOpen","props","align","verticalOffset","outline","targetRef","widthRestricted"],"sources":["../../src/Notifications/NotificationsDropdown.tsx"],"sourcesContent":["import { Popover } from '@codecademy/gamut';\n\nimport { NotificationsWrapper } from './elements';\nimport { NotificationsContents } from './NotificationsContents';\nimport { NotificationsDropdownProps } from './types';\n\nexport const NotificationsDropdown: React.FC<NotificationsDropdownProps> = ({\n bellRef,\n handleClose,\n isOpen,\n ...props\n}) => {\n return (\n <Popover\n align=\"right\"\n verticalOffset={1}\n outline\n isOpen={isOpen}\n targetRef={bellRef}\n widthRestricted={false}\n >\n <NotificationsWrapper>\n <NotificationsContents {...props} handleClose={handleClose} />\n </NotificationsWrapper>\n </Popover>\n );\n};\n"],"mappings":";;;;;AAMA,MAAaG,yBAA+D,EAC1EC,SACAC,aACAC,QACA,GAAGC,YACJ;CACC,OACE,oBAAA,cAACP,2BAAAA;EACCQ,OAAM;EACNC,gBAAgB;EAChBC,SAAAA;EACQJ;EACRK,WAAWP;EACXQ,iBAAiB;IAEjB,oBAAA,cAACX,uCAAAA,MACC,oBAAA,cAACC,qDAAAA;EAAuB,GAAGK;EAAoBF;;AAIvD"}
1
+ {"version":3,"file":"NotificationsDropdown.cjs","names":["Popover","NotificationsWrapper","NotificationsContents","NotificationsDropdown","bellRef","handleClose","isOpen","props","align","verticalOffset","outline","targetRef","widthRestricted"],"sources":["../../src/Notifications/NotificationsDropdown.tsx"],"sourcesContent":["import { Popover } from '@codecademy/gamut';\n\nimport { NotificationsWrapper } from './elements';\nimport { NotificationsContents } from './NotificationsContents';\nimport { NotificationsDropdownProps } from './types';\n\nexport const NotificationsDropdown: React.FC<NotificationsDropdownProps> = ({\n bellRef,\n handleClose,\n isOpen,\n ...props\n}) => {\n return (\n <Popover\n align=\"right\"\n verticalOffset={1}\n outline\n isOpen={isOpen}\n targetRef={bellRef}\n widthRestricted={false}\n >\n <NotificationsWrapper>\n <NotificationsContents {...props} handleClose={handleClose} />\n </NotificationsWrapper>\n </Popover>\n );\n};\n"],"mappings":";;;;;AAMA,MAAaG,yBAA+D,EAC1EC,SACAC,aACAC,QACA,GAAGC,YACJ;CACC,OACE,oBAAA,cAACP,2BAAAA;EACCQ,OAAM;EACNC,gBAAgB;EAChBC,SAAAA;EACQJ;EACRK,WAAWP;EACXQ,iBAAiB;CAEjB,GAAA,oBAAA,cAACX,uCAAAA,MACC,oBAAA,cAACC,qDAAAA;EAAuB,GAAGK;EAAoBF;;AAIvD"}
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationsDropdown.js","names":["Popover","NotificationsWrapper","NotificationsContents","NotificationsDropdown","bellRef","handleClose","isOpen","props","align","verticalOffset","outline","targetRef","widthRestricted"],"sources":["../../src/Notifications/NotificationsDropdown.tsx"],"sourcesContent":["import { Popover } from '@codecademy/gamut';\n\nimport { NotificationsWrapper } from './elements';\nimport { NotificationsContents } from './NotificationsContents';\nimport { NotificationsDropdownProps } from './types';\n\nexport const NotificationsDropdown: React.FC<NotificationsDropdownProps> = ({\n bellRef,\n handleClose,\n isOpen,\n ...props\n}) => {\n return (\n <Popover\n align=\"right\"\n verticalOffset={1}\n outline\n isOpen={isOpen}\n targetRef={bellRef}\n widthRestricted={false}\n >\n <NotificationsWrapper>\n <NotificationsContents {...props} handleClose={handleClose} />\n </NotificationsWrapper>\n </Popover>\n );\n};\n"],"mappings":";;;;;AAMA,MAAaG,yBAA+D,EAC1EC,SACAC,aACAC,QACA,GAAGC,YACJ;CACC,OACE,oBAAA,cAACP,SAAAA;EACCQ,OAAM;EACNC,gBAAgB;EAChBC,SAAAA;EACQJ;EACRK,WAAWP;EACXQ,iBAAiB;IAEjB,oBAAA,cAACX,sBAAAA,MACC,oBAAA,cAACC,uBAAAA;EAAuB,GAAGK;EAAoBF;;AAIvD"}
1
+ {"version":3,"file":"NotificationsDropdown.js","names":["Popover","NotificationsWrapper","NotificationsContents","NotificationsDropdown","bellRef","handleClose","isOpen","props","align","verticalOffset","outline","targetRef","widthRestricted"],"sources":["../../src/Notifications/NotificationsDropdown.tsx"],"sourcesContent":["import { Popover } from '@codecademy/gamut';\n\nimport { NotificationsWrapper } from './elements';\nimport { NotificationsContents } from './NotificationsContents';\nimport { NotificationsDropdownProps } from './types';\n\nexport const NotificationsDropdown: React.FC<NotificationsDropdownProps> = ({\n bellRef,\n handleClose,\n isOpen,\n ...props\n}) => {\n return (\n <Popover\n align=\"right\"\n verticalOffset={1}\n outline\n isOpen={isOpen}\n targetRef={bellRef}\n widthRestricted={false}\n >\n <NotificationsWrapper>\n <NotificationsContents {...props} handleClose={handleClose} />\n </NotificationsWrapper>\n </Popover>\n );\n};\n"],"mappings":";;;;;AAMA,MAAaG,yBAA+D,EAC1EC,SACAC,aACAC,QACA,GAAGC,YACJ;CACC,OACE,oBAAA,cAACP,SAAAA;EACCQ,OAAM;EACNC,gBAAgB;EAChBC,SAAAA;EACQJ;EACRK,WAAWP;EACXQ,iBAAiB;CAEjB,GAAA,oBAAA,cAACX,sBAAAA,MACC,oBAAA,cAACC,uBAAAA;EAAuB,GAAGK;EAAoBF;;AAIvD"}
@@ -1 +1 @@
1
- {"version":3,"file":"elements.cjs","names":["Box","focusVisibleStyle","css","styled","NotificationsWrapper","display","textAlign","width","focusStyle","NotificationDialog","pb","pt"],"sources":["../../src/Notifications/elements.tsx"],"sourcesContent":["import { Box, focusVisibleStyle } from '@codecademy/gamut';\nimport { css } from '@codecademy/gamut-styles';\nimport styled from '@emotion/styled';\n\nexport const NotificationsWrapper = styled(Box)(\n css({\n display: 'flex',\n textAlign: 'left',\n width: 400,\n })\n);\n\nconst focusStyle = focusVisibleStyle();\n\nexport const NotificationDialog = styled(Box)(\n css({\n pb: 24,\n pt: 32,\n width: '100%',\n ...focusStyle,\n })\n);\n"],"mappings":";;;;;;;AAIA,MAAaI,uBAAuBD,2CAAOH,uBAAAA;;;qCACrC;CACFK,SAAS;CACTC,WAAW;CACXC,OAAO;AACT,CAAA,GAAA,q+BAAA;AAGF,MAAMC,sDAAaP;AAEnB,MAAaQ,qBAAqBN,2CAAOH,uBAAAA;;;qCACnC;CACFU,IAAI;CACJC,IAAI;CACJJ,OAAO;CACP,GAAGC;AACL,CAAA,GAAA,q+BAAA"}
1
+ {"version":3,"file":"elements.cjs","names":["Box","focusVisibleStyle","css","styled","NotificationsWrapper","display","textAlign","width","focusStyle","NotificationDialog","pb","pt"],"sources":["../../src/Notifications/elements.tsx"],"sourcesContent":["import { Box, focusVisibleStyle } from '@codecademy/gamut';\nimport { css } from '@codecademy/gamut-styles';\nimport styled from '@emotion/styled';\n\nexport const NotificationsWrapper = styled(Box)(\n css({\n display: 'flex',\n textAlign: 'left',\n width: 400,\n })\n);\n\nconst focusStyle = focusVisibleStyle();\n\nexport const NotificationDialog = styled(Box)(\n css({\n pb: 24,\n pt: 32,\n width: '100%',\n ...focusStyle,\n })\n);\n"],"mappings":";;;;;;;AAIA,MAAaI,uBAAuBD,2CAAOH,uBAAAA;;;AACzCE,CAAAA,CAAAA,mCAAI;CACFG,SAAS;CACTC,WAAW;CACXC,OAAO;AACT,CAAA,GAAA,q+BAAA;AAGF,MAAMC,sDAAaP;AAEnB,MAAaQ,qBAAqBN,2CAAOH,uBAAAA;;;AACvCE,CAAAA,CAAAA,mCAAI;CACFQ,IAAI;CACJC,IAAI;CACJJ,OAAO;CACP,GAAGC;AACL,CAAA,GAAA,q+BAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"elements.js","names":["Box","focusVisibleStyle","css","styled","NotificationsWrapper","display","textAlign","width","focusStyle","NotificationDialog","pb","pt"],"sources":["../../src/Notifications/elements.tsx"],"sourcesContent":["import { Box, focusVisibleStyle } from '@codecademy/gamut';\nimport { css } from '@codecademy/gamut-styles';\nimport styled from '@emotion/styled';\n\nexport const NotificationsWrapper = styled(Box)(\n css({\n display: 'flex',\n textAlign: 'left',\n width: 400,\n })\n);\n\nconst focusStyle = focusVisibleStyle();\n\nexport const NotificationDialog = styled(Box)(\n css({\n pb: 24,\n pt: 32,\n width: '100%',\n ...focusStyle,\n })\n);\n"],"mappings":";;;;;AAIA,MAAaI,uBAAuBD,qBAAOH,KAAAA;;;GACzCE,IAAI;CACFG,SAAS;CACTC,WAAW;CACXC,OAAO;AACT,CAAA,GAAA,q+BAAA;AAGF,MAAMC,aAAaP,kBAAAA;AAEnB,MAAaQ,qBAAqBN,qBAAOH,KAAAA;;;GACvCE,IAAI;CACFQ,IAAI;CACJC,IAAI;CACJJ,OAAO;CACP,GAAGC;AACL,CAAA,GAAA,q+BAAA"}
1
+ {"version":3,"file":"elements.js","names":["Box","focusVisibleStyle","css","styled","NotificationsWrapper","display","textAlign","width","focusStyle","NotificationDialog","pb","pt"],"sources":["../../src/Notifications/elements.tsx"],"sourcesContent":["import { Box, focusVisibleStyle } from '@codecademy/gamut';\nimport { css } from '@codecademy/gamut-styles';\nimport styled from '@emotion/styled';\n\nexport const NotificationsWrapper = styled(Box)(\n css({\n display: 'flex',\n textAlign: 'left',\n width: 400,\n })\n);\n\nconst focusStyle = focusVisibleStyle();\n\nexport const NotificationDialog = styled(Box)(\n css({\n pb: 24,\n pt: 32,\n width: '100%',\n ...focusStyle,\n })\n);\n"],"mappings":";;;;;AAIA,MAAaI,uBAAuBD,qBAAOH,KAAAA;;;AACzCE,CAAAA,CAAAA,CAAAA,IAAI;CACFG,SAAS;CACTC,WAAW;CACXC,OAAO;AACT,CAAA,GAAA,q+BAAA;AAGF,MAAMC,aAAaP,kBAAAA;AAEnB,MAAaQ,qBAAqBN,qBAAOH,KAAAA;;;AACvCE,CAAAA,CAAAA,CAAAA,IAAI;CACFQ,IAAI;CACJC,IAAI;CACJJ,OAAO;CACP,GAAGC;AACL,CAAA,GAAA,q+BAAA"}
@@ -1,4 +1,5 @@
1
1
  import { Notification } from "../NotificationList/typings.cjs";
2
+ import "@codecademy/gamut";
2
3
  //#region src/Notifications/types.d.ts
3
4
  type NotificationActions = {
4
5
  clear: () => void;
@@ -13,5 +14,5 @@ type AppHeaderNotificationSettings = {
13
14
  onEnable: () => void;
14
15
  };
15
16
  //#endregion
16
- export { AppHeaderNotificationSettings };
17
+ export { AppHeaderNotificationSettings, NotificationActions };
17
18
  //# sourceMappingURL=types.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.cts","names":[],"sources":["../../src/Notifications/types.ts"],"mappings":";;KAIY,mBAAA;EACV,KAAA;EACA,KAAA,GAAQ,YAAA,EAAc,YAAA;EACtB,OAAA,GAAU,YAAA,EAAc,YAAA;EACxB,IAAA,GAAO,aAAA,EAAe,YAAA;EACtB,KAAA,GAAQ,MAAA;AAAA;AAAA,KAGE,6BAAA;EACV,OAAA,EAAS,mBAAA;EACT,aAAA,EAAe,YAAY;EAC3B,QAAA;AAAA"}
1
+ {"version":3,"file":"types.d.cts","names":[],"sources":["../../src/Notifications/types.ts"],"mappings":";;;KAIY;EACV;EACA,QAAQ,cAAc;EACtB,UAAU,cAAc;EACxB,OAAO,eAAe;EACtB,QAAQ;;KAGE;EACV,SAAS;EACT,eAAe;EACf"}
@@ -1,4 +1,5 @@
1
1
  import { Notification } from "../NotificationList/typings.js";
2
+ import "@codecademy/gamut";
2
3
  //#region src/Notifications/types.d.ts
3
4
  type NotificationActions = {
4
5
  clear: () => void;
@@ -13,5 +14,5 @@ type AppHeaderNotificationSettings = {
13
14
  onEnable: () => void;
14
15
  };
15
16
  //#endregion
16
- export { AppHeaderNotificationSettings };
17
+ export { AppHeaderNotificationSettings, NotificationActions };
17
18
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","names":[],"sources":["../../src/Notifications/types.ts"],"mappings":";;KAIY,mBAAA;EACV,KAAA;EACA,KAAA,GAAQ,YAAA,EAAc,YAAA;EACtB,OAAA,GAAU,YAAA,EAAc,YAAA;EACxB,IAAA,GAAO,aAAA,EAAe,YAAA;EACtB,KAAA,GAAQ,MAAA;AAAA;AAAA,KAGE,6BAAA;EACV,OAAA,EAAS,mBAAA;EACT,aAAA,EAAe,YAAA;EACf,QAAA;AAAA"}
1
+ {"version":3,"file":"types.d.ts","names":[],"sources":["../../src/Notifications/types.ts"],"mappings":";;;KAIY;EACV;EACA,QAAQ,cAAc;EACtB,UAAU,cAAc;EACxB,OAAO,eAAe;EACtB,QAAQ;;KAGE;EACV,SAAS;EACT,eAAe;EACf"}
@@ -1 +1 @@
1
- {"version":3,"file":"useHeaderNotifications.cjs","names":["useRef","useState","AnimatedHeaderZone","NotificationBell","useHeaderNotifications","settings","Renderer","isOpen","setIsOpen","bellRef","handleClose","current","focus","id","type","renderElement","notifications","visible","key","actions"],"sources":["../../src/Notifications/useHeaderNotifications.tsx"],"sourcesContent":["import { ButtonBaseElements } from '@codecademy/gamut';\nimport { useRef, useState } from 'react';\n\nimport { AnimatedHeaderZone } from '../AppHeader/shared';\nimport { NotificationBell } from './NotificationBell';\nimport {\n AppHeaderNotificationSettings,\n NotificationsDropdownProps,\n} from './types';\n\nexport type HeaderNotificationProps = {\n settings: AppHeaderNotificationSettings | undefined;\n Renderer: React.ComponentType<NotificationsDropdownProps>;\n};\n\nexport const useHeaderNotifications = ({\n settings,\n Renderer,\n}: HeaderNotificationProps) => {\n const [isOpen, setIsOpen] = useState(false);\n const bellRef = useRef<ButtonBaseElements>(null);\n\n if (!settings) {\n return [null, null];\n }\n\n const handleClose = async () => {\n await setIsOpen(false);\n await bellRef.current?.focus();\n };\n\n return [\n {\n id: 'notifications',\n type: 'render-element',\n renderElement: () => (\n <NotificationBell\n bellRef={bellRef}\n isOpen={isOpen}\n notifications={settings.notifications}\n setIsOpen={setIsOpen}\n />\n ),\n },\n\n <AnimatedHeaderZone visible={isOpen} key=\"notifications-content\">\n <Renderer\n actions={settings.actions}\n bellRef={bellRef}\n notifications={settings.notifications}\n isOpen={isOpen}\n handleClose={handleClose}\n />\n </AnimatedHeaderZone>,\n ] as const;\n};\n"],"mappings":";;;;;;AAeA,MAAaI,0BAA0B,EACrCC,UACAC,eACwB;CACxB,MAAM,CAACC,QAAQC,iCAAsB,KAAA;CACrC,MAAMC,4BAAqC,IAAA;CAE3C,IAAI,CAACJ,UACH,OAAO,CAAC,MAAM;CAGhB,MAAMK,cAAc,YAAA;EAClB,MAAMF,UAAU,KAAA;EAChB,MAAMC,QAAQE,SAASC,MAAAA;CACzB;CAEA,OAAO,CACL;EACEC,IAAI;EACJC,MAAM;EACNC,qBACE,oBAAA,cAACZ,2CAAAA;GACUM;GACDF;GACRS,eAAeX,SAASW;GACbR;;CAGjB,GAEA,oBAAA,cAACN,qCAAAA;EAAmBe,SAASV;EAAQW,KAAI;IACvC,oBAAA,cAACZ,UAAAA;EACCa,SAASd,SAASc;EACTV;EACTO,eAAeX,SAASW;EAChBT;EACKG;;AAIrB"}
1
+ {"version":3,"file":"useHeaderNotifications.cjs","names":["useRef","useState","AnimatedHeaderZone","NotificationBell","useHeaderNotifications","settings","Renderer","isOpen","setIsOpen","bellRef","handleClose","current","focus","id","type","renderElement","notifications","visible","key","actions"],"sources":["../../src/Notifications/useHeaderNotifications.tsx"],"sourcesContent":["import { ButtonBaseElements } from '@codecademy/gamut';\nimport { useRef, useState } from 'react';\n\nimport { AnimatedHeaderZone } from '../AppHeader/shared';\nimport { NotificationBell } from './NotificationBell';\nimport {\n AppHeaderNotificationSettings,\n NotificationsDropdownProps,\n} from './types';\n\nexport type HeaderNotificationProps = {\n settings: AppHeaderNotificationSettings | undefined;\n Renderer: React.ComponentType<NotificationsDropdownProps>;\n};\n\nexport const useHeaderNotifications = ({\n settings,\n Renderer,\n}: HeaderNotificationProps) => {\n const [isOpen, setIsOpen] = useState(false);\n const bellRef = useRef<ButtonBaseElements>(null);\n\n if (!settings) {\n return [null, null];\n }\n\n const handleClose = async () => {\n await setIsOpen(false);\n await bellRef.current?.focus();\n };\n\n return [\n {\n id: 'notifications',\n type: 'render-element',\n renderElement: () => (\n <NotificationBell\n bellRef={bellRef}\n isOpen={isOpen}\n notifications={settings.notifications}\n setIsOpen={setIsOpen}\n />\n ),\n },\n\n <AnimatedHeaderZone visible={isOpen} key=\"notifications-content\">\n <Renderer\n actions={settings.actions}\n bellRef={bellRef}\n notifications={settings.notifications}\n isOpen={isOpen}\n handleClose={handleClose}\n />\n </AnimatedHeaderZone>,\n ] as const;\n};\n"],"mappings":";;;;;;AAeA,MAAaI,0BAA0B,EACrCC,UACAC,eACwB;CACxB,MAAM,CAACC,QAAQC,iCAAsB,KAAA;CACrC,MAAMC,4BAAqC,IAAA;CAE3C,IAAI,CAACJ,UACH,OAAO,CAAC,MAAM,IAAK;CAGrB,MAAMK,cAAc,YAAA;EAClB,MAAMF,UAAU,KAAA;EAChB,MAAMC,QAAQE,SAASC,MAAAA;CACzB;CAEA,OAAO,CACL;EACEC,IAAI;EACJC,MAAM;EACNC,qBACE,oBAAA,cAACZ,2CAAAA;GACUM;GACDF;GACRS,eAAeX,SAASW;GACbR;;CAGjB,GAEA,oBAAA,cAACN,qCAAAA;EAAmBe,SAASV;EAAQW,KAAI;CACvC,GAAA,oBAAA,cAACZ,UAAAA;EACCa,SAASd,SAASc;EACTV;EACTO,eAAeX,SAASW;EAChBT;EACKG;IAGlB;AACH"}
@@ -1 +1 @@
1
- {"version":3,"file":"useHeaderNotifications.js","names":["useRef","useState","AnimatedHeaderZone","NotificationBell","useHeaderNotifications","settings","Renderer","isOpen","setIsOpen","bellRef","handleClose","current","focus","id","type","renderElement","notifications","visible","key","actions"],"sources":["../../src/Notifications/useHeaderNotifications.tsx"],"sourcesContent":["import { ButtonBaseElements } from '@codecademy/gamut';\nimport { useRef, useState } from 'react';\n\nimport { AnimatedHeaderZone } from '../AppHeader/shared';\nimport { NotificationBell } from './NotificationBell';\nimport {\n AppHeaderNotificationSettings,\n NotificationsDropdownProps,\n} from './types';\n\nexport type HeaderNotificationProps = {\n settings: AppHeaderNotificationSettings | undefined;\n Renderer: React.ComponentType<NotificationsDropdownProps>;\n};\n\nexport const useHeaderNotifications = ({\n settings,\n Renderer,\n}: HeaderNotificationProps) => {\n const [isOpen, setIsOpen] = useState(false);\n const bellRef = useRef<ButtonBaseElements>(null);\n\n if (!settings) {\n return [null, null];\n }\n\n const handleClose = async () => {\n await setIsOpen(false);\n await bellRef.current?.focus();\n };\n\n return [\n {\n id: 'notifications',\n type: 'render-element',\n renderElement: () => (\n <NotificationBell\n bellRef={bellRef}\n isOpen={isOpen}\n notifications={settings.notifications}\n setIsOpen={setIsOpen}\n />\n ),\n },\n\n <AnimatedHeaderZone visible={isOpen} key=\"notifications-content\">\n <Renderer\n actions={settings.actions}\n bellRef={bellRef}\n notifications={settings.notifications}\n isOpen={isOpen}\n handleClose={handleClose}\n />\n </AnimatedHeaderZone>,\n ] as const;\n};\n"],"mappings":";;;;;;AAeA,MAAaI,0BAA0B,EACrCC,UACAC,eACwB;CACxB,MAAM,CAACC,QAAQC,aAAaP,SAAS,KAAA;CACrC,MAAMQ,UAAUT,OAA2B,IAAA;CAE3C,IAAI,CAACK,UACH,OAAO,CAAC,MAAM;CAGhB,MAAMK,cAAc,YAAA;EAClB,MAAMF,UAAU,KAAA;EAChB,MAAMC,QAAQE,SAASC,MAAAA;CACzB;CAEA,OAAO,CACL;EACEC,IAAI;EACJC,MAAM;EACNC,qBACE,oBAAA,cAACZ,kBAAAA;GACUM;GACDF;GACRS,eAAeX,SAASW;GACbR;;CAGjB,GAEA,oBAAA,cAACN,oBAAAA;EAAmBe,SAASV;EAAQW,KAAI;IACvC,oBAAA,cAACZ,UAAAA;EACCa,SAASd,SAASc;EACTV;EACTO,eAAeX,SAASW;EAChBT;EACKG;;AAIrB"}
1
+ {"version":3,"file":"useHeaderNotifications.js","names":["useRef","useState","AnimatedHeaderZone","NotificationBell","useHeaderNotifications","settings","Renderer","isOpen","setIsOpen","bellRef","handleClose","current","focus","id","type","renderElement","notifications","visible","key","actions"],"sources":["../../src/Notifications/useHeaderNotifications.tsx"],"sourcesContent":["import { ButtonBaseElements } from '@codecademy/gamut';\nimport { useRef, useState } from 'react';\n\nimport { AnimatedHeaderZone } from '../AppHeader/shared';\nimport { NotificationBell } from './NotificationBell';\nimport {\n AppHeaderNotificationSettings,\n NotificationsDropdownProps,\n} from './types';\n\nexport type HeaderNotificationProps = {\n settings: AppHeaderNotificationSettings | undefined;\n Renderer: React.ComponentType<NotificationsDropdownProps>;\n};\n\nexport const useHeaderNotifications = ({\n settings,\n Renderer,\n}: HeaderNotificationProps) => {\n const [isOpen, setIsOpen] = useState(false);\n const bellRef = useRef<ButtonBaseElements>(null);\n\n if (!settings) {\n return [null, null];\n }\n\n const handleClose = async () => {\n await setIsOpen(false);\n await bellRef.current?.focus();\n };\n\n return [\n {\n id: 'notifications',\n type: 'render-element',\n renderElement: () => (\n <NotificationBell\n bellRef={bellRef}\n isOpen={isOpen}\n notifications={settings.notifications}\n setIsOpen={setIsOpen}\n />\n ),\n },\n\n <AnimatedHeaderZone visible={isOpen} key=\"notifications-content\">\n <Renderer\n actions={settings.actions}\n bellRef={bellRef}\n notifications={settings.notifications}\n isOpen={isOpen}\n handleClose={handleClose}\n />\n </AnimatedHeaderZone>,\n ] as const;\n};\n"],"mappings":";;;;;;AAeA,MAAaI,0BAA0B,EACrCC,UACAC,eACwB;CACxB,MAAM,CAACC,QAAQC,aAAaP,SAAS,KAAA;CACrC,MAAMQ,UAAUT,OAA2B,IAAA;CAE3C,IAAI,CAACK,UACH,OAAO,CAAC,MAAM,IAAK;CAGrB,MAAMK,cAAc,YAAA;EAClB,MAAMF,UAAU,KAAA;EAChB,MAAMC,QAAQE,SAASC,MAAAA;CACzB;CAEA,OAAO,CACL;EACEC,IAAI;EACJC,MAAM;EACNC,qBACE,oBAAA,cAACZ,kBAAAA;GACUM;GACDF;GACRS,eAAeX,SAASW;GACbR;;CAGjB,GAEA,oBAAA,cAACN,oBAAAA;EAAmBe,SAASV;EAAQW,KAAI;CACvC,GAAA,oBAAA,cAACZ,UAAAA;EACCa,SAASd,SAASc;EACTV;EACTO,eAAeX,SAASW;EAChBT;EACKG;IAGlB;AACH"}
@@ -1 +1 @@
1
- {"version":3,"file":"useNotificationButtons.cjs","names":["Box","IconButton","TextButton","MiniDeleteIcon","useState","defaultDisplayLimit","useNotificationButtons","actions","handleClose","notifications","notificationListRef","showMore","setShowMore","displayLimit","amountAdjective","length","closeButton","icon","onClick","tip","clearAllButton","showMoreButton","clear","track","current","focus","aria-label","mr","px","read","slice"],"sources":["../../src/Notifications/useNotificationButtons.tsx"],"sourcesContent":["import { Box, IconButton, TextButton } from '@codecademy/gamut';\nimport { MiniDeleteIcon } from '@codecademy/gamut-icons';\nimport { ReactElement, useState } from 'react';\n\nimport { defaultDisplayLimit } from './constants';\nimport { NotificationsProps } from './types';\n\ninterface NotificationButtons\n extends Pick<NotificationsProps, 'notifications'> {\n clearAllButton: ReactElement | null;\n closeButton: ReactElement;\n showMoreButton: ReactElement | null;\n}\n\nexport const useNotificationButtons = ({\n actions,\n handleClose,\n notifications,\n notificationListRef,\n}: NotificationsProps): NotificationButtons => {\n const [showMore, setShowMore] = useState(false);\n const [displayLimit, amountAdjective] = showMore\n ? [notifications.length, 'Less']\n : [defaultDisplayLimit, 'More'];\n\n const closeButton = (\n <IconButton icon={MiniDeleteIcon} onClick={handleClose} tip=\"Close\" />\n );\n\n if (notifications.length === 0) {\n return {\n clearAllButton: null,\n closeButton,\n showMoreButton: null,\n notifications,\n } as const;\n }\n\n const clearAllButton =\n notifications.length > 0 &&\n (notifications.length <= displayLimit || showMore) ? (\n <TextButton\n onClick={() => {\n actions.clear();\n actions.track('notification_clear_all');\n notificationListRef?.current?.focus();\n }}\n aria-label={`Clear all ${notifications.length} notifications`}\n mr={8}\n >\n Clear All\n </TextButton>\n ) : null;\n\n const showMoreButton =\n notifications.length <= defaultDisplayLimit ? null : (\n <Box px={32}>\n <TextButton\n onClick={() => {\n setShowMore(!showMore);\n\n if (!showMore) {\n actions.track('notification_show_more');\n actions.read(notifications.slice(defaultDisplayLimit));\n }\n }}\n >\n Show {amountAdjective}\n </TextButton>\n </Box>\n );\n\n return {\n clearAllButton,\n closeButton,\n showMoreButton,\n notifications: notifications.slice(0, displayLimit),\n } as const;\n};\n"],"mappings":";;;;;AAcA,MAAaM,0BAA0B,EACrCC,SACAC,aACAC,eACAC,0BACmB;CACnB,MAAM,CAACC,UAAUC,mCAAwB,KAAA;CACzC,MAAM,CAACC,cAAcC,mBAAmBH,WACpC,CAACF,cAAcM,QAAQ,UACvB,IAAsB;CAE1B,MAAMC,cACJ,oBAAA,cAACf,8BAAAA;EAAWgB,MAAMd;EAAgBe,SAASV;EAAaW,KAAI;;CAG9D,IAAIV,cAAcM,WAAW,GAC3B,OAAO;EACLK,gBAAgB;EAChBJ;EACAK,gBAAgB;EAChBZ;CACF;CAqCF,OAAO;EACLW,gBAlCAX,cAAcM,SAAS,MACtBN,cAAcM,UAAUF,gBAAgBF,YACvC,oBAAA,cAACT,8BAAAA;GACCgB,eAAS;IACPX,QAAQe,MAAK;IACbf,QAAQgB,MAAM,wBAAA;IACdb,qBAAqBc,SAASC,MAAAA;GAChC;GACAC,cAAY,aAAajB,cAAcM,OAAO;GAC9CY,IAAI;KACL,WAAA,IAGC;EAsBJX;EACAK,gBApBAZ,cAAcM,cAAgC,OAC5C,oBAAA,cAACf,uBAAAA,EAAI4B,IAAI,MACP,oBAAA,cAAC1B,8BAAAA,EACCgB,eAAS;GACPN,YAAY,CAACD,QAAAA;GAEb,IAAI,CAACA,UAAU;IACbJ,QAAQgB,MAAM,wBAAA;IACdhB,QAAQsB,KAAKpB,cAAcqB,OAAMzB,CAAAA;GACnC;EACF,KACD,SACOS,eAAAA,CAAAA;EASZL,eAAeA,cAAcqB,MAAM,GAAGjB,YAAAA;CACxC;AACF"}
1
+ {"version":3,"file":"useNotificationButtons.cjs","names":["Box","IconButton","TextButton","MiniDeleteIcon","useState","defaultDisplayLimit","useNotificationButtons","actions","handleClose","notifications","notificationListRef","showMore","setShowMore","displayLimit","amountAdjective","length","closeButton","icon","onClick","tip","clearAllButton","showMoreButton","clear","track","current","focus","aria-label","mr","px","read","slice"],"sources":["../../src/Notifications/useNotificationButtons.tsx"],"sourcesContent":["import { Box, IconButton, TextButton } from '@codecademy/gamut';\nimport { MiniDeleteIcon } from '@codecademy/gamut-icons';\nimport { ReactElement, useState } from 'react';\n\nimport { defaultDisplayLimit } from './constants';\nimport { NotificationsProps } from './types';\n\ninterface NotificationButtons\n extends Pick<NotificationsProps, 'notifications'> {\n clearAllButton: ReactElement | null;\n closeButton: ReactElement;\n showMoreButton: ReactElement | null;\n}\n\nexport const useNotificationButtons = ({\n actions,\n handleClose,\n notifications,\n notificationListRef,\n}: NotificationsProps): NotificationButtons => {\n const [showMore, setShowMore] = useState(false);\n const [displayLimit, amountAdjective] = showMore\n ? [notifications.length, 'Less']\n : [defaultDisplayLimit, 'More'];\n\n const closeButton = (\n <IconButton icon={MiniDeleteIcon} onClick={handleClose} tip=\"Close\" />\n );\n\n if (notifications.length === 0) {\n return {\n clearAllButton: null,\n closeButton,\n showMoreButton: null,\n notifications,\n } as const;\n }\n\n const clearAllButton =\n notifications.length > 0 &&\n (notifications.length <= displayLimit || showMore) ? (\n <TextButton\n onClick={() => {\n actions.clear();\n actions.track('notification_clear_all');\n notificationListRef?.current?.focus();\n }}\n aria-label={`Clear all ${notifications.length} notifications`}\n mr={8}\n >\n Clear All\n </TextButton>\n ) : null;\n\n const showMoreButton =\n notifications.length <= defaultDisplayLimit ? null : (\n <Box px={32}>\n <TextButton\n onClick={() => {\n setShowMore(!showMore);\n\n if (!showMore) {\n actions.track('notification_show_more');\n actions.read(notifications.slice(defaultDisplayLimit));\n }\n }}\n >\n Show {amountAdjective}\n </TextButton>\n </Box>\n );\n\n return {\n clearAllButton,\n closeButton,\n showMoreButton,\n notifications: notifications.slice(0, displayLimit),\n } as const;\n};\n"],"mappings":";;;;;AAcA,MAAaM,0BAA0B,EACrCC,SACAC,aACAC,eACAC,0BACmB;CACnB,MAAM,CAACC,UAAUC,mCAAwB,KAAA;CACzC,MAAM,CAACC,cAAcC,mBAAmBH,WACpC,CAACF,cAAcM,QAAQ,MAAO,IAC9B,IAAsB,MAAO;CAEjC,MAAMC,cACJ,oBAAA,cAACf,8BAAAA;EAAWgB,MAAMd;EAAgBe,SAASV;EAAaW,KAAI;;CAG9D,IAAIV,cAAcM,WAAW,GAC3B,OAAO;EACLK,gBAAgB;EAChBJ;EACAK,gBAAgB;EAChBZ;CACF;CAqCF,OAAO;EACLW,gBAlCAX,cAAcM,SAAS,MACtBN,cAAcM,UAAUF,gBAAgBF,YACvC,oBAAA,cAACT,8BAAAA;GACCgB,eAAS;IACPX,QAAQe,MAAK;IACbf,QAAQgB,MAAM,wBAAA;IACdb,qBAAqBc,SAASC,MAAAA;GAChC;GACAC,cAAY,aAAajB,cAAcM,OAAO;GAC9CY,IAAI;EACL,GAAA,WAAA,IAGC;EAsBJX;EACAK,gBApBAZ,cAAcM,cAAgC,OAC5C,oBAAA,cAACf,uBAAAA,EAAI4B,IAAI,GACP,GAAA,oBAAA,cAAC1B,8BAAAA,EACCgB,eAAS;GACPN,YAAY,CAACD,QAAAA;GAEb,IAAI,CAACA,UAAU;IACbJ,QAAQgB,MAAM,wBAAA;IACdhB,QAAQsB,KAAKpB,cAAcqB,OAAMzB,CAAAA;GACnC;EACF,EACD,GAAA,SACOS,eAAAA,CAAAA;EASZL,eAAeA,cAAcqB,MAAM,GAAGjB,YAAAA;CACxC;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"useNotificationButtons.js","names":["Box","IconButton","TextButton","MiniDeleteIcon","useState","defaultDisplayLimit","useNotificationButtons","actions","handleClose","notifications","notificationListRef","showMore","setShowMore","displayLimit","amountAdjective","length","closeButton","icon","onClick","tip","clearAllButton","showMoreButton","clear","track","current","focus","aria-label","mr","px","read","slice"],"sources":["../../src/Notifications/useNotificationButtons.tsx"],"sourcesContent":["import { Box, IconButton, TextButton } from '@codecademy/gamut';\nimport { MiniDeleteIcon } from '@codecademy/gamut-icons';\nimport { ReactElement, useState } from 'react';\n\nimport { defaultDisplayLimit } from './constants';\nimport { NotificationsProps } from './types';\n\ninterface NotificationButtons\n extends Pick<NotificationsProps, 'notifications'> {\n clearAllButton: ReactElement | null;\n closeButton: ReactElement;\n showMoreButton: ReactElement | null;\n}\n\nexport const useNotificationButtons = ({\n actions,\n handleClose,\n notifications,\n notificationListRef,\n}: NotificationsProps): NotificationButtons => {\n const [showMore, setShowMore] = useState(false);\n const [displayLimit, amountAdjective] = showMore\n ? [notifications.length, 'Less']\n : [defaultDisplayLimit, 'More'];\n\n const closeButton = (\n <IconButton icon={MiniDeleteIcon} onClick={handleClose} tip=\"Close\" />\n );\n\n if (notifications.length === 0) {\n return {\n clearAllButton: null,\n closeButton,\n showMoreButton: null,\n notifications,\n } as const;\n }\n\n const clearAllButton =\n notifications.length > 0 &&\n (notifications.length <= displayLimit || showMore) ? (\n <TextButton\n onClick={() => {\n actions.clear();\n actions.track('notification_clear_all');\n notificationListRef?.current?.focus();\n }}\n aria-label={`Clear all ${notifications.length} notifications`}\n mr={8}\n >\n Clear All\n </TextButton>\n ) : null;\n\n const showMoreButton =\n notifications.length <= defaultDisplayLimit ? null : (\n <Box px={32}>\n <TextButton\n onClick={() => {\n setShowMore(!showMore);\n\n if (!showMore) {\n actions.track('notification_show_more');\n actions.read(notifications.slice(defaultDisplayLimit));\n }\n }}\n >\n Show {amountAdjective}\n </TextButton>\n </Box>\n );\n\n return {\n clearAllButton,\n closeButton,\n showMoreButton,\n notifications: notifications.slice(0, displayLimit),\n } as const;\n};\n"],"mappings":";;;;;AAcA,MAAaM,0BAA0B,EACrCC,SACAC,aACAC,eACAC,0BACmB;CACnB,MAAM,CAACC,UAAUC,eAAeR,SAAS,KAAA;CACzC,MAAM,CAACS,cAAcC,mBAAmBH,WACpC,CAACF,cAAcM,QAAQ,UACvB,IAAsB;CAE1B,MAAMC,cACJ,oBAAA,cAACf,YAAAA;EAAWgB,MAAMd;EAAgBe,SAASV;EAAaW,KAAI;;CAG9D,IAAIV,cAAcM,WAAW,GAC3B,OAAO;EACLK,gBAAgB;EAChBJ;EACAK,gBAAgB;EAChBZ;CACF;CAqCF,OAAO;EACLW,gBAlCAX,cAAcM,SAAS,MACtBN,cAAcM,UAAUF,gBAAgBF,YACvC,oBAAA,cAACT,YAAAA;GACCgB,eAAS;IACPX,QAAQe,MAAK;IACbf,QAAQgB,MAAM,wBAAA;IACdb,qBAAqBc,SAASC,MAAAA;GAChC;GACAC,cAAY,aAAajB,cAAcM,OAAO;GAC9CY,IAAI;KACL,WAAA,IAGC;EAsBJX;EACAK,gBApBAZ,cAAcM,cAAgC,OAC5C,oBAAA,cAACf,KAAAA,EAAI4B,IAAI,MACP,oBAAA,cAAC1B,YAAAA,EACCgB,eAAS;GACPN,YAAY,CAACD,QAAAA;GAEb,IAAI,CAACA,UAAU;IACbJ,QAAQgB,MAAM,wBAAA;IACdhB,QAAQsB,KAAKpB,cAAcqB,OAAMzB,CAAAA;GACnC;EACF,KACD,SACOS,eAAAA,CAAAA;EASZL,eAAeA,cAAcqB,MAAM,GAAGjB,YAAAA;CACxC;AACF"}
1
+ {"version":3,"file":"useNotificationButtons.js","names":["Box","IconButton","TextButton","MiniDeleteIcon","useState","defaultDisplayLimit","useNotificationButtons","actions","handleClose","notifications","notificationListRef","showMore","setShowMore","displayLimit","amountAdjective","length","closeButton","icon","onClick","tip","clearAllButton","showMoreButton","clear","track","current","focus","aria-label","mr","px","read","slice"],"sources":["../../src/Notifications/useNotificationButtons.tsx"],"sourcesContent":["import { Box, IconButton, TextButton } from '@codecademy/gamut';\nimport { MiniDeleteIcon } from '@codecademy/gamut-icons';\nimport { ReactElement, useState } from 'react';\n\nimport { defaultDisplayLimit } from './constants';\nimport { NotificationsProps } from './types';\n\ninterface NotificationButtons\n extends Pick<NotificationsProps, 'notifications'> {\n clearAllButton: ReactElement | null;\n closeButton: ReactElement;\n showMoreButton: ReactElement | null;\n}\n\nexport const useNotificationButtons = ({\n actions,\n handleClose,\n notifications,\n notificationListRef,\n}: NotificationsProps): NotificationButtons => {\n const [showMore, setShowMore] = useState(false);\n const [displayLimit, amountAdjective] = showMore\n ? [notifications.length, 'Less']\n : [defaultDisplayLimit, 'More'];\n\n const closeButton = (\n <IconButton icon={MiniDeleteIcon} onClick={handleClose} tip=\"Close\" />\n );\n\n if (notifications.length === 0) {\n return {\n clearAllButton: null,\n closeButton,\n showMoreButton: null,\n notifications,\n } as const;\n }\n\n const clearAllButton =\n notifications.length > 0 &&\n (notifications.length <= displayLimit || showMore) ? (\n <TextButton\n onClick={() => {\n actions.clear();\n actions.track('notification_clear_all');\n notificationListRef?.current?.focus();\n }}\n aria-label={`Clear all ${notifications.length} notifications`}\n mr={8}\n >\n Clear All\n </TextButton>\n ) : null;\n\n const showMoreButton =\n notifications.length <= defaultDisplayLimit ? null : (\n <Box px={32}>\n <TextButton\n onClick={() => {\n setShowMore(!showMore);\n\n if (!showMore) {\n actions.track('notification_show_more');\n actions.read(notifications.slice(defaultDisplayLimit));\n }\n }}\n >\n Show {amountAdjective}\n </TextButton>\n </Box>\n );\n\n return {\n clearAllButton,\n closeButton,\n showMoreButton,\n notifications: notifications.slice(0, displayLimit),\n } as const;\n};\n"],"mappings":";;;;;AAcA,MAAaM,0BAA0B,EACrCC,SACAC,aACAC,eACAC,0BACmB;CACnB,MAAM,CAACC,UAAUC,eAAeR,SAAS,KAAA;CACzC,MAAM,CAACS,cAAcC,mBAAmBH,WACpC,CAACF,cAAcM,QAAQ,MAAO,IAC9B,IAAsB,MAAO;CAEjC,MAAMC,cACJ,oBAAA,cAACf,YAAAA;EAAWgB,MAAMd;EAAgBe,SAASV;EAAaW,KAAI;;CAG9D,IAAIV,cAAcM,WAAW,GAC3B,OAAO;EACLK,gBAAgB;EAChBJ;EACAK,gBAAgB;EAChBZ;CACF;CAqCF,OAAO;EACLW,gBAlCAX,cAAcM,SAAS,MACtBN,cAAcM,UAAUF,gBAAgBF,YACvC,oBAAA,cAACT,YAAAA;GACCgB,eAAS;IACPX,QAAQe,MAAK;IACbf,QAAQgB,MAAM,wBAAA;IACdb,qBAAqBc,SAASC,MAAAA;GAChC;GACAC,cAAY,aAAajB,cAAcM,OAAO;GAC9CY,IAAI;EACL,GAAA,WAAA,IAGC;EAsBJX;EACAK,gBApBAZ,cAAcM,cAAgC,OAC5C,oBAAA,cAACf,KAAAA,EAAI4B,IAAI,GACP,GAAA,oBAAA,cAAC1B,YAAAA,EACCgB,eAAS;GACPN,YAAY,CAACD,QAAAA;GAEb,IAAI,CAACA,UAAU;IACbJ,QAAQgB,MAAM,wBAAA;IACdhB,QAAQsB,KAAKpB,cAAcqB,OAAMzB,CAAAA;GACnC;EACF,EACD,GAAA,SACOS,eAAAA,CAAAA;EASZL,eAAeA,cAAcqB,MAAM,GAAGjB,YAAAA;CACxC;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"PageAlerts.cjs","names":["Alert","BodyPortal","ContentContainer","styled","useCallback","useContext","useEffect","useState","React","PageAlertsContext","AlertArea","StyledAlert","PageAlerts","extra","alerts","closeAlert","addAlert","forEach","alertArea","setAlertArea","refCallback","focusAlertCloseButton","refButton","querySelector","focus","length","role","aria-live","key","ref","map","alert","size","message","cta","onClose","permanent","undefined","type","placement"],"sources":["../../src/PageAlerts/PageAlerts.tsx"],"sourcesContent":["import { Alert, BodyPortal, ContentContainer } from '@codecademy/gamut';\nimport styled from '@emotion/styled';\nimport { useCallback, useContext, useEffect, useState } from 'react';\nimport * as React from 'react';\n\nimport {\n PageAlertsContext,\n PageAlertsContextValue,\n} from './PageAlertsProvider';\nimport { PageAlert } from './types';\n\nexport type PageAlertsProps = {\n extra?: PageAlert[];\n};\n\nexport const AlertArea = styled.div`\n display: grid;\n justify-content: center;\n width: 100%;\n padding: 1rem 0rem;\n grid-template-columns: 1fr;\n row-gap: 1rem;\n top: 3.5rem;\n left: 50%;\n z-index: 15;\n position: fixed;\n transform: translate(-50%, 0);\n`;\n\nconst StyledAlert = styled(Alert)`\n max-width: 100%;\n`;\n\nexport const PageAlerts: React.FC<PageAlertsProps> = ({ extra = [] }) => {\n const { alerts, closeAlert, addAlert } =\n useContext<PageAlertsContextValue>(PageAlertsContext);\n\n useEffect(() => {\n extra.forEach(addAlert);\n }, [extra, addAlert]);\n\n const [alertArea, setAlertArea] = useState<HTMLDivElement>();\n const refCallback = useCallback(\n (alertArea: HTMLDivElement) => {\n setAlertArea(alertArea);\n },\n [setAlertArea]\n );\n\n const focusAlertCloseButton = useCallback(() => {\n const refButton = alertArea?.querySelector('button');\n refButton?.focus();\n }, [alertArea]);\n\n // Focus when alertArea is first rendered, as well as when alerts change\n useEffect(() => {\n focusAlertCloseButton();\n }, [alerts, focusAlertCloseButton, alertArea]);\n\n if (!alerts?.length) return null;\n\n return (\n <BodyPortal>\n <AlertArea\n role=\"alert\"\n aria-live=\"assertive\"\n key=\"alerts\"\n ref={refCallback}\n >\n {alerts.map((alert) => (\n <ContentContainer size=\"medium\" key={alert.message}>\n <StyledAlert\n cta={alert.cta}\n onClose={\n alert.permanent\n ? undefined\n : () => {\n closeAlert(alert.message);\n alert?.onClose?.();\n }\n }\n type={alert.type}\n placement=\"floating\"\n >\n {alert.message}\n </StyledAlert>\n </ContentContainer>\n ))}\n </AlertArea>\n </BodyPortal>\n );\n};\n"],"mappings":";;;;;;;;;AAeA,MAAaU,YAAYP,2CAAAA,OAAAA;;;;AAczB,MAAMQ,cAAcR,2CAAOH,yBAAAA;;;;AAI3B,MAAaY,cAAyC,EAAEC,QAAQ,CAAA,QAAI;CAClE,MAAM,EAAEC,QAAQC,YAAYC,mCACSP,4CAAAA;CAErCH,2BAAU;EACRO,MAAMI,QAAQD,QAAAA;CAChB,GAAG,CAACH,OAAOG,SAAS;CAEpB,MAAM,CAACE,WAAWC,oCAAgBZ;CAClC,MAAMa,sCACHF,cAAAA;EACCC,aAAaD,SAAAA;CACf,GACA,CAACC,aAAa;CAGhB,MAAME,qDAAoC;EAExCC,CADkBJ,WAAWK,cAAc,QAAA,EAC3CD,EAAWE,MAAAA;CACb,GAAG,CAACN,UAAU;CAGdZ,2BAAU;EACRe,sBAAAA;CACF,GAAG;EAACP;EAAQO;EAAuBH;EAAU;CAE7C,IAAI,CAACJ,QAAQW,QAAQ,OAAO;CAE5B,OACE,oBAAA,cAACxB,8BAAAA,MACC,oBAAA,cAACS,WAAAA;EACCgB,MAAK;EACLC,aAAU;EACVC,KAAI;EACJC,KAAKT;IAEJN,OAAOgB,KAAKC,UACX,oBAAA,cAAC7B,oCAAAA;EAAiB8B,MAAK;EAASJ,KAAKG,MAAME;IACzC,oBAAA,cAACtB,aAAAA;EACCuB,KAAKH,MAAMG;EACXC,SACEJ,MAAMK,YACFC,eACA;GACEtB,WAAWgB,MAAME,OAAO;GACxBF,OAAOI,UAAAA;EACT;EAENG,MAAMP,MAAMO;EACZC,WAAU;IAETR,MAAME,OAAO,CAAA,CAAA,CAAA,CAAA;AAO5B"}
1
+ {"version":3,"file":"PageAlerts.cjs","names":["Alert","BodyPortal","ContentContainer","styled","useCallback","useContext","useEffect","useState","React","PageAlertsContext","AlertArea","StyledAlert","PageAlerts","extra","alerts","closeAlert","addAlert","forEach","alertArea","setAlertArea","refCallback","focusAlertCloseButton","refButton","querySelector","focus","length","role","aria-live","key","ref","map","alert","size","message","cta","onClose","permanent","undefined","type","placement"],"sources":["../../src/PageAlerts/PageAlerts.tsx"],"sourcesContent":["import { Alert, BodyPortal, ContentContainer } from '@codecademy/gamut';\nimport styled from '@emotion/styled';\nimport { useCallback, useContext, useEffect, useState } from 'react';\nimport * as React from 'react';\n\nimport {\n PageAlertsContext,\n PageAlertsContextValue,\n} from './PageAlertsProvider';\nimport { PageAlert } from './types';\n\nexport type PageAlertsProps = {\n extra?: PageAlert[];\n};\n\nexport const AlertArea = styled.div`\n display: grid;\n justify-content: center;\n width: 100%;\n padding: 1rem 0rem;\n grid-template-columns: 1fr;\n row-gap: 1rem;\n top: 3.5rem;\n left: 50%;\n z-index: 15;\n position: fixed;\n transform: translate(-50%, 0);\n`;\n\nconst StyledAlert = styled(Alert)`\n max-width: 100%;\n`;\n\nexport const PageAlerts: React.FC<PageAlertsProps> = ({ extra = [] }) => {\n const { alerts, closeAlert, addAlert } =\n useContext<PageAlertsContextValue>(PageAlertsContext);\n\n useEffect(() => {\n extra.forEach(addAlert);\n }, [extra, addAlert]);\n\n const [alertArea, setAlertArea] = useState<HTMLDivElement>();\n const refCallback = useCallback(\n (alertArea: HTMLDivElement) => {\n setAlertArea(alertArea);\n },\n [setAlertArea]\n );\n\n const focusAlertCloseButton = useCallback(() => {\n const refButton = alertArea?.querySelector('button');\n refButton?.focus();\n }, [alertArea]);\n\n // Focus when alertArea is first rendered, as well as when alerts change\n useEffect(() => {\n focusAlertCloseButton();\n }, [alerts, focusAlertCloseButton, alertArea]);\n\n if (!alerts?.length) return null;\n\n return (\n <BodyPortal>\n <AlertArea\n role=\"alert\"\n aria-live=\"assertive\"\n key=\"alerts\"\n ref={refCallback}\n >\n {alerts.map((alert) => (\n <ContentContainer size=\"medium\" key={alert.message}>\n <StyledAlert\n cta={alert.cta}\n onClose={\n alert.permanent\n ? undefined\n : () => {\n closeAlert(alert.message);\n alert?.onClose?.();\n }\n }\n type={alert.type}\n placement=\"floating\"\n >\n {alert.message}\n </StyledAlert>\n </ContentContainer>\n ))}\n </AlertArea>\n </BodyPortal>\n );\n};\n"],"mappings":";;;;;;;;;AAeA,MAAaU,YAAYP,2CAAAA,OAAAA;;;AAYvB,CAAA,CAAA,CAAA,sLAAA,ygHAAA;AAEF,MAAMQ,cAAcR,2CAAOH,yBAAAA;;;;AAI3B,MAAaY,cAAyC,EAAEC,QAAQ,CAAA,QAAI;CAClE,MAAM,EAAEC,QAAQC,YAAYC,mCACSP,4CAAAA;CAErCH,2BAAU;EACRO,MAAMI,QAAQD,QAAAA;CAChB,GAAG,CAACH,OAAOG,QAAS,CAAA;CAEpB,MAAM,CAACE,WAAWC,oCAAgBZ;CAClC,MAAMa,sCACHF,cAAAA;EACCC,aAAaD,SAAAA;CACf,GACA,CAACC,YAAa,CAAA;CAGhB,MAAME,qDAAoC;EAExCC,CADkBJ,WAAWK,cAAc,QAAA,EAC3CD,EAAWE,MAAAA;CACb,GAAG,CAACN,SAAU,CAAA;CAGdZ,2BAAU;EACRe,sBAAAA;CACF,GAAG;EAACP;EAAQO;EAAuBH;CAAU,CAAA;CAE7C,IAAI,CAACJ,QAAQW,QAAQ,OAAO;CAE5B,OACE,oBAAA,cAACxB,8BAAAA,MACC,oBAAA,cAACS,WAAAA;EACCgB,MAAK;EACLC,aAAU;EACVC,KAAI;EACJC,KAAKT;CAEJN,GAAAA,OAAOgB,KAAKC,UACX,oBAAA,cAAC7B,oCAAAA;EAAiB8B,MAAK;EAASJ,KAAKG,MAAME;CACzC,GAAA,oBAAA,cAACtB,aAAAA;EACCuB,KAAKH,MAAMG;EACXC,SACEJ,MAAMK,YACFC,eACA;GACEtB,WAAWgB,MAAME,OAAO;GACxBF,OAAOI,UAAAA;EACT;EAENG,MAAMP,MAAMO;EACZC,WAAU;CAETR,GAAAA,MAAME,OAAO,CAAA,CAAA,CAAA,CAAA;AAO5B"}
@@ -1,6 +1,5 @@
1
1
  import { PageAlert } from "./types.cjs";
2
2
  import * as React$1 from "react";
3
-
4
3
  //#region src/PageAlerts/PageAlerts.d.ts
5
4
  type PageAlertsProps = {
6
5
  extra?: PageAlert[];
@@ -1 +1 @@
1
- {"version":3,"file":"PageAlerts.d.cts","names":[],"sources":["../../src/PageAlerts/PageAlerts.tsx"],"mappings":";;;;KAWY,eAAA;EACV,KAAA,GAAQ,SAAS;AAAA;AAAA,cAGN,SAAA,4BAAS,eAAA;;;;cAkBT,UAAA,EAAY,OAAA,CAAM,EAAE,CAAC,eAAA"}
1
+ {"version":3,"file":"PageAlerts.d.cts","names":[],"sources":["../../src/PageAlerts/PageAlerts.tsx"],"mappings":";;;KAWY;EACV,QAAQ;;cAGG,qCAAS;;;GAYrB,QAAA,kBAAA,QAAA,eAAA,iBAAA;cAMY,YAAY,QAAM,GAAG"}
@@ -1,6 +1,5 @@
1
1
  import { PageAlert } from "./types.js";
2
2
  import * as React$1 from "react";
3
-
4
3
  //#region src/PageAlerts/PageAlerts.d.ts
5
4
  type PageAlertsProps = {
6
5
  extra?: PageAlert[];
@@ -1 +1 @@
1
- {"version":3,"file":"PageAlerts.d.ts","names":[],"sources":["../../src/PageAlerts/PageAlerts.tsx"],"mappings":";;;;KAWY,eAAA;EACV,KAAA,GAAQ,SAAA;AAAA;AAAA,cAGG,SAAA,4BAAS,eAAA;;;;cAkBT,UAAA,EAAY,OAAA,CAAM,EAAA,CAAG,eAAA"}
1
+ {"version":3,"file":"PageAlerts.d.ts","names":[],"sources":["../../src/PageAlerts/PageAlerts.tsx"],"mappings":";;;KAWY;EACV,QAAQ;;cAGG,qCAAS;;;GAYrB,QAAA,kBAAA,QAAA,eAAA,iBAAA;cAMY,YAAY,QAAM,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"file":"PageAlerts.js","names":["Alert","BodyPortal","ContentContainer","styled","useCallback","useContext","useEffect","useState","React","PageAlertsContext","AlertArea","StyledAlert","PageAlerts","extra","alerts","closeAlert","addAlert","forEach","alertArea","setAlertArea","refCallback","focusAlertCloseButton","refButton","querySelector","focus","length","role","aria-live","key","ref","map","alert","size","message","cta","onClose","permanent","undefined","type","placement"],"sources":["../../src/PageAlerts/PageAlerts.tsx"],"sourcesContent":["import { Alert, BodyPortal, ContentContainer } from '@codecademy/gamut';\nimport styled from '@emotion/styled';\nimport { useCallback, useContext, useEffect, useState } from 'react';\nimport * as React from 'react';\n\nimport {\n PageAlertsContext,\n PageAlertsContextValue,\n} from './PageAlertsProvider';\nimport { PageAlert } from './types';\n\nexport type PageAlertsProps = {\n extra?: PageAlert[];\n};\n\nexport const AlertArea = styled.div`\n display: grid;\n justify-content: center;\n width: 100%;\n padding: 1rem 0rem;\n grid-template-columns: 1fr;\n row-gap: 1rem;\n top: 3.5rem;\n left: 50%;\n z-index: 15;\n position: fixed;\n transform: translate(-50%, 0);\n`;\n\nconst StyledAlert = styled(Alert)`\n max-width: 100%;\n`;\n\nexport const PageAlerts: React.FC<PageAlertsProps> = ({ extra = [] }) => {\n const { alerts, closeAlert, addAlert } =\n useContext<PageAlertsContextValue>(PageAlertsContext);\n\n useEffect(() => {\n extra.forEach(addAlert);\n }, [extra, addAlert]);\n\n const [alertArea, setAlertArea] = useState<HTMLDivElement>();\n const refCallback = useCallback(\n (alertArea: HTMLDivElement) => {\n setAlertArea(alertArea);\n },\n [setAlertArea]\n );\n\n const focusAlertCloseButton = useCallback(() => {\n const refButton = alertArea?.querySelector('button');\n refButton?.focus();\n }, [alertArea]);\n\n // Focus when alertArea is first rendered, as well as when alerts change\n useEffect(() => {\n focusAlertCloseButton();\n }, [alerts, focusAlertCloseButton, alertArea]);\n\n if (!alerts?.length) return null;\n\n return (\n <BodyPortal>\n <AlertArea\n role=\"alert\"\n aria-live=\"assertive\"\n key=\"alerts\"\n ref={refCallback}\n >\n {alerts.map((alert) => (\n <ContentContainer size=\"medium\" key={alert.message}>\n <StyledAlert\n cta={alert.cta}\n onClose={\n alert.permanent\n ? undefined\n : () => {\n closeAlert(alert.message);\n alert?.onClose?.();\n }\n }\n type={alert.type}\n placement=\"floating\"\n >\n {alert.message}\n </StyledAlert>\n </ContentContainer>\n ))}\n </AlertArea>\n </BodyPortal>\n );\n};\n"],"mappings":";;;;;;;AAeA,MAAaU,YAAYP,qBAAAA,OAAAA;;;;AAczB,MAAMQ,cAAcR,qBAAOH,OAAAA;;;;AAI3B,MAAaY,cAAyC,EAAEC,QAAQ,CAAA,QAAI;CAClE,MAAM,EAAEC,QAAQC,YAAYC,aAC1BX,WAAmCI,iBAAAA;CAErCH,gBAAU;EACRO,MAAMI,QAAQD,QAAAA;CAChB,GAAG,CAACH,OAAOG,SAAS;CAEpB,MAAM,CAACE,WAAWC,gBAAgBZ,SAAAA;CAClC,MAAMa,cAAchB,aACjBc,cAAAA;EACCC,aAAaD,SAAAA;CACf,GACA,CAACC,aAAa;CAGhB,MAAME,wBAAwBjB,kBAAY;EAExCkB,CADkBJ,WAAWK,cAAc,QAAA,EAC3CD,EAAWE,MAAAA;CACb,GAAG,CAACN,UAAU;CAGdZ,gBAAU;EACRe,sBAAAA;CACF,GAAG;EAACP;EAAQO;EAAuBH;EAAU;CAE7C,IAAI,CAACJ,QAAQW,QAAQ,OAAO;CAE5B,OACE,sBAAA,cAACxB,YAAAA,MACC,sBAAA,cAACS,WAAAA;EACCgB,MAAK;EACLC,aAAU;EACVC,KAAI;EACJC,KAAKT;IAEJN,OAAOgB,KAAKC,UACX,sBAAA,cAAC7B,kBAAAA;EAAiB8B,MAAK;EAASJ,KAAKG,MAAME;IACzC,sBAAA,cAACtB,aAAAA;EACCuB,KAAKH,MAAMG;EACXC,SACEJ,MAAMK,YACFC,eACA;GACEtB,WAAWgB,MAAME,OAAO;GACxBF,OAAOI,UAAAA;EACT;EAENG,MAAMP,MAAMO;EACZC,WAAU;IAETR,MAAME,OAAO,CAAA,CAAA,CAAA,CAAA;AAO5B"}
1
+ {"version":3,"file":"PageAlerts.js","names":["Alert","BodyPortal","ContentContainer","styled","useCallback","useContext","useEffect","useState","React","PageAlertsContext","AlertArea","StyledAlert","PageAlerts","extra","alerts","closeAlert","addAlert","forEach","alertArea","setAlertArea","refCallback","focusAlertCloseButton","refButton","querySelector","focus","length","role","aria-live","key","ref","map","alert","size","message","cta","onClose","permanent","undefined","type","placement"],"sources":["../../src/PageAlerts/PageAlerts.tsx"],"sourcesContent":["import { Alert, BodyPortal, ContentContainer } from '@codecademy/gamut';\nimport styled from '@emotion/styled';\nimport { useCallback, useContext, useEffect, useState } from 'react';\nimport * as React from 'react';\n\nimport {\n PageAlertsContext,\n PageAlertsContextValue,\n} from './PageAlertsProvider';\nimport { PageAlert } from './types';\n\nexport type PageAlertsProps = {\n extra?: PageAlert[];\n};\n\nexport const AlertArea = styled.div`\n display: grid;\n justify-content: center;\n width: 100%;\n padding: 1rem 0rem;\n grid-template-columns: 1fr;\n row-gap: 1rem;\n top: 3.5rem;\n left: 50%;\n z-index: 15;\n position: fixed;\n transform: translate(-50%, 0);\n`;\n\nconst StyledAlert = styled(Alert)`\n max-width: 100%;\n`;\n\nexport const PageAlerts: React.FC<PageAlertsProps> = ({ extra = [] }) => {\n const { alerts, closeAlert, addAlert } =\n useContext<PageAlertsContextValue>(PageAlertsContext);\n\n useEffect(() => {\n extra.forEach(addAlert);\n }, [extra, addAlert]);\n\n const [alertArea, setAlertArea] = useState<HTMLDivElement>();\n const refCallback = useCallback(\n (alertArea: HTMLDivElement) => {\n setAlertArea(alertArea);\n },\n [setAlertArea]\n );\n\n const focusAlertCloseButton = useCallback(() => {\n const refButton = alertArea?.querySelector('button');\n refButton?.focus();\n }, [alertArea]);\n\n // Focus when alertArea is first rendered, as well as when alerts change\n useEffect(() => {\n focusAlertCloseButton();\n }, [alerts, focusAlertCloseButton, alertArea]);\n\n if (!alerts?.length) return null;\n\n return (\n <BodyPortal>\n <AlertArea\n role=\"alert\"\n aria-live=\"assertive\"\n key=\"alerts\"\n ref={refCallback}\n >\n {alerts.map((alert) => (\n <ContentContainer size=\"medium\" key={alert.message}>\n <StyledAlert\n cta={alert.cta}\n onClose={\n alert.permanent\n ? undefined\n : () => {\n closeAlert(alert.message);\n alert?.onClose?.();\n }\n }\n type={alert.type}\n placement=\"floating\"\n >\n {alert.message}\n </StyledAlert>\n </ContentContainer>\n ))}\n </AlertArea>\n </BodyPortal>\n );\n};\n"],"mappings":";;;;;;;AAeA,MAAaU,YAAYP,qBAAAA,OAAAA;;;AAYvB,CAAA,CAAA,CAAA,sLAAA,ygHAAA;AAEF,MAAMQ,cAAcR,qBAAOH,OAAAA;;;;AAI3B,MAAaY,cAAyC,EAAEC,QAAQ,CAAA,QAAI;CAClE,MAAM,EAAEC,QAAQC,YAAYC,aAC1BX,WAAmCI,iBAAAA;CAErCH,gBAAU;EACRO,MAAMI,QAAQD,QAAAA;CAChB,GAAG,CAACH,OAAOG,QAAS,CAAA;CAEpB,MAAM,CAACE,WAAWC,gBAAgBZ,SAAAA;CAClC,MAAMa,cAAchB,aACjBc,cAAAA;EACCC,aAAaD,SAAAA;CACf,GACA,CAACC,YAAa,CAAA;CAGhB,MAAME,wBAAwBjB,kBAAY;EAExCkB,CADkBJ,WAAWK,cAAc,QAAA,EAC3CD,EAAWE,MAAAA;CACb,GAAG,CAACN,SAAU,CAAA;CAGdZ,gBAAU;EACRe,sBAAAA;CACF,GAAG;EAACP;EAAQO;EAAuBH;CAAU,CAAA;CAE7C,IAAI,CAACJ,QAAQW,QAAQ,OAAO;CAE5B,OACE,sBAAA,cAACxB,YAAAA,MACC,sBAAA,cAACS,WAAAA;EACCgB,MAAK;EACLC,aAAU;EACVC,KAAI;EACJC,KAAKT;CAEJN,GAAAA,OAAOgB,KAAKC,UACX,sBAAA,cAAC7B,kBAAAA;EAAiB8B,MAAK;EAASJ,KAAKG,MAAME;CACzC,GAAA,sBAAA,cAACtB,aAAAA;EACCuB,KAAKH,MAAMG;EACXC,SACEJ,MAAMK,YACFC,eACA;GACEtB,WAAWgB,MAAME,OAAO;GACxBF,OAAOI,UAAAA;EACT;EAENG,MAAMP,MAAMO;EACZC,WAAU;CAETR,GAAAA,MAAME,OAAO,CAAA,CAAA,CAAA,CAAA;AAO5B"}
@@ -1 +1 @@
1
- {"version":3,"file":"PageAlertsProvider.cjs","names":["noop","useCallback","useContext","useState","React","usePageAlertsContext","PageAlertsContext","createContext","alerts","addAlert","closeAlert","PageAlertsProvider","children","setAlerts","newAlert","existingAlerts","some","alert","message","filter","Provider","value"],"sources":["../../src/PageAlerts/PageAlertsProvider.tsx"],"sourcesContent":["import { WithChildrenProp } from '@codecademy/gamut';\nimport noop from 'lodash/fp/noop';\nimport { useCallback, useContext, useState } from 'react';\nimport * as React from 'react';\n\nimport { PageAlert } from './types';\n\nexport const usePageAlertsContext = () => useContext(PageAlertsContext);\n\nexport type PageAlertsContextValue = {\n alerts: PageAlert[];\n addAlert: (alert: PageAlert) => void;\n closeAlert: (alertMessage: string) => void;\n};\n\nexport const PageAlertsContext = React.createContext<PageAlertsContextValue>({\n alerts: [],\n addAlert: noop,\n closeAlert: noop,\n});\n\nexport const PageAlertsProvider: React.FC<WithChildrenProp> = ({\n children,\n}) => {\n const [alerts, setAlerts] = useState<PageAlert[]>([]);\n\n const addAlert = useCallback((newAlert: PageAlert) => {\n setAlerts((existingAlerts) => {\n if (!existingAlerts.some((alert) => alert.message === newAlert.message))\n return [...existingAlerts, newAlert];\n\n return existingAlerts;\n });\n }, []);\n\n const closeAlert = useCallback((message: string) => {\n setAlerts((existingAlerts) => {\n return existingAlerts.filter((alert) => alert.message !== message);\n });\n }, []);\n\n return (\n <PageAlertsContext.Provider value={{ alerts, addAlert, closeAlert }}>\n {children}\n </PageAlertsContext.Provider>\n );\n};\n"],"mappings":";;;;;;;AAOA,MAAaK,mDAAwCC,iBAAAA;AAQrD,MAAaA,oBAAoBF,oBAAMG,cAAsC;CAC3EC,QAAQ,CAAA;CACRC,UAAUT;CACVU,YAAYV;AACd,CAAA;AAEA,MAAaW,sBAAkD,EAC7DC,eACD;CACC,MAAM,CAACJ,QAAQK,iCAAmC,CAAA,CAAE;CAEpD,MAAMJ,mCAAwBK,aAAAA;EAC5BD,WAAWE,mBAAAA;GACT,IAAI,CAACA,eAAeC,MAAMC,UAAUA,MAAMC,YAAYJ,SAASI,OAAO,GACpE,OAAO,IAAIH,gBAAgBD;GAE7B,OAAOC;EACT,CAAA;CACF,GAAG,CAAA,CAAE;CAEL,MAAML,qCAA0BQ,YAAAA;EAC9BL,WAAWE,mBAAAA;GACT,OAAOA,eAAeI,QAAQF,UAAUA,MAAMC,YAAYA,OAAAA;EAC5D,CAAA;CACF,GAAG,CAAA,CAAE;CAEL,OACE,oBAAA,cAACZ,kBAAkBc,UAAQ,EAACC,OAAO;EAAEb;EAAQC;EAAUC;CAAW,KAC/DE,QAAAA;AAGP"}
1
+ {"version":3,"file":"PageAlertsProvider.cjs","names":["noop","useCallback","useContext","useState","React","usePageAlertsContext","PageAlertsContext","createContext","alerts","addAlert","closeAlert","PageAlertsProvider","children","setAlerts","newAlert","existingAlerts","some","alert","message","filter","Provider","value"],"sources":["../../src/PageAlerts/PageAlertsProvider.tsx"],"sourcesContent":["import { WithChildrenProp } from '@codecademy/gamut';\nimport noop from 'lodash/fp/noop';\nimport { useCallback, useContext, useState } from 'react';\nimport * as React from 'react';\n\nimport { PageAlert } from './types';\n\nexport const usePageAlertsContext = () => useContext(PageAlertsContext);\n\nexport type PageAlertsContextValue = {\n alerts: PageAlert[];\n addAlert: (alert: PageAlert) => void;\n closeAlert: (alertMessage: string) => void;\n};\n\nexport const PageAlertsContext = React.createContext<PageAlertsContextValue>({\n alerts: [],\n addAlert: noop,\n closeAlert: noop,\n});\n\nexport const PageAlertsProvider: React.FC<WithChildrenProp> = ({\n children,\n}) => {\n const [alerts, setAlerts] = useState<PageAlert[]>([]);\n\n const addAlert = useCallback((newAlert: PageAlert) => {\n setAlerts((existingAlerts) => {\n if (!existingAlerts.some((alert) => alert.message === newAlert.message))\n return [...existingAlerts, newAlert];\n\n return existingAlerts;\n });\n }, []);\n\n const closeAlert = useCallback((message: string) => {\n setAlerts((existingAlerts) => {\n return existingAlerts.filter((alert) => alert.message !== message);\n });\n }, []);\n\n return (\n <PageAlertsContext.Provider value={{ alerts, addAlert, closeAlert }}>\n {children}\n </PageAlertsContext.Provider>\n );\n};\n"],"mappings":";;;;;;;AAOA,MAAaK,mDAAwCC,iBAAAA;AAQrD,MAAaA,oBAAoBF,oBAAMG,cAAsC;CAC3EC,QAAQ,CAAA;CACRC,UAAUT;CACVU,YAAYV;AACd,CAAA;AAEA,MAAaW,sBAAkD,EAC7DC,eACD;CACC,MAAM,CAACJ,QAAQK,iCAAmC,CAAA,CAAE;CAEpD,MAAMJ,mCAAwBK,aAAAA;EAC5BD,WAAWE,mBAAAA;GACT,IAAI,CAACA,eAAeC,MAAMC,UAAUA,MAAMC,YAAYJ,SAASI,OAAO,GACpE,OAAO,CAAIH,GAAAA,gBAAgBD,QAAS;GAEtC,OAAOC;EACT,CAAA;CACF,GAAG,CAAA,CAAE;CAEL,MAAML,qCAA0BQ,YAAAA;EAC9BL,WAAWE,mBAAAA;GACT,OAAOA,eAAeI,QAAQF,UAAUA,MAAMC,YAAYA,OAAAA;EAC5D,CAAA;CACF,GAAG,CAAA,CAAE;CAEL,OACE,oBAAA,cAACZ,kBAAkBc,UAAQ,EAACC,OAAO;EAAEb;EAAQC;EAAUC;CAAW,EAC/DE,GAAAA,QAAAA;AAGP"}
@@ -1,7 +1,6 @@
1
1
  import { PageAlert } from "./types.cjs";
2
2
  import { WithChildrenProp } from "@codecademy/gamut";
3
3
  import * as React$1 from "react";
4
-
5
4
  //#region src/PageAlerts/PageAlertsProvider.d.ts
6
5
  declare const usePageAlertsContext: () => PageAlertsContextValue;
7
6
  type PageAlertsContextValue = {
@@ -1 +1 @@
1
- {"version":3,"file":"PageAlertsProvider.d.cts","names":[],"sources":["../../src/PageAlerts/PageAlertsProvider.tsx"],"mappings":";;;;;cAOa,oBAAA,QAAoB,sBAAsC;AAAA,KAE3D,sBAAA;EACV,MAAA,EAAQ,SAAA;EACR,QAAA,GAAW,KAAA,EAAO,SAAS;EAC3B,UAAA,GAAa,YAAA;AAAA;AAAA,cAGF,iBAAA,EAAiB,OAAA,CAAA,OAAA,CAAA,sBAAA;AAAA,cAMjB,kBAAA,EAAoB,OAAA,CAAM,EAAE,CAAC,gBAAA"}
1
+ {"version":3,"file":"PageAlertsProvider.d.cts","names":[],"sources":["../../src/PageAlerts/PageAlertsProvider.tsx"],"mappings":";;;;cAOa,4BAAoB;KAErB;EACV,QAAQ;EACR,WAAW,OAAO;EAClB,aAAa;;cAGF,mBAAiB,QAAA,QAAA;cAMjB,oBAAoB,QAAM,GAAG"}
@@ -1,7 +1,6 @@
1
1
  import { PageAlert } from "./types.js";
2
2
  import { WithChildrenProp } from "@codecademy/gamut";
3
3
  import * as React$1 from "react";
4
-
5
4
  //#region src/PageAlerts/PageAlertsProvider.d.ts
6
5
  declare const usePageAlertsContext: () => PageAlertsContextValue;
7
6
  type PageAlertsContextValue = {
@@ -1 +1 @@
1
- {"version":3,"file":"PageAlertsProvider.d.ts","names":[],"sources":["../../src/PageAlerts/PageAlertsProvider.tsx"],"mappings":";;;;;cAOa,oBAAA,QAAoB,sBAAA;AAAA,KAErB,sBAAA;EACV,MAAA,EAAQ,SAAA;EACR,QAAA,GAAW,KAAA,EAAO,SAAA;EAClB,UAAA,GAAa,YAAA;AAAA;AAAA,cAGF,iBAAA,EAAiB,OAAA,CAAA,OAAA,CAAA,sBAAA;AAAA,cAMjB,kBAAA,EAAoB,OAAA,CAAM,EAAA,CAAG,gBAAA"}
1
+ {"version":3,"file":"PageAlertsProvider.d.ts","names":[],"sources":["../../src/PageAlerts/PageAlertsProvider.tsx"],"mappings":";;;;cAOa,4BAAoB;KAErB;EACV,QAAQ;EACR,WAAW,OAAO;EAClB,aAAa;;cAGF,mBAAiB,QAAA,QAAA;cAMjB,oBAAoB,QAAM,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"file":"PageAlertsProvider.js","names":["noop","useCallback","useContext","useState","React","usePageAlertsContext","PageAlertsContext","createContext","alerts","addAlert","closeAlert","PageAlertsProvider","children","setAlerts","newAlert","existingAlerts","some","alert","message","filter","Provider","value"],"sources":["../../src/PageAlerts/PageAlertsProvider.tsx"],"sourcesContent":["import { WithChildrenProp } from '@codecademy/gamut';\nimport noop from 'lodash/fp/noop';\nimport { useCallback, useContext, useState } from 'react';\nimport * as React from 'react';\n\nimport { PageAlert } from './types';\n\nexport const usePageAlertsContext = () => useContext(PageAlertsContext);\n\nexport type PageAlertsContextValue = {\n alerts: PageAlert[];\n addAlert: (alert: PageAlert) => void;\n closeAlert: (alertMessage: string) => void;\n};\n\nexport const PageAlertsContext = React.createContext<PageAlertsContextValue>({\n alerts: [],\n addAlert: noop,\n closeAlert: noop,\n});\n\nexport const PageAlertsProvider: React.FC<WithChildrenProp> = ({\n children,\n}) => {\n const [alerts, setAlerts] = useState<PageAlert[]>([]);\n\n const addAlert = useCallback((newAlert: PageAlert) => {\n setAlerts((existingAlerts) => {\n if (!existingAlerts.some((alert) => alert.message === newAlert.message))\n return [...existingAlerts, newAlert];\n\n return existingAlerts;\n });\n }, []);\n\n const closeAlert = useCallback((message: string) => {\n setAlerts((existingAlerts) => {\n return existingAlerts.filter((alert) => alert.message !== message);\n });\n }, []);\n\n return (\n <PageAlertsContext.Provider value={{ alerts, addAlert, closeAlert }}>\n {children}\n </PageAlertsContext.Provider>\n );\n};\n"],"mappings":";;;;;AAOA,MAAaK,6BAA6BH,WAAWI,iBAAAA;AAQrD,MAAaA,oBAAoBF,sBAAMG,cAAsC;CAC3EC,QAAQ,CAAA;CACRC,UAAUT;CACVU,YAAYV;AACd,CAAA;AAEA,MAAaW,sBAAkD,EAC7DC,eACD;CACC,MAAM,CAACJ,QAAQK,aAAaV,SAAsB,CAAA,CAAE;CAEpD,MAAMM,WAAWR,aAAaa,aAAAA;EAC5BD,WAAWE,mBAAAA;GACT,IAAI,CAACA,eAAeC,MAAMC,UAAUA,MAAMC,YAAYJ,SAASI,OAAO,GACpE,OAAO,IAAIH,gBAAgBD;GAE7B,OAAOC;EACT,CAAA;CACF,GAAG,CAAA,CAAE;CAEL,MAAML,aAAaT,aAAaiB,YAAAA;EAC9BL,WAAWE,mBAAAA;GACT,OAAOA,eAAeI,QAAQF,UAAUA,MAAMC,YAAYA,OAAAA;EAC5D,CAAA;CACF,GAAG,CAAA,CAAE;CAEL,OACE,sBAAA,cAACZ,kBAAkBc,UAAQ,EAACC,OAAO;EAAEb;EAAQC;EAAUC;CAAW,KAC/DE,QAAAA;AAGP"}
1
+ {"version":3,"file":"PageAlertsProvider.js","names":["noop","useCallback","useContext","useState","React","usePageAlertsContext","PageAlertsContext","createContext","alerts","addAlert","closeAlert","PageAlertsProvider","children","setAlerts","newAlert","existingAlerts","some","alert","message","filter","Provider","value"],"sources":["../../src/PageAlerts/PageAlertsProvider.tsx"],"sourcesContent":["import { WithChildrenProp } from '@codecademy/gamut';\nimport noop from 'lodash/fp/noop';\nimport { useCallback, useContext, useState } from 'react';\nimport * as React from 'react';\n\nimport { PageAlert } from './types';\n\nexport const usePageAlertsContext = () => useContext(PageAlertsContext);\n\nexport type PageAlertsContextValue = {\n alerts: PageAlert[];\n addAlert: (alert: PageAlert) => void;\n closeAlert: (alertMessage: string) => void;\n};\n\nexport const PageAlertsContext = React.createContext<PageAlertsContextValue>({\n alerts: [],\n addAlert: noop,\n closeAlert: noop,\n});\n\nexport const PageAlertsProvider: React.FC<WithChildrenProp> = ({\n children,\n}) => {\n const [alerts, setAlerts] = useState<PageAlert[]>([]);\n\n const addAlert = useCallback((newAlert: PageAlert) => {\n setAlerts((existingAlerts) => {\n if (!existingAlerts.some((alert) => alert.message === newAlert.message))\n return [...existingAlerts, newAlert];\n\n return existingAlerts;\n });\n }, []);\n\n const closeAlert = useCallback((message: string) => {\n setAlerts((existingAlerts) => {\n return existingAlerts.filter((alert) => alert.message !== message);\n });\n }, []);\n\n return (\n <PageAlertsContext.Provider value={{ alerts, addAlert, closeAlert }}>\n {children}\n </PageAlertsContext.Provider>\n );\n};\n"],"mappings":";;;;;AAOA,MAAaK,6BAA6BH,WAAWI,iBAAAA;AAQrD,MAAaA,oBAAoBF,sBAAMG,cAAsC;CAC3EC,QAAQ,CAAA;CACRC,UAAUT;CACVU,YAAYV;AACd,CAAA;AAEA,MAAaW,sBAAkD,EAC7DC,eACD;CACC,MAAM,CAACJ,QAAQK,aAAaV,SAAsB,CAAA,CAAE;CAEpD,MAAMM,WAAWR,aAAaa,aAAAA;EAC5BD,WAAWE,mBAAAA;GACT,IAAI,CAACA,eAAeC,MAAMC,UAAUA,MAAMC,YAAYJ,SAASI,OAAO,GACpE,OAAO,CAAIH,GAAAA,gBAAgBD,QAAS;GAEtC,OAAOC;EACT,CAAA;CACF,GAAG,CAAA,CAAE;CAEL,MAAML,aAAaT,aAAaiB,YAAAA;EAC9BL,WAAWE,mBAAAA;GACT,OAAOA,eAAeI,QAAQF,UAAUA,MAAMC,YAAYA,OAAAA;EAC5D,CAAA;CACF,GAAG,CAAA,CAAE;CAEL,OACE,sBAAA,cAACZ,kBAAkBc,UAAQ,EAACC,OAAO;EAAEb;EAAQC;EAAUC;CAAW,EAC/DE,GAAAA,QAAAA;AAGP"}
@@ -1,2 +1,8 @@
1
1
  const require_PageAlertsProvider = require('./PageAlertsProvider.cjs');
2
2
  const require_PageAlerts = require('./PageAlerts.cjs');
3
+
4
+ exports.AlertArea = require_PageAlerts.AlertArea;
5
+ exports.PageAlerts = require_PageAlerts.PageAlerts;
6
+ exports.PageAlertsContext = require_PageAlertsProvider.PageAlertsContext;
7
+ exports.PageAlertsProvider = require_PageAlertsProvider.PageAlertsProvider;
8
+ exports.usePageAlertsContext = require_PageAlertsProvider.usePageAlertsContext;
@@ -1,3 +1,4 @@
1
1
  import { PageAlert } from "./types.cjs";
2
2
  import { AlertArea, PageAlerts, PageAlertsProps } from "./PageAlerts.cjs";
3
- import { PageAlertsContext, PageAlertsContextValue, PageAlertsProvider, usePageAlertsContext } from "./PageAlertsProvider.cjs";
3
+ import { PageAlertsContext, PageAlertsContextValue, PageAlertsProvider, usePageAlertsContext } from "./PageAlertsProvider.cjs";
4
+ export { AlertArea, PageAlert, PageAlerts, PageAlertsContext, PageAlertsContextValue, PageAlertsProps, PageAlertsProvider, usePageAlertsContext };
@@ -1,3 +1,4 @@
1
1
  import { PageAlert } from "./types.js";
2
2
  import { AlertArea, PageAlerts, PageAlertsProps } from "./PageAlerts.js";
3
- import { PageAlertsContext, PageAlertsContextValue, PageAlertsProvider, usePageAlertsContext } from "./PageAlertsProvider.js";
3
+ import { PageAlertsContext, PageAlertsContextValue, PageAlertsProvider, usePageAlertsContext } from "./PageAlertsProvider.js";
4
+ export { AlertArea, PageAlert, PageAlerts, PageAlertsContext, PageAlertsContextValue, PageAlertsProps, PageAlertsProvider, usePageAlertsContext };