@pnx-mixtape/mxds 0.0.22 → 0.0.24
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/.storybook/decorators.ts +7 -0
- package/.storybook/main.ts +21 -0
- package/.storybook/manager.ts +6 -0
- package/.storybook/preview.ts +60 -0
- package/.storybook/public/demo-logo.svg +4 -0
- package/.storybook/public/design-system.svg +1 -0
- package/.storybook/public/favicon.svg +7 -0
- package/.storybook/public/mixtape-logo.png +0 -0
- package/.storybook/public/mixtape.webp +0 -0
- package/.storybook/public/pinto.png +0 -0
- package/.storybook/public/pinto.svg +1 -0
- package/.storybook/public/xb.png +0 -0
- package/.storybook/public/xb.svg +1 -0
- package/.storybook/src/global.d.ts +16 -0
- package/.storybook/src/theme.ts +8 -0
- package/.storybook/storybook.css +35 -0
- package/.storybook/test-runner.ts +77 -0
- package/.storybook/theme-demo.css +89 -0
- package/dist/build/accordion.entry.js +32 -43
- package/dist/build/accordion.entry.js.map +1 -1
- package/dist/build/base.css +17 -39
- package/dist/build/button.css +9 -10
- 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.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 +9 -23
- 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 +13 -12
- package/src/Atom/{Base.mdx → Atom.mdx} +19 -19
- package/src/Atom/Background/{Backgrounds.stories.ts → Background.stories.ts} +23 -5
- package/src/Atom/Background/__snapshots__/{Backgrounds.stories.ts.snap → Background.stories.ts.snap} +86 -26
- package/src/Atom/Background/_background.css +9 -12
- package/src/Atom/Background/backgrounds.twig +6 -4
- package/src/Atom/Blockquote/_blockquote.css +1 -2
- package/src/Atom/Button/Button.stories.ts +128 -20
- 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-styles.css +18 -6
- package/src/Atom/Button/_buttons.css +4 -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/_extended-set.css +0 -8
- package/src/Atom/Icon/_icon.css +9 -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/Link/_links.css +1 -0
- 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/Table.stories.ts +0 -1
- 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 +2 -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 +16 -16
- package/src/Component/Card/__snapshots__/Card.stories.tsx.snap +1 -1
- package/src/Component/Card/card.css +2 -6
- 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 +288 -2
- 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 -6
- package/src/Component/HeroSearch/HeroSearch.stories.tsx +4 -4
- package/src/Component/HeroSearch/__snapshots__/HeroSearch.stories.ts.snap +142 -148
- 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 +2 -6
- 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 +304 -0
- package/src/Component/Popover/__snapshots__/Popover.stories.ts.snap +534 -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 +97 -16
- package/src/Component/Steps/steps.css +8 -14
- 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/InputDivider.stories.ts +0 -1
- 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 +2 -2
- 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 +5 -5
- package/src/Layout/Header/__snapshots__/Header.stories.tsx.snap +3 -3
- 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 +115 -135
- package/src/enums.ts +4 -1
- package/src/react.ts +5 -21
- package/src/tokens.js +27 -20
- 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,10 +2,7 @@ import { Meta, StoryObj } from "@storybook/html-vite"
|
|
|
2
2
|
import Component from "./twig/in-page-navigation-story.twig"
|
|
3
3
|
import "./in-page-navigation.css"
|
|
4
4
|
import "./Elements/InPageNavigation"
|
|
5
|
-
import {
|
|
6
|
-
HeadingTypes,
|
|
7
|
-
InPageNavigation as InPageNavigationType,
|
|
8
|
-
} from "@pnx-mixtape/ids-shape"
|
|
5
|
+
import { HeadingTypes, InPageNavigation as InPageNavigationType } from "@pnx-mixtape/ids-shape"
|
|
9
6
|
|
|
10
7
|
// Deps.
|
|
11
8
|
import Heading from "../../Atom/Heading/heading.twig"
|
|
@@ -13,6 +10,10 @@ import Link from "../../Atom/Link/link.twig"
|
|
|
13
10
|
import Icon from "../../Atom/Icon/icon.twig"
|
|
14
11
|
import { Icons } from "../../enums"
|
|
15
12
|
|
|
13
|
+
/**
|
|
14
|
+
* A table of contents with anchor links to the headings.
|
|
15
|
+
* It is enhanced by the `InPageNavigation` element javascript (not needed if all headings have IDs and the `items` are provided).
|
|
16
|
+
*/
|
|
16
17
|
const meta: Meta<InPageNavigationType> = {
|
|
17
18
|
tags: ["autodocs", "ids-mvp"],
|
|
18
19
|
component: Component,
|
|
@@ -47,13 +48,28 @@ const meta: Meta<InPageNavigationType> = {
|
|
|
47
48
|
],
|
|
48
49
|
},
|
|
49
50
|
argTypes: {
|
|
50
|
-
levels: {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
"title.as": { options: Object.values(HeadingTypes), control: "select" },
|
|
54
|
-
"title.modifiers": {
|
|
51
|
+
levels: {
|
|
52
|
+
description:
|
|
53
|
+
"If no `items` are provided, the javascript can build the items from the headings. This chooses the headings to include. eg; `h2,h3`",
|
|
55
54
|
options: Object.values(HeadingTypes),
|
|
56
55
|
control: "multi-select",
|
|
56
|
+
table: {
|
|
57
|
+
type: { summary: "enum" },
|
|
58
|
+
defaultValue: { summary: HeadingTypes.TWO },
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
title: {
|
|
62
|
+
description: "Optional [Heading](/?path=/docs/atom-heading--docs) component.",
|
|
63
|
+
control: "text",
|
|
64
|
+
table: {
|
|
65
|
+
type: { summary: "Heading" },
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
items: {
|
|
69
|
+
description: "A list of [Link](/?path=/docs/atom-link--docs) objects to use for the menu.",
|
|
70
|
+
table: {
|
|
71
|
+
type: { summary: "Link[]" },
|
|
72
|
+
},
|
|
57
73
|
},
|
|
58
74
|
},
|
|
59
75
|
}
|
|
@@ -62,3 +78,22 @@ export default meta
|
|
|
62
78
|
type Story = StoryObj<InPageNavigationType>
|
|
63
79
|
|
|
64
80
|
export const InPageNavigation: Story = {}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* When the `items` are empty, the Javascript builds them.
|
|
84
|
+
*/
|
|
85
|
+
export const GeneratedItems: Story = {
|
|
86
|
+
args: {
|
|
87
|
+
items: [],
|
|
88
|
+
},
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Adding levels builds a nested menu.
|
|
93
|
+
*/
|
|
94
|
+
export const Nested: Story = {
|
|
95
|
+
args: {
|
|
96
|
+
items: [],
|
|
97
|
+
levels: [HeadingTypes.TWO, HeadingTypes.THREE],
|
|
98
|
+
},
|
|
99
|
+
}
|
|
@@ -14,69 +14,61 @@ const meta: Meta<typeof Component> = {
|
|
|
14
14
|
<div className="mx-vertical-flow">
|
|
15
15
|
<Heading level={HeadingLevels.TWO}>Section 1</Heading>
|
|
16
16
|
<Text>
|
|
17
|
-
In publishing and graphic design, lorem ipsum is a placeholder text
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
before the content itself has been produced.
|
|
17
|
+
In publishing and graphic design, lorem ipsum is a placeholder text commonly used to
|
|
18
|
+
demonstrate the visual form of a document without relying on meaningful content. Replacing
|
|
19
|
+
the actual content with placeholder text allows designers to design the form of the
|
|
20
|
+
content before the content itself has been produced.
|
|
22
21
|
</Text>
|
|
23
22
|
<Heading level={HeadingLevels.TWO} id="anchor-test">
|
|
24
23
|
Section 2
|
|
25
24
|
</Heading>
|
|
26
25
|
<Text>
|
|
27
|
-
In publishing and graphic design, lorem ipsum is a placeholder text
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
before the content itself has been produced.
|
|
26
|
+
In publishing and graphic design, lorem ipsum is a placeholder text commonly used to
|
|
27
|
+
demonstrate the visual form of a document without relying on meaningful content. Replacing
|
|
28
|
+
the actual content with placeholder text allows designers to design the form of the
|
|
29
|
+
content before the content itself has been produced.
|
|
32
30
|
</Text>
|
|
33
31
|
<Heading level={HeadingLevels.THREE}>Test level 3</Heading>
|
|
34
32
|
<Text>
|
|
35
|
-
In publishing and graphic design, lorem ipsum is a placeholder text
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
before the content itself has been produced.
|
|
33
|
+
In publishing and graphic design, lorem ipsum is a placeholder text commonly used to
|
|
34
|
+
demonstrate the visual form of a document without relying on meaningful content. Replacing
|
|
35
|
+
the actual content with placeholder text allows designers to design the form of the
|
|
36
|
+
content before the content itself has been produced.
|
|
40
37
|
</Text>
|
|
41
38
|
<Heading level={HeadingLevels.TWO}>Section 3</Heading>
|
|
42
39
|
<Text>
|
|
43
|
-
In publishing and graphic design, lorem ipsum is a placeholder text
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
before the content itself has been produced.
|
|
40
|
+
In publishing and graphic design, lorem ipsum is a placeholder text commonly used to
|
|
41
|
+
demonstrate the visual form of a document without relying on meaningful content. Replacing
|
|
42
|
+
the actual content with placeholder text allows designers to design the form of the
|
|
43
|
+
content before the content itself has been produced.
|
|
48
44
|
</Text>
|
|
49
45
|
<Heading level={HeadingLevels.TWO}>Section 4</Heading>
|
|
50
46
|
<Text>
|
|
51
|
-
In publishing and graphic design, lorem ipsum is a placeholder text
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
before the content itself has been produced.
|
|
47
|
+
In publishing and graphic design, lorem ipsum is a placeholder text commonly used to
|
|
48
|
+
demonstrate the visual form of a document without relying on meaningful content. Replacing
|
|
49
|
+
the actual content with placeholder text allows designers to design the form of the
|
|
50
|
+
content before the content itself has been produced.
|
|
56
51
|
</Text>
|
|
57
52
|
<Heading level={HeadingLevels.TWO}>Section 5</Heading>
|
|
58
53
|
<Text>
|
|
59
|
-
In publishing and graphic design, lorem ipsum is a placeholder text
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
before the content itself has been produced.
|
|
54
|
+
In publishing and graphic design, lorem ipsum is a placeholder text commonly used to
|
|
55
|
+
demonstrate the visual form of a document without relying on meaningful content. Replacing
|
|
56
|
+
the actual content with placeholder text allows designers to design the form of the
|
|
57
|
+
content before the content itself has been produced.
|
|
64
58
|
</Text>
|
|
65
59
|
<Heading level={HeadingLevels.THREE}>Test level 6</Heading>
|
|
66
60
|
<Text>
|
|
67
|
-
In publishing and graphic design, lorem ipsum is a placeholder text
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
before the content itself has been produced.
|
|
61
|
+
In publishing and graphic design, lorem ipsum is a placeholder text commonly used to
|
|
62
|
+
demonstrate the visual form of a document without relying on meaningful content. Replacing
|
|
63
|
+
the actual content with placeholder text allows designers to design the form of the
|
|
64
|
+
content before the content itself has been produced.
|
|
72
65
|
</Text>
|
|
73
66
|
<Heading level={HeadingLevels.TWO}>Section 7</Heading>
|
|
74
67
|
<Text>
|
|
75
|
-
In publishing and graphic design, lorem ipsum is a placeholder text
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
before the content itself has been produced.
|
|
68
|
+
In publishing and graphic design, lorem ipsum is a placeholder text commonly used to
|
|
69
|
+
demonstrate the visual form of a document without relying on meaningful content. Replacing
|
|
70
|
+
the actual content with placeholder text allows designers to design the form of the
|
|
71
|
+
content before the content itself has been produced.
|
|
80
72
|
</Text>
|
|
81
73
|
</div>
|
|
82
74
|
</Sidebar>
|
|
@@ -1,4 +1,73 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://
|
|
1
|
+
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
|
2
|
+
|
|
3
|
+
exports[`Component/InPageNavigation GeneratedItems smoke-test 1`] = `
|
|
4
|
+
<div class="mx-page default">
|
|
5
|
+
<mx-in-page-navigation data-content=".js-content"
|
|
6
|
+
data-headings
|
|
7
|
+
>
|
|
8
|
+
<nav class="mx-nav mx-nav--list mx-in-page-navigation mx-vertical-flow">
|
|
9
|
+
<h2 class="mx-heading--m">
|
|
10
|
+
On this page
|
|
11
|
+
</h2>
|
|
12
|
+
<ul>
|
|
13
|
+
<li class="mx-in-page-navigation__level--h2">
|
|
14
|
+
<a href="#section-1">
|
|
15
|
+
<span class="mx-icon mx-icon--chevron-right">
|
|
16
|
+
</span>
|
|
17
|
+
<span>
|
|
18
|
+
Section 1
|
|
19
|
+
</span>
|
|
20
|
+
</a>
|
|
21
|
+
</li>
|
|
22
|
+
<li class="mx-in-page-navigation__level--h2">
|
|
23
|
+
<a href="#section-2">
|
|
24
|
+
<span class="mx-icon mx-icon--chevron-right">
|
|
25
|
+
</span>
|
|
26
|
+
<span>
|
|
27
|
+
Section 2
|
|
28
|
+
</span>
|
|
29
|
+
</a>
|
|
30
|
+
</li>
|
|
31
|
+
<li class="mx-in-page-navigation__level--h2">
|
|
32
|
+
<a href="#section-3">
|
|
33
|
+
<span class="mx-icon mx-icon--chevron-right">
|
|
34
|
+
</span>
|
|
35
|
+
<span>
|
|
36
|
+
Section 3
|
|
37
|
+
</span>
|
|
38
|
+
</a>
|
|
39
|
+
</li>
|
|
40
|
+
</ul>
|
|
41
|
+
</nav>
|
|
42
|
+
</mx-in-page-navigation>
|
|
43
|
+
<div class="js-content mx-rich-text mx-vertical-flow mx-section--l">
|
|
44
|
+
<h2 id="section-1">
|
|
45
|
+
Section 1
|
|
46
|
+
</h2>
|
|
47
|
+
<p>
|
|
48
|
+
In publishing and graphic design, lorem ipsum is a placeholder text commonly used to demonstrate the visual form of a document without relying on meaningful content. Replacing the actual content with placeholder text allows designers to design the form of the content before the content itself has been produced.
|
|
49
|
+
</p>
|
|
50
|
+
<h2 id="section-2">
|
|
51
|
+
Section 2
|
|
52
|
+
</h2>
|
|
53
|
+
<p>
|
|
54
|
+
In publishing and graphic design, lorem ipsum is a placeholder text commonly used to demonstrate the visual form of a document without relying on meaningful content. Replacing the actual content with placeholder text allows designers to design the form of the content before the content itself has been produced.
|
|
55
|
+
</p>
|
|
56
|
+
<h3 id="test-level-3">
|
|
57
|
+
Test level 3
|
|
58
|
+
</h3>
|
|
59
|
+
<p>
|
|
60
|
+
In publishing and graphic design, lorem ipsum is a placeholder text commonly used to demonstrate the visual form of a document without relying on meaningful content. Replacing the actual content with placeholder text allows designers to design the form of the content before the content itself has been produced.
|
|
61
|
+
</p>
|
|
62
|
+
<h2 id="section-3">
|
|
63
|
+
Section 3
|
|
64
|
+
</h2>
|
|
65
|
+
<p>
|
|
66
|
+
In publishing and graphic design, lorem ipsum is a placeholder text commonly used to demonstrate the visual form of a document without relying on meaningful content. Replacing the actual content with placeholder text allows designers to design the form of the content before the content itself has been produced.
|
|
67
|
+
</p>
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
`;
|
|
2
71
|
|
|
3
72
|
exports[`Component/InPageNavigation InPageNavigation smoke-test 1`] = `
|
|
4
73
|
<div class="mx-page default">
|
|
@@ -6,13 +75,13 @@ exports[`Component/InPageNavigation InPageNavigation smoke-test 1`] = `
|
|
|
6
75
|
data-headings
|
|
7
76
|
>
|
|
8
77
|
<nav class="mx-nav mx-nav--list mx-in-page-navigation mx-vertical-flow">
|
|
9
|
-
<h2 class="
|
|
78
|
+
<h2 class="mx-heading--m">
|
|
10
79
|
On this page
|
|
11
80
|
</h2>
|
|
12
81
|
<ul>
|
|
13
82
|
<li>
|
|
14
83
|
<a href="#section-1">
|
|
15
|
-
<span class="mx-icon mx-icon--chevron-right
|
|
84
|
+
<span class="mx-icon mx-icon--chevron-right">
|
|
16
85
|
</span>
|
|
17
86
|
<span>
|
|
18
87
|
Section 1
|
|
@@ -21,7 +90,7 @@ exports[`Component/InPageNavigation InPageNavigation smoke-test 1`] = `
|
|
|
21
90
|
</li>
|
|
22
91
|
<li>
|
|
23
92
|
<a href="#section-2">
|
|
24
|
-
<span class="mx-icon mx-icon--chevron-right
|
|
93
|
+
<span class="mx-icon mx-icon--chevron-right">
|
|
25
94
|
</span>
|
|
26
95
|
<span>
|
|
27
96
|
Section 2
|
|
@@ -30,7 +99,85 @@ exports[`Component/InPageNavigation InPageNavigation smoke-test 1`] = `
|
|
|
30
99
|
</li>
|
|
31
100
|
<li>
|
|
32
101
|
<a href="#section-3">
|
|
33
|
-
<span class="mx-icon mx-icon--chevron-right
|
|
102
|
+
<span class="mx-icon mx-icon--chevron-right">
|
|
103
|
+
</span>
|
|
104
|
+
<span>
|
|
105
|
+
Section 3
|
|
106
|
+
</span>
|
|
107
|
+
</a>
|
|
108
|
+
</li>
|
|
109
|
+
</ul>
|
|
110
|
+
</nav>
|
|
111
|
+
</mx-in-page-navigation>
|
|
112
|
+
<div class="js-content mx-rich-text mx-vertical-flow mx-section--l">
|
|
113
|
+
<h2 id="section-1">
|
|
114
|
+
Section 1
|
|
115
|
+
</h2>
|
|
116
|
+
<p>
|
|
117
|
+
In publishing and graphic design, lorem ipsum is a placeholder text commonly used to demonstrate the visual form of a document without relying on meaningful content. Replacing the actual content with placeholder text allows designers to design the form of the content before the content itself has been produced.
|
|
118
|
+
</p>
|
|
119
|
+
<h2 id="section-2">
|
|
120
|
+
Section 2
|
|
121
|
+
</h2>
|
|
122
|
+
<p>
|
|
123
|
+
In publishing and graphic design, lorem ipsum is a placeholder text commonly used to demonstrate the visual form of a document without relying on meaningful content. Replacing the actual content with placeholder text allows designers to design the form of the content before the content itself has been produced.
|
|
124
|
+
</p>
|
|
125
|
+
<h3 id="test-level-3">
|
|
126
|
+
Test level 3
|
|
127
|
+
</h3>
|
|
128
|
+
<p>
|
|
129
|
+
In publishing and graphic design, lorem ipsum is a placeholder text commonly used to demonstrate the visual form of a document without relying on meaningful content. Replacing the actual content with placeholder text allows designers to design the form of the content before the content itself has been produced.
|
|
130
|
+
</p>
|
|
131
|
+
<h2 id="section-3">
|
|
132
|
+
Section 3
|
|
133
|
+
</h2>
|
|
134
|
+
<p>
|
|
135
|
+
In publishing and graphic design, lorem ipsum is a placeholder text commonly used to demonstrate the visual form of a document without relying on meaningful content. Replacing the actual content with placeholder text allows designers to design the form of the content before the content itself has been produced.
|
|
136
|
+
</p>
|
|
137
|
+
</div>
|
|
138
|
+
</div>
|
|
139
|
+
`;
|
|
140
|
+
|
|
141
|
+
exports[`Component/InPageNavigation Nested smoke-test 1`] = `
|
|
142
|
+
<div class="mx-page default">
|
|
143
|
+
<mx-in-page-navigation data-content=".js-content"
|
|
144
|
+
data-headings="h2,h3"
|
|
145
|
+
>
|
|
146
|
+
<nav class="mx-nav mx-nav--list mx-in-page-navigation mx-vertical-flow">
|
|
147
|
+
<h2 class="mx-heading--m">
|
|
148
|
+
On this page
|
|
149
|
+
</h2>
|
|
150
|
+
<ul>
|
|
151
|
+
<li class="mx-in-page-navigation__level--h2">
|
|
152
|
+
<a href="#section-1">
|
|
153
|
+
<span class="mx-icon mx-icon--chevron-right">
|
|
154
|
+
</span>
|
|
155
|
+
<span>
|
|
156
|
+
Section 1
|
|
157
|
+
</span>
|
|
158
|
+
</a>
|
|
159
|
+
</li>
|
|
160
|
+
<li class="mx-in-page-navigation__level--h2">
|
|
161
|
+
<a href="#section-2">
|
|
162
|
+
<span class="mx-icon mx-icon--chevron-right">
|
|
163
|
+
</span>
|
|
164
|
+
<span>
|
|
165
|
+
Section 2
|
|
166
|
+
</span>
|
|
167
|
+
</a>
|
|
168
|
+
</li>
|
|
169
|
+
<li class="mx-in-page-navigation__level--h3">
|
|
170
|
+
<a href="#test-level-3">
|
|
171
|
+
<span class="mx-icon mx-icon--chevron-right">
|
|
172
|
+
</span>
|
|
173
|
+
<span>
|
|
174
|
+
Test level 3
|
|
175
|
+
</span>
|
|
176
|
+
</a>
|
|
177
|
+
</li>
|
|
178
|
+
<li class="mx-in-page-navigation__level--h2">
|
|
179
|
+
<a href="#section-3">
|
|
180
|
+
<span class="mx-icon mx-icon--chevron-right">
|
|
34
181
|
</span>
|
|
35
182
|
<span>
|
|
36
183
|
Section 3
|
|
@@ -37,6 +37,26 @@ const meta: Meta<typeof Component> = {
|
|
|
37
37
|
}),
|
|
38
38
|
],
|
|
39
39
|
},
|
|
40
|
+
argTypes: {
|
|
41
|
+
title: {
|
|
42
|
+
description: "Optional [Heading](/?path=/docs/atom-heading--docs) component.",
|
|
43
|
+
control: "text",
|
|
44
|
+
table: {
|
|
45
|
+
type: { summary: "Heading" },
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
items: {
|
|
49
|
+
description: `A list of [Link](/?path=/docs/atom-link--docs) objects to use for the menu. These should include the \`${Icons.CHEVRON_RIGHT}\` [Icon](/?path=/docs/atom-icon--docs)`,
|
|
50
|
+
type: {
|
|
51
|
+
name: "other",
|
|
52
|
+
required: true,
|
|
53
|
+
value: "array",
|
|
54
|
+
},
|
|
55
|
+
table: {
|
|
56
|
+
type: { summary: "Link[]" },
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
},
|
|
40
60
|
}
|
|
41
61
|
|
|
42
62
|
export default meta
|
|
@@ -44,6 +64,9 @@ type Story = StoryObj<typeof meta>
|
|
|
44
64
|
|
|
45
65
|
export const LinkList: Story = {}
|
|
46
66
|
|
|
67
|
+
/**
|
|
68
|
+
* Adds a heading above the list.
|
|
69
|
+
*/
|
|
47
70
|
export const WithTitle: Story = {
|
|
48
71
|
args: {
|
|
49
72
|
title: Heading({
|
|
@@ -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/LinkList LinkList smoke-test 1`] = `
|
|
4
4
|
<div class="mx-page default">
|
|
@@ -8,7 +8,7 @@ exports[`Component/LinkList LinkList smoke-test 1`] = `
|
|
|
8
8
|
<span>
|
|
9
9
|
Music
|
|
10
10
|
</span>
|
|
11
|
-
<span class="mx-icon mx-icon--chevron-right
|
|
11
|
+
<span class="mx-icon mx-icon--chevron-right">
|
|
12
12
|
</span>
|
|
13
13
|
</a>
|
|
14
14
|
</li>
|
|
@@ -17,7 +17,7 @@ exports[`Component/LinkList LinkList smoke-test 1`] = `
|
|
|
17
17
|
<span>
|
|
18
18
|
Performances
|
|
19
19
|
</span>
|
|
20
|
-
<span class="mx-icon mx-icon--chevron-right
|
|
20
|
+
<span class="mx-icon mx-icon--chevron-right">
|
|
21
21
|
</span>
|
|
22
22
|
</a>
|
|
23
23
|
</li>
|
|
@@ -26,7 +26,7 @@ exports[`Component/LinkList LinkList smoke-test 1`] = `
|
|
|
26
26
|
<span>
|
|
27
27
|
Get involved
|
|
28
28
|
</span>
|
|
29
|
-
<span class="mx-icon mx-icon--chevron-right
|
|
29
|
+
<span class="mx-icon mx-icon--chevron-right">
|
|
30
30
|
</span>
|
|
31
31
|
</a>
|
|
32
32
|
</li>
|
|
@@ -36,7 +36,7 @@ exports[`Component/LinkList LinkList smoke-test 1`] = `
|
|
|
36
36
|
|
|
37
37
|
exports[`Component/LinkList WithTitle smoke-test 1`] = `
|
|
38
38
|
<div class="mx-page default">
|
|
39
|
-
<h2 class="
|
|
39
|
+
<h2 class="mx-heading--m">
|
|
40
40
|
Popular links
|
|
41
41
|
</h2>
|
|
42
42
|
<ul class="mx-link-list">
|
|
@@ -45,7 +45,7 @@ exports[`Component/LinkList WithTitle smoke-test 1`] = `
|
|
|
45
45
|
<span>
|
|
46
46
|
Music
|
|
47
47
|
</span>
|
|
48
|
-
<span class="mx-icon mx-icon--chevron-right
|
|
48
|
+
<span class="mx-icon mx-icon--chevron-right">
|
|
49
49
|
</span>
|
|
50
50
|
</a>
|
|
51
51
|
</li>
|
|
@@ -54,7 +54,7 @@ exports[`Component/LinkList WithTitle smoke-test 1`] = `
|
|
|
54
54
|
<span>
|
|
55
55
|
Performances
|
|
56
56
|
</span>
|
|
57
|
-
<span class="mx-icon mx-icon--chevron-right
|
|
57
|
+
<span class="mx-icon mx-icon--chevron-right">
|
|
58
58
|
</span>
|
|
59
59
|
</a>
|
|
60
60
|
</li>
|
|
@@ -63,7 +63,7 @@ exports[`Component/LinkList WithTitle smoke-test 1`] = `
|
|
|
63
63
|
<span>
|
|
64
64
|
Get involved
|
|
65
65
|
</span>
|
|
66
|
-
<span class="mx-icon mx-icon--chevron-right
|
|
66
|
+
<span class="mx-icon mx-icon--chevron-right">
|
|
67
67
|
</span>
|
|
68
68
|
</a>
|
|
69
69
|
</li>
|
|
@@ -9,8 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
& li {
|
|
11
11
|
min-block-size: var(--min-height, var(--spacing-xl));
|
|
12
|
-
border-block-end: var(--line-width, 1px) solid
|
|
13
|
-
var(--line-colour, var(--colour-border));
|
|
12
|
+
border-block-end: var(--line-width, 1px) solid var(--line-colour, var(--colour-border));
|
|
14
13
|
|
|
15
14
|
&:last-child {
|
|
16
15
|
border-block-end: 0;
|
|
@@ -2,11 +2,7 @@ import { JSX, PropsWithChildren } from "react"
|
|
|
2
2
|
import classNames from "classnames"
|
|
3
3
|
|
|
4
4
|
const ListItemContent = ({ children }: PropsWithChildren): JSX.Element => {
|
|
5
|
-
return (
|
|
6
|
-
<div className={classNames("mx-list-item__content", "mx-vertical-flow")}>
|
|
7
|
-
{children}
|
|
8
|
-
</div>
|
|
9
|
-
)
|
|
5
|
+
return <div className={classNames("mx-list-item__content", "mx-vertical-flow")}>{children}</div>
|
|
10
6
|
}
|
|
11
7
|
|
|
12
8
|
export default ListItemContent
|
|
@@ -5,10 +5,7 @@ type CardProps = PropsWithChildren & {
|
|
|
5
5
|
skeleton?: boolean
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
const ListItemMedia = ({
|
|
9
|
-
children,
|
|
10
|
-
skeleton = false,
|
|
11
|
-
}: CardProps): JSX.Element => {
|
|
8
|
+
const ListItemMedia = ({ children, skeleton = false }: CardProps): JSX.Element => {
|
|
12
9
|
return (
|
|
13
10
|
<figure className={classNames("mx-list-item__media", "stack")}>
|
|
14
11
|
{skeleton && <div className="mx-skeleton mx-skeleton--bg"></div>}
|