@pnx-mixtape/mxds 0.0.6 → 0.0.7
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/package.json +2 -2
- package/src/Atom/Button/Button.stories.ts +4 -3
- package/src/Atom/Button/__snapshots__/Button.stories.tsx.snap +2 -2
- package/src/Atom/Button/_buttons.css +1 -1
- package/src/Atom/Button/button.twig +1 -1
- package/src/Atom/Heading/__snapshots__/Heading.stories.ts.snap +1 -1
- package/src/Atom/Heading/heading.twig +4 -1
- package/src/Atom/Icon/__snapshots__/Icon.stories.tsx.snap +3 -3
- package/src/Atom/Icon/icon.twig +1 -1
- package/src/Atom/Link/Link.stories.ts +8 -7
- package/src/Atom/Link/__snapshots__/Link.stories.ts.snap +5 -9
- package/src/Atom/Link/__snapshots__/Link.stories.tsx.snap +3 -3
- package/src/Atom/Link/_links.css +12 -2
- package/src/Atom/Link/link.twig +6 -4
- package/src/Atom/Media/Media.stories.ts +9 -9
- package/src/Atom/Media/__snapshots__/Media.stories.ts.snap +1 -1
- package/src/Atom/Media/__snapshots__/Media.stories.tsx.snap +1 -1
- package/src/Atom/Media/media.twig +6 -2
- package/src/Atom/_generic.css +0 -13
- package/src/Component/Accordion/Accordion.stories.ts +9 -7
- package/src/Component/Accordion/__snapshots__/Accordion.stories.ts.snap +2 -2
- package/src/Component/Accordion/__snapshots__/Accordion.stories.tsx.snap +4 -4
- package/src/Component/Accordion/accordion-item.twig +1 -1
- package/src/Component/Accordion/accordion.twig +3 -1
- package/src/Component/Breadcrumb/Breadcrumb.stories.ts +23 -5
- package/src/Component/Breadcrumb/__snapshots__/Breadcrumb.stories.ts.snap +15 -8
- package/src/Component/Breadcrumb/__snapshots__/Breadcrumb.stories.tsx.snap +6 -6
- package/src/Component/Breadcrumb/breadcrumb.css +7 -3
- package/src/Component/Breadcrumb/breadcrumb.twig +14 -12
- package/src/Component/Callout/Callout.stories.ts +5 -4
- package/src/Component/Callout/__snapshots__/Callout.stories.ts.snap +1 -1
- package/src/Component/Callout/callout.twig +1 -1
- package/src/Component/Card/Card.stories.ts +47 -20
- package/src/Component/Card/Card.stories.tsx +5 -4
- package/src/Component/Card/__snapshots__/Card.stories.ts.snap +123 -49
- package/src/Component/Card/__snapshots__/Card.stories.tsx.snap +18 -18
- package/src/Component/Card/card.css +57 -43
- package/src/Component/Card/card.twig +13 -13
- package/src/Component/ContentBlock/ContentBlock.stories.ts +73 -6
- package/src/Component/ContentBlock/ContentBlock.stories.tsx +19 -10
- package/src/Component/ContentBlock/ContentBlock.tsx +25 -17
- package/src/Component/ContentBlock/__snapshots__/ContentBlock.stories.ts.snap +137 -5
- package/src/Component/ContentBlock/__snapshots__/ContentBlock.stories.tsx.snap +21 -14
- package/src/Component/ContentBlock/content-block.css +21 -10
- package/src/Component/ContentBlock/content-block.twig +21 -11
- package/src/Component/DropMenu/Components/DropMenuItem.tsx +1 -1
- package/src/Component/DropMenu/DropMenu.stories.ts +1 -1
- package/src/Component/DropMenu/DropMenu.tsx +6 -6
- package/src/Component/DropMenu/__snapshots__/DropMenu.stories.ts.snap +2 -2
- package/src/Component/DropMenu/__snapshots__/DropMenu.stories.tsx.snap +2 -2
- package/src/Component/DropMenu/drop-menu.css +2 -2
- package/src/Component/DropMenu/drop-menu.twig +2 -2
- package/src/Component/GlobalAlert/GlobalAlert.stories.ts +5 -6
- package/src/Component/GlobalAlert/__snapshots__/GlobalAlert.stories.tsx.snap +7 -7
- package/src/Component/GlobalAlert/global-alert.css +1 -1
- package/src/Component/GlobalAlert/global-alert.twig +1 -1
- package/src/Component/HeroBanner/HeroBanner.stories.ts +17 -12
- package/src/Component/HeroBanner/__snapshots__/HeroBanner.stories.ts.snap +11 -11
- package/src/Component/HeroBanner/__snapshots__/HeroBanner.stories.tsx.snap +9 -9
- package/src/Component/HeroBanner/hero-banner.twig +2 -2
- package/src/Component/InPageAlert/InPageAlert.stories.ts +4 -3
- package/src/Component/InPageAlert/__snapshots__/InPageAlert.stories.ts.snap +1 -3
- package/src/Component/InPageAlert/in-page-alert.twig +1 -1
- package/src/Component/InPageNavigation/Elements/InPageNavigation.ts +2 -2
- package/src/Component/InPageNavigation/InPageNavigation.stories.ts +30 -7
- package/src/Component/InPageNavigation/InPageNavigation.tsx +4 -4
- package/src/Component/InPageNavigation/__snapshots__/InPageNavigation.stories.ts.snap +103 -5
- package/src/Component/InPageNavigation/__snapshots__/InPageNavigation.stories.tsx.snap +21 -21
- package/src/Component/InPageNavigation/in-page-navigation.css +3 -3
- package/src/Component/InPageNavigation/in-page-navigation.twig +13 -17
- package/src/Component/InPageNavigation/twig/{in-page-navigation-content-example.twig → content-example.twig} +2 -0
- package/src/Component/InPageNavigation/twig/in-page-navigation-story.twig +2 -0
- package/src/Component/LinkList/__snapshots__/LinkList.stories.tsx.snap +8 -8
- package/src/Component/LinkList/link-list.twig +1 -1
- package/src/Component/ListItem/ListItem.stories.ts +105 -0
- package/src/Component/ListItem/{Teaser.stories.tsx → ListItem.stories.tsx} +4 -5
- package/src/Component/ListItem/ListItem.tsx +55 -0
- package/src/Component/ListItem/__snapshots__/ListItem.stories.ts.snap +184 -0
- package/src/Component/ListItem/__snapshots__/ListItem.stories.tsx.snap +23 -0
- package/src/Component/ListItem/list-item.css +109 -0
- package/src/Component/ListItem/list-item.twig +32 -0
- package/src/Component/Navigation/Components/DropdownLevel.tsx +11 -6
- package/src/Component/Navigation/Dropdown.tsx +2 -2
- package/src/Component/Navigation/Elements/Navigation.ts +6 -5
- package/src/Component/Navigation/Navigation.stories.ts +261 -5
- package/src/Component/Navigation/Navigation.tsx +2 -2
- package/src/Component/Navigation/__snapshots__/Dropdown.stories.tsx.snap +4 -4
- package/src/Component/Navigation/__snapshots__/Navigation.stories.ts.snap +294 -7
- package/src/Component/Navigation/__snapshots__/Navigation.stories.tsx.snap +2 -2
- package/src/Component/Navigation/_navigation-collapsible.css +22 -12
- package/src/Component/Navigation/_navigation-dropdown.css +8 -8
- package/src/Component/Navigation/_navigation-mega.css +4 -4
- package/src/Component/Navigation/_navigation.css +9 -6
- package/src/Component/Navigation/menu.twig +42 -0
- package/src/Component/Navigation/navigation.css +1 -1
- package/src/Component/Navigation/navigation.twig +23 -9
- package/src/Component/Pagination/Components/PaginationItem.tsx +4 -4
- package/src/Component/Pagination/Pagination.stories.ts +55 -6
- package/src/Component/Pagination/Pagination.tsx +2 -2
- package/src/Component/Pagination/__snapshots__/Pagination.stories.ts.snap +36 -33
- package/src/Component/Pagination/__snapshots__/Pagination.stories.tsx.snap +11 -11
- package/src/Component/Pagination/pagination-item.twig +7 -0
- package/src/Component/Pagination/pagination.css +12 -9
- package/src/Component/Pagination/pagination.twig +12 -37
- package/src/Component/SideNavigation/SideNavigation.stories.ts +97 -0
- package/src/Component/SideNavigation/__snapshots__/SideNavigation.stories.ts.snap +86 -0
- package/src/Component/SideNavigation/side-navigation.css +78 -0
- package/src/Component/SideNavigation/side-navigation.twig +35 -0
- package/src/Component/SideNavigation/twig/side-navigation-story.twig +7 -0
- package/src/Component/SocialLinks/SocialLinks.stories.ts +58 -0
- package/src/Component/SocialLinks/__snapshots__/SocialLinks.stories.ts.snap +32 -0
- package/src/Component/SocialLinks/social-links.css +17 -0
- package/src/Component/SocialLinks/social-links.twig +6 -0
- package/src/Component/SocialShare/__snapshots__/SocialShare.stories.tsx.snap +3 -3
- package/src/Component/Steps/Steps.stories.ts +88 -0
- package/src/Component/Steps/__snapshots__/Steps.stories.ts.snap +111 -0
- package/src/Component/Steps/step-item.twig +11 -0
- package/src/Component/Steps/steps.css +99 -0
- package/src/Component/Steps/steps.entry.js +0 -0
- package/src/Component/Steps/steps.twig +18 -0
- package/src/Component/Sticky/Sticky.stories.ts +3 -0
- package/src/Component/Sticky/__snapshots__/Sticky.stories.ts.snap +7 -8
- package/src/Component/Sticky/sticky.twig +2 -20
- package/src/Component/Tabs/Components/Tab.tsx +1 -2
- package/src/Component/Tabs/Components/TabDropMenu.tsx +1 -1
- package/src/Component/Tabs/Components/TabList.tsx +1 -1
- package/src/Component/Tabs/Components/TabPanel.tsx +2 -2
- package/src/Component/Tabs/Elements/Tabs.ts +98 -49
- package/src/Component/Tabs/Tabs.stories.ts +45 -8
- package/src/Component/Tabs/Tabs.stories.tsx +3 -3
- package/src/Component/Tabs/Tabs.tsx +2 -2
- package/src/Component/Tabs/__snapshots__/Tabs.stories.ts.snap +46 -92
- package/src/Component/Tabs/__snapshots__/Tabs.stories.tsx.snap +11 -14
- package/src/Component/Tabs/tab-item.twig +11 -0
- package/src/Component/Tabs/tabs.css +20 -17
- package/src/Component/Tabs/tabs.twig +10 -46
- package/src/Component/Tag/__snapshots__/Tag.stories.tsx.snap +1 -1
- package/src/Component/Tag/tags.twig +1 -1
- package/src/Component/Tile/__snapshots__/Tile.stories.tsx.snap +4 -4
- package/src/Form/Checkbox/Checkbox.stories.ts +39 -0
- package/src/Form/Checkbox/FormCheckbox.tsx +3 -3
- package/src/Form/Checkbox/__snapshots__/Checkbox.stories.ts.snap +28 -0
- package/src/Form/Checkbox/input-checkbox.twig +27 -24
- package/src/Form/Description/Description.stories.ts +10 -7
- package/src/Form/Description/FormDescription.tsx +3 -3
- package/src/Form/Description/FormStatus.stories.ts +31 -0
- package/src/Form/Description/__snapshots__/Description.stories.ts.snap +2 -9
- package/src/Form/Description/__snapshots__/FormDescription.stories.tsx.snap +1 -1
- package/src/Form/Description/__snapshots__/FormStatus.stories.ts.snap +19 -0
- package/src/Form/Description/form-description.twig +4 -3
- package/src/Form/Description/form-status.twig +10 -0
- package/src/Form/Form/FormTitle.tsx +1 -1
- package/src/Form/Form/__snapshots__/FormTitle.stories.tsx.snap +1 -1
- package/src/Form/Form/form.twig +14 -0
- package/src/Form/Form/twig/form-example.twig +4 -4
- package/src/Form/FormItem/FormItem.stories.ts +119 -0
- package/src/Form/{Item → FormItem}/FormItem.tsx +1 -1
- package/src/Form/FormItem/__snapshots__/FormItem.stories.ts.snap +133 -0
- package/src/Form/{Item → FormItem}/__snapshots__/FormItem.stories.tsx.snap +24 -16
- package/src/Form/FormItem/form-item.twig +22 -0
- package/src/Form/Label/FormLabel.tsx +1 -1
- package/src/Form/Label/Label.stories.ts +16 -19
- package/src/Form/Label/__snapshots__/FormLabel.stories.tsx.snap +6 -2
- package/src/Form/Label/__snapshots__/Label.stories.ts.snap +11 -9
- package/src/Form/Label/label.twig +13 -2
- package/src/Form/Radio/FormRadio.tsx +2 -2
- package/src/Form/Radio/Radio.stories.ts +72 -0
- package/src/Form/Radio/__snapshots__/Radio.stories.ts.snap +58 -0
- package/src/Form/Radio/input-radio.twig +18 -24
- package/src/Form/Search/Search.stories.ts +50 -0
- package/src/Form/Search/__snapshots__/Search.stories.ts.snap +26 -0
- package/src/Form/Search/search-form.twig +11 -0
- package/src/Form/Select/FormSelect.tsx +1 -1
- package/src/Form/Select/Select.stories.ts +24 -31
- package/src/Form/Select/__snapshots__/FormSelect.stories.tsx.snap +1 -1
- package/src/Form/Select/__snapshots__/Select.stories.ts.snap +16 -144
- package/src/Form/Select/input-select.twig +25 -0
- package/src/Form/TextInput/FormText.tsx +4 -7
- package/src/Form/TextInput/TextInput.stories.ts +23 -41
- package/src/Form/TextInput/__snapshots__/FormText.stories.tsx.snap +1 -1
- package/src/Form/TextInput/__snapshots__/InputDivider.stories.ts.snap +10 -14
- package/src/Form/TextInput/__snapshots__/TextInput.stories.ts.snap +20 -96
- package/src/Form/TextInput/input-divider.twig +7 -8
- package/src/Form/TextInput/input-text-icon.twig +5 -5
- package/src/Form/TextInput/input-text.twig +31 -5
- package/src/Form/Textarea/FormTextarea.tsx +4 -7
- package/src/Form/Textarea/Textarea.stories.ts +11 -8
- package/src/Form/Textarea/__snapshots__/FormTextarea.stories.tsx.snap +1 -1
- package/src/Form/Textarea/__snapshots__/Textarea.stories.ts.snap +8 -16
- package/src/Form/Textarea/input-textarea.twig +21 -0
- package/src/Form/form.css +103 -103
- package/src/Layout/Footer/Footer.stories.ts +196 -4
- package/src/Layout/Footer/Footer.stories.tsx +5 -9
- package/src/Layout/Footer/Footer.tsx +21 -19
- package/src/Layout/Footer/__snapshots__/Footer.stories.ts.snap +296 -78
- package/src/Layout/Footer/__snapshots__/Footer.stories.tsx.snap +52 -58
- package/src/Layout/Footer/footer.css +102 -25
- package/src/Layout/Footer/footer.twig +29 -23
- package/src/Layout/Grid/Grid.stories.ts +15 -14
- package/src/Layout/Grid/Grid.stories.tsx +14 -14
- package/src/Layout/Grid/Grid.tsx +10 -10
- package/src/Layout/Grid/__snapshots__/Grid.stories.tsx.snap +10 -10
- package/src/Layout/Grid/grid-item.twig +1 -1
- package/src/Layout/Grid/grid.twig +7 -4
- package/src/Layout/Header/Components/GlobalToggle.tsx +0 -1
- package/src/Layout/Header/Components/Logo.tsx +1 -1
- package/src/Layout/Header/Elements/GlobalToggle.ts +6 -1
- package/src/Layout/Header/Header.stories.ts +242 -7
- package/src/Layout/Header/Header.tsx +22 -19
- package/src/Layout/Header/__snapshots__/Header.stories.ts.snap +464 -100
- package/src/Layout/Header/__snapshots__/Header.stories.tsx.snap +50 -46
- package/src/Layout/Header/_header.css +28 -21
- package/src/Layout/Header/_toggles.css +2 -2
- package/src/Layout/Header/header-stacked.twig +49 -0
- package/src/Layout/Header/header.twig +42 -21
- package/src/Layout/Header/twig/logo.twig +2 -2
- package/src/Layout/Masthead/Masthead.stories.ts +42 -6
- package/src/Layout/Masthead/__snapshots__/Masthead.stories.ts.snap +44 -27
- package/src/Layout/Masthead/masthead.css +5 -14
- package/src/Layout/Masthead/masthead.twig +25 -7
- package/src/Layout/Page/Page.tsx +2 -2
- package/src/Layout/Page/__snapshots__/Page.stories.tsx.snap +61 -59
- package/src/Layout/Page/page.css +19 -84
- package/src/Layout/Page/page.twig +8 -3
- package/src/Layout/Section/Section.stories.ts +12 -9
- package/src/Layout/Section/Section.stories.tsx +5 -9
- package/src/Layout/Section/Section.tsx +6 -10
- package/src/Layout/Section/SectionGrid.stories.tsx +5 -11
- package/src/Layout/Section/SectionGrid.tsx +8 -13
- package/src/Layout/Section/__snapshots__/Background.stories.ts.snap +12 -12
- package/src/Layout/Section/__snapshots__/Breakouts.stories.ts.snap +17 -17
- package/src/Layout/Section/__snapshots__/Flow.stories.ts.snap +18 -18
- package/src/Layout/Section/__snapshots__/Section.stories.ts.snap +4 -4
- package/src/Layout/Section/__snapshots__/Section.stories.tsx.snap +6 -6
- package/src/Layout/Section/__snapshots__/SectionGrid.stories.tsx.snap +6 -6
- package/src/Layout/Section/section.twig +1 -1
- package/src/Layout/Section/twig/section-background.twig +5 -5
- package/src/Layout/Section/twig/sections-breakout.twig +16 -16
- package/src/Layout/Section/twig/sections-flow.twig +17 -17
- package/src/Layout/Section/twig/sections-stacked.twig +8 -16
- package/src/Layout/Sidebar/Sidebar.stories.ts +25 -3
- package/src/Layout/Sidebar/Sidebar.stories.tsx +1 -1
- package/src/Layout/Sidebar/Sidebar.tsx +4 -4
- package/src/Layout/Sidebar/__snapshots__/Sidebar.stories.ts.snap +39 -16
- package/src/Layout/Sidebar/__snapshots__/Sidebar.stories.tsx.snap +6 -6
- package/src/Layout/Sidebar/sidebar.css +6 -6
- package/src/Layout/Sidebar/sidebar.twig +25 -16
- package/src/Utility/utilities.css +5 -2
- package/src/react.ts +1 -2
- package/dist/build/accordion.css +0 -108
- package/dist/build/accordion.entry.js +0 -139
- package/dist/build/accordion.entry.js.map +0 -1
- package/dist/build/base.css +0 -999
- package/dist/build/breadcrumb.css +0 -47
- package/dist/build/button.css +0 -132
- package/dist/build/callout.css +0 -11
- package/dist/build/card.css +0 -136
- package/dist/build/chunks/disclosure-widget-CQLPJ8Ta.js +0 -124
- package/dist/build/chunks/disclosure-widget-CQLPJ8Ta.js.map +0 -1
- package/dist/build/chunks/keyboard-C73DHu0c.js +0 -101
- package/dist/build/chunks/keyboard-C73DHu0c.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-B4YZb689.js +0 -243
- package/dist/build/chunks/utilities-B4YZb689.js.map +0 -1
- package/dist/build/constants.css +0 -120
- package/dist/build/container-grid.css +0 -208
- package/dist/build/content-block.css +0 -23
- package/dist/build/dialog.css +0 -98
- package/dist/build/dialog.entry.js +0 -113
- package/dist/build/dialog.entry.js.map +0 -1
- package/dist/build/drop-menu.css +0 -78
- package/dist/build/drop-menu.entry.js +0 -129
- package/dist/build/drop-menu.entry.js.map +0 -1
- 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/global-alert.css +0 -60
- package/dist/build/global-alert.entry.js +0 -68
- package/dist/build/global-alert.entry.js.map +0 -1
- package/dist/build/grid.css +0 -200
- package/dist/build/header.css +0 -131
- package/dist/build/header.entry.js +0 -98
- package/dist/build/header.entry.js.map +0 -1
- 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/in-page-navigation.entry.js +0 -89
- package/dist/build/in-page-navigation.entry.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 -26
- package/dist/build/navigation.css +0 -371
- package/dist/build/navigation.entry.js +0 -123
- package/dist/build/navigation.entry.js.map +0 -1
- package/dist/build/page.css +0 -184
- package/dist/build/pagination.css +0 -123
- package/dist/build/section.css +0 -163
- package/dist/build/sidebar.css +0 -105
- package/dist/build/sticky.css +0 -47
- package/dist/build/sticky.entry.js +0 -60
- package/dist/build/sticky.entry.js.map +0 -1
- package/dist/build/tabs.css +0 -106
- package/dist/build/tabs.entry.js +0 -161
- package/dist/build/tabs.entry.js.map +0 -1
- package/dist/build/tag.css +0 -67
- package/dist/build/tiles.css +0 -61
- package/dist/build/utilities.css +0 -175
- package/src/Atom/Button/twig/story-button.twig +0 -11
- package/src/Atom/Link/twig/story-link.twig +0 -11
- package/src/Atom/Media/twig/story-media.twig +0 -11
- package/src/Atom/NavList/NavList.stories.ts +0 -15
- package/src/Atom/NavList/__snapshots__/NavList.stories.ts.snap +0 -43
- package/src/Atom/NavList/nav-list.css +0 -23
- package/src/Atom/NavList/nav-list.twig +0 -25
- package/src/Component/Accordion/twig/accordion-story.twig +0 -13
- package/src/Component/Author/Author.stories.tsx +0 -18
- package/src/Component/Author/Author.tsx +0 -30
- package/src/Component/Author/__snapshots__/Author.stories.tsx.snap +0 -21
- package/src/Component/Callout/twig/callout-story.twig +0 -11
- package/src/Component/Card/twig/old-card.twig +0 -17
- package/src/Component/Card/twig/story-card.twig +0 -29
- package/src/Component/ContentBlock/twig/content-block-example.twig +0 -7
- package/src/Component/GlobalAlert/twig/story-global-alert.twig +0 -14
- package/src/Component/HeroBanner/twig/hero-banner-story.twig +0 -19
- package/src/Component/InPageAlert/twig/story-in-page-alert.twig +0 -11
- package/src/Component/InPageNavigation/twig/in-page-navigation-menu-example.twig +0 -6
- package/src/Component/ListItem/Teaser.tsx +0 -54
- package/src/Component/ListItem/__snapshots__/Teaser.stories.tsx.snap +0 -32
- package/src/Component/Navigation/Collapsible.stories.ts +0 -16
- package/src/Component/Navigation/Dropdown.stories.ts +0 -16
- package/src/Component/Navigation/MegaNav.stories.ts +0 -16
- package/src/Component/Navigation/__snapshots__/Collapsible.stories.ts.snap +0 -123
- package/src/Component/Navigation/__snapshots__/Dropdown.stories.ts.snap +0 -125
- package/src/Component/Navigation/navigation-collapsible.twig +0 -7
- package/src/Component/Navigation/navigation-dropdown.twig +0 -7
- package/src/Component/Navigation/navigation-mega-nav.twig +0 -7
- package/src/Component/Navigation/twig/navigation-subnav-list.twig +0 -108
- package/src/Component/Sticky/twig/sticky-example.twig +0 -4
- package/src/Component/Tabs/twig/panel.twig +0 -5
- package/src/Component/Tabs/twig/tab-list.twig +0 -26
- package/src/Form/Checkbox/Checkboxes.stories.ts +0 -47
- package/src/Form/Checkbox/__snapshots__/Checkboxes.stories.ts.snap +0 -115
- package/src/Form/Checkbox/input-checkbox-single.twig +0 -6
- package/src/Form/Description/ErrorMessage.stories.ts +0 -16
- package/src/Form/Description/__snapshots__/ErrorMessage.stories.ts.snap +0 -20
- package/src/Form/Description/form-error.twig +0 -5
- package/src/Form/Fieldset/Fieldset.stories.ts +0 -34
- package/src/Form/Fieldset/__snapshots__/Fieldset.stories.ts.snap +0 -23
- package/src/Form/Fieldset/fieldset.twig +0 -4
- package/src/Form/Radio/Radios.stories.ts +0 -47
- package/src/Form/Radio/__snapshots__/Radios.stories.ts.snap +0 -125
- package/src/Form/Search/TextInputWithInlineButton.stories.ts +0 -16
- package/src/Form/Search/__snapshots__/TextInputWithInlineButton.stories.ts.snap +0 -26
- package/src/Form/Search/input-text-inline-submit.twig +0 -8
- package/src/Form/Select/select.twig +0 -16
- package/src/Form/TextInput/TextInputWithIcon.stories.ts +0 -40
- package/src/Form/TextInput/__snapshots__/TextInputWithIcon.stories.ts.snap +0 -67
- package/src/Form/Textarea/textarea.twig +0 -5
- package/src/Layout/Footer/FooterMenu/FooterMenu.stories.ts +0 -15
- package/src/Layout/Footer/FooterMenu/__snapshots__/FooterMenu.stories.ts.snap +0 -101
- package/src/Layout/Footer/FooterMenu/footer-menu.css +0 -29
- package/src/Layout/Footer/FooterMenu/footer-menu.twig +0 -5
- package/src/Layout/Grid/twig/container-grid-dynamic.twig +0 -47
- package/src/Layout/Grid/twig/container-grid.twig +0 -46
- package/src/Layout/Grid/twig/grid-story.twig +0 -6
- package/src/Layout/Grid/twig/old-grid.twig +0 -46
- package/src/Layout/Header/Stacked/Stacked.stories.ts +0 -16
- package/src/Layout/Header/Stacked/__snapshots__/Stacked.stories.ts.snap +0 -353
- package/src/Layout/Header/Stacked/header-stacked.twig +0 -33
- package/src/Layout/Header/twig/global-header.twig +0 -4
- package/src/Layout/Section/twig/section-story.twig +0 -14
- /package/src/Form/{Item → FormItem}/FormItem.stories.tsx +0 -0
|
@@ -1,79 +1,81 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
3
|
exports[`Layout/Page Page smoke-test 1`] = `
|
|
4
|
-
<div class="page">
|
|
5
|
-
<header class="page
|
|
6
|
-
<div class="
|
|
7
|
-
<
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
<img alt="Mixtape"
|
|
11
|
-
src="https://mixtape.pnx.io/images/mixtape-logo.png"
|
|
12
|
-
loading="eager"
|
|
4
|
+
<div class="mx-page">
|
|
5
|
+
<header class="mx-page mx-header mx-section--s">
|
|
6
|
+
<div class="mx-header__inner">
|
|
7
|
+
<div class="mx-header__brand">
|
|
8
|
+
<a href="https://mixtape.pnx.io/"
|
|
9
|
+
class="mx-logo"
|
|
13
10
|
>
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
11
|
+
<img alt="Mixtape"
|
|
12
|
+
src="https://mixtape.pnx.io/images/mixtape-logo.png"
|
|
13
|
+
loading="eager"
|
|
14
|
+
>
|
|
15
|
+
</a>
|
|
16
|
+
</div>
|
|
17
|
+
<div class="mx-header__main">
|
|
18
|
+
<div id=":r0:"
|
|
19
|
+
class="mx-header__nav"
|
|
21
20
|
>
|
|
22
|
-
<
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
>
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
>
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
21
|
+
<nav class="mx-nav mx-nav--dropdown"
|
|
22
|
+
aria-label="Primary Navigation"
|
|
23
|
+
id=":r0:"
|
|
24
|
+
>
|
|
25
|
+
<ul class="mx-nav__level-1">
|
|
26
|
+
<li class="mx-nav__has-subnav">
|
|
27
|
+
<a href="http://example.com/#1"
|
|
28
|
+
class
|
|
29
|
+
>
|
|
30
|
+
Home
|
|
31
|
+
</a>
|
|
32
|
+
<button aria-controls="unique-0"
|
|
33
|
+
aria-expanded="false"
|
|
34
|
+
class="mx-nav__toggle mx-icon mx-icon--only mx-icon--chevron-down"
|
|
35
|
+
type="button"
|
|
36
|
+
>
|
|
37
|
+
Sub-navigation
|
|
38
|
+
</button>
|
|
39
|
+
</li>
|
|
40
|
+
<li class>
|
|
41
|
+
<a href="http://example.com/#2"
|
|
42
|
+
class
|
|
43
|
+
>
|
|
44
|
+
About
|
|
45
|
+
</a>
|
|
46
|
+
</li>
|
|
47
|
+
<li class>
|
|
48
|
+
<a href="http://example.com/#3"
|
|
49
|
+
class
|
|
50
|
+
>
|
|
51
|
+
Contact
|
|
52
|
+
</a>
|
|
53
|
+
</li>
|
|
54
|
+
</ul>
|
|
55
|
+
</nav>
|
|
56
|
+
</div>
|
|
53
57
|
</div>
|
|
54
58
|
</div>
|
|
55
59
|
</header>
|
|
56
|
-
<main class="section">
|
|
57
|
-
<div class="page section--xl">
|
|
58
|
-
<div class="hero-banner vertical-flow">
|
|
59
|
-
<h1 class="headline"
|
|
60
|
+
<main class="mx-section">
|
|
61
|
+
<div class="mx-page mx-section--xl">
|
|
62
|
+
<div class="mx-hero-banner mx-vertical-flow">
|
|
63
|
+
<h1 class="mx-headline"
|
|
60
64
|
id="always-put-your-best-"
|
|
61
65
|
>
|
|
62
66
|
Always put your best foot forward.
|
|
63
67
|
</h1>
|
|
64
|
-
<p class="text--xl">
|
|
68
|
+
<p class="mx-text--xl">
|
|
65
69
|
Make the most of the opportunity by encouraging an action and keeping your copy clear and concise.
|
|
66
70
|
</p>
|
|
67
71
|
</div>
|
|
68
72
|
</div>
|
|
69
73
|
</main>
|
|
70
|
-
<footer class="
|
|
71
|
-
<div class="
|
|
72
|
-
<
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
</span>
|
|
76
|
-
</div>
|
|
74
|
+
<footer class="mx-footer mx-section--top-l mx-section--bottom-m">
|
|
75
|
+
<div class="mx-footer__inner">
|
|
76
|
+
<span class="mx-footer__copyright mx-text--s">
|
|
77
|
+
© 2022 Company Name
|
|
78
|
+
</span>
|
|
77
79
|
</div>
|
|
78
80
|
</footer>
|
|
79
81
|
</div>
|
package/src/Layout/Page/page.css
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
@layer design-system.layouts {
|
|
6
|
-
:where(.page) {
|
|
6
|
+
:where(.mx-page) {
|
|
7
7
|
--plus: token("size.container.plus");
|
|
8
8
|
--minus: token("size.container.minus");
|
|
9
9
|
--diff: calc(var(--plus) - var(--minus));
|
|
@@ -26,18 +26,18 @@
|
|
|
26
26
|
&
|
|
27
27
|
> *:where(
|
|
28
28
|
:not(
|
|
29
|
-
.page,
|
|
30
|
-
.section__full,
|
|
31
|
-
.section__narrow,
|
|
32
|
-
.section__feature,
|
|
33
|
-
.section[class*="background--"]
|
|
29
|
+
.mx-page,
|
|
30
|
+
.mx-section__full,
|
|
31
|
+
.mx-section__narrow,
|
|
32
|
+
.mx-section__feature,
|
|
33
|
+
.mx-section[class*="mx-background--"]
|
|
34
34
|
)
|
|
35
35
|
) {
|
|
36
36
|
grid-column: container;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
/* Immediate nested can be subgrid. */
|
|
40
|
-
& > :where(.page) {
|
|
40
|
+
& > :where(.mx-page) {
|
|
41
41
|
grid-column: full;
|
|
42
42
|
display: grid;
|
|
43
43
|
grid-template-columns: subgrid;
|
|
@@ -46,105 +46,40 @@
|
|
|
46
46
|
/* Deeper nested cannot be subgrid, needs it's children to be full width by default. */
|
|
47
47
|
&
|
|
48
48
|
> *
|
|
49
|
-
:where(.page:not(.page--narrow, .page--feature))
|
|
50
|
-
> *:where(:not(.section__narrow, .section__feature)) {
|
|
49
|
+
:where(.mx-page:not(.mx-page--narrow, .mx-page--feature))
|
|
50
|
+
> *:where(:not(.mx-section__narrow, .mx-section__feature)) {
|
|
51
51
|
grid-column: full;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
/** Adding a background triggers subgrid */
|
|
55
|
-
& > :where(.section[class*="background--"]) {
|
|
55
|
+
& > :where(.mx-section[class*="mx-background--"]) {
|
|
56
56
|
grid-column: full;
|
|
57
57
|
display: grid;
|
|
58
58
|
grid-template-columns: subgrid;
|
|
59
59
|
|
|
60
60
|
&
|
|
61
61
|
> *:where(
|
|
62
|
-
:not(
|
|
62
|
+
:not(
|
|
63
|
+
.mx-page,
|
|
64
|
+
.mx-section__full,
|
|
65
|
+
.mx-section__narrow,
|
|
66
|
+
.mx-section__feature
|
|
67
|
+
)
|
|
63
68
|
) {
|
|
64
69
|
grid-column: container;
|
|
65
70
|
}
|
|
66
71
|
}
|
|
67
72
|
}
|
|
68
73
|
|
|
69
|
-
:where(:is(.page--feature > *, .section__feature)) {
|
|
74
|
+
:where(:is(.mx-page--feature > *, .mx-section__feature)) {
|
|
70
75
|
grid-column: feature;
|
|
71
76
|
}
|
|
72
77
|
|
|
73
|
-
:where(:is(.page--narrow > *, .section__narrow)) {
|
|
78
|
+
:where(:is(.mx-page--narrow > *, .mx-section__narrow)) {
|
|
74
79
|
grid-column: narrow;
|
|
75
80
|
}
|
|
76
81
|
|
|
77
|
-
:where(:is(.page--full > *, .section__full)) {
|
|
82
|
+
:where(:is(.mx-page--full > *, .mx-section__full)) {
|
|
78
83
|
grid-column: full;
|
|
79
84
|
}
|
|
80
85
|
}
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Page with Sidebar
|
|
84
|
-
*/
|
|
85
|
-
|
|
86
|
-
@layer design-system.layouts {
|
|
87
|
-
.grid--sidebar {
|
|
88
|
-
&:where(:not(:has(> aside))) {
|
|
89
|
-
grid-column: narrow;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
&:where(:has(> aside)) {
|
|
93
|
-
@media (--medium-up) {
|
|
94
|
-
display: grid;
|
|
95
|
-
grid-template-columns: var(--container-max-width, 76ch) auto;
|
|
96
|
-
gap: var(--sidebar-gap, var(--gap));
|
|
97
|
-
|
|
98
|
-
@media (--large-up) {
|
|
99
|
-
--sidebar-gap: 18ch;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
&.grid--sidebar-rev {
|
|
104
|
-
& > :is(section, aside) {
|
|
105
|
-
&:first-child {
|
|
106
|
-
order: 2;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
&:last-child {
|
|
110
|
-
order: 1;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
&.grid--sidebar-rev-lg {
|
|
116
|
-
@media (--medium-up) {
|
|
117
|
-
& > :is(section, aside) {
|
|
118
|
-
&:first-child {
|
|
119
|
-
order: 2;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
&:last-child {
|
|
123
|
-
order: 1;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
&:is(.grid--sidebar-rev, .grid--sidebar-rev-lg) {
|
|
130
|
-
@media (--large-up) {
|
|
131
|
-
grid-template-columns: auto var(--container-max-width, 76ch);
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
&:where(:has(> aside:first-child)) {
|
|
137
|
-
grid-template-columns: auto var(--container-max-width, 76ch);
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* Print stylesheet
|
|
144
|
-
*/
|
|
145
|
-
|
|
146
|
-
@media print {
|
|
147
|
-
.page__sidebar {
|
|
148
|
-
display: none;
|
|
149
|
-
}
|
|
150
|
-
}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
<
|
|
1
|
+
{% set classes = ['mx-page'] %}
|
|
2
|
+
{% set attributes = (attributes ?? create_attribute()).addClass(classes) %}
|
|
3
|
+
<div{{ attributes }}>
|
|
4
|
+
{{ masthead }}
|
|
5
|
+
{{ header }}
|
|
6
|
+
<main>{{ main }}</main>
|
|
7
|
+
{{ footer }}
|
|
8
|
+
</div>
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { Meta, StoryObj } from "@storybook/html"
|
|
2
2
|
import { Page } from "../../../.storybook/decorators"
|
|
3
|
-
import Component from "./
|
|
3
|
+
import Component from "./section.twig"
|
|
4
|
+
import Link from "../../Atom/Link/link.twig"
|
|
5
|
+
import Icon from "../../Atom/Icon/icon.twig"
|
|
6
|
+
import Heading from "../../Atom/Heading/heading.twig"
|
|
4
7
|
import "./section.css"
|
|
5
8
|
import { BackgroundStyles, Icons } from "../../enums"
|
|
6
9
|
import {
|
|
@@ -17,20 +20,20 @@ const meta: Meta<SectionType> = {
|
|
|
17
20
|
modifiers: [SectionModifiers.XL],
|
|
18
21
|
as: SectionTypes.DIV,
|
|
19
22
|
container: true,
|
|
20
|
-
title: {
|
|
23
|
+
title: Heading({
|
|
21
24
|
title: "Section name",
|
|
22
25
|
as: HeadingTypes.TWO,
|
|
23
|
-
},
|
|
24
|
-
|
|
26
|
+
}),
|
|
27
|
+
content:
|
|
28
|
+
'<p class="mx-text--lede">A short description to help explain enough about the subject matter to encourage visitors to learn more.</p>',
|
|
29
|
+
link: Link({
|
|
25
30
|
href: "#",
|
|
26
31
|
title: "See more content",
|
|
27
32
|
more: true,
|
|
28
|
-
iconEnd: {
|
|
33
|
+
iconEnd: Icon({
|
|
29
34
|
icon: Icons.ARROW_RIGHT,
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
content:
|
|
33
|
-
"A short description to help explain enough about the subject matter to encourage visitors to learn more.",
|
|
35
|
+
}),
|
|
36
|
+
}),
|
|
34
37
|
},
|
|
35
38
|
parameters: {
|
|
36
39
|
deepControls: { enabled: true },
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import { Meta, StoryObj } from "@storybook/react"
|
|
2
2
|
import Component from "./Section"
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
SectionFlow,
|
|
6
|
-
SectionStyles,
|
|
7
|
-
SectionTags,
|
|
8
|
-
} from "../../enums"
|
|
3
|
+
import { PageWidths, SectionFlow, SectionStyles } from "../../enums"
|
|
4
|
+
import { SectionTypes } from "@pnx-mixtape/ids-shape"
|
|
9
5
|
import { Page } from "../../../.storybook-react/decorators"
|
|
10
6
|
|
|
11
7
|
const meta: Meta<typeof Component> = {
|
|
@@ -19,7 +15,7 @@ const meta: Meta<typeof Component> = {
|
|
|
19
15
|
argTypes: {
|
|
20
16
|
sizes: { options: Object.values(SectionStyles) },
|
|
21
17
|
width: { options: Object.values(PageWidths) },
|
|
22
|
-
as: { options: Object.values(
|
|
18
|
+
as: { options: Object.values(SectionTypes) },
|
|
23
19
|
flow: { options: Object.values(SectionFlow) },
|
|
24
20
|
},
|
|
25
21
|
}
|
|
@@ -37,14 +33,14 @@ export const Default: Story = {
|
|
|
37
33
|
export const Varied: Story = {
|
|
38
34
|
args: {
|
|
39
35
|
sizes: [SectionStyles.TOP_M, SectionStyles.BOTTOM_XL],
|
|
40
|
-
as:
|
|
36
|
+
as: SectionTypes.ASIDE,
|
|
41
37
|
},
|
|
42
38
|
}
|
|
43
39
|
|
|
44
40
|
export const List: Story = {
|
|
45
41
|
args: {
|
|
46
42
|
sizes: SectionStyles.S,
|
|
47
|
-
as:
|
|
43
|
+
as: SectionTypes.LIST,
|
|
48
44
|
children: (
|
|
49
45
|
<>
|
|
50
46
|
<li>Item 1</li>
|
|
@@ -5,12 +5,8 @@ import {
|
|
|
5
5
|
useMemo,
|
|
6
6
|
} from "react"
|
|
7
7
|
import classNames from "classnames"
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
SectionFlow,
|
|
11
|
-
SectionStyles,
|
|
12
|
-
SectionTags,
|
|
13
|
-
} from "../../enums"
|
|
8
|
+
import { PageWidths, SectionFlow, SectionStyles } from "../../enums"
|
|
9
|
+
import { SectionTypes } from "@pnx-mixtape/ids-shape"
|
|
14
10
|
|
|
15
11
|
type InnerTagProps = ComponentPropsWithoutRef<"div"> &
|
|
16
12
|
PropsWithChildren & {
|
|
@@ -28,7 +24,7 @@ type SectionProps = PropsWithChildren & {
|
|
|
28
24
|
sizes?: SectionStyles | SectionStyles[]
|
|
29
25
|
width?: PageWidths
|
|
30
26
|
flow?: SectionFlow
|
|
31
|
-
as?:
|
|
27
|
+
as?: SectionTypes
|
|
32
28
|
className?: string
|
|
33
29
|
innerClassName?: string
|
|
34
30
|
containing?: boolean
|
|
@@ -40,7 +36,7 @@ const Section = ({
|
|
|
40
36
|
sizes,
|
|
41
37
|
width,
|
|
42
38
|
flow,
|
|
43
|
-
as =
|
|
39
|
+
as = SectionTypes.DIV,
|
|
44
40
|
className,
|
|
45
41
|
innerClassName,
|
|
46
42
|
containing = false,
|
|
@@ -58,7 +54,7 @@ const Section = ({
|
|
|
58
54
|
return (
|
|
59
55
|
<Tag
|
|
60
56
|
className={classNames({
|
|
61
|
-
page: containing,
|
|
57
|
+
["mx-page"]: containing,
|
|
62
58
|
[className]: className,
|
|
63
59
|
[sizeClasses.join(" ")]: sizes,
|
|
64
60
|
[`mx-page--${width}`]: width && containing,
|
|
@@ -70,7 +66,7 @@ const Section = ({
|
|
|
70
66
|
<InnerTag
|
|
71
67
|
className={classNames({
|
|
72
68
|
[innerClassName]: innerClassName,
|
|
73
|
-
container: container,
|
|
69
|
+
["mx-container"]: container,
|
|
74
70
|
})}
|
|
75
71
|
condition={!!container || !!innerClassName}
|
|
76
72
|
>
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
import { Meta, StoryObj } from "@storybook/react"
|
|
2
2
|
import Component from "./SectionGrid"
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
PageWidths,
|
|
6
|
-
SectionFlow,
|
|
7
|
-
SectionStyles,
|
|
8
|
-
SectionTags,
|
|
9
|
-
} from "../../enums"
|
|
3
|
+
import { PageWidths, SectionFlow, SectionStyles } from "../../enums"
|
|
4
|
+
import { SectionTypes, GridModifiers } from "@pnx-mixtape/ids-shape"
|
|
10
5
|
import { Page } from "../../../.storybook-react/decorators"
|
|
11
6
|
|
|
12
7
|
const meta: Meta<typeof Component> = {
|
|
@@ -21,13 +16,12 @@ const meta: Meta<typeof Component> = {
|
|
|
21
16
|
<div>Item 3</div>
|
|
22
17
|
</>
|
|
23
18
|
),
|
|
24
|
-
cols: GridColumns.DYNAMIC,
|
|
25
19
|
sizes: SectionStyles.XL,
|
|
26
20
|
},
|
|
27
21
|
argTypes: {
|
|
28
22
|
sizes: { options: Object.values(SectionStyles) },
|
|
29
|
-
cols: { options: Object.values(
|
|
30
|
-
as: { options: Object.values(
|
|
23
|
+
cols: { options: Object.values(GridModifiers) },
|
|
24
|
+
as: { options: Object.values(SectionTypes) },
|
|
31
25
|
width: { options: Object.values(PageWidths) },
|
|
32
26
|
flow: { options: Object.values(SectionFlow) },
|
|
33
27
|
},
|
|
@@ -40,7 +34,7 @@ export const SectionGrid: Story = {}
|
|
|
40
34
|
|
|
41
35
|
export const List: Story = {
|
|
42
36
|
args: {
|
|
43
|
-
as:
|
|
37
|
+
as: SectionTypes.LIST,
|
|
44
38
|
container: true,
|
|
45
39
|
children: (
|
|
46
40
|
<>
|
|
@@ -1,20 +1,15 @@
|
|
|
1
1
|
import { JSX, PropsWithChildren, useMemo } from "react"
|
|
2
2
|
import classNames from "classnames"
|
|
3
3
|
import Grid from "../Grid/Grid"
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
PageWidths,
|
|
7
|
-
SectionFlow,
|
|
8
|
-
SectionStyles,
|
|
9
|
-
SectionTags,
|
|
10
|
-
} from "../../enums"
|
|
4
|
+
import { PageWidths, SectionFlow, SectionStyles } from "../../enums"
|
|
5
|
+
import { SectionTypes, GridModifiers } from "@pnx-mixtape/ids-shape"
|
|
11
6
|
|
|
12
7
|
type SectionGridProps = PropsWithChildren & {
|
|
13
8
|
sizes?: SectionStyles | SectionStyles[]
|
|
14
9
|
width?: PageWidths
|
|
15
10
|
flow?: SectionFlow
|
|
16
|
-
as?:
|
|
17
|
-
cols?:
|
|
11
|
+
as?: SectionTypes
|
|
12
|
+
cols?: GridModifiers | GridModifiers[]
|
|
18
13
|
className?: string
|
|
19
14
|
innerClassName?: string
|
|
20
15
|
containing?: boolean
|
|
@@ -28,14 +23,14 @@ const SectionGrid = ({
|
|
|
28
23
|
children,
|
|
29
24
|
className,
|
|
30
25
|
innerClassName,
|
|
31
|
-
as =
|
|
26
|
+
as = SectionTypes.DIV,
|
|
32
27
|
containing = false,
|
|
33
28
|
container = false,
|
|
34
29
|
...props
|
|
35
30
|
}: SectionGridProps): JSX.Element => {
|
|
36
|
-
const wrapperAs = as ===
|
|
31
|
+
const wrapperAs = as === SectionTypes.LIST ? SectionTypes.DIV : as
|
|
37
32
|
const Tag: JSX.ElementType = `${wrapperAs}` as unknown as JSX.ElementType
|
|
38
|
-
const gridAs = as ===
|
|
33
|
+
const gridAs = as === SectionTypes.LIST ? SectionTypes.LIST : SectionTypes.DIV
|
|
39
34
|
|
|
40
35
|
const sizeClasses = useMemo<string[]>(() => {
|
|
41
36
|
if (!sizes) return []
|
|
@@ -47,7 +42,7 @@ const SectionGrid = ({
|
|
|
47
42
|
return (
|
|
48
43
|
<Tag
|
|
49
44
|
className={classNames({
|
|
50
|
-
page: containing,
|
|
45
|
+
["mx-page"]: containing,
|
|
51
46
|
[className]: className,
|
|
52
47
|
[sizeClasses.join(" ")]: sizes,
|
|
53
48
|
[`mx-page--${width}`]: width && containing,
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
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"
|
|
4
|
+
<div class="mx-page">
|
|
5
|
+
<section class="mx-section background--alt">
|
|
6
|
+
<figure class="mx-background--image mx-section__full"
|
|
7
7
|
aria-hidden="true"
|
|
8
8
|
>
|
|
9
9
|
<img src="https://picsum.photos/id/56/1642/560?grayscale"
|
|
10
10
|
alt
|
|
11
11
|
>
|
|
12
12
|
</figure>
|
|
13
|
-
<div class="section--xl">
|
|
14
|
-
<div class="section__header">
|
|
13
|
+
<div class="mx-section--xl">
|
|
14
|
+
<div class="mx-section__header">
|
|
15
15
|
<h2>
|
|
16
16
|
Section with background image
|
|
17
17
|
</h2>
|
|
18
|
-
<a class="button button--dark"
|
|
18
|
+
<a class="mx-button mx-button--dark"
|
|
19
19
|
href="#"
|
|
20
20
|
>
|
|
21
21
|
Learn more
|
|
@@ -30,21 +30,21 @@ exports[`Layout/Section/Background Background smoke-test 1`] = `
|
|
|
30
30
|
`;
|
|
31
31
|
|
|
32
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"
|
|
33
|
+
<div class="mx-page">
|
|
34
|
+
<section class="mx-section background--reverse">
|
|
35
|
+
<figure class="mx-background--image mx-section__full"
|
|
36
36
|
aria-hidden="true"
|
|
37
37
|
>
|
|
38
38
|
<img src="https://picsum.photos/id/56/1642/560?grayscale"
|
|
39
39
|
alt
|
|
40
40
|
>
|
|
41
41
|
</figure>
|
|
42
|
-
<div class="section--xl">
|
|
43
|
-
<div class="section__header">
|
|
42
|
+
<div class="mx-section--xl">
|
|
43
|
+
<div class="mx-section__header">
|
|
44
44
|
<h2>
|
|
45
45
|
Section with background image
|
|
46
46
|
</h2>
|
|
47
|
-
<a class="button button--dark"
|
|
47
|
+
<a class="mx-button mx-button--dark"
|
|
48
48
|
href="#"
|
|
49
49
|
>
|
|
50
50
|
Learn more
|
|
@@ -1,46 +1,46 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
3
|
exports[`Layout/Section/Breakouts Breakouts smoke-test 1`] = `
|
|
4
|
-
<div class="page">
|
|
5
|
-
<section class="section section--flow">
|
|
4
|
+
<div class="mx-page">
|
|
5
|
+
<section class="mx-section mx-section--flow">
|
|
6
6
|
<p>
|
|
7
7
|
Default is container width, with an inline gutter for smaller screens.
|
|
8
8
|
</p>
|
|
9
9
|
</section>
|
|
10
|
-
<section class="section section__full section--flow">
|
|
10
|
+
<section class="mx-section mx-section__full mx-section--flow">
|
|
11
11
|
<p>
|
|
12
12
|
Section can have children with different content widths;
|
|
13
13
|
</p>
|
|
14
|
-
<p class="section__narrow">
|
|
14
|
+
<p class="mx-section__narrow">
|
|
15
15
|
like the optimum content width with .section__narrow
|
|
16
16
|
</p>
|
|
17
|
-
<p class="section__feature">
|
|
17
|
+
<p class="mx-section__feature">
|
|
18
18
|
or slightly larger feature widths with .section__feature
|
|
19
19
|
</p>
|
|
20
|
-
<p class="section__full">
|
|
20
|
+
<p class="mx-section__full">
|
|
21
21
|
or full width with .section__full
|
|
22
22
|
</p>
|
|
23
23
|
</section>
|
|
24
|
-
<section class="section section--flow">
|
|
24
|
+
<section class="mx-section mx-section--flow">
|
|
25
25
|
<p>
|
|
26
26
|
Sections can be nested
|
|
27
27
|
</p>
|
|
28
|
-
<section class="section">
|
|
28
|
+
<section class="mx-section">
|
|
29
29
|
<p>
|
|
30
30
|
and have the same content width options are un-nested ones;
|
|
31
31
|
</p>
|
|
32
|
-
<p class="section__narrow">
|
|
32
|
+
<p class="mx-section__narrow">
|
|
33
33
|
like the optimum content widths with .section__narrow
|
|
34
34
|
</p>
|
|
35
|
-
<p class="section__feature">
|
|
35
|
+
<p class="mx-section__feature">
|
|
36
36
|
or slightly larger feature widths with .section__feature
|
|
37
37
|
</p>
|
|
38
|
-
<p class="section__full">
|
|
38
|
+
<p class="mx-section__full">
|
|
39
39
|
or full width with .section__full
|
|
40
40
|
</p>
|
|
41
41
|
</section>
|
|
42
42
|
</section>
|
|
43
|
-
<section class="section section__narrow section--flow">
|
|
43
|
+
<section class="mx-section mx-section__narrow mx-section--flow">
|
|
44
44
|
<p>
|
|
45
45
|
Sections can say for all children to have a certain width
|
|
46
46
|
</p>
|
|
@@ -51,27 +51,27 @@ exports[`Layout/Section/Breakouts Breakouts smoke-test 1`] = `
|
|
|
51
51
|
on the parent.
|
|
52
52
|
</p>
|
|
53
53
|
</section>
|
|
54
|
-
<section class="section section--flow background--reverse">
|
|
54
|
+
<section class="mx-section mx-section--flow mx-background--reverse">
|
|
55
55
|
<p>
|
|
56
56
|
Any section can have a background color, or utilise any of the section vertical spacing classes
|
|
57
57
|
</p>
|
|
58
|
-
<section class="section--bottom-l">
|
|
58
|
+
<section class="mx-section--bottom-l">
|
|
59
59
|
<p>
|
|
60
60
|
even children
|
|
61
61
|
</p>
|
|
62
62
|
</section>
|
|
63
|
-
<section class="section--l background--reset">
|
|
63
|
+
<section class="mx-section--l mx-background--reset">
|
|
64
64
|
<p>
|
|
65
65
|
and ones with their own backgrounds.
|
|
66
66
|
</p>
|
|
67
67
|
</section>
|
|
68
68
|
</section>
|
|
69
|
-
<section class="section section--group">
|
|
69
|
+
<section class="mx-section mx-section--group">
|
|
70
70
|
<p>
|
|
71
71
|
Sections can be grouped together
|
|
72
72
|
</p>
|
|
73
73
|
</section>
|
|
74
|
-
<section class="section section__feature section--group">
|
|
74
|
+
<section class="mx-section mx-section__feature mx-section--group">
|
|
75
75
|
<p>
|
|
76
76
|
even if they have different content widths.
|
|
77
77
|
</p>
|