@orangesk/orange-design-system 2.0.0-beta.8 → 2.0.0
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 +358 -19
- package/build/appstore.svg +31 -0
- package/build/components/Accordion/style.css +2 -0
- package/build/components/Accordion/style.css.map +1 -0
- package/build/components/Alert/style.css +2 -0
- package/build/components/Alert/style.css.map +1 -0
- package/build/components/AnchorNavigation/style.css +2 -0
- package/build/components/AnchorNavigation/style.css.map +1 -0
- package/build/components/Bar/style.css +2 -0
- package/build/components/Bar/style.css.map +1 -0
- package/build/components/BlockAction/style.css +2 -0
- package/build/components/BlockAction/style.css.map +1 -0
- package/build/components/BodyBanner/style.css +2 -0
- package/build/components/BodyBanner/style.css.map +1 -0
- package/build/components/Breadcrumbs/style.css +2 -0
- package/build/components/Breadcrumbs/style.css.map +1 -0
- package/build/components/Button/style.css +2 -0
- package/build/components/Button/style.css.map +1 -0
- package/build/components/Buttons/style.css +2 -0
- package/build/components/Buttons/style.css.map +1 -0
- package/build/components/Card/style.css +2 -0
- package/build/components/Card/style.css.map +1 -0
- package/build/components/Carousel/style.css +2 -0
- package/build/components/Carousel/style.css.map +1 -0
- package/build/components/CarouselHero/style.css +2 -0
- package/build/components/CarouselHero/style.css.map +1 -0
- package/build/components/CarouselPromotions/style.css +2 -0
- package/build/components/CarouselPromotions/style.css.map +1 -0
- package/build/components/CartTable/style.css +2 -0
- package/build/components/CartTable/style.css.map +1 -0
- package/build/components/Code/style.css +2 -0
- package/build/components/Code/style.css.map +1 -0
- package/build/components/Container/style.css +2 -0
- package/build/components/Container/style.css.map +1 -0
- package/build/components/Controls/style.css +2 -0
- package/build/components/Controls/style.css.map +1 -0
- package/build/components/Cover/style.css +2 -0
- package/build/components/Cover/style.css.map +1 -0
- package/build/components/Divider/style.css +2 -0
- package/build/components/Divider/style.css.map +1 -0
- package/build/components/DocumentationSidebar/style.css +2 -0
- package/build/components/DocumentationSidebar/style.css.map +1 -0
- package/build/components/Dropdown/style.css +2 -0
- package/build/components/Dropdown/style.css.map +1 -0
- package/build/components/Expander/style.css +2 -0
- package/build/components/Expander/style.css.map +1 -0
- package/build/components/FeatureAccordion/style.css +2 -0
- package/build/components/FeatureAccordion/style.css.map +1 -0
- package/build/components/Footer/style.css +2 -0
- package/build/components/Footer/style.css.map +1 -0
- package/build/components/Gauge/style.css +2 -0
- package/build/components/Gauge/style.css.map +1 -0
- package/build/components/Grid/style.css +2 -0
- package/build/components/Grid/style.css.map +1 -0
- package/build/components/Hero/style.css +2 -0
- package/build/components/Hero/style.css.map +1 -0
- package/build/components/Icon/style.css +2 -0
- package/build/components/Icon/style.css.map +1 -0
- package/build/components/IconList/style.css +2 -0
- package/build/components/IconList/style.css.map +1 -0
- package/build/components/Image/style.css +2 -0
- package/build/components/Image/style.css.map +1 -0
- package/build/components/Link/style.css +2 -0
- package/build/components/Link/style.css.map +1 -0
- package/build/components/List/style.css +2 -0
- package/build/components/List/style.css.map +1 -0
- package/build/components/Loader/style.css +2 -0
- package/build/components/Loader/style.css.map +1 -0
- package/build/components/Megamenu/style.css +2 -0
- package/build/components/Megamenu/style.css.map +1 -0
- package/build/components/Modal/style.css +2 -0
- package/build/components/Modal/style.css.map +1 -0
- package/build/components/Pagination/style.css +2 -0
- package/build/components/Pagination/style.css.map +1 -0
- package/build/components/Pill/style.css +2 -0
- package/build/components/Pill/style.css.map +1 -0
- package/build/components/Preview/style.css +2 -0
- package/build/components/Preview/style.css.map +1 -0
- package/build/components/Progress/style.css +2 -0
- package/build/components/Progress/style.css.map +1 -0
- package/build/components/PromoBanner/style.css +2 -0
- package/build/components/PromoBanner/style.css.map +1 -0
- package/build/components/PromotionCard/style.css +2 -0
- package/build/components/PromotionCard/style.css.map +1 -0
- package/build/components/Section/style.css +2 -0
- package/build/components/Section/style.css.map +1 -0
- package/build/components/Skeleton/style.css +2 -0
- package/build/components/Skeleton/style.css.map +1 -0
- package/build/components/SkipLink/style.css +2 -0
- package/build/components/SkipLink/style.css.map +1 -0
- package/build/components/SocialButton/style.css +2 -0
- package/build/components/SocialButton/style.css.map +1 -0
- package/build/components/Stepbar/style.css +2 -0
- package/build/components/Stepbar/style.css.map +1 -0
- package/build/components/Sticker/style.css +2 -0
- package/build/components/Sticker/style.css.map +1 -0
- package/build/components/Table/style.css +2 -0
- package/build/components/Table/style.css.map +1 -0
- package/build/components/Tabs/style.css +2 -0
- package/build/components/Tabs/style.css.map +1 -0
- package/build/components/Tag/style.css +2 -0
- package/build/components/Tag/style.css.map +1 -0
- package/build/components/Testimonial/style.css +2 -0
- package/build/components/Testimonial/style.css.map +1 -0
- package/build/components/Tile/style.css +2 -0
- package/build/components/Tile/style.css.map +1 -0
- package/build/components/Tooltip/style.css +2 -0
- package/build/components/Tooltip/style.css.map +1 -0
- package/build/components/index.js +1 -23
- package/build/components/index.js.map +1 -1
- package/build/components/tsconfig.tsbuildinfo +1 -1
- package/build/components/types/index.d.ts +846 -802
- package/build/components/types/src/components/Accordion/Accordion.d.ts +2 -2
- package/build/components/types/src/components/Accordion/Accordion.static.d.ts +3 -0
- package/build/components/types/src/components/Alert/Alert.d.ts +0 -2
- package/build/components/types/src/components/AnchorNavigation/AnchorNavigation.d.ts +1 -2
- package/build/components/types/src/components/AnchorNavigation/AnchorNavigation.static.d.ts +76 -0
- package/build/components/types/src/components/Bar/index.d.ts +1 -1
- package/build/components/types/src/components/BlockAction/BlockAction.d.ts +2 -0
- package/build/components/types/src/components/BlockAction/Context.d.ts +3 -1
- package/build/components/types/src/components/BlockAction/index.d.ts +2 -4
- package/build/components/types/src/components/BodyBanner/BodyBanner.d.ts +12 -12
- package/build/components/types/src/components/Breadcrumbs/Breadcrumbs.d.ts +0 -2
- package/build/components/types/src/components/Button/Button.d.ts +1 -1
- package/build/components/types/src/components/Button/index.d.ts +4 -5
- package/build/components/types/src/components/Card/Card.d.ts +2 -1
- package/build/components/types/src/components/Card/index.d.ts +2 -1
- package/build/components/types/src/components/Carousel/Carousel.d.ts +5 -3
- package/build/components/types/src/components/Carousel/Carousel.static.d.ts +74 -7
- package/build/components/types/src/components/Carousel/CarouselItem.d.ts +1 -1
- package/build/components/types/src/components/Carousel/constants.d.ts +2 -0
- package/build/components/types/src/components/CarouselHero/CarouselHero.d.ts +3 -2
- package/build/components/types/src/components/CarouselHero/CarouselHero.static.d.ts +4 -1
- package/build/components/types/src/components/CarouselHero/CarouselHeroItem.d.ts +1 -2
- package/build/components/types/src/components/CarouselHero/constants.d.ts +1 -2
- package/build/components/types/src/components/CarouselHero/index.d.ts +1 -1
- package/build/components/types/src/components/CarouselPromotions/CarouselPromotions.d.ts +0 -1
- package/build/components/types/src/components/CarouselPromotions/CarouselPromotions.static.d.ts +5 -0
- package/build/components/types/src/components/CartTable/CartTable.d.ts +1 -1
- package/build/components/types/src/components/CartTable/data.d.ts +1 -1
- package/build/components/types/src/components/Code/Code.d.ts +1 -1
- package/build/components/types/src/components/Controls/Controls.d.ts +0 -1
- package/build/components/types/src/components/Cover/Cover.d.ts +3 -3
- package/build/components/types/src/components/Divider/Divider.d.ts +1 -5
- package/build/components/types/src/components/DocumentationSidebar/DocumentationSidebar.d.ts +1 -0
- package/build/components/types/src/components/DocumentationSidebar/index.d.ts +1 -1
- package/build/components/types/src/components/Dropdown/index.d.ts +1 -1
- package/build/components/types/src/components/Expander/Expander.d.ts +6 -3
- package/build/components/types/src/components/Expander/Expander.static.d.ts +3 -2
- package/build/components/types/src/components/FeatureAccordion/FeatureAccordion.d.ts +14 -3
- package/build/components/types/src/components/FeatureAccordion/FeatureAccordion.static.d.ts +1 -2
- package/build/components/types/src/components/FeatureAccordion/FeatureAccordionItem.d.ts +3 -3
- package/build/components/types/src/components/Footer/Footer.static.d.ts +21 -0
- package/build/components/types/src/components/Footer/PlanObnovy.d.ts +1 -0
- package/build/components/types/src/components/Footer/constants.d.ts +12 -1
- package/build/components/types/src/components/Footer/data.d.ts +11 -0
- package/build/components/types/src/components/Footer/static.d.ts +21 -0
- package/build/components/types/src/components/Forms/Autocomplete/Autocomplete.d.ts +3 -1
- package/build/components/types/src/components/Forms/Autocomplete/Autocomplete.static.d.ts +12 -0
- package/build/components/types/src/components/Forms/File/File.d.ts +2 -0
- package/build/components/types/src/components/Forms/Group/Group.d.ts +4 -2
- package/build/components/types/src/components/Forms/Group/Item.d.ts +1 -1
- package/build/components/types/src/components/Forms/InputStepper/InputStepper.d.ts +2 -1
- package/build/components/types/src/components/Forms/RangeSlider/RangeSlider.d.ts +2 -0
- package/build/components/types/src/components/Forms/Select/index.d.ts +1 -1
- package/build/components/types/src/components/Forms/TextInput/TextInput.d.ts +3 -0
- package/build/components/types/src/components/Forms/index.d.ts +1 -1
- package/build/components/types/src/components/Grid/Grid.d.ts +2 -2
- package/build/components/types/src/components/Grid/GridCol.d.ts +4 -4
- package/build/components/types/src/components/Hero/Hero.d.ts +0 -3
- package/build/components/types/src/components/Icon/IconSearch.d.ts +2 -2
- package/build/components/types/src/components/Icon/IconSearchWrapper.d.ts +1 -1
- package/build/components/types/src/components/Icon/PictogramSearch.d.ts +6 -0
- package/build/components/types/src/components/Icon/PictogramSearchWrapper.d.ts +1 -0
- package/build/components/types/src/components/Icon/iconSearchTags.d.ts +172 -165
- package/build/components/types/src/components/Icon/iconUtils.d.ts +2 -0
- package/build/components/types/src/components/Icon/index.d.ts +1 -1
- package/build/components/types/src/components/IconList/Item.d.ts +1 -1
- package/build/components/types/src/components/Link/Link.d.ts +2 -2
- package/build/components/types/src/components/List/ClickableControl.d.ts +1 -1
- package/build/components/types/src/components/List/List.d.ts +3 -3
- package/build/components/types/src/components/List/ListItem.d.ts +1 -1
- package/build/components/types/src/components/Loader/LoaderFullscreen.d.ts +7 -0
- package/build/components/types/src/components/Loader/index.d.ts +1 -0
- package/build/components/types/src/components/Megamenu/BrandMark.d.ts +1 -0
- package/build/components/types/src/components/Megamenu/Logo.d.ts +1 -0
- package/build/components/types/src/components/Megamenu/LogoJeTu.d.ts +1 -0
- package/build/components/types/src/components/Megamenu/Megamenu.d.ts +9 -1
- package/build/components/types/src/components/Megamenu/Megamenu.static.d.ts +21 -5
- package/build/components/types/src/components/Megamenu/MegamenuBlog.d.ts +2 -1
- package/build/components/types/src/components/Megamenu/MegamenuSearchContent.d.ts +10 -0
- package/build/components/types/src/components/Megamenu/MyOrangeMobilePanel.d.ts +6 -0
- package/build/components/types/src/components/Megamenu/constants.d.ts +21 -0
- package/build/components/types/src/components/Megamenu/data.d.ts +21 -0
- package/build/components/types/src/components/Megamenu/ids.d.ts +11 -0
- package/build/components/types/src/components/Megamenu/index.d.ts +1 -1
- package/build/components/types/src/components/Megamenu/static.d.ts +2 -3
- package/build/components/types/src/components/Modal/Modal.d.ts +2 -6
- package/build/components/types/src/components/Modal/Modal.static.d.ts +4 -0
- package/build/components/types/src/components/Modal/ModalBody.d.ts +3 -3
- package/build/components/types/src/components/Modal/ModalCloseButton.d.ts +1 -1
- package/build/components/types/src/components/Modal/ModalProductHeader.d.ts +2 -0
- package/build/components/types/src/components/Modal/index.d.ts +2 -3
- package/build/components/types/src/components/Pagination/Pagination.d.ts +0 -2
- package/build/components/types/src/components/Pagination/Separator.d.ts +2 -2
- package/build/components/types/src/components/Pagination/helpers.d.ts +1 -1
- package/build/components/types/src/components/Pill/Pill.d.ts +2 -3
- package/build/components/types/src/components/Preview/CodeExample.d.ts +1 -0
- package/build/components/types/src/components/Preview/Preview.d.ts +2 -2
- package/build/components/types/src/components/Preview/PreviewGenerator.d.ts +13 -9
- package/build/components/types/src/components/Preview/getElementDisplayName.d.ts +1 -0
- package/build/components/types/src/components/Preview/index.d.ts +1 -1
- package/build/components/types/src/components/Progress/Progress.d.ts +0 -1
- package/build/components/types/src/components/PromoBanner/PromoBanner.d.ts +13 -6
- package/build/components/types/src/components/PromotionCard/PromotionCard.d.ts +3 -3
- package/build/components/types/src/components/PromotionCard/PromotionCardContent.d.ts +1 -1
- package/build/components/types/src/components/PromotionCard/PromotionCardImageWrapper.d.ts +1 -1
- package/build/components/types/src/components/PromotionCard/PromotionCardTitle.d.ts +1 -1
- package/build/components/types/src/components/Section/Section.d.ts +4 -1
- package/build/components/types/src/components/SocialButton/SocialButton.d.ts +13 -0
- package/build/components/types/src/components/SocialButton/index.d.ts +1 -0
- package/build/components/types/src/components/Stepbar/Stepbar.d.ts +0 -2
- package/build/components/types/src/components/Sticker/Sticker.d.ts +3 -3
- package/build/components/types/src/components/Table/Row.d.ts +1 -2
- package/build/components/types/src/components/Table/Table.d.ts +3 -3
- package/build/components/types/src/components/Table/docsData.d.ts +2 -0
- package/build/components/types/src/components/Table/index.d.ts +1 -1
- package/build/components/types/src/components/Table/types.d.ts +1 -0
- package/build/components/types/src/components/Tabs/Tabs.d.ts +0 -6
- package/build/components/types/src/components/Tabs/Tabs.static.d.ts +12 -0
- package/build/components/types/src/components/Tabs/index.d.ts +2 -2
- package/build/components/types/src/components/Tag/Tag.d.ts +0 -2
- package/build/components/types/src/components/Tag/index.d.ts +1 -1
- package/build/components/types/src/components/Testimonial/Testimonial.d.ts +2 -2
- package/build/components/types/src/components/Tile/Tile.d.ts +3 -10
- package/build/components/types/src/components/Tooltip/Tooltip.d.ts +0 -1
- package/build/components/types/src/components/Tooltip/Tooltip.static.d.ts +6 -2
- package/build/components/types/src/components/Tooltip/index.d.ts +1 -1
- package/build/components/types/src/components/Tooltip/tests/BaseWrapper.d.ts +1 -1
- package/build/components/types/src/components/index.d.ts +22 -20
- package/build/components/types/src/docs/utils/SpacePreview.d.ts +1 -2
- package/build/components/types/src/scripts/index.d.ts +7 -8
- package/build/components/types/src/scripts/modules/SameHeight.d.ts +7 -0
- package/build/components/types/src/scripts/modules/SpacePreview/index.d.ts +1 -1
- package/build/components/types/src/styles/export/color.d.ts +105 -0
- package/build/components/types/src/utils/formatCode.d.ts +5 -0
- package/build/components/types/src/utils/hooks.d.ts +1 -1
- package/build/components/types/src/utils/index.d.ts +2 -2
- package/build/fonts/HelveticaNeue-Bold.woff2 +0 -0
- package/build/fonts/HelveticaNeue-Light.woff2 +0 -0
- package/build/fonts/HelveticaNeue-Roman.woff2 +0 -0
- package/build/googleplay.svg +52 -0
- package/build/lib/base.css +3 -0
- package/build/lib/base.css.map +1 -0
- package/build/lib/components.css +1 -1
- package/build/lib/components.css.map +1 -1
- package/build/lib/footer.css +1 -1
- package/build/lib/footer.css.map +1 -1
- package/build/lib/footer.js +2 -0
- package/build/lib/footer.js.map +1 -0
- package/build/lib/megamenu.css +1 -1
- package/build/lib/megamenu.css.map +1 -1
- package/build/lib/megamenu.js +1 -1
- package/build/lib/megamenu.js.map +1 -1
- package/build/lib/scripts.js +1 -9
- package/build/lib/scripts.js.map +1 -1
- package/build/lib/style.css +1 -1
- package/build/lib/style.css.map +1 -1
- package/build/lib/tsconfig.tsbuildinfo +1 -1
- package/build/lib/utilities.css +2 -0
- package/build/lib/utilities.css.map +1 -0
- package/build/plan-obnovy.svg +53 -0
- package/build/search-index.json +426 -0
- package/build/sprite.svg +1 -1
- package/package.json +92 -62
- package/public/fonts/HelveticaNeue-Bold.woff2 +0 -0
- package/public/fonts/HelveticaNeue-Light.woff2 +0 -0
- package/public/fonts/HelveticaNeue-Roman.woff2 +0 -0
- package/src/assets/icons/ai.svg +6 -0
- package/src/assets/icons/discount-price.svg +4 -0
- package/src/assets/icons/instagram.svg +5 -1
- package/src/assets/icons/linkedin-2.svg +3 -1
- package/src/assets/icons/pause.svg +5 -1
- package/src/assets/icons/pictogram-deezer--dark.svg +24 -0
- package/src/assets/icons/pictogram-deezer.svg +24 -0
- package/src/assets/icons/pictogram-discount-rental--dark.svg +11 -0
- package/src/assets/icons/pictogram-discount-rental.svg +11 -0
- package/src/assets/icons/pictogram-discount-tv-package--dark.svg +7 -0
- package/src/assets/icons/pictogram-discount-tv-package.svg +7 -0
- package/src/assets/icons/pictogram-disney--dark.svg +15 -0
- package/src/assets/icons/pictogram-disney.svg +10 -0
- package/src/assets/icons/pictogram-eset--dark.svg +10 -0
- package/src/assets/icons/pictogram-eset.svg +10 -0
- package/src/assets/icons/pictogram-ewatch--dark.svg +7 -0
- package/src/assets/icons/pictogram-ewatch.svg +7 -0
- package/src/assets/icons/pictogram-exclusive-package--dark.svg +5 -0
- package/src/assets/icons/pictogram-exclusive-package.svg +5 -0
- package/src/assets/icons/pictogram-fast-data--dark.svg +6 -0
- package/src/assets/icons/pictogram-fast-data.svg +6 -0
- package/src/assets/icons/pictogram-hbo-max--dark.svg +4 -5
- package/src/assets/icons/pictogram-hbo-max.svg +4 -5
- package/src/assets/icons/pictogram-interaction--dark.svg +20 -0
- package/src/assets/icons/pictogram-interaction.svg +20 -0
- package/src/assets/icons/pictogram-internet--dark.svg +15 -0
- package/src/assets/icons/pictogram-internet.svg +15 -0
- package/src/assets/icons/pictogram-my-orange--dark.svg +6 -0
- package/src/assets/icons/pictogram-my-orange.svg +6 -0
- package/src/assets/icons/pictogram-offer-package--dark.svg +7 -0
- package/src/assets/icons/pictogram-offer-package.svg +7 -0
- package/src/assets/icons/pictogram-prima-love--dark.svg +4 -0
- package/src/assets/icons/pictogram-prima-love.svg +4 -0
- package/src/assets/icons/pictogram-shared-data--dark.svg +8 -0
- package/src/assets/icons/pictogram-shared-data.svg +8 -0
- package/src/assets/icons/pictogram-tariffs--dark.svg +9 -0
- package/src/assets/icons/pictogram-tariffs.svg +9 -0
- package/src/assets/icons/pictogram-unlimited-data--dark.svg +19 -0
- package/src/assets/icons/pictogram-unlimited-data.svg +19 -0
- package/src/assets/icons/pinterest.svg +4 -0
- package/src/assets/icons/play.svg +4 -1
- package/src/assets/icons/quote.svg +4 -0
- package/src/assets/icons/snapchat.svg +4 -0
- package/src/assets/icons/tiktok.svg +4 -0
- package/src/assets/icons/whatsapp.svg +4 -0
- package/src/assets/icons/youtube.svg +3 -1
- package/src/components/Accordion/Accordion.static.ts +79 -30
- package/src/components/Accordion/Accordion.tsx +6 -7
- package/src/components/Accordion/AccordionHeader.tsx +1 -11
- package/src/components/Accordion/AccordionItem.tsx +3 -1
- package/src/components/Accordion/HeadingContext.tsx +1 -1
- package/src/components/Accordion/styles/config.scss +3 -2
- package/src/components/Accordion/styles/mixins.scss +10 -9
- package/src/components/Accordion/styles/style.scss +2 -2
- package/src/components/Accordion/tests/{Accordion.static.test.js → Accordion.static.test.jsx} +23 -23
- package/src/components/Accordion/tests/{Accordion.unit.test.js → Accordion.unit.test.jsx} +125 -31
- package/src/components/Alert/Alert.tsx +3 -10
- package/src/components/Alert/styles/config.scss +1 -1
- package/src/components/Alert/styles/mixins.scss +4 -1
- package/src/components/Alert/tests/{Alert.conformance.test.js → Alert.conformance.test.jsx} +2 -3
- package/src/components/Alert/tests/{Alert.test.js → Alert.test.jsx} +2 -16
- package/src/components/Alert/tests/Alert.visual.test.jsx +137 -0
- package/src/components/Alert/tests/__screenshots__/Alert.visual.test.jsx/alert-preview-custom-title-chromium-linux.png +0 -0
- package/src/components/Alert/tests/__screenshots__/Alert.visual.test.jsx/alert-preview-danger-chromium-linux.png +0 -0
- package/src/components/Alert/tests/__screenshots__/Alert.visual.test.jsx/alert-preview-full-width-chromium-linux.png +0 -0
- package/src/components/Alert/tests/__screenshots__/Alert.visual.test.jsx/alert-preview-success-chromium-linux.png +0 -0
- package/src/components/Alert/tests/__screenshots__/Alert.visual.test.jsx/alert-preview-title-buttons-chromium-linux.png +0 -0
- package/src/components/Alert/tests/__screenshots__/Alert.visual.test.jsx/alert-preview-title-chromium-linux.png +0 -0
- package/src/components/Alert/tests/__screenshots__/Alert.visual.test.jsx/alert-preview-title-description-buttons-chromium-linux.png +0 -0
- package/src/components/Alert/tests/__screenshots__/Alert.visual.test.jsx/alert-preview-title-description-chromium-linux.png +0 -0
- package/src/components/Alert/tests/__screenshots__/Alert.visual.test.jsx/alert-preview-warning-chromium-linux.png +0 -0
- package/src/components/AnchorNavigation/AnchorNavigation.static.ts +746 -88
- package/src/components/AnchorNavigation/AnchorNavigation.tsx +5 -15
- package/src/components/AnchorNavigation/styles/mixins.scss +124 -15
- package/src/components/AnchorNavigation/tests/{AnchorNavigation.conformance.test.js → AnchorNavigation.conformance.test.jsx} +1 -10
- package/src/components/AnchorNavigation/tests/AnchorNavigation.unit.test.jsx +801 -0
- package/src/components/Bar/Bar.tsx +1 -1
- package/src/components/Bar/BarBreak.tsx +1 -1
- package/src/components/Bar/BarItem.tsx +1 -1
- package/src/components/Bar/index.ts +1 -1
- package/src/components/Bar/styles/config.scss +4 -5
- package/src/components/Bar/styles/mixins.scss +11 -11
- package/src/components/Bar/tests/{Bar.conformance.test.js → Bar.conformance.test.jsx} +1 -1
- package/src/components/BlockAction/BlockAction.tsx +10 -3
- package/src/components/BlockAction/BlockActionControl.tsx +2 -3
- package/src/components/BlockAction/BlockActionIndicator.tsx +2 -3
- package/src/components/BlockAction/CloneElementWithClassName.tsx +1 -1
- package/src/components/BlockAction/Context.tsx +5 -1
- package/src/components/BlockAction/index.tsx +3 -8
- package/src/components/BlockAction/styles/config.scss +6 -6
- package/src/components/BlockAction/styles/mixins.scss +5 -0
- package/src/components/BlockAction/styles/style.scss +11 -4
- package/src/components/BlockAction/tests/{BlockAction.conformance.test.js → BlockAction.conformance.test.jsx} +1 -1
- package/src/components/BlockAction/tests/{BlockActionControl.unit.test.js → BlockActionControl.unit.test.jsx} +3 -3
- package/src/components/BodyBanner/BodyBanner.tsx +54 -78
- package/src/components/BodyBanner/styles/mixins.scss +50 -45
- package/src/components/BodyBanner/styles/style.scss +4 -18
- package/src/components/BodyBanner/tests/BodyBanner.conformance.test.jsx +84 -0
- package/src/components/BodyBanner/tests/BodyBanner.unit.test.jsx +201 -0
- package/src/components/Breadcrumbs/BreadcrumbItem.tsx +17 -8
- package/src/components/Breadcrumbs/Breadcrumbs.tsx +4 -12
- package/src/components/Breadcrumbs/styles/mixins.scss +39 -10
- package/src/components/Breadcrumbs/styles/style.scss +2 -1
- package/src/components/Breadcrumbs/tests/{BreadcrumbItem.unit.test.js → BreadcrumbItem.unit.test.jsx} +14 -8
- package/src/components/Breadcrumbs/tests/{Breadcrumbs.conformance.test.js → Breadcrumbs.conformance.test.jsx} +1 -1
- package/src/components/Breadcrumbs/tests/{Breadcrumbs.integration.test.js → Breadcrumbs.integration.test.jsx} +14 -37
- package/src/components/Breadcrumbs/tests/{Breadcrumbs.unit.test.js → Breadcrumbs.unit.test.jsx} +19 -23
- package/src/components/Button/Button.tsx +3 -7
- package/src/components/Button/IconButton.tsx +7 -3
- package/src/components/Button/index.tsx +1 -3
- package/src/components/Button/styles/config.scss +5 -5
- package/src/components/Button/styles/mixins.scss +7 -2
- package/src/components/Button/styles/style.scss +4 -0
- package/src/components/Button/tests/{Button.conformance.test.js → Button.conformance.test.jsx} +1 -2
- package/src/components/Button/tests/{Button.test.js → Button.test.jsx} +1 -12
- package/src/components/Button/tests/{IconButton.unit.test.js → IconButton.unit.test.jsx} +0 -1
- package/src/components/Buttons/styles/mixins.scss +8 -13
- package/src/components/Buttons/tests/{Buttons.conformance.test.js → Buttons.conformance.test.jsx} +1 -1
- package/src/components/Card/Card.tsx +19 -16
- package/src/components/Card/CardProductHeader.tsx +1 -1
- package/src/components/Card/CardSection.tsx +6 -2
- package/src/components/Card/index.ts +2 -1
- package/src/components/Card/styles/config.scss +2 -2
- package/src/components/Card/styles/mixins.scss +7 -6
- package/src/components/Card/styles/style.scss +4 -0
- package/src/components/Card/tests/{Card.conformance.test.js → Card.conformance.test.jsx} +2 -2
- package/src/components/Card/tests/Card.unit.test.jsx +81 -0
- package/src/components/Card/tests/{CardProductHeader.unit.test.js → CardProductHeader.unit.test.jsx} +1 -1
- package/src/components/Card/tests/{CardSection.unit.test.js → CardSection.unit.test.jsx} +36 -3
- package/src/components/Carousel/Carousel.static.ts +637 -24
- package/src/components/Carousel/Carousel.tsx +50 -35
- package/src/components/Carousel/CarouselItem.tsx +1 -1
- package/src/components/Carousel/constants.ts +2 -0
- package/src/components/Carousel/styles/config.scss +1 -2
- package/src/components/Carousel/styles/mixins.scss +65 -6
- package/src/components/Carousel/styles/style.scss +8 -0
- package/src/components/Carousel/tests/{Carousel.conformance.test.js → Carousel.conformance.test.jsx} +2 -4
- package/src/components/Carousel/tests/Carousel.static.test.jsx +988 -0
- package/src/components/Carousel/tests/{Carousel.unit.test.js → Carousel.unit.test.jsx} +117 -12
- package/src/components/CarouselHero/CarouselHero.static.ts +68 -37
- package/src/components/CarouselHero/CarouselHero.tsx +101 -39
- package/src/components/CarouselHero/CarouselHeroItem.tsx +13 -14
- package/src/components/CarouselHero/constants.ts +1 -2
- package/src/components/CarouselHero/index.ts +1 -1
- package/src/components/CarouselHero/styles/mixins.scss +19 -32
- package/src/components/CarouselHero/styles/style.scss +4 -8
- package/src/components/CarouselHero/tests/{CarouselHero.conformance.test.js → CarouselHero.conformance.test.jsx} +45 -46
- package/src/components/CarouselHero/tests/{CarouselHero.unit.test.js → CarouselHero.unit.test.jsx} +184 -42
- package/src/components/CarouselHero/tests/CarouselHero.visual.test.jsx +90 -0
- package/src/components/CarouselHero/tests/{CarouselHeroItem.conformance.test.js → CarouselHeroItem.conformance.test.jsx} +19 -26
- package/src/components/CarouselHero/tests/{CarouselHeroItem.unit.test.js → CarouselHeroItem.unit.test.jsx} +26 -93
- package/src/components/CarouselPromotions/CarouselPromotions.static.ts +72 -13
- package/src/components/CarouselPromotions/CarouselPromotions.tsx +7 -13
- package/src/components/CarouselPromotions/CarouselPromotionsItem.tsx +3 -3
- package/src/components/CarouselPromotions/styles/mixins.scss +8 -5
- package/src/components/CarouselPromotions/tests/{CarouselPromotions.conformance.test.js → CarouselPromotions.conformance.test.jsx} +13 -6
- package/src/components/CarouselPromotions/tests/{CarouselPromotions.unit.test.js → CarouselPromotions.unit.test.jsx} +3 -22
- package/src/components/CartTable/CartTable.tsx +3 -4
- package/src/components/CartTable/FooterPriceColumn.tsx +6 -4
- package/src/components/CartTable/Price.tsx +2 -2
- package/src/components/CartTable/data.ts +1 -1
- package/src/components/CartTable/generateFooter.tsx +1 -1
- package/src/components/CartTable/generateRow.tsx +6 -8
- package/src/components/CartTable/styles/mixins.scss +46 -49
- package/src/components/CartTable/tests/{CartTable.conformance.test.js → CartTable.conformance.test.jsx} +1 -1
- package/src/components/Code/Code.tsx +1 -1
- package/src/components/Code/styles/style.scss +6 -5
- package/src/components/Container/Container.tsx +1 -1
- package/src/components/Container/styles/config.scss +2 -2
- package/src/components/Container/styles/mixins.scss +4 -4
- package/src/components/Container/tests/{Container.conformance.test.js → Container.conformance.test.jsx} +2 -6
- package/src/components/Container/tests/{Container.unit.test.js → Container.unit.test.jsx} +5 -4
- package/src/components/Controls/Controls.tsx +3 -8
- package/src/components/Controls/tests/{Controls.test.js → Controls.test.jsx} +14 -46
- package/src/components/Cover/Cover.tsx +22 -20
- package/src/components/Cover/index.ts +1 -0
- package/src/components/Cover/styles/config.scss +23 -12
- package/src/components/Cover/styles/mixins.scss +6 -5
- package/src/components/Cover/tests/Cover.conformance.test.jsx +27 -0
- package/src/components/Cover/tests/Cover.unit.test.jsx +115 -0
- package/src/components/Divider/Divider.tsx +3 -17
- package/src/components/Divider/styles/config.scss +0 -17
- package/src/components/Divider/styles/mixins.scss +12 -12
- package/src/components/Divider/styles/style.scss +2 -16
- package/src/components/Divider/tests/{Divider.conformance.test.js → Divider.conformance.test.jsx} +2 -2
- package/src/components/Divider/tests/{Divider.unit.test.js → Divider.unit.test.jsx} +0 -17
- package/src/components/DocumentationSidebar/DocumentationSidebar.tsx +231 -9
- package/src/components/DocumentationSidebar/index.ts +2 -2
- package/src/components/DocumentationSidebar/styles/style.scss +76 -3
- package/src/components/Dropdown/Dropdown.static.ts +3 -2
- package/src/components/Dropdown/Dropdown.tsx +3 -5
- package/src/components/Dropdown/DropdownDivider.tsx +1 -1
- package/src/components/Dropdown/DropdownItem.tsx +1 -1
- package/src/components/Dropdown/DropdownToggleButton.tsx +1 -1
- package/src/components/Dropdown/index.ts +1 -1
- package/src/components/Dropdown/styles/mixins.scss +1 -1
- package/src/components/Dropdown/tests/{Dropdown.conformance.test.js → Dropdown.conformance.test.jsx} +2 -2
- package/src/components/Dropdown/tests/{Dropdown.unit.test.js → Dropdown.unit.test.jsx} +1 -2
- package/src/components/Expander/Expander.static.ts +22 -28
- package/src/components/Expander/Expander.tsx +21 -17
- package/src/components/Expander/styles/style.scss +18 -3
- package/src/components/Expander/tests/{Expander.conformance.test.js → Expander.conformance.test.jsx} +23 -13
- package/src/components/Expander/tests/Expander.unit.test.jsx +196 -0
- package/src/components/FeatureAccordion/FeatureAccordion.static.ts +93 -48
- package/src/components/FeatureAccordion/FeatureAccordion.tsx +83 -60
- package/src/components/FeatureAccordion/FeatureAccordionItem.tsx +21 -8
- package/src/components/FeatureAccordion/styles/mixins.scss +25 -15
- package/src/components/FeatureAccordion/styles/style.scss +8 -6
- package/src/components/FeatureAccordion/tests/{FeatureAccordion.conformance.test.js → FeatureAccordion.conformance.test.jsx} +3 -1
- package/src/components/FeatureAccordion/tests/{FeatureAccordion.unit.test.js → FeatureAccordion.unit.test.jsx} +2 -8
- package/src/components/Footer/Footer.static.ts +130 -0
- package/src/components/Footer/Footer.tsx +157 -55
- package/src/components/Footer/PlanObnovy.tsx +211 -0
- package/src/components/Footer/constants.ts +12 -1
- package/src/components/Footer/data.ts +40 -0
- package/src/components/Footer/static.ts +59 -0
- package/src/components/Footer/styles/mixins.scss +133 -18
- package/src/components/Footer/styles/style.scss +67 -2
- package/src/components/Footer/tests/{Footer.conformance.test.js → Footer.conformance.test.jsx} +5 -9
- package/src/components/Footer/tests/{Footer.unit.test.js → Footer.unit.test.jsx} +7 -7
- package/src/components/Forms/Autocomplete/Autocomplete.static.ts +215 -2
- package/src/components/Forms/Autocomplete/Autocomplete.tsx +8 -3
- package/src/components/Forms/Autocomplete/styles/config.scss +3 -3
- package/src/components/Forms/Autocomplete/styles/style.scss +95 -0
- package/src/components/Forms/Autocomplete/tests/Autocomplete.static.test.ts +187 -0
- package/src/components/Forms/Checkbox/Checkbox.tsx +1 -1
- package/src/components/Forms/Checkbox/styles/config.scss +6 -3
- package/src/components/Forms/Checkbox/styles/mixins.scss +2 -2
- package/src/components/Forms/Checkbox/styles/style.scss +13 -6
- package/src/components/Forms/DatePicker/DatePicker.tsx +1 -2
- package/src/components/Forms/DatePicker/styles/style.scss +2 -3
- package/src/components/Forms/Field/Control.tsx +52 -49
- package/src/components/Forms/Field/Description.tsx +1 -1
- package/src/components/Forms/Field/Field.tsx +4 -4
- package/src/components/Forms/Field/Label.tsx +1 -1
- package/src/components/Forms/Field/Messages.tsx +2 -2
- package/src/components/Forms/Field/styles/config.scss +8 -8
- package/src/components/Forms/Field/styles/mixins.scss +13 -10
- package/src/components/Forms/Field/styles/style.scss +4 -0
- package/src/components/Forms/Field/tests/{Autocomplete.Field.conformance.test.js → Autocomplete.Field.conformance.test.jsx} +2 -2
- package/src/components/Forms/Field/tests/{Checkbox.Field.conformance.test.js → Checkbox.Field.conformance.test.jsx} +2 -1
- package/src/components/Forms/Field/tests/{File.Field.conformance.test.js → File.Field.conformance.test.jsx} +3 -2
- package/src/components/Forms/Field/tests/Group.Field.conformance.test.jsx +72 -0
- package/src/components/Forms/Field/tests/{Radio.Field.conformance.test.js → Radio.Field.conformance.test.jsx} +2 -1
- package/src/components/Forms/Field/tests/{Rangeslider.Field.test.js → Rangeslider.Field.test.jsx} +2 -1
- package/src/components/Forms/Field/tests/{Select.Field.conformance.test.js → Select.Field.conformance.test.jsx} +2 -1
- package/src/components/Forms/Field/tests/{Text.Field.conformance.test.js → Text.Field.conformance.test.jsx} +2 -1
- package/src/components/Forms/Field/tests/{Textarea.Field.conformance.test.js → Textarea.Field.conformance.test.jsx} +2 -1
- package/src/components/Forms/Field/tests/{Tooltip.unit.test.js → Tooltip.unit.test.jsx} +1 -2
- package/src/components/Forms/Fieldset/Fieldset.tsx +1 -1
- package/src/components/Forms/Fieldset/styles/mixins.scss +3 -3
- package/src/components/Forms/File/File.tsx +5 -3
- package/src/components/Forms/File/styles/config.scss +5 -5
- package/src/components/Forms/File/styles/mixins.scss +1 -1
- package/src/components/Forms/Group/Group.tsx +23 -12
- package/src/components/Forms/Group/Item.tsx +1 -1
- package/src/components/Forms/Group/styles/config.scss +1 -1
- package/src/components/Forms/Group/styles/mixins.scss +31 -0
- package/src/components/Forms/Group/tests/{Group.unit.test.js → Group.unit.test.jsx} +9 -0
- package/src/components/Forms/Hint/Hint.tsx +1 -1
- package/src/components/Forms/Hint/styles/config.scss +1 -1
- package/src/components/Forms/Hint/styles/mixins.scss +2 -2
- package/src/components/Forms/InputStepper/InputStepper.tsx +6 -5
- package/src/components/Forms/InputStepper/styles/style.scss +56 -110
- package/src/components/Forms/InputStepper/tests/{InputStepper.unit.test.js → InputStepper.unit.test.jsx} +8 -0
- package/src/components/Forms/Label/Label.tsx +1 -1
- package/src/components/Forms/Label/styles/config.scss +3 -0
- package/src/components/Forms/Label/styles/mixins.scss +2 -2
- package/src/components/Forms/Message/Message.tsx +9 -5
- package/src/components/Forms/Message/styles/config.scss +2 -1
- package/src/components/Forms/Radio/Radio.tsx +1 -1
- package/src/components/Forms/Radio/styles/config.scss +6 -3
- package/src/components/Forms/Radio/styles/mixins.scss +2 -2
- package/src/components/Forms/RangeSlider/RangeSlider.tsx +4 -1
- package/src/components/Forms/RangeSlider/styles/mixins.scss +1 -1
- package/src/components/Forms/Select/Select.tsx +1 -1
- package/src/components/Forms/Select/styles/mixins.scss +6 -6
- package/src/components/Forms/TextArea/TextArea.tsx +1 -1
- package/src/components/Forms/TextArea/styles/config.scss +1 -0
- package/src/components/Forms/TextArea/styles/mixins.scss +17 -10
- package/src/components/Forms/TextInput/TextInput.tsx +27 -2
- package/src/components/Forms/TextInput/styles/config.scss +4 -2
- package/src/components/Forms/TextInput/styles/mixins.scss +17 -11
- package/src/components/Forms/TextInput/styles/style.scss +67 -0
- package/src/components/Forms/index.ts +1 -1
- package/src/components/Forms/styles/config.scss +13 -10
- package/src/components/Gauge/Gauge.tsx +1 -1
- package/src/components/Gauge/GaugeMaker.tsx +5 -5
- package/src/components/Gauge/styles/style.scss +1 -1
- package/src/components/Gauge/tests/{Gauge.unit.test.js → Gauge.unit.test.jsx} +0 -1
- package/src/components/Grid/Grid.tsx +13 -4
- package/src/components/Grid/GridCol.tsx +21 -10
- package/src/components/Grid/styles/config.scss +7 -3
- package/src/components/Grid/styles/mixins.scss +63 -19
- package/src/components/Grid/styles/style.scss +15 -5
- package/src/components/Grid/tests/{Grid.unit.test.js → Grid.unit.test.jsx} +46 -6
- package/src/components/Grid/tests/{GridCol.unit.test.js → GridCol.unit.test.jsx} +1 -2
- package/src/components/Hero/Hero.tsx +3 -17
- package/src/components/Hero/styles/config.scss +0 -1
- package/src/components/Hero/styles/style.scss +0 -14
- package/src/components/Hero/tests/{Hero.conformance.test.js → Hero.conformance.test.jsx} +1 -2
- package/src/components/Hero/tests/Hero.unit.test.jsx +261 -0
- package/src/components/Hero/tests/data.js +26 -26
- package/src/components/Icon/Icon.tsx +1 -1
- package/src/components/Icon/IconSearch.jsx +15 -46
- package/src/components/Icon/PictogramSearch.jsx +123 -0
- package/src/components/Icon/PictogramSearchWrapper.tsx +31 -0
- package/src/components/Icon/SpritePathContext.tsx +1 -1
- package/src/components/Icon/iconSearchTags.ts +181 -173
- package/src/components/Icon/iconUtils.js +63 -0
- package/src/components/Icon/index.ts +1 -1
- package/src/components/Icon/styles/export/size.scss +2 -2
- package/src/components/Icon/styles/mixins.scss +3 -3
- package/src/components/Icon/styles/style.scss +43 -1
- package/src/components/Icon/tests/{Icon.conformance.test.js → Icon.conformance.test.jsx} +1 -2
- package/src/components/Icon/tests/{Icon.unit.test.js → Icon.unit.test.jsx} +2 -4
- package/src/components/Icon/tests/{Pictogram.unit.test.js → Pictogram.unit.test.jsx} +40 -21
- package/src/components/IconList/IconList.tsx +1 -1
- package/src/components/IconList/Item.tsx +15 -11
- package/src/components/IconList/styles/config.scss +2 -2
- package/src/components/IconList/styles/mixins.scss +5 -5
- package/src/components/IconList/styles/style.scss +1 -1
- package/src/components/IconList/tests/{IconList.conformance.test.js → IconList.conformance.test.jsx} +2 -3
- package/src/components/IconList/tests/IconList.unit.test.jsx +82 -0
- package/src/components/IconList/tests/{Item.unit.test.js → Item.unit.test.jsx} +1 -1
- package/src/components/Image/Image.tsx +1 -1
- package/src/components/Image/styles/mixins.scss +2 -2
- package/src/components/Image/tests/{Image.conformance.test.js → Image.conformance.test.jsx} +1 -1
- package/src/components/Image/tests/{Image.unit.test.js → Image.unit.test.jsx} +12 -4
- package/src/components/Link/Link.tsx +5 -6
- package/src/components/Link/styles/mixins.scss +8 -4
- package/src/components/Link/tests/{Link.conformance.test.js → Link.conformance.test.jsx} +3 -9
- package/src/components/Link/tests/{Link.unit.test.js → Link.unit.test.jsx} +6 -26
- package/src/components/List/ClickableControl.tsx +12 -12
- package/src/components/List/List.tsx +13 -13
- package/src/components/List/ListItem.tsx +11 -11
- package/src/components/List/styles/config.scss +12 -12
- package/src/components/List/styles/mixins.scss +16 -9
- package/src/components/List/tests/{ClickableControl.unit.test.js → ClickableControl.unit.test.jsx} +0 -1
- package/src/components/List/tests/{List.conformance.test.js → List.conformance.test.jsx} +16 -17
- package/src/components/List/tests/ListItem.unit.test.jsx +103 -0
- package/src/components/Loader/Loader.tsx +3 -11
- package/src/components/Loader/LoaderFullscreen.tsx +32 -0
- package/src/components/Loader/index.ts +1 -0
- package/src/components/Loader/styles/config.scss +5 -5
- package/src/components/Loader/styles/mixins.scss +25 -1
- package/src/components/Loader/styles/style.scss +13 -4
- package/src/components/Loader/tests/{Loader.conformance.test.js → Loader.conformance.test.jsx} +1 -1
- package/src/components/Loader/tests/LoaderFullscreen.conformance.test.jsx +21 -0
- package/src/components/Loader/tests/LoaderFullscreen.unit.test.jsx +41 -0
- package/src/components/Loader/tests/test.scss +1 -1
- package/src/components/Megamenu/BrandMark.tsx +15 -0
- package/src/components/Megamenu/Logo.tsx +13 -0
- package/src/components/Megamenu/LogoJeTu.tsx +60 -0
- package/src/components/Megamenu/MegaMenuIcon.tsx +1 -1
- package/src/components/Megamenu/Megamenu.static.ts +294 -98
- package/src/components/Megamenu/Megamenu.tsx +408 -594
- package/src/components/Megamenu/MegamenuBlog.tsx +211 -95
- package/src/components/Megamenu/MegamenuSearchContent.tsx +82 -0
- package/src/components/Megamenu/MyOrangeMobilePanel.tsx +126 -0
- package/src/components/Megamenu/constants.ts +21 -0
- package/src/components/Megamenu/data.ts +231 -0
- package/src/components/Megamenu/ids.ts +35 -0
- package/src/components/Megamenu/index.ts +1 -1
- package/src/components/Megamenu/static.ts +7 -13
- package/src/components/Megamenu/styles/mixins.scss +430 -65
- package/src/components/Megamenu/styles/style.scss +74 -0
- package/src/components/Megamenu/tests/Megamenu.unit.test.jsx +41 -0
- package/src/components/Modal/Modal.static.ts +77 -56
- package/src/components/Modal/Modal.tsx +38 -29
- package/src/components/Modal/ModalBody.tsx +27 -15
- package/src/components/Modal/ModalCloseButton.tsx +1 -1
- package/src/components/Modal/ModalProductFooter.tsx +1 -1
- package/src/components/Modal/ModalProductHeader.tsx +7 -3
- package/src/components/Modal/index.ts +2 -3
- package/src/components/Modal/styles/config.scss +4 -4
- package/src/components/Modal/styles/mixins.scss +22 -57
- package/src/components/Modal/styles/style.scss +1 -16
- package/src/components/Modal/tests/{Modal.conformance.test.js → Modal.conformance.test.jsx} +3 -4
- package/src/components/Modal/tests/{Modal.unit.test.js → Modal.unit.test.jsx} +0 -60
- package/src/components/Modal/tests/{ModalBody.unit.test.js → ModalBody.unit.test.jsx} +21 -12
- package/src/components/Modal/tests/{ModalProductHeader.unit.test.js → ModalProductHeader.unit.test.jsx} +12 -1
- package/src/components/Modal/tests/{ModalTitle.unit.test.js → ModalTitle.unit.test.jsx} +0 -1
- package/src/components/Pagination/Pagination.tsx +3 -14
- package/src/components/Pagination/PaginationItem.tsx +1 -1
- package/src/components/Pagination/Separator.tsx +1 -1
- package/src/components/Pagination/helpers.ts +6 -1
- package/src/components/Pagination/styles/mixins.scss +9 -7
- package/src/components/Pagination/styles/style.scss +0 -4
- package/src/components/Pagination/tests/Item.unit.test.jsx +95 -0
- package/src/components/Pagination/tests/{Pagination.conformance.test.js → Pagination.conformance.test.jsx} +7 -8
- package/src/components/Pagination/tests/Pagination.unit.test.jsx +107 -0
- package/src/components/Pagination/tests/Separator.unit.test.jsx +24 -0
- package/src/components/Pill/Pill.tsx +14 -7
- package/src/components/Pill/styles/config.scss +2 -17
- package/src/components/Pill/styles/style.scss +18 -6
- package/src/components/Pill/tests/{Pill.conformance.test.js → Pill.conformance.test.jsx} +9 -7
- package/src/components/Pill/tests/Pill.unit.test.jsx +148 -0
- package/src/components/Preview/CodeExample.tsx +72 -34
- package/src/components/Preview/Preview.tsx +28 -14
- package/src/components/Preview/PreviewGenerator.tsx +396 -65
- package/src/components/Preview/PreviewTitleBar.tsx +1 -1
- package/src/components/Preview/getElementDisplayName.ts +25 -0
- package/src/components/Preview/index.tsx +1 -1
- package/src/components/Preview/styles/style.scss +51 -1
- package/src/components/Progress/Progress.tsx +2 -14
- package/src/components/Progress/index.ts +1 -1
- package/src/components/Progress/styles/config.scss +4 -4
- package/src/components/Progress/styles/mixins.scss +9 -7
- package/src/components/Progress/tests/{Progress.conformance.test.js → Progress.conformance.test.jsx} +6 -7
- package/src/components/Progress/tests/Progress.unit.test.jsx +111 -0
- package/src/components/PromoBanner/PromoBanner.tsx +80 -40
- package/src/components/PromoBanner/styles/mixins.scss +62 -16
- package/src/components/PromoBanner/styles/style.scss +47 -6
- package/src/components/PromoBanner/tests/PromoBanner.conformance.test.jsx +784 -0
- package/src/components/PromoBanner/tests/PromoBanner.unit.test.jsx +596 -0
- package/src/components/PromotionCard/PromotionCard.tsx +12 -13
- package/src/components/PromotionCard/PromotionCardContent.tsx +8 -8
- package/src/components/PromotionCard/PromotionCardImageWrapper.tsx +7 -9
- package/src/components/PromotionCard/PromotionCardSection.tsx +1 -1
- package/src/components/PromotionCard/PromotionCardTitle.tsx +11 -11
- package/src/components/PromotionCard/constants.ts +2 -2
- package/src/components/PromotionCard/styles/config.scss +2 -4
- package/src/components/PromotionCard/styles/mixins.scss +4 -2
- package/src/components/PromotionCard/tests/PromotionCard.conformance.test.jsx +565 -0
- package/src/components/PromotionCard/tests/PromotionCard.unit.test.jsx +437 -0
- package/src/components/Section/Section.tsx +21 -11
- package/src/components/Section/styles/mixins.scss +38 -13
- package/src/components/Section/styles/style.scss +1 -0
- package/src/components/Section/tests/{Section.conformance.test.js → Section.conformance.test.jsx} +27 -17
- package/src/components/Section/tests/{Section.unit.test.js → Section.unit.test.jsx} +54 -34
- package/src/components/Skeleton/Skeleton.tsx +1 -1
- package/src/components/Skeleton/styles/mixins.scss +3 -3
- package/src/components/Skeleton/tests/{Skeleton.conformance.test.js → Skeleton.conformance.test.jsx} +1 -1
- package/src/components/SkipLink/SkipLink.tsx +1 -1
- package/src/components/SkipLink/tests/{SkipLink.unit.test.js → SkipLink.unit.test.jsx} +1 -5
- package/src/components/SocialButton/SocialButton.tsx +67 -0
- package/src/components/SocialButton/index.ts +1 -0
- package/src/components/SocialButton/styles/config.scss +172 -0
- package/src/components/SocialButton/styles/mixins.scss +42 -0
- package/src/components/SocialButton/styles/style.scss +16 -0
- package/src/components/SocialButton/tests/SocialButton.unit.test.jsx +162 -0
- package/src/components/Stepbar/Stepbar.tsx +1 -6
- package/src/components/Stepbar/styles/config.scss +34 -17
- package/src/components/Stepbar/styles/mixins.scss +6 -4
- package/src/components/Stepbar/styles/style.scss +4 -2
- package/src/components/Stepbar/tests/{Stepbar.conformance.test.js → Stepbar.conformance.test.jsx} +1 -1
- package/src/components/Sticker/Sticker.tsx +14 -8
- package/src/components/Sticker/index.ts +1 -0
- package/src/components/Sticker/styles/mixins.scss +2 -2
- package/src/components/Sticker/tests/Sticker.conformance.test.jsx +16 -0
- package/src/components/Sticker/tests/Sticker.unit.test.jsx +39 -0
- package/src/components/Table/Header.tsx +1 -2
- package/src/components/Table/Row.tsx +10 -5
- package/src/components/Table/Rows.tsx +1 -2
- package/src/components/Table/Table.tsx +15 -11
- package/src/components/Table/TableContext.ts +1 -0
- package/src/components/Table/docsData.ts +25 -1
- package/src/components/Table/index.ts +1 -1
- package/src/components/Table/styles/mixins.scss +51 -11
- package/src/components/Table/styles/style.scss +6 -4
- package/src/components/Table/tests/{Footer.unit.test.js → Footer.unit.test.jsx} +1 -2
- package/src/components/Table/tests/{Header.unit.test.js → Header.unit.test.jsx} +1 -2
- package/src/components/Table/tests/{Row.unit.test.js → Row.unit.test.jsx} +1 -2
- package/src/components/Table/tests/{Rows.unit.test.js → Rows.unit.test.jsx} +1 -2
- package/src/components/Table/tests/{Table.conformance.test.js → Table.conformance.test.jsx} +11 -7
- package/src/components/Table/tests/{Table.unit.test.js → Table.unit.test.jsx} +1 -32
- package/src/components/Table/types.ts +1 -0
- package/src/components/Tabs/Tabs.static.ts +157 -30
- package/src/components/Tabs/Tabs.tsx +64 -74
- package/src/components/Tabs/index.ts +2 -2
- package/src/components/Tabs/styles/config.scss +18 -25
- package/src/components/Tabs/styles/mixins.scss +94 -29
- package/src/components/Tabs/styles/style.scss +4 -15
- package/src/components/Tabs/tests/{Tabs.unit.test.js → Tabs.unit.test.jsx} +112 -10
- package/src/components/Tag/Tag.tsx +1 -5
- package/src/components/Tag/TagButton.tsx +1 -1
- package/src/components/Tag/index.ts +1 -1
- package/src/components/Tag/styles/config.scss +31 -31
- package/src/components/Tag/styles/mixins.scss +3 -2
- package/src/components/Tag/styles/style.scss +55 -0
- package/src/components/Tag/tests/{Tag.conformance.test.js → Tag.conformance.test.jsx} +2 -3
- package/src/components/Tag/tests/{Tag.unit.test.js → Tag.unit.test.jsx} +5 -7
- package/src/components/Tag/tests/{TagButton.conformance.test.js → TagButton.conformance.test.jsx} +1 -1
- package/src/components/Tag/tests/{TagButton.unit.test.js → TagButton.unit.test.jsx} +4 -3
- package/src/components/Testimonial/Testimonial.tsx +15 -15
- package/src/components/Testimonial/styles/config.scss +25 -22
- package/src/components/Testimonial/styles/mixins.scss +36 -32
- package/src/components/Testimonial/tests/Testimonial.conformance.test.jsx +16 -0
- package/src/components/Testimonial/tests/Testimonial.unit.test.jsx +43 -0
- package/src/components/Tile/Tile.tsx +19 -36
- package/src/components/Tile/styles/mixins.scss +57 -44
- package/src/components/Tile/styles/style.scss +5 -33
- package/src/components/Tile/tests/{Tile.conformance.test.js → Tile.conformance.test.jsx} +1 -1
- package/src/components/Tile/tests/Tile.unit.test.jsx +64 -0
- package/src/components/Tooltip/InfoTooltip.tsx +2 -6
- package/src/components/Tooltip/Tooltip.static.ts +100 -66
- package/src/components/Tooltip/Tooltip.tsx +3 -13
- package/src/components/Tooltip/index.ts +1 -1
- package/src/components/Tooltip/styles/mixins.scss +14 -13
- package/src/components/Tooltip/tests/{Tooltip.conformance.test.js → Tooltip.conformance.test.jsx} +6 -2
- package/src/components/Tooltip/tests/{Tooltip.unit.test.js → Tooltip.unit.test.jsx} +41 -57
- package/src/components/index.ts +48 -37
- package/src/styles/base/globals-forms.scss +8 -0
- package/src/styles/base/globals.scss +68 -30
- package/src/styles/base/styleguide.scss +23 -18
- package/src/styles/export/base.js +2 -2
- package/src/styles/export/breakpoint.scss +1 -1
- package/src/styles/export/breakpoint.ts +7 -7
- package/src/styles/export/color.js +102 -20
- package/src/styles/export/color.scss +10 -20
- package/src/styles/export/space.scss +1 -1
- package/src/styles/shame.scss +16 -3
- package/src/styles/tokens/base.scss +1 -1
- package/src/styles/tokens/breakpoint.scss +64 -49
- package/src/styles/tokens/color-vars.scss +37 -0
- package/src/styles/tokens/color.scss +14 -14
- package/src/styles/tokens/space.scss +9 -9
- package/src/styles/tokens/tag-colors.scss +20 -0
- package/src/styles/tools/convert.scss +8 -0
- package/src/styles/tools/generate.scss +6 -6
- package/src/styles/tools/layout.scss +3 -3
- package/src/styles/tools/map.scss +2 -2
- package/src/styles/tools/text.scss +1 -1
- package/src/styles/typography/config.scss +102 -30
- package/src/styles/typography/mixins.scss +29 -17
- package/src/styles/typography/style.scss +19 -3
- package/src/styles/utilities/border.scss +1 -1
- package/src/styles/utilities/color.scss +45 -128
- package/src/styles/utilities/horizontal-scroll.scss +34 -12
- package/src/styles/utilities/index.scss +7 -6
- package/src/styles/utilities/layout.scss +18 -0
- package/src/styles/utilities/ordering.scss +44 -0
- package/src/styles/utilities/text.scss +43 -2
- package/src/styles/utilities/visibility.scss +2 -4
- package/build/components/index.css +0 -2
- package/build/components/index.css.map +0 -1
- package/build/components/types/src/components/Hero/HeroPlayground.d.ts +0 -2
- package/build/components/types/src/components/Modal/ModalProductBody.d.ts +0 -10
- package/build/lib/after-components.css +0 -2
- package/build/lib/after-components.css.map +0 -1
- package/build/lib/before-components.css +0 -3
- package/build/lib/before-components.css.map +0 -1
- package/build/lib/scripts.css +0 -2
- package/build/lib/scripts.css.map +0 -1
- package/src/components/Accordion/Accordion.mdx +0 -240
- package/src/components/Alert/Alert.mdx +0 -141
- package/src/components/AnchorNavigation/tests/AnchorNavigation.unit.test.js +0 -163
- package/src/components/Bar/Bar.mdx +0 -203
- package/src/components/BlockAction/BlockAction.mdx +0 -244
- package/src/components/BodyBanner/BodyBanner.mdx +0 -268
- package/src/components/Breadcrumbs/Breadcrumbs.mdx +0 -84
- package/src/components/Button/Button.mdx +0 -273
- package/src/components/Buttons/Buttons.mdx +0 -39
- package/src/components/Card/Card.mdx +0 -334
- package/src/components/Card/tests/Card.unit.test.js +0 -42
- package/src/components/Carousel/Carousel.mdx +0 -159
- package/src/components/CarouselPromotions/CarouselPromotions.mdx +0 -246
- package/src/components/CartTable/CartTable.mdx +0 -129
- package/src/components/Container/Container.mdx +0 -73
- package/src/components/Controls/Controls.mdx +0 -469
- package/src/components/Cover/Cover.mdx +0 -87
- package/src/components/Cover/tests/Cover.conformance.test.js +0 -28
- package/src/components/Cover/tests/Cover.unit.test.js +0 -116
- package/src/components/Divider/Divider.mdx +0 -65
- package/src/components/Dropdown/Dropdown.mdx +0 -260
- package/src/components/Expander/Expander.mdx +0 -153
- package/src/components/Expander/tests/Expander.unit.test.js +0 -124
- package/src/components/FeatureAccordion/FeatureAccordion.mdx +0 -33
- package/src/components/Forms/Autocomplete/Autocomplete.mdx +0 -198
- package/src/components/Forms/Checkbox/Checkbox.mdx +0 -139
- package/src/components/Forms/DatePicker/DatePicker.mdx +0 -149
- package/src/components/Forms/Field/Field.mdx +0 -383
- package/src/components/Forms/Field/tests/Group.Field.conformance.test.js +0 -47
- package/src/components/Forms/Fieldset/Fieldset.mdx +0 -178
- package/src/components/Forms/File/File.mdx +0 -88
- package/src/components/Forms/FormTooltip.mdx +0 -51
- package/src/components/Forms/Forms.mdx +0 -48
- package/src/components/Forms/Group/Group.mdx +0 -146
- package/src/components/Forms/Hint/Hint.mdx +0 -40
- package/src/components/Forms/InputStepper/InputStepper.mdx +0 -147
- package/src/components/Forms/Label/Label.mdx +0 -95
- package/src/components/Forms/Message/Message.mdx +0 -40
- package/src/components/Forms/Radio/Radio.mdx +0 -98
- package/src/components/Forms/RangeSlider/RangeSlider.mdx +0 -304
- package/src/components/Forms/Select/Select.mdx +0 -106
- package/src/components/Forms/TextArea/TextArea.mdx +0 -109
- package/src/components/Forms/TextInput/TextInput.mdx +0 -153
- package/src/components/Gauge/Gauge.mdx +0 -35
- package/src/components/Grid/Grid.mdx +0 -320
- package/src/components/Hero/Hero.mdx +0 -168
- package/src/components/Hero/HeroPlayground.tsx +0 -369
- package/src/components/Hero/tests/Hero.unit.test.js +0 -272
- package/src/components/Icon/Icon.mdx +0 -172
- package/src/components/IconList/IconList.mdx +0 -53
- package/src/components/IconList/tests/IconList.unit.test.js +0 -79
- package/src/components/Image/Image.mdx +0 -175
- package/src/components/Link/Link.mdx +0 -238
- package/src/components/List/List.mdx +0 -216
- package/src/components/List/tests/ListItem.unit.test.js +0 -104
- package/src/components/Loader/Loader.mdx +0 -148
- package/src/components/Modal/Modal.mdx +0 -565
- package/src/components/Modal/ModalProductBody.tsx +0 -52
- package/src/components/Pagination/Pagination.mdx +0 -45
- package/src/components/Pagination/tests/Item.unit.test.js +0 -96
- package/src/components/Pagination/tests/Pagination.unit.test.js +0 -108
- package/src/components/Pagination/tests/Separator.unit.test.js +0 -25
- package/src/components/Pagination/tests/utils.js +0 -12
- package/src/components/Pill/Pill.mdx +0 -41
- package/src/components/Pill/tests/Pill.unit.test.js +0 -108
- package/src/components/Progress/Progress.mdx +0 -119
- package/src/components/Progress/tests/Progress.unit.test.js +0 -108
- package/src/components/PromotionCard/PromotionCard.mdx +0 -191
- package/src/components/Section/Section.mdx +0 -397
- package/src/components/Skeleton/Skeleton.mdx +0 -90
- package/src/components/SkipLink/SkipLink.mdx +0 -23
- package/src/components/Stepbar/Stepbar.mdx +0 -137
- package/src/components/Sticker/Sticker.mdx +0 -50
- package/src/components/Sticker/tests/Sticker.conformance.test.js +0 -17
- package/src/components/Sticker/tests/Sticker.unit.test.js +0 -42
- package/src/components/Table/Table.mdx +0 -199
- package/src/components/Tabs/Tabs.mdx +0 -373
- package/src/components/Tag/Tag.mdx +0 -52
- package/src/components/Testimonial/Testimonial.mdx +0 -41
- package/src/components/Testimonial/tests/Testimonial.conformance.test.js +0 -17
- package/src/components/Testimonial/tests/Testimonial.unit.test.js +0 -44
- package/src/components/Tile/CHANGELOG.md +0 -14
- package/src/components/Tile/Tile.mdx +0 -163
- package/src/components/Tile/styles/config.scss +0 -18
- package/src/components/Tile/tests/Tile.unit.test.js +0 -126
- package/src/components/Tooltip/Tooltip.mdx +0 -227
- package/src/styles/after-components.scss +0 -2
- package/src/styles/before-components.scss +0 -18
- /package/build/lib/{after-components.js → base.js} +0 -0
- /package/build/lib/{before-components.js → utilities.js} +0 -0
- /package/src/components/Bar/tests/{Bar.unit.test.js → Bar.unit.test.jsx} +0 -0
- /package/src/components/Bar/tests/{BarBreak.unit.test.js → BarBreak.unit.test.jsx} +0 -0
- /package/src/components/Bar/tests/{BarItem.unit.test.js → BarItem.unit.test.jsx} +0 -0
- /package/src/components/BlockAction/tests/{BlockAction.unit.test.js → BlockAction.unit.test.jsx} +0 -0
- /package/src/components/BlockAction/tests/{BlockActionIndicator.unit.test.js → BlockActionIndicator.unit.test.jsx} +0 -0
- /package/src/components/BlockAction/tests/{CloneElementWithClassName.unit.test.js → CloneElementWithClassName.unit.test.jsx} +0 -0
- /package/src/components/Buttons/tests/{Buttons.unit.test.js → Buttons.unit.test.jsx} +0 -0
- /package/src/components/Carousel/tests/{CarouselItem.unit.test.js → CarouselItem.unit.test.jsx} +0 -0
- /package/src/components/CarouselPromotions/tests/{CarouselPromotionsItem.unit.test.js → CarouselPromotionsItem.unit.test.jsx} +0 -0
- /package/src/components/Forms/Checkbox/tests/{Checkbox.unit.test.js → Checkbox.unit.test.jsx} +0 -0
- /package/src/components/Forms/DatePicker/tests/{DatePicker.unit.test.js → DatePicker.unit.test.jsx} +0 -0
- /package/src/components/Forms/Field/tests/{Field.unit.test.js → Field.unit.test.jsx} +0 -0
- /package/src/components/Forms/Field/tests/{Label.unit.test.js → Label.unit.test.jsx} +0 -0
- /package/src/components/Forms/Field/tests/{Messages.unit.test.js → Messages.unit.test.jsx} +0 -0
- /package/src/components/Forms/Fieldset/tests/{Fieldset.unit.test.js → Fieldset.unit.test.jsx} +0 -0
- /package/src/components/Forms/Group/tests/{Item.unit.test.js → Item.unit.test.jsx} +0 -0
- /package/src/components/Forms/Hint/tests/{Hint.unit.test.js → Hint.unit.test.jsx} +0 -0
- /package/src/components/Forms/Label/tests/{Label.unit.test.js → Label.unit.test.jsx} +0 -0
- /package/src/components/Forms/Message/tests/{Message.unit.test.js → Message.unit.test.jsx} +0 -0
- /package/src/components/Forms/Radio/tests/{Radio.unit.test.js → Radio.unit.test.jsx} +0 -0
- /package/src/components/Forms/Select/tests/{Select.unit.test.js → Select.unit.test.jsx} +0 -0
- /package/src/components/Forms/TextArea/tests/{TextArea.unit.test.js → TextArea.unit.test.jsx} +0 -0
- /package/src/components/Forms/TextInput/tests/{TextInput.unit.test.js → TextInput.unit.test.jsx} +0 -0
- /package/src/components/Gauge/tests/{Gauge.conformance.test.js → Gauge.conformance.test.jsx} +0 -0
- /package/src/components/List/tests/{List.unit.test.js → List.unit.test.jsx} +0 -0
- /package/src/components/Loader/tests/{Loader.unit.test.js → Loader.unit.test.jsx} +0 -0
- /package/src/components/Modal/tests/{ModalCloseButton.unit.test.js → ModalCloseButton.unit.test.jsx} +0 -0
- /package/src/components/Skeleton/tests/{Skeleton.unit.test.js → Skeleton.unit.test.jsx} +0 -0
- /package/src/components/Stepbar/tests/{Stepbar.unit.test.js → Stepbar.unit.test.jsx} +0 -0
- /package/src/components/Table/tests/{Cell.unit.test.js → Cell.unit.test.jsx} +0 -0
- /package/src/components/Tabs/tests/{Tab.unit.test.js → Tab.unit.test.jsx} +0 -0
- /package/src/components/Tabs/tests/{TabPanel.unit.test.js → TabPanel.unit.test.jsx} +0 -0
- /package/src/components/Tooltip/tests/{InfoTooltip.unit.test.js → InfoTooltip.unit.test.jsx} +0 -0
package/build/lib/megamenu.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function t(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,i(o.key),o)}}function n(t){return function(t){if(Array.isArray(t))return e(t)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(t,n){if(t){if("string"==typeof t)return e(t,n);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?e(t,n):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t);if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}var s,r="megamenu",a="".concat(r,"__nav-button"),l="".concat(r,"__nav-dropdown"),c="".concat(r,"__overlay"),u="".concat(r,"--hide-lg-up"),d="".concat(r,"__mobile"),h="".concat(r,"__mobile-overlay"),f="".concat(r,"__accordion-button"),v="".concat(r,"__accordion-icon"),m={dataToggle:"data-toggle",activeClass:"is-active",removeOnDestroy:!1},y=function(){return e=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t.ODS_Megamenu?t.ODS_Megamenu:(this.element=t,this.config=Object.assign(Object.assign({},m),n),this.handleToggleClick=this.handleToggleClick.bind(this),this.handleKeyPress=this.handleKeyPress.bind(this),this.handleScroll=this.handleScroll.bind(this),this.handleAccordionClick=this.handleAccordionClick.bind(this),this.handleArrowNavigation=this.handleArrowNavigation.bind(this),this.trapFocus=this.trapFocus.bind(this),this.element.ODS_Megamenu=this,this.init(),this)},n=[{key:"init",value:function(){var e=this;this.toggleButtons=this.element.querySelectorAll(".".concat(a,"[aria-controls]")),this.dropdowns=this.element.querySelectorAll(".".concat(l)),this.mobileMenuButton=this.element.querySelector(".".concat(u," button")),this.mobileMenu=this.element.querySelector(".".concat(d)),this.mobileOverlay=this.element.querySelector(".".concat(h)),this.mobileCloseButton=this.element.querySelector("[data-megamenu-close-button]"),this.desktopOverlay=this.element.querySelector(".".concat(c)),this.accordionButtons=this.element.querySelectorAll(".".concat(f)),this.toggleButtons.forEach(function(t){t.addEventListener("click",e.handleToggleClick)}),this.mobileMenuButton&&this.mobileMenuButton.addEventListener("click",this.handleMobileMenuToggle.bind(this)),this.mobileOverlay&&this.mobileOverlay.addEventListener("click",this.closeMobileMenu.bind(this)),this.mobileCloseButton&&this.mobileCloseButton.addEventListener("click",this.closeMobileMenu.bind(this)),this.desktopOverlay&&this.desktopOverlay.addEventListener("click",this.closeAllDropdowns.bind(this)),this.accordionButtons.forEach(function(t){t.addEventListener("click",e.handleAccordionClick)}),this.element.addEventListener("keydown",this.handleKeyPress),window.addEventListener("scroll",this.handleScroll),this.isKeyboardUser=!1,this.keydownHandler=function(t){"Tab"!==t.key&&" "!==t.key&&"Enter"!==t.key||(e.isKeyboardUser=!0)},this.mousedownHandler=function(){e.isKeyboardUser=!1},this.touchstartHandler=function(){e.isKeyboardUser=!1},this.element.addEventListener("keydown",this.keydownHandler),this.element.addEventListener("mousedown",this.mousedownHandler),this.element.addEventListener("touchstart",this.touchstartHandler),this.updateTabIndices()}},{key:"handleToggleClick",value:function(e){var t=e.currentTarget,n=t.classList.contains(this.config.activeClass);this.closeAllDropdowns(),n?t.focus():this.openDropdown(t)}},{key:"handleKeyPress",value:function(e){var t,n,i;if("Escape"===e.key){var o=Array.from(this.toggleButtons).find(function(e){return"true"===e.getAttribute("aria-expanded")});this.closeAllDropdowns(),this.closeMobileMenu(),this.closeAllAccordions(),o&&o.focus()}if("Enter"===e.key||" "===e.key){var s=e.target;("BUTTON"===s.tagName&&s.hasAttribute("aria-controls")||s.classList.contains(f))&&(e.preventDefault(),s.click())}if("Home"===e.key||"End"===e.key){var r=null===(t=e.target)||void 0===t?void 0:t.closest(".".concat(l));if(r){e.preventDefault();var a=Array.from(r.querySelectorAll('a, button, [tabindex]:not([tabindex="-1"])'));"Home"===e.key&&a.length>0?a[0].focus():"End"===e.key&&a.length>0&&a[a.length-1].focus()}}if("ArrowDown"===e.key){var c=e.target;if("BUTTON"===c.tagName&&c.hasAttribute("aria-controls")){if("true"===c.getAttribute("aria-expanded")){e.preventDefault();var u=null===(n=c.parentElement)||void 0===n?void 0:n.querySelector(".".concat(l)),d=null==u?void 0:u.querySelector("a, button");d&&d.focus()}}else{var h=c.closest(".".concat(l));h&&(e.preventDefault(),this.handleArrowNavigation(e,h))}}if("ArrowUp"===e.key){var v=null===(i=e.target)||void 0===i?void 0:i.closest(".".concat(l));v&&(e.preventDefault(),this.handleArrowNavigation(e,v))}}},{key:"handleAccordionClick",value:function(e){var t=e.currentTarget,n="true"===t.getAttribute("aria-expanded");this.closeAllAccordions(),n||this.openAccordion(t)}},{key:"handleScroll",value:function(){var e=this.element.querySelector('[data-hide-when-sticky="true"]');e&&(window.scrollY>15?(e.classList.add("is-hidden"),this.element.classList.add("top-hidden")):(e.classList.remove("is-hidden"),this.element.classList.remove("top-hidden")))}},{key:"openDropdown",value:function(e){var t,n=null===(t=e.parentElement)||void 0===t?void 0:t.querySelector(".".concat(l));n&&(e.classList.add(this.config.activeClass),e.setAttribute("aria-expanded","true"),n.style.display="block",n.classList.add("is-visible"),this.showDesktopOverlay(),this.updateTabIndices())}},{key:"closeDropdown",value:function(e){var t,n=null===(t=e.parentElement)||void 0===t?void 0:t.querySelector(".".concat(l));n&&(e.classList.remove(this.config.activeClass),e.setAttribute("aria-expanded","false"),n.classList.remove("is-visible"),n.style.display="none",this.updateTabIndices())}},{key:"closeAllDropdowns",value:function(){var e=this;this.toggleButtons.forEach(function(t){e.closeDropdown(t)}),this.hideDesktopOverlay()}},{key:"handleMobileMenuToggle",value:function(e){var t;e.preventDefault(),(null===(t=this.mobileMenu)||void 0===t?void 0:t.classList.contains(this.config.activeClass))?this.closeMobileMenu():this.openMobileMenu()}},{key:"openMobileMenu",value:function(){if(this.mobileMenu&&(this.lastFocusedElement=document.activeElement,this.mobileMenu.classList.add(this.config.activeClass),document.body.style.overflow="hidden",this.trapFocus(this.mobileMenu),this.isKeyboardUser)){var e=this.mobileMenu.querySelector("button, a");e&&setTimeout(function(){return e.focus()},50)}}},{key:"closeMobileMenu",value:function(){this.mobileMenu&&(this.mobileMenu.classList.remove(this.config.activeClass),document.body.style.overflow="",this.closeAllAccordions(),this.removeFocusTrap(),this.isKeyboardUser&&this.lastFocusedElement&&this.lastFocusedElement.focus(),this.lastFocusedElement=null)}},{key:"showDesktopOverlay",value:function(){this.desktopOverlay&&this.desktopOverlay.classList.add(this.config.activeClass)}},{key:"hideDesktopOverlay",value:function(){this.desktopOverlay&&this.desktopOverlay.classList.remove(this.config.activeClass)}},{key:"openAccordion",value:function(e){var t=e.getAttribute("aria-controls"),n=t?this.element.querySelector("#".concat(t)):null,i=e.querySelector(".".concat(v));n&&(e.setAttribute("aria-expanded","true"),e.classList.add(this.config.activeClass),n.classList.add("is-visible"),n.style.display="block",i&&i.classList.add(this.config.activeClass))}},{key:"closeAccordion",value:function(e){var t=e.getAttribute("aria-controls"),n=t?this.element.querySelector("#".concat(t)):null,i=e.querySelector(".".concat(v));n&&(e.setAttribute("aria-expanded","false"),e.classList.remove(this.config.activeClass),n.classList.remove("is-visible"),n.style.display="none",i&&i.classList.remove(this.config.activeClass))}},{key:"closeAllAccordions",value:function(){var e=this;this.accordionButtons.forEach(function(t){e.closeAccordion(t)})}},{key:"handleArrowNavigation",value:function(e,t){var n=Array.from(t.querySelectorAll('a, button, [tabindex]:not([tabindex="-1"])'));if(0!==n.length){var i,o=n.findIndex(function(t){return t===e.target});if("ArrowDown"===e.key)i=o<n.length-1?o+1:0;else{if("ArrowUp"!==e.key)return;i=o>0?o-1:n.length-1}i>=0&&i<n.length&&n[i]&&n[i].focus()}}},{key:"trapFocus",value:function(e){var t=e.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),n=t[0],i=t[t.length-1];this.focusTrapHandler=function(e){"Tab"===e.key&&(e.shiftKey?document.activeElement===n&&(e.preventDefault(),i.focus()):document.activeElement===i&&(e.preventDefault(),n.focus()))},e.addEventListener("keydown",this.focusTrapHandler)}},{key:"removeFocusTrap",value:function(){this.mobileMenu&&this.focusTrapHandler&&this.mobileMenu.removeEventListener("keydown",this.focusTrapHandler)}},{key:"updateTabIndices",value:function(){if(this.dropdowns.forEach(function(e){var t=e.classList.contains("is-visible");e.querySelectorAll("a, button, [tabindex]:not([tabindex='-1'])").forEach(function(e){var n=t;n&&-1===e.tabIndex?e.tabIndex=0:n||-1===e.tabIndex||(e.tabIndex=-1)})}),this.mobileMenu){var e=this.mobileMenu.classList.contains(this.config.activeClass);this.mobileMenu.querySelectorAll("a, button, [tabindex]:not([tabindex='-1'])").forEach(function(t){t.tabIndex=e?0:-1})}}},{key:"destroy",value:function(){var e=this;this.toggleButtons.forEach(function(t){t.removeEventListener("click",e.handleToggleClick)}),this.mobileMenuButton&&this.mobileMenuButton.removeEventListener("click",this.handleMobileMenuToggle.bind(this)),this.mobileOverlay&&this.mobileOverlay.removeEventListener("click",this.closeMobileMenu.bind(this)),this.mobileCloseButton&&this.mobileCloseButton.removeEventListener("click",this.closeMobileMenu.bind(this)),this.desktopOverlay&&this.desktopOverlay.removeEventListener("click",this.closeAllDropdowns.bind(this)),this.accordionButtons.forEach(function(t){t.removeEventListener("click",e.handleAccordionClick)}),this.element.removeEventListener("keydown",this.handleKeyPress),window.removeEventListener("scroll",this.handleScroll),this.element.removeEventListener("keydown",this.keydownHandler),this.element.removeEventListener("mousedown",this.mousedownHandler),this.element.removeEventListener("touchstart",this.touchstartHandler),document.body.style.overflow="",this.element.ODS_Megamenu=null,this.config.removeOnDestroy&&this.element.remove()}}],i=[{key:"getInstance",value:function(e){return e&&e.ODS_Megamenu?e.ODS_Megamenu:null}}],n&&t(e.prototype,n),i&&t(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n,i}(),b={exports:{}};s||(s=1,b.exports=function(){var e=["decimals","thousand","mark","prefix","suffix","encoder","decoder","negativeBefore","negative","edit","undo"];function t(e){return e.split("").reverse().join("")}function n(e,t){return e.substring(0,t.length)===t}function i(e,t){return e.slice(-1*t.length)===t}function o(e,t,n){if((e[t]||e[n])&&e[t]===e[n])throw new Error(t)}function s(e){return"number"==typeof e&&isFinite(e)}function r(e,t){return e=e.toString().split("e"),(+((e=(e=Math.round(+(e[0]+"e"+(e[1]?+e[1]+t:t)))).toString().split("e"))[0]+"e"+(e[1]?+e[1]-t:-t))).toFixed(t)}function a(e,n,i,o,a,l,c,u,d,h,f,v){var m,y,b,g=v,p="",w="";return l&&(v=l(v)),!!s(v)&&(!1!==e&&0===parseFloat(v.toFixed(e))&&(v=0),v<0&&(m=!0,v=Math.abs(v)),!1!==e&&(v=r(v,e)),-1!==(v=v.toString()).indexOf(".")?(b=(y=v.split("."))[0],i&&(p=i+y[1])):b=v,n&&(b=t(b).match(/.{1,3}/g),b=t(b.join(t(n)))),m&&u&&(w+=u),o&&(w+=o),m&&d&&(w+=d),w+=b,w+=p,a&&(w+=a),h&&(w=h(w,g)),w)}function l(e,t,o,r,a,l,c,u,d,h,f,v){var m,y="";return f&&(v=f(v)),!(!v||"string"!=typeof v)&&(u&&n(v,u)&&(v=v.replace(u,""),m=!0),r&&n(v,r)&&(v=v.replace(r,"")),d&&n(v,d)&&(v=v.replace(d,""),m=!0),a&&i(v,a)&&(v=v.slice(0,-1*a.length)),t&&(v=v.split(t).join("")),o&&(v=v.replace(o,".")),m&&(y+="-"),""!==(y=(y+=v).replace(/[^0-9\.\-.]/g,""))&&(y=Number(y),c&&(y=c(y)),!!s(y)&&y))}function c(t){var n,i,s,r={};for(void 0===t.suffix&&(t.suffix=t.postfix),n=0;n<e.length;n+=1)if(void 0===(s=t[i=e[n]]))"negative"!==i||r.negativeBefore?"mark"===i&&"."!==r.thousand?r[i]=".":r[i]=!1:r[i]="-";else if("decimals"===i){if(!(s>=0&&s<8))throw new Error(i);r[i]=s}else if("encoder"===i||"decoder"===i||"edit"===i||"undo"===i){if("function"!=typeof s)throw new Error(i);r[i]=s}else{if("string"!=typeof s)throw new Error(i);r[i]=s}return o(r,"mark","thousand"),o(r,"prefix","negative"),o(r,"prefix","negativeBefore"),r}function u(t,n,i){var o,s=[];for(o=0;o<e.length;o+=1)s.push(t[e[o]]);return s.push(i),n.apply("",s)}function d(e){if(!(this instanceof d))return new d(e);"object"==typeof e&&(e=c(e),this.to=function(t){return u(e,a,t)},this.from=function(t){return u(e,l,t)})}return d}());var g=[{Module:y,name:"Megamenu",selector:"[data-megamenu]"}];window.ODSMegamenu=window.ODSMegamenu||{Megamenu:y,instances:[],init:function(){var e=document.querySelectorAll("[data-megamenu]");console.log("Found elements with data-megamenu:",e.length),window.ODSMegamenu.instances=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Array.from(document.querySelectorAll(t)).map(function(t){return new e(t,n)})}(y,"[data-megamenu]"),console.log("ODSMegamenu instances created:",window.ODSMegamenu.instances.length),console.log("ODSMegamenu loaded and initialized")},destroy:function(){window.ODSMegamenu.instances.forEach(function(e){e&&"function"==typeof e.destroy&&e.destroy()}),window.ODSMegamenu.instances=[]},initModulesWithin:function(e){var t={};return window.ODS.moduleSelectorPairs.forEach(function(i){var o,s=(o=i.name).charAt(0).toLowerCase()+o.slice(1),r=Array.from(e.querySelectorAll(i.selector));window&&window.ODS&&window.ODS.instances[s]&&window.ODS.instances[s].forEach(function(e){r.forEach(function(t,n){t.isSameNode(e.element)&&r.splice(n,1)})}),r.length&&(Array.isArray(window.ODS.instances[s])||(window.ODS.instances[s]=[]),t[s]=r.map(function(e){return new i.Module(e)}),window.ODS.instances[s]=[].concat(n(window.ODS.instances[s]),n(t[s])))}),t},destroyModulesWithin:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n={};return Object.keys(window.ODS.instances).forEach(function(i){window.ODS.instances[i].forEach(function(s){var r;"object"!==o(n[i])&&(n[i]=[]);var a=e.contains(s.element);"modal"===i?a=null===(r=s.instance)||void 0===r?void 0:r._openers.every(function(t){return e.contains(t)}):"tooltip"===i&&(a=e.contains(s.trigger)),a&&(s.destroy(),n[i].push(s)),a&&t&&["modal","tooltip"].includes(i)&&s.element.remove()}),window.ODS.instances[i]=window.ODS.instances[i].filter(function(e){return!n[i].includes(e)})}),n}},"loading"===document.readyState?document.addEventListener("DOMContentLoaded",function(){window.ODSMegamenu.init()}):window.ODSMegamenu.init();export{y as Megamenu,g as customMegamenuModuleSelectorPairs,y as default};
|
|
1
|
+
function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function t(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,a(i.key),i)}}function n(e,t,n){return(t=a(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function o(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?i(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):i(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}function r(t){return function(t){if(Array.isArray(t))return e(t)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(t,n){if(t){if("string"==typeof t)return e(t,n);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?e(t,n):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t);if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}var l,c={exports:{}};l||(l=1,c.exports=function(){var e=["decimals","thousand","mark","prefix","suffix","encoder","decoder","negativeBefore","negative","edit","undo"];function t(e){return e.split("").reverse().join("")}function n(e,t){return e.substring(0,t.length)===t}function i(e,t){return e.slice(-1*t.length)===t}function o(e,t,n){if((e[t]||e[n])&&e[t]===e[n])throw new Error(t)}function r(e){return"number"==typeof e&&isFinite(e)}function a(e,t){return e=e.toString().split("e"),(+((e=(e=Math.round(+(e[0]+"e"+(e[1]?+e[1]+t:t)))).toString().split("e"))[0]+"e"+(e[1]?+e[1]-t:-t))).toFixed(t)}function s(e,n,i,o,s,l,c,u,d,h,f,v){var m,y,g,b=v,p="",w="";return l&&(v=l(v)),!!r(v)&&(!1!==e&&0===parseFloat(v.toFixed(e))&&(v=0),v<0&&(m=!0,v=Math.abs(v)),!1!==e&&(v=a(v,e)),-1!==(v=v.toString()).indexOf(".")?(g=(y=v.split("."))[0],i&&(p=i+y[1])):g=v,n&&(g=t(g).match(/.{1,3}/g),g=t(g.join(t(n)))),m&&u&&(w+=u),o&&(w+=o),m&&d&&(w+=d),w+=g,w+=p,s&&(w+=s),h&&(w=h(w,b)),w)}function l(e,t,o,a,s,l,c,u,d,h,f,v){var m,y="";return f&&(v=f(v)),!(!v||"string"!=typeof v)&&(u&&n(v,u)&&(v=v.replace(u,""),m=!0),a&&n(v,a)&&(v=v.replace(a,"")),d&&n(v,d)&&(v=v.replace(d,""),m=!0),s&&i(v,s)&&(v=v.slice(0,-1*s.length)),t&&(v=v.split(t).join("")),o&&(v=v.replace(o,".")),m&&(y+="-"),""!==(y=(y+=v).replace(/[^0-9\.\-.]/g,""))&&(y=Number(y),c&&(y=c(y)),!!r(y)&&y))}function c(t){var n,i,r,a={};for(void 0===t.suffix&&(t.suffix=t.postfix),n=0;n<e.length;n+=1)if(void 0===(r=t[i=e[n]]))"negative"!==i||a.negativeBefore?"mark"===i&&"."!==a.thousand?a[i]=".":a[i]=!1:a[i]="-";else if("decimals"===i){if(!(r>=0&&r<8))throw new Error(i);a[i]=r}else if("encoder"===i||"decoder"===i||"edit"===i||"undo"===i){if("function"!=typeof r)throw new Error(i);a[i]=r}else{if("string"!=typeof r)throw new Error(i);a[i]=r}return o(a,"mark","thousand"),o(a,"prefix","negative"),o(a,"prefix","negativeBefore"),a}function u(t,n,i){var o,r=[];for(o=0;o<e.length;o+=1)r.push(t[e[o]]);return r.push(i),n.apply("",r)}function d(e){if(!(this instanceof d))return new d(e);"object"==typeof e&&(e=c(e),this.to=function(t){return u(e,s,t)},this.from=function(t){return u(e,l,t)})}return d}());var u="megamenu",d="".concat(u,"__nav-button"),h="".concat(u,"__nav-dropdown"),f="".concat(u,"__overlay"),v="".concat(u,"--hide-lg-up"),m="".concat(u,"__mobile"),y="".concat(u,"__mobile-overlay"),g="".concat(u,"__accordion-button"),b="".concat(u,"__accordion-icon"),p={dataToggle:"data-toggle",activeClass:"is-active",removeOnDestroy:!1},w=function(){return e=function e(t){var n=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t.ODS_Megamenu?t.ODS_Megamenu:(this.element=t,this.config=o(o({},p),i),this.handleToggleClick=this.handleToggleClick.bind(this),this.handleKeyPress=this.handleKeyPress.bind(this),this.handleScroll=this.handleScroll.bind(this),this.handleAccordionClick=this.handleAccordionClick.bind(this),this.handleArrowNavigation=this.handleArrowNavigation.bind(this),this.trapFocus=this.trapFocus.bind(this),this.handleMobileMenuToggle=this.handleMobileMenuToggle.bind(this),this.desktopOverlayClickHandler=function(){return n.closeAllDropdowns()},this.mobileCloseHandler=function(e){e.preventDefault(),n.closeMobileMenu()},this.element.ODS_Megamenu=this,this.init(),this)},n=[{key:"isModalOpen",value:function(){return document.body.classList.contains("has-modal")}},{key:"getLockedScrollTop",value:function(){var e=document.body.getAttribute("data-lock-scrolltop"),t=Number.parseInt(e||"",10);return Number.isFinite(t)?t:null}},{key:"getEffectiveScrollY",value:function(){var e;return this.isModalOpen()&&null!==(e=this.getLockedScrollTop())&&void 0!==e?e:window.scrollY}},{key:"init",value:function(){var e=this;this.toggleButtons=this.element.querySelectorAll(".".concat(d,"[aria-controls]")),this.dropdowns=this.element.querySelectorAll(".".concat(h)),this.instanceName=this.element.getAttribute("data-megamenu-name")||this.element.id||"",this.mobilePanels=Array.from(this.element.querySelectorAll(".".concat(m))),this.activeMobilePanel=null,this.activeMobileTarget=null,this.focusTrapElement=null;var t=Array.from(this.element.querySelectorAll("[data-megamenu-mobile-toggle], .".concat(v," button"))),n=Array.from(document.querySelectorAll("[data-megamenu-mobile-toggle]"));this.mobileMenuButtons=Array.from(new Set([].concat(t,n))).filter(function(t){return e.shouldUseMobileTrigger(t)}),this.mobileCloseButtons=Array.from(this.element.querySelectorAll(".".concat(y,", [data-megamenu-close-button]"))),this.mobilePanels.forEach(function(e){e.setAttribute("aria-hidden","true")}),this.syncMobileButtonState(),this.desktopOverlay=this.element.querySelector(".".concat(f)),this.accordionButtons=this.element.querySelectorAll(".".concat(g)),this.toggleButtons.forEach(function(t){t.addEventListener("click",e.handleToggleClick)}),this.mobileMenuButtons.forEach(function(t){t.addEventListener("click",e.handleMobileMenuToggle)}),this.mobileCloseButtons.forEach(function(t){t.addEventListener("click",e.mobileCloseHandler)}),this.desktopOverlay&&this.desktopOverlay.addEventListener("click",this.desktopOverlayClickHandler),this.accordionButtons.forEach(function(t){t.addEventListener("click",e.handleAccordionClick)}),this.element.addEventListener("keydown",this.handleKeyPress),window.addEventListener("scroll",this.handleScroll),this.isKeyboardUser=!1,this.keydownHandler=function(t){"Tab"!==t.key&&" "!==t.key&&"Enter"!==t.key||(e.isKeyboardUser=!0)},this.mousedownHandler=function(){e.isKeyboardUser=!1},this.touchstartHandler=function(){e.isKeyboardUser=!1},this.element.addEventListener("keydown",this.keydownHandler),this.element.addEventListener("mousedown",this.mousedownHandler),this.element.addEventListener("touchstart",this.touchstartHandler),this.updateTabIndices(),this.handleScroll()}},{key:"shouldUseMobileTrigger",value:function(e){if(this.element.contains(e))return!0;var t=e.getAttribute("data-megamenu-mobile-for");if(!t){var n=document.querySelectorAll("[data-megamenu]");return 1===n.length&&n[0]===this.element}return!!this.instanceName&&t===this.instanceName}},{key:"getDefaultMobileTarget",value:function(){var e=this.mobilePanels[0];return(null==e?void 0:e.getAttribute("data-megamenu-mobile-panel"))||"main"}},{key:"getTargetFromElement",value:function(e){return(null==e?void 0:e.getAttribute("data-megamenu-mobile-target"))||this.getDefaultMobileTarget()}},{key:"getPanelByTarget",value:function(e){var t=this.mobilePanels.find(function(t){return t.getAttribute("data-megamenu-mobile-panel")===e});return t||(e===this.getDefaultMobileTarget()&&1===this.mobilePanels.length?this.mobilePanels[0]:null)}},{key:"syncMobileButtonState",value:function(){var e=this;this.mobileMenuButtons.forEach(function(t){var n=e.getTargetFromElement(t),i=e.activeMobileTarget===n;t.setAttribute("aria-expanded",i?"true":"false"),t.classList.toggle(e.config.activeClass,i)})}},{key:"isInMobilePanel",value:function(e){return Boolean(e&&this.mobilePanels.some(function(t){return t.contains(e)}))}},{key:"getFocusRestoreTarget",value:function(){var e=this,t=this.lastFocusedElement;if(t&&t.isConnected&&!this.isInMobilePanel(t))return t;var n=this.activeMobileTarget;if(n){var i=this.mobileMenuButtons.find(function(t){return e.getTargetFromElement(t)===n&&!e.isInMobilePanel(t)});if(i)return i}return this.mobileMenuButtons.find(function(t){return!e.isInMobilePanel(t)})||null}},{key:"setMobilePanelState",value:function(e,t){e.classList.toggle(this.config.activeClass,t),e.setAttribute("aria-hidden",t?"false":"true")}},{key:"handleToggleClick",value:function(e){var t=e.currentTarget,n=t.classList.contains(this.config.activeClass);this.closeAllDropdowns(),n?t.focus():this.openDropdown(t)}},{key:"handleKeyPress",value:function(e){if("Escape"===e.key){var t=Array.from(this.toggleButtons).find(function(e){return"true"===e.getAttribute("aria-expanded")});this.closeAllDropdowns(),this.closeMobileMenu(),this.closeAllAccordions(),t&&t.focus()}if("Enter"===e.key||" "===e.key){var n=e.target;("BUTTON"===n.tagName&&n.hasAttribute("aria-controls")||n.classList.contains(g))&&(e.preventDefault(),n.click())}if("Home"===e.key||"End"===e.key){var i,o=null===(i=e.target)||void 0===i?void 0:i.closest(".".concat(h));if(o){e.preventDefault();var r=Array.from(o.querySelectorAll('a, button, [tabindex]:not([tabindex="-1"])'));"Home"===e.key&&r.length>0?r[0].focus():"End"===e.key&&r.length>0&&r[r.length-1].focus()}}if("ArrowDown"===e.key){var a=e.target;if("BUTTON"===a.tagName&&a.hasAttribute("aria-controls")){if("true"===a.getAttribute("aria-expanded")){var s;e.preventDefault();var l=null===(s=a.parentElement)||void 0===s?void 0:s.querySelector(".".concat(h)),c=null==l?void 0:l.querySelector("a, button");c&&c.focus()}}else{var u=a.closest(".".concat(h));u&&(e.preventDefault(),this.handleArrowNavigation(e,u))}}if("ArrowUp"===e.key){var d,f=null===(d=e.target)||void 0===d?void 0:d.closest(".".concat(h));f&&(e.preventDefault(),this.handleArrowNavigation(e,f))}}},{key:"handleAccordionClick",value:function(e){var t=e.currentTarget,n="true"===t.getAttribute("aria-expanded");this.closeAllAccordions(),n||this.openAccordion(t)}},{key:"handleScroll",value:function(){var e=this.element.querySelector('[data-hide-when-sticky="true"]'),t=Boolean(this.element.querySelector("[data-megamenu-brand-mark]")),n=this.getEffectiveScrollY()>((null==e?void 0:e.offsetHeight)||15),i=this.element.classList.contains("top-hidden");e?n&&!i?(e.classList.add("is-hidden"),this.element.classList.add("top-hidden")):!n&&i&&(e.classList.remove("is-hidden"),this.element.classList.remove("top-hidden")):this.element.classList.contains("is-sticky")&&t&&this.element.classList.toggle("top-hidden",n)}},{key:"openDropdown",value:function(e){var t,n=null===(t=e.parentElement)||void 0===t?void 0:t.querySelector(".".concat(h));n&&(e.classList.add(this.config.activeClass),e.setAttribute("aria-expanded","true"),n.style.display="block",n.classList.add("is-visible"),this.showDesktopOverlay(),this.updateTabIndices())}},{key:"closeDropdown",value:function(e){var t,n=null===(t=e.parentElement)||void 0===t?void 0:t.querySelector(".".concat(h));n&&(e.classList.remove(this.config.activeClass),e.setAttribute("aria-expanded","false"),n.classList.remove("is-visible"),n.style.display="none",this.updateTabIndices())}},{key:"closeAllDropdowns",value:function(){var e=this;this.toggleButtons.forEach(function(t){e.closeDropdown(t)}),this.hideDesktopOverlay()}},{key:"handleMobileMenuToggle",value:function(e){e.preventDefault();var t=e.currentTarget,n=this.getTargetFromElement(t),i=this.getPanelByTarget(n);i&&(this.activeMobileTarget===n&&i.classList.contains(this.config.activeClass)?this.closeMobileMenu():this.openMobileMenu(n,t))}},{key:"openMobileMenu",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getDefaultMobileTarget(),n=arguments.length>1?arguments[1]:void 0,i=this.getPanelByTarget(t);if(i){this.lastFocusedElement=n||document.activeElement;var o=document.activeElement;if(o&&o!==i&&this.mobilePanels.some(function(e){return e!==i&&e.contains(o)})&&o.blur(),this.mobilePanels.forEach(function(t){e.setMobilePanelState(t,t===i)}),this.activeMobilePanel=i,this.activeMobileTarget=t,this.syncMobileButtonState(),document.body.style.overflow="hidden",this.removeFocusTrap(),this.trapFocus(i),this.isKeyboardUser){var r=i.querySelector("button, a");r&&setTimeout(function(){return r.focus()},50)}this.updateTabIndices()}}},{key:"closeMobileMenu",value:function(){var e=this;if(this.activeMobilePanel){var t,n,i=this.getFocusRestoreTarget();i?i.focus():null===(t=document.activeElement)||void 0===t||null===(n=t.blur)||void 0===n||n.call(t),this.mobilePanels.forEach(function(t){e.setMobilePanelState(t,!1)}),document.body.style.overflow="",this.closeAllAccordions(),this.removeFocusTrap(),this.activeMobilePanel=null,this.activeMobileTarget=null,this.lastFocusedElement=null,this.syncMobileButtonState(),this.updateTabIndices()}}},{key:"showDesktopOverlay",value:function(){this.desktopOverlay&&this.desktopOverlay.classList.add(this.config.activeClass)}},{key:"hideDesktopOverlay",value:function(){this.desktopOverlay&&this.desktopOverlay.classList.remove(this.config.activeClass)}},{key:"openAccordion",value:function(e){var t=e.getAttribute("aria-controls"),n=t?this.element.querySelector("#".concat(t)):null,i=e.querySelector(".".concat(b));n&&(e.setAttribute("aria-expanded","true"),e.classList.add(this.config.activeClass),n.classList.add("is-visible"),n.style.display="block",i&&i.classList.add(this.config.activeClass))}},{key:"closeAccordion",value:function(e){var t=e.getAttribute("aria-controls"),n=t?this.element.querySelector("#".concat(t)):null,i=e.querySelector(".".concat(b));n&&(e.setAttribute("aria-expanded","false"),e.classList.remove(this.config.activeClass),n.classList.remove("is-visible"),n.style.display="none",i&&i.classList.remove(this.config.activeClass))}},{key:"closeAllAccordions",value:function(){var e=this;this.accordionButtons.forEach(function(t){e.closeAccordion(t)})}},{key:"handleArrowNavigation",value:function(e,t){var n=Array.from(t.querySelectorAll('a, button, [tabindex]:not([tabindex="-1"])'));if(0!==n.length){var i,o=n.findIndex(function(t){return t===e.target});if("ArrowDown"===e.key)i=o<n.length-1?o+1:0;else{if("ArrowUp"!==e.key)return;i=o>0?o-1:n.length-1}i>=0&&i<n.length&&n[i]&&n[i].focus()}}},{key:"trapFocus",value:function(e){var t=e.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),n=t[0],i=t[t.length-1];this.focusTrapHandler=function(e){"Tab"===e.key&&(e.shiftKey?document.activeElement===n&&(e.preventDefault(),i.focus()):document.activeElement===i&&(e.preventDefault(),n.focus()))},this.focusTrapElement=e,e.addEventListener("keydown",this.focusTrapHandler)}},{key:"removeFocusTrap",value:function(){this.focusTrapElement&&this.focusTrapHandler&&(this.focusTrapElement.removeEventListener("keydown",this.focusTrapHandler),this.focusTrapElement=null)}},{key:"updateTabIndices",value:function(){var e=this;this.dropdowns.forEach(function(e){var t=e.classList.contains("is-visible");e.querySelectorAll("a, button, [tabindex]:not([tabindex='-1'])").forEach(function(e){var n=t;n&&-1===e.tabIndex?e.tabIndex=0:n||-1===e.tabIndex||(e.tabIndex=-1)})}),this.mobilePanels.forEach(function(t){var n=t.classList.contains(e.config.activeClass);t.querySelectorAll("a, button, [tabindex]:not([tabindex='-1'])").forEach(function(e){e.tabIndex=n?0:-1})})}},{key:"destroy",value:function(){var e=this;this.toggleButtons.forEach(function(t){t.removeEventListener("click",e.handleToggleClick)}),this.mobileMenuButtons.forEach(function(t){t.removeEventListener("click",e.handleMobileMenuToggle)}),this.mobileCloseButtons.forEach(function(t){t.removeEventListener("click",e.mobileCloseHandler)}),this.desktopOverlay&&this.desktopOverlay.removeEventListener("click",this.desktopOverlayClickHandler),this.accordionButtons.forEach(function(t){t.removeEventListener("click",e.handleAccordionClick)}),this.element.removeEventListener("keydown",this.handleKeyPress),window.removeEventListener("scroll",this.handleScroll),this.element.removeEventListener("keydown",this.keydownHandler),this.element.removeEventListener("mousedown",this.mousedownHandler),this.element.removeEventListener("touchstart",this.touchstartHandler),document.body.style.overflow="",this.removeFocusTrap(),this.element.ODS_Megamenu=null,this.config.removeOnDestroy&&this.element.remove()}}],i=[{key:"getInstance",value:function(e){return e&&e.ODS_Megamenu?e.ODS_Megamenu:null}}],n&&t(e.prototype,n),i&&t(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n,i}(),k=[{Module:w,name:"Megamenu",selector:"[data-megamenu]"}];window.ODSMegamenu=window.ODSMegamenu||{Megamenu:w,instances:[],init:function(){window.ODSMegamenu.instances=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Array.from(document.querySelectorAll(t)).map(function(t){return new e(t,n)})}(w,"[data-megamenu]")},destroy:function(){window.ODSMegamenu.instances.forEach(function(e){e&&"function"==typeof e.destroy&&e.destroy()}),window.ODSMegamenu.instances=[]},initModulesWithin:function(e){var t={};return window.ODS.moduleSelectorPairs.forEach(function(n){var i,o=(i=n.name).charAt(0).toLowerCase()+i.slice(1),a=Array.from(e.querySelectorAll(n.selector)),s="ODS_".concat(n.name),l=a.filter(function(e){return!e[s]});window&&window.ODS&&window.ODS.instances[o]&&(window.ODS.instances[o]=window.ODS.instances[o].filter(function(e){var t,n=document.contains(e.element);n||(null===(t=e.destroy)||void 0===t||t.call(e));return n}),window.ODS.instances[o].forEach(function(e){l.forEach(function(t,n){t.isSameNode(e.element)&&l.splice(n,1)})})),l.length&&(Array.isArray(window.ODS.instances[o])||(window.ODS.instances[o]=[]),t[o]=l.map(function(e){return new n.Module(e)}),window.ODS.instances[o]=[].concat(r(window.ODS.instances[o]),r(t[o])))}),t},destroyModulesWithin:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n={};return Object.keys(window.ODS.instances).forEach(function(i){window.ODS.instances[i].forEach(function(o){"object"!==s(n[i])&&(n[i]=[]);var r,a=e.contains(o.element);"modal"===i?a=null===(r=o.instance)||void 0===r?void 0:r._openers.every(function(t){return e.contains(t)}):"tooltip"===i&&(a=e.contains(o.trigger));a&&(o.destroy(),n[i].push(o)),a&&t&&["modal","tooltip"].includes(i)&&o.element.remove()}),window.ODS.instances[i]=window.ODS.instances[i].filter(function(e){return!n[i].includes(e)})}),n}},"loading"===document.readyState?document.addEventListener("DOMContentLoaded",function(){window.ODSMegamenu.init()}):window.ODSMegamenu.init();export{w as Megamenu,k as customMegamenuModuleSelectorPairs,w as default};
|
|
2
2
|
//# sourceMappingURL=megamenu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"megamenu.js","sources":["../../../src/components/Megamenu/constants.ts","../../../src/components/Megamenu/Megamenu.static.ts","../../node_modules/wnumb/wNumb.js","../../src/components/Megamenu/static.ts","../../../src/scripts/lib/moduleFactory.js","../../src/utils/helpers.js"],"sourcesContent":["export const CLASS_ROOT = \"megamenu\";\n\nexport const CLASS_TOP = `${CLASS_ROOT}__top`;\nexport const CLASS_MAIN = `${CLASS_ROOT}__main`;\nexport const CLASS_SUBMAIN = `${CLASS_ROOT}__submain`;\nexport const CLASS_CONTAINER = `${CLASS_ROOT}__container`;\nexport const CLASS_GRID = `${CLASS_ROOT}__grid`;\nexport const CLASS_CARD = `${CLASS_ROOT}__card`;\nexport const CLASS_NAV = `${CLASS_ROOT}__nav`;\nexport const CLASS_NAV_VERTICAL = `${CLASS_ROOT}__nav--vertical`;\nexport const CLASS_NAV_SPACE_SMALL = `${CLASS_ROOT}__nav--space-small`;\nexport const CLASS_NAV_ITEM = `${CLASS_ROOT}__nav-item`;\nexport const CLASS_NAV_ITEM_MAIN = `${CLASS_ROOT}__nav-item--main`;\nexport const CLASS_NAV_LINK = `${CLASS_ROOT}__nav-link`;\nexport const CLASS_NAV_CART_ICON = `${CLASS_ROOT}__nav-cart-icon`;\nexport const CLASS_NAV_SPACER = `${CLASS_ROOT}__nav-spacer`;\nexport const CLASS_NAV_ICON = `${CLASS_ROOT}__nav-icon`;\nexport const CLASS_NAV_LOGO = `${CLASS_ROOT}__nav-logo`;\nexport const CLASS_NAV_BUTTON = `${CLASS_ROOT}__nav-button`;\nexport const CLASS_NAV_BUTTON_INDICATOR = `${CLASS_ROOT}__nav-button--indicator`;\nexport const CLASS_NAV_DROPDOWN = `${CLASS_ROOT}__nav-dropdown`;\nexport const CLASS_SUBNAV = `${CLASS_ROOT}__subnav`;\nexport const CLASS_SUBNAV_ITEM = `${CLASS_ROOT}__subnav-item`;\nexport const CLASS_OVERLAY = `${CLASS_ROOT}__overlay`;\nexport const CLASS_SPACER = `${CLASS_ROOT}-spacer`;\nexport const CLASS_SPACER_SMALL = `${CLASS_ROOT}-spacer--small`;\n\nexport const CLASS_TEXT_LARGE = `${CLASS_ROOT}__text--large`;\nexport const CLASS_HIDE_MD_DOWN = `${CLASS_ROOT}--hide-md-down`;\nexport const CLASS_HIDE_LG_UP = `${CLASS_ROOT}--hide-lg-up`;\nexport const CLASS_ALIGN_CENTER = `${CLASS_ROOT}--align-center`;\n\nexport const CLASS_MOBILE = `${CLASS_ROOT}__mobile`;\nexport const CLASS_MOBILE_OVERLAY = `${CLASS_ROOT}__mobile-overlay`;\nexport const CLASS_MOBILE_WRAPPER = `${CLASS_ROOT}__mobile-wrapper`;\nexport const CLASS_MOBILE_HEADER = `${CLASS_ROOT}__mobile-header`;\nexport const CLASS_MOBILE_BODY = `${CLASS_ROOT}__mobile-body`;\n\n// Accordion classes for mobile menu\nexport const CLASS_ACCORDION = `${CLASS_ROOT}__accordion`;\nexport const CLASS_ACCORDION_ITEM = `${CLASS_ROOT}__accordion-item`;\nexport const CLASS_ACCORDION_HEADER = `${CLASS_ROOT}__accordion-header`;\nexport const CLASS_ACCORDION_BUTTON = `${CLASS_ROOT}__accordion-button`;\nexport const CLASS_ACCORDION_TITLE = `${CLASS_ROOT}__accordion-title`;\nexport const CLASS_ACCORDION_ICON = `${CLASS_ROOT}__accordion-icon`;\nexport const CLASS_ACCORDION_BODY = `${CLASS_ROOT}__accordion-body`;\n\nexport const CLASS_INPUT = `${CLASS_ROOT}__input`;\nexport const CLASS_INPUT_SEARCH_ICON_WITH_PLACEHOLDER = `${CLASS_ROOT}__input--search-icon-with-placeholder`;\n\nexport const CLASS_TAG = `${CLASS_ROOT}__tag`;\nexport const CLASS_TAG_TRANSPARENT = `${CLASS_ROOT}__tag--transparent`;\nexport const CLASS_TAG_LARGE = `${CLASS_ROOT}__tag--large`;\n\nexport const CLASS_LIST_INLINE = `${CLASS_ROOT}__list--inline`;\nexport const CLASS_LIST_GAP_SMALL = `${CLASS_ROOT}__list--gap-small`;\n","import {\n CLASS_NAV_BUTTON,\n CLASS_NAV_DROPDOWN,\n CLASS_MOBILE,\n CLASS_MOBILE_OVERLAY,\n CLASS_HIDE_LG_UP,\n CLASS_OVERLAY,\n CLASS_ACCORDION_BUTTON,\n CLASS_ACCORDION_ICON,\n} from \"./constants\";\n\ninterface MegamenuConfig {\n dataToggle?: string;\n activeClass?: string;\n removeOnDestroy?: boolean;\n}\n\nconst defaultConfig: Required<MegamenuConfig> = {\n dataToggle: \"data-toggle\",\n activeClass: \"is-active\",\n removeOnDestroy: false,\n};\n\nexport default class Megamenu {\n element!: HTMLElement;\n config!: Required<MegamenuConfig>;\n toggleButtons!: NodeListOf<HTMLButtonElement>;\n dropdowns!: NodeListOf<HTMLElement>;\n mobileMenuButton!: HTMLButtonElement | null;\n mobileMenu!: HTMLElement | null;\n mobileOverlay!: HTMLElement | null;\n mobileCloseButton!: HTMLButtonElement | null;\n desktopOverlay!: HTMLButtonElement | null;\n accordionButtons!: NodeListOf<HTMLButtonElement>;\n focusTrapHandler!: (event: KeyboardEvent) => void;\n lastFocusedElement!: HTMLElement | null;\n isKeyboardUser!: boolean;\n keydownHandler!: (e: KeyboardEvent) => void;\n mousedownHandler!: () => void;\n touchstartHandler!: () => void;\n\n constructor(element: HTMLElement, config: MegamenuConfig = {}) {\n if ((element as any).ODS_Megamenu) {\n return (element as any).ODS_Megamenu;\n }\n\n this.element = element;\n this.config = { ...defaultConfig, ...config };\n\n this.handleToggleClick = this.handleToggleClick.bind(this);\n this.handleKeyPress = this.handleKeyPress.bind(this);\n this.handleScroll = this.handleScroll.bind(this);\n this.handleAccordionClick = this.handleAccordionClick.bind(this);\n this.handleArrowNavigation = this.handleArrowNavigation.bind(this);\n this.trapFocus = this.trapFocus.bind(this);\n\n (this.element as any).ODS_Megamenu = this;\n\n this.init();\n return this;\n }\n\n static getInstance(el: HTMLElement): Megamenu | null {\n return el && (el as any).ODS_Megamenu ? (el as any).ODS_Megamenu : null;\n }\n\n init() {\n // Find all nav buttons with aria-controls attribute (dropdown buttons)\n this.toggleButtons = this.element.querySelectorAll(\n `.${CLASS_NAV_BUTTON}[aria-controls]`,\n );\n this.dropdowns = this.element.querySelectorAll(`.${CLASS_NAV_DROPDOWN}`);\n\n // Find mobile menu elements\n this.mobileMenuButton = this.element.querySelector(\n `.${CLASS_HIDE_LG_UP} button`,\n ) as HTMLButtonElement;\n this.mobileMenu = this.element.querySelector(`.${CLASS_MOBILE}`);\n this.mobileOverlay = this.element.querySelector(`.${CLASS_MOBILE_OVERLAY}`);\n this.mobileCloseButton = this.element.querySelector(\n \"[data-megamenu-close-button]\",\n ) as HTMLButtonElement;\n\n // Find desktop overlay element\n this.desktopOverlay = this.element.querySelector(\n `.${CLASS_OVERLAY}`,\n ) as HTMLButtonElement;\n\n // Find accordion buttons\n this.accordionButtons = this.element.querySelectorAll(\n `.${CLASS_ACCORDION_BUTTON}`,\n );\n\n // Add click event listeners to toggle buttons\n this.toggleButtons.forEach((button) => {\n button.addEventListener(\"click\", this.handleToggleClick);\n });\n\n // Add mobile menu event listeners\n if (this.mobileMenuButton) {\n this.mobileMenuButton.addEventListener(\n \"click\",\n this.handleMobileMenuToggle.bind(this),\n );\n }\n if (this.mobileOverlay) {\n this.mobileOverlay.addEventListener(\n \"click\",\n this.closeMobileMenu.bind(this),\n );\n }\n if (this.mobileCloseButton) {\n this.mobileCloseButton.addEventListener(\n \"click\",\n this.closeMobileMenu.bind(this),\n );\n }\n\n // Add desktop overlay event listener\n if (this.desktopOverlay) {\n this.desktopOverlay.addEventListener(\n \"click\",\n this.closeAllDropdowns.bind(this),\n );\n }\n\n // Add accordion event listeners\n this.accordionButtons.forEach((button) => {\n button.addEventListener(\"click\", this.handleAccordionClick);\n });\n\n // Add scoped event listeners to this element\n this.element.addEventListener(\"keydown\", this.handleKeyPress);\n window.addEventListener(\"scroll\", this.handleScroll);\n\n // Track keyboard usage for proper focus management\n this.isKeyboardUser = false;\n this.keydownHandler = (e) => {\n if (e.key === \"Tab\" || e.key === \" \" || e.key === \"Enter\") {\n this.isKeyboardUser = true;\n }\n };\n this.mousedownHandler = () => {\n this.isKeyboardUser = false;\n };\n this.touchstartHandler = () => {\n this.isKeyboardUser = false;\n };\n\n this.element.addEventListener(\"keydown\", this.keydownHandler);\n this.element.addEventListener(\"mousedown\", this.mousedownHandler);\n this.element.addEventListener(\"touchstart\", this.touchstartHandler);\n\n // Set initial tab indices for accessibility\n this.updateTabIndices();\n }\n\n handleToggleClick(event: Event) {\n const button = event.currentTarget as HTMLButtonElement;\n const isActive = button.classList.contains(this.config.activeClass);\n\n // Close all other dropdowns\n this.closeAllDropdowns();\n\n // Toggle current dropdown\n if (!isActive) {\n this.openDropdown(button);\n // Keep focus on the button that opened the dropdown\n // Users can navigate into the dropdown using arrow keys\n } else {\n // If closing, ensure focus remains on the button\n button.focus();\n }\n }\n\n handleKeyPress(event: KeyboardEvent) {\n if (event.key === \"Escape\") {\n // Find the active dropdown button (the one with aria-expanded=\"true\")\n const activeButton = Array.from(this.toggleButtons).find(\n (button) => button.getAttribute(\"aria-expanded\") === \"true\",\n );\n\n this.closeAllDropdowns();\n this.closeMobileMenu();\n this.closeAllAccordions();\n\n // Return focus to button that opened the menu\n if (activeButton) {\n activeButton.focus();\n }\n }\n\n // Handle Enter and Space keys for dropdown buttons and accordion buttons\n if (event.key === \"Enter\" || event.key === \" \") {\n const target = event.target as HTMLElement;\n if (\n (target.tagName === \"BUTTON\" && target.hasAttribute(\"aria-controls\")) ||\n target.classList.contains(CLASS_ACCORDION_BUTTON)\n ) {\n event.preventDefault();\n target.click();\n }\n }\n\n // Handle Home and End keys for navigation within dropdowns\n if (event.key === \"Home\" || event.key === \"End\") {\n const dropdown = (event.target as HTMLElement)?.closest(\n `.${CLASS_NAV_DROPDOWN}`,\n ) as HTMLElement;\n if (dropdown) {\n event.preventDefault();\n const focusableElements = Array.from(\n dropdown.querySelectorAll(\n 'a, button, [tabindex]:not([tabindex=\"-1\"])',\n ),\n ) as HTMLElement[];\n\n if (event.key === \"Home\" && focusableElements.length > 0) {\n focusableElements[0].focus();\n } else if (event.key === \"End\" && focusableElements.length > 0) {\n focusableElements[focusableElements.length - 1].focus();\n }\n }\n }\n\n // Arrow key navigation for dropdowns and from buttons to dropdowns\n if (event.key === \"ArrowDown\") {\n const target = event.target as HTMLElement;\n\n // If focus is on a dropdown button, move to first item in dropdown\n if (target.tagName === \"BUTTON\" && target.hasAttribute(\"aria-controls\")) {\n const isExpanded = target.getAttribute(\"aria-expanded\") === \"true\";\n if (isExpanded) {\n event.preventDefault();\n const dropdown = target.parentElement?.querySelector(\n `.${CLASS_NAV_DROPDOWN}`,\n ) as HTMLElement;\n const firstFocusable = dropdown?.querySelector(\n \"a, button\",\n ) as HTMLElement;\n if (firstFocusable) {\n firstFocusable.focus();\n }\n }\n }\n // If focus is within a dropdown, navigate within it\n else {\n const dropdown = target.closest(\n `.${CLASS_NAV_DROPDOWN}`,\n ) as HTMLElement;\n if (dropdown) {\n event.preventDefault();\n this.handleArrowNavigation(event, dropdown);\n }\n }\n }\n\n if (event.key === \"ArrowUp\") {\n const dropdown = (event.target as HTMLElement)?.closest(\n `.${CLASS_NAV_DROPDOWN}`,\n ) as HTMLElement;\n if (dropdown) {\n event.preventDefault();\n this.handleArrowNavigation(event, dropdown);\n }\n }\n }\n\n handleAccordionClick(event: Event) {\n const button = event.currentTarget as HTMLButtonElement;\n const isExpanded = button.getAttribute(\"aria-expanded\") === \"true\";\n\n // Close all other accordions first\n this.closeAllAccordions();\n\n // Toggle current accordion\n if (!isExpanded) {\n this.openAccordion(button);\n }\n }\n\n handleScroll() {\n const topElement = this.element.querySelector(\n '[data-hide-when-sticky=\"true\"]',\n ) as HTMLElement;\n\n if (topElement) {\n if (window.scrollY > 15) {\n topElement.classList.add(\"is-hidden\");\n this.element.classList.add(\"top-hidden\");\n } else {\n topElement.classList.remove(\"is-hidden\");\n this.element.classList.remove(\"top-hidden\");\n }\n }\n }\n\n openDropdown(button: HTMLButtonElement) {\n const dropdown = button.parentElement?.querySelector(\n `.${CLASS_NAV_DROPDOWN}`,\n ) as HTMLElement;\n\n if (dropdown) {\n button.classList.add(this.config.activeClass);\n button.setAttribute(\"aria-expanded\", \"true\");\n dropdown.style.display = \"block\";\n dropdown.classList.add(\"is-visible\");\n this.showDesktopOverlay();\n this.updateTabIndices();\n }\n }\n\n closeDropdown(button: HTMLButtonElement) {\n const dropdown = button.parentElement?.querySelector(\n `.${CLASS_NAV_DROPDOWN}`,\n ) as HTMLElement;\n\n if (dropdown) {\n button.classList.remove(this.config.activeClass);\n button.setAttribute(\"aria-expanded\", \"false\");\n dropdown.classList.remove(\"is-visible\");\n dropdown.style.display = \"none\";\n this.updateTabIndices();\n }\n }\n\n closeAllDropdowns() {\n this.toggleButtons.forEach((button) => {\n this.closeDropdown(button);\n });\n this.hideDesktopOverlay();\n }\n\n handleMobileMenuToggle(event: Event) {\n event.preventDefault();\n if (this.mobileMenu?.classList.contains(this.config.activeClass)) {\n this.closeMobileMenu();\n } else {\n this.openMobileMenu();\n }\n }\n\n openMobileMenu() {\n if (this.mobileMenu) {\n // Store the element that opened the menu for focus restoration\n this.lastFocusedElement = document.activeElement as HTMLElement;\n\n this.mobileMenu.classList.add(this.config.activeClass);\n document.body.style.overflow = \"hidden\"; // Prevent background scrolling\n\n // Set up focus trap immediately to prevent focus escape\n this.trapFocus(this.mobileMenu);\n\n // Only manage focus if user is using keyboard navigation (not touch)\n if (this.isKeyboardUser) {\n // Focus first focusable element in mobile menu for keyboard users\n const firstFocusable = this.mobileMenu.querySelector(\n \"button, a\",\n ) as HTMLElement;\n if (firstFocusable) {\n // Reduced delay for better responsiveness\n setTimeout(() => firstFocusable.focus(), 50);\n }\n }\n }\n }\n\n closeMobileMenu() {\n if (this.mobileMenu) {\n this.mobileMenu.classList.remove(this.config.activeClass);\n document.body.style.overflow = \"\"; // Restore scrolling\n this.closeAllAccordions(); // Close any open accordions\n\n // Remove focus trap (safe to call even if not active)\n this.removeFocusTrap();\n\n // Return focus to element that opened the menu only for keyboard users\n if (this.isKeyboardUser && this.lastFocusedElement) {\n this.lastFocusedElement.focus();\n }\n this.lastFocusedElement = null;\n }\n }\n\n showDesktopOverlay() {\n if (this.desktopOverlay) {\n this.desktopOverlay.classList.add(this.config.activeClass);\n }\n }\n\n hideDesktopOverlay() {\n if (this.desktopOverlay) {\n this.desktopOverlay.classList.remove(this.config.activeClass);\n }\n }\n\n openAccordion(button: HTMLButtonElement) {\n const accordionId = button.getAttribute(\"aria-controls\");\n const accordionBody = accordionId\n ? (this.element.querySelector(`#${accordionId}`) as HTMLElement)\n : null;\n const icon = button.querySelector(\n `.${CLASS_ACCORDION_ICON}`,\n ) as HTMLElement;\n\n if (accordionBody) {\n button.setAttribute(\"aria-expanded\", \"true\");\n button.classList.add(this.config.activeClass);\n accordionBody.classList.add(\"is-visible\");\n accordionBody.style.display = \"block\";\n\n if (icon) {\n icon.classList.add(this.config.activeClass);\n }\n }\n }\n\n closeAccordion(button: HTMLButtonElement) {\n const accordionId = button.getAttribute(\"aria-controls\");\n const accordionBody = accordionId\n ? (this.element.querySelector(`#${accordionId}`) as HTMLElement)\n : null;\n const icon = button.querySelector(\n `.${CLASS_ACCORDION_ICON}`,\n ) as HTMLElement;\n\n if (accordionBody) {\n button.setAttribute(\"aria-expanded\", \"false\");\n button.classList.remove(this.config.activeClass);\n accordionBody.classList.remove(\"is-visible\");\n accordionBody.style.display = \"none\";\n\n if (icon) {\n icon.classList.remove(this.config.activeClass);\n }\n }\n }\n\n closeAllAccordions() {\n this.accordionButtons.forEach((button) => {\n this.closeAccordion(button);\n });\n }\n\n handleArrowNavigation(event: KeyboardEvent, dropdown: HTMLElement) {\n const focusableElements = Array.from(\n dropdown.querySelectorAll('a, button, [tabindex]:not([tabindex=\"-1\"])'),\n ) as HTMLElement[];\n\n if (focusableElements.length === 0) return;\n\n const currentIndex = focusableElements.findIndex(\n (item) => item === event.target,\n );\n\n let nextIndex;\n if (event.key === \"ArrowDown\") {\n nextIndex =\n currentIndex < focusableElements.length - 1 ? currentIndex + 1 : 0;\n } else if (event.key === \"ArrowUp\") {\n nextIndex =\n currentIndex > 0 ? currentIndex - 1 : focusableElements.length - 1;\n } else {\n return; // Don't handle other keys\n }\n\n // Ensure nextIndex is valid\n if (\n nextIndex >= 0 &&\n nextIndex < focusableElements.length &&\n focusableElements[nextIndex]\n ) {\n focusableElements[nextIndex].focus();\n }\n }\n\n trapFocus(element: HTMLElement) {\n const focusableElements = element.querySelectorAll(\n 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])',\n ) as NodeListOf<HTMLElement>;\n const firstFocusable = focusableElements[0];\n const lastFocusable = focusableElements[focusableElements.length - 1];\n\n this.focusTrapHandler = (e: KeyboardEvent) => {\n if (e.key === \"Tab\") {\n if (e.shiftKey) {\n if (document.activeElement === firstFocusable) {\n e.preventDefault();\n lastFocusable.focus();\n }\n } else {\n if (document.activeElement === lastFocusable) {\n e.preventDefault();\n firstFocusable.focus();\n }\n }\n }\n };\n\n element.addEventListener(\"keydown\", this.focusTrapHandler);\n }\n\n removeFocusTrap() {\n if (this.mobileMenu && this.focusTrapHandler) {\n this.mobileMenu.removeEventListener(\"keydown\", this.focusTrapHandler);\n }\n }\n\n updateTabIndices() {\n // Set tabindex=-1 for inactive dropdown items\n this.dropdowns.forEach((dropdown) => {\n const isVisible = dropdown.classList.contains(\"is-visible\");\n const focusableElements = dropdown.querySelectorAll(\n \"a, button, [tabindex]:not([tabindex='-1'])\",\n ) as NodeListOf<HTMLElement>;\n\n focusableElements.forEach((element) => {\n // Only update tabIndex if element is not already properly set\n const shouldBeFocusable = isVisible;\n if (shouldBeFocusable && element.tabIndex === -1) {\n element.tabIndex = 0;\n } else if (!shouldBeFocusable && element.tabIndex !== -1) {\n element.tabIndex = -1;\n }\n });\n });\n\n // Also update mobile menu elements when mobile menu is active\n if (this.mobileMenu) {\n const isMobileMenuActive = this.mobileMenu.classList.contains(\n this.config.activeClass,\n );\n const mobileMenuFocusableElements = this.mobileMenu.querySelectorAll(\n \"a, button, [tabindex]:not([tabindex='-1'])\",\n ) as NodeListOf<HTMLElement>;\n\n mobileMenuFocusableElements.forEach((element) => {\n element.tabIndex = isMobileMenuActive ? 0 : -1;\n });\n }\n }\n\n destroy() {\n // Remove event listeners\n this.toggleButtons.forEach((button) => {\n button.removeEventListener(\"click\", this.handleToggleClick);\n });\n\n // Remove mobile menu event listeners\n if (this.mobileMenuButton) {\n this.mobileMenuButton.removeEventListener(\n \"click\",\n this.handleMobileMenuToggle.bind(this),\n );\n }\n if (this.mobileOverlay) {\n this.mobileOverlay.removeEventListener(\n \"click\",\n this.closeMobileMenu.bind(this),\n );\n }\n if (this.mobileCloseButton) {\n this.mobileCloseButton.removeEventListener(\n \"click\",\n this.closeMobileMenu.bind(this),\n );\n }\n\n // Remove desktop overlay event listener\n if (this.desktopOverlay) {\n this.desktopOverlay.removeEventListener(\n \"click\",\n this.closeAllDropdowns.bind(this),\n );\n }\n\n // Remove accordion event listeners\n this.accordionButtons.forEach((button) => {\n button.removeEventListener(\"click\", this.handleAccordionClick);\n });\n\n this.element.removeEventListener(\"keydown\", this.handleKeyPress);\n window.removeEventListener(\"scroll\", this.handleScroll);\n\n // Remove keyboard tracking event listeners\n this.element.removeEventListener(\"keydown\", this.keydownHandler);\n this.element.removeEventListener(\"mousedown\", this.mousedownHandler);\n this.element.removeEventListener(\"touchstart\", this.touchstartHandler);\n\n // Restore body overflow if menu was open\n document.body.style.overflow = \"\";\n\n // Clean up instance reference\n (this.element as any).ODS_Megamenu = null;\n\n if (this.config.removeOnDestroy) {\n this.element.remove();\n }\n }\n}\n","(function(factory) {\r\n if (typeof define === \"function\" && define.amd) {\r\n // AMD. Register as an anonymous module.\r\n define([], factory);\r\n } else if (typeof exports === \"object\") {\r\n // Node/CommonJS\r\n module.exports = factory();\r\n } else {\r\n // Browser globals\r\n window.wNumb = factory();\r\n }\r\n})(function() {\r\n \"use strict\";\r\n\r\n var FormatOptions = [\r\n \"decimals\",\r\n \"thousand\",\r\n \"mark\",\r\n \"prefix\",\r\n \"suffix\",\r\n \"encoder\",\r\n \"decoder\",\r\n \"negativeBefore\",\r\n \"negative\",\r\n \"edit\",\r\n \"undo\"\r\n ];\r\n\r\n // General\r\n\r\n // Reverse a string\r\n function strReverse(a) {\r\n return a\r\n .split(\"\")\r\n .reverse()\r\n .join(\"\");\r\n }\r\n\r\n // Check if a string starts with a specified prefix.\r\n function strStartsWith(input, match) {\r\n return input.substring(0, match.length) === match;\r\n }\r\n\r\n // Check is a string ends in a specified suffix.\r\n function strEndsWith(input, match) {\r\n return input.slice(-1 * match.length) === match;\r\n }\r\n\r\n // Throw an error if formatting options are incompatible.\r\n function throwEqualError(F, a, b) {\r\n if ((F[a] || F[b]) && F[a] === F[b]) {\r\n throw new Error(a);\r\n }\r\n }\r\n\r\n // Check if a number is finite and not NaN\r\n function isValidNumber(input) {\r\n return typeof input === \"number\" && isFinite(input);\r\n }\r\n\r\n // Provide rounding-accurate toFixed method.\r\n // Borrowed: http://stackoverflow.com/a/21323330/775265\r\n function toFixed(value, exp) {\r\n value = value.toString().split(\"e\");\r\n value = Math.round(+(value[0] + \"e\" + (value[1] ? +value[1] + exp : exp)));\r\n value = value.toString().split(\"e\");\r\n return (+(value[0] + \"e\" + (value[1] ? +value[1] - exp : -exp))).toFixed(exp);\r\n }\r\n\r\n // Formatting\r\n\r\n // Accept a number as input, output formatted string.\r\n function formatTo(\r\n decimals,\r\n thousand,\r\n mark,\r\n prefix,\r\n suffix,\r\n encoder,\r\n decoder,\r\n negativeBefore,\r\n negative,\r\n edit,\r\n undo,\r\n input\r\n ) {\r\n var originalInput = input,\r\n inputIsNegative,\r\n inputPieces,\r\n inputBase,\r\n inputDecimals = \"\",\r\n output = \"\";\r\n\r\n // Apply user encoder to the input.\r\n // Expected outcome: number.\r\n if (encoder) {\r\n input = encoder(input);\r\n }\r\n\r\n // Stop if no valid number was provided, the number is infinite or NaN.\r\n if (!isValidNumber(input)) {\r\n return false;\r\n }\r\n\r\n // Rounding away decimals might cause a value of -0\r\n // when using very small ranges. Remove those cases.\r\n if (decimals !== false && parseFloat(input.toFixed(decimals)) === 0) {\r\n input = 0;\r\n }\r\n\r\n // Formatting is done on absolute numbers,\r\n // decorated by an optional negative symbol.\r\n if (input < 0) {\r\n inputIsNegative = true;\r\n input = Math.abs(input);\r\n }\r\n\r\n // Reduce the number of decimals to the specified option.\r\n if (decimals !== false) {\r\n input = toFixed(input, decimals);\r\n }\r\n\r\n // Transform the number into a string, so it can be split.\r\n input = input.toString();\r\n\r\n // Break the number on the decimal separator.\r\n if (input.indexOf(\".\") !== -1) {\r\n inputPieces = input.split(\".\");\r\n\r\n inputBase = inputPieces[0];\r\n\r\n if (mark) {\r\n inputDecimals = mark + inputPieces[1];\r\n }\r\n } else {\r\n // If it isn't split, the entire number will do.\r\n inputBase = input;\r\n }\r\n\r\n // Group numbers in sets of three.\r\n if (thousand) {\r\n inputBase = strReverse(inputBase).match(/.{1,3}/g);\r\n inputBase = strReverse(inputBase.join(strReverse(thousand)));\r\n }\r\n\r\n // If the number is negative, prefix with negation symbol.\r\n if (inputIsNegative && negativeBefore) {\r\n output += negativeBefore;\r\n }\r\n\r\n // Prefix the number\r\n if (prefix) {\r\n output += prefix;\r\n }\r\n\r\n // Normal negative option comes after the prefix. Defaults to '-'.\r\n if (inputIsNegative && negative) {\r\n output += negative;\r\n }\r\n\r\n // Append the actual number.\r\n output += inputBase;\r\n output += inputDecimals;\r\n\r\n // Apply the suffix.\r\n if (suffix) {\r\n output += suffix;\r\n }\r\n\r\n // Run the output through a user-specified post-formatter.\r\n if (edit) {\r\n output = edit(output, originalInput);\r\n }\r\n\r\n // All done.\r\n return output;\r\n }\r\n\r\n // Accept a sting as input, output decoded number.\r\n function formatFrom(\r\n decimals,\r\n thousand,\r\n mark,\r\n prefix,\r\n suffix,\r\n encoder,\r\n decoder,\r\n negativeBefore,\r\n negative,\r\n edit,\r\n undo,\r\n input\r\n ) {\r\n var originalInput = input,\r\n inputIsNegative,\r\n output = \"\";\r\n\r\n // User defined pre-decoder. Result must be a non empty string.\r\n if (undo) {\r\n input = undo(input);\r\n }\r\n\r\n // Test the input. Can't be empty.\r\n if (!input || typeof input !== \"string\") {\r\n return false;\r\n }\r\n\r\n // If the string starts with the negativeBefore value: remove it.\r\n // Remember is was there, the number is negative.\r\n if (negativeBefore && strStartsWith(input, negativeBefore)) {\r\n input = input.replace(negativeBefore, \"\");\r\n inputIsNegative = true;\r\n }\r\n\r\n // Repeat the same procedure for the prefix.\r\n if (prefix && strStartsWith(input, prefix)) {\r\n input = input.replace(prefix, \"\");\r\n }\r\n\r\n // And again for negative.\r\n if (negative && strStartsWith(input, negative)) {\r\n input = input.replace(negative, \"\");\r\n inputIsNegative = true;\r\n }\r\n\r\n // Remove the suffix.\r\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice\r\n if (suffix && strEndsWith(input, suffix)) {\r\n input = input.slice(0, -1 * suffix.length);\r\n }\r\n\r\n // Remove the thousand grouping.\r\n if (thousand) {\r\n input = input.split(thousand).join(\"\");\r\n }\r\n\r\n // Set the decimal separator back to period.\r\n if (mark) {\r\n input = input.replace(mark, \".\");\r\n }\r\n\r\n // Prepend the negative symbol.\r\n if (inputIsNegative) {\r\n output += \"-\";\r\n }\r\n\r\n // Add the number\r\n output += input;\r\n\r\n // Trim all non-numeric characters (allow '.' and '-');\r\n output = output.replace(/[^0-9\\.\\-.]/g, \"\");\r\n\r\n // The value contains no parse-able number.\r\n if (output === \"\") {\r\n return false;\r\n }\r\n\r\n // Covert to number.\r\n output = Number(output);\r\n\r\n // Run the user-specified post-decoder.\r\n if (decoder) {\r\n output = decoder(output);\r\n }\r\n\r\n // Check is the output is valid, otherwise: return false.\r\n if (!isValidNumber(output)) {\r\n return false;\r\n }\r\n\r\n return output;\r\n }\r\n\r\n // Framework\r\n\r\n // Validate formatting options\r\n function validate(inputOptions) {\r\n var i,\r\n optionName,\r\n optionValue,\r\n filteredOptions = {};\r\n\r\n if (inputOptions[\"suffix\"] === undefined) {\r\n inputOptions[\"suffix\"] = inputOptions[\"postfix\"];\r\n }\r\n\r\n for (i = 0; i < FormatOptions.length; i += 1) {\r\n optionName = FormatOptions[i];\r\n optionValue = inputOptions[optionName];\r\n\r\n if (optionValue === undefined) {\r\n // Only default if negativeBefore isn't set.\r\n if (optionName === \"negative\" && !filteredOptions.negativeBefore) {\r\n filteredOptions[optionName] = \"-\";\r\n // Don't set a default for mark when 'thousand' is set.\r\n } else if (optionName === \"mark\" && filteredOptions.thousand !== \".\") {\r\n filteredOptions[optionName] = \".\";\r\n } else {\r\n filteredOptions[optionName] = false;\r\n }\r\n\r\n // Floating points in JS are stable up to 7 decimals.\r\n } else if (optionName === \"decimals\") {\r\n if (optionValue >= 0 && optionValue < 8) {\r\n filteredOptions[optionName] = optionValue;\r\n } else {\r\n throw new Error(optionName);\r\n }\r\n\r\n // These options, when provided, must be functions.\r\n } else if (\r\n optionName === \"encoder\" ||\r\n optionName === \"decoder\" ||\r\n optionName === \"edit\" ||\r\n optionName === \"undo\"\r\n ) {\r\n if (typeof optionValue === \"function\") {\r\n filteredOptions[optionName] = optionValue;\r\n } else {\r\n throw new Error(optionName);\r\n }\r\n\r\n // Other options are strings.\r\n } else {\r\n if (typeof optionValue === \"string\") {\r\n filteredOptions[optionName] = optionValue;\r\n } else {\r\n throw new Error(optionName);\r\n }\r\n }\r\n }\r\n\r\n // Some values can't be extracted from a\r\n // string if certain combinations are present.\r\n throwEqualError(filteredOptions, \"mark\", \"thousand\");\r\n throwEqualError(filteredOptions, \"prefix\", \"negative\");\r\n throwEqualError(filteredOptions, \"prefix\", \"negativeBefore\");\r\n\r\n return filteredOptions;\r\n }\r\n\r\n // Pass all options as function arguments\r\n function passAll(options, method, input) {\r\n var i,\r\n args = [];\r\n\r\n // Add all options in order of FormatOptions\r\n for (i = 0; i < FormatOptions.length; i += 1) {\r\n args.push(options[FormatOptions[i]]);\r\n }\r\n\r\n // Append the input, then call the method, presenting all\r\n // options as arguments.\r\n args.push(input);\r\n return method.apply(\"\", args);\r\n }\r\n\r\n function wNumb(options) {\r\n if (!(this instanceof wNumb)) {\r\n return new wNumb(options);\r\n }\r\n\r\n if (typeof options !== \"object\") {\r\n return;\r\n }\r\n\r\n options = validate(options);\r\n\r\n // Call 'formatTo' with proper arguments.\r\n this.to = function(input) {\r\n return passAll(options, formatTo, input);\r\n };\r\n\r\n // Call 'formatFrom' with proper arguments.\r\n this.from = function(input) {\r\n return passAll(options, formatFrom, input);\r\n };\r\n }\r\n\r\n return wNumb;\r\n});\r\n","import Megamenu from \"./Megamenu.static\";\nimport moduleFactory, {\n initModulesWithin,\n destroyModulesWithin,\n} from \"../../scripts/lib/moduleFactory\";\nimport \"./styles/style.scss\";\n\n// Module configuration for Megamenu\nexport const customMegamenuModuleSelectorPairs = [\n {\n Module: Megamenu,\n name: \"Megamenu\",\n selector: \"[data-megamenu]\",\n },\n];\n\n// Global interface for standalone Megamenu\ndeclare global {\n interface Window {\n ODSMegamenu: {\n Megamenu: typeof Megamenu;\n instances: Megamenu[];\n init: () => void;\n destroy: () => void;\n initModulesWithin: typeof initModulesWithin;\n destroyModulesWithin: typeof destroyModulesWithin;\n };\n }\n}\n\n// Initialize the global ODSMegamenu object\nwindow.ODSMegamenu = window.ODSMegamenu || {\n Megamenu,\n instances: [],\n init: () => {\n // Debug logging\n const elements = document.querySelectorAll(\"[data-megamenu]\");\n console.log(\"Found elements with data-megamenu:\", elements.length);\n\n // Initialize all Megamenu instances on the page\n window.ODSMegamenu.instances = moduleFactory(Megamenu, \"[data-megamenu]\");\n console.log(\n \"ODSMegamenu instances created:\",\n window.ODSMegamenu.instances.length,\n );\n console.log(\"ODSMegamenu loaded and initialized\");\n },\n destroy: () => {\n // Destroy all instances\n window.ODSMegamenu.instances.forEach((instance) => {\n if (instance && typeof instance.destroy === \"function\") {\n instance.destroy();\n }\n });\n window.ODSMegamenu.instances = [];\n },\n initModulesWithin,\n destroyModulesWithin,\n};\n\n// Auto-initialize when DOM is ready\nif (document.readyState === \"loading\") {\n document.addEventListener(\"DOMContentLoaded\", () => {\n window.ODSMegamenu.init();\n });\n} else {\n // DOM is already ready\n window.ODSMegamenu.init();\n}\n\n// Export for potential manual usage\nexport { Megamenu };\nexport default Megamenu;\n","import { lowerCamelCase } from \"../../utils/helpers\";\n\nexport default function moduleFactory(Module, selector, options = {}) {\n const elements = Array.from(document.querySelectorAll(selector));\n\n return elements.map((element) => new Module(element, options));\n}\n\nexport function destroyModulesWithin(container, removeOrphanedNodes = false) {\n const destroyedInstances = {};\n\n Object.keys(window.ODS.instances).forEach((moduleName) => {\n window.ODS.instances[moduleName].forEach((instance) => {\n if (typeof destroyedInstances[moduleName] !== \"object\") {\n destroyedInstances[moduleName] = [];\n }\n\n let isInContainer = container.contains(instance.element);\n if (moduleName === \"modal\") {\n isInContainer = instance.instance?._openers.every((opener) =>\n container.contains(opener),\n );\n } else if (moduleName === \"tooltip\") {\n isInContainer = container.contains(instance.trigger);\n }\n\n if (isInContainer) {\n instance.destroy();\n destroyedInstances[moduleName].push(instance);\n }\n\n if (\n isInContainer &&\n removeOrphanedNodes &&\n [\"modal\", \"tooltip\"].includes(moduleName)\n ) {\n instance.element.remove();\n }\n });\n\n window.ODS.instances[moduleName] = window.ODS.instances[moduleName].filter(\n (instance) => !destroyedInstances[moduleName].includes(instance),\n );\n });\n\n return destroyedInstances;\n}\n\nexport function initModulesWithin(container) {\n const instances = {};\n window.ODS.moduleSelectorPairs.forEach((module) => {\n const name = lowerCamelCase(module.name);\n const elements = Array.from(container.querySelectorAll(module.selector));\n if (window && window.ODS && window.ODS.instances[name]) {\n window.ODS.instances[name].forEach((instance) => {\n elements.forEach((element, index) => {\n if (element.isSameNode(instance.element)) {\n elements.splice(index, 1);\n }\n });\n });\n }\n if (elements.length) {\n if (!Array.isArray(window.ODS.instances[name])) {\n window.ODS.instances[name] = [];\n }\n instances[name] = elements.map((element) => new module.Module(element));\n window.ODS.instances[name] = [\n ...window.ODS.instances[name],\n ...instances[name],\n ];\n }\n });\n return instances;\n}\n","import wnumb from 'wnumb';\n\nexport function isObject(val) {\n return val != null && typeof val === 'object' && Array.isArray(val) === false;\n}\n\nexport function dateToYYYYMMDD(date) {\n if (!date || !(date instanceof Date)) {\n return '';\n }\n\n return `${date.getFullYear()}-${(date.getMonth() + 1)\n .toString()\n .padStart(2, '0')}-${date.getDate().toString().padStart(2, '0')}`;\n}\n\n// Get element position relative to document\nexport function windowOffset(el) {\n const position = { x: 0, y: 0 };\n\n \n if (el.offsetParent) {\n do {\n position.x += el.offsetLeft;\n position.y += el.offsetTop;\n } while ((el = el.offsetParent));\n }\n \n\n return position;\n}\n\n// Get element siblings\nexport function getSiblings(el) {\n if (!(el instanceof Element)) {\n return false;\n }\n\n const parent = el.parentNode;\n if (!parent) {\n return false;\n }\n\n const parentChildren = [];\n const siblings = [];\n\n parentChildren.push.apply(parentChildren, parent.children); \n\n for (let i = 0, l = parentChildren.length; i < l; i += 1) {\n if (parentChildren[i] !== el) {\n siblings.push(parentChildren[i]);\n }\n }\n\n return siblings;\n}\n\n/**\n * Converts object to string\n *\n * Should be able to handle all types\n * objectToString({\n * 'boolean': true,\n * 'function': () => { return 'test'; },\n * 'namedfunction': function test() { return 'test'; },\n * 'null': null,\n * 'number1': 1,\n * 'number2': 2.345,\n * 'object1': { test: 'test' },\n * 'string': 'String',\n * 'undefined' : undefined,\n * })\n *\n * @param {object} object object to convert\n * @returns object converted to string\n */\nexport const objectToString = (object, spaceCount = 2) => {\n let str = '';\n for (var key in object) {\n if (object.hasOwnProperty(key)) {\n let value = object?.[key];\n if (typeof value === 'string') {\n value = `\"${value}\"`;\n } else if (value === null) {\n value = 'null';\n } else if (typeof value === 'object') {\n value = objectToString(value, spaceCount + 2);\n } else if (typeof value === 'function') {\n value = value.toString();\n } else if (value === undefined) {\n value = 'undefined';\n }\n str += `${' '.repeat(spaceCount)}${key}: ${value},\\n`;\n }\n }\n return `{\\n${str}${' '.repeat(spaceCount - 2)}}`;\n};\nexport function capitalize(string) {\n return string.charAt(0).toUpperCase() + string.slice(1);\n}\n\nexport function lowerCamelCase(string) {\n return string.charAt(0).toLowerCase() + string.slice(1);\n}\n\nconst defaultPriceFormat = {\n decimals: 2,\n mark: ',',\n thousand: ' ',\n suffix: `\\xa0€`,\n};\n\nexport function formatPrice(price, format) {\n return wnumb({\n ...defaultPriceFormat,\n ...format,\n ...(price % 1 === 0 ? { decimals: 0 } : {}), // integers without decimals\n }).to(price);\n}\n"],"names":["CLASS_ROOT","CLASS_NAV_BUTTON","concat","CLASS_NAV_DROPDOWN","CLASS_OVERLAY","CLASS_HIDE_LG_UP","CLASS_MOBILE","CLASS_MOBILE_OVERLAY","CLASS_ACCORDION_BUTTON","CLASS_ACCORDION_ICON","defaultConfig","dataToggle","activeClass","removeOnDestroy","Megamenu","element","config","arguments","length","undefined","_classCallCheck","ODS_Megamenu","this","Object","assign","handleToggleClick","bind","handleKeyPress","handleScroll","handleAccordionClick","handleArrowNavigation","trapFocus","init","key","value","_this","toggleButtons","querySelectorAll","dropdowns","mobileMenuButton","querySelector","mobileMenu","mobileOverlay","mobileCloseButton","desktopOverlay","accordionButtons","forEach","button","addEventListener","handleMobileMenuToggle","closeMobileMenu","closeAllDropdowns","window","isKeyboardUser","keydownHandler","e","mousedownHandler","touchstartHandler","updateTabIndices","event","currentTarget","isActive","classList","contains","focus","openDropdown","activeButton","Array","from","find","getAttribute","closeAllAccordions","target","tagName","hasAttribute","preventDefault","click","dropdown","_a","closest","focusableElements","_b","parentElement","firstFocusable","_c","isExpanded","openAccordion","topElement","scrollY","add","remove","setAttribute","style","display","showDesktopOverlay","_this2","closeDropdown","hideDesktopOverlay","openMobileMenu","lastFocusedElement","document","activeElement","body","overflow","setTimeout","removeFocusTrap","accordionId","accordionBody","icon","_this3","closeAccordion","nextIndex","currentIndex","findIndex","item","lastFocusable","focusTrapHandler","shiftKey","removeEventListener","isVisible","shouldBeFocusable","tabIndex","isMobileMenuActive","_this4","el","exports","FormatOptions","strReverse","a","split","reverse","join","strStartsWith","input","match","substring","strEndsWith","slice","throwEqualError","F","b","Error","isValidNumber","isFinite","toFixed","exp","toString","Math","round","formatTo","decimals","thousand","mark","prefix","suffix","encoder","decoder","negativeBefore","negative","edit","undo","inputIsNegative","inputPieces","inputBase","originalInput","inputDecimals","output","parseFloat","abs","indexOf","formatFrom","replace","Number","validate","inputOptions","i","optionName","optionValue","filteredOptions","passAll","options","method","args","push","apply","wNumb","to","factory","customMegamenuModuleSelectorPairs","Module","name","selector","ODSMegamenu","instances","elements","console","log","map","moduleFactory","destroy","instance","initModulesWithin","container","ODS","moduleSelectorPairs","module","string","charAt","toLowerCase","index","isSameNode","splice","isArray","_toConsumableArray","destroyModulesWithin","removeOrphanedNodes","destroyedInstances","keys","moduleName","_typeof","isInContainer","_openers","every","opener","trigger","includes","filter","readyState"],"mappings":"g5CAAO,MAAMA,EAAa,WAkBbC,EAAgB,GAAAC,OAAMF,EAAU,gBAEhCG,EAAkB,GAAAD,OAAMF,EAAU,kBAGlCI,EAAa,GAAAF,OAAMF,EAAU,aAM7BK,EAAgB,GAAAH,OAAMF,EAAU,gBAGhCM,EAAY,GAAAJ,OAAMF,EAAU,YAC5BO,EAAoB,GAAAL,OAAMF,EAAU,oBASpCQ,EAAsB,GAAAN,OAAMF,EAAU,sBAEtCS,EAAoB,GAAAP,OAAMF,EAAU,oBC3B3CU,EAA0C,CAC9CC,WAAY,cACZC,YAAa,YACbC,iBAAiB,GAGEC,EAAQ,WAqC1B,SAnBD,SAAAA,EAAYC,GAAiD,IAA3BC,EAAAC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAyB,CAAA,EACzD,mGAD2DG,MAAAN,GACtDC,EAAgBM,aACXN,EAAgBM,cAG1BC,KAAKP,QAAUA,EACfO,KAAKN,OAAMO,OAAAC,OAAAD,OAAAC,OAAA,CAAA,EAAQd,GAAkBM,GAErCM,KAAKG,kBAAoBH,KAAKG,kBAAkBC,KAAKJ,MACrDA,KAAKK,eAAiBL,KAAKK,eAAeD,KAAKJ,MAC/CA,KAAKM,aAAeN,KAAKM,aAAaF,KAAKJ,MAC3CA,KAAKO,qBAAuBP,KAAKO,qBAAqBH,KAAKJ,MAC3DA,KAAKQ,sBAAwBR,KAAKQ,sBAAsBJ,KAAKJ,MAC7DA,KAAKS,UAAYT,KAAKS,UAAUL,KAAKJ,MAEpCA,KAAKP,QAAgBM,aAAeC,KAErCA,KAAKU,OACEV,KACT,IAAC,CAAA,CAAAW,IAAA,OAAAC,MAMD,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SAASC,MAAM,SAACC,GAAM,OACvDrB,EAAU3I,SAASgK,EAAO,GAEJ,YAAfL,IACTE,EAAgBlB,EAAU3I,SAASyI,EAASwB,UAG1CJ,IACFpB,EAASD,UACTiB,EAAmBE,GAAYnC,KAAKiB,IAIpCoB,GACAL,GACA,CAAC,QAAS,WAAWU,SAASP,IAE9BlB,EAASzL,QAAQ2E,QAErB,GAEAtC,OAAOuJ,IAAIV,UAAUyB,GAActK,OAAOuJ,IAAIV,UAAUyB,GAAYQ,OAClE,SAAC1B,GAAQ,OAAMgB,EAAmBE,GAAYO,SAASzB,EAAS,EAEpE,GAEOgB,CACT,GDe4B,YAAxBpH,SAAS+H,WACX/H,SAASpD,iBAAiB,mBAAoB,WAC5CI,OAAO4I,YAAYhK,MACrB,GAGAoB,OAAO4I,YAAYhK","x_google_ignoreList":[2]}
|
|
1
|
+
{"version":3,"file":"megamenu.js","sources":["../../node_modules/.pnpm/wnumb@1.2.0/node_modules/wnumb/wNumb.js","../../../../src/components/Megamenu/constants.ts","../../../../src/components/Megamenu/Megamenu.static.ts","../../../../src/components/Megamenu/static.ts","../../../../src/scripts/lib/moduleFactory.js","../../src/utils/helpers.js"],"sourcesContent":["(function(factory) {\r\n if (typeof define === \"function\" && define.amd) {\r\n // AMD. Register as an anonymous module.\r\n define([], factory);\r\n } else if (typeof exports === \"object\") {\r\n // Node/CommonJS\r\n module.exports = factory();\r\n } else {\r\n // Browser globals\r\n window.wNumb = factory();\r\n }\r\n})(function() {\r\n \"use strict\";\r\n\r\n var FormatOptions = [\r\n \"decimals\",\r\n \"thousand\",\r\n \"mark\",\r\n \"prefix\",\r\n \"suffix\",\r\n \"encoder\",\r\n \"decoder\",\r\n \"negativeBefore\",\r\n \"negative\",\r\n \"edit\",\r\n \"undo\"\r\n ];\r\n\r\n // General\r\n\r\n // Reverse a string\r\n function strReverse(a) {\r\n return a\r\n .split(\"\")\r\n .reverse()\r\n .join(\"\");\r\n }\r\n\r\n // Check if a string starts with a specified prefix.\r\n function strStartsWith(input, match) {\r\n return input.substring(0, match.length) === match;\r\n }\r\n\r\n // Check is a string ends in a specified suffix.\r\n function strEndsWith(input, match) {\r\n return input.slice(-1 * match.length) === match;\r\n }\r\n\r\n // Throw an error if formatting options are incompatible.\r\n function throwEqualError(F, a, b) {\r\n if ((F[a] || F[b]) && F[a] === F[b]) {\r\n throw new Error(a);\r\n }\r\n }\r\n\r\n // Check if a number is finite and not NaN\r\n function isValidNumber(input) {\r\n return typeof input === \"number\" && isFinite(input);\r\n }\r\n\r\n // Provide rounding-accurate toFixed method.\r\n // Borrowed: http://stackoverflow.com/a/21323330/775265\r\n function toFixed(value, exp) {\r\n value = value.toString().split(\"e\");\r\n value = Math.round(+(value[0] + \"e\" + (value[1] ? +value[1] + exp : exp)));\r\n value = value.toString().split(\"e\");\r\n return (+(value[0] + \"e\" + (value[1] ? +value[1] - exp : -exp))).toFixed(exp);\r\n }\r\n\r\n // Formatting\r\n\r\n // Accept a number as input, output formatted string.\r\n function formatTo(\r\n decimals,\r\n thousand,\r\n mark,\r\n prefix,\r\n suffix,\r\n encoder,\r\n decoder,\r\n negativeBefore,\r\n negative,\r\n edit,\r\n undo,\r\n input\r\n ) {\r\n var originalInput = input,\r\n inputIsNegative,\r\n inputPieces,\r\n inputBase,\r\n inputDecimals = \"\",\r\n output = \"\";\r\n\r\n // Apply user encoder to the input.\r\n // Expected outcome: number.\r\n if (encoder) {\r\n input = encoder(input);\r\n }\r\n\r\n // Stop if no valid number was provided, the number is infinite or NaN.\r\n if (!isValidNumber(input)) {\r\n return false;\r\n }\r\n\r\n // Rounding away decimals might cause a value of -0\r\n // when using very small ranges. Remove those cases.\r\n if (decimals !== false && parseFloat(input.toFixed(decimals)) === 0) {\r\n input = 0;\r\n }\r\n\r\n // Formatting is done on absolute numbers,\r\n // decorated by an optional negative symbol.\r\n if (input < 0) {\r\n inputIsNegative = true;\r\n input = Math.abs(input);\r\n }\r\n\r\n // Reduce the number of decimals to the specified option.\r\n if (decimals !== false) {\r\n input = toFixed(input, decimals);\r\n }\r\n\r\n // Transform the number into a string, so it can be split.\r\n input = input.toString();\r\n\r\n // Break the number on the decimal separator.\r\n if (input.indexOf(\".\") !== -1) {\r\n inputPieces = input.split(\".\");\r\n\r\n inputBase = inputPieces[0];\r\n\r\n if (mark) {\r\n inputDecimals = mark + inputPieces[1];\r\n }\r\n } else {\r\n // If it isn't split, the entire number will do.\r\n inputBase = input;\r\n }\r\n\r\n // Group numbers in sets of three.\r\n if (thousand) {\r\n inputBase = strReverse(inputBase).match(/.{1,3}/g);\r\n inputBase = strReverse(inputBase.join(strReverse(thousand)));\r\n }\r\n\r\n // If the number is negative, prefix with negation symbol.\r\n if (inputIsNegative && negativeBefore) {\r\n output += negativeBefore;\r\n }\r\n\r\n // Prefix the number\r\n if (prefix) {\r\n output += prefix;\r\n }\r\n\r\n // Normal negative option comes after the prefix. Defaults to '-'.\r\n if (inputIsNegative && negative) {\r\n output += negative;\r\n }\r\n\r\n // Append the actual number.\r\n output += inputBase;\r\n output += inputDecimals;\r\n\r\n // Apply the suffix.\r\n if (suffix) {\r\n output += suffix;\r\n }\r\n\r\n // Run the output through a user-specified post-formatter.\r\n if (edit) {\r\n output = edit(output, originalInput);\r\n }\r\n\r\n // All done.\r\n return output;\r\n }\r\n\r\n // Accept a sting as input, output decoded number.\r\n function formatFrom(\r\n decimals,\r\n thousand,\r\n mark,\r\n prefix,\r\n suffix,\r\n encoder,\r\n decoder,\r\n negativeBefore,\r\n negative,\r\n edit,\r\n undo,\r\n input\r\n ) {\r\n var originalInput = input,\r\n inputIsNegative,\r\n output = \"\";\r\n\r\n // User defined pre-decoder. Result must be a non empty string.\r\n if (undo) {\r\n input = undo(input);\r\n }\r\n\r\n // Test the input. Can't be empty.\r\n if (!input || typeof input !== \"string\") {\r\n return false;\r\n }\r\n\r\n // If the string starts with the negativeBefore value: remove it.\r\n // Remember is was there, the number is negative.\r\n if (negativeBefore && strStartsWith(input, negativeBefore)) {\r\n input = input.replace(negativeBefore, \"\");\r\n inputIsNegative = true;\r\n }\r\n\r\n // Repeat the same procedure for the prefix.\r\n if (prefix && strStartsWith(input, prefix)) {\r\n input = input.replace(prefix, \"\");\r\n }\r\n\r\n // And again for negative.\r\n if (negative && strStartsWith(input, negative)) {\r\n input = input.replace(negative, \"\");\r\n inputIsNegative = true;\r\n }\r\n\r\n // Remove the suffix.\r\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice\r\n if (suffix && strEndsWith(input, suffix)) {\r\n input = input.slice(0, -1 * suffix.length);\r\n }\r\n\r\n // Remove the thousand grouping.\r\n if (thousand) {\r\n input = input.split(thousand).join(\"\");\r\n }\r\n\r\n // Set the decimal separator back to period.\r\n if (mark) {\r\n input = input.replace(mark, \".\");\r\n }\r\n\r\n // Prepend the negative symbol.\r\n if (inputIsNegative) {\r\n output += \"-\";\r\n }\r\n\r\n // Add the number\r\n output += input;\r\n\r\n // Trim all non-numeric characters (allow '.' and '-');\r\n output = output.replace(/[^0-9\\.\\-.]/g, \"\");\r\n\r\n // The value contains no parse-able number.\r\n if (output === \"\") {\r\n return false;\r\n }\r\n\r\n // Covert to number.\r\n output = Number(output);\r\n\r\n // Run the user-specified post-decoder.\r\n if (decoder) {\r\n output = decoder(output);\r\n }\r\n\r\n // Check is the output is valid, otherwise: return false.\r\n if (!isValidNumber(output)) {\r\n return false;\r\n }\r\n\r\n return output;\r\n }\r\n\r\n // Framework\r\n\r\n // Validate formatting options\r\n function validate(inputOptions) {\r\n var i,\r\n optionName,\r\n optionValue,\r\n filteredOptions = {};\r\n\r\n if (inputOptions[\"suffix\"] === undefined) {\r\n inputOptions[\"suffix\"] = inputOptions[\"postfix\"];\r\n }\r\n\r\n for (i = 0; i < FormatOptions.length; i += 1) {\r\n optionName = FormatOptions[i];\r\n optionValue = inputOptions[optionName];\r\n\r\n if (optionValue === undefined) {\r\n // Only default if negativeBefore isn't set.\r\n if (optionName === \"negative\" && !filteredOptions.negativeBefore) {\r\n filteredOptions[optionName] = \"-\";\r\n // Don't set a default for mark when 'thousand' is set.\r\n } else if (optionName === \"mark\" && filteredOptions.thousand !== \".\") {\r\n filteredOptions[optionName] = \".\";\r\n } else {\r\n filteredOptions[optionName] = false;\r\n }\r\n\r\n // Floating points in JS are stable up to 7 decimals.\r\n } else if (optionName === \"decimals\") {\r\n if (optionValue >= 0 && optionValue < 8) {\r\n filteredOptions[optionName] = optionValue;\r\n } else {\r\n throw new Error(optionName);\r\n }\r\n\r\n // These options, when provided, must be functions.\r\n } else if (\r\n optionName === \"encoder\" ||\r\n optionName === \"decoder\" ||\r\n optionName === \"edit\" ||\r\n optionName === \"undo\"\r\n ) {\r\n if (typeof optionValue === \"function\") {\r\n filteredOptions[optionName] = optionValue;\r\n } else {\r\n throw new Error(optionName);\r\n }\r\n\r\n // Other options are strings.\r\n } else {\r\n if (typeof optionValue === \"string\") {\r\n filteredOptions[optionName] = optionValue;\r\n } else {\r\n throw new Error(optionName);\r\n }\r\n }\r\n }\r\n\r\n // Some values can't be extracted from a\r\n // string if certain combinations are present.\r\n throwEqualError(filteredOptions, \"mark\", \"thousand\");\r\n throwEqualError(filteredOptions, \"prefix\", \"negative\");\r\n throwEqualError(filteredOptions, \"prefix\", \"negativeBefore\");\r\n\r\n return filteredOptions;\r\n }\r\n\r\n // Pass all options as function arguments\r\n function passAll(options, method, input) {\r\n var i,\r\n args = [];\r\n\r\n // Add all options in order of FormatOptions\r\n for (i = 0; i < FormatOptions.length; i += 1) {\r\n args.push(options[FormatOptions[i]]);\r\n }\r\n\r\n // Append the input, then call the method, presenting all\r\n // options as arguments.\r\n args.push(input);\r\n return method.apply(\"\", args);\r\n }\r\n\r\n function wNumb(options) {\r\n if (!(this instanceof wNumb)) {\r\n return new wNumb(options);\r\n }\r\n\r\n if (typeof options !== \"object\") {\r\n return;\r\n }\r\n\r\n options = validate(options);\r\n\r\n // Call 'formatTo' with proper arguments.\r\n this.to = function(input) {\r\n return passAll(options, formatTo, input);\r\n };\r\n\r\n // Call 'formatFrom' with proper arguments.\r\n this.from = function(input) {\r\n return passAll(options, formatFrom, input);\r\n };\r\n }\r\n\r\n return wNumb;\r\n});\r\n","export const CLASS_ROOT = \"megamenu\";\n\nexport const CLASS_TOP = `${CLASS_ROOT}__top`;\nexport const CLASS_MAIN = `${CLASS_ROOT}__main`;\nexport const CLASS_SUBMAIN = `${CLASS_ROOT}__submain`;\nexport const CLASS_CONTAINER = `${CLASS_ROOT}__container`;\nexport const CLASS_GRID = `${CLASS_ROOT}__grid`;\nexport const CLASS_CARD = `${CLASS_ROOT}__card`;\nexport const CLASS_NAV = `${CLASS_ROOT}__nav`;\nexport const CLASS_NAV_VERTICAL = `${CLASS_ROOT}__nav--vertical`;\nexport const CLASS_NAV_SPACE_SMALL = `${CLASS_ROOT}__nav--space-small`;\nexport const CLASS_NAV_MOBILE_LOCALE = `${CLASS_ROOT}__nav--mobile-locale`;\nexport const CLASS_NAV_ITEM = `${CLASS_ROOT}__nav-item`;\nexport const CLASS_NAV_ITEM_LEAD = `${CLASS_ROOT}__nav-item--lead`;\nexport const CLASS_NAV_ITEM_MAIN = `${CLASS_ROOT}__nav-item--main`;\nexport const CLASS_NAV_LINK = `${CLASS_ROOT}__nav-link`;\nexport const CLASS_NAV_LINK_LOCALE = `${CLASS_ROOT}__nav-link--locale`;\nexport const CLASS_NAV_LINK_NO_LINE = `${CLASS_ROOT}__nav-link--no-line`;\nexport const CLASS_NAV_CART_ICON = `${CLASS_ROOT}__nav-cart-icon`;\nexport const CLASS_NAV_SPACER = `${CLASS_ROOT}__nav-spacer`;\nexport const CLASS_NAV_ICON = `${CLASS_ROOT}__nav-icon`;\nexport const CLASS_NAV_ICON_NO_GAP_MD_DOWN = `${CLASS_NAV_ICON}--no-gap-md-down`;\nexport const CLASS_NAV_LOGO = `${CLASS_ROOT}__nav-logo`;\nexport const CLASS_NAV_BUTTON = `${CLASS_ROOT}__nav-button`;\nexport const CLASS_NAV_BUTTON_INDICATOR = `${CLASS_ROOT}__nav-button--indicator`;\nexport const CLASS_NAV_DROPDOWN = `${CLASS_ROOT}__nav-dropdown`;\nexport const CLASS_SUBNAV = `${CLASS_ROOT}__subnav`;\nexport const CLASS_SUBNAV_ITEM = `${CLASS_ROOT}__subnav-item`;\nexport const CLASS_OVERLAY = `${CLASS_ROOT}__overlay`;\nexport const CLASS_SPACER = `${CLASS_ROOT}-spacer`;\nexport const CLASS_SPACER_SMALL = `${CLASS_ROOT}-spacer--small`;\n\nexport const CLASS_TEXT_LARGE = `${CLASS_ROOT}__text--large`;\nexport const CLASS_CAPTION = `${CLASS_ROOT}__caption`;\nexport const CLASS_CAPTION_LARGE = `${CLASS_ROOT}__caption--large`;\nexport const CLASS_HIDE_MD_DOWN = `${CLASS_ROOT}--hide-md-down`;\nexport const CLASS_HIDE_LG_UP = `${CLASS_ROOT}--hide-lg-up`;\nexport const CLASS_ALIGN_CENTER = `${CLASS_ROOT}--align-center`;\n\nexport const CLASS_MOBILE = `${CLASS_ROOT}__mobile`;\nexport const CLASS_MOBILE_OVERLAY = `${CLASS_ROOT}__mobile-overlay`;\nexport const CLASS_MOBILE_WRAPPER = `${CLASS_ROOT}__mobile-wrapper`;\nexport const CLASS_MOBILE_HEADER = `${CLASS_ROOT}__mobile-header`;\nexport const CLASS_MOBILE_BODY = `${CLASS_ROOT}__mobile-body`;\nexport const CLASS_MOBILE_ACCOUNT = `${CLASS_ROOT}__mobile-account`;\nexport const CLASS_MOBILE_ACCOUNT_AVATAR = `${CLASS_ROOT}__mobile-account-avatar`;\nexport const CLASS_MOBILE_ACCOUNT_NAME = `${CLASS_ROOT}__mobile-account-name`;\nexport const CLASS_MOBILE_ACCOUNT_PHONE = `${CLASS_ROOT}__mobile-account-phone`;\nexport const CLASS_MOBILE_ACCOUNT_LOGOUT = `${CLASS_ROOT}__mobile-account-logout`;\nexport const CLASS_MOBILE_ACCOUNT_CTA = `${CLASS_ROOT}__mobile-account-cta`;\nexport const CLASS_MOBILE_ACCOUNT_LINKS = `${CLASS_ROOT}__mobile-account-links`;\nexport const CLASS_MOBILE_ACCOUNT_LINK = `${CLASS_ROOT}__mobile-account-link`;\n\n// Accordion classes for mobile menu\nexport const CLASS_ACCORDION = `${CLASS_ROOT}__accordion`;\nexport const CLASS_ACCORDION_ITEM = `${CLASS_ROOT}__accordion-item`;\nexport const CLASS_ACCORDION_HEADER = `${CLASS_ROOT}__accordion-header`;\nexport const CLASS_ACCORDION_BUTTON = `${CLASS_ROOT}__accordion-button`;\nexport const CLASS_ACCORDION_TITLE = `${CLASS_ROOT}__accordion-title`;\nexport const CLASS_ACCORDION_ICON = `${CLASS_ROOT}__accordion-icon`;\nexport const CLASS_ACCORDION_BODY = `${CLASS_ROOT}__accordion-body`;\n\nexport const CLASS_INPUT = `${CLASS_ROOT}__input`;\nexport const CLASS_INPUT_WRAPPER = `${CLASS_ROOT}__input-wrapper`;\nexport const CLASS_INPUT_WRAPPER_SEARCH_ICON_WITH_PLACEHOLDER = `${CLASS_ROOT}__input-wrapper--search-icon-with-placeholder`;\nexport const CLASS_INPUT_WRAPPER_SEARCH_RESPONSIVE = `${CLASS_ROOT}__input-wrapper--search-responsive`;\nexport const CLASS_INPUT_SEARCH_ICON_WITH_PLACEHOLDER = `${CLASS_ROOT}__input--search-icon-with-placeholder`;\nexport const CLASS_INPUT_SEARCH_RESPONSIVE = `${CLASS_ROOT}__input--search-responsive`;\n\nexport const CLASS_TAG = `${CLASS_ROOT}__tag`;\nexport const CLASS_TAG_ORANGE = `${CLASS_ROOT}__tag--orange`;\nexport const CLASS_TAG_SMALL = `${CLASS_ROOT}__tag--small`;\nexport const CLASS_TAG_TRANSPARENT = `${CLASS_ROOT}__tag--transparent`;\nexport const CLASS_TAG_LARGE = `${CLASS_ROOT}__tag--large`;\n\nexport const CLASS_LIST_INLINE = `${CLASS_ROOT}__list--inline`;\nexport const CLASS_LIST_GAP_SMALL = `${CLASS_ROOT}__list--gap-small`;\n","import {\n CLASS_ACCORDION_BUTTON,\n CLASS_ACCORDION_ICON,\n CLASS_HIDE_LG_UP,\n CLASS_MOBILE,\n CLASS_MOBILE_OVERLAY,\n CLASS_NAV_BUTTON,\n CLASS_NAV_DROPDOWN,\n CLASS_OVERLAY,\n} from \"./constants\";\n\ninterface MegamenuConfig {\n dataToggle?: string;\n activeClass?: string;\n removeOnDestroy?: boolean;\n}\n\nconst MODAL_OPEN_CLASS = \"has-modal\";\nconst LOCKED_SCROLL_TOP_ATTR = \"data-lock-scrolltop\";\nconst BRAND_MARK_SELECTOR = \"[data-megamenu-brand-mark]\";\n\nconst defaultConfig: Required<MegamenuConfig> = {\n dataToggle: \"data-toggle\",\n activeClass: \"is-active\",\n removeOnDestroy: false,\n};\n\nexport default class Megamenu {\n element!: HTMLElement;\n config!: Required<MegamenuConfig>;\n toggleButtons!: NodeListOf<HTMLButtonElement>;\n dropdowns!: NodeListOf<HTMLElement>;\n mobileMenuButtons!: HTMLButtonElement[];\n mobilePanels!: HTMLElement[];\n mobileCloseButtons!: HTMLButtonElement[];\n activeMobilePanel!: HTMLElement | null;\n activeMobileTarget!: string | null;\n desktopOverlay!: HTMLButtonElement | null;\n accordionButtons!: NodeListOf<HTMLButtonElement>;\n desktopOverlayClickHandler!: (event: Event) => void;\n mobileCloseHandler!: (event: Event) => void;\n focusTrapHandler!: (event: KeyboardEvent) => void;\n focusTrapElement!: HTMLElement | null;\n lastFocusedElement!: HTMLElement | null;\n isKeyboardUser!: boolean;\n keydownHandler!: (e: KeyboardEvent) => void;\n mousedownHandler!: () => void;\n touchstartHandler!: () => void;\n instanceName!: string;\n\n private isModalOpen(): boolean {\n return document.body.classList.contains(MODAL_OPEN_CLASS);\n }\n\n private getLockedScrollTop(): number | null {\n const lockedScrollTopRaw = document.body.getAttribute(\n LOCKED_SCROLL_TOP_ATTR,\n );\n const lockedScrollTop = Number.parseInt(lockedScrollTopRaw || \"\", 10);\n\n return Number.isFinite(lockedScrollTop) ? lockedScrollTop : null;\n }\n\n private getEffectiveScrollY(): number {\n if (!this.isModalOpen()) {\n return window.scrollY;\n }\n\n return this.getLockedScrollTop() ?? window.scrollY;\n }\n\n constructor(element: HTMLElement, config: MegamenuConfig = {}) {\n if ((element as any).ODS_Megamenu) {\n return (element as any).ODS_Megamenu;\n }\n\n this.element = element;\n this.config = { ...defaultConfig, ...config };\n\n this.handleToggleClick = this.handleToggleClick.bind(this);\n this.handleKeyPress = this.handleKeyPress.bind(this);\n this.handleScroll = this.handleScroll.bind(this);\n this.handleAccordionClick = this.handleAccordionClick.bind(this);\n this.handleArrowNavigation = this.handleArrowNavigation.bind(this);\n this.trapFocus = this.trapFocus.bind(this);\n this.handleMobileMenuToggle = this.handleMobileMenuToggle.bind(this);\n this.desktopOverlayClickHandler = () => this.closeAllDropdowns();\n this.mobileCloseHandler = (event: Event) => {\n event.preventDefault();\n this.closeMobileMenu();\n };\n\n (this.element as any).ODS_Megamenu = this;\n\n this.init();\n return this;\n }\n\n static getInstance(el: HTMLElement): Megamenu | null {\n return el && (el as any).ODS_Megamenu ? (el as any).ODS_Megamenu : null;\n }\n\n init() {\n // Find all nav buttons with aria-controls attribute (dropdown buttons)\n this.toggleButtons = this.element.querySelectorAll(\n `.${CLASS_NAV_BUTTON}[aria-controls]`,\n );\n this.dropdowns = this.element.querySelectorAll(`.${CLASS_NAV_DROPDOWN}`);\n\n // Resolve an optional instance name so external triggers can target this menu.\n this.instanceName =\n this.element.getAttribute(\"data-megamenu-name\") || this.element.id || \"\";\n\n // Find mobile panel elements.\n this.mobilePanels = Array.from(\n this.element.querySelectorAll(`.${CLASS_MOBILE}`),\n );\n this.activeMobilePanel = null;\n this.activeMobileTarget = null;\n this.focusTrapElement = null;\n\n // Find all mobile toggles both in menu and in document scope.\n const localToggleButtons = Array.from(\n this.element.querySelectorAll(\n `[data-megamenu-mobile-toggle], .${CLASS_HIDE_LG_UP} button`,\n ),\n ) as HTMLButtonElement[];\n const globalToggleButtons = Array.from(\n document.querySelectorAll(`[data-megamenu-mobile-toggle]`),\n ) as HTMLButtonElement[];\n\n this.mobileMenuButtons = Array.from(\n new Set([...localToggleButtons, ...globalToggleButtons]),\n ).filter((button) => this.shouldUseMobileTrigger(button));\n\n this.mobileCloseButtons = Array.from(\n this.element.querySelectorAll(\n `.${CLASS_MOBILE_OVERLAY}, [data-megamenu-close-button]`,\n ),\n ) as HTMLButtonElement[];\n\n this.mobilePanels.forEach((panel) => {\n panel.setAttribute(\"aria-hidden\", \"true\");\n });\n this.syncMobileButtonState();\n\n // Find desktop overlay element\n this.desktopOverlay = this.element.querySelector(\n `.${CLASS_OVERLAY}`,\n ) as HTMLButtonElement;\n\n // Find accordion buttons\n this.accordionButtons = this.element.querySelectorAll(\n `.${CLASS_ACCORDION_BUTTON}`,\n );\n\n // Add click event listeners to toggle buttons\n this.toggleButtons.forEach((button) => {\n button.addEventListener(\"click\", this.handleToggleClick);\n });\n\n // Add mobile menu event listeners\n this.mobileMenuButtons.forEach((button) => {\n button.addEventListener(\"click\", this.handleMobileMenuToggle);\n });\n this.mobileCloseButtons.forEach((button) => {\n button.addEventListener(\"click\", this.mobileCloseHandler);\n });\n\n // Add desktop overlay event listener\n if (this.desktopOverlay) {\n this.desktopOverlay.addEventListener(\n \"click\",\n this.desktopOverlayClickHandler,\n );\n }\n\n // Add accordion event listeners\n this.accordionButtons.forEach((button) => {\n button.addEventListener(\"click\", this.handleAccordionClick);\n });\n\n // Add scoped event listeners to this element\n this.element.addEventListener(\"keydown\", this.handleKeyPress);\n window.addEventListener(\"scroll\", this.handleScroll);\n\n // Track keyboard usage for proper focus management\n this.isKeyboardUser = false;\n this.keydownHandler = (e) => {\n if (e.key === \"Tab\" || e.key === \" \" || e.key === \"Enter\") {\n this.isKeyboardUser = true;\n }\n };\n this.mousedownHandler = () => {\n this.isKeyboardUser = false;\n };\n this.touchstartHandler = () => {\n this.isKeyboardUser = false;\n };\n\n this.element.addEventListener(\"keydown\", this.keydownHandler);\n this.element.addEventListener(\"mousedown\", this.mousedownHandler);\n this.element.addEventListener(\"touchstart\", this.touchstartHandler);\n\n // Set initial tab indices for accessibility\n this.updateTabIndices();\n this.handleScroll();\n }\n\n shouldUseMobileTrigger(button: HTMLButtonElement) {\n if (this.element.contains(button)) {\n return true;\n }\n\n const targetName = button.getAttribute(\"data-megamenu-mobile-for\");\n if (!targetName) {\n const allMegamenus = document.querySelectorAll(\"[data-megamenu]\");\n return allMegamenus.length === 1 && allMegamenus[0] === this.element;\n }\n\n if (!this.instanceName) {\n return false;\n }\n\n return targetName === this.instanceName;\n }\n\n getDefaultMobileTarget() {\n const firstPanel = this.mobilePanels[0];\n return firstPanel?.getAttribute(\"data-megamenu-mobile-panel\") || \"main\";\n }\n\n getTargetFromElement(control: HTMLElement | null) {\n return (\n control?.getAttribute(\"data-megamenu-mobile-target\") ||\n this.getDefaultMobileTarget()\n );\n }\n\n getPanelByTarget(target: string) {\n const matchingPanel = this.mobilePanels.find(\n (panel) => panel.getAttribute(\"data-megamenu-mobile-panel\") === target,\n );\n\n if (matchingPanel) {\n return matchingPanel;\n }\n\n // Backward compatibility for existing markup with a single mobile panel.\n if (\n target === this.getDefaultMobileTarget() &&\n this.mobilePanels.length === 1\n ) {\n return this.mobilePanels[0];\n }\n\n return null;\n }\n\n syncMobileButtonState() {\n this.mobileMenuButtons.forEach((button) => {\n const target = this.getTargetFromElement(button);\n const isActive = this.activeMobileTarget === target;\n button.setAttribute(\"aria-expanded\", isActive ? \"true\" : \"false\");\n button.classList.toggle(this.config.activeClass, isActive);\n });\n }\n\n isInMobilePanel(element: HTMLElement | null) {\n return Boolean(\n element && this.mobilePanels.some((panel) => panel.contains(element)),\n );\n }\n\n getFocusRestoreTarget() {\n const lastFocused = this.lastFocusedElement;\n if (\n lastFocused &&\n lastFocused.isConnected &&\n !this.isInMobilePanel(lastFocused)\n ) {\n return lastFocused;\n }\n\n const target = this.activeMobileTarget;\n if (target) {\n const matchingTrigger = this.mobileMenuButtons.find(\n (button) =>\n this.getTargetFromElement(button) === target &&\n !this.isInMobilePanel(button),\n );\n if (matchingTrigger) {\n return matchingTrigger;\n }\n }\n\n return (\n this.mobileMenuButtons.find((button) => !this.isInMobilePanel(button)) ||\n null\n );\n }\n\n setMobilePanelState(panel: HTMLElement, isOpen: boolean) {\n panel.classList.toggle(this.config.activeClass, isOpen);\n panel.setAttribute(\"aria-hidden\", isOpen ? \"false\" : \"true\");\n }\n\n handleToggleClick(event: Event) {\n const button = event.currentTarget as HTMLButtonElement;\n const isActive = button.classList.contains(this.config.activeClass);\n\n // Close all other dropdowns\n this.closeAllDropdowns();\n\n // Toggle current dropdown\n if (!isActive) {\n this.openDropdown(button);\n // Keep focus on the button that opened the dropdown\n // Users can navigate into the dropdown using arrow keys\n } else {\n // If closing, ensure focus remains on the button\n button.focus();\n }\n }\n\n handleKeyPress(event: KeyboardEvent) {\n if (event.key === \"Escape\") {\n // Find the active dropdown button (the one with aria-expanded=\"true\")\n const activeButton = Array.from(this.toggleButtons).find(\n (button) => button.getAttribute(\"aria-expanded\") === \"true\",\n );\n\n this.closeAllDropdowns();\n this.closeMobileMenu();\n this.closeAllAccordions();\n\n // Return focus to button that opened the menu\n if (activeButton) {\n activeButton.focus();\n }\n }\n\n // Handle Enter and Space keys for dropdown buttons and accordion buttons\n if (event.key === \"Enter\" || event.key === \" \") {\n const target = event.target as HTMLElement;\n if (\n (target.tagName === \"BUTTON\" && target.hasAttribute(\"aria-controls\")) ||\n target.classList.contains(CLASS_ACCORDION_BUTTON)\n ) {\n event.preventDefault();\n target.click();\n }\n }\n\n // Handle Home and End keys for navigation within dropdowns\n if (event.key === \"Home\" || event.key === \"End\") {\n const dropdown = (event.target as HTMLElement)?.closest(\n `.${CLASS_NAV_DROPDOWN}`,\n ) as HTMLElement;\n if (dropdown) {\n event.preventDefault();\n const focusableElements = Array.from(\n dropdown.querySelectorAll(\n 'a, button, [tabindex]:not([tabindex=\"-1\"])',\n ),\n ) as HTMLElement[];\n\n if (event.key === \"Home\" && focusableElements.length > 0) {\n focusableElements[0].focus();\n } else if (event.key === \"End\" && focusableElements.length > 0) {\n focusableElements[focusableElements.length - 1].focus();\n }\n }\n }\n\n // Arrow key navigation for dropdowns and from buttons to dropdowns\n if (event.key === \"ArrowDown\") {\n const target = event.target as HTMLElement;\n\n // If focus is on a dropdown button, move to first item in dropdown\n if (target.tagName === \"BUTTON\" && target.hasAttribute(\"aria-controls\")) {\n const isExpanded = target.getAttribute(\"aria-expanded\") === \"true\";\n if (isExpanded) {\n event.preventDefault();\n const dropdown = target.parentElement?.querySelector(\n `.${CLASS_NAV_DROPDOWN}`,\n ) as HTMLElement;\n const firstFocusable = dropdown?.querySelector(\n \"a, button\",\n ) as HTMLElement;\n if (firstFocusable) {\n firstFocusable.focus();\n }\n }\n }\n // If focus is within a dropdown, navigate within it\n else {\n const dropdown = target.closest(\n `.${CLASS_NAV_DROPDOWN}`,\n ) as HTMLElement;\n if (dropdown) {\n event.preventDefault();\n this.handleArrowNavigation(event, dropdown);\n }\n }\n }\n\n if (event.key === \"ArrowUp\") {\n const dropdown = (event.target as HTMLElement)?.closest(\n `.${CLASS_NAV_DROPDOWN}`,\n ) as HTMLElement;\n if (dropdown) {\n event.preventDefault();\n this.handleArrowNavigation(event, dropdown);\n }\n }\n }\n\n handleAccordionClick(event: Event) {\n const button = event.currentTarget as HTMLButtonElement;\n const isExpanded = button.getAttribute(\"aria-expanded\") === \"true\";\n\n // Close all other accordions first\n this.closeAllAccordions();\n\n // Toggle current accordion\n if (!isExpanded) {\n this.openAccordion(button);\n }\n }\n\n handleScroll() {\n const topElement = this.element.querySelector(\n '[data-hide-when-sticky=\"true\"]',\n ) as HTMLElement;\n const hasBrandMark = Boolean(\n this.element.querySelector(BRAND_MARK_SELECTOR),\n );\n const effectiveScrollY = this.getEffectiveScrollY();\n const hideThreshold = topElement?.offsetHeight || 15;\n const shouldHideTop = effectiveScrollY > hideThreshold;\n const isTopHidden = this.element.classList.contains(\"top-hidden\");\n\n if (topElement) {\n if (shouldHideTop && !isTopHidden) {\n topElement.classList.add(\"is-hidden\");\n this.element.classList.add(\"top-hidden\");\n } else if (!shouldHideTop && isTopHidden) {\n topElement.classList.remove(\"is-hidden\");\n this.element.classList.remove(\"top-hidden\");\n }\n } else if (this.element.classList.contains(\"is-sticky\") && hasBrandMark) {\n this.element.classList.toggle(\"top-hidden\", shouldHideTop);\n }\n }\n\n openDropdown(button: HTMLButtonElement) {\n const dropdown = button.parentElement?.querySelector(\n `.${CLASS_NAV_DROPDOWN}`,\n ) as HTMLElement;\n\n if (dropdown) {\n button.classList.add(this.config.activeClass);\n button.setAttribute(\"aria-expanded\", \"true\");\n dropdown.style.display = \"block\";\n dropdown.classList.add(\"is-visible\");\n this.showDesktopOverlay();\n this.updateTabIndices();\n }\n }\n\n closeDropdown(button: HTMLButtonElement) {\n const dropdown = button.parentElement?.querySelector(\n `.${CLASS_NAV_DROPDOWN}`,\n ) as HTMLElement;\n\n if (dropdown) {\n button.classList.remove(this.config.activeClass);\n button.setAttribute(\"aria-expanded\", \"false\");\n dropdown.classList.remove(\"is-visible\");\n dropdown.style.display = \"none\";\n this.updateTabIndices();\n }\n }\n\n closeAllDropdowns() {\n this.toggleButtons.forEach((button) => {\n this.closeDropdown(button);\n });\n this.hideDesktopOverlay();\n }\n\n handleMobileMenuToggle(event: Event) {\n event.preventDefault();\n const trigger = event.currentTarget as HTMLButtonElement;\n const target = this.getTargetFromElement(trigger);\n const panel = this.getPanelByTarget(target);\n\n if (!panel) {\n return;\n }\n\n if (\n this.activeMobileTarget === target &&\n panel.classList.contains(this.config.activeClass)\n ) {\n this.closeMobileMenu();\n } else {\n this.openMobileMenu(target, trigger);\n }\n }\n\n openMobileMenu(target = this.getDefaultMobileTarget(), source?: HTMLElement) {\n const panel = this.getPanelByTarget(target);\n\n if (!panel) {\n return;\n }\n\n // Store the element that opened the menu for focus restoration\n // BEFORE changing panel states, so activeElement is captured correctly.\n this.lastFocusedElement =\n source || (document.activeElement as HTMLElement | null);\n\n // Move focus out of any panel about to be hidden to prevent\n // the browser from blocking aria-hidden on a focused descendant.\n const focused = document.activeElement as HTMLElement | null;\n if (\n focused &&\n focused !== panel &&\n this.mobilePanels.some((p) => p !== panel && p.contains(focused))\n ) {\n focused.blur();\n }\n\n // Keep one side panel active at a time.\n this.mobilePanels.forEach((mobilePanel) => {\n this.setMobilePanelState(mobilePanel, mobilePanel === panel);\n });\n this.activeMobilePanel = panel;\n this.activeMobileTarget = target;\n this.syncMobileButtonState();\n\n document.body.style.overflow = \"hidden\";\n this.removeFocusTrap();\n this.trapFocus(panel);\n\n if (this.isKeyboardUser) {\n const firstFocusable = panel.querySelector(\"button, a\") as HTMLElement;\n if (firstFocusable) {\n setTimeout(() => firstFocusable.focus(), 50);\n }\n }\n\n this.updateTabIndices();\n }\n\n closeMobileMenu() {\n if (!this.activeMobilePanel) {\n return;\n }\n\n // Move focus out of the panel BEFORE setting aria-hidden to prevent\n // the browser from blocking aria-hidden on a focused descendant.\n const restoreTarget = this.getFocusRestoreTarget();\n if (restoreTarget) {\n restoreTarget.focus();\n } else {\n (document.activeElement as HTMLElement | null)?.blur?.();\n }\n\n this.mobilePanels.forEach((panel) => {\n this.setMobilePanelState(panel, false);\n });\n\n document.body.style.overflow = \"\";\n this.closeAllAccordions();\n this.removeFocusTrap();\n\n this.activeMobilePanel = null;\n this.activeMobileTarget = null;\n this.lastFocusedElement = null;\n this.syncMobileButtonState();\n this.updateTabIndices();\n }\n\n showDesktopOverlay() {\n if (this.desktopOverlay) {\n this.desktopOverlay.classList.add(this.config.activeClass);\n }\n }\n\n hideDesktopOverlay() {\n if (this.desktopOverlay) {\n this.desktopOverlay.classList.remove(this.config.activeClass);\n }\n }\n\n openAccordion(button: HTMLButtonElement) {\n const accordionId = button.getAttribute(\"aria-controls\");\n const accordionBody = accordionId\n ? (this.element.querySelector(`#${accordionId}`) as HTMLElement)\n : null;\n const icon = button.querySelector(\n `.${CLASS_ACCORDION_ICON}`,\n ) as HTMLElement;\n\n if (accordionBody) {\n button.setAttribute(\"aria-expanded\", \"true\");\n button.classList.add(this.config.activeClass);\n accordionBody.classList.add(\"is-visible\");\n accordionBody.style.display = \"block\";\n\n if (icon) {\n icon.classList.add(this.config.activeClass);\n }\n }\n }\n\n closeAccordion(button: HTMLButtonElement) {\n const accordionId = button.getAttribute(\"aria-controls\");\n const accordionBody = accordionId\n ? (this.element.querySelector(`#${accordionId}`) as HTMLElement)\n : null;\n const icon = button.querySelector(\n `.${CLASS_ACCORDION_ICON}`,\n ) as HTMLElement;\n\n if (accordionBody) {\n button.setAttribute(\"aria-expanded\", \"false\");\n button.classList.remove(this.config.activeClass);\n accordionBody.classList.remove(\"is-visible\");\n accordionBody.style.display = \"none\";\n\n if (icon) {\n icon.classList.remove(this.config.activeClass);\n }\n }\n }\n\n closeAllAccordions() {\n this.accordionButtons.forEach((button) => {\n this.closeAccordion(button);\n });\n }\n\n handleArrowNavigation(event: KeyboardEvent, dropdown: HTMLElement) {\n const focusableElements = Array.from(\n dropdown.querySelectorAll('a, button, [tabindex]:not([tabindex=\"-1\"])'),\n ) as HTMLElement[];\n\n if (focusableElements.length === 0) return;\n\n const currentIndex = focusableElements.findIndex(\n (item) => item === event.target,\n );\n\n let nextIndex;\n if (event.key === \"ArrowDown\") {\n nextIndex =\n currentIndex < focusableElements.length - 1 ? currentIndex + 1 : 0;\n } else if (event.key === \"ArrowUp\") {\n nextIndex =\n currentIndex > 0 ? currentIndex - 1 : focusableElements.length - 1;\n } else {\n return; // Don't handle other keys\n }\n\n // Ensure nextIndex is valid\n if (\n nextIndex >= 0 &&\n nextIndex < focusableElements.length &&\n focusableElements[nextIndex]\n ) {\n focusableElements[nextIndex].focus();\n }\n }\n\n trapFocus(element: HTMLElement) {\n const focusableElements = element.querySelectorAll(\n 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])',\n ) as NodeListOf<HTMLElement>;\n const firstFocusable = focusableElements[0];\n const lastFocusable = focusableElements[focusableElements.length - 1];\n\n this.focusTrapHandler = (e: KeyboardEvent) => {\n if (e.key === \"Tab\") {\n if (e.shiftKey) {\n if (document.activeElement === firstFocusable) {\n e.preventDefault();\n lastFocusable.focus();\n }\n } else {\n if (document.activeElement === lastFocusable) {\n e.preventDefault();\n firstFocusable.focus();\n }\n }\n }\n };\n\n this.focusTrapElement = element;\n element.addEventListener(\"keydown\", this.focusTrapHandler);\n }\n\n removeFocusTrap() {\n if (this.focusTrapElement && this.focusTrapHandler) {\n this.focusTrapElement.removeEventListener(\n \"keydown\",\n this.focusTrapHandler,\n );\n this.focusTrapElement = null;\n }\n }\n\n updateTabIndices() {\n // Set tabindex=-1 for inactive dropdown items\n this.dropdowns.forEach((dropdown) => {\n const isVisible = dropdown.classList.contains(\"is-visible\");\n const focusableElements = dropdown.querySelectorAll(\n \"a, button, [tabindex]:not([tabindex='-1'])\",\n ) as NodeListOf<HTMLElement>;\n\n focusableElements.forEach((element) => {\n // Only update tabIndex if element is not already properly set\n const shouldBeFocusable = isVisible;\n if (shouldBeFocusable && element.tabIndex === -1) {\n element.tabIndex = 0;\n } else if (!shouldBeFocusable && element.tabIndex !== -1) {\n element.tabIndex = -1;\n }\n });\n });\n\n // Also update mobile menu elements when mobile menu is active\n this.mobilePanels.forEach((panel) => {\n const isMobilePanelActive = panel.classList.contains(\n this.config.activeClass,\n );\n const mobilePanelFocusableElements = panel.querySelectorAll(\n \"a, button, [tabindex]:not([tabindex='-1'])\",\n ) as NodeListOf<HTMLElement>;\n\n mobilePanelFocusableElements.forEach((element) => {\n element.tabIndex = isMobilePanelActive ? 0 : -1;\n });\n });\n }\n\n destroy() {\n // Remove event listeners\n this.toggleButtons.forEach((button) => {\n button.removeEventListener(\"click\", this.handleToggleClick);\n });\n\n // Remove mobile menu event listeners\n this.mobileMenuButtons.forEach((button) => {\n button.removeEventListener(\"click\", this.handleMobileMenuToggle);\n });\n this.mobileCloseButtons.forEach((button) => {\n button.removeEventListener(\"click\", this.mobileCloseHandler);\n });\n\n // Remove desktop overlay event listener\n if (this.desktopOverlay) {\n this.desktopOverlay.removeEventListener(\n \"click\",\n this.desktopOverlayClickHandler,\n );\n }\n\n // Remove accordion event listeners\n this.accordionButtons.forEach((button) => {\n button.removeEventListener(\"click\", this.handleAccordionClick);\n });\n\n this.element.removeEventListener(\"keydown\", this.handleKeyPress);\n window.removeEventListener(\"scroll\", this.handleScroll);\n\n // Remove keyboard tracking event listeners\n this.element.removeEventListener(\"keydown\", this.keydownHandler);\n this.element.removeEventListener(\"mousedown\", this.mousedownHandler);\n this.element.removeEventListener(\"touchstart\", this.touchstartHandler);\n\n // Restore body overflow if menu was open\n document.body.style.overflow = \"\";\n this.removeFocusTrap();\n\n // Clean up instance reference\n (this.element as any).ODS_Megamenu = null;\n\n if (this.config.removeOnDestroy) {\n this.element.remove();\n }\n }\n}\n","import moduleFactory, {\n destroyModulesWithin,\n initModulesWithin,\n} from \"../../scripts/lib/moduleFactory\";\nimport Megamenu from \"./Megamenu.static\";\nimport \"./styles/style.scss\";\n\n// Module configuration for Megamenu\nexport const customMegamenuModuleSelectorPairs = [\n {\n Module: Megamenu,\n name: \"Megamenu\",\n selector: \"[data-megamenu]\",\n },\n];\n\n// Global interface for standalone Megamenu\ndeclare global {\n interface Window {\n ODSMegamenu: {\n Megamenu: typeof Megamenu;\n instances: Megamenu[];\n init: () => void;\n destroy: () => void;\n initModulesWithin: (container: any) => {};\n destroyModulesWithin: (\n container: any,\n removeOrphanedNodes?: boolean | undefined,\n ) => {};\n };\n }\n}\n\n// Initialize the global ODSMegamenu object\nwindow.ODSMegamenu = window.ODSMegamenu || {\n Megamenu,\n instances: [],\n init: () => {\n // Initialize all Megamenu instances on the page\n window.ODSMegamenu.instances = moduleFactory(Megamenu, \"[data-megamenu]\");\n },\n destroy: () => {\n // Destroy all instances\n window.ODSMegamenu.instances.forEach((instance) => {\n if (instance && typeof instance.destroy === \"function\") {\n instance.destroy();\n }\n });\n window.ODSMegamenu.instances = [];\n },\n initModulesWithin,\n destroyModulesWithin,\n};\n\n// Auto-initialize when DOM is ready\nif (document.readyState === \"loading\") {\n document.addEventListener(\"DOMContentLoaded\", () => {\n window.ODSMegamenu.init();\n });\n} else {\n // DOM is already ready\n window.ODSMegamenu.init();\n}\n\n// Export for potential manual usage\nexport { Megamenu };\nexport default Megamenu;\n","import { lowerCamelCase } from \"../../utils/helpers\";\n\nexport default function moduleFactory(Module, selector, options = {}) {\n const elements = Array.from(document.querySelectorAll(selector));\n\n return elements.map((element) => new Module(element, options));\n}\n\nexport function destroyModulesWithin(container, removeOrphanedNodes = false) {\n const destroyedInstances = {};\n\n Object.keys(window.ODS.instances).forEach((moduleName) => {\n window.ODS.instances[moduleName].forEach((instance) => {\n if (typeof destroyedInstances[moduleName] !== \"object\") {\n destroyedInstances[moduleName] = [];\n }\n\n let isInContainer = container.contains(instance.element);\n if (moduleName === \"modal\") {\n isInContainer = instance.instance?._openers.every((opener) =>\n container.contains(opener),\n );\n } else if (moduleName === \"tooltip\") {\n isInContainer = container.contains(instance.trigger);\n }\n\n if (isInContainer) {\n instance.destroy();\n destroyedInstances[moduleName].push(instance);\n }\n\n if (\n isInContainer &&\n removeOrphanedNodes &&\n [\"modal\", \"tooltip\"].includes(moduleName)\n ) {\n instance.element.remove();\n }\n });\n\n window.ODS.instances[moduleName] = window.ODS.instances[moduleName].filter(\n (instance) => !destroyedInstances[moduleName].includes(instance),\n );\n });\n\n return destroyedInstances;\n}\n\nexport function initModulesWithin(container) {\n const instances = {};\n window.ODS.moduleSelectorPairs.forEach((module) => {\n const name = lowerCamelCase(module.name);\n const elements = Array.from(container.querySelectorAll(module.selector));\n\n // Filter out elements that already have an instance (e.g., initialized by React)\n const instancePropertyName = `ODS_${module.name}`;\n const uninitializedElements = elements.filter(\n (element) => !element[instancePropertyName],\n );\n\n if (window && window.ODS && window.ODS.instances[name]) {\n // Also clean up instances from elements that are no longer in the document\n window.ODS.instances[name] = window.ODS.instances[name].filter(\n (instance) => {\n const isInDocument = document.contains(instance.element);\n if (!isInDocument) {\n // Clean up the instance if its element is no longer in the document\n instance.destroy?.();\n }\n return isInDocument;\n },\n );\n\n window.ODS.instances[name].forEach((instance) => {\n uninitializedElements.forEach((element, index) => {\n if (element.isSameNode(instance.element)) {\n uninitializedElements.splice(index, 1);\n }\n });\n });\n }\n if (uninitializedElements.length) {\n if (!Array.isArray(window.ODS.instances[name])) {\n window.ODS.instances[name] = [];\n }\n instances[name] = uninitializedElements.map(\n (element) => new module.Module(element),\n );\n window.ODS.instances[name] = [\n ...window.ODS.instances[name],\n ...instances[name],\n ];\n }\n });\n return instances;\n}\n","import wnumb from \"wnumb\";\n\nexport function isObject(val) {\n return val != null && typeof val === \"object\" && Array.isArray(val) === false;\n}\n\nexport function dateToYYYYMMDD(date) {\n if (!date || !(date instanceof Date)) {\n return \"\";\n }\n\n return `${date.getFullYear()}-${(date.getMonth() + 1)\n .toString()\n .padStart(2, \"0\")}-${date.getDate().toString().padStart(2, \"0\")}`;\n}\n\n// Get element position relative to document\nexport function windowOffset(el) {\n const position = { x: 0, y: 0 };\n\n if (el.offsetParent) {\n do {\n position.x += el.offsetLeft;\n position.y += el.offsetTop;\n } while ((el = el.offsetParent));\n }\n\n return position;\n}\n\n// Get element siblings\nexport function getSiblings(el) {\n if (!(el instanceof Element)) {\n return false;\n }\n\n const parent = el.parentNode;\n if (!parent) {\n return false;\n }\n\n const parentChildren = [];\n const siblings = [];\n\n parentChildren.push.apply(parentChildren, parent.children);\n\n for (let i = 0, l = parentChildren.length; i < l; i += 1) {\n if (parentChildren[i] !== el) {\n siblings.push(parentChildren[i]);\n }\n }\n\n return siblings;\n}\n\n/**\n * Converts object to string\n *\n * Should be able to handle all types\n * objectToString({\n * 'boolean': true,\n * 'function': () => { return 'test'; },\n * 'namedfunction': function test() { return 'test'; },\n * 'null': null,\n * 'number1': 1,\n * 'number2': 2.345,\n * 'object1': { test: 'test' },\n * 'string': 'String',\n * 'undefined' : undefined,\n * })\n *\n * @param {object} object object to convert\n * @returns object converted to string\n */\nexport const objectToString = (object, spaceCount = 2) => {\n let str = \"\";\n for (var key in object) {\n if (object.hasOwnProperty(key)) {\n let value = object?.[key];\n if (typeof value === \"string\") {\n value = `\"${value}\"`;\n } else if (value === null) {\n value = \"null\";\n } else if (typeof value === \"object\") {\n value = objectToString(value, spaceCount + 2);\n } else if (typeof value === \"function\") {\n value = value.toString();\n } else if (value === undefined) {\n value = \"undefined\";\n }\n str += `${\" \".repeat(spaceCount)}${key}: ${value},\\n`;\n }\n }\n return `{\\n${str}${\" \".repeat(spaceCount - 2)}}`;\n};\nexport function capitalize(string) {\n return string.charAt(0).toUpperCase() + string.slice(1);\n}\n\nexport function lowerCamelCase(string) {\n return string.charAt(0).toLowerCase() + string.slice(1);\n}\n\nconst defaultPriceFormat = {\n decimals: 2,\n mark: \",\",\n thousand: \" \",\n suffix: `\\xa0€`,\n};\n\nexport function formatPrice(price, format) {\n return wnumb({\n ...defaultPriceFormat,\n ...format,\n ...(price % 1 === 0 ? { decimals: 0 } : {}), // integers without decimals\n }).to(price);\n}\n"],"names":["exports","FormatOptions","strReverse","a","split","reverse","join","strStartsWith","input","match","substring","length","strEndsWith","slice","throwEqualError","F","b","Error","isValidNumber","isFinite","toFixed","value","exp","toString","Math","round","formatTo","decimals","thousand","mark","prefix","suffix","encoder","decoder","negativeBefore","negative","edit","undo","inputIsNegative","inputPieces","inputBase","originalInput","inputDecimals","output","parseFloat","abs","indexOf","formatFrom","replace","Number","validate","inputOptions","i","optionName","optionValue","filteredOptions","undefined","passAll","options","method","args","push","apply","wNumb","this","to","from","factory","CLASS_ROOT","CLASS_NAV_BUTTON","concat","CLASS_NAV_DROPDOWN","CLASS_OVERLAY","CLASS_HIDE_LG_UP","CLASS_MOBILE","CLASS_MOBILE_OVERLAY","CLASS_ACCORDION_BUTTON","CLASS_ACCORDION_ICON","defaultConfig","dataToggle","activeClass","removeOnDestroy","Megamenu","element","_this","config","arguments","_classCallCheck","ODS_Megamenu","_objectSpread","handleToggleClick","bind","handleKeyPress","handleScroll","handleAccordionClick","handleArrowNavigation","trapFocus","handleMobileMenuToggle","desktopOverlayClickHandler","closeAllDropdowns","mobileCloseHandler","event","preventDefault","closeMobileMenu","init","key","document","body","classList","contains","lockedScrollTopRaw","getAttribute","lockedScrollTop","parseInt","_this$getLockedScroll","isModalOpen","getLockedScrollTop","window","scrollY","_this2","toggleButtons","querySelectorAll","dropdowns","instanceName","id","mobilePanels","Array","activeMobilePanel","activeMobileTarget","focusTrapElement","localToggleButtons","globalToggleButtons","mobileMenuButtons","Set","filter","button","shouldUseMobileTrigger","mobileCloseButtons","forEach","panel","setAttribute","syncMobileButtonState","desktopOverlay","querySelector","accordionButtons","addEventListener","isKeyboardUser","keydownHandler","e","mousedownHandler","touchstartHandler","updateTabIndices","targetName","allMegamenus","firstPanel","control","getDefaultMobileTarget","target","matchingPanel","find","_this3","getTargetFromElement","isActive","toggle","Boolean","some","_this4","lastFocused","lastFocusedElement","isConnected","isInMobilePanel","matchingTrigger","isOpen","currentTarget","focus","openDropdown","activeButton","closeAllAccordions","tagName","hasAttribute","click","_event$target","dropdown","closest","focusableElements","_target$parentElement","parentElement","firstFocusable","_event$target2","isExpanded","openAccordion","topElement","hasBrandMark","shouldHideTop","getEffectiveScrollY","offsetHeight","isTopHidden","add","remove","_button$parentElement","style","display","showDesktopOverlay","_button$parentElement2","_this5","closeDropdown","hideDesktopOverlay","trigger","getPanelByTarget","openMobileMenu","_this6","source","activeElement","focused","p","blur","mobilePanel","setMobilePanelState","overflow","removeFocusTrap","setTimeout","_this7","_document$activeEleme","_document$activeEleme2","restoreTarget","getFocusRestoreTarget","call","accordionId","accordionBody","icon","_this8","closeAccordion","nextIndex","currentIndex","findIndex","item","lastFocusable","focusTrapHandler","shiftKey","removeEventListener","_this9","isVisible","shouldBeFocusable","tabIndex","isMobilePanelActive","_this0","el","customMegamenuModuleSelectorPairs","Module","name","selector","ODSMegamenu","instances","map","moduleFactory","destroy","instance","initModulesWithin","container","ODS","moduleSelectorPairs","module","string","charAt","toLowerCase","elements","instancePropertyName","uninitializedElements","_instance$destroy","isInDocument","index","isSameNode","splice","isArray","_toConsumableArray","destroyModulesWithin","removeOrphanedNodes","destroyedInstances","Object","keys","moduleName","_typeof","_instance$instance","isInContainer","_openers","every","opener","includes","readyState"],"mappings":"qmEAMIA,QAKD,WAGD,IAAIC,EAAgB,CAClB,WACA,WACA,OACA,SACA,SACA,UACA,UACA,iBACA,WACA,OACA,QAMF,SAASC,EAAWC,GAClB,OAAOA,EACJC,MAAM,IACNC,UACAC,KAAK,GACZ,CAGE,SAASC,EAAcC,EAAOC,GAC5B,OAAOD,EAAME,UAAU,EAAGD,EAAME,UAAYF,CAChD,CAGE,SAASG,EAAYJ,EAAOC,GAC1B,OAAOD,EAAMK,OAAM,EAAKJ,EAAME,UAAYF,CAC9C,CAGE,SAASK,EAAgBC,EAAGZ,EAAGa,GAC7B,IAAKD,EAAEZ,IAAMY,EAAEC,KAAOD,EAAEZ,KAAOY,EAAEC,GAC/B,MAAM,IAAIC,MAAMd,EAEtB,CAGE,SAASe,EAAcV,GACrB,MAAwB,iBAAVA,GAAsBW,SAASX,EACjD,CAIE,SAASY,EAAQC,EAAOC,GAItB,OAHAD,EAAQA,EAAME,WAAWnB,MAAM,SAE/BiB,GADAA,EAAQG,KAAKC,QAAQJ,EAAM,GAAK,KAAOA,EAAM,IAAMA,EAAM,GAAKC,EAAMA,MACtDC,WAAWnB,MAAM,MACf,GAAK,KAAOiB,EAAM,IAAMA,EAAM,GAAKC,GAAOA,KAAOF,QAAQE,EAC7E,CAKE,SAASI,EACPC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACA7B,GAEA,IACE8B,EACAC,EACAC,EAHEC,EAAgBjC,EAIlBkC,EAAgB,GAChBC,EAAS,GASX,OALIX,IACFxB,EAAQwB,EAAQxB,MAIbU,EAAcV,MAMF,IAAbmB,GAA8D,IAAxCiB,WAAWpC,EAAMY,QAAQO,MACjDnB,EAAQ,GAKNA,EAAQ,IACV8B,GAAkB,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