@sonic-equipment/ui 0.0.119 → 120.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/_virtual/_commonjsHelpers.js +5 -0
- package/dist/_virtual/index.js +7 -0
- package/dist/algolia/algolia-active-categories.js +38 -0
- package/dist/algolia/algolia-active-filters.js +33 -0
- package/dist/algolia/algolia-categories-filters.js +29 -0
- package/dist/algolia/algolia-dummy-refinement-list-consumer.js +20 -0
- package/dist/algolia/algolia-filter-panel.js +42 -0
- package/dist/algolia/algolia-filter-panel.module.css.js +3 -0
- package/dist/algolia/algolia-hit-type.js +6 -0
- package/dist/algolia/algolia-hits-provider.js +17 -0
- package/dist/algolia/algolia-index-config.js +175 -0
- package/dist/algolia/algolia-insight-instant-search-provider.js +14 -0
- package/dist/algolia/algolia-insights-provider.js +18 -0
- package/dist/algolia/algolia-instant-search-state-provider.js +16 -0
- package/dist/algolia/algolia-intialization.js +26 -0
- package/dist/algolia/algolia-multi-select-filter-section.js +27 -0
- package/dist/algolia/algolia-pagination.js +18 -0
- package/dist/algolia/algolia-provider.js +34 -0
- package/dist/algolia/algolia-query-string-routing.js +106 -0
- package/dist/algolia/algolia-results-count.js +14 -0
- package/dist/algolia/algolia-search-provider.js +139 -0
- package/dist/algolia/algolia-searchclient-offline.js +25 -0
- package/dist/algolia/algolia-sonic-searchclient.js +25 -0
- package/dist/algolia/algolia-sort-by.js +29 -0
- package/dist/algolia/filter-section.js +33 -0
- package/dist/algolia/filter-section.module.css.js +3 -0
- package/dist/algolia/use-algolia-hits.js +19 -0
- package/dist/algolia/use-algolia-insights-provider-global-state.js +9 -0
- package/dist/algolia/use-algolia-insights.js +181 -0
- package/dist/algolia/use-algolia-instant-search-state.js +25 -0
- package/dist/algolia/use-algolia-search.js +41 -0
- package/dist/background-overlay/background-overlay.js +36 -0
- package/dist/background-overlay/background-overlay.module.css.js +3 -0
- package/dist/badges/badge/badge.js +22 -0
- package/dist/badges/badge/badge.module.css.js +3 -0
- package/dist/badges/badge/icon-with-badge/icon-with-badge.js +8 -0
- package/dist/badges/badge/icon-with-badge/icon-with-badge.module.css.js +3 -0
- package/dist/badges/tag/tag.js +10 -0
- package/dist/badges/tag/tag.module.css.js +3 -0
- package/dist/breadcrumbs/breadcrumb.js +35 -0
- package/dist/breadcrumbs/breadcrumb.module.css.js +3 -0
- package/dist/buttons/add-to-cart-button/add-to-cart-button.js +113 -0
- package/dist/buttons/add-to-cart-button/add-to-cart-button.module.css.js +3 -0
- package/dist/buttons/add-to-cart-button/connected-add-to-cart-button.js +92 -0
- package/dist/buttons/button/button.js +21 -0
- package/dist/buttons/button/button.module.css.js +3 -0
- package/dist/buttons/favorite/connected-favorite-button.js +64 -0
- package/dist/buttons/favorite/favorite-button.js +15 -0
- package/dist/buttons/favorite/favorite-button.module.css.js +3 -0
- package/dist/buttons/icon-button/icon-button.js +15 -0
- package/dist/buttons/icon-button/icon-button.module.css.js +3 -0
- package/dist/buttons/link/link.js +10 -0
- package/dist/buttons/link/link.module.css.js +3 -0
- package/dist/buttons/print-button/print-button.js +9 -0
- package/dist/cards/category-card/category-card.js +15 -0
- package/dist/cards/category-card/category-card.module.css.js +3 -0
- package/dist/cards/orderline-card/connected-orderline-card.js +13 -0
- package/dist/cards/orderline-card/connected-remove-button.js +19 -0
- package/dist/cards/orderline-card/orderline-card.js +17 -0
- package/dist/cards/orderline-card/orderline-card.module.css.js +3 -0
- package/dist/cards/product-card/connected-product-card.js +11 -0
- package/dist/cards/product-card/product-card.js +15 -0
- package/dist/cards/product-card/product-card.module.css.js +3 -0
- package/dist/carousel/card-carousel/card-carousel.js +23 -0
- package/dist/carousel/card-carousel/card-carousel.module.css.js +3 -0
- package/dist/carousel/carousel-navigation-button.js +13 -0
- package/dist/carousel/carousel-navigation-button.module.css.js +3 -0
- package/dist/carousel/carousel.js +69 -0
- package/dist/carousel/carousel.module.css.js +3 -0
- package/dist/carousel/category-carousel/category-carousel.js +9 -0
- package/dist/carousel/category-carousel/category-carousel.module.css.js +3 -0
- package/dist/carousel/pagination/pagination.js +40 -0
- package/dist/carousel/pagination/pagination.module.css.js +3 -0
- package/dist/carousel/pagination/transitions.js +144 -0
- package/dist/carousel/usp-carousel/product-usp-carousel-slide.js +10 -0
- package/dist/carousel/usp-carousel/product-usp-carousel.js +9 -0
- package/dist/carousel/usp-carousel/usp-carousel.js +47 -0
- package/dist/carousel/usp-carousel/usp-carousel.module.css.js +3 -0
- package/dist/cart-totals/cart-totals-summary.js +11 -0
- package/dist/cart-totals/cart-totals-summary.module.css.js +3 -0
- package/dist/cart-totals/cart-totals.js +10 -0
- package/dist/cart-totals/cart-totals.module.css.js +3 -0
- package/dist/collapsables/accordion/accordion-item.js +18 -0
- package/dist/collapsables/accordion/accordion.js +15 -0
- package/dist/collapsables/accordion/accordion.module.css.js +3 -0
- package/dist/collapsables/show-all/show-all.js +33 -0
- package/dist/collapsables/show-all/show-all.module.css.js +3 -0
- package/dist/config.d.ts +1 -1
- package/dist/config.js +82 -0
- package/dist/country-selector/connected-country-selector.js +37 -0
- package/dist/country-selector/country-selector-dialog/country-selector-dialog.js +42 -0
- package/dist/country-selector/country-selector-dialog/country-selector-dialog.module.css.js +3 -0
- package/dist/country-selector/country-selector-trigger/country-selector-trigger.js +16 -0
- package/dist/country-selector/country-selector-trigger/country-selector-trigger.module.css.js +3 -0
- package/dist/country-selector/use-countries-languages.js +72 -0
- package/dist/delivery-time/delivery-time.js +18 -0
- package/dist/delivery-time/delivery-time.module.css.js +3 -0
- package/dist/display/product-price/product-price.js +19 -0
- package/dist/display/product-price/product-price.module.css.js +3 -0
- package/dist/display/product-price/product-total-price.js +16 -0
- package/dist/display/product-price/product-total-price.module.css.js +3 -0
- package/dist/display/product-sku/product-sku.js +8 -0
- package/dist/display/product-sku/product-sku.module.css.js +3 -0
- package/dist/exports.d.ts +4 -4
- package/dist/filters/active-filters/active-filters.js +20 -0
- package/dist/filters/active-filters/active-filters.module.css.js +3 -0
- package/dist/filters/multi-select/multi-select.js +20 -0
- package/dist/filters/multi-select/multi-select.module.css.js +3 -0
- package/dist/filters/pagination/pagination.js +14 -0
- package/dist/filters/pagination/pagination.module.css.js +3 -0
- package/dist/forms/checkbox/checkbox.js +11 -0
- package/dist/forms/checkbox/checkbox.module.css.js +3 -0
- package/dist/forms/color-checkbox/color-checkbox.js +13 -0
- package/dist/forms/field-error/field-error.js +10 -0
- package/dist/forms/field-error/field-error.module.css.js +3 -0
- package/dist/forms/input/input.js +31 -0
- package/dist/forms/input/input.module.css.js +3 -0
- package/dist/forms/label/label.js +12 -0
- package/dist/forms/label/label.module.css.js +3 -0
- package/dist/forms/number-field/number-field.js +29 -0
- package/dist/forms/number-field/number-field.module.css.js +3 -0
- package/dist/forms/select/select.js +31 -0
- package/dist/forms/select/select.module.css.js +3 -0
- package/dist/forms/text-field/text-field.js +22 -0
- package/dist/forms/text-field/text-field.module.css.js +3 -0
- package/dist/forms/textarea/textarea.js +54 -0
- package/dist/forms/textarea/textarea.module.css.js +3 -0
- package/dist/global-search/categories-grid/categories-grid.js +14 -0
- package/dist/global-search/categories-grid/categories-grid.module.css.js +3 -0
- package/dist/global-search/global-search-provider/global-search-provider.js +15 -0
- package/dist/global-search/global-search-provider/use-search-disclosure.js +13 -0
- package/dist/global-search/global-search.js +43 -0
- package/dist/global-search/global-search.module.css.js +3 -0
- package/dist/global-search/plugins/categories-plugin.js +35 -0
- package/dist/global-search/plugins/popular-categories-plugin.js +32 -0
- package/dist/global-search/plugins/popular-searches-plugin.js +23 -0
- package/dist/global-search/plugins/query-suggestions-plugin.js +21 -0
- package/dist/global-search/plugins/quick-access-plugin.js +34 -0
- package/dist/global-search/plugins/recent-searches-plugin.js +16 -0
- package/dist/global-search/search-highlight/highlight.js +13 -0
- package/dist/global-search/search-input/connected-search-input.js +22 -0
- package/dist/global-search/search-input/search-input.js +29 -0
- package/dist/global-search/search-input/search-input.module.css.js +3 -0
- package/dist/global-search/search-result-panel/panel-content.js +13 -0
- package/dist/global-search/search-result-panel/search-result-panel.js +17 -0
- package/dist/global-search/search-result-panel/search-result-panel.module.css.js +3 -0
- package/dist/global-search/search-result-panel/sections/no-search-results.js +30 -0
- package/dist/global-search/search-result-panel/sections/no-search.js +56 -0
- package/dist/global-search/search-result-panel/sections/search-content.module.css.js +3 -0
- package/dist/global-search/search-result-panel/sections/section-container.js +8 -0
- package/dist/global-search/search-result-panel/sections/with-results.js +101 -0
- package/dist/global-search/search-section/search-list-item.js +25 -0
- package/dist/global-search/search-section/search-list-item.module.css.js +3 -0
- package/dist/global-search/search-section/search-list.js +9 -0
- package/dist/global-search/search-section/search-list.module.css.js +3 -0
- package/dist/global-search/search-section/search-section.js +9 -0
- package/dist/global-search/search-section/search-section.module.css.js +3 -0
- package/dist/header/cart-icon/connected-cart-icon.js +14 -0
- package/dist/icons/glyph/glyphs-arrow-boldcaps-left-icon.js +7 -0
- package/dist/icons/glyph/glyphs-arrow-boldcaps-right-icon.js +7 -0
- package/dist/icons/glyph/glyphs-arrow-semibold-right-icon.js +7 -0
- package/dist/icons/glyph/glyphs-chevrons-bold-down-icon.js +7 -0
- package/dist/icons/glyph/glyphs-chevrons-slim-down-icon.js +7 -0
- package/dist/icons/glyph/glyphs-chevrons-slim-left-icon.js +7 -0
- package/dist/icons/glyph/glyphs-chevrons-slim-right-icon.js +7 -0
- package/dist/icons/solid/solid-attention-icon.js +7 -0
- package/dist/icons/solid/solid-cart-icon.js +7 -0
- package/dist/icons/solid/solid-close-icon.js +7 -0
- package/dist/icons/solid/solid-event-icon.js +7 -0
- package/dist/icons/solid/solid-favorite-icon.js +7 -0
- package/dist/icons/solid/solid-home-icon.js +7 -0
- package/dist/icons/solid/solid-information-icon.js +7 -0
- package/dist/icons/solid/solid-news-icon.js +7 -0
- package/dist/icons/solid/solid-notice-icon.js +7 -0
- package/dist/icons/solid/solid-okay-icon.js +7 -0
- package/dist/icons/solid/solid-sale-icon.js +7 -0
- package/dist/icons/solid/solid-tag-icon.js +7 -0
- package/dist/icons/stroke/stroke-categories-icon.js +7 -0
- package/dist/icons/stroke/stroke-checkmark-icon.js +7 -0
- package/dist/icons/stroke/stroke-closebox-icon.js +7 -0
- package/dist/icons/stroke/stroke-collapse-icon.js +7 -0
- package/dist/icons/stroke/stroke-download-icon.js +7 -0
- package/dist/icons/stroke/stroke-expand-icon.js +7 -0
- package/dist/icons/stroke/stroke-favorite-icon.js +7 -0
- package/dist/icons/stroke/stroke-filter-icon.js +7 -0
- package/dist/icons/stroke/stroke-recent-icon.js +7 -0
- package/dist/icons/stroke/stroke-search-icon.js +7 -0
- package/dist/icons/stroke/stroke-trash-icon.js +7 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +254 -12972
- package/dist/intl/formatted-message.js +6 -0
- package/dist/intl/intl-context.js +10 -0
- package/dist/intl/intl-provider.js +15 -0
- package/dist/intl/types.js +17 -0
- package/dist/intl/use-culture-code.js +14 -0
- package/dist/intl/use-formatted-message.js +17 -0
- package/dist/intl/use-language-code.js +11 -0
- package/dist/intl/utils.js +29 -0
- package/dist/lists/download-document-list/download-document-list.js +16 -0
- package/dist/lists/download-document-list/download-document-list.module.css.js +3 -0
- package/dist/lists/feature-list/feature-list.js +22 -0
- package/dist/lists/feature-list/feature-list.module.css.js +3 -0
- package/dist/lists/orderline-list/orderline-list.js +25 -0
- package/dist/lists/orderline-list/orderline-list.module.css.js +3 -0
- package/dist/lists/product-overview-grid/product-overview-grid.js +10 -0
- package/dist/lists/product-overview-grid/product-overview-grid.module.css.js +3 -0
- package/dist/lists/ul/list.js +11 -0
- package/dist/lists/ul/list.module.css.js +3 -0
- package/dist/loading/blank-page-spacer.js +8 -0
- package/dist/loading/blank-page-spacer.module.css.js +3 -0
- package/dist/loading/loading-overlay.js +9 -0
- package/dist/loading/loading-overlay.module.css.js +3 -0
- package/dist/loading/progress-circle.js +9 -0
- package/dist/loading/progress-circle.module.css.js +3 -0
- package/dist/media/image/image.js +46 -0
- package/dist/media/image/image.module.css.js +3 -0
- package/dist/media/image-grid/images-grid.js +32 -0
- package/dist/media/image-grid/images-grid.module.css.js +3 -0
- package/dist/media/image-lightbox/image-lightbox.js +35 -0
- package/dist/media/image-lightbox/image-lightbox.module.css.js +3 -0
- package/dist/media/zoom-image/zoom-image.js +33 -0
- package/dist/media/zoom-image/zoom-image.module.css.js +3 -0
- package/dist/modals/confirmation/confirmation-dialog.js +12 -0
- package/dist/modals/confirmation/confirmation-dialog.module.css.js +3 -0
- package/dist/modals/dialog/dialog.js +30 -0
- package/dist/modals/dialog/dialog.module.css.js +3 -0
- package/dist/modals/favorite/add-to-favorite-dialog.js +60 -0
- package/dist/modals/favorite/add-to-favorite-dialog.module.css.js +3 -0
- package/dist/modals/modal/modal.js +34 -0
- package/dist/modals/modal/modal.module.css.js +3 -0
- package/dist/modals/signin/sign-in-dialog.js +22 -0
- package/dist/modals/signin/sign-in-dialog.module.css.js +3 -0
- package/dist/node_modules/.pnpm/instantsearch.js@4.75.4_algoliasearch@4.24.0/node_modules/instantsearch.js/es/lib/routers/history.js +341 -0
- package/dist/node_modules/.pnpm/instantsearch.js@4.75.4_algoliasearch@4.24.0/node_modules/instantsearch.js/es/lib/stateMappings/simple.js +36 -0
- package/dist/node_modules/.pnpm/instantsearch.js@4.75.4_algoliasearch@4.24.0/node_modules/instantsearch.js/es/lib/utils/documentation.js +8 -0
- package/dist/node_modules/.pnpm/instantsearch.js@4.75.4_algoliasearch@4.24.0/node_modules/instantsearch.js/es/lib/utils/logger.js +32 -0
- package/dist/node_modules/.pnpm/instantsearch.js@4.75.4_algoliasearch@4.24.0/node_modules/instantsearch.js/es/lib/utils/noop.js +3 -0
- package/dist/node_modules/.pnpm/instantsearch.js@4.75.4_algoliasearch@4.24.0/node_modules/instantsearch.js/es/lib/utils/safelyRunOnBrowser.js +24 -0
- package/dist/node_modules/.pnpm/qs@6.9.7/node_modules/qs/lib/formats.js +33 -0
- package/dist/node_modules/.pnpm/qs@6.9.7/node_modules/qs/lib/index.js +25 -0
- package/dist/node_modules/.pnpm/qs@6.9.7/node_modules/qs/lib/parse.js +269 -0
- package/dist/node_modules/.pnpm/qs@6.9.7/node_modules/qs/lib/stringify.js +300 -0
- package/dist/node_modules/.pnpm/qs@6.9.7/node_modules/qs/lib/utils.js +264 -0
- package/dist/node_modules/.pnpm/swiper@11.1.14/node_modules/swiper/modules/free-mode.js +237 -0
- package/dist/node_modules/.pnpm/swiper@11.1.14/node_modules/swiper/modules/navigation.js +200 -0
- package/dist/node_modules/.pnpm/swiper@11.1.14/node_modules/swiper/modules/thumbs.js +193 -0
- package/dist/node_modules/.pnpm/swiper@11.1.14/node_modules/swiper/shared/create-element-if-not-defined.js +21 -0
- package/dist/node_modules/.pnpm/swiper@11.1.14/node_modules/swiper/shared/ssr-window.esm.js +145 -0
- package/dist/node_modules/.pnpm/swiper@11.1.14/node_modules/swiper/shared/swiper-core.js +3912 -0
- package/dist/node_modules/.pnpm/swiper@11.1.14/node_modules/swiper/shared/update-on-virtual-data.js +130 -0
- package/dist/node_modules/.pnpm/swiper@11.1.14/node_modules/swiper/shared/update-swiper.js +230 -0
- package/dist/node_modules/.pnpm/swiper@11.1.14/node_modules/swiper/shared/utils.js +287 -0
- package/dist/node_modules/.pnpm/swiper@11.1.14/node_modules/swiper/swiper-react.js +389 -0
- package/dist/notifications/announcements/announcement-provider.js +32 -0
- package/dist/notifications/announcements/announcement-provider.module.css.js +3 -0
- package/dist/notifications/announcements/announcement.js +30 -0
- package/dist/notifications/announcements/announcement.module.css.js +3 -0
- package/dist/notifications/announcements/connected-announcement.js +27 -0
- package/dist/observers/intersection-observer.js +18 -0
- package/dist/pages/cart-page/cart-page.js +114 -0
- package/dist/pages/error-page/error-page.js +22 -0
- package/dist/pages/layouts/checkout-page-layout/checkout-page-layout.js +30 -0
- package/dist/pages/layouts/checkout-page-layout/checkout-page-layout.module.css.js +3 -0
- package/dist/pages/layouts/product-details-page-layout/product-details-page-layout.js +8 -0
- package/dist/pages/layouts/product-details-page-layout/product-details-page-layout.module.css.js +3 -0
- package/dist/pages/loading-page/loading-page.js +9 -0
- package/dist/pages/page/page.js +18 -0
- package/dist/pages/page/page.module.css.js +3 -0
- package/dist/pages/page-container/page-container.js +9 -0
- package/dist/pages/page-container/page-container.module.css.js +3 -0
- package/dist/pages/product-details-page/components/product-details-images/product-detail-images.js +35 -0
- package/dist/pages/product-details-page/components/product-details-images/product-detail-images.module.css.js +3 -0
- package/dist/pages/product-details-page/components/product-details-panel/product-details-panel.d.ts +3 -2
- package/dist/pages/product-details-page/components/product-details-panel/product-details-panel.js +35 -0
- package/dist/pages/product-details-page/components/product-details-panel/product-details-panel.module.css.js +3 -0
- package/dist/pages/product-details-page/components/product-details-recently-viewed/product-details-recently-viewed.d.ts +4 -0
- package/dist/pages/product-details-page/components/product-details-recently-viewed/product-details-recently-viewed.js +15 -0
- package/dist/pages/product-details-page/product-details-page.js +22 -0
- package/dist/pages/product-details-page/product-details.d.ts +6 -0
- package/dist/pages/product-details-page/product-details.js +25 -0
- package/dist/pages/product-listing-page/no-results/no-results.js +14 -0
- package/dist/pages/product-listing-page/no-results/no-results.module.css.js +3 -0
- package/dist/pages/product-listing-page/product-listing-page-category-carousel/product-listing-page-category-carousel.js +22 -0
- package/dist/pages/product-listing-page/product-listing-page-provider/product-listing-page-context.js +8 -0
- package/dist/pages/product-listing-page/product-listing-page-provider/product-listing-page-provider.js +13 -0
- package/dist/pages/product-listing-page/product-listing-page.js +29 -0
- package/dist/pages/product-listing-page/product-listing-page.module.css.js +3 -0
- package/dist/pages/product-listing-page/product-listing-product-overview/product-listing-product-overview.js +36 -0
- package/dist/pages/product-listing-page/product-listing.d.ts +6 -0
- package/dist/pages/product-listing-page/product-listing.js +42 -0
- package/dist/pages/search-result-page/search-result-product-overview/search-result-product-overview.js +38 -0
- package/dist/pages/search-result-page/search-results-page-category-carousel/search-results-page-category-carousel.js +22 -0
- package/dist/pages/search-result-page/search-results-page.js +49 -0
- package/dist/pages/search-result-page/search-results-page.module.css.js +3 -0
- package/dist/promos/promo-banner/promo-banner.js +11 -0
- package/dist/promos/promo-banner/promo-banner.module.css.js +3 -0
- package/dist/promos/promo-banners/promo-banners.js +16 -0
- package/dist/promos/promo-banners/promo-banners.module.css.js +3 -0
- package/dist/promos/promo-card/promo-card.js +11 -0
- package/dist/promos/promo-card/promo-card.module.css.js +3 -0
- package/dist/shared/api/bff/hooks/use-fetch-announcements.js +15 -0
- package/dist/shared/api/bff/hooks/use-fetch-product-details-page-data.js +14 -0
- package/dist/shared/api/bff/hooks/use-fetch-product-listing-page-data.js +14 -0
- package/dist/shared/api/bff/model/bff.model.d.ts +1 -1
- package/dist/shared/api/bff/model/bff.model.js +1 -0
- package/dist/shared/api/bff/services/bff-service.js +76 -0
- package/dist/shared/api/storefront/hooks/authentication/use-fetch-session.js +18 -0
- package/dist/shared/api/storefront/hooks/authentication/use-invalidate-session.js +9 -0
- package/dist/shared/api/storefront/hooks/authentication/use-is-authenticated.js +8 -0
- package/dist/shared/api/storefront/hooks/authentication/use-sign-in.js +21 -0
- package/dist/shared/api/storefront/hooks/authentication/use-sign-out.js +25 -0
- package/dist/shared/api/storefront/hooks/cart/use-add-product-to-current-cart.js +31 -0
- package/dist/shared/api/storefront/hooks/cart/use-delete-cart-line-by-id.js +23 -0
- package/dist/shared/api/storefront/hooks/cart/use-delete-current-cart.js +18 -0
- package/dist/shared/api/storefront/hooks/cart/use-fetch-current-cart-checkout-atp.js +15 -0
- package/dist/shared/api/storefront/hooks/cart/use-fetch-current-cart-count.js +8 -0
- package/dist/shared/api/storefront/hooks/cart/use-fetch-current-cart-lines-with-atp.js +11 -0
- package/dist/shared/api/storefront/hooks/cart/use-fetch-current-cart-lines.js +11 -0
- package/dist/shared/api/storefront/hooks/cart/use-fetch-current-cart-product-atp.js +15 -0
- package/dist/shared/api/storefront/hooks/cart/use-fetch-current-cart-promotions.js +15 -0
- package/dist/shared/api/storefront/hooks/cart/use-fetch-current-cart-with-atp.js +26 -0
- package/dist/shared/api/storefront/hooks/cart/use-fetch-current-cart.js +17 -0
- package/dist/shared/api/storefront/hooks/cart/use-invalidate-current-cart.js +9 -0
- package/dist/shared/api/storefront/hooks/cart/use-patch-cart.js +15 -0
- package/dist/shared/api/storefront/hooks/cart/use-place-order.js +15 -0
- package/dist/shared/api/storefront/hooks/cart/use-save-cart-for-later.js +17 -0
- package/dist/shared/api/storefront/hooks/cart/use-update-cart-line-by-id.js +30 -0
- package/dist/shared/api/storefront/hooks/translation/use-fetch-translations.js +15 -0
- package/dist/shared/api/storefront/hooks/website/use-fetch-countries-languages.js +15 -0
- package/dist/shared/api/storefront/hooks/website/use-fetch-countries-with-languages.js +15 -0
- package/dist/shared/api/storefront/hooks/website/use-fetch-countries.js +14 -0
- package/dist/shared/api/storefront/hooks/website/use-fetch-settings.js +18 -0
- package/dist/shared/api/storefront/hooks/website/use-update-locale.js +11 -0
- package/dist/shared/api/storefront/hooks/wishlist/use-add-wishlist-item-to-current-wishlist.js +34 -0
- package/dist/shared/api/storefront/hooks/wishlist/use-add-wishlist-item-to-wishlist.js +33 -0
- package/dist/shared/api/storefront/hooks/wishlist/use-create-wishlist.js +17 -0
- package/dist/shared/api/storefront/hooks/wishlist/use-delete-wishlist-item-from-wishlist.js +21 -0
- package/dist/shared/api/storefront/hooks/wishlist/use-fetch-all-wishlists-items.js +36 -0
- package/dist/shared/api/storefront/hooks/wishlist/use-fetch-wishlists.js +14 -0
- package/dist/shared/api/storefront/model/shop.model.js +42 -0
- package/dist/shared/api/storefront/services/authentication-service.js +80 -0
- package/dist/shared/api/storefront/services/cart-service.js +128 -0
- package/dist/shared/api/storefront/services/translation-service.js +16 -0
- package/dist/shared/api/storefront/services/website-service.js +83 -0
- package/dist/shared/api/storefront/services/wishlist-service.js +72 -0
- package/dist/shared/feature-flags/use-feature-flags.js +45 -0
- package/dist/shared/fetch/request.d.ts +5 -0
- package/dist/shared/fetch/request.js +263 -0
- package/dist/shared/hooks/use-breakpoint.js +24 -0
- package/dist/shared/hooks/use-cookie.js +27 -0
- package/dist/shared/hooks/use-debounced-callback.js +18 -0
- package/dist/shared/hooks/use-disclosure.js +24 -0
- package/dist/shared/hooks/use-enable-mobile-zoom.js +36 -0
- package/dist/shared/hooks/use-intersection-observer.js +66 -0
- package/dist/shared/hooks/use-is-breakpoint.js +19 -0
- package/dist/shared/hooks/use-local-storage.js +19 -0
- package/dist/shared/hooks/use-resize-observer.d.ts +2 -2
- package/dist/shared/hooks/use-resize-observer.js +30 -0
- package/dist/shared/hooks/use-scroll-lock.js +11 -0
- package/dist/shared/hooks/use-scroll-to.js +19 -0
- package/dist/shared/hooks/use-session-storage.js +19 -0
- package/dist/shared/hooks/use-watch-css-property.d.ts +1 -0
- package/dist/shared/hooks/use-watch-css-property.js +29 -0
- package/dist/shared/model/announcement.js +18 -0
- package/dist/shared/model/category.js +25 -0
- package/dist/shared/model/currency.js +29 -0
- package/dist/shared/model/hit.js +45 -0
- package/dist/shared/model/image.js +5 -0
- package/dist/shared/providers/cart-provider.js +13 -0
- package/dist/shared/providers/favorite-provider.js +33 -0
- package/dist/shared/providers/global-state-provider.js +83 -0
- package/dist/shared/providers/react-query-container.js +20 -0
- package/dist/shared/routing/route-button.js +7 -0
- package/dist/shared/routing/route-icon-button.js +7 -0
- package/dist/shared/routing/route-link.js +7 -0
- package/dist/shared/routing/route-provider.d.ts +3 -1
- package/dist/shared/routing/route-provider.js +48 -0
- package/dist/shared/routing/with-routing.js +36 -0
- package/dist/shared/utils/array.js +5 -0
- package/dist/shared/utils/breakpoints.js +33 -0
- package/dist/shared/utils/date.js +58 -0
- package/dist/shared/utils/environment.d.ts +2 -2
- package/dist/shared/utils/environment.js +61 -0
- package/dist/shared/utils/event-emitter.js +34 -0
- package/dist/shared/utils/local-storage.js +108 -0
- package/dist/shared/utils/merge.js +70 -0
- package/dist/shared/utils/price.js +6 -0
- package/dist/shared/utils/time.js +9 -0
- package/dist/shared/utils/uuid.js +15 -0
- package/dist/shared/utils/wait.js +5 -0
- package/dist/sidebar/sidebar-provider.js +46 -0
- package/dist/sidebar/sidebar-provider.module.css.js +3 -0
- package/dist/sidebar/sidebar.js +23 -0
- package/dist/sidebar/sidebar.module.css.js +3 -0
- package/dist/sidebar/toggle-sidebar-button.js +13 -0
- package/dist/sidebar/use-sidebar.js +38 -0
- package/dist/styles.css +5 -16
- package/dist/toast/toast-provider.js +9 -0
- package/dist/toast/toast-provider.module.css.js +3 -0
- package/dist/toast/toast.js +24 -0
- package/dist/toast/toast.module.css.js +3 -0
- package/dist/toast/use-toast.js +21 -0
- package/dist/tokens/tokens.js +8 -0
- package/dist/typography/heading/heading.js +27 -0
- package/dist/typography/heading/heading.module.css.js +3 -0
- package/package.json +3 -2
- package/dist/pages/product-listing-page/product-listing-page-provider/use-subcategories.d.ts +0 -4
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* eslint-disable no-prototype-builtins */
|
|
3
|
+
/** Mocks the localStorage and sessionStorage API in Node.js
|
|
4
|
+
* @see https://gitlab.com/kaictl/node/mock-local-storage */
|
|
5
|
+
const HAS_LOCAL_STORAGE_SUPPORT = typeof localStorage !== 'undefined';
|
|
6
|
+
function mockStorage() {
|
|
7
|
+
if (HAS_LOCAL_STORAGE_SUPPORT)
|
|
8
|
+
return;
|
|
9
|
+
// const global = require('global')
|
|
10
|
+
// const window = require('global/window')
|
|
11
|
+
let win;
|
|
12
|
+
if (typeof global !== 'undefined') {
|
|
13
|
+
win = global;
|
|
14
|
+
}
|
|
15
|
+
else if (typeof self === 'undefined') {
|
|
16
|
+
win = {};
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
win = self;
|
|
20
|
+
}
|
|
21
|
+
Object.defineProperty(global, 'Storage', {
|
|
22
|
+
value: createStorage,
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(win, 'Storage', {
|
|
25
|
+
value: createStorage,
|
|
26
|
+
});
|
|
27
|
+
Object.defineProperty(global, 'localStorage', {
|
|
28
|
+
value: createStorage(),
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(win, 'localStorage', {
|
|
31
|
+
value: global.localStorage,
|
|
32
|
+
});
|
|
33
|
+
Object.defineProperty(global, 'sessionStorage', {
|
|
34
|
+
value: createStorage(),
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(win, 'sessionStorage', {
|
|
37
|
+
value: global.sessionStorage,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
const noopCallback = () => { };
|
|
41
|
+
function createStorage() {
|
|
42
|
+
const UNSET = Symbol();
|
|
43
|
+
const s = {};
|
|
44
|
+
let _itemInsertionCallback = noopCallback;
|
|
45
|
+
Object.defineProperty(s, 'setItem', {
|
|
46
|
+
get: () => {
|
|
47
|
+
return (k, v = UNSET) => {
|
|
48
|
+
if (v === UNSET) {
|
|
49
|
+
throw new TypeError(`Failed to execute 'setItem' on 'Storage': 2 arguments required, but only 1 present.`);
|
|
50
|
+
}
|
|
51
|
+
if (!s.hasOwnProperty(String(k))) {
|
|
52
|
+
_itemInsertionCallback();
|
|
53
|
+
}
|
|
54
|
+
s[String(k)] = String(v);
|
|
55
|
+
};
|
|
56
|
+
},
|
|
57
|
+
});
|
|
58
|
+
Object.defineProperty(s, 'getItem', {
|
|
59
|
+
get: () => {
|
|
60
|
+
return k => {
|
|
61
|
+
return s.hasOwnProperty(String(k)) ? s[String(k)] : null;
|
|
62
|
+
};
|
|
63
|
+
},
|
|
64
|
+
});
|
|
65
|
+
Object.defineProperty(s, 'removeItem', {
|
|
66
|
+
get: () => {
|
|
67
|
+
return k => {
|
|
68
|
+
if (s.hasOwnProperty(String(k))) {
|
|
69
|
+
delete s[String(k)];
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
},
|
|
73
|
+
});
|
|
74
|
+
Object.defineProperty(s, 'clear', {
|
|
75
|
+
get: () => {
|
|
76
|
+
return () => {
|
|
77
|
+
for (const k in s) {
|
|
78
|
+
delete s[String(k)];
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
},
|
|
82
|
+
});
|
|
83
|
+
Object.defineProperty(s, 'length', {
|
|
84
|
+
get: () => {
|
|
85
|
+
return Object.keys(s).length;
|
|
86
|
+
},
|
|
87
|
+
});
|
|
88
|
+
Object.defineProperty(s, 'key', {
|
|
89
|
+
value: k => {
|
|
90
|
+
const key = Object.keys(s)[String(k)];
|
|
91
|
+
return key ?? null;
|
|
92
|
+
},
|
|
93
|
+
});
|
|
94
|
+
Object.defineProperty(s, 'itemInsertionCallback', {
|
|
95
|
+
get: () => {
|
|
96
|
+
return _itemInsertionCallback;
|
|
97
|
+
},
|
|
98
|
+
set: v => {
|
|
99
|
+
if (!v || typeof v != 'function') {
|
|
100
|
+
v = noopCallback;
|
|
101
|
+
}
|
|
102
|
+
_itemInsertionCallback = v;
|
|
103
|
+
},
|
|
104
|
+
});
|
|
105
|
+
return s;
|
|
106
|
+
}
|
|
107
|
+
// Mock localStorage
|
|
108
|
+
mockStorage();
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
+
function main(...items) {
|
|
3
|
+
return merge(...items);
|
|
4
|
+
}
|
|
5
|
+
main.clone = clone;
|
|
6
|
+
main.isPlainObject = isPlainObject;
|
|
7
|
+
main.deepMerge = deepMerge;
|
|
8
|
+
function merge(...items) {
|
|
9
|
+
return _merge(true, false, items);
|
|
10
|
+
}
|
|
11
|
+
function deepMerge(...items) {
|
|
12
|
+
return _merge(true, true, items);
|
|
13
|
+
}
|
|
14
|
+
function clone(input) {
|
|
15
|
+
if (Array.isArray(input)) {
|
|
16
|
+
const output = [];
|
|
17
|
+
for (let index = 0; index < input.length; ++index)
|
|
18
|
+
output.push(clone(input[index]));
|
|
19
|
+
return output;
|
|
20
|
+
}
|
|
21
|
+
else if (isPlainObject(input)) {
|
|
22
|
+
const output = {};
|
|
23
|
+
for (const index in input)
|
|
24
|
+
output[index] = clone(input[index]);
|
|
25
|
+
return output;
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
return input;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
function isPlainObject(input) {
|
|
32
|
+
if (input === null || typeof input !== 'object')
|
|
33
|
+
return false;
|
|
34
|
+
if (Object.getPrototypeOf(input) === null)
|
|
35
|
+
return true;
|
|
36
|
+
let ref = input;
|
|
37
|
+
while (Object.getPrototypeOf(ref) !== null)
|
|
38
|
+
ref = Object.getPrototypeOf(ref);
|
|
39
|
+
return Object.getPrototypeOf(input) === ref;
|
|
40
|
+
}
|
|
41
|
+
function _recursiveMerge(base, extend) {
|
|
42
|
+
if (!isPlainObject(base) || !isPlainObject(extend))
|
|
43
|
+
return extend;
|
|
44
|
+
for (const key in extend) {
|
|
45
|
+
if (key === '__proto__' || key === 'constructor' || key === 'prototype')
|
|
46
|
+
continue;
|
|
47
|
+
base[key] =
|
|
48
|
+
isPlainObject(base[key]) && isPlainObject(extend[key])
|
|
49
|
+
? _recursiveMerge(base[key], extend[key])
|
|
50
|
+
: extend[key];
|
|
51
|
+
}
|
|
52
|
+
return base;
|
|
53
|
+
}
|
|
54
|
+
function _merge(isClone, isRecursive, items) {
|
|
55
|
+
let result;
|
|
56
|
+
result = {};
|
|
57
|
+
for (const item of items) {
|
|
58
|
+
if (!isPlainObject(item))
|
|
59
|
+
continue;
|
|
60
|
+
for (const key in item) {
|
|
61
|
+
if (key === '__proto__' || key === 'constructor' || key === 'prototype')
|
|
62
|
+
continue;
|
|
63
|
+
const value = clone(item[key]) ;
|
|
64
|
+
result[key] = isRecursive ? _recursiveMerge(result[key], value) : value;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
return result;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export { clone, deepMerge, main as default, isPlainObject, main, merge };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Create UUID according to
|
|
3
|
+
* https://www.ietf.org/rfc/rfc4122.txt.
|
|
4
|
+
*
|
|
5
|
+
* @returns Generated UUID.
|
|
6
|
+
*/
|
|
7
|
+
function createUUID() {
|
|
8
|
+
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replaceAll(/[xy]/g, c => {
|
|
9
|
+
const r = Math.trunc(Math.random() * 16);
|
|
10
|
+
const v = c === 'x' ? r : (r & 0x3) | 0x8;
|
|
11
|
+
return v.toString(16);
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export { createUUID };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { useEffect } from 'react';
|
|
4
|
+
import clsx from 'clsx';
|
|
5
|
+
import { BackgroundOverlay } from '../background-overlay/background-overlay.js';
|
|
6
|
+
import { useIsBreakpoint } from '../shared/hooks/use-is-breakpoint.js';
|
|
7
|
+
import { useGlobalState } from '../shared/providers/global-state-provider.js';
|
|
8
|
+
import { useSidebar } from './use-sidebar.js';
|
|
9
|
+
import styles from './sidebar-provider.module.css.js';
|
|
10
|
+
|
|
11
|
+
function SidebarDetectBreakpoint() {
|
|
12
|
+
const xxl = useIsBreakpoint('xxl');
|
|
13
|
+
const [{ transition }, setState] = useGlobalState('sidebar-state', { isDocked: !xxl, isOpen: xxl, transition: false });
|
|
14
|
+
useEffect(() => {
|
|
15
|
+
setState(state => {
|
|
16
|
+
const isDocked = !xxl;
|
|
17
|
+
const didDockChange = state.isDocked !== isDocked;
|
|
18
|
+
const isOpen = didDockChange ? !isDocked : state.isOpen;
|
|
19
|
+
return {
|
|
20
|
+
...state,
|
|
21
|
+
isDocked,
|
|
22
|
+
isOpen,
|
|
23
|
+
transition: !didDockChange,
|
|
24
|
+
};
|
|
25
|
+
});
|
|
26
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
27
|
+
}, [xxl]);
|
|
28
|
+
useEffect(() => {
|
|
29
|
+
if (transition)
|
|
30
|
+
return;
|
|
31
|
+
setTimeout(() => setState(state => ({ ...state, transition: true })), 10);
|
|
32
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
33
|
+
}, [transition]);
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
function SidebarProvider({ children }) {
|
|
37
|
+
const state = useSidebar();
|
|
38
|
+
const { close, isDocked, isOpen, transition } = state;
|
|
39
|
+
return (jsxs("div", { className: clsx(styles['sidebar-container'], {
|
|
40
|
+
[styles['transition']]: transition,
|
|
41
|
+
[styles['docked']]: isDocked,
|
|
42
|
+
[styles['open']]: isOpen,
|
|
43
|
+
}), children: [jsx(SidebarDetectBreakpoint, {}), children, isDocked && isOpen && (jsx(BackgroundOverlay, { isOpen: isOpen, onClose: close }))] }));
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export { SidebarDetectBreakpoint, SidebarProvider };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
import { IconButton } from '../buttons/icon-button/icon-button.js';
|
|
5
|
+
import { StrokeCloseboxIcon } from '../icons/stroke/stroke-closebox-icon.js';
|
|
6
|
+
import { useSidebar } from './use-sidebar.js';
|
|
7
|
+
import styles from './sidebar.module.css.js';
|
|
8
|
+
|
|
9
|
+
function InnerSidebar({ children }) {
|
|
10
|
+
const { isDocked, isOpen, toggle, transition } = useSidebar();
|
|
11
|
+
return (jsxs("aside", { className: clsx(styles.sidebar, {
|
|
12
|
+
[styles['transition']]: transition,
|
|
13
|
+
[styles['is-open']]: isOpen,
|
|
14
|
+
[styles['is-closed']]: !isOpen,
|
|
15
|
+
[styles['is-docked']]: isDocked,
|
|
16
|
+
[styles['is-not-docked']]: !isDocked,
|
|
17
|
+
}), children: [jsx("div", { className: styles.close, children: jsx(IconButton, { color: "secondary", onClick: toggle, children: jsx(StrokeCloseboxIcon, {}) }) }), children] }));
|
|
18
|
+
}
|
|
19
|
+
function Sidebar({ children }) {
|
|
20
|
+
return jsx(InnerSidebar, { children: children });
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export { Sidebar };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var styles = {"sidebar":"sidebar-module-fSa9Q","is-docked":"sidebar-module-AIq0M","transition":"sidebar-module-LEZgg","is-open":"sidebar-module-lV7wp","is-closed":"sidebar-module-dGDrr","close":"sidebar-module-2puGC","is-not-docked":"sidebar-module-Scw7D"};
|
|
2
|
+
|
|
3
|
+
export { styles as default };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { Button } from '../buttons/button/button.js';
|
|
4
|
+
import { StrokeFilterIcon } from '../icons/stroke/stroke-filter-icon.js';
|
|
5
|
+
import { FormattedMessage } from '../intl/formatted-message.js';
|
|
6
|
+
import { useSidebar } from './use-sidebar.js';
|
|
7
|
+
|
|
8
|
+
const ToggleSidebarButton = () => {
|
|
9
|
+
const { isOpen, toggle } = useSidebar();
|
|
10
|
+
return (jsx(Button, { color: "secondary", icon: jsx(StrokeFilterIcon, {}), onClick: toggle, size: "sm", variant: "outline", children: isOpen ? (jsx(FormattedMessage, { id: "Hide filters" })) : (jsx(FormattedMessage, { id: "Show filters" })) }));
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export { ToggleSidebarButton };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useCallback } from 'react';
|
|
3
|
+
import { useGlobalState } from '../shared/providers/global-state-provider.js';
|
|
4
|
+
import { getCurrentBreakpoints } from '../shared/utils/breakpoints.js';
|
|
5
|
+
|
|
6
|
+
const useSidebar = () => {
|
|
7
|
+
const isDocked = !getCurrentBreakpoints().xxl;
|
|
8
|
+
const [state, setState] = useGlobalState('sidebar-state', {
|
|
9
|
+
isDocked,
|
|
10
|
+
isOpen: !isDocked,
|
|
11
|
+
transition: false,
|
|
12
|
+
});
|
|
13
|
+
const close = useCallback(() => {
|
|
14
|
+
setState(state => ({ ...state, isOpen: false }));
|
|
15
|
+
}, [setState]);
|
|
16
|
+
const open = useCallback(() => {
|
|
17
|
+
setState(state => ({ ...state, isOpen: true }));
|
|
18
|
+
}, [setState]);
|
|
19
|
+
const toggle = useCallback(() => {
|
|
20
|
+
setState(state => ({ ...state, isOpen: !state.isOpen }));
|
|
21
|
+
}, [setState]);
|
|
22
|
+
useGlobalState('sidebar-actions', {
|
|
23
|
+
close,
|
|
24
|
+
open,
|
|
25
|
+
toggle,
|
|
26
|
+
});
|
|
27
|
+
return { ...state, close, open, toggle };
|
|
28
|
+
};
|
|
29
|
+
const useSidebarActions = () => {
|
|
30
|
+
const [actions] = useGlobalState('sidebar-actions', {
|
|
31
|
+
close: () => { },
|
|
32
|
+
open: () => { },
|
|
33
|
+
toggle: () => { },
|
|
34
|
+
});
|
|
35
|
+
return actions;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export { useSidebar, useSidebarActions };
|
package/dist/styles.css
CHANGED
|
@@ -241,16 +241,9 @@
|
|
|
241
241
|
--zoom-image-layer: 2100;
|
|
242
242
|
}
|
|
243
243
|
:root {
|
|
244
|
-
--header-height-desktop: 96px;
|
|
245
|
-
--header-height-mobile: 54px;
|
|
246
244
|
--search-input-height: 76px;
|
|
247
245
|
--announcement-bar-height: 52px;
|
|
248
|
-
--header-height:
|
|
249
|
-
}
|
|
250
|
-
@media (width >= 1024px) {
|
|
251
|
-
:root {
|
|
252
|
-
--header-height: var(--header-height-desktop);
|
|
253
|
-
}
|
|
246
|
+
--header-height: 0px;
|
|
254
247
|
}
|
|
255
248
|
|
|
256
249
|
/* stylelint-disable no-descending-specificity */
|
|
@@ -4048,9 +4041,7 @@ button.swiper-pagination-bullet {
|
|
|
4048
4041
|
left: 0;
|
|
4049
4042
|
overflow: auto;
|
|
4050
4043
|
width: 100%;
|
|
4051
|
-
height: calc(
|
|
4052
|
-
100dvh - var(--header-height-mobile) - var(--search-input-height)
|
|
4053
|
-
);
|
|
4044
|
+
height: calc(100dvh - var(--header-height) - var(--search-input-height));
|
|
4054
4045
|
box-sizing: border-box;
|
|
4055
4046
|
background-color: var(--color-white);
|
|
4056
4047
|
box-shadow: var(--box-shadow-heavy);
|
|
@@ -4180,8 +4171,6 @@ button.swiper-pagination-bullet {
|
|
|
4180
4171
|
}
|
|
4181
4172
|
|
|
4182
4173
|
.blank-page-spacer-module-lXxle {
|
|
4183
|
-
--header-height: var(--header-height-mobile);
|
|
4184
|
-
|
|
4185
4174
|
display: grid;
|
|
4186
4175
|
width: 100%;
|
|
4187
4176
|
height: calc(100dvh - var(--header-height));
|
|
@@ -4617,7 +4606,7 @@ button.swiper-pagination-bullet {
|
|
|
4617
4606
|
.checkout-page-layout-module-54Qta .checkout-page-layout-module---Bqj {
|
|
4618
4607
|
position: fixed;
|
|
4619
4608
|
z-index: 5;
|
|
4620
|
-
top:
|
|
4609
|
+
top: var(--header-height);
|
|
4621
4610
|
left: 0;
|
|
4622
4611
|
width: 100%;
|
|
4623
4612
|
box-sizing: border-box;
|
|
@@ -5851,7 +5840,7 @@ button.swiper-pagination-bullet {
|
|
|
5851
5840
|
}
|
|
5852
5841
|
}
|
|
5853
5842
|
.toast-provider-module-EoPKW {
|
|
5854
|
-
top: calc(var(--header-height
|
|
5843
|
+
top: calc(var(--header-height) + var(--space-12));
|
|
5855
5844
|
right: auto;
|
|
5856
5845
|
left: auto;
|
|
5857
5846
|
display: flex;
|
|
@@ -5862,7 +5851,7 @@ button.swiper-pagination-bullet {
|
|
|
5862
5851
|
}
|
|
5863
5852
|
|
|
5864
5853
|
@media (width >= 1024px) {.toast-provider-module-EoPKW {
|
|
5865
|
-
top: calc(var(--header-height
|
|
5854
|
+
top: calc(var(--header-height) + var(--space-12));
|
|
5866
5855
|
right: var(--toastify-toast-right);
|
|
5867
5856
|
width: -moz-fit-content;
|
|
5868
5857
|
width: fit-content;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { ToastContainer, Slide } from 'react-toastify';
|
|
3
|
+
import styles from './toast-provider.module.css.js';
|
|
4
|
+
|
|
5
|
+
function ToastProvider(props) {
|
|
6
|
+
return (jsx(ToastContainer, { autoClose: 3000, bodyClassName: styles.body, className: styles.container, closeButton: false, hideProgressBar: true, newestOnTop: true, toastClassName: styles.toast, transition: Slide, ...props }));
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export { ToastProvider };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import clsx from 'clsx';
|
|
5
|
+
import { IconButton } from '../buttons/icon-button/icon-button.js';
|
|
6
|
+
import { SolidAttentionIcon } from '../icons/solid/solid-attention-icon.js';
|
|
7
|
+
import { SolidInformationIcon } from '../icons/solid/solid-information-icon.js';
|
|
8
|
+
import { SolidNoticeIcon } from '../icons/solid/solid-notice-icon.js';
|
|
9
|
+
import { SolidOkayIcon } from '../icons/solid/solid-okay-icon.js';
|
|
10
|
+
import { StrokeCloseboxIcon } from '../icons/stroke/stroke-closebox-icon.js';
|
|
11
|
+
import styles from './toast.module.css.js';
|
|
12
|
+
|
|
13
|
+
const icons = {
|
|
14
|
+
danger: jsx(SolidAttentionIcon, {}),
|
|
15
|
+
info: jsx(SolidInformationIcon, {}),
|
|
16
|
+
success: jsx(SolidOkayIcon, {}),
|
|
17
|
+
warning: jsx(SolidNoticeIcon, {}),
|
|
18
|
+
};
|
|
19
|
+
const Toast = forwardRef(({ className, id, onClose, toastMessage: { body, isUserDismissable, messageType = 'info' }, }, ref) => {
|
|
20
|
+
return (jsxs("div", { ref: ref, className: clsx(styles.toast, styles[messageType], className), "data-test-selector": `toast${messageType}`, children: [jsx("span", { className: styles.icon, children: icons[messageType] }), body, isUserDismissable && (jsx(IconButton, { className: styles.close, color: "secondary", onClick: () => onClose?.(id), children: jsx(StrokeCloseboxIcon, {}) }))] }));
|
|
21
|
+
});
|
|
22
|
+
Toast.displayName = 'Toast';
|
|
23
|
+
|
|
24
|
+
export { Toast };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { useRef } from 'react';
|
|
4
|
+
import { toast } from 'react-toastify';
|
|
5
|
+
import { createUUID } from '../shared/utils/uuid.js';
|
|
6
|
+
import { Toast } from './toast.js';
|
|
7
|
+
|
|
8
|
+
function useToast() {
|
|
9
|
+
const count = useRef(0);
|
|
10
|
+
return {
|
|
11
|
+
addToast(toastMessage, toastOptions) {
|
|
12
|
+
const id = createUUID();
|
|
13
|
+
toast(jsx(Toast, { ref: el => el && (el.style.zIndex = (count.current++).toString()), id: id, onClose: id => toast.dismiss(id), toastMessage: toastMessage }), {
|
|
14
|
+
toastId: id,
|
|
15
|
+
...toastOptions,
|
|
16
|
+
});
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export { useToast };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
const getTokenValue = (token) => typeof document === 'undefined' || typeof getComputedStyle === 'undefined'
|
|
2
|
+
? 'unknown'
|
|
3
|
+
: getComputedStyle(document.documentElement).getPropertyValue(token);
|
|
4
|
+
const getTokenKeyValue = (token) => ({
|
|
5
|
+
[token]: getTokenValue(token),
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
export { getTokenKeyValue, getTokenValue };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { createElement } from 'react';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import styles from './heading.module.css.js';
|
|
4
|
+
|
|
5
|
+
const SIZES = ['xxl', 'xl', 'l', 'm', 's', 'xs', 'xxs', 'xxxs'];
|
|
6
|
+
const TAGS = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'h7'];
|
|
7
|
+
const sizeToTag = {
|
|
8
|
+
l: 'h3',
|
|
9
|
+
m: 'h4',
|
|
10
|
+
s: 'h5',
|
|
11
|
+
xl: 'h2',
|
|
12
|
+
xs: 'h6',
|
|
13
|
+
xxl: 'h1',
|
|
14
|
+
xxs: 'h6',
|
|
15
|
+
xxxs: 'h6',
|
|
16
|
+
};
|
|
17
|
+
function Heading({ bold = true, children, className, italic, size = 'xxl', tag, uppercase, }) {
|
|
18
|
+
return createElement(tag || sizeToTag[size], {
|
|
19
|
+
className: clsx(className, styles.heading, styles[size], {
|
|
20
|
+
[styles.uppercase]: uppercase,
|
|
21
|
+
[styles.italic]: italic,
|
|
22
|
+
[styles.bold]: bold,
|
|
23
|
+
}),
|
|
24
|
+
}, children);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export { Heading, SIZES, TAGS };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var styles = {"heading":"heading-module-pMC65","uppercase":"heading-module-6spgX","italic":"heading-module-XXMDM","bold":"heading-module-xvrxo","xxl":"heading-module-Kn3ZN","xl":"heading-module--hZs-","l":"heading-module-WrJRY","m":"heading-module-hTexc","s":"heading-module-7W29m","xs":"heading-module-SgaLB","xxs":"heading-module-33en7","xxxs":"heading-module-qvrEk"};
|
|
2
|
+
|
|
3
|
+
export { styles as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sonic-equipment/ui",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "120.0.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"clean": "rimraf node_modules dist",
|
|
27
27
|
"generate:icons": "node src/utils/icons/import-icons.js",
|
|
28
28
|
"generate:icons:watch": "nodemon src/utils/icons/import-icons.js",
|
|
29
|
-
"generate:exports": "find ./src -type f | grep -e 'ts[x]*$' | grep -vE \"stories|icons|exports|test|local-storage|src/index|\\.d\\.ts$\" | sed -e \"s/\\.ts[x]*//\" | sed -e \"s/.\\/src/./\" | awk '{ print \"export * from \\\"\" $1 \"\\\"\" }' | sed -e \"s/\\\"/'/g\" | sort",
|
|
29
|
+
"generate:exports": "find ./src -type f | grep -e 'ts[x]*$' | grep -vE \"stories|icons|exports|.model.ts|test|local-storage|src/index|\\.d\\.ts$\" | sed -e \"s/\\.ts[x]*//\" | sed -e \"s/.\\/src/./\" | awk '{ print \"export * from \\\"\" $1 \"\\\"\" }' | sed -e \"s/\\\"/'/g\" | sort",
|
|
30
30
|
"generate:exports:save": "echo '/* eslint-disable simple-import-sort/exports */' > src/exports.ts && pnpm run --silent generate:exports >> src/exports.ts",
|
|
31
31
|
"reinstall": "pnpm clean; pnpm install && pnpm build",
|
|
32
32
|
"dev": "storybook dev -p 6006",
|
|
@@ -113,6 +113,7 @@
|
|
|
113
113
|
"rollup": "4.24.4",
|
|
114
114
|
"rollup-plugin-peer-deps-external": "2.2.4",
|
|
115
115
|
"rollup-plugin-postcss": "4.0.2",
|
|
116
|
+
"rollup-plugin-preserve-directives": "^0.4.0",
|
|
116
117
|
"storybook": "8.4.2",
|
|
117
118
|
"stylelint": "16.10.0",
|
|
118
119
|
"stylelint-config-css-modules": "4.4.0",
|