@sonic-equipment/ui 1.1.7 → 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/dist/algolia/algolia-hits-provider.js +4 -1
- package/dist/algolia/algolia-insights-provider.js +3 -3
- package/dist/algolia/algolia-provider.d.ts +4 -1
- package/dist/algolia/algolia-provider.js +6 -3
- package/dist/algolia/algolia-search-provider.js +1 -1
- package/dist/algolia/algolia-searchclient-reserved-slots.d.ts +25 -0
- package/dist/algolia/algolia-searchclient-reserved-slots.js +67 -0
- package/dist/algolia/use-algolia-hits.d.ts +5 -2
- package/dist/algolia/use-algolia-hits.js +9 -5
- package/dist/algolia/use-algolia-insights.js +2 -2
- package/dist/algolia/use-algolia-search.js +2 -2
- package/dist/badges/tag/tag.d.ts +2 -1
- package/dist/badges/tag/tag.js +3 -2
- package/dist/base.css +28 -1
- package/dist/breadcrumbs/breadcrumb.d.ts +1 -1
- package/dist/breadcrumbs/breadcrumb.js +2 -2
- package/dist/buttons/button/button.d.ts +2 -1
- package/dist/buttons/button/button.js +10 -2
- package/dist/buttons/icon-button/icon-button.d.ts +8 -1
- package/dist/buttons/icon-button/icon-button.js +4 -5
- package/dist/buttons/invoice-download-buttons/invoice-download-buttons.d.ts +8 -0
- package/dist/buttons/invoice-download-buttons/invoice-download-buttons.js +29 -0
- package/dist/buttons/invoice-download-buttons/invoice-download-buttons.module.css.js +3 -0
- package/dist/buttons/invoice-download-buttons/invoice-download-url.d.ts +5 -0
- package/dist/buttons/invoice-download-buttons/invoice-download-url.js +9 -0
- package/dist/buttons/invoice-download-buttons/invoice-download-url.test.d.ts +1 -0
- package/dist/cards/data-card/data-card.js +1 -1
- package/dist/cards/product-card/product-card.js +2 -1
- package/dist/cards/product-card/product-card.module.css.js +1 -1
- package/dist/cards/table-card/table-card.d.ts +6 -1
- package/dist/cards/table-card/table-card.js +3 -4
- package/dist/carousel/card-carousel/card-carousel.d.ts +3 -1
- package/dist/carousel/card-carousel/card-carousel.js +5 -3
- package/dist/carousel/card-carousel/card-carousel.module.css.js +1 -1
- package/dist/carousel/carousel-navigation-button.d.ts +3 -1
- package/dist/carousel/carousel-navigation-button.js +2 -3
- package/dist/carousel/carousel.js +1 -1
- package/dist/carousel/usp-carousel/product-usp-carousel-slide.js +1 -1
- package/dist/carousel/usp-carousel/usp-carousel.d.ts +0 -1
- package/dist/cart-totals/cart-totals-summary.js +1 -1
- package/dist/cart-totals/cart-totals.d.ts +3 -1
- package/dist/cart-totals/cart-totals.js +9 -3
- package/dist/cart-totals/cart-totals.module.css.js +1 -1
- package/dist/client-case-banner/client-case-banner.d.ts +16 -0
- package/dist/client-case-banner/client-case-banner.js +13 -0
- package/dist/client-case-banner/client-case-banner.module.css.js +3 -0
- package/dist/collapsables/accordion/accordion-item.js +1 -1
- package/dist/collapsables/cascading-component/cascading-component-container-provider.js +1 -1
- package/dist/collapsables/cascading-component/use-cascading-component-container.js +2 -2
- package/dist/collapsables/collapsable/collapsable.d.ts +12 -0
- package/dist/collapsables/collapsable/collapsable.js +31 -0
- package/dist/collapsables/collapsable/collapsable.module.css.js +3 -0
- package/dist/collapsables/unmounter/unmounter.js +3 -3
- package/dist/cookies/cookie-provider.js +1 -1
- package/dist/cookies/use-cookie.js +2 -2
- package/dist/country-language-selection-list/country-language-selection-list.js +1 -1
- package/dist/country-language-selection-list/country-language-selection-list.module.css.js +1 -1
- package/dist/country-language-selector/connected-country-language-selector.d.ts +1 -2
- package/dist/country-language-selector/connected-country-language-selector.js +2 -2
- package/dist/country-language-selector/country-language-selector.d.ts +1 -2
- package/dist/country-language-selector/country-language-selector.js +12 -19
- package/dist/country-language-selector/country-language-selector.module.css.js +1 -1
- package/dist/country-language-selector/fixtures/fixtures.d.ts +13 -0
- package/dist/country-language-selector-button/country-language-selector-button.stories.d.ts +13 -0
- package/dist/display/details/details.d.ts +2 -1
- package/dist/display/details/details.js +2 -2
- package/dist/display/product-sku/product-sku.js +3 -1
- package/dist/exports.d.ts +67 -21
- package/dist/filters/pagination/pagination.d.ts +2 -1
- package/dist/filters/pagination/pagination.js +3 -2
- package/dist/fonts.css +58 -56
- package/dist/footer/fixtures/fixtures.d.ts +3 -0
- package/dist/footer/footer.js +3 -2
- package/dist/footer/footer.module.css.js +1 -1
- package/dist/forms/elements/input/input.js +4 -6
- package/dist/forms/elements/range-slider/range-slider.d.ts +18 -0
- package/dist/forms/elements/range-slider/range-slider.js +31 -0
- package/dist/forms/elements/range-slider/range-slider.module.css.js +3 -0
- package/dist/global-search/global-search.d.ts +6 -1
- package/dist/global-search/global-search.js +3 -2
- package/dist/global-search/search-highlight/highlight.d.ts +7 -7
- package/dist/global-search/search-highlight/highlight.js +9 -9
- package/dist/global-search/search-input/connected-search-input.js +4 -1
- package/dist/global-search/search-result-panel/panel-content.d.ts +3 -1
- package/dist/global-search/search-result-panel/panel-content.js +2 -2
- package/dist/global-search/search-result-panel/search-result-panel.d.ts +3 -1
- package/dist/global-search/search-result-panel/search-result-panel.js +2 -2
- package/dist/global-search/search-result-panel/sections/no-search-results.js +1 -3
- package/dist/global-search/search-result-panel/sections/no-search.d.ts +2 -1
- package/dist/global-search/search-result-panel/sections/no-search.js +7 -14
- package/dist/global-search/search-result-panel/sections/search-content.module.css.js +1 -1
- package/dist/global-search/search-result-panel/sections/section-container.js +2 -2
- package/dist/global-search/search-result-panel/sections/with-results.js +6 -6
- package/dist/header/drawers/desktop-navigation-drawer.js +2 -1
- package/dist/header/drawers/mobile-navigation-drawer.js +2 -1
- package/dist/header/drawers/search-drawer.d.ts +3 -1
- package/dist/header/drawers/search-drawer.js +3 -2
- package/dist/header/drawers/search-drawer.module.css.js +3 -0
- package/dist/header/fixtures/fixtures.d.ts +4 -0
- package/dist/header/header-layout/header-layout.d.ts +1 -1
- package/dist/header/header-layout/header-layout.js +2 -3
- package/dist/header/header-layout/header-layout.module.css.js +1 -1
- package/dist/header/header.d.ts +3 -2
- package/dist/header/header.js +3 -2
- package/dist/header/header.module.css.js +1 -1
- package/dist/hubspot-form/hubspot-form.d.ts +41 -0
- package/dist/hubspot-form/hubspot-form.js +125 -0
- package/dist/hubspot-form/hubspot-form.module.css.js +3 -0
- package/dist/icons/index.d.ts +86 -0
- package/dist/icons/index.js +86 -0
- package/dist/icons/other/media-captionsoff-icon.d.ts +1 -0
- package/dist/icons/other/media-captionsoff-icon.js +7 -0
- package/dist/icons/other/media-captionson-icon.d.ts +1 -0
- package/dist/icons/other/media-captionson-icon.js +7 -0
- package/dist/icons/other/media-chapters-icon.d.ts +1 -0
- package/dist/icons/other/media-chapters-icon.js +7 -0
- package/dist/icons/other/media-enterfullscreen-icon.d.ts +1 -0
- package/dist/icons/other/media-enterfullscreen-icon.js +7 -0
- package/dist/icons/other/media-exitfullscreen-icon.d.ts +1 -0
- package/dist/icons/other/media-exitfullscreen-icon.js +7 -0
- package/dist/icons/other/media-pause-icon.d.ts +1 -0
- package/dist/icons/other/media-pause-icon.js +7 -0
- package/dist/icons/other/media-play-icon.d.ts +1 -0
- package/dist/icons/other/media-play-icon.js +7 -0
- package/dist/icons/other/media-seekbackwards-icon.d.ts +1 -0
- package/dist/icons/other/media-seekbackwards-icon.js +7 -0
- package/dist/icons/other/media-seekforwards-icon.d.ts +1 -0
- package/dist/icons/other/media-seekforwards-icon.js +7 -0
- package/dist/icons/other/media-subsoff-icon.d.ts +1 -0
- package/dist/icons/other/media-subsoff-icon.js +7 -0
- package/dist/icons/other/media-subson-icon.d.ts +1 -0
- package/dist/icons/other/media-subson-icon.js +7 -0
- package/dist/icons/other/media-volumefull-icon.d.ts +1 -0
- package/dist/icons/other/media-volumefull-icon.js +7 -0
- package/dist/icons/other/media-volumelow-icon.d.ts +1 -0
- package/dist/icons/other/media-volumelow-icon.js +7 -0
- package/dist/icons/other/media-volumemedium-icon.d.ts +1 -0
- package/dist/icons/other/media-volumemedium-icon.js +7 -0
- package/dist/icons/other/media-volumemuted-icon.d.ts +1 -0
- package/dist/icons/other/media-volumemuted-icon.js +7 -0
- package/dist/icons/solid/solid-enterfullscreen-icon.d.ts +1 -0
- package/dist/icons/solid/solid-exitfullscreen-icon.d.ts +1 -0
- package/dist/icons/solid/solid-facebook-icon.js +7 -0
- package/dist/icons/solid/solid-instagram-icon.js +7 -0
- package/dist/icons/solid/solid-link-icon.js +7 -0
- package/dist/icons/solid/solid-linkedin-icon.js +7 -0
- package/dist/icons/solid/solid-tiktok-icon.js +7 -0
- package/dist/icons/solid/solid-youtube-icon.js +7 -0
- package/dist/icons/stroke/stroke-business-icon.js +7 -0
- package/dist/icons/stroke/stroke-captions-icon.d.ts +1 -0
- package/dist/icons/stroke/stroke-captions-icon.js +7 -0
- package/dist/icons/stroke/stroke-efficiency-icon.js +7 -0
- package/dist/icons/stroke/stroke-fallback-icon.js +7 -0
- package/dist/icons/stroke/stroke-happy-icon.js +7 -0
- package/dist/icons/stroke/stroke-innovate-icon.js +7 -0
- package/dist/icons/stroke/stroke-list-icon.d.ts +1 -0
- package/dist/icons/stroke/stroke-list-icon.js +7 -0
- package/dist/icons/stroke/stroke-modular-icon.js +7 -0
- package/dist/icons/stroke/stroke-okay-icon.js +7 -0
- package/dist/icons/stroke/stroke-package-icon.js +7 -0
- package/dist/icons/stroke/stroke-proactive-icon.js +7 -0
- package/dist/icons/stroke/stroke-productivity-icon.js +7 -0
- package/dist/icons/stroke/stroke-rating-icon.js +7 -0
- package/dist/icons/stroke/stroke-salecategory-icon.js +7 -0
- package/dist/icons/stroke/stroke-style-icon.js +7 -0
- package/dist/icons/stroke/stroke-support-icon.js +7 -0
- package/dist/icons/stroke/stroke-thumbsup-icon.js +7 -0
- package/dist/icons/stroke/stroke-warranty10y-icon.js +7 -0
- package/dist/icons/stroke/stroke-warranty1y-icon.js +7 -0
- package/dist/icons/stroke/stroke-warranty3y-icon.js +7 -0
- package/dist/icons/stroke/stroke-warranty5y-icon.js +7 -0
- package/dist/icons/stroke/stroke-warrantyconsumable-icon.js +7 -0
- package/dist/icons/stroke/stroke-warrantylifetime-icon.js +7 -0
- package/dist/image-banner/image-banner.d.ts +20 -0
- package/dist/image-banner/image-banner.js +15 -0
- package/dist/image-banner/image-banner.module.css.js +3 -0
- package/dist/index.js +78 -33
- package/dist/intl/intl-provider.js +1 -1
- package/dist/intl/missing-translation-provider.js +1 -1
- package/dist/intl/translation-id.d.ts +1 -1
- package/dist/intl/use-intl.js +2 -2
- package/dist/lists/download-document-list/download-document-list.js +2 -1
- package/dist/lists/menu-list/menu-list-provider.js +1 -1
- package/dist/lists/menu-list/use-menu-list.js +2 -2
- package/dist/lists/product-overview-grid/product-overview-grid.d.ts +17 -2
- package/dist/lists/product-overview-grid/product-overview-grid.js +20 -8
- package/dist/lists/product-overview-grid/product-overview-grid.module.css.js +1 -1
- package/dist/loading/dynamic-loading-overlay.js +1 -23
- package/dist/loading/dynamic-loading-overlay.module.css.js +1 -1
- package/dist/media/image-cdn/image-cdn-profile.d.ts +45 -0
- package/dist/media/image-cdn/image-cdn-profile.js +63 -0
- package/dist/media/image-cdn/image-cdn-profile.test.d.ts +1 -0
- package/dist/media/image-cdn/image-cdn-provider.d.ts +10 -0
- package/dist/media/image-cdn/image-cdn-provider.js +15 -0
- package/dist/media/image-cdn/storyblok-profile.d.ts +3 -0
- package/dist/media/image-cdn/storyblok-profile.js +37 -0
- package/dist/media/image-cdn/storyblok-profile.test.d.ts +1 -0
- package/dist/media/image-lightbox/image-lightbox.module.css.js +1 -1
- package/dist/media/media-controls/media-chapters-control/media-chapters-control.d.ts +8 -0
- package/dist/media/media-controls/media-chapters-control/media-chapters-control.js +63 -0
- package/dist/media/media-controls/media-control/media-control.d.ts +19 -0
- package/dist/media/media-controls/media-control/media-control.js +15 -0
- package/dist/media/media-controls/media-controls.d.ts +12 -0
- package/dist/media/media-controls/media-controls.js +17 -0
- package/dist/media/media-controls/media-controls.module.css.js +3 -0
- package/dist/media/media-controls/media-popover/media-popover.d.ts +12 -0
- package/dist/media/media-controls/media-popover/media-popover.js +67 -0
- package/dist/media/media-controls/media-progress-circle/media-progress-circle.d.ts +20 -0
- package/dist/media/media-controls/media-progress-circle/media-progress-circle.js +31 -0
- package/dist/media/media-controls/media-seek-control/media-seek-control.d.ts +6 -0
- package/dist/media/media-controls/media-seek-control/media-seek-control.js +30 -0
- package/dist/media/media-controls/media-subs-control/media-subs-control.d.ts +8 -0
- package/dist/media/media-controls/media-subs-control/media-subs-control.js +65 -0
- package/dist/media/media-controls/media-volume-control/media-volume-control.d.ts +7 -0
- package/dist/media/media-controls/media-volume-control/media-volume-control.js +103 -0
- package/dist/media/media-utils.d.ts +19 -0
- package/dist/media/media-utils.js +28 -0
- package/dist/media/responsive-image/responsive-image.d.ts +37 -0
- package/dist/media/responsive-image/responsive-image.js +119 -0
- package/dist/media/responsive-image/responsive-image.module.css.js +3 -0
- package/dist/media/responsive-video/responsive-video.d.ts +36 -0
- package/dist/media/responsive-video/responsive-video.js +365 -0
- package/dist/media/responsive-video/responsive-video.module.css.js +3 -0
- package/dist/modals/dialog/dialog.js +1 -1
- package/dist/navigation/panel-navigation/panel-navigation.js +1 -1
- package/dist/notifications/announcements/announcement-list.d.ts +10 -1
- package/dist/notifications/announcements/announcement-list.js +1 -13
- package/dist/notifications/announcements/announcement-list.module.css.js +1 -1
- package/dist/notifications/announcements/announcement.d.ts +13 -2
- package/dist/notifications/announcements/announcement.js +14 -6
- package/dist/notifications/announcements/fixtures/fixtures.d.ts +22 -0
- package/dist/page-layout/fixtures/fixtures.d.ts +15 -0
- package/dist/page-layout/page-layout.d.ts +2 -0
- package/dist/page-layout/page-layout.js +33 -0
- package/dist/page-layout/page-layout.module.css.js +3 -0
- package/dist/page-layout/types.d.ts +52 -0
- package/dist/pages/account/change-password-page/change-password-page.js +6 -2
- package/dist/pages/account/components/change-password-form/change-password-form.js +1 -5
- package/dist/pages/account/components/create-account-form/create-account-form.js +1 -4
- package/dist/pages/account/components/sign-in-form/sign-in-form.js +2 -6
- package/dist/pages/account/create-account-page/create-account-page.d.ts +1 -1
- package/dist/pages/account/create-account-page/create-account-page.js +8 -4
- package/dist/pages/account/sign-in-page/sign-in-page.d.ts +1 -1
- package/dist/pages/account/sign-in-page/sign-in-page.js +6 -4
- package/dist/pages/checkout/cart-page/cart-page.d.ts +1 -1
- package/dist/pages/checkout/cart-page/cart-page.js +35 -68
- package/dist/pages/checkout/components/billing-and-invoice-information.js +1 -1
- package/dist/pages/checkout/components/billing-and-invoice-information.module.css.js +1 -1
- package/dist/pages/checkout/{layouts/checkout-page-layout/components → components}/checkout-page-section-header.d.ts +1 -1
- package/dist/pages/checkout/{layouts/checkout-page-layout/components → components}/checkout-page-section-header.js +2 -2
- package/dist/pages/checkout/components/checkout-page-section.js +12 -0
- package/dist/pages/checkout/components/checkout-page-section.module.css.js +3 -0
- package/dist/pages/checkout/order-confirmation-page/order-confirmation-page-content.js +50 -64
- package/dist/pages/checkout/payment-page/payment-page-content.js +25 -25
- package/dist/pages/checkout/shipping-page/components/edit-checkout-bill-to-address-form.js +2 -2
- package/dist/pages/checkout/shipping-page/components/readonly-address.js +3 -3
- package/dist/pages/checkout/shipping-page/components/readonly-address.module.css.js +1 -1
- package/dist/pages/checkout/shipping-page/shipping-page-content.js +12 -12
- package/dist/pages/components/page/page.js +1 -1
- package/dist/pages/countries-page/countries-page.js +7 -4
- package/dist/pages/error-page/error-page.js +2 -7
- package/dist/pages/my-sonic/navigation/connected-my-sonic-navigation.js +2 -1
- package/dist/pages/my-sonic/pages/create-ship-to-address-details-page/create-ship-to-address-details-page.d.ts +0 -3
- package/dist/pages/my-sonic/pages/create-ship-to-address-details-page/create-ship-to-address-details-page.js +16 -17
- package/dist/pages/my-sonic/pages/edit-bill-to-address-details-page/edit-bill-to-address-details-page.d.ts +0 -3
- package/dist/pages/my-sonic/pages/edit-bill-to-address-details-page/edit-bill-to-address-details-page.js +16 -17
- package/dist/pages/my-sonic/pages/edit-ship-to-address-details-page/edit-ship-to-address-details-page.d.ts +0 -4
- package/dist/pages/my-sonic/pages/edit-ship-to-address-details-page/edit-ship-to-address-details-page.js +16 -17
- package/dist/pages/my-sonic/pages/favorites/favorites-page.d.ts +0 -1
- package/dist/pages/my-sonic/pages/favorites/favorites-page.js +31 -33
- package/dist/pages/my-sonic/pages/favorites/favorites-page.module.css.js +3 -0
- package/dist/pages/my-sonic/pages/my-account/my-account-page.d.ts +0 -1
- package/dist/pages/my-sonic/pages/my-account/my-account-page.js +12 -12
- package/dist/pages/my-sonic/pages/order-details/order-details-content.d.ts +2 -1
- package/dist/pages/my-sonic/pages/order-details/order-details-content.js +4 -4
- package/dist/pages/my-sonic/pages/order-details/order-details-content.module.css.js +1 -1
- package/dist/pages/my-sonic/pages/order-details/order-details-page.d.ts +2 -4
- package/dist/pages/my-sonic/pages/order-details/order-details-page.js +19 -29
- package/dist/pages/my-sonic/pages/order-history/order-history-page.d.ts +0 -1
- package/dist/pages/my-sonic/pages/order-history/order-history-page.js +112 -116
- package/dist/pages/my-sonic/pages/upload-order-page/upload-order-page.d.ts +0 -1
- package/dist/pages/my-sonic/pages/upload-order-page/upload-order-page.js +12 -12
- package/dist/pages/product/components/product-overview.d.ts +11 -3
- package/dist/pages/product/components/product-overview.js +11 -7
- package/dist/pages/product/product-details-page/components/product-details-panel/product-details-panel.js +5 -7
- package/dist/pages/product/product-details-page/components/product-details-panel/product-details-panel.module.css.js +1 -1
- package/dist/pages/product/product-details-page/components/product-details-recently-viewed-section/product-details-recently-viewed-section.d.ts +3 -1
- package/dist/pages/product/product-details-page/components/product-details-recently-viewed-section/product-details-recently-viewed-section.js +9 -10
- package/dist/pages/product/product-details-page/product-details.js +18 -18
- package/dist/pages/product/product-details-page/product-details.module.css.js +3 -0
- package/dist/pages/product/product-listing-page/no-results/no-results.d.ts +3 -5
- package/dist/pages/product/product-listing-page/no-results/no-results.js +2 -4
- package/dist/pages/product/product-listing-page/no-results/no-results.module.css.js +1 -1
- package/dist/pages/product/product-listing-page/product-listing-page-category-carousel/product-listing-page-category-carousel.js +6 -4
- package/dist/pages/product/product-listing-page/product-listing-page-category-carousel/product-listing-page-category-carousel.module.css.js +3 -0
- package/dist/pages/product/product-listing-page/product-listing-page-provider/product-listing-page-provider.js +3 -3
- package/dist/pages/product/product-listing-page/product-listing-page.js +1 -1
- package/dist/pages/product/product-listing-page/product-listing-page.module.css.js +1 -1
- package/dist/pages/product/product-listing-page/product-listing-product-overview/product-listing-product-overview.d.ts +2 -1
- package/dist/pages/product/product-listing-page/product-listing-product-overview/product-listing-product-overview.js +2 -2
- package/dist/pages/product/product-listing-page/product-listing.d.ts +8 -1
- package/dist/pages/product/product-listing-page/product-listing.js +23 -23
- package/dist/pages/product/search-result-page/search-result-product-overview/search-result-product-overview.d.ts +2 -1
- package/dist/pages/product/search-result-page/search-result-product-overview/search-result-product-overview.js +2 -2
- package/dist/pages/product/search-result-page/search-results-page.js +20 -19
- package/dist/promos/promo-banners/promo-banners.js +2 -1
- package/dist/responsive-banner/responsive-banner.d.ts +30 -0
- package/dist/responsive-banner/responsive-banner.js +23 -0
- package/dist/responsive-banner/responsive-banner.module.css.js +3 -0
- package/dist/responsive-carousel/responsive-carousel.d.ts +18 -0
- package/dist/responsive-carousel/responsive-carousel.js +209 -0
- package/dist/responsive-carousel/responsive-carousel.module.css.js +3 -0
- package/dist/rich-text/rich-text.d.ts +7 -0
- package/dist/rich-text/rich-text.js +10 -0
- package/dist/rich-text/rich-text.module.css.js +3 -0
- package/dist/rte-asset/rte-asset.d.ts +8 -0
- package/dist/rte-asset/rte-asset.js +10 -0
- package/dist/rte-asset/rte-asset.module.css.js +3 -0
- package/dist/rte-blockquote/rte-blockquote.d.ts +8 -0
- package/dist/rte-blockquote/rte-blockquote.js +10 -0
- package/dist/rte-blockquote/rte-blockquote.module.css.js +3 -0
- package/dist/rte-details/rte-details.d.ts +7 -0
- package/dist/rte-details/rte-details.js +10 -0
- package/dist/rte-details/rte-details.module.css.js +3 -0
- package/dist/rte-ordered-list/rte-ordered-list.d.ts +14 -0
- package/dist/rte-ordered-list/rte-ordered-list.js +34 -0
- package/dist/rte-ordered-list/rte-ordered-list.module.css.js +3 -0
- package/dist/sections/about-section/about-section.d.ts +13 -0
- package/dist/sections/about-section/about-section.js +13 -0
- package/dist/sections/about-section/about-section.module.css.js +3 -0
- package/dist/sections/about-section/media-contact.d.ts +7 -0
- package/dist/sections/about-section/media-contact.js +12 -0
- package/dist/sections/banner-section/banner-section.d.ts +13 -0
- package/dist/sections/banner-section/banner-section.js +12 -0
- package/dist/sections/banner-section/banner-section.module.css.js +3 -0
- package/dist/sections/banner-section/fixtures/fixtures.d.ts +5 -0
- package/dist/sections/case-studies-listing-section/case-studies-listing-section.constants.d.ts +10 -0
- package/dist/sections/case-studies-listing-section/case-studies-listing-section.constants.js +12 -0
- package/dist/sections/case-studies-listing-section/case-studies-listing-section.d.ts +26 -0
- package/dist/sections/case-studies-listing-section/case-studies-listing-section.js +30 -0
- package/dist/sections/case-studies-listing-section/case-studies-listing-section.module.css.js +3 -0
- package/dist/sections/client-cases-carousel-section/client-cases-carousel-section.d.ts +13 -0
- package/dist/sections/client-cases-carousel-section/client-cases-carousel-section.js +13 -0
- package/dist/sections/client-cases-carousel-section/client-cases-carousel-section.module.css.js +3 -0
- package/dist/sections/downloadable-documents-section/downloadable-documents-section.d.ts +21 -0
- package/dist/sections/downloadable-documents-section/downloadable-documents-section.js +16 -0
- package/dist/sections/downloadable-documents-section/downloadable-documents-section.module.css.js +3 -0
- package/dist/sections/event-info-section/event-info-section.d.ts +9 -0
- package/dist/sections/event-info-section/event-info-section.js +23 -0
- package/dist/sections/event-info-section/event-info-section.module.css.js +3 -0
- package/dist/sections/faq-section/faq-section.d.ts +24 -0
- package/dist/sections/faq-section/faq-section.js +20 -0
- package/dist/sections/faq-section/faq-section.module.css.js +3 -0
- package/dist/sections/hero-section/hero-section.d.ts +22 -0
- package/dist/sections/hero-section/hero-section.js +16 -0
- package/dist/sections/hero-section/hero-section.module.css.js +3 -0
- package/dist/sections/hubspot-form-section/hubspot-form-section.d.ts +18 -0
- package/dist/sections/hubspot-form-section/hubspot-form-section.js +18 -0
- package/dist/sections/hubspot-form-section/hubspot-form-section.module.css.js +3 -0
- package/dist/sections/image-banner-carousel-section/image-banner-carousel-section.d.ts +12 -0
- package/dist/sections/image-banner-carousel-section/image-banner-carousel-section.js +13 -0
- package/dist/sections/image-banner-carousel-section/image-banner-carousel-section.module.css.js +3 -0
- package/dist/sections/image-banner-section/image-banner-section.d.ts +12 -0
- package/dist/sections/image-banner-section/image-banner-section.js +12 -0
- package/dist/sections/image-banner-section/image-banner-section.module.css.js +3 -0
- package/dist/sections/image-hubspot-section/image-hubspot-form-section.d.ts +21 -0
- package/dist/sections/image-hubspot-section/image-hubspot-form-section.js +19 -0
- package/dist/sections/image-hubspot-section/image-hubspot-form-section.module.css.js +3 -0
- package/dist/sections/image-section/image-section.d.ts +25 -0
- package/dist/sections/image-section/image-section.js +14 -0
- package/dist/sections/image-section/image-section.module.css.js +3 -0
- package/dist/sections/image-text-section/image-text-block.d.ts +13 -0
- package/dist/sections/image-text-section/image-text-block.js +13 -0
- package/dist/sections/image-text-section/image-text-section.d.ts +15 -0
- package/dist/sections/image-text-section/image-text-section.js +12 -0
- package/dist/sections/image-text-section/image-text-section.module.css.js +3 -0
- package/dist/sections/legal-section/legal-section.d.ts +10 -0
- package/dist/sections/legal-section/legal-section.js +13 -0
- package/dist/sections/legal-section/legal-section.module.css.js +3 -0
- package/dist/sections/multi-column-section/multi-column-section.d.ts +24 -0
- package/dist/sections/multi-column-section/multi-column-section.js +24 -0
- package/dist/sections/multi-column-section/multi-column-section.module.css.js +3 -0
- package/dist/sections/news-list-section/news-listing-section.d.ts +17 -0
- package/dist/sections/news-list-section/news-listing-section.js +27 -0
- package/dist/sections/news-list-section/news-listing-section.module.css.js +3 -0
- package/dist/sections/numbers-section/numbers-section.d.ts +18 -0
- package/dist/sections/numbers-section/numbers-section.js +15 -0
- package/dist/sections/numbers-section/numbers-section.module.css.js +3 -0
- package/dist/sections/page-meta-section/page-meta-section.d.ts +8 -0
- package/dist/sections/page-meta-section/page-meta-section.js +23 -0
- package/dist/sections/page-meta-section/page-meta-section.module.css.js +3 -0
- package/dist/sections/page-section/page-section.d.ts +297 -0
- package/dist/sections/page-section/page-section.js +23 -0
- package/dist/sections/page-section/page-section.module.css.js +3 -0
- package/dist/sections/percentages-section/percentages-section.d.ts +21 -0
- package/dist/sections/percentages-section/percentages-section.js +18 -0
- package/dist/sections/percentages-section/percentages-section.module.css.js +3 -0
- package/dist/sections/product-comparison-section/product-comparison-section.d.ts +17 -0
- package/dist/sections/product-comparison-section/product-comparison-section.js +19 -0
- package/dist/sections/product-comparison-section/product-comparison-section.module.css.js +3 -0
- package/dist/sections/rich-text-section/rich-text-section.d.ts +11 -0
- package/dist/sections/rich-text-section/rich-text-section.js +12 -0
- package/dist/sections/rich-text-section/rich-text-section.module.css.js +3 -0
- package/dist/sections/social-media-section/social-media-section.d.ts +20 -0
- package/dist/sections/social-media-section/social-media-section.js +27 -0
- package/dist/sections/social-media-section/social-media-section.module.css.js +3 -0
- package/dist/sections/subheadline-section/subheadline-section.d.ts +7 -0
- package/dist/sections/subheadline-section/subheadline-section.js +12 -0
- package/dist/sections/subheadline-section/subheadline-section.module.css.js +3 -0
- package/dist/sections/usp-section/usp-section.d.ts +19 -0
- package/dist/sections/usp-section/usp-section.js +17 -0
- package/dist/sections/usp-section/usp-section.module.css.js +3 -0
- package/dist/sections/video-section/video-section.d.ts +30 -0
- package/dist/sections/video-section/video-section.js +13 -0
- package/dist/sections/video-section/video-section.module.css.js +3 -0
- package/dist/shared/error/default-error-view.d.ts +1 -1
- package/dist/shared/error/default-error-view.js +4 -2
- package/dist/shared/error/default-error-view.module.css.js +1 -1
- package/dist/shared/error/global-unhandled-error-handler.js +3 -3
- package/dist/shared/feature-flags/use-feature-flags.d.ts +1 -0
- package/dist/shared/feature-flags/use-feature-flags.js +3 -2
- package/dist/shared/hooks/use-drag-scroll.d.ts +20 -0
- package/dist/shared/hooks/use-drag-scroll.js +107 -0
- package/dist/shared/local-storage/local-storage-provider.js +1 -1
- package/dist/shared/local-storage/use-local-storage.js +2 -2
- package/dist/shared/local-storage/use-session-storage.js +2 -2
- package/dist/shared/model/announcement.d.ts +1 -0
- package/dist/shared/model/image.d.ts +5 -0
- package/dist/shared/providers/global-state-provider.js +3 -3
- package/dist/shared/routing/route-provider.js +1 -1
- package/dist/shared/routing/use-router.js +2 -2
- package/dist/shared/utils/array.d.ts +1 -0
- package/dist/shared/utils/array.js +9 -1
- package/dist/shared/utils/array.test.d.ts +1 -0
- package/dist/sidebar/sidebar.js +2 -2
- package/dist/site-layout/site-layout.d.ts +15 -0
- package/dist/site-layout/site-layout.js +39 -0
- package/dist/site-layout/site-layout.module.css.js +3 -0
- package/dist/styles.css +10859 -3344
- package/dist/table/elements/table-provider.js +1 -1
- package/dist/table/elements/table-row-provider.js +1 -1
- package/dist/table/elements/table.js +2 -2
- package/dist/table/elements/use-table-row.js +2 -2
- package/dist/table/elements/use-table.js +2 -2
- package/dist/toast/toast.d.ts +6 -1
- package/dist/toast/toast.js +2 -3
- package/dist/typography/heading/heading.d.ts +18 -10
- package/dist/typography/heading/heading.js +28 -14
- package/dist/typography/heading/heading.module.css.js +1 -1
- package/package.json +6 -5
- package/dist/buttons/print-button/print-button.d.ts +0 -2
- package/dist/buttons/print-button/print-button.js +0 -10
- package/dist/footer/connected-footer.d.ts +0 -3
- package/dist/footer/connected-footer.js +0 -21
- package/dist/header/connected-header.d.ts +0 -3
- package/dist/header/connected-header.js +0 -21
- package/dist/notifications/announcements/connected-announcement-list.d.ts +0 -3
- package/dist/notifications/announcements/connected-announcement-list.js +0 -22
- package/dist/notifications/announcements/use-filter-announcements.d.ts +0 -2
- package/dist/notifications/announcements/use-filter-announcements.js +0 -35
- package/dist/pages/account/layouts/sign-in-page-layout/sign-in-page-background-image.d.ts +0 -6
- package/dist/pages/account/layouts/sign-in-page-layout/sign-in-page-background-image.js +0 -9
- package/dist/pages/account/layouts/sign-in-page-layout/sign-in-page-layout.d.ts +0 -9
- package/dist/pages/account/layouts/sign-in-page-layout/sign-in-page-layout.js +0 -12
- package/dist/pages/account/layouts/sign-in-page-layout/sign-in-page-layout.module.css.js +0 -3
- package/dist/pages/checkout/cart-page/components/empty-cart-page.d.ts +0 -1
- package/dist/pages/checkout/cart-page/components/empty-cart-page.js +0 -12
- package/dist/pages/checkout/layouts/checkout-page-layout/checkout-page-layout.d.ts +0 -11
- package/dist/pages/checkout/layouts/checkout-page-layout/checkout-page-layout.js +0 -34
- package/dist/pages/checkout/layouts/checkout-page-layout/checkout-page-layout.module.css.js +0 -3
- package/dist/pages/checkout/layouts/checkout-page-layout/components/checkout-page-section.js +0 -11
- package/dist/pages/checkout/layouts/checkout-page-layout/components/checkout-page-section.module.css.js +0 -3
- package/dist/pages/my-sonic/layouts/my-sonic-layout/my-sonic-layout-aside.d.ts +0 -4
- package/dist/pages/my-sonic/layouts/my-sonic-layout/my-sonic-layout-aside.js +0 -9
- package/dist/pages/my-sonic/layouts/my-sonic-layout/my-sonic-layout-breadcrumb.d.ts +0 -4
- package/dist/pages/my-sonic/layouts/my-sonic-layout/my-sonic-layout-breadcrumb.js +0 -9
- package/dist/pages/my-sonic/layouts/my-sonic-layout/my-sonic-layout-main.d.ts +0 -4
- package/dist/pages/my-sonic/layouts/my-sonic-layout/my-sonic-layout-main.js +0 -9
- package/dist/pages/my-sonic/layouts/my-sonic-layout/my-sonic-layout-page.d.ts +0 -5
- package/dist/pages/my-sonic/layouts/my-sonic-layout/my-sonic-layout-page.js +0 -10
- package/dist/pages/my-sonic/layouts/my-sonic-layout/my-sonic-layout-pre-aside.d.ts +0 -4
- package/dist/pages/my-sonic/layouts/my-sonic-layout/my-sonic-layout-pre-aside.js +0 -9
- package/dist/pages/my-sonic/layouts/my-sonic-layout/my-sonic-layout-title.d.ts +0 -4
- package/dist/pages/my-sonic/layouts/my-sonic-layout/my-sonic-layout-title.js +0 -10
- package/dist/pages/my-sonic/layouts/my-sonic-layout/my-sonic-layout.d.ts +0 -5
- package/dist/pages/my-sonic/layouts/my-sonic-layout/my-sonic-layout.js +0 -10
- package/dist/pages/my-sonic/layouts/my-sonic-layout/my-sonic-layout.module.css.js +0 -3
- package/dist/pages/product/layouts/product-details-page-layout/product-details-page-layout.d.ts +0 -9
- package/dist/pages/product/layouts/product-details-page-layout/product-details-page-layout.js +0 -10
- package/dist/pages/product/layouts/product-details-page-layout/product-details-page-layout.module.css.js +0 -3
- package/dist/pages/product/product-details-page/components/product-details-recently-viewed-section/product-details-recently-viewed-section.module.css.js +0 -3
- package/dist/pages/product/search-result-page/search-results-page.module.css.js +0 -3
- /package/dist/pages/checkout/{layouts/checkout-page-layout/components → components}/checkout-page-section-content.d.ts +0 -0
- /package/dist/pages/checkout/{layouts/checkout-page-layout/components → components}/checkout-page-section-content.js +0 -0
- /package/dist/pages/checkout/{layouts/checkout-page-layout/components → components}/checkout-page-section-link.d.ts +0 -0
- /package/dist/pages/checkout/{layouts/checkout-page-layout/components → components}/checkout-page-section-link.js +0 -0
- /package/dist/pages/checkout/{layouts/checkout-page-layout/components → components}/checkout-page-section.d.ts +0 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { Link } from 'react-aria-components';
|
|
4
|
+
import clsx from 'clsx';
|
|
5
|
+
import { Icon } from '../../icon/icon.js';
|
|
6
|
+
import { ResponsiveImage } from '../../media/responsive-image/responsive-image.js';
|
|
7
|
+
import { Heading } from '../../typography/heading/heading.js';
|
|
8
|
+
import { PageSection } from '../page-section/page-section.js';
|
|
9
|
+
import styles from './social-media-section.module.css.js';
|
|
10
|
+
|
|
11
|
+
const icons = {
|
|
12
|
+
facebook: 'SocialFacebook',
|
|
13
|
+
instagram: 'SocialInstagram',
|
|
14
|
+
linkedin: 'SocialLinkedin',
|
|
15
|
+
other: 'SocialLink',
|
|
16
|
+
tiktok: 'SocialTiktok',
|
|
17
|
+
youtube: 'SocialYoutube',
|
|
18
|
+
};
|
|
19
|
+
/* minimum 6, maximum 9 social media items, else the orphan item edge cases begin to stack */
|
|
20
|
+
function SocialMediaSection({ anchorId, className, 'data-country-gate': dataCountryGate, 'data-test-selector': dataTestSelector, items, title, }) {
|
|
21
|
+
return (jsxs(PageSection, { anchorId: anchorId, className: clsx(styles['social-media-section'], className), "data-country-gate": dataCountryGate, "data-test-selector": dataTestSelector, children: [title && (jsx(Heading, { italic: true, className: styles['title'], size: "xl", tag: "h2", children: title })), jsx("div", { className: styles['items'], role: "list", children: items?.map(({ href, imageAlt, imageFocusPoint, imageSrc, key, target, theme = 'dark', type, }) => {
|
|
22
|
+
const iconName = icons[type];
|
|
23
|
+
return (jsx("div", { className: clsx(styles['item'], styles[`theme-${theme}`]), role: "listitem", children: jsxs(Link, { className: styles['link'], href: href, target: target, children: [jsx(Icon, { className: styles['icon'], label: `(${type})`, name: iconName }), jsx(ResponsiveImage, { altText: imageAlt, className: styles['image'], fit: "cover", focusPoint: imageFocusPoint, sizes: "(min-width: 48rem) 25vw, 50vw", src: imageSrc })] }) }, key));
|
|
24
|
+
}) })] }));
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export { SocialMediaSection };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var styles = {"social-media-section":"social-media-section-module-reCm7","title":"social-media-section-module-2hnNR","items":"social-media-section-module-iMQ7c","item":"social-media-section-module-rakXC","link":"social-media-section-module--Xuxg","icon":"social-media-section-module-Q2QXN","image":"social-media-section-module-6TTvm","theme-dark":"social-media-section-module-h8kye","theme-light":"social-media-section-module-ybe31"};
|
|
2
|
+
|
|
3
|
+
export { styles as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PageSectionLayout } from '../page-section/page-section';
|
|
2
|
+
export interface SubheadlineSectionProps {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
className?: string;
|
|
5
|
+
layout?: PageSectionLayout;
|
|
6
|
+
}
|
|
7
|
+
export declare function SubheadlineSection({ children, className, layout, }: SubheadlineSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
import { Heading } from '../../typography/heading/heading.js';
|
|
5
|
+
import { PageSection } from '../page-section/page-section.js';
|
|
6
|
+
import styles from './subheadline-section.module.css.js';
|
|
7
|
+
|
|
8
|
+
function SubheadlineSection({ children, className, layout = 'auto', }) {
|
|
9
|
+
return (jsx(PageSection, { className: clsx(styles['subheadline-section'], className), layout: layout, children: jsx(Heading, { bold: false, className: styles['title'], size: "s", tag: "h2", children: children }) }));
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export { SubheadlineSection };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { PageSectionTheme } from '../page-section/page-section';
|
|
2
|
+
export interface USPItemProps {
|
|
3
|
+
children?: React.ReactNode;
|
|
4
|
+
className?: string;
|
|
5
|
+
'data-country-gate'?: string;
|
|
6
|
+
imageSrc?: string;
|
|
7
|
+
title: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export declare function USPItem({ children, className, 'data-country-gate': dataCountryGate, imageSrc, title, }: USPItemProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export interface USPSectionProps {
|
|
11
|
+
anchorId?: string;
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
className?: string;
|
|
14
|
+
'data-country-gate'?: string;
|
|
15
|
+
'data-test-selector'?: string;
|
|
16
|
+
theme?: PageSectionTheme;
|
|
17
|
+
title?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare function USPSection({ anchorId, children, className, 'data-country-gate': dataCountryGate, 'data-test-selector': dataTestSelector, theme, title, }: USPSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
import { ResponsiveImage } from '../../media/responsive-image/responsive-image.js';
|
|
5
|
+
import { RichText } from '../../rich-text/rich-text.js';
|
|
6
|
+
import { Heading } from '../../typography/heading/heading.js';
|
|
7
|
+
import { PageSection } from '../page-section/page-section.js';
|
|
8
|
+
import styles from './usp-section.module.css.js';
|
|
9
|
+
|
|
10
|
+
function USPItem({ children, className, 'data-country-gate': dataCountryGate, imageSrc, title, }) {
|
|
11
|
+
return (jsxs("article", { className: clsx(styles['item'], className), "data-country-gate": dataCountryGate, children: [jsx(Heading, { italic: true, uppercase: true, className: styles['item-title'], size: "xxxl", tag: "h3", children: title }), imageSrc && (jsx("div", { className: styles['item-icon'], role: "presentation", children: jsx(ResponsiveImage, { className: styles['responsive-image'], fit: "contain", sizes: "4rem", src: imageSrc }) })), children && (jsx(RichText, { className: styles['item-body'], children: children }))] }));
|
|
12
|
+
}
|
|
13
|
+
function USPSection({ anchorId, children, className, 'data-country-gate': dataCountryGate, 'data-test-selector': dataTestSelector, theme, title, }) {
|
|
14
|
+
return (jsxs(PageSection, { anchorId: anchorId, as: "article", className: clsx(styles['usp-section'], className), "data-country-gate": dataCountryGate, "data-test-selector": dataTestSelector, theme: theme, children: [title && (jsx(Heading, { italic: true, className: styles['title'], size: "xl", tag: "h2", children: title })), jsx("div", { className: styles['items'], children: children })] }));
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export { USPItem, USPSection };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var styles = {"usp-section":"usp-section-module-hfsme","title":"usp-section-module-wf2B1","items":"usp-section-module-B6ARl","item":"usp-section-module-CUqv-","item-icon":"usp-section-module-BHI0R","responsive-image":"usp-section-module-t5cwY","item-title":"usp-section-module-E00Z1","item-body":"usp-section-module-UioFj"};
|
|
2
|
+
|
|
3
|
+
export { styles as default };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { MediaSubTitlesItem } from '../../media/responsive-video/responsive-video';
|
|
2
|
+
import { FocusPoint } from '../../shared/model/image';
|
|
3
|
+
import { PageSectionLayout, PageSectionTheme } from '../page-section/page-section';
|
|
4
|
+
export interface VideoSectionProps {
|
|
5
|
+
anchorId?: string;
|
|
6
|
+
ariaDescription?: string;
|
|
7
|
+
autoplay?: boolean;
|
|
8
|
+
captions?: Partial<MediaSubTitlesItem> | null;
|
|
9
|
+
chapters?: string | null;
|
|
10
|
+
className?: string;
|
|
11
|
+
'data-country-gate'?: string;
|
|
12
|
+
'data-test-selector'?: string;
|
|
13
|
+
filetype: 'video/mp4' | 'video/webm' | 'video/ogg';
|
|
14
|
+
layout?: PageSectionLayout;
|
|
15
|
+
loop?: boolean;
|
|
16
|
+
muted?: boolean;
|
|
17
|
+
posterFocusPoint?: FocusPoint;
|
|
18
|
+
posterImage?: string | null;
|
|
19
|
+
showChapterSelection?: boolean;
|
|
20
|
+
showSeekControls?: boolean;
|
|
21
|
+
showSubtitlesSelection?: boolean;
|
|
22
|
+
sourceHeight?: number;
|
|
23
|
+
sourceWidth?: number;
|
|
24
|
+
src: string;
|
|
25
|
+
subtitles?: Partial<MediaSubTitlesItem> | null;
|
|
26
|
+
theme?: PageSectionTheme;
|
|
27
|
+
title?: string;
|
|
28
|
+
uiTheme?: 'light' | 'dark';
|
|
29
|
+
}
|
|
30
|
+
export declare function VideoSection({ anchorId, ariaDescription, autoplay, captions, chapters, className, 'data-country-gate': dataCountryGate, 'data-test-selector': dataTestSelector, filetype, layout, loop, muted, posterFocusPoint, posterImage, showChapterSelection, showSeekControls, showSubtitlesSelection, sourceHeight, sourceWidth, src, subtitles, theme, title, uiTheme, }: VideoSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
import { ResponsiveVideo } from '../../media/responsive-video/responsive-video.js';
|
|
5
|
+
import { Heading } from '../../typography/heading/heading.js';
|
|
6
|
+
import { PageSection } from '../page-section/page-section.js';
|
|
7
|
+
import styles from './video-section.module.css.js';
|
|
8
|
+
|
|
9
|
+
function VideoSection({ anchorId, ariaDescription, autoplay, captions, chapters, className, 'data-country-gate': dataCountryGate, 'data-test-selector': dataTestSelector, filetype, layout = 'auto', loop, muted, posterFocusPoint, posterImage, showChapterSelection, showSeekControls, showSubtitlesSelection, sourceHeight, sourceWidth, src, subtitles, theme, title, uiTheme, }) {
|
|
10
|
+
return (jsxs(PageSection, { anchorId: anchorId, className: clsx(styles['video-section'], className), "data-country-gate": dataCountryGate, "data-test-selector": dataTestSelector, layout: layout, theme: theme, children: [title && (jsx(Heading, { italic: true, className: styles['title'], size: "xl", tag: "h2", children: title })), jsx(ResponsiveVideo, { ariaDescription: ariaDescription, autoplay: autoplay, captions: captions, chapters: chapters, className: styles['video'], filetype: filetype, loop: loop, muted: muted, posterFocusPoint: posterFocusPoint, posterImage: posterImage, showChapterSelection: showChapterSelection, showSeekControls: showSeekControls, showSubtitlesSelection: showSubtitlesSelection, sourceHeight: sourceHeight, sourceWidth: sourceWidth, src: src, subtitles: subtitles, theme: uiTheme })] }));
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export { VideoSection };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ErrorViewProps } from './types';
|
|
2
|
-
export declare function DefaultErrorView({ className, error, errorInfo, resetError, resetLabel, showErrorDetails, showReset,
|
|
2
|
+
export declare function DefaultErrorView({ className, error, errorInfo, resetError, resetLabel, showErrorDetails, showReset, }: ErrorViewProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -5,13 +5,15 @@ import { Button } from '../../buttons/button/button.js';
|
|
|
5
5
|
import { Details } from '../../display/details/details.js';
|
|
6
6
|
import { Icon } from '../../icon/icon.js';
|
|
7
7
|
import { useFormattedMessage } from '../../intl/use-formatted-message.js';
|
|
8
|
+
import { RichText } from '../../rich-text/rich-text.js';
|
|
9
|
+
import { RichTextSection } from '../../sections/rich-text-section/rich-text-section.js';
|
|
8
10
|
import { Heading } from '../../typography/heading/heading.js';
|
|
9
11
|
import { isProductionEnvironment } from '../utils/environment.js';
|
|
10
12
|
import styles from './default-error-view.module.css.js';
|
|
11
13
|
|
|
12
|
-
function DefaultErrorView({ className, error, errorInfo, resetError, resetLabel, showErrorDetails = !isProductionEnvironment, showReset,
|
|
14
|
+
function DefaultErrorView({ className, error, errorInfo, resetError, resetLabel, showErrorDetails = !isProductionEnvironment, showReset, }) {
|
|
13
15
|
const t = useFormattedMessage();
|
|
14
|
-
return (jsxs(
|
|
16
|
+
return (jsxs(RichTextSection, { className: clsx(styles['default-error-view'], className), children: [jsx(RichText, { children: jsx("p", { children: error.message || t('An unexpected error occured. Please try again.') }) }), showErrorDetails && (jsxs(Details, { className: styles['error-details'], lang: "en", summary: "Technical Details (only visible in development mode)", children: [jsx("output", { className: styles['error-kind'], children: error.toString() }), error.stack && (jsxs("div", { className: styles['error-info'], children: [jsx(Heading, { className: styles['error-info-title'], responsive: false, size: "xxxs", tag: "h2", children: "Stack:" }), jsx("pre", { className: styles['error-info-data'], children: error.stack })] })), errorInfo?.componentStack && (jsxs("div", { className: styles['component-info'], children: [jsx(Heading, { className: styles['error-info-title'], responsive: false, size: "xxxs", tag: "h2", children: "Component stack:" }), jsx("pre", { className: styles['error-info-data'], children: errorInfo.componentStack })] }))] })), showReset && resetError && (jsx(Button, { light: true, className: styles['reset-button'], color: "secondary", icon: jsx(Icon, { name: "Refresh", size: "sm" }), onClick: resetError, size: "sm", type: "button", variant: "outline", children: resetLabel || t('Reset') }))] }));
|
|
15
17
|
}
|
|
16
18
|
|
|
17
19
|
export { DefaultErrorView };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var styles = {"default-error-view":"default-error-view-module-IXKuf","
|
|
1
|
+
var styles = {"default-error-view":"default-error-view-module-IXKuf","error-kind":"default-error-view-module-LRchn","error-info":"default-error-view-module-Tz1Vb","error-info-title":"default-error-view-module-go6yg","error-info-data":"default-error-view-module--B3DB"};
|
|
2
2
|
|
|
3
3
|
export { styles as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
-
import { createContext,
|
|
3
|
+
import { createContext, use, useEffect, useState, useMemo } from 'react';
|
|
4
4
|
|
|
5
5
|
function InternalGlobalUnhandledErrorHandler({ captureUnhandledRejections = true, captureWindowErrors = true, context, ignore, onErrorCaught, }) {
|
|
6
6
|
const [error, setError] = useState(null);
|
|
@@ -56,7 +56,7 @@ function InternalGlobalUnhandledErrorHandler({ captureUnhandledRejections = true
|
|
|
56
56
|
}
|
|
57
57
|
const ErrorBoundaryContext = createContext(undefined);
|
|
58
58
|
function GlobalUnhandledErrorHandler({ children, ...props }) {
|
|
59
|
-
const context =
|
|
59
|
+
const context = use(ErrorBoundaryContext);
|
|
60
60
|
useEffect(() => {
|
|
61
61
|
if (!context)
|
|
62
62
|
return;
|
|
@@ -65,7 +65,7 @@ function GlobalUnhandledErrorHandler({ children, ...props }) {
|
|
|
65
65
|
}, [context]);
|
|
66
66
|
const [ignore, setIgnore] = useState(props.ignore ?? false);
|
|
67
67
|
const value = useMemo(() => ({ hasChild: setIgnore }), [setIgnore]);
|
|
68
|
-
return (jsxs(ErrorBoundaryContext
|
|
68
|
+
return (jsxs(ErrorBoundaryContext, { value: value, children: [jsx(InternalGlobalUnhandledErrorHandler, { captureWindowErrors: false, ...props, ignore: ignore }, ignore.toString()), children] }));
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
export { GlobalUnhandledErrorHandler };
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { use, useMemo } from 'react';
|
|
3
3
|
import qs from 'query-string';
|
|
4
4
|
import { LocalStorageContext } from '../local-storage/local-storage-context.js';
|
|
5
5
|
|
|
6
6
|
const features = {
|
|
7
7
|
cartv1: 'cartV1',
|
|
8
8
|
checkoutv1: 'checkoutV1',
|
|
9
|
+
layoutgrid: 'layoutGrid',
|
|
9
10
|
missing: 'missing',
|
|
10
11
|
pdpv1: 'pdpV1',
|
|
11
12
|
plpv1: 'plpV1',
|
|
12
13
|
translations: 'translations',
|
|
13
14
|
};
|
|
14
15
|
function useFeatureFlags() {
|
|
15
|
-
const { localStorage } =
|
|
16
|
+
const { localStorage } = use(LocalStorageContext) ?? {};
|
|
16
17
|
const { search } = typeof window === 'undefined'
|
|
17
18
|
? {
|
|
18
19
|
search: '',
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
export interface UseDragScrollOptions {
|
|
3
|
+
draggingClassName?: string;
|
|
4
|
+
enabled?: boolean;
|
|
5
|
+
onDragEnd?: () => void;
|
|
6
|
+
threshold?: number;
|
|
7
|
+
}
|
|
8
|
+
export interface DragScrollHandlers {
|
|
9
|
+
onClick: (event: React.MouseEvent<HTMLElement>) => void;
|
|
10
|
+
onDragStart: (event: React.DragEvent<HTMLElement>) => void;
|
|
11
|
+
onLostPointerCapture: () => void;
|
|
12
|
+
onPointerCancel: () => void;
|
|
13
|
+
onPointerDown: (event: React.PointerEvent<HTMLElement>) => void;
|
|
14
|
+
onPointerMove: (event: React.PointerEvent<HTMLElement>) => void;
|
|
15
|
+
onPointerUp: (event: React.PointerEvent<HTMLElement>) => void;
|
|
16
|
+
}
|
|
17
|
+
export declare function useDragScroll(ref: RefObject<HTMLElement | null>, { draggingClassName, enabled, onDragEnd, threshold, }?: UseDragScrollOptions): {
|
|
18
|
+
handlers: DragScrollHandlers;
|
|
19
|
+
isDragging: () => boolean;
|
|
20
|
+
};
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useRef, useEffect, useMemo } from 'react';
|
|
3
|
+
|
|
4
|
+
// distance in px a pointer must travel before a press counts as a drag
|
|
5
|
+
const DRAG_THRESHOLD = 4;
|
|
6
|
+
// drag to scroll for any scrollable element; touch is left to scroll natively
|
|
7
|
+
function useDragScroll(ref, { draggingClassName = 'is-dragging', enabled = true, onDragEnd, threshold = DRAG_THRESHOLD, } = {}) {
|
|
8
|
+
// kept in a ref so that a new callback identity does not rebuild the handlers
|
|
9
|
+
const onDragEndRef = useRef(onDragEnd);
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
onDragEndRef.current = onDragEnd;
|
|
12
|
+
});
|
|
13
|
+
const s = useRef({
|
|
14
|
+
hasMoved: false,
|
|
15
|
+
isDown: false,
|
|
16
|
+
startScrollLeft: 0,
|
|
17
|
+
startScrollTop: 0,
|
|
18
|
+
startX: 0,
|
|
19
|
+
startY: 0,
|
|
20
|
+
});
|
|
21
|
+
const handlers = useMemo(() => {
|
|
22
|
+
// pointer capture is released for us on cancel and on capture loss; pointerup
|
|
23
|
+
// and lostpointercapture can both land, so this has to be idempotent
|
|
24
|
+
const stopDragging = () => {
|
|
25
|
+
if (!s.current.isDown)
|
|
26
|
+
return;
|
|
27
|
+
s.current.isDown = false;
|
|
28
|
+
ref.current?.classList.remove(draggingClassName);
|
|
29
|
+
// the scroll can already be at rest here - at either end of the track, or
|
|
30
|
+
// exactly on a snap point - in which case letting go produces no scroll and
|
|
31
|
+
// so no scrollEnd; the end of a drag is a settle in its own right
|
|
32
|
+
onDragEndRef.current?.();
|
|
33
|
+
};
|
|
34
|
+
return {
|
|
35
|
+
// a drag that moved should not activate whatever it happened to end on
|
|
36
|
+
onClick: event => {
|
|
37
|
+
if (!s.current.hasMoved)
|
|
38
|
+
return;
|
|
39
|
+
s.current.hasMoved = false;
|
|
40
|
+
event.preventDefault();
|
|
41
|
+
event.stopPropagation();
|
|
42
|
+
},
|
|
43
|
+
// links and images start a native drag, which takes the gesture over and
|
|
44
|
+
// stops the pointer events this relies on; there is no cross browser CSS
|
|
45
|
+
// for it, -webkit-user-drag being WebKit and Blink only
|
|
46
|
+
onDragStart: event => {
|
|
47
|
+
if (s.current.isDown)
|
|
48
|
+
event.preventDefault();
|
|
49
|
+
},
|
|
50
|
+
onLostPointerCapture: stopDragging,
|
|
51
|
+
onPointerCancel: stopDragging,
|
|
52
|
+
onPointerDown: event => {
|
|
53
|
+
const element = ref.current;
|
|
54
|
+
if (!enabled || !element)
|
|
55
|
+
return;
|
|
56
|
+
// touch scrolls natively, and only the primary button drags
|
|
57
|
+
if (event.pointerType === 'touch' || event.button !== 0)
|
|
58
|
+
return;
|
|
59
|
+
s.current = {
|
|
60
|
+
...s.current,
|
|
61
|
+
hasMoved: false,
|
|
62
|
+
isDown: true,
|
|
63
|
+
startScrollLeft: element.scrollLeft,
|
|
64
|
+
startScrollTop: element.scrollTop,
|
|
65
|
+
startX: event.clientX,
|
|
66
|
+
startY: event.clientY,
|
|
67
|
+
};
|
|
68
|
+
element.classList.add(draggingClassName);
|
|
69
|
+
},
|
|
70
|
+
onPointerMove: event => {
|
|
71
|
+
const element = ref.current;
|
|
72
|
+
if (!s.current.isDown || !element)
|
|
73
|
+
return;
|
|
74
|
+
const dx = event.clientX - s.current.startX;
|
|
75
|
+
const dy = event.clientY - s.current.startY;
|
|
76
|
+
if (!s.current.hasMoved &&
|
|
77
|
+
(Math.abs(dx) > threshold || Math.abs(dy) > threshold)) {
|
|
78
|
+
s.current.hasMoved = true;
|
|
79
|
+
// captured here rather than on pointerdown: while an element holds
|
|
80
|
+
// pointer capture the browser retargets the compatibility mouse
|
|
81
|
+
// events to it, so `click` lands on the scroll area and never
|
|
82
|
+
// reaches the link or button the press started on. Only a gesture
|
|
83
|
+
// that became a drag needs to keep tracking outside the element.
|
|
84
|
+
element.setPointerCapture(event.pointerId);
|
|
85
|
+
}
|
|
86
|
+
element.scrollLeft = s.current.startScrollLeft - dx;
|
|
87
|
+
element.scrollTop = s.current.startScrollTop - dy;
|
|
88
|
+
},
|
|
89
|
+
onPointerUp: event => {
|
|
90
|
+
if (!s.current.isDown)
|
|
91
|
+
return;
|
|
92
|
+
// only held when the press turned into a drag; releasing a capture
|
|
93
|
+
// that was never taken throws InvalidPointerId
|
|
94
|
+
if (ref.current?.hasPointerCapture(event.pointerId))
|
|
95
|
+
ref.current.releasePointerCapture(event.pointerId);
|
|
96
|
+
stopDragging();
|
|
97
|
+
},
|
|
98
|
+
};
|
|
99
|
+
}, [draggingClassName, enabled, ref, threshold]);
|
|
100
|
+
return {
|
|
101
|
+
handlers,
|
|
102
|
+
// read at call time; dragging is ref state and never triggers a render
|
|
103
|
+
isDragging: () => s.current.isDown,
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export { useDragScroll };
|
|
@@ -8,7 +8,7 @@ function LocalStorageProvider({ children, localStorage, sessionStorage, }) {
|
|
|
8
8
|
localStorage,
|
|
9
9
|
sessionStorage,
|
|
10
10
|
}), [localStorage, sessionStorage]);
|
|
11
|
-
return
|
|
11
|
+
return jsx(LocalStorageContext, { value: value, children: children });
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
export { LocalStorageProvider };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { use, useState } from 'react';
|
|
3
3
|
import { LocalStorageContext } from './local-storage-context.js';
|
|
4
4
|
|
|
5
5
|
function useLocalStorage(key, initialState) {
|
|
6
|
-
const { localStorage } =
|
|
6
|
+
const { localStorage } = use(LocalStorageContext) ?? {
|
|
7
7
|
localStorage: typeof window === 'undefined' ? undefined : window.localStorage,
|
|
8
8
|
};
|
|
9
9
|
const storedValue = localStorage?.getItem(key);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { use, useState } from 'react';
|
|
3
3
|
import { LocalStorageContext } from './local-storage-context.js';
|
|
4
4
|
|
|
5
5
|
function useSessionStorage(key, initialState) {
|
|
6
|
-
const { sessionStorage } =
|
|
6
|
+
const { sessionStorage } = use(LocalStorageContext) ?? {
|
|
7
7
|
sessionStorage: typeof window === 'undefined' ? undefined : window.sessionStorage,
|
|
8
8
|
};
|
|
9
9
|
const storedValue = sessionStorage?.getItem(key);
|
|
@@ -3,6 +3,7 @@ export type AnnouncementType = (typeof announcementTypes)[number];
|
|
|
3
3
|
export declare const announcementSubTypes: readonly ["sales", "news", "critical", "informative", "notice", "event", "new_product_introduction"];
|
|
4
4
|
export type AnnouncementSubType = (typeof announcementSubTypes)[number];
|
|
5
5
|
export interface AnnouncementObject {
|
|
6
|
+
countryGate?: string;
|
|
6
7
|
endDate?: Date;
|
|
7
8
|
href: string;
|
|
8
9
|
id: string;
|
|
@@ -24,3 +24,8 @@ export interface ResponsiveImageType {
|
|
|
24
24
|
sm?: DPRSrcSet;
|
|
25
25
|
}
|
|
26
26
|
export declare function isResponsiveImage(image: unknown): image is ResponsiveImageType;
|
|
27
|
+
/** Point of interest in an image, as fractions (0–1) of its width and height. */
|
|
28
|
+
export interface FocusPoint {
|
|
29
|
+
x: number;
|
|
30
|
+
y: number;
|
|
31
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
|
-
import { createContext,
|
|
3
|
+
import { createContext, use, useState, useEffect, useCallback, useRef } from 'react';
|
|
4
4
|
import { deepEqual } from 'fast-equals';
|
|
5
5
|
import { EventEmitter } from '../utils/event-emitter.js';
|
|
6
6
|
|
|
@@ -59,10 +59,10 @@ const GlobalStateProviderContext = createContext(undefined);
|
|
|
59
59
|
function GlobalStateProvider({ children, }) {
|
|
60
60
|
const internalState = useRef({});
|
|
61
61
|
const globalState = useRef(new GlobalState(internalState));
|
|
62
|
-
return (jsx(GlobalStateProviderContext
|
|
62
|
+
return (jsx(GlobalStateProviderContext, { value: globalState.current, children: children }));
|
|
63
63
|
}
|
|
64
64
|
function useGlobalState(key, initialState) {
|
|
65
|
-
const state =
|
|
65
|
+
const state = use(GlobalStateProviderContext).get(key, initialState);
|
|
66
66
|
const [rerenderState, setRerenderState] = useState(state.value);
|
|
67
67
|
useEffect(() => {
|
|
68
68
|
const updateState = (value) => {
|
|
@@ -10,7 +10,7 @@ function RouteProvider({ children, Link, navigate, paths, url, }) {
|
|
|
10
10
|
paths,
|
|
11
11
|
url,
|
|
12
12
|
}), [Link, navigate, paths, url]);
|
|
13
|
-
return jsx(RouteContext
|
|
13
|
+
return jsx(RouteContext, { value: value, children: children });
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
export { RouteProvider };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { use } from 'react';
|
|
3
3
|
import { RouteContext } from './route-context.js';
|
|
4
4
|
|
|
5
5
|
function useRouter() {
|
|
6
|
-
const context =
|
|
6
|
+
const context = use(RouteContext);
|
|
7
7
|
if (!context) {
|
|
8
8
|
throw new Error('useRouter must be used within a RouteProvider');
|
|
9
9
|
}
|
|
@@ -1,5 +1,13 @@
|
|
|
1
|
+
// shallow, order sensitive comparison of two arrays
|
|
2
|
+
function arraysEqual(a, b) {
|
|
3
|
+
if (a === b)
|
|
4
|
+
return true;
|
|
5
|
+
if (a.length !== b.length)
|
|
6
|
+
return false;
|
|
7
|
+
return a.every((value, index) => value === b[index]);
|
|
8
|
+
}
|
|
1
9
|
function ensureArray(value) {
|
|
2
10
|
return Array.isArray(value) ? value : [value];
|
|
3
11
|
}
|
|
4
12
|
|
|
5
|
-
export { ensureArray };
|
|
13
|
+
export { arraysEqual, ensureArray };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/sidebar/sidebar.js
CHANGED
|
@@ -11,13 +11,13 @@ function Sidebar({ children, className }) {
|
|
|
11
11
|
const t = useFormattedMessage();
|
|
12
12
|
const { isDocked, isOpen, toggle, transition } = useSidebar();
|
|
13
13
|
const { ref: sidebarRef } = useInert(isOpen);
|
|
14
|
-
return (jsxs("aside", { ref: sidebarRef, "aria-hidden": !isOpen
|
|
14
|
+
return (jsxs("aside", { ref: sidebarRef, "aria-hidden": !isOpen, className: clsx(styles.sidebar, {
|
|
15
15
|
[styles['transition']]: transition,
|
|
16
16
|
[styles['is-open']]: isOpen,
|
|
17
17
|
[styles['is-closed']]: !isOpen,
|
|
18
18
|
[styles['is-docked']]: isDocked,
|
|
19
19
|
[styles['is-not-docked']]: !isDocked,
|
|
20
|
-
}, className), children: [jsx(IconButton, { className: styles.close, icon: "Close", label: t('Close'), onClick: toggle, size: "lg", theme: "secondary" }), jsx("div", { className: styles['content'], children: children })] }));
|
|
20
|
+
}, isOpen && 'open', className), children: [jsx(IconButton, { className: styles.close, icon: "Close", label: t('Close'), onClick: toggle, size: "lg", theme: "secondary" }), jsx("div", { className: styles['content'], children: children })] }));
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
export { Sidebar };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface SiteLayoutProps {
|
|
2
|
+
announcements?: React.ReactNode;
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
countryLanguage?: React.ReactNode;
|
|
5
|
+
debug?: boolean;
|
|
6
|
+
footer: React.ReactNode;
|
|
7
|
+
header: React.ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* Label of the skip link. When set, the layout does not read the intl
|
|
10
|
+
* context, so it can render outside an `IntlProvider` (e.g. in a root error
|
|
11
|
+
* page that has no providers). When omitted, the label is translated.
|
|
12
|
+
*/
|
|
13
|
+
skipLinkLabel?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare function SiteLayout({ announcements, children, countryLanguage, debug, footer, header, skipLinkLabel, }: SiteLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { useRef, useEffect } from 'react';
|
|
4
|
+
import { useFormattedMessage } from '../intl/use-formatted-message.js';
|
|
5
|
+
import { useFeatureFlags } from '../shared/feature-flags/use-feature-flags.js';
|
|
6
|
+
import styles from './site-layout.module.css.js';
|
|
7
|
+
|
|
8
|
+
function TranslatedSkipLinkLabel() {
|
|
9
|
+
const t = useFormattedMessage();
|
|
10
|
+
return t('Skip to main content');
|
|
11
|
+
}
|
|
12
|
+
function SiteLayout({ announcements, children, countryLanguage, debug, footer, header, skipLinkLabel, }) {
|
|
13
|
+
const { layoutGrid } = useFeatureFlags();
|
|
14
|
+
const lastScrollY = useRef(0);
|
|
15
|
+
useEffect(() => {
|
|
16
|
+
const handleScroll = () => {
|
|
17
|
+
if (window) {
|
|
18
|
+
const scrollY = window.scrollY;
|
|
19
|
+
document?.documentElement.style.setProperty('--page-scroll-y', `${scrollY}px`);
|
|
20
|
+
if (lastScrollY.current < scrollY) {
|
|
21
|
+
document?.documentElement.classList.add('is-scrolling-down');
|
|
22
|
+
document?.documentElement.classList.remove('is-scrolling-up');
|
|
23
|
+
}
|
|
24
|
+
if (lastScrollY.current >= scrollY) {
|
|
25
|
+
document?.documentElement.classList.add('is-scrolling-up');
|
|
26
|
+
document?.documentElement.classList.remove('is-scrolling-down');
|
|
27
|
+
}
|
|
28
|
+
lastScrollY.current = scrollY;
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
window?.addEventListener('scroll', handleScroll);
|
|
32
|
+
return () => {
|
|
33
|
+
window?.removeEventListener('scroll', handleScroll);
|
|
34
|
+
};
|
|
35
|
+
}, []);
|
|
36
|
+
return (jsxs("div", { className: styles['site-layout'], children: [jsx("div", { className: styles['skip-links'], children: jsx("a", { href: "#page-content", children: skipLinkLabel ?? jsx(TranslatedSkipLinkLabel, {}) }) }), jsx("div", { className: styles['country-language'], children: countryLanguage }), jsx("div", { className: styles['announcements'], children: announcements }), jsx("div", { className: styles['header'], children: header }), jsx("div", { className: styles['page'], id: "page-content", tabIndex: -1, children: children }), jsx("div", { className: styles['footer'], children: footer }), (layoutGrid || debug) && jsx("div", { className: styles['debug-grid'] })] }));
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export { SiteLayout };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var styles = {"site-layout":"site-layout-module-1-Hmq","announcements":"site-layout-module-3iT1r","header":"site-layout-module-OFQzH","country-language":"site-layout-module-Uk-I5","footer":"site-layout-module-FvPKV","page":"site-layout-module-e4aN1","skip-links":"site-layout-module-P6oCq","debug-grid":"site-layout-module-Ao7Qi"};
|
|
2
|
+
|
|
3
|
+
export { styles as default };
|