@pnx-mixtape/mxds 0.0.21 → 0.0.23

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 (380) hide show
  1. package/dist/build/accordion.entry.js +32 -43
  2. package/dist/build/accordion.entry.js.map +1 -1
  3. package/dist/build/base.css +19 -39
  4. package/dist/build/button.css +7 -8
  5. package/dist/build/chunks/{Accordion-O-huO4At.js → Accordion-D1HQ0FDq.js} +23 -21
  6. package/dist/build/chunks/{Accordion-O-huO4At.js.map → Accordion-D1HQ0FDq.js.map} +1 -1
  7. package/dist/build/chunks/disclosure-widget-CdjCdx7t.js +129 -0
  8. package/dist/build/chunks/disclosure-widget-CdjCdx7t.js.map +1 -0
  9. package/dist/build/chunks/drop-menu.entry-fzV-_VFl.js +70 -0
  10. package/dist/build/chunks/drop-menu.entry-fzV-_VFl.js.map +1 -0
  11. package/dist/build/chunks/{polyfills-C-B7iqDG.js → polyfills-DnrsypYs.js} +35 -26
  12. package/dist/build/chunks/polyfills-DnrsypYs.js.map +1 -0
  13. package/dist/build/chunks/popover.entry-BQvyR0d5.js +38 -0
  14. package/dist/build/chunks/popover.entry-BQvyR0d5.js.map +1 -0
  15. package/dist/build/chunks/{utilities-DXELy_An.js → utilities-Ci7wwNeg.js} +9 -106
  16. package/dist/build/chunks/utilities-Ci7wwNeg.js.map +1 -0
  17. package/dist/build/constants.css +10 -31
  18. package/dist/build/dialog.entry.js +23 -31
  19. package/dist/build/dialog.entry.js.map +1 -1
  20. package/dist/build/drop-menu.entry.js +1 -1
  21. package/dist/build/drupal.css +5 -9
  22. package/dist/build/filters.entry.js +54 -50
  23. package/dist/build/filters.entry.js.map +1 -1
  24. package/dist/build/form.css +12 -26
  25. package/dist/build/global-alert.entry.js +26 -19
  26. package/dist/build/global-alert.entry.js.map +1 -1
  27. package/dist/build/grid.css +3 -9
  28. package/dist/build/header.css +5 -3
  29. package/dist/build/header.entry.js +93 -88
  30. package/dist/build/header.entry.js.map +1 -1
  31. package/dist/build/icon.css +3 -3
  32. package/dist/build/in-page-navigation.entry.js +16 -12
  33. package/dist/build/in-page-navigation.entry.js.map +1 -1
  34. package/dist/build/navigation.css +21 -56
  35. package/dist/build/navigation.entry.js +148 -50
  36. package/dist/build/navigation.entry.js.map +1 -1
  37. package/dist/build/page.css +1 -1
  38. package/dist/build/popover.css +119 -0
  39. package/dist/build/popover.entry.js +2 -0
  40. package/dist/build/popover.entry.js.map +1 -0
  41. package/dist/build/section.css +1 -1
  42. package/dist/build/sticky.entry.js +11 -12
  43. package/dist/build/sticky.entry.js.map +1 -1
  44. package/dist/build/tabs.entry.js +108 -91
  45. package/dist/build/tabs.entry.js.map +1 -1
  46. package/dist/build/utility-list.css +43 -0
  47. package/dist/build/utility-list.entry.js +80 -0
  48. package/dist/build/utility-list.entry.js.map +1 -0
  49. package/package.json +9 -10
  50. package/src/Atom/{Base.mdx → Atom.mdx} +1 -1
  51. package/src/Atom/Background/Backgrounds.stories.ts +21 -4
  52. package/src/Atom/Background/__snapshots__/Backgrounds.stories.ts.snap +1 -1
  53. package/src/Atom/Background/_background.css +1 -2
  54. package/src/Atom/Blockquote/_blockquote.css +1 -2
  55. package/src/Atom/Button/Button.stories.ts +128 -19
  56. package/src/Atom/Button/__snapshots__/Button.stories.ts.snap +75 -11
  57. package/src/Atom/Button/__snapshots__/Button.stories.tsx.snap +1 -1
  58. package/src/Atom/Button/_buttons.css +5 -5
  59. package/src/Atom/DefinitionList/DefinitionList.stories.ts +20 -3
  60. package/src/Atom/DefinitionList/DefinitionList.stories.tsx +3 -9
  61. package/src/Atom/DefinitionList/DefinitionList.tsx +3 -4
  62. package/src/Atom/DefinitionList/__snapshots__/DefinitionList.stories.ts.snap +1 -1
  63. package/src/Atom/DefinitionList/__snapshots__/DefinitionList.stories.tsx.snap +1 -1
  64. package/src/Atom/Heading/Heading.stories.ts +49 -7
  65. package/src/Atom/Heading/Heading.tsx +1 -6
  66. package/src/Atom/Heading/__snapshots__/Heading.stories.ts.snap +9 -1
  67. package/src/Atom/Heading/__snapshots__/Heading.stories.tsx.snap +1 -1
  68. package/src/Atom/Heading/_headings.css +1 -2
  69. package/src/Atom/Icon/Icon.mdx +5 -1
  70. package/src/Atom/Icon/Icon.stories.ts +76 -6
  71. package/src/Atom/Icon/Icon.tsx +1 -8
  72. package/src/Atom/Icon/__snapshots__/Icon.stories.ts.snap +18 -4
  73. package/src/Atom/Icon/__snapshots__/Icon.stories.tsx.snap +1 -1
  74. package/src/Atom/Icon/_icon.css +1 -1
  75. package/src/Atom/Image/Image.stories.ts +4 -3
  76. package/src/Atom/Image/__snapshots__/Image.stories.ts.snap +1 -1
  77. package/src/Atom/Link/Link.stories.ts +74 -7
  78. package/src/Atom/Link/__snapshots__/Link.stories.ts.snap +4 -4
  79. package/src/Atom/Link/__snapshots__/Link.stories.tsx.snap +1 -1
  80. package/src/Atom/Media/Media.stories.ts +34 -5
  81. package/src/Atom/Media/Media.tsx +1 -6
  82. package/src/Atom/Media/__snapshots__/Media.stories.ts.snap +2 -2
  83. package/src/Atom/Media/__snapshots__/Media.stories.tsx.snap +1 -1
  84. package/src/Atom/Media/_media.css +2 -10
  85. package/src/Atom/Spacing/Spacing.stories.ts +45 -31
  86. package/src/Atom/Spacing/__snapshots__/Spacing.stories.ts.snap +5 -4
  87. package/src/Atom/Spacing/spacing.twig +5 -2
  88. package/src/Atom/Table/__snapshots__/Table.stories.ts.snap +1 -1
  89. package/src/Atom/Table/__snapshots__/TableResponsive.stories.ts.snap +1 -1
  90. package/src/Atom/Table/_table.css +1 -2
  91. package/src/Atom/Text/Text.stories.ts +62 -0
  92. package/src/Atom/Text/__snapshots__/{TextSizes.stories.ts.snap → Text.stories.ts.snap} +14 -27
  93. package/src/Atom/Text/__snapshots__/Text.stories.tsx.snap +1 -1
  94. package/src/Atom/Text/_text-sizes.css +2 -4
  95. package/src/Atom/Text/text-style.twig +11 -1
  96. package/src/Atom/Text/text-styles-example.twig +2 -16
  97. package/src/Atom/Video/Video.stories.ts +6 -4
  98. package/src/Atom/Video/Video.tsx +1 -5
  99. package/src/Atom/Video/__snapshots__/Video.stories.ts.snap +1 -1
  100. package/src/Atom/_generic.css +4 -4
  101. package/src/Atom/_hr.css +1 -2
  102. package/src/Component/Accordion/Accordion.stories.ts +26 -8
  103. package/src/Component/Accordion/Accordion.stories.tsx +8 -10
  104. package/src/Component/Accordion/Accordion.tsx +2 -13
  105. package/src/Component/Accordion/AccordionItem.stories.ts +90 -0
  106. package/src/Component/Accordion/Components/AccordionContent.tsx +1 -5
  107. package/src/Component/Accordion/Components/AccordionTitle.tsx +1 -4
  108. package/src/Component/Accordion/Elements/Accordion.ts +1 -1
  109. package/src/Component/Accordion/Elements/AccordionDiv.ts +4 -11
  110. package/src/Component/Accordion/Elements/AccordionGroup.ts +10 -24
  111. package/src/Component/Accordion/Elements/AccordionMobile.ts +4 -4
  112. package/src/Component/Accordion/__snapshots__/Accordion.stories.ts.snap +17 -6
  113. package/src/Component/Accordion/__snapshots__/Accordion.stories.tsx.snap +1 -1
  114. package/src/Component/Accordion/__snapshots__/AccordionItem.stories.ts.snap +90 -0
  115. package/src/Component/Accordion/accordion.css +7 -5
  116. package/src/Component/Accordion/twig/accordion-div.twig +13 -11
  117. package/src/Component/Accordion/twig/accordion-mobile.twig +13 -11
  118. package/src/Component/Breadcrumb/Breadcrumb.stories.ts +14 -0
  119. package/src/Component/Breadcrumb/Breadcrumb.tsx +2 -12
  120. package/src/Component/Breadcrumb/__snapshots__/Breadcrumb.stories.ts.snap +1 -1
  121. package/src/Component/Breadcrumb/__snapshots__/Breadcrumb.stories.tsx.snap +1 -1
  122. package/src/Component/Breadcrumb/breadcrumb.css +1 -4
  123. package/src/Component/Callout/Callout.stories.ts +20 -0
  124. package/src/Component/Callout/__snapshots__/Callout.stories.ts.snap +1 -1
  125. package/src/Component/Callout/callout.css +1 -2
  126. package/src/Component/Card/Card.stories.ts +129 -14
  127. package/src/Component/Card/Card.stories.tsx +2 -2
  128. package/src/Component/Card/Components/CardContent.tsx +1 -5
  129. package/src/Component/Card/__snapshots__/Card.stories.ts.snap +24 -24
  130. package/src/Component/Card/__snapshots__/Card.stories.tsx.snap +1 -1
  131. package/src/Component/Card/card.css +2 -6
  132. package/src/Component/Card/card.twig +1 -1
  133. package/src/Component/Carousel/Carousel.stories.ts +61 -8
  134. package/src/Component/Carousel/Elements/Carousel.ts +10 -19
  135. package/src/Component/Carousel/__snapshots__/Carousel.stories.ts.snap +321 -35
  136. package/src/Component/Carousel/carousel.css +1 -2
  137. package/src/Component/ContentBlock/Components/ContentBlockContent.tsx +1 -5
  138. package/src/Component/ContentBlock/Components/ContentBlockMedia.tsx +1 -4
  139. package/src/Component/ContentBlock/ContentBlock.stories.ts +63 -13
  140. package/src/Component/ContentBlock/ContentBlock.stories.tsx +2 -2
  141. package/src/Component/ContentBlock/ContentBlock.tsx +1 -5
  142. package/src/Component/ContentBlock/__snapshots__/ContentBlock.stories.ts.snap +11 -11
  143. package/src/Component/ContentBlock/__snapshots__/ContentBlock.stories.tsx.snap +1 -1
  144. package/src/Component/Dialog/Dialog.stories.ts +78 -21
  145. package/src/Component/Dialog/Dialog.stories.tsx +2 -3
  146. package/src/Component/Dialog/Elements/Dialog.ts +7 -16
  147. package/src/Component/Dialog/__snapshots__/Dialog.stories.ts.snap +8 -11
  148. package/src/Component/Dialog/__snapshots__/Dialog.stories.tsx.snap +1 -1
  149. package/src/Component/Dialog/dialog.css +1 -2
  150. package/src/Component/Dialog/dialog.twig +1 -1
  151. package/src/Component/DropMenu/Components/DropMenuContext.tsx +4 -12
  152. package/src/Component/DropMenu/DropMenu.stories.ts +60 -1
  153. package/src/Component/DropMenu/DropMenu.tsx +2 -7
  154. package/src/Component/DropMenu/Elements/DropMenu.ts +21 -91
  155. package/src/Component/DropMenu/__snapshots__/DropMenu.stories.ts.snap +53 -11
  156. package/src/Component/DropMenu/__snapshots__/DropMenu.stories.tsx.snap +1 -1
  157. package/src/Component/DropMenu/drop-menu.css +13 -41
  158. package/src/Component/DropMenu/drop-menu.twig +8 -6
  159. package/src/Component/Filters/Elements/Filters.ts +7 -11
  160. package/src/Component/Filters/FilterItem.stories.ts +180 -0
  161. package/src/Component/Filters/Filters.stories.ts +83 -8
  162. package/src/Component/Filters/__snapshots__/FilterItem.stories.ts.snap +135 -0
  163. package/src/Component/Filters/__snapshots__/Filters.stories.ts.snap +43 -41
  164. package/src/Component/Filters/filter-item.twig +1 -1
  165. package/src/Component/Filters/filters.css +33 -17
  166. package/src/Component/GlobalAlert/Elements/ClosableAlert.ts +8 -7
  167. package/src/Component/GlobalAlert/GlobalAlert.stories.ts +60 -12
  168. package/src/Component/GlobalAlert/GlobalAlert.stories.tsx +1 -2
  169. package/src/Component/GlobalAlert/__snapshots__/GlobalAlert.stories.ts.snap +8 -6
  170. package/src/Component/GlobalAlert/__snapshots__/GlobalAlert.stories.tsx.snap +3 -3
  171. package/src/Component/HeroBanner/HeroBanner.stories.ts +84 -7
  172. package/src/Component/HeroBanner/HeroBanner.stories.tsx +4 -4
  173. package/src/Component/HeroBanner/__snapshots__/HeroBanner.stories.ts.snap +91 -99
  174. package/src/Component/HeroBanner/__snapshots__/HeroBanner.stories.tsx.snap +1 -1
  175. package/src/Component/HeroSearch/HeroSearch.stories.ts +23 -4
  176. package/src/Component/HeroSearch/HeroSearch.stories.tsx +4 -4
  177. package/src/Component/HeroSearch/__snapshots__/HeroSearch.stories.ts.snap +10 -10
  178. package/src/Component/HeroSearch/__snapshots__/HeroSearch.stories.tsx.snap +1 -1
  179. package/src/Component/InPageAlert/InPageAlert.stories.ts +76 -8
  180. package/src/Component/InPageAlert/InPageAlert.stories.tsx +1 -2
  181. package/src/Component/InPageAlert/InPageAlert.tsx +1 -4
  182. package/src/Component/InPageAlert/__snapshots__/InPageAlert.stories.ts.snap +80 -2
  183. package/src/Component/InPageAlert/__snapshots__/InPageAlert.stories.tsx.snap +1 -1
  184. package/src/Component/InPageNavigation/Elements/InPageNavigation.ts +7 -9
  185. package/src/Component/InPageNavigation/Hooks/useInPageNavigation.ts +3 -5
  186. package/src/Component/InPageNavigation/InPageNavigation.stories.ts +44 -9
  187. package/src/Component/InPageNavigation/InPageNavigation.stories.tsx +32 -40
  188. package/src/Component/InPageNavigation/__snapshots__/InPageNavigation.stories.ts.snap +152 -5
  189. package/src/Component/InPageNavigation/__snapshots__/InPageNavigation.stories.tsx.snap +1 -1
  190. package/src/Component/LinkList/LinkList.stories.ts +23 -0
  191. package/src/Component/LinkList/__snapshots__/LinkList.stories.ts.snap +8 -8
  192. package/src/Component/LinkList/__snapshots__/LinkList.stories.tsx.snap +1 -1
  193. package/src/Component/LinkList/link-list.css +1 -2
  194. package/src/Component/ListItem/Components/ListItemContent.tsx +1 -5
  195. package/src/Component/ListItem/Components/ListItemMedia.tsx +1 -4
  196. package/src/Component/ListItem/ListItem.stories.ts +91 -11
  197. package/src/Component/ListItem/ListItem.stories.tsx +6 -7
  198. package/src/Component/ListItem/__snapshots__/ListItem.stories.ts.snap +1 -1
  199. package/src/Component/ListItem/__snapshots__/ListItem.stories.tsx.snap +1 -1
  200. package/src/Component/ListItem/list-item.css +1 -2
  201. package/src/Component/Navigation/Components/DropdownLevel.tsx +5 -13
  202. package/src/Component/Navigation/Elements/Navigation.ts +6 -13
  203. package/src/Component/Navigation/Navigation.stories.ts +48 -0
  204. package/src/Component/Navigation/__snapshots__/Dropdown.stories.tsx.snap +1 -1
  205. package/src/Component/Navigation/__snapshots__/Navigation.stories.ts.snap +1 -1
  206. package/src/Component/Navigation/__snapshots__/Navigation.stories.tsx.snap +1 -1
  207. package/src/Component/Navigation/_navigation-collapsible.css +2 -4
  208. package/src/Component/Navigation/_navigation-dropdown.css +10 -32
  209. package/src/Component/Navigation/_navigation-mega.css +1 -4
  210. package/src/Component/Navigation/_navigation.css +1 -4
  211. package/src/Component/Pagination/Components/PaginationContext.tsx +5 -19
  212. package/src/Component/Pagination/Components/PaginationItem.tsx +1 -5
  213. package/src/Component/Pagination/Pagination.stories.ts +28 -0
  214. package/src/Component/Pagination/Pagination.tsx +3 -11
  215. package/src/Component/Pagination/__snapshots__/Pagination.stories.ts.snap +3 -3
  216. package/src/Component/Pagination/__snapshots__/Pagination.stories.tsx.snap +1 -1
  217. package/src/Component/Pagination/pagination.css +1 -4
  218. package/src/Component/Popover/Elements/Popover.ts +55 -0
  219. package/src/Component/Popover/Popover.stories.ts +259 -0
  220. package/src/Component/Popover/__snapshots__/Popover.stories.ts.snap +508 -0
  221. package/src/Component/{DropMenu → Popover}/polyfills.js +6 -4
  222. package/src/Component/Popover/popover.css +113 -0
  223. package/src/Component/Popover/popover.entry.js +1 -0
  224. package/src/Component/Popover/popover.twig +27 -0
  225. package/src/Component/ResultsBar/Components/ResultsBarInfo.tsx +2 -7
  226. package/src/Component/ResultsBar/Components/ResultsBarSort.tsx +1 -6
  227. package/src/Component/ResultsBar/ResultsBar.stories.ts +34 -4
  228. package/src/Component/ResultsBar/__snapshots__/ResultsBar.stories.ts.snap +3 -3
  229. package/src/Component/ResultsBar/__snapshots__/ResultsBar.stories.tsx.snap +1 -1
  230. package/src/Component/SideNavigation/SideNavigation.stories.ts +40 -0
  231. package/src/Component/SideNavigation/__snapshots__/SideNavigation.stories.ts.snap +1 -1
  232. package/src/Component/SideNavigation/side-navigation.css +3 -6
  233. package/src/Component/SocialLinks/SocialLinks.stories.ts +20 -0
  234. package/src/Component/SocialLinks/__snapshots__/SocialLinks.stories.ts.snap +5 -5
  235. package/src/Component/SocialShare/SocialShare.stories.ts +37 -0
  236. package/src/Component/SocialShare/SocialShare.tsx +2 -4
  237. package/src/Component/SocialShare/__snapshots__/SocialShare.stories.ts.snap +40 -0
  238. package/src/Component/SocialShare/__snapshots__/SocialShare.stories.tsx.snap +1 -1
  239. package/src/Component/SocialShare/social-share.twig +34 -0
  240. package/src/Component/Steps/StepItem.stories.ts +48 -0
  241. package/src/Component/Steps/Steps.stories.ts +82 -13
  242. package/src/Component/Steps/__snapshots__/StepItem.stories.ts.snap +31 -0
  243. package/src/Component/Steps/__snapshots__/Steps.stories.ts.snap +109 -28
  244. package/src/Component/Steps/step-item.twig +1 -1
  245. package/src/Component/Steps/steps.css +4 -11
  246. package/src/Component/Sticky/Elements/Sticky.ts +3 -8
  247. package/src/Component/Sticky/Sticky.stories.ts +35 -3
  248. package/src/Component/Sticky/__snapshots__/Sticky.stories.ts.snap +1 -1
  249. package/src/Component/Sticky/__snapshots__/Sticky.stories.tsx.snap +1 -1
  250. package/src/Component/Sticky/sticky.twig +1 -1
  251. package/src/Component/Tabs/Components/Tab.tsx +2 -8
  252. package/src/Component/Tabs/Components/TabPanel.tsx +1 -5
  253. package/src/Component/Tabs/Elements/Tabs.ts +21 -31
  254. package/src/Component/Tabs/TabItem.stories.ts +52 -0
  255. package/src/Component/Tabs/Tabs.stories.ts +51 -8
  256. package/src/Component/Tabs/Tabs.tsx +6 -22
  257. package/src/Component/Tabs/__snapshots__/TabItem.stories.ts.snap +12 -0
  258. package/src/Component/Tabs/__snapshots__/Tabs.stories.ts.snap +127 -11
  259. package/src/Component/Tabs/__snapshots__/Tabs.stories.tsx.snap +1 -1
  260. package/src/Component/Tabs/tab-item.twig +1 -2
  261. package/src/Component/Tabs/tabs.css +56 -59
  262. package/src/Component/Tag/Tag.stories.ts +30 -0
  263. package/src/Component/Tag/Tag.tsx +1 -5
  264. package/src/Component/Tag/__snapshots__/Tag.stories.ts.snap +1 -1
  265. package/src/Component/Tag/__snapshots__/Tag.stories.tsx.snap +1 -1
  266. package/src/Component/Tag/tag.css +1 -4
  267. package/src/Component/UtilityList/Elements/UtilityList.ts +110 -0
  268. package/src/Component/UtilityList/UtilityList.stories.ts +72 -0
  269. package/src/Component/UtilityList/__snapshots__/UtilityList.stories.ts.snap +274 -0
  270. package/src/Component/UtilityList/utility-list.css +40 -0
  271. package/src/Component/UtilityList/utility-list.entry.js +1 -0
  272. package/src/Component/UtilityList/utility-list.twig +66 -0
  273. package/src/Form/Checkbox/FormCheckbox.stories.tsx +1 -3
  274. package/src/Form/Checkbox/FormCheckbox.tsx +4 -25
  275. package/src/Form/Checkbox/__snapshots__/Checkbox.stories.ts.snap +3 -3
  276. package/src/Form/Description/Description.stories.ts +1 -2
  277. package/src/Form/Description/FormStatus.stories.ts +1 -4
  278. package/src/Form/Description/__snapshots__/Description.stories.ts.snap +1 -1
  279. package/src/Form/Description/__snapshots__/FormDescription.stories.tsx.snap +1 -1
  280. package/src/Form/Description/__snapshots__/FormStatus.stories.ts.snap +3 -3
  281. package/src/Form/Form/Form.tsx +1 -3
  282. package/src/Form/Form/__snapshots__/Form.stories.tsx.snap +1 -1
  283. package/src/Form/Form/__snapshots__/FormTitle.stories.tsx.snap +1 -1
  284. package/src/Form/FormItem/FormItem.stories.ts +3 -9
  285. package/src/Form/FormItem/__snapshots__/FormItem.stories.ts.snap +18 -18
  286. package/src/Form/FormItem/__snapshots__/FormItem.stories.tsx.snap +1 -1
  287. package/src/Form/Label/FormLabel.tsx +1 -5
  288. package/src/Form/Label/__snapshots__/FormLabel.stories.tsx.snap +1 -1
  289. package/src/Form/Label/__snapshots__/Label.stories.ts.snap +3 -3
  290. package/src/Form/Radio/FormRadio.stories.tsx +1 -3
  291. package/src/Form/Radio/FormRadio.tsx +4 -25
  292. package/src/Form/Radio/__snapshots__/Radio.stories.ts.snap +9 -9
  293. package/src/Form/Search/__snapshots__/Search.stories.ts.snap +1 -1
  294. package/src/Form/Select/FormSelect.tsx +3 -9
  295. package/src/Form/Select/__snapshots__/FormSelect.stories.tsx.snap +1 -1
  296. package/src/Form/Select/__snapshots__/Select.stories.ts.snap +2 -2
  297. package/src/Form/TextInput/FormText.tsx +3 -9
  298. package/src/Form/TextInput/TextInput.stories.ts +1 -4
  299. package/src/Form/TextInput/__snapshots__/FormText.stories.tsx.snap +1 -1
  300. package/src/Form/TextInput/__snapshots__/InputDivider.stories.ts.snap +1 -1
  301. package/src/Form/TextInput/__snapshots__/TextInput.stories.ts.snap +3 -3
  302. package/src/Form/Textarea/FormTextarea.tsx +3 -9
  303. package/src/Form/Textarea/__snapshots__/FormTextarea.stories.tsx.snap +1 -1
  304. package/src/Form/Textarea/__snapshots__/Textarea.stories.ts.snap +2 -2
  305. package/src/Form/form.css +6 -14
  306. package/src/Introduction.mdx +1 -2
  307. package/src/Layout/Footer/Footer.stories.ts +1 -5
  308. package/src/Layout/Footer/Footer.stories.tsx +2 -3
  309. package/src/Layout/Footer/Footer.tsx +3 -12
  310. package/src/Layout/Footer/__snapshots__/Footer.stories.ts.snap +4 -4
  311. package/src/Layout/Footer/__snapshots__/Footer.stories.tsx.snap +1 -1
  312. package/src/Layout/Grid/Grid.stories.ts +40 -8
  313. package/src/Layout/Grid/Grid.tsx +1 -2
  314. package/src/Layout/Grid/GridItem.stories.ts +63 -0
  315. package/src/Layout/Grid/__snapshots__/Grid.stories.ts.snap +29 -4
  316. package/src/Layout/Grid/__snapshots__/Grid.stories.tsx.snap +1 -1
  317. package/src/Layout/Grid/__snapshots__/GridItem.stories.ts.snap +19 -0
  318. package/src/Layout/Grid/grid-item.twig +3 -9
  319. package/src/Layout/Grid/grid.css +1 -4
  320. package/src/Layout/Header/Elements/GlobalToggle.ts +9 -29
  321. package/src/Layout/Header/__snapshots__/Header.stories.ts.snap +25 -45
  322. package/src/Layout/Header/__snapshots__/Header.stories.tsx.snap +3 -3
  323. package/src/Layout/Header/_toggles.css +2 -2
  324. package/src/Layout/Header/header.twig +1 -1
  325. package/src/Layout/Masthead/Masthead.stories.ts +1 -4
  326. package/src/Layout/Masthead/__snapshots__/Masthead.stories.ts.snap +3 -3
  327. package/src/Layout/Page/Page.stories.tsx +2 -2
  328. package/src/Layout/Page/__snapshots__/Page.stories.tsx.snap +3 -3
  329. package/src/Layout/Page/page.css +2 -10
  330. package/src/Layout/Section/Background.stories.ts +14 -39
  331. package/src/Layout/Section/Breakouts.stories.ts +3 -0
  332. package/src/Layout/Section/Flow.stories.ts +3 -0
  333. package/src/Layout/Section/Section.stories.ts +93 -11
  334. package/src/Layout/Section/Section.tsx +3 -13
  335. package/src/Layout/Section/SectionGrid.tsx +2 -9
  336. package/src/Layout/Section/__snapshots__/Background.stories.ts.snap +4 -4
  337. package/src/Layout/Section/__snapshots__/Breakouts.stories.ts.snap +1 -1
  338. package/src/Layout/Section/__snapshots__/Flow.stories.ts.snap +1 -1
  339. package/src/Layout/Section/__snapshots__/Section.stories.ts.snap +93 -3
  340. package/src/Layout/Section/__snapshots__/Section.stories.tsx.snap +1 -1
  341. package/src/Layout/Section/__snapshots__/SectionGrid.stories.tsx.snap +1 -1
  342. package/src/Layout/Section/section.css +2 -5
  343. package/src/Layout/Section/section.twig +1 -3
  344. package/src/Layout/Sidebar/Sidebar.stories.ts +46 -4
  345. package/src/Layout/Sidebar/Sidebar.tsx +1 -3
  346. package/src/Layout/Sidebar/__snapshots__/Sidebar.stories.ts.snap +4 -4
  347. package/src/Layout/Sidebar/__snapshots__/Sidebar.stories.tsx.snap +1 -1
  348. package/src/Utility/Context/ImageComponent.tsx +4 -8
  349. package/src/Utility/Context/LinkComponent.tsx +1 -5
  350. package/src/Utility/Drupal/drupal.css +2 -4
  351. package/src/Utility/Elements/breakpoint-loader.ts +4 -10
  352. package/src/Utility/Elements/cookie-compliance.ts +2 -8
  353. package/src/Utility/Elements/disclosure-widget.ts +11 -18
  354. package/src/Utility/Elements/io-loader.ts +4 -6
  355. package/src/Utility/Elements/keyboard.ts +4 -14
  356. package/src/Utility/Hooks/useLocalStorage.ts +5 -18
  357. package/src/Utility/Hooks/useMediaQuery.ts +1 -4
  358. package/src/Utility/Hooks/useToggle.ts +1 -3
  359. package/src/Utility/global.d.ts +1 -5
  360. package/src/Utility/utilities.ts +20 -45
  361. package/src/constants.css +7 -28
  362. package/src/enums.ts +3 -1
  363. package/src/react.ts +5 -21
  364. package/src/tokens.js +2 -2
  365. package/dist/build/chunks/disclosure-widget-DVpnRsTI.js +0 -126
  366. package/dist/build/chunks/disclosure-widget-DVpnRsTI.js.map +0 -1
  367. package/dist/build/chunks/drop-menu.entry-B4TtnC50.js +0 -132
  368. package/dist/build/chunks/drop-menu.entry-B4TtnC50.js.map +0 -1
  369. package/dist/build/chunks/keyboard-rvZ4dfGF.js +0 -104
  370. package/dist/build/chunks/keyboard-rvZ4dfGF.js.map +0 -1
  371. package/dist/build/chunks/polyfills-C-B7iqDG.js.map +0 -1
  372. package/dist/build/chunks/utilities-DXELy_An.js.map +0 -1
  373. package/src/Atom/Text/TextSizes.stories.ts +0 -25
  374. package/src/Atom/Text/text-alignment.twig +0 -5
  375. package/src/Component/Accordion/twig/accordion-example.twig +0 -36
  376. package/src/Component/Tile/README.md +0 -3
  377. package/src/Component/Tile/Tile.stories.ts +0 -49
  378. package/src/Component/Tile/Tile.stories.tsx +0 -35
  379. package/src/Component/Tile/__snapshots__/Tile.stories.ts.snap +0 -57
  380. package/src/Component/Tile/__snapshots__/Tile.stories.tsx.snap +0 -23
@@ -1,10 +1,7 @@
1
1
  import { Meta, StoryObj } from "@storybook/html-vite"
2
2
  import Component from "./content-block.twig"
3
3
  import "./content-block.css"
4
- import {
5
- ContentBlock as ContentBlockType,
6
- HeadingTypes,
7
- } from "@pnx-mixtape/ids-shape"
4
+ import { ContentBlock as ContentBlockType, HeadingTypes } from "@pnx-mixtape/ids-shape"
8
5
  import { Icons } from "../../enums"
9
6
 
10
7
  // Deps.
@@ -15,6 +12,9 @@ import LinkList from "../LinkList/link-list.twig"
15
12
  import Icon from "../../Atom/Icon/icon.twig"
16
13
  import "../LinkList/link-list.css"
17
14
 
15
+ /**
16
+ * Content Block is similar to a Card, but it is always vertical and usually includes a [LinkList](/?path=/docs/component-linklist--docs).
17
+ */
18
18
  const meta: Meta<ContentBlockType> = {
19
19
  tags: ["autodocs", "ids-mvp"],
20
20
  component: Component,
@@ -23,13 +23,13 @@ const meta: Meta<ContentBlockType> = {
23
23
  title: "Content block title",
24
24
  as: HeadingTypes.THREE,
25
25
  }),
26
+ content:
27
+ "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>",
26
28
  link: Link({
27
29
  href: "#",
28
30
  title: "Find out more",
29
31
  more: true,
30
32
  }),
31
- content:
32
- "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>",
33
33
  linkList: LinkList({
34
34
  items: [
35
35
  Link({
@@ -57,13 +57,57 @@ const meta: Meta<ContentBlockType> = {
57
57
  }),
58
58
  },
59
59
  argTypes: {
60
- // @ts-expect-error The controls follow the shape
61
- "image.src": { control: "text" },
62
- "image.alt": { control: "text" },
63
- "title.title": { control: "text" },
64
- "title.as": { options: Object.values(HeadingTypes), control: "select" },
65
- "link.href": { control: "text" },
66
- "link.title": { control: "text" },
60
+ image: {
61
+ description: "Optional [Image](/?path=/docs/atom-image--docs) component.",
62
+ control: "text",
63
+ table: {
64
+ type: { summary: "Image" },
65
+ },
66
+ },
67
+ title: {
68
+ description: "A [Heading](/?path=/docs/atom-heading--docs) component.",
69
+ control: "text",
70
+ type: {
71
+ name: "string",
72
+ required: true,
73
+ },
74
+ table: {
75
+ type: { summary: "Heading" },
76
+ },
77
+ },
78
+ content: {
79
+ description: "Content.",
80
+ control: "text",
81
+ type: {
82
+ name: "string",
83
+ required: true,
84
+ },
85
+ table: {
86
+ type: { summary: "WysiwygText" },
87
+ },
88
+ },
89
+ link: {
90
+ description: "Optional content [Link](/?path=/docs/atom-link--docs).",
91
+ control: "text",
92
+ table: {
93
+ type: { summary: "Link" },
94
+ },
95
+ },
96
+ linkList: {
97
+ description: "Optional [LinkList](/?path=/docs/component-linklist--docs).",
98
+ control: "text",
99
+ table: {
100
+ type: { summary: "LinkList" },
101
+ },
102
+ },
103
+ icon: {
104
+ description:
105
+ "Optional [Icon](/?path=/docs/atom-icon--docs), should **not** be used in conjunction with Image.",
106
+ control: "text",
107
+ table: {
108
+ type: { summary: "Icon" },
109
+ },
110
+ },
67
111
  },
68
112
  }
69
113
 
@@ -72,6 +116,9 @@ type Story = StoryObj<ContentBlockType>
72
116
 
73
117
  export const ContentBlock: Story = {}
74
118
 
119
+ /**
120
+ * Displays an [Icon](/?path=/docs/atom-icon--docs) component.
121
+ */
75
122
  export const WithIcon: Story = {
76
123
  args: {
77
124
  icon: Icon({
@@ -80,6 +127,9 @@ export const WithIcon: Story = {
80
127
  },
81
128
  }
82
129
 
130
+ /**
131
+ * Displays an [Image](/?path=/docs/atom-image--docs) component.
132
+ */
83
133
  export const WithImage: Story = {
84
134
  args: {
85
135
  image: Image({
@@ -25,8 +25,8 @@ const meta: Meta<typeof Component> = {
25
25
  <ContentBlockContent>
26
26
  <Heading as={HeadingTypes.THREE}>Content block</Heading>
27
27
  <Text>
28
- A short description to help explain enough about the subject matter
29
- to encourage visitors to learn more.
28
+ A short description to help explain enough about the subject matter to encourage
29
+ visitors to learn more.
30
30
  </Text>
31
31
  <Link more to="http://example.com">
32
32
  Learn More
@@ -6,11 +6,7 @@ type ContentBlockProps = PropsWithChildren & {
6
6
  as?: AsTypes
7
7
  }
8
8
 
9
- const ContentBlock = ({
10
- children,
11
- as = AsTypes.DIV,
12
- ...props
13
- }: ContentBlockProps): JSX.Element => {
9
+ const ContentBlock = ({ children, as = AsTypes.DIV, ...props }: ContentBlockProps): JSX.Element => {
14
10
  const Tag: JSX.ElementType = `${as}` as unknown as JSX.ElementType
15
11
  return (
16
12
  <Tag className={classNames("mx-content-block")} {...props}>
@@ -1,4 +1,4 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
1
+ // Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
2
2
 
3
3
  exports[`Component/ContentBlock ContentBlock smoke-test 1`] = `
4
4
  <div class="mx-page default">
@@ -16,7 +16,7 @@ exports[`Component/ContentBlock ContentBlock smoke-test 1`] = `
16
16
  <span>
17
17
  Music
18
18
  </span>
19
- <span class="mx-icon mx-icon--chevron-right ">
19
+ <span class="mx-icon mx-icon--chevron-right">
20
20
  </span>
21
21
  </a>
22
22
  </li>
@@ -25,7 +25,7 @@ exports[`Component/ContentBlock ContentBlock smoke-test 1`] = `
25
25
  <span>
26
26
  Performances
27
27
  </span>
28
- <span class="mx-icon mx-icon--chevron-right ">
28
+ <span class="mx-icon mx-icon--chevron-right">
29
29
  </span>
30
30
  </a>
31
31
  </li>
@@ -34,7 +34,7 @@ exports[`Component/ContentBlock ContentBlock smoke-test 1`] = `
34
34
  <span>
35
35
  Get involved
36
36
  </span>
37
- <span class="mx-icon mx-icon--chevron-right ">
37
+ <span class="mx-icon mx-icon--chevron-right">
38
38
  </span>
39
39
  </a>
40
40
  </li>
@@ -55,7 +55,7 @@ exports[`Component/ContentBlock WithIcon smoke-test 1`] = `
55
55
  <div class="mx-page default">
56
56
  <article class="mx-content-block">
57
57
  <div class="mx-content-block__icon">
58
- <span class="mx-icon mx-icon--heart-selected ">
58
+ <span class="mx-icon mx-icon--heart-selected">
59
59
  </span>
60
60
  </div>
61
61
  <div class="mx-content-block__content mx-vertical-flow-flex">
@@ -71,7 +71,7 @@ exports[`Component/ContentBlock WithIcon smoke-test 1`] = `
71
71
  <span>
72
72
  Music
73
73
  </span>
74
- <span class="mx-icon mx-icon--chevron-right ">
74
+ <span class="mx-icon mx-icon--chevron-right">
75
75
  </span>
76
76
  </a>
77
77
  </li>
@@ -80,7 +80,7 @@ exports[`Component/ContentBlock WithIcon smoke-test 1`] = `
80
80
  <span>
81
81
  Performances
82
82
  </span>
83
- <span class="mx-icon mx-icon--chevron-right ">
83
+ <span class="mx-icon mx-icon--chevron-right">
84
84
  </span>
85
85
  </a>
86
86
  </li>
@@ -89,7 +89,7 @@ exports[`Component/ContentBlock WithIcon smoke-test 1`] = `
89
89
  <span>
90
90
  Get involved
91
91
  </span>
92
- <span class="mx-icon mx-icon--chevron-right ">
92
+ <span class="mx-icon mx-icon--chevron-right">
93
93
  </span>
94
94
  </a>
95
95
  </li>
@@ -129,7 +129,7 @@ exports[`Component/ContentBlock WithImage smoke-test 1`] = `
129
129
  <span>
130
130
  Music
131
131
  </span>
132
- <span class="mx-icon mx-icon--chevron-right ">
132
+ <span class="mx-icon mx-icon--chevron-right">
133
133
  </span>
134
134
  </a>
135
135
  </li>
@@ -138,7 +138,7 @@ exports[`Component/ContentBlock WithImage smoke-test 1`] = `
138
138
  <span>
139
139
  Performances
140
140
  </span>
141
- <span class="mx-icon mx-icon--chevron-right ">
141
+ <span class="mx-icon mx-icon--chevron-right">
142
142
  </span>
143
143
  </a>
144
144
  </li>
@@ -147,7 +147,7 @@ exports[`Component/ContentBlock WithImage smoke-test 1`] = `
147
147
  <span>
148
148
  Get involved
149
149
  </span>
150
- <span class="mx-icon mx-icon--chevron-right ">
150
+ <span class="mx-icon mx-icon--chevron-right">
151
151
  </span>
152
152
  </a>
153
153
  </li>
@@ -1,4 +1,4 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
1
+ // Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
2
2
 
3
3
  exports[`Component/ContentBlock ContentBlock smoke-test 1`] = `
4
4
  <div class="mx-content-block">
@@ -1,23 +1,28 @@
1
1
  import { Meta, StoryObj } from "@storybook/html-vite"
2
+ import DrupalAttribute from "drupal-attribute"
2
3
  import Component from "./dialog.twig"
3
4
  import "./dialog.css"
4
5
  import "./Elements/Dialog"
5
- import {
6
- ButtonModifiers,
7
- Dialog as DialogType,
8
- HeadingTypes,
9
- } from "@pnx-mixtape/ids-shape"
6
+ import { ButtonModifiers, Dialog as DialogType, HeadingTypes } from "@pnx-mixtape/ids-shape"
10
7
 
11
8
  // Deps.
12
9
  import Heading from "../../Atom/Heading/heading.twig"
13
10
  import Button from "../../Atom/Button/button.twig"
14
11
  import Link from "../../Atom/Link/link.twig"
15
- import DrupalAttribute from "drupal-attribute"
16
12
 
17
13
  type MxDialogType = DialogType & {
18
14
  fullscreen?: boolean
19
15
  }
20
16
 
17
+ /**
18
+ * The Dialog component creates a native HTML dialog.
19
+ * It requires the `Dialog` custom element javascript.
20
+ *
21
+ * There should be an associated trigger [Button](/?path=/docs/atom-button--docs) or [Link](/?path=/docs/atom-link--docs)
22
+ * with a valid reference to the dialogs ID: `href="#example-dialog"` or `aria-controls="example-dialog"`.
23
+ *
24
+ * Adding the `[data-close]` attribute to a button inside the dialog will also close the dialog when clicked.
25
+ */
21
26
  const meta: Meta<MxDialogType> = {
22
27
  tags: ["autodocs", "ids-mvp"],
23
28
  component: Component,
@@ -32,14 +37,66 @@ const meta: Meta<MxDialogType> = {
32
37
  link: Button({
33
38
  title: "Let's go",
34
39
  modifiers: [ButtonModifiers.DARK],
35
-
36
40
  attributes: new DrupalAttribute()?.setAttribute("data-close", ""),
37
41
  }),
38
42
  },
39
43
  argTypes: {
40
- open: { control: "boolean" },
41
- modal: { control: "boolean" },
42
- fullscreen: { control: "boolean" },
44
+ id: {
45
+ description: "The dialog id, used to connect the dialog to the relevant trigger.",
46
+ type: {
47
+ name: "string",
48
+ required: true,
49
+ },
50
+ },
51
+ open: {
52
+ description: "Option to set the dialog as open by default.",
53
+ type: "boolean",
54
+ table: {
55
+ defaultValue: { summary: "false" },
56
+ },
57
+ },
58
+ modal: {
59
+ description: "Option to create a Modal dialog.",
60
+ type: "boolean",
61
+ table: {
62
+ defaultValue: { summary: "false" },
63
+ },
64
+ },
65
+ fullscreen: {
66
+ description: "Option to make the dialog display full screen.",
67
+ type: "boolean",
68
+ table: {
69
+ defaultValue: { summary: "false" },
70
+ },
71
+ },
72
+ title: {
73
+ description: "A [Heading](/?path=/docs/atom-heading--docs) component.",
74
+ control: "text",
75
+ table: {
76
+ type: { summary: "Heading" },
77
+ subcategory: "Dialog content",
78
+ },
79
+ },
80
+ content: {
81
+ description: "Content.",
82
+ control: "text",
83
+ type: {
84
+ name: "string",
85
+ required: true,
86
+ },
87
+ table: {
88
+ type: { summary: "WysiwygText" },
89
+ subcategory: "Dialog content",
90
+ },
91
+ },
92
+ link: {
93
+ description: "Optional content [Link](/?path=/docs/atom-link--docs).",
94
+ control: "text",
95
+ table: {
96
+ type: { summary: "Link" },
97
+ subcategory: "Dialog content",
98
+ },
99
+ },
43
100
  },
44
101
  render: args => `
45
102
  ${Link({
@@ -54,8 +111,14 @@ const meta: Meta<MxDialogType> = {
54
111
  export default meta
55
112
  type Story = StoryObj<MxDialogType>
56
113
 
114
+ /**
115
+ * Non-modal dialog, that allows interaction outside of it. See [show()](https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/show)
116
+ */
57
117
  export const Dialog: Story = {}
58
118
 
119
+ /**
120
+ * Modals display in the top layer and cover all other content (with backdrop). See [showModal()](https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/showModal)
121
+ */
59
122
  export const Modal: Story = {
60
123
  args: {
61
124
  id: "example-modal",
@@ -65,31 +128,25 @@ export const Modal: Story = {
65
128
  ${Button({
66
129
  title: "Open modal",
67
130
  modifiers: [ButtonModifiers.DARK],
68
-
69
- attributes: new DrupalAttribute()?.setAttribute(
70
- "aria-controls",
71
- "example-modal",
72
- ),
131
+ attributes: new DrupalAttribute()?.setAttribute("aria-controls", "example-modal"),
73
132
  })}
74
133
  ${Component(args)}
75
134
  `,
76
135
  }
77
136
 
137
+ /**
138
+ * Full screen dialogs always trigger the Modal behaviour.
139
+ */
78
140
  export const Fullscreen: Story = {
79
141
  args: {
80
142
  id: "example-fullscreen",
81
143
  fullscreen: true,
82
- modal: true,
83
144
  },
84
145
  render: args => `
85
146
  ${Button({
86
147
  title: "Open fullscreen modal",
87
148
  modifiers: [ButtonModifiers.DARK],
88
-
89
- attributes: new DrupalAttribute()?.setAttribute(
90
- "aria-controls",
91
- "example-fullscreen",
92
- ),
149
+ attributes: new DrupalAttribute()?.setAttribute("aria-controls", "example-fullscreen"),
93
150
  })}
94
151
  ${Component(args)}
95
152
  `,
@@ -17,9 +17,8 @@ const meta: Meta<typeof Component> = {
17
17
  <DialogContent>
18
18
  <Heading as={HeadingTypes.THREE}>Thanks, you're almost done!</Heading>
19
19
  <Text>
20
- To finish the process, you will need to upload a few more documents.
21
- Please have your confirmation email ready before starting. Are you
22
- ready?
20
+ To finish the process, you will need to upload a few more documents. Please have your
21
+ confirmation email ready before starting. Are you ready?
23
22
  </Text>
24
23
  <form method="dialog">
25
24
  <div className="mx-form-actions">
@@ -3,6 +3,7 @@
3
3
  * @file Support opening/closing, and adding a scroll lock to the body.
4
4
  */
5
5
 
6
+ // Needed until Safari supports https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/dialog#closedby
6
7
  import { handleOutsideClick, handleEscape } from "../../../Utility/utilities"
7
8
 
8
9
  export default class Dialog extends HTMLElement {
@@ -22,14 +23,10 @@ export default class Dialog extends HTMLElement {
22
23
  const { signal }: AbortController = this.controller
23
24
 
24
25
  // Open on toggle click.
25
- this.openBtns?.forEach(btn =>
26
- btn.addEventListener("click", this.handleOpen, { signal }),
27
- )
26
+ this.openBtns?.forEach(btn => btn.addEventListener("click", this.handleOpen, { signal }))
28
27
 
29
28
  // Close on close button click.
30
- this.closeBtns?.forEach(btn =>
31
- btn.addEventListener("click", this.handleClose, { signal }),
32
- )
29
+ this.closeBtns?.forEach(btn => btn.addEventListener("click", this.handleClose, { signal }))
33
30
 
34
31
  // Close on outside click.
35
32
  document.addEventListener(
@@ -61,9 +58,7 @@ export default class Dialog extends HTMLElement {
61
58
  disconnectedCallback(): void {
62
59
  if (!this.dialog) return
63
60
  if (typeof this.dialog.close === "function") this.dialog.close()
64
- this.openBtns?.forEach((btn: Element) =>
65
- btn.setAttribute("aria-expanded", "false"),
66
- )
61
+ this.openBtns?.forEach((btn: Element) => btn.setAttribute("aria-expanded", "false"))
67
62
  if (this.isModal) document.body.classList.remove(this.scrollLockClass)
68
63
  this.controller.abort()
69
64
  }
@@ -74,18 +69,14 @@ export default class Dialog extends HTMLElement {
74
69
  if (typeof this.dialog.show === "function") {
75
70
  this.isModal ? this.dialog.showModal() : this.dialog.show()
76
71
  }
77
- this.openBtns?.forEach((btn: Element) =>
78
- btn.setAttribute("aria-expanded", "true"),
79
- )
72
+ this.openBtns?.forEach((btn: Element) => btn.setAttribute("aria-expanded", "true"))
80
73
  if (this.isModal) document.body.classList.add(this.scrollLockClass)
81
74
  }
82
75
 
83
76
  handleClose = (): void => {
84
77
  if (!this.dialog) return
85
78
  if (typeof this.dialog.close === "function") this.dialog.close()
86
- this.openBtns?.forEach((btn: Element) =>
87
- btn.setAttribute("aria-expanded", "false"),
88
- )
79
+ this.openBtns?.forEach((btn: Element) => btn.setAttribute("aria-expanded", "false"))
89
80
  if (this.isModal) document.body.classList.remove(this.scrollLockClass)
90
81
  }
91
82
 
@@ -116,7 +107,7 @@ export default class Dialog extends HTMLElement {
116
107
  }
117
108
  }
118
109
 
119
- customElements.define("mx-dialog", Dialog)
110
+ if (!customElements.get("mx-dialog")) customElements.define("mx-dialog", Dialog)
120
111
 
121
112
  declare global {
122
113
  interface HTMLElementTagNameMap {
@@ -1,4 +1,4 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
1
+ // Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
2
2
 
3
3
  exports[`Component/Dialog Dialog smoke-test 1`] = `
4
4
  <div class="mx-page default">
@@ -10,7 +10,7 @@ exports[`Component/Dialog Dialog smoke-test 1`] = `
10
10
  </span>
11
11
  </a>
12
12
  <mx-dialog id="unique-0">
13
- <dialog class="mx-dialog ">
13
+ <dialog class="mx-dialog">
14
14
  <button autofocus
15
15
  class="mx-button mx-button--icon-only mx-icon mx-icon--close"
16
16
  data-close
@@ -24,8 +24,7 @@ exports[`Component/Dialog Dialog smoke-test 1`] = `
24
24
  <p>
25
25
  I'm baby air plant hashtag letterpress blue bottle. Cloud bread dreamcatcher everyday carry lumbersexual, iceland cardigan swag chicharrones lo-fi fanny pack affogato freegan XOXO shaman. Shoreditch cloud bread waistcoat tbh XOXO. Chillwave pour-over umami pug glossier health goth.
26
26
  </p>
27
- <button data-close
28
- class="mx-button mx-button--dark"
27
+ <button class="mx-button mx-button--dark"
29
28
  type="button"
30
29
  >
31
30
  <span>
@@ -41,7 +40,7 @@ exports[`Component/Dialog Dialog smoke-test 1`] = `
41
40
  exports[`Component/Dialog Fullscreen smoke-test 1`] = `
42
41
  <div class="mx-page default">
43
42
  <button aria-controls="unique-0"
44
- class="mx-button mx-button--dark"
43
+ class="mx-button mx-button--dark"
45
44
  type="button"
46
45
  >
47
46
  <span>
@@ -65,8 +64,7 @@ exports[`Component/Dialog Fullscreen smoke-test 1`] = `
65
64
  <p>
66
65
  I'm baby air plant hashtag letterpress blue bottle. Cloud bread dreamcatcher everyday carry lumbersexual, iceland cardigan swag chicharrones lo-fi fanny pack affogato freegan XOXO shaman. Shoreditch cloud bread waistcoat tbh XOXO. Chillwave pour-over umami pug glossier health goth.
67
66
  </p>
68
- <button data-close
69
- class="mx-button mx-button--dark"
67
+ <button class="mx-button mx-button--dark"
70
68
  type="button"
71
69
  >
72
70
  <span>
@@ -82,7 +80,7 @@ exports[`Component/Dialog Fullscreen smoke-test 1`] = `
82
80
  exports[`Component/Dialog Modal smoke-test 1`] = `
83
81
  <div class="mx-page default">
84
82
  <button aria-controls="unique-0"
85
- class="mx-button mx-button--dark"
83
+ class="mx-button mx-button--dark"
86
84
  type="button"
87
85
  >
88
86
  <span>
@@ -92,7 +90,7 @@ exports[`Component/Dialog Modal smoke-test 1`] = `
92
90
  <mx-dialog id="unique-0"
93
91
  data-modal
94
92
  >
95
- <dialog class="mx-dialog ">
93
+ <dialog class="mx-dialog">
96
94
  <button autofocus
97
95
  class="mx-button mx-button--icon-only mx-icon mx-icon--close"
98
96
  data-close
@@ -106,8 +104,7 @@ exports[`Component/Dialog Modal smoke-test 1`] = `
106
104
  <p>
107
105
  I'm baby air plant hashtag letterpress blue bottle. Cloud bread dreamcatcher everyday carry lumbersexual, iceland cardigan swag chicharrones lo-fi fanny pack affogato freegan XOXO shaman. Shoreditch cloud bread waistcoat tbh XOXO. Chillwave pour-over umami pug glossier health goth.
108
106
  </p>
109
- <button data-close
110
- class="mx-button mx-button--dark"
107
+ <button class="mx-button mx-button--dark"
111
108
  type="button"
112
109
  >
113
110
  <span>
@@ -1,4 +1,4 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
1
+ // Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
2
2
 
3
3
  exports[`Component/Dialog Dialog smoke-test 1`] = `
4
4
  <dialog class="mx-dialog"
@@ -15,8 +15,7 @@
15
15
  overflow: auto hidden;
16
16
  overscroll-behavior: contain;
17
17
  background-color: var(--dialog-background, var(--colour-background));
18
- border: var(--line-width, 1px) solid
19
- var(--line-colour, var(--colour-border));
18
+ border: var(--line-width, 1px) solid var(--line-colour, var(--colour-border));
20
19
  padding: 0;
21
20
  place-self: center;
22
21
  opacity: 0;
@@ -5,7 +5,7 @@
5
5
  ] %}
6
6
  {% set attributes = (attributes ?? create_attribute()).addClass(classes) %}
7
7
 
8
- <mx-dialog id="{{ id }}"{% if modal %} data-modal{% endif %}>
8
+ <mx-dialog id="{{ id }}"{% if modal or fullscreen %} data-modal{% endif %}>
9
9
  <dialog{{ attributes }}{% if open %} open{% endif %}>
10
10
  <button autofocus class="mx-button mx-button--icon-only mx-icon mx-icon--close" data-close>Close dialog</button>
11
11
  <div class="mx-dialog__content mx-vertical-flow">
@@ -36,11 +36,7 @@ type DropMenuContextValues = {
36
36
  type DropMenuProviderProps = PropsWithChildren & {
37
37
  id: string
38
38
  multiple?: boolean
39
- onClick?: (
40
- event: MouseEvent | KeyboardEvent,
41
- key: string,
42
- updated?: string[],
43
- ) => void
39
+ onClick?: (event: MouseEvent | KeyboardEvent, key: string, updated?: string[]) => void
44
40
  closeOnClick?: boolean
45
41
  selectedItem?: string[]
46
42
  focusRef?: RefObject<HTMLElement>
@@ -77,7 +73,7 @@ const DropMenuProvider = ({
77
73
  if (!popoverRef.current || polyfilled.current) return
78
74
  const polyfill = async () => {
79
75
  if (!("anchorName" in document.documentElement.style)) {
80
- const { default: Polyfills } = await import("../polyfills")
76
+ const { default: Polyfills } = await import("../../Popover/polyfills")
81
77
  new Polyfills(popoverRef.current)
82
78
  polyfilled.current = true
83
79
  }
@@ -119,8 +115,7 @@ const DropMenuProvider = ({
119
115
  popoverRef.current.querySelectorAll(":scope > button")
120
116
  if (!items) return
121
117
 
122
- const attachKeyboardMenu = () =>
123
- keyboard.attachMenu(popoverRef.current, items)
118
+ const attachKeyboardMenu = () => keyboard.attachMenu(popoverRef.current, items)
124
119
  popoverRef.current.addEventListener("focusin", attachKeyboardMenu, {
125
120
  signal,
126
121
  })
@@ -137,10 +132,7 @@ const DropMenuProvider = ({
137
132
  }, [on, popoverRef])
138
133
 
139
134
  // Handle item click events.
140
- const handleClick = (
141
- event: MouseEvent | KeyboardEvent,
142
- key: string,
143
- ): void => {
135
+ const handleClick = (event: MouseEvent | KeyboardEvent, key: string): void => {
144
136
  event.preventDefault()
145
137
  let updated: string[] = []
146
138
  if (selected.includes(key)) {