@pnx-mixtape/mxds 0.0.1
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/README.md +274 -0
- package/dist/build/Accordion.js +61 -0
- package/dist/build/Accordion.js.map +1 -0
- package/dist/build/AccordionDiv.js +62 -0
- package/dist/build/AccordionDiv.js.map +1 -0
- package/dist/build/AccordionGroup.js +85 -0
- package/dist/build/AccordionGroup.js.map +1 -0
- package/dist/build/AccordionMobile.js +31 -0
- package/dist/build/AccordionMobile.js.map +1 -0
- package/dist/build/Dialog.js +116 -0
- package/dist/build/Dialog.js.map +1 -0
- package/dist/build/DropMenu.js +132 -0
- package/dist/build/DropMenu.js.map +1 -0
- package/dist/build/GlobalToggle.js +103 -0
- package/dist/build/GlobalToggle.js.map +1 -0
- package/dist/build/InPageAlert.js +61 -0
- package/dist/build/InPageAlert.js.map +1 -0
- package/dist/build/InPageNavigation.js +92 -0
- package/dist/build/InPageNavigation.js.map +1 -0
- package/dist/build/Navigation.js +126 -0
- package/dist/build/Navigation.js.map +1 -0
- package/dist/build/Sticky.js +63 -0
- package/dist/build/Sticky.js.map +1 -0
- package/dist/build/Tabs.js +164 -0
- package/dist/build/Tabs.js.map +1 -0
- package/dist/build/accordion.css +108 -0
- package/dist/build/base.css +1000 -0
- package/dist/build/breadcrumb.css +47 -0
- package/dist/build/breakpoint-loader.js +52 -0
- package/dist/build/breakpoint-loader.js.map +1 -0
- package/dist/build/button.css +126 -0
- package/dist/build/callout.css +11 -0
- package/dist/build/card.css +135 -0
- package/dist/build/chunks/js.cookie-CiMiGxWx.js +101 -0
- package/dist/build/chunks/js.cookie-CiMiGxWx.js.map +1 -0
- package/dist/build/chunks/polyfills-CJ5uTmUJ.js +749 -0
- package/dist/build/chunks/polyfills-CJ5uTmUJ.js.map +1 -0
- package/dist/build/chunks/popover-wbPSyFRj.js +654 -0
- package/dist/build/chunks/popover-wbPSyFRj.js.map +1 -0
- package/dist/build/chunks/utilities-BIk0P2KX.js +61 -0
- package/dist/build/chunks/utilities-BIk0P2KX.js.map +1 -0
- package/dist/build/constants.css +120 -0
- package/dist/build/container-grid.css +207 -0
- package/dist/build/content-block.css +23 -0
- package/dist/build/cookie-compliance.js +122 -0
- package/dist/build/cookie-compliance.js.map +1 -0
- package/dist/build/dialog.css +98 -0
- package/dist/build/disclosure-widget.js +124 -0
- package/dist/build/disclosure-widget.js.map +1 -0
- package/dist/build/drop-menu.css +78 -0
- package/dist/build/drupal.css +74 -0
- package/dist/build/footer-menu.css +32 -0
- package/dist/build/footer.css +61 -0
- package/dist/build/form.css +589 -0
- package/dist/build/grid.css +200 -0
- package/dist/build/header.css +131 -0
- package/dist/build/hero-banner.css +62 -0
- package/dist/build/icon.css +399 -0
- package/dist/build/in-page-alert.css +94 -0
- package/dist/build/in-page-navigation.css +17 -0
- package/dist/build/index.css +4980 -0
- package/dist/build/io-loader.js +44 -0
- package/dist/build/io-loader.js.map +1 -0
- package/dist/build/keyboard.js +101 -0
- package/dist/build/keyboard.js.map +1 -0
- package/dist/build/link-list.css +72 -0
- package/dist/build/masthead.css +39 -0
- package/dist/build/nav-list.css +29 -0
- package/dist/build/navigation.css +371 -0
- package/dist/build/page.css +184 -0
- package/dist/build/pagination.css +123 -0
- package/dist/build/section.css +160 -0
- package/dist/build/sidebar.css +105 -0
- package/dist/build/sticky.css +47 -0
- package/dist/build/tabs.css +106 -0
- package/dist/build/tag.css +67 -0
- package/dist/build/tiles.css +61 -0
- package/dist/build/utilities.css +175 -0
- package/package.json +130 -0
- package/src/Atom/Background/Backgrounds.stories.ts +36 -0
- package/src/Atom/Background/__snapshots__/Backgrounds.stories.ts.snap +100 -0
- package/src/Atom/Background/_background.css +80 -0
- package/src/Atom/Background/backgrounds.twig +10 -0
- package/src/Atom/Base.mdx +76 -0
- package/src/Atom/Blockquote/_blockquote.css +7 -0
- package/src/Atom/Button/Button.stories.ts +71 -0
- package/src/Atom/Button/Button.stories.tsx +31 -0
- package/src/Atom/Button/Button.tsx +70 -0
- package/src/Atom/Button/README.md +30 -0
- package/src/Atom/Button/__snapshots__/Button.stories.ts.snap +41 -0
- package/src/Atom/Button/__snapshots__/Button.stories.tsx.snap +17 -0
- package/src/Atom/Button/_buttons-styles.css +48 -0
- package/src/Atom/Button/_buttons.css +71 -0
- package/src/Atom/Button/button.css +2 -0
- package/src/Atom/Button/button.twig +23 -0
- package/src/Atom/DefinitionList/DefinitionList.stories.tsx +25 -0
- package/src/Atom/DefinitionList/DefinitionList.tsx +27 -0
- package/src/Atom/DefinitionList/__snapshots__/DefinitionList.stories.tsx.snap +30 -0
- package/src/Atom/Heading/Heading.stories.ts +25 -0
- package/src/Atom/Heading/Heading.stories.tsx +19 -0
- package/src/Atom/Heading/Heading.tsx +44 -0
- package/src/Atom/Heading/__snapshots__/Heading.stories.ts.snap +7 -0
- package/src/Atom/Heading/__snapshots__/Heading.stories.tsx.snap +9 -0
- package/src/Atom/Heading/_headings.css +84 -0
- package/src/Atom/Heading/heading.twig +8 -0
- package/src/Atom/Icon/Icon.mdx +32 -0
- package/src/Atom/Icon/Icon.stories.ts +50 -0
- package/src/Atom/Icon/Icon.stories.tsx +44 -0
- package/src/Atom/Icon/Icon.tsx +30 -0
- package/src/Atom/Icon/README.md +7 -0
- package/src/Atom/Icon/__snapshots__/Icon.stories.ts.snap +18 -0
- package/src/Atom/Icon/__snapshots__/Icon.stories.tsx.snap +18 -0
- package/src/Atom/Icon/_extended-set.css +45 -0
- package/src/Atom/Icon/_icon.css +151 -0
- package/src/Atom/Icon/_mixin-icon.css +5 -0
- package/src/Atom/Icon/icon.css +2 -0
- package/src/Atom/Icon/icon.twig +12 -0
- package/src/Atom/Icon/images/arrow-down.svg +1 -0
- package/src/Atom/Icon/images/arrow-left.svg +1 -0
- package/src/Atom/Icon/images/arrow-right.svg +1 -0
- package/src/Atom/Icon/images/arrow-up.svg +1 -0
- package/src/Atom/Icon/images/attachment.svg +1 -0
- package/src/Atom/Icon/images/blockquote.svg +1 -0
- package/src/Atom/Icon/images/bluesky.svg +1 -0
- package/src/Atom/Icon/images/bookmark.svg +1 -0
- package/src/Atom/Icon/images/building.svg +1 -0
- package/src/Atom/Icon/images/calendar.svg +1 -0
- package/src/Atom/Icon/images/chevron-down.svg +1 -0
- package/src/Atom/Icon/images/chevron-left.svg +1 -0
- package/src/Atom/Icon/images/chevron-right.svg +1 -0
- package/src/Atom/Icon/images/chevron-up.svg +1 -0
- package/src/Atom/Icon/images/clock.svg +1 -0
- package/src/Atom/Icon/images/close.svg +1 -0
- package/src/Atom/Icon/images/collapse.svg +1 -0
- package/src/Atom/Icon/images/controls.svg +1 -0
- package/src/Atom/Icon/images/download.svg +1 -0
- package/src/Atom/Icon/images/drupal.svg +3 -0
- package/src/Atom/Icon/images/email.svg +1 -0
- package/src/Atom/Icon/images/error.svg +1 -0
- package/src/Atom/Icon/images/expand.svg +1 -0
- package/src/Atom/Icon/images/external-link.svg +1 -0
- package/src/Atom/Icon/images/facebook.svg +1 -0
- package/src/Atom/Icon/images/file.svg +1 -0
- package/src/Atom/Icon/images/globe.svg +1 -0
- package/src/Atom/Icon/images/google.svg +1 -0
- package/src/Atom/Icon/images/heart-selected.svg +1 -0
- package/src/Atom/Icon/images/heart-unselected.svg +1 -0
- package/src/Atom/Icon/images/home.svg +1 -0
- package/src/Atom/Icon/images/image.svg +1 -0
- package/src/Atom/Icon/images/info.svg +1 -0
- package/src/Atom/Icon/images/instagram.svg +1 -0
- package/src/Atom/Icon/images/link.svg +1 -0
- package/src/Atom/Icon/images/linkedin.svg +1 -0
- package/src/Atom/Icon/images/list.svg +1 -0
- package/src/Atom/Icon/images/lock.svg +1 -0
- package/src/Atom/Icon/images/login.svg +1 -0
- package/src/Atom/Icon/images/mastodon.svg +3 -0
- package/src/Atom/Icon/images/media-next.svg +1 -0
- package/src/Atom/Icon/images/media-pause.svg +1 -0
- package/src/Atom/Icon/images/media-play.svg +1 -0
- package/src/Atom/Icon/images/media-previous.svg +1 -0
- package/src/Atom/Icon/images/media-rewind.svg +1 -0
- package/src/Atom/Icon/images/media-skip.svg +1 -0
- package/src/Atom/Icon/images/media-stop.svg +1 -0
- package/src/Atom/Icon/images/menu.svg +1 -0
- package/src/Atom/Icon/images/more.svg +1 -0
- package/src/Atom/Icon/images/notification.svg +1 -0
- package/src/Atom/Icon/images/pencil.svg +1 -0
- package/src/Atom/Icon/images/phone.svg +1 -0
- package/src/Atom/Icon/images/pin.svg +1 -0
- package/src/Atom/Icon/images/print.svg +1 -0
- package/src/Atom/Icon/images/question.svg +1 -0
- package/src/Atom/Icon/images/restart.svg +1 -0
- package/src/Atom/Icon/images/search.svg +1 -0
- package/src/Atom/Icon/images/settings.svg +1 -0
- package/src/Atom/Icon/images/share.svg +1 -0
- package/src/Atom/Icon/images/star-selected.svg +1 -0
- package/src/Atom/Icon/images/star-unselected.svg +1 -0
- package/src/Atom/Icon/images/success.svg +1 -0
- package/src/Atom/Icon/images/tick.svg +1 -0
- package/src/Atom/Icon/images/trash.svg +1 -0
- package/src/Atom/Icon/images/twitter.svg +1 -0
- package/src/Atom/Icon/images/user.svg +1 -0
- package/src/Atom/Icon/images/video.svg +1 -0
- package/src/Atom/Icon/images/warning.svg +1 -0
- package/src/Atom/Icon/images/youtube.svg +1 -0
- package/src/Atom/Image/Image.stories.ts +20 -0
- package/src/Atom/Image/__snapshots__/Image.stories.ts.snap +9 -0
- package/src/Atom/Image/_image.css +29 -0
- package/src/Atom/Image/image.twig +13 -0
- package/src/Atom/Link/Link.stories.ts +37 -0
- package/src/Atom/Link/Link.stories.tsx +30 -0
- package/src/Atom/Link/Link.tsx +38 -0
- package/src/Atom/Link/__snapshots__/Link.stories.ts.snap +17 -0
- package/src/Atom/Link/__snapshots__/Link.stories.tsx.snap +25 -0
- package/src/Atom/Link/_links.css +39 -0
- package/src/Atom/Link/link.twig +12 -0
- package/src/Atom/Media/Media.stories.ts +26 -0
- package/src/Atom/Media/Media.stories.tsx +25 -0
- package/src/Atom/Media/Media.tsx +42 -0
- package/src/Atom/Media/__snapshots__/Media.stories.ts.snap +14 -0
- package/src/Atom/Media/__snapshots__/Media.stories.tsx.snap +18 -0
- package/src/Atom/Media/_media.css +40 -0
- package/src/Atom/Media/media.twig +18 -0
- package/src/Atom/NavList/NavList.stories.ts +15 -0
- package/src/Atom/NavList/__snapshots__/NavList.stories.ts.snap +43 -0
- package/src/Atom/NavList/nav-list.css +29 -0
- package/src/Atom/NavList/nav-list.twig +25 -0
- package/src/Atom/README.md +5 -0
- package/src/Atom/Spacing/Spacing.stories.ts +48 -0
- package/src/Atom/Spacing/__snapshots__/Spacing.stories.ts.snap +8 -0
- package/src/Atom/Spacing/_spacing.css +36 -0
- package/src/Atom/Spacing/spacing.twig +3 -0
- package/src/Atom/Table/Table.stories.ts +39 -0
- package/src/Atom/Table/TableResponsive.stories.ts +16 -0
- package/src/Atom/Table/__snapshots__/Table.stories.ts.snap +261 -0
- package/src/Atom/Table/__snapshots__/TableResponsive.stories.ts.snap +68 -0
- package/src/Atom/Table/_table.css +72 -0
- package/src/Atom/Table/table-responsive.twig +32 -0
- package/src/Atom/Table/table.twig +30 -0
- package/src/Atom/Text/Text.stories.tsx +20 -0
- package/src/Atom/Text/Text.tsx +26 -0
- package/src/Atom/Text/TextSizes.stories.ts +25 -0
- package/src/Atom/Text/__snapshots__/Text.stories.tsx.snap +7 -0
- package/src/Atom/Text/__snapshots__/TextSizes.stories.ts.snap +63 -0
- package/src/Atom/Text/_text-align.css +13 -0
- package/src/Atom/Text/_text-sizes.css +117 -0
- package/src/Atom/Text/text-alignment.twig +5 -0
- package/src/Atom/Text/text-style.twig +1 -0
- package/src/Atom/Text/text-styles-example.twig +35 -0
- package/src/Atom/Video/Video.stories.ts +16 -0
- package/src/Atom/Video/Video.tsx +17 -0
- package/src/Atom/Video/__snapshots__/Video.stories.ts.snap +21 -0
- package/src/Atom/Video/_video.css +10 -0
- package/src/Atom/Video/video.twig +5 -0
- package/src/Atom/_animated.css +65 -0
- package/src/Atom/_base.css +62 -0
- package/src/Atom/_flow-legacy.css +48 -0
- package/src/Atom/_flow.css +53 -0
- package/src/Atom/_generic.css +93 -0
- package/src/Atom/_hr.css +10 -0
- package/src/Atom/_mixins.css +22 -0
- package/src/Atom/_print.css +20 -0
- package/src/Atom/base.css +5 -0
- package/src/Atom/images/external-link.svg +1 -0
- package/src/Component/Accordion/Accordion.stories.ts +51 -0
- package/src/Component/Accordion/Accordion.stories.tsx +22 -0
- package/src/Component/Accordion/Accordion.tsx +83 -0
- package/src/Component/Accordion/Elements/Accordion.ts +82 -0
- package/src/Component/Accordion/Elements/AccordionDiv.ts +83 -0
- package/src/Component/Accordion/Elements/AccordionGroup.ts +106 -0
- package/src/Component/Accordion/Elements/AccordionMobile.ts +47 -0
- package/src/Component/Accordion/README.md +45 -0
- package/src/Component/Accordion/__snapshots__/Accordion.stories.ts.snap +94 -0
- package/src/Component/Accordion/__snapshots__/Accordion.stories.tsx.snap +26 -0
- package/src/Component/Accordion/accordion-item.twig +18 -0
- package/src/Component/Accordion/accordion.css +107 -0
- package/src/Component/Accordion/accordion.twig +19 -0
- package/src/Component/Accordion/images/collapse.svg +1 -0
- package/src/Component/Accordion/images/expand.svg +1 -0
- package/src/Component/Accordion/twig/accordion-div.twig +13 -0
- package/src/Component/Accordion/twig/accordion-example.twig +36 -0
- package/src/Component/Accordion/twig/accordion-mobile.twig +15 -0
- package/src/Component/Accordion/twig/accordion-story.twig +13 -0
- package/src/Component/Author/Author.stories.tsx +18 -0
- package/src/Component/Author/Author.tsx +30 -0
- package/src/Component/Author/__snapshots__/Author.stories.tsx.snap +21 -0
- package/src/Component/Breadcrumb/Breadcrumb.stories.ts +15 -0
- package/src/Component/Breadcrumb/Breadcrumb.stories.tsx +38 -0
- package/src/Component/Breadcrumb/Breadcrumb.tsx +34 -0
- package/src/Component/Breadcrumb/__snapshots__/Breadcrumb.stories.ts.snap +26 -0
- package/src/Component/Breadcrumb/__snapshots__/Breadcrumb.stories.tsx.snap +60 -0
- package/src/Component/Breadcrumb/breadcrumb.css +46 -0
- package/src/Component/Breadcrumb/breadcrumb.twig +12 -0
- package/src/Component/Callout/Callout.stories.ts +29 -0
- package/src/Component/Callout/callout.css +7 -0
- package/src/Component/Callout/callout.twig +10 -0
- package/src/Component/Callout/twig/callout-story.twig +11 -0
- package/src/Component/Card/CHANGELOG.md +187 -0
- package/src/Component/Card/Card.stories.ts +106 -0
- package/src/Component/Card/Card.stories.tsx +50 -0
- package/src/Component/Card/Card.tsx +56 -0
- package/src/Component/Card/README.md +21 -0
- package/src/Component/Card/__snapshots__/Card.stories.ts.snap +186 -0
- package/src/Component/Card/__snapshots__/Card.stories.tsx.snap +88 -0
- package/src/Component/Card/__snapshots__/CardGrid.stories.ts.snap +89 -0
- package/src/Component/Card/card-grid.twig +10 -0
- package/src/Component/Card/card.css +128 -0
- package/src/Component/Card/card.twig +45 -0
- package/src/Component/Card/twig/old-card.twig +17 -0
- package/src/Component/Card/twig/story-card.twig +29 -0
- package/src/Component/ContentBlock/ContentBlock.stories.ts +15 -0
- package/src/Component/ContentBlock/ContentBlock.stories.tsx +30 -0
- package/src/Component/ContentBlock/ContentBlock.tsx +37 -0
- package/src/Component/ContentBlock/README.md +21 -0
- package/src/Component/ContentBlock/__snapshots__/ContentBlock.stories.ts.snap +26 -0
- package/src/Component/ContentBlock/__snapshots__/ContentBlock.stories.tsx.snap +21 -0
- package/src/Component/ContentBlock/content-block.css +21 -0
- package/src/Component/ContentBlock/content-block.twig +12 -0
- package/src/Component/ContentBlock/twig/content-block-example.twig +7 -0
- package/src/Component/Dialog/Dialog.stories.ts +28 -0
- package/src/Component/Dialog/Dialog.stories.tsx +45 -0
- package/src/Component/Dialog/Dialog.tsx +79 -0
- package/src/Component/Dialog/Elements/Dialog.ts +145 -0
- package/src/Component/Dialog/README.md +63 -0
- package/src/Component/Dialog/__snapshots__/Dialog.stories.ts.snap +85 -0
- package/src/Component/Dialog/__snapshots__/Dialog.stories.tsx.snap +39 -0
- package/src/Component/Dialog/dialog.css +85 -0
- package/src/Component/Dialog/dialog.twig +19 -0
- package/src/Component/DropMenu/Components/DropMenuContext.tsx +192 -0
- package/src/Component/DropMenu/Components/DropMenuItem.tsx +35 -0
- package/src/Component/DropMenu/DropMenu.stories.ts +36 -0
- package/src/Component/DropMenu/DropMenu.stories.tsx +24 -0
- package/src/Component/DropMenu/DropMenu.tsx +81 -0
- package/src/Component/DropMenu/Elements/DropMenu.ts +172 -0
- package/src/Component/DropMenu/README.md +11 -0
- package/src/Component/DropMenu/__snapshots__/DropMenu.stories.ts.snap +32 -0
- package/src/Component/DropMenu/__snapshots__/DropMenu.stories.tsx.snap +47 -0
- package/src/Component/DropMenu/drop-menu.css +68 -0
- package/src/Component/DropMenu/drop-menu.twig +27 -0
- package/src/Component/DropMenu/polyfills.js +28 -0
- package/src/Component/HeroBanner/HeroBanner.stories.ts +75 -0
- package/src/Component/HeroBanner/HeroBanner.stories.tsx +30 -0
- package/src/Component/HeroBanner/HeroBanner.tsx +50 -0
- package/src/Component/HeroBanner/__snapshots__/PageTitle.stories.ts.snap +31 -0
- package/src/Component/HeroBanner/__snapshots__/PageTitle.stories.tsx.snap +36 -0
- package/src/Component/HeroBanner/hero-banner.css +51 -0
- package/src/Component/HeroBanner/hero-banner.twig +41 -0
- package/src/Component/HeroBanner/twig/hero-banner-story.twig +19 -0
- package/src/Component/InPageAlert/Elements/InPageAlert.ts +87 -0
- package/src/Component/InPageAlert/InPageAlert.stories.ts +35 -0
- package/src/Component/InPageAlert/InPageAlert.stories.tsx +43 -0
- package/src/Component/InPageAlert/InPageAlert.tsx +50 -0
- package/src/Component/InPageAlert/README.md +27 -0
- package/src/Component/InPageAlert/__snapshots__/InPageAlert.stories.ts.snap +43 -0
- package/src/Component/InPageAlert/__snapshots__/InPageAlert.stories.tsx.snap +69 -0
- package/src/Component/InPageAlert/in-page-alert.css +89 -0
- package/src/Component/InPageAlert/in-page-alert.twig +18 -0
- package/src/Component/InPageNavigation/Elements/InPageNavigation.ts +125 -0
- package/src/Component/InPageNavigation/Hooks/useInPageNavigation.ts +45 -0
- package/src/Component/InPageNavigation/InPageNavigation.stories.ts +16 -0
- package/src/Component/InPageNavigation/InPageNavigation.stories.tsx +86 -0
- package/src/Component/InPageNavigation/InPageNavigation.tsx +38 -0
- package/src/Component/InPageNavigation/README.md +30 -0
- package/src/Component/InPageNavigation/__snapshots__/InPageNavigation.stories.ts.snap +73 -0
- package/src/Component/InPageNavigation/__snapshots__/InPageNavigation.stories.tsx.snap +149 -0
- package/src/Component/InPageNavigation/in-page-navigation.css +17 -0
- package/src/Component/InPageNavigation/in-page-navigation.twig +17 -0
- package/src/Component/InPageNavigation/twig/in-page-navigation-content-example.twig +16 -0
- package/src/Component/InPageNavigation/twig/in-page-navigation-menu-example.twig +6 -0
- package/src/Component/LinkList/LinkList.stories.ts +29 -0
- package/src/Component/LinkList/LinkList.stories.tsx +29 -0
- package/src/Component/LinkList/LinkList.tsx +43 -0
- package/src/Component/LinkList/README.md +19 -0
- package/src/Component/LinkList/__snapshots__/LinkList.stories.ts.snap +58 -0
- package/src/Component/LinkList/__snapshots__/LinkList.stories.tsx.snap +53 -0
- package/src/Component/LinkList/link-list.css +68 -0
- package/src/Component/LinkList/link-list.twig +12 -0
- package/src/Component/ListItem/Teaser.stories.tsx +34 -0
- package/src/Component/ListItem/Teaser.tsx +54 -0
- package/src/Component/ListItem/__snapshots__/Teaser.stories.tsx.snap +32 -0
- package/src/Component/Navigation/Collapsible.stories.ts +16 -0
- package/src/Component/Navigation/Components/DropdownLevel.tsx +107 -0
- package/src/Component/Navigation/Dropdown.stories.ts +16 -0
- package/src/Component/Navigation/Dropdown.stories.tsx +46 -0
- package/src/Component/Navigation/Dropdown.tsx +39 -0
- package/src/Component/Navigation/Elements/Navigation.ts +174 -0
- package/src/Component/Navigation/MegaNav.stories.ts +16 -0
- package/src/Component/Navigation/Navigation.stories.ts +15 -0
- package/src/Component/Navigation/Navigation.stories.tsx +40 -0
- package/src/Component/Navigation/Navigation.tsx +51 -0
- package/src/Component/Navigation/README.md +17 -0
- package/src/Component/Navigation/__snapshots__/Collapsible.stories.ts.snap +123 -0
- package/src/Component/Navigation/__snapshots__/Dropdown.stories.ts.snap +125 -0
- package/src/Component/Navigation/__snapshots__/Dropdown.stories.tsx.snap +39 -0
- package/src/Component/Navigation/__snapshots__/Navigation.stories.ts.snap +25 -0
- package/src/Component/Navigation/__snapshots__/Navigation.stories.tsx.snap +61 -0
- package/src/Component/Navigation/_navigation-collapsible.css +72 -0
- package/src/Component/Navigation/_navigation-dropdown.css +152 -0
- package/src/Component/Navigation/_navigation-mega.css +51 -0
- package/src/Component/Navigation/_navigation.css +55 -0
- package/src/Component/Navigation/navigation-collapsible.twig +7 -0
- package/src/Component/Navigation/navigation-dropdown.twig +7 -0
- package/src/Component/Navigation/navigation-mega-nav.twig +7 -0
- package/src/Component/Navigation/navigation.css +4 -0
- package/src/Component/Navigation/navigation.twig +9 -0
- package/src/Component/Navigation/twig/navigation-subnav-list.twig +108 -0
- package/src/Component/Pagination/Components/PaginationContext.tsx +188 -0
- package/src/Component/Pagination/Components/PaginationItem.tsx +48 -0
- package/src/Component/Pagination/Pagination.stories.ts +15 -0
- package/src/Component/Pagination/Pagination.stories.tsx +25 -0
- package/src/Component/Pagination/Pagination.tsx +75 -0
- package/src/Component/Pagination/README.md +19 -0
- package/src/Component/Pagination/__snapshots__/Pagination.stories.ts.snap +58 -0
- package/src/Component/Pagination/__snapshots__/Pagination.stories.tsx.snap +57 -0
- package/src/Component/Pagination/pagination.css +112 -0
- package/src/Component/Pagination/pagination.twig +44 -0
- package/src/Component/SocialShare/SocialShare.stories.tsx +26 -0
- package/src/Component/SocialShare/SocialShare.tsx +53 -0
- package/src/Component/SocialShare/__snapshots__/SocialShare.stories.tsx.snap +25 -0
- package/src/Component/Sticky/Elements/Sticky.ts +93 -0
- package/src/Component/Sticky/README.md +23 -0
- package/src/Component/Sticky/Sticky.stories.ts +16 -0
- package/src/Component/Sticky/Sticky.stories.tsx +14 -0
- package/src/Component/Sticky/Sticky.tsx +34 -0
- package/src/Component/Sticky/__snapshots__/Sticky.stories.ts.snap +86 -0
- package/src/Component/Sticky/__snapshots__/Sticky.stories.tsx.snap +11 -0
- package/src/Component/Sticky/sticky.css +39 -0
- package/src/Component/Sticky/sticky.twig +21 -0
- package/src/Component/Sticky/twig/sticky-example.twig +4 -0
- package/src/Component/Tabs/Components/Tab.tsx +45 -0
- package/src/Component/Tabs/Components/TabDropMenu.tsx +14 -0
- package/src/Component/Tabs/Components/TabList.tsx +9 -0
- package/src/Component/Tabs/Components/TabPanel.tsx +32 -0
- package/src/Component/Tabs/Elements/Tabs.ts +213 -0
- package/src/Component/Tabs/README.md +23 -0
- package/src/Component/Tabs/Tabs.stories.ts +22 -0
- package/src/Component/Tabs/Tabs.stories.tsx +51 -0
- package/src/Component/Tabs/Tabs.tsx +100 -0
- package/src/Component/Tabs/__snapshots__/Tabs.stories.ts.snap +144 -0
- package/src/Component/Tabs/__snapshots__/Tabs.stories.tsx.snap +120 -0
- package/src/Component/Tabs/tabs.css +103 -0
- package/src/Component/Tabs/tabs.twig +49 -0
- package/src/Component/Tabs/twig/panel.twig +5 -0
- package/src/Component/Tabs/twig/tab-list.twig +26 -0
- package/src/Component/Tag/README.md +19 -0
- package/src/Component/Tag/Tag.stories.ts +54 -0
- package/src/Component/Tag/Tag.stories.tsx +13 -0
- package/src/Component/Tag/Tag.tsx +19 -0
- package/src/Component/Tag/__snapshots__/Tag.stories.ts.snap +64 -0
- package/src/Component/Tag/__snapshots__/Tag.stories.tsx.snap +7 -0
- package/src/Component/Tag/tag.css +57 -0
- package/src/Component/Tag/tags.twig +23 -0
- package/src/Component/Tile/README.md +3 -0
- package/src/Component/Tile/Tile.stories.ts +23 -0
- package/src/Component/Tile/Tile.stories.tsx +30 -0
- package/src/Component/Tile/Tile.tsx +40 -0
- package/src/Component/Tile/__snapshots__/Tile.stories.ts.snap +83 -0
- package/src/Component/Tile/__snapshots__/Tile.stories.tsx.snap +38 -0
- package/src/Component/Tile/tile.twig +10 -0
- package/src/Component/Tile/tiles.css +58 -0
- package/src/Component/Tile/twig/tiles.twig +18 -0
- package/src/Form/Checkbox/Checkboxes.stories.ts +47 -0
- package/src/Form/Checkbox/FormCheckbox.stories.tsx +32 -0
- package/src/Form/Checkbox/FormCheckbox.tsx +124 -0
- package/src/Form/Checkbox/__snapshots__/Checkboxes.stories.ts.snap +115 -0
- package/src/Form/Checkbox/input-checkbox-single.twig +6 -0
- package/src/Form/Checkbox/input-checkbox.twig +24 -0
- package/src/Form/Description/Description.stories.ts +16 -0
- package/src/Form/Description/ErrorMessage.stories.ts +16 -0
- package/src/Form/Description/FormDescription.stories.tsx +14 -0
- package/src/Form/Description/FormDescription.tsx +28 -0
- package/src/Form/Description/__snapshots__/Description.stories.ts.snap +17 -0
- package/src/Form/Description/__snapshots__/ErrorMessage.stories.ts.snap +20 -0
- package/src/Form/Description/__snapshots__/FormDescription.stories.tsx.snap +10 -0
- package/src/Form/Description/form-description.twig +3 -0
- package/src/Form/Description/form-error.twig +5 -0
- package/src/Form/Fieldset/Fieldset.stories.ts +34 -0
- package/src/Form/Fieldset/__snapshots__/Fieldset.stories.ts.snap +23 -0
- package/src/Form/Fieldset/fieldset.twig +4 -0
- package/src/Form/Form/Form.stories.tsx +10 -0
- package/src/Form/Form/Form.tsx +9 -0
- package/src/Form/Form/FormTitle.stories.tsx +14 -0
- package/src/Form/Form/FormTitle.tsx +12 -0
- package/src/Form/Form/__snapshots__/Form.stories.tsx.snap +6 -0
- package/src/Form/Form/__snapshots__/FormTitle.stories.tsx.snap +9 -0
- package/src/Form/Form/twig/form-example.twig +13 -0
- package/src/Form/Item/FormItem.stories.tsx +58 -0
- package/src/Form/Item/FormItem.tsx +26 -0
- package/src/Form/Item/__snapshots__/FormItem.stories.tsx.snap +102 -0
- package/src/Form/Label/FormLabel.stories.tsx +20 -0
- package/src/Form/Label/FormLabel.tsx +19 -0
- package/src/Form/Label/Label.stories.ts +34 -0
- package/src/Form/Label/__snapshots__/FormLabel.stories.tsx.snap +16 -0
- package/src/Form/Label/__snapshots__/Label.stories.ts.snap +23 -0
- package/src/Form/Label/label.twig +2 -0
- package/src/Form/README.md +11 -0
- package/src/Form/Radio/FormRadio.stories.tsx +37 -0
- package/src/Form/Radio/FormRadio.tsx +80 -0
- package/src/Form/Radio/Radios.stories.ts +47 -0
- package/src/Form/Radio/__snapshots__/Radios.stories.ts.snap +125 -0
- package/src/Form/Radio/input-radio.twig +24 -0
- package/src/Form/Search/TextInputWithInlineButton.stories.ts +16 -0
- package/src/Form/Search/__snapshots__/TextInputWithInlineButton.stories.ts.snap +26 -0
- package/src/Form/Search/input-text-inline-submit.twig +8 -0
- package/src/Form/Select/FormSelect.stories.tsx +34 -0
- package/src/Form/Select/FormSelect.tsx +67 -0
- package/src/Form/Select/Select.stories.ts +40 -0
- package/src/Form/Select/__snapshots__/FormSelect.stories.tsx.snap +23 -0
- package/src/Form/Select/__snapshots__/Select.stories.ts.snap +148 -0
- package/src/Form/Select/select.twig +16 -0
- package/src/Form/TextInput/FormText.stories.tsx +15 -0
- package/src/Form/TextInput/FormText.tsx +55 -0
- package/src/Form/TextInput/InputDivider.stories.ts +16 -0
- package/src/Form/TextInput/TextInput.stories.ts +57 -0
- package/src/Form/TextInput/TextInputWithIcon.stories.ts +40 -0
- package/src/Form/TextInput/__snapshots__/FormText.stories.tsx.snap +13 -0
- package/src/Form/TextInput/__snapshots__/InputDivider.stories.ts.snap +32 -0
- package/src/Form/TextInput/__snapshots__/TextInput.stories.ts.snap +101 -0
- package/src/Form/TextInput/__snapshots__/TextInputWithIcon.stories.ts.snap +67 -0
- package/src/Form/TextInput/input-divider.twig +11 -0
- package/src/Form/TextInput/input-text-icon.twig +7 -0
- package/src/Form/TextInput/input-text.twig +5 -0
- package/src/Form/Textarea/FormTextarea.stories.tsx +14 -0
- package/src/Form/Textarea/FormTextarea.tsx +53 -0
- package/src/Form/Textarea/Textarea.stories.ts +16 -0
- package/src/Form/Textarea/__snapshots__/FormTextarea.stories.tsx.snap +12 -0
- package/src/Form/Textarea/__snapshots__/Textarea.stories.ts.snap +19 -0
- package/src/Form/Textarea/textarea.twig +5 -0
- package/src/Form/form.css +479 -0
- package/src/Form/images/checkmark.svg +1 -0
- package/src/Form/images/form-chevron-down.svg +1 -0
- package/src/Form/images/form-error.svg +1 -0
- package/src/Form/images/form-success.svg +1 -0
- package/src/Layout/Footer/Footer.stories.ts +15 -0
- package/src/Layout/Footer/Footer.stories.tsx +42 -0
- package/src/Layout/Footer/Footer.tsx +55 -0
- package/src/Layout/Footer/FooterMenu/FooterMenu.stories.ts +15 -0
- package/src/Layout/Footer/FooterMenu/__snapshots__/FooterMenu.stories.ts.snap +101 -0
- package/src/Layout/Footer/FooterMenu/footer-menu.css +29 -0
- package/src/Layout/Footer/FooterMenu/footer-menu.twig +5 -0
- package/src/Layout/Footer/__snapshots__/Footer.stories.ts.snap +139 -0
- package/src/Layout/Footer/__snapshots__/Footer.stories.tsx.snap +70 -0
- package/src/Layout/Footer/footer.css +54 -0
- package/src/Layout/Footer/footer.twig +25 -0
- package/src/Layout/Grid/Grid.stories.ts +68 -0
- package/src/Layout/Grid/Grid.stories.tsx +125 -0
- package/src/Layout/Grid/Grid.tsx +51 -0
- package/src/Layout/Grid/__snapshots__/Grid.stories.ts.snap +103 -0
- package/src/Layout/Grid/__snapshots__/Grid.stories.tsx.snap +67 -0
- package/src/Layout/Grid/container-grid.css +190 -0
- package/src/Layout/Grid/grid-item.twig +16 -0
- package/src/Layout/Grid/grid.css +190 -0
- package/src/Layout/Grid/grid.twig +10 -0
- package/src/Layout/Grid/twig/container-grid-dynamic.twig +47 -0
- package/src/Layout/Grid/twig/container-grid.twig +46 -0
- package/src/Layout/Grid/twig/grid-story.twig +6 -0
- package/src/Layout/Grid/twig/old-grid.twig +46 -0
- package/src/Layout/Header/Components/GlobalToggle.tsx +35 -0
- package/src/Layout/Header/Components/Logo.tsx +17 -0
- package/src/Layout/Header/Elements/GlobalToggle.ts +137 -0
- package/src/Layout/Header/Header.stories.ts +18 -0
- package/src/Layout/Header/Header.stories.tsx +17 -0
- package/src/Layout/Header/Header.tsx +73 -0
- package/src/Layout/Header/Stacked/Stacked.stories.ts +16 -0
- package/src/Layout/Header/Stacked/__snapshots__/Stacked.stories.ts.snap +353 -0
- package/src/Layout/Header/Stacked/header-stacked.twig +33 -0
- package/src/Layout/Header/__snapshots__/Header.stories.ts.snap +157 -0
- package/src/Layout/Header/__snapshots__/Header.stories.tsx.snap +55 -0
- package/src/Layout/Header/_header.css +89 -0
- package/src/Layout/Header/_toggles.css +31 -0
- package/src/Layout/Header/header.css +2 -0
- package/src/Layout/Header/header.twig +24 -0
- package/src/Layout/Header/twig/global-header.twig +4 -0
- package/src/Layout/Header/twig/logo.twig +3 -0
- package/src/Layout/Masthead/Masthead.stories.ts +16 -0
- package/src/Layout/Masthead/__snapshots__/Masthead.stories.ts.snap +32 -0
- package/src/Layout/Masthead/masthead.css +36 -0
- package/src/Layout/Masthead/masthead.twig +10 -0
- package/src/Layout/Page/Page.stories.tsx +22 -0
- package/src/Layout/Page/Page.tsx +16 -0
- package/src/Layout/Page/README.md +19 -0
- package/src/Layout/Page/__snapshots__/Page.stories.tsx.snap +80 -0
- package/src/Layout/Page/page.css +150 -0
- package/src/Layout/Page/page.twig +3 -0
- package/src/Layout/README.md +19 -0
- package/src/Layout/Section/Background.stories.ts +25 -0
- package/src/Layout/Section/Breakouts.stories.ts +16 -0
- package/src/Layout/Section/Flow.stories.ts +16 -0
- package/src/Layout/Section/Section.stories.ts +63 -0
- package/src/Layout/Section/Section.stories.tsx +56 -0
- package/src/Layout/Section/Section.tsx +83 -0
- package/src/Layout/Section/SectionGrid.stories.tsx +53 -0
- package/src/Layout/Section/SectionGrid.tsx +71 -0
- package/src/Layout/Section/__snapshots__/Section.stories.ts.snap +19 -0
- package/src/Layout/Section/__snapshots__/Section.stories.tsx.snap +37 -0
- package/src/Layout/Section/__snapshots__/SectionBackground.stories.ts.snap +55 -0
- package/src/Layout/Section/__snapshots__/SectionGrid.stories.tsx.snap +37 -0
- package/src/Layout/Section/__snapshots__/SectionsBreakouts.stories.ts.snap +78 -0
- package/src/Layout/Section/__snapshots__/SectionsFlowsGroups.stories.ts.snap +89 -0
- package/src/Layout/Section/section.css +156 -0
- package/src/Layout/Section/section.twig +25 -0
- package/src/Layout/Section/twig/section-background.twig +12 -0
- package/src/Layout/Section/twig/section-story.twig +14 -0
- package/src/Layout/Section/twig/sections-breakout.twig +38 -0
- package/src/Layout/Section/twig/sections-flow.twig +51 -0
- package/src/Layout/Section/twig/sections-stacked.twig +28 -0
- package/src/Layout/Sidebar/Sidebar.stories.ts +35 -0
- package/src/Layout/Sidebar/Sidebar.stories.tsx +33 -0
- package/src/Layout/Sidebar/Sidebar.tsx +34 -0
- package/src/Layout/Sidebar/__snapshots__/Sidebar.stories.ts.snap +40 -0
- package/src/Layout/Sidebar/__snapshots__/Sidebar.stories.tsx.snap +47 -0
- package/src/Layout/Sidebar/sidebar.css +69 -0
- package/src/Layout/Sidebar/sidebar.twig +17 -0
- package/src/Layout/images/mixtape-logo.png +0 -0
- package/src/Utility/Context/ImageComponent.tsx +49 -0
- package/src/Utility/Context/LinkComponent.tsx +57 -0
- package/src/Utility/Drupal/README.md +9 -0
- package/src/Utility/Drupal/drupal.css +66 -0
- package/src/Utility/Drupal/twig/local-tasks.twig +17 -0
- package/src/Utility/Drupal/twig/login-form.twig +22 -0
- package/src/Utility/Elements/breakpoint-loader.ts +79 -0
- package/src/Utility/Elements/cookie-compliance.ts +174 -0
- package/src/Utility/Elements/disclosure-widget.ts +173 -0
- package/src/Utility/Elements/io-loader.ts +57 -0
- package/src/Utility/Elements/keyboard.ts +150 -0
- package/src/Utility/Hooks/useLocalStorage.ts +78 -0
- package/src/Utility/Hooks/useMediaQuery.ts +31 -0
- package/src/Utility/Hooks/useToggle.ts +17 -0
- package/src/Utility/Hooks/useUrlParams.ts +24 -0
- package/src/Utility/README.md +15 -0
- package/src/Utility/_layout-utils.css +78 -0
- package/src/Utility/global.d.ts +25 -0
- package/src/Utility/utilities.css +88 -0
- package/src/Utility/utilities.ts +163 -0
- package/src/_custom-media.css +33 -0
- package/src/constants.css +118 -0
- package/src/elements.ts +13 -0
- package/src/enums.ts +260 -0
- package/src/index.css +27 -0
- package/src/react.ts +68 -0
- package/src/tokens.js +119 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`Components/Tag Checkbox smoke-test 1`] = `
|
|
4
|
+
<ul class="tags">
|
|
5
|
+
<li>
|
|
6
|
+
<div class="tag">
|
|
7
|
+
<input type="checkbox"
|
|
8
|
+
id="music"
|
|
9
|
+
name="tag"
|
|
10
|
+
value="music"
|
|
11
|
+
>
|
|
12
|
+
<label for="music">
|
|
13
|
+
Music
|
|
14
|
+
</label>
|
|
15
|
+
</div>
|
|
16
|
+
</li>
|
|
17
|
+
<li>
|
|
18
|
+
<div class="tag">
|
|
19
|
+
<input type="checkbox"
|
|
20
|
+
id="news"
|
|
21
|
+
name="tag"
|
|
22
|
+
value="news"
|
|
23
|
+
>
|
|
24
|
+
<label for="news">
|
|
25
|
+
News
|
|
26
|
+
</label>
|
|
27
|
+
</div>
|
|
28
|
+
</li>
|
|
29
|
+
</ul>
|
|
30
|
+
`;
|
|
31
|
+
|
|
32
|
+
exports[`Components/Tag Link smoke-test 1`] = `
|
|
33
|
+
<ul class="tags">
|
|
34
|
+
<li>
|
|
35
|
+
<a class="tag"
|
|
36
|
+
href="#0"
|
|
37
|
+
>
|
|
38
|
+
Music
|
|
39
|
+
</a>
|
|
40
|
+
</li>
|
|
41
|
+
<li>
|
|
42
|
+
<a class="tag"
|
|
43
|
+
href="#0"
|
|
44
|
+
>
|
|
45
|
+
News
|
|
46
|
+
</a>
|
|
47
|
+
</li>
|
|
48
|
+
</ul>
|
|
49
|
+
`;
|
|
50
|
+
|
|
51
|
+
exports[`Components/Tag Tag smoke-test 1`] = `
|
|
52
|
+
<ul class="tags">
|
|
53
|
+
<li>
|
|
54
|
+
<span class="tag">
|
|
55
|
+
Music
|
|
56
|
+
</span>
|
|
57
|
+
</li>
|
|
58
|
+
<li>
|
|
59
|
+
<span class="tag">
|
|
60
|
+
News
|
|
61
|
+
</span>
|
|
62
|
+
</li>
|
|
63
|
+
</ul>
|
|
64
|
+
`;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tag
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
@layer elements {
|
|
6
|
+
.tag {
|
|
7
|
+
display: inline-block;
|
|
8
|
+
inline-size: fit-content;
|
|
9
|
+
padding-inline: var(--horizontal-padding, var(--spacing-xxxs));
|
|
10
|
+
background: var(
|
|
11
|
+
--tag-background,
|
|
12
|
+
var(--background, var(--colour-background))
|
|
13
|
+
);
|
|
14
|
+
color: var(--tag-foreground, var(--foreground, var(--colour-foreground)));
|
|
15
|
+
text-transform: uppercase;
|
|
16
|
+
font-weight: var(--font-weight, var(--font-weight-bold));
|
|
17
|
+
font-size: var(--tag-font-size, var(--font-size-xs));
|
|
18
|
+
line-height: var(--line-height, 2);
|
|
19
|
+
border-radius: var(--border-radius);
|
|
20
|
+
border: var(--line-width, 1px) solid var(--line-colour, currentcolor);
|
|
21
|
+
text-decoration: none;
|
|
22
|
+
overflow: hidden;
|
|
23
|
+
|
|
24
|
+
&:has(input:focus) {
|
|
25
|
+
--outline-size: max(0.125rem, 0.15em);
|
|
26
|
+
|
|
27
|
+
outline: var(--outline-width, var(--outline-size))
|
|
28
|
+
var(--outline-style, solid) var(--outline-color, currentcolor);
|
|
29
|
+
outline-offset: var(--outline-offset, var(--outline-size));
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
& input {
|
|
33
|
+
position: absolute;
|
|
34
|
+
inset-block-start: -100px;
|
|
35
|
+
inset-inline-start: -100px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
& label {
|
|
39
|
+
font-size: inherit;
|
|
40
|
+
color: inherit;
|
|
41
|
+
margin: 0;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&:is(a:hover, :has(input:checked)) {
|
|
45
|
+
--tag-foreground: var(--link-colour, var(--colour-primary));
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.tags {
|
|
50
|
+
padding-inline: 0;
|
|
51
|
+
list-style: none;
|
|
52
|
+
display: flex;
|
|
53
|
+
flex-flow: row wrap;
|
|
54
|
+
align-items: center;
|
|
55
|
+
gap: var(--tags-gap, var(--spacing-s));
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{% set classes = ['tag'] %}
|
|
2
|
+
{% set attributes = (attributes|default(create_attribute())).addClass(classes) %}
|
|
3
|
+
|
|
4
|
+
<ul class="tags">
|
|
5
|
+
{% for item in items %}
|
|
6
|
+
<li>
|
|
7
|
+
{% if type == "link" %}
|
|
8
|
+
<a{{ attributes}} href="{{ item.href }}">{{ item.title }}</a>
|
|
9
|
+
{% elseif type == "checkbox" %}
|
|
10
|
+
<div {{ attributes }}>
|
|
11
|
+
<input type="checkbox"
|
|
12
|
+
id="{{ item.id }}"
|
|
13
|
+
name="{{ item.name }}"
|
|
14
|
+
value="{{ item.value }}"
|
|
15
|
+
{% if item.checked %} checked{% endif %}>
|
|
16
|
+
<label for="{{ item.id }}">{{ item.label }}</label>
|
|
17
|
+
</div>
|
|
18
|
+
{% else %}
|
|
19
|
+
<span{{ attributes }}>{{ item }}</span>
|
|
20
|
+
{% endif %}
|
|
21
|
+
</li>
|
|
22
|
+
{% endfor %}
|
|
23
|
+
</ul>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Meta, StoryObj } from "@storybook/html"
|
|
2
|
+
import Component from "./twig/tiles.twig"
|
|
3
|
+
import "./tiles.css"
|
|
4
|
+
import { TileSizes } from "../../enums"
|
|
5
|
+
|
|
6
|
+
type TilesArgs = {
|
|
7
|
+
size?: TileSizes
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const meta: Meta<TilesArgs> = {
|
|
11
|
+
tags: ["autodocs"],
|
|
12
|
+
component: Component,
|
|
13
|
+
argTypes: {
|
|
14
|
+
size: { options: Object.values(TileSizes), control: "radio" },
|
|
15
|
+
},
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export default meta
|
|
19
|
+
type Story = StoryObj<TilesArgs>
|
|
20
|
+
|
|
21
|
+
export const Tile: Story = {
|
|
22
|
+
args: {},
|
|
23
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Meta, StoryObj } from "@storybook/react"
|
|
2
|
+
import Component from "./Tile"
|
|
3
|
+
import "./tiles.css"
|
|
4
|
+
import { AsTags, HeadingLevels, TileSizes } from "../../enums"
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof Component> = {
|
|
7
|
+
tags: ["autodocs"],
|
|
8
|
+
component: Component,
|
|
9
|
+
argTypes: {
|
|
10
|
+
size: { options: Object.values(TileSizes), control: "radio" },
|
|
11
|
+
headingLevel: { options: Object.values(HeadingLevels), control: "select" },
|
|
12
|
+
as: { options: Object.values(AsTags), control: "select" },
|
|
13
|
+
},
|
|
14
|
+
args: {
|
|
15
|
+
title: "Tile title",
|
|
16
|
+
to: "http://example.com",
|
|
17
|
+
linkText: "Tile link",
|
|
18
|
+
size: TileSizes.SMALL,
|
|
19
|
+
},
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export default meta
|
|
23
|
+
type Story = StoryObj<typeof meta>
|
|
24
|
+
|
|
25
|
+
export const Tile: Story = {}
|
|
26
|
+
export const WithContent: Story = {
|
|
27
|
+
args: {
|
|
28
|
+
children: <p>Tile with some content</p>,
|
|
29
|
+
},
|
|
30
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { JSX, PropsWithChildren } from "react"
|
|
2
|
+
import classNames from "classnames"
|
|
3
|
+
import Heading from "../../Atom/Heading/Heading"
|
|
4
|
+
import Link from "../../Atom/Link/Link"
|
|
5
|
+
import { AsTags, HeadingStyles, TileSizes } from "../../enums"
|
|
6
|
+
import { HeadingTypes } from "@pnx-mixtape/ids-shape"
|
|
7
|
+
|
|
8
|
+
type TileProps = PropsWithChildren & {
|
|
9
|
+
title: string
|
|
10
|
+
to?: string
|
|
11
|
+
linkText?: string
|
|
12
|
+
headingLevel?: HeadingTypes
|
|
13
|
+
size?: TileSizes
|
|
14
|
+
as?: AsTags
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const Tile = ({
|
|
18
|
+
title,
|
|
19
|
+
to,
|
|
20
|
+
linkText,
|
|
21
|
+
headingLevel = HeadingTypes.THREE,
|
|
22
|
+
children,
|
|
23
|
+
size = TileSizes.MEDIUM,
|
|
24
|
+
as = AsTags.DIV,
|
|
25
|
+
}: TileProps): JSX.Element => {
|
|
26
|
+
const Tag: JSX.ElementType = `${as}` as unknown as JSX.ElementType
|
|
27
|
+
return (
|
|
28
|
+
<Tag className={classNames("tile", `tile--${size}`, "stack")}>
|
|
29
|
+
<div className="tile__content vertical-flow-flex">
|
|
30
|
+
<Heading as={headingLevel} modifier={HeadingStyles.TEXT}>
|
|
31
|
+
{title}
|
|
32
|
+
</Heading>
|
|
33
|
+
{children}
|
|
34
|
+
</div>
|
|
35
|
+
{to && <Link to={to}>{linkText}</Link>}
|
|
36
|
+
</Tag>
|
|
37
|
+
)
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export default Tile
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`Components/Tile Tile smoke-test 1`] = `
|
|
4
|
+
<div class="grid grid--xs-2-cols grid--md-4-cols spacing--bottom-l">
|
|
5
|
+
<div class="tile stack ">
|
|
6
|
+
<div class="tile__content vertical-flow-flex">
|
|
7
|
+
<h3 class="text--m">
|
|
8
|
+
Tile title
|
|
9
|
+
</h3>
|
|
10
|
+
</div>
|
|
11
|
+
<a href="#">
|
|
12
|
+
Tile link
|
|
13
|
+
</a>
|
|
14
|
+
</div>
|
|
15
|
+
<div class="tile stack ">
|
|
16
|
+
<div class="tile__content vertical-flow-flex">
|
|
17
|
+
<h3 class="text--m">
|
|
18
|
+
Tile title
|
|
19
|
+
</h3>
|
|
20
|
+
</div>
|
|
21
|
+
<a href="#">
|
|
22
|
+
Tile link
|
|
23
|
+
</a>
|
|
24
|
+
</div>
|
|
25
|
+
<div class="tile stack ">
|
|
26
|
+
<div class="tile__content vertical-flow-flex">
|
|
27
|
+
<h3 class="text--m">
|
|
28
|
+
Tile title
|
|
29
|
+
</h3>
|
|
30
|
+
</div>
|
|
31
|
+
<a href="#">
|
|
32
|
+
Tile link
|
|
33
|
+
</a>
|
|
34
|
+
</div>
|
|
35
|
+
<div class="tile stack ">
|
|
36
|
+
<div class="tile__content vertical-flow-flex">
|
|
37
|
+
<h3 class="text--m">
|
|
38
|
+
Tile title
|
|
39
|
+
</h3>
|
|
40
|
+
</div>
|
|
41
|
+
<a href="#">
|
|
42
|
+
Tile link
|
|
43
|
+
</a>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
<div class="grid grid--md-3-cols">
|
|
47
|
+
<div class="tile stack ">
|
|
48
|
+
<div class="tile__content vertical-flow-flex">
|
|
49
|
+
<h3 class="text--m">
|
|
50
|
+
Tile title
|
|
51
|
+
</h3>
|
|
52
|
+
</div>
|
|
53
|
+
<a href="#">
|
|
54
|
+
Tile link
|
|
55
|
+
</a>
|
|
56
|
+
</div>
|
|
57
|
+
<div class="tile stack ">
|
|
58
|
+
<div class="tile__content vertical-flow-flex">
|
|
59
|
+
<h3 class="text--m">
|
|
60
|
+
Tile title
|
|
61
|
+
</h3>
|
|
62
|
+
</div>
|
|
63
|
+
<a href="#">
|
|
64
|
+
Tile link
|
|
65
|
+
</a>
|
|
66
|
+
</div>
|
|
67
|
+
<div class="tile stack ">
|
|
68
|
+
<div class="tile__content vertical-flow-flex">
|
|
69
|
+
<h3 class="text--m">
|
|
70
|
+
Tile title
|
|
71
|
+
</h3>
|
|
72
|
+
<p>
|
|
73
|
+
Tile with some content
|
|
74
|
+
</p>
|
|
75
|
+
<a href="#"
|
|
76
|
+
class="link align--bottom"
|
|
77
|
+
>
|
|
78
|
+
read more
|
|
79
|
+
</a>
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
`;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`Components/Tile Tile smoke-test 1`] = `
|
|
4
|
+
<div class="tile tile--small stack">
|
|
5
|
+
<div class="tile__content vertical-flow-flex">
|
|
6
|
+
<h3 class="text--l"
|
|
7
|
+
id="tile-title"
|
|
8
|
+
>
|
|
9
|
+
Tile title
|
|
10
|
+
</h3>
|
|
11
|
+
</div>
|
|
12
|
+
<a href="http://example.com"
|
|
13
|
+
class="link"
|
|
14
|
+
>
|
|
15
|
+
Tile link
|
|
16
|
+
</a>
|
|
17
|
+
</div>
|
|
18
|
+
`;
|
|
19
|
+
|
|
20
|
+
exports[`Components/Tile WithContent smoke-test 1`] = `
|
|
21
|
+
<div class="tile tile--small stack">
|
|
22
|
+
<div class="tile__content vertical-flow-flex">
|
|
23
|
+
<h3 class="text--l"
|
|
24
|
+
id="tile-title"
|
|
25
|
+
>
|
|
26
|
+
Tile title
|
|
27
|
+
</h3>
|
|
28
|
+
<p>
|
|
29
|
+
Tile with some content
|
|
30
|
+
</p>
|
|
31
|
+
</div>
|
|
32
|
+
<a href="http://example.com"
|
|
33
|
+
class="link"
|
|
34
|
+
>
|
|
35
|
+
Tile link
|
|
36
|
+
</a>
|
|
37
|
+
</div>
|
|
38
|
+
`;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<div class="tile stack {{ modifier_class }}{% if size %} tile--{{ size }}{% endif %}">
|
|
2
|
+
<div class="tile__content vertical-flow-flex">
|
|
3
|
+
{% block content %}
|
|
4
|
+
<h3 class="text--m">{{ title | default('Tile title') }}</h3>
|
|
5
|
+
{% endblock %}
|
|
6
|
+
</div>
|
|
7
|
+
{% block link %}
|
|
8
|
+
<a href="#">{{ link | default('Tile link') }}</a>
|
|
9
|
+
{% endblock %}
|
|
10
|
+
</div>
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tiles
|
|
3
|
+
*/
|
|
4
|
+
@layer components {
|
|
5
|
+
.tile {
|
|
6
|
+
--outline-offset: -2px;
|
|
7
|
+
--gap: var(--gap-s);
|
|
8
|
+
|
|
9
|
+
overflow: hidden;
|
|
10
|
+
position: relative;
|
|
11
|
+
border-radius: var(--border-radius);
|
|
12
|
+
background: var(--tile-background, var(--colour-background-alt));
|
|
13
|
+
color: var(--tile-foreground var(--colour-foreground));
|
|
14
|
+
min-block-size: var(--height, 160px);
|
|
15
|
+
transition:
|
|
16
|
+
0.2s background-color,
|
|
17
|
+
0.2s background-image,
|
|
18
|
+
0.2s color,
|
|
19
|
+
0.2s border-color;
|
|
20
|
+
|
|
21
|
+
&:is(.tile--has-link, :has(> a[href])) {
|
|
22
|
+
cursor: pointer;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
& > a[href] {
|
|
26
|
+
display: block;
|
|
27
|
+
text-indent: -10000%;
|
|
28
|
+
block-size: 100%;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
& .tile__content {
|
|
32
|
+
padding: var(--spacing-m);
|
|
33
|
+
position: relative;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&.tile--medium {
|
|
38
|
+
--height: 240px;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&.tile--large {
|
|
42
|
+
--height: 433px;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Print stylesheet
|
|
48
|
+
*/
|
|
49
|
+
|
|
50
|
+
@media print {
|
|
51
|
+
.tile {
|
|
52
|
+
display: block;
|
|
53
|
+
background-color: transparent;
|
|
54
|
+
background-image: none;
|
|
55
|
+
color: var(--colour-foreground);
|
|
56
|
+
min-block-size: 0;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<div class="grid grid--xs-2-cols grid--md-4-cols spacing--bottom-l">
|
|
2
|
+
{% include "@mixtape/Component/Tile/tile.twig" %}
|
|
3
|
+
{% include "@mixtape/Component/Tile/tile.twig" %}
|
|
4
|
+
{% include "@mixtape/Component/Tile/tile.twig" %}
|
|
5
|
+
{% include "@mixtape/Component/Tile/tile.twig" %}
|
|
6
|
+
</div>
|
|
7
|
+
<div class="grid grid--md-3-cols">
|
|
8
|
+
{% include "@mixtape/Component/Tile/tile.twig" with { size: size } %}
|
|
9
|
+
{% include "@mixtape/Component/Tile/tile.twig" with { size: size } %}
|
|
10
|
+
{% embed "@mixtape/Component/Tile/tile.twig" with { size: size } %}
|
|
11
|
+
{% block content %}
|
|
12
|
+
<h3 class="text--m">{{ title | default('Tile title') }}</h3>
|
|
13
|
+
<p>Tile with some content</p>
|
|
14
|
+
<a href="#" class="link align--bottom">{{ link | default('read more') }}</a>
|
|
15
|
+
{% endblock %}
|
|
16
|
+
{% block link %}{% endblock %}
|
|
17
|
+
{% endembed %}
|
|
18
|
+
</div>
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Meta, StoryObj } from "@storybook/html"
|
|
2
|
+
import Component from "./input-checkbox.twig"
|
|
3
|
+
import "../form.css"
|
|
4
|
+
|
|
5
|
+
const modifierOptions: string[] = ["form__item--inline"]
|
|
6
|
+
|
|
7
|
+
type CheckboxesType = {
|
|
8
|
+
modifier_class?: (typeof modifierOptions)[number]
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const meta: Meta<CheckboxesType> = {
|
|
12
|
+
title: "Form/Checkbox",
|
|
13
|
+
tags: ["autodocs"],
|
|
14
|
+
component: Component,
|
|
15
|
+
argTypes: {
|
|
16
|
+
modifier_class: {
|
|
17
|
+
options: modifierOptions,
|
|
18
|
+
control: { type: "select" },
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
parameters: {
|
|
22
|
+
a11y: {
|
|
23
|
+
config: {
|
|
24
|
+
rules: [
|
|
25
|
+
{
|
|
26
|
+
// ID's are not unique due to test-runner.
|
|
27
|
+
id: "label",
|
|
28
|
+
enabled: false,
|
|
29
|
+
},
|
|
30
|
+
],
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export default meta
|
|
37
|
+
type Story = StoryObj<CheckboxesType>
|
|
38
|
+
|
|
39
|
+
export const Checkboxes: Story = {
|
|
40
|
+
args: {},
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export const InlineCheckboxes: Story = {
|
|
44
|
+
args: {
|
|
45
|
+
modifier_class: "form__item--inline",
|
|
46
|
+
},
|
|
47
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Meta, StoryObj } from "@storybook/react"
|
|
2
|
+
import FormCheckbox, { Checkbox, SingleCheckbox } from "./FormCheckbox"
|
|
3
|
+
|
|
4
|
+
const meta: Meta<typeof SingleCheckbox> = {
|
|
5
|
+
title: "Form/Checkboxes",
|
|
6
|
+
tags: ["no-snapshot"],
|
|
7
|
+
component: SingleCheckbox,
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export default meta
|
|
11
|
+
export const Single: StoryObj<typeof SingleCheckbox> = {
|
|
12
|
+
args: {
|
|
13
|
+
children: "Check me out",
|
|
14
|
+
value: "option",
|
|
15
|
+
},
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export const CheckboxGroup: StoryObj<typeof FormCheckbox> = {
|
|
19
|
+
render: ({ children, ...args }) => (
|
|
20
|
+
<FormCheckbox {...args}>{children}</FormCheckbox>
|
|
21
|
+
),
|
|
22
|
+
args: {
|
|
23
|
+
label: "Checkbox group",
|
|
24
|
+
children: (
|
|
25
|
+
<>
|
|
26
|
+
<Checkbox value="1">Option #1</Checkbox>
|
|
27
|
+
<Checkbox value="2">Option #2</Checkbox>
|
|
28
|
+
<Checkbox value="3">Option #3</Checkbox>
|
|
29
|
+
</>
|
|
30
|
+
),
|
|
31
|
+
},
|
|
32
|
+
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createContext,
|
|
3
|
+
JSX,
|
|
4
|
+
PropsWithChildren,
|
|
5
|
+
useContext,
|
|
6
|
+
useId,
|
|
7
|
+
useRef,
|
|
8
|
+
} from "react"
|
|
9
|
+
import {
|
|
10
|
+
AriaCheckboxGroupItemProps,
|
|
11
|
+
AriaCheckboxProps,
|
|
12
|
+
useCheckbox,
|
|
13
|
+
useCheckboxGroup,
|
|
14
|
+
useCheckboxGroupItem,
|
|
15
|
+
} from "react-aria"
|
|
16
|
+
import {
|
|
17
|
+
CheckboxGroupProps,
|
|
18
|
+
CheckboxGroupState,
|
|
19
|
+
useCheckboxGroupState,
|
|
20
|
+
useToggleState,
|
|
21
|
+
} from "react-stately"
|
|
22
|
+
import classNames from "classnames"
|
|
23
|
+
import FormItem from "../Item/FormItem"
|
|
24
|
+
import { FormStatus } from "../../enums"
|
|
25
|
+
|
|
26
|
+
const CheckboxContext = createContext<CheckboxGroupState>(null)
|
|
27
|
+
|
|
28
|
+
type FormCheckboxProps = CheckboxGroupProps &
|
|
29
|
+
PropsWithChildren & {
|
|
30
|
+
label: string
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const FormCheckbox = ({
|
|
34
|
+
label,
|
|
35
|
+
children,
|
|
36
|
+
...props
|
|
37
|
+
}: FormCheckboxProps): JSX.Element => {
|
|
38
|
+
const state = useCheckboxGroupState(props)
|
|
39
|
+
const { groupProps, labelProps } = useCheckboxGroup(props, state)
|
|
40
|
+
|
|
41
|
+
return (
|
|
42
|
+
<FormItem fieldset {...groupProps}>
|
|
43
|
+
<legend {...labelProps}>{label}</legend>
|
|
44
|
+
<CheckboxContext.Provider value={state}>
|
|
45
|
+
{children}
|
|
46
|
+
</CheckboxContext.Provider>
|
|
47
|
+
</FormItem>
|
|
48
|
+
)
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
type CheckboxProps = AriaCheckboxGroupItemProps &
|
|
52
|
+
PropsWithChildren & {
|
|
53
|
+
status?: FormStatus
|
|
54
|
+
className?: string
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const Checkbox = ({
|
|
58
|
+
children,
|
|
59
|
+
status = FormStatus.DEFAULT,
|
|
60
|
+
className = "",
|
|
61
|
+
...props
|
|
62
|
+
}: CheckboxProps): JSX.Element => {
|
|
63
|
+
const id = useId()
|
|
64
|
+
const ref = useRef<HTMLInputElement>()
|
|
65
|
+
const state = useContext(CheckboxContext)
|
|
66
|
+
const { inputProps } = useCheckboxGroupItem(props, state, ref)
|
|
67
|
+
|
|
68
|
+
const classes = classNames("form__checkbox", {
|
|
69
|
+
className,
|
|
70
|
+
error: status === FormStatus.INVALID,
|
|
71
|
+
success: status === FormStatus.VALID,
|
|
72
|
+
})
|
|
73
|
+
|
|
74
|
+
return (
|
|
75
|
+
<div className={classes}>
|
|
76
|
+
<input
|
|
77
|
+
id={id}
|
|
78
|
+
ref={ref}
|
|
79
|
+
aria-invalid={status === FormStatus.INVALID}
|
|
80
|
+
{...inputProps}
|
|
81
|
+
/>
|
|
82
|
+
<label htmlFor={id}>{children}</label>
|
|
83
|
+
</div>
|
|
84
|
+
)
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
type SingleCheckboxProps = AriaCheckboxProps &
|
|
88
|
+
PropsWithChildren & {
|
|
89
|
+
status?: FormStatus
|
|
90
|
+
className?: string
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
const SingleCheckbox = ({
|
|
94
|
+
children,
|
|
95
|
+
status = FormStatus.DEFAULT,
|
|
96
|
+
className = "",
|
|
97
|
+
...props
|
|
98
|
+
}: SingleCheckboxProps): JSX.Element => {
|
|
99
|
+
const id = useId()
|
|
100
|
+
const ref = useRef<HTMLInputElement>()
|
|
101
|
+
const state = useToggleState(props)
|
|
102
|
+
const { inputProps } = useCheckbox(props, state, ref)
|
|
103
|
+
|
|
104
|
+
const classes = classNames("form__checkbox", {
|
|
105
|
+
className,
|
|
106
|
+
error: status === FormStatus.INVALID,
|
|
107
|
+
success: status === FormStatus.VALID,
|
|
108
|
+
})
|
|
109
|
+
|
|
110
|
+
return (
|
|
111
|
+
<div className={classes}>
|
|
112
|
+
<input
|
|
113
|
+
id={id}
|
|
114
|
+
ref={ref}
|
|
115
|
+
aria-invalid={status === FormStatus.INVALID}
|
|
116
|
+
{...inputProps}
|
|
117
|
+
/>
|
|
118
|
+
<label htmlFor={id}>{children}</label>
|
|
119
|
+
</div>
|
|
120
|
+
)
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export default FormCheckbox
|
|
124
|
+
export { Checkbox, SingleCheckbox }
|