@pnx-mixtape/mxds 0.0.12 → 0.0.14

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 (265) hide show
  1. package/dist/build/accordion.entry.js +1 -1
  2. package/dist/build/chunks/{Accordion-DSze7pxN.js → Accordion-Bjaw7SdG.js} +2 -2
  3. package/dist/build/chunks/{Accordion-DSze7pxN.js.map → Accordion-Bjaw7SdG.js.map} +1 -1
  4. package/dist/build/chunks/{disclosure-widget-CQLPJ8Ta.js → disclosure-widget-DwuxsaOS.js} +2 -2
  5. package/dist/build/chunks/{disclosure-widget-CQLPJ8Ta.js.map → disclosure-widget-DwuxsaOS.js.map} +1 -1
  6. package/dist/build/chunks/{drop-menu.entry-BC6x9vst.js → drop-menu.entry-Cxpti_QG.js} +2 -2
  7. package/dist/build/chunks/{drop-menu.entry-BC6x9vst.js.map → drop-menu.entry-Cxpti_QG.js.map} +1 -1
  8. package/dist/build/chunks/{utilities-B4YZb689.js → utilities-DZ_l-he4.js} +1 -49
  9. package/dist/build/chunks/utilities-DZ_l-he4.js.map +1 -0
  10. package/dist/build/dialog.entry.js +1 -1
  11. package/dist/build/drop-menu.entry.js +1 -1
  12. package/dist/build/filters.entry.js +1 -1
  13. package/dist/build/global-alert.entry.js +1 -1
  14. package/dist/build/header.entry.js +2 -2
  15. package/dist/build/in-page-navigation.entry.js +19 -9
  16. package/dist/build/in-page-navigation.entry.js.map +1 -1
  17. package/dist/build/navigation.entry.js +2 -2
  18. package/dist/build/sidebar.css +18 -64
  19. package/dist/build/sticky.entry.js +1 -1
  20. package/dist/build/tabs.entry.js +2 -2
  21. package/package.json +11 -20
  22. package/src/Atom/Background/Backgrounds.stories.ts +13 -1
  23. package/src/Atom/Background/__snapshots__/Backgrounds.stories.ts.snap +157 -81
  24. package/src/Atom/Background/_background.css +16 -10
  25. package/src/Atom/Base.mdx +25 -17
  26. package/src/Atom/Button/Button.stories.ts +1 -4
  27. package/src/Atom/Button/Button.stories.tsx +1 -1
  28. package/src/Atom/Button/__snapshots__/Button.stories.ts.snap +47 -37
  29. package/src/Atom/Button/_buttons-styles.css +7 -7
  30. package/src/Atom/Button/_buttons.css +1 -6
  31. package/src/Atom/DefinitionList/DefinitionList.stories.ts +32 -0
  32. package/src/Atom/DefinitionList/DefinitionList.stories.tsx +1 -1
  33. package/src/Atom/DefinitionList/__snapshots__/DefinitionList.stories.ts.snap +32 -0
  34. package/src/Atom/DefinitionList/definition-list.twig +9 -0
  35. package/src/Atom/Heading/Heading.stories.ts +1 -1
  36. package/src/Atom/Heading/Heading.stories.tsx +1 -1
  37. package/src/Atom/Heading/__snapshots__/Heading.stories.ts.snap +5 -3
  38. package/src/Atom/Icon/Icon.mdx +1 -1
  39. package/src/Atom/Icon/Icon.stories.ts +1 -1
  40. package/src/Atom/Icon/Icon.stories.tsx +1 -1
  41. package/src/Atom/Icon/Icon.tsx +2 -2
  42. package/src/Atom/Icon/__snapshots__/Icon.stories.ts.snap +14 -8
  43. package/src/Atom/Icon/_icon.css +4 -4
  44. package/src/Atom/Image/Image.stories.ts +1 -1
  45. package/src/Atom/Image/__snapshots__/Image.stories.ts.snap +7 -5
  46. package/src/Atom/Image/_image.css +2 -7
  47. package/src/Atom/Link/Link.stories.ts +1 -1
  48. package/src/Atom/Link/Link.stories.tsx +1 -1
  49. package/src/Atom/Link/__snapshots__/Link.stories.ts.snap +50 -37
  50. package/src/Atom/Link/_links.css +2 -22
  51. package/src/Atom/Link/link.twig +1 -0
  52. package/src/Atom/Media/Media.stories.ts +1 -1
  53. package/src/Atom/Media/Media.stories.tsx +1 -1
  54. package/src/Atom/Media/__snapshots__/Media.stories.ts.snap +25 -21
  55. package/src/Atom/Spacing/Spacing.stories.ts +1 -1
  56. package/src/Atom/Spacing/__snapshots__/Spacing.stories.ts.snap +5 -3
  57. package/src/Atom/Table/Table.stories.ts +1 -1
  58. package/src/Atom/Table/TableResponsive.stories.ts +1 -1
  59. package/src/Atom/Table/__snapshots__/Table.stories.ts.snap +256 -248
  60. package/src/Atom/Table/__snapshots__/TableResponsive.stories.ts.snap +65 -63
  61. package/src/Atom/Text/Text.stories.tsx +1 -1
  62. package/src/Atom/Text/TextSizes.stories.ts +1 -1
  63. package/src/Atom/Text/__snapshots__/TextSizes.stories.ts.snap +59 -55
  64. package/src/Atom/Text/rich-text.twig +9 -0
  65. package/src/Atom/Video/Video.stories.ts +1 -1
  66. package/src/Atom/Video/__snapshots__/Video.stories.ts.snap +9 -7
  67. package/src/Atom/_animated.css +0 -14
  68. package/src/Atom/_generic.css +56 -15
  69. package/src/Atom/base.css +1 -1
  70. package/src/Component/Accordion/Accordion.stories.ts +1 -4
  71. package/src/Component/Accordion/Accordion.stories.tsx +1 -1
  72. package/src/Component/Accordion/__snapshots__/Accordion.stories.ts.snap +60 -56
  73. package/src/Component/Accordion/accordion.css +16 -4
  74. package/src/Component/Breadcrumb/Breadcrumb.stories.ts +1 -1
  75. package/src/Component/Breadcrumb/Breadcrumb.stories.tsx +1 -1
  76. package/src/Component/Breadcrumb/__snapshots__/Breadcrumb.stories.ts.snap +31 -29
  77. package/src/Component/Breadcrumb/breadcrumb.css +4 -0
  78. package/src/Component/Callout/Callout.stories.ts +1 -9
  79. package/src/Component/Callout/__snapshots__/Callout.stories.ts.snap +9 -7
  80. package/src/Component/Card/Card.stories.ts +11 -18
  81. package/src/Component/Card/Card.stories.tsx +1 -1
  82. package/src/Component/Card/Card.tsx +9 -5
  83. package/src/Component/Card/__snapshots__/Card.stories.ts.snap +257 -229
  84. package/src/Component/Card/card.css +36 -33
  85. package/src/Component/Card/card.twig +6 -6
  86. package/src/Component/Carousel/Carousel.stories.ts +201 -0
  87. package/src/Component/Carousel/Elements/Carousel.ts +241 -0
  88. package/src/Component/Carousel/__snapshots__/Carousel.stories.ts.snap +912 -0
  89. package/src/Component/Carousel/carousel.css +119 -0
  90. package/src/Component/Carousel/carousel.twig +27 -0
  91. package/src/Component/ContentBlock/ContentBlock.stories.ts +27 -19
  92. package/src/Component/ContentBlock/ContentBlock.stories.tsx +1 -1
  93. package/src/Component/ContentBlock/__snapshots__/ContentBlock.stories.ts.snap +153 -93
  94. package/src/Component/Dialog/Dialog.stories.ts +76 -7
  95. package/src/Component/Dialog/Dialog.stories.tsx +1 -1
  96. package/src/Component/Dialog/Elements/Dialog.ts +14 -34
  97. package/src/Component/Dialog/__snapshots__/Dialog.stories.ts.snap +102 -66
  98. package/src/Component/Dialog/dialog.css +31 -19
  99. package/src/Component/Dialog/dialog.twig +14 -15
  100. package/src/Component/DropMenu/DropMenu.stories.ts +1 -1
  101. package/src/Component/DropMenu/DropMenu.stories.tsx +1 -1
  102. package/src/Component/DropMenu/__snapshots__/DropMenu.stories.ts.snap +28 -26
  103. package/src/Component/DropMenu/drop-menu.css +10 -2
  104. package/src/Component/Filters/Filters.stories.ts +1 -4
  105. package/src/Component/Filters/__snapshots__/Filters.stories.ts.snap +397 -389
  106. package/src/Component/Filters/filters.css +14 -5
  107. package/src/Component/GlobalAlert/GlobalAlert.stories.ts +1 -1
  108. package/src/Component/GlobalAlert/GlobalAlert.stories.tsx +1 -1
  109. package/src/Component/GlobalAlert/__snapshots__/GlobalAlert.stories.ts.snap +33 -29
  110. package/src/Component/GlobalAlert/global-alert.css +2 -2
  111. package/src/Component/HeroBanner/HeroBanner.stories.ts +1 -4
  112. package/src/Component/HeroBanner/HeroBanner.stories.tsx +1 -1
  113. package/src/Component/HeroBanner/__snapshots__/HeroBanner.stories.ts.snap +68 -64
  114. package/src/Component/HeroBanner/hero-banner.css +6 -1
  115. package/src/Component/HeroBanner/hero-banner.twig +3 -4
  116. package/src/Component/InPageAlert/InPageAlert.stories.ts +1 -1
  117. package/src/Component/InPageAlert/InPageAlert.stories.tsx +1 -1
  118. package/src/Component/InPageAlert/__snapshots__/InPageAlert.stories.ts.snap +10 -8
  119. package/src/Component/InPageAlert/in-page-alert.css +8 -8
  120. package/src/Component/InPageNavigation/Elements/InPageNavigation.ts +19 -9
  121. package/src/Component/InPageNavigation/InPageNavigation.stories.ts +30 -5
  122. package/src/Component/InPageNavigation/InPageNavigation.stories.tsx +1 -1
  123. package/src/Component/InPageNavigation/__snapshots__/InPageNavigation.stories.ts.snap +64 -101
  124. package/src/Component/InPageNavigation/in-page-navigation.twig +5 -1
  125. package/src/Component/InPageNavigation/twig/content-example.twig +4 -12
  126. package/src/Component/LinkList/LinkList.stories.ts +1 -1
  127. package/src/Component/LinkList/LinkList.stories.tsx +1 -1
  128. package/src/Component/LinkList/__snapshots__/LinkList.stories.ts.snap +31 -29
  129. package/src/Component/ListItem/ListItem.stories.ts +2 -4
  130. package/src/Component/ListItem/ListItem.stories.tsx +1 -1
  131. package/src/Component/ListItem/__snapshots__/ListItem.stories.ts.snap +162 -148
  132. package/src/Component/ListItem/list-item.css +7 -88
  133. package/src/Component/ListItem/list-item.twig +8 -8
  134. package/src/Component/Navigation/Dropdown.stories.tsx +1 -1
  135. package/src/Component/Navigation/Navigation.stories.ts +1 -1
  136. package/src/Component/Navigation/Navigation.stories.tsx +1 -1
  137. package/src/Component/Navigation/__snapshots__/Navigation.stories.ts.snap +291 -283
  138. package/src/Component/Navigation/_navigation-collapsible.css +11 -14
  139. package/src/Component/Navigation/_navigation-dropdown.css +11 -17
  140. package/src/Component/Pagination/Pagination.stories.ts +1 -1
  141. package/src/Component/Pagination/Pagination.stories.tsx +1 -1
  142. package/src/Component/Pagination/__snapshots__/Pagination.stories.ts.snap +59 -57
  143. package/src/Component/Pagination/pagination.css +2 -8
  144. package/src/Component/ResultsBar/Components/ResultsBarInfo.tsx +28 -0
  145. package/src/Component/ResultsBar/Components/ResultsBarSort.tsx +17 -0
  146. package/src/Component/ResultsBar/ResultsBar.stories.ts +37 -0
  147. package/src/Component/ResultsBar/ResultsBar.stories.tsx +50 -0
  148. package/src/Component/ResultsBar/ResultsBar.tsx +7 -0
  149. package/src/Component/ResultsBar/__snapshots__/ResultsBar.stories.ts.snap +54 -0
  150. package/src/Component/ResultsBar/__snapshots__/ResultsBar.stories.tsx.snap +53 -0
  151. package/src/Component/ResultsBar/results-bar.css +19 -0
  152. package/src/Component/ResultsBar/results-bar.twig +24 -0
  153. package/src/Component/SideNavigation/SideNavigation.stories.ts +2 -2
  154. package/src/Component/SideNavigation/__snapshots__/SideNavigation.stories.ts.snap +82 -79
  155. package/src/Component/SideNavigation/side-navigation.css +2 -8
  156. package/src/Component/SideNavigation/side-navigation.twig +1 -1
  157. package/src/Component/SocialLinks/SocialLinks.stories.ts +1 -1
  158. package/src/Component/SocialLinks/__snapshots__/SocialLinks.stories.ts.snap +30 -28
  159. package/src/Component/Steps/Steps.stories.ts +1 -1
  160. package/src/Component/Steps/__snapshots__/Steps.stories.ts.snap +86 -78
  161. package/src/Component/Steps/steps.css +1 -1
  162. package/src/Component/Sticky/Sticky.stories.ts +1 -1
  163. package/src/Component/Sticky/Sticky.stories.tsx +1 -1
  164. package/src/Component/Sticky/__snapshots__/Sticky.stories.ts.snap +9 -7
  165. package/src/Component/Tabs/Tabs.stories.ts +1 -1
  166. package/src/Component/Tabs/Tabs.stories.tsx +1 -1
  167. package/src/Component/Tabs/__snapshots__/Tabs.stories.ts.snap +73 -71
  168. package/src/Component/Tabs/tabs.css +14 -21
  169. package/src/Component/Tag/Tag.stories.ts +1 -1
  170. package/src/Component/Tag/Tag.stories.tsx +1 -1
  171. package/src/Component/Tag/__snapshots__/Tag.stories.ts.snap +59 -53
  172. package/src/Component/Tag/tag.css +6 -6
  173. package/src/Component/Tile/Tile.stories.ts +38 -12
  174. package/src/Component/Tile/Tile.stories.tsx +2 -2
  175. package/src/Component/Tile/Tile.tsx +30 -17
  176. package/src/Component/Tile/__snapshots__/Tile.stories.ts.snap +49 -75
  177. package/src/Form/Checkbox/Checkbox.stories.ts +1 -1
  178. package/src/Form/Checkbox/FormCheckbox.stories.tsx +1 -1
  179. package/src/Form/Checkbox/__snapshots__/Checkbox.stories.ts.snap +23 -19
  180. package/src/Form/Description/Description.stories.ts +1 -1
  181. package/src/Form/Description/FormDescription.stories.tsx +1 -1
  182. package/src/Form/Description/FormStatus.stories.ts +1 -1
  183. package/src/Form/Description/__snapshots__/Description.stories.ts.snap +7 -5
  184. package/src/Form/Description/__snapshots__/FormStatus.stories.ts.snap +14 -10
  185. package/src/Form/Form/Form.stories.tsx +1 -1
  186. package/src/Form/Form/FormTitle.stories.tsx +1 -1
  187. package/src/Form/FormItem/FormItem.stories.ts +1 -4
  188. package/src/Form/FormItem/FormItem.stories.tsx +1 -1
  189. package/src/Form/FormItem/__snapshots__/FormItem.stories.ts.snap +119 -109
  190. package/src/Form/Label/FormLabel.stories.tsx +1 -1
  191. package/src/Form/Label/FormLabel.tsx +1 -1
  192. package/src/Form/Label/Label.stories.ts +1 -1
  193. package/src/Form/Label/__snapshots__/Label.stories.ts.snap +21 -15
  194. package/src/Form/Radio/FormRadio.stories.tsx +1 -1
  195. package/src/Form/Radio/Radio.stories.ts +1 -1
  196. package/src/Form/Radio/__snapshots__/Radio.stories.ts.snap +55 -51
  197. package/src/Form/Search/Search.stories.ts +3 -31
  198. package/src/Form/Search/__snapshots__/Search.stories.ts.snap +23 -21
  199. package/src/Form/Search/search-form.twig +5 -2
  200. package/src/Form/Select/FormSelect.stories.tsx +1 -1
  201. package/src/Form/Select/FormSelect.tsx +1 -1
  202. package/src/Form/Select/Select.stories.ts +1 -1
  203. package/src/Form/Select/__snapshots__/Select.stories.ts.snap +18 -16
  204. package/src/Form/TextInput/FormText.stories.tsx +1 -1
  205. package/src/Form/TextInput/InputDivider.stories.ts +1 -1
  206. package/src/Form/TextInput/TextInput.stories.ts +1 -1
  207. package/src/Form/TextInput/__snapshots__/InputDivider.stories.ts.snap +24 -22
  208. package/src/Form/TextInput/__snapshots__/TextInput.stories.ts.snap +18 -14
  209. package/src/Form/Textarea/FormTextarea.stories.tsx +1 -1
  210. package/src/Form/Textarea/Textarea.stories.ts +1 -1
  211. package/src/Form/Textarea/__snapshots__/Textarea.stories.ts.snap +9 -7
  212. package/src/Form/form.css +24 -34
  213. package/src/Layout/Footer/Footer.stories.ts +1 -6
  214. package/src/Layout/Footer/Footer.stories.tsx +1 -1
  215. package/src/Layout/Footer/__snapshots__/Footer.stories.ts.snap +10 -10
  216. package/src/Layout/Footer/footer.css +2 -6
  217. package/src/Layout/Footer/footer.twig +0 -1
  218. package/src/Layout/Grid/Grid.stories.ts +8 -8
  219. package/src/Layout/Grid/Grid.stories.tsx +1 -1
  220. package/src/Layout/Grid/__snapshots__/Grid.stories.ts.snap +38 -32
  221. package/src/Layout/Grid/container-grid.css +1 -1
  222. package/src/Layout/Grid/grid-item.twig +3 -1
  223. package/src/Layout/Grid/grid.css +1 -1
  224. package/src/Layout/Header/Header.stories.ts +10 -8
  225. package/src/Layout/Header/Header.stories.tsx +1 -1
  226. package/src/Layout/Header/__snapshots__/Header.stories.ts.snap +11 -11
  227. package/src/Layout/Header/_header.css +18 -16
  228. package/src/Layout/Header/header.twig +2 -9
  229. package/src/Layout/Masthead/Masthead.stories.ts +1 -3
  230. package/src/Layout/Masthead/__snapshots__/Masthead.stories.ts.snap +6 -6
  231. package/src/Layout/Masthead/masthead.twig +0 -2
  232. package/src/Layout/Page/Page.stories.tsx +1 -1
  233. package/src/Layout/Page/page.css +16 -40
  234. package/src/Layout/Page/page.twig +6 -1
  235. package/src/Layout/Section/Background.stories.ts +60 -8
  236. package/src/Layout/Section/Breakouts.stories.ts +1 -3
  237. package/src/Layout/Section/Flow.stories.ts +1 -3
  238. package/src/Layout/Section/Section.stories.ts +1 -6
  239. package/src/Layout/Section/Section.stories.tsx +1 -1
  240. package/src/Layout/Section/SectionGrid.stories.tsx +1 -1
  241. package/src/Layout/Section/__snapshots__/Background.stories.ts.snap +36 -24
  242. package/src/Layout/Section/__snapshots__/Breakouts.stories.ts.snap +54 -52
  243. package/src/Layout/Section/__snapshots__/Flow.stories.ts.snap +18 -18
  244. package/src/Layout/Section/__snapshots__/Section.stories.ts.snap +2 -2
  245. package/src/Layout/Section/section.css +2 -5
  246. package/src/Layout/Section/section.twig +0 -1
  247. package/src/Layout/Section/twig/section-background.twig +29 -10
  248. package/src/Layout/Section/twig/sections-breakout.twig +28 -33
  249. package/src/Layout/Section/twig/sections-flow.twig +17 -17
  250. package/src/Layout/Section/twig/sections-stacked.twig +4 -4
  251. package/src/Layout/Sidebar/Sidebar.stories.ts +1 -5
  252. package/src/Layout/Sidebar/Sidebar.stories.tsx +1 -1
  253. package/src/Layout/Sidebar/__snapshots__/Sidebar.stories.ts.snap +5 -5
  254. package/src/Layout/Sidebar/sidebar.css +16 -35
  255. package/src/Layout/Sidebar/sidebar.twig +4 -2
  256. package/src/Utility/Drupal/drupal.css +1 -5
  257. package/src/constants.css +53 -24
  258. package/src/enums.ts +1 -0
  259. package/src/react.ts +3 -0
  260. package/src/tokens.js +19 -19
  261. package/dist/build/chunks/utilities-B4YZb689.js.map +0 -1
  262. package/src/Component/Tile/tile.twig +0 -10
  263. package/src/Component/Tile/tiles.css +0 -58
  264. package/src/Component/Tile/twig/tiles.twig +0 -18
  265. package/src/Layout/images/mixtape-logo.png +0 -0
@@ -1,38 +1,33 @@
1
- <section class="mx-section mx-section--flow">
2
- <p>Default is container width, with an inline gutter for smaller screens.</p>
3
- </section>
4
- <section class="mx-section mx-section__full mx-section--flow">
5
- <p>Section can have children with different content widths;</p>
6
- <p class="mx-section__narrow">like the optimum content width with .section__narrow</p>
7
- <p class="mx-section__feature">or slightly larger feature widths with .section__feature</p>
8
- <p class="mx-section__full">or full width with .section__full</p>
9
- </section>
10
- <section class="mx-section mx-section--flow">
11
- <p>Sections can be nested</p>
12
- <section class="mx-section">
13
- <p>and have the same content width options are un-nested ones;</p>
14
- <p class="mx-section__narrow">like the optimum content widths with .section__narrow</p>
15
- <p class="mx-section__feature">or slightly larger feature widths with .section__feature</p>
16
- <p class="mx-section__full">or full width with .section__full</p>
17
- </section>
18
- </section>
19
- <section class="mx-section mx-section__narrow mx-section--flow">
20
- <p>Sections can say for all children to have a certain width</p>
21
- <p>by using .section__narrow or .section__feature or .section__full</p>
22
- <p>on the parent.</p>
23
- </section>
24
- <section class="mx-section mx-section--flow mx-background--reverse">
1
+ <p>Default is container width, with an inline gutter for smaller screens.</p>
2
+ <p class="mx-section--narrow ">Or for optimum content width with .section--narrow</p>
3
+ <p class="mx-section--feature">or slightly larger feature widths with .section--feature</p>
4
+ <p class="mx-section--full">or full width with .section--full</p>
5
+ <p class="mx-section--flow">Sections can be spaced naturally with .mx-section--flow</p>
6
+ <p class="mx-section--flow mx-section--feature">to create a gap between them, even if they have different widths.</p>
7
+ <p class="mx-section--group">Or they can be grouped together</p>
8
+ <p class="mx-section--feature mx-section--group">even if they have different content widths.</p>
9
+
10
+ <section class="mx-page mx-section--flow mx-background--reverse">
25
11
  <p>Any section can have a background color, or utilise any of the section vertical spacing classes</p>
26
- <section class="mx-section--bottom-l">
27
- <p>even children</p>
12
+ <p class="mx-section--s">even children</p>
13
+ <p class="mx-background--box mx-section--m mx-background--reset">and ones with their own backgrounds.</p>
14
+ <p class="mx-section--s mx-section--narrow">A section with a background colour creates a subgrid.</p>
15
+ </section>
16
+ <section class="mx-page mx-section--flow mx-background--alt">
17
+ <p>Page can be nested and have the same content width options as un-nested ones;</p>
18
+ <section class="mx-page mx-section--flow">
19
+ <p class="mx-section--narrow">like the optimum content widths with .section--narrow</p>
20
+ <p class="mx-section--feature">or slightly larger feature widths with .section--feature</p>
21
+ <p class="mx-section--full">or full width with .section--full</p>
28
22
  </section>
29
- <section class="mx-section--l mx-background--reset">
30
- <p>and ones with their own backgrounds.</p>
23
+ <section class="mx-page mx-page--feature mx-section--flow">
24
+ <p>Pages can say for all children to have a certain width</p>
25
+ <p>by using .page--narrow or .page--feature or .page--full</p>
26
+ <p>on the parent.</p>
31
27
  </section>
32
28
  </section>
33
- <section class="mx-section mx-section--group">
34
- <p>Sections can be grouped together</p>
35
- </section>
36
- <section class="mx-section mx-section__feature mx-section--group">
37
- <p>even if they have different content widths.</p>
29
+ <section class="mx-section--narrow mx-section--flow">
30
+ <p>Sections can also say for all children to have a certain width</p>
31
+ <p>by using .section--narrow or .section--feature or .section--full</p>
32
+ <p>on the parent.</p>
38
33
  </section>
@@ -1,51 +1,51 @@
1
- <section class="mx-section mx-section--flow">
1
+ <section class="mx-section--flow">
2
2
  <p>first section has top and bottom spacing</p>
3
3
  </section>
4
- <section class="mx-section mx-section--flow">
4
+ <section class="mx-section--flow">
5
5
  <p>section with normal flow</p>
6
6
  </section>
7
- <section class="mx-section mx-section--flow">
7
+ <section class="mx-section--flow">
8
8
  <p>section with normal flow</p>
9
9
  </section>
10
- <section class="mx-section mx-section--group mx-background--alt">
10
+ <section class="mx-section--group mx-background--alt">
11
11
  <p>certain sections can be</p>
12
12
  </section>
13
- <section class="mx-section mx-section--group mx-background--alt">
13
+ <section class="mx-section--group mx-background--alt">
14
14
  <p>grouped togther as siblings</p>
15
15
  </section>
16
- <section class="mx-section mx-section--group mx-background--alt">
16
+ <section class="mx-section--group mx-background--alt">
17
17
  <p>with their own spacing rules</p>
18
18
  </section>
19
- <section class="mx-section mx-section--flow">
19
+ <section class="mx-section--flow">
20
20
  <p>section on it's own has top and bottom spacing</p>
21
21
  </section>
22
- <section class="mx-section mx-section--group mx-background--alt">
22
+ <section class="mx-section--group mx-background--alt">
23
23
  <p>groups can be combined with flow</p>
24
24
  </section>
25
- <section class="mx-section mx-section--flow mx-section--group mx-background--alt">
25
+ <section class="mx-section--flow mx-section--group mx-background--alt">
26
26
  <p>for standard spacing</p>
27
27
  </section>
28
- <section class="mx-section mx-section--flow">
28
+ <section class="mx-section--flow">
29
29
  <p>section after group own has top and bottom spacing</p>
30
30
  </section>
31
- <section class="mx-section mx-section--flow">
31
+ <section class="mx-section--flow">
32
32
  <p>section with normal flow</p>
33
33
  </section>
34
- <section class="mx-section mx-section--flow mx-background--alt">
34
+ <section class="mx-section--flow mx-background--alt">
35
35
  <p>section with background that breaks the flow, also has top and bottom spacing</p>
36
36
  </section>
37
- <section class="mx-section mx-section--flow">
37
+ <section class="mx-section--flow">
38
38
  <p>section after background own has top and bottom spacing</p>
39
39
  </section>
40
- <section class="mx-section mx-section--flow">
40
+ <section class="mx-section--flow">
41
41
  <p>section with normal flow</p>
42
42
  </section>
43
- <section class="mx-section mx-section--group">
43
+ <section class="mx-section--group">
44
44
  <p>groups can be used normally for larger spacing</p>
45
45
  </section>
46
- <section class="mx-section mx-section--group mx-background--alt">
46
+ <section class="mx-section--group mx-background--alt">
47
47
  <p>adding a background breaks the grouping</p>
48
48
  </section>
49
- <section class="mx-section mx-section--group mx-background--alt">
49
+ <section class="mx-section--group mx-background--alt">
50
50
  <p>into a new group</p>
51
51
  </section>
@@ -1,19 +1,19 @@
1
- <section class="mx-section mx-section--xl mx-background--alt mx-vertical-flow">
1
+ <section class="mx-section--xl mx-background--alt mx-vertical-flow">
2
2
  <h2>Section Extra Large</h2>
3
3
  <p>Extra Large spacing at the section level. Use the <code>section--xl</code> class to apply this spacing to the outter section.</p>
4
4
  <a class="mx-link--more" href="#">Learn more</a>
5
5
  </section>
6
- <section class="mx-section mx-section--l mx-vertical-flow">
6
+ <section class="mx-section--l mx-vertical-flow">
7
7
  <h2>Section Large</h2>
8
8
  <p>Large spacing at the section level. Use the <code>section--l</code> class to apply this spacing to the outter section.</p>
9
9
  <a class="mx-link--more" href="#">Learn more</a>
10
10
  </section>
11
- <section class="mx-section mx-section--m mx-background--alt mx-vertical-flow">
11
+ <section class="mx-section--m mx-background--alt mx-vertical-flow">
12
12
  <h2>Section Medium</h2>
13
13
  <p>Medium spacing at the section level. Use the <code>section--m</code> class to apply this spacing to the outter section.</p>
14
14
  <a class="mx-link--more" href="#">Learn more</a>
15
15
  </section>
16
- <section class="mx-section mx-section--s mx-vertical-flow">
16
+ <section class="mx-section--s mx-vertical-flow">
17
17
  <h2>Section Small</h2>
18
18
  <p>Small spacing at the section level. Use the <code>section--s</code> class to apply this spacing to the outter section.</p>
19
19
  <a class="mx-link--more" href="#">Learn more</a>
@@ -1,16 +1,13 @@
1
- import { Meta, StoryObj } from "@storybook/html"
1
+ import { Meta, StoryObj } from "@storybook/html-vite"
2
2
  import { SidebarOrder } from "../../enums"
3
3
  import Component from "./sidebar.twig"
4
4
  import "./sidebar.css"
5
- import { Page } from "../../../.storybook/decorators"
6
5
 
7
6
  type SidebarArgs = {
8
7
  content?: string | HTMLElement
9
- contentClass?: string
10
8
  order?: SidebarOrder
11
9
  before?: boolean
12
10
  sidebarContent?: string | HTMLElement
13
- sidebarClass?: string
14
11
  }
15
12
 
16
13
  const meta: Meta<SidebarArgs> = {
@@ -20,7 +17,6 @@ const meta: Meta<SidebarArgs> = {
20
17
  order: { options: Object.values(SidebarOrder), control: "select" },
21
18
  before: { control: "boolean" },
22
19
  },
23
- decorators: [Page],
24
20
  args: {
25
21
  content: "Main content",
26
22
  sidebarContent: "Sidebar content",
@@ -1,4 +1,4 @@
1
- import { Meta, StoryObj } from "@storybook/react"
1
+ import { Meta, StoryObj } from "@storybook/react-vite"
2
2
  import Component from "./Sidebar"
3
3
  import { Page } from "../../../.storybook-react/decorators"
4
4
  import { SidebarOrder } from "../../enums"
@@ -1,7 +1,7 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
3
  exports[`Layout/Sidebar NoSidebar smoke-test 1`] = `
4
- <div class="mx-page">
4
+ <div class="mx-page default">
5
5
  <div class="mx-grid--sidebar ">
6
6
  <section>
7
7
  Main content
@@ -11,7 +11,7 @@ exports[`Layout/Sidebar NoSidebar smoke-test 1`] = `
11
11
  `;
12
12
 
13
13
  exports[`Layout/Sidebar ReverseLarge smoke-test 1`] = `
14
- <div class="mx-page">
14
+ <div class="mx-page default">
15
15
  <div class="mx-grid--sidebar mx-grid--sidebar-rev-lg">
16
16
  <section>
17
17
  Main content
@@ -24,7 +24,7 @@ exports[`Layout/Sidebar ReverseLarge smoke-test 1`] = `
24
24
  `;
25
25
 
26
26
  exports[`Layout/Sidebar RevserseMedium smoke-test 1`] = `
27
- <div class="mx-page">
27
+ <div class="mx-page default">
28
28
  <div class="mx-grid--sidebar mx-grid--sidebar-rev">
29
29
  <section>
30
30
  Main content
@@ -37,7 +37,7 @@ exports[`Layout/Sidebar RevserseMedium smoke-test 1`] = `
37
37
  `;
38
38
 
39
39
  exports[`Layout/Sidebar Sidebar smoke-test 1`] = `
40
- <div class="mx-page">
40
+ <div class="mx-page default">
41
41
  <div class="mx-grid--sidebar ">
42
42
  <section>
43
43
  Main content
@@ -50,7 +50,7 @@ exports[`Layout/Sidebar Sidebar smoke-test 1`] = `
50
50
  `;
51
51
 
52
52
  exports[`Layout/Sidebar SidebarFirst smoke-test 1`] = `
53
- <div class="mx-page">
53
+ <div class="mx-page default">
54
54
  <div class="mx-grid--sidebar ">
55
55
  <aside>
56
56
  Sidebar content
@@ -9,51 +9,32 @@
9
9
  }
10
10
 
11
11
  &:where(:has(> aside)) {
12
- @media (--medium-up) {
13
- display: grid;
14
- grid-template-columns: var(--container-max-width, 76ch) auto;
15
- gap: var(--sidebar-gap, var(--gap));
12
+ display: flex;
13
+ flex-wrap: wrap;
14
+ gap: var(--sidebar-gap, var(--gap));
15
+ justify-content: space-between;
16
+
17
+ & > aside {
18
+ flex-grow: 1;
19
+ max-inline-size: var(--sidebar-width, 24ch);
20
+ }
16
21
 
17
- @media (--large-up) {
18
- --sidebar-gap: 18ch;
19
- }
22
+ & > section {
23
+ flex-basis: 0;
24
+ flex-grow: 999;
25
+ min-inline-size: var(--content-min, 50%);
26
+ max-inline-size: var(--container-max-width, 76ch);
20
27
  }
21
28
 
22
29
  &.mx-grid--sidebar-rev {
23
- & > :is(section, aside) {
24
- &:first-child {
25
- order: 2;
26
- }
27
-
28
- &:last-child {
29
- order: 1;
30
- }
31
- }
30
+ flex-direction: row-reverse;
32
31
  }
33
32
 
34
33
  &.mx-grid--sidebar-rev-lg {
35
34
  @media (--medium-up) {
36
- & > :is(section, aside) {
37
- &:first-child {
38
- order: 2;
39
- }
40
-
41
- &:last-child {
42
- order: 1;
43
- }
44
- }
35
+ flex-direction: row-reverse;
45
36
  }
46
37
  }
47
-
48
- &:is(.mx-grid--sidebar-rev, .mx-grid--sidebar-rev-lg) {
49
- @media (--large-up) {
50
- grid-template-columns: auto var(--container-max-width, 76ch);
51
- }
52
- }
53
- }
54
-
55
- &:where(:has(> aside:first-child)) {
56
- grid-template-columns: auto var(--container-max-width, 76ch);
57
38
  }
58
39
  }
59
40
  }
@@ -4,10 +4,12 @@
4
4
  order ? "mx-grid--"~order : null,
5
5
  ] %}
6
6
  {% set attributes = (attributes ?? create_attribute()).addClass(classes) %}
7
+ {% set sidebarAttributes = (sidebarAttributes ?? create_attribute()) %}
8
+ {% set contentAttributes = (contentAttributes ?? create_attribute()) %}
7
9
 
8
10
  {% if sidebarContent is not empty %}
9
11
  {% set sidebar %}
10
- <aside{% if sidebarClass is not empty %} class="{{ sidebarClass }}"{% endif %}>
12
+ <aside{{ sidebarAttributes }}>
11
13
  {{ sidebarContent }}
12
14
  </aside>
13
15
  {% endset %}
@@ -17,7 +19,7 @@
17
19
  {% if sidebar is not empty and before %}
18
20
  {{ sidebar }}
19
21
  {% endif %}
20
- <section{% if contentClass is not empty %} class="{{ contentClass }}"{% endif %}>
22
+ <section{{ contentAttributes }}>
21
23
  {{ content }}
22
24
  </section>
23
25
  {% if sidebar is not empty and not before %}
@@ -5,7 +5,7 @@
5
5
  */
6
6
 
7
7
  main :is(.user-login-form, .user-register-form, .user-pass) {
8
- max-inline-size: var(--container-max-width-narrow);
8
+ inline-size: min(100%, var(--container-max-width-narrow));
9
9
  margin-block: var(--spacing-xxl);
10
10
  margin-inline: auto;
11
11
  }
@@ -32,7 +32,6 @@ main :is(.user-login-form, .user-register-form, .user-pass) {
32
32
  overflow: hidden;
33
33
  z-index: 501;
34
34
  transform: translateX(-75%);
35
- transition: transform 0.2s ease-in-out;
36
35
 
37
36
  &:hover {
38
37
  transform: translateX(0);
@@ -54,9 +53,6 @@ main :is(.user-login-form, .user-register-form, .user-pass) {
54
53
  padding-inline: var(--spacing-m);
55
54
  color: var(--foreground, var(--colour-primary));
56
55
  background-color: var(--background, var(--colour-background));
57
- transition:
58
- 0.2s background-color,
59
- 0.2s color;
60
56
  }
61
57
  }
62
58
 
package/src/constants.css CHANGED
@@ -4,6 +4,12 @@
4
4
  * Variables
5
5
  */
6
6
 
7
+ @property --schemed {
8
+ syntax: "light | dark";
9
+ inherits: false;
10
+ initial-value: token("colour.scheme");
11
+ }
12
+
7
13
  :root {
8
14
  --_hue-primary: token("colour.primary");
9
15
  --_hue-accent: token("colour.accent");
@@ -13,34 +19,54 @@
13
19
  --_hue-success: token("colour.success");
14
20
  --_hue-outline: token("utility.outline.hue");
15
21
 
22
+ /* Brand colors */
23
+ --colour-primary: oklch(50% 0.3 var(--_hue-primary));
24
+ --colour-primary-light: color-mix(in oklch, var(--colour-primary), white 90%);
25
+ --colour-accent: oklch(50% 0.3 var(--_hue-accent));
26
+ --colour-accent-light: color-mix(in oklch, var(--colour-accent), white 90%);
27
+
16
28
  /* System colours */
17
- --colour-background: token("colour.main.bg");
18
- --colour-background-alt: token("colour.main.bgAlt");
19
- --colour-foreground: token("colour.main.fg");
20
- --colour-foreground-alt: token("colour.main.fgAlt");
21
- --colour-border: token("colour.main.border");
29
+ --color-scheme: token("colour.scheme");
22
30
 
23
- /* Brand colors */
24
- --colour-primary: lch(43% 100 var(--_hue-primary));
25
- --colour-primary-light: lch(95% 10 var(--_hue-primary));
26
- --colour-accent: lch(43% 100 var(--_hue-accent));
27
- --colour-accent-light: lch(95% 10 var(--_hue-accent));
31
+ color-scheme: var(--color-scheme);
32
+
33
+ --colour-background: light-dark(
34
+ token("colour.main.bg"),
35
+ token("colour.reverse.bg")
36
+ );
37
+ --colour-background-alt: light-dark(
38
+ token("colour.main.bgAlt"),
39
+ token("colour.reverse.bgAlt")
40
+ );
41
+ --colour-foreground: light-dark(
42
+ token("colour.main.fg"),
43
+ token("colour.reverse.fg")
44
+ );
45
+ --colour-foreground-alt: light-dark(
46
+ token("colour.main.fgAlt"),
47
+ token("colour.reverse.fgAlt")
48
+ );
49
+ --colour-border: light-dark(
50
+ token("colour.main.border"),
51
+ token("colour.reverse.border")
52
+ );
53
+ --colour-link: light-dark(var(--colour-primary), var(--colour-primary-light));
28
54
 
29
55
  /* Reverse colors */
30
- --colour-foreground-reverse: token("colour.reverse.fg");
31
- --colour-foreground-alt-reverse: token("colour.reverse.fgAlt");
32
- --colour-background-reverse: token("colour.reverse.bg");
33
- --colour-border-reverse: token("colour.reverse.border");
56
+ --colour-foreground-reverse: light-dark(
57
+ token("colour.reverse.fg"),
58
+ token("colour.main.fg")
59
+ );
60
+ --colour-background-reverse: light-dark(
61
+ token("colour.reverse.bg"),
62
+ token("colour.main.bg")
63
+ );
34
64
 
35
65
  /* State colours */
36
- --colour-error-foreground: lch(40% 100 var(--_hue-error));
37
- --colour-error-background: lch(95% 10 var(--_hue-error));
38
- --colour-success-foreground: lch(45% 100 var(--_hue-success));
39
- --colour-success-background: lch(95% 10 var(--_hue-success));
40
- --colour-warning-foreground: lch(46% 100 var(--_hue-warning));
41
- --colour-warning-background: lch(95% 10 var(--_hue-warning));
42
- --colour-info-foreground: lch(43% 100 var(--_hue-info));
43
- --colour-info-background: lch(95% 10 var(--_hue-info));
66
+ --colour-error: oklch(45% 0.3 var(--_hue-error));
67
+ --colour-success: oklch(50% 0.3 var(--_hue-success));
68
+ --colour-warning: oklch(55% 0.3 var(--_hue-warning));
69
+ --colour-info: oklch(50% 0.3 var(--_hue-info));
44
70
 
45
71
  /* Typography */
46
72
  --font-family: token("font.family");
@@ -82,9 +108,12 @@
82
108
  --spacing-uuul: token("size.spacing.uuul");
83
109
 
84
110
  --outline-width: token("utility.outline.width");
85
- --outline-offset: token("utility.outline.offset");
86
111
  --outline-style: token("utility.outline.style");
87
- --outline-color: lch(45% 100 var(--_hue-outline));
112
+ --_colour-outline: oklch(50% 0.3 var(--_hue-outline));
113
+ --outline-color: light-dark(
114
+ var(--colour-outline),
115
+ color-mix(in oklch, var(--colour-outline), white 90%)
116
+ );
88
117
 
89
118
  /* Layout */
90
119
  --container-max-width-narrow: token("size.container.narrow");
package/src/enums.ts CHANGED
@@ -231,6 +231,7 @@ export enum BackgroundStyles {
231
231
  ALT = "alt",
232
232
  REVERSE = "reverse",
233
233
  RESET = "reset",
234
+ BOX = "box",
234
235
  }
235
236
 
236
237
  export enum TableStyles {
package/src/react.ts CHANGED
@@ -57,6 +57,9 @@ export { default as Navigation } from "./Component/Navigation/Navigation"
57
57
  export { default as NavigationDropdown } from "./Component/Navigation/Dropdown"
58
58
  export { default as DropMenu } from "./Component/DropMenu/DropMenu"
59
59
  export { default as DropMenuItem } from "./Component/DropMenu/Components/DropMenuItem"
60
+ export { default as ResultsBar } from "./Component/ResultsBar/ResultsBar"
61
+ export { default as ResultsBarInfo } from "./Component/ResultsBar/Components/ResultsBarInfo"
62
+ export { default as ResultsBarSort } from "./Component/ResultsBar/Components/ResultsBarSort"
60
63
  export {
61
64
  default as DropMenuProvider,
62
65
  useDropMenuContext,
package/src/tokens.js CHANGED
@@ -29,26 +29,27 @@ export default {
29
29
  dropMenu: "420px",
30
30
  },
31
31
  colour: {
32
- primary: "288",
33
- accent: "328",
32
+ scheme: "light",
33
+ primary: "260",
34
+ accent: "320",
34
35
  main: {
35
- fg: "lch(0% 0 0)",
36
- bg: "lch(100% 0 0)",
37
- fgAlt: "lch(25% 0 0)",
38
- bgAlt: "lch(95% 0 0)",
39
- border: "lch(90% 0 0)",
36
+ fg: "oklch(0 0 100)",
37
+ bg: "oklch(1 0 100)",
38
+ fgAlt: "oklch(0.25 0 100)",
39
+ bgAlt: "oklch(0.95 0 100)",
40
+ border: "oklch(.9 0 100)",
40
41
  },
41
42
  reverse: {
42
- fg: "lch(100% 0 0)",
43
- bg: "lch(0% 0 0)",
44
- fgAlt: "lch(95% 0 0)",
45
- bgAlt: "lch(25% 0 0)",
46
- border: "lch(10% 0 0)",
43
+ fg: "oklch(1 0 100)",
44
+ bg: "oklch(0 0 100)",
45
+ fgAlt: "oklch(0.95 0 100)",
46
+ bgAlt: "oklch(0.25 0 100)",
47
+ border: "oklch(0.25 0 100)",
47
48
  },
48
- info: "288",
49
- warning: "70",
50
- success: "134",
51
- error: "34",
49
+ info: "260",
50
+ warning: "90",
51
+ success: "140",
52
+ error: "20",
52
53
  },
53
54
  font: {
54
55
  family: "system-ui, sans-serif",
@@ -101,9 +102,8 @@ export default {
101
102
  utility: {
102
103
  outline: {
103
104
  width: "2px",
104
- offset: "0",
105
105
  style: "solid",
106
- hue: "288",
106
+ hue: "260",
107
107
  },
108
108
  radius: {
109
109
  m: "3px",
@@ -111,7 +111,7 @@ export default {
111
111
  round: "50%",
112
112
  },
113
113
  shadow: {
114
- colour: "lch(25% 0 0)",
114
+ colour: "oklch(0.25 0 100)",
115
115
  size: global.size.xs,
116
116
  },
117
117
  ratio: "16 / 9",
@@ -1 +0,0 @@
1
- {"version":3,"file":"utilities-B4YZb689.js","sources":["../../../node_modules/js-cookie/dist/js.cookie.mjs","../../../src/Utility/Elements/io-loader.ts","../../../src/Utility/Elements/breakpoint-loader.ts","../../../src/Utility/utilities.ts"],"sourcesContent":["/*! js-cookie v3.0.5 | MIT */\n/* eslint-disable no-var */\nfunction assign (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n target[key] = source[key];\n }\n }\n return target\n}\n/* eslint-enable no-var */\n\n/* eslint-disable no-var */\nvar defaultConverter = {\n read: function (value) {\n if (value[0] === '\"') {\n value = value.slice(1, -1);\n }\n return value.replace(/(%[\\dA-F]{2})+/gi, decodeURIComponent)\n },\n write: function (value) {\n return encodeURIComponent(value).replace(\n /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,\n decodeURIComponent\n )\n }\n};\n/* eslint-enable no-var */\n\n/* eslint-disable no-var */\n\nfunction init (converter, defaultAttributes) {\n function set (name, value, attributes) {\n if (typeof document === 'undefined') {\n return\n }\n\n attributes = assign({}, defaultAttributes, attributes);\n\n if (typeof attributes.expires === 'number') {\n attributes.expires = new Date(Date.now() + attributes.expires * 864e5);\n }\n if (attributes.expires) {\n attributes.expires = attributes.expires.toUTCString();\n }\n\n name = encodeURIComponent(name)\n .replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent)\n .replace(/[()]/g, escape);\n\n var stringifiedAttributes = '';\n for (var attributeName in attributes) {\n if (!attributes[attributeName]) {\n continue\n }\n\n stringifiedAttributes += '; ' + attributeName;\n\n if (attributes[attributeName] === true) {\n continue\n }\n\n // Considers RFC 6265 section 5.2:\n // ...\n // 3. If the remaining unparsed-attributes contains a %x3B (\";\")\n // character:\n // Consume the characters of the unparsed-attributes up to,\n // not including, the first %x3B (\";\") character.\n // ...\n stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];\n }\n\n return (document.cookie =\n name + '=' + converter.write(value, name) + stringifiedAttributes)\n }\n\n function get (name) {\n if (typeof document === 'undefined' || (arguments.length && !name)) {\n return\n }\n\n // To prevent the for loop in the first place assign an empty array\n // in case there are no cookies at all.\n var cookies = document.cookie ? document.cookie.split('; ') : [];\n var jar = {};\n for (var i = 0; i < cookies.length; i++) {\n var parts = cookies[i].split('=');\n var value = parts.slice(1).join('=');\n\n try {\n var found = decodeURIComponent(parts[0]);\n jar[found] = converter.read(value, found);\n\n if (name === found) {\n break\n }\n } catch (e) {}\n }\n\n return name ? jar[name] : jar\n }\n\n return Object.create(\n {\n set,\n get,\n remove: function (name, attributes) {\n set(\n name,\n '',\n assign({}, attributes, {\n expires: -1\n })\n );\n },\n withAttributes: function (attributes) {\n return init(this.converter, assign({}, this.attributes, attributes))\n },\n withConverter: function (converter) {\n return init(assign({}, this.converter, converter), this.attributes)\n }\n },\n {\n attributes: { value: Object.freeze(defaultAttributes) },\n converter: { value: Object.freeze(converter) }\n }\n )\n}\n\nvar api = init(defaultConverter, { path: '/' });\n/* eslint-enable no-var */\n\nexport { api as default };\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n/**\n * Lazy Load on an Intersection Observer\n */\n\nexport default class IntersectionLoader {\n el: HTMLElement\n callback: () => any\n observer: IntersectionObserver\n fallbackBtn?: HTMLButtonElement\n errorMsg?: HTMLElement\n\n constructor(el: HTMLElement, callback: () => any) {\n this.el = el\n this.callback = callback\n this.fallbackBtn = this.el.querySelector(\"[data-load-fallback]\")\n this.errorMsg = this.el.querySelector(\"[data-load-error]\")\n }\n\n init = (): void => {\n this.observer = new IntersectionObserver(items => {\n items.forEach(({ isIntersecting }) => {\n if (isIntersecting) this.load().catch(error => this.handleError(error))\n })\n })\n this.observer.observe(this.el)\n this.fallbackBtn?.addEventListener(\"click\", this.handleClick)\n }\n\n load = async (): Promise<void> => {\n try {\n await this.callback()\n } catch (error) {\n this.handleError(error)\n }\n this.observer.unobserve(this.el)\n }\n\n handleClick = (): void => {\n this.load().catch(error => this.handleError(error))\n }\n\n handleError = (error): void => {\n console.error(error) // eslint-disable-line no-console\n this.errorMsg?.removeAttribute(\"hidden\")\n }\n\n static create = (selector: string, callback: () => any): void => {\n if (!Object.hasOwn(window, \"once\")) return\n window\n .once(\"intersection-loader\", selector)\n ?.forEach((el: HTMLElement): void => {\n const loader: IntersectionLoader = new IntersectionLoader(el, callback)\n loader.init()\n })\n }\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n/**\n * Lazy Load a component based on breakpoint.\n */\n\ntype BreakpointLoaderOptions = {\n mediaQuery?: string\n}\n\nexport default class BreakpointLoader {\n el: HTMLElement\n callback: () => any\n breakpoint: MediaQueryList\n options: BreakpointLoaderOptions\n fallbackBtn?: HTMLButtonElement\n errorMsg?: HTMLElement\n\n constructor(\n el: HTMLElement,\n callback: () => any,\n options: BreakpointLoaderOptions = { mediaQuery: \"(max-width: 720px)\" },\n ) {\n if (!el) {\n throw new Error(\"Element is null or empty.\")\n }\n this.el = el\n this.callback = callback\n this.breakpoint = window.matchMedia(options.mediaQuery)\n this.options = { ...options }\n this.fallbackBtn = this.el.querySelector(\"[data-load-fallback]\")\n this.errorMsg = this.el.querySelector(\"[data-load-error]\")\n }\n\n init = (): void => {\n this.responsiveCheck(this.breakpoint)\n this.breakpoint.addEventListener(\"change\", this.responsiveCheck)\n this.fallbackBtn?.addEventListener(\"click\", this.handleClick)\n }\n\n responsiveCheck = ({ matches }): void => {\n matches && this.load().catch(error => this.handleError(error))\n }\n\n load = async (): Promise<void> => {\n try {\n await this.callback()\n } catch (error) {\n this.handleError(error)\n }\n this.breakpoint.removeEventListener(\"change\", this.responsiveCheck)\n }\n\n handleClick = (): void => {\n this.load().catch(error => this.handleError(error))\n }\n\n handleError = (error): void => {\n console.error(error) // eslint-disable-line no-console\n this.errorMsg?.removeAttribute(\"hidden\")\n }\n\n static create = (\n selector: string,\n callback: () => any,\n options: BreakpointLoaderOptions = {},\n ): void => {\n if (!Object.hasOwn(window, \"once\")) return\n window\n .once(\"breakpoint-loader\", selector)\n ?.forEach((el: HTMLElement): void => {\n const loader: BreakpointLoader = new BreakpointLoader(\n el,\n callback,\n options,\n )\n loader.init()\n })\n }\n}\n","/* eslint-disable no-console */\n/**\n * @file utilities.\n */\n\nexport { default as DisclosureWidget } from \"./Elements/disclosure-widget\"\nexport type { DisclosureWidgetEvent } from \"./Elements/disclosure-widget\"\nexport { default as Keyboard } from \"./Elements/keyboard\"\nexport { default as CookieCompliance } from \"./Elements/cookie-compliance\"\nexport { default as IntersectionLoader } from \"./Elements/io-loader\"\nexport { default as BreakpointLoader } from \"./Elements/breakpoint-loader\"\n\nexport const makeAnchor = (string: string, length: number = 20): string => {\n if (typeof string !== \"string\" || !string) return \"\"\n // Convert the string to lowercase and remove non-alphanumeric characters.\n let id: string = string\n .toLowerCase()\n .trim()\n .replace(/\\s+/g, \"-\")\n .replace(/[^-a-z0-9]/g, \"\")\n .replace(/[\\n\\r]+|[\\s]{2,}/g, \"\")\n // Ensure we start the id with a letter.\n // Only run this several times.\n const times: number[] = [...Array(6).keys()]\n times.forEach((): void => {\n if (!id.charAt(0).match(/[a-z]/g)) {\n id = id.substring(1)\n }\n })\n // Cut to the desired length.\n if (length) id = id.substring(0, length + 1)\n\n return id\n}\n\nexport const makeCamelCase = (string: string): string => {\n if (typeof string !== \"string\" || !string) return \"\"\n const output: string = string\n .trim()\n .replace(\n /(?:^\\w|[A-Z]|\\b\\w|\\s+)/g,\n (match: string, index: number): string => {\n if (+match === 0) return \"\"\n return index === 0 ? match.toLowerCase() : match.toUpperCase()\n },\n )\n return output.replace(/[^\\w\\s]/gi, \"\")\n}\n\nexport const isInternalLink = (\n href: string,\n internalHostnames: string[],\n): boolean => {\n if (typeof href !== \"string\" || !href || !Array.isArray(internalHostnames)) {\n return false\n }\n\n try {\n const { hostname }: { hostname: string } = new URL(href)\n return (\n window.location.hostname === hostname ||\n internalHostnames.includes(hostname)\n )\n } catch (error) {\n console.error(error)\n return false\n }\n}\n\nexport const createElement = (string: string): Element | null => {\n try {\n const el: HTMLDivElement = document.createElement(\"div\")\n el.innerHTML = string\n return el.firstElementChild\n } catch (error) {\n console.error(error)\n return null\n }\n}\n\nexport const getElementBox = (\n element: HTMLElement,\n once: boolean = false,\n content: boolean = false,\n): void => {\n const observer: ResizeObserver = new ResizeObserver(entries => {\n entries.forEach(({ contentBoxSize, borderBoxSize }) => {\n const [{ inlineSize, blockSize }] = content\n ? contentBoxSize\n : borderBoxSize\n element.style.setProperty(\"--inline-size\", `${inlineSize.toFixed(1)}px`)\n element.style.setProperty(\"--block-size\", `${blockSize.toFixed(1)}px`)\n if (once) observer.unobserve(element)\n })\n })\n observer.observe(element)\n}\n\nexport const handleOutsideClick = (\n event: MouseEvent,\n container: HTMLElement,\n callback: () => void,\n ignored: HTMLElement[] = [],\n): void => {\n const {\n target,\n clientY,\n clientX,\n }: { target: EventTarget; clientY: number; clientX: number } = event\n // FF treating option click as outside click.\n const isOption: boolean =\n target instanceof HTMLOptionElement || target instanceof HTMLSelectElement\n // Or it's in the ignored list.\n\n const isIgnored: HTMLElement[] = ignored?.filter(\n item => item === target || item.contains(target as HTMLElement),\n )\n // Exit early if we can.\n if (isIgnored.length || isOption) return\n // Check if click is inside the dialog content.\n const obs: IntersectionObserver = new IntersectionObserver(\n ([{ boundingClientRect }]) => {\n const { top, height, width, left } = boundingClientRect\n const isInDialog: boolean =\n top <= clientY &&\n clientY <= top + height &&\n left <= clientX &&\n clientX <= left + width\n\n if (!isInDialog) {\n callback()\n }\n obs.disconnect()\n },\n )\n obs.observe(container)\n}\n\nexport const handleEscape = (\n event: KeyboardEvent,\n callback: () => void,\n): void => {\n const { key } = event\n if (key === \"Escape\") {\n callback()\n }\n}\n\n/* eslint-disable no-unused-vars, @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access */\nexport const loadOnReady = (\n callback: (this: Window, ev: Event) => void,\n name: string,\n): void => {\n // @ts-expect-error Drupal is global\n if (Object.hasOwn(window, \"Drupal\") && Object.hasOwn(Drupal, \"behaviors\")) {\n // @ts-expect-error Drupal is global\n Drupal.behaviors[name] = {\n attach: callback,\n }\n return\n }\n window.addEventListener(\"DOMContentLoaded\", callback.bind(document, document))\n}\n"],"names":["converter"],"mappings":"AAAA;AAEA,SAAS,OAAQ,QAAQ;AACvB,WAAS,IAAI,GAAG,IAAI,UAAU,QAAQ,KAAK;AACzC,QAAI,SAAS,UAAU,CAAC;AACxB,aAAS,OAAO,QAAQ;AACtB,aAAO,GAAG,IAAI,OAAO,GAAG;AAAA,IACzB;AAAA,EACF;AACD,SAAO;AACT;AAIA,IAAI,mBAAmB;AAAA,EACrB,MAAM,SAAU,OAAO;AACrB,QAAI,MAAM,CAAC,MAAM,KAAK;AACpB,cAAQ,MAAM,MAAM,GAAG,EAAE;AAAA,IAC1B;AACD,WAAO,MAAM,QAAQ,oBAAoB,kBAAkB;AAAA,EAC5D;AAAA,EACD,OAAO,SAAU,OAAO;AACtB,WAAO,mBAAmB,KAAK,EAAE;AAAA,MAC/B;AAAA,MACA;AAAA,IACD;AAAA,EACF;AACH;AAKA,SAAS,KAAM,WAAW,mBAAmB;AAC3C,WAAS,IAAK,MAAM,OAAO,YAAY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,OAAG,YAAY;AACf,WAAO,GAAG;AAAA,WACH,OAAO;AACd,YAAQ,MAAM,KAAK;AACZ,WAAA;AAAA,EACT;AACF;AAoBO,MAAM,qBAAqB,CAChC,OACA,WACA,UACA,UAAyB,CAAA,MAChB;AACH,QAAA;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,EAC6D,IAAA;AAEzD,QAAA,WACJ,kBAAkB,qBAAqB,kBAAkB;AAG3D,QAAM,YAA2B,SAAS;AAAA,IACxC,CAAQ,SAAA,SAAS,UAAU,KAAK,SAAS,MAAqB;AAAA,EAAA;AAG5D,MAAA,UAAU,UAAU,SAAU;AAElC,QAAM,MAA4B,IAAI;AAAA,IACpC,CAAC,CAAC,EAAE,mBAAA,CAAoB,MAAM;AAC5B,YAAM,EAAE,KAAK,QAAQ,OAAO,SAAS;AAC/B,YAAA,aACJ,OAAO,WACP,WAAW,MAAM,UACjB,QAAQ,WACR,WAAW,OAAO;AAEpB,UAAI,CAAC,YAAY;AACN;MACX;AACA,UAAI,WAAW;AAAA,IACjB;AAAA,EAAA;AAEF,MAAI,QAAQ,SAAS;AACvB;AAEa,MAAA,eAAe,CAC1B,OACA,aACS;AACH,QAAA,EAAE,IAAQ,IAAA;AAChB,MAAI,QAAQ,UAAU;AACX;EACX;AACF;","x_google_ignoreList":[0]}
@@ -1,10 +0,0 @@
1
- <div class="tile stack {{ modifier_class }}{% if size %} tile--{{ size }}{% endif %}">
2
- <div class="tile__content vertical-flow-flex">
3
- {% block content %}
4
- <h3 class="text--m">{{ title | default('Tile title') }}</h3>
5
- {% endblock %}
6
- </div>
7
- {% block link %}
8
- <a href="#">{{ link | default('Tile link') }}</a>
9
- {% endblock %}
10
- </div>