@pnx-mixtape/mxds 0.0.5 → 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 +4 -4
- package/src/Atom/Background/__snapshots__/Backgrounds.stories.ts.snap +12 -12
- package/src/Atom/Background/_background.css +8 -8
- package/src/Atom/Background/backgrounds.twig +4 -4
- package/src/Atom/Button/Button.stories.ts +4 -3
- package/src/Atom/Button/Button.tsx +8 -8
- package/src/Atom/Button/__snapshots__/Button.stories.ts.snap +6 -6
- package/src/Atom/Button/__snapshots__/Button.stories.tsx.snap +2 -2
- package/src/Atom/Button/_buttons-styles.css +4 -4
- package/src/Atom/Button/_buttons.css +6 -6
- package/src/Atom/Button/button.twig +2 -2
- package/src/Atom/Heading/Heading.stories.ts +5 -2
- package/src/Atom/Heading/__snapshots__/Heading.stories.ts.snap +1 -1
- package/src/Atom/Heading/_headings.css +20 -20
- package/src/Atom/Heading/heading.twig +5 -2
- package/src/Atom/Icon/Icon.mdx +1 -1
- package/src/Atom/Icon/Icon.tsx +5 -5
- 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/_icon.css +17 -17
- package/src/Atom/Icon/_mixin-icon.css +1 -1
- package/src/Atom/Icon/icon.twig +2 -2
- package/src/Atom/Link/Link.stories.ts +8 -7
- package/src/Atom/Link/Link.tsx +2 -2
- package/src/Atom/Link/__snapshots__/Link.stories.ts.snap +8 -12
- package/src/Atom/Link/__snapshots__/Link.stories.tsx.snap +3 -3
- package/src/Atom/Link/_links.css +19 -9
- package/src/Atom/Link/link.twig +7 -5
- package/src/Atom/Media/Media.stories.ts +9 -9
- package/src/Atom/Media/Media.tsx +1 -1
- package/src/Atom/Media/__snapshots__/Media.stories.ts.snap +4 -4
- package/src/Atom/Media/__snapshots__/Media.stories.tsx.snap +1 -1
- package/src/Atom/Media/_media.css +12 -4
- package/src/Atom/Media/media.twig +7 -3
- package/src/Atom/Spacing/__snapshots__/Spacing.stories.ts.snap +1 -1
- package/src/Atom/{_mixins.css → Spacing/_mixins.css} +5 -5
- package/src/Atom/Spacing/_spacing.css +6 -6
- package/src/Atom/Spacing/spacing.twig +1 -1
- package/src/Atom/Table/__snapshots__/Table.stories.ts.snap +3 -3
- package/src/Atom/Table/__snapshots__/TableResponsive.stories.ts.snap +2 -2
- package/src/Atom/Table/_table.css +4 -4
- package/src/Atom/Table/table-responsive.twig +2 -2
- package/src/Atom/Table/table.twig +1 -1
- package/src/Atom/Text/__snapshots__/TextSizes.stories.ts.snap +16 -16
- package/src/Atom/Text/_text-align.css +3 -3
- package/src/Atom/Text/_text-sizes.css +29 -29
- package/src/Atom/Text/text-alignment.twig +3 -3
- package/src/Atom/Text/text-styles-example.twig +16 -16
- package/src/Atom/Video/Video.tsx +1 -1
- package/src/Atom/Video/__snapshots__/Video.stories.ts.snap +1 -1
- package/src/Atom/Video/_video.css +2 -2
- package/src/Atom/Video/video.twig +1 -4
- package/src/Atom/_animated.css +5 -5
- package/src/Atom/_flow.css +5 -9
- package/src/Atom/_generic.css +0 -13
- package/src/Atom/_print.css +1 -12
- package/src/Component/Accordion/Accordion.stories.ts +9 -7
- package/src/Component/Accordion/Accordion.tsx +11 -11
- package/src/Component/Accordion/Elements/AccordionGroup.ts +2 -2
- package/src/Component/Accordion/__snapshots__/Accordion.stories.ts.snap +25 -25
- package/src/Component/Accordion/__snapshots__/Accordion.stories.tsx.snap +4 -4
- package/src/Component/Accordion/accordion-item.twig +5 -5
- package/src/Component/Accordion/accordion.css +15 -15
- package/src/Component/Accordion/accordion.twig +7 -5
- 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 +2 -2
- package/src/Component/Callout/callout.css +1 -1
- package/src/Component/Callout/callout.twig +3 -3
- 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 +151 -77
- package/src/Component/Card/__snapshots__/Card.stories.tsx.snap +18 -18
- package/src/Component/Card/card-grid.twig +2 -2
- package/src/Component/Card/card.css +61 -46
- package/src/Component/Card/card.twig +19 -19
- 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/Elements/ClosableAlert.ts +2 -2
- package/src/Component/GlobalAlert/GlobalAlert.stories.ts +5 -6
- package/src/Component/GlobalAlert/GlobalAlert.tsx +5 -5
- package/src/Component/GlobalAlert/__snapshots__/GlobalAlert.stories.ts.snap +9 -9
- package/src/Component/GlobalAlert/__snapshots__/GlobalAlert.stories.tsx.snap +7 -7
- package/src/Component/GlobalAlert/global-alert.css +5 -5
- package/src/Component/GlobalAlert/global-alert.twig +7 -7
- package/src/Component/HeroBanner/HeroBanner.stories.ts +17 -12
- package/src/Component/HeroBanner/HeroBanner.tsx +4 -4
- package/src/Component/HeroBanner/__snapshots__/HeroBanner.stories.ts.snap +23 -23
- package/src/Component/HeroBanner/__snapshots__/HeroBanner.stories.tsx.snap +9 -9
- package/src/Component/HeroBanner/hero-banner.css +6 -6
- package/src/Component/HeroBanner/hero-banner.twig +8 -8
- 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.css +5 -5
- package/src/Component/InPageAlert/in-page-alert.twig +2 -2
- 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/LinkList.tsx +4 -4
- package/src/Component/LinkList/__snapshots__/LinkList.stories.ts.snap +4 -4
- package/src/Component/LinkList/__snapshots__/LinkList.stories.tsx.snap +8 -8
- package/src/Component/LinkList/link-list.css +8 -8
- package/src/Component/LinkList/link-list.twig +4 -4
- 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 +14 -11
- 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/Tag.tsx +1 -1
- package/src/Component/Tag/__snapshots__/Tag.stories.ts.snap +9 -9
- package/src/Component/Tag/__snapshots__/Tag.stories.tsx.snap +1 -1
- package/src/Component/Tag/tag.css +2 -2
- package/src/Component/Tag/tags.twig +3 -3
- 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 +11 -11
- package/src/Layout/Grid/__snapshots__/Grid.stories.ts.snap +4 -4
- package/src/Layout/Grid/__snapshots__/Grid.stories.tsx.snap +10 -10
- package/src/Layout/Grid/container-grid.css +1 -0
- package/src/Layout/Grid/grid-item.twig +3 -3
- package/src/Layout/Grid/grid.css +29 -29
- package/src/Layout/Grid/grid.twig +8 -5
- 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 +11 -15
- package/src/Layout/Section/SectionGrid.stories.tsx +5 -11
- package/src/Layout/Section/SectionGrid.tsx +12 -17
- 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 +8 -8
- 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.css +29 -26
- package/src/Layout/Section/section.twig +5 -5
- 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/enums.ts +21 -21
- package/src/react.ts +1 -2
- 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 -29
- package/src/Atom/NavList/nav-list.twig +0 -25
- package/src/Atom/_flow-legacy.css +0 -48
- 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,12 +1,12 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
3
|
exports[`Component/GlobalAlert Critical smoke-test 1`] = `
|
|
4
|
-
<div class="global-alert page global-alert--critical">
|
|
5
|
-
<div class="global-alert__inner"
|
|
4
|
+
<div class="mx-global-alert mx-page mx-global-alert--critical">
|
|
5
|
+
<div class="mx-global-alert__inner"
|
|
6
6
|
data-container
|
|
7
7
|
>
|
|
8
|
-
<div class="global-alert__content">
|
|
9
|
-
<h2 class=" heading--m">
|
|
8
|
+
<div class="mx-global-alert__content">
|
|
9
|
+
<h2 class=" mx-heading--m">
|
|
10
10
|
In page alert
|
|
11
11
|
</h2>
|
|
12
12
|
<p>
|
|
@@ -18,21 +18,21 @@ exports[`Component/GlobalAlert Critical smoke-test 1`] = `
|
|
|
18
18
|
`;
|
|
19
19
|
|
|
20
20
|
exports[`Component/GlobalAlert GlobalAlert smoke-test 1`] = `
|
|
21
|
-
<mx-closable-alert class="global-alert page global-alert--light"
|
|
21
|
+
<mx-closable-alert class="mx-global-alert mx-page mx-global-alert--light"
|
|
22
22
|
id="unique-0"
|
|
23
23
|
>
|
|
24
|
-
<div class="global-alert__inner"
|
|
24
|
+
<div class="mx-global-alert__inner"
|
|
25
25
|
data-container
|
|
26
26
|
>
|
|
27
|
-
<div class="global-alert__content">
|
|
28
|
-
<h2 class=" heading--m">
|
|
27
|
+
<div class="mx-global-alert__content">
|
|
28
|
+
<h2 class=" mx-heading--m">
|
|
29
29
|
In page alert
|
|
30
30
|
</h2>
|
|
31
31
|
<p>
|
|
32
32
|
Something happened that requires your attention
|
|
33
33
|
</p>
|
|
34
34
|
</div>
|
|
35
|
-
<button class="icon icon--close"
|
|
35
|
+
<button class="mx-icon mx-icon--close"
|
|
36
36
|
aria-controls="unique-0"
|
|
37
37
|
aria-label="Close GlobalAlert"
|
|
38
38
|
type="button"
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`Component/GlobalAlert Critical smoke-test 1`] = `
|
|
4
4
|
<div id=":r1:"
|
|
5
|
-
class="global-alert global-alert--critical"
|
|
5
|
+
class="mx-global-alert mx-global-alert--critical"
|
|
6
6
|
>
|
|
7
|
-
<div class="global-alert__inner">
|
|
8
|
-
<div class="global-alert__content">
|
|
7
|
+
<div class="mx-global-alert__inner">
|
|
8
|
+
<div class="mx-global-alert__content">
|
|
9
9
|
<p>
|
|
10
10
|
<b>
|
|
11
11
|
Something happened.
|
|
@@ -23,10 +23,10 @@ exports[`Component/GlobalAlert Critical smoke-test 1`] = `
|
|
|
23
23
|
|
|
24
24
|
exports[`Component/GlobalAlert GlobalAlert smoke-test 1`] = `
|
|
25
25
|
<div id=":r0:"
|
|
26
|
-
class="global-alert global-alert--light"
|
|
26
|
+
class="mx-global-alert mx-global-alert--light"
|
|
27
27
|
>
|
|
28
|
-
<div class="global-alert__inner">
|
|
29
|
-
<div class="global-alert__content">
|
|
28
|
+
<div class="mx-global-alert__inner">
|
|
29
|
+
<div class="mx-global-alert__content">
|
|
30
30
|
<p>
|
|
31
31
|
<b>
|
|
32
32
|
Something happened.
|
|
@@ -38,7 +38,7 @@ exports[`Component/GlobalAlert GlobalAlert smoke-test 1`] = `
|
|
|
38
38
|
.
|
|
39
39
|
</p>
|
|
40
40
|
</div>
|
|
41
|
-
<button class="icon icon--close"
|
|
41
|
+
<button class="mx-icon mx-icon--close"
|
|
42
42
|
aria-label="Close light message"
|
|
43
43
|
type="button"
|
|
44
44
|
>
|
|
@@ -9,17 +9,17 @@
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
@layer design-system.components {
|
|
12
|
-
.global-alert {
|
|
12
|
+
.mx-global-alert {
|
|
13
13
|
background-color: var(--background, var(--colour-primary-light));
|
|
14
14
|
color: var(--foreground, var(--colour-foreground));
|
|
15
15
|
|
|
16
|
-
& .global-alert__inner {
|
|
16
|
+
& .mx-global-alert__inner {
|
|
17
17
|
display: grid;
|
|
18
18
|
gap: var(--gap-s);
|
|
19
19
|
padding-block: var(--spacing-xxs);
|
|
20
20
|
padding-inline: var(--spacing-s);
|
|
21
21
|
|
|
22
|
-
&:has(.icon--close) {
|
|
22
|
+
&:has(.mx-icon--close) {
|
|
23
23
|
grid-template-columns: auto min-content;
|
|
24
24
|
grid-template-areas: "content close";
|
|
25
25
|
|
|
@@ -33,12 +33,12 @@
|
|
|
33
33
|
color: inherit;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
&.global-alert--critical {
|
|
36
|
+
&.mx-global-alert--critical {
|
|
37
37
|
--foreground: var(--colour-error-foreground);
|
|
38
38
|
--background: var(--colour-error-background);
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
& .icon--close {
|
|
41
|
+
& .mx-icon--close {
|
|
42
42
|
--icon-size: 1rem;
|
|
43
43
|
|
|
44
44
|
grid-area: close;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
{% set baseClass = 'global-alert' %}
|
|
1
|
+
{% set baseClass = 'mx-global-alert' %}
|
|
2
2
|
{% set classes = [
|
|
3
3
|
baseClass,
|
|
4
|
-
'page',
|
|
4
|
+
'mx-page',
|
|
5
5
|
type ? baseClass~'--'~type : null,
|
|
6
6
|
] %}
|
|
7
|
-
{% set attributes = (attributes
|
|
7
|
+
{% set attributes = (attributes ?? create_attribute()).addClass(classes) %}
|
|
8
8
|
|
|
9
9
|
{% if dismissible %}
|
|
10
10
|
<mx-closable-alert {{ attributes}}{% if id %} id="{{ id ~ type }}"{% endif %}>
|
|
11
|
-
<div class="global-alert__inner" data-container>
|
|
12
|
-
<div class="global-alert__content">
|
|
11
|
+
<div class="mx-global-alert__inner" data-container>
|
|
12
|
+
<div class="mx-global-alert__content">
|
|
13
13
|
{{ title }}
|
|
14
14
|
{{ content }}
|
|
15
15
|
{{ link }}
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
</mx-closable-alert>
|
|
19
19
|
{% else %}
|
|
20
20
|
<div {{ attributes}}{% if id %} id="{{ id ~ type }}"{% endif %}>
|
|
21
|
-
<div class="global-alert__inner" data-container>
|
|
22
|
-
<div class="global-alert__content">
|
|
21
|
+
<div class="mx-global-alert__inner" data-container>
|
|
22
|
+
<div class="mx-global-alert__content">
|
|
23
23
|
{{ title }}
|
|
24
24
|
{{ content }}
|
|
25
25
|
{{ link }}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { Meta, StoryObj } from "@storybook/html"
|
|
2
2
|
import { Page } from "../../../.storybook/decorators"
|
|
3
|
-
import Component from "./
|
|
3
|
+
import Component from "./hero-banner.twig"
|
|
4
|
+
import Heading from "../../Atom/Heading/heading.twig"
|
|
5
|
+
import Link from "../../Atom/Link/link.twig"
|
|
6
|
+
import Image from "../../Atom/Image/image.twig"
|
|
7
|
+
import LinkList from "../LinkList/link-list.twig"
|
|
4
8
|
import "./hero-banner.css"
|
|
5
9
|
import "../LinkList/link-list.css"
|
|
6
10
|
import {
|
|
@@ -13,20 +17,21 @@ const meta: Meta<HeroBannerType> = {
|
|
|
13
17
|
tags: ["autodocs", "ids-mvp"],
|
|
14
18
|
component: Component,
|
|
15
19
|
args: {
|
|
16
|
-
|
|
20
|
+
subtitle:
|
|
21
|
+
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
|
|
22
|
+
image: Image({
|
|
17
23
|
src: "https://picsum.photos/id/56/558/418?grayscale",
|
|
18
24
|
alt: "Blurry bubbles",
|
|
19
|
-
},
|
|
20
|
-
title: {
|
|
25
|
+
}),
|
|
26
|
+
title: Heading({
|
|
21
27
|
title: "Hero banner title",
|
|
22
28
|
as: HeadingTypes.ONE,
|
|
23
|
-
},
|
|
24
|
-
link: {
|
|
29
|
+
}),
|
|
30
|
+
link: Link({
|
|
25
31
|
href: "#",
|
|
26
32
|
title: "Find out more",
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
|
|
33
|
+
more: true,
|
|
34
|
+
}),
|
|
30
35
|
},
|
|
31
36
|
parameters: {
|
|
32
37
|
deepControls: { enabled: true },
|
|
@@ -52,10 +57,10 @@ type Story = StoryObj<HeroBannerType>
|
|
|
52
57
|
|
|
53
58
|
export const HeroBanner: Story = {}
|
|
54
59
|
|
|
55
|
-
export const
|
|
60
|
+
export const WithLinkList: Story = {
|
|
56
61
|
args: {
|
|
57
62
|
link: null,
|
|
58
|
-
linkList: {
|
|
63
|
+
linkList: LinkList({
|
|
59
64
|
items: [
|
|
60
65
|
{
|
|
61
66
|
title: "Link one",
|
|
@@ -70,6 +75,6 @@ export const LinkList: Story = {
|
|
|
70
75
|
href: "#",
|
|
71
76
|
},
|
|
72
77
|
],
|
|
73
|
-
},
|
|
78
|
+
}),
|
|
74
79
|
},
|
|
75
80
|
}
|
|
@@ -19,7 +19,7 @@ type HeroBannerProps = PropsWithChildren &
|
|
|
19
19
|
center?: boolean
|
|
20
20
|
headingLevel?: HeadingTypes
|
|
21
21
|
}
|
|
22
|
-
|
|
22
|
+
// @todo expand to have new features
|
|
23
23
|
const HeroBanner = ({
|
|
24
24
|
title,
|
|
25
25
|
hero = false,
|
|
@@ -32,9 +32,9 @@ const HeroBanner = ({
|
|
|
32
32
|
}: HeroBannerProps): JSX.Element => (
|
|
33
33
|
<Section sizes={SectionStyles.XL} className={className} containing>
|
|
34
34
|
<div
|
|
35
|
-
className={classNames("hero-banner", "vertical-flow", {
|
|
36
|
-
"hero-banner--hero": hero,
|
|
37
|
-
"text--center": center,
|
|
35
|
+
className={classNames("mx-hero-banner", "mx-vertical-flow", {
|
|
36
|
+
"mx-hero-banner--hero": hero,
|
|
37
|
+
"mx-text--center": center,
|
|
38
38
|
})}
|
|
39
39
|
{...props}
|
|
40
40
|
>
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
3
|
exports[`Component/HeroBanner HeroBanner smoke-test 1`] = `
|
|
4
|
-
<div class="page">
|
|
5
|
-
<div class="hero-banner page ">
|
|
6
|
-
<div class="hero-banner__inner">
|
|
7
|
-
<div class="hero-banner__content vertical-flow section--xl">
|
|
8
|
-
<h1
|
|
4
|
+
<div class="mx-page">
|
|
5
|
+
<div class="mx-hero-banner mx-page ">
|
|
6
|
+
<div class="mx-hero-banner__inner">
|
|
7
|
+
<div class="mx-hero-banner__content mx-vertical-flow mx-section--xl">
|
|
8
|
+
<h1>
|
|
9
9
|
Hero banner title
|
|
10
10
|
</h1>
|
|
11
|
-
<
|
|
11
|
+
<p class="mx-text--lede">
|
|
12
12
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
|
13
|
-
</
|
|
14
|
-
<a class="link
|
|
13
|
+
</p>
|
|
14
|
+
<a class="mx-link--more"
|
|
15
15
|
href="#"
|
|
16
16
|
>
|
|
17
17
|
<span>
|
|
@@ -19,10 +19,10 @@ exports[`Component/HeroBanner HeroBanner smoke-test 1`] = `
|
|
|
19
19
|
</span>
|
|
20
20
|
</a>
|
|
21
21
|
</div>
|
|
22
|
-
<div class="hero-banner__aside hero-banner__aside-image">
|
|
22
|
+
<div class="mx-hero-banner__aside mx-hero-banner__aside-image">
|
|
23
23
|
<picture>
|
|
24
24
|
<img src="https://picsum.photos/id/56/558/418?grayscale"
|
|
25
|
-
alt
|
|
25
|
+
alt="Blurry bubbles"
|
|
26
26
|
>
|
|
27
27
|
</picture>
|
|
28
28
|
</div>
|
|
@@ -31,37 +31,37 @@ exports[`Component/HeroBanner HeroBanner smoke-test 1`] = `
|
|
|
31
31
|
</div>
|
|
32
32
|
`;
|
|
33
33
|
|
|
34
|
-
exports[`Component/HeroBanner
|
|
35
|
-
<div class="page">
|
|
36
|
-
<div class="hero-banner page ">
|
|
37
|
-
<div class="hero-banner__inner">
|
|
38
|
-
<div class="hero-banner__content vertical-flow section--xl">
|
|
39
|
-
<h1
|
|
34
|
+
exports[`Component/HeroBanner WithLinkList smoke-test 1`] = `
|
|
35
|
+
<div class="mx-page">
|
|
36
|
+
<div class="mx-hero-banner mx-page ">
|
|
37
|
+
<div class="mx-hero-banner__inner">
|
|
38
|
+
<div class="mx-hero-banner__content mx-vertical-flow mx-section--xl">
|
|
39
|
+
<h1>
|
|
40
40
|
Hero banner title
|
|
41
41
|
</h1>
|
|
42
|
-
<
|
|
42
|
+
<p class="mx-text--lede">
|
|
43
43
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
|
44
|
-
</
|
|
44
|
+
</p>
|
|
45
45
|
</div>
|
|
46
|
-
<div class="hero-banner__aside">
|
|
47
|
-
<ul class="link-list">
|
|
46
|
+
<div class="mx-hero-banner__aside">
|
|
47
|
+
<ul class="mx-link-list">
|
|
48
48
|
<li>
|
|
49
49
|
<a href="#"
|
|
50
|
-
class="icon icon--chevron-right"
|
|
50
|
+
class="mx-icon mx-icon--chevron-right"
|
|
51
51
|
>
|
|
52
52
|
Link one
|
|
53
53
|
</a>
|
|
54
54
|
</li>
|
|
55
55
|
<li>
|
|
56
56
|
<a href="#"
|
|
57
|
-
class="icon icon--chevron-right"
|
|
57
|
+
class="mx-icon mx-icon--chevron-right"
|
|
58
58
|
>
|
|
59
59
|
Link two
|
|
60
60
|
</a>
|
|
61
61
|
</li>
|
|
62
62
|
<li>
|
|
63
63
|
<a href="#"
|
|
64
|
-
class="icon icon--chevron-right"
|
|
64
|
+
class="mx-icon mx-icon--chevron-right"
|
|
65
65
|
>
|
|
66
66
|
Link three
|
|
67
67
|
</a>
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
3
|
exports[`Component/HeroBanner Hero smoke-test 1`] = `
|
|
4
|
-
<div class="page section--xl">
|
|
5
|
-
<div class="hero-banner vertical-flow hero-banner--hero">
|
|
6
|
-
<h1 class="headline"
|
|
4
|
+
<div class="mx-page mx-section--xl">
|
|
5
|
+
<div class="mx-hero-banner mx-vertical-flow mx-hero-banner--hero">
|
|
6
|
+
<h1 class="mx-headline"
|
|
7
7
|
id="always-put-your-best-"
|
|
8
8
|
>
|
|
9
9
|
Always put your best foot forward.
|
|
10
10
|
</h1>
|
|
11
|
-
<p class="text--xl">
|
|
11
|
+
<p class="mx-text--xl">
|
|
12
12
|
Make the most of the opportunity by encouraging an action and keeping your copy clear and concise.
|
|
13
13
|
</p>
|
|
14
|
-
<button class="button button--dark"
|
|
14
|
+
<button class="mx-button mx-button--dark"
|
|
15
15
|
type="button"
|
|
16
16
|
>
|
|
17
17
|
Button
|
|
@@ -21,14 +21,14 @@ exports[`Component/HeroBanner Hero smoke-test 1`] = `
|
|
|
21
21
|
`;
|
|
22
22
|
|
|
23
23
|
exports[`Component/HeroBanner HeroBanner smoke-test 1`] = `
|
|
24
|
-
<div class="page section--xl">
|
|
25
|
-
<div class="hero-banner vertical-flow">
|
|
26
|
-
<h1 class="headline"
|
|
24
|
+
<div class="mx-page mx-section--xl">
|
|
25
|
+
<div class="mx-hero-banner mx-vertical-flow">
|
|
26
|
+
<h1 class="mx-headline"
|
|
27
27
|
id="always-put-your-best-"
|
|
28
28
|
>
|
|
29
29
|
Always put your best foot forward.
|
|
30
30
|
</h1>
|
|
31
|
-
<p class="text--xl">
|
|
31
|
+
<p class="mx-text--xl">
|
|
32
32
|
Make the most of the opportunity by encouraging an action and keeping your copy clear and concise.
|
|
33
33
|
</p>
|
|
34
34
|
</div>
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
@layer design-system.components {
|
|
6
|
-
.hero-banner {
|
|
6
|
+
.mx-hero-banner {
|
|
7
7
|
position: relative;
|
|
8
8
|
z-index: 1;
|
|
9
9
|
|
|
10
|
-
&.hero-banner--hero {
|
|
10
|
+
&.mx-hero-banner--hero {
|
|
11
11
|
min-block-size: var(--hero-height, 400px);
|
|
12
12
|
place-content: center;
|
|
13
13
|
}
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
.hero-banner__inner {
|
|
21
|
+
.mx-hero-banner__inner {
|
|
22
22
|
display: grid;
|
|
23
23
|
grid-template-areas: "content" "aside";
|
|
24
24
|
|
|
@@ -28,14 +28,14 @@
|
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
.hero-banner__content {
|
|
31
|
+
.mx-hero-banner__content {
|
|
32
32
|
align-content: center;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
.hero-banner__aside {
|
|
35
|
+
.mx-hero-banner__aside {
|
|
36
36
|
align-content: center;
|
|
37
37
|
|
|
38
|
-
&.hero-banner__aside-image {
|
|
38
|
+
&.mx-hero-banner__aside-image {
|
|
39
39
|
overflow: hidden;
|
|
40
40
|
position: relative;
|
|
41
41
|
border-radius: var(--hero-image-radius, var(--border-radius));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
{% set baseClass = 'hero-banner' %}
|
|
1
|
+
{% set baseClass = 'mx-hero-banner' %}
|
|
2
2
|
{% set background = null %}
|
|
3
3
|
{% for modifier in modifiers %}
|
|
4
4
|
{% if modifier == "dark" %}
|
|
@@ -13,28 +13,28 @@
|
|
|
13
13
|
{% endfor %}
|
|
14
14
|
{% set classes = [
|
|
15
15
|
baseClass,
|
|
16
|
-
'page',
|
|
16
|
+
'mx-page',
|
|
17
17
|
highlight ? baseClass~'--hero' : null,
|
|
18
18
|
background ? background : null,
|
|
19
19
|
] %}
|
|
20
|
-
{% set attributes = (attributes
|
|
20
|
+
{% set attributes = (attributes ?? create_attribute()).addClass(classes) %}
|
|
21
21
|
|
|
22
22
|
<div{{ attributes }}>
|
|
23
|
-
<div class="hero-banner__inner">
|
|
24
|
-
<div class="hero-banner__content vertical-flow section--xl">
|
|
23
|
+
<div class="mx-hero-banner__inner">
|
|
24
|
+
<div class="mx-hero-banner__content mx-vertical-flow mx-section--xl">
|
|
25
25
|
{{ title }}
|
|
26
26
|
{% if subtitle %}
|
|
27
|
-
<
|
|
27
|
+
<p class="mx-text--lede">{{ subtitle }}</p>
|
|
28
28
|
{% endif %}
|
|
29
29
|
{{ content }}
|
|
30
30
|
{{ link }}
|
|
31
31
|
</div>
|
|
32
32
|
{% if linkList %}
|
|
33
|
-
<div class="hero-banner__aside">
|
|
33
|
+
<div class="mx-hero-banner__aside">
|
|
34
34
|
{{ linkList }}
|
|
35
35
|
</div>
|
|
36
36
|
{% elseif image %}
|
|
37
|
-
<div class="hero-banner__aside hero-banner__aside-image">
|
|
37
|
+
<div class="mx-hero-banner__aside mx-hero-banner__aside-image">
|
|
38
38
|
{{ image }}
|
|
39
39
|
</div>
|
|
40
40
|
{% endif %}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Meta, StoryObj } from "@storybook/html"
|
|
2
|
-
import Component from "./
|
|
2
|
+
import Component from "./in-page-alert.twig"
|
|
3
|
+
import Link from "../../Atom/Link/link.twig"
|
|
3
4
|
import "./in-page-alert.css"
|
|
4
5
|
import {
|
|
5
6
|
HeadingTypes,
|
|
@@ -20,10 +21,10 @@ const meta: Meta<InPageAlertType> = {
|
|
|
20
21
|
},
|
|
21
22
|
args: {
|
|
22
23
|
content: "Something happened that requires your attention",
|
|
23
|
-
link: {
|
|
24
|
+
link: Link({
|
|
24
25
|
title: "Click here",
|
|
25
26
|
href: "#",
|
|
26
|
-
},
|
|
27
|
+
}),
|
|
27
28
|
},
|
|
28
29
|
}
|
|
29
30
|
|
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
color: var(--foreground, var(--colour-foreground));
|
|
20
20
|
border-radius: var(--border-radius);
|
|
21
21
|
|
|
22
|
-
&:has(.icon--close) {
|
|
22
|
+
&:has(.mx-icon--close) {
|
|
23
23
|
grid-template-columns: auto min-content;
|
|
24
24
|
grid-template-areas: "content close";
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
&:is(.icon, :has(.icon--close)) {
|
|
27
|
+
&:is(.mx-icon, :has(.mx-icon--close)) {
|
|
28
28
|
--icon-size: 1.25rem;
|
|
29
29
|
|
|
30
30
|
& .message__content {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
&.icon {
|
|
35
|
+
&.mx-icon {
|
|
36
36
|
grid-template-columns: min-content auto;
|
|
37
37
|
grid-template-areas: "icon content";
|
|
38
38
|
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
background-size: contain;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
&:has(.icon--close) {
|
|
44
|
+
&:has(.mx-icon--close) {
|
|
45
45
|
grid-template-columns: min-content auto min-content;
|
|
46
46
|
grid-template-areas: "icon content close";
|
|
47
47
|
}
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
--background: var(--colour-warning-background);
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
& .icon--close {
|
|
75
|
+
& .mx-icon--close {
|
|
76
76
|
--icon-size: 1rem;
|
|
77
77
|
|
|
78
78
|
grid-area: close;
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
{% set classes = [
|
|
3
3
|
baseClass,
|
|
4
4
|
type ? baseClass~'--'~type : null,
|
|
5
|
-
type ? 'icon icon--'~type : null,
|
|
5
|
+
type ? 'mx-icon mx-icon--'~type : null,
|
|
6
6
|
] %}
|
|
7
|
-
{% set attributes = (attributes
|
|
7
|
+
{% set attributes = (attributes ?? create_attribute()).addClass(classes) %}
|
|
8
8
|
|
|
9
9
|
<div {{ attributes }}>
|
|
10
10
|
<div class="message__content">
|
|
@@ -100,7 +100,7 @@ export default class InPageNavigation extends HTMLElement {
|
|
|
100
100
|
const targetID: string = id || this.generatedId(heading)
|
|
101
101
|
if (!id) heading.id = targetID
|
|
102
102
|
const item: Element = createElement(
|
|
103
|
-
`<a href="#${targetID}" class="icon icon--chevron-right">${linkText}</a>`,
|
|
103
|
+
`<a href="#${targetID}" class="mx-icon mx-icon--chevron-right">${linkText}</a>`,
|
|
104
104
|
)
|
|
105
105
|
|
|
106
106
|
return item as HTMLAnchorElement
|
|
@@ -109,7 +109,7 @@ export default class InPageNavigation extends HTMLElement {
|
|
|
109
109
|
generateListItem(heading: HTMLHeadingElement): HTMLLIElement {
|
|
110
110
|
const { tagName } = heading
|
|
111
111
|
const item: Element = createElement(
|
|
112
|
-
`<li class="in-page-navigation__level--${tagName.toLowerCase()}"></li>`,
|
|
112
|
+
`<li class="mx-in-page-navigation__level--${tagName.toLowerCase()}"></li>`,
|
|
113
113
|
)
|
|
114
114
|
|
|
115
115
|
return item as HTMLLIElement
|
|
@@ -1,16 +1,39 @@
|
|
|
1
1
|
import { Meta, StoryObj } from "@storybook/html"
|
|
2
|
-
import Component from "./in-page-navigation.twig"
|
|
2
|
+
import Component from "./twig/in-page-navigation-story.twig"
|
|
3
|
+
import Heading from "../../Atom/Heading/heading.twig"
|
|
3
4
|
import "./in-page-navigation.css"
|
|
4
5
|
import "./Elements/InPageNavigation"
|
|
6
|
+
import {
|
|
7
|
+
HeadingTypes,
|
|
8
|
+
InPageNavigation as InPageNavigationType,
|
|
9
|
+
} from "@pnx-mixtape/ids-shape"
|
|
5
10
|
|
|
6
|
-
const meta: Meta<
|
|
7
|
-
tags: ["autodocs"],
|
|
11
|
+
const meta: Meta<InPageNavigationType> = {
|
|
12
|
+
tags: ["autodocs", "ids-mvp"],
|
|
8
13
|
component: Component,
|
|
14
|
+
args: {
|
|
15
|
+
title: Heading({
|
|
16
|
+
title: "On this page",
|
|
17
|
+
as: HeadingTypes.TWO,
|
|
18
|
+
modifiers: [HeadingTypes.FOUR],
|
|
19
|
+
}),
|
|
20
|
+
},
|
|
21
|
+
parameters: {
|
|
22
|
+
deepControls: { enabled: true },
|
|
23
|
+
},
|
|
24
|
+
argTypes: {
|
|
25
|
+
levels: { options: Object.values(HeadingTypes), control: "multi-select" },
|
|
26
|
+
// @ts-expect-error The controls follow the shape
|
|
27
|
+
"title.title": { control: "text" },
|
|
28
|
+
"title.as": { options: Object.values(HeadingTypes), control: "select" },
|
|
29
|
+
"title.modifiers": {
|
|
30
|
+
options: Object.values(HeadingTypes),
|
|
31
|
+
control: "multi-select",
|
|
32
|
+
},
|
|
33
|
+
},
|
|
9
34
|
}
|
|
10
35
|
|
|
11
36
|
export default meta
|
|
12
|
-
type Story = StoryObj<
|
|
37
|
+
type Story = StoryObj<InPageNavigationType>
|
|
13
38
|
|
|
14
|
-
export const InPageNavigation: Story = {
|
|
15
|
-
args: {},
|
|
16
|
-
}
|
|
39
|
+
export const InPageNavigation: Story = {}
|
|
@@ -12,20 +12,20 @@ type InPageNavigationProps = {
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
const InPageNavigation = ({
|
|
15
|
-
title = "
|
|
15
|
+
title = "On this page",
|
|
16
16
|
containerRef,
|
|
17
17
|
levels,
|
|
18
18
|
}: InPageNavigationProps): JSX.Element => {
|
|
19
19
|
const { headings } = useInPageNavigation({ ref: containerRef, levels })
|
|
20
20
|
return (
|
|
21
|
-
<nav className={"in-page-navigation nav nav--list"}>
|
|
21
|
+
<nav className={"mx-in-page-navigation mx-nav mx-nav--list"}>
|
|
22
22
|
<Heading as={HeadingTypes.TWO} modifier={HeadingStyles.EMBELLISHED}>
|
|
23
23
|
{title}
|
|
24
24
|
</Heading>
|
|
25
25
|
<ul>
|
|
26
26
|
{headings.map(({ level, id, text }) => (
|
|
27
|
-
<li className={`in-page-navigation__level--${level}`} key={id}>
|
|
28
|
-
<Link to={`#${id}`} className="icon icon--chevron-right">
|
|
27
|
+
<li className={`mx-in-page-navigation__level--${level}`} key={id}>
|
|
28
|
+
<Link to={`#${id}`} className="mx-icon mx-icon--chevron-right">
|
|
29
29
|
{text}
|
|
30
30
|
</Link>
|
|
31
31
|
</li>
|