@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
|
@@ -2,12 +2,7 @@ import { JSX } from "react"
|
|
|
2
2
|
import FormSelect, { FormSelectProps } from "../../../Form/Select/FormSelect"
|
|
3
3
|
import FormLabel from "../../../Form/Label/FormLabel"
|
|
4
4
|
|
|
5
|
-
const ResultsBarSort = ({
|
|
6
|
-
id,
|
|
7
|
-
name,
|
|
8
|
-
options,
|
|
9
|
-
...props
|
|
10
|
-
}: FormSelectProps): JSX.Element => (
|
|
5
|
+
const ResultsBarSort = ({ id, name, options, ...props }: FormSelectProps): JSX.Element => (
|
|
11
6
|
<div className="mx-results-bar__sort">
|
|
12
7
|
<FormLabel id={id} text="Sort by" />
|
|
13
8
|
<FormSelect name={name} options={options} id={id} {...props} />
|
|
@@ -3,6 +3,9 @@ import Component from "./results-bar.twig"
|
|
|
3
3
|
import "./results-bar.css"
|
|
4
4
|
import { ResultsBar as ResultsBarType } from "@pnx-mixtape/ids-shape"
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* A bar displaying the number of results available, and an optional sort dropdown.
|
|
8
|
+
*/
|
|
6
9
|
const meta: Meta<ResultsBarType> = {
|
|
7
10
|
tags: ["autodocs", "ids-mvp"],
|
|
8
11
|
component: Component,
|
|
@@ -12,10 +15,31 @@ const meta: Meta<ResultsBarType> = {
|
|
|
12
15
|
total: 250,
|
|
13
16
|
},
|
|
14
17
|
argTypes: {
|
|
15
|
-
number: {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
number: {
|
|
19
|
+
description: "The current page number.",
|
|
20
|
+
type: "number",
|
|
21
|
+
},
|
|
22
|
+
pageCount: {
|
|
23
|
+
description: "The number of results displayed per page.",
|
|
24
|
+
type: "number",
|
|
25
|
+
},
|
|
26
|
+
total: {
|
|
27
|
+
description: "The total number of results.",
|
|
28
|
+
type: "number",
|
|
29
|
+
},
|
|
30
|
+
empty: {
|
|
31
|
+
description: "If true, shows an empty results message.",
|
|
32
|
+
type: "boolean",
|
|
33
|
+
table: {
|
|
34
|
+
defaultValue: { summary: "false" },
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
sort: {
|
|
38
|
+
description: "A string array of options to use for sorting.",
|
|
39
|
+
table: {
|
|
40
|
+
type: { summary: "string[]" },
|
|
41
|
+
},
|
|
42
|
+
},
|
|
19
43
|
},
|
|
20
44
|
}
|
|
21
45
|
|
|
@@ -24,12 +48,18 @@ type Story = StoryObj<ResultsBarType>
|
|
|
24
48
|
|
|
25
49
|
export const ResultsBar: Story = {}
|
|
26
50
|
|
|
51
|
+
/**
|
|
52
|
+
* Display empty results message.
|
|
53
|
+
*/
|
|
27
54
|
export const Empty: Story = {
|
|
28
55
|
args: {
|
|
29
56
|
empty: true,
|
|
30
57
|
},
|
|
31
58
|
}
|
|
32
59
|
|
|
60
|
+
/**
|
|
61
|
+
* Create a sort dropdown from a list of options.
|
|
62
|
+
*/
|
|
33
63
|
export const Sort: Story = {
|
|
34
64
|
args: {
|
|
35
65
|
sort: ["Most recent", "A-Z", "Z-A"],
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://
|
|
1
|
+
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
|
2
2
|
|
|
3
3
|
exports[`Component/ResultsBar Empty smoke-test 1`] = `
|
|
4
4
|
<div class="mx-page default">
|
|
@@ -14,7 +14,7 @@ exports[`Component/ResultsBar Empty smoke-test 1`] = `
|
|
|
14
14
|
|
|
15
15
|
exports[`Component/ResultsBar ResultsBar smoke-test 1`] = `
|
|
16
16
|
<div class="mx-page default">
|
|
17
|
-
<div class="mx-results-bar
|
|
17
|
+
<div class="mx-results-bar">
|
|
18
18
|
<span aria-live="polite">
|
|
19
19
|
Showing results 1 - 10 of 250 results
|
|
20
20
|
</span>
|
|
@@ -24,7 +24,7 @@ exports[`Component/ResultsBar ResultsBar smoke-test 1`] = `
|
|
|
24
24
|
|
|
25
25
|
exports[`Component/ResultsBar Sort smoke-test 1`] = `
|
|
26
26
|
<div class="mx-page default">
|
|
27
|
-
<div class="mx-results-bar
|
|
27
|
+
<div class="mx-results-bar">
|
|
28
28
|
<span aria-live="polite">
|
|
29
29
|
Showing results 1 - 10 of 250 results
|
|
30
30
|
</span>
|
|
@@ -89,6 +89,46 @@ const meta: Meta<NavigationType> = {
|
|
|
89
89
|
},
|
|
90
90
|
],
|
|
91
91
|
},
|
|
92
|
+
argTypes: {
|
|
93
|
+
parent: {
|
|
94
|
+
description:
|
|
95
|
+
"A [Link](/?path=/docs/atom-link--docs) objects for the parent page shown at the top of the menu.",
|
|
96
|
+
type: {
|
|
97
|
+
name: "other",
|
|
98
|
+
required: true,
|
|
99
|
+
value: "array",
|
|
100
|
+
},
|
|
101
|
+
table: {
|
|
102
|
+
type: { summary: "Link" },
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
items: {
|
|
106
|
+
description:
|
|
107
|
+
"A list of [Link](/?path=/docs/atom-link--docs) objects, that can have nested `items` included. The `current` setting should be used for the current page link.",
|
|
108
|
+
type: {
|
|
109
|
+
name: "other",
|
|
110
|
+
required: true,
|
|
111
|
+
value: "array",
|
|
112
|
+
},
|
|
113
|
+
table: {
|
|
114
|
+
type: { summary: "Link[]" },
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
title: {
|
|
118
|
+
description: "The nav elements `aria-label` value.",
|
|
119
|
+
type: {
|
|
120
|
+
name: "string",
|
|
121
|
+
required: true,
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
id: {
|
|
125
|
+
description: "The unique id for the navigation.",
|
|
126
|
+
type: {
|
|
127
|
+
name: "string",
|
|
128
|
+
required: true,
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
},
|
|
92
132
|
}
|
|
93
133
|
|
|
94
134
|
export default meta
|
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
@layer design-system.components {
|
|
6
6
|
.mx-side-nav__parent {
|
|
7
|
-
border-block-end: var(--line-width, 2px) solid
|
|
8
|
-
var(--line-colour, currentcolor);
|
|
7
|
+
border-block-end: var(--line-width, 2px) solid var(--line-colour, currentcolor);
|
|
9
8
|
|
|
10
9
|
& a {
|
|
11
10
|
display: block;
|
|
@@ -33,11 +32,9 @@
|
|
|
33
32
|
& a {
|
|
34
33
|
display: block;
|
|
35
34
|
color: inherit;
|
|
36
|
-
border-block-end: var(--line-width, 1px) solid
|
|
37
|
-
var(--line-colour, var(--colour-border));
|
|
35
|
+
border-block-end: var(--line-width, 1px) solid var(--line-colour, var(--colour-border));
|
|
38
36
|
padding-block: var(--item-spacing, var(--spacing-xxs));
|
|
39
|
-
padding-inline: var(--indent, var(--spacing-xxs))
|
|
40
|
-
var(--item-spacing, var(--spacing-xxs));
|
|
37
|
+
padding-inline: var(--indent, var(--spacing-xxs)) var(--item-spacing, var(--spacing-xxs));
|
|
41
38
|
}
|
|
42
39
|
}
|
|
43
40
|
|
|
@@ -50,6 +50,26 @@ const meta: Meta<SocialLinksType> = {
|
|
|
50
50
|
}),
|
|
51
51
|
],
|
|
52
52
|
},
|
|
53
|
+
argTypes: {
|
|
54
|
+
title: {
|
|
55
|
+
description: "Optional [Heading](/?path=/docs/atom-heading--docs) component.",
|
|
56
|
+
control: "text",
|
|
57
|
+
table: {
|
|
58
|
+
type: { summary: "Heading" },
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
items: {
|
|
62
|
+
description: `A list of [Link](/?path=/docs/atom-link--docs) objects to use for the menu. These should include the relevant [Icon](/?path=/docs/atom-icon--docs)`,
|
|
63
|
+
type: {
|
|
64
|
+
name: "other",
|
|
65
|
+
required: true,
|
|
66
|
+
value: "array",
|
|
67
|
+
},
|
|
68
|
+
table: {
|
|
69
|
+
type: { summary: "Link[]" },
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
},
|
|
53
73
|
}
|
|
54
74
|
|
|
55
75
|
export default meta
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://
|
|
1
|
+
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
|
2
2
|
|
|
3
3
|
exports[`Component/SocialLinks SocialLinks smoke-test 1`] = `
|
|
4
4
|
<div class="mx-page default">
|
|
5
5
|
<nav class="mx-social-links"
|
|
6
6
|
aria-label="Social media links"
|
|
7
7
|
>
|
|
8
|
-
<h2 class="
|
|
8
|
+
<h2 class="mx-heading--m">
|
|
9
9
|
Follow us
|
|
10
10
|
</h2>
|
|
11
11
|
<a href="#">
|
|
12
|
-
<span class="mx-icon mx-icon--facebook
|
|
12
|
+
<span class="mx-icon mx-icon--facebook mx-icon--size-md">
|
|
13
13
|
</span>
|
|
14
14
|
<span class="sr-only">
|
|
15
15
|
Facebook
|
|
16
16
|
</span>
|
|
17
17
|
</a>
|
|
18
18
|
<a href="#">
|
|
19
|
-
<span class="mx-icon mx-icon--instagram
|
|
19
|
+
<span class="mx-icon mx-icon--instagram mx-icon--size-md">
|
|
20
20
|
</span>
|
|
21
21
|
<span class="sr-only">
|
|
22
22
|
Instagram
|
|
23
23
|
</span>
|
|
24
24
|
</a>
|
|
25
25
|
<a href="#">
|
|
26
|
-
<span class="mx-icon mx-icon--linkedin
|
|
26
|
+
<span class="mx-icon mx-icon--linkedin mx-icon--size-md">
|
|
27
27
|
</span>
|
|
28
28
|
<span class="sr-only">
|
|
29
29
|
LinkedIn
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Meta, StoryObj } from "@storybook/html-vite"
|
|
2
|
+
import Component from "./social-share.twig"
|
|
3
|
+
import { SocialShare as SocialShareType } from "@pnx-mixtape/ids-shape"
|
|
4
|
+
|
|
5
|
+
const meta: Meta<SocialShareType> = {
|
|
6
|
+
tags: ["autodocs"],
|
|
7
|
+
component: Component,
|
|
8
|
+
args: {
|
|
9
|
+
twitter: "https://twitter.com/intent/tweet",
|
|
10
|
+
bluesky: "https://bsky.app/intent/compose",
|
|
11
|
+
facebook: "https://www.facebook.com/sharer.php",
|
|
12
|
+
linkedin: "https://www.linkedin.com/shareArticle",
|
|
13
|
+
email: "mailto:",
|
|
14
|
+
},
|
|
15
|
+
argTypes: {
|
|
16
|
+
twitter: {
|
|
17
|
+
description: "To include a twitter option, add it's share URL with relevant params.",
|
|
18
|
+
},
|
|
19
|
+
bluesky: {
|
|
20
|
+
description: "To include a blueksy option, add it's share URL with relevant params.",
|
|
21
|
+
},
|
|
22
|
+
facebook: {
|
|
23
|
+
description: "To include a facebook option, add it's share URL with relevant params.",
|
|
24
|
+
},
|
|
25
|
+
linkedin: {
|
|
26
|
+
description: "To include a linkedin option, add it's share URL with relevant params.",
|
|
27
|
+
},
|
|
28
|
+
email: {
|
|
29
|
+
description: "To include an email option, add a `mailto:` url",
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export default meta
|
|
35
|
+
type Story = StoryObj<SocialShareType>
|
|
36
|
+
|
|
37
|
+
export const SocialShare: Story = {}
|
|
@@ -21,10 +21,8 @@ const SocialShare = ({
|
|
|
21
21
|
const socialShareUrl: string = useMemo(() => {
|
|
22
22
|
if (type === SocialShareTypes.TWITTER)
|
|
23
23
|
return encodeURI(`${twitterUrl}?url=${shareUrl}&text=${text}`)
|
|
24
|
-
if (type === SocialShareTypes.FACEBOOK)
|
|
25
|
-
|
|
26
|
-
if (type === SocialShareTypes.LINKEDIN)
|
|
27
|
-
return encodeURI(`${linkedInUrl}/?url=${shareUrl}`)
|
|
24
|
+
if (type === SocialShareTypes.FACEBOOK) return encodeURI(`${facebookUrl}?url=${shareUrl}`)
|
|
25
|
+
if (type === SocialShareTypes.LINKEDIN) return encodeURI(`${linkedInUrl}/?url=${shareUrl}`)
|
|
28
26
|
return ""
|
|
29
27
|
}, [type])
|
|
30
28
|
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
|
2
|
+
|
|
3
|
+
exports[`Component/SocialShare SocialShare smoke-test 1`] = `
|
|
4
|
+
<div class="mx-page default">
|
|
5
|
+
<nav class="mx-social-share flex gap--s"
|
|
6
|
+
aria-label="Social share buttons"
|
|
7
|
+
>
|
|
8
|
+
<a class="mx-link mx-icon mx-icon--only mx-icon--bluesky"
|
|
9
|
+
href="https://bsky.app/intent/compose"
|
|
10
|
+
target="_blank"
|
|
11
|
+
>
|
|
12
|
+
Share to Bluesky
|
|
13
|
+
</a>
|
|
14
|
+
<a class="mx-link mx-icon mx-icon--only mx-icon--twitter"
|
|
15
|
+
href="https://twitter.com/intent/tweet"
|
|
16
|
+
target="_blank"
|
|
17
|
+
>
|
|
18
|
+
Share to X (Twitter)
|
|
19
|
+
</a>
|
|
20
|
+
<a class="mx-link mx-icon mx-icon--only mx-icon--linkedin"
|
|
21
|
+
href="https://www.linkedin.com/shareArticle"
|
|
22
|
+
target="_blank"
|
|
23
|
+
>
|
|
24
|
+
Share to LinkedIn
|
|
25
|
+
</a>
|
|
26
|
+
<a class="mx-link mx-icon mx-icon--only mx-icon--facebook"
|
|
27
|
+
href="https://www.facebook.com/sharer.php"
|
|
28
|
+
target="_blank"
|
|
29
|
+
>
|
|
30
|
+
Share to Facebook
|
|
31
|
+
</a>
|
|
32
|
+
<a class="mx-link mx-icon mx-icon--only mx-icon--email"
|
|
33
|
+
href="mailto:"
|
|
34
|
+
target="_blank"
|
|
35
|
+
>
|
|
36
|
+
Share via email
|
|
37
|
+
</a>
|
|
38
|
+
</nav>
|
|
39
|
+
</div>
|
|
40
|
+
`;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{% set classes = [
|
|
2
|
+
"mx-social-share",
|
|
3
|
+
"flex",
|
|
4
|
+
'gap--s',
|
|
5
|
+
] %}
|
|
6
|
+
{% set attributes = (attributes ?? create_attribute()).addClass(classes) %}
|
|
7
|
+
|
|
8
|
+
<nav{{ attributes }} aria-label="Social share buttons">
|
|
9
|
+
{% if bluesky is not empty %}
|
|
10
|
+
<a class="mx-link mx-icon mx-icon--only mx-icon--bluesky" href="{{ bluesky }}" target="_blank">
|
|
11
|
+
Share to Bluesky
|
|
12
|
+
</a>
|
|
13
|
+
{% endif %}
|
|
14
|
+
{% if twitter is not empty %}
|
|
15
|
+
<a class="mx-link mx-icon mx-icon--only mx-icon--twitter" href="{{ twitter }}" target="_blank">
|
|
16
|
+
Share to X (Twitter)
|
|
17
|
+
</a>
|
|
18
|
+
{% endif %}
|
|
19
|
+
{% if linkedin is not empty %}
|
|
20
|
+
<a class="mx-link mx-icon mx-icon--only mx-icon--linkedin" href="{{ linkedin }}" target="_blank">
|
|
21
|
+
Share to LinkedIn
|
|
22
|
+
</a>
|
|
23
|
+
{% endif %}
|
|
24
|
+
{% if facebook is not empty %}
|
|
25
|
+
<a class="mx-link mx-icon mx-icon--only mx-icon--facebook" href="{{ facebook }}" target="_blank">
|
|
26
|
+
Share to Facebook
|
|
27
|
+
</a>
|
|
28
|
+
{% endif %}
|
|
29
|
+
{% if email is not empty %}
|
|
30
|
+
<a class="mx-link mx-icon mx-icon--only mx-icon--email" href="{{ email }}" target="_blank">
|
|
31
|
+
Share via email
|
|
32
|
+
</a>
|
|
33
|
+
{% endif %}
|
|
34
|
+
</nav>
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Meta, StoryObj } from "@storybook/html-vite"
|
|
2
|
+
import Component from "./step-item.twig"
|
|
3
|
+
import "./steps.css"
|
|
4
|
+
import { StepItem as StepsItemType } from "@pnx-mixtape/ids-shape"
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* An individual Steps item, design to be used in its parent context.
|
|
8
|
+
*/
|
|
9
|
+
const meta: Meta<StepsItemType> = {
|
|
10
|
+
tags: ["autodocs", "ids-mvp"],
|
|
11
|
+
component: Component,
|
|
12
|
+
args: {
|
|
13
|
+
content:
|
|
14
|
+
"<h2>Funk</h2><p>Funk is the ipsum dolor sit amet, consectetur adipiscing elit. Proin at finibus velit. Curabitur consequat, dolor venenatis ullamcorper commodo, quam mi iaculis sem, non varius massa risus et enim. Interdum et malesuada fames ac ante ipsum primis in faucibus. Phasellus non mi lorem. Morbi semper sagittis euismod. Vestibulum non ornare orci.</p>",
|
|
15
|
+
status: false,
|
|
16
|
+
},
|
|
17
|
+
argTypes: {
|
|
18
|
+
status: {
|
|
19
|
+
description: "Fill the marker with a solid colour.",
|
|
20
|
+
control: "boolean",
|
|
21
|
+
table: {
|
|
22
|
+
defaultValue: { summary: "false" },
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
content: {
|
|
26
|
+
description: "Content.",
|
|
27
|
+
control: "text",
|
|
28
|
+
type: {
|
|
29
|
+
name: "string",
|
|
30
|
+
required: true,
|
|
31
|
+
},
|
|
32
|
+
table: {
|
|
33
|
+
type: { summary: "WysiwygText" },
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export default meta
|
|
40
|
+
type Story = StoryObj<StepsItemType>
|
|
41
|
+
|
|
42
|
+
export const StepItem: Story = {}
|
|
43
|
+
|
|
44
|
+
export const Filled: Story = {
|
|
45
|
+
args: {
|
|
46
|
+
status: true,
|
|
47
|
+
},
|
|
48
|
+
}
|
|
@@ -4,18 +4,16 @@ import StepItem from "./step-item.twig"
|
|
|
4
4
|
import "./steps.css"
|
|
5
5
|
import { Steps as StepsType, StepsModifier } from "@pnx-mixtape/ids-shape"
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* Steps create a visually connected group of content displayed in a linear way.
|
|
9
|
+
*/
|
|
7
10
|
const meta: Meta<StepsType> = {
|
|
8
11
|
tags: ["autodocs", "ids-mvp"],
|
|
9
12
|
component: Component,
|
|
10
|
-
argTypes: {
|
|
11
|
-
modifiers: {
|
|
12
|
-
options: Object.values(StepsModifier),
|
|
13
|
-
control: "multi-select",
|
|
14
|
-
},
|
|
15
|
-
fill: { control: "boolean" },
|
|
16
|
-
counters: { control: "boolean" },
|
|
17
|
-
},
|
|
18
13
|
args: {
|
|
14
|
+
modifiers: [StepsModifier.LIGHT],
|
|
15
|
+
fill: false,
|
|
16
|
+
counters: false,
|
|
19
17
|
items: [
|
|
20
18
|
StepItem({
|
|
21
19
|
content:
|
|
@@ -31,6 +29,43 @@ const meta: Meta<StepsType> = {
|
|
|
31
29
|
}),
|
|
32
30
|
],
|
|
33
31
|
},
|
|
32
|
+
argTypes: {
|
|
33
|
+
modifiers: {
|
|
34
|
+
description: "Change the colour of the line and marker.",
|
|
35
|
+
options: Object.values(StepsModifier),
|
|
36
|
+
control: "check",
|
|
37
|
+
type: "string",
|
|
38
|
+
table: {
|
|
39
|
+
defaultValue: { summary: StepsModifier.LIGHT },
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
fill: {
|
|
43
|
+
description: "Fill the marker with a solid colour.",
|
|
44
|
+
control: "boolean",
|
|
45
|
+
table: {
|
|
46
|
+
defaultValue: { summary: "false" },
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
counters: {
|
|
50
|
+
description: "Add a counter into the marker.",
|
|
51
|
+
control: "boolean",
|
|
52
|
+
table: {
|
|
53
|
+
defaultValue: { summary: "false" },
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
items: {
|
|
57
|
+
description:
|
|
58
|
+
"A list of [StepItem](/?path=/docs/component-steps-stepitem--docs) objects, where `status` fills in it's individual marker only.",
|
|
59
|
+
type: {
|
|
60
|
+
name: "other",
|
|
61
|
+
required: true,
|
|
62
|
+
value: "array",
|
|
63
|
+
},
|
|
64
|
+
table: {
|
|
65
|
+
type: { summary: "StepItem[]" },
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
},
|
|
34
69
|
}
|
|
35
70
|
|
|
36
71
|
export default meta
|
|
@@ -38,21 +73,36 @@ type Story = StoryObj<StepsType>
|
|
|
38
73
|
|
|
39
74
|
export const Steps: Story = {}
|
|
40
75
|
|
|
76
|
+
/**
|
|
77
|
+
* Add a counter to each step.
|
|
78
|
+
*/
|
|
41
79
|
export const Counters: Story = {
|
|
42
80
|
args: {
|
|
43
81
|
counters: true,
|
|
44
82
|
},
|
|
45
83
|
}
|
|
46
|
-
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* All steps can be filled at once.
|
|
87
|
+
*/
|
|
88
|
+
export const Filled: Story = {
|
|
89
|
+
args: {
|
|
90
|
+
fill: true,
|
|
91
|
+
},
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Setting an individual StepItem `status=true` can help highlight a particular item.
|
|
96
|
+
*/
|
|
97
|
+
export const Highlighted: Story = {
|
|
47
98
|
args: {
|
|
48
|
-
modifiers: [StepsModifier.SUPPLEMENTARY],
|
|
49
99
|
items: [
|
|
50
100
|
StepItem({
|
|
51
|
-
status: true,
|
|
52
101
|
content:
|
|
53
102
|
"Funk is the ipsum dolor sit amet, consectetur adipiscing elit. Proin at finibus velit. Curabitur consequat, dolor venenatis ullamcorper commodo, quam mi iaculis sem, non varius massa risus et enim. Interdum et malesuada fames ac ante ipsum primis in faucibus. Phasellus non mi lorem. Morbi semper sagittis euismod. Vestibulum non ornare orci.",
|
|
54
103
|
}),
|
|
55
104
|
StepItem({
|
|
105
|
+
status: true,
|
|
56
106
|
content:
|
|
57
107
|
"Soul music ipsum dolor sit amet, consectetur adipiscing elit. Proin at finibus velit. Curabitur consequat, dolor venenatis ullamcorper commodo, quam mi iaculis sem, non varius massa risus et enim. Interdum et malesuada fames ac ante ipsum primis in faucibus. Phasellus non mi lorem.",
|
|
58
108
|
}),
|
|
@@ -64,9 +114,11 @@ export const Progress: Story = {
|
|
|
64
114
|
},
|
|
65
115
|
}
|
|
66
116
|
|
|
67
|
-
|
|
117
|
+
/**
|
|
118
|
+
* Combining individual StepItem `status=true` with counters can help show progress.
|
|
119
|
+
*/
|
|
120
|
+
export const Progress: Story = {
|
|
68
121
|
args: {
|
|
69
|
-
modifiers: [StepsModifier.DARK],
|
|
70
122
|
counters: true,
|
|
71
123
|
items: [
|
|
72
124
|
StepItem({
|
|
@@ -86,3 +138,20 @@ export const ProgressCounters: Story = {
|
|
|
86
138
|
],
|
|
87
139
|
},
|
|
88
140
|
}
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Brand colours can be applied to steps.
|
|
144
|
+
*/
|
|
145
|
+
export const Primary: Story = {
|
|
146
|
+
args: {
|
|
147
|
+
...Progress.args,
|
|
148
|
+
modifiers: [StepsModifier.DARK],
|
|
149
|
+
},
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export const Accent: Story = {
|
|
153
|
+
args: {
|
|
154
|
+
...Progress.args,
|
|
155
|
+
modifiers: [StepsModifier.SUPPLEMENTARY],
|
|
156
|
+
},
|
|
157
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
|
2
|
+
|
|
3
|
+
exports[`Component/Steps/StepItem Filled smoke-test 1`] = `
|
|
4
|
+
<div class="mx-page default">
|
|
5
|
+
<div class="mx-steps__panel mx-steps--fill">
|
|
6
|
+
<div class="mx-steps__panel-content mx-container mx-vertical-flow mx-rich-text">
|
|
7
|
+
<h2>
|
|
8
|
+
Funk
|
|
9
|
+
</h2>
|
|
10
|
+
<p>
|
|
11
|
+
Funk is the ipsum dolor sit amet, consectetur adipiscing elit. Proin at finibus velit. Curabitur consequat, dolor venenatis ullamcorper commodo, quam mi iaculis sem, non varius massa risus et enim. Interdum et malesuada fames ac ante ipsum primis in faucibus. Phasellus non mi lorem. Morbi semper sagittis euismod. Vestibulum non ornare orci.
|
|
12
|
+
</p>
|
|
13
|
+
</div>
|
|
14
|
+
</div>
|
|
15
|
+
</div>
|
|
16
|
+
`;
|
|
17
|
+
|
|
18
|
+
exports[`Component/Steps/StepItem StepItem smoke-test 1`] = `
|
|
19
|
+
<div class="mx-page default">
|
|
20
|
+
<div class="mx-steps__panel">
|
|
21
|
+
<div class="mx-steps__panel-content mx-container mx-vertical-flow mx-rich-text">
|
|
22
|
+
<h2>
|
|
23
|
+
Funk
|
|
24
|
+
</h2>
|
|
25
|
+
<p>
|
|
26
|
+
Funk is the ipsum dolor sit amet, consectetur adipiscing elit. Proin at finibus velit. Curabitur consequat, dolor venenatis ullamcorper commodo, quam mi iaculis sem, non varius massa risus et enim. Interdum et malesuada fames ac ante ipsum primis in faucibus. Phasellus non mi lorem. Morbi semper sagittis euismod. Vestibulum non ornare orci.
|
|
27
|
+
</p>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
`;
|