@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,3 @@
|
|
|
1
|
+
var styles = {"responsive-banner":"responsive-banner-module-RdGnV","link":"responsive-banner-module-Ryc08","container":"responsive-banner-module-0k-N3","content":"responsive-banner-module-wi17w","tag":"responsive-banner-module-d2PGe","bg-gradient":"responsive-banner-module-MsP-u","image":"responsive-banner-module-u-X74","title":"responsive-banner-module-3ZkKD","body":"responsive-banner-module-4-CKK","text-hidden":"responsive-banner-module-zplyg","h-align-start":"responsive-banner-module-NgCJv","image-base":"responsive-banner-module-AG6wG","image-billboard":"responsive-banner-module-iVIgS","image-postcard":"responsive-banner-module-xCHv6","image-double-postcard":"responsive-banner-module--wM8Q","image-product-card":"responsive-banner-module-7n6Lh","image-leaderboard":"responsive-banner-module-rvLOq","image-filmstrip":"responsive-banner-module-Ysz9m","shape-billboard":"responsive-banner-module-kY0-b","shape-postcard":"responsive-banner-module-cXgri","shape-double-postcard":"responsive-banner-module-QtnrX","shape-product-card":"responsive-banner-module-7AafX","shape-leaderboard":"responsive-banner-module-LXCLM","shape-filmstrip":"responsive-banner-module-sRg9J","theme-dark":"responsive-banner-module-VraWe","theme-light":"responsive-banner-module-LPaK-","theme-red":"responsive-banner-module-ohniQ","theme-dark-red":"responsive-banner-module-oDtiq","theme-steel":"responsive-banner-module-QsH6u","theme-dark-steel":"responsive-banner-module-xhj8L","h-align-center":"responsive-banner-module-dyJEM","v-align-start":"responsive-banner-module-akIF9","v-align-center":"responsive-banner-module-aCaU2","v-align-end":"responsive-banner-module-5AJ3h","v-align-stretch":"responsive-banner-module-722k8"};
|
|
2
|
+
|
|
3
|
+
export { styles as default };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface ResponsiveCarouselProps {
|
|
2
|
+
ariaLabel?: string;
|
|
3
|
+
children?: React.ReactNode;
|
|
4
|
+
className?: string;
|
|
5
|
+
columns?: number;
|
|
6
|
+
'data-test-selector'?: string;
|
|
7
|
+
dim?: boolean;
|
|
8
|
+
draggable?: boolean;
|
|
9
|
+
fade?: boolean;
|
|
10
|
+
indicators?: boolean;
|
|
11
|
+
navigation?: boolean;
|
|
12
|
+
overflow?: boolean;
|
|
13
|
+
revealNavigation?: boolean;
|
|
14
|
+
revealOverflow?: boolean;
|
|
15
|
+
scrollBy?: 'individual' | 'visible-items';
|
|
16
|
+
snap?: 'start' | 'center';
|
|
17
|
+
}
|
|
18
|
+
export declare function ResponsiveCarousel({ ariaLabel, children, className, columns, 'data-test-selector': dataTestSelector, dim, draggable, fade, indicators, navigation, overflow, revealNavigation, revealOverflow, scrollBy, snap, }: ResponsiveCarouselProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { useRef, useMemo, Children, useState, useEffect, useCallback } from 'react';
|
|
4
|
+
import clsx from 'clsx';
|
|
5
|
+
import { IconButton } from '../buttons/icon-button/icon-button.js';
|
|
6
|
+
import { useFormattedMessage } from '../intl/use-formatted-message.js';
|
|
7
|
+
import { useDebouncedCallback } from '../shared/hooks/use-debounced-callback.js';
|
|
8
|
+
import { useDragScroll } from '../shared/hooks/use-drag-scroll.js';
|
|
9
|
+
import { arraysEqual } from '../shared/utils/array.js';
|
|
10
|
+
import styles from './responsive-carousel.module.css.js';
|
|
11
|
+
|
|
12
|
+
// a resize settles over several frames, and the intersection observer needs a
|
|
13
|
+
// moment to redeliver afterwards
|
|
14
|
+
const RESIZE_DELAY = 150;
|
|
15
|
+
// the trailing scroll of a drag and the scroll snap settle that follows it both
|
|
16
|
+
// end in a scrollEnd event; this is the window in which they are coalesced
|
|
17
|
+
const SCROLL_END_DELAY = 60;
|
|
18
|
+
// the scroll position of the DOM is the source of truth here, not React state;
|
|
19
|
+
// see README.md in this folder for how that flows into activeItems, and why
|
|
20
|
+
function ResponsiveCarousel({ ariaLabel, children, className, columns, 'data-test-selector': dataTestSelector, dim = false, draggable = true, fade = false, indicators = true, navigation = true, overflow = false, revealNavigation = false, revealOverflow = false, scrollBy = 'visible-items', snap = 'start', }) {
|
|
21
|
+
const t = useFormattedMessage();
|
|
22
|
+
const carouselRef = useRef(null);
|
|
23
|
+
const scrollAreaRef = useRef(null);
|
|
24
|
+
const itemsRef = useRef(null);
|
|
25
|
+
const count = useMemo(() => Children.count(children), [children]);
|
|
26
|
+
// const [focus, setFocus] = useState(false)
|
|
27
|
+
const [activeItems, setActiveItems] = useState([]);
|
|
28
|
+
const drag = useDragScroll(scrollAreaRef, {
|
|
29
|
+
enabled: draggable,
|
|
30
|
+
// handleScrollEnd is not initialised yet, so it is called rather than passed
|
|
31
|
+
onDragEnd: () => handleScrollEnd(),
|
|
32
|
+
});
|
|
33
|
+
// everything that changes without needing a render; see README.md
|
|
34
|
+
const d = useRef({
|
|
35
|
+
initialized: false,
|
|
36
|
+
pendingFocus: null,
|
|
37
|
+
st: null,
|
|
38
|
+
trackedActiveItems: [],
|
|
39
|
+
});
|
|
40
|
+
useEffect(() => {
|
|
41
|
+
// handle intersection observer entries
|
|
42
|
+
const handleIoEntries = (entries) => {
|
|
43
|
+
const s = d.current;
|
|
44
|
+
entries.forEach(entry => {
|
|
45
|
+
const index = getItemIndex(entry.target);
|
|
46
|
+
if (entry.intersectionRatio >= (snap === 'start' ? 0.25 : 0.5)) {
|
|
47
|
+
if (!s.trackedActiveItems.includes(index)) {
|
|
48
|
+
s.trackedActiveItems.push(index);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
if (s.trackedActiveItems.includes(index))
|
|
53
|
+
s.trackedActiveItems.splice(s.trackedActiveItems.indexOf(index), 1);
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
s.trackedActiveItems.sort((a, b) => a - b);
|
|
57
|
+
// seed the initial active items once; from then on they are committed on scrollEnd
|
|
58
|
+
if (!s.initialized) {
|
|
59
|
+
s.initialized = true;
|
|
60
|
+
setActiveItems([...s.trackedActiveItems]);
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
// create a new intersection observer
|
|
64
|
+
const io = IntersectionObserver
|
|
65
|
+
? new IntersectionObserver(handleIoEntries, {
|
|
66
|
+
root: carouselRef.current,
|
|
67
|
+
threshold: Array.from({ length: 101 }, (_, i) => i / 100),
|
|
68
|
+
})
|
|
69
|
+
: null;
|
|
70
|
+
// add carousel items to be observed
|
|
71
|
+
itemsRef.current?.childNodes.forEach(node => {
|
|
72
|
+
return io?.observe(node);
|
|
73
|
+
});
|
|
74
|
+
return () => io?.disconnect();
|
|
75
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
76
|
+
}, [d]);
|
|
77
|
+
const scrollItemElementIntoView = (target) => {
|
|
78
|
+
if (target) {
|
|
79
|
+
target.scrollIntoView({
|
|
80
|
+
block: 'nearest',
|
|
81
|
+
inline: snap,
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
// get DOM element of item at index
|
|
86
|
+
const getItemElement = (index) => {
|
|
87
|
+
return itemsRef.current?.children[index];
|
|
88
|
+
};
|
|
89
|
+
// get indes of DOM element of item
|
|
90
|
+
const getItemIndex = (target) => {
|
|
91
|
+
if (!target)
|
|
92
|
+
return -1;
|
|
93
|
+
return [...(itemsRef.current?.children ?? [])].indexOf(target);
|
|
94
|
+
};
|
|
95
|
+
// set outer focus on item
|
|
96
|
+
const setFocusItem = (index) => {
|
|
97
|
+
const target = getItemElement(index);
|
|
98
|
+
if (target)
|
|
99
|
+
requestAnimationFrame?.(() => target.focus({ preventScroll: true }));
|
|
100
|
+
};
|
|
101
|
+
// previous item; returns the index scrolled to
|
|
102
|
+
const prev = () => {
|
|
103
|
+
const prevIndex = (activeItems.at(0) ?? 0) -
|
|
104
|
+
(scrollBy === 'individual' ? 1 : activeItems.length);
|
|
105
|
+
const index = Math.max(prevIndex, 0);
|
|
106
|
+
scrollItemElementIntoView(getItemElement(index));
|
|
107
|
+
return index;
|
|
108
|
+
};
|
|
109
|
+
// next item; returns the index scrolled to
|
|
110
|
+
const next = () => {
|
|
111
|
+
const step = scrollBy === 'individual' ? 1 : activeItems.length;
|
|
112
|
+
const nextIndex = (activeItems.at(0) ?? 0) + step;
|
|
113
|
+
const index = Math.min(nextIndex, count - step);
|
|
114
|
+
scrollItemElementIntoView(getItemElement(index));
|
|
115
|
+
return index;
|
|
116
|
+
};
|
|
117
|
+
// keyboard events
|
|
118
|
+
// the arrow keys natively scroll whichever scrollable element has focus, and
|
|
119
|
+
// auto repeat makes that a stream of events; suppress it here and move the
|
|
120
|
+
// carousel on key up instead, so that a held key is a single move on release
|
|
121
|
+
const handleKeyDown = (e) => {
|
|
122
|
+
if (e.key === 'ArrowLeft' || e.key === 'ArrowRight')
|
|
123
|
+
e.preventDefault();
|
|
124
|
+
};
|
|
125
|
+
const handleKeyUp = (e) => {
|
|
126
|
+
const s = d.current;
|
|
127
|
+
switch (e.key) {
|
|
128
|
+
// which item to focus is only known once the new active items are known,
|
|
129
|
+
// so arm a direction here and resolve it on commit; arming null when the
|
|
130
|
+
// carousel did not move also discards an intent that would never resolve
|
|
131
|
+
case 'ArrowLeft':
|
|
132
|
+
s.pendingFocus = prev() === activeItems.at(0) ? null : 'last';
|
|
133
|
+
break;
|
|
134
|
+
case 'ArrowRight':
|
|
135
|
+
s.pendingFocus = next() === activeItems.at(0) ? null : 'first';
|
|
136
|
+
break;
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
// move focus onto the edge item the keyboard travelled towards, once the new
|
|
140
|
+
// active items have rendered and dropped their inert attribute
|
|
141
|
+
useEffect(() => {
|
|
142
|
+
const s = d.current;
|
|
143
|
+
if (!s.pendingFocus)
|
|
144
|
+
return;
|
|
145
|
+
const index = s.pendingFocus === 'first' ? activeItems.at(0) : activeItems.at(-1);
|
|
146
|
+
s.pendingFocus = null;
|
|
147
|
+
if (index !== undefined)
|
|
148
|
+
setFocusItem(index);
|
|
149
|
+
// setFocusItem is recreated every render; depending on it would consume the
|
|
150
|
+
// intent on the first unrelated render rather than on the one that matters
|
|
151
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
152
|
+
}, [activeItems]);
|
|
153
|
+
// commit the tracked items, allocating a new array only when they changed
|
|
154
|
+
const commitActiveItems = useCallback(() => {
|
|
155
|
+
setActiveItems(prev => arraysEqual(prev, d.current.trackedActiveItems)
|
|
156
|
+
? prev
|
|
157
|
+
: [...d.current.trackedActiveItems]);
|
|
158
|
+
}, []);
|
|
159
|
+
// scrolling events
|
|
160
|
+
const handleScroll = () => {
|
|
161
|
+
scrollAreaRef.current?.classList.add('is-scrolling');
|
|
162
|
+
};
|
|
163
|
+
const handleScrollEnd = () => {
|
|
164
|
+
const s = d.current;
|
|
165
|
+
if (drag.isDragging())
|
|
166
|
+
return;
|
|
167
|
+
scrollAreaRef.current?.classList.remove('is-scrolling');
|
|
168
|
+
// coalesce consecutive scrollEnd events into a single commit, which also
|
|
169
|
+
// gives pending intersection observer entries time to land
|
|
170
|
+
if (s.st)
|
|
171
|
+
clearTimeout(s.st);
|
|
172
|
+
s.st = setTimeout(() => {
|
|
173
|
+
s.st = null;
|
|
174
|
+
commitActiveItems();
|
|
175
|
+
}, SCROLL_END_DELAY);
|
|
176
|
+
};
|
|
177
|
+
// a resize changes how many items fit, so the active items change without any
|
|
178
|
+
// scrolling having taken place
|
|
179
|
+
const handleResize = useDebouncedCallback(commitActiveItems, RESIZE_DELAY);
|
|
180
|
+
// observing the scroll area rather than the viewport also catches the carousel
|
|
181
|
+
// being resized by its surroundings, by a container query or by a layout change
|
|
182
|
+
useEffect(() => {
|
|
183
|
+
const scrollArea = scrollAreaRef.current;
|
|
184
|
+
if (!scrollArea || typeof ResizeObserver === 'undefined')
|
|
185
|
+
return;
|
|
186
|
+
const ro = new ResizeObserver(() => handleResize());
|
|
187
|
+
ro.observe(scrollArea);
|
|
188
|
+
return () => {
|
|
189
|
+
handleResize.cancel();
|
|
190
|
+
ro.disconnect();
|
|
191
|
+
};
|
|
192
|
+
}, [handleResize]);
|
|
193
|
+
const handleTouchStart = () => {
|
|
194
|
+
scrollAreaRef.current?.classList.add('is-touching');
|
|
195
|
+
};
|
|
196
|
+
const handleTouchEnd = () => {
|
|
197
|
+
scrollAreaRef.current?.classList.remove('is-touching');
|
|
198
|
+
};
|
|
199
|
+
return (jsxs("section", { ref: carouselRef, "aria-label": ariaLabel, "aria-roledescription": t('Carousel'), className: clsx(styles['responsive-carousel'], dim && styles['dim'], draggable && styles['draggable'], fade && styles['fade'], overflow && styles['overflow'], revealNavigation && styles['reveal-navigation'], revealOverflow && styles['reveal-overflow'], styles[`snap-${snap}`], className), "data-test-selector": dataTestSelector, style: { '--cols': columns, '--nr-of-items': count }, children: [navigation && (jsxs("nav", { className: styles['scroll-nav'], children: [jsx(IconButton, { className: styles['prev'], icon: "ArrowLeftThick", isDisabled: activeItems.at(0) === 0, label: t('Previous'), onClick: prev, rel: "prev", size: "xxs" }), jsx(IconButton, { className: styles['next'], icon: "ArrowRightThick", isDisabled: activeItems.at(-1) === count - 1, label: t('Next'), onClick: next, rel: "next", size: "xxs" })] })), jsx("div", { ref: scrollAreaRef, className: styles['scroll-area'], onKeyDown: handleKeyDown, onKeyUp: handleKeyUp, onScroll: handleScroll,
|
|
200
|
+
// eslint-disable-next-line react/no-unknown-property
|
|
201
|
+
onScrollEnd: handleScrollEnd, onTouchEnd: handleTouchEnd, onTouchStart: handleTouchStart, tabIndex: -1, ...drag.handlers, children: jsx("div", { ref: itemsRef, className: styles['items'], role: "group", children: Children.map(children, (child, index) => (jsx("div", { "aria-label": t('{0} of {1}', {
|
|
202
|
+
replacementValues: {
|
|
203
|
+
'0': String(index + 1),
|
|
204
|
+
'1': String(count),
|
|
205
|
+
},
|
|
206
|
+
}), "aria-roledescription": t('carousel.slide'), className: styles['item'], inert: activeItems.includes(index) ? undefined : true, role: "listitem", tabIndex: -1, children: child }))) }) }), indicators && (jsx("div", { className: styles['indicators'], children: jsx("div", { className: styles['active-items'], role: "presentation" }) }))] }));
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
export { ResponsiveCarousel };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var styles = {"responsive-carousel":"responsive-carousel-module-7rkUq","anim-items-visible-start":"responsive-carousel-module-I9-vs","anim-items-visible-end":"responsive-carousel-module-qk5K8","scroll-nav":"responsive-carousel-module-5MJr1","prev":"responsive-carousel-module-ydV9l","next":"responsive-carousel-module-N1W3i","scroll-area":"responsive-carousel-module-1HcnL","items":"responsive-carousel-module-8IhBc","item":"responsive-carousel-module-QMR0M","indicators":"responsive-carousel-module-Ot15b","active-items":"responsive-carousel-module-PktKC","snap-start":"responsive-carousel-module-VvDJS","snap-center":"responsive-carousel-module-C171p","dim":"responsive-carousel-module-l20Zr","reveal-navigation":"responsive-carousel-module-0LIKk","reveal-overflow":"responsive-carousel-module-4lHYU","draggable":"responsive-carousel-module-J2LLN","fade":"responsive-carousel-module-H-Zih","overflow":"responsive-carousel-module-9yaw1"};
|
|
2
|
+
|
|
3
|
+
export { styles as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface RichTextProps {
|
|
2
|
+
children: React.ReactNode;
|
|
3
|
+
className?: string;
|
|
4
|
+
dataTestSelector?: string;
|
|
5
|
+
hAlign?: 'start' | 'center';
|
|
6
|
+
}
|
|
7
|
+
export declare function RichText({ children, className, dataTestSelector, hAlign, }: RichTextProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { clsx } from 'clsx';
|
|
4
|
+
import styles from './rich-text.module.css.js';
|
|
5
|
+
|
|
6
|
+
function RichText({ children, className, dataTestSelector, hAlign = 'start', }) {
|
|
7
|
+
return (jsx("div", { className: clsx(styles['rich-text'], styles[`align-${hAlign}`], className), "data-test-selector": dataTestSelector, children: jsx("div", { className: styles['body'], children: children }) }));
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export { RichText };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var styles = {"rich-text":"rich-text-module-wxsrO","align-center":"rich-text-module-RJ6s7","body":"rich-text-module-vatfx","h1":"rich-text-module-D3Wws","h2":"rich-text-module-6i-Tm","h3":"rich-text-module-nd9Qx","h4":"rich-text-module-jzQjX","h5":"rich-text-module-cv9LW","h6":"rich-text-module-KFaNc"};
|
|
2
|
+
|
|
3
|
+
export { styles as default };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
interface RTEAssetProps {
|
|
2
|
+
align?: 'center' | 'start';
|
|
3
|
+
caption?: React.ReactNode;
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
'data-country-gate'?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function RTEAsset({ align, caption, children, 'data-country-gate': dataCountryGate, }: RTEAssetProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { clsx } from 'clsx';
|
|
4
|
+
import styles from './rte-asset.module.css.js';
|
|
5
|
+
|
|
6
|
+
function RTEAsset({ align = 'center', caption, children, 'data-country-gate': dataCountryGate, }) {
|
|
7
|
+
return (jsxs("figure", { className: clsx(styles['rte-asset'], styles[`align-${align}`]), "data-country-gate": dataCountryGate, children: [children, caption && (jsx("figcaption", { className: styles['caption'], children: caption }))] }));
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export { RTEAsset };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
interface RTEBlockquoteProps {
|
|
2
|
+
align?: 'center' | 'start';
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
'data-country-gate'?: string;
|
|
5
|
+
source?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function RTEBlockquote({ align, children, 'data-country-gate': dataCountryGate, source, }: RTEBlockquoteProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
+
import { clsx } from 'clsx';
|
|
4
|
+
import styles from './rte-blockquote.module.css.js';
|
|
5
|
+
|
|
6
|
+
function RTEBlockquote({ align = 'center', children, 'data-country-gate': dataCountryGate, source, }) {
|
|
7
|
+
return (jsx("div", { className: clsx(styles['rte-blockquote'], styles[`align-${align}`]), "data-country-gate": dataCountryGate, children: jsxs("figure", { children: [jsx("blockquote", { className: styles['quote'], children: children }), source && (jsx("figcaption", { className: styles['source'], children: source }))] }) }));
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export { RTEBlockquote };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface RTEDetailsProps {
|
|
2
|
+
children: React.ReactNode;
|
|
3
|
+
'data-country-gate'?: string;
|
|
4
|
+
summary: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function RTEDetails({ children, 'data-country-gate': dataCountryGate, summary, }: RTEDetailsProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { Details } from '../display/details/details.js';
|
|
4
|
+
import styles from './rte-details.module.css.js';
|
|
5
|
+
|
|
6
|
+
function RTEDetails({ children, 'data-country-gate': dataCountryGate, summary, }) {
|
|
7
|
+
return (jsx(Details, { className: styles['rte-details'], "data-country-gate": dataCountryGate, summary: summary, children: children }));
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export { RTEDetails };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
interface RTEOrderedListProps {
|
|
3
|
+
children: ReactElement<typeof RTEOrderedListItem> | ReactElement<typeof RTEOrderedListItem>[];
|
|
4
|
+
'data-country-gate'?: string;
|
|
5
|
+
start?: number;
|
|
6
|
+
type?: 'decimal' | 'lower-latin' | 'lower-roman' | 'upper-latin' | 'upper-roman';
|
|
7
|
+
}
|
|
8
|
+
interface RTEOrderedListItemProps {
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
value?: number;
|
|
11
|
+
}
|
|
12
|
+
export declare function RTEOrderedList({ children, 'data-country-gate': dataCountryGate, start, type, }: RTEOrderedListProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare function RTEOrderedListItem({ children, value, }: RTEOrderedListItemProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { useRef, useEffect } from 'react';
|
|
4
|
+
import clsx from 'clsx';
|
|
5
|
+
import styles from './rte-ordered-list.module.css.js';
|
|
6
|
+
|
|
7
|
+
const orderedListTypes = {
|
|
8
|
+
decimal: '1',
|
|
9
|
+
'lower-latin': 'a',
|
|
10
|
+
'lower-roman': 'i',
|
|
11
|
+
'upper-latin': 'A',
|
|
12
|
+
'upper-roman': 'I',
|
|
13
|
+
};
|
|
14
|
+
function RTEOrderedList({ children, 'data-country-gate': dataCountryGate, start, type, }) {
|
|
15
|
+
const ref = useRef(null);
|
|
16
|
+
const listType = type ? orderedListTypes[type] : undefined;
|
|
17
|
+
useEffect(() => {
|
|
18
|
+
const supportsTypedAttr = CSS.supports('counter-reset: foo attr(start type(<integer>), 1)');
|
|
19
|
+
if (!supportsTypedAttr && start)
|
|
20
|
+
ref.current?.style.setProperty('--start', `calc(${start} - 1)`);
|
|
21
|
+
}, [start]);
|
|
22
|
+
return (jsx("ol", { ref: ref, className: clsx(styles['rte-ordered-list'], type ? styles[type] : undefined), "data-country-gate": dataCountryGate, start: start, type: listType, children: children }));
|
|
23
|
+
}
|
|
24
|
+
function RTEOrderedListItem({ children, value, }) {
|
|
25
|
+
const ref = useRef(null);
|
|
26
|
+
useEffect(() => {
|
|
27
|
+
const supportsTypedAttr = CSS.supports('counter-set: foo attr(value type(<integer>))');
|
|
28
|
+
if (!supportsTypedAttr && value)
|
|
29
|
+
ref.current?.style.setProperty('--value', value.toString());
|
|
30
|
+
}, [value]);
|
|
31
|
+
return (jsx("li", { ref: ref, value: value, children: children }));
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export { RTEOrderedList, RTEOrderedListItem };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var styles = {"rte-ordered-list":"rte-ordered-list-module-MCiA5","decimal":"rte-ordered-list-module-eFk3U","lower-roman":"rte-ordered-list-module-o3-Fg","upper-roman":"rte-ordered-list-module-YAA-H","lower-latin":"rte-ordered-list-module-Uak-0","upper-latin":"rte-ordered-list-module-AMwTz"};
|
|
2
|
+
|
|
3
|
+
export { styles as default };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PageSectionTheme } from '../page-section/page-section';
|
|
2
|
+
export interface AboutSectionProps {
|
|
3
|
+
anchorId?: string;
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
'data-country-gate'?: string;
|
|
7
|
+
'data-test-selector'?: string;
|
|
8
|
+
links?: React.ReactNode;
|
|
9
|
+
mediaContacts?: React.ReactNode;
|
|
10
|
+
theme?: PageSectionTheme;
|
|
11
|
+
title?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare function AboutSection({ anchorId, children, className, 'data-country-gate': dataCountryGate, 'data-test-selector': dataTestSelector, links, mediaContacts, theme, title, }: AboutSectionProps): 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 { RichText } from '../../rich-text/rich-text.js';
|
|
5
|
+
import { Heading } from '../../typography/heading/heading.js';
|
|
6
|
+
import { PageSection } from '../page-section/page-section.js';
|
|
7
|
+
import styles from './about-section.module.css.js';
|
|
8
|
+
|
|
9
|
+
function AboutSection({ anchorId, children, className, 'data-country-gate': dataCountryGate, 'data-test-selector': dataTestSelector, links, mediaContacts, theme = 'light', title, }) {
|
|
10
|
+
return (jsxs(PageSection, { anchorId: anchorId, as: "article", className: clsx(styles['about-section'], className), "data-country-gate": dataCountryGate, "data-test-selector": dataTestSelector, layout: "auto", theme: theme, children: [jsx(Heading, { className: styles['title'], size: "m", tag: "h2", children: title }), jsx(RichText, { children: children }), mediaContacts && (jsx("div", { className: styles['media-contacts'], children: mediaContacts })), links && jsx(RichText, { className: styles['links'], children: links })] }));
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export { AboutSection };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface MediaContactProps {
|
|
2
|
+
children: React.ReactNode;
|
|
3
|
+
className?: string;
|
|
4
|
+
'data-country-gate'?: string;
|
|
5
|
+
title?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function MediaContact({ children, className, 'data-country-gate': dataCountryGate, title, }: MediaContactProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
import { RichText } from '../../rich-text/rich-text.js';
|
|
5
|
+
import { Heading } from '../../typography/heading/heading.js';
|
|
6
|
+
import styles from './about-section.module.css.js';
|
|
7
|
+
|
|
8
|
+
function MediaContact({ children, className, 'data-country-gate': dataCountryGate, title, }) {
|
|
9
|
+
return (jsxs("section", { className: clsx(styles['media-contact'], className), "data-country-gate": dataCountryGate, children: [jsx(Heading, { className: styles['title'], size: "xs", tag: "h3", children: title }), jsx(RichText, { children: children })] }));
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export { MediaContact };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PageSectionLayout, PageSectionTheme } from '../page-section/page-section';
|
|
2
|
+
export interface BannerSectionProps {
|
|
3
|
+
anchorId?: string;
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
composition?: 'auto' | '2-1' | '1-2' | 'big-lead';
|
|
7
|
+
'data-country-gate'?: string;
|
|
8
|
+
'data-test-selector'?: string;
|
|
9
|
+
layout?: PageSectionLayout;
|
|
10
|
+
presentation?: 'grid' | 'dimorphic' | 'carousel';
|
|
11
|
+
theme?: PageSectionTheme;
|
|
12
|
+
}
|
|
13
|
+
export declare function BannerSection({ anchorId, children, className, composition, 'data-country-gate': dataCountryGate, 'data-test-selector': dataTestSelector, layout, presentation, theme, }: BannerSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
import { ResponsiveCarousel } from '../../responsive-carousel/responsive-carousel.js';
|
|
5
|
+
import { PageSection } from '../page-section/page-section.js';
|
|
6
|
+
import styles from './banner-section.module.css.js';
|
|
7
|
+
|
|
8
|
+
function BannerSection({ anchorId, children, className, composition = 'auto', 'data-country-gate': dataCountryGate, 'data-test-selector': dataTestSelector, layout = 'auto', presentation = 'grid', theme, }) {
|
|
9
|
+
return (jsxs(PageSection, { anchorId: anchorId, className: clsx(styles['banner-section'], styles[`composition-${composition}`], styles[`presentation-${presentation}`], className), "data-country-gate": dataCountryGate, "data-test-selector": dataTestSelector, layout: layout, theme: theme, children: [(presentation === 'grid' || presentation === 'dimorphic') && (jsx("div", { className: styles['items'], children: children })), (presentation === 'carousel' || presentation === 'dimorphic') && (jsx(ResponsiveCarousel, { overflow: true, revealOverflow: true, className: styles['carousel'], children: children }))] }));
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export { BannerSection };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var styles = {"banner-section":"banner-section-module-cSPQ7","items":"banner-section-module-qedte","carousel":"banner-section-module-AmUiq","composition-auto":"banner-section-module-VIKYR","composition-2-1":"banner-section-module-k9c2i","composition-1-2":"banner-section-module-zZUDE","composition-big-lead":"banner-section-module-49JKB","presentation-dimorphic":"banner-section-module-PbPVZ","presentation-carousel":"banner-section-module-n-Fqa"};
|
|
2
|
+
|
|
3
|
+
export { styles as default };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const bannerDefault: import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const bannerLimited: import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare const bannerSupport: import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare const bannerEvent: import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare const bannerCases: import("react/jsx-runtime").JSX.Element;
|
package/dist/sections/case-studies-listing-section/case-studies-listing-section.constants.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The id on the listing element itself. Paging is driven by the URL, so callers
|
|
3
|
+
* need to aim a `#fragment` at this element — which means both sides have to be
|
|
4
|
+
* able to import the value rather than retype the string.
|
|
5
|
+
*
|
|
6
|
+
* Deliberately not declared in `case-studies-listing-section.tsx`: that module
|
|
7
|
+
* is `'use client'`, and every export of a client module reaches a server
|
|
8
|
+
* component as an opaque reference instead of its value.
|
|
9
|
+
*/
|
|
10
|
+
export declare const CASE_STUDIES_LISTING_ID = "case-studies-listing";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The id on the listing element itself. Paging is driven by the URL, so callers
|
|
3
|
+
* need to aim a `#fragment` at this element — which means both sides have to be
|
|
4
|
+
* able to import the value rather than retype the string.
|
|
5
|
+
*
|
|
6
|
+
* Deliberately not declared in `case-studies-listing-section.tsx`: that module
|
|
7
|
+
* is `'use client'`, and every export of a client module reaches a server
|
|
8
|
+
* component as an opaque reference instead of its value.
|
|
9
|
+
*/
|
|
10
|
+
const CASE_STUDIES_LISTING_ID = 'case-studies-listing';
|
|
11
|
+
|
|
12
|
+
export { CASE_STUDIES_LISTING_ID };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export interface CaseStudiesListingItemProps {
|
|
2
|
+
href: string;
|
|
3
|
+
imageSrc: string;
|
|
4
|
+
key: string;
|
|
5
|
+
summary: React.ReactNode;
|
|
6
|
+
title: string;
|
|
7
|
+
}
|
|
8
|
+
export interface CaseStudiesListingSectionProps {
|
|
9
|
+
buttonLabel: string;
|
|
10
|
+
currentPage?: number;
|
|
11
|
+
'data-test-selector'?: string;
|
|
12
|
+
isLoading?: boolean;
|
|
13
|
+
items: CaseStudiesListingItemProps[];
|
|
14
|
+
/**
|
|
15
|
+
* Called with the 1-based page the user asked for. May be async — a server
|
|
16
|
+
* action, or anything else that takes a moment — in which case the section
|
|
17
|
+
* shows its own loading overlay until the returned promise settles.
|
|
18
|
+
*
|
|
19
|
+
* Scrolling is the caller's: aim the new URL at `CASE_STUDIES_LISTING_ID`
|
|
20
|
+
* and the router will land there itself. A scroll from in here would only
|
|
21
|
+
* race the router's and lose.
|
|
22
|
+
*/
|
|
23
|
+
onNavigate?: (pageNumber: number) => void | Promise<void>;
|
|
24
|
+
totalPages?: number;
|
|
25
|
+
}
|
|
26
|
+
export declare function CaseStudiesListingSection({ buttonLabel, currentPage, 'data-test-selector': dataTestSelector, isLoading, items, onNavigate, totalPages, }: CaseStudiesListingSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { useTransition } from 'react';
|
|
4
|
+
import { Button } from '../../buttons/button/button.js';
|
|
5
|
+
import { Pagination } from '../../filters/pagination/pagination.js';
|
|
6
|
+
import { DynamicLoadingOverlay } from '../../loading/dynamic-loading-overlay.js';
|
|
7
|
+
import { ImageTextBlock } from '../image-text-section/image-text-block.js';
|
|
8
|
+
import { PageSection } from '../page-section/page-section.js';
|
|
9
|
+
import { CASE_STUDIES_LISTING_ID } from './case-studies-listing-section.constants.js';
|
|
10
|
+
import styles from './case-studies-listing-section.module.css.js';
|
|
11
|
+
|
|
12
|
+
function CaseStudiesListingSection({ buttonLabel, currentPage = 0, 'data-test-selector': dataTestSelector, isLoading, items, onNavigate, totalPages, }) {
|
|
13
|
+
const [isNavigating, startTransition] = useTransition();
|
|
14
|
+
const handleNavigate = (pageNumber) => {
|
|
15
|
+
// Awaiting inside a transition is what keeps `isNavigating` true for the
|
|
16
|
+
// whole of an async `onNavigate` — awaiting in a plain handler would run
|
|
17
|
+
// the same code but leave nothing to render a pending state from.
|
|
18
|
+
startTransition(async () => {
|
|
19
|
+
await onNavigate?.(pageNumber);
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
return (jsxs(PageSection, { className: styles['case-studies-listing-section'], "data-test-selector": dataTestSelector, children: [jsx(DynamicLoadingOverlay, { className: styles['loading-overlay'], isLoading: isLoading || isNavigating, children: jsx("div", { id: CASE_STUDIES_LISTING_ID, role: "list", children: items.map((item, index) => {
|
|
23
|
+
const cta = (jsx(Button, { withArrow: true, "aria-label": item.title, color: "secondary", href: item.href, variant: "outline", children: buttonLabel }));
|
|
24
|
+
return (jsx(ImageTextBlock, { className: styles['item'], cta: cta, "data-test-selector": dataTestSelector
|
|
25
|
+
? `${dataTestSelector}-${item.key}`
|
|
26
|
+
: undefined, imageSrc: item.imageSrc, mirror: index % 2 === 1, role: "listitem", title: item.title, children: item.summary }, item.key));
|
|
27
|
+
}) }) }), totalPages && totalPages > 1 && onNavigate ? (jsx(Pagination, { className: styles['pagination'], currentPage: currentPage, onChange: handleNavigate, totalPages: totalPages })) : null] }));
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export { CaseStudiesListingSection };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PageSectionLayout, PageSectionTheme } from '../page-section/page-section';
|
|
2
|
+
export interface ClientCasesCarouselSectionProps {
|
|
3
|
+
anchorId?: string;
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
cta?: React.ReactNode;
|
|
7
|
+
'data-country-gate'?: string;
|
|
8
|
+
'data-test-selector'?: string;
|
|
9
|
+
layout?: PageSectionLayout;
|
|
10
|
+
theme?: PageSectionTheme;
|
|
11
|
+
title?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare function ClientCasesCarouselSection({ anchorId, children, className, cta, 'data-country-gate': dataCountryGate, 'data-test-selector': dataTestSelector, layout, theme, title, }: ClientCasesCarouselSectionProps): 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 { ResponsiveCarousel } from '../../responsive-carousel/responsive-carousel.js';
|
|
5
|
+
import { Heading } from '../../typography/heading/heading.js';
|
|
6
|
+
import { PageSection } from '../page-section/page-section.js';
|
|
7
|
+
import styles from './client-cases-carousel-section.module.css.js';
|
|
8
|
+
|
|
9
|
+
function ClientCasesCarouselSection({ anchorId, children, className, cta, 'data-country-gate': dataCountryGate, 'data-test-selector': dataTestSelector, layout = 'auto', theme, title, }) {
|
|
10
|
+
return (jsxs(PageSection, { anchorId: anchorId, className: clsx(styles['client-cases-carousel-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(ResponsiveCarousel, { overflow: true, revealOverflow: true, className: styles['items'], children: children }), cta && jsx("div", { className: styles['cta'], children: cta })] }));
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export { ClientCasesCarouselSection };
|