@sonic-equipment/ui 0.0.89 → 0.0.91

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.
Files changed (28) hide show
  1. package/dist/index.d.ts +85 -36
  2. package/dist/index.js +239 -194
  3. package/dist/src/algolia/{algolia-product-hit-type.d.ts → algolia-hit-type.d.ts} +17 -2
  4. package/dist/src/algolia/algolia-hits-provider.d.ts +6 -0
  5. package/dist/src/algolia/use-algolia-hits.d.ts +10 -0
  6. package/dist/src/algolia/use-algolia-search.d.ts +3 -3
  7. package/dist/src/carousel/card-carousel/card-carousel.d.ts +10 -0
  8. package/dist/src/carousel/{product-carousel/product-carousel.stories.d.ts → card-carousel/product-card-carousel.stories.d.ts} +3 -3
  9. package/dist/src/carousel/card-carousel/promo-card-carousel.stories.d.ts +20 -0
  10. package/dist/src/carousel/promo-card-carousel/promo-card-carousel.d.ts +10 -0
  11. package/dist/src/config.d.ts +1 -0
  12. package/dist/src/global-search/types.d.ts +1 -1
  13. package/dist/src/index.d.ts +1 -1
  14. package/dist/src/pages/product-listing-page/product-listing-page-data-types.d.ts +3 -3
  15. package/dist/src/promos/promo-banner/promo-banner.d.ts +7 -0
  16. package/dist/src/promos/promo-banner/promo-banner.stories.d.ts +19 -0
  17. package/dist/src/promos/promo-banners/promo-banners.d.ts +8 -0
  18. package/dist/src/promos/{promo-cards/promo-cards.stories.d.ts → promo-banners/promo-banners.stories.d.ts} +3 -3
  19. package/dist/src/promos/promo-card/promo-card.d.ts +5 -5
  20. package/dist/src/promos/promo-card/promo-card.stories.d.ts +1 -8
  21. package/dist/src/shared/api/bff/model/bff.model.d.ts +4 -4
  22. package/dist/src/shared/model/{product-hit.d.ts → hit.d.ts} +12 -1
  23. package/dist/styles.css +97 -66
  24. package/package.json +1 -1
  25. package/dist/src/algolia/algolia-products-hits-provider.d.ts +0 -6
  26. package/dist/src/algolia/use-algolia-product-hits.d.ts +0 -10
  27. package/dist/src/carousel/product-carousel/product-carousel.d.ts +0 -10
  28. package/dist/src/promos/promo-cards/promo-cards.d.ts +0 -8
package/dist/index.js CHANGED
@@ -71,7 +71,8 @@ const configPerEnvironment = {
71
71
  ALGOLIA_API_KEY: 'e0edf30798a6b2e4e44fd25f0f2f9646',
72
72
  ALGOLIA_APP_ID: 'testing9VXJ0U4GSV',
73
73
  ALGOLIA_HOST: 'sonicequipment.commerce.insitesandbox.com',
74
- BFF_API_URL: 'https://localhost:8000/api/v1/bff',
74
+ BFF_API_URL: 'https://sonicequipment.commerce.insitesandbox.com/api/v1/bff',
75
+ COOKIE_DOMAIN: undefined,
75
76
  SHOP_API_URL:
76
77
  // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
77
78
  '',
@@ -81,6 +82,7 @@ const configPerEnvironment = {
81
82
  ALGOLIA_APP_ID: '14CUFCVMAD',
82
83
  ALGOLIA_HOST: 'shop.sonic-equipment.com',
83
84
  BFF_API_URL: 'https://shop.sonic-equipment.com/api/v1/bff',
85
+ COOKIE_DOMAIN: '.sonic-equipment.com',
84
86
  // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
85
87
  SHOP_API_URL: 'https://shop.sonic-equipment.com',
86
88
  },
@@ -89,6 +91,7 @@ const configPerEnvironment = {
89
91
  ALGOLIA_APP_ID: 'testing9VXJ0U4GSV',
90
92
  ALGOLIA_HOST: 'sonicequipment.commerce.insitesandbox.com',
91
93
  BFF_API_URL: 'https://sonicequipment.commerce.insitesandbox.com/api/v1/bff',
94
+ COOKIE_DOMAIN: '.insitesandbox.com',
92
95
  SHOP_API_URL:
93
96
  // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
94
97
  'https://sonicequipment.commerce.insitesandbox.com',
@@ -98,6 +101,7 @@ const configPerEnvironment = {
98
101
  ALGOLIA_APP_ID: 'testing9VXJ0U4GSV',
99
102
  ALGOLIA_HOST: 'sonicequipment.commerce.insitesandbox.com',
100
103
  BFF_API_URL: 'https://sonicequipment.commerce.insitesandbox.com/api/v1/bff',
104
+ COOKIE_DOMAIN: '.insitesandbox.com',
101
105
  SHOP_API_URL:
102
106
  // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
103
107
  'https://sonic.local.com:4443',
@@ -1256,6 +1260,16 @@ function RouteButton({ children, onClick, ...props }) {
1256
1260
  }, ...props, children: children }));
1257
1261
  }
1258
1262
 
1263
+ function transformAlgoliaPromoHitToPromoHit(algoliaPromoHit) {
1264
+ return {
1265
+ hit: algoliaPromoHit,
1266
+ href: algoliaPromoHit.url,
1267
+ id: algoliaPromoHit.objectID,
1268
+ image: algoliaPromoHit.image,
1269
+ isExternal: algoliaPromoHit.isExternal,
1270
+ type: 'promo',
1271
+ };
1272
+ }
1259
1273
  function transformAlgoliaProductHitToProductHit(algoliaProductHit) {
1260
1274
  return {
1261
1275
  hit: algoliaProductHit,
@@ -1274,13 +1288,21 @@ function transformAlgoliaProductHitToProductHit(algoliaProductHit) {
1274
1288
  name: algoliaProductHit.name,
1275
1289
  objectId: algoliaProductHit.objectID,
1276
1290
  originalPrice: algoliaProductHit.originalPrice,
1277
- position: algoliaProductHit.__position,
1291
+ position: isNaN(parseFloat(String(algoliaProductHit.__position)))
1292
+ ? 0
1293
+ : parseFloat(String(algoliaProductHit.__position)),
1278
1294
  price: algoliaProductHit.price,
1279
- queryId: algoliaProductHit.__autocomplete_queryID,
1295
+ queryId: algoliaProductHit.__autocomplete_queryID === undefined
1296
+ ? undefined
1297
+ : String(algoliaProductHit.__autocomplete_queryID),
1280
1298
  storefrontId: algoliaProductHit.storefrontId,
1281
1299
  storefrontSlug: algoliaProductHit.storefrontSlug,
1300
+ type: 'product',
1282
1301
  };
1283
1302
  }
1303
+ function isProductHit(hit) {
1304
+ return hit.type === 'product';
1305
+ }
1284
1306
 
1285
1307
  function GlyphsChevronsSlimLeftIcon(props) {
1286
1308
  return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", ...props, fill: "currentColor", height: "12", viewBox: "0 0 12 12", width: "12", children: jsx("path", { d: "M3,6 L7.93354971,1 C8.12109594,1.08169007 8.30512588,1.19817561 8.48563954,1.34945663 C8.6661532,1.50073764 8.83760669,1.68216803 9,1.89374779 L4.91652188,5.98800959 L9,9.9960307 C8.83350762,10.2121071 8.66205413,10.4031847 8.48563954,10.5692635 C8.30922495,10.7353424 8.12519501,10.8789212 7.93354971,11 L3,6 Z", fillRule: "evenodd" }) }));
@@ -1662,8 +1684,8 @@ function ImageComponent({ className, fallbackSrc, fit = 'cover', hasError, image
1662
1684
  }
1663
1685
  function PictureComponent({ className, fallbackSrc, fit = 'cover', hasError, image, ...rest }) {
1664
1686
  if (!image)
1665
- return (jsx("picture", { className: clsx(styles$V.picture, className), children: jsx("img", { className: clsx(styles$V[fit], styles$V['has-error']), src: fallbackSrc, ...rest }) }));
1666
- return (jsxs("picture", { className: clsx(styles$V.picture, className), children: [jsx("source", { media: "(max-width: 768px)", srcSet: `${image.sm[1]} 1x, ${image.sm[2]} 2x, ${image.sm[3]} 3x` }), jsx("source", { media: "(max-width: 1439px)", srcSet: `${image.md[1]} 1x, ${image.md[2]} 2x, ${image.md[3]} 3x` }), jsx("source", { media: "(min-width: 1440px)", srcSet: `${image.lg[1]} 1x, ${image.lg[2]} 2x, ${image.lg[3]} 3x` }), jsx("img", { className: clsx(styles$V[fit], {
1687
+ return (jsx("picture", { className: clsx(styles$V.picture, className), children: jsx("img", { className: clsx(styles$V.image, styles$V[fit], styles$V['has-error']), src: fallbackSrc, ...rest }) }));
1688
+ return (jsxs("picture", { className: clsx(styles$V.picture, className), children: [jsx("source", { media: "(max-width: 768px)", srcSet: `${image.sm[1]} 1x, ${image.sm[2]} 2x, ${image.sm[3]} 3x` }), jsx("source", { media: "(max-width: 1439px)", srcSet: `${image.md[1]} 1x, ${image.md[2]} 2x, ${image.md[3]} 3x` }), jsx("source", { media: "(min-width: 1440px)", srcSet: `${image.lg[1]} 1x, ${image.lg[2]} 2x, ${image.lg[3]} 3x` }), jsx("img", { className: clsx(styles$V.image, styles$V[fit], {
1667
1689
  [styles$V['has-error']]: hasError,
1668
1690
  }), src: !hasError ? image.lg[3] : fallbackSrc, ...rest })] }));
1669
1691
  }
@@ -7762,7 +7784,7 @@ function useUpdateLanguageById() {
7762
7784
  }
7763
7785
 
7764
7786
  function useCookie(name, options) {
7765
- const cookieValue = Cookies.get(name);
7787
+ const cookieValue = Cookies.get()[name];
7766
7788
  const [stateValue, setStateValue] = useState(cookieValue);
7767
7789
  function setValue(valueOrFn) {
7768
7790
  setStateValue(oldValue => {
@@ -7796,7 +7818,11 @@ function useSessionStorage(key, initialState) {
7796
7818
  }
7797
7819
 
7798
7820
  const cookieOptions = {
7821
+ domain: config.COOKIE_DOMAIN,
7822
+ expires: 365,
7799
7823
  path: '/',
7824
+ sameSite: 'None',
7825
+ secure: true,
7800
7826
  };
7801
7827
  function useCountriesLanguages({ defaultCountryCode, defaultLanguageCode, }) {
7802
7828
  const [sessionCountries, setSessionCountries] = useSessionStorage('countries-v1');
@@ -8201,18 +8227,18 @@ function ConnectedProductCard({ id, onAddToCart, onFavorited, onFavoriting, ...p
8201
8227
  return (jsx(ProductCard, { id: id, ...props, addToCartButton: jsx(ConnectedAddToCartButton, { onAddToCart: onAddToCart, productId: id }), favoriteButton: jsx(ConnectedFavoriteButton, { onFavorited: onFavorited, onFavoriting: onFavoriting, productId: id }) }));
8202
8228
  }
8203
8229
 
8204
- var styles$v = {"carousel-container":"product-carousel-module-DpUaX","button":"product-carousel-module-0ymqZ","slide":"product-carousel-module-XVTB1","width-auto":"product-carousel-module-E2EUK","width-narrow":"product-carousel-module-yrkV9","width-normal":"product-carousel-module-SzVga"};
8230
+ var styles$v = {"carousel-container":"card-carousel-module-JXQmk","button":"card-carousel-module-XQ2pX","slide":"card-carousel-module-DxKOG","width-auto":"card-carousel-module-RQ8gl","width-narrow":"card-carousel-module-8uKSt","width-normal":"card-carousel-module-l-ylK"};
8205
8231
 
8206
- function ProductCarousel({ allowExpandToGrid = false, cardWidth = 'auto', hasOverflow = false, productCards, productsPerView = {
8232
+ function CardCarousel({ allowExpandToGrid = false, cards, cardsPerView = {
8207
8233
  md: 2,
8208
8234
  sm: 1,
8209
8235
  xxl: 3,
8210
- }, }) {
8236
+ }, cardWidth = 'auto', hasOverflow = false, }) {
8211
8237
  const [isExpanded, setIsExpanded] = useState(false);
8212
8238
  if (!isExpanded) {
8213
- return (jsxs("div", { className: styles$v['carousel-container'], children: [jsx(Carousel, { hasOverflow: hasOverflow, navigationButtonsPosition: "center", slideClasses: clsx(styles$v.slide, styles$v[`width-${cardWidth}`]), slides: productCards, slidesPerView: productsPerView, spaceBetween: 16 }), allowExpandToGrid && (jsx(Button, { withArrow: true, className: styles$v.button, color: "secondary", onClick: () => setIsExpanded(true), variant: "outline", children: jsx(FormattedMessage, { id: "Show all" }) }))] }));
8239
+ return (jsxs("div", { className: styles$v['carousel-container'], children: [jsx(Carousel, { hasOverflow: hasOverflow, navigationButtonsPosition: "center", slideClasses: clsx(styles$v.slide, styles$v[`width-${cardWidth}`]), slides: cards, slidesPerView: cardsPerView, spaceBetween: 16 }), allowExpandToGrid && (jsx(Button, { withArrow: true, className: styles$v.button, color: "secondary", onClick: () => setIsExpanded(true), variant: "outline", children: jsx(FormattedMessage, { id: "Show all" }) }))] }));
8214
8240
  }
8215
- return (jsxs("div", { className: styles$v['carousel-container'], children: [jsxs(ProductOverviewGrid, { children: [...productCards] }), jsx(Button, { withArrow: true, className: styles$v.button, color: "secondary", onClick: () => setIsExpanded(false), variant: "outline", children: jsx(FormattedMessage, { id: "Show less" }) })] }));
8241
+ return (jsxs("div", { className: styles$v['carousel-container'], children: [jsxs(ProductOverviewGrid, { children: [...cards] }), jsx(Button, { withArrow: true, className: styles$v.button, color: "secondary", onClick: () => setIsExpanded(false), variant: "outline", children: jsx(FormattedMessage, { id: "Show less" }) })] }));
8216
8242
  }
8217
8243
 
8218
8244
  class Animation {
@@ -8678,12 +8704,12 @@ function ProductDetailsPage({ pageUrl }) {
8678
8704
  return jsx(LoadingPage, {});
8679
8705
  const { breadCrumb, included, product, recentlyViewed } = data;
8680
8706
  return (jsx(Page, { breadCrumb: breadCrumb, children: jsx(ProductDetailsPageLayout, { imageGallery: jsx(ProductDetailImages, { images: product.images }), included: included !== undefined &&
8681
- Boolean(included.length) && (jsxs(Fragment, { children: [jsx(Heading, { size: "s", tag: "h2", children: jsx(FormattedMessage, { id: "Includes" }) }), jsx(ProductCarousel, { allowExpandToGrid: true, hasOverflow: true, productCards: included.map(product => (jsx(ConnectedProductCard, { href: product.href, id: product.productId, image: {
8707
+ Boolean(included.length) && (jsxs(Fragment, { children: [jsx(Heading, { size: "s", tag: "h2", children: jsx(FormattedMessage, { id: "Includes" }) }), jsx(CardCarousel, { allowExpandToGrid: true, hasOverflow: true, cards: included.map(product => (jsx(ConnectedProductCard, { href: product.href, id: product.productId, image: {
8682
8708
  fit: 'contain',
8683
8709
  image: product.image,
8684
8710
  title: product.image?.altText || product.title,
8685
8711
  }, price: product.price, sku: product.sku, tags: product.tags, title: product.title }, product.storefrontId))) })] })), productInformation: jsx(ProductDetailsPanel, { product: product }), recentlyViewed: recentlyViewed !== undefined &&
8686
- Boolean(recentlyViewed.length) && (jsxs(Fragment, { children: [jsx(Heading, { size: "s", tag: "h2", children: jsx(FormattedMessage, { id: "Recently viewed" }) }), jsx(ProductCarousel, { hasOverflow: true, productCards: recentlyViewed.map(product => (jsx(ConnectedProductCard, { href: product.href, id: product.productId, image: {
8712
+ Boolean(recentlyViewed.length) && (jsxs(Fragment, { children: [jsx(Heading, { size: "s", tag: "h2", children: jsx(FormattedMessage, { id: "Recently viewed" }) }), jsx(CardCarousel, { hasOverflow: true, cards: recentlyViewed.map(product => (jsx(ConnectedProductCard, { href: product.href, id: product.productId, image: {
8687
8713
  fit: 'contain',
8688
8714
  image: product.image,
8689
8715
  title: product.image?.altText || product.title,
@@ -8926,6 +8952,55 @@ function AlgoliaPagination({ onChange }) {
8926
8952
  return (jsx(Pagination, { currentPage: currentRefinement + 1, onChange: pageNumber => handlePageChange(pageNumber), totalPages: nbPages }));
8927
8953
  }
8928
8954
 
8955
+ function isAlgoliaProductHit(hit) {
8956
+ return hit.type === 'product';
8957
+ }
8958
+
8959
+ const useAlgoliaHitsItems = () => useGlobalState('algolia-product-hits-items', []);
8960
+ const useAlgoliaHitsLoading = () => useGlobalState('algolia-product-hits-loading');
8961
+ function useAlgoliaHits() {
8962
+ const [items] = useAlgoliaHitsItems();
8963
+ const [isLoading] = useAlgoliaHitsLoading();
8964
+ return {
8965
+ hits: items.map(hit => isAlgoliaProductHit(hit)
8966
+ ? transformAlgoliaProductHitToProductHit(hit)
8967
+ : transformAlgoliaPromoHitToPromoHit(hit)),
8968
+ isLoading,
8969
+ };
8970
+ }
8971
+
8972
+ const useAlgoliaInstantSearchStateIndex = () => useGlobalState('algolia-global-state-index');
8973
+ const useAlgoliaInstantSearchStateQueryId = () => useGlobalState('algolia-global-state-queryId');
8974
+ const useAlgoliaInstantSearchStateOnline = (initialState) => useGlobalState('algolia-global-state-online', initialState ?? true);
8975
+ const useAlgoliaInstantSearchStateStatus = (initialState) => useGlobalState('algolia-global-state-status', initialState ?? 'idle');
8976
+ function useAlgoliaInstantSearchState(initialState) {
8977
+ const [index, setIndex] = useAlgoliaInstantSearchStateIndex();
8978
+ const [queryId, setQueryId] = useAlgoliaInstantSearchStateQueryId();
8979
+ const [online, setOnline] = useAlgoliaInstantSearchStateOnline(initialState?.online);
8980
+ const [status, setStatus] = useAlgoliaInstantSearchStateStatus(initialState?.status);
8981
+ return {
8982
+ index,
8983
+ online,
8984
+ queryId,
8985
+ setIndex,
8986
+ setOnline,
8987
+ setQueryId,
8988
+ setStatus,
8989
+ status,
8990
+ };
8991
+ }
8992
+
8993
+ function AlgoliaHitsProvider() {
8994
+ const { status } = useAlgoliaInstantSearchState();
8995
+ const [, setItems] = useAlgoliaHitsItems();
8996
+ const [, setLoading] = useAlgoliaHitsLoading();
8997
+ const { items, results } = useHits();
8998
+ setItems(items);
8999
+ // @ts-expect-error -- params is not officially exposed but is included in results
9000
+ setLoading(status !== 'idle' || !results || results.params === '');
9001
+ return null;
9002
+ }
9003
+
8929
9004
  const defaultLanguageCodes = {
8930
9005
  pl: 'en',
8931
9006
  };
@@ -9053,27 +9128,6 @@ function AlgoliaInsightsProvider({ children, value, }) {
9053
9128
  return (jsx(AlgoliaInsightsProviderContext.Provider, { value: combinedValue, children: children }));
9054
9129
  }
9055
9130
 
9056
- const useAlgoliaInstantSearchStateIndex = () => useGlobalState('algolia-global-state-index');
9057
- const useAlgoliaInstantSearchStateQueryId = () => useGlobalState('algolia-global-state-queryId');
9058
- const useAlgoliaInstantSearchStateOnline = (initialState) => useGlobalState('algolia-global-state-online', initialState ?? true);
9059
- const useAlgoliaInstantSearchStateStatus = (initialState) => useGlobalState('algolia-global-state-status', initialState ?? 'idle');
9060
- function useAlgoliaInstantSearchState(initialState) {
9061
- const [index, setIndex] = useAlgoliaInstantSearchStateIndex();
9062
- const [queryId, setQueryId] = useAlgoliaInstantSearchStateQueryId();
9063
- const [online, setOnline] = useAlgoliaInstantSearchStateOnline(initialState?.online);
9064
- const [status, setStatus] = useAlgoliaInstantSearchStateStatus(initialState?.status);
9065
- return {
9066
- index,
9067
- online,
9068
- queryId,
9069
- setIndex,
9070
- setOnline,
9071
- setQueryId,
9072
- setStatus,
9073
- status,
9074
- };
9075
- }
9076
-
9077
9131
  function AlgoliaInsightInstantSearchProvider({ children, }) {
9078
9132
  const { index, queryId } = useAlgoliaInstantSearchState();
9079
9133
  return (jsx(AlgoliaInsightsProvider, { value: {
@@ -9093,30 +9147,6 @@ function AlgoliaInstantSearchStateProvider() {
9093
9147
  return null;
9094
9148
  }
9095
9149
 
9096
- const useAlgoliaProductHitsItems = () => useGlobalState('algolia-product-hits-items', []);
9097
- const useAlgoliaProductHitsLoading = () => useGlobalState('algolia-product-hits-loading');
9098
- function useAlgoliaProductHits() {
9099
- const [items] = useAlgoliaProductHitsItems();
9100
- const [isLoading] = useAlgoliaProductHitsLoading();
9101
- return {
9102
- isLoading,
9103
- products: items
9104
- .map(transformAlgoliaProductHitToProductHit)
9105
- .filter(product => product.hit.type === 'product'),
9106
- };
9107
- }
9108
-
9109
- function AlgoliaProductHitsProvider() {
9110
- const { status } = useAlgoliaInstantSearchState();
9111
- const [, setItems] = useAlgoliaProductHitsItems();
9112
- const [, setLoading] = useAlgoliaProductHitsLoading();
9113
- const { items, results } = useHits();
9114
- setItems(items);
9115
- // @ts-expect-error -- params is not officially exposed but is included in results
9116
- setLoading(status !== 'idle' || !results || results.params === '');
9117
- return null;
9118
- }
9119
-
9120
9150
  function createQueryStringRouting({ algoliaIndex, hierarchicalCategories, }) {
9121
9151
  return {
9122
9152
  router: history({
@@ -9232,7 +9262,7 @@ function AlgoliaProvider({ categoryPages, children, hierarchicalCategories, lang
9232
9262
  }), searchClient: online ? searchClient : offlineSearchClient || searchClient, children: [jsx(Configure, { analytics: true, filters: categoryPages
9233
9263
  ? // Replace double quotes with escaped double quotes to avoid breaking the query
9234
9264
  `categoryPages: "${categoryPages.replace(/"/g, '\\"')}"`
9235
- : undefined, maxValuesPerFacet: 100, query: query, ruleContexts: ['storefront'] }), jsx(AlgoliaInstantSearchStateProvider, {}), jsx(AlgoliaProductHitsProvider, {}), jsx(AlgoliaInsightInstantSearchProvider, { children: children })] }));
9265
+ : undefined, hitsPerPage: 12, maxValuesPerFacet: 100, query: query, ruleContexts: ['storefront'] }), jsx(AlgoliaInstantSearchStateProvider, {}), jsx(AlgoliaHitsProvider, {}), jsx(AlgoliaInsightInstantSearchProvider, { children: children })] }));
9236
9266
  }
9237
9267
  function useAlgolia() {
9238
9268
  const [online, setOnline] = useGlobalState('algolia', false);
@@ -9288,20 +9318,20 @@ function AlgoliaSortBy() {
9288
9318
  return (jsx(Select, { label: t('Sort by'), onChange: value => refine(String(value)), options: options, selectedOption: currentRefinement, showLabel: false, size: "sm" }));
9289
9319
  }
9290
9320
 
9291
- var styles$h = {"promo-card":"promo-card-module-e2oii","sm":"promo-card-module-1-jT0","lg":"promo-card-module-zIYDh"};
9321
+ var styles$h = {"promo-banner":"promo-banner-module-yuVEO","sm":"promo-banner-module-ut8Kd","lg":"promo-banner-module-CSkIw"};
9292
9322
 
9293
- function PromoCard({ href, image, variant }) {
9294
- return (jsx(RouteLink, { className: clsx(styles$h['promo-card'], styles$h[variant]), href: href, tabIndex: 0, children: jsx(Image, { fit: "cover", image: image, title: image.altText }) }));
9323
+ function PromoBanner({ href, image, variant }) {
9324
+ return (jsx(RouteLink, { className: clsx(styles$h['promo-banner'], styles$h[variant]), href: href, tabIndex: 0, children: jsx(Image, { fit: "cover", image: image, title: image.altText }) }));
9295
9325
  }
9296
9326
 
9297
- var styles$g = {"promos":"promo-cards-module-Dy4p3"};
9327
+ var styles$g = {"promos":"promo-banners-module-uVyxh"};
9298
9328
 
9299
- function PromoCards({ promoCardsData = [] }) {
9329
+ function PromoBanners({ promoBannersData = [] }) {
9300
9330
  const { lg } = useBreakpoint();
9301
- const promoCards = promoCardsData.map((promoCard, index) => (jsx(PromoCard, { href: promoCard.href, image: promoCard.image, variant: index % 2 === 0 ? 'lg' : 'sm' }, `promo-card-${index}`)));
9302
- if (promoCardsData.length === 0)
9331
+ const promoBanners = promoBannersData.map((promoBanner, index) => (jsx(PromoBanner, { href: promoBanner.href, image: promoBanner.image, variant: index % 2 === 0 ? 'lg' : 'sm' }, `promo-banner-${index}`)));
9332
+ if (promoBannersData.length === 0)
9303
9333
  return null;
9304
- return (jsx("div", { className: styles$g.promos, children: lg ? (jsx(Fragment, { children: promoCards })) : (jsx(Carousel, { hasNavigation: false, hasOverflow: false, slides: promoCards, spaceBetween: 16 })) }));
9334
+ return (jsx("div", { className: styles$g.promos, children: lg ? (jsx(Fragment, { children: promoBanners })) : (jsx(Carousel, { hasNavigation: false, hasOverflow: false, slides: promoBanners, spaceBetween: 16 })) }));
9305
9335
  }
9306
9336
 
9307
9337
  function useFetchProductListingPageData({ languageCode, pageUrl, }) {
@@ -9331,9 +9361,9 @@ function useFetchProductListingPageData({ languageCode, pageUrl, }) {
9331
9361
  : undefined,
9332
9362
  categoryPages: body.categoryPages,
9333
9363
  hierarchicalCategories: body.hierarchicalCategories,
9334
- promoCards: body.promoCards
9364
+ promoBanners: body.promoBanners
9335
9365
  ? {
9336
- top: body.promoCards.top || undefined,
9366
+ top: body.promoBanners.top || undefined,
9337
9367
  }
9338
9368
  : undefined,
9339
9369
  subcategories: body.categories?.subCategories?.map(subcategory => ({
@@ -9642,29 +9672,38 @@ function useAlgoliaInsights() {
9642
9672
  sendEvents: Parameters<ReturnType<typeof makeSendEvents>>;
9643
9673
  */
9644
9674
 
9645
- function ProductListingProductOverview() {
9646
- const { isLoading, products } = useAlgoliaProductHits();
9675
+ var styles$c = {"promo-card-container":"promo-card-module-idY1g","promo-card":"promo-card-module-e2oii","image":"promo-card-module-jr9sn"};
9676
+
9677
+ function PromoCard({ href, image, onClick }) {
9678
+ return (jsx("div", { className: styles$c['promo-card-container'], children: jsx(RouteLink, { className: styles$c['promo-card'], href: href, onClick: onClick, children: jsx(Image, { className: styles$c.image, fit: "cover", image: image, title: image.altText }) }) }));
9679
+ }
9680
+
9681
+ function ProductHitCard$2({ hit }) {
9647
9682
  const { sendAddToCartFromProductListPageEvent, sendAddToWishListFromProductListPageEvent, sendProductClickFromProductListPageEvent, } = useAlgoliaInsights();
9648
- return (jsx(ProductOverviewGrid, { isLoading: isLoading, children: products.map(product => (jsx(ConnectedProductCard, { href: product.storefrontSlug, id: product.storefrontId, image: {
9649
- fit: 'contain',
9650
- image: product.image,
9651
- title: product.name,
9652
- }, onAddToCart: () => sendAddToCartFromProductListPageEvent({
9653
- objectId: product.objectId,
9654
- }), onClick: () => sendProductClickFromProductListPageEvent({
9655
- objectId: product.objectId,
9656
- position: product.position,
9657
- }), onFavoriting: () => sendAddToWishListFromProductListPageEvent({
9658
- objectId: product.objectId,
9659
- position: product.position,
9660
- }), price: {
9661
- isVatIncluded: product.isVatIncluded,
9662
- originalPrice: product.originalPrice,
9663
- price: product.price,
9664
- }, sku: product.id, tags: product.labels, title: product.name }, product.storefrontId))) }));
9665
- }
9666
-
9667
- var styles$c = {"product-listing":"product-listing-page-module-dmIHF","header":"product-listing-page-module-Oz76Z","promos":"product-listing-page-module-iY1yj","action-bar":"product-listing-page-module-XxGrr","sidebar-toggle":"product-listing-page-module-F7bxy","sort":"product-listing-page-module-aQzHr","count":"product-listing-page-module-zx79v","categories":"product-listing-page-module-R4aOl","product-grid-container":"product-listing-page-module-ICkKg","product-grid":"product-listing-page-module-LHE7z","pagination":"product-listing-page-module-xsRaj"};
9683
+ return (jsx(ConnectedProductCard, { href: hit.storefrontSlug, id: hit.storefrontId, image: {
9684
+ fit: 'contain',
9685
+ image: hit.image,
9686
+ title: hit.name,
9687
+ }, onAddToCart: () => sendAddToCartFromProductListPageEvent({
9688
+ objectId: hit.objectId,
9689
+ }), onClick: () => sendProductClickFromProductListPageEvent({
9690
+ objectId: hit.objectId,
9691
+ position: hit.position,
9692
+ }), onFavoriting: () => sendAddToWishListFromProductListPageEvent({
9693
+ objectId: hit.objectId,
9694
+ position: hit.position,
9695
+ }), price: {
9696
+ isVatIncluded: hit.isVatIncluded,
9697
+ originalPrice: hit.originalPrice,
9698
+ price: hit.price,
9699
+ }, sku: hit.id, tags: hit.labels, title: hit.name }, hit.storefrontId));
9700
+ }
9701
+ function ProductListingProductOverview() {
9702
+ const { hits, isLoading } = useAlgoliaHits();
9703
+ return (jsx(ProductOverviewGrid, { isLoading: isLoading, children: hits.map(hit => isProductHit(hit) ? (jsx(ProductHitCard$2, { hit: hit }, hit.id)) : (jsx(PromoCard, { href: hit.href, image: hit.image }, hit.id))) }));
9704
+ }
9705
+
9706
+ var styles$b = {"product-listing":"product-listing-page-module-dmIHF","header":"product-listing-page-module-Oz76Z","promos":"product-listing-page-module-iY1yj","action-bar":"product-listing-page-module-XxGrr","sidebar-toggle":"product-listing-page-module-F7bxy","sort":"product-listing-page-module-aQzHr","count":"product-listing-page-module-zx79v","categories":"product-listing-page-module-R4aOl","product-grid-container":"product-listing-page-module-ICkKg","product-grid":"product-listing-page-module-LHE7z","pagination":"product-listing-page-module-xsRaj"};
9668
9707
 
9669
9708
  const defaultSearchClient = createSonicSearchClient({
9670
9709
  apiKey: config.ALGOLIA_API_KEY,
@@ -9682,43 +9721,46 @@ function ProductListingPage({ pageUrl, searchClient = defaultSearchClient, }) {
9682
9721
  if (!data || isFetching)
9683
9722
  return jsx(LoadingPage, {});
9684
9723
  const category = data.breadCrumb.slice(1).map(breadCrumb => breadCrumb.label);
9685
- return (jsx(ProductListingPageProvider, { data: data, error: error, isError: isError, isLoading: isFetching, children: jsx(AlgoliaProvider, { categoryPages: data.categoryPages, hierarchicalCategories: data.hierarchicalCategories, languageCode: languageCode, offlineSearchClient: offlineSearchClient, searchClient: searchClient, children: jsx(Page, { breadCrumb: data.breadCrumb, className: styles$c['product-listing'], title: category.slice().pop(), children: jsx(ProductListingPageContent, { currentCategoryPath: data.hierarchicalCategories, promoCards: data.promoCards?.top }) }) }, data.categoryPages) }));
9724
+ return (jsx(ProductListingPageProvider, { data: data, error: error, isError: isError, isLoading: isFetching, children: jsx(AlgoliaProvider, { categoryPages: data.categoryPages, hierarchicalCategories: data.hierarchicalCategories, languageCode: languageCode, offlineSearchClient: offlineSearchClient, searchClient: searchClient, children: jsx(Page, { breadCrumb: data.breadCrumb, className: styles$b['product-listing'], title: category.slice().pop(), children: jsx(ProductListingPageContent, { currentCategoryPath: data.hierarchicalCategories, promoBanners: data.promoBanners?.top }) }) }, data.categoryPages) }));
9686
9725
  }
9687
- function ProductListingPageContent({ currentCategoryPath, promoCards, }) {
9688
- const { isLoading, products } = useAlgoliaProductHits();
9689
- const hasProducts = products.length > 0;
9726
+ function ProductListingPageContent({ currentCategoryPath, promoBanners, }) {
9727
+ const { hits, isLoading } = useAlgoliaHits();
9728
+ const hasHits = hits.length > 0;
9690
9729
  const t = useFormattedMessage();
9691
- return (jsxs(Fragment, { children: [isLoading !== false && !hasProducts && jsx(LoadingPage, {}), isLoading === false && !hasProducts && (jsx(NoResults$1, { content: jsxs("p", { children: [jsx(FormattedMessage, { id: "You could try exploring our products by category" }), ' ', jsx("br", {}), jsx(FormattedMessage, { id: "Try 'Search' and try to find the product you're looking for" })] }), title: t('Sorry, there are no products found') })), jsxs("div", { style: {
9692
- display: !hasProducts ? 'none' : undefined,
9693
- }, children: [promoCards?.length && (jsx("section", { className: styles$c.promos, children: jsx(PromoCards, { promoCardsData: promoCards }) })), jsx("section", { className: styles$c.categories, children: jsx(ProductListingPageCategoryCarousel, { currentCategoryPath: currentCategoryPath }) }), jsxs("section", { className: styles$c['action-bar'], children: [jsx("div", { className: styles$c['sidebar-toggle'], children: jsx(ToggleSidebarButton, {}) }), jsx("span", { className: styles$c.count, children: jsx(AlgoliaResultsCount, {}) }), jsx("div", { className: styles$c.sort, children: jsx(AlgoliaSortBy, {}) })] }), jsx("section", { children: jsxs("div", { className: styles$c['product-grid-container'], children: [jsx(Sidebar, { children: jsx(AlgoliaFilterPanel, { showActiveCategories: true }) }), jsxs("div", { className: styles$c['product-grid'], children: [jsx(ProductListingProductOverview, {}), jsx("div", { className: styles$c.pagination, children: jsx(AlgoliaPagination, { onChange: () => {
9730
+ return (jsxs(Fragment, { children: [isLoading !== false && !hasHits && jsx(LoadingPage, {}), isLoading === false && !hasHits && (jsx(NoResults$1, { content: jsxs("p", { children: [jsx(FormattedMessage, { id: "You could try exploring our products by category" }), ' ', jsx("br", {}), jsx(FormattedMessage, { id: "Try 'Search' and try to find the product you're looking for" })] }), title: t('Sorry, there are no products found') })), jsxs("div", { style: {
9731
+ display: !hasHits ? 'none' : undefined,
9732
+ }, children: [promoBanners?.length && (jsx("section", { className: styles$b.promos, children: jsx(PromoBanners, { promoBannersData: promoBanners }) })), jsx("section", { className: styles$b.categories, children: jsx(ProductListingPageCategoryCarousel, { currentCategoryPath: currentCategoryPath }) }), jsxs("section", { className: styles$b['action-bar'], children: [jsx("div", { className: styles$b['sidebar-toggle'], children: jsx(ToggleSidebarButton, {}) }), jsx("span", { className: styles$b.count, children: jsx(AlgoliaResultsCount, {}) }), jsx("div", { className: styles$b.sort, children: jsx(AlgoliaSortBy, {}) })] }), jsx("section", { children: jsxs("div", { className: styles$b['product-grid-container'], children: [jsx(Sidebar, { children: jsx(AlgoliaFilterPanel, { showActiveCategories: true }) }), jsxs("div", { className: styles$b['product-grid'], children: [jsx(ProductListingProductOverview, {}), jsx("div", { className: styles$b.pagination, children: jsx(AlgoliaPagination, { onChange: () => {
9694
9733
  setTimeout(() => {
9695
9734
  scrollToTop();
9696
9735
  }, 100);
9697
9736
  } }) })] })] }) })] })] }));
9698
9737
  }
9699
9738
 
9700
- function SearchResultProductOverview() {
9701
- const { isLoading, products } = useAlgoliaProductHits();
9739
+ function ProductHitCard$1({ hit }) {
9702
9740
  const { sendAddToCartFromSearchResultPageEvent, sendAddToWishListFromSearchResultPageEvent, sendProductClickFromSearchResultPageEvent, } = useAlgoliaInsights();
9703
- return (jsx(ProductOverviewGrid, { isLoading: isLoading, children: products.map(product => (jsx(ConnectedProductCard, { href: product.storefrontSlug, id: product.storefrontId, image: {
9704
- fit: 'contain',
9705
- image: product.image,
9706
- title: product.name,
9707
- }, onAddToCart: () => sendAddToCartFromSearchResultPageEvent({
9708
- objectId: product.objectId,
9709
- }), onClick: () => {
9710
- sendProductClickFromSearchResultPageEvent({
9711
- objectId: product.objectId,
9712
- position: product.position,
9713
- });
9714
- }, onFavoriting: () => sendAddToWishListFromSearchResultPageEvent({
9715
- objectId: product.objectId,
9716
- position: product.position,
9717
- }), price: {
9718
- isVatIncluded: product.isVatIncluded,
9719
- originalPrice: product.originalPrice,
9720
- price: product.price,
9721
- }, sku: product.id, tags: product.labels, title: product.name }, product.storefrontId))) }));
9741
+ return (jsx(ConnectedProductCard, { href: hit.storefrontSlug, id: hit.storefrontId, image: {
9742
+ fit: 'contain',
9743
+ image: hit.image,
9744
+ title: hit.name,
9745
+ }, onAddToCart: () => sendAddToCartFromSearchResultPageEvent({
9746
+ objectId: hit.objectId,
9747
+ }), onClick: () => {
9748
+ sendProductClickFromSearchResultPageEvent({
9749
+ objectId: hit.objectId,
9750
+ position: hit.position,
9751
+ });
9752
+ }, onFavoriting: () => sendAddToWishListFromSearchResultPageEvent({
9753
+ objectId: hit.objectId,
9754
+ position: hit.position,
9755
+ }), price: {
9756
+ isVatIncluded: hit.isVatIncluded,
9757
+ originalPrice: hit.originalPrice,
9758
+ price: hit.price,
9759
+ }, sku: hit.id, tags: hit.labels, title: hit.name }, hit.storefrontId));
9760
+ }
9761
+ function SearchResultProductOverview() {
9762
+ const { hits, isLoading } = useAlgoliaHits();
9763
+ return (jsx(ProductOverviewGrid, { isLoading: isLoading, children: hits.map(hit => isProductHit(hit) ? (jsx(ProductHitCard$1, { hit: hit }, hit.id)) : (jsx(PromoCard, { href: hit.href, image: hit.image }, hit.id))) }));
9722
9764
  }
9723
9765
 
9724
9766
  function SearchResultsPageCategoryCarousel() {
@@ -9735,7 +9777,7 @@ function SearchResultsPageCategoryCarousel() {
9735
9777
  }, title: category.name }, index))) }));
9736
9778
  }
9737
9779
 
9738
- var styles$b = {"search-results":"search-results-page-module-M7SIu","header":"search-results-page-module-DpNT-","action-bar":"search-results-page-module-RJoMk","sidebar-toggle":"search-results-page-module-SzLQb","sort":"search-results-page-module-cgonp","count":"search-results-page-module-hunZp","categories":"search-results-page-module-n2lSj","product-grid-container":"search-results-page-module-TK-iE","product-grid":"search-results-page-module-HWUnk","pagination":"search-results-page-module-SZYiA"};
9780
+ var styles$a = {"search-results":"search-results-page-module-M7SIu","header":"search-results-page-module-DpNT-","action-bar":"search-results-page-module-RJoMk","sidebar-toggle":"search-results-page-module-SzLQb","sort":"search-results-page-module-cgonp","count":"search-results-page-module-hunZp","categories":"search-results-page-module-n2lSj","product-grid-container":"search-results-page-module-TK-iE","product-grid":"search-results-page-module-HWUnk","pagination":"search-results-page-module-SZYiA"};
9739
9781
 
9740
9782
  function SearchResultsPage({ location, searchClient, }) {
9741
9783
  const languageCode = useLanguageCode();
@@ -9744,26 +9786,26 @@ function SearchResultsPage({ location, searchClient, }) {
9744
9786
  const keyword = Array.isArray(keywords) ? keywords.join(' ') : keywords;
9745
9787
  if (!keyword)
9746
9788
  return jsx("h1", { children: "No search results...." });
9747
- return (jsx(AlgoliaProvider, { languageCode: languageCode, query: keyword, searchClient: searchClient, children: jsx(Page, { breadCrumb: [], className: styles$b['search-results'], title: t("'{0}' in all products", {
9789
+ return (jsx(AlgoliaProvider, { languageCode: languageCode, query: keyword, searchClient: searchClient, children: jsx(Page, { breadCrumb: [], className: styles$a['search-results'], title: t("'{0}' in all products", {
9748
9790
  replacementValues: { 0: keyword },
9749
9791
  }), children: jsx(SearchResultsPageContent, { keyword: keyword }) }) }));
9750
9792
  }
9751
9793
  function SearchResultsPageContent({ keyword }) {
9752
- const { isLoading, products } = useAlgoliaProductHits();
9753
- const hasProducts = products.length > 0;
9794
+ const { hits, isLoading } = useAlgoliaHits();
9795
+ const hasHits = hits.length > 0;
9754
9796
  const t = useFormattedMessage();
9755
- return (jsxs(Fragment, { children: [isLoading !== false && !hasProducts && jsx(LoadingPage, {}), isLoading === false && !hasProducts && (jsx(NoResults$1, { content: jsxs("p", { children: [jsx(FormattedMessage, { id: "You could try checking the spelling of your search query" }), jsx("br", {}), jsx(FormattedMessage, { id: "Try another search" }), jsx("br", {}), jsx(FormattedMessage, { id: "Are you looking for information about our service? Please visit our customer support page" })] }), title: t("Unfortnately, We found no articles for your search '{0}'", {
9797
+ return (jsxs(Fragment, { children: [isLoading !== false && !hasHits && jsx(LoadingPage, {}), isLoading === false && !hasHits && (jsx(NoResults$1, { content: jsxs("p", { children: [jsx(FormattedMessage, { id: "You could try checking the spelling of your search query" }), jsx("br", {}), jsx(FormattedMessage, { id: "Try another search" }), jsx("br", {}), jsx(FormattedMessage, { id: "Are you looking for information about our service? Please visit our customer support page" })] }), title: t("Unfortnately, We found no articles for your search '{0}'", {
9756
9798
  replacementValues: { 0: keyword },
9757
9799
  }) })), jsxs("div", { style: {
9758
- display: !hasProducts ? 'none' : undefined,
9759
- }, children: [jsx("section", { className: styles$b.categories, children: jsx(SearchResultsPageCategoryCarousel, {}) }), jsxs("section", { className: styles$b['action-bar'], children: [jsx("div", { className: styles$b['sidebar-toggle'], children: jsx(ToggleSidebarButton, {}) }), jsx("span", { className: styles$b.count, children: jsx(AlgoliaResultsCount, {}) }), jsx("div", { className: styles$b.sort, children: jsx(AlgoliaSortBy, {}) })] }), jsx("section", { children: jsxs("div", { className: styles$b['product-grid-container'], children: [jsx(Sidebar, { children: jsx(AlgoliaFilterPanel, { showCategoriesFilters: true }) }), jsxs("div", { className: styles$b['product-grid'], children: [jsx(SearchResultProductOverview, {}), jsx("div", { className: styles$b.pagination, children: jsx(AlgoliaPagination, { onChange: () => {
9800
+ display: !hasHits ? 'none' : undefined,
9801
+ }, children: [jsx("section", { className: styles$a.categories, children: jsx(SearchResultsPageCategoryCarousel, {}) }), jsxs("section", { className: styles$a['action-bar'], children: [jsx("div", { className: styles$a['sidebar-toggle'], children: jsx(ToggleSidebarButton, {}) }), jsx("span", { className: styles$a.count, children: jsx(AlgoliaResultsCount, {}) }), jsx("div", { className: styles$a.sort, children: jsx(AlgoliaSortBy, {}) })] }), jsx("section", { children: jsxs("div", { className: styles$a['product-grid-container'], children: [jsx(Sidebar, { children: jsx(AlgoliaFilterPanel, { showCategoriesFilters: true }) }), jsxs("div", { className: styles$a['product-grid'], children: [jsx(SearchResultProductOverview, {}), jsx("div", { className: styles$a.pagination, children: jsx(AlgoliaPagination, { onChange: () => {
9760
9802
  setTimeout(() => {
9761
9803
  scrollToTop();
9762
9804
  }, 100);
9763
9805
  } }) })] })] }) })] })] }));
9764
9806
  }
9765
9807
 
9766
- var styles$a = {"background-overlay":"background-overlay-module-mGiNQ","open":"background-overlay-module-5Uxcl","close":"background-overlay-module-GRInQ"};
9808
+ var styles$9 = {"background-overlay":"background-overlay-module-mGiNQ","open":"background-overlay-module-5Uxcl","close":"background-overlay-module-GRInQ"};
9767
9809
 
9768
9810
  function BackgroundOverlay({ className, isOpen, onClick, }) {
9769
9811
  const [, setRender] = useState(isOpen);
@@ -9784,13 +9826,13 @@ function BackgroundOverlay({ className, isOpen, onClick, }) {
9784
9826
  }, [isOpen]);
9785
9827
  if (typeof window === 'undefined')
9786
9828
  return null;
9787
- return ReactDOM.createPortal(jsx("div", { ref: nodeRef, className: clsx(styles$a['background-overlay'], {
9788
- [styles$a['open']]: isOpen,
9789
- [styles$a['close']]: !isOpen,
9829
+ return ReactDOM.createPortal(jsx("div", { ref: nodeRef, className: clsx(styles$9['background-overlay'], {
9830
+ [styles$9['open']]: isOpen,
9831
+ [styles$9['close']]: !isOpen,
9790
9832
  }, className), onClick: onClick }), document.body);
9791
9833
  }
9792
9834
 
9793
- var styles$9 = {"sidebar-container":"sidebar-provider-module-rjeCL","transition":"sidebar-provider-module-C0cKR"};
9835
+ var styles$8 = {"sidebar-container":"sidebar-provider-module-rjeCL","transition":"sidebar-provider-module-C0cKR"};
9794
9836
 
9795
9837
  function SidebarDetectBreakpoint() {
9796
9838
  const xxl = useIsBreakpoint('xxl');
@@ -9820,10 +9862,10 @@ function SidebarDetectBreakpoint() {
9820
9862
  function SidebarProvider({ children }) {
9821
9863
  const state = useSidebar();
9822
9864
  const { close, isDocked, isOpen, transition } = state;
9823
- return (jsxs("div", { className: clsx(styles$9['sidebar-container'], {
9824
- [styles$9['transition']]: transition,
9825
- [styles$9['docked']]: isDocked,
9826
- [styles$9['open']]: isOpen,
9865
+ return (jsxs("div", { className: clsx(styles$8['sidebar-container'], {
9866
+ [styles$8['transition']]: transition,
9867
+ [styles$8['docked']]: isDocked,
9868
+ [styles$8['open']]: isOpen,
9827
9869
  }), children: [jsx(SidebarDetectBreakpoint, {}), children, isDocked && isOpen && (jsx(BackgroundOverlay, { isOpen: isOpen, onClick: close }))] }));
9828
9870
  }
9829
9871
 
@@ -10096,7 +10138,9 @@ function useAlgoliaSearch() {
10096
10138
  const products = state.collections
10097
10139
  .map(collection => ({
10098
10140
  ...collection,
10099
- items: collection.items.map(transformAlgoliaProductHitToProductHit),
10141
+ items: collection.items.map(hit => isAlgoliaProductHit(hit)
10142
+ ? transformAlgoliaProductHitToProductHit(hit)
10143
+ : transformAlgoliaPromoHitToPromoHit(hit)),
10100
10144
  }))
10101
10145
  .find(collection => collection.source.sourceId === 'productsPlugin');
10102
10146
  const popularSearches = state.collections.find(collection => collection.source.sourceId === 'popularSearchesPlugin');
@@ -10119,12 +10163,12 @@ function useAlgoliaSearch() {
10119
10163
  };
10120
10164
  }
10121
10165
 
10122
- var styles$8 = {"global-search-background-overlay-position":"global-search-module-T0bEf","search-wrapper":"global-search-module-d2g2F","search-root":"global-search-module-Sx8Lx","search-container":"global-search-module--orCF","input":"global-search-module-vXnL6","entering":"global-search-module-MYwlp","entered":"global-search-module-Jmt3c","exiting":"global-search-module-gQQfY","exited":"global-search-module-AABcw"};
10166
+ var styles$7 = {"global-search-background-overlay-position":"global-search-module-T0bEf","search-wrapper":"global-search-module-d2g2F","search-root":"global-search-module-Sx8Lx","search-container":"global-search-module--orCF","input":"global-search-module-vXnL6","entering":"global-search-module-MYwlp","entered":"global-search-module-Jmt3c","exiting":"global-search-module-gQQfY","exited":"global-search-module-AABcw"};
10123
10167
 
10124
10168
  const GlobalSearchDisclosureContext = createContext(null);
10125
10169
  function GlobalSearchProvider({ children, searchClient, }) {
10126
10170
  const { close, isOpen, open, toggle } = useDisclosure(false);
10127
- return (jsx(AlgoliaSearchProvider, { searchClient: searchClient, children: jsxs(GlobalSearchDisclosureContext.Provider, { value: { close, isOpen, open, toggle }, children: [children, jsx(BackgroundOverlay, { className: styles$8['global-search-background-overlay-position'], isOpen: isOpen, onClick: toggle })] }) }));
10171
+ return (jsx(AlgoliaSearchProvider, { searchClient: searchClient, children: jsxs(GlobalSearchDisclosureContext.Provider, { value: { close, isOpen, open, toggle }, children: [children, jsx(BackgroundOverlay, { className: styles$7['global-search-background-overlay-position'], isOpen: isOpen, onClick: toggle })] }) }));
10128
10172
  }
10129
10173
 
10130
10174
  const useGlobalSearchDisclosure = () => {
@@ -10139,7 +10183,7 @@ function StrokeSearchIcon(props) {
10139
10183
  return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", ...props, fill: "currentColor", height: "24", viewBox: "0 0 24 24", width: "24", children: jsx("path", { d: "M10.1044994,16.5738466 C6.53724234,16.5738466 3.63503896,13.6716658 3.63503896,10.1044364 C3.63503896,6.53739167 6.53724234,3.63521084 10.1044994,3.63521084 C13.6717564,3.63521084 16.5737752,6.53739167 16.5737752,10.1044364 C16.5737752,13.6716658 13.6717564,16.5738466 10.1044994,16.5738466 M21.7583512,20.6019769 L16.3655653,15.2505791 C17.5171805,13.8510793 18.2089988,12.0586047 18.2089988,10.1044364 C18.2089988,5.62851052 14.5804601,2 10.1044994,2 C5.62853871,2 2,5.62851052 2,10.1044364 C2,14.5805469 5.62853871,18.2090574 10.1044994,18.2090574 C12.0372712,18.2090574 13.8113014,17.5312728 15.2041671,16.4020009 L20.6065514,21.7628123 C20.7660314,21.9208144 20.9742413,22 21.1824513,22 C21.3925071,22 21.6029321,21.9191531 21.7627812,21.7581977 C22.0808183,21.4377636 22.0787879,20.9200114 21.7583512,20.6019769", fillRule: "evenodd" }) }));
10140
10184
  }
10141
10185
 
10142
- var styles$7 = {"form":"search-input-module-xCCzd","input-container":"search-input-module-okP8k","icon":"search-input-module-GZbhK","label":"search-input-module-vKCm4","reset-btn":"search-input-module-lYseZ","input":"search-input-module-bELFK"};
10186
+ var styles$6 = {"form":"search-input-module-xCCzd","input-container":"search-input-module-okP8k","icon":"search-input-module-GZbhK","label":"search-input-module-vKCm4","reset-btn":"search-input-module-lYseZ","input":"search-input-module-bELFK"};
10143
10187
 
10144
10188
  function SearchInput({ autocomplete, formRef, inputRef, onCancel, onSubmit, placeholder, }) {
10145
10189
  const formProps = autocomplete?.getFormProps({
@@ -10155,10 +10199,10 @@ function SearchInput({ autocomplete, formRef, inputRef, onCancel, onSubmit, plac
10155
10199
  formProps?.onSubmit(e);
10156
10200
  onSubmit?.();
10157
10201
  }
10158
- return (jsx("form", { ref: formRef, className: styles$7.form, ...formProps, onSubmit: handleSubmit, children: jsxs("div", { className: styles$7['input-container'], children: [jsx("label", { className: styles$7.label, ...labelProps, children: jsx(StrokeSearchIcon, { className: clsx(styles$7['icon-search'], styles$7.icon) }) }), jsx("input", { ref: inputRef, onKeyUp: e => {
10202
+ return (jsx("form", { ref: formRef, className: styles$6.form, ...formProps, onSubmit: handleSubmit, children: jsxs("div", { className: styles$6['input-container'], children: [jsx("label", { className: styles$6.label, ...labelProps, children: jsx(StrokeSearchIcon, { className: clsx(styles$6['icon-search'], styles$6.icon) }) }), jsx("input", { ref: inputRef, onKeyUp: e => {
10159
10203
  if (e.key === 'Escape')
10160
10204
  onCancel?.();
10161
- }, ...inputProps, className: styles$7.input, placeholder: placeholder }), inputProps?.value && (jsx(IconButton, { className: styles$7['reset-btn'], color: "secondary", onClick: () => formRef.current?.reset(), type: "reset", children: jsx(SolidCloseIcon, {}) }))] }) }));
10205
+ }, ...inputProps, className: styles$6.input, placeholder: placeholder }), inputProps?.value && (jsx(IconButton, { className: styles$6['reset-btn'], color: "secondary", onClick: () => formRef.current?.reset(), type: "reset", children: jsx(SolidCloseIcon, {}) }))] }) }));
10162
10206
  }
10163
10207
 
10164
10208
  function ConnectedSearchInput() {
@@ -10172,26 +10216,26 @@ function ConnectedSearchInput() {
10172
10216
  }, placeholder: t('What are you searching for?') }));
10173
10217
  }
10174
10218
 
10175
- var styles$6 = {"categories-grid":"categories-grid-module-C751R","category":"categories-grid-module-7OZS1","category-grid-card":"categories-grid-module-Q7i00"};
10219
+ var styles$5 = {"categories-grid":"categories-grid-module-C751R","category":"categories-grid-module-7OZS1","category-grid-card":"categories-grid-module-Q7i00"};
10176
10220
 
10177
10221
  function CategoriesGrid({ categories, onItemClick, }) {
10178
- return (jsx("div", { className: styles$6['categories-grid'], children: categories.map(category => (jsx("div", { className: styles$6['category'], children: jsx(CategoryCard, { className: styles$6['category-grid-card'], href: category.href, image: {
10222
+ return (jsx("div", { className: styles$5['categories-grid'], children: categories.map(category => (jsx("div", { className: styles$5['category'], children: jsx(CategoryCard, { className: styles$5['category-grid-card'], href: category.href, image: {
10179
10223
  fit: 'contain',
10180
10224
  image: category.image,
10181
10225
  title: category.title,
10182
10226
  }, onClick: onItemClick, title: category.title }, category.title) }, category.title))) }));
10183
10227
  }
10184
10228
 
10185
- var styles$5 = {"search-section":"search-section-module-qaTiw","header":"search-section-module-E--U2","title":"search-section-module-AHlDR"};
10229
+ var styles$4 = {"search-section":"search-section-module-qaTiw","header":"search-section-module-E--U2","title":"search-section-module-AHlDR"};
10186
10230
 
10187
10231
  function SearchSection({ button, children, className, title, }) {
10188
- return (jsxs("div", { className: clsx(styles$5['search-section'], className), children: [jsxs("div", { className: styles$5.header, children: [title && jsx("h2", { className: styles$5.title, children: title }), button && button] }), children] }));
10232
+ return (jsxs("div", { className: clsx(styles$4['search-section'], className), children: [jsxs("div", { className: styles$4.header, children: [title && jsx("h2", { className: styles$4.title, children: title }), button && button] }), children] }));
10189
10233
  }
10190
10234
 
10191
- var styles$4 = {"section-container":"search-content-module-ZMwlB","content":"search-content-module-KIok6","left":"search-content-module-YRLIf","right":"search-content-module-qK5sg","button-container":"search-content-module-w-ORq","show-all-button":"search-content-module-bO1Q0","product-results":"search-content-module-bcFCH","no-results-text":"search-content-module-H-FX2","query":"search-content-module-LbQnK","suggestions":"search-content-module-mhiBZ","list":"search-content-module-coPAt"};
10235
+ var styles$3 = {"section-container":"search-content-module-ZMwlB","content":"search-content-module-KIok6","left":"search-content-module-YRLIf","right":"search-content-module-qK5sg","button-container":"search-content-module-w-ORq","show-all-button":"search-content-module-bO1Q0","product-results":"search-content-module-bcFCH","no-results-text":"search-content-module-H-FX2","query":"search-content-module-LbQnK","suggestions":"search-content-module-mhiBZ","list":"search-content-module-coPAt"};
10192
10236
 
10193
10237
  function SectionContainer({ buttons, leftContent, rightContent, }) {
10194
- return (jsx("div", { className: styles$4['section-container'], children: jsxs("div", { className: styles$4['content'], children: [jsx("div", { className: styles$4['left'], children: leftContent }), jsxs("div", { className: styles$4['right'], children: [rightContent, jsx("div", { className: styles$4['button-container'], children: buttons })] })] }) }));
10238
+ return (jsx("div", { className: styles$3['section-container'], children: jsxs("div", { className: styles$3['content'], children: [jsx("div", { className: styles$3['left'], children: leftContent }), jsxs("div", { className: styles$3['right'], children: [rightContent, jsx("div", { className: styles$3['button-container'], children: buttons })] })] }) }));
10195
10239
  }
10196
10240
 
10197
10241
  function NoResults() {
@@ -10200,7 +10244,7 @@ function NoResults() {
10200
10244
  function NotFound() {
10201
10245
  const { state } = useAlgoliaSearch();
10202
10246
  const t = useFormattedMessage();
10203
- return (jsx(SearchSection, { title: t('Sorry, we could not find matches for'), children: jsx("div", { className: styles$4['no-results-text'], children: jsxs("div", { className: styles$4.section, children: [jsxs("p", { className: styles$4.query, children: ["'", state.query, "'"] }), jsxs("div", { className: styles$4.suggestions, children: [jsx("p", { children: jsx(FormattedMessage, { id: "You could try" }) }), jsxs("ul", { className: styles$4.list, children: [jsx("li", { children: jsx(FormattedMessage, { id: "Searching again using more general terms" }) }), jsx("li", { children: jsx(FormattedMessage, { id: "Double check your spelling" }) }), jsx("li", { children: jsx(FormattedMessage, { id: "Use fewer keywords" }) }), jsx("li", { children: jsx(FormattedMessage, { id: "Exploring our products by category" }) })] })] })] }) }) }));
10247
+ return (jsx(SearchSection, { title: t('Sorry, we could not find matches for'), children: jsx("div", { className: styles$3['no-results-text'], children: jsxs("div", { className: styles$3.section, children: [jsxs("p", { className: styles$3.query, children: ["'", state.query, "'"] }), jsxs("div", { className: styles$3.suggestions, children: [jsx("p", { children: jsx(FormattedMessage, { id: "You could try" }) }), jsxs("ul", { className: styles$3.list, children: [jsx("li", { children: jsx(FormattedMessage, { id: "Searching again using more general terms" }) }), jsx("li", { children: jsx(FormattedMessage, { id: "Double check your spelling" }) }), jsx("li", { children: jsx(FormattedMessage, { id: "Use fewer keywords" }) }), jsx("li", { children: jsx(FormattedMessage, { id: "Exploring our products by category" }) })] })] })] }) }) }));
10204
10248
  }
10205
10249
  function PopularCategoriesSection() {
10206
10250
  const { popularCategories: collection } = useAlgoliaSearch();
@@ -10209,7 +10253,7 @@ function PopularCategoriesSection() {
10209
10253
  if (!collection)
10210
10254
  return null;
10211
10255
  const { items } = collection;
10212
- return (jsx(SearchSection, { title: t('Explore by categories'), children: jsx("div", { className: styles$4['categories-grid-container'], children: jsx(CategoriesGrid, { categories: items, onItemClick: close }) }) }));
10256
+ return (jsx(SearchSection, { title: t('Explore by categories'), children: jsx("div", { className: styles$3['categories-grid-container'], children: jsx(CategoriesGrid, { categories: items, onItemClick: close }) }) }));
10213
10257
  }
10214
10258
 
10215
10259
  function Highlight({ attribute, hit, tagName = 'mark', }) {
@@ -10221,20 +10265,18 @@ function Highlight({ attribute, hit, tagName = 'mark', }) {
10221
10265
  }));
10222
10266
  }
10223
10267
 
10224
- var styles$3 = {"search-list":"search-list-module-vRuMO"};
10268
+ var styles$2 = {"search-list":"search-list-module-vRuMO"};
10225
10269
 
10226
10270
  function SearchList({ ariaLabelledby, children, className, id, }) {
10227
- return (jsx("ul", { "aria-labelledby": ariaLabelledby, className: clsx(styles$3['search-list'], className), id: id, children: children }));
10271
+ return (jsx("ul", { "aria-labelledby": ariaLabelledby, className: clsx(styles$2['search-list'], className), id: id, children: children }));
10228
10272
  }
10229
10273
 
10230
- var styles$2 = {"search-list-item":"search-list-item-module-WXp77","clear-filter-button":"search-list-item-module-YJvJm","content":"search-list-item-module-CPrhz","text":"search-list-item-module--5uqN"};
10274
+ var styles$1 = {"search-list-item":"search-list-item-module-WXp77","clear-filter-button":"search-list-item-module-YJvJm","content":"search-list-item-module-CPrhz","text":"search-list-item-module--5uqN"};
10231
10275
 
10232
10276
  function SearchListItem({ icon, isRemovable = false, onClick, onRemove, text, }) {
10233
- return (jsxs("li", { className: styles$2['search-list-item'], onClick: onClick, role: "option", children: [jsxs("div", { className: styles$2.content, children: [icon && icon, text && jsx("span", { className: styles$2.text, children: text })] }), isRemovable && (jsx(IconButton, { className: styles$2['clear-filter-button'], color: "secondary", onClick: onRemove, children: jsx(StrokeCloseboxIcon, {}) }))] }));
10277
+ return (jsxs("li", { className: styles$1['search-list-item'], onClick: onClick, role: "option", children: [jsxs("div", { className: styles$1.content, children: [icon && icon, text && jsx("span", { className: styles$1.text, children: text })] }), isRemovable && (jsx(IconButton, { className: styles$1['clear-filter-button'], color: "secondary", onClick: onRemove, children: jsx(StrokeCloseboxIcon, {}) }))] }));
10234
10278
  }
10235
10279
 
10236
- var styles$1 = {"quick-access-section":"no-search-module-87NKV","quick-access-carousel":"no-search-module-beCXI","quick-access-card":"no-search-module-dtT5J"};
10237
-
10238
10280
  function NoSearch() {
10239
10281
  return (jsx(SectionContainer, { leftContent: jsxs("div", { children: [jsx(RecentSearchesSection, {}), jsx(PopularSearchesSection, {})] }), rightContent: jsx(QuickAccessSection, {}) }));
10240
10282
  }
@@ -10270,7 +10312,7 @@ function QuickAccessSection() {
10270
10312
  if (!collection)
10271
10313
  return;
10272
10314
  const { items } = collection;
10273
- return (jsx(SearchSection, { title: t('Quick access'), children: jsx("div", { className: styles$1['quick-access-section'], children: jsx(Carousel, { className: styles$1['quick-access-carousel'], hasNavigation: false, hasOverflow: false, navigationButtonsPosition: "center", slides: items.map((item, index) => (jsx(RouteLink, { className: styles$1['quick-access-card'], href: item.action.url, onClick: close, children: jsx(Image, { height: 343, image: item.image, title: item.image.altText, width: 192 }) }, index))), slidesPerView: "auto", spaceBetween: 16 }) }) }));
10315
+ return (jsx(SearchSection, { title: t('Quick access'), children: jsx("div", { className: styles$3['product-results'], children: jsx(CardCarousel, { cards: items.map((item, index) => (jsx(PromoCard, { href: item.action.url, image: item.image, onClick: close }, `${index}-${item.action.url}`))), cardsPerView: "auto", cardWidth: "narrow" }) }) }));
10274
10316
  }
10275
10317
 
10276
10318
  function StrokeRecentIcon(props) {
@@ -10280,12 +10322,12 @@ function StrokeRecentIcon(props) {
10280
10322
  function WithResults() {
10281
10323
  const { state } = useAlgoliaSearch();
10282
10324
  const { close } = useGlobalSearchDisclosure();
10283
- return (jsx("div", { children: jsx(SectionContainer, { buttons: jsxs(RouteButton, { className: clsx(styles$4['show-all-button'], buttonStyles.button, buttonStyles.secondary, buttonStyles.outline, buttonStyles.md), href: `/search?keyword=${state.query}`, onClick: close, children: [jsx(FormattedMessage, { id: "See all results" }), jsx(GlyphsArrowBoldCapsRightIcon, { className: buttonStyles['right-arrow-icon'] })] }), leftContent: jsx(SuggestionsSection, {}), rightContent: jsx(ProductResultsSection, {}) }) }));
10325
+ return (jsx("div", { children: jsx(SectionContainer, { buttons: jsxs(RouteButton, { className: clsx(styles$3['show-all-button'], buttonStyles.button, buttonStyles.secondary, buttonStyles.outline, buttonStyles.md), href: `/search?keyword=${state.query}`, onClick: close, children: [jsx(FormattedMessage, { id: "See all results" }), jsx(GlyphsArrowBoldCapsRightIcon, { className: buttonStyles['right-arrow-icon'] })] }), leftContent: jsx(SuggestionsSection, {}), rightContent: jsx(ProductResultsSection, {}) }) }));
10284
10326
  }
10285
10327
  function SuggestionsSection() {
10286
10328
  const { autocomplete, categories, querySuggestions, recentSearches } = useAlgoliaSearch();
10287
10329
  const t = useFormattedMessage();
10288
- return (jsxs(SearchSection, { className: styles$4['product-results-section'], title: t('Suggestions'), children: [recentSearches && (jsx(SearchList, { ...autocomplete.getListProps({
10330
+ return (jsxs(SearchSection, { className: styles$3['product-results-section'], title: t('Suggestions'), children: [recentSearches && (jsx(SearchList, { ...autocomplete.getListProps({
10289
10331
  source: recentSearches.source,
10290
10332
  }), children: recentSearches.items.slice(0, 3).map(item => (jsx(SearchListItem, { ...autocomplete.getItemProps({
10291
10333
  item,
@@ -10307,45 +10349,48 @@ function SuggestionsSection() {
10307
10349
  source: categories.source,
10308
10350
  }), icon: jsx(StrokeSearchIcon, {}), text: jsxs("span", { children: [jsx("span", { children: item.listCategories[item.listCategories.length - 1] }), jsx("span", { children: item.listCategories.slice(0, -1).join(' > ') })] }) }, item.objectID))) }))] }));
10309
10351
  }
10310
- function ProductResultsSection() {
10311
- const { autocomplete, products: collection } = useAlgoliaSearch();
10352
+ function ProductHitCard({ autocomplete, hit, index, source, }) {
10312
10353
  const { close } = useGlobalSearchDisclosure();
10313
10354
  const { sendAddToCartFromSearchEvent, sendAddToWishListFromSearchEvent, sendProductClickFromSearchEvent, } = useAlgoliaInsights();
10355
+ return (createElement$1(ConnectedProductCard, { ...autocomplete.getItemProps({
10356
+ item: hit.hit,
10357
+ source,
10358
+ }), key: hit.storefrontId, href: hit.storefrontSlug, id: hit.storefrontId, image: {
10359
+ fit: 'contain',
10360
+ image: hit.image,
10361
+ title: hit.name,
10362
+ }, onAddToCart: () => hit.queryId &&
10363
+ sendAddToCartFromSearchEvent({
10364
+ objectId: hit.objectId,
10365
+ queryId: hit.queryId,
10366
+ }), onClick: () => {
10367
+ close();
10368
+ hit.queryId &&
10369
+ sendProductClickFromSearchEvent({
10370
+ objectId: hit.objectId,
10371
+ position: hit.position || index + 1,
10372
+ queryId: hit.queryId,
10373
+ });
10374
+ }, onFavoriting: () => {
10375
+ hit.queryId &&
10376
+ sendAddToWishListFromSearchEvent({
10377
+ objectId: hit.objectId,
10378
+ position: hit.position || index + 1,
10379
+ queryId: hit.queryId,
10380
+ });
10381
+ }, price: {
10382
+ isVatIncluded: hit.isVatIncluded,
10383
+ originalPrice: hit.originalPrice,
10384
+ price: hit.price,
10385
+ }, sku: hit.id, tags: hit.labels, title: jsx(Highlight, { attribute: "name", hit: hit.hit }) }));
10386
+ }
10387
+ function ProductResultsSection() {
10388
+ const { autocomplete, products: collection } = useAlgoliaSearch();
10314
10389
  const t = useFormattedMessage();
10315
10390
  if (!collection)
10316
10391
  return null;
10317
10392
  const { items, source } = collection;
10318
- return (jsx(SearchSection, { className: styles$4['product-results-section'], title: t('Products'), children: jsx("div", { className: styles$4['product-results'], ...autocomplete.getListProps({ source }), children: jsx(ProductCarousel, { cardWidth: "narrow", productCards: items.map((product, index) => (createElement$1(ConnectedProductCard, { ...autocomplete.getItemProps({
10319
- item: product.hit,
10320
- source: source,
10321
- }), key: product.storefrontId, href: product.storefrontSlug, id: product.storefrontId, image: {
10322
- fit: 'contain',
10323
- image: product.image,
10324
- title: product.name,
10325
- }, onAddToCart: () => product.queryId &&
10326
- sendAddToCartFromSearchEvent({
10327
- objectId: product.objectId,
10328
- queryId: product.queryId,
10329
- }), onClick: () => {
10330
- close();
10331
- product.queryId &&
10332
- sendProductClickFromSearchEvent({
10333
- objectId: product.objectId,
10334
- position: product.position || index + 1,
10335
- queryId: product.queryId,
10336
- });
10337
- }, onFavoriting: () => {
10338
- product.queryId &&
10339
- sendAddToWishListFromSearchEvent({
10340
- objectId: product.objectId,
10341
- position: product.position || index + 1,
10342
- queryId: product.queryId,
10343
- });
10344
- }, price: {
10345
- isVatIncluded: product.isVatIncluded,
10346
- originalPrice: product.originalPrice,
10347
- price: product.price,
10348
- }, sku: product.id, tags: product.labels, title: jsx(Highlight, { attribute: "name", hit: product.hit }) }))), productsPerView: "auto" }) }) }));
10393
+ return (jsx(SearchSection, { className: styles$3['product-results-section'], title: t('Products'), children: jsx("div", { className: styles$3['product-results'], ...autocomplete.getListProps({ source }), children: jsx(CardCarousel, { cards: items.map((hit, index) => isProductHit(hit) ? (jsx(ProductHitCard, { autocomplete: autocomplete, hit: hit, index: index, source: source }, hit.id)) : (jsx(PromoCard, { href: hit.href, image: hit.image }, hit.id))), cardsPerView: "auto", cardWidth: "narrow" }) }) }));
10349
10394
  }
10350
10395
 
10351
10396
  function PanelContent() {
@@ -10375,7 +10420,7 @@ function SearchRoot() {
10375
10420
  inputRef.current.blur();
10376
10421
  }
10377
10422
  }, [inputRef, isOpen]);
10378
- return (jsx("div", { className: styles$8['search-root'], children: jsx(Transition, { in: isOpen, nodeRef: inputRef, timeout: 300, children: transitionState => (jsxs("div", { className: clsx(styles$8['search-container'], styles$8[transitionState]), ...autocomplete.getRootProps({}), children: [jsx("div", { className: styles$8.input, children: jsx(ConnectedSearchInput, {}) }), jsx("div", { className: styles$8.panel, children: jsx(SearchResultPanel, {}) })] })) }) }));
10423
+ return (jsx("div", { className: styles$7['search-root'], children: jsx(Transition, { in: isOpen, nodeRef: inputRef, timeout: 300, children: transitionState => (jsxs("div", { className: clsx(styles$7['search-container'], styles$7[transitionState]), ...autocomplete.getRootProps({}), children: [jsx("div", { className: styles$7.input, children: jsx(ConnectedSearchInput, {}) }), jsx(SearchResultPanel, {})] })) }) }));
10379
10424
  }
10380
10425
  /**
10381
10426
  * Global search using algolia autocomplete with a custom renderer
@@ -10389,7 +10434,7 @@ function GlobalSearch() {
10389
10434
  const panelRef = useRef(null);
10390
10435
  const { close, isOpen } = useGlobalSearchDisclosure();
10391
10436
  useOnNavigate(close);
10392
- return (jsx(TransitionGroup, { children: jsx(Transition, { in: isOpen, nodeRef: panelRef, timeout: 300, children: state => (jsx("div", { ref: panelRef, className: state, children: jsx("div", { className: styles$8['search-wrapper'], children: jsx(SearchRoot, {}) }) })) }) }));
10437
+ return (jsx(TransitionGroup, { children: jsx(Transition, { in: isOpen, nodeRef: panelRef, timeout: 300, children: state => (jsx("div", { ref: panelRef, className: state, children: jsx("div", { className: styles$7['search-wrapper'], children: jsx(SearchRoot, {}) }) })) }) }));
10393
10438
  }
10394
10439
 
10395
10440
  const queryClient = new QueryClient({
@@ -10419,4 +10464,4 @@ console.log(`@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
10419
10464
  @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
10420
10465
  @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@`);
10421
10466
 
10422
- export { Accordion, AddToCartButton, AlgoliaActiveCategories, AlgoliaCategoriesFilters, AlgoliaFilterPanel, AlgoliaInsightsProvider, AlgoliaInsightsProviderContext, AlgoliaMultiSelectFilterSection, AlgoliaPagination, AlgoliaProvider, AlgoliaResultsCount, AlgoliaSortBy, AnnouncementProvider, AvailabilityMessageType, BadRequestError, BadgeImagePlacementValues, BadgeStyleValues, BadgeTypeValues, Breadcrumb, Button, CartProvider, CategoryCarousel, Checkbox, ColorCheckbox, ConnectedAddToCartButton, CountrySelector, CurrencyPositioningType, FavoriteButton, FavoriteProvider, FilterSection, ForbiddenRequestError, FormattedMessage, GlobalSearch, GlobalSearchDisclosureContext, GlobalSearchProvider, GlobalStateProvider, GlobalStateProviderContext, IconButton, Image, InternalServerErrorRequest, IntlProvider, Link, LoadingOverlay, MultiSelect, NotFoundRequestError, NumberField, Page, PageContainer, ProductCard, ProductDetailsPage, ProductListingPage, ProductOverviewGrid, ProductPrice, ProductSku, ProgressCircle, ReactQueryContainer, RequestError, RouteButton, RouteLink, RouteProvider, SearchResultsPage, SearchRoot, Select, ShowAll, Sidebar, SidebarDetectBreakpoint, SidebarProvider, TextField, TimeoutRequestError, UnauthorizedRequestError, UnprocessableContentRequestError, VariantDisplayTypeValues, WishListNameAlreadyExistsError, addProductToCurrentCart, addWishListItemToWishList, config, configPerEnvironment, createSession, createSonicSearchClient, createWishList, deleteCartLineById, deleteWishList, deleteWishListItemFromWishList, environment, environments, fetchCurrentCartLines, fetchTranslations, getSession, getWishList, getWishListItemsByWishListId, getWishLists, isRequestError, request, signIn, signOut, transformAlgoliaProductHitToProductHit, updateCartLineById, useAddProductToCurrentCart, useAddWishListItemToCurrentWishList, useAddWishListItemToWishList, useAlgolia, useAlgoliaInsights, useAlgoliaSearch, useBreakpoint, useCartEvents, useCreateWishList, useDebouncedCallback, useDeleteCartLineById, useDeleteWishListItemFromWishList, useDisclosure, useFavorite, useFavoriteProduct, useFeatureFlags, useFetchAllWishListsItems, useFetchCurrentCartLines, useFetchTranslations, useFetchWishLists, useFormattedMessage, useGlobalSearchDisclosure, useGlobalState, useIsAuthenticated, useIsBreakpoint, useNavigate, useOnNavigate, useScrollLock, useSession, useSignIn, useSignOut, useUpdateCartLineById, userToken };
10467
+ export { Accordion, AddToCartButton, AlgoliaActiveCategories, AlgoliaCategoriesFilters, AlgoliaFilterPanel, AlgoliaInsightsProvider, AlgoliaInsightsProviderContext, AlgoliaMultiSelectFilterSection, AlgoliaPagination, AlgoliaProvider, AlgoliaResultsCount, AlgoliaSortBy, AnnouncementProvider, AvailabilityMessageType, BadRequestError, BadgeImagePlacementValues, BadgeStyleValues, BadgeTypeValues, Breadcrumb, Button, CartProvider, CategoryCarousel, Checkbox, ColorCheckbox, ConnectedAddToCartButton, CountrySelector, CurrencyPositioningType, FavoriteButton, FavoriteProvider, FilterSection, ForbiddenRequestError, FormattedMessage, GlobalSearch, GlobalSearchDisclosureContext, GlobalSearchProvider, GlobalStateProvider, GlobalStateProviderContext, IconButton, Image, InternalServerErrorRequest, IntlProvider, Link, LoadingOverlay, MultiSelect, NotFoundRequestError, NumberField, Page, PageContainer, ProductCard, ProductDetailsPage, ProductListingPage, ProductOverviewGrid, ProductPrice, ProductSku, ProgressCircle, ReactQueryContainer, RequestError, RouteButton, RouteLink, RouteProvider, SearchResultsPage, SearchRoot, Select, ShowAll, Sidebar, SidebarDetectBreakpoint, SidebarProvider, TextField, TimeoutRequestError, UnauthorizedRequestError, UnprocessableContentRequestError, VariantDisplayTypeValues, WishListNameAlreadyExistsError, addProductToCurrentCart, addWishListItemToWishList, config, configPerEnvironment, createSession, createSonicSearchClient, createWishList, deleteCartLineById, deleteWishList, deleteWishListItemFromWishList, environment, environments, fetchCurrentCartLines, fetchTranslations, getSession, getWishList, getWishListItemsByWishListId, getWishLists, isProductHit, isRequestError, request, signIn, signOut, transformAlgoliaProductHitToProductHit, transformAlgoliaPromoHitToPromoHit, updateCartLineById, useAddProductToCurrentCart, useAddWishListItemToCurrentWishList, useAddWishListItemToWishList, useAlgolia, useAlgoliaInsights, useAlgoliaSearch, useBreakpoint, useCartEvents, useCreateWishList, useDebouncedCallback, useDeleteCartLineById, useDeleteWishListItemFromWishList, useDisclosure, useFavorite, useFavoriteProduct, useFeatureFlags, useFetchAllWishListsItems, useFetchCurrentCartLines, useFetchTranslations, useFetchWishLists, useFormattedMessage, useGlobalSearchDisclosure, useGlobalState, useIsAuthenticated, useIsBreakpoint, useNavigate, useOnNavigate, useScrollLock, useSession, useSignIn, useSignOut, useUpdateCartLineById, userToken };