@pnx-mixtape/mxds 0.0.6 → 0.0.8
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/dist/build/base.css +16 -19
- package/dist/build/breadcrumb.css +10 -6
- package/dist/build/button.css +2 -2
- package/dist/build/card.css +69 -56
- package/dist/build/chunks/drop-menu.entry-BC6x9vst.js +132 -0
- package/dist/build/chunks/drop-menu.entry-BC6x9vst.js.map +1 -0
- package/dist/build/content-block.css +24 -11
- package/dist/build/drop-menu.css +9 -9
- package/dist/build/drop-menu.entry.js +1 -128
- package/dist/build/drop-menu.entry.js.map +1 -1
- package/dist/build/footer.css +118 -28
- package/dist/build/form.css +142 -214
- package/dist/build/global-alert.css +3 -3
- package/dist/build/header.css +37 -30
- package/dist/build/header.entry.js +6 -1
- package/dist/build/header.entry.js.map +1 -1
- package/dist/build/in-page-navigation.css +3 -3
- package/dist/build/in-page-navigation.entry.js +2 -2
- package/dist/build/in-page-navigation.entry.js.map +1 -1
- package/dist/build/list-item.css +114 -0
- package/dist/build/masthead.css +7 -16
- package/dist/build/navigation.css +134 -113
- package/dist/build/navigation.entry.js +6 -5
- package/dist/build/navigation.entry.js.map +1 -1
- package/dist/build/page.css +14 -118
- package/dist/build/pagination.css +26 -19
- package/dist/build/side-navigation.css +88 -0
- package/dist/build/sidebar.css +15 -15
- package/dist/build/social-links.css +20 -0
- package/dist/build/steps.css +118 -0
- package/dist/build/steps.entry.js +2 -0
- package/dist/build/steps.entry.js.map +1 -0
- package/dist/build/tabs.css +22 -19
- package/dist/build/tabs.entry.js +87 -46
- package/dist/build/tabs.entry.js.map +1 -1
- package/dist/build/utilities.css +6 -3
- 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/Card.tsx +7 -7
- 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 +197 -5
- 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/footer-menu.css +0 -32
- package/dist/build/nav-list.css +0 -26
- 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,8 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Tab toggle handler
|
|
3
3
|
*/
|
|
4
|
-
|
|
5
|
-
import
|
|
4
|
+
|
|
5
|
+
import DropMenu, { DropMenuEvent } from "../../DropMenu/Elements/DropMenu"
|
|
6
|
+
import { createElement, makeAnchor } from "../../../Utility/utilities"
|
|
6
7
|
|
|
7
8
|
type TabsType = {
|
|
8
9
|
panel: HTMLElement
|
|
@@ -14,48 +15,43 @@ export default class Tabs extends HTMLElement {
|
|
|
14
15
|
internals_: ElementInternals
|
|
15
16
|
controller: AbortController
|
|
16
17
|
tabs?: Map<string, TabsType>
|
|
18
|
+
mq: string
|
|
17
19
|
locationHash?: string
|
|
18
20
|
tabFocus?: number = 0
|
|
21
|
+
tabListClasses?: string
|
|
22
|
+
dropTriggerClasses?: string
|
|
23
|
+
dropMenuId?: string
|
|
19
24
|
|
|
20
25
|
constructor() {
|
|
21
26
|
super()
|
|
22
27
|
this.internals_ = this.attachInternals()
|
|
23
28
|
this.controller = new AbortController()
|
|
29
|
+
this.mq = this.getAttribute("mq") || "(max-width: 720px)"
|
|
24
30
|
}
|
|
25
31
|
|
|
26
32
|
connectedCallback(): void {
|
|
27
|
-
if (!this.
|
|
33
|
+
if (!this.panels) return
|
|
28
34
|
this.locationHash = window.location.hash
|
|
29
35
|
|
|
30
36
|
this.tabs = new Map()
|
|
31
|
-
this.
|
|
32
|
-
const id: string =
|
|
33
|
-
const
|
|
34
|
-
const button
|
|
35
|
-
|
|
36
|
-
)
|
|
37
|
+
this.panels.forEach((panel: HTMLDivElement): void => {
|
|
38
|
+
const id: string = panel.id
|
|
39
|
+
const name: string = panel.getAttribute("aria-label")
|
|
40
|
+
const tabTemplate = `<button type="button" role="tab" aria-controls="${id}" aria-selected="false">${name}</button>`
|
|
41
|
+
const tab = createElement(tabTemplate) as HTMLButtonElement
|
|
42
|
+
this.tabList.appendChild(tab)
|
|
43
|
+
const button = createElement(tabTemplate) as HTMLButtonElement
|
|
44
|
+
this.dropMenuMenu.appendChild(button)
|
|
37
45
|
if (id && panel && button) {
|
|
38
|
-
const labelId = `tab-label-${id}`
|
|
39
|
-
tab.setAttribute("id", labelId)
|
|
40
|
-
tab.setAttribute("role", "tab")
|
|
41
|
-
tab.setAttribute("aria-selected", "false")
|
|
42
|
-
tab.setAttribute("tab-index", "-1")
|
|
43
|
-
panel.setAttribute("aria-labelledby", labelId)
|
|
44
|
-
panel.setAttribute("role", "tabpanel")
|
|
45
|
-
panel.setAttribute("tab-index", "0")
|
|
46
46
|
this.tabs.set(id, { panel, tab, button })
|
|
47
47
|
}
|
|
48
48
|
})
|
|
49
49
|
|
|
50
50
|
const { signal }: AbortController = this.controller
|
|
51
|
-
this.
|
|
52
|
-
this.
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
"drop-menu-select",
|
|
56
|
-
this.handleDropMenuSelect,
|
|
57
|
-
{ signal },
|
|
58
|
-
)
|
|
51
|
+
this.handleBreakpoint(this.breakpoint)
|
|
52
|
+
this.breakpoint.addEventListener("change", this.handleBreakpoint, {
|
|
53
|
+
signal,
|
|
54
|
+
})
|
|
59
55
|
|
|
60
56
|
const hashEl: HTMLElement | null = this.locationHash
|
|
61
57
|
? this.querySelector(this.locationHash)
|
|
@@ -71,6 +67,30 @@ export default class Tabs extends HTMLElement {
|
|
|
71
67
|
this.controller.abort()
|
|
72
68
|
}
|
|
73
69
|
|
|
70
|
+
handleBreakpoint = ({
|
|
71
|
+
matches,
|
|
72
|
+
}: MediaQueryList | MediaQueryListEvent): void => {
|
|
73
|
+
const { signal }: AbortController = this.controller
|
|
74
|
+
this.dropMenuTrigger.toggleAttribute("hidden", !matches)
|
|
75
|
+
this.tabList.toggleAttribute("hidden", matches)
|
|
76
|
+
if (matches) {
|
|
77
|
+
this.dropMenuMenu.addEventListener(
|
|
78
|
+
"drop-menu-select",
|
|
79
|
+
this.handleDropMenuSelect,
|
|
80
|
+
{ signal },
|
|
81
|
+
)
|
|
82
|
+
this.tabList.removeEventListener("click", this.handleClick)
|
|
83
|
+
this.tabList.removeEventListener("keydown", this.handleKeydown)
|
|
84
|
+
} else {
|
|
85
|
+
this.tabList.addEventListener("click", this.handleClick, { signal })
|
|
86
|
+
this.tabList.addEventListener("keydown", this.handleKeydown, { signal })
|
|
87
|
+
this.dropMenuMenu.removeEventListener(
|
|
88
|
+
"drop-menu-select",
|
|
89
|
+
this.handleDropMenuSelect,
|
|
90
|
+
)
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
74
94
|
handleKeydown = ({ key }: KeyboardEvent): void => {
|
|
75
95
|
if (key === "ArrowRight" || key === "ArrowLeft") {
|
|
76
96
|
this.triggers[this.tabFocus].setAttribute("tabindex", "-1")
|
|
@@ -126,47 +146,72 @@ export default class Tabs extends HTMLElement {
|
|
|
126
146
|
this.dispatchEvent(newEvent)
|
|
127
147
|
}
|
|
128
148
|
|
|
129
|
-
get dropMenu():
|
|
130
|
-
const
|
|
131
|
-
if (
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
149
|
+
get dropMenu(): DropMenu | null {
|
|
150
|
+
const existingMenu = this.querySelector("mx-dropmenu")
|
|
151
|
+
if (existingMenu) return existingMenu
|
|
152
|
+
this.dropTriggerClasses =
|
|
153
|
+
this.getAttribute("dropTriggerClasses") ||
|
|
154
|
+
"mx-button mx-icon mx-icon--chevron-down mx-icon--end"
|
|
155
|
+
this.dropMenuId = this.id || makeAnchor("tab-drop-menu")
|
|
156
|
+
const name = `${this.dropMenuId}-target`
|
|
157
|
+
const tabDropMenu = new DropMenu()
|
|
158
|
+
tabDropMenu.setAttribute("closeOnClick", "true")
|
|
159
|
+
const trigger = createElement(`<button
|
|
160
|
+
id="${name}"
|
|
161
|
+
class="mx-drop-menu__trigger ${this.dropTriggerClasses}"
|
|
162
|
+
popovertarget="${this.dropMenuId}"
|
|
163
|
+
hidden
|
|
164
|
+
></button>`)
|
|
165
|
+
const menu = createElement(
|
|
166
|
+
`<div
|
|
167
|
+
class="mx-drop-menu"
|
|
168
|
+
id="${this.dropMenuId}"
|
|
169
|
+
aria-labelledby="${name}"
|
|
170
|
+
anchor="${name}"
|
|
171
|
+
popover
|
|
172
|
+
role="tablist"
|
|
173
|
+
></div>`,
|
|
174
|
+
)
|
|
175
|
+
tabDropMenu.append(trigger, menu)
|
|
176
|
+
this.prepend(tabDropMenu)
|
|
177
|
+
return tabDropMenu
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
get dropMenuMenu(): HTMLDivElement {
|
|
181
|
+
return this.dropMenu.querySelector('[popover][role="tablist"]')
|
|
135
182
|
}
|
|
136
183
|
|
|
137
184
|
get dropMenuTrigger(): HTMLButtonElement | null {
|
|
138
|
-
|
|
139
|
-
".drop-menu__trigger",
|
|
140
|
-
)
|
|
141
|
-
if (!trigger) {
|
|
142
|
-
throw new Error(`${this.localName} must contain a .drop-menu__trigger`)
|
|
143
|
-
}
|
|
144
|
-
return trigger
|
|
185
|
+
return this.dropMenu.querySelector("[popovertarget]")
|
|
145
186
|
}
|
|
146
187
|
|
|
147
|
-
get
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
188
|
+
get tabList(): HTMLDivElement {
|
|
189
|
+
this.tabListClasses = this.getAttribute("tabListClasses") || "mx-tabs__list"
|
|
190
|
+
const existingTabList: HTMLDivElement = this.querySelector(
|
|
191
|
+
'[role="tablist"]:not([popover])',
|
|
192
|
+
)
|
|
193
|
+
if (existingTabList) return existingTabList
|
|
194
|
+
const tabList = createElement(
|
|
195
|
+
`<div class="${this.tabListClasses}" role="tablist" hidden></div>`,
|
|
196
|
+
) as HTMLDivElement
|
|
197
|
+
this.prepend(tabList)
|
|
198
|
+
return tabList
|
|
154
199
|
}
|
|
155
200
|
|
|
156
201
|
get triggers(): NodeListOf<HTMLButtonElement> | null {
|
|
157
202
|
const triggers: NodeListOf<HTMLButtonElement> | null =
|
|
158
|
-
this.querySelectorAll("
|
|
203
|
+
this.tabList.querySelectorAll('[role="tab"]')
|
|
159
204
|
if (!triggers.length) {
|
|
160
|
-
throw new Error(`${this.localName} must contain
|
|
205
|
+
throw new Error(`${this.localName} must contain [role="tab"]`)
|
|
161
206
|
}
|
|
162
207
|
return triggers
|
|
163
208
|
}
|
|
164
209
|
|
|
165
210
|
get panels(): NodeListOf<HTMLElement> | null {
|
|
166
211
|
const panels: NodeListOf<HTMLElement> | null =
|
|
167
|
-
this.querySelectorAll("
|
|
212
|
+
this.querySelectorAll('[role="tabpanel"]')
|
|
168
213
|
if (!panels.length) {
|
|
169
|
-
throw new Error(`${this.localName} must contain
|
|
214
|
+
throw new Error(`${this.localName} must contain [role="tabpanel"]`)
|
|
170
215
|
}
|
|
171
216
|
return panels
|
|
172
217
|
}
|
|
@@ -175,6 +220,10 @@ export default class Tabs extends HTMLElement {
|
|
|
175
220
|
return this.querySelector('[aria-selected="true"]')
|
|
176
221
|
}
|
|
177
222
|
|
|
223
|
+
get breakpoint(): MediaQueryList {
|
|
224
|
+
return window.matchMedia(this.mq)
|
|
225
|
+
}
|
|
226
|
+
|
|
178
227
|
set active(id: string) {
|
|
179
228
|
this.tabs.forEach(({ tab, panel }: TabsType, key: string): void => {
|
|
180
229
|
if (key === id) {
|
|
@@ -1,22 +1,59 @@
|
|
|
1
1
|
import { Meta, StoryObj } from "@storybook/html"
|
|
2
2
|
import Component from "./tabs.twig"
|
|
3
|
+
import TabItem from "./tab-item.twig"
|
|
3
4
|
import "./tabs.css"
|
|
4
|
-
import "../Card/card.css"
|
|
5
5
|
import "../DropMenu/drop-menu.css"
|
|
6
6
|
import "./Elements/Tabs"
|
|
7
|
-
import {
|
|
7
|
+
import { HeadingTypes, Tabs as TabsType } from "@pnx-mixtape/ids-shape"
|
|
8
8
|
|
|
9
|
-
const meta: Meta<
|
|
10
|
-
tags: ["autodocs"],
|
|
9
|
+
const meta: Meta<TabsType> = {
|
|
10
|
+
tags: ["autodocs", "ids-mvp"],
|
|
11
11
|
component: Component,
|
|
12
|
+
args: {
|
|
13
|
+
items: [
|
|
14
|
+
TabItem({
|
|
15
|
+
id: "tab-1",
|
|
16
|
+
title: "Funk",
|
|
17
|
+
content:
|
|
18
|
+
"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.",
|
|
19
|
+
}),
|
|
20
|
+
TabItem({
|
|
21
|
+
id: "tab-2",
|
|
22
|
+
title: "Soul",
|
|
23
|
+
content:
|
|
24
|
+
"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.",
|
|
25
|
+
}),
|
|
26
|
+
TabItem({
|
|
27
|
+
id: "tab-3",
|
|
28
|
+
title: "Motown",
|
|
29
|
+
content:
|
|
30
|
+
"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.",
|
|
31
|
+
}),
|
|
32
|
+
],
|
|
33
|
+
},
|
|
34
|
+
parameters: {
|
|
35
|
+
a11y: {
|
|
36
|
+
config: {
|
|
37
|
+
rules: [
|
|
38
|
+
{
|
|
39
|
+
// ID's are not valid due to test-runner, and having two sets of tabs (mobile and desktop).
|
|
40
|
+
id: "aria-valid-attr-value",
|
|
41
|
+
enabled: false,
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
deepControls: { enabled: true },
|
|
47
|
+
},
|
|
12
48
|
argTypes: {
|
|
13
|
-
|
|
49
|
+
id: { control: "text" },
|
|
50
|
+
// @ts-expect-error The controls follow the shape
|
|
51
|
+
"title.title": { control: "text" },
|
|
52
|
+
"title.as": { options: Object.values(HeadingTypes), control: "select" },
|
|
14
53
|
},
|
|
15
54
|
}
|
|
16
55
|
|
|
17
56
|
export default meta
|
|
18
57
|
type Story = StoryObj<typeof meta>
|
|
19
58
|
|
|
20
|
-
export const Tabs: Story = {
|
|
21
|
-
args: {},
|
|
22
|
-
}
|
|
59
|
+
export const Tabs: Story = {}
|
|
@@ -13,9 +13,9 @@ import { TabStyles } from "../../enums"
|
|
|
13
13
|
const defaultChildren = (
|
|
14
14
|
<Fragment>
|
|
15
15
|
<TabDropMenu>
|
|
16
|
-
<DropMenuItem id="tab-1" label="Tab 1" aria-controls="tab-1" />
|
|
17
|
-
<DropMenuItem id="tab-2" label="Tab 2" aria-controls="tab-2" />
|
|
18
|
-
<DropMenuItem id="tab-3" label="Tab 3" aria-controls="tab-3" />
|
|
16
|
+
<DropMenuItem id="tab-1" label="Tab 1" aria-controls="tab-1" role="tab" />
|
|
17
|
+
<DropMenuItem id="tab-2" label="Tab 2" aria-controls="tab-2" role="tab" />
|
|
18
|
+
<DropMenuItem id="tab-3" label="Tab 3" aria-controls="tab-3" role="tab" />
|
|
19
19
|
</TabDropMenu>
|
|
20
20
|
<TabList>
|
|
21
21
|
<Tab id="tab-1">Tab 1</Tab>
|
|
@@ -86,8 +86,8 @@ const Tabs = ({ children, active, modifier, id }: TabsProps): JSX.Element => {
|
|
|
86
86
|
selectedItem={[activeTab]}
|
|
87
87
|
>
|
|
88
88
|
<div
|
|
89
|
-
className={classNames("tabs", {
|
|
90
|
-
[`tabs--${modifier}`]: modifier,
|
|
89
|
+
className={classNames("mx-tabs", {
|
|
90
|
+
[`mx-tabs--${modifier}`]: modifier,
|
|
91
91
|
})}
|
|
92
92
|
>
|
|
93
93
|
{children}
|
|
@@ -1,144 +1,98 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
3
|
exports[`Component/Tabs Tabs smoke-test 1`] = `
|
|
4
|
-
<mx-tabs class="tabs tabs--">
|
|
5
|
-
<mx-dropmenu closeonclick
|
|
6
|
-
class="mobile-only"
|
|
7
|
-
>
|
|
4
|
+
<mx-tabs class="mx-tabs mx-tabs--lined">
|
|
5
|
+
<mx-dropmenu closeonclick="true">
|
|
8
6
|
<button id="unique-0"
|
|
9
|
-
class="drop-menu__trigger button icon icon--chevron-down icon--end"
|
|
10
|
-
popovertarget="tab-menu"
|
|
7
|
+
class="mx-drop-menu__trigger mx-button mx-icon mx-icon--chevron-down mx-icon--end"
|
|
8
|
+
popovertarget="tab-drop-menu"
|
|
9
|
+
hidden
|
|
11
10
|
>
|
|
12
|
-
|
|
11
|
+
Funk
|
|
13
12
|
</button>
|
|
14
|
-
<div class="drop-menu"
|
|
15
|
-
id="tab-menu"
|
|
13
|
+
<div class="mx-drop-menu"
|
|
14
|
+
id="tab-drop-menu"
|
|
16
15
|
aria-labelledby="unique-0"
|
|
17
|
-
anchor="tab-menu-target"
|
|
16
|
+
anchor="tab-drop-menu-target"
|
|
18
17
|
popover
|
|
19
|
-
role="
|
|
18
|
+
role="tablist"
|
|
20
19
|
>
|
|
21
20
|
<button type="button"
|
|
21
|
+
role="tab"
|
|
22
22
|
aria-controls="unique-1"
|
|
23
|
-
|
|
24
|
-
role="menuitemradio"
|
|
25
|
-
aria-checked="false"
|
|
23
|
+
aria-selected="false"
|
|
26
24
|
>
|
|
27
|
-
|
|
25
|
+
Funk
|
|
28
26
|
</button>
|
|
29
27
|
<button type="button"
|
|
28
|
+
role="tab"
|
|
30
29
|
aria-controls="unique-2"
|
|
31
|
-
|
|
32
|
-
role="menuitemradio"
|
|
33
|
-
aria-checked="false"
|
|
30
|
+
aria-selected="false"
|
|
34
31
|
>
|
|
35
|
-
|
|
32
|
+
Soul
|
|
36
33
|
</button>
|
|
37
34
|
<button type="button"
|
|
35
|
+
role="tab"
|
|
38
36
|
aria-controls="unique-3"
|
|
39
|
-
|
|
40
|
-
role="menuitemradio"
|
|
41
|
-
aria-checked="false"
|
|
37
|
+
aria-selected="false"
|
|
42
38
|
>
|
|
43
|
-
|
|
39
|
+
Motown
|
|
44
40
|
</button>
|
|
45
41
|
</div>
|
|
46
42
|
</mx-dropmenu>
|
|
47
|
-
<div class="
|
|
43
|
+
<div class="mx-tabs__list"
|
|
48
44
|
role="tablist"
|
|
49
45
|
>
|
|
50
|
-
<button
|
|
51
|
-
type="button"
|
|
52
|
-
aria-controls="unique-4"
|
|
53
|
-
id="unique-1"
|
|
46
|
+
<button type="button"
|
|
54
47
|
role="tab"
|
|
48
|
+
aria-controls="unique-4"
|
|
55
49
|
aria-selected="true"
|
|
56
50
|
tab-index="0"
|
|
57
51
|
>
|
|
58
|
-
|
|
52
|
+
Funk
|
|
59
53
|
</button>
|
|
60
|
-
<button
|
|
61
|
-
type="button"
|
|
62
|
-
aria-controls="unique-5"
|
|
63
|
-
id="unique-2"
|
|
54
|
+
<button type="button"
|
|
64
55
|
role="tab"
|
|
56
|
+
aria-controls="unique-5"
|
|
65
57
|
aria-selected="false"
|
|
66
58
|
tab-index="-1"
|
|
67
59
|
>
|
|
68
|
-
|
|
60
|
+
Soul
|
|
69
61
|
</button>
|
|
70
|
-
<button
|
|
71
|
-
type="button"
|
|
72
|
-
aria-controls="unique-6"
|
|
73
|
-
id="unique-3"
|
|
62
|
+
<button type="button"
|
|
74
63
|
role="tab"
|
|
64
|
+
aria-controls="unique-6"
|
|
75
65
|
aria-selected="false"
|
|
76
66
|
tab-index="-1"
|
|
77
67
|
>
|
|
78
|
-
|
|
68
|
+
Motown
|
|
79
69
|
</button>
|
|
80
70
|
</div>
|
|
81
|
-
<div
|
|
82
|
-
|
|
83
|
-
aria-labelledby="unique-7"
|
|
71
|
+
<div class="mx-tabs__panel mx-vertical-flow mx-container mx-section--l"
|
|
72
|
+
id="unique-1"
|
|
84
73
|
role="tabpanel"
|
|
85
|
-
|
|
74
|
+
tabindex="0"
|
|
75
|
+
aria-label="Funk"
|
|
86
76
|
>
|
|
87
|
-
|
|
88
|
-
<article class="mx-card ">
|
|
89
|
-
<figure class="mx-card__media">
|
|
90
|
-
https://picsum.photos/id/56/558/418?grayscale
|
|
91
|
-
</figure>
|
|
92
|
-
<div class="mx-card__content mx-vertical-flow-flex">
|
|
93
|
-
Lorem ipsum
|
|
94
|
-
<div class="mx-text--lede">
|
|
95
|
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
|
96
|
-
</div>
|
|
97
|
-
</div>
|
|
98
|
-
</article>
|
|
99
|
-
</div>
|
|
77
|
+
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.
|
|
100
78
|
</div>
|
|
101
|
-
<div
|
|
102
|
-
|
|
103
|
-
inert
|
|
104
|
-
aria-labelledby="unique-8"
|
|
79
|
+
<div class="mx-tabs__panel mx-vertical-flow mx-container mx-section--l"
|
|
80
|
+
id="unique-2"
|
|
105
81
|
role="tabpanel"
|
|
106
|
-
|
|
82
|
+
tabindex="0"
|
|
83
|
+
aria-label="Soul"
|
|
84
|
+
inert
|
|
107
85
|
>
|
|
108
|
-
|
|
109
|
-
<article class="mx-card ">
|
|
110
|
-
<figure class="mx-card__media">
|
|
111
|
-
https://picsum.photos/id/56/558/418?grayscale
|
|
112
|
-
</figure>
|
|
113
|
-
<div class="mx-card__content mx-vertical-flow-flex">
|
|
114
|
-
Ut enim
|
|
115
|
-
<div class="mx-text--lede">
|
|
116
|
-
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
|
|
117
|
-
</div>
|
|
118
|
-
</div>
|
|
119
|
-
</article>
|
|
120
|
-
</div>
|
|
86
|
+
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.
|
|
121
87
|
</div>
|
|
122
|
-
<div
|
|
123
|
-
|
|
124
|
-
inert
|
|
125
|
-
aria-labelledby="unique-9"
|
|
88
|
+
<div class="mx-tabs__panel mx-vertical-flow mx-container mx-section--l"
|
|
89
|
+
id="unique-3"
|
|
126
90
|
role="tabpanel"
|
|
127
|
-
|
|
91
|
+
tabindex="0"
|
|
92
|
+
aria-label="Motown"
|
|
93
|
+
inert
|
|
128
94
|
>
|
|
129
|
-
|
|
130
|
-
<article class="mx-card ">
|
|
131
|
-
<figure class="mx-card__media">
|
|
132
|
-
https://picsum.photos/id/56/558/418?grayscale
|
|
133
|
-
</figure>
|
|
134
|
-
<div class="mx-card__content mx-vertical-flow-flex">
|
|
135
|
-
Excepteur sint
|
|
136
|
-
<div class="mx-text--lede">
|
|
137
|
-
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
138
|
-
</div>
|
|
139
|
-
</div>
|
|
140
|
-
</article>
|
|
141
|
-
</div>
|
|
95
|
+
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.
|
|
142
96
|
</div>
|
|
143
97
|
</mx-tabs>
|
|
144
98
|
`;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
3
|
exports[`Component/Tabs Default smoke-test 1`] = `
|
|
4
|
-
<div class="tabs">
|
|
4
|
+
<div class="mx-tabs">
|
|
5
5
|
<div class="mobile-only">
|
|
6
6
|
<button id="unique-0"
|
|
7
7
|
type="button"
|
|
8
|
-
class="button icon icon--chevron-down icon--end drop-menu__trigger"
|
|
8
|
+
class="mx-button mx-icon mx-icon--chevron-down mx-icon--end mx-drop-menu__trigger"
|
|
9
9
|
popovertarget="tabs-storybook"
|
|
10
10
|
style="anchor-name: --drop-menu-tabs-storybook;"
|
|
11
11
|
>
|
|
12
12
|
Tab 1
|
|
13
13
|
</button>
|
|
14
14
|
<div id="tabs-storybook"
|
|
15
|
-
class="drop-menu"
|
|
15
|
+
class="mx-drop-menu"
|
|
16
16
|
popover
|
|
17
17
|
aria-labelledby="unique-0"
|
|
18
18
|
aria-describedby="unique-0"
|
|
19
|
-
role="
|
|
19
|
+
role="tablist"
|
|
20
20
|
style="position-anchor: --drop-menu-tabs-storybook;"
|
|
21
21
|
>
|
|
22
22
|
<div id="tabs-storybook-description"
|
|
@@ -27,7 +27,7 @@ exports[`Component/Tabs Default smoke-test 1`] = `
|
|
|
27
27
|
<button type="button"
|
|
28
28
|
data-id="tab-1"
|
|
29
29
|
aria-checked="true"
|
|
30
|
-
role="
|
|
30
|
+
role="tab"
|
|
31
31
|
aria-controls="unique-1"
|
|
32
32
|
>
|
|
33
33
|
Tab 1
|
|
@@ -35,7 +35,7 @@ exports[`Component/Tabs Default smoke-test 1`] = `
|
|
|
35
35
|
<button type="button"
|
|
36
36
|
data-id="tab-2"
|
|
37
37
|
aria-checked="false"
|
|
38
|
-
role="
|
|
38
|
+
role="tab"
|
|
39
39
|
aria-controls="unique-2"
|
|
40
40
|
>
|
|
41
41
|
Tab 2
|
|
@@ -43,20 +43,19 @@ exports[`Component/Tabs Default smoke-test 1`] = `
|
|
|
43
43
|
<button type="button"
|
|
44
44
|
data-id="tab-3"
|
|
45
45
|
aria-checked="false"
|
|
46
|
-
role="
|
|
46
|
+
role="tab"
|
|
47
47
|
aria-controls="unique-3"
|
|
48
48
|
>
|
|
49
49
|
Tab 3
|
|
50
50
|
</button>
|
|
51
51
|
</div>
|
|
52
52
|
</div>
|
|
53
|
-
<div class="
|
|
53
|
+
<div class="mx-tabs__list desktop-only"
|
|
54
54
|
role="tablist"
|
|
55
55
|
>
|
|
56
56
|
<button id="unique-1"
|
|
57
57
|
aria-controls="unique-4"
|
|
58
58
|
role="tab"
|
|
59
|
-
class="button"
|
|
60
59
|
aria-selected="true"
|
|
61
60
|
tabindex="0"
|
|
62
61
|
type="button"
|
|
@@ -66,7 +65,6 @@ exports[`Component/Tabs Default smoke-test 1`] = `
|
|
|
66
65
|
<button id="unique-2"
|
|
67
66
|
aria-controls="unique-5"
|
|
68
67
|
role="tab"
|
|
69
|
-
class="button"
|
|
70
68
|
aria-selected="false"
|
|
71
69
|
tabindex="-1"
|
|
72
70
|
type="button"
|
|
@@ -76,7 +74,6 @@ exports[`Component/Tabs Default smoke-test 1`] = `
|
|
|
76
74
|
<button id="unique-3"
|
|
77
75
|
aria-controls="unique-6"
|
|
78
76
|
role="tab"
|
|
79
|
-
class="button"
|
|
80
77
|
aria-selected="false"
|
|
81
78
|
tabindex="-1"
|
|
82
79
|
type="button"
|
|
@@ -85,7 +82,7 @@ exports[`Component/Tabs Default smoke-test 1`] = `
|
|
|
85
82
|
</button>
|
|
86
83
|
</div>
|
|
87
84
|
<div id="unique-4"
|
|
88
|
-
class="
|
|
85
|
+
class="mx-tabs__panel mx-vertical-flow mx-section--l"
|
|
89
86
|
aria-labelledby="unique-7"
|
|
90
87
|
role="tabpanel"
|
|
91
88
|
tabindex="0"
|
|
@@ -95,7 +92,7 @@ exports[`Component/Tabs Default smoke-test 1`] = `
|
|
|
95
92
|
</p>
|
|
96
93
|
</div>
|
|
97
94
|
<div id="unique-5"
|
|
98
|
-
class="
|
|
95
|
+
class="mx-tabs__panel mx-vertical-flow mx-section--l"
|
|
99
96
|
inert
|
|
100
97
|
aria-labelledby="unique-8"
|
|
101
98
|
role="tabpanel"
|
|
@@ -106,7 +103,7 @@ exports[`Component/Tabs Default smoke-test 1`] = `
|
|
|
106
103
|
</p>
|
|
107
104
|
</div>
|
|
108
105
|
<div id="unique-6"
|
|
109
|
-
class="
|
|
106
|
+
class="mx-tabs__panel mx-vertical-flow mx-section--l"
|
|
110
107
|
inert
|
|
111
108
|
aria-labelledby="unique-9"
|
|
112
109
|
role="tabpanel"
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{% set baseClass = 'mx-tabs__panel' %}
|
|
2
|
+
{% set classes = [
|
|
3
|
+
baseClass,
|
|
4
|
+
'mx-vertical-flow',
|
|
5
|
+
'mx-container',
|
|
6
|
+
'mx-section--l'
|
|
7
|
+
] %}
|
|
8
|
+
{% set attributes = (attributes ?? create_attribute()).addClass(classes) %}
|
|
9
|
+
<div{{ attributes }} id="{{ id }}" role="tabpanel" tabindex="0" aria-label="{{ title }}"{% if active %} data-active{% endif %}>
|
|
10
|
+
{{ content }}
|
|
11
|
+
</div>
|