@pnx-mixtape/mxds 0.0.19 → 0.0.21

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 (120) hide show
  1. package/README.md +18 -6
  2. package/dist/build/accordion.entry.js +2 -2
  3. package/dist/build/accordion.entry.js.map +1 -1
  4. package/dist/build/base.css +2 -1
  5. package/dist/build/button.css +4 -4
  6. package/dist/build/card.css +6 -5
  7. package/dist/build/chunks/{Accordion-deu4CCT-.js → Accordion-O-huO4At.js} +2 -2
  8. package/dist/build/chunks/{Accordion-deu4CCT-.js.map → Accordion-O-huO4At.js.map} +1 -1
  9. package/dist/build/chunks/{disclosure-widget-WwE5XplD.js → disclosure-widget-DVpnRsTI.js} +2 -2
  10. package/dist/build/chunks/{disclosure-widget-WwE5XplD.js.map → disclosure-widget-DVpnRsTI.js.map} +1 -1
  11. package/dist/build/chunks/{drop-menu.entry-e1iZ4ERw.js → drop-menu.entry-B4TtnC50.js} +2 -2
  12. package/dist/build/chunks/{drop-menu.entry-e1iZ4ERw.js.map → drop-menu.entry-B4TtnC50.js.map} +1 -1
  13. package/dist/build/chunks/{utilities-BeWkujCZ.js → utilities-DXELy_An.js} +91 -1
  14. package/dist/build/chunks/utilities-DXELy_An.js.map +1 -0
  15. package/dist/build/constants.css +6 -4
  16. package/dist/build/dialog.css +1 -9
  17. package/dist/build/dialog.entry.js +1 -1
  18. package/dist/build/drop-menu.entry.js +1 -1
  19. package/dist/build/filters.entry.js +1 -1
  20. package/dist/build/global-alert.entry.js +1 -1
  21. package/dist/build/header.css +49 -63
  22. package/dist/build/header.entry.js +1107 -21
  23. package/dist/build/header.entry.js.map +1 -1
  24. package/dist/build/hero-banner.css +12 -6
  25. package/dist/build/in-page-navigation.entry.js +1 -1
  26. package/dist/build/navigation.entry.js +2 -2
  27. package/dist/build/page.css +2 -2
  28. package/dist/build/pagination.css +15 -21
  29. package/dist/build/steps.css +11 -11
  30. package/dist/build/sticky.entry.js +1 -1
  31. package/dist/build/tabs.entry.js +2 -2
  32. package/dist/build/utilities.css +9 -1
  33. package/package.json +18 -29
  34. package/src/Atom/Button/_buttons-styles.css +3 -3
  35. package/src/Atom/Heading/Heading.tsx +1 -1
  36. package/src/Atom/Icon/Icon.tsx +1 -1
  37. package/src/Atom/Link/Link.stories.tsx +2 -6
  38. package/src/Atom/Link/Link.tsx +9 -4
  39. package/src/Atom/Link/_links.css +1 -0
  40. package/src/Component/Accordion/Accordion.stories.tsx +39 -9
  41. package/src/Component/Accordion/Accordion.tsx +28 -50
  42. package/src/Component/Accordion/Components/AccordionContent.tsx +24 -0
  43. package/src/Component/Accordion/Components/AccordionTitle.tsx +34 -0
  44. package/src/Component/Accordion/Components/AccordionTitleIcon.tsx +22 -0
  45. package/src/Component/Accordion/__snapshots__/Accordion.stories.tsx.snap +26 -0
  46. package/src/Component/Breadcrumb/Breadcrumb.tsx +8 -2
  47. package/src/Component/Breadcrumb/__snapshots__/Breadcrumb.stories.tsx.snap +7 -3
  48. package/src/Component/Card/Card.stories.tsx +22 -19
  49. package/src/Component/Card/Card.tsx +6 -28
  50. package/src/Component/Card/Components/CardContent.tsx +12 -0
  51. package/src/Component/Card/Components/CardMedia.tsx +17 -0
  52. package/src/Component/Card/__snapshots__/Card.stories.tsx.snap +9 -9
  53. package/src/Component/Card/card.css +3 -2
  54. package/src/Component/ContentBlock/Components/ContentBlockContent.tsx +14 -0
  55. package/src/Component/ContentBlock/Components/ContentBlockMedia.tsx +20 -0
  56. package/src/Component/ContentBlock/ContentBlock.stories.tsx +16 -13
  57. package/src/Component/ContentBlock/ContentBlock.tsx +5 -28
  58. package/src/Component/ContentBlock/__snapshots__/ContentBlock.stories.tsx.snap +0 -2
  59. package/src/Component/Dialog/Components/DialogCloseButton.tsx +18 -0
  60. package/src/Component/Dialog/Components/DialogContent.tsx +7 -0
  61. package/src/Component/Dialog/Dialog.stories.tsx +19 -24
  62. package/src/Component/Dialog/Dialog.tsx +31 -25
  63. package/src/Component/Dialog/__snapshots__/Dialog.stories.tsx.snap +14 -21
  64. package/src/Component/Dialog/dialog.css +0 -8
  65. package/src/Component/HeroBanner/HeroBanner.stories.ts +23 -12
  66. package/src/Component/HeroBanner/HeroBanner.stories.tsx +26 -7
  67. package/src/Component/HeroBanner/HeroBanner.tsx +2 -20
  68. package/src/Component/HeroBanner/__snapshots__/HeroBanner.stories.ts.snap +51 -3
  69. package/src/Component/HeroBanner/hero-banner.css +8 -4
  70. package/src/Component/HeroBanner/hero-banner.twig +2 -2
  71. package/src/Component/HeroSearch/HeroSearch.stories.ts +105 -0
  72. package/src/Component/HeroSearch/HeroSearch.stories.tsx +48 -0
  73. package/src/Component/HeroSearch/HeroSearch.tsx +32 -0
  74. package/src/Component/HeroSearch/__snapshots__/HeroSearch.stories.ts.snap +176 -0
  75. package/src/Component/HeroSearch/__snapshots__/HeroSearch.stories.tsx.snap +36 -0
  76. package/src/Component/HeroSearch/hero-search.twig +43 -0
  77. package/src/Component/InPageNavigation/InPageNavigation.stories.tsx +1 -1
  78. package/src/Component/InPageNavigation/InPageNavigation.tsx +1 -0
  79. package/src/Component/InPageNavigation/__snapshots__/InPageNavigation.stories.tsx.snap +1 -1
  80. package/src/Component/LinkList/LinkList.stories.ts +12 -0
  81. package/src/Component/LinkList/LinkList.stories.tsx +0 -6
  82. package/src/Component/LinkList/LinkList.tsx +5 -16
  83. package/src/Component/LinkList/__snapshots__/LinkList.stories.ts.snap +37 -0
  84. package/src/Component/LinkList/__snapshots__/LinkList.stories.tsx.snap +9 -29
  85. package/src/Component/LinkList/link-list.twig +1 -0
  86. package/src/Component/ListItem/Components/ListItemContent.tsx +12 -0
  87. package/src/Component/ListItem/Components/ListItemMedia.tsx +20 -0
  88. package/src/Component/ListItem/ListItem.stories.tsx +22 -19
  89. package/src/Component/ListItem/ListItem.tsx +3 -32
  90. package/src/Component/ListItem/__snapshots__/ListItem.stories.tsx.snap +3 -0
  91. package/src/Component/Pagination/Components/PaginationContext.tsx +10 -4
  92. package/src/Component/Pagination/Components/PaginationItem.tsx +10 -10
  93. package/src/Component/Pagination/Pagination.tsx +6 -2
  94. package/src/Component/Pagination/__snapshots__/Pagination.stories.tsx.snap +10 -4
  95. package/src/Component/Pagination/pagination.css +13 -18
  96. package/src/Component/Steps/__snapshots__/Steps.stories.ts.snap +12 -12
  97. package/src/Component/Steps/step-item.twig +1 -1
  98. package/src/Component/Steps/steps.css +1 -2
  99. package/src/Component/Tabs/Components/TabPanel.tsx +1 -1
  100. package/src/Component/Tabs/__snapshots__/Tabs.stories.tsx.snap +2 -0
  101. package/src/Component/Tile/Tile.stories.tsx +20 -15
  102. package/src/Component/Tile/__snapshots__/Tile.stories.tsx.snap +18 -23
  103. package/src/Layout/Header/Elements/GlobalToggle.ts +55 -21
  104. package/src/Layout/Header/__snapshots__/Header.stories.ts.snap +14 -14
  105. package/src/Layout/Header/__snapshots__/Header.stories.tsx.snap +2 -2
  106. package/src/Layout/Header/_header.css +2 -47
  107. package/src/Layout/Header/_toggles.css +37 -1
  108. package/src/Layout/Header/header.twig +5 -5
  109. package/src/Layout/Page/Page.stories.tsx +13 -4
  110. package/src/Layout/Page/__snapshots__/Page.stories.tsx.snap +2 -2
  111. package/src/Layout/Page/page.css +1 -1
  112. package/src/Layout/Section/__snapshots__/Section.stories.tsx.snap +3 -3
  113. package/src/Layout/Section/__snapshots__/SectionGrid.stories.tsx.snap +2 -2
  114. package/src/Layout/Sidebar/__snapshots__/Sidebar.stories.tsx.snap +3 -3
  115. package/src/Utility/utilities.css +8 -0
  116. package/src/constants.css +5 -3
  117. package/src/react.ts +30 -7
  118. package/src/tokens.js +3 -1
  119. package/dist/build/chunks/utilities-BeWkujCZ.js.map +0 -1
  120. package/src/Component/Tile/Tile.tsx +0 -53
@@ -11,6 +11,7 @@ type InPageNavigationProps = {
11
11
  levels?: string
12
12
  }
13
13
 
14
+ // @todo: make composable
14
15
  const InPageNavigation = ({
15
16
  title = "On this page",
16
17
  containerRef,
@@ -70,7 +70,7 @@ exports[`Component/InPageNavigation InPageNavigation smoke-test 1`] = `
70
70
  </nav>
71
71
  </aside>
72
72
  <section>
73
- <div class="vertical-flow">
73
+ <div class="mx-vertical-flow">
74
74
  <h2 class
75
75
  level="h2"
76
76
  id="section-1"
@@ -5,7 +5,9 @@ import "./link-list.css"
5
5
  // Deps.
6
6
  import Link from "../../Atom/Link/link.twig"
7
7
  import Icon from "../../Atom/Icon/icon.twig"
8
+ import Heading from "../../Atom/Heading/heading.twig"
8
9
  import { Icons } from "../../enums"
10
+ import { HeadingTypes } from "@pnx-mixtape/ids-shape"
9
11
 
10
12
  const meta: Meta<typeof Component> = {
11
13
  tags: ["autodocs", "ids-mvp"],
@@ -41,3 +43,13 @@ export default meta
41
43
  type Story = StoryObj<typeof meta>
42
44
 
43
45
  export const LinkList: Story = {}
46
+
47
+ export const WithTitle: Story = {
48
+ args: {
49
+ title: Heading({
50
+ title: "Popular links",
51
+ as: HeadingTypes.TWO,
52
+ modifiers: [HeadingTypes.FOUR],
53
+ }),
54
+ },
55
+ }
@@ -21,9 +21,3 @@ export default meta
21
21
  type Story = StoryObj<typeof meta>
22
22
 
23
23
  export const LinkList: Story = {}
24
-
25
- export const Divided: Story = {
26
- args: {
27
- divided: true,
28
- },
29
- }
@@ -3,21 +3,9 @@ import classNames from "classnames"
3
3
  import Link from "../../Atom/Link/Link"
4
4
  import { Icons } from "../../enums"
5
5
 
6
- type LinkListProps = PropsWithChildren & {
7
- divided?: boolean
8
- }
9
- // @todo no divided
10
- const LinkList = ({
11
- divided = false,
12
- children,
13
- }: LinkListProps): JSX.Element => (
14
- <ul
15
- className={classNames("mx-link-list", {
16
- "mx-link-list--divided": divided,
17
- })}
18
- >
19
- {children}
20
- </ul>
6
+ type LinkListProps = PropsWithChildren & {}
7
+ const LinkList = ({ children }: LinkListProps): JSX.Element => (
8
+ <ul className={classNames("mx-link-list")}>{children}</ul>
21
9
  )
22
10
 
23
11
  type LinkListItemProps = PropsWithChildren & {
@@ -33,8 +21,9 @@ const LinkListItem = ({
33
21
  className,
34
22
  }: LinkListItemProps): JSX.Element => (
35
23
  <li className={className}>
36
- <Link className={classNames("mx-icon", `mx-icon--${icon}`)} to={to}>
24
+ <Link to={to}>
37
25
  {children}
26
+ <span className={classNames("mx-icon", `mx-icon--${icon}`)} />
38
27
  </Link>
39
28
  </li>
40
29
  )
@@ -33,3 +33,40 @@ exports[`Component/LinkList LinkList smoke-test 1`] = `
33
33
  </ul>
34
34
  </div>
35
35
  `;
36
+
37
+ exports[`Component/LinkList WithTitle smoke-test 1`] = `
38
+ <div class="mx-page default">
39
+ <h2 class=" mx-heading--m">
40
+ Popular links
41
+ </h2>
42
+ <ul class="mx-link-list">
43
+ <li>
44
+ <a href="#">
45
+ <span>
46
+ Music
47
+ </span>
48
+ <span class="mx-icon mx-icon--chevron-right ">
49
+ </span>
50
+ </a>
51
+ </li>
52
+ <li>
53
+ <a href="#">
54
+ <span>
55
+ Performances
56
+ </span>
57
+ <span class="mx-icon mx-icon--chevron-right ">
58
+ </span>
59
+ </a>
60
+ </li>
61
+ <li>
62
+ <a href="#">
63
+ <span>
64
+ Get involved
65
+ </span>
66
+ <span class="mx-icon mx-icon--chevron-right ">
67
+ </span>
68
+ </a>
69
+ </li>
70
+ </ul>
71
+ </div>
72
+ `;
@@ -1,52 +1,32 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
- exports[`Navigation/Link List Divided smoke-test 1`] = `
4
- <ul class="mx-link-list mx-link-list--divided">
5
- <li>
6
- <a href="#1"
7
- class="mx-icon mx-icon--chevron-right"
8
- >
9
- Page link #1
10
- </a>
11
- </li>
12
- <li>
13
- <a href="#2"
14
- class="mx-icon mx-icon--chevron-right"
15
- >
16
- Page link #2
17
- </a>
18
- </li>
19
- <li>
20
- <a href="#3"
21
- class="mx-icon mx-icon--chevron-right"
22
- >
23
- Page link #3
24
- </a>
25
- </li>
26
- </ul>
27
- `;
28
-
29
3
  exports[`Navigation/Link List LinkList smoke-test 1`] = `
30
4
  <ul class="mx-link-list">
31
5
  <li>
32
6
  <a href="#1"
33
- class="mx-icon mx-icon--chevron-right"
7
+ class="mx-link"
34
8
  >
35
9
  Page link #1
10
+ <span class="mx-icon mx-icon--chevron-right">
11
+ </span>
36
12
  </a>
37
13
  </li>
38
14
  <li>
39
15
  <a href="#2"
40
- class="mx-icon mx-icon--chevron-right"
16
+ class="mx-link"
41
17
  >
42
18
  Page link #2
19
+ <span class="mx-icon mx-icon--chevron-right">
20
+ </span>
43
21
  </a>
44
22
  </li>
45
23
  <li>
46
24
  <a href="#3"
47
- class="mx-icon mx-icon--chevron-right"
25
+ class="mx-link"
48
26
  >
49
27
  Page link #3
28
+ <span class="mx-icon mx-icon--chevron-right">
29
+ </span>
50
30
  </a>
51
31
  </li>
52
32
  </ul>
@@ -1,6 +1,7 @@
1
1
  {% set classes = ['mx-link-list'] %}
2
2
  {% set attributes = (attributes ?? create_attribute()).addClass(classes) %}
3
3
 
4
+ {{ title }}
4
5
  <ul{{ attributes }}>
5
6
  {% for item in items %}
6
7
  <li>{{ item }}</li>
@@ -0,0 +1,12 @@
1
+ import { JSX, PropsWithChildren } from "react"
2
+ import classNames from "classnames"
3
+
4
+ const ListItemContent = ({ children }: PropsWithChildren): JSX.Element => {
5
+ return (
6
+ <div className={classNames("mx-list-item__content", "mx-vertical-flow")}>
7
+ {children}
8
+ </div>
9
+ )
10
+ }
11
+
12
+ export default ListItemContent
@@ -0,0 +1,20 @@
1
+ import { JSX, PropsWithChildren } from "react"
2
+ import classNames from "classnames"
3
+
4
+ type CardProps = PropsWithChildren & {
5
+ skeleton?: boolean
6
+ }
7
+
8
+ const ListItemMedia = ({
9
+ children,
10
+ skeleton = false,
11
+ }: CardProps): JSX.Element => {
12
+ return (
13
+ <figure className={classNames("mx-list-item__media", "stack")}>
14
+ {skeleton && <div className="mx-skeleton mx-skeleton--bg"></div>}
15
+ {children}
16
+ </figure>
17
+ )
18
+ }
19
+
20
+ export default ListItemMedia
@@ -1,30 +1,33 @@
1
1
  import { Meta, StoryObj } from "@storybook/react-vite"
2
2
  import Component from "./ListItem"
3
+ import ListItemContent from "./Components/ListItemContent"
4
+ import Text from "../../Atom/Text/Text"
5
+ import Link from "../../Atom/Link/Link"
6
+ import { TextStyles, TextTags } from "../../enums"
3
7
 
4
8
  const meta: Meta<typeof Component> = {
5
9
  title: "Elements/ListItem",
6
10
  component: Component,
7
- argTypes: {
8
- children: {
9
- table: {
10
- disable: true,
11
- },
12
- },
13
- },
14
11
  args: {
15
- title: "Teaser title",
16
- to: "http://example.com",
17
- info: "18 May 2040",
18
12
  children: (
19
- <p>
20
- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
21
- tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
22
- veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
23
- commodo consequat. Duis aute irure dolor in reprehenderit in voluptate
24
- velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint
25
- occaecat cupidatat non proident, sunt in culpa qui officia deserunt
26
- mollit anim id est laborum.
27
- </p>
13
+ <ListItemContent>
14
+ <Text modifier={TextStyles.S} tag={TextTags.STRONG}>
15
+ label
16
+ </Text>
17
+ <div className="mx-heading--m">
18
+ <Link to="http://example.com">Teaser title</Link>
19
+ </div>
20
+ <Text modifier={TextStyles.S}>18 May 2040</Text>
21
+ <p>
22
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
23
+ eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad
24
+ minim veniam, quis nostrud exercitation ullamco laboris nisi ut
25
+ aliquip ex ea commodo consequat. Duis aute irure dolor in
26
+ reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
27
+ pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
28
+ culpa qui officia deserunt mollit anim id est laborum.
29
+ </p>
30
+ </ListItemContent>
28
31
  ),
29
32
  },
30
33
  }
@@ -1,31 +1,15 @@
1
- import { JSX, PropsWithChildren, ReactNode } from "react"
1
+ import { JSX, PropsWithChildren } from "react"
2
2
  import classNames from "classnames"
3
- import Link from "../../Atom/Link/Link"
4
- import { TextStyles, TextTags } from "../../enums"
5
- import { HeadingTypes, AsTypes } from "@pnx-mixtape/ids-shape"
6
- import Text from "../../Atom/Text/Text"
3
+ import { AsTypes } from "@pnx-mixtape/ids-shape"
7
4
 
8
5
  type TeaserProps = PropsWithChildren & {
9
- title: string
10
- to: string
11
- label?: string
12
- info?: string
13
- infoBefore?: boolean
14
6
  className?: string
15
7
  as?: AsTypes
16
- headingLevel?: HeadingTypes
17
- image?: ReactNode
18
8
  }
19
9
 
20
10
  const ListItem = ({
21
11
  children,
22
- title,
23
- to,
24
- label,
25
- info,
26
- infoBefore = false,
27
12
  className,
28
- image,
29
13
  as = AsTypes.ARTICLE,
30
14
  ...props
31
15
  }: TeaserProps): JSX.Element => {
@@ -33,20 +17,7 @@ const ListItem = ({
33
17
  return (
34
18
  <div className="mx-container">
35
19
  <Tag className={classNames(["mx-list-item", className])} {...props}>
36
- {image && <figure className="mx-list-item__media">{image}</figure>}
37
- <div className="mx-list-item__content mx-vertical-flow">
38
- {label && (
39
- <Text modifier={TextStyles.S} tag={TextTags.STRONG}>
40
- {info}
41
- </Text>
42
- )}
43
- {info && infoBefore && <Text modifier={TextStyles.S}>{info}</Text>}
44
- <div className="mx-heading--m">
45
- <Link to={to}>{title}</Link>
46
- </div>
47
- {info && !infoBefore && <Text modifier={TextStyles.S}>{info}</Text>}
48
- {children}
49
- </div>
20
+ {children}
50
21
  </Tag>
51
22
  </div>
52
23
  )
@@ -4,6 +4,9 @@ exports[`Elements/ListItem ListItem smoke-test 1`] = `
4
4
  <div class="mx-container">
5
5
  <article class="mx-list-item">
6
6
  <div class="mx-list-item__content mx-vertical-flow">
7
+ <strong class="mx-text--s">
8
+ label
9
+ </strong>
7
10
  <div class="mx-heading--m">
8
11
  <a href="http://example.com"
9
12
  class="mx-link"
@@ -53,8 +53,14 @@ const PaginationProvider = ({
53
53
  // Calculate the "from a to b of x" values.
54
54
  const startVal = resultsPerPage * (currentPage - 1) + 1
55
55
  const endVal = resultsPerPage * currentPage
56
- const pageStart = useRef<number>(currentPage > 1 ? startVal : 1)
57
- const pageEnd = useRef<number>(total > endVal ? endVal : total)
56
+ const pageStart = useMemo<number>(
57
+ () => (currentPage > 1 ? startVal : 1),
58
+ [currentPage, startVal],
59
+ )
60
+ const pageEnd = useMemo<number>(
61
+ () => (total > endVal ? endVal : total),
62
+ [total, endVal],
63
+ )
58
64
 
59
65
  const showPager: boolean = useMemo(
60
66
  () => total > resultsPerPage,
@@ -157,8 +163,8 @@ const PaginationProvider = ({
157
163
  visiblePages,
158
164
  showFirstEllipsis,
159
165
  showLastEllipsis,
160
- pageStart: pageStart.current,
161
- pageEnd: pageEnd.current,
166
+ pageStart,
167
+ pageEnd,
162
168
  onClick,
163
169
  onMouseOver,
164
170
  }),
@@ -31,16 +31,16 @@ const PaginationItem = ({
31
31
  </>
32
32
  )}
33
33
  {(as === "next" || as === "previous") && (
34
- <button
35
- type="button"
36
- disabled={disabled}
37
- data-page={number}
38
- className={classNames("mx-icon", {
39
- "mx-icon--arrow-left": as === "previous",
40
- "mx-icon--arrow-right": as === "next",
41
- })}
42
- >
43
- {as}
34
+ <button type="button" disabled={disabled} data-page={number}>
35
+ {as === "previous" && (
36
+ <span className={classNames("mx-icon", "mx-icon--arrow-left")}></span>
37
+ )}
38
+ <span>{as}</span>
39
+ {as === "next" && (
40
+ <span
41
+ className={classNames("mx-icon", "mx-icon--arrow-right")}
42
+ ></span>
43
+ )}
44
44
  </button>
45
45
  )}
46
46
  </li>
@@ -16,7 +16,9 @@ const Pagination = (): JSX.Element => {
16
16
 
17
17
  const handleClick: MouseEventHandler = e => {
18
18
  const target = e.target as HTMLElement
19
- const page: string = target.getAttribute("data-page")
19
+ const page: string = target
20
+ .closest("[data-page]")
21
+ ?.getAttribute("data-page")
20
22
  if (!page) return
21
23
  onClick(parseInt(page))
22
24
  e.preventDefault()
@@ -25,7 +27,9 @@ const Pagination = (): JSX.Element => {
25
27
 
26
28
  const handleMouseOver: MouseEventHandler = e => {
27
29
  const target = e.target as HTMLElement
28
- const page: string = target.getAttribute("data-page")
30
+ const page: string = target
31
+ .closest("[data-page]")
32
+ ?.getAttribute("data-page")
29
33
  if (page) onMouseOver(parseInt(page))
30
34
  }
31
35
 
@@ -10,9 +10,12 @@ exports[`Component/Pagination Pagination smoke-test 1`] = `
10
10
  >
11
11
  <button type="button"
12
12
  disabled
13
- class="mx-icon mx-icon--arrow-left"
14
13
  >
15
- previous
14
+ <span class="mx-icon mx-icon--arrow-left">
15
+ </span>
16
+ <span>
17
+ previous
18
+ </span>
16
19
  </button>
17
20
  </li>
18
21
  <li class="mx-pagination__item"
@@ -47,9 +50,12 @@ exports[`Component/Pagination Pagination smoke-test 1`] = `
47
50
  <li class="mx-pagination__next">
48
51
  <button type="button"
49
52
  data-page="2"
50
- class="mx-icon mx-icon--arrow-right"
51
53
  >
52
- next
54
+ <span>
55
+ next
56
+ </span>
57
+ <span class="mx-icon mx-icon--arrow-right">
58
+ </span>
53
59
  </button>
54
60
  </li>
55
61
  </ul>
@@ -11,6 +11,15 @@
11
11
  padding: unset;
12
12
  background: transparent;
13
13
  cursor: pointer;
14
+ border: none;
15
+ font-size: inherit;
16
+ text-transform: inherit;
17
+
18
+ &:has(.mx-icon) {
19
+ display: inline-flex;
20
+ align-items: center;
21
+ gap: var(--spacing-xxs);
22
+ }
14
23
  }
15
24
 
16
25
  & :is(a, button, [aria-current="page"], [aria-current="step"]) {
@@ -35,12 +44,6 @@
35
44
  pointer-events: none;
36
45
  }
37
46
 
38
- & .mx-icon:not(.mx-icon--only) {
39
- display: flex;
40
- align-items: center;
41
- gap: var(--spacing-xxs);
42
- }
43
-
44
47
  & .mx-pagination__items {
45
48
  display: flex;
46
49
  place-content: center;
@@ -54,20 +57,12 @@
54
57
  padding-inline: var(--spacing-xs);
55
58
  }
56
59
 
57
- &
58
- :is(.mx-pagination__previous, .mx-pagination__next)
59
- .mx-icon:not(.mx-icon--only) {
60
- font-weight: var(--font-weight-bold);
60
+ & :is(.mx-pagination__previous, .mx-pagination__next) {
61
61
  text-transform: capitalize;
62
62
 
63
- @media (--small-down) {
64
- overflow: hidden;
65
- inline-size: var(--spacing-s);
66
- position: relative;
67
- text-indent: 100%;
68
-
69
- &::before {
70
- position: absolute;
63
+ & span:where(:not(.mx-icon)) {
64
+ @media (--small-down) {
65
+ display: none;
71
66
  }
72
67
  }
73
68
  }
@@ -4,7 +4,7 @@ exports[`Component/Steps Counters smoke-test 1`] = `
4
4
  <div class="mx-page default">
5
5
  <div class="mx-steps mx-steps--counters">
6
6
  <div class="mx-steps__panel ">
7
- <div class="mx-steps__panel-content mx-container mx-vertical-flow">
7
+ <div class="mx-steps__panel-content mx-container mx-vertical-flow rich-text">
8
8
  <h2>
9
9
  Funk
10
10
  </h2>
@@ -14,7 +14,7 @@ exports[`Component/Steps Counters smoke-test 1`] = `
14
14
  </div>
15
15
  </div>
16
16
  <div class="mx-steps__panel ">
17
- <div class="mx-steps__panel-content mx-container mx-vertical-flow">
17
+ <div class="mx-steps__panel-content mx-container mx-vertical-flow rich-text">
18
18
  <h3>
19
19
  Soul
20
20
  </h3>
@@ -24,7 +24,7 @@ exports[`Component/Steps Counters smoke-test 1`] = `
24
24
  </div>
25
25
  </div>
26
26
  <div class="mx-steps__panel ">
27
- <div class="mx-steps__panel-content mx-container mx-vertical-flow">
27
+ <div class="mx-steps__panel-content mx-container mx-vertical-flow rich-text">
28
28
  <h4>
29
29
  Motown
30
30
  </h4>
@@ -41,17 +41,17 @@ exports[`Component/Steps Progress smoke-test 1`] = `
41
41
  <div class="mx-page default">
42
42
  <div class="mx-steps mx-steps--supplementary ">
43
43
  <div class="mx-steps__panel mx-steps--fill">
44
- <div class="mx-steps__panel-content mx-container mx-vertical-flow">
44
+ <div class="mx-steps__panel-content mx-container mx-vertical-flow rich-text">
45
45
  Funk is the ipsum dolor sit amet, consectetur adipiscing elit. Proin at finibus velit. Curabitur consequat, dolor venenatis ullamcorper commodo, quam mi iaculis sem, non varius massa risus et enim. Interdum et malesuada fames ac ante ipsum primis in faucibus. Phasellus non mi lorem. Morbi semper sagittis euismod. Vestibulum non ornare orci.
46
46
  </div>
47
47
  </div>
48
48
  <div class="mx-steps__panel ">
49
- <div class="mx-steps__panel-content mx-container mx-vertical-flow">
49
+ <div class="mx-steps__panel-content mx-container mx-vertical-flow rich-text">
50
50
  Soul music ipsum dolor sit amet, consectetur adipiscing elit. Proin at finibus velit. Curabitur consequat, dolor venenatis ullamcorper commodo, quam mi iaculis sem, non varius massa risus et enim. Interdum et malesuada fames ac ante ipsum primis in faucibus. Phasellus non mi lorem.
51
51
  </div>
52
52
  </div>
53
53
  <div class="mx-steps__panel ">
54
- <div class="mx-steps__panel-content mx-container mx-vertical-flow">
54
+ <div class="mx-steps__panel-content mx-container mx-vertical-flow rich-text">
55
55
  Motown lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin at finibus velit. Curabitur consequat, dolor venenatis ullamcorper commodo, quam mi iaculis sem, non varius massa risus et enim. Interdum et malesuada fames ac ante ipsum primis in faucibus. Phasellus non mi lorem. Morbi semper sagittis euismod. Vestibulum non ornare orci.
56
56
  </div>
57
57
  </div>
@@ -63,17 +63,17 @@ exports[`Component/Steps ProgressCounters smoke-test 1`] = `
63
63
  <div class="mx-page default">
64
64
  <div class="mx-steps mx-steps--dark mx-steps--counters ">
65
65
  <div class="mx-steps__panel mx-steps--fill">
66
- <div class="mx-steps__panel-content mx-container mx-vertical-flow">
66
+ <div class="mx-steps__panel-content mx-container mx-vertical-flow rich-text">
67
67
  Funk is the ipsum dolor sit amet, consectetur adipiscing elit. Proin at finibus velit. Curabitur consequat, dolor venenatis ullamcorper commodo, quam mi iaculis sem, non varius massa risus et enim. Interdum et malesuada fames ac ante ipsum primis in faucibus. Phasellus non mi lorem. Morbi semper sagittis euismod. Vestibulum non ornare orci.
68
68
  </div>
69
69
  </div>
70
70
  <div class="mx-steps__panel mx-steps--fill">
71
- <div class="mx-steps__panel-content mx-container mx-vertical-flow">
71
+ <div class="mx-steps__panel-content mx-container mx-vertical-flow rich-text">
72
72
  Soul music ipsum dolor sit amet, consectetur adipiscing elit. Proin at finibus velit. Curabitur consequat, dolor venenatis ullamcorper commodo, quam mi iaculis sem, non varius massa risus et enim. Interdum et malesuada fames ac ante ipsum primis in faucibus. Phasellus non mi lorem.
73
73
  </div>
74
74
  </div>
75
75
  <div class="mx-steps__panel ">
76
- <div class="mx-steps__panel-content mx-container mx-vertical-flow">
76
+ <div class="mx-steps__panel-content mx-container mx-vertical-flow rich-text">
77
77
  Motown lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin at finibus velit. Curabitur consequat, dolor venenatis ullamcorper commodo, quam mi iaculis sem, non varius massa risus et enim. Interdum et malesuada fames ac ante ipsum primis in faucibus. Phasellus non mi lorem. Morbi semper sagittis euismod. Vestibulum non ornare orci.
78
78
  </div>
79
79
  </div>
@@ -85,7 +85,7 @@ exports[`Component/Steps Steps smoke-test 1`] = `
85
85
  <div class="mx-page default">
86
86
  <div class="mx-steps ">
87
87
  <div class="mx-steps__panel ">
88
- <div class="mx-steps__panel-content mx-container mx-vertical-flow">
88
+ <div class="mx-steps__panel-content mx-container mx-vertical-flow rich-text">
89
89
  <h2>
90
90
  Funk
91
91
  </h2>
@@ -95,7 +95,7 @@ exports[`Component/Steps Steps smoke-test 1`] = `
95
95
  </div>
96
96
  </div>
97
97
  <div class="mx-steps__panel ">
98
- <div class="mx-steps__panel-content mx-container mx-vertical-flow">
98
+ <div class="mx-steps__panel-content mx-container mx-vertical-flow rich-text">
99
99
  <h3>
100
100
  Soul
101
101
  </h3>
@@ -105,7 +105,7 @@ exports[`Component/Steps Steps smoke-test 1`] = `
105
105
  </div>
106
106
  </div>
107
107
  <div class="mx-steps__panel ">
108
- <div class="mx-steps__panel-content mx-container mx-vertical-flow">
108
+ <div class="mx-steps__panel-content mx-container mx-vertical-flow rich-text">
109
109
  <h4>
110
110
  Motown
111
111
  </h4>
@@ -5,7 +5,7 @@
5
5
  ] %}
6
6
  {% set attributes = (attributes ?? create_attribute()).addClass(classes) %}
7
7
  <div{{ attributes }}>
8
- <div class="mx-steps__panel-content mx-container mx-vertical-flow">
8
+ <div class="mx-steps__panel-content mx-container mx-vertical-flow rich-text">
9
9
  {{ content }}
10
10
  </div>
11
11
  </div>
@@ -70,8 +70,7 @@
70
70
  inline-size: var(--line-width, 2px);
71
71
  background-color: var(--line-colour, var(--colour-border));
72
72
  inset-inline-start: calc(
73
- (var(--counter-size, var(--spacing-l)) / 2) -
74
- (var(--line-width, 2px) / 2)
73
+ (var(--counter-size, 2rem) / 2) + (var(--line-width, 2px))
75
74
  );
76
75
  inset-block: 0;
77
76
  position: absolute;
@@ -19,7 +19,7 @@ const TabPanel = ({
19
19
  id={id}
20
20
  className={classNames("mx-tabs__panel", "mx-vertical-flow", className)}
21
21
  // @ts-expect-error inert is allowed.
22
- inert={!isActive ? "" : null}
22
+ inert={!isActive ? "true" : null}
23
23
  aria-labelledby={`${id}-button`}
24
24
  role="tabpanel"
25
25
  tabIndex={0}
@@ -93,6 +93,7 @@ exports[`Component/Tabs Default smoke-test 1`] = `
93
93
  </div>
94
94
  <div id="unique-5"
95
95
  class="mx-tabs__panel mx-vertical-flow mx-section--l"
96
+ inert
96
97
  aria-labelledby="unique-8"
97
98
  role="tabpanel"
98
99
  tabindex="0"
@@ -103,6 +104,7 @@ exports[`Component/Tabs Default smoke-test 1`] = `
103
104
  </div>
104
105
  <div id="unique-6"
105
106
  class="mx-tabs__panel mx-vertical-flow mx-section--l"
107
+ inert
106
108
  aria-labelledby="unique-9"
107
109
  role="tabpanel"
108
110
  tabindex="0"