@pnx-mixtape/mxds 0.0.22 → 0.0.24

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 (399) hide show
  1. package/.storybook/decorators.ts +7 -0
  2. package/.storybook/main.ts +21 -0
  3. package/.storybook/manager.ts +6 -0
  4. package/.storybook/preview.ts +60 -0
  5. package/.storybook/public/demo-logo.svg +4 -0
  6. package/.storybook/public/design-system.svg +1 -0
  7. package/.storybook/public/favicon.svg +7 -0
  8. package/.storybook/public/mixtape-logo.png +0 -0
  9. package/.storybook/public/mixtape.webp +0 -0
  10. package/.storybook/public/pinto.png +0 -0
  11. package/.storybook/public/pinto.svg +1 -0
  12. package/.storybook/public/xb.png +0 -0
  13. package/.storybook/public/xb.svg +1 -0
  14. package/.storybook/src/global.d.ts +16 -0
  15. package/.storybook/src/theme.ts +8 -0
  16. package/.storybook/storybook.css +35 -0
  17. package/.storybook/test-runner.ts +77 -0
  18. package/.storybook/theme-demo.css +89 -0
  19. package/dist/build/accordion.entry.js +32 -43
  20. package/dist/build/accordion.entry.js.map +1 -1
  21. package/dist/build/base.css +17 -39
  22. package/dist/build/button.css +9 -10
  23. package/dist/build/chunks/{Accordion-O-huO4At.js → Accordion-D1HQ0FDq.js} +23 -21
  24. package/dist/build/chunks/{Accordion-O-huO4At.js.map → Accordion-D1HQ0FDq.js.map} +1 -1
  25. package/dist/build/chunks/disclosure-widget-CdjCdx7t.js +129 -0
  26. package/dist/build/chunks/disclosure-widget-CdjCdx7t.js.map +1 -0
  27. package/dist/build/chunks/drop-menu.entry-fzV-_VFl.js +70 -0
  28. package/dist/build/chunks/drop-menu.entry-fzV-_VFl.js.map +1 -0
  29. package/dist/build/chunks/{polyfills-C-B7iqDG.js → polyfills-DnrsypYs.js} +35 -26
  30. package/dist/build/chunks/polyfills-DnrsypYs.js.map +1 -0
  31. package/dist/build/chunks/popover.entry-BQvyR0d5.js +38 -0
  32. package/dist/build/chunks/popover.entry-BQvyR0d5.js.map +1 -0
  33. package/dist/build/chunks/{utilities-DXELy_An.js → utilities-Ci7wwNeg.js} +9 -106
  34. package/dist/build/chunks/utilities-Ci7wwNeg.js.map +1 -0
  35. package/dist/build/constants.css +10 -31
  36. package/dist/build/dialog.entry.js +23 -31
  37. package/dist/build/dialog.entry.js.map +1 -1
  38. package/dist/build/drop-menu.entry.js +1 -1
  39. package/dist/build/drupal.css +5 -9
  40. package/dist/build/filters.entry.js +54 -50
  41. package/dist/build/filters.entry.js.map +1 -1
  42. package/dist/build/form.css +12 -26
  43. package/dist/build/global-alert.entry.js +26 -19
  44. package/dist/build/global-alert.entry.js.map +1 -1
  45. package/dist/build/grid.css +3 -9
  46. package/dist/build/header.entry.js +93 -88
  47. package/dist/build/header.entry.js.map +1 -1
  48. package/dist/build/icon.css +3 -3
  49. package/dist/build/in-page-navigation.entry.js +16 -12
  50. package/dist/build/in-page-navigation.entry.js.map +1 -1
  51. package/dist/build/navigation.css +9 -23
  52. package/dist/build/navigation.entry.js +148 -50
  53. package/dist/build/navigation.entry.js.map +1 -1
  54. package/dist/build/page.css +1 -1
  55. package/dist/build/popover.css +119 -0
  56. package/dist/build/popover.entry.js +2 -0
  57. package/dist/build/popover.entry.js.map +1 -0
  58. package/dist/build/section.css +1 -1
  59. package/dist/build/sticky.entry.js +11 -12
  60. package/dist/build/sticky.entry.js.map +1 -1
  61. package/dist/build/tabs.entry.js +108 -91
  62. package/dist/build/tabs.entry.js.map +1 -1
  63. package/dist/build/utility-list.css +43 -0
  64. package/dist/build/utility-list.entry.js +80 -0
  65. package/dist/build/utility-list.entry.js.map +1 -0
  66. package/package.json +13 -12
  67. package/src/Atom/{Base.mdx → Atom.mdx} +19 -19
  68. package/src/Atom/Background/{Backgrounds.stories.ts → Background.stories.ts} +23 -5
  69. package/src/Atom/Background/__snapshots__/{Backgrounds.stories.ts.snap → Background.stories.ts.snap} +86 -26
  70. package/src/Atom/Background/_background.css +9 -12
  71. package/src/Atom/Background/backgrounds.twig +6 -4
  72. package/src/Atom/Blockquote/_blockquote.css +1 -2
  73. package/src/Atom/Button/Button.stories.ts +128 -20
  74. package/src/Atom/Button/__snapshots__/Button.stories.ts.snap +75 -11
  75. package/src/Atom/Button/__snapshots__/Button.stories.tsx.snap +1 -1
  76. package/src/Atom/Button/_buttons-styles.css +18 -6
  77. package/src/Atom/Button/_buttons.css +4 -5
  78. package/src/Atom/DefinitionList/DefinitionList.stories.ts +20 -3
  79. package/src/Atom/DefinitionList/DefinitionList.stories.tsx +3 -9
  80. package/src/Atom/DefinitionList/DefinitionList.tsx +3 -4
  81. package/src/Atom/DefinitionList/__snapshots__/DefinitionList.stories.ts.snap +1 -1
  82. package/src/Atom/DefinitionList/__snapshots__/DefinitionList.stories.tsx.snap +1 -1
  83. package/src/Atom/Heading/Heading.stories.ts +49 -7
  84. package/src/Atom/Heading/Heading.tsx +1 -6
  85. package/src/Atom/Heading/__snapshots__/Heading.stories.ts.snap +9 -1
  86. package/src/Atom/Heading/__snapshots__/Heading.stories.tsx.snap +1 -1
  87. package/src/Atom/Heading/_headings.css +1 -2
  88. package/src/Atom/Icon/Icon.mdx +5 -1
  89. package/src/Atom/Icon/Icon.stories.ts +76 -6
  90. package/src/Atom/Icon/Icon.tsx +1 -8
  91. package/src/Atom/Icon/__snapshots__/Icon.stories.ts.snap +18 -4
  92. package/src/Atom/Icon/__snapshots__/Icon.stories.tsx.snap +1 -1
  93. package/src/Atom/Icon/_extended-set.css +0 -8
  94. package/src/Atom/Icon/_icon.css +9 -1
  95. package/src/Atom/Image/Image.stories.ts +4 -3
  96. package/src/Atom/Image/__snapshots__/Image.stories.ts.snap +1 -1
  97. package/src/Atom/Link/Link.stories.ts +74 -7
  98. package/src/Atom/Link/__snapshots__/Link.stories.ts.snap +4 -4
  99. package/src/Atom/Link/__snapshots__/Link.stories.tsx.snap +1 -1
  100. package/src/Atom/Link/_links.css +1 -0
  101. package/src/Atom/Media/Media.stories.ts +34 -5
  102. package/src/Atom/Media/Media.tsx +1 -6
  103. package/src/Atom/Media/__snapshots__/Media.stories.ts.snap +2 -2
  104. package/src/Atom/Media/__snapshots__/Media.stories.tsx.snap +1 -1
  105. package/src/Atom/Media/_media.css +2 -10
  106. package/src/Atom/Spacing/Spacing.stories.ts +45 -31
  107. package/src/Atom/Spacing/__snapshots__/Spacing.stories.ts.snap +5 -4
  108. package/src/Atom/Spacing/spacing.twig +5 -2
  109. package/src/Atom/Table/Table.stories.ts +0 -1
  110. package/src/Atom/Table/__snapshots__/Table.stories.ts.snap +1 -1
  111. package/src/Atom/Table/__snapshots__/TableResponsive.stories.ts.snap +1 -1
  112. package/src/Atom/Table/_table.css +1 -2
  113. package/src/Atom/Text/Text.stories.ts +62 -0
  114. package/src/Atom/Text/__snapshots__/{TextSizes.stories.ts.snap → Text.stories.ts.snap} +14 -27
  115. package/src/Atom/Text/__snapshots__/Text.stories.tsx.snap +1 -1
  116. package/src/Atom/Text/_text-sizes.css +2 -4
  117. package/src/Atom/Text/text-style.twig +11 -1
  118. package/src/Atom/Text/text-styles-example.twig +2 -16
  119. package/src/Atom/Video/Video.stories.ts +6 -4
  120. package/src/Atom/Video/Video.tsx +1 -5
  121. package/src/Atom/Video/__snapshots__/Video.stories.ts.snap +1 -1
  122. package/src/Atom/_generic.css +2 -4
  123. package/src/Atom/_hr.css +1 -2
  124. package/src/Component/Accordion/Accordion.stories.ts +26 -8
  125. package/src/Component/Accordion/Accordion.stories.tsx +8 -10
  126. package/src/Component/Accordion/Accordion.tsx +2 -13
  127. package/src/Component/Accordion/AccordionItem.stories.ts +90 -0
  128. package/src/Component/Accordion/Components/AccordionContent.tsx +1 -5
  129. package/src/Component/Accordion/Components/AccordionTitle.tsx +1 -4
  130. package/src/Component/Accordion/Elements/Accordion.ts +1 -1
  131. package/src/Component/Accordion/Elements/AccordionDiv.ts +4 -11
  132. package/src/Component/Accordion/Elements/AccordionGroup.ts +10 -24
  133. package/src/Component/Accordion/Elements/AccordionMobile.ts +4 -4
  134. package/src/Component/Accordion/__snapshots__/Accordion.stories.ts.snap +17 -6
  135. package/src/Component/Accordion/__snapshots__/Accordion.stories.tsx.snap +1 -1
  136. package/src/Component/Accordion/__snapshots__/AccordionItem.stories.ts.snap +90 -0
  137. package/src/Component/Accordion/accordion.css +7 -5
  138. package/src/Component/Accordion/twig/accordion-div.twig +13 -11
  139. package/src/Component/Accordion/twig/accordion-mobile.twig +13 -11
  140. package/src/Component/Breadcrumb/Breadcrumb.stories.ts +14 -0
  141. package/src/Component/Breadcrumb/Breadcrumb.tsx +2 -12
  142. package/src/Component/Breadcrumb/__snapshots__/Breadcrumb.stories.ts.snap +1 -1
  143. package/src/Component/Breadcrumb/__snapshots__/Breadcrumb.stories.tsx.snap +1 -1
  144. package/src/Component/Breadcrumb/breadcrumb.css +1 -4
  145. package/src/Component/Callout/Callout.stories.ts +20 -0
  146. package/src/Component/Callout/__snapshots__/Callout.stories.ts.snap +1 -1
  147. package/src/Component/Callout/callout.css +1 -2
  148. package/src/Component/Card/Card.stories.ts +129 -14
  149. package/src/Component/Card/Card.stories.tsx +2 -2
  150. package/src/Component/Card/Components/CardContent.tsx +1 -5
  151. package/src/Component/Card/__snapshots__/Card.stories.ts.snap +16 -16
  152. package/src/Component/Card/__snapshots__/Card.stories.tsx.snap +1 -1
  153. package/src/Component/Card/card.css +2 -6
  154. package/src/Component/Carousel/Carousel.stories.ts +61 -8
  155. package/src/Component/Carousel/Elements/Carousel.ts +10 -19
  156. package/src/Component/Carousel/__snapshots__/Carousel.stories.ts.snap +288 -2
  157. package/src/Component/Carousel/carousel.css +1 -2
  158. package/src/Component/ContentBlock/Components/ContentBlockContent.tsx +1 -5
  159. package/src/Component/ContentBlock/Components/ContentBlockMedia.tsx +1 -4
  160. package/src/Component/ContentBlock/ContentBlock.stories.ts +63 -13
  161. package/src/Component/ContentBlock/ContentBlock.stories.tsx +2 -2
  162. package/src/Component/ContentBlock/ContentBlock.tsx +1 -5
  163. package/src/Component/ContentBlock/__snapshots__/ContentBlock.stories.ts.snap +11 -11
  164. package/src/Component/ContentBlock/__snapshots__/ContentBlock.stories.tsx.snap +1 -1
  165. package/src/Component/Dialog/Dialog.stories.ts +78 -21
  166. package/src/Component/Dialog/Dialog.stories.tsx +2 -3
  167. package/src/Component/Dialog/Elements/Dialog.ts +7 -16
  168. package/src/Component/Dialog/__snapshots__/Dialog.stories.ts.snap +8 -11
  169. package/src/Component/Dialog/__snapshots__/Dialog.stories.tsx.snap +1 -1
  170. package/src/Component/Dialog/dialog.css +1 -2
  171. package/src/Component/Dialog/dialog.twig +1 -1
  172. package/src/Component/DropMenu/Components/DropMenuContext.tsx +4 -12
  173. package/src/Component/DropMenu/DropMenu.stories.ts +60 -1
  174. package/src/Component/DropMenu/DropMenu.tsx +2 -7
  175. package/src/Component/DropMenu/Elements/DropMenu.ts +21 -91
  176. package/src/Component/DropMenu/__snapshots__/DropMenu.stories.ts.snap +53 -11
  177. package/src/Component/DropMenu/__snapshots__/DropMenu.stories.tsx.snap +1 -1
  178. package/src/Component/DropMenu/drop-menu.css +13 -41
  179. package/src/Component/DropMenu/drop-menu.twig +8 -6
  180. package/src/Component/Filters/Elements/Filters.ts +7 -11
  181. package/src/Component/Filters/FilterItem.stories.ts +180 -0
  182. package/src/Component/Filters/Filters.stories.ts +83 -8
  183. package/src/Component/Filters/__snapshots__/FilterItem.stories.ts.snap +135 -0
  184. package/src/Component/Filters/__snapshots__/Filters.stories.ts.snap +43 -41
  185. package/src/Component/Filters/filter-item.twig +1 -1
  186. package/src/Component/Filters/filters.css +33 -17
  187. package/src/Component/GlobalAlert/Elements/ClosableAlert.ts +8 -7
  188. package/src/Component/GlobalAlert/GlobalAlert.stories.ts +60 -12
  189. package/src/Component/GlobalAlert/GlobalAlert.stories.tsx +1 -2
  190. package/src/Component/GlobalAlert/__snapshots__/GlobalAlert.stories.ts.snap +8 -6
  191. package/src/Component/GlobalAlert/__snapshots__/GlobalAlert.stories.tsx.snap +3 -3
  192. package/src/Component/HeroBanner/HeroBanner.stories.ts +84 -7
  193. package/src/Component/HeroBanner/HeroBanner.stories.tsx +4 -4
  194. package/src/Component/HeroBanner/__snapshots__/HeroBanner.stories.ts.snap +91 -99
  195. package/src/Component/HeroBanner/__snapshots__/HeroBanner.stories.tsx.snap +1 -1
  196. package/src/Component/HeroSearch/HeroSearch.stories.ts +23 -6
  197. package/src/Component/HeroSearch/HeroSearch.stories.tsx +4 -4
  198. package/src/Component/HeroSearch/__snapshots__/HeroSearch.stories.ts.snap +142 -148
  199. package/src/Component/HeroSearch/__snapshots__/HeroSearch.stories.tsx.snap +1 -1
  200. package/src/Component/InPageAlert/InPageAlert.stories.ts +76 -8
  201. package/src/Component/InPageAlert/InPageAlert.stories.tsx +1 -2
  202. package/src/Component/InPageAlert/InPageAlert.tsx +1 -4
  203. package/src/Component/InPageAlert/__snapshots__/InPageAlert.stories.ts.snap +80 -2
  204. package/src/Component/InPageAlert/__snapshots__/InPageAlert.stories.tsx.snap +1 -1
  205. package/src/Component/InPageNavigation/Elements/InPageNavigation.ts +7 -9
  206. package/src/Component/InPageNavigation/Hooks/useInPageNavigation.ts +3 -5
  207. package/src/Component/InPageNavigation/InPageNavigation.stories.ts +44 -9
  208. package/src/Component/InPageNavigation/InPageNavigation.stories.tsx +32 -40
  209. package/src/Component/InPageNavigation/__snapshots__/InPageNavigation.stories.ts.snap +152 -5
  210. package/src/Component/InPageNavigation/__snapshots__/InPageNavigation.stories.tsx.snap +1 -1
  211. package/src/Component/LinkList/LinkList.stories.ts +23 -0
  212. package/src/Component/LinkList/__snapshots__/LinkList.stories.ts.snap +8 -8
  213. package/src/Component/LinkList/__snapshots__/LinkList.stories.tsx.snap +1 -1
  214. package/src/Component/LinkList/link-list.css +1 -2
  215. package/src/Component/ListItem/Components/ListItemContent.tsx +1 -5
  216. package/src/Component/ListItem/Components/ListItemMedia.tsx +1 -4
  217. package/src/Component/ListItem/ListItem.stories.ts +91 -11
  218. package/src/Component/ListItem/ListItem.stories.tsx +6 -7
  219. package/src/Component/ListItem/__snapshots__/ListItem.stories.ts.snap +1 -1
  220. package/src/Component/ListItem/__snapshots__/ListItem.stories.tsx.snap +1 -1
  221. package/src/Component/ListItem/list-item.css +1 -2
  222. package/src/Component/Navigation/Components/DropdownLevel.tsx +5 -13
  223. package/src/Component/Navigation/Elements/Navigation.ts +6 -13
  224. package/src/Component/Navigation/Navigation.stories.ts +48 -0
  225. package/src/Component/Navigation/__snapshots__/Dropdown.stories.tsx.snap +1 -1
  226. package/src/Component/Navigation/__snapshots__/Navigation.stories.ts.snap +1 -1
  227. package/src/Component/Navigation/__snapshots__/Navigation.stories.tsx.snap +1 -1
  228. package/src/Component/Navigation/_navigation-collapsible.css +2 -4
  229. package/src/Component/Navigation/_navigation-dropdown.css +2 -6
  230. package/src/Component/Navigation/_navigation-mega.css +1 -4
  231. package/src/Component/Navigation/_navigation.css +1 -4
  232. package/src/Component/Pagination/Components/PaginationContext.tsx +5 -19
  233. package/src/Component/Pagination/Components/PaginationItem.tsx +1 -5
  234. package/src/Component/Pagination/Pagination.stories.ts +28 -0
  235. package/src/Component/Pagination/Pagination.tsx +3 -11
  236. package/src/Component/Pagination/__snapshots__/Pagination.stories.ts.snap +3 -3
  237. package/src/Component/Pagination/__snapshots__/Pagination.stories.tsx.snap +1 -1
  238. package/src/Component/Pagination/pagination.css +1 -4
  239. package/src/Component/Popover/Elements/Popover.ts +55 -0
  240. package/src/Component/Popover/Popover.stories.ts +304 -0
  241. package/src/Component/Popover/__snapshots__/Popover.stories.ts.snap +534 -0
  242. package/src/Component/{DropMenu → Popover}/polyfills.js +6 -4
  243. package/src/Component/Popover/popover.css +113 -0
  244. package/src/Component/Popover/popover.entry.js +1 -0
  245. package/src/Component/Popover/popover.twig +27 -0
  246. package/src/Component/ResultsBar/Components/ResultsBarInfo.tsx +2 -7
  247. package/src/Component/ResultsBar/Components/ResultsBarSort.tsx +1 -6
  248. package/src/Component/ResultsBar/ResultsBar.stories.ts +34 -4
  249. package/src/Component/ResultsBar/__snapshots__/ResultsBar.stories.ts.snap +3 -3
  250. package/src/Component/ResultsBar/__snapshots__/ResultsBar.stories.tsx.snap +1 -1
  251. package/src/Component/SideNavigation/SideNavigation.stories.ts +40 -0
  252. package/src/Component/SideNavigation/__snapshots__/SideNavigation.stories.ts.snap +1 -1
  253. package/src/Component/SideNavigation/side-navigation.css +3 -6
  254. package/src/Component/SocialLinks/SocialLinks.stories.ts +20 -0
  255. package/src/Component/SocialLinks/__snapshots__/SocialLinks.stories.ts.snap +5 -5
  256. package/src/Component/SocialShare/SocialShare.stories.ts +37 -0
  257. package/src/Component/SocialShare/SocialShare.tsx +2 -4
  258. package/src/Component/SocialShare/__snapshots__/SocialShare.stories.ts.snap +40 -0
  259. package/src/Component/SocialShare/__snapshots__/SocialShare.stories.tsx.snap +1 -1
  260. package/src/Component/SocialShare/social-share.twig +34 -0
  261. package/src/Component/Steps/StepItem.stories.ts +48 -0
  262. package/src/Component/Steps/Steps.stories.ts +82 -13
  263. package/src/Component/Steps/__snapshots__/StepItem.stories.ts.snap +31 -0
  264. package/src/Component/Steps/__snapshots__/Steps.stories.ts.snap +97 -16
  265. package/src/Component/Steps/steps.css +8 -14
  266. package/src/Component/Sticky/Elements/Sticky.ts +3 -8
  267. package/src/Component/Sticky/Sticky.stories.ts +35 -3
  268. package/src/Component/Sticky/__snapshots__/Sticky.stories.ts.snap +1 -1
  269. package/src/Component/Sticky/__snapshots__/Sticky.stories.tsx.snap +1 -1
  270. package/src/Component/Sticky/sticky.twig +1 -1
  271. package/src/Component/Tabs/Components/Tab.tsx +2 -8
  272. package/src/Component/Tabs/Components/TabPanel.tsx +1 -5
  273. package/src/Component/Tabs/Elements/Tabs.ts +21 -31
  274. package/src/Component/Tabs/TabItem.stories.ts +52 -0
  275. package/src/Component/Tabs/Tabs.stories.ts +51 -8
  276. package/src/Component/Tabs/Tabs.tsx +6 -22
  277. package/src/Component/Tabs/__snapshots__/TabItem.stories.ts.snap +12 -0
  278. package/src/Component/Tabs/__snapshots__/Tabs.stories.ts.snap +127 -11
  279. package/src/Component/Tabs/__snapshots__/Tabs.stories.tsx.snap +1 -1
  280. package/src/Component/Tabs/tab-item.twig +1 -2
  281. package/src/Component/Tabs/tabs.css +56 -59
  282. package/src/Component/Tag/Tag.stories.ts +30 -0
  283. package/src/Component/Tag/Tag.tsx +1 -5
  284. package/src/Component/Tag/__snapshots__/Tag.stories.ts.snap +1 -1
  285. package/src/Component/Tag/__snapshots__/Tag.stories.tsx.snap +1 -1
  286. package/src/Component/Tag/tag.css +1 -4
  287. package/src/Component/UtilityList/Elements/UtilityList.ts +110 -0
  288. package/src/Component/UtilityList/UtilityList.stories.ts +72 -0
  289. package/src/Component/UtilityList/__snapshots__/UtilityList.stories.ts.snap +274 -0
  290. package/src/Component/UtilityList/utility-list.css +40 -0
  291. package/src/Component/UtilityList/utility-list.entry.js +1 -0
  292. package/src/Component/UtilityList/utility-list.twig +66 -0
  293. package/src/Form/Checkbox/FormCheckbox.stories.tsx +1 -3
  294. package/src/Form/Checkbox/FormCheckbox.tsx +4 -25
  295. package/src/Form/Checkbox/__snapshots__/Checkbox.stories.ts.snap +3 -3
  296. package/src/Form/Description/Description.stories.ts +1 -2
  297. package/src/Form/Description/FormStatus.stories.ts +1 -4
  298. package/src/Form/Description/__snapshots__/Description.stories.ts.snap +1 -1
  299. package/src/Form/Description/__snapshots__/FormDescription.stories.tsx.snap +1 -1
  300. package/src/Form/Description/__snapshots__/FormStatus.stories.ts.snap +3 -3
  301. package/src/Form/Form/Form.tsx +1 -3
  302. package/src/Form/Form/__snapshots__/Form.stories.tsx.snap +1 -1
  303. package/src/Form/Form/__snapshots__/FormTitle.stories.tsx.snap +1 -1
  304. package/src/Form/FormItem/FormItem.stories.ts +3 -9
  305. package/src/Form/FormItem/__snapshots__/FormItem.stories.ts.snap +18 -18
  306. package/src/Form/FormItem/__snapshots__/FormItem.stories.tsx.snap +1 -1
  307. package/src/Form/Label/FormLabel.tsx +1 -5
  308. package/src/Form/Label/__snapshots__/FormLabel.stories.tsx.snap +1 -1
  309. package/src/Form/Label/__snapshots__/Label.stories.ts.snap +3 -3
  310. package/src/Form/Radio/FormRadio.stories.tsx +1 -3
  311. package/src/Form/Radio/FormRadio.tsx +4 -25
  312. package/src/Form/Radio/__snapshots__/Radio.stories.ts.snap +9 -9
  313. package/src/Form/Search/__snapshots__/Search.stories.ts.snap +1 -1
  314. package/src/Form/Select/FormSelect.tsx +3 -9
  315. package/src/Form/Select/__snapshots__/FormSelect.stories.tsx.snap +1 -1
  316. package/src/Form/Select/__snapshots__/Select.stories.ts.snap +2 -2
  317. package/src/Form/TextInput/FormText.tsx +3 -9
  318. package/src/Form/TextInput/InputDivider.stories.ts +0 -1
  319. package/src/Form/TextInput/TextInput.stories.ts +1 -4
  320. package/src/Form/TextInput/__snapshots__/FormText.stories.tsx.snap +1 -1
  321. package/src/Form/TextInput/__snapshots__/InputDivider.stories.ts.snap +2 -2
  322. package/src/Form/TextInput/__snapshots__/TextInput.stories.ts.snap +3 -3
  323. package/src/Form/Textarea/FormTextarea.tsx +3 -9
  324. package/src/Form/Textarea/__snapshots__/FormTextarea.stories.tsx.snap +1 -1
  325. package/src/Form/Textarea/__snapshots__/Textarea.stories.ts.snap +2 -2
  326. package/src/Form/form.css +6 -14
  327. package/src/Introduction.mdx +1 -2
  328. package/src/Layout/Footer/Footer.stories.ts +1 -5
  329. package/src/Layout/Footer/Footer.stories.tsx +2 -3
  330. package/src/Layout/Footer/Footer.tsx +3 -12
  331. package/src/Layout/Footer/__snapshots__/Footer.stories.ts.snap +4 -4
  332. package/src/Layout/Footer/__snapshots__/Footer.stories.tsx.snap +1 -1
  333. package/src/Layout/Grid/Grid.stories.ts +40 -8
  334. package/src/Layout/Grid/Grid.tsx +1 -2
  335. package/src/Layout/Grid/GridItem.stories.ts +63 -0
  336. package/src/Layout/Grid/__snapshots__/Grid.stories.ts.snap +29 -4
  337. package/src/Layout/Grid/__snapshots__/Grid.stories.tsx.snap +1 -1
  338. package/src/Layout/Grid/__snapshots__/GridItem.stories.ts.snap +19 -0
  339. package/src/Layout/Grid/grid-item.twig +3 -9
  340. package/src/Layout/Grid/grid.css +1 -4
  341. package/src/Layout/Header/Elements/GlobalToggle.ts +9 -29
  342. package/src/Layout/Header/__snapshots__/Header.stories.ts.snap +5 -5
  343. package/src/Layout/Header/__snapshots__/Header.stories.tsx.snap +3 -3
  344. package/src/Layout/Masthead/Masthead.stories.ts +1 -4
  345. package/src/Layout/Masthead/__snapshots__/Masthead.stories.ts.snap +3 -3
  346. package/src/Layout/Page/Page.stories.tsx +2 -2
  347. package/src/Layout/Page/__snapshots__/Page.stories.tsx.snap +3 -3
  348. package/src/Layout/Page/page.css +2 -10
  349. package/src/Layout/Section/Background.stories.ts +14 -39
  350. package/src/Layout/Section/Breakouts.stories.ts +3 -0
  351. package/src/Layout/Section/Flow.stories.ts +3 -0
  352. package/src/Layout/Section/Section.stories.ts +93 -11
  353. package/src/Layout/Section/Section.tsx +3 -13
  354. package/src/Layout/Section/SectionGrid.tsx +2 -9
  355. package/src/Layout/Section/__snapshots__/Background.stories.ts.snap +4 -4
  356. package/src/Layout/Section/__snapshots__/Breakouts.stories.ts.snap +1 -1
  357. package/src/Layout/Section/__snapshots__/Flow.stories.ts.snap +1 -1
  358. package/src/Layout/Section/__snapshots__/Section.stories.ts.snap +93 -3
  359. package/src/Layout/Section/__snapshots__/Section.stories.tsx.snap +1 -1
  360. package/src/Layout/Section/__snapshots__/SectionGrid.stories.tsx.snap +1 -1
  361. package/src/Layout/Section/section.css +2 -5
  362. package/src/Layout/Section/section.twig +1 -3
  363. package/src/Layout/Sidebar/Sidebar.stories.ts +46 -4
  364. package/src/Layout/Sidebar/Sidebar.tsx +1 -3
  365. package/src/Layout/Sidebar/__snapshots__/Sidebar.stories.ts.snap +4 -4
  366. package/src/Layout/Sidebar/__snapshots__/Sidebar.stories.tsx.snap +1 -1
  367. package/src/Utility/Context/ImageComponent.tsx +4 -8
  368. package/src/Utility/Context/LinkComponent.tsx +1 -5
  369. package/src/Utility/Drupal/drupal.css +2 -4
  370. package/src/Utility/Elements/breakpoint-loader.ts +4 -10
  371. package/src/Utility/Elements/cookie-compliance.ts +2 -8
  372. package/src/Utility/Elements/disclosure-widget.ts +11 -18
  373. package/src/Utility/Elements/io-loader.ts +4 -6
  374. package/src/Utility/Elements/keyboard.ts +4 -14
  375. package/src/Utility/Hooks/useLocalStorage.ts +5 -18
  376. package/src/Utility/Hooks/useMediaQuery.ts +1 -4
  377. package/src/Utility/Hooks/useToggle.ts +1 -3
  378. package/src/Utility/global.d.ts +1 -5
  379. package/src/Utility/utilities.ts +20 -45
  380. package/src/constants.css +115 -135
  381. package/src/enums.ts +4 -1
  382. package/src/react.ts +5 -21
  383. package/src/tokens.js +27 -20
  384. package/dist/build/chunks/disclosure-widget-DVpnRsTI.js +0 -126
  385. package/dist/build/chunks/disclosure-widget-DVpnRsTI.js.map +0 -1
  386. package/dist/build/chunks/drop-menu.entry-B4TtnC50.js +0 -132
  387. package/dist/build/chunks/drop-menu.entry-B4TtnC50.js.map +0 -1
  388. package/dist/build/chunks/keyboard-rvZ4dfGF.js +0 -104
  389. package/dist/build/chunks/keyboard-rvZ4dfGF.js.map +0 -1
  390. package/dist/build/chunks/polyfills-C-B7iqDG.js.map +0 -1
  391. package/dist/build/chunks/utilities-DXELy_An.js.map +0 -1
  392. package/src/Atom/Text/TextSizes.stories.ts +0 -25
  393. package/src/Atom/Text/text-alignment.twig +0 -5
  394. package/src/Component/Accordion/twig/accordion-example.twig +0 -36
  395. package/src/Component/Tile/README.md +0 -3
  396. package/src/Component/Tile/Tile.stories.ts +0 -49
  397. package/src/Component/Tile/Tile.stories.tsx +0 -35
  398. package/src/Component/Tile/__snapshots__/Tile.stories.ts.snap +0 -57
  399. package/src/Component/Tile/__snapshots__/Tile.stories.tsx.snap +0 -23
@@ -1,7 +1,6 @@
1
1
  @layer design-system.defaults {
2
2
  blockquote {
3
3
  padding-inline-start: var(--line-gap, var(--gap));
4
- border-inline-start: var(--line-width, 6px) solid
5
- var(--line-colour, var(--colour-border));
4
+ border-inline-start: var(--line-width, 6px) solid var(--line-colour, var(--colour-border));
6
5
  }
7
6
  }
@@ -2,15 +2,13 @@ import { Meta, StoryObj } from "@storybook/html-vite"
2
2
  import Component from "./button.twig"
3
3
  import Icon from "../Icon/icon.twig"
4
4
  import "./button.css"
5
- import {
6
- Button as ButtonType,
7
- ButtonModifiers,
8
- ButtonTypes,
9
- } from "@pnx-mixtape/ids-shape"
5
+ import { Button as ButtonType, ButtonModifiers, ButtonTypes } from "@pnx-mixtape/ids-shape"
10
6
  import { Icons } from "../../enums"
11
7
 
8
+ /**
9
+ * A button atom with optional icon.
10
+ */
12
11
  const meta: Meta<ButtonType> = {
13
- title: "Atom/Button",
14
12
  tags: ["autodocs", "ids-mvp"],
15
13
  component: Component,
16
14
  args: {
@@ -18,40 +16,124 @@ const meta: Meta<ButtonType> = {
18
16
  as: ButtonTypes.BUTTON,
19
17
  },
20
18
  argTypes: {
19
+ title: {
20
+ description: "The button label",
21
+ type: {
22
+ name: "string",
23
+ required: true,
24
+ },
25
+ },
26
+ as: {
27
+ description: "Choose the type of button, or use a link instead.",
28
+ options: Object.values(ButtonTypes),
29
+ control: "select",
30
+ table: {
31
+ defaultValue: { summary: ButtonTypes.BUTTON },
32
+ type: { summary: "enum" },
33
+ },
34
+ },
35
+ href: {
36
+ description: "When using a Link, set the `href` value.",
37
+ type: "string",
38
+ if: { arg: "as", eq: ButtonTypes.LINK },
39
+ },
21
40
  modifiers: {
41
+ description:
42
+ "Define the style of the button. **outline** and **full-width** can be used with the other colour options.",
22
43
  options: Object.values(ButtonModifiers),
23
44
  control: "multi-select",
45
+ table: {
46
+ type: { summary: "enum" },
47
+ },
48
+ },
49
+ disabled: {
50
+ description: "Add the `[disabled]` attribute to the button.",
51
+ type: "boolean",
52
+ table: { defaultValue: { summary: "false" } },
53
+ if: { arg: "as", neq: ButtonTypes.LINK },
54
+ },
55
+ iconStart: {
56
+ description:
57
+ "An [Icon](/?path=/docs/atom-icon--docs) object, to display **before** the title.",
58
+ table: {
59
+ subcategory: "Icon",
60
+ },
61
+ },
62
+ iconEnd: {
63
+ description:
64
+ "An [Icon](/?path=/docs/atom-icon--docs) object, to display **after** the title.",
65
+ table: {
66
+ subcategory: "Icon",
67
+ },
68
+ },
69
+ iconOnly: {
70
+ description:
71
+ "When an icon is added, visually hide the button text so that only the icon is displayed.",
72
+ control: "boolean",
73
+ table: {
74
+ defaultValue: { summary: "false" },
75
+ subcategory: "Icon",
76
+ },
24
77
  },
25
- as: { options: Object.values(ButtonTypes), control: "select" },
26
- title: { control: "text" },
27
- href: { control: "text" },
28
- disabled: { control: "boolean" },
29
- // @ts-expect-error The controls follow the shape
30
- "iconStart.icon": { options: Object.values(Icons), control: "select" },
31
- "iconEnd.icon": { options: Object.values(Icons), control: "select" },
32
- iconOnly: { control: "boolean" },
33
78
  },
34
79
  }
35
80
 
36
81
  export default meta
37
82
  type Story = StoryObj<ButtonType>
38
83
 
39
- export const Button: Story = {
40
- args: {},
41
- }
84
+ export const Button: Story = {}
42
85
 
43
- export const Primary: Story = {
86
+ /**
87
+ * Primary style uses the **dark** modifier.
88
+ */
89
+ export const Dark: Story = {
44
90
  args: {
45
91
  modifiers: [ButtonModifiers.DARK],
46
92
  },
47
93
  }
48
94
 
49
- export const Text: Story = {
95
+ /**
96
+ * Outline can be combined with the **dark** or **destructive** modifier.
97
+ */
98
+ export const Outline: Story = {
99
+ args: {
100
+ modifiers: [ButtonModifiers.DARK, ButtonModifiers.OUTLINE],
101
+ },
102
+ }
103
+
104
+ /**
105
+ * Buttons can look more like hyperlinks by using the **light** modifier.
106
+ */
107
+ export const Light: Story = {
50
108
  args: {
51
109
  modifiers: [ButtonModifiers.LIGHT],
52
110
  },
53
111
  }
54
112
 
113
+ /**
114
+ * Destructive style should be reserved for cancel or delete buttons.
115
+ */
116
+ export const Destructive: Story = {
117
+ args: {
118
+ modifiers: [ButtonModifiers.DESTRUCTIVE],
119
+ },
120
+ }
121
+
122
+ /**
123
+ * White style is useful when on a dark background or overlaying an image.
124
+ */
125
+ export const White: Story = {
126
+ args: {
127
+ modifiers: [ButtonModifiers.WHITE],
128
+ },
129
+ globals: {
130
+ background: "mx-background--alt",
131
+ },
132
+ }
133
+
134
+ /**
135
+ * Button's can be a hyperlink element, though this usage should be limited (or combined with the **light** modifier).
136
+ */
55
137
  export const Link: Story = {
56
138
  args: {
57
139
  as: ButtonTypes.LINK,
@@ -59,10 +141,36 @@ export const Link: Story = {
59
141
  },
60
142
  }
61
143
 
62
- export const IconButton: Story = {
144
+ /**
145
+ * Icons can be added after the button text.
146
+ */
147
+ export const IconEnd: Story = {
63
148
  args: {
64
149
  iconEnd: Icon({
65
150
  icon: Icons.ARROW_RIGHT,
66
151
  }),
67
152
  },
68
153
  }
154
+
155
+ /**
156
+ * Icons can be added before the button text.
157
+ */
158
+ export const IconStart: Story = {
159
+ args: {
160
+ iconStart: Icon({
161
+ icon: Icons.ARROW_LEFT,
162
+ }),
163
+ },
164
+ }
165
+
166
+ /**
167
+ * Or the icon can visually hide the button text.
168
+ */
169
+ export const IconOnly: Story = {
170
+ args: {
171
+ iconStart: Icon({
172
+ icon: Icons.SEARCH,
173
+ }),
174
+ iconOnly: true,
175
+ },
176
+ }
@@ -1,8 +1,8 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
1
+ // Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
2
2
 
3
3
  exports[`Atom/Button Button smoke-test 1`] = `
4
4
  <div class="mx-page default">
5
- <button class="mx-button "
5
+ <button class="mx-button"
6
6
  type="button"
7
7
  >
8
8
  <span>
@@ -12,15 +12,79 @@ exports[`Atom/Button Button smoke-test 1`] = `
12
12
  </div>
13
13
  `;
14
14
 
15
- exports[`Atom/Button IconButton smoke-test 1`] = `
15
+ exports[`Atom/Button Dark smoke-test 1`] = `
16
16
  <div class="mx-page default">
17
- <button class="mx-button "
17
+ <button class="mx-button mx-button--dark"
18
18
  type="button"
19
19
  >
20
20
  <span>
21
21
  Button
22
22
  </span>
23
- <span class="mx-icon mx-icon--arrow-right ">
23
+ </button>
24
+ </div>
25
+ `;
26
+
27
+ exports[`Atom/Button Destructive smoke-test 1`] = `
28
+ <div class="mx-page default">
29
+ <button class="mx-button mx-button--destructive"
30
+ type="button"
31
+ >
32
+ <span>
33
+ Button
34
+ </span>
35
+ </button>
36
+ </div>
37
+ `;
38
+
39
+ exports[`Atom/Button IconEnd smoke-test 1`] = `
40
+ <div class="mx-page default">
41
+ <button class="mx-button"
42
+ type="button"
43
+ >
44
+ <span>
45
+ Button
46
+ </span>
47
+ <span class="mx-icon mx-icon--arrow-right">
48
+ </span>
49
+ </button>
50
+ </div>
51
+ `;
52
+
53
+ exports[`Atom/Button IconOnly smoke-test 1`] = `
54
+ <div class="mx-page default">
55
+ <button class="mx-button mx-button--icon-only"
56
+ type="button"
57
+ >
58
+ <span class="mx-icon mx-icon--search">
59
+ </span>
60
+ <span class="sr-only">
61
+ Button
62
+ </span>
63
+ </button>
64
+ </div>
65
+ `;
66
+
67
+ exports[`Atom/Button IconStart smoke-test 1`] = `
68
+ <div class="mx-page default">
69
+ <button class="mx-button"
70
+ type="button"
71
+ >
72
+ <span class="mx-icon mx-icon--arrow-left">
73
+ </span>
74
+ <span>
75
+ Button
76
+ </span>
77
+ </button>
78
+ </div>
79
+ `;
80
+
81
+ exports[`Atom/Button Light smoke-test 1`] = `
82
+ <div class="mx-page default">
83
+ <button class="mx-button mx-button--light"
84
+ type="button"
85
+ >
86
+ <span>
87
+ Button
24
88
  </span>
25
89
  </button>
26
90
  </div>
@@ -28,7 +92,7 @@ exports[`Atom/Button IconButton smoke-test 1`] = `
28
92
 
29
93
  exports[`Atom/Button Link smoke-test 1`] = `
30
94
  <div class="mx-page default">
31
- <a class="mx-button "
95
+ <a class="mx-button"
32
96
  href="#"
33
97
  >
34
98
  <span>
@@ -38,9 +102,9 @@ exports[`Atom/Button Link smoke-test 1`] = `
38
102
  </div>
39
103
  `;
40
104
 
41
- exports[`Atom/Button Primary smoke-test 1`] = `
105
+ exports[`Atom/Button Outline smoke-test 1`] = `
42
106
  <div class="mx-page default">
43
- <button class="mx-button mx-button--dark"
107
+ <button class="mx-button mx-button--dark mx-button--outline"
44
108
  type="button"
45
109
  >
46
110
  <span>
@@ -50,9 +114,9 @@ exports[`Atom/Button Primary smoke-test 1`] = `
50
114
  </div>
51
115
  `;
52
116
 
53
- exports[`Atom/Button Text smoke-test 1`] = `
54
- <div class="mx-page default">
55
- <button class="mx-button mx-button--light"
117
+ exports[`Atom/Button White smoke-test 1`] = `
118
+ <div class="mx-page mx-background--alt">
119
+ <button class="mx-button mx-button--white"
56
120
  type="button"
57
121
  >
58
122
  <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[`Atom/Button Button smoke-test 1`] = `
4
4
  <button class="mx-button"
@@ -4,19 +4,21 @@
4
4
 
5
5
  @layer design-system.atoms {
6
6
  .mx-button--dark {
7
- --line-colour: var(--colour-link);
8
- --background: var(--colour-link);
9
- --foreground: var(--colour-foreground-reverse);
7
+ --line-colour: var(--button-dark-bg, var(--colour-link));
8
+ --background: var(--button-dark-bg, var(--colour-link));
9
+ --foreground: var(--button-dark-fg, var(--colour-foreground-reverse));
10
10
 
11
11
  &.mx-button--outline {
12
12
  --background: transparent;
13
- --foreground: var(--colour-primary);
13
+ --foreground: var(--button-dark-bg, var(--colour-link));
14
14
  }
15
15
  }
16
16
 
17
17
  .mx-button--light {
18
- border: transparent;
19
- color: var(--link-colour, var(--colour-link));
18
+ --line-colour: var(--button-light-bg, transparent);
19
+ --background: var(--button-light-bg, transparent);
20
+ --foreground: var(--button-light-fg, var(--link-colour, var(--colour-link)));
21
+
20
22
  text-decoration-line: underline;
21
23
 
22
24
  &:hover {
@@ -24,6 +26,16 @@
24
26
  }
25
27
  }
26
28
 
29
+ .mx-button--accent {
30
+ --line-colour: var(--button-light-bg, var(--colour-accent));
31
+ --background: var(--button-light-bg, var(--colour-accent));
32
+
33
+ &.mx-button--outline {
34
+ --background: transparent;
35
+ --foreground: var(--button-light-bg, var(--colour-accent));
36
+ }
37
+ }
38
+
27
39
  .mx-button--destructive {
28
40
  --line-colour: var(--colour-error);
29
41
  --background: var(--colour-error);
@@ -13,8 +13,7 @@
13
13
  font-weight: var(--font-weight-bold);
14
14
  font-family: var(--font-family);
15
15
  line-height: var(--line-height-ui);
16
- border: var(--line-width, 2px) solid
17
- var(--line-colour, var(--colour-border));
16
+ border: var(--line-width, 2px) solid var(--line-colour, currentcolor);
18
17
  border-radius: var(--radius, var(--border-radius-l));
19
18
  padding-block: var(--vertical-padding, var(--spacing-xxs));
20
19
  padding-inline: var(--horizontal-padding, var(--spacing-m));
@@ -49,9 +48,7 @@
49
48
  --horizontal-padding: var(--spacing-s);
50
49
  }
51
50
 
52
- .mx-icon.mx-button--icon-only {
53
- --icon-size: 100%;
54
-
51
+ .mx-button--icon-only {
55
52
  inline-size: var(--spacing-xl);
56
53
  block-size: var(--spacing-xl);
57
54
  padding: 0;
@@ -61,6 +58,8 @@
61
58
 
62
59
  &::before,
63
60
  &::after {
61
+ --icon-size: 100%;
62
+
64
63
  mask-size: var(--spacing-s);
65
64
  }
66
65
 
@@ -2,7 +2,12 @@ import { Meta, StoryObj } from "@storybook/html-vite"
2
2
  import Component from "./definition-list.twig"
3
3
  import "../_base.css"
4
4
  import { DefinitionList as DefinitionListType } from "@pnx-mixtape/ids-shape"
5
+ import { Icons } from "../../enums"
5
6
 
7
+ /**
8
+ * The definition list is useful for categorising short pieces of content.
9
+ * It uses `subgrid` to maintain alignment.
10
+ */
6
11
  const meta: Meta<DefinitionListType> = {
7
12
  tags: ["autodocs", "ids-mvp"],
8
13
  component: Component,
@@ -22,11 +27,23 @@ const meta: Meta<DefinitionListType> = {
22
27
  },
23
28
  ],
24
29
  },
30
+ argTypes: {
31
+ items: {
32
+ description:
33
+ "A list of title/content objects to use, where title is the `<dt>` value and content is the `<dd>` value.",
34
+ type: {
35
+ name: "other",
36
+ required: true,
37
+ value: "array",
38
+ },
39
+ table: {
40
+ type: { summary: "{ title: string, content: string }[]" },
41
+ },
42
+ },
43
+ },
25
44
  }
26
45
 
27
46
  export default meta
28
47
  type Story = StoryObj<DefinitionListType>
29
48
 
30
- export const DefinitionList: Story = {
31
- args: {},
32
- }
49
+ export const DefinitionList: Story = {}
@@ -7,15 +7,9 @@ const meta: Meta<typeof Component> = {
7
7
  args: {
8
8
  children: (
9
9
  <>
10
- <DefinitionListItem title="Item #1">
11
- Data for item #1
12
- </DefinitionListItem>
13
- <DefinitionListItem title="Item #2">
14
- Data for item #2
15
- </DefinitionListItem>
16
- <DefinitionListItem title="Item #3">
17
- Data for item #3
18
- </DefinitionListItem>
10
+ <DefinitionListItem title="Item #1">Data for item #1</DefinitionListItem>
11
+ <DefinitionListItem title="Item #2">Data for item #2</DefinitionListItem>
12
+ <DefinitionListItem title="Item #3">Data for item #3</DefinitionListItem>
19
13
  </>
20
14
  ),
21
15
  },
@@ -2,10 +2,9 @@ import { JSX, ComponentPropsWithoutRef, PropsWithChildren } from "react"
2
2
 
3
3
  type DefinitionListProps = ComponentPropsWithoutRef<"dl"> & PropsWithChildren
4
4
 
5
- const DefinitionList = ({
6
- children,
7
- ...props
8
- }: DefinitionListProps): JSX.Element => <dl {...props}>{children}</dl>
5
+ const DefinitionList = ({ children, ...props }: DefinitionListProps): JSX.Element => (
6
+ <dl {...props}>{children}</dl>
7
+ )
9
8
 
10
9
  type DefinitionListItemProps = ComponentPropsWithoutRef<"div"> &
11
10
  PropsWithChildren & {
@@ -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[`Atom/DefinitionList DefinitionList smoke-test 1`] = `
4
4
  <div class="mx-page default">
@@ -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[`Atom/Definition List DefinitionList smoke-test 1`] = `
4
4
  <dl>
@@ -1,28 +1,70 @@
1
1
  import { Meta, StoryObj } from "@storybook/html-vite"
2
2
  import Component from "./heading.twig"
3
3
  import "../_base.css"
4
- import { HeadingTypes } from "@pnx-mixtape/ids-shape"
4
+ import { Heading as HeadingType, HeadingTypes } from "@pnx-mixtape/ids-shape"
5
5
 
6
- const meta: Meta<typeof Component> = {
6
+ /**
7
+ * Heading element should always follow correct html heading order. The modifier class can be used to visually change the size when needed.
8
+ */
9
+ const meta: Meta<HeadingType> = {
7
10
  tags: ["autodocs", "ids-mvp"],
8
11
  component: Component,
9
12
  args: {
13
+ as: HeadingTypes.TWO,
10
14
  title: "Heading",
11
15
  },
12
16
  argTypes: {
13
- as: { options: Object.values(HeadingTypes), control: "select" },
17
+ as: {
18
+ description: "The semantic heading level.",
19
+ options: Object.values(HeadingTypes),
20
+ control: "select",
21
+ table: {
22
+ defaultValue: { summary: HeadingTypes.TWO },
23
+ type: { summary: "enum" },
24
+ },
25
+ },
14
26
  modifiers: {
27
+ description: "The visual heading size (only one applies)",
15
28
  // @todo add mixtapes heading modifiers.
16
29
  options: Object.values(HeadingTypes),
17
30
  control: "multi-select",
31
+ table: {
32
+ type: { summary: "enum" },
33
+ },
34
+ },
35
+ title: {
36
+ description: "The heading text",
37
+ type: "string",
38
+ },
39
+ excluded: {
40
+ description:
41
+ "Mark the heading as 'excluded' to remove it from certain javascript contexts (like [InPageNavigation](/?path=/docs/component-inpagenavigation--docs))",
42
+ type: "boolean",
43
+ table: {
44
+ defaultValue: { summary: "false" },
45
+ },
46
+ },
47
+ srOnly: {
48
+ description:
49
+ "Mark the heading as visually hidden so that it's only available for screen reader context.",
50
+ type: "boolean",
51
+ table: {
52
+ defaultValue: { summary: "false" },
53
+ },
18
54
  },
19
- title: { control: "text" },
20
- excluded: { control: "boolean" },
21
- srOnly: { control: "boolean" },
22
55
  },
23
56
  }
24
57
 
25
58
  export default meta
26
- type Story = StoryObj<typeof meta>
59
+ type Story = StoryObj<HeadingType>
27
60
 
28
61
  export const Headings: Story = {}
62
+
63
+ /**
64
+ * The modifier class can be used to visually change the size when needed.
65
+ */
66
+ export const Resized: Story = {
67
+ args: {
68
+ modifiers: [HeadingTypes.FOUR],
69
+ },
70
+ }
@@ -30,12 +30,7 @@ const Heading = ({
30
30
  }, [anchor, ref])
31
31
 
32
32
  return (
33
- <Tag
34
- className={classNames(modifier, className)}
35
- id={anchor}
36
- ref={ref}
37
- {...props}
38
- >
33
+ <Tag className={classNames(modifier, className)} id={anchor} ref={ref} {...props}>
39
34
  {children}
40
35
  </Tag>
41
36
  )
@@ -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[`Atom/Heading Headings smoke-test 1`] = `
4
4
  <div class="mx-page default">
@@ -7,3 +7,11 @@ exports[`Atom/Heading Headings smoke-test 1`] = `
7
7
  </h2>
8
8
  </div>
9
9
  `;
10
+
11
+ exports[`Atom/Heading Resized smoke-test 1`] = `
12
+ <div class="mx-page default">
13
+ <h2 class="mx-heading--m">
14
+ Heading
15
+ </h2>
16
+ </div>
17
+ `;
@@ -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[`Atom/Typography/Heading Heading smoke-test 1`] = `
4
4
  <h2 class
@@ -36,8 +36,7 @@
36
36
  .mx-heading--s
37
37
  ) {
38
38
  --font-min: calc(
39
- var(--heading-font-size) - var(--heading-font-size) *
40
- var(--font-size-diff, 0.3)
39
+ var(--heading-font-size) - var(--heading-font-size) * var(--font-size-diff, 0.3)
41
40
  );
42
41
 
43
42
  font-size: clamp(
@@ -13,7 +13,7 @@ import { Icons } from "../../enums"
13
13
 
14
14
  # Icon set
15
15
 
16
- Icons are available as a css image mask.
16
+ SVG icon classes are available (as a css image mask).
17
17
 
18
18
  <IconGallery>
19
19
  {Object.values(Icons).map(name => (
@@ -23,8 +23,12 @@ Icons are available as a css image mask.
23
23
  ))}
24
24
  </IconGallery>
25
25
 
26
+ ---
27
+
26
28
  # Icon
27
29
 
30
+ An icon atom that is used by other components.
31
+
28
32
  <Primary />
29
33
 
30
34
  <Controls />