@pnx-mixtape/mxds 0.0.2 → 0.0.4
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.
- package/README.md +13 -13
- package/package.json +5 -4
- package/src/Atom/Background/__snapshots__/Backgrounds.stories.ts.snap +3 -3
- package/src/Atom/Background/_background.css +1 -22
- package/src/Atom/Blockquote/_blockquote.css +1 -1
- package/src/Atom/Button/Button.stories.ts +4 -6
- package/src/Atom/Button/README.md +3 -3
- package/src/Atom/Button/__snapshots__/Button.stories.ts.snap +23 -11
- package/src/Atom/Button/__snapshots__/Button.stories.tsx.snap +2 -2
- package/src/Atom/Button/_buttons-styles.css +1 -1
- package/src/Atom/Button/_buttons.css +5 -1
- package/src/Atom/Button/button.twig +6 -4
- package/src/Atom/Button/twig/story-button.twig +11 -0
- package/src/Atom/DefinitionList/__snapshots__/DefinitionList.stories.tsx.snap +1 -1
- package/src/Atom/Heading/__snapshots__/Heading.stories.ts.snap +2 -2
- package/src/Atom/Heading/__snapshots__/Heading.stories.tsx.snap +1 -1
- package/src/Atom/Heading/_headings.css +1 -1
- package/src/Atom/Heading/heading.twig +19 -1
- package/src/Atom/Icon/README.md +1 -1
- package/src/Atom/Icon/__snapshots__/Icon.stories.ts.snap +3 -3
- package/src/Atom/Icon/__snapshots__/Icon.stories.tsx.snap +3 -3
- package/src/Atom/Icon/_extended-set.css +1 -1
- package/src/Atom/Icon/_icon.css +5 -5
- package/src/Atom/Image/__snapshots__/Image.stories.ts.snap +1 -1
- package/src/Atom/Image/_image.css +1 -1
- package/src/Atom/Link/Link.stories.ts +31 -7
- package/src/Atom/Link/__snapshots__/Link.stories.ts.snap +46 -6
- package/src/Atom/Link/__snapshots__/Link.stories.tsx.snap +3 -3
- package/src/Atom/Link/_links.css +24 -2
- package/src/Atom/Link/link.twig +8 -6
- package/src/Atom/Link/twig/story-link.twig +11 -0
- package/src/Atom/Media/Media.stories.ts +17 -1
- package/src/Atom/Media/__snapshots__/Media.stories.ts.snap +17 -2
- package/src/Atom/Media/__snapshots__/Media.stories.tsx.snap +2 -2
- package/src/Atom/Media/_media.css +1 -1
- package/src/Atom/Media/media.twig +1 -5
- package/src/Atom/Media/twig/story-media.twig +11 -0
- package/src/Atom/NavList/__snapshots__/NavList.stories.ts.snap +1 -1
- package/src/Atom/NavList/nav-list.css +1 -1
- package/src/Atom/README.md +1 -1
- package/src/Atom/Spacing/__snapshots__/Spacing.stories.ts.snap +1 -1
- package/src/Atom/Spacing/_spacing.css +1 -1
- package/src/Atom/Table/__snapshots__/Table.stories.ts.snap +4 -4
- package/src/Atom/Table/__snapshots__/TableResponsive.stories.ts.snap +1 -1
- package/src/Atom/Table/_table.css +1 -1
- package/src/Atom/Text/__snapshots__/Text.stories.tsx.snap +1 -1
- package/src/Atom/Text/__snapshots__/TextSizes.stories.ts.snap +2 -2
- package/src/Atom/Text/_text-align.css +1 -1
- package/src/Atom/Text/_text-sizes.css +1 -1
- package/src/Atom/Video/Video.stories.ts +5 -3
- package/src/Atom/Video/__snapshots__/Video.stories.ts.snap +3 -13
- package/src/Atom/Video/_video.css +6 -1
- package/src/Atom/Video/video.twig +10 -4
- package/src/Atom/_animated.css +1 -1
- package/src/Atom/_flow-legacy.css +1 -1
- package/src/Atom/_flow.css +1 -1
- package/src/Atom/_generic.css +1 -1
- package/src/Atom/_hr.css +1 -1
- package/src/Atom/base.css +2 -2
- package/src/Component/Accordion/README.md +7 -17
- package/src/Component/Accordion/__snapshots__/Accordion.stories.ts.snap +4 -4
- package/src/Component/Accordion/__snapshots__/Accordion.stories.tsx.snap +1 -1
- package/src/Component/Accordion/accordion.css +2 -2
- package/src/Component/Accordion/accordion.entry.js +2 -0
- package/src/Component/Breadcrumb/__snapshots__/Breadcrumb.stories.ts.snap +1 -1
- package/src/Component/Breadcrumb/__snapshots__/Breadcrumb.stories.tsx.snap +2 -2
- package/src/Component/Breadcrumb/breadcrumb.css +1 -1
- package/src/Component/Callout/__snapshots__/Callout.stories.ts.snap +12 -0
- package/src/Component/Callout/callout.css +1 -1
- package/src/Component/Card/README.md +7 -13
- package/src/Component/Card/__snapshots__/Card.stories.ts.snap +34 -24
- package/src/Component/Card/__snapshots__/Card.stories.tsx.snap +3 -3
- package/src/Component/Card/card.css +3 -3
- package/src/Component/ContentBlock/README.md +7 -13
- package/src/Component/ContentBlock/__snapshots__/ContentBlock.stories.ts.snap +6 -23
- package/src/Component/ContentBlock/__snapshots__/ContentBlock.stories.tsx.snap +1 -1
- package/src/Component/ContentBlock/content-block.css +2 -2
- package/src/Component/Dialog/README.md +15 -49
- package/src/Component/Dialog/__snapshots__/Dialog.stories.ts.snap +2 -2
- package/src/Component/Dialog/__snapshots__/Dialog.stories.tsx.snap +1 -1
- package/src/Component/Dialog/dialog.css +3 -3
- package/src/Component/Dialog/dialog.entry.js +1 -0
- package/src/Component/DropMenu/README.md +19 -4
- package/src/Component/DropMenu/__snapshots__/DropMenu.stories.ts.snap +1 -1
- package/src/Component/DropMenu/__snapshots__/DropMenu.stories.tsx.snap +1 -1
- package/src/Component/DropMenu/drop-menu.css +1 -1
- package/src/Component/DropMenu/drop-menu.entry.js +1 -0
- package/src/Component/{InPageAlert/Elements/InPageAlert.ts → GlobalAlert/Elements/ClosableAlert.ts} +21 -10
- package/src/Component/GlobalAlert/GlobalAlert.stories.ts +49 -0
- package/src/Component/GlobalAlert/GlobalAlert.stories.tsx +33 -0
- package/src/Component/GlobalAlert/GlobalAlert.tsx +50 -0
- package/src/Component/GlobalAlert/README.md +27 -0
- package/src/Component/GlobalAlert/__snapshots__/GlobalAlert.stories.ts.snap +43 -0
- package/src/Component/GlobalAlert/__snapshots__/GlobalAlert.stories.tsx.snap +48 -0
- package/src/Component/GlobalAlert/global-alert.css +55 -0
- package/src/Component/GlobalAlert/global-alert.entry.js +1 -0
- package/src/Component/GlobalAlert/global-alert.twig +30 -0
- package/src/Component/GlobalAlert/twig/story-global-alert.twig +14 -0
- package/src/Component/HeroBanner/__snapshots__/HeroBanner.stories.ts.snap +74 -0
- package/src/Component/HeroBanner/__snapshots__/{PageTitle.stories.tsx.snap → HeroBanner.stories.tsx.snap} +4 -4
- package/src/Component/HeroBanner/hero-banner.css +1 -1
- package/src/Component/HeroBanner/hero-banner.twig +1 -0
- package/src/Component/InPageAlert/InPageAlert.stories.ts +20 -22
- package/src/Component/InPageAlert/InPageAlert.stories.tsx +5 -5
- package/src/Component/InPageAlert/InPageAlert.tsx +15 -41
- package/src/Component/InPageAlert/README.md +4 -4
- package/src/Component/InPageAlert/__snapshots__/InPageAlert.stories.ts.snap +9 -36
- package/src/Component/InPageAlert/__snapshots__/InPageAlert.stories.tsx.snap +56 -56
- package/src/Component/InPageAlert/in-page-alert.css +2 -2
- package/src/Component/InPageAlert/in-page-alert.twig +13 -16
- package/src/Component/InPageAlert/twig/story-in-page-alert.twig +11 -0
- package/src/Component/InPageNavigation/README.md +10 -15
- package/src/Component/InPageNavigation/__snapshots__/InPageNavigation.stories.ts.snap +6 -70
- package/src/Component/InPageNavigation/__snapshots__/InPageNavigation.stories.tsx.snap +1 -1
- package/src/Component/InPageNavigation/in-page-navigation.css +2 -2
- package/src/Component/InPageNavigation/in-page-navigation.entry.js +1 -0
- package/src/Component/LinkList/README.md +3 -3
- package/src/Component/LinkList/__snapshots__/LinkList.stories.ts.snap +24 -55
- package/src/Component/LinkList/link-list.css +1 -1
- package/src/Component/Navigation/README.md +16 -7
- package/src/Component/Navigation/__snapshots__/Collapsible.stories.ts.snap +1 -1
- package/src/Component/Navigation/__snapshots__/Dropdown.stories.ts.snap +1 -1
- package/src/Component/Navigation/__snapshots__/Dropdown.stories.tsx.snap +1 -1
- package/src/Component/Navigation/__snapshots__/Navigation.stories.ts.snap +1 -1
- package/src/Component/Navigation/__snapshots__/Navigation.stories.tsx.snap +2 -2
- package/src/Component/Navigation/_navigation-collapsible.css +1 -1
- package/src/Component/Navigation/_navigation-dropdown.css +1 -1
- package/src/Component/Navigation/_navigation-mega.css +1 -1
- package/src/Component/Navigation/_navigation.css +1 -1
- package/src/Component/Navigation/navigation.entry.js +1 -0
- package/src/Component/Pagination/README.md +3 -3
- package/src/Component/Pagination/__snapshots__/Pagination.stories.ts.snap +1 -1
- package/src/Component/Pagination/__snapshots__/Pagination.stories.tsx.snap +1 -1
- package/src/Component/Pagination/pagination.css +1 -1
- package/src/Component/Sticky/README.md +12 -5
- package/src/Component/Sticky/__snapshots__/Sticky.stories.ts.snap +9 -82
- package/src/Component/Sticky/__snapshots__/Sticky.stories.tsx.snap +1 -1
- package/src/Component/Sticky/sticky.css +2 -2
- package/src/Component/Sticky/sticky.entry.js +1 -0
- package/src/Component/Tabs/README.md +11 -4
- package/src/Component/Tabs/__snapshots__/Tabs.stories.ts.snap +1 -1
- package/src/Component/Tabs/__snapshots__/Tabs.stories.tsx.snap +1 -1
- package/src/Component/Tabs/tabs.css +2 -2
- package/src/Component/Tabs/tabs.entry.js +1 -0
- package/src/Component/Tag/README.md +2 -2
- package/src/Component/Tag/__snapshots__/Tag.stories.ts.snap +3 -3
- package/src/Component/Tag/__snapshots__/Tag.stories.tsx.snap +1 -1
- package/src/Component/Tag/tag.css +1 -1
- package/src/Component/Tile/__snapshots__/Tile.stories.ts.snap +1 -1
- package/src/Component/Tile/__snapshots__/Tile.stories.tsx.snap +2 -2
- package/src/Component/Tile/tiles.css +1 -1
- package/src/Form/README.md +2 -2
- package/src/Form/form.css +12 -12
- package/src/Layout/Footer/FooterMenu/__snapshots__/FooterMenu.stories.ts.snap +1 -1
- package/src/Layout/Footer/FooterMenu/footer-menu.css +1 -1
- package/src/Layout/Footer/footer.css +1 -1
- package/src/Layout/Grid/__snapshots__/Grid.stories.ts.snap +33 -90
- package/src/Layout/Grid/container-grid.css +2 -2
- package/src/Layout/Grid/grid.css +2 -2
- package/src/Layout/Header/_header.css +1 -1
- package/src/Layout/Header/_toggles.css +1 -1
- package/src/Layout/Header/header.entry.js +1 -0
- package/src/Layout/Masthead/__snapshots__/Masthead.stories.ts.snap +2 -2
- package/src/Layout/Masthead/masthead.css +5 -5
- package/src/Layout/Masthead/masthead.twig +2 -2
- package/src/Layout/Page/README.md +2 -2
- package/src/Layout/Page/__snapshots__/Page.stories.tsx.snap +1 -1
- package/src/Layout/Page/page.css +2 -2
- package/src/Layout/README.md +3 -2
- package/src/Layout/Section/Section.stories.ts +1 -2
- package/src/Layout/Section/__snapshots__/Background.stories.ts.snap +59 -0
- package/src/Layout/Section/__snapshots__/Breakouts.stories.ts.snap +80 -0
- package/src/Layout/Section/__snapshots__/Flow.stories.ts.snap +91 -0
- package/src/Layout/Section/__snapshots__/Section.stories.ts.snap +22 -14
- package/src/Layout/Section/section.css +4 -4
- package/src/Layout/Section/twig/section-story.twig +1 -1
- package/src/Layout/Sidebar/sidebar.css +1 -1
- package/src/Utility/Drupal/README.md +1 -1
- package/src/Utility/README.md +1 -1
- package/src/Utility/_layout-utils.css +1 -1
- package/src/Utility/utilities.css +3 -3
- package/src/elements.ts +1 -1
- package/dist/build/Accordion.js +0 -61
- package/dist/build/Accordion.js.map +0 -1
- package/dist/build/AccordionDiv.js +0 -62
- package/dist/build/AccordionDiv.js.map +0 -1
- package/dist/build/AccordionGroup.js +0 -85
- package/dist/build/AccordionGroup.js.map +0 -1
- package/dist/build/AccordionMobile.js +0 -31
- package/dist/build/AccordionMobile.js.map +0 -1
- package/dist/build/Dialog.js +0 -116
- package/dist/build/Dialog.js.map +0 -1
- package/dist/build/DropMenu.js +0 -132
- package/dist/build/DropMenu.js.map +0 -1
- package/dist/build/GlobalToggle.js +0 -103
- package/dist/build/GlobalToggle.js.map +0 -1
- package/dist/build/InPageAlert.js +0 -61
- package/dist/build/InPageAlert.js.map +0 -1
- package/dist/build/InPageNavigation.js +0 -92
- package/dist/build/InPageNavigation.js.map +0 -1
- package/dist/build/Navigation.js +0 -126
- package/dist/build/Navigation.js.map +0 -1
- package/dist/build/Sticky.js +0 -63
- package/dist/build/Sticky.js.map +0 -1
- package/dist/build/Tabs.js +0 -164
- package/dist/build/Tabs.js.map +0 -1
- package/dist/build/accordion.css +0 -108
- package/dist/build/base.css +0 -1000
- package/dist/build/breadcrumb.css +0 -47
- package/dist/build/breakpoint-loader.js +0 -52
- package/dist/build/breakpoint-loader.js.map +0 -1
- package/dist/build/button.css +0 -126
- package/dist/build/callout.css +0 -11
- package/dist/build/card.css +0 -135
- package/dist/build/chunks/js.cookie-CiMiGxWx.js +0 -101
- package/dist/build/chunks/js.cookie-CiMiGxWx.js.map +0 -1
- package/dist/build/chunks/polyfills-CJ5uTmUJ.js +0 -749
- package/dist/build/chunks/polyfills-CJ5uTmUJ.js.map +0 -1
- package/dist/build/chunks/popover-wbPSyFRj.js +0 -654
- package/dist/build/chunks/popover-wbPSyFRj.js.map +0 -1
- package/dist/build/chunks/utilities-BIk0P2KX.js +0 -61
- package/dist/build/chunks/utilities-BIk0P2KX.js.map +0 -1
- package/dist/build/constants.css +0 -120
- package/dist/build/container-grid.css +0 -207
- package/dist/build/content-block.css +0 -23
- package/dist/build/cookie-compliance.js +0 -122
- package/dist/build/cookie-compliance.js.map +0 -1
- package/dist/build/dialog.css +0 -98
- package/dist/build/disclosure-widget.js +0 -124
- package/dist/build/disclosure-widget.js.map +0 -1
- package/dist/build/drop-menu.css +0 -78
- package/dist/build/drupal.css +0 -74
- package/dist/build/footer-menu.css +0 -32
- package/dist/build/footer.css +0 -61
- package/dist/build/form.css +0 -589
- package/dist/build/grid.css +0 -200
- package/dist/build/header.css +0 -131
- package/dist/build/hero-banner.css +0 -62
- package/dist/build/icon.css +0 -399
- package/dist/build/in-page-alert.css +0 -94
- package/dist/build/in-page-navigation.css +0 -17
- package/dist/build/index.css +0 -4980
- package/dist/build/io-loader.js +0 -44
- package/dist/build/io-loader.js.map +0 -1
- package/dist/build/keyboard.js +0 -101
- package/dist/build/keyboard.js.map +0 -1
- package/dist/build/link-list.css +0 -72
- package/dist/build/masthead.css +0 -39
- package/dist/build/nav-list.css +0 -29
- package/dist/build/navigation.css +0 -371
- package/dist/build/page.css +0 -184
- package/dist/build/pagination.css +0 -123
- package/dist/build/section.css +0 -160
- package/dist/build/sidebar.css +0 -105
- package/dist/build/sticky.css +0 -47
- package/dist/build/tabs.css +0 -106
- package/dist/build/tag.css +0 -67
- package/dist/build/tiles.css +0 -61
- package/dist/build/utilities.css +0 -175
- package/src/Component/Card/__snapshots__/CardGrid.stories.ts.snap +0 -89
- package/src/Component/HeroBanner/__snapshots__/PageTitle.stories.ts.snap +0 -31
- package/src/Layout/Section/__snapshots__/SectionBackground.stories.ts.snap +0 -55
- package/src/Layout/Section/__snapshots__/SectionsBreakouts.stories.ts.snap +0 -78
- package/src/Layout/Section/__snapshots__/SectionsFlowsGroups.stories.ts.snap +0 -89
- package/src/index.css +0 -27
package/src/Layout/Grid/grid.css
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Dynamic Grid
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
@layer
|
|
5
|
+
@layer design-system.layouts {
|
|
6
6
|
.grid {
|
|
7
7
|
--grid-repeat: auto-fit;
|
|
8
8
|
--grid-min: 20ch;
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
/**
|
|
112
112
|
* Grid items.
|
|
113
113
|
*/
|
|
114
|
-
@layer
|
|
114
|
+
@layer design-system.layouts {
|
|
115
115
|
[class*="grid-item__span-"] {
|
|
116
116
|
grid-column: auto / var(--grid-span, auto);
|
|
117
117
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./Elements/GlobalToggle"
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
3
|
exports[`Layout/Header/Secondary Secondary smoke-test 1`] = `
|
|
4
|
-
<div class="
|
|
4
|
+
<div class="masthead section section__full section--top-xs section--bottom-xs background--reverse foreground--reverse">
|
|
5
5
|
<div class="flex">
|
|
6
6
|
<span class="text--s">
|
|
7
7
|
Global message
|
|
8
8
|
</span>
|
|
9
|
-
<nav class="nav
|
|
9
|
+
<nav class="nav masthead__nav nav--inline text--s"
|
|
10
10
|
aria-label="Navigation"
|
|
11
11
|
>
|
|
12
12
|
<ul>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Masthead
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
@layer
|
|
6
|
-
.
|
|
5
|
+
@layer design-system.layouts {
|
|
6
|
+
.masthead {
|
|
7
7
|
& .flex {
|
|
8
8
|
justify-content: space-between;
|
|
9
9
|
align-items: center;
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
.
|
|
19
|
+
.masthead__nav {
|
|
20
20
|
display: none;
|
|
21
21
|
|
|
22
22
|
@media (--global-nav-up) {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
@media print {
|
|
33
|
-
.
|
|
33
|
+
.masthead {
|
|
34
34
|
display: none;
|
|
35
35
|
}
|
|
36
36
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
<div class="
|
|
1
|
+
<div class="masthead section section__full section--top-xs section--bottom-xs background--reverse foreground--reverse">
|
|
2
2
|
<div class="flex">
|
|
3
3
|
{% block left %}
|
|
4
4
|
<span class="text--s">Global message</span>
|
|
5
5
|
{% endblock %}
|
|
6
6
|
{% block right %}
|
|
7
|
-
{% include "@mixtape/Component/Navigation/navigation.twig" with { 'modifier_class': '
|
|
7
|
+
{% include "@mixtape/Component/Navigation/navigation.twig" with { 'modifier_class': 'masthead__nav nav--inline text--s' } %}
|
|
8
8
|
{% endblock %}
|
|
9
9
|
</div>
|
|
10
10
|
</div>
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
**CSS**
|
|
6
6
|
|
|
7
|
-
`@import '@pnx-mixtape/mxds/page.css';`
|
|
7
|
+
`@import '@pnx-mixtape/mxds/src/Layout/Page/page.css';`
|
|
8
8
|
|
|
9
9
|
**Twig**
|
|
10
10
|
|
|
@@ -16,4 +16,4 @@ Alternatively copy/paste the file for more control.
|
|
|
16
16
|
|
|
17
17
|
**JSX Components**
|
|
18
18
|
|
|
19
|
-
- JSX import: `import { Page, PageSidebar, HeroBanner } from '@pnx-mixtape/mxds/react';`
|
|
19
|
+
- JSX import: `import { Page, PageSidebar, HeroBanner } from '@pnx-mixtape/mxds/src/react';`
|
|
@@ -55,7 +55,7 @@ exports[`Layout/Page Page smoke-test 1`] = `
|
|
|
55
55
|
</header>
|
|
56
56
|
<main class="section">
|
|
57
57
|
<div class="page section--xl">
|
|
58
|
-
<div class="
|
|
58
|
+
<div class="hero-banner vertical-flow">
|
|
59
59
|
<h1 class="headline"
|
|
60
60
|
id="always-put-your-best-"
|
|
61
61
|
>
|
package/src/Layout/Page/page.css
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Page
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
@layer
|
|
5
|
+
@layer design-system.layouts {
|
|
6
6
|
:where(.page) {
|
|
7
7
|
--plus: token("size.container.plus");
|
|
8
8
|
--minus: token("size.container.minus");
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
* Page with Sidebar
|
|
84
84
|
*/
|
|
85
85
|
|
|
86
|
-
@layer
|
|
86
|
+
@layer design-system.layouts {
|
|
87
87
|
.grid--sidebar {
|
|
88
88
|
&:where(:not(:has(> aside))) {
|
|
89
89
|
grid-column: narrow;
|
package/src/Layout/README.md
CHANGED
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
**CSS**
|
|
6
6
|
|
|
7
|
-
`@import '@pnx-mixtape/mxds/grid.css';`
|
|
7
|
+
`@import '@pnx-mixtape/mxds/src/Layout/Grid/grid.css';`
|
|
8
|
+
`@import '@pnx-mixtape/mxds/src/Layout/Section/section.css';`
|
|
8
9
|
|
|
9
10
|
**Twig**
|
|
10
11
|
|
|
@@ -16,4 +17,4 @@ Alternatively copy/paste the file for more control.
|
|
|
16
17
|
|
|
17
18
|
**JSX Components**
|
|
18
19
|
|
|
19
|
-
- JSX import: `import { Section, Grid, SectionGrid } from '@pnx-mixtape/mxds/react';`
|
|
20
|
+
- JSX import: `import { Section, Grid, SectionGrid } from '@pnx-mixtape/mxds/src/react';`
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`Layout/Section/Background Background smoke-test 1`] = `
|
|
4
|
+
<div class="page">
|
|
5
|
+
<section class="section background--alt">
|
|
6
|
+
<figure class="background--image section__full"
|
|
7
|
+
aria-hidden="true"
|
|
8
|
+
>
|
|
9
|
+
<img src="https://picsum.photos/id/56/1642/560?grayscale"
|
|
10
|
+
alt
|
|
11
|
+
>
|
|
12
|
+
</figure>
|
|
13
|
+
<div class="section--xl">
|
|
14
|
+
<div class="section__header">
|
|
15
|
+
<h2>
|
|
16
|
+
Section with background image
|
|
17
|
+
</h2>
|
|
18
|
+
<a class="button button--dark"
|
|
19
|
+
href="#"
|
|
20
|
+
>
|
|
21
|
+
Learn more
|
|
22
|
+
</a>
|
|
23
|
+
</div>
|
|
24
|
+
<p>
|
|
25
|
+
A short description to help explain enough about the subject matter to encourage visitors to learn more.
|
|
26
|
+
</p>
|
|
27
|
+
</div>
|
|
28
|
+
</section>
|
|
29
|
+
</div>
|
|
30
|
+
`;
|
|
31
|
+
|
|
32
|
+
exports[`Layout/Section/Background Dark smoke-test 1`] = `
|
|
33
|
+
<div class="page">
|
|
34
|
+
<section class="section background--reverse">
|
|
35
|
+
<figure class="background--image section__full"
|
|
36
|
+
aria-hidden="true"
|
|
37
|
+
>
|
|
38
|
+
<img src="https://picsum.photos/id/56/1642/560?grayscale"
|
|
39
|
+
alt
|
|
40
|
+
>
|
|
41
|
+
</figure>
|
|
42
|
+
<div class="section--xl">
|
|
43
|
+
<div class="section__header">
|
|
44
|
+
<h2>
|
|
45
|
+
Section with background image
|
|
46
|
+
</h2>
|
|
47
|
+
<a class="button button--dark"
|
|
48
|
+
href="#"
|
|
49
|
+
>
|
|
50
|
+
Learn more
|
|
51
|
+
</a>
|
|
52
|
+
</div>
|
|
53
|
+
<p>
|
|
54
|
+
A short description to help explain enough about the subject matter to encourage visitors to learn more.
|
|
55
|
+
</p>
|
|
56
|
+
</div>
|
|
57
|
+
</section>
|
|
58
|
+
</div>
|
|
59
|
+
`;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`Layout/Section/Breakouts Breakouts smoke-test 1`] = `
|
|
4
|
+
<div class="page">
|
|
5
|
+
<section class="section section--flow">
|
|
6
|
+
<p>
|
|
7
|
+
Default is container width, with an inline gutter for smaller screens.
|
|
8
|
+
</p>
|
|
9
|
+
</section>
|
|
10
|
+
<section class="section section__full section--flow">
|
|
11
|
+
<p>
|
|
12
|
+
Section can have children with different content widths;
|
|
13
|
+
</p>
|
|
14
|
+
<p class="section__narrow">
|
|
15
|
+
like the optimum content width with .section__narrow
|
|
16
|
+
</p>
|
|
17
|
+
<p class="section__feature">
|
|
18
|
+
or slightly larger feature widths with .section__feature
|
|
19
|
+
</p>
|
|
20
|
+
<p class="section__full">
|
|
21
|
+
or full width with .section__full
|
|
22
|
+
</p>
|
|
23
|
+
</section>
|
|
24
|
+
<section class="section section--flow">
|
|
25
|
+
<p>
|
|
26
|
+
Sections can be nested
|
|
27
|
+
</p>
|
|
28
|
+
<section class="section">
|
|
29
|
+
<p>
|
|
30
|
+
and have the same content width options are un-nested ones;
|
|
31
|
+
</p>
|
|
32
|
+
<p class="section__narrow">
|
|
33
|
+
like the optimum content widths with .section__narrow
|
|
34
|
+
</p>
|
|
35
|
+
<p class="section__feature">
|
|
36
|
+
or slightly larger feature widths with .section__feature
|
|
37
|
+
</p>
|
|
38
|
+
<p class="section__full">
|
|
39
|
+
or full width with .section__full
|
|
40
|
+
</p>
|
|
41
|
+
</section>
|
|
42
|
+
</section>
|
|
43
|
+
<section class="section section__narrow section--flow">
|
|
44
|
+
<p>
|
|
45
|
+
Sections can say for all children to have a certain width
|
|
46
|
+
</p>
|
|
47
|
+
<p>
|
|
48
|
+
by using .section__narrow or .section__feature or .section__full
|
|
49
|
+
</p>
|
|
50
|
+
<p>
|
|
51
|
+
on the parent.
|
|
52
|
+
</p>
|
|
53
|
+
</section>
|
|
54
|
+
<section class="section section--flow background--reverse">
|
|
55
|
+
<p>
|
|
56
|
+
Any section can have a background color, or utilise any of the section vertical spacing classes
|
|
57
|
+
</p>
|
|
58
|
+
<section class="section--bottom-l">
|
|
59
|
+
<p>
|
|
60
|
+
even children
|
|
61
|
+
</p>
|
|
62
|
+
</section>
|
|
63
|
+
<section class="section--l background--reset">
|
|
64
|
+
<p>
|
|
65
|
+
and ones with their own backgrounds.
|
|
66
|
+
</p>
|
|
67
|
+
</section>
|
|
68
|
+
</section>
|
|
69
|
+
<section class="section section--group">
|
|
70
|
+
<p>
|
|
71
|
+
Sections can be grouped together
|
|
72
|
+
</p>
|
|
73
|
+
</section>
|
|
74
|
+
<section class="section section__feature section--group">
|
|
75
|
+
<p>
|
|
76
|
+
even if they have different content widths.
|
|
77
|
+
</p>
|
|
78
|
+
</section>
|
|
79
|
+
</div>
|
|
80
|
+
`;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`Layout/Section/Flow Flow smoke-test 1`] = `
|
|
4
|
+
<div class="page">
|
|
5
|
+
<section class="section section--flow">
|
|
6
|
+
<p>
|
|
7
|
+
first section has top and bottom spacing
|
|
8
|
+
</p>
|
|
9
|
+
</section>
|
|
10
|
+
<section class="section section--flow">
|
|
11
|
+
<p>
|
|
12
|
+
section with normal flow
|
|
13
|
+
</p>
|
|
14
|
+
</section>
|
|
15
|
+
<section class="section section--flow">
|
|
16
|
+
<p>
|
|
17
|
+
section with normal flow
|
|
18
|
+
</p>
|
|
19
|
+
</section>
|
|
20
|
+
<section class="section section--group background--alt">
|
|
21
|
+
<p>
|
|
22
|
+
certain sections can be
|
|
23
|
+
</p>
|
|
24
|
+
</section>
|
|
25
|
+
<section class="section section--group background--alt">
|
|
26
|
+
<p>
|
|
27
|
+
grouped togther as siblings
|
|
28
|
+
</p>
|
|
29
|
+
</section>
|
|
30
|
+
<section class="section section--group background--alt">
|
|
31
|
+
<p>
|
|
32
|
+
with their own spacing rules
|
|
33
|
+
</p>
|
|
34
|
+
</section>
|
|
35
|
+
<section class="section section--flow">
|
|
36
|
+
<p>
|
|
37
|
+
section on it's own has top and bottom spacing
|
|
38
|
+
</p>
|
|
39
|
+
</section>
|
|
40
|
+
<section class="section section--group background--alt">
|
|
41
|
+
<p>
|
|
42
|
+
groups can be combined with flow
|
|
43
|
+
</p>
|
|
44
|
+
</section>
|
|
45
|
+
<section class="section section--flow section--group background--alt">
|
|
46
|
+
<p>
|
|
47
|
+
for standard spacing
|
|
48
|
+
</p>
|
|
49
|
+
</section>
|
|
50
|
+
<section class="section section--flow">
|
|
51
|
+
<p>
|
|
52
|
+
section after group own has top and bottom spacing
|
|
53
|
+
</p>
|
|
54
|
+
</section>
|
|
55
|
+
<section class="section section--flow">
|
|
56
|
+
<p>
|
|
57
|
+
section with normal flow
|
|
58
|
+
</p>
|
|
59
|
+
</section>
|
|
60
|
+
<section class="section section--flow background--alt">
|
|
61
|
+
<p>
|
|
62
|
+
section with background that breaks the flow, also has top and bottom spacing
|
|
63
|
+
</p>
|
|
64
|
+
</section>
|
|
65
|
+
<section class="section section--flow">
|
|
66
|
+
<p>
|
|
67
|
+
section after background own has top and bottom spacing
|
|
68
|
+
</p>
|
|
69
|
+
</section>
|
|
70
|
+
<section class="section section--flow">
|
|
71
|
+
<p>
|
|
72
|
+
section with normal flow
|
|
73
|
+
</p>
|
|
74
|
+
</section>
|
|
75
|
+
<section class="section section--group">
|
|
76
|
+
<p>
|
|
77
|
+
groups can be used normally for larger spacing
|
|
78
|
+
</p>
|
|
79
|
+
</section>
|
|
80
|
+
<section class="section section--group background--alt">
|
|
81
|
+
<p>
|
|
82
|
+
adding a background breaks the grouping
|
|
83
|
+
</p>
|
|
84
|
+
</section>
|
|
85
|
+
<section class="section section--group background--alt">
|
|
86
|
+
<p>
|
|
87
|
+
into a new group
|
|
88
|
+
</p>
|
|
89
|
+
</section>
|
|
90
|
+
</div>
|
|
91
|
+
`;
|
|
@@ -1,19 +1,27 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
3
|
exports[`Layout/Section Section smoke-test 1`] = `
|
|
4
|
-
<
|
|
5
|
-
<div class="
|
|
6
|
-
<
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
4
|
+
<div class="page">
|
|
5
|
+
<div class="section section--xl">
|
|
6
|
+
<div class="container">
|
|
7
|
+
<div class="section__header">
|
|
8
|
+
<h2 class>
|
|
9
|
+
Section name
|
|
10
|
+
</h2>
|
|
11
|
+
<a class="link link--more "
|
|
12
|
+
href="#"
|
|
13
|
+
>
|
|
14
|
+
<span>
|
|
15
|
+
See more content
|
|
16
|
+
</span>
|
|
17
|
+
<span class="icon icon--arrow-right ">
|
|
18
|
+
</span>
|
|
19
|
+
</a>
|
|
20
|
+
</div>
|
|
21
|
+
<p class="text--lede">
|
|
22
|
+
A short description to help explain enough about the subject matter to encourage visitors to learn more.
|
|
23
|
+
</p>
|
|
24
|
+
</div>
|
|
17
25
|
</div>
|
|
18
|
-
</
|
|
26
|
+
</div>
|
|
19
27
|
`;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Section
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
@layer
|
|
5
|
+
@layer design-system.layouts {
|
|
6
6
|
.container {
|
|
7
7
|
--container-name: container;
|
|
8
8
|
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
* see https://www.bram.us/2022/12/13/quantity-queries-for-islands-of-elements-with-the-same-class-thanks-to-css-has/
|
|
77
77
|
*/
|
|
78
78
|
|
|
79
|
-
@layer
|
|
79
|
+
@layer design-system.layouts {
|
|
80
80
|
.section--flow {
|
|
81
81
|
--flow-spacing: var(--section-l, var(--spacing-xl));
|
|
82
82
|
|
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
* Section header
|
|
127
127
|
*/
|
|
128
128
|
|
|
129
|
-
@layer
|
|
129
|
+
@layer design-system.layouts {
|
|
130
130
|
.section__header {
|
|
131
131
|
margin-block-end: var(--spacing-m);
|
|
132
132
|
display: flex;
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
* Section Background image
|
|
145
145
|
*/
|
|
146
146
|
|
|
147
|
-
@layer
|
|
147
|
+
@layer design-system.layouts {
|
|
148
148
|
:is(.section--has-background, .section:has(.background--image)) {
|
|
149
149
|
overflow: hidden;
|
|
150
150
|
position: relative;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
{% endset %}
|
|
5
5
|
{% if link %}
|
|
6
6
|
{% set link %}
|
|
7
|
-
{% include '@mixtape/Atom/Link/link.twig' with { href: link.href, title: link.title, more: link.more,
|
|
7
|
+
{% include '@mixtape/Atom/Link/twig/story-link.twig' with { href: link.href, title: link.title, more: link.more, iconEnd: link.iconEnd } only %}
|
|
8
8
|
{% endset %}
|
|
9
9
|
{% endif %}
|
|
10
10
|
{% if content %}
|
package/src/Utility/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
@import "_layout-utils.css";
|
|
2
2
|
|
|
3
|
-
@layer utilities {
|
|
3
|
+
@layer design-system.utilities {
|
|
4
4
|
.hidden,
|
|
5
5
|
.visually-hidden,
|
|
6
6
|
.sr-only {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
* Responsive utility class
|
|
25
25
|
*/
|
|
26
26
|
|
|
27
|
-
@layer utilities {
|
|
27
|
+
@layer design-system.utilities {
|
|
28
28
|
.mobile-only {
|
|
29
29
|
@media (--large-up) {
|
|
30
30
|
display: none;
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
/**
|
|
57
57
|
* Skeleton and loading UI.
|
|
58
58
|
*/
|
|
59
|
-
@layer utilities {
|
|
59
|
+
@layer design-system.utilities {
|
|
60
60
|
.skeleton {
|
|
61
61
|
--background: hsl(0deg 0% 0% / 10%);
|
|
62
62
|
--opacity-low: 0.5;
|
package/src/elements.ts
CHANGED
|
@@ -4,7 +4,7 @@ export { default as AccordionMobile } from "./Component/Accordion/Elements/Accor
|
|
|
4
4
|
export { default as AccordionDiv } from "./Component/Accordion/Elements/AccordionDiv"
|
|
5
5
|
export { default as Dialog } from "./Component/Dialog/Elements/Dialog"
|
|
6
6
|
export { default as DropMenu } from "./Component/DropMenu/Elements/DropMenu"
|
|
7
|
-
export { default as
|
|
7
|
+
export { default as ClosableAlert } from "./Component/GlobalAlert/Elements/ClosableAlert"
|
|
8
8
|
export { default as Sticky } from "./Component/Sticky/Elements/Sticky"
|
|
9
9
|
export { default as Tabs } from "./Component/Tabs/Elements/Tabs"
|
|
10
10
|
export { default as GlobalToggle } from "./Layout/Header/Elements/GlobalToggle"
|
package/dist/build/Accordion.js
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { m as makeAnchor } from "./chunks/utilities-BIk0P2KX.js";
|
|
2
|
-
class Accordion extends HTMLElement {
|
|
3
|
-
constructor() {
|
|
4
|
-
super();
|
|
5
|
-
this.handleOpen = () => {
|
|
6
|
-
if (!this.details) return;
|
|
7
|
-
this.details.open = true;
|
|
8
|
-
};
|
|
9
|
-
this.handleClose = () => {
|
|
10
|
-
if (!this.details) return;
|
|
11
|
-
this.details.open = false;
|
|
12
|
-
};
|
|
13
|
-
this.handleHash = () => {
|
|
14
|
-
const { hash } = window.location;
|
|
15
|
-
if (hash && hash === `#${this.details?.id}`) {
|
|
16
|
-
this.handleOpen();
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
this.generatedId = () => {
|
|
20
|
-
const string = this.trigger?.textContent?.trim();
|
|
21
|
-
return !string ? "" : makeAnchor(string);
|
|
22
|
-
};
|
|
23
|
-
this.internals_ = this.attachInternals();
|
|
24
|
-
this.controller = new AbortController();
|
|
25
|
-
}
|
|
26
|
-
connectedCallback() {
|
|
27
|
-
if (!this.details || !this.trigger) return;
|
|
28
|
-
const { signal } = this.controller;
|
|
29
|
-
document.addEventListener("beforeprint", this.handleOpen, {
|
|
30
|
-
signal
|
|
31
|
-
});
|
|
32
|
-
document.addEventListener("afterprint", this.handleClose, {
|
|
33
|
-
signal
|
|
34
|
-
});
|
|
35
|
-
this.handleHash();
|
|
36
|
-
document.addEventListener("hashchange", this.handleHash, { signal });
|
|
37
|
-
}
|
|
38
|
-
disconnectedCallback() {
|
|
39
|
-
this.controller.abort();
|
|
40
|
-
}
|
|
41
|
-
get details() {
|
|
42
|
-
const details = this.querySelector("details");
|
|
43
|
-
if (!details) {
|
|
44
|
-
throw new Error(`${this.localName} must contain a <details> element.`);
|
|
45
|
-
}
|
|
46
|
-
details.id = details.id || this.generatedId();
|
|
47
|
-
return details;
|
|
48
|
-
}
|
|
49
|
-
get trigger() {
|
|
50
|
-
const trigger = this.querySelector("summary");
|
|
51
|
-
if (!trigger) {
|
|
52
|
-
throw new Error(`${this.localName} must contain a <summary> element.`);
|
|
53
|
-
}
|
|
54
|
-
return trigger;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
customElements.define("mx-accordion", Accordion);
|
|
58
|
-
export {
|
|
59
|
-
Accordion as default
|
|
60
|
-
};
|
|
61
|
-
//# sourceMappingURL=Accordion.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Accordion.js","sources":["../../src/Component/Accordion/Elements/Accordion.ts"],"sourcesContent":["/**\n * Accordion\n * @file Support opening on hash, adding an ID attribute and toggling on print.\n */\n\nimport { makeAnchor } from \"../../../Utility/utilities\"\n\nexport default class Accordion extends HTMLElement {\n internals_: ElementInternals\n controller: AbortController\n\n constructor() {\n super()\n this.internals_ = this.attachInternals()\n this.controller = new AbortController()\n }\n\n connectedCallback(): void {\n if (!this.details || !this.trigger) return\n\n const { signal }: AbortController = this.controller\n document.addEventListener(\"beforeprint\", this.handleOpen, {\n signal,\n })\n document.addEventListener(\"afterprint\", this.handleClose, {\n signal,\n })\n this.handleHash()\n document.addEventListener(\"hashchange\", this.handleHash, { signal })\n }\n\n disconnectedCallback(): void {\n this.controller.abort()\n }\n\n handleOpen = (): void => {\n if (!this.details) return\n this.details.open = true\n }\n\n handleClose = (): void => {\n if (!this.details) return\n this.details.open = false\n }\n\n handleHash = (): void => {\n const { hash }: Location = window.location\n if (hash && hash === `#${this.details?.id}`) {\n this.handleOpen()\n }\n }\n\n get details(): HTMLDetailsElement | null {\n const details: HTMLDetailsElement | null = this.querySelector(\"details\")\n if (!details) {\n throw new Error(`${this.localName} must contain a <details> element.`)\n }\n details.id = details.id || this.generatedId()\n return details\n }\n\n get trigger(): HTMLElement | null {\n const trigger: HTMLElement | null = this.querySelector(\"summary\")\n if (!trigger) {\n throw new Error(`${this.localName} must contain a <summary> element.`)\n }\n return trigger\n }\n\n generatedId = (): string => {\n const string: string | undefined = this.trigger?.textContent?.trim()\n return !string ? \"\" : makeAnchor(string)\n }\n}\n\ncustomElements.define(\"mx-accordion\", Accordion)\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"mx-accordion\": Accordion\n }\n}\n"],"names":[],"mappings":";AAOA,MAAqB,kBAAkB,YAAY;AAAA,EAIjD,cAAc;AACN;AAuBR,SAAA,aAAa,MAAY;AACnB,UAAA,CAAC,KAAK,QAAS;AACnB,WAAK,QAAQ,OAAO;AAAA,IAAA;AAGtB,SAAA,cAAc,MAAY;AACpB,UAAA,CAAC,KAAK,QAAS;AACnB,WAAK,QAAQ,OAAO;AAAA,IAAA;AAGtB,SAAA,aAAa,MAAY;AACjB,YAAA,EAAE,KAAK,IAAc,OAAO;AAClC,UAAI,QAAQ,SAAS,IAAI,KAAK,SAAS,EAAE,IAAI;AAC3C,aAAK,WAAW;AAAA,MAClB;AAAA,IAAA;AAoBF,SAAA,cAAc,MAAc;AAC1B,YAAM,SAA6B,KAAK,SAAS,aAAa,KAAK;AACnE,aAAO,CAAC,SAAS,KAAK,WAAW,MAAM;AAAA,IAAA;AA1DlC,SAAA,aAAa,KAAK;AAClB,SAAA,aAAa,IAAI;EACxB;AAAA,EAEA,oBAA0B;AACxB,QAAI,CAAC,KAAK,WAAW,CAAC,KAAK,QAAS;AAE9B,UAAA,EAAE,OAAO,IAAqB,KAAK;AAChC,aAAA,iBAAiB,eAAe,KAAK,YAAY;AAAA,MACxD;AAAA,IAAA,CACD;AACQ,aAAA,iBAAiB,cAAc,KAAK,aAAa;AAAA,MACxD;AAAA,IAAA,CACD;AACD,SAAK,WAAW;AAChB,aAAS,iBAAiB,cAAc,KAAK,YAAY,EAAE,QAAQ;AAAA,EACrE;AAAA,EAEA,uBAA6B;AAC3B,SAAK,WAAW;EAClB;AAAA,EAmBA,IAAI,UAAqC;AACjC,UAAA,UAAqC,KAAK,cAAc,SAAS;AACvE,QAAI,CAAC,SAAS;AACZ,YAAM,IAAI,MAAM,GAAG,KAAK,SAAS,oCAAoC;AAAA,IACvE;AACA,YAAQ,KAAK,QAAQ,MAAM,KAAK,YAAY;AACrC,WAAA;AAAA,EACT;AAAA,EAEA,IAAI,UAA8B;AAC1B,UAAA,UAA8B,KAAK,cAAc,SAAS;AAChE,QAAI,CAAC,SAAS;AACZ,YAAM,IAAI,MAAM,GAAG,KAAK,SAAS,oCAAoC;AAAA,IACvE;AACO,WAAA;AAAA,EACT;AAMF;AAEA,eAAe,OAAO,gBAAgB,SAAS;"}
|