@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
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { Meta, StoryObj } from "@storybook/html-vite"
|
|
2
|
+
import Component from "./utility-list.twig"
|
|
3
|
+
import { UtilityList as UtilityListType } from "@pnx-mixtape/ids-shape"
|
|
4
|
+
|
|
5
|
+
import "./utility-list.css"
|
|
6
|
+
import "./Elements/UtilityList"
|
|
7
|
+
|
|
8
|
+
// Deps.
|
|
9
|
+
import SocialShare from "../SocialShare/social-share.twig"
|
|
10
|
+
import "../Popover/popover.css"
|
|
11
|
+
import "../Popover/Elements/Popover"
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* The Utility List is a collection of useful page tools.
|
|
15
|
+
* It requires the `UtilityList` custom element javascript.
|
|
16
|
+
*/
|
|
17
|
+
const meta: Meta<UtilityListType> = {
|
|
18
|
+
tags: ["autodocs"],
|
|
19
|
+
component: Component,
|
|
20
|
+
args: {
|
|
21
|
+
copy: true,
|
|
22
|
+
print: true,
|
|
23
|
+
pdf: false,
|
|
24
|
+
share: SocialShare({
|
|
25
|
+
facebook: "https://www.facebook.com/sharer.php",
|
|
26
|
+
linkedin: "https://www.linkedin.com/shareArticle",
|
|
27
|
+
email: "mailto:",
|
|
28
|
+
}),
|
|
29
|
+
horizontal: false,
|
|
30
|
+
},
|
|
31
|
+
argTypes: {
|
|
32
|
+
share: {
|
|
33
|
+
description: "A [SocialShare](/?path=/docs/component-socialshare--docs) component",
|
|
34
|
+
table: { type: { summary: "SocialShare" } },
|
|
35
|
+
},
|
|
36
|
+
copy: {
|
|
37
|
+
description: "Adds a 'Copy link' button",
|
|
38
|
+
table: { defaultValue: { summary: "false" } },
|
|
39
|
+
},
|
|
40
|
+
print: {
|
|
41
|
+
description: "Adds a 'Print page' button",
|
|
42
|
+
table: { defaultValue: { summary: "false" } },
|
|
43
|
+
},
|
|
44
|
+
pdf: {
|
|
45
|
+
description: "Adds a 'Download PDF' button",
|
|
46
|
+
table: { defaultValue: { summary: "false" } },
|
|
47
|
+
},
|
|
48
|
+
horizontal: {
|
|
49
|
+
table: { defaultValue: { summary: "false" } },
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export default meta
|
|
55
|
+
type Story = StoryObj<UtilityListType>
|
|
56
|
+
|
|
57
|
+
export const UtilityList: Story = {}
|
|
58
|
+
|
|
59
|
+
export const Horizontal: Story = {
|
|
60
|
+
args: {
|
|
61
|
+
horizontal: true,
|
|
62
|
+
},
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* PDF option currently only triggers the Print dialog. It is included so that it can be extended on a project level.
|
|
67
|
+
*/
|
|
68
|
+
export const PDF: Story = {
|
|
69
|
+
args: {
|
|
70
|
+
pdf: true,
|
|
71
|
+
},
|
|
72
|
+
}
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
|
2
|
+
|
|
3
|
+
exports[`Component/UtilityList Horizontal smoke-test 1`] = `
|
|
4
|
+
<div class="mx-page default">
|
|
5
|
+
<mx-utility-list>
|
|
6
|
+
<nav class="mx-utility-list mx-nav mx-nav--inline"
|
|
7
|
+
aria-label="Page tools"
|
|
8
|
+
>
|
|
9
|
+
<ul>
|
|
10
|
+
<li>
|
|
11
|
+
<button data-copy
|
|
12
|
+
type="button"
|
|
13
|
+
class="mx-button mx-button--small mx-button--light"
|
|
14
|
+
>
|
|
15
|
+
<span class="mx-icon mx-icon--link">
|
|
16
|
+
</span>
|
|
17
|
+
<span data-copy-label
|
|
18
|
+
class="mx-utility-list__label"
|
|
19
|
+
>
|
|
20
|
+
Copy link
|
|
21
|
+
</span>
|
|
22
|
+
</button>
|
|
23
|
+
</li>
|
|
24
|
+
<li>
|
|
25
|
+
<button data-print
|
|
26
|
+
type="button"
|
|
27
|
+
class="mx-button mx-button--small mx-button--light"
|
|
28
|
+
>
|
|
29
|
+
<span class="mx-icon mx-icon--print">
|
|
30
|
+
</span>
|
|
31
|
+
<span class="mx-utility-list__label">
|
|
32
|
+
Print page
|
|
33
|
+
</span>
|
|
34
|
+
</button>
|
|
35
|
+
</li>
|
|
36
|
+
<li>
|
|
37
|
+
<mx-popover>
|
|
38
|
+
<button type="button"
|
|
39
|
+
id="unique-0"
|
|
40
|
+
class="mx-popover__trigger mx-button mx-button--small mx-button--light"
|
|
41
|
+
popovertarget="utility-list-share"
|
|
42
|
+
style="anchor-name: --utility-list-share"
|
|
43
|
+
>
|
|
44
|
+
<span class="mx-icon mx-icon--share">
|
|
45
|
+
</span>
|
|
46
|
+
<span class="mx-utility-list__label">
|
|
47
|
+
Share this page
|
|
48
|
+
</span>
|
|
49
|
+
<span class="mx-icon mx-icon--chevron-down">
|
|
50
|
+
</span>
|
|
51
|
+
</button>
|
|
52
|
+
<div class="mx-popover mx-utility-list__share"
|
|
53
|
+
id="utility-list-share"
|
|
54
|
+
aria-describedby="unique-0"
|
|
55
|
+
style="position-anchor: --utility-list-share"
|
|
56
|
+
data-placement="bottom"
|
|
57
|
+
popover
|
|
58
|
+
>
|
|
59
|
+
<nav class="mx-social-share flex gap--s"
|
|
60
|
+
aria-label="Social share buttons"
|
|
61
|
+
>
|
|
62
|
+
<a class="mx-link mx-icon mx-icon--only mx-icon--linkedin"
|
|
63
|
+
href="https://www.linkedin.com/shareArticle"
|
|
64
|
+
target="_blank"
|
|
65
|
+
>
|
|
66
|
+
Share to LinkedIn
|
|
67
|
+
</a>
|
|
68
|
+
<a class="mx-link mx-icon mx-icon--only mx-icon--facebook"
|
|
69
|
+
href="https://www.facebook.com/sharer.php"
|
|
70
|
+
target="_blank"
|
|
71
|
+
>
|
|
72
|
+
Share to Facebook
|
|
73
|
+
</a>
|
|
74
|
+
<a class="mx-link mx-icon mx-icon--only mx-icon--email"
|
|
75
|
+
href="mailto:"
|
|
76
|
+
target="_blank"
|
|
77
|
+
>
|
|
78
|
+
Share via email
|
|
79
|
+
</a>
|
|
80
|
+
</nav>
|
|
81
|
+
</div>
|
|
82
|
+
</mx-popover>
|
|
83
|
+
</li>
|
|
84
|
+
</ul>
|
|
85
|
+
</nav>
|
|
86
|
+
</mx-utility-list>
|
|
87
|
+
</div>
|
|
88
|
+
`;
|
|
89
|
+
|
|
90
|
+
exports[`Component/UtilityList PDF smoke-test 1`] = `
|
|
91
|
+
<div class="mx-page default">
|
|
92
|
+
<mx-utility-list>
|
|
93
|
+
<nav class="mx-utility-list mx-nav"
|
|
94
|
+
aria-label="Page tools"
|
|
95
|
+
>
|
|
96
|
+
<ul>
|
|
97
|
+
<li>
|
|
98
|
+
<button data-copy
|
|
99
|
+
type="button"
|
|
100
|
+
class="mx-button mx-button--small mx-button--light"
|
|
101
|
+
>
|
|
102
|
+
<span class="mx-icon mx-icon--link">
|
|
103
|
+
</span>
|
|
104
|
+
<span data-copy-label
|
|
105
|
+
class="mx-utility-list__label"
|
|
106
|
+
>
|
|
107
|
+
Copy link
|
|
108
|
+
</span>
|
|
109
|
+
</button>
|
|
110
|
+
</li>
|
|
111
|
+
<li>
|
|
112
|
+
<button data-print
|
|
113
|
+
type="button"
|
|
114
|
+
class="mx-button mx-button--small mx-button--light"
|
|
115
|
+
>
|
|
116
|
+
<span class="mx-icon mx-icon--print">
|
|
117
|
+
</span>
|
|
118
|
+
<span class="mx-utility-list__label">
|
|
119
|
+
Print page
|
|
120
|
+
</span>
|
|
121
|
+
</button>
|
|
122
|
+
</li>
|
|
123
|
+
<li>
|
|
124
|
+
<button data-pdf
|
|
125
|
+
type="button"
|
|
126
|
+
class="mx-button mx-button--small mx-button--light"
|
|
127
|
+
>
|
|
128
|
+
<span class="mx-icon mx-icon--download">
|
|
129
|
+
</span>
|
|
130
|
+
<span class="mx-utility-list__label">
|
|
131
|
+
Download PDF
|
|
132
|
+
</span>
|
|
133
|
+
</button>
|
|
134
|
+
</li>
|
|
135
|
+
<li>
|
|
136
|
+
<mx-popover>
|
|
137
|
+
<button type="button"
|
|
138
|
+
id="unique-0"
|
|
139
|
+
class="mx-popover__trigger mx-button mx-button--small mx-button--light"
|
|
140
|
+
popovertarget="utility-list-share"
|
|
141
|
+
style="anchor-name: --utility-list-share"
|
|
142
|
+
>
|
|
143
|
+
<span class="mx-icon mx-icon--share">
|
|
144
|
+
</span>
|
|
145
|
+
<span class="mx-utility-list__label">
|
|
146
|
+
Share this page
|
|
147
|
+
</span>
|
|
148
|
+
<span class="mx-icon mx-icon--chevron-down">
|
|
149
|
+
</span>
|
|
150
|
+
</button>
|
|
151
|
+
<div class="mx-popover mx-utility-list__share"
|
|
152
|
+
id="utility-list-share"
|
|
153
|
+
aria-describedby="unique-0"
|
|
154
|
+
style="position-anchor: --utility-list-share"
|
|
155
|
+
data-placement="bottom"
|
|
156
|
+
popover
|
|
157
|
+
>
|
|
158
|
+
<nav class="mx-social-share flex gap--s"
|
|
159
|
+
aria-label="Social share buttons"
|
|
160
|
+
>
|
|
161
|
+
<a class="mx-link mx-icon mx-icon--only mx-icon--linkedin"
|
|
162
|
+
href="https://www.linkedin.com/shareArticle"
|
|
163
|
+
target="_blank"
|
|
164
|
+
>
|
|
165
|
+
Share to LinkedIn
|
|
166
|
+
</a>
|
|
167
|
+
<a class="mx-link mx-icon mx-icon--only mx-icon--facebook"
|
|
168
|
+
href="https://www.facebook.com/sharer.php"
|
|
169
|
+
target="_blank"
|
|
170
|
+
>
|
|
171
|
+
Share to Facebook
|
|
172
|
+
</a>
|
|
173
|
+
<a class="mx-link mx-icon mx-icon--only mx-icon--email"
|
|
174
|
+
href="mailto:"
|
|
175
|
+
target="_blank"
|
|
176
|
+
>
|
|
177
|
+
Share via email
|
|
178
|
+
</a>
|
|
179
|
+
</nav>
|
|
180
|
+
</div>
|
|
181
|
+
</mx-popover>
|
|
182
|
+
</li>
|
|
183
|
+
</ul>
|
|
184
|
+
</nav>
|
|
185
|
+
</mx-utility-list>
|
|
186
|
+
</div>
|
|
187
|
+
`;
|
|
188
|
+
|
|
189
|
+
exports[`Component/UtilityList UtilityList smoke-test 1`] = `
|
|
190
|
+
<div class="mx-page default">
|
|
191
|
+
<mx-utility-list>
|
|
192
|
+
<nav class="mx-utility-list mx-nav"
|
|
193
|
+
aria-label="Page tools"
|
|
194
|
+
>
|
|
195
|
+
<ul>
|
|
196
|
+
<li>
|
|
197
|
+
<button data-copy
|
|
198
|
+
type="button"
|
|
199
|
+
class="mx-button mx-button--small mx-button--light"
|
|
200
|
+
>
|
|
201
|
+
<span class="mx-icon mx-icon--link">
|
|
202
|
+
</span>
|
|
203
|
+
<span data-copy-label
|
|
204
|
+
class="mx-utility-list__label"
|
|
205
|
+
>
|
|
206
|
+
Copy link
|
|
207
|
+
</span>
|
|
208
|
+
</button>
|
|
209
|
+
</li>
|
|
210
|
+
<li>
|
|
211
|
+
<button data-print
|
|
212
|
+
type="button"
|
|
213
|
+
class="mx-button mx-button--small mx-button--light"
|
|
214
|
+
>
|
|
215
|
+
<span class="mx-icon mx-icon--print">
|
|
216
|
+
</span>
|
|
217
|
+
<span class="mx-utility-list__label">
|
|
218
|
+
Print page
|
|
219
|
+
</span>
|
|
220
|
+
</button>
|
|
221
|
+
</li>
|
|
222
|
+
<li>
|
|
223
|
+
<mx-popover>
|
|
224
|
+
<button type="button"
|
|
225
|
+
id="unique-0"
|
|
226
|
+
class="mx-popover__trigger mx-button mx-button--small mx-button--light"
|
|
227
|
+
popovertarget="utility-list-share"
|
|
228
|
+
style="anchor-name: --utility-list-share"
|
|
229
|
+
>
|
|
230
|
+
<span class="mx-icon mx-icon--share">
|
|
231
|
+
</span>
|
|
232
|
+
<span class="mx-utility-list__label">
|
|
233
|
+
Share this page
|
|
234
|
+
</span>
|
|
235
|
+
<span class="mx-icon mx-icon--chevron-down">
|
|
236
|
+
</span>
|
|
237
|
+
</button>
|
|
238
|
+
<div class="mx-popover mx-utility-list__share"
|
|
239
|
+
id="utility-list-share"
|
|
240
|
+
aria-describedby="unique-0"
|
|
241
|
+
style="position-anchor: --utility-list-share"
|
|
242
|
+
data-placement="bottom"
|
|
243
|
+
popover
|
|
244
|
+
>
|
|
245
|
+
<nav class="mx-social-share flex gap--s"
|
|
246
|
+
aria-label="Social share buttons"
|
|
247
|
+
>
|
|
248
|
+
<a class="mx-link mx-icon mx-icon--only mx-icon--linkedin"
|
|
249
|
+
href="https://www.linkedin.com/shareArticle"
|
|
250
|
+
target="_blank"
|
|
251
|
+
>
|
|
252
|
+
Share to LinkedIn
|
|
253
|
+
</a>
|
|
254
|
+
<a class="mx-link mx-icon mx-icon--only mx-icon--facebook"
|
|
255
|
+
href="https://www.facebook.com/sharer.php"
|
|
256
|
+
target="_blank"
|
|
257
|
+
>
|
|
258
|
+
Share to Facebook
|
|
259
|
+
</a>
|
|
260
|
+
<a class="mx-link mx-icon mx-icon--only mx-icon--email"
|
|
261
|
+
href="mailto:"
|
|
262
|
+
target="_blank"
|
|
263
|
+
>
|
|
264
|
+
Share via email
|
|
265
|
+
</a>
|
|
266
|
+
</nav>
|
|
267
|
+
</div>
|
|
268
|
+
</mx-popover>
|
|
269
|
+
</li>
|
|
270
|
+
</ul>
|
|
271
|
+
</nav>
|
|
272
|
+
</mx-utility-list>
|
|
273
|
+
</div>
|
|
274
|
+
`;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utility List
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
@layer design-system.defaults {
|
|
6
|
+
mx-utility-list {
|
|
7
|
+
display: block;
|
|
8
|
+
|
|
9
|
+
&:not(:defined) button:not([popovertarget]) {
|
|
10
|
+
pointer-events: none;
|
|
11
|
+
opacity: 0.7;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@layer design-system.components {
|
|
17
|
+
.mx-utility-list {
|
|
18
|
+
& ul {
|
|
19
|
+
gap: var(--nav-gap, var(--spacing-xs));
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&:where(.mx-nav--inline) {
|
|
23
|
+
gap: var(--inline-nav-gap, 0);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.mx-utility-list__share {
|
|
28
|
+
--utility-link-color: var(--colour-link);
|
|
29
|
+
|
|
30
|
+
min-inline-size: fit-content;
|
|
31
|
+
|
|
32
|
+
& a[href] {
|
|
33
|
+
--link-colour: var(--utility-link-color);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
& .mx-social-share {
|
|
37
|
+
justify-content: center;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./Elements/UtilityList"
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{% set classes = [
|
|
2
|
+
"mx-utility-list",
|
|
3
|
+
"mx-nav",
|
|
4
|
+
horizontal ? 'mx-nav--inline' : null
|
|
5
|
+
] %}
|
|
6
|
+
{% set attributes = (attributes ?? create_attribute()).addClass(classes) %}
|
|
7
|
+
{% set id = id|default('utility-list-share') %}
|
|
8
|
+
{% set name = id ~ '-target' %}
|
|
9
|
+
|
|
10
|
+
<mx-utility-list>
|
|
11
|
+
<nav{{ attributes }} aria-label="Page tools">
|
|
12
|
+
<ul>
|
|
13
|
+
{% if copy %}
|
|
14
|
+
<li>
|
|
15
|
+
<button data-copy type="button" class="mx-button mx-button--small mx-button--light">
|
|
16
|
+
<span class="mx-icon mx-icon--link"></span>
|
|
17
|
+
<span data-copy-label class="mx-utility-list__label">Copy link</span>
|
|
18
|
+
</button>
|
|
19
|
+
</li>
|
|
20
|
+
{% endif %}
|
|
21
|
+
{% if print %}
|
|
22
|
+
<li>
|
|
23
|
+
<button data-print type="button" class="mx-button mx-button--small mx-button--light">
|
|
24
|
+
<span class="mx-icon mx-icon--print"></span>
|
|
25
|
+
<span class="mx-utility-list__label">Print page</span>
|
|
26
|
+
</button>
|
|
27
|
+
</li>
|
|
28
|
+
{% endif %}
|
|
29
|
+
{% if pdf %}
|
|
30
|
+
<li>
|
|
31
|
+
<button data-pdf type="button" class="mx-button mx-button--small mx-button--light">
|
|
32
|
+
<span class="mx-icon mx-icon--download"></span>
|
|
33
|
+
<span class="mx-utility-list__label">Download PDF</span>
|
|
34
|
+
</button>
|
|
35
|
+
</li>
|
|
36
|
+
{% endif %}
|
|
37
|
+
{% if share is not empty %}
|
|
38
|
+
<li>
|
|
39
|
+
<mx-popover>
|
|
40
|
+
<button
|
|
41
|
+
type="button"
|
|
42
|
+
id="{{ name }}"
|
|
43
|
+
class="mx-popover__trigger mx-button mx-button--small mx-button--light"
|
|
44
|
+
popovertarget="{{ id }}"
|
|
45
|
+
style="anchor-name: --{{ id }}"
|
|
46
|
+
>
|
|
47
|
+
<span class="mx-icon mx-icon--share"></span>
|
|
48
|
+
<span class="mx-utility-list__label">Share this page</span>
|
|
49
|
+
<span class="mx-icon mx-icon--chevron-down"></span>
|
|
50
|
+
</button>
|
|
51
|
+
<div
|
|
52
|
+
class="mx-popover mx-utility-list__share"
|
|
53
|
+
id="{{ id }}"
|
|
54
|
+
aria-describedby="{{ name }}"
|
|
55
|
+
style="position-anchor: --{{ id }}"
|
|
56
|
+
data-placement="bottom"
|
|
57
|
+
popover
|
|
58
|
+
>
|
|
59
|
+
{{ share }}
|
|
60
|
+
</div>
|
|
61
|
+
</mx-popover>
|
|
62
|
+
</li>
|
|
63
|
+
{% endif %}
|
|
64
|
+
</ul>
|
|
65
|
+
</nav>
|
|
66
|
+
</mx-utility-list>
|
|
@@ -16,9 +16,7 @@ export const Single: StoryObj<typeof SingleCheckbox> = {
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
export const CheckboxGroup: StoryObj<typeof FormCheckbox> = {
|
|
19
|
-
render: ({ children, ...args }) =>
|
|
20
|
-
<FormCheckbox {...args}>{children}</FormCheckbox>
|
|
21
|
-
),
|
|
19
|
+
render: ({ children, ...args }) => <FormCheckbox {...args}>{children}</FormCheckbox>,
|
|
22
20
|
args: {
|
|
23
21
|
label: "Checkbox group",
|
|
24
22
|
children: (
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createContext,
|
|
3
|
-
JSX,
|
|
4
|
-
PropsWithChildren,
|
|
5
|
-
use,
|
|
6
|
-
useId,
|
|
7
|
-
useRef,
|
|
8
|
-
} from "react"
|
|
1
|
+
import { createContext, JSX, PropsWithChildren, use, useId, useRef } from "react"
|
|
9
2
|
import {
|
|
10
3
|
AriaCheckboxGroupItemProps,
|
|
11
4
|
AriaCheckboxProps,
|
|
@@ -30,11 +23,7 @@ type FormCheckboxProps = CheckboxGroupProps &
|
|
|
30
23
|
label: string
|
|
31
24
|
}
|
|
32
25
|
|
|
33
|
-
const FormCheckbox = ({
|
|
34
|
-
label,
|
|
35
|
-
children,
|
|
36
|
-
...props
|
|
37
|
-
}: FormCheckboxProps): JSX.Element => {
|
|
26
|
+
const FormCheckbox = ({ label, children, ...props }: FormCheckboxProps): JSX.Element => {
|
|
38
27
|
const state = useCheckboxGroupState(props)
|
|
39
28
|
const { groupProps, labelProps } = useCheckboxGroup(props, state)
|
|
40
29
|
|
|
@@ -71,12 +60,7 @@ const Checkbox = ({
|
|
|
71
60
|
|
|
72
61
|
return (
|
|
73
62
|
<div className={classes}>
|
|
74
|
-
<input
|
|
75
|
-
id={id}
|
|
76
|
-
ref={ref}
|
|
77
|
-
aria-invalid={status === FormStatus.INVALID}
|
|
78
|
-
{...inputProps}
|
|
79
|
-
/>
|
|
63
|
+
<input id={id} ref={ref} aria-invalid={status === FormStatus.INVALID} {...inputProps} />
|
|
80
64
|
<label htmlFor={id}>{children}</label>
|
|
81
65
|
</div>
|
|
82
66
|
)
|
|
@@ -107,12 +91,7 @@ const SingleCheckbox = ({
|
|
|
107
91
|
|
|
108
92
|
return (
|
|
109
93
|
<div className={classes}>
|
|
110
|
-
<input
|
|
111
|
-
id={id}
|
|
112
|
-
ref={ref}
|
|
113
|
-
aria-invalid={status === FormStatus.INVALID}
|
|
114
|
-
{...inputProps}
|
|
115
|
-
/>
|
|
94
|
+
<input id={id} ref={ref} aria-invalid={status === FormStatus.INVALID} {...inputProps} />
|
|
116
95
|
<label htmlFor={id}>{children}</label>
|
|
117
96
|
</div>
|
|
118
97
|
)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://
|
|
1
|
+
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
|
2
2
|
|
|
3
3
|
exports[`Form/Checkbox Checkbox smoke-test 1`] = `
|
|
4
4
|
<div class="mx-page default">
|
|
5
|
-
<div class="mx-checkbox
|
|
5
|
+
<div class="mx-checkbox">
|
|
6
6
|
<input id="single-checkbox"
|
|
7
7
|
type="checkbox"
|
|
8
8
|
name="terms"
|
|
@@ -17,7 +17,7 @@ exports[`Form/Checkbox Checkbox smoke-test 1`] = `
|
|
|
17
17
|
|
|
18
18
|
exports[`Form/Checkbox Checked smoke-test 1`] = `
|
|
19
19
|
<div class="mx-page default">
|
|
20
|
-
<div class="mx-checkbox
|
|
20
|
+
<div class="mx-checkbox">
|
|
21
21
|
<input id="single-checkbox"
|
|
22
22
|
type="checkbox"
|
|
23
23
|
name="terms"
|
|
@@ -8,8 +8,7 @@ const meta: Meta<FormDescriptionType> = {
|
|
|
8
8
|
component: Component,
|
|
9
9
|
args: {
|
|
10
10
|
id: "description",
|
|
11
|
-
description:
|
|
12
|
-
"Help text that provides additional information about the field.",
|
|
11
|
+
description: "Help text that provides additional information about the field.",
|
|
13
12
|
},
|
|
14
13
|
}
|
|
15
14
|
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { Meta, StoryObj } from "@storybook/html-vite"
|
|
2
2
|
import Component from "./form-status.twig"
|
|
3
3
|
import "../form.css"
|
|
4
|
-
import {
|
|
5
|
-
FormStatus as FormStatusType,
|
|
6
|
-
FormStatusTypes,
|
|
7
|
-
} from "@pnx-mixtape/ids-shape"
|
|
4
|
+
import { FormStatus as FormStatusType, FormStatusTypes } from "@pnx-mixtape/ids-shape"
|
|
8
5
|
|
|
9
6
|
const meta: Meta<FormStatusType> = {
|
|
10
7
|
tags: ["autodocs", "ids-mvp"],
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://
|
|
1
|
+
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
|
2
2
|
|
|
3
3
|
exports[`Form/Description/FormStatus Message smoke-test 1`] = `
|
|
4
4
|
<div class="mx-page default">
|
|
5
|
-
<div class="mx-error-message
|
|
5
|
+
<div class="mx-error-message"
|
|
6
6
|
id="status-message"
|
|
7
7
|
role="tooltip"
|
|
8
8
|
>
|
|
@@ -13,7 +13,7 @@ exports[`Form/Description/FormStatus Message smoke-test 1`] = `
|
|
|
13
13
|
|
|
14
14
|
exports[`Form/Description/FormStatus Success smoke-test 1`] = `
|
|
15
15
|
<div class="mx-page default">
|
|
16
|
-
<div class="
|
|
16
|
+
<div class="mx-success-message"
|
|
17
17
|
id="status-message"
|
|
18
18
|
role="tooltip"
|
|
19
19
|
>
|
package/src/Form/Form/Form.tsx
CHANGED
|
@@ -2,8 +2,6 @@ import { JSX, ComponentPropsWithoutRef } from "react"
|
|
|
2
2
|
|
|
3
3
|
type FormProps = ComponentPropsWithoutRef<"form">
|
|
4
4
|
|
|
5
|
-
const Form = ({ children, ...props }: FormProps): JSX.Element =>
|
|
6
|
-
<form {...props}>{children}</form>
|
|
7
|
-
)
|
|
5
|
+
const Form = ({ children, ...props }: FormProps): JSX.Element => <form {...props}>{children}</form>
|
|
8
6
|
|
|
9
7
|
export default Form
|
|
@@ -5,11 +5,7 @@ import FormStatus from "../Description/form-status.twig"
|
|
|
5
5
|
import Label from "../Label/label.twig"
|
|
6
6
|
import TextInput from "../TextInput/input-text.twig"
|
|
7
7
|
import "../form.css"
|
|
8
|
-
import {
|
|
9
|
-
FormItem as FormItemType,
|
|
10
|
-
FormStatusTypes,
|
|
11
|
-
InputTypeTypes,
|
|
12
|
-
} from "@pnx-mixtape/ids-shape"
|
|
8
|
+
import { FormItem as FormItemType, FormStatusTypes, InputTypeTypes } from "@pnx-mixtape/ids-shape"
|
|
13
9
|
|
|
14
10
|
const meta: Meta<FormItemType> = {
|
|
15
11
|
tags: ["autodocs", "ids-mvp"],
|
|
@@ -22,8 +18,7 @@ const meta: Meta<FormItemType> = {
|
|
|
22
18
|
}),
|
|
23
19
|
descriptionEnd: FormDescription({
|
|
24
20
|
id: "form-item",
|
|
25
|
-
description:
|
|
26
|
-
"Help text that provides additional information about the field.",
|
|
21
|
+
description: "Help text that provides additional information about the field.",
|
|
27
22
|
}),
|
|
28
23
|
fields: TextInput({
|
|
29
24
|
id: "form-item",
|
|
@@ -109,8 +104,7 @@ export const DescriptionBefore: Story = {
|
|
|
109
104
|
descriptionEnd: null,
|
|
110
105
|
descriptionStart: FormDescription({
|
|
111
106
|
id: "form-item",
|
|
112
|
-
description:
|
|
113
|
-
"Help text that provides additional information about the field.",
|
|
107
|
+
description: "Help text that provides additional information about the field.",
|
|
114
108
|
}),
|
|
115
109
|
},
|
|
116
110
|
}
|