@pnx-mixtape/mxds 0.1.0-rc.1 → 0.1.0-rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.storybook/decorators.ts +15 -0
- package/.storybook/{preview.ts → preview.tsx} +8 -1
- package/.storybook/src/docs.tsx +29 -0
- package/.storybook/themes/campus-vibrant.css +181 -0
- package/.storybook/themes/civic-formal.css +246 -0
- package/.storybook/{theme-demo.css → themes/demo.css} +14 -7
- package/.storybook/themes/health-services.css +255 -0
- package/.storybook/themes/research-faculty.css +169 -0
- package/dist/build/accordion.css +1 -1
- package/dist/build/accordion.entry.js +1 -1
- package/dist/build/autocomplete.css +1 -1
- package/dist/build/autocomplete.entry.js +1 -1
- package/dist/build/base.css +1 -1
- package/dist/build/breadcrumb.css +1 -1
- package/dist/build/button.css +1 -1
- package/dist/build/card.css +1 -1
- package/dist/build/chunks/{Accordion-z-dH6nFH.js → Accordion-GN0sME4W.js} +1 -1
- package/dist/build/chunks/{AccordionMobile-BYPPNyf5.js → AccordionMobile-DG5jSe8Q.js} +1 -1
- package/dist/build/chunks/{Autocomplete-2L6tLLuh.js → Autocomplete-B4RtkAyh.js} +1 -1
- package/dist/build/chunks/{ClosableAlert-DdXbF1J2.js → ClosableAlert-DEhj8Nxm.js} +1 -1
- package/dist/build/chunks/{Dialog-Ds8gzhri.js → Dialog-Haahn-Yn.js} +1 -1
- package/dist/build/chunks/DropMenu-1baQc8Yc.js +1 -0
- package/dist/build/chunks/Gallery-D8NGXy2Q.js +1 -0
- package/dist/build/chunks/GlobalToggle-B52fdBQu.js +1 -0
- package/dist/build/chunks/InPageNavigation-Dyn2TR-N.js +1 -0
- package/dist/build/chunks/Navigation-hOrfLq7h.js +1 -0
- package/dist/build/chunks/Popover-Cxg-s5Jn.js +1 -0
- package/dist/build/chunks/Sticky-BGCuuEJK.js +1 -0
- package/dist/build/chunks/Tabs-DYy1YTdU.js +15 -0
- package/dist/build/chunks/enums-DLV_1NAf.js +1 -0
- package/dist/build/chunks/polyfills-C7pRt54M.js +1 -0
- package/dist/build/chunks/utilities-_Bq3TxAQ.js +1 -0
- package/dist/build/constants.css +1 -1
- package/dist/build/cookie-consent.css +1 -1
- package/dist/build/dialog.entry.js +1 -1
- package/dist/build/drop-menu.entry.js +1 -1
- package/dist/build/elements.js +1 -1
- package/dist/build/filters.css +1 -1
- package/dist/build/filters.entry.js +1 -1
- package/dist/build/form.css +1 -1
- package/dist/build/gallery.entry.js +1 -1
- package/dist/build/global-alert.entry.js +1 -1
- package/dist/build/grid.css +1 -1
- package/dist/build/header.entry.js +1 -1
- package/dist/build/icon.css +1 -1
- package/dist/build/in-page-alert.css +1 -1
- package/dist/build/in-page-navigation.entry.js +1 -1
- package/dist/build/list-item.css +1 -1
- package/dist/build/navigation.css +1 -1
- package/dist/build/navigation.entry.js +1 -1
- package/dist/build/one-time-code.css +1 -0
- package/dist/build/popover.css +1 -1
- package/dist/build/popover.entry.js +1 -1
- package/dist/build/print.css +1 -1
- package/dist/build/progress-indicator.css +1 -0
- package/dist/build/react.js +1 -1
- package/dist/build/sidebar.css +1 -1
- package/dist/build/steps.css +1 -1
- package/dist/build/sticky.entry.js +1 -1
- package/dist/build/tabs.css +1 -1
- package/dist/build/tabs.entry.js +1 -1
- package/dist/build/tag.css +1 -1
- package/dist/build/utilities.css +1 -1
- package/dist/types/Atom/DefinitionList/DefinitionList.d.ts +3 -2
- package/dist/types/Atom/DefinitionList/DefinitionList.d.ts.map +1 -1
- package/dist/types/Atom/Heading/Heading.d.ts.map +1 -1
- package/dist/types/Atom/Link/Link.d.ts.map +1 -1
- package/dist/types/Atom/List/List.d.ts +10 -0
- package/dist/types/Atom/List/List.d.ts.map +1 -0
- package/dist/types/Component/Accordion/Accordion.d.ts.map +1 -1
- package/dist/types/Component/Dialog/Dialog.d.ts.map +1 -1
- package/dist/types/Component/DropMenu/Elements/DropMenu.d.ts.map +1 -1
- package/dist/types/Component/Filters/Elements/Filters.d.ts +20 -1
- package/dist/types/Component/Filters/Elements/Filters.d.ts.map +1 -1
- package/dist/types/Component/Filters/Filters.d.ts +7 -2
- package/dist/types/Component/Filters/Filters.d.ts.map +1 -1
- package/dist/types/Component/Gallery/Gallery.d.ts.map +1 -1
- package/dist/types/Component/InPageNavigation/Elements/InPageNavigation.d.ts +2 -2
- package/dist/types/Component/InPageNavigation/Elements/InPageNavigation.d.ts.map +1 -1
- package/dist/types/Component/InPageNavigation/Hooks/useInPageNavigation.d.ts.map +1 -1
- package/dist/types/Component/Pagination/Components/PaginationContext.d.ts.map +1 -1
- package/dist/types/Component/ProgressIndicator/ProgressIndicator.d.ts +9 -0
- package/dist/types/Component/ProgressIndicator/ProgressIndicator.d.ts.map +1 -0
- package/dist/types/Component/Tabs/Elements/Tabs.d.ts.map +1 -1
- package/dist/types/Component/Tabs/Tabs.d.ts.map +1 -1
- package/dist/types/Component/Tag/Tag.d.ts +4 -2
- package/dist/types/Component/Tag/Tag.d.ts.map +1 -1
- package/dist/types/Form/Autocomplete/Autocomplete.d.ts +2 -2
- package/dist/types/Form/Autocomplete/Autocomplete.d.ts.map +1 -1
- package/dist/types/Form/Autocomplete/Elements/Autocomplete.d.ts +10 -0
- package/dist/types/Form/Autocomplete/Elements/Autocomplete.d.ts.map +1 -1
- package/dist/types/Form/Checkbox/FormCheckbox.d.ts.map +1 -1
- package/dist/types/Form/CheckboxCard/CheckboxCard.d.ts +23 -0
- package/dist/types/Form/CheckboxCard/CheckboxCard.d.ts.map +1 -0
- package/dist/types/Form/OneTimeCode/OneTimeCode.d.ts +12 -0
- package/dist/types/Form/OneTimeCode/OneTimeCode.d.ts.map +1 -0
- package/dist/types/Form/Radio/FormRadio.d.ts.map +1 -1
- package/dist/types/Form/RadioCard/RadioCard.d.ts +16 -0
- package/dist/types/Form/RadioCard/RadioCard.d.ts.map +1 -0
- package/dist/types/Form/Select/FormSelect.d.ts.map +1 -1
- package/dist/types/Form/TextInput/FormText.d.ts.map +1 -1
- package/dist/types/Form/Textarea/FormTextarea.d.ts.map +1 -1
- package/dist/types/Utility/Hooks/useIsomorphicLayoutEffect.d.ts +4 -0
- package/dist/types/Utility/Hooks/useIsomorphicLayoutEffect.d.ts.map +1 -0
- package/dist/types/enums.d.ts +19 -0
- package/dist/types/enums.d.ts.map +1 -1
- package/dist/types/react.d.ts +5 -0
- package/dist/types/react.d.ts.map +1 -1
- package/package.json +8 -8
- package/src/Atom/Background/_background.css +2 -2
- package/src/Atom/Blockquote/_blockquote.css +9 -2
- package/src/Atom/Button/README.md +1 -0
- package/src/Atom/Button/__snapshots__/Button.stories.ts.snap +2 -3
- package/src/Atom/Button/_buttons-styles.css +6 -6
- package/src/Atom/Button/_buttons.css +21 -3
- package/src/Atom/Button/button.twig +4 -1
- package/src/Atom/DefinitionList/DefinitionList.stories.ts +42 -2
- package/src/Atom/DefinitionList/DefinitionList.stories.tsx +36 -0
- package/src/Atom/DefinitionList/DefinitionList.tsx +4 -1
- package/src/Atom/DefinitionList/DefinitionListItem.stories.ts +1 -1
- package/src/Atom/DefinitionList/README.md +43 -0
- package/src/Atom/DefinitionList/__snapshots__/DefinitionList.stories.ts.snap +37 -3
- package/src/Atom/DefinitionList/__snapshots__/DefinitionList.stories.tsx.snap +2 -0
- package/src/Atom/DefinitionList/__snapshots__/DefinitionListItem.stories.ts.snap +3 -3
- package/src/Atom/DefinitionList/definition-list-item.twig +1 -0
- package/src/Atom/DefinitionList/definition-list.twig +6 -1
- package/src/Atom/Heading/Heading.tsx +6 -0
- package/src/Atom/Heading/_headings.css +2 -1
- package/src/Atom/Icon/_extended-set.css +30 -30
- package/src/Atom/Icon/_icon.css +39 -36
- package/src/Atom/Image/README.md +2 -2
- package/src/Atom/Image/_image.css +12 -6
- package/src/Atom/Link/Link.tsx +16 -3
- package/src/Atom/Link/__snapshots__/Link.stories.ts.snap +7 -12
- package/src/Atom/Link/__snapshots__/Link.stories.tsx.snap +1 -1
- package/src/Atom/Link/_links.css +9 -0
- package/src/Atom/Link/link.twig +8 -2
- package/src/Atom/LinkedImage/linked-image.twig +1 -2
- package/src/Atom/List/List.stories.ts +102 -0
- package/src/Atom/List/List.stories.tsx +103 -0
- package/src/Atom/List/List.tsx +22 -0
- package/src/Atom/List/README.md +150 -0
- package/src/Atom/List/__snapshots__/List.stories.ts.snap +43 -0
- package/src/Atom/List/__snapshots__/List.stories.tsx.snap +13 -0
- package/src/Atom/List/_list.css +123 -0
- package/src/Atom/List/list.twig +5 -0
- package/src/Atom/Media/Media.stories.ts +1 -1
- package/src/Atom/Media/__snapshots__/Media.stories.ts.snap +2 -2
- package/src/Atom/Spacing/_spacing.css +24 -24
- package/src/Atom/Table/__snapshots__/Table.stories.ts.snap +24 -4
- package/src/Atom/Table/_table.css +15 -3
- package/src/Atom/Table/table.twig +6 -1
- package/src/Atom/Text/__snapshots__/Text.stories.ts.snap +3 -2
- package/src/Atom/Text/_text-styles.css +21 -1
- package/src/Atom/Text/twig/text-styles-example.twig +3 -2
- package/src/Atom/_base.css +6 -0
- package/src/Atom/_flow.css +1 -1
- package/src/Atom/_generic.css +18 -11
- package/src/Component/Accordion/Accordion.stories.ts +31 -0
- package/src/Component/Accordion/Accordion.tsx +3 -2
- package/src/Component/Accordion/AccordionItem.stories.ts +27 -0
- package/src/Component/Accordion/__snapshots__/Accordion.stories.ts.snap +36 -0
- package/src/Component/Accordion/__snapshots__/AccordionItem.stories.ts.snap +16 -0
- package/src/Component/Accordion/accordion.css +2 -0
- package/src/Component/Breadcrumb/__snapshots__/Breadcrumb.stories.ts.snap +3 -6
- package/src/Component/Breadcrumb/breadcrumb.css +4 -0
- package/src/Component/Card/__snapshots__/Card.stories.ts.snap +13 -24
- package/src/Component/Card/card.css +2 -2
- package/src/Component/Card/card.twig +1 -1
- package/src/Component/Carousel/Carousel.stories.ts +101 -23
- package/src/Component/Carousel/Carousel.stories.tsx +74 -0
- package/src/Component/Carousel/__snapshots__/Carousel.stories.ts.snap +273 -88
- package/src/Component/Carousel/__snapshots__/Carousel.stories.tsx.snap +5 -3
- package/src/Component/ContentBlock/__snapshots__/ContentBlock.stories.ts.snap +12 -24
- package/src/Component/CookieConsent/cookie-consent.css +3 -1
- package/src/Component/Dialog/Dialog.stories.ts +33 -0
- package/src/Component/Dialog/Dialog.stories.tsx +25 -0
- package/src/Component/Dialog/Dialog.tsx +2 -2
- package/src/Component/Dialog/__snapshots__/Dialog.stories.ts.snap +33 -2
- package/src/Component/Dialog/__snapshots__/Dialog.stories.tsx.snap +2 -0
- package/src/Component/DropMenu/DropMenu.stories.ts +39 -1
- package/src/Component/DropMenu/DropMenu.stories.tsx +29 -0
- package/src/Component/DropMenu/DropMenu.tsx +1 -1
- package/src/Component/DropMenu/Elements/DropMenu.ts +10 -1
- package/src/Component/DropMenu/__snapshots__/DropMenu.stories.ts.snap +14 -0
- package/src/Component/DropMenu/__snapshots__/DropMenu.stories.tsx.snap +3 -1
- package/src/Component/Filters/Elements/Filters.ts +71 -1
- package/src/Component/Filters/FilterItem.stories.ts +2 -1
- package/src/Component/Filters/FilterItem.tsx +1 -1
- package/src/Component/Filters/Filters.figma.ts +1 -1
- package/src/Component/Filters/Filters.stories.ts +95 -3
- package/src/Component/Filters/Filters.stories.tsx +246 -17
- package/src/Component/Filters/Filters.tsx +145 -29
- package/src/Component/Filters/README.md +102 -37
- package/src/Component/Filters/__snapshots__/FilterItem.stories.tsx.snap +3 -3
- package/src/Component/Filters/__snapshots__/Filters.stories.ts.snap +82 -4
- package/src/Component/Filters/__snapshots__/Filters.stories.tsx.snap +9 -3
- package/src/Component/Filters/filters.css +11 -0
- package/src/Component/Gallery/Gallery.tsx +2 -2
- package/src/Component/HeroBanner/HeroBanner.stories.ts +1 -1
- package/src/Component/HeroBanner/__snapshots__/HeroBanner.stories.ts.snap +4 -8
- package/src/Component/HeroSearch/__snapshots__/HeroSearch.stories.ts.snap +5 -10
- package/src/Component/InPageAlert/__snapshots__/InPageAlert.stories.ts.snap +6 -12
- package/src/Component/InPageAlert/in-page-alert.css +2 -1
- package/src/Component/InPageNavigation/Elements/InPageNavigation.ts +10 -5
- package/src/Component/InPageNavigation/Hooks/useInPageNavigation.ts +10 -5
- package/src/Component/InPageNavigation/InPageNavigation.stories.ts +83 -0
- package/src/Component/InPageNavigation/InPageNavigation.stories.tsx +130 -0
- package/src/Component/InPageNavigation/__snapshots__/InPageNavigation.stories.ts.snap +61 -1
- package/src/Component/InPageNavigation/__snapshots__/InPageNavigation.stories.tsx.snap +4 -0
- package/src/Component/InPageNavigation/twig/content-example-duplicate-headings.twig +20 -0
- package/src/Component/InPageNavigation/twig/in-page-navigation-story-duplicate-headings.twig +2 -0
- package/src/Component/LinkList/__snapshots__/LinkList.stories.ts.snap +6 -12
- package/src/Component/ListItem/__snapshots__/ListItem.stories.ts.snap +11 -18
- package/src/Component/ListItem/list-item.css +1 -1
- package/src/Component/ListItem/list-item.twig +2 -2
- package/src/Component/Navigation/Dropdown.stories.tsx +46 -0
- package/src/Component/Navigation/Navigation.stories.ts +56 -0
- package/src/Component/Navigation/__snapshots__/Dropdown.stories.tsx.snap +2 -0
- package/src/Component/Navigation/__snapshots__/Navigation.stories.ts.snap +57 -0
- package/src/Component/Navigation/_navigation.css +1 -1
- package/src/Component/Pagination/Components/PaginationContext.tsx +2 -1
- package/src/Component/Pagination/Components/PaginationItem.tsx +1 -1
- package/src/Component/Pagination/Pagination.stories.ts +44 -4
- package/src/Component/Pagination/Pagination.stories.tsx +31 -0
- package/src/Component/Pagination/__snapshots__/Pagination.stories.ts.snap +69 -12
- package/src/Component/Pagination/__snapshots__/Pagination.stories.tsx.snap +3 -1
- package/src/Component/Pagination/pagination-item.twig +1 -1
- package/src/Component/Pagination/pagination.css +2 -2
- package/src/Component/Popover/__snapshots__/Popover.stories.ts.snap +13 -26
- package/src/Component/Popover/popover.css +1 -1
- package/src/Component/ProgressIndicator/ProgressIndicator.stories.ts +36 -0
- package/src/Component/ProgressIndicator/ProgressIndicator.stories.tsx +30 -0
- package/src/Component/ProgressIndicator/ProgressIndicator.tsx +60 -0
- package/src/Component/ProgressIndicator/README.md +111 -0
- package/src/Component/ProgressIndicator/__snapshots__/ProgressIndicator.stories.ts.snap +67 -0
- package/src/Component/ProgressIndicator/__snapshots__/ProgressIndicator.stories.tsx.snap +7 -0
- package/src/Component/ProgressIndicator/progress-indicator.css +59 -0
- package/src/Component/ProgressIndicator/progress-indicator.twig +22 -0
- package/src/Component/SideNavigation/__snapshots__/SideNavigation.stories.ts.snap +1 -2
- package/src/Component/SocialLinks/__snapshots__/SocialLinks.stories.ts.snap +6 -9
- package/src/Component/Steps/Steps.stories.ts +1 -1
- package/src/Component/Steps/steps.css +13 -0
- package/src/Component/Sticky/Elements/Sticky.ts +1 -1
- package/src/Component/Sticky/sticky.css +3 -3
- package/src/Component/Tabs/Elements/Tabs.ts +3 -1
- package/src/Component/Tabs/Tabs.stories.ts +77 -21
- package/src/Component/Tabs/Tabs.stories.tsx +24 -0
- package/src/Component/Tabs/Tabs.tsx +2 -2
- package/src/Component/Tabs/__snapshots__/Tabs.stories.ts.snap +20 -2
- package/src/Component/Tabs/__snapshots__/Tabs.stories.tsx.snap +3 -1
- package/src/Component/Tabs/tabs.css +2 -0
- package/src/Component/Tag/README.md +52 -26
- package/src/Component/Tag/Tag.stories.tsx +24 -0
- package/src/Component/Tag/Tag.tsx +12 -2
- package/src/Component/Tag/TagItem.stories.ts +25 -0
- package/src/Component/Tag/__snapshots__/Tag.stories.ts.snap +2 -2
- package/src/Component/Tag/__snapshots__/Tag.stories.tsx.snap +2 -0
- package/src/Component/Tag/tag-item.twig +2 -2
- package/src/Component/Tag/tag.css +76 -2
- package/src/Form/Autocomplete/Autocomplete.stories.ts +89 -7
- package/src/Form/Autocomplete/Autocomplete.stories.tsx +85 -1
- package/src/Form/Autocomplete/Autocomplete.tsx +20 -10
- package/src/Form/Autocomplete/Elements/Autocomplete.ts +24 -1
- package/src/Form/Autocomplete/README.md +26 -26
- package/src/Form/Autocomplete/__snapshots__/Autocomplete.stories.ts.snap +39 -5
- package/src/Form/Autocomplete/__snapshots__/Autocomplete.stories.tsx.snap +8 -4
- package/src/Form/Autocomplete/autocomplete.css +12 -1
- package/src/Form/Autocomplete/autocomplete.twig +1 -3
- package/src/Form/Checkbox/FormCheckbox.tsx +2 -8
- package/src/Form/Checkbox/README.md +23 -18
- package/src/Form/Checkbox/input-checkbox.twig +0 -2
- package/src/Form/CheckboxCard/CheckboxCard.stories.ts +90 -0
- package/src/Form/CheckboxCard/CheckboxCard.stories.tsx +43 -0
- package/src/Form/CheckboxCard/CheckboxCard.tsx +102 -0
- package/src/Form/CheckboxCard/README.md +163 -0
- package/src/Form/CheckboxCard/__snapshots__/CheckboxCard.stories.ts.snap +63 -0
- package/src/Form/CheckboxCard/__snapshots__/CheckboxCard.stories.tsx.snap +7 -0
- package/src/Form/CheckboxCard/checkbox-card.twig +29 -0
- package/src/Form/FormItem/__snapshots__/FormItem.stories.ts.snap +2 -2
- package/src/Form/OneTimeCode/OneTimeCode.stories.ts +20 -0
- package/src/Form/OneTimeCode/OneTimeCode.stories.tsx +18 -0
- package/src/Form/OneTimeCode/OneTimeCode.tsx +56 -0
- package/src/Form/OneTimeCode/README.md +83 -0
- package/src/Form/OneTimeCode/__snapshots__/OneTimeCode.stories.ts.snap +7 -0
- package/src/Form/OneTimeCode/__snapshots__/OneTimeCode.stories.tsx.snap +3 -0
- package/src/Form/OneTimeCode/one-time-code.css +13 -0
- package/src/Form/OneTimeCode/one-time-code.twig +31 -0
- package/src/Form/README.md +65 -13
- package/src/Form/Radio/FormRadio.tsx +1 -4
- package/src/Form/Radio/input-radio.twig +0 -2
- package/src/Form/RadioCard/README.md +146 -0
- package/src/Form/RadioCard/RadioCard.stories.ts +95 -0
- package/src/Form/RadioCard/RadioCard.stories.tsx +26 -0
- package/src/Form/RadioCard/RadioCard.tsx +59 -0
- package/src/Form/RadioCard/__snapshots__/RadioCard.stories.ts.snap +69 -0
- package/src/Form/RadioCard/__snapshots__/RadioCard.stories.tsx.snap +3 -0
- package/src/Form/RadioCard/radio-card.twig +20 -0
- package/src/Form/Select/FormSelect.tsx +1 -4
- package/src/Form/Select/input-select.twig +0 -2
- package/src/Form/TextInput/FormText.stories.tsx +14 -0
- package/src/Form/TextInput/FormText.tsx +1 -4
- package/src/Form/TextInput/__snapshots__/FormText.stories.tsx.snap +2 -0
- package/src/Form/TextInput/input-text.twig +0 -2
- package/src/Form/Textarea/FormTextarea.tsx +1 -4
- package/src/Form/Textarea/input-textarea.twig +0 -2
- package/src/Form/Validation.stories.ts +153 -0
- package/src/Form/__snapshots__/Validation.stories.ts.snap +130 -0
- package/src/Form/form.css +240 -55
- package/src/Layout/Footer/__snapshots__/Footer.stories.ts.snap +18 -33
- package/src/Layout/Grid/grid.css +4 -4
- package/src/Layout/Header/Header.stories.ts +33 -0
- package/src/Layout/Header/Header.stories.tsx +31 -0
- package/src/Layout/Header/__snapshots__/Header.stories.ts.snap +50 -0
- package/src/Layout/Header/__snapshots__/Header.stories.tsx.snap +2 -0
- package/src/Layout/Masthead/__snapshots__/Masthead.stories.ts.snap +8 -16
- package/src/Layout/Section/__snapshots__/Background.stories.ts.snap +2 -4
- package/src/Layout/Section/__snapshots__/Section.stories.ts.snap +4 -8
- package/src/Layout/Sidebar/__snapshots__/Sidebar.stories.ts.snap +5 -5
- package/src/Layout/Sidebar/sidebar.css +1 -0
- package/src/Layout/Sidebar/sidebar.twig +1 -1
- package/src/Utility/Hooks/useIsomorphicLayoutEffect.ts +8 -0
- package/src/Utility/_layout-utils.css +8 -0
- package/src/Utility/_mixins.css +24 -0
- package/src/Utility/print.css +51 -29
- package/src/Utility/utilities.css +22 -2
- package/src/_custom-media.css +1 -0
- package/src/constants.css +12 -2
- package/src/enums.ts +22 -0
- package/src/react.ts +5 -0
- package/tools/lib/extract-classnames.mjs +0 -0
- package/tools/lint-classnames.mjs +1 -1
- package/tools/test-utils/screen-reader.ts +33 -0
- package/dist/build/chunks/DropMenu-Co9jZZ4S.js +0 -1
- package/dist/build/chunks/Gallery-BT3cxS5m.js +0 -1
- package/dist/build/chunks/GlobalToggle-DQHho97V.js +0 -1
- package/dist/build/chunks/InPageNavigation-CzR_KZaz.js +0 -1
- package/dist/build/chunks/Navigation-B9Wug-ok.js +0 -1
- package/dist/build/chunks/Popover-De_CQqcd.js +0 -1
- package/dist/build/chunks/Sticky-Kyjykb36.js +0 -1
- package/dist/build/chunks/Tabs-Dm8g301e.js +0 -15
- package/dist/build/chunks/disclosure-widget-BETzOHLO.js +0 -1
- package/dist/build/chunks/polyfills-Dokbkxxk.js +0 -1
- package/dist/build/chunks/utilities-C5dAO2YA.js +0 -1
|
@@ -78,28 +78,25 @@ exports[`Everything 1`] = `
|
|
|
78
78
|
|
|
79
79
|
<nav class="mx-social-links" aria-label="Social media links">
|
|
80
80
|
|
|
81
|
-
|
|
82
|
-
<a href="#">
|
|
81
|
+
|
|
82
|
+
<a href="#" aria-label="Facebook">
|
|
83
83
|
|
|
84
84
|
<span class="mx-icon mx-icon--facebook mx-icon--size-md"></span>
|
|
85
85
|
|
|
86
|
-
<span class="sr-only">Facebook</span>
|
|
87
86
|
|
|
88
87
|
</a>
|
|
89
|
-
|
|
90
|
-
<a href="#">
|
|
88
|
+
|
|
89
|
+
<a href="#" aria-label="Instagram">
|
|
91
90
|
|
|
92
91
|
<span class="mx-icon mx-icon--instagram mx-icon--size-md"></span>
|
|
93
92
|
|
|
94
|
-
<span class="sr-only">Instagram</span>
|
|
95
93
|
|
|
96
94
|
</a>
|
|
97
|
-
|
|
98
|
-
<a href="#">
|
|
95
|
+
|
|
96
|
+
<a href="#" aria-label="LinkedIn">
|
|
99
97
|
|
|
100
98
|
<span class="mx-icon mx-icon--linkedin mx-icon--size-md"></span>
|
|
101
99
|
|
|
102
|
-
<span class="sr-only">LinkedIn</span>
|
|
103
100
|
|
|
104
101
|
</a>
|
|
105
102
|
|
|
@@ -112,14 +109,12 @@ exports[`Everything 1`] = `
|
|
|
112
109
|
|
|
113
110
|
<a href="#">
|
|
114
111
|
|
|
115
|
-
|
|
116
|
-
|
|
112
|
+
Accessibility
|
|
117
113
|
</a>
|
|
118
114
|
|
|
119
115
|
<a href="#">
|
|
120
116
|
|
|
121
|
-
|
|
122
|
-
|
|
117
|
+
Terms & Conditions
|
|
123
118
|
</a>
|
|
124
119
|
|
|
125
120
|
</nav>
|
|
@@ -169,14 +164,12 @@ exports[`Footer 1`] = `
|
|
|
169
164
|
|
|
170
165
|
<a href="#">
|
|
171
166
|
|
|
172
|
-
|
|
173
|
-
|
|
167
|
+
Accessibility
|
|
174
168
|
</a>
|
|
175
169
|
|
|
176
170
|
<a href="#">
|
|
177
171
|
|
|
178
|
-
|
|
179
|
-
|
|
172
|
+
Terms & Conditions
|
|
180
173
|
</a>
|
|
181
174
|
|
|
182
175
|
</nav>
|
|
@@ -226,14 +219,12 @@ exports[`Light 1`] = `
|
|
|
226
219
|
|
|
227
220
|
<a href="#">
|
|
228
221
|
|
|
229
|
-
|
|
230
|
-
|
|
222
|
+
Accessibility
|
|
231
223
|
</a>
|
|
232
224
|
|
|
233
225
|
<a href="#">
|
|
234
226
|
|
|
235
|
-
|
|
236
|
-
|
|
227
|
+
Terms & Conditions
|
|
237
228
|
</a>
|
|
238
229
|
|
|
239
230
|
</nav>
|
|
@@ -283,14 +274,12 @@ exports[`No Logo 1`] = `
|
|
|
283
274
|
|
|
284
275
|
<a href="#">
|
|
285
276
|
|
|
286
|
-
|
|
287
|
-
|
|
277
|
+
Accessibility
|
|
288
278
|
</a>
|
|
289
279
|
|
|
290
280
|
<a href="#">
|
|
291
281
|
|
|
292
|
-
|
|
293
|
-
|
|
282
|
+
Terms & Conditions
|
|
294
283
|
</a>
|
|
295
284
|
|
|
296
285
|
</nav>
|
|
@@ -313,14 +302,12 @@ exports[`No Menu 1`] = `
|
|
|
313
302
|
|
|
314
303
|
<a href="#">
|
|
315
304
|
|
|
316
|
-
|
|
317
|
-
|
|
305
|
+
Accessibility
|
|
318
306
|
</a>
|
|
319
307
|
|
|
320
308
|
<a href="#">
|
|
321
309
|
|
|
322
|
-
|
|
323
|
-
|
|
310
|
+
Terms & Conditions
|
|
324
311
|
</a>
|
|
325
312
|
|
|
326
313
|
</nav>
|
|
@@ -371,14 +358,12 @@ exports[`With Acknowledgment 1`] = `
|
|
|
371
358
|
|
|
372
359
|
<a href="#">
|
|
373
360
|
|
|
374
|
-
|
|
375
|
-
|
|
361
|
+
Accessibility
|
|
376
362
|
</a>
|
|
377
363
|
|
|
378
364
|
<a href="#">
|
|
379
365
|
|
|
380
|
-
|
|
381
|
-
|
|
366
|
+
Terms & Conditions
|
|
382
367
|
</a>
|
|
383
368
|
|
|
384
369
|
</nav>
|
package/src/Layout/Grid/grid.css
CHANGED
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
@layer design-system.layouts {
|
|
6
6
|
.mx-grid {
|
|
7
|
-
--grid-repeat: auto-fit;
|
|
8
|
-
--grid-min: 20ch;
|
|
9
|
-
|
|
10
7
|
display: grid;
|
|
11
|
-
grid-template-columns: repeat(
|
|
8
|
+
grid-template-columns: repeat(
|
|
9
|
+
var(--grid-repeat, auto-fit),
|
|
10
|
+
minmax(min(100%, var(--grid-min, 20ch)), 1fr)
|
|
11
|
+
);
|
|
12
12
|
grid-template-rows: 1fr;
|
|
13
13
|
gap: var(--grid-gap, var(--gap));
|
|
14
14
|
|
|
@@ -18,6 +18,7 @@ import "../../Component/Navigation/Elements/Navigation"
|
|
|
18
18
|
// css.
|
|
19
19
|
import "../../Component/Navigation/navigation.css"
|
|
20
20
|
import { modes } from "../../../.storybook/modes"
|
|
21
|
+
import { runScreenReaderWalkthrough } from "../../../tools/test-utils/screen-reader"
|
|
21
22
|
|
|
22
23
|
type MxHeaderType = Omit<HeaderType, "controls"> & {
|
|
23
24
|
stacked: boolean
|
|
@@ -117,6 +118,38 @@ export const Header: Story = {
|
|
|
117
118
|
},
|
|
118
119
|
}
|
|
119
120
|
|
|
121
|
+
/**
|
|
122
|
+
* Steps a virtual screen reader through the page and asserts on what it announces.
|
|
123
|
+
*/
|
|
124
|
+
export const ScreenReaderAnnouncements: Story = {
|
|
125
|
+
play: async () => {
|
|
126
|
+
const log = await runScreenReaderWalkthrough()
|
|
127
|
+
await expect(log).toEqual([
|
|
128
|
+
"document",
|
|
129
|
+
"banner",
|
|
130
|
+
"image, Mixtape",
|
|
131
|
+
"navigation, Primary navigation",
|
|
132
|
+
"list",
|
|
133
|
+
"listitem, level 1, position 1, set size 4",
|
|
134
|
+
"link, News",
|
|
135
|
+
"end of listitem, level 1, position 1, set size 4",
|
|
136
|
+
"listitem, level 1, position 2, set size 4",
|
|
137
|
+
"link, About us",
|
|
138
|
+
"end of listitem, level 1, position 2, set size 4",
|
|
139
|
+
"listitem, level 1, position 3, set size 4",
|
|
140
|
+
"link, Contact",
|
|
141
|
+
"end of listitem, level 1, position 3, set size 4",
|
|
142
|
+
"listitem, level 1, position 4, set size 4",
|
|
143
|
+
"link, Resources",
|
|
144
|
+
"end of listitem, level 1, position 4, set size 4",
|
|
145
|
+
"end of list",
|
|
146
|
+
"end of navigation, Primary navigation",
|
|
147
|
+
"end of banner",
|
|
148
|
+
"end of document",
|
|
149
|
+
])
|
|
150
|
+
},
|
|
151
|
+
}
|
|
152
|
+
|
|
120
153
|
export const WithTitle: Story = {
|
|
121
154
|
args: {
|
|
122
155
|
title: "Design System",
|
|
@@ -4,6 +4,7 @@ import Component from "./Header"
|
|
|
4
4
|
import { mixtapeLogo, navigationItems } from "../../../mockups/constants"
|
|
5
5
|
import "./header.css"
|
|
6
6
|
import { Page } from "../../../.storybook-react/decorators"
|
|
7
|
+
import { runScreenReaderWalkthrough } from "../../../tools/test-utils/screen-reader"
|
|
7
8
|
|
|
8
9
|
const meta: Meta<typeof Component> = {
|
|
9
10
|
decorators: [Page],
|
|
@@ -45,3 +46,33 @@ export const PrimaryHeader: StoryObj<typeof meta> = {
|
|
|
45
46
|
})
|
|
46
47
|
},
|
|
47
48
|
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Steps a virtual screen reader through the page and asserts on what it announces.
|
|
52
|
+
*/
|
|
53
|
+
export const ScreenReaderAnnouncements: StoryObj<typeof meta> = {
|
|
54
|
+
play: async () => {
|
|
55
|
+
const log = await runScreenReaderWalkthrough()
|
|
56
|
+
await expect(log).toEqual([
|
|
57
|
+
"document",
|
|
58
|
+
"banner",
|
|
59
|
+
"image, Mixtape",
|
|
60
|
+
"navigation, Primary Navigation",
|
|
61
|
+
"list",
|
|
62
|
+
"listitem, level 1, position 1, set size 3",
|
|
63
|
+
"link, Home",
|
|
64
|
+
"button, Sub-navigation, not expanded",
|
|
65
|
+
"end of listitem, level 1, position 1, set size 3",
|
|
66
|
+
"listitem, level 1, position 2, set size 3",
|
|
67
|
+
"link, About",
|
|
68
|
+
"end of listitem, level 1, position 2, set size 3",
|
|
69
|
+
"listitem, level 1, position 3, set size 3",
|
|
70
|
+
"link, Contact",
|
|
71
|
+
"end of listitem, level 1, position 3, set size 3",
|
|
72
|
+
"end of list",
|
|
73
|
+
"end of navigation, Primary Navigation",
|
|
74
|
+
"end of banner",
|
|
75
|
+
"end of document",
|
|
76
|
+
])
|
|
77
|
+
},
|
|
78
|
+
}
|
|
@@ -72,6 +72,56 @@ exports[`Header 1`] = `
|
|
|
72
72
|
<div id="unique-0" class="mx-header__nav mx-header__collapse-toggle">
|
|
73
73
|
|
|
74
74
|
|
|
75
|
+
<mx-nav flyout="">
|
|
76
|
+
<nav class="mx-nav mx-nav--dropdown" aria-label="Primary navigation" id="header-story">
|
|
77
|
+
<ul class="mx-nav__level-1">
|
|
78
|
+
<li>
|
|
79
|
+
<a href="#">
|
|
80
|
+
News
|
|
81
|
+
</a>
|
|
82
|
+
</li>
|
|
83
|
+
<li>
|
|
84
|
+
<a href="#">
|
|
85
|
+
About us
|
|
86
|
+
</a>
|
|
87
|
+
</li>
|
|
88
|
+
<li>
|
|
89
|
+
<a href="#">
|
|
90
|
+
Contact
|
|
91
|
+
</a>
|
|
92
|
+
</li>
|
|
93
|
+
<li>
|
|
94
|
+
<a href="#">
|
|
95
|
+
Resources
|
|
96
|
+
</a>
|
|
97
|
+
</li>
|
|
98
|
+
</ul>
|
|
99
|
+
|
|
100
|
+
</nav>
|
|
101
|
+
</mx-nav>
|
|
102
|
+
|
|
103
|
+
</div>
|
|
104
|
+
|
|
105
|
+
</div>
|
|
106
|
+
</div>
|
|
107
|
+
</header>
|
|
108
|
+
"
|
|
109
|
+
`;
|
|
110
|
+
|
|
111
|
+
exports[`Screen Reader Announcements 1`] = `
|
|
112
|
+
"<header class="mx-header mx-page mx-section--s">
|
|
113
|
+
<div class="mx-header__inner">
|
|
114
|
+
<div class="mx-header__brand">
|
|
115
|
+
<img alt="Mixtape" src="./mixtape-logo.png" width="120" height="">
|
|
116
|
+
|
|
117
|
+
</div>
|
|
118
|
+
<div class="mx-header__toggles">
|
|
119
|
+
<mx-global-toggle><button aria-controls="unique-0" class="mx-button mx-button--icon-only mx-icon mx-icon--menu">Open Menu</button></mx-global-toggle>
|
|
120
|
+
</div>
|
|
121
|
+
<div class="mx-header__main">
|
|
122
|
+
<div id="unique-0" class="mx-header__nav mx-header__collapse-toggle">
|
|
123
|
+
|
|
124
|
+
|
|
75
125
|
<mx-nav flyout="">
|
|
76
126
|
<nav class="mx-nav mx-nav--dropdown" aria-label="Primary navigation" id="header-story">
|
|
77
127
|
<ul class="mx-nav__level-1">
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
2
|
|
|
3
3
|
exports[`Primary Header 1`] = `"<header class="mx-page mx-header mx-section--s"><div class="mx-header__inner"><div class="mx-header__brand"><img alt="Mixtape" src="mixtape-logo.png"></div><div class="mx-header__main"><div id="_r_0_" class="mx-header__nav mx-header__collapse-toggle"><nav class="mx-nav mx-nav--dropdown" aria-label="Primary Navigation" id="_r_0_"><ul class="mx-nav__level-1"><li class="mx-nav__has-subnav"><a href="http://example.com/#1" class="">Home</a><button aria-controls="_r_1_" aria-expanded="false" class="mx-nav__toggle mx-icon mx-icon--only mx-icon--chevron-down" type="button">Sub-navigation</button></li><li class=""><a href="http://example.com/#2" class="">About</a></li><li class=""><a href="http://example.com/#3" class="">Contact</a></li></ul></nav></div></div></div></header>"`;
|
|
4
|
+
|
|
5
|
+
exports[`Screen Reader Announcements 1`] = `"<header class="mx-page mx-header mx-section--s"><div class="mx-header__inner"><div class="mx-header__brand"><img alt="Mixtape" src="mixtape-logo.png"></div><div class="mx-header__main"><div id="_r_7_" class="mx-header__nav mx-header__collapse-toggle"><nav class="mx-nav mx-nav--dropdown" aria-label="Primary Navigation" id="_r_7_"><ul class="mx-nav__level-1"><li class="mx-nav__has-subnav"><a href="http://example.com/#1" class="">Home</a><button aria-controls="_r_8_" aria-expanded="false" class="mx-nav__toggle mx-icon mx-icon--only mx-icon--chevron-down" type="button">Sub-navigation</button></li><li class=""><a href="http://example.com/#2" class="">About</a></li><li class=""><a href="http://example.com/#3" class="">Contact</a></li></ul></nav></div></div></div></header>"`;
|
|
@@ -5,14 +5,12 @@ exports[`Light 1`] = `
|
|
|
5
5
|
|
|
6
6
|
<a href="#content">
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
Skip to content
|
|
10
9
|
</a>
|
|
11
10
|
|
|
12
11
|
<a href="#nav">
|
|
13
12
|
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
Skip to navigation
|
|
16
14
|
</a>
|
|
17
15
|
|
|
18
16
|
</nav>
|
|
@@ -29,14 +27,12 @@ exports[`Masthead 1`] = `
|
|
|
29
27
|
|
|
30
28
|
<a href="#content">
|
|
31
29
|
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
Skip to content
|
|
34
31
|
</a>
|
|
35
32
|
|
|
36
33
|
<a href="#nav">
|
|
37
34
|
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
Skip to navigation
|
|
40
36
|
</a>
|
|
41
37
|
|
|
42
38
|
</nav>
|
|
@@ -53,14 +49,12 @@ exports[`With Links 1`] = `
|
|
|
53
49
|
|
|
54
50
|
<a href="#content">
|
|
55
51
|
|
|
56
|
-
|
|
57
|
-
|
|
52
|
+
Skip to content
|
|
58
53
|
</a>
|
|
59
54
|
|
|
60
55
|
<a href="#nav">
|
|
61
56
|
|
|
62
|
-
|
|
63
|
-
|
|
57
|
+
Skip to navigation
|
|
64
58
|
</a>
|
|
65
59
|
|
|
66
60
|
</nav>
|
|
@@ -73,16 +67,14 @@ exports[`With Links 1`] = `
|
|
|
73
67
|
|
|
74
68
|
<span class="mx-icon mx-icon--user"></span>
|
|
75
69
|
|
|
76
|
-
|
|
77
|
-
|
|
70
|
+
Create account
|
|
78
71
|
</a>
|
|
79
72
|
|
|
80
73
|
<a href="#">
|
|
81
74
|
|
|
82
75
|
<span class="mx-icon mx-icon--login"></span>
|
|
83
76
|
|
|
84
|
-
|
|
85
|
-
|
|
77
|
+
Log in
|
|
86
78
|
</a>
|
|
87
79
|
|
|
88
80
|
</nav>
|
|
@@ -17,8 +17,7 @@ exports[`Background 1`] = `
|
|
|
17
17
|
|
|
18
18
|
<a href="#" class="mx-link--more">
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
See more content
|
|
22
21
|
<span class="mx-icon mx-icon--arrow-right"></span>
|
|
23
22
|
|
|
24
23
|
</a>
|
|
@@ -47,8 +46,7 @@ exports[`Dark 1`] = `
|
|
|
47
46
|
|
|
48
47
|
<a href="#" class="mx-link--more">
|
|
49
48
|
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
See more content
|
|
52
50
|
<span class="mx-icon mx-icon--arrow-right"></span>
|
|
53
51
|
|
|
54
52
|
</a>
|
|
@@ -11,8 +11,7 @@ exports[`Background 1`] = `
|
|
|
11
11
|
|
|
12
12
|
<a href="#" class="mx-link--more">
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
See more content
|
|
16
15
|
<span class="mx-icon mx-icon--arrow-right"></span>
|
|
17
16
|
|
|
18
17
|
</a>
|
|
@@ -35,8 +34,7 @@ exports[`Box 1`] = `
|
|
|
35
34
|
|
|
36
35
|
<a href="#" class="mx-link--more">
|
|
37
36
|
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
See more content
|
|
40
38
|
<span class="mx-icon mx-icon--arrow-right"></span>
|
|
41
39
|
|
|
42
40
|
</a>
|
|
@@ -69,8 +67,7 @@ exports[`Modifiers 1`] = `
|
|
|
69
67
|
|
|
70
68
|
<a href="#" class="mx-link--more">
|
|
71
69
|
|
|
72
|
-
|
|
73
|
-
|
|
70
|
+
See more content
|
|
74
71
|
<span class="mx-icon mx-icon--arrow-right"></span>
|
|
75
72
|
|
|
76
73
|
</a>
|
|
@@ -93,8 +90,7 @@ exports[`Section 1`] = `
|
|
|
93
90
|
|
|
94
91
|
<a href="#" class="mx-link--more">
|
|
95
92
|
|
|
96
|
-
|
|
97
|
-
|
|
93
|
+
See more content
|
|
98
94
|
<span class="mx-icon mx-icon--arrow-right"></span>
|
|
99
95
|
|
|
100
96
|
</a>
|
|
@@ -4,7 +4,7 @@ exports[`No Sidebar 1`] = `
|
|
|
4
4
|
"
|
|
5
5
|
|
|
6
6
|
<div class="mx-grid--sidebar">
|
|
7
|
-
<section class="js-content mx-vertical-flow-grid">
|
|
7
|
+
<section class="js-content mx-vertical-flow-grid gap--xl">
|
|
8
8
|
Main content
|
|
9
9
|
</section>
|
|
10
10
|
</div>
|
|
@@ -15,7 +15,7 @@ exports[`Reverse Large 1`] = `
|
|
|
15
15
|
"
|
|
16
16
|
|
|
17
17
|
<div class="mx-grid--sidebar mx-grid--sidebar-rev-lg">
|
|
18
|
-
<section class="js-content mx-vertical-flow-grid">
|
|
18
|
+
<section class="js-content mx-vertical-flow-grid gap--xl">
|
|
19
19
|
Main content
|
|
20
20
|
</section>
|
|
21
21
|
<aside class="mx-vertical-flow-grid">
|
|
@@ -30,7 +30,7 @@ exports[`Revserse Medium 1`] = `
|
|
|
30
30
|
"
|
|
31
31
|
|
|
32
32
|
<div class="mx-grid--sidebar mx-grid--sidebar-rev">
|
|
33
|
-
<section class="js-content mx-vertical-flow-grid">
|
|
33
|
+
<section class="js-content mx-vertical-flow-grid gap--xl">
|
|
34
34
|
Main content
|
|
35
35
|
</section>
|
|
36
36
|
<aside class="mx-vertical-flow-grid">
|
|
@@ -45,7 +45,7 @@ exports[`Sidebar 1`] = `
|
|
|
45
45
|
"
|
|
46
46
|
|
|
47
47
|
<div class="mx-grid--sidebar">
|
|
48
|
-
<section class="js-content mx-vertical-flow-grid">
|
|
48
|
+
<section class="js-content mx-vertical-flow-grid gap--xl">
|
|
49
49
|
Main content
|
|
50
50
|
</section>
|
|
51
51
|
<aside class="mx-vertical-flow-grid">
|
|
@@ -64,7 +64,7 @@ exports[`Sidebar First 1`] = `
|
|
|
64
64
|
Sidebar content
|
|
65
65
|
</aside>
|
|
66
66
|
|
|
67
|
-
<section class="js-content mx-vertical-flow-grid">
|
|
67
|
+
<section class="js-content mx-vertical-flow-grid gap--xl">
|
|
68
68
|
Main content
|
|
69
69
|
</section>
|
|
70
70
|
</div>
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
{% endfor %}
|
|
9
9
|
{% set attributes = (attributes ?? create_attribute()).addClass(classes) %}
|
|
10
10
|
{% set sidebarAttributes = (sidebarAttributes ?? create_attribute()).addClass('mx-vertical-flow-grid') %}
|
|
11
|
-
{% set contentAttributes = (contentAttributes ?? create_attribute()).addClass('js-content', 'mx-vertical-flow-grid') %}
|
|
11
|
+
{% set contentAttributes = (contentAttributes ?? create_attribute()).addClass('js-content', 'mx-vertical-flow-grid', 'gap--xl') %}
|
|
12
12
|
|
|
13
13
|
{% if sidebarContent is not empty %}
|
|
14
14
|
{% set sidebar %}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { useEffect, useLayoutEffect } from "react"
|
|
2
|
+
|
|
3
|
+
// useLayoutEffect warns when it actually runs during server rendering (it's
|
|
4
|
+
// a no-op there) - fall back to useEffect outside the browser so
|
|
5
|
+
// server-rendered/hydrated consumers never see that warning.
|
|
6
|
+
const useIsomorphicLayoutEffect = typeof window === "undefined" ? useEffect : useLayoutEffect
|
|
7
|
+
|
|
8
|
+
export default useIsomorphicLayoutEffect
|
package/src/Utility/_mixins.css
CHANGED
|
@@ -8,6 +8,30 @@
|
|
|
8
8
|
white-space: nowrap;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
+
/**
|
|
12
|
+
* Pseudo-elements that draw something — a masked icon, a radio dot — paint it
|
|
13
|
+
* with background-color, which forced-colors mode flattens to Canvas: the
|
|
14
|
+
* shape disappears. Opt the pseudo out and name a real system colour instead.
|
|
15
|
+
*
|
|
16
|
+
* currentcolor won't do: it inherits the parent's *computed* colour, and
|
|
17
|
+
* forcing happens later at used-value time — an opted-out pseudo would paint
|
|
18
|
+
* the brand colour and still vanish against a dark high-contrast background.
|
|
19
|
+
*
|
|
20
|
+
* --forced-colour carries the right system colour down from context; see the
|
|
21
|
+
* overrides on .mx-button, a[href] and :disabled.
|
|
22
|
+
*
|
|
23
|
+
* Add to any rule that paints a glyph via background-color.
|
|
24
|
+
*/
|
|
25
|
+
/* stylelint-disable no-invalid-position-declaration -- the mixin body is
|
|
26
|
+
always inlined into a rule, so the declarations do have a parent. */
|
|
27
|
+
@define-mixin forced-colors-paint {
|
|
28
|
+
@media (--forced-colors) {
|
|
29
|
+
forced-color-adjust: none;
|
|
30
|
+
background-color: var(--forced-colour, CanvasText);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
/* stylelint-enable no-invalid-position-declaration */
|
|
34
|
+
|
|
11
35
|
@define-mixin sr-undo {
|
|
12
36
|
clip-path: none;
|
|
13
37
|
position: revert !important;
|