@pnx-mixtape/mxds 0.0.21 → 0.0.23
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/accordion.entry.js +32 -43
- package/dist/build/accordion.entry.js.map +1 -1
- package/dist/build/base.css +19 -39
- package/dist/build/button.css +7 -8
- package/dist/build/chunks/{Accordion-O-huO4At.js → Accordion-D1HQ0FDq.js} +23 -21
- package/dist/build/chunks/{Accordion-O-huO4At.js.map → Accordion-D1HQ0FDq.js.map} +1 -1
- package/dist/build/chunks/disclosure-widget-CdjCdx7t.js +129 -0
- package/dist/build/chunks/disclosure-widget-CdjCdx7t.js.map +1 -0
- package/dist/build/chunks/drop-menu.entry-fzV-_VFl.js +70 -0
- package/dist/build/chunks/drop-menu.entry-fzV-_VFl.js.map +1 -0
- package/dist/build/chunks/{polyfills-C-B7iqDG.js → polyfills-DnrsypYs.js} +35 -26
- package/dist/build/chunks/polyfills-DnrsypYs.js.map +1 -0
- package/dist/build/chunks/popover.entry-BQvyR0d5.js +38 -0
- package/dist/build/chunks/popover.entry-BQvyR0d5.js.map +1 -0
- package/dist/build/chunks/{utilities-DXELy_An.js → utilities-Ci7wwNeg.js} +9 -106
- package/dist/build/chunks/utilities-Ci7wwNeg.js.map +1 -0
- package/dist/build/constants.css +10 -31
- package/dist/build/dialog.entry.js +23 -31
- package/dist/build/dialog.entry.js.map +1 -1
- package/dist/build/drop-menu.entry.js +1 -1
- package/dist/build/drupal.css +5 -9
- package/dist/build/filters.entry.js +54 -50
- package/dist/build/filters.entry.js.map +1 -1
- package/dist/build/form.css +12 -26
- package/dist/build/global-alert.entry.js +26 -19
- package/dist/build/global-alert.entry.js.map +1 -1
- package/dist/build/grid.css +3 -9
- package/dist/build/header.css +5 -3
- package/dist/build/header.entry.js +93 -88
- package/dist/build/header.entry.js.map +1 -1
- package/dist/build/icon.css +3 -3
- package/dist/build/in-page-navigation.entry.js +16 -12
- package/dist/build/in-page-navigation.entry.js.map +1 -1
- package/dist/build/navigation.css +21 -56
- package/dist/build/navigation.entry.js +148 -50
- package/dist/build/navigation.entry.js.map +1 -1
- package/dist/build/page.css +1 -1
- package/dist/build/popover.css +119 -0
- package/dist/build/popover.entry.js +2 -0
- package/dist/build/popover.entry.js.map +1 -0
- package/dist/build/section.css +1 -1
- package/dist/build/sticky.entry.js +11 -12
- package/dist/build/sticky.entry.js.map +1 -1
- package/dist/build/tabs.entry.js +108 -91
- package/dist/build/tabs.entry.js.map +1 -1
- package/dist/build/utility-list.css +43 -0
- package/dist/build/utility-list.entry.js +80 -0
- package/dist/build/utility-list.entry.js.map +1 -0
- package/package.json +9 -10
- package/src/Atom/{Base.mdx → Atom.mdx} +1 -1
- package/src/Atom/Background/Backgrounds.stories.ts +21 -4
- package/src/Atom/Background/__snapshots__/Backgrounds.stories.ts.snap +1 -1
- package/src/Atom/Background/_background.css +1 -2
- package/src/Atom/Blockquote/_blockquote.css +1 -2
- package/src/Atom/Button/Button.stories.ts +128 -19
- package/src/Atom/Button/__snapshots__/Button.stories.ts.snap +75 -11
- package/src/Atom/Button/__snapshots__/Button.stories.tsx.snap +1 -1
- package/src/Atom/Button/_buttons.css +5 -5
- package/src/Atom/DefinitionList/DefinitionList.stories.ts +20 -3
- package/src/Atom/DefinitionList/DefinitionList.stories.tsx +3 -9
- package/src/Atom/DefinitionList/DefinitionList.tsx +3 -4
- package/src/Atom/DefinitionList/__snapshots__/DefinitionList.stories.ts.snap +1 -1
- package/src/Atom/DefinitionList/__snapshots__/DefinitionList.stories.tsx.snap +1 -1
- package/src/Atom/Heading/Heading.stories.ts +49 -7
- package/src/Atom/Heading/Heading.tsx +1 -6
- package/src/Atom/Heading/__snapshots__/Heading.stories.ts.snap +9 -1
- package/src/Atom/Heading/__snapshots__/Heading.stories.tsx.snap +1 -1
- package/src/Atom/Heading/_headings.css +1 -2
- package/src/Atom/Icon/Icon.mdx +5 -1
- package/src/Atom/Icon/Icon.stories.ts +76 -6
- package/src/Atom/Icon/Icon.tsx +1 -8
- package/src/Atom/Icon/__snapshots__/Icon.stories.ts.snap +18 -4
- package/src/Atom/Icon/__snapshots__/Icon.stories.tsx.snap +1 -1
- package/src/Atom/Icon/_icon.css +1 -1
- package/src/Atom/Image/Image.stories.ts +4 -3
- package/src/Atom/Image/__snapshots__/Image.stories.ts.snap +1 -1
- package/src/Atom/Link/Link.stories.ts +74 -7
- package/src/Atom/Link/__snapshots__/Link.stories.ts.snap +4 -4
- package/src/Atom/Link/__snapshots__/Link.stories.tsx.snap +1 -1
- package/src/Atom/Media/Media.stories.ts +34 -5
- package/src/Atom/Media/Media.tsx +1 -6
- package/src/Atom/Media/__snapshots__/Media.stories.ts.snap +2 -2
- package/src/Atom/Media/__snapshots__/Media.stories.tsx.snap +1 -1
- package/src/Atom/Media/_media.css +2 -10
- package/src/Atom/Spacing/Spacing.stories.ts +45 -31
- package/src/Atom/Spacing/__snapshots__/Spacing.stories.ts.snap +5 -4
- package/src/Atom/Spacing/spacing.twig +5 -2
- package/src/Atom/Table/__snapshots__/Table.stories.ts.snap +1 -1
- package/src/Atom/Table/__snapshots__/TableResponsive.stories.ts.snap +1 -1
- package/src/Atom/Table/_table.css +1 -2
- package/src/Atom/Text/Text.stories.ts +62 -0
- package/src/Atom/Text/__snapshots__/{TextSizes.stories.ts.snap → Text.stories.ts.snap} +14 -27
- package/src/Atom/Text/__snapshots__/Text.stories.tsx.snap +1 -1
- package/src/Atom/Text/_text-sizes.css +2 -4
- package/src/Atom/Text/text-style.twig +11 -1
- package/src/Atom/Text/text-styles-example.twig +2 -16
- package/src/Atom/Video/Video.stories.ts +6 -4
- package/src/Atom/Video/Video.tsx +1 -5
- package/src/Atom/Video/__snapshots__/Video.stories.ts.snap +1 -1
- package/src/Atom/_generic.css +4 -4
- package/src/Atom/_hr.css +1 -2
- package/src/Component/Accordion/Accordion.stories.ts +26 -8
- package/src/Component/Accordion/Accordion.stories.tsx +8 -10
- package/src/Component/Accordion/Accordion.tsx +2 -13
- package/src/Component/Accordion/AccordionItem.stories.ts +90 -0
- package/src/Component/Accordion/Components/AccordionContent.tsx +1 -5
- package/src/Component/Accordion/Components/AccordionTitle.tsx +1 -4
- package/src/Component/Accordion/Elements/Accordion.ts +1 -1
- package/src/Component/Accordion/Elements/AccordionDiv.ts +4 -11
- package/src/Component/Accordion/Elements/AccordionGroup.ts +10 -24
- package/src/Component/Accordion/Elements/AccordionMobile.ts +4 -4
- package/src/Component/Accordion/__snapshots__/Accordion.stories.ts.snap +17 -6
- package/src/Component/Accordion/__snapshots__/Accordion.stories.tsx.snap +1 -1
- package/src/Component/Accordion/__snapshots__/AccordionItem.stories.ts.snap +90 -0
- package/src/Component/Accordion/accordion.css +7 -5
- package/src/Component/Accordion/twig/accordion-div.twig +13 -11
- package/src/Component/Accordion/twig/accordion-mobile.twig +13 -11
- package/src/Component/Breadcrumb/Breadcrumb.stories.ts +14 -0
- package/src/Component/Breadcrumb/Breadcrumb.tsx +2 -12
- package/src/Component/Breadcrumb/__snapshots__/Breadcrumb.stories.ts.snap +1 -1
- package/src/Component/Breadcrumb/__snapshots__/Breadcrumb.stories.tsx.snap +1 -1
- package/src/Component/Breadcrumb/breadcrumb.css +1 -4
- package/src/Component/Callout/Callout.stories.ts +20 -0
- package/src/Component/Callout/__snapshots__/Callout.stories.ts.snap +1 -1
- package/src/Component/Callout/callout.css +1 -2
- package/src/Component/Card/Card.stories.ts +129 -14
- package/src/Component/Card/Card.stories.tsx +2 -2
- package/src/Component/Card/Components/CardContent.tsx +1 -5
- package/src/Component/Card/__snapshots__/Card.stories.ts.snap +24 -24
- package/src/Component/Card/__snapshots__/Card.stories.tsx.snap +1 -1
- package/src/Component/Card/card.css +2 -6
- package/src/Component/Card/card.twig +1 -1
- package/src/Component/Carousel/Carousel.stories.ts +61 -8
- package/src/Component/Carousel/Elements/Carousel.ts +10 -19
- package/src/Component/Carousel/__snapshots__/Carousel.stories.ts.snap +321 -35
- package/src/Component/Carousel/carousel.css +1 -2
- package/src/Component/ContentBlock/Components/ContentBlockContent.tsx +1 -5
- package/src/Component/ContentBlock/Components/ContentBlockMedia.tsx +1 -4
- package/src/Component/ContentBlock/ContentBlock.stories.ts +63 -13
- package/src/Component/ContentBlock/ContentBlock.stories.tsx +2 -2
- package/src/Component/ContentBlock/ContentBlock.tsx +1 -5
- package/src/Component/ContentBlock/__snapshots__/ContentBlock.stories.ts.snap +11 -11
- package/src/Component/ContentBlock/__snapshots__/ContentBlock.stories.tsx.snap +1 -1
- package/src/Component/Dialog/Dialog.stories.ts +78 -21
- package/src/Component/Dialog/Dialog.stories.tsx +2 -3
- package/src/Component/Dialog/Elements/Dialog.ts +7 -16
- package/src/Component/Dialog/__snapshots__/Dialog.stories.ts.snap +8 -11
- package/src/Component/Dialog/__snapshots__/Dialog.stories.tsx.snap +1 -1
- package/src/Component/Dialog/dialog.css +1 -2
- package/src/Component/Dialog/dialog.twig +1 -1
- package/src/Component/DropMenu/Components/DropMenuContext.tsx +4 -12
- package/src/Component/DropMenu/DropMenu.stories.ts +60 -1
- package/src/Component/DropMenu/DropMenu.tsx +2 -7
- package/src/Component/DropMenu/Elements/DropMenu.ts +21 -91
- package/src/Component/DropMenu/__snapshots__/DropMenu.stories.ts.snap +53 -11
- package/src/Component/DropMenu/__snapshots__/DropMenu.stories.tsx.snap +1 -1
- package/src/Component/DropMenu/drop-menu.css +13 -41
- package/src/Component/DropMenu/drop-menu.twig +8 -6
- package/src/Component/Filters/Elements/Filters.ts +7 -11
- package/src/Component/Filters/FilterItem.stories.ts +180 -0
- package/src/Component/Filters/Filters.stories.ts +83 -8
- package/src/Component/Filters/__snapshots__/FilterItem.stories.ts.snap +135 -0
- package/src/Component/Filters/__snapshots__/Filters.stories.ts.snap +43 -41
- package/src/Component/Filters/filter-item.twig +1 -1
- package/src/Component/Filters/filters.css +33 -17
- package/src/Component/GlobalAlert/Elements/ClosableAlert.ts +8 -7
- package/src/Component/GlobalAlert/GlobalAlert.stories.ts +60 -12
- package/src/Component/GlobalAlert/GlobalAlert.stories.tsx +1 -2
- package/src/Component/GlobalAlert/__snapshots__/GlobalAlert.stories.ts.snap +8 -6
- package/src/Component/GlobalAlert/__snapshots__/GlobalAlert.stories.tsx.snap +3 -3
- package/src/Component/HeroBanner/HeroBanner.stories.ts +84 -7
- package/src/Component/HeroBanner/HeroBanner.stories.tsx +4 -4
- package/src/Component/HeroBanner/__snapshots__/HeroBanner.stories.ts.snap +91 -99
- package/src/Component/HeroBanner/__snapshots__/HeroBanner.stories.tsx.snap +1 -1
- package/src/Component/HeroSearch/HeroSearch.stories.ts +23 -4
- package/src/Component/HeroSearch/HeroSearch.stories.tsx +4 -4
- package/src/Component/HeroSearch/__snapshots__/HeroSearch.stories.ts.snap +10 -10
- package/src/Component/HeroSearch/__snapshots__/HeroSearch.stories.tsx.snap +1 -1
- package/src/Component/InPageAlert/InPageAlert.stories.ts +76 -8
- package/src/Component/InPageAlert/InPageAlert.stories.tsx +1 -2
- package/src/Component/InPageAlert/InPageAlert.tsx +1 -4
- package/src/Component/InPageAlert/__snapshots__/InPageAlert.stories.ts.snap +80 -2
- package/src/Component/InPageAlert/__snapshots__/InPageAlert.stories.tsx.snap +1 -1
- package/src/Component/InPageNavigation/Elements/InPageNavigation.ts +7 -9
- package/src/Component/InPageNavigation/Hooks/useInPageNavigation.ts +3 -5
- package/src/Component/InPageNavigation/InPageNavigation.stories.ts +44 -9
- package/src/Component/InPageNavigation/InPageNavigation.stories.tsx +32 -40
- package/src/Component/InPageNavigation/__snapshots__/InPageNavigation.stories.ts.snap +152 -5
- package/src/Component/InPageNavigation/__snapshots__/InPageNavigation.stories.tsx.snap +1 -1
- package/src/Component/LinkList/LinkList.stories.ts +23 -0
- package/src/Component/LinkList/__snapshots__/LinkList.stories.ts.snap +8 -8
- package/src/Component/LinkList/__snapshots__/LinkList.stories.tsx.snap +1 -1
- package/src/Component/LinkList/link-list.css +1 -2
- package/src/Component/ListItem/Components/ListItemContent.tsx +1 -5
- package/src/Component/ListItem/Components/ListItemMedia.tsx +1 -4
- package/src/Component/ListItem/ListItem.stories.ts +91 -11
- package/src/Component/ListItem/ListItem.stories.tsx +6 -7
- package/src/Component/ListItem/__snapshots__/ListItem.stories.ts.snap +1 -1
- package/src/Component/ListItem/__snapshots__/ListItem.stories.tsx.snap +1 -1
- package/src/Component/ListItem/list-item.css +1 -2
- package/src/Component/Navigation/Components/DropdownLevel.tsx +5 -13
- package/src/Component/Navigation/Elements/Navigation.ts +6 -13
- package/src/Component/Navigation/Navigation.stories.ts +48 -0
- package/src/Component/Navigation/__snapshots__/Dropdown.stories.tsx.snap +1 -1
- package/src/Component/Navigation/__snapshots__/Navigation.stories.ts.snap +1 -1
- package/src/Component/Navigation/__snapshots__/Navigation.stories.tsx.snap +1 -1
- package/src/Component/Navigation/_navigation-collapsible.css +2 -4
- package/src/Component/Navigation/_navigation-dropdown.css +10 -32
- package/src/Component/Navigation/_navigation-mega.css +1 -4
- package/src/Component/Navigation/_navigation.css +1 -4
- package/src/Component/Pagination/Components/PaginationContext.tsx +5 -19
- package/src/Component/Pagination/Components/PaginationItem.tsx +1 -5
- package/src/Component/Pagination/Pagination.stories.ts +28 -0
- package/src/Component/Pagination/Pagination.tsx +3 -11
- package/src/Component/Pagination/__snapshots__/Pagination.stories.ts.snap +3 -3
- package/src/Component/Pagination/__snapshots__/Pagination.stories.tsx.snap +1 -1
- package/src/Component/Pagination/pagination.css +1 -4
- package/src/Component/Popover/Elements/Popover.ts +55 -0
- package/src/Component/Popover/Popover.stories.ts +259 -0
- package/src/Component/Popover/__snapshots__/Popover.stories.ts.snap +508 -0
- package/src/Component/{DropMenu → Popover}/polyfills.js +6 -4
- package/src/Component/Popover/popover.css +113 -0
- package/src/Component/Popover/popover.entry.js +1 -0
- package/src/Component/Popover/popover.twig +27 -0
- package/src/Component/ResultsBar/Components/ResultsBarInfo.tsx +2 -7
- package/src/Component/ResultsBar/Components/ResultsBarSort.tsx +1 -6
- package/src/Component/ResultsBar/ResultsBar.stories.ts +34 -4
- package/src/Component/ResultsBar/__snapshots__/ResultsBar.stories.ts.snap +3 -3
- package/src/Component/ResultsBar/__snapshots__/ResultsBar.stories.tsx.snap +1 -1
- package/src/Component/SideNavigation/SideNavigation.stories.ts +40 -0
- package/src/Component/SideNavigation/__snapshots__/SideNavigation.stories.ts.snap +1 -1
- package/src/Component/SideNavigation/side-navigation.css +3 -6
- package/src/Component/SocialLinks/SocialLinks.stories.ts +20 -0
- package/src/Component/SocialLinks/__snapshots__/SocialLinks.stories.ts.snap +5 -5
- package/src/Component/SocialShare/SocialShare.stories.ts +37 -0
- package/src/Component/SocialShare/SocialShare.tsx +2 -4
- package/src/Component/SocialShare/__snapshots__/SocialShare.stories.ts.snap +40 -0
- package/src/Component/SocialShare/__snapshots__/SocialShare.stories.tsx.snap +1 -1
- package/src/Component/SocialShare/social-share.twig +34 -0
- package/src/Component/Steps/StepItem.stories.ts +48 -0
- package/src/Component/Steps/Steps.stories.ts +82 -13
- package/src/Component/Steps/__snapshots__/StepItem.stories.ts.snap +31 -0
- package/src/Component/Steps/__snapshots__/Steps.stories.ts.snap +109 -28
- package/src/Component/Steps/step-item.twig +1 -1
- package/src/Component/Steps/steps.css +4 -11
- package/src/Component/Sticky/Elements/Sticky.ts +3 -8
- package/src/Component/Sticky/Sticky.stories.ts +35 -3
- package/src/Component/Sticky/__snapshots__/Sticky.stories.ts.snap +1 -1
- package/src/Component/Sticky/__snapshots__/Sticky.stories.tsx.snap +1 -1
- package/src/Component/Sticky/sticky.twig +1 -1
- package/src/Component/Tabs/Components/Tab.tsx +2 -8
- package/src/Component/Tabs/Components/TabPanel.tsx +1 -5
- package/src/Component/Tabs/Elements/Tabs.ts +21 -31
- package/src/Component/Tabs/TabItem.stories.ts +52 -0
- package/src/Component/Tabs/Tabs.stories.ts +51 -8
- package/src/Component/Tabs/Tabs.tsx +6 -22
- package/src/Component/Tabs/__snapshots__/TabItem.stories.ts.snap +12 -0
- package/src/Component/Tabs/__snapshots__/Tabs.stories.ts.snap +127 -11
- package/src/Component/Tabs/__snapshots__/Tabs.stories.tsx.snap +1 -1
- package/src/Component/Tabs/tab-item.twig +1 -2
- package/src/Component/Tabs/tabs.css +56 -59
- package/src/Component/Tag/Tag.stories.ts +30 -0
- package/src/Component/Tag/Tag.tsx +1 -5
- package/src/Component/Tag/__snapshots__/Tag.stories.ts.snap +1 -1
- package/src/Component/Tag/__snapshots__/Tag.stories.tsx.snap +1 -1
- package/src/Component/Tag/tag.css +1 -4
- package/src/Component/UtilityList/Elements/UtilityList.ts +110 -0
- package/src/Component/UtilityList/UtilityList.stories.ts +72 -0
- package/src/Component/UtilityList/__snapshots__/UtilityList.stories.ts.snap +274 -0
- package/src/Component/UtilityList/utility-list.css +40 -0
- package/src/Component/UtilityList/utility-list.entry.js +1 -0
- package/src/Component/UtilityList/utility-list.twig +66 -0
- package/src/Form/Checkbox/FormCheckbox.stories.tsx +1 -3
- package/src/Form/Checkbox/FormCheckbox.tsx +4 -25
- package/src/Form/Checkbox/__snapshots__/Checkbox.stories.ts.snap +3 -3
- package/src/Form/Description/Description.stories.ts +1 -2
- package/src/Form/Description/FormStatus.stories.ts +1 -4
- package/src/Form/Description/__snapshots__/Description.stories.ts.snap +1 -1
- package/src/Form/Description/__snapshots__/FormDescription.stories.tsx.snap +1 -1
- package/src/Form/Description/__snapshots__/FormStatus.stories.ts.snap +3 -3
- package/src/Form/Form/Form.tsx +1 -3
- package/src/Form/Form/__snapshots__/Form.stories.tsx.snap +1 -1
- package/src/Form/Form/__snapshots__/FormTitle.stories.tsx.snap +1 -1
- package/src/Form/FormItem/FormItem.stories.ts +3 -9
- package/src/Form/FormItem/__snapshots__/FormItem.stories.ts.snap +18 -18
- package/src/Form/FormItem/__snapshots__/FormItem.stories.tsx.snap +1 -1
- package/src/Form/Label/FormLabel.tsx +1 -5
- package/src/Form/Label/__snapshots__/FormLabel.stories.tsx.snap +1 -1
- package/src/Form/Label/__snapshots__/Label.stories.ts.snap +3 -3
- package/src/Form/Radio/FormRadio.stories.tsx +1 -3
- package/src/Form/Radio/FormRadio.tsx +4 -25
- package/src/Form/Radio/__snapshots__/Radio.stories.ts.snap +9 -9
- package/src/Form/Search/__snapshots__/Search.stories.ts.snap +1 -1
- package/src/Form/Select/FormSelect.tsx +3 -9
- package/src/Form/Select/__snapshots__/FormSelect.stories.tsx.snap +1 -1
- package/src/Form/Select/__snapshots__/Select.stories.ts.snap +2 -2
- package/src/Form/TextInput/FormText.tsx +3 -9
- package/src/Form/TextInput/TextInput.stories.ts +1 -4
- package/src/Form/TextInput/__snapshots__/FormText.stories.tsx.snap +1 -1
- package/src/Form/TextInput/__snapshots__/InputDivider.stories.ts.snap +1 -1
- package/src/Form/TextInput/__snapshots__/TextInput.stories.ts.snap +3 -3
- package/src/Form/Textarea/FormTextarea.tsx +3 -9
- package/src/Form/Textarea/__snapshots__/FormTextarea.stories.tsx.snap +1 -1
- package/src/Form/Textarea/__snapshots__/Textarea.stories.ts.snap +2 -2
- package/src/Form/form.css +6 -14
- package/src/Introduction.mdx +1 -2
- package/src/Layout/Footer/Footer.stories.ts +1 -5
- package/src/Layout/Footer/Footer.stories.tsx +2 -3
- package/src/Layout/Footer/Footer.tsx +3 -12
- package/src/Layout/Footer/__snapshots__/Footer.stories.ts.snap +4 -4
- package/src/Layout/Footer/__snapshots__/Footer.stories.tsx.snap +1 -1
- package/src/Layout/Grid/Grid.stories.ts +40 -8
- package/src/Layout/Grid/Grid.tsx +1 -2
- package/src/Layout/Grid/GridItem.stories.ts +63 -0
- package/src/Layout/Grid/__snapshots__/Grid.stories.ts.snap +29 -4
- package/src/Layout/Grid/__snapshots__/Grid.stories.tsx.snap +1 -1
- package/src/Layout/Grid/__snapshots__/GridItem.stories.ts.snap +19 -0
- package/src/Layout/Grid/grid-item.twig +3 -9
- package/src/Layout/Grid/grid.css +1 -4
- package/src/Layout/Header/Elements/GlobalToggle.ts +9 -29
- package/src/Layout/Header/__snapshots__/Header.stories.ts.snap +25 -45
- package/src/Layout/Header/__snapshots__/Header.stories.tsx.snap +3 -3
- package/src/Layout/Header/_toggles.css +2 -2
- package/src/Layout/Header/header.twig +1 -1
- package/src/Layout/Masthead/Masthead.stories.ts +1 -4
- package/src/Layout/Masthead/__snapshots__/Masthead.stories.ts.snap +3 -3
- package/src/Layout/Page/Page.stories.tsx +2 -2
- package/src/Layout/Page/__snapshots__/Page.stories.tsx.snap +3 -3
- package/src/Layout/Page/page.css +2 -10
- package/src/Layout/Section/Background.stories.ts +14 -39
- package/src/Layout/Section/Breakouts.stories.ts +3 -0
- package/src/Layout/Section/Flow.stories.ts +3 -0
- package/src/Layout/Section/Section.stories.ts +93 -11
- package/src/Layout/Section/Section.tsx +3 -13
- package/src/Layout/Section/SectionGrid.tsx +2 -9
- package/src/Layout/Section/__snapshots__/Background.stories.ts.snap +4 -4
- package/src/Layout/Section/__snapshots__/Breakouts.stories.ts.snap +1 -1
- package/src/Layout/Section/__snapshots__/Flow.stories.ts.snap +1 -1
- package/src/Layout/Section/__snapshots__/Section.stories.ts.snap +93 -3
- package/src/Layout/Section/__snapshots__/Section.stories.tsx.snap +1 -1
- package/src/Layout/Section/__snapshots__/SectionGrid.stories.tsx.snap +1 -1
- package/src/Layout/Section/section.css +2 -5
- package/src/Layout/Section/section.twig +1 -3
- package/src/Layout/Sidebar/Sidebar.stories.ts +46 -4
- package/src/Layout/Sidebar/Sidebar.tsx +1 -3
- package/src/Layout/Sidebar/__snapshots__/Sidebar.stories.ts.snap +4 -4
- package/src/Layout/Sidebar/__snapshots__/Sidebar.stories.tsx.snap +1 -1
- package/src/Utility/Context/ImageComponent.tsx +4 -8
- package/src/Utility/Context/LinkComponent.tsx +1 -5
- package/src/Utility/Drupal/drupal.css +2 -4
- package/src/Utility/Elements/breakpoint-loader.ts +4 -10
- package/src/Utility/Elements/cookie-compliance.ts +2 -8
- package/src/Utility/Elements/disclosure-widget.ts +11 -18
- package/src/Utility/Elements/io-loader.ts +4 -6
- package/src/Utility/Elements/keyboard.ts +4 -14
- package/src/Utility/Hooks/useLocalStorage.ts +5 -18
- package/src/Utility/Hooks/useMediaQuery.ts +1 -4
- package/src/Utility/Hooks/useToggle.ts +1 -3
- package/src/Utility/global.d.ts +1 -5
- package/src/Utility/utilities.ts +20 -45
- package/src/constants.css +7 -28
- package/src/enums.ts +3 -1
- package/src/react.ts +5 -21
- package/src/tokens.js +2 -2
- package/dist/build/chunks/disclosure-widget-DVpnRsTI.js +0 -126
- package/dist/build/chunks/disclosure-widget-DVpnRsTI.js.map +0 -1
- package/dist/build/chunks/drop-menu.entry-B4TtnC50.js +0 -132
- package/dist/build/chunks/drop-menu.entry-B4TtnC50.js.map +0 -1
- package/dist/build/chunks/keyboard-rvZ4dfGF.js +0 -104
- package/dist/build/chunks/keyboard-rvZ4dfGF.js.map +0 -1
- package/dist/build/chunks/polyfills-C-B7iqDG.js.map +0 -1
- package/dist/build/chunks/utilities-DXELy_An.js.map +0 -1
- package/src/Atom/Text/TextSizes.stories.ts +0 -25
- package/src/Atom/Text/text-alignment.twig +0 -5
- package/src/Component/Accordion/twig/accordion-example.twig +0 -36
- package/src/Component/Tile/README.md +0 -3
- package/src/Component/Tile/Tile.stories.ts +0 -49
- package/src/Component/Tile/Tile.stories.tsx +0 -35
- package/src/Component/Tile/__snapshots__/Tile.stories.ts.snap +0 -57
- package/src/Component/Tile/__snapshots__/Tile.stories.tsx.snap +0 -23
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://
|
|
1
|
+
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
|
2
2
|
|
|
3
3
|
exports[`Component/Filters CollapsibleCounter smoke-test 1`] = `
|
|
4
4
|
<div class="mx-page default">
|
|
5
|
-
<mx-filters class="mx-filters mx-filters--down
|
|
5
|
+
<mx-filters class="mx-filters mx-filters--down"
|
|
6
6
|
count="1"
|
|
7
7
|
>
|
|
8
8
|
<mx-accordionmobile>
|
|
@@ -41,8 +41,8 @@ exports[`Component/Filters CollapsibleCounter smoke-test 1`] = `
|
|
|
41
41
|
>
|
|
42
42
|
</span>
|
|
43
43
|
</summary>
|
|
44
|
-
<div class="mx-form-item
|
|
45
|
-
<input class="mx-input__text
|
|
44
|
+
<div class="mx-form-item mx-accordion__content">
|
|
45
|
+
<input class="mx-input__text"
|
|
46
46
|
id="filter-keywords"
|
|
47
47
|
name="example-keywords"
|
|
48
48
|
type="text"
|
|
@@ -76,8 +76,8 @@ exports[`Component/Filters CollapsibleCounter smoke-test 1`] = `
|
|
|
76
76
|
>
|
|
77
77
|
</span>
|
|
78
78
|
</summary>
|
|
79
|
-
<fieldset class="mx-form-item mx-fieldset
|
|
80
|
-
<div class="mx-checkbox
|
|
79
|
+
<fieldset class="mx-form-item mx-fieldset mx-accordion__content">
|
|
80
|
+
<div class="mx-checkbox">
|
|
81
81
|
<input id="category-news"
|
|
82
82
|
type="checkbox"
|
|
83
83
|
name="categories"
|
|
@@ -88,7 +88,7 @@ exports[`Component/Filters CollapsibleCounter smoke-test 1`] = `
|
|
|
88
88
|
News
|
|
89
89
|
</label>
|
|
90
90
|
</div>
|
|
91
|
-
<div class="mx-checkbox
|
|
91
|
+
<div class="mx-checkbox">
|
|
92
92
|
<input id="category-media"
|
|
93
93
|
type="checkbox"
|
|
94
94
|
name="categories"
|
|
@@ -99,8 +99,10 @@ exports[`Component/Filters CollapsibleCounter smoke-test 1`] = `
|
|
|
99
99
|
Media Releases
|
|
100
100
|
</label>
|
|
101
101
|
</div>
|
|
102
|
-
<div
|
|
103
|
-
|
|
102
|
+
<div data-hide
|
|
103
|
+
hidden="until-found"
|
|
104
|
+
>
|
|
105
|
+
<div class="mx-checkbox">
|
|
104
106
|
<input id="category-publications"
|
|
105
107
|
type="checkbox"
|
|
106
108
|
name="categories"
|
|
@@ -121,14 +123,14 @@ exports[`Component/Filters CollapsibleCounter smoke-test 1`] = `
|
|
|
121
123
|
</details>
|
|
122
124
|
</mx-accordion>
|
|
123
125
|
<div class="mx-form-actions">
|
|
124
|
-
<button class="mx-button
|
|
126
|
+
<button class="mx-button mx-button--dark"
|
|
125
127
|
type="submit"
|
|
126
128
|
>
|
|
127
129
|
<span>
|
|
128
130
|
Apply filters
|
|
129
131
|
</span>
|
|
130
132
|
</button>
|
|
131
|
-
<button class="mx-button
|
|
133
|
+
<button class="mx-button mx-button--light"
|
|
132
134
|
type="reset"
|
|
133
135
|
>
|
|
134
136
|
<span>
|
|
@@ -145,7 +147,7 @@ exports[`Component/Filters CollapsibleCounter smoke-test 1`] = `
|
|
|
145
147
|
|
|
146
148
|
exports[`Component/Filters CollapsibleRight smoke-test 1`] = `
|
|
147
149
|
<div class="mx-page default">
|
|
148
|
-
<mx-filters class="mx-filters mx-filters--right
|
|
150
|
+
<mx-filters class="mx-filters mx-filters--right"
|
|
149
151
|
count="0"
|
|
150
152
|
>
|
|
151
153
|
<mx-accordionmobile>
|
|
@@ -183,14 +185,14 @@ exports[`Component/Filters CollapsibleRight smoke-test 1`] = `
|
|
|
183
185
|
>
|
|
184
186
|
</span>
|
|
185
187
|
</summary>
|
|
186
|
-
<div class="mx-form-item
|
|
188
|
+
<div class="mx-form-item mx-accordion__content">
|
|
187
189
|
<div class="mx-description"
|
|
188
190
|
id="unique-0"
|
|
189
191
|
role="tooltip"
|
|
190
192
|
>
|
|
191
193
|
Search by keywords
|
|
192
194
|
</div>
|
|
193
|
-
<input class="mx-input__text
|
|
195
|
+
<input class="mx-input__text"
|
|
194
196
|
id="filter-keywords"
|
|
195
197
|
name="example-keywords"
|
|
196
198
|
type="text"
|
|
@@ -213,8 +215,8 @@ exports[`Component/Filters CollapsibleRight smoke-test 1`] = `
|
|
|
213
215
|
>
|
|
214
216
|
</span>
|
|
215
217
|
</summary>
|
|
216
|
-
<fieldset class="mx-form-item mx-fieldset
|
|
217
|
-
<div class="mx-checkbox
|
|
218
|
+
<fieldset class="mx-form-item mx-fieldset mx-accordion__content">
|
|
219
|
+
<div class="mx-checkbox">
|
|
218
220
|
<input id="category-news"
|
|
219
221
|
type="checkbox"
|
|
220
222
|
name="categories"
|
|
@@ -224,7 +226,7 @@ exports[`Component/Filters CollapsibleRight smoke-test 1`] = `
|
|
|
224
226
|
News
|
|
225
227
|
</label>
|
|
226
228
|
</div>
|
|
227
|
-
<div class="mx-checkbox
|
|
229
|
+
<div class="mx-checkbox">
|
|
228
230
|
<input id="category-media"
|
|
229
231
|
type="checkbox"
|
|
230
232
|
name="categories"
|
|
@@ -234,7 +236,7 @@ exports[`Component/Filters CollapsibleRight smoke-test 1`] = `
|
|
|
234
236
|
Media Releases
|
|
235
237
|
</label>
|
|
236
238
|
</div>
|
|
237
|
-
<div class="mx-checkbox
|
|
239
|
+
<div class="mx-checkbox">
|
|
238
240
|
<input id="category-publications"
|
|
239
241
|
type="checkbox"
|
|
240
242
|
name="categories"
|
|
@@ -248,7 +250,7 @@ exports[`Component/Filters CollapsibleRight smoke-test 1`] = `
|
|
|
248
250
|
</details>
|
|
249
251
|
</mx-accordion>
|
|
250
252
|
<div class="mx-form-actions">
|
|
251
|
-
<button class="mx-button
|
|
253
|
+
<button class="mx-button mx-button--dark"
|
|
252
254
|
type="submit"
|
|
253
255
|
disabled
|
|
254
256
|
>
|
|
@@ -256,7 +258,7 @@ exports[`Component/Filters CollapsibleRight smoke-test 1`] = `
|
|
|
256
258
|
Apply filters
|
|
257
259
|
</span>
|
|
258
260
|
</button>
|
|
259
|
-
<button class="mx-button
|
|
261
|
+
<button class="mx-button mx-button--light"
|
|
260
262
|
type="reset"
|
|
261
263
|
disabled
|
|
262
264
|
>
|
|
@@ -274,7 +276,7 @@ exports[`Component/Filters CollapsibleRight smoke-test 1`] = `
|
|
|
274
276
|
|
|
275
277
|
exports[`Component/Filters Filters smoke-test 1`] = `
|
|
276
278
|
<div class="mx-page default">
|
|
277
|
-
<mx-filters class="mx-filters
|
|
279
|
+
<mx-filters class="mx-filters"
|
|
278
280
|
count="0"
|
|
279
281
|
>
|
|
280
282
|
<h2 class="mx-filters__title">
|
|
@@ -283,8 +285,8 @@ exports[`Component/Filters Filters smoke-test 1`] = `
|
|
|
283
285
|
<form class="mx-filters__form mx-vertical-flow"
|
|
284
286
|
action="#"
|
|
285
287
|
>
|
|
286
|
-
<div class="mx-form-item
|
|
287
|
-
<label class="mx-label
|
|
288
|
+
<div class="mx-form-item mx-filter-item">
|
|
289
|
+
<label class="mx-label"
|
|
288
290
|
for="filter-keywords"
|
|
289
291
|
>
|
|
290
292
|
Keywords
|
|
@@ -295,7 +297,7 @@ exports[`Component/Filters Filters smoke-test 1`] = `
|
|
|
295
297
|
>
|
|
296
298
|
Search by keywords
|
|
297
299
|
</div>
|
|
298
|
-
<input class="mx-input__text
|
|
300
|
+
<input class="mx-input__text"
|
|
299
301
|
id="filter-keywords"
|
|
300
302
|
name="example-keywords"
|
|
301
303
|
type="text"
|
|
@@ -303,11 +305,11 @@ exports[`Component/Filters Filters smoke-test 1`] = `
|
|
|
303
305
|
aria-describedby="unique-0"
|
|
304
306
|
>
|
|
305
307
|
</div>
|
|
306
|
-
<fieldset class="mx-form-item mx-fieldset
|
|
307
|
-
<legend class="mx-legend
|
|
308
|
+
<fieldset class="mx-form-item mx-fieldset mx-filter-item">
|
|
309
|
+
<legend class="mx-legend">
|
|
308
310
|
Categories
|
|
309
311
|
</legend>
|
|
310
|
-
<div class="mx-checkbox
|
|
312
|
+
<div class="mx-checkbox">
|
|
311
313
|
<input id="category-news"
|
|
312
314
|
type="checkbox"
|
|
313
315
|
name="categories"
|
|
@@ -317,7 +319,7 @@ exports[`Component/Filters Filters smoke-test 1`] = `
|
|
|
317
319
|
News
|
|
318
320
|
</label>
|
|
319
321
|
</div>
|
|
320
|
-
<div class="mx-checkbox
|
|
322
|
+
<div class="mx-checkbox">
|
|
321
323
|
<input id="category-media"
|
|
322
324
|
type="checkbox"
|
|
323
325
|
name="categories"
|
|
@@ -327,7 +329,7 @@ exports[`Component/Filters Filters smoke-test 1`] = `
|
|
|
327
329
|
Media Releases
|
|
328
330
|
</label>
|
|
329
331
|
</div>
|
|
330
|
-
<div class="mx-checkbox
|
|
332
|
+
<div class="mx-checkbox">
|
|
331
333
|
<input id="category-publications"
|
|
332
334
|
type="checkbox"
|
|
333
335
|
name="categories"
|
|
@@ -339,7 +341,7 @@ exports[`Component/Filters Filters smoke-test 1`] = `
|
|
|
339
341
|
</div>
|
|
340
342
|
</fieldset>
|
|
341
343
|
<div class="mx-form-actions">
|
|
342
|
-
<button class="mx-button
|
|
344
|
+
<button class="mx-button mx-button--dark"
|
|
343
345
|
type="submit"
|
|
344
346
|
disabled
|
|
345
347
|
>
|
|
@@ -347,7 +349,7 @@ exports[`Component/Filters Filters smoke-test 1`] = `
|
|
|
347
349
|
Apply filters
|
|
348
350
|
</span>
|
|
349
351
|
</button>
|
|
350
|
-
<button class="mx-button
|
|
352
|
+
<button class="mx-button mx-button--light"
|
|
351
353
|
type="reset"
|
|
352
354
|
disabled
|
|
353
355
|
>
|
|
@@ -363,7 +365,7 @@ exports[`Component/Filters Filters smoke-test 1`] = `
|
|
|
363
365
|
|
|
364
366
|
exports[`Component/Filters Instant smoke-test 1`] = `
|
|
365
367
|
<div class="mx-page default">
|
|
366
|
-
<mx-filters class="mx-filters mx-filters--
|
|
368
|
+
<mx-filters class="mx-filters mx-filters--auto"
|
|
367
369
|
count="0"
|
|
368
370
|
>
|
|
369
371
|
<h2 class="mx-filters__title">
|
|
@@ -372,8 +374,8 @@ exports[`Component/Filters Instant smoke-test 1`] = `
|
|
|
372
374
|
<form class="mx-filters__form mx-vertical-flow"
|
|
373
375
|
action="#"
|
|
374
376
|
>
|
|
375
|
-
<div class="mx-form-item
|
|
376
|
-
<label class="mx-label
|
|
377
|
+
<div class="mx-form-item mx-filter-item">
|
|
378
|
+
<label class="mx-label"
|
|
377
379
|
for="filter-keywords"
|
|
378
380
|
>
|
|
379
381
|
Keywords
|
|
@@ -384,7 +386,7 @@ exports[`Component/Filters Instant smoke-test 1`] = `
|
|
|
384
386
|
>
|
|
385
387
|
Search by keywords
|
|
386
388
|
</div>
|
|
387
|
-
<input class="mx-input__text
|
|
389
|
+
<input class="mx-input__text"
|
|
388
390
|
id="filter-keywords"
|
|
389
391
|
name="example-keywords"
|
|
390
392
|
type="text"
|
|
@@ -392,11 +394,11 @@ exports[`Component/Filters Instant smoke-test 1`] = `
|
|
|
392
394
|
aria-describedby="unique-0"
|
|
393
395
|
>
|
|
394
396
|
</div>
|
|
395
|
-
<fieldset class="mx-form-item mx-fieldset
|
|
396
|
-
<legend class="mx-legend
|
|
397
|
+
<fieldset class="mx-form-item mx-fieldset mx-filter-item">
|
|
398
|
+
<legend class="mx-legend">
|
|
397
399
|
Categories
|
|
398
400
|
</legend>
|
|
399
|
-
<div class="mx-checkbox
|
|
401
|
+
<div class="mx-checkbox">
|
|
400
402
|
<input id="category-news"
|
|
401
403
|
type="checkbox"
|
|
402
404
|
name="categories"
|
|
@@ -406,7 +408,7 @@ exports[`Component/Filters Instant smoke-test 1`] = `
|
|
|
406
408
|
News
|
|
407
409
|
</label>
|
|
408
410
|
</div>
|
|
409
|
-
<div class="mx-checkbox
|
|
411
|
+
<div class="mx-checkbox">
|
|
410
412
|
<input id="category-media"
|
|
411
413
|
type="checkbox"
|
|
412
414
|
name="categories"
|
|
@@ -416,7 +418,7 @@ exports[`Component/Filters Instant smoke-test 1`] = `
|
|
|
416
418
|
Media Releases
|
|
417
419
|
</label>
|
|
418
420
|
</div>
|
|
419
|
-
<div class="mx-checkbox
|
|
421
|
+
<div class="mx-checkbox">
|
|
420
422
|
<input id="category-publications"
|
|
421
423
|
type="checkbox"
|
|
422
424
|
name="categories"
|
|
@@ -428,7 +430,7 @@ exports[`Component/Filters Instant smoke-test 1`] = `
|
|
|
428
430
|
</div>
|
|
429
431
|
</fieldset>
|
|
430
432
|
<div class="mx-form-actions">
|
|
431
|
-
<button class="mx-button
|
|
433
|
+
<button class="mx-button mx-button--light"
|
|
432
434
|
type="reset"
|
|
433
435
|
disabled
|
|
434
436
|
>
|
|
@@ -6,13 +6,40 @@
|
|
|
6
6
|
.mx-filters {
|
|
7
7
|
display: grid;
|
|
8
8
|
gap: var(--gap);
|
|
9
|
+
|
|
10
|
+
&:not(:defined) {
|
|
11
|
+
& [data-show] {
|
|
12
|
+
display: none;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
& .mx-filters__title .mx-icon--chevron-right {
|
|
16
|
+
@media (--medium-up) {
|
|
17
|
+
rotate: 90deg;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
& [open] .mx-filters__title .mx-icon--chevron-right {
|
|
22
|
+
@media (--medium-up) {
|
|
23
|
+
rotate: -90deg;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&:defined .mx-filters__title {
|
|
29
|
+
@media (--medium-up) {
|
|
30
|
+
pointer-events: none;
|
|
31
|
+
|
|
32
|
+
& .mx-icon {
|
|
33
|
+
display: none;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
9
37
|
}
|
|
10
38
|
|
|
11
39
|
.mx-filters__title {
|
|
12
40
|
--heading-font-size: var(--font-size-l);
|
|
13
41
|
--font-min: calc(
|
|
14
|
-
var(--heading-font-size) - var(--heading-font-size) *
|
|
15
|
-
var(--font-size-diff, 0.3)
|
|
42
|
+
var(--heading-font-size) - var(--heading-font-size) * var(--font-size-diff, 0.3)
|
|
16
43
|
);
|
|
17
44
|
|
|
18
45
|
font-weight: var(--font-weight-bold);
|
|
@@ -26,16 +53,8 @@
|
|
|
26
53
|
align-items: center;
|
|
27
54
|
min-block-size: 40px;
|
|
28
55
|
|
|
29
|
-
@media (--medium-up) {
|
|
30
|
-
pointer-events: none;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
56
|
& .mx-icon {
|
|
34
57
|
margin-inline-start: auto;
|
|
35
|
-
|
|
36
|
-
@media (--medium-up) {
|
|
37
|
-
display: none;
|
|
38
|
-
}
|
|
39
58
|
}
|
|
40
59
|
|
|
41
60
|
& [data-counters] {
|
|
@@ -59,20 +78,17 @@
|
|
|
59
78
|
margin-inline-start: auto;
|
|
60
79
|
}
|
|
61
80
|
}
|
|
81
|
+
}
|
|
62
82
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
83
|
+
.mx-filter-item .mx-accordion__content {
|
|
84
|
+
padding-block-start: var(--spacing-xxxs);
|
|
66
85
|
}
|
|
67
86
|
|
|
68
87
|
.mx-filters--right {
|
|
69
88
|
@media (--medium-down) {
|
|
70
89
|
& .mx-filters__form {
|
|
71
90
|
background-color: var(--background, var(--colour-background));
|
|
72
|
-
padding-inline: var(
|
|
73
|
-
--gutter,
|
|
74
|
-
clamp(var(--spacing-s), 6vw, var(--spacing-l))
|
|
75
|
-
);
|
|
91
|
+
padding-inline: var(--gutter, clamp(var(--spacing-s), 6vw, var(--spacing-l)));
|
|
76
92
|
padding-block-end: var(--block-padding);
|
|
77
93
|
overflow-y: auto;
|
|
78
94
|
position: fixed;
|
|
@@ -42,15 +42,17 @@ export default class GlobalAlert extends HTMLElement {
|
|
|
42
42
|
this.controller.abort()
|
|
43
43
|
this.remove()
|
|
44
44
|
this.localStorage = "true"
|
|
45
|
-
const newEvent: CustomEvent<{ id: string; target: GlobalAlert }> =
|
|
46
|
-
|
|
45
|
+
const newEvent: CustomEvent<{ id: string; target: GlobalAlert }> = new CustomEvent(
|
|
46
|
+
"GlobalAlert-close",
|
|
47
|
+
{
|
|
47
48
|
bubbles: true,
|
|
48
49
|
cancelable: true,
|
|
49
50
|
detail: {
|
|
50
51
|
id: this.id,
|
|
51
52
|
target: this,
|
|
52
53
|
},
|
|
53
|
-
}
|
|
54
|
+
},
|
|
55
|
+
)
|
|
54
56
|
this.dispatchEvent(newEvent)
|
|
55
57
|
}
|
|
56
58
|
|
|
@@ -65,9 +67,7 @@ export default class GlobalAlert extends HTMLElement {
|
|
|
65
67
|
get container(): HTMLElement {
|
|
66
68
|
const element: HTMLElement = this.querySelector("[data-container]")
|
|
67
69
|
if (!element) {
|
|
68
|
-
throw new Error(
|
|
69
|
-
`${this.localName} must contain a [data-container] element.`,
|
|
70
|
-
)
|
|
70
|
+
throw new Error(`${this.localName} must contain a [data-container] element.`)
|
|
71
71
|
}
|
|
72
72
|
return element
|
|
73
73
|
}
|
|
@@ -89,7 +89,8 @@ export default class GlobalAlert extends HTMLElement {
|
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
customElements.
|
|
92
|
+
if (!customElements.get("mx-closable-alert"))
|
|
93
|
+
customElements.define("mx-closable-alert", GlobalAlert)
|
|
93
94
|
|
|
94
95
|
declare global {
|
|
95
96
|
interface HTMLElementTagNameMap {
|
|
@@ -9,29 +9,73 @@ import {
|
|
|
9
9
|
HeadingTypes,
|
|
10
10
|
} from "@pnx-mixtape/ids-shape"
|
|
11
11
|
|
|
12
|
+
/**
|
|
13
|
+
* A Global Alert that can optionally be dismissed.
|
|
14
|
+
*/
|
|
12
15
|
const meta: Meta<GlobalAlertType> = {
|
|
13
16
|
tags: ["autodocs"],
|
|
14
17
|
component: Component,
|
|
15
|
-
argTypes: {
|
|
16
|
-
type: { options: Object.values(GlobalAlertTypes), control: "radio" },
|
|
17
|
-
id: {
|
|
18
|
-
control: "text",
|
|
19
|
-
description: "Set an id to get stable localStorage entry.",
|
|
20
|
-
},
|
|
21
|
-
dismissible: { control: "boolean" },
|
|
22
|
-
// @ts-expect-error The controls follow the shape
|
|
23
|
-
"title.title": { control: "text" },
|
|
24
|
-
"title.as": { options: Object.values(HeadingTypes), control: "select" },
|
|
25
|
-
},
|
|
26
18
|
args: {
|
|
27
19
|
title: Heading({
|
|
28
|
-
title: "
|
|
20
|
+
title: "Global alert",
|
|
29
21
|
as: HeadingTypes.TWO,
|
|
30
22
|
modifiers: [HeadingTypes.FOUR],
|
|
31
23
|
}),
|
|
32
24
|
content: "<p>Something happened that requires your attention</p>",
|
|
33
25
|
type: GlobalAlertTypes.LIGHT,
|
|
34
26
|
dismissible: true,
|
|
27
|
+
id: "light-alert",
|
|
28
|
+
},
|
|
29
|
+
argTypes: {
|
|
30
|
+
type: {
|
|
31
|
+
description: "Set the style of alert.",
|
|
32
|
+
options: Object.values(GlobalAlertTypes),
|
|
33
|
+
control: "radio",
|
|
34
|
+
table: {
|
|
35
|
+
defaultValue: { summary: GlobalAlertTypes.LIGHT },
|
|
36
|
+
type: { summary: "enum" },
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
id: {
|
|
40
|
+
control: "text",
|
|
41
|
+
description: "Set an id to ensure a stable localStorage entry. Required for **dismissable**.",
|
|
42
|
+
},
|
|
43
|
+
dismissible: {
|
|
44
|
+
description: "Add a close button, that stays closed after clicked by using localStorage.",
|
|
45
|
+
control: "boolean",
|
|
46
|
+
table: {
|
|
47
|
+
defaultValue: { summary: "false" },
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
title: {
|
|
51
|
+
description:
|
|
52
|
+
"Optional content [Heading](/?path=/docs/atom-heading--docs). It is helpful to use a smaller heading modifier.",
|
|
53
|
+
control: "text",
|
|
54
|
+
table: {
|
|
55
|
+
type: { summary: "Heading" },
|
|
56
|
+
subcategory: "Alert content",
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
content: {
|
|
60
|
+
description: "Content.",
|
|
61
|
+
control: "text",
|
|
62
|
+
type: {
|
|
63
|
+
name: "string",
|
|
64
|
+
required: true,
|
|
65
|
+
},
|
|
66
|
+
table: {
|
|
67
|
+
type: { summary: "WysiwygText" },
|
|
68
|
+
subcategory: "Alert content",
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
link: {
|
|
72
|
+
description: "Optional content [Link](/?path=/docs/atom-link--docs).",
|
|
73
|
+
control: "text",
|
|
74
|
+
table: {
|
|
75
|
+
type: { summary: "Link" },
|
|
76
|
+
subcategory: "Alert content",
|
|
77
|
+
},
|
|
78
|
+
},
|
|
35
79
|
},
|
|
36
80
|
}
|
|
37
81
|
|
|
@@ -40,9 +84,13 @@ type Story = StoryObj<GlobalAlertType>
|
|
|
40
84
|
|
|
41
85
|
export const GlobalAlert: Story = {}
|
|
42
86
|
|
|
87
|
+
/**
|
|
88
|
+
* The critical variant is usually not dismissable.
|
|
89
|
+
*/
|
|
43
90
|
export const Critical: Story = {
|
|
44
91
|
args: {
|
|
45
92
|
dismissible: false,
|
|
46
93
|
type: GlobalAlertTypes.CRITICAL,
|
|
94
|
+
id: "critical-alert",
|
|
47
95
|
},
|
|
48
96
|
}
|
|
@@ -9,8 +9,7 @@ const meta: Meta<typeof Component> = {
|
|
|
9
9
|
args: {
|
|
10
10
|
children: (
|
|
11
11
|
<p>
|
|
12
|
-
<b>Something happened.</b> And if you'd like to know what,
|
|
13
|
-
<a href="#">Click here</a>.
|
|
12
|
+
<b>Something happened.</b> And if you'd like to know what, <a href="#">Click here</a>.
|
|
14
13
|
</p>
|
|
15
14
|
),
|
|
16
15
|
dismissible: true,
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://
|
|
1
|
+
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
|
2
2
|
|
|
3
3
|
exports[`Component/GlobalAlert Critical smoke-test 1`] = `
|
|
4
4
|
<div class="mx-page default">
|
|
5
|
-
<div class="mx-global-alert mx-page mx-global-alert--critical"
|
|
5
|
+
<div class="mx-global-alert mx-page mx-global-alert--critical"
|
|
6
|
+
id="critical-alertcritical"
|
|
7
|
+
>
|
|
6
8
|
<div class="mx-global-alert__inner">
|
|
7
9
|
<div class="mx-global-alert__content">
|
|
8
|
-
<h2 class="
|
|
9
|
-
|
|
10
|
+
<h2 class="mx-heading--m">
|
|
11
|
+
Global alert
|
|
10
12
|
</h2>
|
|
11
13
|
<p>
|
|
12
14
|
Something happened that requires your attention
|
|
@@ -26,8 +28,8 @@ exports[`Component/GlobalAlert GlobalAlert smoke-test 1`] = `
|
|
|
26
28
|
data-container
|
|
27
29
|
>
|
|
28
30
|
<div class="mx-global-alert__content">
|
|
29
|
-
<h2 class="
|
|
30
|
-
|
|
31
|
+
<h2 class="mx-heading--m">
|
|
32
|
+
Global alert
|
|
31
33
|
</h2>
|
|
32
34
|
<p>
|
|
33
35
|
Something happened that requires your attention
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://
|
|
1
|
+
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
|
2
2
|
|
|
3
3
|
exports[`Component/GlobalAlert Critical smoke-test 1`] = `
|
|
4
|
-
<div id="
|
|
4
|
+
<div id="_r_1_"
|
|
5
5
|
class="mx-global-alert mx-global-alert--critical"
|
|
6
6
|
>
|
|
7
7
|
<div class="mx-global-alert__inner">
|
|
@@ -22,7 +22,7 @@ exports[`Component/GlobalAlert Critical smoke-test 1`] = `
|
|
|
22
22
|
`;
|
|
23
23
|
|
|
24
24
|
exports[`Component/GlobalAlert GlobalAlert smoke-test 1`] = `
|
|
25
|
-
<div id="
|
|
25
|
+
<div id="_r_0_"
|
|
26
26
|
class="mx-global-alert mx-global-alert--light"
|
|
27
27
|
>
|
|
28
28
|
<div class="mx-global-alert__inner">
|