@pnx-mixtape/mxds 0.0.6 → 0.0.7
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/package.json +2 -2
- package/src/Atom/Button/Button.stories.ts +4 -3
- package/src/Atom/Button/__snapshots__/Button.stories.tsx.snap +2 -2
- package/src/Atom/Button/_buttons.css +1 -1
- package/src/Atom/Button/button.twig +1 -1
- package/src/Atom/Heading/__snapshots__/Heading.stories.ts.snap +1 -1
- package/src/Atom/Heading/heading.twig +4 -1
- package/src/Atom/Icon/__snapshots__/Icon.stories.tsx.snap +3 -3
- package/src/Atom/Icon/icon.twig +1 -1
- package/src/Atom/Link/Link.stories.ts +8 -7
- package/src/Atom/Link/__snapshots__/Link.stories.ts.snap +5 -9
- package/src/Atom/Link/__snapshots__/Link.stories.tsx.snap +3 -3
- package/src/Atom/Link/_links.css +12 -2
- package/src/Atom/Link/link.twig +6 -4
- package/src/Atom/Media/Media.stories.ts +9 -9
- package/src/Atom/Media/__snapshots__/Media.stories.ts.snap +1 -1
- package/src/Atom/Media/__snapshots__/Media.stories.tsx.snap +1 -1
- package/src/Atom/Media/media.twig +6 -2
- package/src/Atom/_generic.css +0 -13
- package/src/Component/Accordion/Accordion.stories.ts +9 -7
- package/src/Component/Accordion/__snapshots__/Accordion.stories.ts.snap +2 -2
- package/src/Component/Accordion/__snapshots__/Accordion.stories.tsx.snap +4 -4
- package/src/Component/Accordion/accordion-item.twig +1 -1
- package/src/Component/Accordion/accordion.twig +3 -1
- package/src/Component/Breadcrumb/Breadcrumb.stories.ts +23 -5
- package/src/Component/Breadcrumb/__snapshots__/Breadcrumb.stories.ts.snap +15 -8
- package/src/Component/Breadcrumb/__snapshots__/Breadcrumb.stories.tsx.snap +6 -6
- package/src/Component/Breadcrumb/breadcrumb.css +7 -3
- package/src/Component/Breadcrumb/breadcrumb.twig +14 -12
- package/src/Component/Callout/Callout.stories.ts +5 -4
- package/src/Component/Callout/__snapshots__/Callout.stories.ts.snap +1 -1
- package/src/Component/Callout/callout.twig +1 -1
- package/src/Component/Card/Card.stories.ts +47 -20
- package/src/Component/Card/Card.stories.tsx +5 -4
- package/src/Component/Card/__snapshots__/Card.stories.ts.snap +123 -49
- package/src/Component/Card/__snapshots__/Card.stories.tsx.snap +18 -18
- package/src/Component/Card/card.css +57 -43
- package/src/Component/Card/card.twig +13 -13
- package/src/Component/ContentBlock/ContentBlock.stories.ts +73 -6
- package/src/Component/ContentBlock/ContentBlock.stories.tsx +19 -10
- package/src/Component/ContentBlock/ContentBlock.tsx +25 -17
- package/src/Component/ContentBlock/__snapshots__/ContentBlock.stories.ts.snap +137 -5
- package/src/Component/ContentBlock/__snapshots__/ContentBlock.stories.tsx.snap +21 -14
- package/src/Component/ContentBlock/content-block.css +21 -10
- package/src/Component/ContentBlock/content-block.twig +21 -11
- package/src/Component/DropMenu/Components/DropMenuItem.tsx +1 -1
- package/src/Component/DropMenu/DropMenu.stories.ts +1 -1
- package/src/Component/DropMenu/DropMenu.tsx +6 -6
- package/src/Component/DropMenu/__snapshots__/DropMenu.stories.ts.snap +2 -2
- package/src/Component/DropMenu/__snapshots__/DropMenu.stories.tsx.snap +2 -2
- package/src/Component/DropMenu/drop-menu.css +2 -2
- package/src/Component/DropMenu/drop-menu.twig +2 -2
- package/src/Component/GlobalAlert/GlobalAlert.stories.ts +5 -6
- package/src/Component/GlobalAlert/__snapshots__/GlobalAlert.stories.tsx.snap +7 -7
- package/src/Component/GlobalAlert/global-alert.css +1 -1
- package/src/Component/GlobalAlert/global-alert.twig +1 -1
- package/src/Component/HeroBanner/HeroBanner.stories.ts +17 -12
- package/src/Component/HeroBanner/__snapshots__/HeroBanner.stories.ts.snap +11 -11
- package/src/Component/HeroBanner/__snapshots__/HeroBanner.stories.tsx.snap +9 -9
- package/src/Component/HeroBanner/hero-banner.twig +2 -2
- package/src/Component/InPageAlert/InPageAlert.stories.ts +4 -3
- package/src/Component/InPageAlert/__snapshots__/InPageAlert.stories.ts.snap +1 -3
- package/src/Component/InPageAlert/in-page-alert.twig +1 -1
- package/src/Component/InPageNavigation/Elements/InPageNavigation.ts +2 -2
- package/src/Component/InPageNavigation/InPageNavigation.stories.ts +30 -7
- package/src/Component/InPageNavigation/InPageNavigation.tsx +4 -4
- package/src/Component/InPageNavigation/__snapshots__/InPageNavigation.stories.ts.snap +103 -5
- package/src/Component/InPageNavigation/__snapshots__/InPageNavigation.stories.tsx.snap +21 -21
- package/src/Component/InPageNavigation/in-page-navigation.css +3 -3
- package/src/Component/InPageNavigation/in-page-navigation.twig +13 -17
- package/src/Component/InPageNavigation/twig/{in-page-navigation-content-example.twig → content-example.twig} +2 -0
- package/src/Component/InPageNavigation/twig/in-page-navigation-story.twig +2 -0
- package/src/Component/LinkList/__snapshots__/LinkList.stories.tsx.snap +8 -8
- package/src/Component/LinkList/link-list.twig +1 -1
- package/src/Component/ListItem/ListItem.stories.ts +105 -0
- package/src/Component/ListItem/{Teaser.stories.tsx → ListItem.stories.tsx} +4 -5
- package/src/Component/ListItem/ListItem.tsx +55 -0
- package/src/Component/ListItem/__snapshots__/ListItem.stories.ts.snap +184 -0
- package/src/Component/ListItem/__snapshots__/ListItem.stories.tsx.snap +23 -0
- package/src/Component/ListItem/list-item.css +109 -0
- package/src/Component/ListItem/list-item.twig +32 -0
- package/src/Component/Navigation/Components/DropdownLevel.tsx +11 -6
- package/src/Component/Navigation/Dropdown.tsx +2 -2
- package/src/Component/Navigation/Elements/Navigation.ts +6 -5
- package/src/Component/Navigation/Navigation.stories.ts +261 -5
- package/src/Component/Navigation/Navigation.tsx +2 -2
- package/src/Component/Navigation/__snapshots__/Dropdown.stories.tsx.snap +4 -4
- package/src/Component/Navigation/__snapshots__/Navigation.stories.ts.snap +294 -7
- package/src/Component/Navigation/__snapshots__/Navigation.stories.tsx.snap +2 -2
- package/src/Component/Navigation/_navigation-collapsible.css +22 -12
- package/src/Component/Navigation/_navigation-dropdown.css +8 -8
- package/src/Component/Navigation/_navigation-mega.css +4 -4
- package/src/Component/Navigation/_navigation.css +9 -6
- package/src/Component/Navigation/menu.twig +42 -0
- package/src/Component/Navigation/navigation.css +1 -1
- package/src/Component/Navigation/navigation.twig +23 -9
- package/src/Component/Pagination/Components/PaginationItem.tsx +4 -4
- package/src/Component/Pagination/Pagination.stories.ts +55 -6
- package/src/Component/Pagination/Pagination.tsx +2 -2
- package/src/Component/Pagination/__snapshots__/Pagination.stories.ts.snap +36 -33
- package/src/Component/Pagination/__snapshots__/Pagination.stories.tsx.snap +11 -11
- package/src/Component/Pagination/pagination-item.twig +7 -0
- package/src/Component/Pagination/pagination.css +12 -9
- package/src/Component/Pagination/pagination.twig +12 -37
- package/src/Component/SideNavigation/SideNavigation.stories.ts +97 -0
- package/src/Component/SideNavigation/__snapshots__/SideNavigation.stories.ts.snap +86 -0
- package/src/Component/SideNavigation/side-navigation.css +78 -0
- package/src/Component/SideNavigation/side-navigation.twig +35 -0
- package/src/Component/SideNavigation/twig/side-navigation-story.twig +7 -0
- package/src/Component/SocialLinks/SocialLinks.stories.ts +58 -0
- package/src/Component/SocialLinks/__snapshots__/SocialLinks.stories.ts.snap +32 -0
- package/src/Component/SocialLinks/social-links.css +17 -0
- package/src/Component/SocialLinks/social-links.twig +6 -0
- package/src/Component/SocialShare/__snapshots__/SocialShare.stories.tsx.snap +3 -3
- package/src/Component/Steps/Steps.stories.ts +88 -0
- package/src/Component/Steps/__snapshots__/Steps.stories.ts.snap +111 -0
- package/src/Component/Steps/step-item.twig +11 -0
- package/src/Component/Steps/steps.css +99 -0
- package/src/Component/Steps/steps.entry.js +0 -0
- package/src/Component/Steps/steps.twig +18 -0
- package/src/Component/Sticky/Sticky.stories.ts +3 -0
- package/src/Component/Sticky/__snapshots__/Sticky.stories.ts.snap +7 -8
- package/src/Component/Sticky/sticky.twig +2 -20
- package/src/Component/Tabs/Components/Tab.tsx +1 -2
- package/src/Component/Tabs/Components/TabDropMenu.tsx +1 -1
- package/src/Component/Tabs/Components/TabList.tsx +1 -1
- package/src/Component/Tabs/Components/TabPanel.tsx +2 -2
- package/src/Component/Tabs/Elements/Tabs.ts +98 -49
- package/src/Component/Tabs/Tabs.stories.ts +45 -8
- package/src/Component/Tabs/Tabs.stories.tsx +3 -3
- package/src/Component/Tabs/Tabs.tsx +2 -2
- package/src/Component/Tabs/__snapshots__/Tabs.stories.ts.snap +46 -92
- package/src/Component/Tabs/__snapshots__/Tabs.stories.tsx.snap +11 -14
- package/src/Component/Tabs/tab-item.twig +11 -0
- package/src/Component/Tabs/tabs.css +20 -17
- package/src/Component/Tabs/tabs.twig +10 -46
- package/src/Component/Tag/__snapshots__/Tag.stories.tsx.snap +1 -1
- package/src/Component/Tag/tags.twig +1 -1
- package/src/Component/Tile/__snapshots__/Tile.stories.tsx.snap +4 -4
- package/src/Form/Checkbox/Checkbox.stories.ts +39 -0
- package/src/Form/Checkbox/FormCheckbox.tsx +3 -3
- package/src/Form/Checkbox/__snapshots__/Checkbox.stories.ts.snap +28 -0
- package/src/Form/Checkbox/input-checkbox.twig +27 -24
- package/src/Form/Description/Description.stories.ts +10 -7
- package/src/Form/Description/FormDescription.tsx +3 -3
- package/src/Form/Description/FormStatus.stories.ts +31 -0
- package/src/Form/Description/__snapshots__/Description.stories.ts.snap +2 -9
- package/src/Form/Description/__snapshots__/FormDescription.stories.tsx.snap +1 -1
- package/src/Form/Description/__snapshots__/FormStatus.stories.ts.snap +19 -0
- package/src/Form/Description/form-description.twig +4 -3
- package/src/Form/Description/form-status.twig +10 -0
- package/src/Form/Form/FormTitle.tsx +1 -1
- package/src/Form/Form/__snapshots__/FormTitle.stories.tsx.snap +1 -1
- package/src/Form/Form/form.twig +14 -0
- package/src/Form/Form/twig/form-example.twig +4 -4
- package/src/Form/FormItem/FormItem.stories.ts +119 -0
- package/src/Form/{Item → FormItem}/FormItem.tsx +1 -1
- package/src/Form/FormItem/__snapshots__/FormItem.stories.ts.snap +133 -0
- package/src/Form/{Item → FormItem}/__snapshots__/FormItem.stories.tsx.snap +24 -16
- package/src/Form/FormItem/form-item.twig +22 -0
- package/src/Form/Label/FormLabel.tsx +1 -1
- package/src/Form/Label/Label.stories.ts +16 -19
- package/src/Form/Label/__snapshots__/FormLabel.stories.tsx.snap +6 -2
- package/src/Form/Label/__snapshots__/Label.stories.ts.snap +11 -9
- package/src/Form/Label/label.twig +13 -2
- package/src/Form/Radio/FormRadio.tsx +2 -2
- package/src/Form/Radio/Radio.stories.ts +72 -0
- package/src/Form/Radio/__snapshots__/Radio.stories.ts.snap +58 -0
- package/src/Form/Radio/input-radio.twig +18 -24
- package/src/Form/Search/Search.stories.ts +50 -0
- package/src/Form/Search/__snapshots__/Search.stories.ts.snap +26 -0
- package/src/Form/Search/search-form.twig +11 -0
- package/src/Form/Select/FormSelect.tsx +1 -1
- package/src/Form/Select/Select.stories.ts +24 -31
- package/src/Form/Select/__snapshots__/FormSelect.stories.tsx.snap +1 -1
- package/src/Form/Select/__snapshots__/Select.stories.ts.snap +16 -144
- package/src/Form/Select/input-select.twig +25 -0
- package/src/Form/TextInput/FormText.tsx +4 -7
- package/src/Form/TextInput/TextInput.stories.ts +23 -41
- package/src/Form/TextInput/__snapshots__/FormText.stories.tsx.snap +1 -1
- package/src/Form/TextInput/__snapshots__/InputDivider.stories.ts.snap +10 -14
- package/src/Form/TextInput/__snapshots__/TextInput.stories.ts.snap +20 -96
- package/src/Form/TextInput/input-divider.twig +7 -8
- package/src/Form/TextInput/input-text-icon.twig +5 -5
- package/src/Form/TextInput/input-text.twig +31 -5
- package/src/Form/Textarea/FormTextarea.tsx +4 -7
- package/src/Form/Textarea/Textarea.stories.ts +11 -8
- package/src/Form/Textarea/__snapshots__/FormTextarea.stories.tsx.snap +1 -1
- package/src/Form/Textarea/__snapshots__/Textarea.stories.ts.snap +8 -16
- package/src/Form/Textarea/input-textarea.twig +21 -0
- package/src/Form/form.css +103 -103
- package/src/Layout/Footer/Footer.stories.ts +196 -4
- package/src/Layout/Footer/Footer.stories.tsx +5 -9
- package/src/Layout/Footer/Footer.tsx +21 -19
- package/src/Layout/Footer/__snapshots__/Footer.stories.ts.snap +296 -78
- package/src/Layout/Footer/__snapshots__/Footer.stories.tsx.snap +52 -58
- package/src/Layout/Footer/footer.css +102 -25
- package/src/Layout/Footer/footer.twig +29 -23
- package/src/Layout/Grid/Grid.stories.ts +15 -14
- package/src/Layout/Grid/Grid.stories.tsx +14 -14
- package/src/Layout/Grid/Grid.tsx +10 -10
- package/src/Layout/Grid/__snapshots__/Grid.stories.tsx.snap +10 -10
- package/src/Layout/Grid/grid-item.twig +1 -1
- package/src/Layout/Grid/grid.twig +7 -4
- package/src/Layout/Header/Components/GlobalToggle.tsx +0 -1
- package/src/Layout/Header/Components/Logo.tsx +1 -1
- package/src/Layout/Header/Elements/GlobalToggle.ts +6 -1
- package/src/Layout/Header/Header.stories.ts +242 -7
- package/src/Layout/Header/Header.tsx +22 -19
- package/src/Layout/Header/__snapshots__/Header.stories.ts.snap +464 -100
- package/src/Layout/Header/__snapshots__/Header.stories.tsx.snap +50 -46
- package/src/Layout/Header/_header.css +28 -21
- package/src/Layout/Header/_toggles.css +2 -2
- package/src/Layout/Header/header-stacked.twig +49 -0
- package/src/Layout/Header/header.twig +42 -21
- package/src/Layout/Header/twig/logo.twig +2 -2
- package/src/Layout/Masthead/Masthead.stories.ts +42 -6
- package/src/Layout/Masthead/__snapshots__/Masthead.stories.ts.snap +44 -27
- package/src/Layout/Masthead/masthead.css +5 -14
- package/src/Layout/Masthead/masthead.twig +25 -7
- package/src/Layout/Page/Page.tsx +2 -2
- package/src/Layout/Page/__snapshots__/Page.stories.tsx.snap +61 -59
- package/src/Layout/Page/page.css +19 -84
- package/src/Layout/Page/page.twig +8 -3
- package/src/Layout/Section/Section.stories.ts +12 -9
- package/src/Layout/Section/Section.stories.tsx +5 -9
- package/src/Layout/Section/Section.tsx +6 -10
- package/src/Layout/Section/SectionGrid.stories.tsx +5 -11
- package/src/Layout/Section/SectionGrid.tsx +8 -13
- package/src/Layout/Section/__snapshots__/Background.stories.ts.snap +12 -12
- package/src/Layout/Section/__snapshots__/Breakouts.stories.ts.snap +17 -17
- package/src/Layout/Section/__snapshots__/Flow.stories.ts.snap +18 -18
- package/src/Layout/Section/__snapshots__/Section.stories.ts.snap +4 -4
- package/src/Layout/Section/__snapshots__/Section.stories.tsx.snap +6 -6
- package/src/Layout/Section/__snapshots__/SectionGrid.stories.tsx.snap +6 -6
- package/src/Layout/Section/section.twig +1 -1
- package/src/Layout/Section/twig/section-background.twig +5 -5
- package/src/Layout/Section/twig/sections-breakout.twig +16 -16
- package/src/Layout/Section/twig/sections-flow.twig +17 -17
- package/src/Layout/Section/twig/sections-stacked.twig +8 -16
- package/src/Layout/Sidebar/Sidebar.stories.ts +25 -3
- package/src/Layout/Sidebar/Sidebar.stories.tsx +1 -1
- package/src/Layout/Sidebar/Sidebar.tsx +4 -4
- package/src/Layout/Sidebar/__snapshots__/Sidebar.stories.ts.snap +39 -16
- package/src/Layout/Sidebar/__snapshots__/Sidebar.stories.tsx.snap +6 -6
- package/src/Layout/Sidebar/sidebar.css +6 -6
- package/src/Layout/Sidebar/sidebar.twig +25 -16
- package/src/Utility/utilities.css +5 -2
- package/src/react.ts +1 -2
- package/dist/build/accordion.css +0 -108
- package/dist/build/accordion.entry.js +0 -139
- package/dist/build/accordion.entry.js.map +0 -1
- package/dist/build/base.css +0 -999
- package/dist/build/breadcrumb.css +0 -47
- package/dist/build/button.css +0 -132
- package/dist/build/callout.css +0 -11
- package/dist/build/card.css +0 -136
- package/dist/build/chunks/disclosure-widget-CQLPJ8Ta.js +0 -124
- package/dist/build/chunks/disclosure-widget-CQLPJ8Ta.js.map +0 -1
- package/dist/build/chunks/keyboard-C73DHu0c.js +0 -101
- package/dist/build/chunks/keyboard-C73DHu0c.js.map +0 -1
- package/dist/build/chunks/polyfills-CJ5uTmUJ.js +0 -749
- package/dist/build/chunks/polyfills-CJ5uTmUJ.js.map +0 -1
- package/dist/build/chunks/popover-wbPSyFRj.js +0 -654
- package/dist/build/chunks/popover-wbPSyFRj.js.map +0 -1
- package/dist/build/chunks/utilities-B4YZb689.js +0 -243
- package/dist/build/chunks/utilities-B4YZb689.js.map +0 -1
- package/dist/build/constants.css +0 -120
- package/dist/build/container-grid.css +0 -208
- package/dist/build/content-block.css +0 -23
- package/dist/build/dialog.css +0 -98
- package/dist/build/dialog.entry.js +0 -113
- package/dist/build/dialog.entry.js.map +0 -1
- package/dist/build/drop-menu.css +0 -78
- package/dist/build/drop-menu.entry.js +0 -129
- package/dist/build/drop-menu.entry.js.map +0 -1
- package/dist/build/drupal.css +0 -74
- package/dist/build/footer-menu.css +0 -32
- package/dist/build/footer.css +0 -61
- package/dist/build/form.css +0 -589
- package/dist/build/global-alert.css +0 -60
- package/dist/build/global-alert.entry.js +0 -68
- package/dist/build/global-alert.entry.js.map +0 -1
- package/dist/build/grid.css +0 -200
- package/dist/build/header.css +0 -131
- package/dist/build/header.entry.js +0 -98
- package/dist/build/header.entry.js.map +0 -1
- package/dist/build/hero-banner.css +0 -62
- package/dist/build/icon.css +0 -399
- package/dist/build/in-page-alert.css +0 -94
- package/dist/build/in-page-navigation.css +0 -17
- package/dist/build/in-page-navigation.entry.js +0 -89
- package/dist/build/in-page-navigation.entry.js.map +0 -1
- package/dist/build/link-list.css +0 -72
- package/dist/build/masthead.css +0 -39
- package/dist/build/nav-list.css +0 -26
- package/dist/build/navigation.css +0 -371
- package/dist/build/navigation.entry.js +0 -123
- package/dist/build/navigation.entry.js.map +0 -1
- package/dist/build/page.css +0 -184
- package/dist/build/pagination.css +0 -123
- package/dist/build/section.css +0 -163
- package/dist/build/sidebar.css +0 -105
- package/dist/build/sticky.css +0 -47
- package/dist/build/sticky.entry.js +0 -60
- package/dist/build/sticky.entry.js.map +0 -1
- package/dist/build/tabs.css +0 -106
- package/dist/build/tabs.entry.js +0 -161
- package/dist/build/tabs.entry.js.map +0 -1
- package/dist/build/tag.css +0 -67
- package/dist/build/tiles.css +0 -61
- package/dist/build/utilities.css +0 -175
- package/src/Atom/Button/twig/story-button.twig +0 -11
- package/src/Atom/Link/twig/story-link.twig +0 -11
- package/src/Atom/Media/twig/story-media.twig +0 -11
- package/src/Atom/NavList/NavList.stories.ts +0 -15
- package/src/Atom/NavList/__snapshots__/NavList.stories.ts.snap +0 -43
- package/src/Atom/NavList/nav-list.css +0 -23
- package/src/Atom/NavList/nav-list.twig +0 -25
- package/src/Component/Accordion/twig/accordion-story.twig +0 -13
- package/src/Component/Author/Author.stories.tsx +0 -18
- package/src/Component/Author/Author.tsx +0 -30
- package/src/Component/Author/__snapshots__/Author.stories.tsx.snap +0 -21
- package/src/Component/Callout/twig/callout-story.twig +0 -11
- package/src/Component/Card/twig/old-card.twig +0 -17
- package/src/Component/Card/twig/story-card.twig +0 -29
- package/src/Component/ContentBlock/twig/content-block-example.twig +0 -7
- package/src/Component/GlobalAlert/twig/story-global-alert.twig +0 -14
- package/src/Component/HeroBanner/twig/hero-banner-story.twig +0 -19
- package/src/Component/InPageAlert/twig/story-in-page-alert.twig +0 -11
- package/src/Component/InPageNavigation/twig/in-page-navigation-menu-example.twig +0 -6
- package/src/Component/ListItem/Teaser.tsx +0 -54
- package/src/Component/ListItem/__snapshots__/Teaser.stories.tsx.snap +0 -32
- package/src/Component/Navigation/Collapsible.stories.ts +0 -16
- package/src/Component/Navigation/Dropdown.stories.ts +0 -16
- package/src/Component/Navigation/MegaNav.stories.ts +0 -16
- package/src/Component/Navigation/__snapshots__/Collapsible.stories.ts.snap +0 -123
- package/src/Component/Navigation/__snapshots__/Dropdown.stories.ts.snap +0 -125
- package/src/Component/Navigation/navigation-collapsible.twig +0 -7
- package/src/Component/Navigation/navigation-dropdown.twig +0 -7
- package/src/Component/Navigation/navigation-mega-nav.twig +0 -7
- package/src/Component/Navigation/twig/navigation-subnav-list.twig +0 -108
- package/src/Component/Sticky/twig/sticky-example.twig +0 -4
- package/src/Component/Tabs/twig/panel.twig +0 -5
- package/src/Component/Tabs/twig/tab-list.twig +0 -26
- package/src/Form/Checkbox/Checkboxes.stories.ts +0 -47
- package/src/Form/Checkbox/__snapshots__/Checkboxes.stories.ts.snap +0 -115
- package/src/Form/Checkbox/input-checkbox-single.twig +0 -6
- package/src/Form/Description/ErrorMessage.stories.ts +0 -16
- package/src/Form/Description/__snapshots__/ErrorMessage.stories.ts.snap +0 -20
- package/src/Form/Description/form-error.twig +0 -5
- package/src/Form/Fieldset/Fieldset.stories.ts +0 -34
- package/src/Form/Fieldset/__snapshots__/Fieldset.stories.ts.snap +0 -23
- package/src/Form/Fieldset/fieldset.twig +0 -4
- package/src/Form/Radio/Radios.stories.ts +0 -47
- package/src/Form/Radio/__snapshots__/Radios.stories.ts.snap +0 -125
- package/src/Form/Search/TextInputWithInlineButton.stories.ts +0 -16
- package/src/Form/Search/__snapshots__/TextInputWithInlineButton.stories.ts.snap +0 -26
- package/src/Form/Search/input-text-inline-submit.twig +0 -8
- package/src/Form/Select/select.twig +0 -16
- package/src/Form/TextInput/TextInputWithIcon.stories.ts +0 -40
- package/src/Form/TextInput/__snapshots__/TextInputWithIcon.stories.ts.snap +0 -67
- package/src/Form/Textarea/textarea.twig +0 -5
- package/src/Layout/Footer/FooterMenu/FooterMenu.stories.ts +0 -15
- package/src/Layout/Footer/FooterMenu/__snapshots__/FooterMenu.stories.ts.snap +0 -101
- package/src/Layout/Footer/FooterMenu/footer-menu.css +0 -29
- package/src/Layout/Footer/FooterMenu/footer-menu.twig +0 -5
- package/src/Layout/Grid/twig/container-grid-dynamic.twig +0 -47
- package/src/Layout/Grid/twig/container-grid.twig +0 -46
- package/src/Layout/Grid/twig/grid-story.twig +0 -6
- package/src/Layout/Grid/twig/old-grid.twig +0 -46
- package/src/Layout/Header/Stacked/Stacked.stories.ts +0 -16
- package/src/Layout/Header/Stacked/__snapshots__/Stacked.stories.ts.snap +0 -353
- package/src/Layout/Header/Stacked/header-stacked.twig +0 -33
- package/src/Layout/Header/twig/global-header.twig +0 -4
- package/src/Layout/Section/twig/section-story.twig +0 -14
- /package/src/Form/{Item → FormItem}/FormItem.stories.tsx +0 -0
|
@@ -1,654 +0,0 @@
|
|
|
1
|
-
var ToggleEvent = class extends Event {
|
|
2
|
-
oldState;
|
|
3
|
-
newState;
|
|
4
|
-
constructor(type, { oldState = "", newState = "", ...init } = {}) {
|
|
5
|
-
super(type, init);
|
|
6
|
-
this.oldState = String(oldState || "");
|
|
7
|
-
this.newState = String(newState || "");
|
|
8
|
-
}
|
|
9
|
-
};
|
|
10
|
-
var popoverToggleTaskQueue = /* @__PURE__ */ new WeakMap();
|
|
11
|
-
function queuePopoverToggleEventTask(element, oldState, newState) {
|
|
12
|
-
popoverToggleTaskQueue.set(
|
|
13
|
-
element,
|
|
14
|
-
setTimeout(() => {
|
|
15
|
-
if (!popoverToggleTaskQueue.has(element)) return;
|
|
16
|
-
element.dispatchEvent(
|
|
17
|
-
new ToggleEvent("toggle", {
|
|
18
|
-
cancelable: false,
|
|
19
|
-
oldState,
|
|
20
|
-
newState
|
|
21
|
-
})
|
|
22
|
-
);
|
|
23
|
-
}, 0)
|
|
24
|
-
);
|
|
25
|
-
}
|
|
26
|
-
var ShadowRoot = globalThis.ShadowRoot || function() {
|
|
27
|
-
};
|
|
28
|
-
var HTMLDialogElement = globalThis.HTMLDialogElement || function() {
|
|
29
|
-
};
|
|
30
|
-
var topLayerElements = /* @__PURE__ */ new WeakMap();
|
|
31
|
-
var autoPopoverList = /* @__PURE__ */ new WeakMap();
|
|
32
|
-
var visibilityState = /* @__PURE__ */ new WeakMap();
|
|
33
|
-
function getPopoverVisibilityState(popover) {
|
|
34
|
-
return visibilityState.get(popover) || "hidden";
|
|
35
|
-
}
|
|
36
|
-
var popoverInvoker = /* @__PURE__ */ new WeakMap();
|
|
37
|
-
function popoverTargetAttributeActivationBehavior(element) {
|
|
38
|
-
const popover = element.popoverTargetElement;
|
|
39
|
-
if (!(popover instanceof HTMLElement)) {
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
const visibility = getPopoverVisibilityState(popover);
|
|
43
|
-
if (element.popoverTargetAction === "show" && visibility === "showing") {
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
if (element.popoverTargetAction === "hide" && visibility === "hidden") return;
|
|
47
|
-
if (visibility === "showing") {
|
|
48
|
-
hidePopover(popover, true, true);
|
|
49
|
-
} else if (checkPopoverValidity(popover, false)) {
|
|
50
|
-
popoverInvoker.set(popover, element);
|
|
51
|
-
showPopover(popover);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
function checkPopoverValidity(element, expectedToBeShowing) {
|
|
55
|
-
if (element.popover !== "auto" && element.popover !== "manual") {
|
|
56
|
-
return false;
|
|
57
|
-
}
|
|
58
|
-
if (!element.isConnected) return false;
|
|
59
|
-
if (expectedToBeShowing && getPopoverVisibilityState(element) !== "showing") {
|
|
60
|
-
return false;
|
|
61
|
-
}
|
|
62
|
-
if (!expectedToBeShowing && getPopoverVisibilityState(element) !== "hidden") {
|
|
63
|
-
return false;
|
|
64
|
-
}
|
|
65
|
-
if (element instanceof HTMLDialogElement && element.hasAttribute("open")) {
|
|
66
|
-
return false;
|
|
67
|
-
}
|
|
68
|
-
if (document.fullscreenElement === element) return false;
|
|
69
|
-
return true;
|
|
70
|
-
}
|
|
71
|
-
function getStackPosition(popover) {
|
|
72
|
-
if (!popover) return 0;
|
|
73
|
-
return Array.from(autoPopoverList.get(popover.ownerDocument) || []).indexOf(
|
|
74
|
-
popover
|
|
75
|
-
) + 1;
|
|
76
|
-
}
|
|
77
|
-
function topMostClickedPopover(target) {
|
|
78
|
-
const clickedPopover = nearestInclusiveOpenPopover(target);
|
|
79
|
-
const invokerPopover = nearestInclusiveTargetPopoverForInvoker(target);
|
|
80
|
-
if (getStackPosition(clickedPopover) > getStackPosition(invokerPopover)) {
|
|
81
|
-
return clickedPopover;
|
|
82
|
-
}
|
|
83
|
-
return invokerPopover;
|
|
84
|
-
}
|
|
85
|
-
function topMostAutoPopover(document2) {
|
|
86
|
-
const documentPopovers = autoPopoverList.get(document2);
|
|
87
|
-
for (const popover of documentPopovers || []) {
|
|
88
|
-
if (!popover.isConnected) {
|
|
89
|
-
documentPopovers.delete(popover);
|
|
90
|
-
} else {
|
|
91
|
-
return popover;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
return null;
|
|
95
|
-
}
|
|
96
|
-
function getRootNode(node) {
|
|
97
|
-
if (typeof node.getRootNode === "function") {
|
|
98
|
-
return node.getRootNode();
|
|
99
|
-
}
|
|
100
|
-
if (node.parentNode) return getRootNode(node.parentNode);
|
|
101
|
-
return node;
|
|
102
|
-
}
|
|
103
|
-
function nearestInclusiveOpenPopover(node) {
|
|
104
|
-
while (node) {
|
|
105
|
-
if (node instanceof HTMLElement && node.popover === "auto" && visibilityState.get(node) === "showing") {
|
|
106
|
-
return node;
|
|
107
|
-
}
|
|
108
|
-
node = node instanceof Element && node.assignedSlot || node.parentElement || getRootNode(node);
|
|
109
|
-
if (node instanceof ShadowRoot) node = node.host;
|
|
110
|
-
if (node instanceof Document) return;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
function nearestInclusiveTargetPopoverForInvoker(node) {
|
|
114
|
-
while (node) {
|
|
115
|
-
const nodePopover = node.popoverTargetElement;
|
|
116
|
-
if (nodePopover instanceof HTMLElement) return nodePopover;
|
|
117
|
-
node = node.parentElement || getRootNode(node);
|
|
118
|
-
if (node instanceof ShadowRoot) node = node.host;
|
|
119
|
-
if (node instanceof Document) return;
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
function topMostPopoverAncestor(newPopover) {
|
|
123
|
-
const popoverPositions = /* @__PURE__ */ new Map();
|
|
124
|
-
let i = 0;
|
|
125
|
-
for (const popover of autoPopoverList.get(newPopover.ownerDocument) || []) {
|
|
126
|
-
popoverPositions.set(popover, i);
|
|
127
|
-
i += 1;
|
|
128
|
-
}
|
|
129
|
-
popoverPositions.set(newPopover, i);
|
|
130
|
-
i += 1;
|
|
131
|
-
let topMostPopoverAncestor2 = null;
|
|
132
|
-
function checkAncestor(candidate) {
|
|
133
|
-
const candidateAncestor = nearestInclusiveOpenPopover(candidate);
|
|
134
|
-
if (candidateAncestor === null) return null;
|
|
135
|
-
const candidatePosition = popoverPositions.get(candidateAncestor);
|
|
136
|
-
if (topMostPopoverAncestor2 === null || popoverPositions.get(topMostPopoverAncestor2) < candidatePosition) {
|
|
137
|
-
topMostPopoverAncestor2 = candidateAncestor;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
checkAncestor(newPopover.parentElement || getRootNode(newPopover));
|
|
141
|
-
return topMostPopoverAncestor2;
|
|
142
|
-
}
|
|
143
|
-
function isFocusable(focusTarget) {
|
|
144
|
-
if (focusTarget.hidden || focusTarget instanceof ShadowRoot) return false;
|
|
145
|
-
if (focusTarget instanceof HTMLButtonElement || focusTarget instanceof HTMLInputElement || focusTarget instanceof HTMLSelectElement || focusTarget instanceof HTMLTextAreaElement || focusTarget instanceof HTMLOptGroupElement || focusTarget instanceof HTMLOptionElement || focusTarget instanceof HTMLFieldSetElement) {
|
|
146
|
-
if (focusTarget.disabled) return false;
|
|
147
|
-
}
|
|
148
|
-
if (focusTarget instanceof HTMLInputElement && focusTarget.type === "hidden") {
|
|
149
|
-
return false;
|
|
150
|
-
}
|
|
151
|
-
if (focusTarget instanceof HTMLAnchorElement && focusTarget.href === "") {
|
|
152
|
-
return false;
|
|
153
|
-
}
|
|
154
|
-
return typeof focusTarget.tabIndex === "number" && focusTarget.tabIndex !== -1;
|
|
155
|
-
}
|
|
156
|
-
function focusDelegate(focusTarget) {
|
|
157
|
-
if (focusTarget.shadowRoot && focusTarget.shadowRoot.delegatesFocus !== true) {
|
|
158
|
-
return null;
|
|
159
|
-
}
|
|
160
|
-
let whereToLook = focusTarget;
|
|
161
|
-
if (whereToLook.shadowRoot) {
|
|
162
|
-
whereToLook = whereToLook.shadowRoot;
|
|
163
|
-
}
|
|
164
|
-
let autoFocusDelegate = whereToLook.querySelector("[autofocus]");
|
|
165
|
-
if (autoFocusDelegate) {
|
|
166
|
-
return autoFocusDelegate;
|
|
167
|
-
} else {
|
|
168
|
-
const slots = whereToLook.querySelectorAll("slot");
|
|
169
|
-
for (const slot of slots) {
|
|
170
|
-
const assignedElements = slot.assignedElements({ flatten: true });
|
|
171
|
-
for (const el of assignedElements) {
|
|
172
|
-
if (el.hasAttribute("autofocus")) {
|
|
173
|
-
return el;
|
|
174
|
-
} else {
|
|
175
|
-
autoFocusDelegate = el.querySelector("[autofocus]");
|
|
176
|
-
if (autoFocusDelegate) {
|
|
177
|
-
return autoFocusDelegate;
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
const walker = focusTarget.ownerDocument.createTreeWalker(
|
|
184
|
-
whereToLook,
|
|
185
|
-
NodeFilter.SHOW_ELEMENT
|
|
186
|
-
);
|
|
187
|
-
let descendant = walker.currentNode;
|
|
188
|
-
while (descendant) {
|
|
189
|
-
if (isFocusable(descendant)) {
|
|
190
|
-
return descendant;
|
|
191
|
-
}
|
|
192
|
-
descendant = walker.nextNode();
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
function popoverFocusingSteps(subject) {
|
|
196
|
-
focusDelegate(subject)?.focus();
|
|
197
|
-
}
|
|
198
|
-
var previouslyFocusedElements = /* @__PURE__ */ new WeakMap();
|
|
199
|
-
function showPopover(element) {
|
|
200
|
-
if (!checkPopoverValidity(element, false)) {
|
|
201
|
-
return;
|
|
202
|
-
}
|
|
203
|
-
const document2 = element.ownerDocument;
|
|
204
|
-
if (!element.dispatchEvent(
|
|
205
|
-
new ToggleEvent("beforetoggle", {
|
|
206
|
-
cancelable: true,
|
|
207
|
-
oldState: "closed",
|
|
208
|
-
newState: "open"
|
|
209
|
-
})
|
|
210
|
-
)) {
|
|
211
|
-
return;
|
|
212
|
-
}
|
|
213
|
-
if (!checkPopoverValidity(element, false)) {
|
|
214
|
-
return;
|
|
215
|
-
}
|
|
216
|
-
let shouldRestoreFocus = false;
|
|
217
|
-
if (element.popover === "auto") {
|
|
218
|
-
const originalType = element.getAttribute("popover");
|
|
219
|
-
const ancestor = topMostPopoverAncestor(element) || document2;
|
|
220
|
-
hideAllPopoversUntil(ancestor, false, true);
|
|
221
|
-
if (originalType !== element.getAttribute("popover") || !checkPopoverValidity(element, false)) {
|
|
222
|
-
return;
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
if (!topMostAutoPopover(document2)) {
|
|
226
|
-
shouldRestoreFocus = true;
|
|
227
|
-
}
|
|
228
|
-
previouslyFocusedElements.delete(element);
|
|
229
|
-
const originallyFocusedElement = document2.activeElement;
|
|
230
|
-
element.classList.add(":popover-open");
|
|
231
|
-
visibilityState.set(element, "showing");
|
|
232
|
-
if (!topLayerElements.has(document2)) {
|
|
233
|
-
topLayerElements.set(document2, /* @__PURE__ */ new Set());
|
|
234
|
-
}
|
|
235
|
-
topLayerElements.get(document2).add(element);
|
|
236
|
-
popoverFocusingSteps(element);
|
|
237
|
-
if (element.popover === "auto") {
|
|
238
|
-
if (!autoPopoverList.has(document2)) {
|
|
239
|
-
autoPopoverList.set(document2, /* @__PURE__ */ new Set());
|
|
240
|
-
}
|
|
241
|
-
autoPopoverList.get(document2).add(element);
|
|
242
|
-
setInvokerAriaExpanded(popoverInvoker.get(element), true);
|
|
243
|
-
}
|
|
244
|
-
if (shouldRestoreFocus && originallyFocusedElement && element.popover === "auto") {
|
|
245
|
-
previouslyFocusedElements.set(element, originallyFocusedElement);
|
|
246
|
-
}
|
|
247
|
-
queuePopoverToggleEventTask(element, "closed", "open");
|
|
248
|
-
}
|
|
249
|
-
function hidePopover(element, focusPreviousElement = false, fireEvents = false) {
|
|
250
|
-
if (!checkPopoverValidity(element, true)) {
|
|
251
|
-
return;
|
|
252
|
-
}
|
|
253
|
-
const document2 = element.ownerDocument;
|
|
254
|
-
if (element.popover === "auto") {
|
|
255
|
-
hideAllPopoversUntil(element, focusPreviousElement, fireEvents);
|
|
256
|
-
if (!checkPopoverValidity(element, true)) {
|
|
257
|
-
return;
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
setInvokerAriaExpanded(popoverInvoker.get(element), false);
|
|
261
|
-
popoverInvoker.delete(element);
|
|
262
|
-
if (fireEvents) {
|
|
263
|
-
element.dispatchEvent(
|
|
264
|
-
new ToggleEvent("beforetoggle", {
|
|
265
|
-
oldState: "open",
|
|
266
|
-
newState: "closed"
|
|
267
|
-
})
|
|
268
|
-
);
|
|
269
|
-
if (!checkPopoverValidity(element, true)) {
|
|
270
|
-
return;
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
topLayerElements.get(document2)?.delete(element);
|
|
274
|
-
autoPopoverList.get(document2)?.delete(element);
|
|
275
|
-
element.classList.remove(":popover-open");
|
|
276
|
-
visibilityState.set(element, "hidden");
|
|
277
|
-
if (fireEvents) {
|
|
278
|
-
queuePopoverToggleEventTask(element, "open", "closed");
|
|
279
|
-
}
|
|
280
|
-
const previouslyFocusedElement = previouslyFocusedElements.get(element);
|
|
281
|
-
if (previouslyFocusedElement) {
|
|
282
|
-
previouslyFocusedElements.delete(element);
|
|
283
|
-
if (focusPreviousElement) {
|
|
284
|
-
previouslyFocusedElement.focus();
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
function closeAllOpenPopovers(document2, focusPreviousElement = false, fireEvents = false) {
|
|
289
|
-
let popover = topMostAutoPopover(document2);
|
|
290
|
-
while (popover) {
|
|
291
|
-
hidePopover(popover, focusPreviousElement, fireEvents);
|
|
292
|
-
popover = topMostAutoPopover(document2);
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
function hideAllPopoversUntil(endpoint, focusPreviousElement, fireEvents) {
|
|
296
|
-
const document2 = endpoint.ownerDocument || endpoint;
|
|
297
|
-
if (endpoint instanceof Document) {
|
|
298
|
-
return closeAllOpenPopovers(document2, focusPreviousElement, fireEvents);
|
|
299
|
-
}
|
|
300
|
-
let lastToHide = null;
|
|
301
|
-
let foundEndpoint = false;
|
|
302
|
-
for (const popover of autoPopoverList.get(document2) || []) {
|
|
303
|
-
if (popover === endpoint) {
|
|
304
|
-
foundEndpoint = true;
|
|
305
|
-
} else if (foundEndpoint) {
|
|
306
|
-
lastToHide = popover;
|
|
307
|
-
break;
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
if (!foundEndpoint) {
|
|
311
|
-
return closeAllOpenPopovers(document2, focusPreviousElement, fireEvents);
|
|
312
|
-
}
|
|
313
|
-
while (lastToHide && getPopoverVisibilityState(lastToHide) === "showing" && autoPopoverList.get(document2)?.size) {
|
|
314
|
-
hidePopover(lastToHide, focusPreviousElement, fireEvents);
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
var popoverPointerDownTargets = /* @__PURE__ */ new WeakMap();
|
|
318
|
-
function lightDismissOpenPopovers(event) {
|
|
319
|
-
if (!event.isTrusted) return;
|
|
320
|
-
const target = event.composedPath()[0];
|
|
321
|
-
if (!target) return;
|
|
322
|
-
const document2 = target.ownerDocument;
|
|
323
|
-
const topMostPopover = topMostAutoPopover(document2);
|
|
324
|
-
if (!topMostPopover) return;
|
|
325
|
-
const ancestor = topMostClickedPopover(target);
|
|
326
|
-
if (ancestor && event.type === "pointerdown") {
|
|
327
|
-
popoverPointerDownTargets.set(document2, ancestor);
|
|
328
|
-
} else if (event.type === "pointerup") {
|
|
329
|
-
const sameTarget = popoverPointerDownTargets.get(document2) === ancestor;
|
|
330
|
-
popoverPointerDownTargets.delete(document2);
|
|
331
|
-
if (sameTarget) {
|
|
332
|
-
hideAllPopoversUntil(ancestor || document2, false, true);
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
var initialAriaExpandedValue = /* @__PURE__ */ new WeakMap();
|
|
337
|
-
function setInvokerAriaExpanded(el, force = false) {
|
|
338
|
-
if (!el) return;
|
|
339
|
-
if (!initialAriaExpandedValue.has(el)) {
|
|
340
|
-
initialAriaExpandedValue.set(el, el.getAttribute("aria-expanded"));
|
|
341
|
-
}
|
|
342
|
-
const popover = el.popoverTargetElement;
|
|
343
|
-
if (popover instanceof HTMLElement && popover.popover === "auto") {
|
|
344
|
-
el.setAttribute("aria-expanded", String(force));
|
|
345
|
-
} else {
|
|
346
|
-
const initialValue = initialAriaExpandedValue.get(el);
|
|
347
|
-
if (!initialValue) {
|
|
348
|
-
el.removeAttribute("aria-expanded");
|
|
349
|
-
} else {
|
|
350
|
-
el.setAttribute("aria-expanded", initialValue);
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
var ShadowRoot2 = globalThis.ShadowRoot || function() {
|
|
355
|
-
};
|
|
356
|
-
function isSupported() {
|
|
357
|
-
return typeof HTMLElement !== "undefined" && typeof HTMLElement.prototype === "object" && "popover" in HTMLElement.prototype;
|
|
358
|
-
}
|
|
359
|
-
function patchSelectorFn(object, name, mapper) {
|
|
360
|
-
const original = object[name];
|
|
361
|
-
Object.defineProperty(object, name, {
|
|
362
|
-
value(selector) {
|
|
363
|
-
return original.call(this, mapper(selector));
|
|
364
|
-
}
|
|
365
|
-
});
|
|
366
|
-
}
|
|
367
|
-
var nonEscapedPopoverSelector = /(^|[^\\]):popover-open\b/g;
|
|
368
|
-
function hasLayerSupport() {
|
|
369
|
-
return typeof globalThis.CSSLayerBlockRule === "function";
|
|
370
|
-
}
|
|
371
|
-
function getStyles() {
|
|
372
|
-
const useLayer = hasLayerSupport();
|
|
373
|
-
return `
|
|
374
|
-
${useLayer ? "@layer popover-polyfill {" : ""}
|
|
375
|
-
:where([popover]) {
|
|
376
|
-
position: fixed;
|
|
377
|
-
z-index: 2147483647;
|
|
378
|
-
inset: 0;
|
|
379
|
-
padding: 0.25em;
|
|
380
|
-
width: fit-content;
|
|
381
|
-
height: fit-content;
|
|
382
|
-
border-width: initial;
|
|
383
|
-
border-color: initial;
|
|
384
|
-
border-image: initial;
|
|
385
|
-
border-style: solid;
|
|
386
|
-
background-color: canvas;
|
|
387
|
-
color: canvastext;
|
|
388
|
-
overflow: auto;
|
|
389
|
-
margin: auto;
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
:where([popover]:not(.\\:popover-open)) {
|
|
393
|
-
display: none;
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
:where(dialog[popover].\\:popover-open) {
|
|
397
|
-
display: block;
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
:where(dialog[popover][open]) {
|
|
401
|
-
display: revert;
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
:where([anchor].\\:popover-open) {
|
|
405
|
-
inset: auto;
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
:where([anchor]:popover-open) {
|
|
409
|
-
inset: auto;
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
@supports not (background-color: canvas) {
|
|
413
|
-
:where([popover]) {
|
|
414
|
-
background-color: white;
|
|
415
|
-
color: black;
|
|
416
|
-
}
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
@supports (width: -moz-fit-content) {
|
|
420
|
-
:where([popover]) {
|
|
421
|
-
width: -moz-fit-content;
|
|
422
|
-
height: -moz-fit-content;
|
|
423
|
-
}
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
@supports not (inset: 0) {
|
|
427
|
-
:where([popover]) {
|
|
428
|
-
top: 0;
|
|
429
|
-
left: 0;
|
|
430
|
-
right: 0;
|
|
431
|
-
bottom: 0;
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
|
-
${useLayer ? "}" : ""}
|
|
435
|
-
`;
|
|
436
|
-
}
|
|
437
|
-
var popoverStyleSheet = null;
|
|
438
|
-
function injectStyles(root) {
|
|
439
|
-
const styles = getStyles();
|
|
440
|
-
if (popoverStyleSheet === null) {
|
|
441
|
-
try {
|
|
442
|
-
popoverStyleSheet = new CSSStyleSheet();
|
|
443
|
-
popoverStyleSheet.replaceSync(styles);
|
|
444
|
-
} catch {
|
|
445
|
-
popoverStyleSheet = false;
|
|
446
|
-
}
|
|
447
|
-
}
|
|
448
|
-
if (popoverStyleSheet === false) {
|
|
449
|
-
const sheet = document.createElement("style");
|
|
450
|
-
sheet.textContent = styles;
|
|
451
|
-
if (root instanceof Document) {
|
|
452
|
-
root.head.prepend(sheet);
|
|
453
|
-
} else {
|
|
454
|
-
root.prepend(sheet);
|
|
455
|
-
}
|
|
456
|
-
} else {
|
|
457
|
-
root.adoptedStyleSheets = [popoverStyleSheet, ...root.adoptedStyleSheets];
|
|
458
|
-
}
|
|
459
|
-
}
|
|
460
|
-
function apply() {
|
|
461
|
-
if (typeof window === "undefined") return;
|
|
462
|
-
window.ToggleEvent = window.ToggleEvent || ToggleEvent;
|
|
463
|
-
function rewriteSelector(selector) {
|
|
464
|
-
if (selector?.includes(":popover-open")) {
|
|
465
|
-
selector = selector.replace(
|
|
466
|
-
nonEscapedPopoverSelector,
|
|
467
|
-
"$1.\\:popover-open"
|
|
468
|
-
);
|
|
469
|
-
}
|
|
470
|
-
return selector;
|
|
471
|
-
}
|
|
472
|
-
patchSelectorFn(Document.prototype, "querySelector", rewriteSelector);
|
|
473
|
-
patchSelectorFn(Document.prototype, "querySelectorAll", rewriteSelector);
|
|
474
|
-
patchSelectorFn(Element.prototype, "querySelector", rewriteSelector);
|
|
475
|
-
patchSelectorFn(Element.prototype, "querySelectorAll", rewriteSelector);
|
|
476
|
-
patchSelectorFn(Element.prototype, "matches", rewriteSelector);
|
|
477
|
-
patchSelectorFn(Element.prototype, "closest", rewriteSelector);
|
|
478
|
-
patchSelectorFn(
|
|
479
|
-
DocumentFragment.prototype,
|
|
480
|
-
"querySelectorAll",
|
|
481
|
-
rewriteSelector
|
|
482
|
-
);
|
|
483
|
-
Object.defineProperties(HTMLElement.prototype, {
|
|
484
|
-
popover: {
|
|
485
|
-
enumerable: true,
|
|
486
|
-
configurable: true,
|
|
487
|
-
get() {
|
|
488
|
-
if (!this.hasAttribute("popover")) return null;
|
|
489
|
-
const value = (this.getAttribute("popover") || "").toLowerCase();
|
|
490
|
-
if (value === "" || value == "auto") return "auto";
|
|
491
|
-
return "manual";
|
|
492
|
-
},
|
|
493
|
-
set(value) {
|
|
494
|
-
this.setAttribute("popover", value);
|
|
495
|
-
}
|
|
496
|
-
},
|
|
497
|
-
showPopover: {
|
|
498
|
-
enumerable: true,
|
|
499
|
-
configurable: true,
|
|
500
|
-
value() {
|
|
501
|
-
showPopover(this);
|
|
502
|
-
}
|
|
503
|
-
},
|
|
504
|
-
hidePopover: {
|
|
505
|
-
enumerable: true,
|
|
506
|
-
configurable: true,
|
|
507
|
-
value() {
|
|
508
|
-
hidePopover(this, true, true);
|
|
509
|
-
}
|
|
510
|
-
},
|
|
511
|
-
togglePopover: {
|
|
512
|
-
enumerable: true,
|
|
513
|
-
configurable: true,
|
|
514
|
-
value(force) {
|
|
515
|
-
if (visibilityState.get(this) === "showing" && force === void 0 || force === false) {
|
|
516
|
-
hidePopover(this, true, true);
|
|
517
|
-
} else if (force === void 0 || force === true) {
|
|
518
|
-
showPopover(this);
|
|
519
|
-
}
|
|
520
|
-
}
|
|
521
|
-
}
|
|
522
|
-
});
|
|
523
|
-
const originalAttachShadow = Element.prototype.attachShadow;
|
|
524
|
-
if (originalAttachShadow) {
|
|
525
|
-
Object.defineProperties(Element.prototype, {
|
|
526
|
-
attachShadow: {
|
|
527
|
-
enumerable: true,
|
|
528
|
-
configurable: true,
|
|
529
|
-
writable: true,
|
|
530
|
-
value(options) {
|
|
531
|
-
const shadowRoot = originalAttachShadow.call(this, options);
|
|
532
|
-
injectStyles(shadowRoot);
|
|
533
|
-
return shadowRoot;
|
|
534
|
-
}
|
|
535
|
-
}
|
|
536
|
-
});
|
|
537
|
-
}
|
|
538
|
-
const originalAttachInternals = HTMLElement.prototype.attachInternals;
|
|
539
|
-
if (originalAttachInternals) {
|
|
540
|
-
Object.defineProperties(HTMLElement.prototype, {
|
|
541
|
-
attachInternals: {
|
|
542
|
-
enumerable: true,
|
|
543
|
-
configurable: true,
|
|
544
|
-
writable: true,
|
|
545
|
-
value() {
|
|
546
|
-
const internals = originalAttachInternals.call(this);
|
|
547
|
-
if (internals.shadowRoot) {
|
|
548
|
-
injectStyles(internals.shadowRoot);
|
|
549
|
-
}
|
|
550
|
-
return internals;
|
|
551
|
-
}
|
|
552
|
-
}
|
|
553
|
-
});
|
|
554
|
-
}
|
|
555
|
-
const popoverTargetAssociatedElements = /* @__PURE__ */ new WeakMap();
|
|
556
|
-
function applyPopoverInvokerElementMixin(ElementClass) {
|
|
557
|
-
Object.defineProperties(ElementClass.prototype, {
|
|
558
|
-
popoverTargetElement: {
|
|
559
|
-
enumerable: true,
|
|
560
|
-
configurable: true,
|
|
561
|
-
set(targetElement) {
|
|
562
|
-
if (targetElement === null) {
|
|
563
|
-
this.removeAttribute("popovertarget");
|
|
564
|
-
popoverTargetAssociatedElements.delete(this);
|
|
565
|
-
} else if (!(targetElement instanceof Element)) {
|
|
566
|
-
throw new TypeError(
|
|
567
|
-
`popoverTargetElement must be an element or null`
|
|
568
|
-
);
|
|
569
|
-
} else {
|
|
570
|
-
this.setAttribute("popovertarget", "");
|
|
571
|
-
popoverTargetAssociatedElements.set(this, targetElement);
|
|
572
|
-
}
|
|
573
|
-
},
|
|
574
|
-
get() {
|
|
575
|
-
if (this.localName !== "button" && this.localName !== "input") {
|
|
576
|
-
return null;
|
|
577
|
-
}
|
|
578
|
-
if (this.localName === "input" && this.type !== "reset" && this.type !== "image" && this.type !== "button") {
|
|
579
|
-
return null;
|
|
580
|
-
}
|
|
581
|
-
if (this.disabled) {
|
|
582
|
-
return null;
|
|
583
|
-
}
|
|
584
|
-
if (this.form && this.type === "submit") {
|
|
585
|
-
return null;
|
|
586
|
-
}
|
|
587
|
-
const targetElement = popoverTargetAssociatedElements.get(this);
|
|
588
|
-
if (targetElement && targetElement.isConnected) {
|
|
589
|
-
return targetElement;
|
|
590
|
-
} else if (targetElement && !targetElement.isConnected) {
|
|
591
|
-
popoverTargetAssociatedElements.delete(this);
|
|
592
|
-
return null;
|
|
593
|
-
}
|
|
594
|
-
const root = getRootNode(this);
|
|
595
|
-
const idref = this.getAttribute("popovertarget");
|
|
596
|
-
if ((root instanceof Document || root instanceof ShadowRoot2) && idref) {
|
|
597
|
-
return root.getElementById(idref) || null;
|
|
598
|
-
}
|
|
599
|
-
return null;
|
|
600
|
-
}
|
|
601
|
-
},
|
|
602
|
-
popoverTargetAction: {
|
|
603
|
-
enumerable: true,
|
|
604
|
-
configurable: true,
|
|
605
|
-
get() {
|
|
606
|
-
const value = (this.getAttribute("popovertargetaction") || "").toLowerCase();
|
|
607
|
-
if (value === "show" || value === "hide") return value;
|
|
608
|
-
return "toggle";
|
|
609
|
-
},
|
|
610
|
-
set(value) {
|
|
611
|
-
this.setAttribute("popovertargetaction", value);
|
|
612
|
-
}
|
|
613
|
-
}
|
|
614
|
-
});
|
|
615
|
-
}
|
|
616
|
-
applyPopoverInvokerElementMixin(HTMLButtonElement);
|
|
617
|
-
applyPopoverInvokerElementMixin(HTMLInputElement);
|
|
618
|
-
const handleInvokerActivation = (event) => {
|
|
619
|
-
const composedPath = event.composedPath();
|
|
620
|
-
const target = composedPath[0];
|
|
621
|
-
if (!(target instanceof Element) || target?.shadowRoot) {
|
|
622
|
-
return;
|
|
623
|
-
}
|
|
624
|
-
const root = getRootNode(target);
|
|
625
|
-
if (!(root instanceof ShadowRoot2 || root instanceof Document)) {
|
|
626
|
-
return;
|
|
627
|
-
}
|
|
628
|
-
const invoker = composedPath.find(
|
|
629
|
-
(el) => el.matches?.("[popovertargetaction],[popovertarget]")
|
|
630
|
-
);
|
|
631
|
-
if (invoker) {
|
|
632
|
-
popoverTargetAttributeActivationBehavior(invoker);
|
|
633
|
-
event.preventDefault();
|
|
634
|
-
return;
|
|
635
|
-
}
|
|
636
|
-
};
|
|
637
|
-
const onKeydown = (event) => {
|
|
638
|
-
const key = event.key;
|
|
639
|
-
const target = event.target;
|
|
640
|
-
if (!event.defaultPrevented && target && (key === "Escape" || key === "Esc")) {
|
|
641
|
-
hideAllPopoversUntil(target.ownerDocument, true, true);
|
|
642
|
-
}
|
|
643
|
-
};
|
|
644
|
-
const addEventListeners = (root) => {
|
|
645
|
-
root.addEventListener("click", handleInvokerActivation);
|
|
646
|
-
root.addEventListener("keydown", onKeydown);
|
|
647
|
-
root.addEventListener("pointerdown", lightDismissOpenPopovers);
|
|
648
|
-
root.addEventListener("pointerup", lightDismissOpenPopovers);
|
|
649
|
-
};
|
|
650
|
-
addEventListeners(document);
|
|
651
|
-
injectStyles(document);
|
|
652
|
-
}
|
|
653
|
-
if (!isSupported()) apply();
|
|
654
|
-
//# sourceMappingURL=popover-wbPSyFRj.js.map
|