@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
|
@@ -13,8 +13,7 @@
|
|
|
13
13
|
font-weight: var(--font-weight-bold);
|
|
14
14
|
font-family: var(--font-family);
|
|
15
15
|
line-height: var(--line-height-ui);
|
|
16
|
-
border: var(--line-width, 2px) solid
|
|
17
|
-
var(--line-colour, var(--colour-border));
|
|
16
|
+
border: var(--line-width, 2px) solid var(--line-colour, var(--colour-border));
|
|
18
17
|
border-radius: var(--radius, var(--border-radius-l));
|
|
19
18
|
padding-block: var(--vertical-padding, var(--spacing-xxs));
|
|
20
19
|
padding-inline: var(--horizontal-padding, var(--spacing-m));
|
|
@@ -57,9 +56,10 @@
|
|
|
57
56
|
overflow: hidden;
|
|
58
57
|
flex-wrap: wrap;
|
|
59
58
|
|
|
60
|
-
&::before
|
|
61
|
-
|
|
62
|
-
|
|
59
|
+
&::before,
|
|
60
|
+
&::after {
|
|
61
|
+
--icon-size: 100%;
|
|
62
|
+
|
|
63
63
|
mask-size: var(--spacing-s);
|
|
64
64
|
}
|
|
65
65
|
|
|
@@ -2,7 +2,12 @@ import { Meta, StoryObj } from "@storybook/html-vite"
|
|
|
2
2
|
import Component from "./definition-list.twig"
|
|
3
3
|
import "../_base.css"
|
|
4
4
|
import { DefinitionList as DefinitionListType } from "@pnx-mixtape/ids-shape"
|
|
5
|
+
import { Icons } from "../../enums"
|
|
5
6
|
|
|
7
|
+
/**
|
|
8
|
+
* The definition list is useful for categorising short pieces of content.
|
|
9
|
+
* It uses `subgrid` to maintain alignment.
|
|
10
|
+
*/
|
|
6
11
|
const meta: Meta<DefinitionListType> = {
|
|
7
12
|
tags: ["autodocs", "ids-mvp"],
|
|
8
13
|
component: Component,
|
|
@@ -22,11 +27,23 @@ const meta: Meta<DefinitionListType> = {
|
|
|
22
27
|
},
|
|
23
28
|
],
|
|
24
29
|
},
|
|
30
|
+
argTypes: {
|
|
31
|
+
items: {
|
|
32
|
+
description:
|
|
33
|
+
"A list of title/content objects to use, where title is the `<dt>` value and content is the `<dd>` value.",
|
|
34
|
+
type: {
|
|
35
|
+
name: "other",
|
|
36
|
+
required: true,
|
|
37
|
+
value: "array",
|
|
38
|
+
},
|
|
39
|
+
table: {
|
|
40
|
+
type: { summary: "{ title: string, content: string }[]" },
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
},
|
|
25
44
|
}
|
|
26
45
|
|
|
27
46
|
export default meta
|
|
28
47
|
type Story = StoryObj<DefinitionListType>
|
|
29
48
|
|
|
30
|
-
export const DefinitionList: Story = {
|
|
31
|
-
args: {},
|
|
32
|
-
}
|
|
49
|
+
export const DefinitionList: Story = {}
|
|
@@ -7,15 +7,9 @@ const meta: Meta<typeof Component> = {
|
|
|
7
7
|
args: {
|
|
8
8
|
children: (
|
|
9
9
|
<>
|
|
10
|
-
<DefinitionListItem title="Item #1">
|
|
11
|
-
|
|
12
|
-
</DefinitionListItem>
|
|
13
|
-
<DefinitionListItem title="Item #2">
|
|
14
|
-
Data for item #2
|
|
15
|
-
</DefinitionListItem>
|
|
16
|
-
<DefinitionListItem title="Item #3">
|
|
17
|
-
Data for item #3
|
|
18
|
-
</DefinitionListItem>
|
|
10
|
+
<DefinitionListItem title="Item #1">Data for item #1</DefinitionListItem>
|
|
11
|
+
<DefinitionListItem title="Item #2">Data for item #2</DefinitionListItem>
|
|
12
|
+
<DefinitionListItem title="Item #3">Data for item #3</DefinitionListItem>
|
|
19
13
|
</>
|
|
20
14
|
),
|
|
21
15
|
},
|
|
@@ -2,10 +2,9 @@ import { JSX, ComponentPropsWithoutRef, PropsWithChildren } from "react"
|
|
|
2
2
|
|
|
3
3
|
type DefinitionListProps = ComponentPropsWithoutRef<"dl"> & PropsWithChildren
|
|
4
4
|
|
|
5
|
-
const DefinitionList = ({
|
|
6
|
-
children
|
|
7
|
-
|
|
8
|
-
}: DefinitionListProps): JSX.Element => <dl {...props}>{children}</dl>
|
|
5
|
+
const DefinitionList = ({ children, ...props }: DefinitionListProps): JSX.Element => (
|
|
6
|
+
<dl {...props}>{children}</dl>
|
|
7
|
+
)
|
|
9
8
|
|
|
10
9
|
type DefinitionListItemProps = ComponentPropsWithoutRef<"div"> &
|
|
11
10
|
PropsWithChildren & {
|
|
@@ -1,28 +1,70 @@
|
|
|
1
1
|
import { Meta, StoryObj } from "@storybook/html-vite"
|
|
2
2
|
import Component from "./heading.twig"
|
|
3
3
|
import "../_base.css"
|
|
4
|
-
import { HeadingTypes } from "@pnx-mixtape/ids-shape"
|
|
4
|
+
import { Heading as HeadingType, HeadingTypes } from "@pnx-mixtape/ids-shape"
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Heading element should always follow correct html heading order. The modifier class can be used to visually change the size when needed.
|
|
8
|
+
*/
|
|
9
|
+
const meta: Meta<HeadingType> = {
|
|
7
10
|
tags: ["autodocs", "ids-mvp"],
|
|
8
11
|
component: Component,
|
|
9
12
|
args: {
|
|
13
|
+
as: HeadingTypes.TWO,
|
|
10
14
|
title: "Heading",
|
|
11
15
|
},
|
|
12
16
|
argTypes: {
|
|
13
|
-
as: {
|
|
17
|
+
as: {
|
|
18
|
+
description: "The semantic heading level.",
|
|
19
|
+
options: Object.values(HeadingTypes),
|
|
20
|
+
control: "select",
|
|
21
|
+
table: {
|
|
22
|
+
defaultValue: { summary: HeadingTypes.TWO },
|
|
23
|
+
type: { summary: "enum" },
|
|
24
|
+
},
|
|
25
|
+
},
|
|
14
26
|
modifiers: {
|
|
27
|
+
description: "The visual heading size (only one applies)",
|
|
15
28
|
// @todo add mixtapes heading modifiers.
|
|
16
29
|
options: Object.values(HeadingTypes),
|
|
17
30
|
control: "multi-select",
|
|
31
|
+
table: {
|
|
32
|
+
type: { summary: "enum" },
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
title: {
|
|
36
|
+
description: "The heading text",
|
|
37
|
+
type: "string",
|
|
38
|
+
},
|
|
39
|
+
excluded: {
|
|
40
|
+
description:
|
|
41
|
+
"Mark the heading as 'excluded' to remove it from certain javascript contexts (like [InPageNavigation](/?path=/docs/component-inpagenavigation--docs))",
|
|
42
|
+
type: "boolean",
|
|
43
|
+
table: {
|
|
44
|
+
defaultValue: { summary: "false" },
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
srOnly: {
|
|
48
|
+
description:
|
|
49
|
+
"Mark the heading as visually hidden so that it's only available for screen reader context.",
|
|
50
|
+
type: "boolean",
|
|
51
|
+
table: {
|
|
52
|
+
defaultValue: { summary: "false" },
|
|
53
|
+
},
|
|
18
54
|
},
|
|
19
|
-
title: { control: "text" },
|
|
20
|
-
excluded: { control: "boolean" },
|
|
21
|
-
srOnly: { control: "boolean" },
|
|
22
55
|
},
|
|
23
56
|
}
|
|
24
57
|
|
|
25
58
|
export default meta
|
|
26
|
-
type Story = StoryObj<
|
|
59
|
+
type Story = StoryObj<HeadingType>
|
|
27
60
|
|
|
28
61
|
export const Headings: Story = {}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* The modifier class can be used to visually change the size when needed.
|
|
65
|
+
*/
|
|
66
|
+
export const Resized: Story = {
|
|
67
|
+
args: {
|
|
68
|
+
modifiers: [HeadingTypes.FOUR],
|
|
69
|
+
},
|
|
70
|
+
}
|
|
@@ -30,12 +30,7 @@ const Heading = ({
|
|
|
30
30
|
}, [anchor, ref])
|
|
31
31
|
|
|
32
32
|
return (
|
|
33
|
-
<Tag
|
|
34
|
-
className={classNames(modifier, className)}
|
|
35
|
-
id={anchor}
|
|
36
|
-
ref={ref}
|
|
37
|
-
{...props}
|
|
38
|
-
>
|
|
33
|
+
<Tag className={classNames(modifier, className)} id={anchor} ref={ref} {...props}>
|
|
39
34
|
{children}
|
|
40
35
|
</Tag>
|
|
41
36
|
)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://
|
|
1
|
+
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
|
2
2
|
|
|
3
3
|
exports[`Atom/Heading Headings smoke-test 1`] = `
|
|
4
4
|
<div class="mx-page default">
|
|
@@ -7,3 +7,11 @@ exports[`Atom/Heading Headings smoke-test 1`] = `
|
|
|
7
7
|
</h2>
|
|
8
8
|
</div>
|
|
9
9
|
`;
|
|
10
|
+
|
|
11
|
+
exports[`Atom/Heading Resized smoke-test 1`] = `
|
|
12
|
+
<div class="mx-page default">
|
|
13
|
+
<h2 class="mx-heading--m">
|
|
14
|
+
Heading
|
|
15
|
+
</h2>
|
|
16
|
+
</div>
|
|
17
|
+
`;
|
package/src/Atom/Icon/Icon.mdx
CHANGED
|
@@ -13,7 +13,7 @@ import { Icons } from "../../enums"
|
|
|
13
13
|
|
|
14
14
|
# Icon set
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
SVG icon classes are available (as a css image mask).
|
|
17
17
|
|
|
18
18
|
<IconGallery>
|
|
19
19
|
{Object.values(Icons).map(name => (
|
|
@@ -23,8 +23,12 @@ Icons are available as a css image mask.
|
|
|
23
23
|
))}
|
|
24
24
|
</IconGallery>
|
|
25
25
|
|
|
26
|
+
---
|
|
27
|
+
|
|
26
28
|
# Icon
|
|
27
29
|
|
|
30
|
+
An icon atom that is used by other components.
|
|
31
|
+
|
|
28
32
|
<Primary />
|
|
29
33
|
|
|
30
34
|
<Controls />
|
|
@@ -19,14 +19,60 @@ const meta: Meta<IconArgs> = {
|
|
|
19
19
|
component: Component,
|
|
20
20
|
args: {
|
|
21
21
|
icon: Icons.ARROW_RIGHT,
|
|
22
|
+
size: IconSizeModifier.SMALL,
|
|
22
23
|
},
|
|
23
24
|
argTypes: {
|
|
24
|
-
icon: {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
icon: {
|
|
26
|
+
description: "The name of the icon to use",
|
|
27
|
+
options: Object.values(Icons),
|
|
28
|
+
control: "select",
|
|
29
|
+
type: {
|
|
30
|
+
name: "string",
|
|
31
|
+
required: true,
|
|
32
|
+
},
|
|
33
|
+
table: {
|
|
34
|
+
type: { summary: "enum" },
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
color: {
|
|
38
|
+
description: "Icons can be coloured.",
|
|
39
|
+
options: Object.values(IconColourModifier),
|
|
40
|
+
control: "select",
|
|
41
|
+
table: {
|
|
42
|
+
type: { summary: "enum" },
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
size: {
|
|
46
|
+
description: "Optionally adjust the size of the icon.",
|
|
47
|
+
options: Object.values(IconSizeModifier),
|
|
48
|
+
control: "radio",
|
|
49
|
+
table: {
|
|
50
|
+
defaultValue: { summary: IconSizeModifier.SMALL },
|
|
51
|
+
type: { summary: "enum" },
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
rotate: {
|
|
55
|
+
description: "Optionally rotate an icon.",
|
|
56
|
+
options: Object.values(IconRotateModifier),
|
|
57
|
+
control: "radio",
|
|
58
|
+
table: {
|
|
59
|
+
type: { summary: "enum" },
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
text: {
|
|
63
|
+
description: "Text can be placed next to an icon.",
|
|
64
|
+
type: "string",
|
|
65
|
+
},
|
|
66
|
+
align: {
|
|
67
|
+
description: "When used with text, you can align to the start or end of it.",
|
|
68
|
+
options: Object.values(AlignmentTypes),
|
|
69
|
+
control: "radio",
|
|
70
|
+
table: {
|
|
71
|
+
defaultValue: { summary: AlignmentTypes.START },
|
|
72
|
+
type: { summary: "enum" },
|
|
73
|
+
},
|
|
74
|
+
if: { arg: "text" },
|
|
75
|
+
},
|
|
30
76
|
},
|
|
31
77
|
}
|
|
32
78
|
|
|
@@ -35,12 +81,36 @@ type Story = StoryObj<IconArgs>
|
|
|
35
81
|
|
|
36
82
|
export const Icon: Story = {}
|
|
37
83
|
|
|
84
|
+
/**
|
|
85
|
+
* Icons by default inherit the current text colour, but they can be explicitly coloured.
|
|
86
|
+
*/
|
|
87
|
+
export const Primary: Story = {
|
|
88
|
+
args: {
|
|
89
|
+
color: IconColourModifier.BRAND,
|
|
90
|
+
},
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Icons can be sized.
|
|
95
|
+
*/
|
|
96
|
+
export const Large: Story = {
|
|
97
|
+
args: {
|
|
98
|
+
size: IconSizeModifier.XLARGE,
|
|
99
|
+
},
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Add some text to the icon.
|
|
104
|
+
*/
|
|
38
105
|
export const WithText: Story = {
|
|
39
106
|
args: {
|
|
40
107
|
text: "Message with icon",
|
|
41
108
|
},
|
|
42
109
|
}
|
|
43
110
|
|
|
111
|
+
/**
|
|
112
|
+
* Align the text to the end instead of the start.
|
|
113
|
+
*/
|
|
44
114
|
export const Alignment: Story = {
|
|
45
115
|
args: {
|
|
46
116
|
text: "Message with icon",
|
package/src/Atom/Icon/Icon.tsx
CHANGED
|
@@ -7,14 +7,7 @@ export type IconProps = IconType & {
|
|
|
7
7
|
icon: Icons
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
const Icon = ({
|
|
11
|
-
icon,
|
|
12
|
-
color,
|
|
13
|
-
text,
|
|
14
|
-
align,
|
|
15
|
-
rotate,
|
|
16
|
-
size,
|
|
17
|
-
}: IconProps): JSX.Element => (
|
|
10
|
+
const Icon = ({ icon, color, text, align, rotate, size }: IconProps): JSX.Element => (
|
|
18
11
|
<span
|
|
19
12
|
className={classNames("mx-icon", `mx-icon--${icon}`, {
|
|
20
13
|
[`mx-icon--color-${color}`]: color,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://
|
|
1
|
+
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
|
2
2
|
|
|
3
3
|
exports[`Atom/Icon Alignment smoke-test 1`] = `
|
|
4
4
|
<div class="mx-page default">
|
|
5
|
-
<span class="mx-icon mx-icon--arrow-left mx-icon--end ">
|
|
5
|
+
<span class="mx-icon mx-icon--arrow-left mx-icon--end mx-icon--size-sm">
|
|
6
6
|
Message with icon
|
|
7
7
|
</span>
|
|
8
8
|
</div>
|
|
@@ -10,14 +10,28 @@ exports[`Atom/Icon Alignment smoke-test 1`] = `
|
|
|
10
10
|
|
|
11
11
|
exports[`Atom/Icon Icon smoke-test 1`] = `
|
|
12
12
|
<div class="mx-page default">
|
|
13
|
-
<span class="mx-icon mx-icon--arrow-right ">
|
|
13
|
+
<span class="mx-icon mx-icon--arrow-right mx-icon--size-sm">
|
|
14
|
+
</span>
|
|
15
|
+
</div>
|
|
16
|
+
`;
|
|
17
|
+
|
|
18
|
+
exports[`Atom/Icon Large smoke-test 1`] = `
|
|
19
|
+
<div class="mx-page default">
|
|
20
|
+
<span class="mx-icon mx-icon--arrow-right mx-icon--size-xl">
|
|
21
|
+
</span>
|
|
22
|
+
</div>
|
|
23
|
+
`;
|
|
24
|
+
|
|
25
|
+
exports[`Atom/Icon Primary smoke-test 1`] = `
|
|
26
|
+
<div class="mx-page default">
|
|
27
|
+
<span class="mx-icon mx-icon--arrow-right mx-icon--color-brand mx-icon--size-sm">
|
|
14
28
|
</span>
|
|
15
29
|
</div>
|
|
16
30
|
`;
|
|
17
31
|
|
|
18
32
|
exports[`Atom/Icon WithText smoke-test 1`] = `
|
|
19
33
|
<div class="mx-page default">
|
|
20
|
-
<span class="mx-icon mx-icon--arrow-right ">
|
|
34
|
+
<span class="mx-icon mx-icon--arrow-right mx-icon--size-sm">
|
|
21
35
|
Message with icon
|
|
22
36
|
</span>
|
|
23
37
|
</div>
|
package/src/Atom/Icon/_icon.css
CHANGED
|
@@ -3,6 +3,9 @@ import Component from "./image.twig"
|
|
|
3
3
|
import "../_base.css"
|
|
4
4
|
import { Image as ImageType } from "@pnx-mixtape/ids-shape"
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* A simple image atom.
|
|
8
|
+
*/
|
|
6
9
|
const meta: Meta<ImageType> = {
|
|
7
10
|
tags: ["autodocs", "ids-mvp"],
|
|
8
11
|
component: Component,
|
|
@@ -15,6 +18,4 @@ const meta: Meta<ImageType> = {
|
|
|
15
18
|
export default meta
|
|
16
19
|
type Story = StoryObj<ImageType>
|
|
17
20
|
|
|
18
|
-
export const Image: Story = {
|
|
19
|
-
args: {},
|
|
20
|
-
}
|
|
21
|
+
export const Image: Story = {}
|
|
@@ -5,6 +5,9 @@ import "../_base.css"
|
|
|
5
5
|
import { Link as LinkType } from "@pnx-mixtape/ids-shape"
|
|
6
6
|
import { Icons } from "../../enums"
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* A link atom, with optional icon.
|
|
10
|
+
*/
|
|
8
11
|
const meta: Meta<LinkType> = {
|
|
9
12
|
tags: ["autodocs", "ids-mvp"],
|
|
10
13
|
component: Component,
|
|
@@ -13,13 +16,65 @@ const meta: Meta<LinkType> = {
|
|
|
13
16
|
title: "Hyperlink",
|
|
14
17
|
},
|
|
15
18
|
argTypes: {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
href: {
|
|
20
|
+
description: "The links URL value.",
|
|
21
|
+
},
|
|
22
|
+
title: {
|
|
23
|
+
description: "The links text.",
|
|
24
|
+
},
|
|
25
|
+
current: {
|
|
26
|
+
description: 'Adds the `aria-current="page"` attribute.',
|
|
27
|
+
type: "boolean",
|
|
28
|
+
table: {
|
|
29
|
+
defaultValue: { summary: "false" },
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
more: {
|
|
33
|
+
description: "A bolder link, usually combined with the **arrow-right** icon.",
|
|
34
|
+
type: "boolean",
|
|
35
|
+
table: {
|
|
36
|
+
defaultValue: { summary: "false" },
|
|
37
|
+
subcategory: "Special variants",
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
external: {
|
|
41
|
+
description: "Adds the **external-link** icon and screen reader text.",
|
|
42
|
+
type: "boolean",
|
|
43
|
+
table: {
|
|
44
|
+
defaultValue: { summary: "false" },
|
|
45
|
+
subcategory: "Special variants",
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
download: {
|
|
49
|
+
description: "Usually combined with the **download** icon.",
|
|
50
|
+
type: "boolean",
|
|
51
|
+
table: {
|
|
52
|
+
defaultValue: { summary: "false" },
|
|
53
|
+
subcategory: "Special variants",
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
iconStart: {
|
|
57
|
+
description:
|
|
58
|
+
"An [Icon](/?path=/docs/atom-icon--docs) object, to display **before** the text.",
|
|
59
|
+
table: {
|
|
60
|
+
subcategory: "Icon",
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
iconEnd: {
|
|
64
|
+
description: "An [Icon](/?path=/docs/atom-icon--docs) object, to display **after** the text.",
|
|
65
|
+
table: {
|
|
66
|
+
subcategory: "Icon",
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
iconOnly: {
|
|
70
|
+
description:
|
|
71
|
+
"When an icon is added, visually hide the link text so that only the icon is displayed.",
|
|
72
|
+
control: "boolean",
|
|
73
|
+
table: {
|
|
74
|
+
defaultValue: { summary: "false" },
|
|
75
|
+
subcategory: "Icon",
|
|
76
|
+
},
|
|
77
|
+
},
|
|
23
78
|
},
|
|
24
79
|
}
|
|
25
80
|
|
|
@@ -28,6 +83,9 @@ type Story = StoryObj<LinkType>
|
|
|
28
83
|
|
|
29
84
|
export const Link: Story = {}
|
|
30
85
|
|
|
86
|
+
/**
|
|
87
|
+
* More links are bolder and have a slight hover animation on their icon.
|
|
88
|
+
*/
|
|
31
89
|
export const More: Story = {
|
|
32
90
|
args: {
|
|
33
91
|
more: true,
|
|
@@ -37,12 +95,18 @@ export const More: Story = {
|
|
|
37
95
|
},
|
|
38
96
|
}
|
|
39
97
|
|
|
98
|
+
/**
|
|
99
|
+
* External links add screen reader text "(opens in a new window)" to reflect their icon.
|
|
100
|
+
*/
|
|
40
101
|
export const External: Story = {
|
|
41
102
|
args: {
|
|
42
103
|
external: true,
|
|
43
104
|
},
|
|
44
105
|
}
|
|
45
106
|
|
|
107
|
+
/**
|
|
108
|
+
* Download links have a slight hover animation on their icon.
|
|
109
|
+
*/
|
|
46
110
|
export const Download: Story = {
|
|
47
111
|
args: {
|
|
48
112
|
download: true,
|
|
@@ -53,6 +117,9 @@ export const Download: Story = {
|
|
|
53
117
|
},
|
|
54
118
|
}
|
|
55
119
|
|
|
120
|
+
/**
|
|
121
|
+
* Any [Icon](/?path=/docs/atom-icon--docs) from the set can be used on links.
|
|
122
|
+
*/
|
|
56
123
|
export const IconLink: Story = {
|
|
57
124
|
args: {
|
|
58
125
|
iconStart: Icon({
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://
|
|
1
|
+
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
|
2
2
|
|
|
3
3
|
exports[`Atom/Link Download smoke-test 1`] = `
|
|
4
4
|
<div class="mx-page default">
|
|
5
5
|
<a class="mx-link--download"
|
|
6
6
|
href="#"
|
|
7
7
|
>
|
|
8
|
-
<span class="mx-icon mx-icon--download
|
|
8
|
+
<span class="mx-icon mx-icon--download">
|
|
9
9
|
</span>
|
|
10
10
|
<span>
|
|
11
11
|
Download (PDF 12kb)
|
|
@@ -32,7 +32,7 @@ exports[`Atom/Link External smoke-test 1`] = `
|
|
|
32
32
|
exports[`Atom/Link IconLink smoke-test 1`] = `
|
|
33
33
|
<div class="mx-page default">
|
|
34
34
|
<a href="#">
|
|
35
|
-
<span class="mx-icon mx-icon--link
|
|
35
|
+
<span class="mx-icon mx-icon--link">
|
|
36
36
|
</span>
|
|
37
37
|
<span>
|
|
38
38
|
Hyperlink
|
|
@@ -59,7 +59,7 @@ exports[`Atom/Link More smoke-test 1`] = `
|
|
|
59
59
|
<span>
|
|
60
60
|
Hyperlink
|
|
61
61
|
</span>
|
|
62
|
-
<span class="mx-icon mx-icon--arrow-right
|
|
62
|
+
<span class="mx-icon mx-icon--arrow-right">
|
|
63
63
|
</span>
|
|
64
64
|
</a>
|
|
65
65
|
</div>
|