@pnx-mixtape/mxds 0.1.0-rc.1 → 0.1.0-rc.3

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 (344) hide show
  1. package/.storybook/decorators.ts +15 -0
  2. package/.storybook/{preview.ts → preview.tsx} +8 -1
  3. package/.storybook/src/docs.tsx +29 -0
  4. package/.storybook/themes/campus-vibrant.css +181 -0
  5. package/.storybook/themes/civic-formal.css +246 -0
  6. package/.storybook/{theme-demo.css → themes/demo.css} +14 -7
  7. package/.storybook/themes/health-services.css +255 -0
  8. package/.storybook/themes/research-faculty.css +169 -0
  9. package/dist/build/accordion.css +1 -1
  10. package/dist/build/accordion.entry.js +1 -1
  11. package/dist/build/autocomplete.css +1 -1
  12. package/dist/build/autocomplete.entry.js +1 -1
  13. package/dist/build/base.css +1 -1
  14. package/dist/build/breadcrumb.css +1 -1
  15. package/dist/build/button.css +1 -1
  16. package/dist/build/card.css +1 -1
  17. package/dist/build/chunks/{Accordion-z-dH6nFH.js → Accordion-GN0sME4W.js} +1 -1
  18. package/dist/build/chunks/{AccordionMobile-BYPPNyf5.js → AccordionMobile-DG5jSe8Q.js} +1 -1
  19. package/dist/build/chunks/{Autocomplete-2L6tLLuh.js → Autocomplete-B4RtkAyh.js} +1 -1
  20. package/dist/build/chunks/{ClosableAlert-DdXbF1J2.js → ClosableAlert-DEhj8Nxm.js} +1 -1
  21. package/dist/build/chunks/{Dialog-Ds8gzhri.js → Dialog-Haahn-Yn.js} +1 -1
  22. package/dist/build/chunks/DropMenu-1baQc8Yc.js +1 -0
  23. package/dist/build/chunks/Gallery-D8NGXy2Q.js +1 -0
  24. package/dist/build/chunks/GlobalToggle-B52fdBQu.js +1 -0
  25. package/dist/build/chunks/InPageNavigation-Dyn2TR-N.js +1 -0
  26. package/dist/build/chunks/Navigation-hOrfLq7h.js +1 -0
  27. package/dist/build/chunks/Popover-Cxg-s5Jn.js +1 -0
  28. package/dist/build/chunks/Sticky-BGCuuEJK.js +1 -0
  29. package/dist/build/chunks/Tabs-DYy1YTdU.js +15 -0
  30. package/dist/build/chunks/enums-DLV_1NAf.js +1 -0
  31. package/dist/build/chunks/polyfills-C7pRt54M.js +1 -0
  32. package/dist/build/chunks/utilities-_Bq3TxAQ.js +1 -0
  33. package/dist/build/constants.css +1 -1
  34. package/dist/build/cookie-consent.css +1 -1
  35. package/dist/build/dialog.entry.js +1 -1
  36. package/dist/build/drop-menu.entry.js +1 -1
  37. package/dist/build/elements.js +1 -1
  38. package/dist/build/filters.css +1 -1
  39. package/dist/build/filters.entry.js +1 -1
  40. package/dist/build/form.css +1 -1
  41. package/dist/build/gallery.entry.js +1 -1
  42. package/dist/build/global-alert.entry.js +1 -1
  43. package/dist/build/grid.css +1 -1
  44. package/dist/build/header.entry.js +1 -1
  45. package/dist/build/icon.css +1 -1
  46. package/dist/build/in-page-alert.css +1 -1
  47. package/dist/build/in-page-navigation.entry.js +1 -1
  48. package/dist/build/list-item.css +1 -1
  49. package/dist/build/navigation.css +1 -1
  50. package/dist/build/navigation.entry.js +1 -1
  51. package/dist/build/one-time-code.css +1 -0
  52. package/dist/build/popover.css +1 -1
  53. package/dist/build/popover.entry.js +1 -1
  54. package/dist/build/print.css +1 -1
  55. package/dist/build/progress-indicator.css +1 -0
  56. package/dist/build/react.js +1 -1
  57. package/dist/build/sidebar.css +1 -1
  58. package/dist/build/steps.css +1 -1
  59. package/dist/build/sticky.entry.js +1 -1
  60. package/dist/build/tabs.css +1 -1
  61. package/dist/build/tabs.entry.js +1 -1
  62. package/dist/build/tag.css +1 -1
  63. package/dist/build/utilities.css +1 -1
  64. package/dist/types/Atom/DefinitionList/DefinitionList.d.ts +3 -2
  65. package/dist/types/Atom/DefinitionList/DefinitionList.d.ts.map +1 -1
  66. package/dist/types/Atom/Heading/Heading.d.ts.map +1 -1
  67. package/dist/types/Atom/Link/Link.d.ts.map +1 -1
  68. package/dist/types/Atom/List/List.d.ts +10 -0
  69. package/dist/types/Atom/List/List.d.ts.map +1 -0
  70. package/dist/types/Component/Accordion/Accordion.d.ts.map +1 -1
  71. package/dist/types/Component/Dialog/Dialog.d.ts.map +1 -1
  72. package/dist/types/Component/DropMenu/Elements/DropMenu.d.ts.map +1 -1
  73. package/dist/types/Component/Filters/Elements/Filters.d.ts +20 -1
  74. package/dist/types/Component/Filters/Elements/Filters.d.ts.map +1 -1
  75. package/dist/types/Component/Filters/Filters.d.ts +7 -2
  76. package/dist/types/Component/Filters/Filters.d.ts.map +1 -1
  77. package/dist/types/Component/Gallery/Gallery.d.ts.map +1 -1
  78. package/dist/types/Component/InPageNavigation/Elements/InPageNavigation.d.ts +2 -2
  79. package/dist/types/Component/InPageNavigation/Elements/InPageNavigation.d.ts.map +1 -1
  80. package/dist/types/Component/InPageNavigation/Hooks/useInPageNavigation.d.ts.map +1 -1
  81. package/dist/types/Component/Pagination/Components/PaginationContext.d.ts.map +1 -1
  82. package/dist/types/Component/ProgressIndicator/ProgressIndicator.d.ts +9 -0
  83. package/dist/types/Component/ProgressIndicator/ProgressIndicator.d.ts.map +1 -0
  84. package/dist/types/Component/Tabs/Elements/Tabs.d.ts.map +1 -1
  85. package/dist/types/Component/Tabs/Tabs.d.ts.map +1 -1
  86. package/dist/types/Component/Tag/Tag.d.ts +4 -2
  87. package/dist/types/Component/Tag/Tag.d.ts.map +1 -1
  88. package/dist/types/Form/Autocomplete/Autocomplete.d.ts +2 -2
  89. package/dist/types/Form/Autocomplete/Autocomplete.d.ts.map +1 -1
  90. package/dist/types/Form/Autocomplete/Elements/Autocomplete.d.ts +10 -0
  91. package/dist/types/Form/Autocomplete/Elements/Autocomplete.d.ts.map +1 -1
  92. package/dist/types/Form/Checkbox/FormCheckbox.d.ts.map +1 -1
  93. package/dist/types/Form/CheckboxCard/CheckboxCard.d.ts +23 -0
  94. package/dist/types/Form/CheckboxCard/CheckboxCard.d.ts.map +1 -0
  95. package/dist/types/Form/OneTimeCode/OneTimeCode.d.ts +12 -0
  96. package/dist/types/Form/OneTimeCode/OneTimeCode.d.ts.map +1 -0
  97. package/dist/types/Form/Radio/FormRadio.d.ts.map +1 -1
  98. package/dist/types/Form/RadioCard/RadioCard.d.ts +16 -0
  99. package/dist/types/Form/RadioCard/RadioCard.d.ts.map +1 -0
  100. package/dist/types/Form/Select/FormSelect.d.ts.map +1 -1
  101. package/dist/types/Form/TextInput/FormText.d.ts.map +1 -1
  102. package/dist/types/Form/Textarea/FormTextarea.d.ts.map +1 -1
  103. package/dist/types/Utility/Hooks/useIsomorphicLayoutEffect.d.ts +4 -0
  104. package/dist/types/Utility/Hooks/useIsomorphicLayoutEffect.d.ts.map +1 -0
  105. package/dist/types/enums.d.ts +19 -0
  106. package/dist/types/enums.d.ts.map +1 -1
  107. package/dist/types/react.d.ts +5 -0
  108. package/dist/types/react.d.ts.map +1 -1
  109. package/package.json +8 -8
  110. package/src/Atom/Background/_background.css +2 -2
  111. package/src/Atom/Blockquote/_blockquote.css +9 -2
  112. package/src/Atom/Button/README.md +1 -0
  113. package/src/Atom/Button/__snapshots__/Button.stories.ts.snap +2 -3
  114. package/src/Atom/Button/_buttons-styles.css +6 -6
  115. package/src/Atom/Button/_buttons.css +21 -3
  116. package/src/Atom/Button/button.twig +4 -1
  117. package/src/Atom/DefinitionList/DefinitionList.stories.ts +42 -2
  118. package/src/Atom/DefinitionList/DefinitionList.stories.tsx +36 -0
  119. package/src/Atom/DefinitionList/DefinitionList.tsx +4 -1
  120. package/src/Atom/DefinitionList/DefinitionListItem.stories.ts +1 -1
  121. package/src/Atom/DefinitionList/README.md +43 -0
  122. package/src/Atom/DefinitionList/__snapshots__/DefinitionList.stories.ts.snap +37 -3
  123. package/src/Atom/DefinitionList/__snapshots__/DefinitionList.stories.tsx.snap +2 -0
  124. package/src/Atom/DefinitionList/__snapshots__/DefinitionListItem.stories.ts.snap +3 -3
  125. package/src/Atom/DefinitionList/definition-list-item.twig +1 -0
  126. package/src/Atom/DefinitionList/definition-list.twig +6 -1
  127. package/src/Atom/Heading/Heading.tsx +6 -0
  128. package/src/Atom/Heading/_headings.css +2 -1
  129. package/src/Atom/Icon/_extended-set.css +30 -30
  130. package/src/Atom/Icon/_icon.css +39 -36
  131. package/src/Atom/Image/README.md +2 -2
  132. package/src/Atom/Image/_image.css +12 -6
  133. package/src/Atom/Link/Link.tsx +16 -3
  134. package/src/Atom/Link/__snapshots__/Link.stories.ts.snap +7 -12
  135. package/src/Atom/Link/__snapshots__/Link.stories.tsx.snap +1 -1
  136. package/src/Atom/Link/_links.css +9 -0
  137. package/src/Atom/Link/link.twig +8 -2
  138. package/src/Atom/LinkedImage/linked-image.twig +1 -2
  139. package/src/Atom/List/List.stories.ts +102 -0
  140. package/src/Atom/List/List.stories.tsx +103 -0
  141. package/src/Atom/List/List.tsx +22 -0
  142. package/src/Atom/List/README.md +150 -0
  143. package/src/Atom/List/__snapshots__/List.stories.ts.snap +43 -0
  144. package/src/Atom/List/__snapshots__/List.stories.tsx.snap +13 -0
  145. package/src/Atom/List/_list.css +123 -0
  146. package/src/Atom/List/list.twig +5 -0
  147. package/src/Atom/Media/Media.stories.ts +1 -1
  148. package/src/Atom/Media/__snapshots__/Media.stories.ts.snap +2 -2
  149. package/src/Atom/Spacing/_spacing.css +24 -24
  150. package/src/Atom/Table/__snapshots__/Table.stories.ts.snap +24 -4
  151. package/src/Atom/Table/_table.css +15 -3
  152. package/src/Atom/Table/table.twig +6 -1
  153. package/src/Atom/Text/__snapshots__/Text.stories.ts.snap +3 -2
  154. package/src/Atom/Text/_text-styles.css +21 -1
  155. package/src/Atom/Text/twig/text-styles-example.twig +3 -2
  156. package/src/Atom/_base.css +6 -0
  157. package/src/Atom/_flow.css +1 -1
  158. package/src/Atom/_generic.css +18 -11
  159. package/src/Component/Accordion/Accordion.stories.ts +31 -0
  160. package/src/Component/Accordion/Accordion.tsx +3 -2
  161. package/src/Component/Accordion/AccordionItem.stories.ts +27 -0
  162. package/src/Component/Accordion/__snapshots__/Accordion.stories.ts.snap +36 -0
  163. package/src/Component/Accordion/__snapshots__/AccordionItem.stories.ts.snap +16 -0
  164. package/src/Component/Accordion/accordion.css +2 -0
  165. package/src/Component/Breadcrumb/__snapshots__/Breadcrumb.stories.ts.snap +3 -6
  166. package/src/Component/Breadcrumb/breadcrumb.css +4 -0
  167. package/src/Component/Card/__snapshots__/Card.stories.ts.snap +13 -24
  168. package/src/Component/Card/card.css +2 -2
  169. package/src/Component/Card/card.twig +1 -1
  170. package/src/Component/Carousel/Carousel.stories.ts +101 -23
  171. package/src/Component/Carousel/Carousel.stories.tsx +74 -0
  172. package/src/Component/Carousel/__snapshots__/Carousel.stories.ts.snap +273 -88
  173. package/src/Component/Carousel/__snapshots__/Carousel.stories.tsx.snap +5 -3
  174. package/src/Component/ContentBlock/__snapshots__/ContentBlock.stories.ts.snap +12 -24
  175. package/src/Component/CookieConsent/cookie-consent.css +3 -1
  176. package/src/Component/Dialog/Dialog.stories.ts +33 -0
  177. package/src/Component/Dialog/Dialog.stories.tsx +25 -0
  178. package/src/Component/Dialog/Dialog.tsx +2 -2
  179. package/src/Component/Dialog/__snapshots__/Dialog.stories.ts.snap +33 -2
  180. package/src/Component/Dialog/__snapshots__/Dialog.stories.tsx.snap +2 -0
  181. package/src/Component/DropMenu/DropMenu.stories.ts +39 -1
  182. package/src/Component/DropMenu/DropMenu.stories.tsx +29 -0
  183. package/src/Component/DropMenu/DropMenu.tsx +1 -1
  184. package/src/Component/DropMenu/Elements/DropMenu.ts +10 -1
  185. package/src/Component/DropMenu/__snapshots__/DropMenu.stories.ts.snap +14 -0
  186. package/src/Component/DropMenu/__snapshots__/DropMenu.stories.tsx.snap +3 -1
  187. package/src/Component/Filters/Elements/Filters.ts +71 -1
  188. package/src/Component/Filters/FilterItem.stories.ts +2 -1
  189. package/src/Component/Filters/FilterItem.tsx +1 -1
  190. package/src/Component/Filters/Filters.figma.ts +1 -1
  191. package/src/Component/Filters/Filters.stories.ts +95 -3
  192. package/src/Component/Filters/Filters.stories.tsx +246 -17
  193. package/src/Component/Filters/Filters.tsx +145 -29
  194. package/src/Component/Filters/README.md +102 -37
  195. package/src/Component/Filters/__snapshots__/FilterItem.stories.tsx.snap +3 -3
  196. package/src/Component/Filters/__snapshots__/Filters.stories.ts.snap +82 -4
  197. package/src/Component/Filters/__snapshots__/Filters.stories.tsx.snap +9 -3
  198. package/src/Component/Filters/filters.css +11 -0
  199. package/src/Component/Gallery/Gallery.tsx +2 -2
  200. package/src/Component/HeroBanner/HeroBanner.stories.ts +1 -1
  201. package/src/Component/HeroBanner/__snapshots__/HeroBanner.stories.ts.snap +4 -8
  202. package/src/Component/HeroSearch/__snapshots__/HeroSearch.stories.ts.snap +5 -10
  203. package/src/Component/InPageAlert/__snapshots__/InPageAlert.stories.ts.snap +6 -12
  204. package/src/Component/InPageAlert/in-page-alert.css +2 -1
  205. package/src/Component/InPageNavigation/Elements/InPageNavigation.ts +10 -5
  206. package/src/Component/InPageNavigation/Hooks/useInPageNavigation.ts +10 -5
  207. package/src/Component/InPageNavigation/InPageNavigation.stories.ts +83 -0
  208. package/src/Component/InPageNavigation/InPageNavigation.stories.tsx +130 -0
  209. package/src/Component/InPageNavigation/__snapshots__/InPageNavigation.stories.ts.snap +61 -1
  210. package/src/Component/InPageNavigation/__snapshots__/InPageNavigation.stories.tsx.snap +4 -0
  211. package/src/Component/InPageNavigation/twig/content-example-duplicate-headings.twig +20 -0
  212. package/src/Component/InPageNavigation/twig/in-page-navigation-story-duplicate-headings.twig +2 -0
  213. package/src/Component/LinkList/__snapshots__/LinkList.stories.ts.snap +6 -12
  214. package/src/Component/ListItem/__snapshots__/ListItem.stories.ts.snap +11 -18
  215. package/src/Component/ListItem/list-item.css +1 -1
  216. package/src/Component/ListItem/list-item.twig +2 -2
  217. package/src/Component/Navigation/Dropdown.stories.tsx +46 -0
  218. package/src/Component/Navigation/Navigation.stories.ts +56 -0
  219. package/src/Component/Navigation/__snapshots__/Dropdown.stories.tsx.snap +2 -0
  220. package/src/Component/Navigation/__snapshots__/Navigation.stories.ts.snap +57 -0
  221. package/src/Component/Navigation/_navigation.css +1 -1
  222. package/src/Component/Pagination/Components/PaginationContext.tsx +2 -1
  223. package/src/Component/Pagination/Components/PaginationItem.tsx +1 -1
  224. package/src/Component/Pagination/Pagination.stories.ts +44 -4
  225. package/src/Component/Pagination/Pagination.stories.tsx +31 -0
  226. package/src/Component/Pagination/__snapshots__/Pagination.stories.ts.snap +69 -12
  227. package/src/Component/Pagination/__snapshots__/Pagination.stories.tsx.snap +3 -1
  228. package/src/Component/Pagination/pagination-item.twig +1 -1
  229. package/src/Component/Pagination/pagination.css +2 -2
  230. package/src/Component/Popover/__snapshots__/Popover.stories.ts.snap +13 -26
  231. package/src/Component/Popover/popover.css +1 -1
  232. package/src/Component/ProgressIndicator/ProgressIndicator.stories.ts +36 -0
  233. package/src/Component/ProgressIndicator/ProgressIndicator.stories.tsx +30 -0
  234. package/src/Component/ProgressIndicator/ProgressIndicator.tsx +60 -0
  235. package/src/Component/ProgressIndicator/README.md +111 -0
  236. package/src/Component/ProgressIndicator/__snapshots__/ProgressIndicator.stories.ts.snap +67 -0
  237. package/src/Component/ProgressIndicator/__snapshots__/ProgressIndicator.stories.tsx.snap +7 -0
  238. package/src/Component/ProgressIndicator/progress-indicator.css +59 -0
  239. package/src/Component/ProgressIndicator/progress-indicator.twig +22 -0
  240. package/src/Component/SideNavigation/__snapshots__/SideNavigation.stories.ts.snap +1 -2
  241. package/src/Component/SocialLinks/__snapshots__/SocialLinks.stories.ts.snap +6 -9
  242. package/src/Component/Steps/Steps.stories.ts +1 -1
  243. package/src/Component/Steps/steps.css +13 -0
  244. package/src/Component/Sticky/Elements/Sticky.ts +1 -1
  245. package/src/Component/Sticky/sticky.css +3 -3
  246. package/src/Component/Tabs/Elements/Tabs.ts +3 -1
  247. package/src/Component/Tabs/Tabs.stories.ts +77 -21
  248. package/src/Component/Tabs/Tabs.stories.tsx +24 -0
  249. package/src/Component/Tabs/Tabs.tsx +2 -2
  250. package/src/Component/Tabs/__snapshots__/Tabs.stories.ts.snap +20 -2
  251. package/src/Component/Tabs/__snapshots__/Tabs.stories.tsx.snap +3 -1
  252. package/src/Component/Tabs/tabs.css +2 -0
  253. package/src/Component/Tag/README.md +52 -26
  254. package/src/Component/Tag/Tag.stories.tsx +24 -0
  255. package/src/Component/Tag/Tag.tsx +12 -2
  256. package/src/Component/Tag/TagItem.stories.ts +25 -0
  257. package/src/Component/Tag/__snapshots__/Tag.stories.ts.snap +2 -2
  258. package/src/Component/Tag/__snapshots__/Tag.stories.tsx.snap +2 -0
  259. package/src/Component/Tag/tag-item.twig +2 -2
  260. package/src/Component/Tag/tag.css +76 -2
  261. package/src/Form/Autocomplete/Autocomplete.stories.ts +89 -7
  262. package/src/Form/Autocomplete/Autocomplete.stories.tsx +85 -1
  263. package/src/Form/Autocomplete/Autocomplete.tsx +20 -10
  264. package/src/Form/Autocomplete/Elements/Autocomplete.ts +24 -1
  265. package/src/Form/Autocomplete/README.md +26 -26
  266. package/src/Form/Autocomplete/__snapshots__/Autocomplete.stories.ts.snap +39 -5
  267. package/src/Form/Autocomplete/__snapshots__/Autocomplete.stories.tsx.snap +8 -4
  268. package/src/Form/Autocomplete/autocomplete.css +12 -1
  269. package/src/Form/Autocomplete/autocomplete.twig +1 -3
  270. package/src/Form/Checkbox/FormCheckbox.tsx +2 -8
  271. package/src/Form/Checkbox/README.md +23 -18
  272. package/src/Form/Checkbox/input-checkbox.twig +0 -2
  273. package/src/Form/CheckboxCard/CheckboxCard.stories.ts +90 -0
  274. package/src/Form/CheckboxCard/CheckboxCard.stories.tsx +43 -0
  275. package/src/Form/CheckboxCard/CheckboxCard.tsx +102 -0
  276. package/src/Form/CheckboxCard/README.md +163 -0
  277. package/src/Form/CheckboxCard/__snapshots__/CheckboxCard.stories.ts.snap +63 -0
  278. package/src/Form/CheckboxCard/__snapshots__/CheckboxCard.stories.tsx.snap +7 -0
  279. package/src/Form/CheckboxCard/checkbox-card.twig +29 -0
  280. package/src/Form/FormItem/__snapshots__/FormItem.stories.ts.snap +2 -2
  281. package/src/Form/OneTimeCode/OneTimeCode.stories.ts +20 -0
  282. package/src/Form/OneTimeCode/OneTimeCode.stories.tsx +18 -0
  283. package/src/Form/OneTimeCode/OneTimeCode.tsx +56 -0
  284. package/src/Form/OneTimeCode/README.md +83 -0
  285. package/src/Form/OneTimeCode/__snapshots__/OneTimeCode.stories.ts.snap +7 -0
  286. package/src/Form/OneTimeCode/__snapshots__/OneTimeCode.stories.tsx.snap +3 -0
  287. package/src/Form/OneTimeCode/one-time-code.css +13 -0
  288. package/src/Form/OneTimeCode/one-time-code.twig +31 -0
  289. package/src/Form/README.md +65 -13
  290. package/src/Form/Radio/FormRadio.tsx +1 -4
  291. package/src/Form/Radio/input-radio.twig +0 -2
  292. package/src/Form/RadioCard/README.md +146 -0
  293. package/src/Form/RadioCard/RadioCard.stories.ts +95 -0
  294. package/src/Form/RadioCard/RadioCard.stories.tsx +26 -0
  295. package/src/Form/RadioCard/RadioCard.tsx +59 -0
  296. package/src/Form/RadioCard/__snapshots__/RadioCard.stories.ts.snap +69 -0
  297. package/src/Form/RadioCard/__snapshots__/RadioCard.stories.tsx.snap +3 -0
  298. package/src/Form/RadioCard/radio-card.twig +20 -0
  299. package/src/Form/Select/FormSelect.tsx +1 -4
  300. package/src/Form/Select/input-select.twig +0 -2
  301. package/src/Form/TextInput/FormText.stories.tsx +14 -0
  302. package/src/Form/TextInput/FormText.tsx +1 -4
  303. package/src/Form/TextInput/__snapshots__/FormText.stories.tsx.snap +2 -0
  304. package/src/Form/TextInput/input-text.twig +0 -2
  305. package/src/Form/Textarea/FormTextarea.tsx +1 -4
  306. package/src/Form/Textarea/input-textarea.twig +0 -2
  307. package/src/Form/Validation.stories.ts +153 -0
  308. package/src/Form/__snapshots__/Validation.stories.ts.snap +130 -0
  309. package/src/Form/form.css +240 -55
  310. package/src/Layout/Footer/__snapshots__/Footer.stories.ts.snap +18 -33
  311. package/src/Layout/Grid/grid.css +4 -4
  312. package/src/Layout/Header/Header.stories.ts +33 -0
  313. package/src/Layout/Header/Header.stories.tsx +31 -0
  314. package/src/Layout/Header/__snapshots__/Header.stories.ts.snap +50 -0
  315. package/src/Layout/Header/__snapshots__/Header.stories.tsx.snap +2 -0
  316. package/src/Layout/Masthead/__snapshots__/Masthead.stories.ts.snap +8 -16
  317. package/src/Layout/Section/__snapshots__/Background.stories.ts.snap +2 -4
  318. package/src/Layout/Section/__snapshots__/Section.stories.ts.snap +4 -8
  319. package/src/Layout/Sidebar/__snapshots__/Sidebar.stories.ts.snap +5 -5
  320. package/src/Layout/Sidebar/sidebar.css +1 -0
  321. package/src/Layout/Sidebar/sidebar.twig +1 -1
  322. package/src/Utility/Hooks/useIsomorphicLayoutEffect.ts +8 -0
  323. package/src/Utility/_layout-utils.css +8 -0
  324. package/src/Utility/_mixins.css +24 -0
  325. package/src/Utility/print.css +51 -29
  326. package/src/Utility/utilities.css +22 -2
  327. package/src/_custom-media.css +1 -0
  328. package/src/constants.css +12 -2
  329. package/src/enums.ts +22 -0
  330. package/src/react.ts +5 -0
  331. package/tools/lib/extract-classnames.mjs +0 -0
  332. package/tools/lint-classnames.mjs +1 -1
  333. package/tools/test-utils/screen-reader.ts +33 -0
  334. package/dist/build/chunks/DropMenu-Co9jZZ4S.js +0 -1
  335. package/dist/build/chunks/Gallery-BT3cxS5m.js +0 -1
  336. package/dist/build/chunks/GlobalToggle-DQHho97V.js +0 -1
  337. package/dist/build/chunks/InPageNavigation-CzR_KZaz.js +0 -1
  338. package/dist/build/chunks/Navigation-B9Wug-ok.js +0 -1
  339. package/dist/build/chunks/Popover-De_CQqcd.js +0 -1
  340. package/dist/build/chunks/Sticky-Kyjykb36.js +0 -1
  341. package/dist/build/chunks/Tabs-Dm8g301e.js +0 -15
  342. package/dist/build/chunks/disclosure-widget-BETzOHLO.js +0 -1
  343. package/dist/build/chunks/polyfills-Dokbkxxk.js +0 -1
  344. package/dist/build/chunks/utilities-C5dAO2YA.js +0 -1
@@ -1,4 +1,4 @@
1
- import { JSX, ComponentPropsWithoutRef, PropsWithChildren } from "react"
1
+ import { JSX, ComponentPropsWithoutRef, PropsWithChildren, ReactNode } from "react"
2
2
 
3
3
  type DefinitionListProps = ComponentPropsWithoutRef<"dl"> & PropsWithChildren
4
4
 
@@ -9,16 +9,19 @@ const DefinitionList = ({ children, ...props }: DefinitionListProps): JSX.Elemen
9
9
  type DefinitionListItemProps = ComponentPropsWithoutRef<"div"> &
10
10
  PropsWithChildren & {
11
11
  title: string
12
+ action?: ReactNode
12
13
  }
13
14
 
14
15
  const DefinitionListItem = ({
15
16
  title,
17
+ action = null,
16
18
  children,
17
19
  ...props
18
20
  }: DefinitionListItemProps): JSX.Element => (
19
21
  <div {...props}>
20
22
  <dt>{title}</dt>
21
23
  <dd>{children}</dd>
24
+ {action && <dd className="mx-list__action">{action}</dd>}
22
25
  </div>
23
26
  )
24
27
 
@@ -7,7 +7,7 @@ import { DefinitionListItem as DefinitionListItemType } from "@pnx-mixtape/ids-s
7
7
  * A single title/content pair used by [DefinitionList](/?path=/docs/atom-definitionlist--docs).
8
8
  */
9
9
  const meta: Meta<DefinitionListItemType> = {
10
- tags: ["autodocs", "ids-mvp", "no-snapshot"],
10
+ tags: ["autodocs", "ids-mvp"],
11
11
  component: Component,
12
12
  args: {
13
13
  title: "Some title",
@@ -37,6 +37,8 @@ No dedicated CSS file — base styles come from the global reset. Import `base.c
37
37
 
38
38
  The template is consumed by `ids-shape`'s `DefinitionList` type but does not currently render the optional `title` heading the type declares — pass a heading separately above the include if required.
39
39
 
40
+ **definition-list-item.twig** also accepts an optional `action` var — see [Summary modifier](#summary-modifier).
41
+
40
42
  ## HTML
41
43
 
42
44
  ```html
@@ -61,3 +63,44 @@ import DefinitionList, { DefinitionListItem } from "@pnx-mixtape/mxds/react"
61
63
  <DefinitionListItem title="Author">Jane Smith</DefinitionListItem>
62
64
  </DefinitionList>
63
65
  ```
66
+
67
+ `DefinitionListItem` also accepts an optional `action?: ReactNode` prop — see [Summary modifier](#summary-modifier).
68
+
69
+ ---
70
+
71
+ ## Summary modifier
72
+
73
+ `ListStyles.SUMMARY` (`mx-list--summary`, from `src/Atom/List`) turns a `DefinitionList` into a "review your answers" block: a term/value/action row layout with dividers between rows, matching the GOV.UK-style summary-list pattern used on a review-and-submit step. Each row's optional third element (`action`) is typically a "Change" link back to the step that set that answer.
74
+
75
+ ```twig
76
+ {% include '@mixtape/Atom/DefinitionList/definition-list.twig' with {
77
+ summary: true,
78
+ items: [
79
+ { title: 'Concession card', content: 'Yes, I hold a card', action: '<a href="#step-1">Change<span class="sr-only"> concession card</span></a>' },
80
+ { title: 'Full name', content: 'Jane Smith', action: '<a href="#step-2">Change<span class="sr-only"> full name</span></a>' },
81
+ ],
82
+ } %}
83
+ ```
84
+
85
+ ```tsx
86
+ import DefinitionList, { DefinitionListItem } from "@pnx-mixtape/mxds/react"
87
+ import { ListStyles } from "../../enums"
88
+ ;<DefinitionList className={ListStyles.SUMMARY}>
89
+ <DefinitionListItem
90
+ title="Concession card"
91
+ action={
92
+ <a href="#step-1">
93
+ Change<span className="sr-only"> concession card</span>
94
+ </a>
95
+ }
96
+ >
97
+ Yes, I hold a card
98
+ </DefinitionListItem>
99
+ </DefinitionList>
100
+ ```
101
+
102
+ Note the asymmetry: Twig's `definition-list.twig` has a dedicated `summary: true` boolean (mirroring its existing `columns: true`), since Twig always needs an explicit class-selection var. React's `DefinitionList` is a thin `<dl {...props}>` wrapper with no such boolean — pass the modifier class directly via `className` (or `classNames(...)` if combining with other classes), same as any other `ComponentPropsWithoutRef<"dl">` usage.
103
+
104
+ ### React ⇄ Twig parity
105
+
106
+ `pnpm audit-parity` reports `title`/`action` as Twig-only for this component — that's a tooling artefact, not a real gap: it merges every `.twig` file in this directory (`definition-list.twig` **and** `definition-list-item.twig`) and diffs the combined field list against only the default-exported React component (`DefinitionList`, the `<dl>` wrapper). `title`/`content`/`action` are actually `DefinitionListItem`'s props (the named export), which do have full parity with `definition-list-item.twig` — there's just no single React component the tool can compare `definition-list-item.twig` against directly, the same limitation that gives `Checkbox`/`Radio` an `N/A` rather than a real result.
@@ -1,19 +1,53 @@
1
1
  // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
2
 
3
+ exports[`Columns 1`] = `
4
+ " <dl class="mx-list--columns">
5
+ <div>
6
+ <dt>Some title</dt>
7
+ <dd>Some content</dd>
8
+ </div>
9
+ <div>
10
+ <dt>Another title</dt>
11
+ <dd>More content</dd>
12
+ </div>
13
+ <div>
14
+ <dt>Yet another title</dt>
15
+ <dd>And even more content</dd>
16
+ </div>
17
+
18
+ </dl>
19
+ "
20
+ `;
21
+
3
22
  exports[`Definition List 1`] = `
4
23
  "<dl>
5
24
  <div>
6
25
  <dt>Some title</dt>
7
26
  <dd>Some content</dd>
8
- </div>
27
+ </div>
9
28
  <div>
10
29
  <dt>Another title</dt>
11
30
  <dd>More content</dd>
12
- </div>
31
+ </div>
13
32
  <div>
14
33
  <dt>Yet another title</dt>
15
34
  <dd>And even more content</dd>
16
- </div>
35
+ </div>
36
+
37
+ </dl>
38
+ "
39
+ `;
40
+
41
+ exports[`Summary 1`] = `
42
+ " <dl class="mx-list--summary">
43
+ <div>
44
+ <dt>Concession card</dt>
45
+ <dd>Yes, I hold a card</dd>
46
+ <dd class="mx-list__action"><a href="#step-1">Change<span class="sr-only"> concession card</span></a></dd></div>
47
+ <div>
48
+ <dt>Full name</dt>
49
+ <dd>Jane Smith</dd>
50
+ <dd class="mx-list__action"><a href="#step-2">Change<span class="sr-only"> full name</span></a></dd></div>
17
51
 
18
52
  </dl>
19
53
  "
@@ -1,3 +1,5 @@
1
1
  // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
2
 
3
3
  exports[`Definition List 1`] = `"<dl><div><dt>Item #1</dt><dd>Data for item #1</dd></div><div><dt>Item #2</dt><dd>Data for item #2</dd></div><div><dt>Item #3</dt><dd>Data for item #3</dd></div></dl>"`;
4
+
5
+ exports[`Summary 1`] = `"<dl class="mx-list--summary"><div><dt>Concession card</dt><dd>Yes, I hold a card</dd><dd class="mx-list__action"><a href="#step-1">Change<span class="sr-only"> concession card</span></a></dd></div><div><dt>Full name</dt><dd>Jane Smith</dd><dd class="mx-list__action"><a href="#step-2">Change<span class="sr-only"> full name</span></a></dd></div></dl>"`;
@@ -1,9 +1,9 @@
1
1
  // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
2
 
3
3
  exports[`Definition List Item 1`] = `
4
- "<div>
4
+ "<dl><div>
5
5
  <dt>Some title</dt>
6
6
  <dd>Some content</dd>
7
- </div>
8
- "
7
+ </div>
8
+ </dl>"
9
9
  `;
@@ -1,4 +1,5 @@
1
1
  <div>
2
2
  <dt>{{ title }}</dt>
3
3
  <dd>{{ content }}</dd>
4
+ {% if action %}<dd class="mx-list__action">{{ action }}</dd>{% endif %}
4
5
  </div>
@@ -1,4 +1,9 @@
1
+ {% if columns %}
2
+ {% set class = "mx-list--columns" %}
3
+ {% elseif summary %}
4
+ {% set class = "mx-list--summary" %}
5
+ {% endif %}
1
6
  {% set attributes = attributes ?? create_attribute() %}
2
- <dl{{ attributes }}>
7
+ <dl{{ attributes.addClass(class) }}>
3
8
  {{ items }}
4
9
  </dl>
@@ -42,6 +42,12 @@ const Heading = ({
42
42
 
43
43
  useEffect(() => {
44
44
  if (anchor || !ref.current) return
45
+ if (ref.current.id) {
46
+ // Adopt an id already set externally (e.g. by InPageNavigation's dedup logic)
47
+ // eslint-disable-next-line @eslint-react/hooks-extra/no-direct-set-state-in-use-effect
48
+ setAnchor(ref.current.id)
49
+ return
50
+ }
45
51
  // eslint-disable-next-line @eslint-react/hooks-extra/no-direct-set-state-in-use-effect
46
52
  setAnchor(makeAnchor(ref.current?.textContent))
47
53
  }, [anchor, ref])
@@ -14,10 +14,11 @@
14
14
  h6,
15
15
  .mx-heading--xs
16
16
  ) {
17
- font-family: var(--heading-font-family, var(--font-family));
17
+ font-family: var(--heading-font-family, var(--font-family-display, var(--font-family)));
18
18
  line-height: var(--line-height-h);
19
19
  font-size: var(--heading-font-size, var(--font-size));
20
20
  font-weight: var(--heading-font-weight, var(--font-weight-bold));
21
+ letter-spacing: var(--heading-letter-spacing, 0);
21
22
  text-wrap: balance;
22
23
 
23
24
  &[class*="mx-background--"] {
@@ -4,34 +4,34 @@
4
4
  * Icon - Extended
5
5
  */
6
6
  @layer design-system.atoms {
7
- @mixin icon attachment;
8
- @mixin icon blockquote;
9
- @mixin icon building;
10
- @mixin icon calendar;
11
- @mixin icon clock;
12
- @mixin icon globe;
13
- @mixin icon heart-selected;
14
- @mixin icon heart-unselected;
15
- @mixin icon image;
16
- @mixin icon home;
17
- @mixin icon lock;
18
- @mixin icon login;
19
- @mixin icon media-play;
20
- @mixin icon media-pause;
21
- @mixin icon media-stop;
22
- @mixin icon media-next;
23
- @mixin icon media-previous;
24
- @mixin icon media-rewind;
25
- @mixin icon media-skip;
26
- @mixin icon more;
27
- @mixin icon notification;
28
- @mixin icon pencil;
29
- @mixin icon restart;
30
- @mixin icon settings;
31
- @mixin icon star-selected;
32
- @mixin icon star-unselected;
33
- @mixin icon tick;
34
- @mixin icon trash;
35
- @mixin icon user;
36
- @mixin icon video;
7
+ @add-mixin icon attachment;
8
+ @add-mixin icon blockquote;
9
+ @add-mixin icon building;
10
+ @add-mixin icon calendar;
11
+ @add-mixin icon clock;
12
+ @add-mixin icon globe;
13
+ @add-mixin icon heart-selected;
14
+ @add-mixin icon heart-unselected;
15
+ @add-mixin icon image;
16
+ @add-mixin icon home;
17
+ @add-mixin icon lock;
18
+ @add-mixin icon login;
19
+ @add-mixin icon media-play;
20
+ @add-mixin icon media-pause;
21
+ @add-mixin icon media-stop;
22
+ @add-mixin icon media-next;
23
+ @add-mixin icon media-previous;
24
+ @add-mixin icon media-rewind;
25
+ @add-mixin icon media-skip;
26
+ @add-mixin icon more;
27
+ @add-mixin icon notification;
28
+ @add-mixin icon pencil;
29
+ @add-mixin icon restart;
30
+ @add-mixin icon settings;
31
+ @add-mixin icon star-selected;
32
+ @add-mixin icon star-unselected;
33
+ @add-mixin icon tick;
34
+ @add-mixin icon trash;
35
+ @add-mixin icon user;
36
+ @add-mixin icon video;
37
37
  }
@@ -1,4 +1,5 @@
1
1
  @import "_mixin-icon.css";
2
+ @import "../../Utility/_mixins.css";
2
3
 
3
4
  /**
4
5
  * Icon
@@ -21,6 +22,8 @@
21
22
  mask-repeat: no-repeat;
22
23
  background-color: currentcolor;
23
24
  color: var(--icon-colour, inherit);
25
+
26
+ @add-mixin forced-colors-paint;
24
27
  }
25
28
  }
26
29
 
@@ -38,42 +41,42 @@
38
41
  }
39
42
  }
40
43
 
41
- @mixin icon arrow-down;
42
- @mixin icon arrow-left;
43
- @mixin icon arrow-up;
44
- @mixin icon arrow-right;
45
- @mixin icon chevron-down;
46
- @mixin icon chevron-left;
47
- @mixin icon chevron-right;
48
- @mixin icon chevron-up;
49
- @mixin icon close;
50
- @mixin icon collapse;
51
- @mixin icon download;
52
- @mixin icon drupal;
53
- @mixin icon error;
54
- @mixin icon expand;
55
- @mixin icon external-link;
56
- @mixin icon facebook;
57
- @mixin icon google;
58
- @mixin icon info;
59
- @mixin icon instagram;
60
- @mixin icon linkedin;
61
- @mixin icon mastodon;
62
- @mixin icon bluesky;
63
- @mixin icon menu;
64
- @mixin icon search;
65
- @mixin icon success;
66
- @mixin icon twitter;
67
- @mixin icon warning;
68
- @mixin icon youtube;
69
- @mixin icon email;
70
- @mixin icon file;
71
- @mixin icon link;
72
- @mixin icon phone;
73
- @mixin icon pin;
74
- @mixin icon print;
75
- @mixin icon question;
76
- @mixin icon share;
44
+ @add-mixin icon arrow-down;
45
+ @add-mixin icon arrow-left;
46
+ @add-mixin icon arrow-up;
47
+ @add-mixin icon arrow-right;
48
+ @add-mixin icon chevron-down;
49
+ @add-mixin icon chevron-left;
50
+ @add-mixin icon chevron-right;
51
+ @add-mixin icon chevron-up;
52
+ @add-mixin icon close;
53
+ @add-mixin icon collapse;
54
+ @add-mixin icon download;
55
+ @add-mixin icon drupal;
56
+ @add-mixin icon error;
57
+ @add-mixin icon expand;
58
+ @add-mixin icon external-link;
59
+ @add-mixin icon facebook;
60
+ @add-mixin icon google;
61
+ @add-mixin icon info;
62
+ @add-mixin icon instagram;
63
+ @add-mixin icon linkedin;
64
+ @add-mixin icon mastodon;
65
+ @add-mixin icon bluesky;
66
+ @add-mixin icon menu;
67
+ @add-mixin icon search;
68
+ @add-mixin icon success;
69
+ @add-mixin icon twitter;
70
+ @add-mixin icon warning;
71
+ @add-mixin icon youtube;
72
+ @add-mixin icon email;
73
+ @add-mixin icon file;
74
+ @add-mixin icon link;
75
+ @add-mixin icon phone;
76
+ @add-mixin icon pin;
77
+ @add-mixin icon print;
78
+ @add-mixin icon question;
79
+ @add-mixin icon share;
77
80
 
78
81
  .mx-icon--status::before {
79
82
  mask-image: url("./images/info.svg");
@@ -76,8 +76,8 @@ The template always wraps the image in a `<picture>` element so multiple `source
76
76
 
77
77
  ```css
78
78
  figcaption {
79
- --caption-font-size: var(--font-size-s);
80
- --caption-line-height: var(--line-height);
79
+ --font-size-ui: var(--font-size-s);
80
+ --line-height-ui: var(--line-height);
81
81
  }
82
82
  ```
83
83
 
@@ -1,16 +1,22 @@
1
1
  @layer design-system.defaults {
2
2
  figure {
3
3
  margin: 0;
4
- display: table;
5
- inline-size: fit-content;
4
+ display: block;
5
+ inline-size: var(--width, 100%);
6
+
7
+ & :is(picture, img, iframe, video) {
8
+ inline-size: 100%;
9
+ }
6
10
  }
7
11
 
8
12
  figcaption {
13
+ margin-block-start: var(--spacing-xs);
9
14
  padding: var(--spacing-xxs);
10
- font-size: var(--caption-font-size, var(--font-size-xs));
11
- line-height: var(--caption-line-height, var(--line-height-h));
12
- caption-side: bottom;
13
- display: table-caption;
15
+ font-family: var(--font-family-ui, var(--font-family));
16
+ font-size: var(--font-size-ui, var(--font-size-xs));
17
+ line-height: var(--line-height-ui, var(--line-height-h));
18
+ color: var(--colour-foreground-alt);
19
+ display: block;
14
20
  }
15
21
 
16
22
  img {
@@ -1,4 +1,4 @@
1
- import { JSX, ComponentPropsWithoutRef, PropsWithChildren } from "react"
1
+ import { JSX, ComponentPropsWithoutRef, PropsWithChildren, useId } from "react"
2
2
  import classNames from "classnames"
3
3
  import { useLinkComponent } from "../../react"
4
4
 
@@ -28,6 +28,15 @@ const Link = ({
28
28
 
29
29
  const externalAttrs = external ? { target: "_blank", rel: "noopener noreferrer" } : {}
30
30
 
31
+ // `children` can be arbitrary JSX, so this can't fold into a single
32
+ // `aria-label` the way the Twig Link atom does. Instead, the supplemental
33
+ // text is `aria-describedby`'d and `aria-hidden` - kept out of the normal
34
+ // accessibility tree walk (so it isn't announced twice) while still
35
+ // resolving as the link's description, since `aria-hidden` elements remain
36
+ // valid `aria-describedby` targets.
37
+ const descriptionId = useId()
38
+ const hasDescription = external || Boolean(allyText)
39
+
31
40
  return (
32
41
  // oxlint-disable-next-line react/static-components -- LinkComponent is a stable reference from context, not created during render
33
42
  <LinkComponent
@@ -38,12 +47,16 @@ const Link = ({
38
47
  "mx-link--download": download,
39
48
  })}
40
49
  {...(current ? { "aria-current": "page" as const } : {})}
50
+ {...(hasDescription ? { "aria-describedby": descriptionId } : {})}
41
51
  {...externalAttrs}
42
52
  {...props}
43
53
  >
44
54
  {children}
45
- {external && <span className="sr-only">(opens in a new window)</span>}
46
- {allyText && <span className="sr-only">{allyText}</span>}
55
+ {hasDescription && (
56
+ <span id={descriptionId} className="sr-only" aria-hidden="true">
57
+ {[external && "(opens in a new window)", allyText].filter(Boolean).join(" ")}
58
+ </span>
59
+ )}
47
60
  </LinkComponent>
48
61
  )
49
62
  }
@@ -6,18 +6,16 @@ exports[`Download 1`] = `
6
6
 
7
7
  <span class="mx-icon mx-icon--download"></span>
8
8
 
9
- <span>Download (PDF 12kb)</span>
10
-
9
+ Download (PDF 12kb)
11
10
  </a>
12
11
  "
13
12
  `;
14
13
 
15
14
  exports[`External 1`] = `
16
- "
17
- <a href="#" class="mx-link--external" target="_blank" rel="noopener noreferrer">
15
+ "
16
+ <a href="#" class="mx-link--external" target="_blank" rel="noopener noreferrer" aria-label="Hyperlink (opens in a new window)">
18
17
 
19
- <span>Hyperlink</span>
20
- <span class="sr-only">(opens in a new window)</span>
18
+ Hyperlink
21
19
  </a>
22
20
  "
23
21
  `;
@@ -28,8 +26,7 @@ exports[`Icon Link 1`] = `
28
26
 
29
27
  <span class="mx-icon mx-icon--link"></span>
30
28
 
31
- <span>Hyperlink</span>
32
-
29
+ Hyperlink
33
30
  </a>
34
31
  "
35
32
  `;
@@ -38,8 +35,7 @@ exports[`Link 1`] = `
38
35
  "
39
36
  <a href="#">
40
37
 
41
- <span>Hyperlink</span>
42
-
38
+ Hyperlink
43
39
  </a>
44
40
  "
45
41
  `;
@@ -48,8 +44,7 @@ exports[`More 1`] = `
48
44
  "
49
45
  <a href="#" class="mx-link--more">
50
46
 
51
- <span>Hyperlink</span>
52
-
47
+ Hyperlink
53
48
  <span class="mx-icon mx-icon--arrow-right"></span>
54
49
 
55
50
  </a>
@@ -1,6 +1,6 @@
1
1
  // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
2
 
3
- exports[`External 1`] = `"<a href="http://example.com" class="mx-link mx-link--external" target="_blank" rel="noopener noreferrer">Link<span class="sr-only">(opens in a new window)</span></a>"`;
3
+ exports[`External 1`] = `"<a href="http://example.com" class="mx-link mx-link--external" aria-describedby="_r_1_" target="_blank" rel="noopener noreferrer">Link<span id="_r_1_" class="sr-only" aria-hidden="true">(opens in a new window)</span></a>"`;
4
4
 
5
5
  exports[`Link 1`] = `"<a href="http://example.com" class="mx-link">Link</a>"`;
6
6
 
@@ -1,3 +1,5 @@
1
+ @import "../../Utility/_mixins.css";
2
+
1
3
  @layer design-system.defaults {
2
4
  a[href] {
3
5
  color: var(--link-colour, var(--colour-link));
@@ -10,6 +12,11 @@
10
12
  text-underline-offset: 0.2em;
11
13
  text-decoration-thickness: max(0.09em, 2px);
12
14
  }
15
+
16
+ /* system colour for any glyph painted inside a link */
17
+ @media (--forced-colors) {
18
+ --forced-colour: LinkText;
19
+ }
13
20
  }
14
21
 
15
22
  .mx-link--external {
@@ -27,6 +34,8 @@
27
34
  block-size: var(--spacing-s);
28
35
  inline-size: var(--spacing-s);
29
36
  background-color: currentcolor;
37
+
38
+ @add-mixin forced-colors-paint;
30
39
  }
31
40
  }
32
41
 
@@ -18,12 +18,18 @@
18
18
  {% if download %}
19
19
  {% set attributes = attributes.setAttribute('download', '') %}
20
20
  {% endif %}
21
+ {% if iconOnly or external %}
22
+ {% set accessibleLabel = title %}
23
+ {% if external %}
24
+ {% set accessibleLabel = accessibleLabel ~ ' (opens in a new window)' %}
25
+ {% endif %}
26
+ {% set attributes = attributes.setAttribute('aria-label', accessibleLabel) %}
27
+ {% endif %}
21
28
 
22
29
  {% if listItem %}<li>{% endif %}
23
30
  <a{{ attributes }}>
24
31
  {{ iconStart }}
25
- <span{% if iconOnly %} class="sr-only"{% endif %}>{{ title }}</span>
26
- {% if external %}<span class="sr-only">(opens in a new window)</span>{% endif %}
32
+ {% if not iconOnly %}{{ title }}{% endif %}
27
33
  {{ iconEnd }}
28
34
  </a>
29
35
  {% if listItem %}</li>{% endif %}
@@ -1,9 +1,8 @@
1
- {% set attributes = attributes ?? create_attribute() %}
1
+ {% set attributes = (attributes ?? create_attribute()).setAttribute('aria-label', title) %}
2
2
  <a href="{{ href }}" {{ attributes }}>
3
3
  {% if image.src is defined %}
4
4
  {% include '@mixtape/Atom/Image/image.twig' with image only %}
5
5
  {% else %}
6
6
  {{ image }}
7
7
  {% endif %}
8
- <span class="sr-only">{{ title }}</span>
9
8
  </a>