@asante-org/leybold-design-system 1.3.0 → 1.3.2

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/index.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- import React, { useMemo, useState, useCallback, useRef, useEffect } from 'react';
1
+ import React, { useState, useEffect, useCallback, useMemo, useRef } from 'react';
2
2
  import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
3
3
  import { faArrowLeft, faArrowLeftLong, faArrowRight, faArrowRightLong, faChevronRight, faChevronLeft, faArrowUpRightFromSquare, faGlobe, faXmark as faXmark$1 } from '@fortawesome/free-solid-svg-icons';
4
4
  import { faInstagram, faYoutube, faLinkedinIn, faXTwitter, faFacebookF } from '@fortawesome/free-brands-svg-icons';
@@ -15,46 +15,7 @@ function _extends() {
15
15
  }, _extends.apply(null, arguments);
16
16
  }
17
17
 
18
- /******************************************************************************
19
- Copyright (c) Microsoft Corporation.
20
-
21
- Permission to use, copy, modify, and/or distribute this software for any
22
- purpose with or without fee is hereby granted.
23
-
24
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
25
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
26
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
27
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
28
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
29
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
30
- PERFORMANCE OF THIS SOFTWARE.
31
- ***************************************************************************** */
32
- /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
33
-
34
- var __assign = function () {
35
- __assign = Object.assign || function __assign(t) {
36
- for (var s, i = 1, n = arguments.length; i < n; i++) {
37
- s = arguments[i];
38
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
39
- }
40
- return t;
41
- };
42
- return __assign.apply(this, arguments);
43
- };
44
- function __rest(s, e) {
45
- var t = {};
46
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
47
- if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
48
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
49
- }
50
- return t;
51
- }
52
- typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
53
- var e = new Error(message);
54
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
55
- };
56
-
57
- var styles$l = {"button":"Button-module__button___18Bed","button--primary":"Button-module__button--primary___VuF-P","button--disabled":"Button-module__button--disabled___IuOY8","button--secondary":"Button-module__button--secondary___lD5E3","button--solid-grey":"Button-module__button--solid-grey___oRbEy","button--solid-black":"Button-module__button--solid-black___1Ma5K","button--solid-white":"Button-module__button--solid-white___bE-Z0","button--outlined-grey":"Button-module__button--outlined-grey___xWGbB","button--outlined-black":"Button-module__button--outlined-black___qfX5o","button--outlined-white":"Button-module__button--outlined-white___QLXNP","button--link-text":"Button-module__button--link-text___R2kun","button__icon":"Button-module__button__icon___hlcHo","button--link-text-alt":"Button-module__button--link-text-alt___1p7wH","button--external-link":"Button-module__button--external-link___Mhxuk","button--carousel-arrow-left":"Button-module__button--carousel-arrow-left___Wx-Jo","button--carousel-arrow-right":"Button-module__button--carousel-arrow-right___3ZtgT","button__icon__default":"Button-module__button__icon__default___0qlF1","button__icon__hover":"Button-module__button__icon__hover___3xPGT","button--extra-small":"Button-module__button--extra-small___R0QTM","button--small":"Button-module__button--small___ADJQe","button--medium":"Button-module__button--medium___ZuR4Z","button--large":"Button-module__button--large___-FaV5","button__icon--left":"Button-module__button__icon--left___wMCeH","button__icon--right":"Button-module__button__icon--right___-pGHl"};
18
+ var styles$m = {"button":"Button-module__button___18Bed","button--primary":"Button-module__button--primary___VuF-P","button--disabled":"Button-module__button--disabled___IuOY8","button--secondary":"Button-module__button--secondary___lD5E3","button--solid-grey":"Button-module__button--solid-grey___oRbEy","button--solid-black":"Button-module__button--solid-black___1Ma5K","button--solid-white":"Button-module__button--solid-white___bE-Z0","button--outlined-grey":"Button-module__button--outlined-grey___xWGbB","button--outlined-black":"Button-module__button--outlined-black___qfX5o","button--outlined-white":"Button-module__button--outlined-white___QLXNP","button--link-text":"Button-module__button--link-text___R2kun","button__icon":"Button-module__button__icon___hlcHo","button--link-text-alt":"Button-module__button--link-text-alt___1p7wH","button--external-link":"Button-module__button--external-link___Mhxuk","button--carousel-arrow-left":"Button-module__button--carousel-arrow-left___Wx-Jo","button--carousel-arrow-right":"Button-module__button--carousel-arrow-right___3ZtgT","button__icon__default":"Button-module__button__icon__default___0qlF1","button__icon__hover":"Button-module__button__icon__hover___3xPGT","button--extra-small":"Button-module__button--extra-small___R0QTM","button--small":"Button-module__button--small___ADJQe","button--medium":"Button-module__button--medium___ZuR4Z","button--large":"Button-module__button--large___-FaV5","button__icon--left":"Button-module__button__icon--left___wMCeH","button__icon--right":"Button-module__button__icon--right___-pGHl"};
58
19
 
59
20
  function getDefaultExportFromCjs (x) {
60
21
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
@@ -131,10 +92,22 @@ function requireClassnames() {
131
92
  var classnamesExports = requireClassnames();
132
93
  var classNames = /*@__PURE__*/getDefaultExportFromCjs(classnamesExports);
133
94
 
95
+ /**
96
+ * Button variant types
97
+ */
98
+
99
+ /**
100
+ * Icon types for button
101
+ */
102
+
103
+ /**
104
+ * Icon position
105
+ */
106
+
134
107
  /**
135
108
  * Get the icon component based on icon type
136
109
  */
137
- var getIcon = function (icon) {
110
+ const getIcon = icon => {
138
111
  switch (icon) {
139
112
  case "arrow-right":
140
113
  return /*#__PURE__*/React.createElement(FontAwesomeIcon, {
@@ -156,10 +129,11 @@ var getIcon = function (icon) {
156
129
  return null;
157
130
  }
158
131
  };
132
+
159
133
  /**
160
134
  * Get default icon for certain variants
161
135
  */
162
- var getDefaultIcon = function (variant) {
136
+ const getDefaultIcon = variant => {
163
137
  switch (variant) {
164
138
  case "link-text":
165
139
  case "link-text-alt":
@@ -176,10 +150,11 @@ var getDefaultIcon = function (variant) {
176
150
  return "none";
177
151
  }
178
152
  };
153
+
179
154
  /**
180
155
  * Map alias variants to their actual CSS class variants
181
156
  */
182
- var mapVariantToClass = function (variant) {
157
+ const mapVariantToClass = variant => {
183
158
  switch (variant) {
184
159
  case "text":
185
160
  return "link-text";
@@ -187,41 +162,42 @@ var mapVariantToClass = function (variant) {
187
162
  return variant;
188
163
  }
189
164
  };
165
+
190
166
  /**
191
167
  * Primary UI component for user interaction
192
168
  */
193
- var Button = function (_a) {
194
- var _b;
195
- var children = _a.children,
196
- _c = _a.variant,
197
- variant = _c === void 0 ? "primary" : _c,
198
- _d = _a.size,
199
- size = _d === void 0 ? "medium" : _d,
200
- _e = _a.disabled,
201
- disabled = _e === void 0 ? false : _e,
202
- onClick = _a.onClick,
203
- _f = _a.type,
204
- type = _f === void 0 ? "button" : _f,
205
- className = _a.className,
206
- icon = _a.icon,
207
- _g = _a.iconPosition,
208
- iconPosition = _g === void 0 ? "right" : _g,
209
- ariaLabel = _a.ariaLabel;
210
- _a.opensInNewTab;
211
- var props = __rest(_a, ["children", "variant", "size", "disabled", "onClick", "type", "className", "icon", "iconPosition", "ariaLabel", "opensInNewTab"]);
169
+ const Button = ({
170
+ children,
171
+ variant = "primary",
172
+ size = "medium",
173
+ disabled = false,
174
+ onClick,
175
+ type = "button",
176
+ className,
177
+ icon,
178
+ iconPosition = "right",
179
+ ariaLabel,
180
+ opensInNewTab,
181
+ ...props
182
+ }) => {
212
183
  // Map alias variants to actual class names
213
- var cssVariant = mapVariantToClass(variant);
184
+ const cssVariant = mapVariantToClass(variant);
185
+
214
186
  // Determine the icon to display
215
- var displayIcon = icon !== null && icon !== void 0 ? icon : getDefaultIcon(variant);
216
- var iconElement = getIcon(displayIcon);
187
+ const displayIcon = icon ?? getDefaultIcon(variant);
188
+ const iconElement = getIcon(displayIcon);
189
+
217
190
  // Check if this is an icon-only button (carousel arrows)
218
- var isIconOnly = variant === "carousel-arrow-left" || variant === "carousel-arrow-right";
219
- var isCarouselLeft = variant === "carousel-arrow-left";
220
- var isCarouselRight = variant === "carousel-arrow-right";
221
- var buttonClasses = classNames(styles$l.button, styles$l["button--".concat(cssVariant)], styles$l["button--".concat(size)], (_b = {}, _b[styles$l["button--disabled"]] = disabled, _b), className);
222
- var iconClasses = classNames(styles$l.button__icon, styles$l["button__icon--".concat(iconPosition)]);
191
+ const isIconOnly = variant === "carousel-arrow-left" || variant === "carousel-arrow-right";
192
+ const isCarouselLeft = variant === "carousel-arrow-left";
193
+ const isCarouselRight = variant === "carousel-arrow-right";
194
+ const buttonClasses = classNames(styles$m.button, styles$m[`button--${cssVariant}`], styles$m[`button--${size}`], {
195
+ [styles$m["button--disabled"]]: disabled
196
+ }, className);
197
+ const iconClasses = classNames(styles$m.button__icon, styles$m[`button__icon--${iconPosition}`]);
198
+
223
199
  // Generate accessible label for icon-only buttons
224
- var accessibleLabel = ariaLabel || (isIconOnly ? variant === "carousel-arrow-left" ? "Previous" : "Next" : undefined);
200
+ const accessibleLabel = ariaLabel || (isIconOnly ? variant === "carousel-arrow-left" ? "Previous" : "Next" : undefined);
225
201
  return /*#__PURE__*/React.createElement("button", _extends({
226
202
  type: type,
227
203
  className: buttonClasses,
@@ -233,81 +209,245 @@ var Button = function (_a) {
233
209
  className: iconClasses
234
210
  }, /*#__PURE__*/React.createElement(FontAwesomeIcon, {
235
211
  icon: faArrowLeft,
236
- className: styles$l.button__icon__default
212
+ className: styles$m.button__icon__default
237
213
  }), /*#__PURE__*/React.createElement(FontAwesomeIcon, {
238
214
  icon: faArrowLeftLong,
239
- className: styles$l.button__icon__hover
215
+ className: styles$m.button__icon__hover
240
216
  })), isCarouselRight && /*#__PURE__*/React.createElement("span", {
241
217
  className: iconClasses
242
218
  }, /*#__PURE__*/React.createElement(FontAwesomeIcon, {
243
219
  icon: faArrowRight,
244
- className: styles$l.button__icon__default
220
+ className: styles$m.button__icon__default
245
221
  }), /*#__PURE__*/React.createElement(FontAwesomeIcon, {
246
222
  icon: faArrowRightLong,
247
- className: styles$l.button__icon__hover
223
+ className: styles$m.button__icon__hover
248
224
  })), !isIconOnly && iconElement && /*#__PURE__*/React.createElement("span", {
249
225
  className: iconClasses
250
226
  }, iconElement));
251
227
  };
252
228
 
253
- var styles$k = {"footer":"Footer-module__footer___Oavyx","footer--mobile":"Footer-module__footer--mobile___9HQC-","footer__container":"Footer-module__footer__container___ohvnm","footer__links":"Footer-module__footer__links___DdVK8","footer__linkGroup":"Footer-module__footer__linkGroup___1B7JA","footer__linkList":"Footer-module__footer__linkList___j-DWF","footer__linkHeading":"Footer-module__footer__linkHeading___LtE6X","footer__link":"Footer-module__footer__link___G5HPW","footer__cta":"Footer-module__footer__cta___MRJLr","footer__socialIcons":"Footer-module__footer__socialIcons___j0aRp","footer__socialIcon":"Footer-module__footer__socialIcon___1uVTm","footer__countrySelector":"Footer-module__footer__countrySelector___pVtN5","footer__bottom":"Footer-module__footer__bottom___77bPL","footer__bottomLeft":"Footer-module__footer__bottomLeft___tlst1","footer__bottomLinks":"Footer-module__footer__bottomLinks___s22h7","footer__bottomLink":"Footer-module__footer__bottomLink___SLzwY","footer__copyright":"Footer-module__footer__copyright___4bZOF","footer__brandSection":"Footer-module__footer__brandSection___BBr5f","footer__logo":"Footer-module__footer__logo___mv-9M","footer__leftCol":"Footer-module__footer__leftCol___vmKNN","footer__motto":"Footer-module__footer__motto___QtB2m","footer__main":"Footer-module__footer__main___NSU9d","footer__badge":"Footer-module__footer__badge___faejb","footer__badgeIcon":"Footer-module__footer__badgeIcon___xJ519","footer__badgeText":"Footer-module__footer__badgeText___imXgG","footer__linkText":"Footer-module__footer__linkText___Gc18Z","footer__linkIcon":"Footer-module__footer__linkIcon___IZzJM","footer__countrySelectorIcon":"Footer-module__footer__countrySelectorIcon___hhEd4"};
229
+ var styles$l = {"imageContainer":"Image-module__imageContainer___iD5Kd","loading":"Image-module__loading___Sh1zO","image":"Image-module__image___1pa50","error":"Image-module__error___0LGZ2","skeleton":"Image-module__skeleton___0bGS6","shimmer":"Image-module__shimmer___aanrl","errorState":"Image-module__errorState___TjV-8","errorIcon":"Image-module__errorIcon___QCKvj","errorText":"Image-module__errorText___Q8pnb"};
230
+
231
+ const Image = ({
232
+ src,
233
+ alt,
234
+ width,
235
+ height,
236
+ loading = "lazy",
237
+ decoding = "async",
238
+ objectFit = "cover",
239
+ objectPosition = "center",
240
+ aspectRatio,
241
+ isDecorative = false,
242
+ fallbackSrc,
243
+ onLoad,
244
+ onError,
245
+ className = "",
246
+ srcSet,
247
+ sizes
248
+ }) => {
249
+ const [isLoading, setIsLoading] = useState(true);
250
+ const [hasError, setHasError] = useState(false);
251
+ const [currentSrc, setCurrentSrc] = useState(src);
252
+
253
+ // Keep internal state in sync when parent updates `src` (e.g. async data).
254
+ useEffect(() => {
255
+ setCurrentSrc(src);
256
+ setIsLoading(true);
257
+ setHasError(false);
258
+ }, [src]);
259
+ const handleLoad = useCallback(() => {
260
+ setIsLoading(false);
261
+ setHasError(false);
262
+ onLoad?.();
263
+ }, [onLoad]);
264
+ const handleError = useCallback(() => {
265
+ setIsLoading(false);
266
+ setHasError(true);
267
+
268
+ // Try fallback if available and not already using it
269
+ if (fallbackSrc && currentSrc !== fallbackSrc) {
270
+ setCurrentSrc(fallbackSrc);
271
+ setHasError(false);
272
+ setIsLoading(true);
273
+ } else {
274
+ onError?.();
275
+ }
276
+ }, [fallbackSrc, currentSrc, onError]);
254
277
 
255
- /**
256
- * External link icon (↗) for footer links that open in new tabs
257
- */
258
- var ExternalLinkIcon = function (_a) {
259
- var className = _a.className,
260
- _b = _a.size,
261
- size = _b === void 0 ? 15 : _b;
262
- return /*#__PURE__*/React.createElement("svg", {
263
- width: size,
264
- height: size,
265
- viewBox: "0 0 15 15",
266
- fill: "none",
267
- xmlns: "http://www.w3.org/2000/svg",
268
- className: className,
278
+ // Accessibility: decorative images should have empty alt and be hidden from screen readers
279
+ const accessibilityProps = isDecorative ? {
280
+ alt: "",
281
+ "aria-hidden": true,
282
+ role: "presentation"
283
+ } : {
284
+ alt
285
+ };
286
+ const containerStyle = {
287
+ ...(aspectRatio && {
288
+ aspectRatio
289
+ }),
290
+ ...(width && {
291
+ width: typeof width === "number" ? `${width}px` : width
292
+ }),
293
+ ...(height && {
294
+ height: typeof height === "number" ? `${height}px` : height
295
+ })
296
+ };
297
+ const imageStyle = {
298
+ objectFit,
299
+ objectPosition
300
+ };
301
+ return /*#__PURE__*/React.createElement("div", {
302
+ className: `${styles$l.imageContainer} ${className} ${isLoading ? styles$l.loading : ""} ${hasError ? styles$l.error : ""}`,
303
+ style: containerStyle
304
+ }, isLoading && /*#__PURE__*/React.createElement("div", {
305
+ className: styles$l.skeleton,
269
306
  "aria-hidden": "true"
270
- }, /*#__PURE__*/React.createElement("path", {
271
- d: "M11.25 8.125V11.875C11.25 12.2065 11.1183 12.5245 10.8839 12.7589C10.6495 12.9933 10.3315 13.125 10 13.125H3.125C2.79348 13.125 2.47554 12.9933 2.24112 12.7589C2.0067 12.5245 1.875 12.2065 1.875 11.875V5C1.875 4.66848 2.0067 4.35054 2.24112 4.11612C2.47554 3.8817 2.79348 3.75 3.125 3.75H6.875M9.375 1.875H13.125M13.125 1.875V5.625M13.125 1.875L6.25 8.75",
307
+ }, /*#__PURE__*/React.createElement("div", {
308
+ className: styles$l.shimmer
309
+ })), hasError && !fallbackSrc ? /*#__PURE__*/React.createElement("div", {
310
+ className: styles$l.errorState,
311
+ role: "img",
312
+ "aria-label": alt || "Image failed to load"
313
+ }, /*#__PURE__*/React.createElement("svg", {
314
+ xmlns: "http://www.w3.org/2000/svg",
315
+ viewBox: "0 0 24 24",
316
+ fill: "none",
272
317
  stroke: "currentColor",
273
318
  strokeWidth: "1.5",
274
319
  strokeLinecap: "round",
275
- strokeLinejoin: "round"
276
- }));
320
+ strokeLinejoin: "round",
321
+ className: styles$l.errorIcon,
322
+ "aria-hidden": "true"
323
+ }, /*#__PURE__*/React.createElement("rect", {
324
+ x: "3",
325
+ y: "3",
326
+ width: "18",
327
+ height: "18",
328
+ rx: "2",
329
+ ry: "2"
330
+ }), /*#__PURE__*/React.createElement("circle", {
331
+ cx: "8.5",
332
+ cy: "8.5",
333
+ r: "1.5"
334
+ }), /*#__PURE__*/React.createElement("polyline", {
335
+ points: "21 15 16 10 5 21"
336
+ })), /*#__PURE__*/React.createElement("span", {
337
+ className: styles$l.errorText
338
+ }, "Image unavailable")) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("img", _extends({
339
+ src: currentSrc
340
+ }, accessibilityProps, {
341
+ width: width,
342
+ height: height,
343
+ loading: loading,
344
+ decoding: decoding,
345
+ onLoad: handleLoad,
346
+ onError: handleError,
347
+ className: styles$l.image,
348
+ style: imageStyle,
349
+ srcSet: srcSet,
350
+ sizes: sizes
351
+ }))));
277
352
  };
278
353
 
354
+ var styles$k = {"carouselCard":"CarouselCard-module__carouselCard___7SltX","carouselCard__content":"CarouselCard-module__carouselCard__content___SEDzm","carouselCard__linkText":"CarouselCard-module__carouselCard__linkText___fe3NV","carouselCard__icon":"CarouselCard-module__carouselCard__icon___sQ26Z","carouselCard__imageWrapper":"CarouselCard-module__carouselCard__imageWrapper___i-uYe","carouselCard__title":"CarouselCard-module__carouselCard__title___PN7o3"};
355
+
356
+ const CarouselCard = ({
357
+ imageUrl,
358
+ imageAlt,
359
+ title,
360
+ linkText,
361
+ linkUrl,
362
+ className,
363
+ ariaLabel
364
+ }) => {
365
+ return /*#__PURE__*/React.createElement("a", {
366
+ href: linkUrl,
367
+ className: classNames(styles$k.carouselCard, className),
368
+ "aria-label": ariaLabel
369
+ }, /*#__PURE__*/React.createElement(Image, {
370
+ src: imageUrl,
371
+ alt: imageAlt,
372
+ className: styles$k.carouselCard__imageWrapper,
373
+ width: "100%",
374
+ height: "100%",
375
+ objectFit: "cover",
376
+ objectPosition: "center"
377
+ }), /*#__PURE__*/React.createElement("div", {
378
+ className: styles$k.carouselCard__content
379
+ }, /*#__PURE__*/React.createElement("h3", {
380
+ className: styles$k.carouselCard__title
381
+ }, title), /*#__PURE__*/React.createElement("span", {
382
+ className: styles$k.carouselCard__linkText
383
+ }, linkText, /*#__PURE__*/React.createElement("span", {
384
+ className: styles$k.carouselCard__icon,
385
+ "aria-hidden": "true"
386
+ }, /*#__PURE__*/React.createElement(FontAwesomeIcon, {
387
+ icon: faArrowRight
388
+ })))));
389
+ };
390
+
391
+ var styles$j = {"footer":"Footer-module__footer___Oavyx","footer--mobile":"Footer-module__footer--mobile___9HQC-","footer__container":"Footer-module__footer__container___ohvnm","footer__links":"Footer-module__footer__links___DdVK8","footer__linkGroup":"Footer-module__footer__linkGroup___1B7JA","footer__linkList":"Footer-module__footer__linkList___j-DWF","footer__linkHeading":"Footer-module__footer__linkHeading___LtE6X","footer__link":"Footer-module__footer__link___G5HPW","footer__cta":"Footer-module__footer__cta___MRJLr","footer__socialIcons":"Footer-module__footer__socialIcons___j0aRp","footer__socialIcon":"Footer-module__footer__socialIcon___1uVTm","footer__countrySelector":"Footer-module__footer__countrySelector___pVtN5","footer__bottom":"Footer-module__footer__bottom___77bPL","footer__bottomLeft":"Footer-module__footer__bottomLeft___tlst1","footer__bottomLinks":"Footer-module__footer__bottomLinks___s22h7","footer__bottomLink":"Footer-module__footer__bottomLink___SLzwY","footer__copyright":"Footer-module__footer__copyright___4bZOF","footer__brandSection":"Footer-module__footer__brandSection___BBr5f","footer__logo":"Footer-module__footer__logo___mv-9M","footer__leftCol":"Footer-module__footer__leftCol___vmKNN","footer__motto":"Footer-module__footer__motto___QtB2m","footer__main":"Footer-module__footer__main___NSU9d","footer__badge":"Footer-module__footer__badge___faejb","footer__badgeIcon":"Footer-module__footer__badgeIcon___xJ519","footer__badgeText":"Footer-module__footer__badgeText___imXgG","footer__linkText":"Footer-module__footer__linkText___Gc18Z","footer__linkIcon":"Footer-module__footer__linkIcon___IZzJM","footer__countrySelectorIcon":"Footer-module__footer__countrySelectorIcon___hhEd4"};
392
+
393
+ /**
394
+ * External link icon (↗) for footer links that open in new tabs
395
+ */
396
+ const ExternalLinkIcon = ({
397
+ className,
398
+ size = 15
399
+ }) => /*#__PURE__*/React.createElement("svg", {
400
+ width: size,
401
+ height: size,
402
+ viewBox: "0 0 15 15",
403
+ fill: "none",
404
+ xmlns: "http://www.w3.org/2000/svg",
405
+ className: className,
406
+ "aria-hidden": "true"
407
+ }, /*#__PURE__*/React.createElement("path", {
408
+ d: "M11.25 8.125V11.875C11.25 12.2065 11.1183 12.5245 10.8839 12.7589C10.6495 12.9933 10.3315 13.125 10 13.125H3.125C2.79348 13.125 2.47554 12.9933 2.24112 12.7589C2.0067 12.5245 1.875 12.2065 1.875 11.875V5C1.875 4.66848 2.0067 4.35054 2.24112 4.11612C2.47554 3.8817 2.79348 3.75 3.125 3.75H6.875M9.375 1.875H13.125M13.125 1.875V5.625M13.125 1.875L6.25 8.75",
409
+ stroke: "currentColor",
410
+ strokeWidth: "1.5",
411
+ strokeLinecap: "round",
412
+ strokeLinejoin: "round"
413
+ }));
414
+
279
415
  /**
280
416
  * Atlas Copco Group badge icon (square)
281
417
  */
282
- var AtlasCopcoIcon = function (_a) {
283
- var className = _a.className,
284
- _b = _a.size,
285
- size = _b === void 0 ? 14 : _b;
286
- return /*#__PURE__*/React.createElement("svg", {
287
- width: size,
288
- height: size,
289
- viewBox: "0 0 14 14",
290
- fill: "none",
291
- xmlns: "http://www.w3.org/2000/svg",
292
- className: className,
293
- "aria-hidden": "true"
294
- }, /*#__PURE__*/React.createElement("rect", {
295
- x: "0.5",
296
- y: "0.5",
297
- width: "13",
298
- height: "13",
299
- rx: "1.5",
300
- fill: "#D9D9D9",
301
- stroke: "#D9D9D9"
302
- }));
303
- };
418
+ const AtlasCopcoIcon = ({
419
+ className,
420
+ size = 14
421
+ }) => /*#__PURE__*/React.createElement("svg", {
422
+ width: size,
423
+ height: size,
424
+ viewBox: "0 0 14 14",
425
+ fill: "none",
426
+ xmlns: "http://www.w3.org/2000/svg",
427
+ className: className,
428
+ "aria-hidden": "true"
429
+ }, /*#__PURE__*/React.createElement("rect", {
430
+ x: "0.5",
431
+ y: "0.5",
432
+ width: "13",
433
+ height: "13",
434
+ rx: "1.5",
435
+ fill: "#D9D9D9",
436
+ stroke: "#D9D9D9"
437
+ }));
438
+
439
+ // =============================================================================
440
+ // TYPE DEFINITIONS
441
+ // =============================================================================
304
442
 
305
443
  // =============================================================================
306
444
  // SOCIAL ICON COMPONENT
307
445
  // =============================================================================
308
- var SocialIconComponent = function (_a) {
309
- var platform = _a.platform;
310
- var iconMap = {
446
+
447
+ const SocialIconComponent = ({
448
+ platform
449
+ }) => {
450
+ const iconMap = {
311
451
  facebook: faFacebookF,
312
452
  x: faXTwitter,
313
453
  linkedin: faLinkedinIn,
@@ -318,14 +458,19 @@ var SocialIconComponent = function (_a) {
318
458
  icon: iconMap[platform]
319
459
  });
320
460
  };
321
- var FooterLink = function (_a) {
322
- var item = _a.item,
323
- className = _a.className,
324
- _b = _a.variant,
325
- variant = _b === void 0 ? 'default' : _b;
326
- var baseClass = variant === 'bottom' ? styles$k.footer__bottomLink : styles$k.footer__link;
327
- var linkClasses = classNames(baseClass, className);
328
- var handleClick = function (e) {
461
+
462
+ // =============================================================================
463
+ // FOOTER LINK COMPONENT
464
+ // =============================================================================
465
+
466
+ const FooterLink = ({
467
+ item,
468
+ className,
469
+ variant = 'default'
470
+ }) => {
471
+ const baseClass = variant === 'bottom' ? styles$j.footer__bottomLink : styles$j.footer__link;
472
+ const linkClasses = classNames(baseClass, className);
473
+ const handleClick = e => {
329
474
  if (item.onClick) {
330
475
  e.preventDefault();
331
476
  item.onClick();
@@ -339,151 +484,169 @@ var FooterLink = function (_a) {
339
484
  target: '_blank',
340
485
  rel: 'noopener noreferrer'
341
486
  }), /*#__PURE__*/React.createElement("span", {
342
- className: styles$k.footer__linkText
487
+ className: styles$j.footer__linkText
343
488
  }, item.label), item.external && /*#__PURE__*/React.createElement("span", {
344
- className: styles$k.footer__linkIcon
489
+ className: styles$j.footer__linkIcon
345
490
  }, /*#__PURE__*/React.createElement(ExternalLinkIcon, {
346
491
  size: 15
347
492
  })));
348
493
  };
349
- var FooterLinkGroup = function (_a) {
350
- var heading = _a.heading,
351
- links = _a.links,
352
- className = _a.className,
353
- children = _a.children;
494
+
495
+ // =============================================================================
496
+ // FOOTER LINK GROUP COMPONENT
497
+ // =============================================================================
498
+
499
+ const FooterLinkGroup = ({
500
+ heading,
501
+ links,
502
+ className,
503
+ children
504
+ }) => {
354
505
  return /*#__PURE__*/React.createElement("div", {
355
- className: classNames(styles$k.footer__linkGroup, className)
506
+ className: classNames(styles$j.footer__linkGroup, className)
356
507
  }, /*#__PURE__*/React.createElement("h3", {
357
- className: styles$k.footer__linkHeading
508
+ className: styles$j.footer__linkHeading
358
509
  }, heading), /*#__PURE__*/React.createElement("ul", {
359
- className: styles$k.footer__linkList
360
- }, links.map(function (link, index) {
361
- return /*#__PURE__*/React.createElement("li", {
362
- key: index
363
- }, /*#__PURE__*/React.createElement(FooterLink, {
364
- item: link
365
- }));
366
- })), children);
510
+ className: styles$j.footer__linkList
511
+ }, links.map((link, index) => /*#__PURE__*/React.createElement("li", {
512
+ key: index
513
+ }, /*#__PURE__*/React.createElement(FooterLink, {
514
+ item: link
515
+ })))), children);
367
516
  };
368
- var FooterSocialIcons = function (_a) {
369
- var links = _a.links,
370
- className = _a.className;
517
+
518
+ // =============================================================================
519
+ // FOOTER SOCIAL ICONS COMPONENT
520
+ // =============================================================================
521
+
522
+ const FooterSocialIcons = ({
523
+ links,
524
+ className
525
+ }) => {
371
526
  return /*#__PURE__*/React.createElement("div", {
372
- className: classNames(styles$k.footer__socialIcons, className)
373
- }, links.map(function (link, index) {
374
- return /*#__PURE__*/React.createElement("a", {
375
- key: index,
376
- href: link.href,
377
- className: styles$k.footer__socialIcon,
378
- "aria-label": link.ariaLabel,
379
- target: "_blank",
380
- rel: "noopener noreferrer"
381
- }, /*#__PURE__*/React.createElement(SocialIconComponent, {
382
- platform: link.platform
383
- }));
384
- }));
527
+ className: classNames(styles$j.footer__socialIcons, className)
528
+ }, links.map((link, index) => /*#__PURE__*/React.createElement("a", {
529
+ key: index,
530
+ href: link.href,
531
+ className: styles$j.footer__socialIcon,
532
+ "aria-label": link.ariaLabel,
533
+ target: "_blank",
534
+ rel: "noopener noreferrer"
535
+ }, /*#__PURE__*/React.createElement(SocialIconComponent, {
536
+ platform: link.platform
537
+ }))));
385
538
  };
386
- var FooterSocialIcon = function (_a) {
387
- var platform = _a.platform,
388
- className = _a.className;
389
- var iconClasses = classNames(styles$k.footer__socialIcon, className);
539
+
540
+ // =============================================================================
541
+ // FOOTER SOCIAL ICON (STANDALONE) COMPONENT
542
+ // =============================================================================
543
+
544
+ const FooterSocialIcon = ({
545
+ platform,
546
+ className
547
+ }) => {
548
+ const iconClasses = classNames(styles$j.footer__socialIcon, className);
390
549
  return /*#__PURE__*/React.createElement("span", {
391
550
  className: iconClasses
392
551
  }, /*#__PURE__*/React.createElement(SocialIconComponent, {
393
552
  platform: platform
394
553
  }));
395
554
  };
396
- var FooterBottom = function (_a) {
397
- var links = _a.links,
398
- copyright = _a.copyright,
399
- countrySelector = _a.countrySelector,
400
- className = _a.className;
555
+
556
+ // =============================================================================
557
+ // FOOTER BOTTOM COMPONENT
558
+ // =============================================================================
559
+
560
+ const FooterBottom = ({
561
+ links,
562
+ copyright,
563
+ countrySelector,
564
+ className
565
+ }) => {
401
566
  return /*#__PURE__*/React.createElement("div", {
402
- className: classNames(styles$k.footer__bottom, className)
567
+ className: classNames(styles$j.footer__bottom, className)
403
568
  }, /*#__PURE__*/React.createElement("div", {
404
- className: styles$k.footer__bottomLeft
569
+ className: styles$j.footer__bottomLeft
405
570
  }, /*#__PURE__*/React.createElement("div", {
406
- className: styles$k.footer__bottomLinks
407
- }, links.map(function (link, index) {
408
- return /*#__PURE__*/React.createElement(FooterLink, {
409
- key: index,
410
- item: link,
411
- variant: "bottom"
412
- });
413
- })), /*#__PURE__*/React.createElement("p", {
414
- className: styles$k.footer__copyright
571
+ className: styles$j.footer__bottomLinks
572
+ }, links.map((link, index) => /*#__PURE__*/React.createElement(FooterLink, {
573
+ key: index,
574
+ item: link,
575
+ variant: "bottom"
576
+ }))), /*#__PURE__*/React.createElement("p", {
577
+ className: styles$j.footer__copyright
415
578
  }, copyright)), countrySelector && /*#__PURE__*/React.createElement("a", {
416
579
  href: countrySelector.href || '#',
417
- className: styles$k.footer__countrySelector
580
+ className: styles$j.footer__countrySelector
418
581
  }, countrySelector.showIcon !== false && /*#__PURE__*/React.createElement("span", {
419
- className: styles$k.footer__countrySelectorIcon
582
+ className: styles$j.footer__countrySelectorIcon
420
583
  }, /*#__PURE__*/React.createElement(FontAwesomeIcon, {
421
584
  icon: faGlobe
422
585
  })), countrySelector.label));
423
586
  };
587
+
424
588
  // =============================================================================
425
589
  // MAIN FOOTER COMPONENT
426
590
  // =============================================================================
591
+
427
592
  /**
428
593
  * Footer component with brand identity, navigation links, social icons, and legal information.
429
594
  * Supports two layout variants:
430
595
  * - desktop: Logo at top, 3-column main content
431
596
  * - mobile: Logo at bottom, stacked layout with CTA button
432
597
  */
433
- var Footer = function (_a) {
434
- var _b = _a.variant,
435
- variant = _b === void 0 ? 'desktop' : _b,
436
- logo = _a.logo,
437
- motto = _a.motto,
438
- atlasCopcoBadge = _a.atlasCopcoBadge,
439
- quickLinks = _a.quickLinks,
440
- _c = _a.quickLinksHeading,
441
- quickLinksHeading = _c === void 0 ? 'Quick links' : _c,
442
- contactLinks = _a.contactLinks,
443
- _d = _a.contactHeading,
444
- contactHeading = _d === void 0 ? 'Contact us' : _d,
445
- socialLinks = _a.socialLinks,
446
- contactFormButton = _a.contactFormButton,
447
- bottomLinks = _a.bottomLinks,
448
- copyright = _a.copyright,
449
- countrySelector = _a.countrySelector,
450
- className = _a.className;
451
- var isMobile = variant === 'mobile';
452
- var footerClasses = classNames(styles$k.footer, isMobile && styles$k['footer--mobile'], className);
453
- var LogoWrapper = logo.href ? 'a' : 'div';
454
- var logoProps = logo.href ? {
598
+ const Footer = ({
599
+ variant = 'desktop',
600
+ logo,
601
+ motto,
602
+ atlasCopcoBadge,
603
+ quickLinks,
604
+ quickLinksHeading = 'Quick links',
605
+ contactLinks,
606
+ contactHeading = 'Contact us',
607
+ socialLinks,
608
+ contactFormButton,
609
+ bottomLinks,
610
+ copyright,
611
+ countrySelector,
612
+ className
613
+ }) => {
614
+ const isMobile = variant === 'mobile';
615
+ const footerClasses = classNames(styles$j.footer, isMobile && styles$j['footer--mobile'], className);
616
+ const LogoWrapper = logo.href ? 'a' : 'div';
617
+ const logoProps = logo.href ? {
455
618
  href: logo.href,
456
- className: styles$k.footer__logo
619
+ className: styles$j.footer__logo
457
620
  } : {
458
- className: styles$k.footer__logo
621
+ className: styles$j.footer__logo
459
622
  };
623
+
460
624
  // Logo + Motto + Badge component (used in both layouts)
461
- var LogoSection = function () {
462
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LogoWrapper, logoProps, /*#__PURE__*/React.createElement("img", {
463
- src: logo.src,
464
- alt: logo.alt
465
- })), /*#__PURE__*/React.createElement("div", {
466
- className: styles$k.footer__leftCol
467
- }, /*#__PURE__*/React.createElement("h2", {
468
- className: styles$k.footer__motto
469
- }, motto), atlasCopcoBadge && /*#__PURE__*/React.createElement("div", {
470
- className: styles$k.footer__badge
471
- }, atlasCopcoBadge.showIcon !== false && /*#__PURE__*/React.createElement("span", {
472
- className: styles$k.footer__badgeIcon
473
- }, /*#__PURE__*/React.createElement(AtlasCopcoIcon, {
474
- size: 14
475
- })), /*#__PURE__*/React.createElement("span", {
476
- className: styles$k.footer__badgeText
477
- }, atlasCopcoBadge.text))));
478
- };
625
+ const LogoSection = () => /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LogoWrapper, logoProps, /*#__PURE__*/React.createElement("img", {
626
+ src: logo.src,
627
+ alt: logo.alt
628
+ })), /*#__PURE__*/React.createElement("div", {
629
+ className: styles$j.footer__leftCol
630
+ }, /*#__PURE__*/React.createElement("h2", {
631
+ className: styles$j.footer__motto
632
+ }, motto), atlasCopcoBadge && /*#__PURE__*/React.createElement("div", {
633
+ className: styles$j.footer__badge
634
+ }, atlasCopcoBadge.showIcon !== false && /*#__PURE__*/React.createElement("span", {
635
+ className: styles$j.footer__badgeIcon
636
+ }, /*#__PURE__*/React.createElement(AtlasCopcoIcon, {
637
+ size: 14
638
+ })), /*#__PURE__*/React.createElement("span", {
639
+ className: styles$j.footer__badgeText
640
+ }, atlasCopcoBadge.text))));
641
+
479
642
  // Mobile layout: Links at top, logo/motto at bottom
480
643
  if (isMobile) {
481
644
  return /*#__PURE__*/React.createElement("footer", {
482
645
  className: footerClasses
483
646
  }, /*#__PURE__*/React.createElement("div", {
484
- className: styles$k.footer__container
647
+ className: styles$j.footer__container
485
648
  }, /*#__PURE__*/React.createElement("div", {
486
- className: styles$k.footer__links
649
+ className: styles$j.footer__links
487
650
  }, /*#__PURE__*/React.createElement(FooterLinkGroup, {
488
651
  heading: quickLinksHeading,
489
652
  links: quickLinks
@@ -491,7 +654,7 @@ var Footer = function (_a) {
491
654
  heading: contactHeading,
492
655
  links: contactLinks
493
656
  })), contactFormButton && /*#__PURE__*/React.createElement("div", {
494
- className: styles$k.footer__cta
657
+ className: styles$j.footer__cta
495
658
  }, /*#__PURE__*/React.createElement("a", {
496
659
  href: contactFormButton.href,
497
660
  style: {
@@ -510,33 +673,34 @@ var Footer = function (_a) {
510
673
  copyright: copyright,
511
674
  countrySelector: countrySelector
512
675
  }), /*#__PURE__*/React.createElement("div", {
513
- className: styles$k.footer__brandSection
676
+ className: styles$j.footer__brandSection
514
677
  }, /*#__PURE__*/React.createElement(LogoSection, null))));
515
678
  }
679
+
516
680
  // Desktop layout: Logo at top, 3-column main content
517
681
  return /*#__PURE__*/React.createElement("footer", {
518
682
  className: footerClasses
519
683
  }, /*#__PURE__*/React.createElement("div", {
520
- className: styles$k.footer__container
684
+ className: styles$j.footer__container
521
685
  }, /*#__PURE__*/React.createElement(LogoWrapper, logoProps, /*#__PURE__*/React.createElement("img", {
522
686
  src: logo.src,
523
687
  alt: logo.alt
524
688
  })), /*#__PURE__*/React.createElement("div", {
525
- className: styles$k.footer__main
689
+ className: styles$j.footer__main
526
690
  }, /*#__PURE__*/React.createElement("div", {
527
- className: styles$k.footer__leftCol
691
+ className: styles$j.footer__leftCol
528
692
  }, /*#__PURE__*/React.createElement("h2", {
529
- className: styles$k.footer__motto
693
+ className: styles$j.footer__motto
530
694
  }, motto), atlasCopcoBadge && /*#__PURE__*/React.createElement("div", {
531
- className: styles$k.footer__badge
695
+ className: styles$j.footer__badge
532
696
  }, atlasCopcoBadge.showIcon !== false && /*#__PURE__*/React.createElement("span", {
533
- className: styles$k.footer__badgeIcon
697
+ className: styles$j.footer__badgeIcon
534
698
  }, /*#__PURE__*/React.createElement(AtlasCopcoIcon, {
535
699
  size: 14
536
700
  })), /*#__PURE__*/React.createElement("span", {
537
- className: styles$k.footer__badgeText
701
+ className: styles$j.footer__badgeText
538
702
  }, atlasCopcoBadge.text))), /*#__PURE__*/React.createElement("div", {
539
- className: styles$k.footer__links
703
+ className: styles$j.footer__links
540
704
  }, /*#__PURE__*/React.createElement(FooterLinkGroup, {
541
705
  heading: quickLinksHeading,
542
706
  links: quickLinks
@@ -552,46 +716,48 @@ var Footer = function (_a) {
552
716
  })));
553
717
  };
554
718
 
555
- var styles$j = {"pagination":"Pagination-module__pagination___Kih79","dividerLine":"Pagination-module__dividerLine___85LAX","paginationList":"Pagination-module__paginationList___-lZpm","paginationItem":"Pagination-module__paginationItem___VsGFa","pageButton":"Pagination-module__pageButton___b6UNF","pageButtonActive":"Pagination-module__pageButtonActive___D9m18","navButton":"Pagination-module__navButton___ZCIai","navButtonDisabled":"Pagination-module__navButtonDisabled___IZK8H","navIcon":"Pagination-module__navIcon___-BVJ3","ellipsis":"Pagination-module__ellipsis___iAsGN","ellipsisText":"Pagination-module__ellipsisText___fd6u1"};
719
+ var styles$i = {"pagination":"Pagination-module__pagination___Kih79","dividerLine":"Pagination-module__dividerLine___85LAX","paginationList":"Pagination-module__paginationList___-lZpm","paginationItem":"Pagination-module__paginationItem___VsGFa","pageButton":"Pagination-module__pageButton___b6UNF","pageButtonActive":"Pagination-module__pageButtonActive___D9m18","navButton":"Pagination-module__navButton___ZCIai","navButtonDisabled":"Pagination-module__navButtonDisabled___IZK8H","navIcon":"Pagination-module__navIcon___-BVJ3","ellipsis":"Pagination-module__ellipsis___iAsGN","ellipsisText":"Pagination-module__ellipsisText___fd6u1"};
556
720
 
557
- var PaginationItem = function (_a) {
558
- var page = _a.page,
559
- isActive = _a.isActive,
560
- onClick = _a.onClick,
561
- className = _a.className;
562
- var handleClick = function () {
721
+ const PaginationItem = ({
722
+ page,
723
+ isActive,
724
+ onClick,
725
+ className
726
+ }) => {
727
+ const handleClick = () => {
563
728
  if (!isActive) {
564
729
  onClick(page);
565
730
  }
566
731
  };
567
- var handleKeyDown = function (event) {
732
+ const handleKeyDown = event => {
568
733
  if (event.key === "Enter" || event.key === " ") {
569
734
  event.preventDefault();
570
735
  handleClick();
571
736
  }
572
737
  };
573
738
  return /*#__PURE__*/React.createElement("li", {
574
- className: styles$j.paginationItem
739
+ className: styles$i.paginationItem
575
740
  }, /*#__PURE__*/React.createElement("button", {
576
741
  type: "button",
577
742
  onClick: handleClick,
578
743
  onKeyDown: handleKeyDown,
579
- className: "".concat(styles$j.pageButton, " ").concat(isActive ? styles$j.pageButtonActive : "", " ").concat(className || ""),
744
+ className: `${styles$i.pageButton} ${isActive ? styles$i.pageButtonActive : ""} ${className || ""}`,
580
745
  "aria-current": isActive ? "page" : undefined,
581
- "aria-label": "Page ".concat(page),
746
+ "aria-label": `Page ${page}`,
582
747
  disabled: isActive,
583
748
  tabIndex: isActive ? -1 : 0
584
749
  }, page));
585
750
  };
586
751
 
587
- var PaginationButton = function (_a) {
588
- var label = _a.label,
589
- disabled = _a.disabled,
590
- onClick = _a.onClick,
591
- direction = _a.direction,
592
- className = _a.className,
593
- ariaLabel = _a.ariaLabel;
594
- var handleKeyDown = function (event) {
752
+ const PaginationButton = ({
753
+ label,
754
+ disabled,
755
+ onClick,
756
+ direction,
757
+ className,
758
+ ariaLabel
759
+ }) => {
760
+ const handleKeyDown = event => {
595
761
  if (event.key === "Enter" || event.key === " ") {
596
762
  event.preventDefault();
597
763
  if (!disabled) {
@@ -600,130 +766,130 @@ var PaginationButton = function (_a) {
600
766
  }
601
767
  };
602
768
  return /*#__PURE__*/React.createElement("li", {
603
- className: styles$j.paginationItem
769
+ className: styles$i.paginationItem
604
770
  }, /*#__PURE__*/React.createElement("button", {
605
771
  type: "button",
606
772
  onClick: onClick,
607
773
  onKeyDown: handleKeyDown,
608
774
  disabled: disabled,
609
- className: "".concat(styles$j.navButton, " ").concat(styles$j["navButton--".concat(direction)], " ").concat(disabled ? styles$j.navButtonDisabled : "", " ").concat(className || ""),
775
+ className: `${styles$i.navButton} ${styles$i[`navButton--${direction}`]} ${disabled ? styles$i.navButtonDisabled : ""} ${className || ""}`,
610
776
  "aria-label": ariaLabel || label,
611
777
  tabIndex: disabled ? -1 : 0
612
778
  }, /*#__PURE__*/React.createElement("span", null, label), direction === "next" && /*#__PURE__*/React.createElement(FontAwesomeIcon, {
613
779
  icon: faChevronRight$1,
614
- className: styles$j.navIcon,
780
+ className: styles$i.navIcon,
615
781
  "aria-hidden": "true"
616
782
  })));
617
783
  };
618
784
 
619
- var PaginationEllipsis = function (_a) {
620
- var className = _a.className;
785
+ const PaginationEllipsis = ({
786
+ className
787
+ }) => {
621
788
  return /*#__PURE__*/React.createElement("li", {
622
- className: "".concat(styles$j.paginationItem, " ").concat(styles$j.ellipsis),
789
+ className: `${styles$i.paginationItem} ${styles$i.ellipsis}`,
623
790
  "aria-hidden": "true"
624
791
  }, /*#__PURE__*/React.createElement("span", {
625
- className: "".concat(styles$j.ellipsisText, " ").concat(className || "")
792
+ className: `${styles$i.ellipsisText} ${className || ""}`
626
793
  }, "..."));
627
794
  };
628
795
 
629
796
  /**
630
797
  * Generate page numbers to display with ellipsis logic
631
798
  */
632
- var generatePageNumbers = function (currentPage, totalPages, maxVisiblePages) {
799
+ const generatePageNumbers = (currentPage, totalPages, maxVisiblePages) => {
633
800
  if (totalPages <= maxVisiblePages) {
634
801
  return Array.from({
635
802
  length: totalPages
636
- }, function (_, i) {
637
- return i + 1;
638
- });
803
+ }, (_, i) => i + 1);
639
804
  }
640
- var pages = [];
641
- var halfVisible = Math.floor(maxVisiblePages / 2);
805
+ const pages = [];
806
+ const halfVisible = Math.floor(maxVisiblePages / 2);
807
+
642
808
  // Always show first page
643
809
  pages.push(1);
644
- var startPage = Math.max(2, currentPage - halfVisible);
645
- var endPage = Math.min(totalPages - 1, currentPage + halfVisible);
810
+ let startPage = Math.max(2, currentPage - halfVisible);
811
+ let endPage = Math.min(totalPages - 1, currentPage + halfVisible);
812
+
646
813
  // Adjust if we're near the start
647
814
  if (currentPage <= halfVisible + 1) {
648
815
  endPage = Math.min(maxVisiblePages - 1, totalPages - 1);
649
816
  startPage = 2;
650
817
  }
818
+
651
819
  // Adjust if we're near the end
652
820
  if (currentPage >= totalPages - halfVisible) {
653
821
  startPage = Math.max(2, totalPages - maxVisiblePages + 2);
654
822
  endPage = totalPages - 1;
655
823
  }
824
+
656
825
  // Add ellipsis after first page if needed
657
826
  if (startPage > 2) {
658
827
  pages.push("ellipsis-start");
659
828
  }
829
+
660
830
  // Add middle pages
661
- for (var i = startPage; i <= endPage; i++) {
831
+ for (let i = startPage; i <= endPage; i++) {
662
832
  pages.push(i);
663
833
  }
834
+
664
835
  // Add ellipsis before last page if needed
665
836
  if (endPage < totalPages - 1) {
666
837
  pages.push("ellipsis-end");
667
838
  }
839
+
668
840
  // Always show last page
669
841
  if (totalPages > 1) {
670
842
  pages.push(totalPages);
671
843
  }
672
844
  return pages;
673
845
  };
674
- var Pagination = function (_a) {
675
- var currentPage = _a.currentPage,
676
- totalPages = _a.totalPages,
677
- onPageChange = _a.onPageChange,
678
- _b = _a.maxVisiblePages,
679
- maxVisiblePages = _b === void 0 ? 10 : _b,
680
- _c = _a.showPrevious,
681
- showPrevious = _c === void 0 ? true : _c,
682
- _d = _a.showNext,
683
- showNext = _d === void 0 ? true : _d,
684
- _e = _a.previousLabel,
685
- previousLabel = _e === void 0 ? "Previous" : _e,
686
- _f = _a.nextLabel,
687
- nextLabel = _f === void 0 ? "Next" : _f,
688
- className = _a.className,
689
- _g = _a.ariaLabel,
690
- ariaLabel = _g === void 0 ? "Pagination" : _g;
691
- var pageNumbers = useMemo(function () {
692
- return generatePageNumbers(currentPage, totalPages, maxVisiblePages);
693
- }, [currentPage, totalPages, maxVisiblePages]);
694
- var handlePageChange = function (page) {
846
+ const Pagination = ({
847
+ currentPage,
848
+ totalPages,
849
+ onPageChange,
850
+ maxVisiblePages = 10,
851
+ showPrevious = true,
852
+ showNext = true,
853
+ previousLabel = "Previous",
854
+ nextLabel = "Next",
855
+ className,
856
+ ariaLabel = "Pagination"
857
+ }) => {
858
+ const pageNumbers = useMemo(() => generatePageNumbers(currentPage, totalPages, maxVisiblePages), [currentPage, totalPages, maxVisiblePages]);
859
+ const handlePageChange = page => {
695
860
  if (page >= 1 && page <= totalPages && page !== currentPage) {
696
861
  onPageChange(page);
697
862
  }
698
863
  };
699
- var handlePrevious = function () {
864
+ const handlePrevious = () => {
700
865
  handlePageChange(currentPage - 1);
701
866
  };
702
- var handleNext = function () {
867
+ const handleNext = () => {
703
868
  handlePageChange(currentPage + 1);
704
869
  };
870
+
705
871
  // Don't render if there's only one page or no pages
706
872
  if (totalPages <= 1) {
707
873
  return null;
708
874
  }
709
875
  return /*#__PURE__*/React.createElement("nav", {
710
- className: "".concat(styles$j.pagination, " ").concat(className || ""),
876
+ className: `${styles$i.pagination} ${className || ""}`,
711
877
  "aria-label": ariaLabel,
712
878
  role: "navigation"
713
879
  }, /*#__PURE__*/React.createElement("div", {
714
- className: styles$j.dividerLine
880
+ className: styles$i.dividerLine
715
881
  }), /*#__PURE__*/React.createElement("ul", {
716
- className: styles$j.paginationList
882
+ className: styles$i.paginationList
717
883
  }, showPrevious && /*#__PURE__*/React.createElement(PaginationButton, {
718
884
  label: previousLabel,
719
885
  disabled: currentPage === 1,
720
886
  onClick: handlePrevious,
721
887
  direction: "previous",
722
888
  ariaLabel: "Go to previous page"
723
- }), pageNumbers.map(function (page, index) {
889
+ }), pageNumbers.map((page, index) => {
724
890
  if (page === "ellipsis-start" || page === "ellipsis-end") {
725
891
  return /*#__PURE__*/React.createElement(PaginationEllipsis, {
726
- key: "ellipsis-".concat(index)
892
+ key: `ellipsis-${index}`
727
893
  });
728
894
  }
729
895
  return /*#__PURE__*/React.createElement(PaginationItem, {
@@ -741,130 +907,7 @@ var Pagination = function (_a) {
741
907
  })));
742
908
  };
743
909
 
744
- var styles$i = {"productCard":"ProductCardHorizontal-module__productCard___Nl4jK","productWrapper":"ProductCardHorizontal-module__productWrapper___gs8fn","withImage":"ProductCardHorizontal-module__withImage___pPFw2","withPlaceholder":"ProductCardHorizontal-module__withPlaceholder___x8IUh","productTitle":"ProductCardHorizontal-module__productTitle___xBuu7","productPrice":"ProductCardHorizontal-module__productPrice___lf32A","productImage":"ProductCardHorizontal-module__productImage___sQsUO","placeholderImage":"ProductCardHorizontal-module__placeholderImage___kT1sp","productId":"ProductCardHorizontal-module__productId___3oOQV","productTitleDescriptionWrapper":"ProductCardHorizontal-module__productTitleDescriptionWrapper___Obv-j","productPriceCtaWrapper":"ProductCardHorizontal-module__productPriceCtaWrapper___Npkfl","productArrowIcon":"ProductCardHorizontal-module__productArrowIcon___1-A76"};
745
-
746
- var styles$h = {"imageContainer":"Image-module__imageContainer___iD5Kd","loading":"Image-module__loading___Sh1zO","image":"Image-module__image___1pa50","error":"Image-module__error___0LGZ2","skeleton":"Image-module__skeleton___0bGS6","shimmer":"Image-module__shimmer___aanrl","errorState":"Image-module__errorState___TjV-8","errorIcon":"Image-module__errorIcon___QCKvj","errorText":"Image-module__errorText___Q8pnb"};
747
-
748
- var Image = function (_a) {
749
- var src = _a.src,
750
- alt = _a.alt,
751
- width = _a.width,
752
- height = _a.height,
753
- _b = _a.loading,
754
- loading = _b === void 0 ? "lazy" : _b,
755
- _c = _a.decoding,
756
- decoding = _c === void 0 ? "async" : _c,
757
- _d = _a.objectFit,
758
- objectFit = _d === void 0 ? "cover" : _d,
759
- _e = _a.objectPosition,
760
- objectPosition = _e === void 0 ? "center" : _e,
761
- aspectRatio = _a.aspectRatio,
762
- _f = _a.isDecorative,
763
- isDecorative = _f === void 0 ? false : _f,
764
- fallbackSrc = _a.fallbackSrc,
765
- onLoad = _a.onLoad,
766
- onError = _a.onError,
767
- _g = _a.className,
768
- className = _g === void 0 ? "" : _g,
769
- srcSet = _a.srcSet,
770
- sizes = _a.sizes;
771
- var _h = useState(true),
772
- isLoading = _h[0],
773
- setIsLoading = _h[1];
774
- var _j = useState(false),
775
- hasError = _j[0],
776
- setHasError = _j[1];
777
- var _k = useState(src),
778
- currentSrc = _k[0],
779
- setCurrentSrc = _k[1];
780
- var handleLoad = useCallback(function () {
781
- setIsLoading(false);
782
- setHasError(false);
783
- onLoad === null || onLoad === void 0 ? void 0 : onLoad();
784
- }, [onLoad]);
785
- var handleError = useCallback(function () {
786
- setIsLoading(false);
787
- setHasError(true);
788
- // Try fallback if available and not already using it
789
- if (fallbackSrc && currentSrc !== fallbackSrc) {
790
- setCurrentSrc(fallbackSrc);
791
- setHasError(false);
792
- setIsLoading(true);
793
- } else {
794
- onError === null || onError === void 0 ? void 0 : onError();
795
- }
796
- }, [fallbackSrc, currentSrc, onError]);
797
- // Accessibility: decorative images should have empty alt and be hidden from screen readers
798
- var accessibilityProps = isDecorative ? {
799
- alt: "",
800
- "aria-hidden": true,
801
- role: "presentation"
802
- } : {
803
- alt: alt
804
- };
805
- var containerStyle = __assign(__assign(__assign({}, aspectRatio && {
806
- aspectRatio: aspectRatio
807
- }), width && {
808
- width: typeof width === "number" ? "".concat(width, "px") : width
809
- }), height && {
810
- height: typeof height === "number" ? "".concat(height, "px") : height
811
- });
812
- var imageStyle = {
813
- objectFit: objectFit,
814
- objectPosition: objectPosition
815
- };
816
- return /*#__PURE__*/React.createElement("div", {
817
- className: "".concat(styles$h.imageContainer, " ").concat(className, " ").concat(isLoading ? styles$h.loading : "", " ").concat(hasError ? styles$h.error : ""),
818
- style: containerStyle
819
- }, isLoading && /*#__PURE__*/React.createElement("div", {
820
- className: styles$h.skeleton,
821
- "aria-hidden": "true"
822
- }, /*#__PURE__*/React.createElement("div", {
823
- className: styles$h.shimmer
824
- })), hasError && !fallbackSrc ? /*#__PURE__*/React.createElement("div", {
825
- className: styles$h.errorState,
826
- role: "img",
827
- "aria-label": alt || "Image failed to load"
828
- }, /*#__PURE__*/React.createElement("svg", {
829
- xmlns: "http://www.w3.org/2000/svg",
830
- viewBox: "0 0 24 24",
831
- fill: "none",
832
- stroke: "currentColor",
833
- strokeWidth: "1.5",
834
- strokeLinecap: "round",
835
- strokeLinejoin: "round",
836
- className: styles$h.errorIcon,
837
- "aria-hidden": "true"
838
- }, /*#__PURE__*/React.createElement("rect", {
839
- x: "3",
840
- y: "3",
841
- width: "18",
842
- height: "18",
843
- rx: "2",
844
- ry: "2"
845
- }), /*#__PURE__*/React.createElement("circle", {
846
- cx: "8.5",
847
- cy: "8.5",
848
- r: "1.5"
849
- }), /*#__PURE__*/React.createElement("polyline", {
850
- points: "21 15 16 10 5 21"
851
- })), /*#__PURE__*/React.createElement("span", {
852
- className: styles$h.errorText
853
- }, "Image unavailable")) : /*#__PURE__*/React.createElement("img", _extends({
854
- src: currentSrc
855
- }, accessibilityProps, {
856
- width: width,
857
- height: height,
858
- loading: loading,
859
- decoding: decoding,
860
- onLoad: handleLoad,
861
- onError: handleError,
862
- className: styles$h.image,
863
- style: imageStyle,
864
- srcSet: srcSet,
865
- sizes: sizes
866
- })));
867
- };
910
+ var styles$h = {"productCard":"ProductCardHorizontal-module__productCard___Nl4jK","productWrapper":"ProductCardHorizontal-module__productWrapper___gs8fn","withImage":"ProductCardHorizontal-module__withImage___pPFw2","withPlaceholder":"ProductCardHorizontal-module__withPlaceholder___x8IUh","productTitle":"ProductCardHorizontal-module__productTitle___xBuu7","productPrice":"ProductCardHorizontal-module__productPrice___lf32A","productImage":"ProductCardHorizontal-module__productImage___sQsUO","placeholderImage":"ProductCardHorizontal-module__placeholderImage___kT1sp","productId":"ProductCardHorizontal-module__productId___3oOQV","productTitleDescriptionWrapper":"ProductCardHorizontal-module__productTitleDescriptionWrapper___Obv-j","productPriceCtaWrapper":"ProductCardHorizontal-module__productPriceCtaWrapper___Npkfl","productArrowIcon":"ProductCardHorizontal-module__productArrowIcon___1-A76"};
868
911
 
869
912
  /*!
870
913
  * Font Awesome Pro 6.7.2 by @fontawesome - https://fontawesome.com
@@ -877,89 +920,87 @@ const faArrowUpRight = {
877
920
  icon: [384, 512, [], "e09f", "M328 96c13.3 0 24 10.7 24 24l0 240c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-182.1L73 409c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l231-231L88 144c-13.3 0-24-10.7-24-24s10.7-24 24-24l240 0z"]
878
921
  };
879
922
 
880
- var PLACEHOLDER_INDICATOR = "?placeholder-storybook";
881
- var PLACEHOLDER_SVG = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"440\" height=\"133\" viewBox=\"218.446 219.139 440 133\" role=\"img\" aria-label=\"Leybold placeholder logo\"><g fill=\"#ffff\"><path d=\"M290.317,313.442h37.784v12.782h-53.654v-70.62h15.87V313.442z\"/><path d=\"M386.309,310.883c-3.912,12.593-15.135,16.722-24.761,16.722c-15.878,0-28.046-7.084-28.046-28.62c0-6.296,2.322-26.458,26.98-26.458c11.116,0,26.457,4.917,26.457,28.819v2.457h-38.626c0.428,3.935,1.274,12.785,13.232,12.785c4.125,0,8.356-1.965,9.521-5.704L386.309,310.883L386.309,310.883z M371.709,294.852c-0.85-8.456-6.666-11.017-11.434-11.017c-6.979,0-10.686,4.129-11.532,11.017H371.709z\"/><path d=\"M423.556,325.343c-6.986,19.374-8.892,21.932-21.799,21.932c-2.014,0-4.553-0.096-6.665-0.194v-11.02c0.629,0.104,1.582,0.197,2.854,0.197c5.397,0,8.36-0.688,9.737-7.864l-20.741-54.488h16.508l12.062,38.553h0.209l11.539-38.553h15.658L423.556,325.343z\"/><path d=\"M463.54,280.689h0.213c2.328-3.344,6.775-8.164,16.297-8.164c12.385,0,23.389,8.854,23.389,26.949c0,14.359-6.98,28.129-23.703,28.129c-6.141,0-12.701-2.067-16.299-7.968h-0.211v6.589h-14.498v-70.62h14.812V280.689z M475.604,284.427c-10.158,0-12.701,8.455-12.701,16.815c0,7.773,3.707,15.049,13.129,15.049c9.521,0,12.168-9.641,12.168-15.83C488.198,292.192,485.02,284.427,475.604,284.427z\"/><path d=\"M538.094,327.604c-15.141,0-28.787-8.652-28.787-27.542c0-18.881,13.646-27.536,28.787-27.536c15.129,0,28.785,8.655,28.785,27.536C566.88,318.95,553.223,327.604,538.094,327.604z M538.094,284.129c-11.434,0-13.547,9.244-13.547,15.934c0,6.691,2.113,15.939,13.547,15.939c11.426,0,13.547-9.248,13.547-15.939C551.641,293.373,549.52,284.129,538.094,284.129z\"/><path d=\"M588.811,326.225h-14.814v-70.62h14.814V326.225z\"/><path d=\"M651.969,326.225h-14.5v-6.589h-0.213c-3.598,5.898-10.156,7.968-16.295,7.968c-16.727,0-23.703-13.77-23.703-28.129c0-18.097,11.004-26.949,23.381-26.949c9.523,0,13.975,4.82,16.295,8.164h0.221v-25.085h14.814V326.225z M624.663,316.291c9.418,0,13.121-7.273,13.121-15.05c0-8.359-2.537-16.814-12.703-16.814c-9.416,0-12.592,7.767-12.592,16.034C612.49,306.651,615.135,316.291,624.663,316.291z\"/></g><g fill=\"#ffff\"><path d=\"M268.323,226.771h-41.551v39.685C230.996,246.516,247.442,230.811,268.323,226.771z\"/><path d=\"M226.771,286.726v39.688h41.551C247.442,322.371,230.996,306.67,226.771,286.726z\"/><path d=\"M331.122,266.455V226.77h-41.552C310.449,230.811,326.892,246.516,331.122,266.455z\"/></g></svg>";
882
- var PLACEHOLDER_IMAGE_DATA_URI = "data:image/svg+xml,".concat(encodeURIComponent(PLACEHOLDER_SVG));
883
- var isPlaceholderImg = function (url) {
884
- return !!url && url.includes(PLACEHOLDER_INDICATOR);
885
- };
886
- var ProductCardHorizontal = function (_a) {
887
- _a.id;
888
- var imageUrl = _a.imageUrl,
889
- _b = _a.showProductImage,
890
- showProductImage = _b === void 0 ? true : _b,
891
- url = _a.url,
892
- title = _a.title;
893
- _a.description;
894
- var price = _a.price,
895
- productId = _a.productId,
896
- button = _a.button,
897
- utm = _a.utm,
898
- _c = _a.className,
899
- className = _c === void 0 ? "" : _c,
900
- style = _a.style,
901
- code = _a.code,
902
- showProductPrice = _a.showProductPrice;
923
+ const PLACEHOLDER_INDICATOR$1 = "?placeholder-storybook";
924
+ const PLACEHOLDER_SVG$1 = `<svg xmlns="http://www.w3.org/2000/svg" width="440" height="133" viewBox="218.446 219.139 440 133" role="img" aria-label="Leybold placeholder logo"><g fill="#ffff"><path d="M290.317,313.442h37.784v12.782h-53.654v-70.62h15.87V313.442z"/><path d="M386.309,310.883c-3.912,12.593-15.135,16.722-24.761,16.722c-15.878,0-28.046-7.084-28.046-28.62c0-6.296,2.322-26.458,26.98-26.458c11.116,0,26.457,4.917,26.457,28.819v2.457h-38.626c0.428,3.935,1.274,12.785,13.232,12.785c4.125,0,8.356-1.965,9.521-5.704L386.309,310.883L386.309,310.883z M371.709,294.852c-0.85-8.456-6.666-11.017-11.434-11.017c-6.979,0-10.686,4.129-11.532,11.017H371.709z"/><path d="M423.556,325.343c-6.986,19.374-8.892,21.932-21.799,21.932c-2.014,0-4.553-0.096-6.665-0.194v-11.02c0.629,0.104,1.582,0.197,2.854,0.197c5.397,0,8.36-0.688,9.737-7.864l-20.741-54.488h16.508l12.062,38.553h0.209l11.539-38.553h15.658L423.556,325.343z"/><path d="M463.54,280.689h0.213c2.328-3.344,6.775-8.164,16.297-8.164c12.385,0,23.389,8.854,23.389,26.949c0,14.359-6.98,28.129-23.703,28.129c-6.141,0-12.701-2.067-16.299-7.968h-0.211v6.589h-14.498v-70.62h14.812V280.689z M475.604,284.427c-10.158,0-12.701,8.455-12.701,16.815c0,7.773,3.707,15.049,13.129,15.049c9.521,0,12.168-9.641,12.168-15.83C488.198,292.192,485.02,284.427,475.604,284.427z"/><path d="M538.094,327.604c-15.141,0-28.787-8.652-28.787-27.542c0-18.881,13.646-27.536,28.787-27.536c15.129,0,28.785,8.655,28.785,27.536C566.88,318.95,553.223,327.604,538.094,327.604z M538.094,284.129c-11.434,0-13.547,9.244-13.547,15.934c0,6.691,2.113,15.939,13.547,15.939c11.426,0,13.547-9.248,13.547-15.939C551.641,293.373,549.52,284.129,538.094,284.129z"/><path d="M588.811,326.225h-14.814v-70.62h14.814V326.225z"/><path d="M651.969,326.225h-14.5v-6.589h-0.213c-3.598,5.898-10.156,7.968-16.295,7.968c-16.727,0-23.703-13.77-23.703-28.129c0-18.097,11.004-26.949,23.381-26.949c9.523,0,13.975,4.82,16.295,8.164h0.221v-25.085h14.814V326.225z M624.663,316.291c9.418,0,13.121-7.273,13.121-15.05c0-8.359-2.537-16.814-12.703-16.814c-9.416,0-12.592,7.767-12.592,16.034C612.49,306.651,615.135,316.291,624.663,316.291z"/></g><g fill="#ffff"><path d="M268.323,226.771h-41.551v39.685C230.996,246.516,247.442,230.811,268.323,226.771z"/><path d="M226.771,286.726v39.688h41.551C247.442,322.371,230.996,306.67,226.771,286.726z"/><path d="M331.122,266.455V226.77h-41.552C310.449,230.811,326.892,246.516,331.122,266.455z"/></g></svg>`;
925
+ const PLACEHOLDER_IMAGE_DATA_URI$1 = `data:image/svg+xml,${encodeURIComponent(PLACEHOLDER_SVG$1)}`;
926
+ const isPlaceholderImg$1 = url => {
927
+ return !!url && url.includes(PLACEHOLDER_INDICATOR$1);
928
+ };
929
+ const ProductCardHorizontal = ({
930
+ id,
931
+ imageUrl,
932
+ showProductImage = true,
933
+ url,
934
+ title,
935
+ description,
936
+ price,
937
+ productId,
938
+ button,
939
+ utm,
940
+ className = "",
941
+ style,
942
+ code,
943
+ showProductPrice
944
+ }) => {
903
945
  if (!title) {
904
946
  return null;
905
947
  }
906
- console.log("Rendering ProductCardHorizontal with props:", {
907
- showProductPrice: showProductPrice,
908
- price: price
909
- });
910
- var hasPlaceholderImage = showProductImage && (!imageUrl || isPlaceholderImg(imageUrl));
911
- var productImage = hasPlaceholderImage ? PLACEHOLDER_IMAGE_DATA_URI : imageUrl;
912
- var href = !utm || url && url.indexOf("utm") > -1 ? url : url + "?utm_source=".concat(utm.utmSource, "&utm_medium=").concat(utm.utmMedium, "&utm_campaign=").concat(utm.utmCampaign);
948
+ const hasPlaceholderImage = showProductImage && (!imageUrl || isPlaceholderImg$1(imageUrl));
949
+ const productImage = hasPlaceholderImage === true ? PLACEHOLDER_IMAGE_DATA_URI$1 : imageUrl;
950
+ const href = !utm || url && url.indexOf("utm") > -1 ? url : url + `?utm_source=${utm.utmSource}&utm_medium=${utm.utmMedium}&utm_campaign=${utm.utmCampaign}`;
913
951
  return /*#__PURE__*/React.createElement("a", {
914
952
  href: href,
915
- className: "".concat(styles$i.productCard, " ").concat(className),
916
- "aria-label": "View product: ".concat(title)
953
+ className: `${styles$h.productCard} ${className}`,
954
+ "aria-label": `View product: ${title}`
917
955
  }, /*#__PURE__*/React.createElement("div", {
918
- className: "".concat(styles$i.productWrapper, " ").concat(showProductImage ? hasPlaceholderImage ? styles$i.withPlaceholder : styles$i.withImage : ""),
956
+ className: `${styles$h.productWrapper} ${showProductImage ? hasPlaceholderImage ? styles$h.withPlaceholder : styles$h.withImage : ""}`,
919
957
  style: style
920
958
  }, showProductImage && /*#__PURE__*/React.createElement("div", {
921
- className: styles$i.productImage
959
+ className: styles$h.productImage
922
960
  }, /*#__PURE__*/React.createElement(Image, {
923
- src: productImage || PLACEHOLDER_IMAGE_DATA_URI,
961
+ src: productImage,
924
962
  alt: title,
925
- className: hasPlaceholderImage ? styles$i.placeholderImage : "",
963
+ className: hasPlaceholderImage ? styles$h.placeholderImage : "",
926
964
  objectFit: hasPlaceholderImage ? "contain" : "cover",
927
- fallbackSrc: PLACEHOLDER_IMAGE_DATA_URI
965
+ fallbackSrc: PLACEHOLDER_IMAGE_DATA_URI$1
928
966
  })), /*#__PURE__*/React.createElement("div", {
929
- className: styles$i.productTitleDescriptionWrapper
967
+ className: styles$h.productTitleDescriptionWrapper
930
968
  }, /*#__PURE__*/React.createElement("h3", {
931
- className: styles$i.productTitle
969
+ className: styles$h.productTitle
932
970
  }, title), productId || code ? /*#__PURE__*/React.createElement("p", {
933
- className: styles$i.productId
971
+ className: styles$h.productId
934
972
  }, productId || code) : null), /*#__PURE__*/React.createElement("div", {
935
- className: styles$i.productPriceCtaWrapper
973
+ className: styles$h.productPriceCtaWrapper
936
974
  }, /*#__PURE__*/React.createElement("p", {
937
- className: styles$i.productPrice
975
+ className: styles$h.productPrice
938
976
  }, showProductPrice ? price || "" : ""), button ? /*#__PURE__*/React.createElement(Button, {
939
- className: styles$i.productButton,
977
+ className: styles$h.productButton,
940
978
  onClick: button.onClick,
941
979
  size: "extra-small"
942
980
  }, button.label) : /*#__PURE__*/React.createElement(FontAwesomeIcon, {
943
981
  icon: faArrowUpRight,
944
- className: styles$i.productArrowIcon,
982
+ className: styles$h.productArrowIcon,
945
983
  "aria-hidden": "true"
946
984
  }))));
947
985
  };
986
+
948
987
  // Alias for backward compatibility
949
- var ProductCardHorizontalParts = ProductCardHorizontal;
988
+ const ProductCardHorizontalParts = ProductCardHorizontal;
950
989
 
951
990
  var styles$g = {"productDetails":"ProductCardDetails-module__productDetails___-sx2l","spareCard":"ProductCardDetails-module__spareCard___vC1Ju"};
952
991
 
953
992
  // Adapter to map design system props to ProductCardHorizontalParts props
954
- var SpareCardAdapter = function (props) {
955
- var spare = props.spare,
956
- rest = __rest(props, ["spare"]);
993
+ const SpareCardAdapter = props => {
994
+ const {
995
+ spare,
996
+ ...rest
997
+ } = props;
957
998
  return /*#__PURE__*/React.createElement(ProductCardHorizontalParts, {
958
999
  className: styles$g.spareCard,
959
- url: (spare === null || spare === void 0 ? void 0 : spare.url) || (spare === null || spare === void 0 ? void 0 : spare.link) || "#",
960
- title: (spare === null || spare === void 0 ? void 0 : spare.name) || (spare === null || spare === void 0 ? void 0 : spare.title) || "",
961
- description: (spare === null || spare === void 0 ? void 0 : spare.description) || "",
962
- price: (spare === null || spare === void 0 ? void 0 : spare.priceValue) || (spare === null || spare === void 0 ? void 0 : spare.price) || (props === null || props === void 0 ? void 0 : props.productPrice) || ""
1000
+ url: spare?.url || spare?.link || "#",
1001
+ title: spare?.name || spare?.title || "",
1002
+ description: spare?.description || "",
1003
+ price: spare?.priceValue || spare?.price || props?.productPrice || ""
963
1004
  // imageUrl={spare?.["img-product"] || spare?.image || ""}
964
1005
  ,
965
1006
  utm: props.utm,
@@ -967,43 +1008,41 @@ var SpareCardAdapter = function (props) {
967
1008
  showProductImage: false,
968
1009
  button: {
969
1010
  label: rest.cta || "View Product",
970
- onClick: function () {
971
- return window.open((spare === null || spare === void 0 ? void 0 : spare.url) || (spare === null || spare === void 0 ? void 0 : spare.link) || "#", "_blank");
972
- }
1011
+ onClick: () => window.open(spare?.url || spare?.link || "#", "_blank")
973
1012
  }
974
1013
  });
975
1014
  };
1015
+
976
1016
  // Re-export the design system component with Leybold styling
977
- var ProductCardDetails = function (_a) {
978
- var id = _a.id,
979
- imageUrl = _a.imageUrl,
980
- title = _a.title,
981
- description = _a.description,
982
- price = _a.price,
983
- code = _a.code,
984
- facets = _a.facets,
985
- hit = _a.hit,
986
- utm = _a.utm,
987
- _b = _a.className,
988
- className = _b === void 0 ? "" : _b,
989
- ProductCardComponent = _a.ProductCardComponent,
990
- hidespares = _a.hidespares,
991
- showProductPrice = _a.showProductPrice,
992
- _c = _a.showProductImage,
993
- showProductImage = _c === void 0 ? true : _c;
1017
+ const ProductCardDetails = ({
1018
+ id,
1019
+ imageUrl,
1020
+ title,
1021
+ description,
1022
+ price,
1023
+ code,
1024
+ facets,
1025
+ hit,
1026
+ utm,
1027
+ className = "",
1028
+ ProductCardComponent,
1029
+ hidespares,
1030
+ showProductPrice,
1031
+ showProductImage = true
1032
+ }) => {
994
1033
  // Build the hit object expected by ProductDetailsCard
995
- var hitData = hit || {
996
- id: id,
997
- title: title,
998
- description: description,
999
- price: price,
1000
- code: code,
1034
+ const hitData = hit || {
1035
+ id,
1036
+ title,
1037
+ description,
1038
+ price,
1039
+ code,
1001
1040
  image: imageUrl
1002
1041
  };
1003
1042
  return /*#__PURE__*/React.createElement("div", {
1004
1043
  className: styles$g.productDetails
1005
1044
  }, /*#__PURE__*/React.createElement(ProductDetailsCard, {
1006
- className: "".concat(className),
1045
+ className: `${className}`,
1007
1046
  title: title,
1008
1047
  imageUrl: showProductImage ? imageUrl : "",
1009
1048
  imageAlt: title,
@@ -1018,27 +1057,29 @@ var ProductCardDetails = function (_a) {
1018
1057
  }));
1019
1058
  };
1020
1059
 
1021
- var ContentCardBase = function (_a) {
1022
- var title = _a.title,
1023
- variant = _a.variant,
1024
- url = _a.url,
1025
- imageUrl = _a.imageUrl,
1026
- category = _a.category,
1027
- meta = _a.meta,
1028
- excerpt = _a.excerpt,
1029
- _b = _a.className,
1030
- className = _b === void 0 ? "" : _b,
1031
- style = _a.style,
1032
- ariaLabel = _a.ariaLabel,
1033
- contentMetaClassName = _a.contentMetaClassName,
1034
- contentCategoryClassName = _a.contentCategoryClassName,
1035
- contentMetaTextClassName = _a.contentMetaTextClassName,
1036
- contentTitleClassName = _a.contentTitleClassName,
1037
- contentExcerptClassName = _a.contentExcerptClassName;
1060
+ const ContentCardBase = ({
1061
+ title,
1062
+ variant,
1063
+ url,
1064
+ imageUrl,
1065
+ category,
1066
+ meta = "something interesting",
1067
+ excerpt,
1068
+ className = "",
1069
+ style,
1070
+ ariaLabel,
1071
+ contentMetaClassName,
1072
+ contentCategoryClassName,
1073
+ contentMetaTextClassName,
1074
+ contentTitleClassName,
1075
+ contentExcerptClassName,
1076
+ showButton
1077
+ }) => {
1038
1078
  console.log("variant in ContentCardBase:", variant);
1039
- var fallbackImage = "/assets/list-card.png";
1040
- var isCareerView = variant === "career-view";
1041
- var defaultAriaLabel = isCareerView ? "View career opportunity: ".concat(title) : "View content: ".concat(title);
1079
+ const fallbackImage = "/assets/list-card.png";
1080
+ const isCareerView = variant === "career-view";
1081
+ const seperator = category && meta ? " | " : "";
1082
+ const defaultAriaLabel = isCareerView ? `View career opportunity: ${title}` : `View content: ${title}`;
1042
1083
  return /*#__PURE__*/React.createElement("a", {
1043
1084
  href: url,
1044
1085
  className: className,
@@ -1068,31 +1109,33 @@ var ContentCardBase = function (_a) {
1068
1109
  className: contentMetaClassName
1069
1110
  }, category && /*#__PURE__*/React.createElement("span", {
1070
1111
  className: contentCategoryClassName
1071
- }, category), meta && /*#__PURE__*/React.createElement("span", {
1112
+ }, category), seperator && /*#__PURE__*/React.createElement("span", {
1113
+ className: `${contentCategoryClassName} separator`
1114
+ }, seperator), meta && /*#__PURE__*/React.createElement("span", {
1072
1115
  className: contentMetaTextClassName
1073
1116
  }, meta)), /*#__PURE__*/React.createElement("h3", {
1074
1117
  className: contentTitleClassName
1075
1118
  }, title), excerpt && /*#__PURE__*/React.createElement("p", {
1076
1119
  className: contentExcerptClassName
1077
- }, excerpt), /*#__PURE__*/React.createElement(Button, {
1120
+ }, excerpt), showButton && /*#__PURE__*/React.createElement(Button, {
1078
1121
  "aria-label": ariaLabel || defaultAriaLabel
1079
1122
  }, "Read More")));
1080
1123
  };
1081
1124
 
1082
1125
  var styles$f = {"contentCard":"ContentCardVertical-module__contentCard___EoYej","contentCard--instant-view":"ContentCardVertical-module__contentCard--instant-view___dsIUf","contentCard--results-view":"ContentCardVertical-module__contentCard--results-view___6mSHQ","contentMeta":"ContentCardVertical-module__contentMeta___l2GtO","contentCategory":"ContentCardVertical-module__contentCategory___78vrj","contentMetaText":"ContentCardVertical-module__contentMetaText___Rl-ln","contentTitle":"ContentCardVertical-module__contentTitle___rEiHm","contentExcerpt":"ContentCardVertical-module__contentExcerpt___5Gb2G"};
1083
1126
 
1084
- var ContentCardVertical = function (_a) {
1085
- var id = _a.id,
1086
- title = _a.title,
1087
- url = _a.url,
1088
- imageUrl = _a.imageUrl,
1089
- category = _a.category,
1090
- meta = _a.meta,
1091
- excerpt = _a.excerpt,
1092
- _b = _a.className,
1093
- className = _b === void 0 ? "" : _b,
1094
- variant = _a.variant;
1095
- var cardClasses = classNames(styles$f.contentCard, styles$f["contentCard--".concat(variant)], className);
1127
+ const ContentCardVertical = ({
1128
+ id,
1129
+ title,
1130
+ url,
1131
+ imageUrl,
1132
+ category,
1133
+ meta,
1134
+ excerpt,
1135
+ className = "",
1136
+ variant
1137
+ }) => {
1138
+ const cardClasses = classNames(styles$f.contentCard, styles$f[`contentCard--${variant}`], className);
1096
1139
  console.log("Rendering ContentCardVertical with variant:", variant);
1097
1140
  return /*#__PURE__*/React.createElement(ContentCardBase, {
1098
1141
  id: id,
@@ -1114,45 +1157,50 @@ var ContentCardVertical = function (_a) {
1114
1157
 
1115
1158
  // Adapter component that maps props from AlgoliaDynamicSearchRaw to ProductCardHorizontal
1116
1159
  // AlgoliaDynamicSearchRaw passes: title, cardLink, productPrice, cta, hit (original data)
1117
- var cardAdapter = function (props) {
1118
- var hit = props.hit,
1119
- title = props.title,
1120
- cardLink = props.cardLink,
1121
- productPrice = props.productPrice;
1122
- props.cta;
1123
- var showProductPrice = props.showProductPrice,
1124
- className = props.className,
1125
- queryType = props.queryType;
1160
+
1161
+ const cardAdapter = props => {
1162
+ const {
1163
+ hit,
1164
+ title,
1165
+ cardLink,
1166
+ productPrice,
1167
+ showProductPrice,
1168
+ className,
1169
+ queryType
1170
+ } = props;
1126
1171
  return /*#__PURE__*/React.createElement(ContentCardVertical, {
1127
- id: (hit === null || hit === void 0 ? void 0 : hit.id) || "",
1172
+ id: hit?.id || "",
1128
1173
  variant: queryType && queryType === "careers" ? "career-view" : "content-view",
1129
- title: title || (hit === null || hit === void 0 ? void 0 : hit.title) || "",
1130
- url: cardLink || (hit === null || hit === void 0 ? void 0 : hit.link) || "#",
1131
- imageUrl: (hit === null || hit === void 0 ? void 0 : hit.image) || "",
1132
- category: (hit === null || hit === void 0 ? void 0 : hit.category) || "",
1133
- meta: showProductPrice ? productPrice || (hit === null || hit === void 0 ? void 0 : hit.price) || "" : "",
1134
- excerpt: (hit === null || hit === void 0 ? void 0 : hit.description) || "",
1174
+ title: title || hit?.title || "",
1175
+ url: cardLink || hit?.link || "#",
1176
+ imageUrl: hit?.image || "",
1177
+ category: hit?.category || "",
1178
+ meta: showProductPrice ? productPrice || hit?.price || "" : "",
1179
+ excerpt: hit?.description || "",
1135
1180
  className: className
1136
1181
  });
1137
1182
  };
1138
- var ProductCardAdapter = function (props) {
1139
- var hit = props.hit,
1140
- title = props.title,
1141
- cardLink = props.cardLink,
1142
- productPrice = props.productPrice,
1143
- cta = props.cta,
1144
- showProductPrice = props.showProductPrice,
1145
- showProductImage = props.showProductImage,
1146
- className = props.className,
1147
- code = props.code,
1148
- utm = props.utm;
1183
+ const ProductCardAdapter = props => {
1184
+ const {
1185
+ hit,
1186
+ title,
1187
+ cardLink,
1188
+ productPrice,
1189
+ cta,
1190
+ showProductPrice,
1191
+ showProductImage,
1192
+ className,
1193
+ code,
1194
+ utm
1195
+ } = props;
1196
+
1149
1197
  // Get values from direct props or fallback to hit object
1150
- var url = cardLink || (hit === null || hit === void 0 ? void 0 : hit.link) || "#";
1151
- var imageUrl = (hit === null || hit === void 0 ? void 0 : hit.image) || "";
1152
- var price = showProductPrice ? productPrice || (hit === null || hit === void 0 ? void 0 : hit.price) || "" : "";
1153
- var productTitle = title || (hit === null || hit === void 0 ? void 0 : hit.title) || "";
1154
- var productCode = code || (hit === null || hit === void 0 ? void 0 : hit.code) || "";
1155
- var buttonLabel = cta || "View Product";
1198
+ const url = cardLink || hit?.link || "#";
1199
+ const imageUrl = hit?.image || "";
1200
+ const price = showProductPrice ? productPrice || hit?.price || "" : "";
1201
+ const productTitle = title || hit?.title || "";
1202
+ const productCode = code || hit?.code || "";
1203
+ const buttonLabel = cta || "View Product";
1156
1204
  return /*#__PURE__*/React.createElement(ProductCardHorizontalParts, {
1157
1205
  imageUrl: imageUrl,
1158
1206
  showProductImage: showProductImage,
@@ -1163,78 +1211,83 @@ var ProductCardAdapter = function (props) {
1163
1211
  price: price,
1164
1212
  button: {
1165
1213
  label: buttonLabel,
1166
- onClick: function () {
1167
- return window.open(url, "_blank");
1168
- }
1214
+ onClick: () => window.open(url, "_blank")
1169
1215
  },
1170
1216
  className: className,
1171
- style: __assign({}, showProductImage ? {
1172
- minHeight: "130px"
1173
- } : {}),
1217
+ style: {
1218
+ ...(showProductImage ? {
1219
+ minHeight: "130px"
1220
+ } : {})
1221
+ },
1174
1222
  code: productCode,
1175
1223
  showProductPrice: showProductPrice
1176
1224
  });
1177
1225
  };
1178
- var ProductCardDetailsAdapter = function (props) {
1179
- var hit = props.hit,
1180
- title = props.title;
1181
- props.cardLink;
1182
- var productPrice = props.productPrice;
1183
- props.cta;
1184
- var showProductPrice = props.showProductPrice,
1185
- showProductImage = props.showProductImage,
1186
- className = props.className,
1187
- code = props.code,
1188
- utm = props.utm,
1189
- facets = props.facets,
1190
- related_products = props.related_products,
1191
- hidespares = props.hidespares;
1226
+ const ProductCardDetailsAdapter = props => {
1227
+ const {
1228
+ hit,
1229
+ title,
1230
+ productPrice,
1231
+ showProductPrice,
1232
+ showProductImage,
1233
+ className,
1234
+ code,
1235
+ utm,
1236
+ facets,
1237
+ related_products,
1238
+ hidespares
1239
+ } = props;
1192
1240
  if (!title) {
1193
1241
  return null;
1194
1242
  }
1195
1243
  return /*#__PURE__*/React.createElement(ProductCardDetails, {
1196
- imageUrl: (hit === null || hit === void 0 ? void 0 : hit.image) || "",
1244
+ imageUrl: hit?.image || "",
1197
1245
  title: title,
1198
- description: (hit === null || hit === void 0 ? void 0 : hit.description) || "",
1199
- price: (hit === null || hit === void 0 ? void 0 : hit.price) || "" || productPrice,
1200
- code: (hit === null || hit === void 0 ? void 0 : hit.code) || "" || code,
1246
+ description: hit?.description || "",
1247
+ price: hit?.price || "" || productPrice,
1248
+ code: hit?.code || "" || code,
1201
1249
  hit: hit,
1202
1250
  utm: utm,
1203
1251
  className: className,
1204
1252
  facets: facets,
1205
- relatedProducts: (hit === null || hit === void 0 ? void 0 : hit.related_products) || related_products,
1253
+ relatedProducts: hit?.related_products || related_products,
1206
1254
  hidespares: hidespares,
1207
1255
  showProductPrice: showProductPrice,
1208
1256
  showProductImage: showProductImage
1209
1257
  });
1210
1258
  };
1211
- var ButtonAdapter = function (props) {
1212
- var label = props.label,
1213
- onClick = props.onClick,
1214
- className = props.className;
1259
+ const ButtonAdapter = props => {
1260
+ const {
1261
+ label,
1262
+ onClick,
1263
+ className
1264
+ } = props;
1215
1265
  return /*#__PURE__*/React.createElement(Button, {
1216
1266
  className: className,
1217
1267
  onClick: onClick
1218
1268
  }, label);
1219
1269
  };
1220
- var AlgoliaDynamicSearchLeybold = function (props) {
1221
- var parentComponentProps = {
1222
- queryType: props === null || props === void 0 ? void 0 : props.queryType,
1223
- showProductPrice: props === null || props === void 0 ? void 0 : props.showProductPrice,
1224
- showProductImage: props === null || props === void 0 ? void 0 : props.showProductImage,
1225
- hitCta: props === null || props === void 0 ? void 0 : props.hitCta,
1226
- hidespares: props === null || props === void 0 ? void 0 : props.hidespares
1270
+ const AlgoliaDynamicSearchLeybold = props => {
1271
+ const parentComponentProps = {
1272
+ queryType: props?.queryType,
1273
+ showProductPrice: props?.showProductPrice,
1274
+ showProductImage: props?.showProductImage,
1275
+ hitCta: props?.hitCta,
1276
+ hidespares: props?.hidespares
1227
1277
  };
1228
- var innerComponents = {
1229
- Card: function (innerProps) {
1230
- return cardAdapter(__assign(__assign({}, parentComponentProps), innerProps));
1231
- },
1232
- ProductCard: function (innerProps) {
1233
- return ProductCardAdapter(__assign(__assign({}, parentComponentProps), innerProps));
1234
- },
1235
- ProductDetailsCard: function (innerProps) {
1236
- return ProductCardDetailsAdapter(__assign(__assign({}, parentComponentProps), innerProps));
1237
- },
1278
+ const innerComponents = {
1279
+ Card: innerProps => cardAdapter({
1280
+ ...parentComponentProps,
1281
+ ...innerProps
1282
+ }),
1283
+ ProductCard: innerProps => ProductCardAdapter({
1284
+ ...parentComponentProps,
1285
+ ...innerProps
1286
+ }),
1287
+ ProductDetailsCard: innerProps => ProductCardDetailsAdapter({
1288
+ ...parentComponentProps,
1289
+ ...innerProps
1290
+ }),
1238
1291
  Button: ButtonAdapter
1239
1292
  };
1240
1293
  return /*#__PURE__*/React.createElement(AlgoliaDynamicSearchRaw, _extends({}, props, {
@@ -1242,20 +1295,22 @@ var AlgoliaDynamicSearchLeybold = function (props) {
1242
1295
  }));
1243
1296
  };
1244
1297
 
1245
- var QrFormButtonAdapter = function (_a) {
1246
- var label = _a.label,
1247
- onClick = _a.onClick,
1248
- _b = _a.buttonStyle,
1249
- buttonStyle = _b === void 0 ? "primary" : _b,
1250
- href = _a.href,
1251
- target = _a.target,
1252
- _c = _a.type,
1253
- type = _c === void 0 ? "button" : _c,
1254
- element = _a.element,
1255
- pageTarget = _a["data-page_target"],
1256
- className = _a.className;
1298
+ // Adapter to map QrForm's expected button props to our Button component
1299
+
1300
+ const QrFormButtonAdapter = ({
1301
+ label,
1302
+ onClick,
1303
+ buttonStyle = "primary",
1304
+ href,
1305
+ target,
1306
+ type = "button",
1307
+ element,
1308
+ "data-page_target": pageTarget,
1309
+ className
1310
+ }) => {
1257
1311
  // Map buttonStyle to our variant
1258
- var variant = buttonStyle === "secondary" ? "secondary" : "primary";
1312
+ const variant = buttonStyle === "secondary" ? "secondary" : "primary";
1313
+
1259
1314
  // If it's an anchor element (has href or element='a'), render as link
1260
1315
  if (element === "a" || href) {
1261
1316
  return /*#__PURE__*/React.createElement("a", {
@@ -1274,19 +1329,18 @@ var QrFormButtonAdapter = function (_a) {
1274
1329
  size: "small"
1275
1330
  }, label));
1276
1331
  }
1332
+
1277
1333
  // Otherwise render as button
1278
1334
  return /*#__PURE__*/React.createElement(Button, {
1279
1335
  variant: variant,
1280
1336
  type: type,
1281
- onClick: onClick ? function (e) {
1282
- return onClick(e);
1283
- } : undefined,
1337
+ onClick: onClick ? e => onClick(e) : undefined,
1284
1338
  className: className,
1285
1339
  "data-page_target": pageTarget,
1286
1340
  size: "small"
1287
1341
  }, label);
1288
1342
  };
1289
- var QrFormLeybold = function (props) {
1343
+ const QrFormLeybold = props => {
1290
1344
  return /*#__PURE__*/React.createElement("div", {
1291
1345
  className: "qr-journey-form-wrapper"
1292
1346
  }, /*#__PURE__*/React.createElement(QrForm, _extends({}, props, {
@@ -1294,19 +1348,18 @@ var QrFormLeybold = function (props) {
1294
1348
  })));
1295
1349
  };
1296
1350
 
1297
- var styles$e = {"overlay":"SearchModal-module__overlay___Vbvg9","modal":"SearchModal-module__modal___1k5gO","closeButton":"SearchModal-module__closeButton___AN0zt","closeButton__icon":"SearchModal-module__closeButton__icon___vISSw","closeButton__text":"SearchModal-module__closeButton__text___-4EH1","closeButtonDesktop":"SearchModal-module__closeButtonDesktop___Lxxb0","closeButtonMobile":"SearchModal-module__closeButtonMobile___WIIMS","stickyHeader":"SearchModal-module__stickyHeader___wp-gA","scrollableContent":"SearchModal-module__scrollableContent___lrZP3"};
1351
+ var styles$e = {"overlay":"SearchModal-module__overlay___Vbvg9","overlayOpen":"SearchModal-module__overlayOpen___Ipajg","overlayClosing":"SearchModal-module__overlayClosing___yXsw3","modal":"SearchModal-module__modal___1k5gO","modalOpen":"SearchModal-module__modalOpen___t3hpr","modalClosing":"SearchModal-module__modalClosing___W3m8i","closeButton":"SearchModal-module__closeButton___AN0zt","closeButton__icon":"SearchModal-module__closeButton__icon___vISSw","closeButton__text":"SearchModal-module__closeButton__text___-4EH1","closeButtonDesktop":"SearchModal-module__closeButtonDesktop___Lxxb0","closeButtonMobile":"SearchModal-module__closeButtonMobile___WIIMS","closeButtonMobileWrapper":"SearchModal-module__closeButtonMobileWrapper___LSynI","closeButtonMobileWrapperHidden":"SearchModal-module__closeButtonMobileWrapperHidden___O9nRE","stickyHeader":"SearchModal-module__stickyHeader___wp-gA","stickyHeaderHidden":"SearchModal-module__stickyHeaderHidden___-UI7O","scrollableContent":"SearchModal-module__scrollableContent___lrZP3"};
1298
1352
 
1299
- var ModalCloseButton = function (_a) {
1300
- var onClick = _a.onClick,
1301
- _b = _a.ariaLabel,
1302
- ariaLabel = _b === void 0 ? 'Close search' : _b,
1303
- _c = _a.className,
1304
- className = _c === void 0 ? '' : _c;
1353
+ const ModalCloseButton = ({
1354
+ onClick,
1355
+ ariaLabel = 'Close search',
1356
+ className = ''
1357
+ }) => {
1305
1358
  return /*#__PURE__*/React.createElement("button", {
1306
1359
  type: "button",
1307
1360
  onClick: onClick,
1308
1361
  "aria-label": ariaLabel,
1309
- className: "".concat(styles$e.closeButton, " ").concat(className)
1362
+ className: `${styles$e.closeButton} ${className}`
1310
1363
  }, /*#__PURE__*/React.createElement("span", {
1311
1364
  className: styles$e.closeButton__icon
1312
1365
  }, /*#__PURE__*/React.createElement("svg", {
@@ -1333,86 +1386,185 @@ var ModalCloseButton = function (_a) {
1333
1386
  }, "CLOSE X"));
1334
1387
  };
1335
1388
 
1336
- var SearchModal = function (_a) {
1337
- var isOpen = _a.isOpen,
1338
- onClose = _a.onClose,
1339
- _b = _a.title,
1340
- title = _b === void 0 ? 'Search' : _b,
1341
- children = _a.children,
1342
- _c = _a.className,
1343
- className = _c === void 0 ? '' : _c,
1344
- stickyHeaderContent = _a.stickyHeaderContent;
1345
- var modalRef = useRef(null);
1346
- var previouslyFocusedElement = useRef(null);
1347
- useEffect(function () {
1389
+ const CLOSE_ANIMATION_MS = 600;
1390
+ const prefersReducedMotion = () => {
1391
+ if (typeof window === "undefined" || typeof window.matchMedia !== "function") {
1392
+ return false;
1393
+ }
1394
+ return window.matchMedia("(prefers-reduced-motion: reduce)").matches;
1395
+ };
1396
+ const SearchModal = ({
1397
+ isOpen,
1398
+ onClose,
1399
+ title = "Search",
1400
+ children,
1401
+ className = "",
1402
+ stickyHeaderContent
1403
+ }) => {
1404
+ const modalRef = useRef(null);
1405
+ const scrollableContentRef = useRef(null);
1406
+ const previouslyFocusedElement = useRef(null);
1407
+ const lastScrollTopRef = useRef(0);
1408
+ const scrollTickingRef = useRef(false);
1409
+ const [shouldRender, setShouldRender] = useState(isOpen);
1410
+ const [isClosing, setIsClosing] = useState(false);
1411
+ const closeTimerRef = useRef(null);
1412
+ const [isMobileCloseVisible, setIsMobileCloseVisible] = useState(true);
1413
+ const stateClassNames = useMemo(() => {
1414
+ if (isClosing) {
1415
+ return {
1416
+ overlay: styles$e.overlayClosing,
1417
+ modal: styles$e.modalClosing
1418
+ };
1419
+ }
1420
+ return {
1421
+ overlay: styles$e.overlayOpen,
1422
+ modal: styles$e.modalOpen
1423
+ };
1424
+ }, [isClosing]);
1425
+ useEffect(() => {
1426
+ return () => {
1427
+ if (closeTimerRef.current) {
1428
+ window.clearTimeout(closeTimerRef.current);
1429
+ }
1430
+ };
1431
+ }, []);
1432
+ useEffect(() => {
1433
+ if (isOpen) {
1434
+ if (closeTimerRef.current) {
1435
+ window.clearTimeout(closeTimerRef.current);
1436
+ closeTimerRef.current = null;
1437
+ }
1438
+ setShouldRender(true);
1439
+ setIsClosing(false);
1440
+ setIsMobileCloseVisible(true);
1441
+ return;
1442
+ }
1443
+ if (!shouldRender) return;
1444
+ setIsClosing(true);
1445
+ const duration = prefersReducedMotion() ? 0 : CLOSE_ANIMATION_MS;
1446
+ closeTimerRef.current = window.setTimeout(() => {
1447
+ setShouldRender(false);
1448
+ setIsClosing(false);
1449
+ closeTimerRef.current = null;
1450
+ }, duration);
1451
+ }, [isOpen, shouldRender]);
1452
+
1453
+ // Mobile-only: hide close button when scrolling down, show when scrolling up.
1454
+ useEffect(() => {
1455
+ if (!isOpen) return;
1456
+ // Important: this component renders `null` until `shouldRender` becomes true.
1457
+ // We need to wait for that render so `scrollableContentRef.current` exists.
1458
+ if (!shouldRender) return;
1459
+ if (typeof window === "undefined" || typeof window.matchMedia !== "function") return;
1460
+ const isMobile = window.matchMedia("(max-width: 768px)").matches;
1461
+ if (!isMobile) return;
1462
+ const el = scrollableContentRef.current;
1463
+ if (!el) return;
1464
+ lastScrollTopRef.current = el.scrollTop;
1465
+ setIsMobileCloseVisible(true);
1466
+ const thresholdPx = 10;
1467
+ const topRevealPx = 8;
1468
+ const update = () => {
1469
+ scrollTickingRef.current = false;
1470
+ const current = el.scrollTop;
1471
+ const prev = lastScrollTopRef.current;
1472
+ const delta = current - prev;
1473
+ if (current <= topRevealPx) {
1474
+ setIsMobileCloseVisible(true);
1475
+ } else if (delta > thresholdPx) {
1476
+ setIsMobileCloseVisible(false);
1477
+ } else if (delta < -thresholdPx) {
1478
+ setIsMobileCloseVisible(true);
1479
+ }
1480
+ lastScrollTopRef.current = current;
1481
+ };
1482
+ const onScroll = () => {
1483
+ if (scrollTickingRef.current) return;
1484
+ scrollTickingRef.current = true;
1485
+ window.requestAnimationFrame(update);
1486
+ };
1487
+ el.addEventListener("scroll", onScroll, {
1488
+ passive: true
1489
+ });
1490
+ return () => {
1491
+ el.removeEventListener("scroll", onScroll);
1492
+ };
1493
+ }, [isOpen, shouldRender]);
1494
+ useEffect(() => {
1348
1495
  if (isOpen) {
1349
1496
  // Store the previously focused element
1350
1497
  previouslyFocusedElement.current = document.activeElement;
1498
+
1351
1499
  // Focus the modal
1352
1500
  if (modalRef.current) {
1353
1501
  modalRef.current.focus();
1354
1502
  }
1503
+
1355
1504
  // Prevent body scroll
1356
- document.body.style.overflow = 'hidden';
1505
+ document.body.style.overflow = "hidden";
1357
1506
  } else {
1358
- // Restore body scroll
1359
- document.body.style.overflow = '';
1360
1507
  // Return focus to previously focused element
1361
1508
  if (previouslyFocusedElement.current) {
1362
1509
  previouslyFocusedElement.current.focus();
1363
1510
  }
1364
1511
  }
1365
- return function () {
1366
- document.body.style.overflow = '';
1367
- };
1368
1512
  }, [isOpen]);
1369
- useEffect(function () {
1370
- var handleEscape = function (event) {
1371
- if (event.key === 'Escape' && isOpen) {
1513
+ useEffect(() => {
1514
+ if (shouldRender) {
1515
+ document.body.style.overflow = "hidden";
1516
+ } else {
1517
+ document.body.style.overflow = "";
1518
+ }
1519
+ return () => {
1520
+ document.body.style.overflow = "";
1521
+ };
1522
+ }, [shouldRender]);
1523
+ useEffect(() => {
1524
+ const handleEscape = event => {
1525
+ if (event.key === "Escape" && isOpen) {
1372
1526
  onClose();
1373
1527
  }
1374
1528
  };
1375
- document.addEventListener('keydown', handleEscape);
1376
- return function () {
1377
- return document.removeEventListener('keydown', handleEscape);
1378
- };
1529
+ document.addEventListener("keydown", handleEscape);
1530
+ return () => document.removeEventListener("keydown", handleEscape);
1379
1531
  }, [isOpen, onClose]);
1532
+
1380
1533
  // Focus trap implementation
1381
- useEffect(function () {
1534
+ useEffect(() => {
1382
1535
  if (!isOpen || !modalRef.current) return;
1383
- var modal = modalRef.current;
1384
- var focusableElements = modal.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');
1385
- var firstElement = focusableElements[0];
1386
- var lastElement = focusableElements[focusableElements.length - 1];
1387
- var handleTab = function (event) {
1388
- if (event.key !== 'Tab') return;
1536
+ const modal = modalRef.current;
1537
+ const focusableElements = modal.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');
1538
+ const firstElement = focusableElements[0];
1539
+ const lastElement = focusableElements[focusableElements.length - 1];
1540
+ const handleTab = event => {
1541
+ if (event.key !== "Tab") return;
1389
1542
  if (event.shiftKey) {
1390
1543
  // Shift + Tab
1391
1544
  if (document.activeElement === firstElement) {
1392
1545
  event.preventDefault();
1393
- lastElement === null || lastElement === void 0 ? void 0 : lastElement.focus();
1546
+ lastElement?.focus();
1394
1547
  }
1395
1548
  } else {
1396
1549
  // Tab
1397
1550
  if (document.activeElement === lastElement) {
1398
1551
  event.preventDefault();
1399
- firstElement === null || firstElement === void 0 ? void 0 : firstElement.focus();
1552
+ firstElement?.focus();
1400
1553
  }
1401
1554
  }
1402
1555
  };
1403
- modal.addEventListener('keydown', handleTab);
1404
- return function () {
1405
- return modal.removeEventListener('keydown', handleTab);
1406
- };
1556
+ modal.addEventListener("keydown", handleTab);
1557
+ return () => modal.removeEventListener("keydown", handleTab);
1407
1558
  }, [isOpen]);
1408
- if (!isOpen) return null;
1409
- var handleOverlayClick = function (event) {
1559
+ if (!shouldRender) return null;
1560
+ const handleOverlayClick = event => {
1561
+ if (isClosing) return;
1410
1562
  if (event.target === event.currentTarget) {
1411
1563
  onClose();
1412
1564
  }
1413
1565
  };
1414
1566
  return /*#__PURE__*/React.createElement("div", {
1415
- className: styles$e.overlay,
1567
+ className: `${styles$e.overlay} ${stateClassNames.overlay}`,
1416
1568
  onClick: handleOverlayClick,
1417
1569
  "aria-hidden": "true"
1418
1570
  }, /*#__PURE__*/React.createElement("div", {
@@ -1421,13 +1573,16 @@ var SearchModal = function (_a) {
1421
1573
  "aria-modal": "true",
1422
1574
  "aria-label": title,
1423
1575
  tabIndex: -1,
1424
- className: "".concat(styles$e.modal, " ").concat(className)
1576
+ className: `${styles$e.modal} ${stateClassNames.modal} ${className}`
1577
+ }, /*#__PURE__*/React.createElement("div", {
1578
+ className: `${styles$e.stickyHeader}` + ` ${!isMobileCloseVisible ? styles$e.stickyHeaderHidden : ""}`
1425
1579
  }, /*#__PURE__*/React.createElement("div", {
1426
- className: styles$e.stickyHeader
1580
+ className: `${styles$e.closeButtonMobileWrapper} ${isMobileCloseVisible ? "" : styles$e.closeButtonMobileWrapperHidden}`
1427
1581
  }, /*#__PURE__*/React.createElement(ModalCloseButton, {
1428
1582
  onClick: onClose,
1429
1583
  className: styles$e.closeButtonMobile
1430
- }), stickyHeaderContent), /*#__PURE__*/React.createElement("div", {
1584
+ })), stickyHeaderContent), /*#__PURE__*/React.createElement("div", {
1585
+ ref: scrollableContentRef,
1431
1586
  className: styles$e.scrollableContent
1432
1587
  }, /*#__PURE__*/React.createElement(ModalCloseButton, {
1433
1588
  onClick: onClose,
@@ -1437,11 +1592,11 @@ var SearchModal = function (_a) {
1437
1592
 
1438
1593
  var styles$d = {"searchBar":"SearchBar-module__searchBar___5ak1g","inputWrapper":"SearchBar-module__inputWrapper___-4wrM","searchIcon":"SearchBar-module__searchIcon___VAuDz","searchInput":"SearchBar-module__searchInput___1K4GN","clearButton":"SearchBar-module__clearButton___JQYg-","submitButton":"SearchBar-module__submitButton___DZWsQ","submitButton__text":"SearchBar-module__submitButton__text___WkUsL","submitButton__icon":"SearchBar-module__submitButton__icon___s-ltv"};
1439
1594
 
1440
- var SearchIcon = function (_a) {
1441
- var _b = _a.className,
1442
- className = _b === void 0 ? '' : _b;
1595
+ const SearchIcon = ({
1596
+ className = ''
1597
+ }) => {
1443
1598
  return /*#__PURE__*/React.createElement("svg", {
1444
- className: "".concat(styles$d.searchIcon, " ").concat(className),
1599
+ className: `${styles$d.searchIcon} ${className}`,
1445
1600
  xmlns: "http://www.w3.org/2000/svg",
1446
1601
  viewBox: "0 0 24 24",
1447
1602
  fill: "none",
@@ -1459,17 +1614,15 @@ var SearchIcon = function (_a) {
1459
1614
  }));
1460
1615
  };
1461
1616
 
1462
- var SearchInput = function (_a) {
1463
- var value = _a.value,
1464
- onChange = _a.onChange,
1465
- onKeyDown = _a.onKeyDown,
1466
- _b = _a.placeholder,
1467
- placeholder = _b === void 0 ? 'Discover products, innovations, and resources...' : _b,
1468
- _c = _a.autoFocus,
1469
- autoFocus = _c === void 0 ? false : _c,
1470
- _d = _a.className,
1471
- className = _d === void 0 ? '' : _d;
1472
- var handleChange = function (event) {
1617
+ const SearchInput = ({
1618
+ value,
1619
+ onChange,
1620
+ onKeyDown,
1621
+ placeholder = 'Discover products, innovations, and resources...',
1622
+ autoFocus = false,
1623
+ className = ''
1624
+ }) => {
1625
+ const handleChange = event => {
1473
1626
  onChange(event.target.value);
1474
1627
  };
1475
1628
  return /*#__PURE__*/React.createElement("input", {
@@ -1480,27 +1633,30 @@ var SearchInput = function (_a) {
1480
1633
  placeholder: placeholder,
1481
1634
  autoFocus: autoFocus,
1482
1635
  "aria-label": "Search",
1483
- className: "".concat(styles$d.searchInput, " ").concat(className)
1636
+ className: `${styles$d.searchInput} ${className}`
1484
1637
  });
1485
1638
  };
1486
1639
 
1487
- var SearchSubmitButton = function (_a) {
1488
- var onClick = _a.onClick,
1489
- _b = _a.disabled,
1490
- disabled = _b === void 0 ? false : _b,
1491
- _c = _a.ariaLabel,
1492
- ariaLabel = _c === void 0 ? 'Search' : _c,
1493
- _d = _a.label,
1494
- label = _d === void 0 ? 'Search' : _d;
1495
- _a.variant;
1496
- var _f = _a.className,
1497
- className = _f === void 0 ? '' : _f;
1498
- return /*#__PURE__*/React.createElement("button", {
1640
+ const SearchSubmitButton = ({
1641
+ onClick,
1642
+ disabled = false,
1643
+ ariaLabel = "Search",
1644
+ label = "Search",
1645
+ variant = "instant",
1646
+ className = ""
1647
+ }) => {
1648
+ const transformVariant = variant === "instant" ? "solid-grey" : "primary";
1649
+ return /*#__PURE__*/React.createElement(Button, {
1499
1650
  type: "submit",
1651
+ size: "small",
1500
1652
  onClick: onClick,
1501
1653
  disabled: disabled,
1502
1654
  "aria-label": ariaLabel,
1503
- className: "".concat(styles$d.submitButton, " ").concat(className)
1655
+ className: `${styles$d.submitButton} ${className}`,
1656
+ variant: transformVariant,
1657
+ style: {
1658
+ minWidth: "unset" // Ensure button doesn't shrink too much when only showing icon
1659
+ }
1504
1660
  }, /*#__PURE__*/React.createElement("span", {
1505
1661
  className: styles$d.submitButton__text
1506
1662
  }, label), /*#__PURE__*/React.createElement("span", {
@@ -1508,34 +1664,32 @@ var SearchSubmitButton = function (_a) {
1508
1664
  }, /*#__PURE__*/React.createElement(SearchIcon, null)));
1509
1665
  };
1510
1666
 
1511
- var SearchBar = function (_a) {
1512
- var value = _a.value,
1513
- onChange = _a.onChange,
1514
- onSubmit = _a.onSubmit,
1515
- placeholder = _a.placeholder,
1516
- _b = _a.autoFocus,
1517
- autoFocus = _b === void 0 ? false : _b,
1518
- _c = _a.className,
1519
- className = _c === void 0 ? '' : _c,
1520
- _d = _a.variant,
1521
- variant = _d === void 0 ? 'instant' : _d;
1522
- var handleSubmit = function (event) {
1667
+ const SearchBar = ({
1668
+ value,
1669
+ onChange,
1670
+ onSubmit,
1671
+ placeholder,
1672
+ autoFocus = false,
1673
+ className = "",
1674
+ variant = "instant"
1675
+ }) => {
1676
+ const handleSubmit = event => {
1523
1677
  event.preventDefault();
1524
1678
  onSubmit();
1525
1679
  };
1526
- var handleKeyDown = function (event) {
1527
- if (event.key === 'Enter') {
1680
+ const handleKeyDown = event => {
1681
+ if (event.key === "Enter") {
1528
1682
  event.preventDefault();
1529
1683
  onSubmit();
1530
1684
  }
1531
1685
  };
1532
- var handleClear = function () {
1533
- onChange('');
1686
+ const handleClear = () => {
1687
+ onChange("");
1534
1688
  };
1535
- var showClearButton = value.length > 0;
1689
+ const showClearButton = value.length > 0;
1536
1690
  return /*#__PURE__*/React.createElement("form", {
1537
1691
  onSubmit: handleSubmit,
1538
- className: "".concat(styles$d.searchBar, " ").concat(className)
1692
+ className: `${styles$d.searchBar} ${className}`
1539
1693
  }, /*#__PURE__*/React.createElement("div", {
1540
1694
  className: styles$d.inputWrapper
1541
1695
  }, /*#__PURE__*/React.createElement(SearchIcon, null), /*#__PURE__*/React.createElement(SearchInput, {
@@ -1552,24 +1706,23 @@ var SearchBar = function (_a) {
1552
1706
  }, "CLEAR X")), /*#__PURE__*/React.createElement(SearchSubmitButton, {
1553
1707
  onClick: onSubmit,
1554
1708
  label: "SEE ALL RESULTS",
1555
- variant: variant
1709
+ variant: "results"
1556
1710
  }));
1557
1711
  };
1558
1712
 
1559
1713
  var styles$c = {"contentCard":"ContentCardHorizontal-module__contentCard___l-Kim","contentCard--instant-view":"ContentCardHorizontal-module__contentCard--instant-view___4wK9-","contentExcerpt":"ContentCardHorizontal-module__contentExcerpt___tqg1v","contentCard--results-view":"ContentCardHorizontal-module__contentCard--results-view___oBP2u","contentMeta":"ContentCardHorizontal-module__contentMeta___rEW-X","contentCategory":"ContentCardHorizontal-module__contentCategory___NssVD","contentMetaText":"ContentCardHorizontal-module__contentMetaText___muYBN","contentTitle":"ContentCardHorizontal-module__contentTitle___54gEo"};
1560
1714
 
1561
- var ContentCardHorizontal = function (_a) {
1562
- var id = _a.id,
1563
- title = _a.title,
1564
- url = _a.url,
1565
- category = _a.category,
1566
- meta = _a.meta,
1567
- excerpt = _a.excerpt,
1568
- _b = _a.className,
1569
- className = _b === void 0 ? "" : _b,
1570
- _c = _a.variant,
1571
- variant = _c === void 0 ? "instant-view" : _c;
1572
- var cardClasses = classNames(styles$c.contentCard, styles$c["contentCard--".concat(variant)], className);
1715
+ const ContentCardHorizontal = ({
1716
+ id,
1717
+ title,
1718
+ url,
1719
+ category,
1720
+ meta,
1721
+ excerpt,
1722
+ className = "",
1723
+ variant = "instant-view"
1724
+ }) => {
1725
+ const cardClasses = classNames(styles$c.contentCard, styles$c[`contentCard--${variant}`], className);
1573
1726
  return /*#__PURE__*/React.createElement(ContentCardBase, {
1574
1727
  id: id,
1575
1728
  title: title,
@@ -1588,21 +1741,23 @@ var ContentCardHorizontal = function (_a) {
1588
1741
 
1589
1742
  var styles$b = {"instantResultsLayout":"InstantResults-module__instantResultsLayout___oy-o4","columnsGrid":"InstantResults-module__columnsGrid___bHRUM","resultsColumn":"InstantResults-module__resultsColumn___ZBSlT","columnHeader":"InstantResults-module__columnHeader___VYYhi","showingText":"InstantResults-module__showingText___lECiA","seeAllButton":"InstantResults-module__seeAllButton___xEDAX","chevronIcon":"InstantResults-module__chevronIcon___bjb3q","resultsList":"InstantResults-module__resultsList___7s3PT","divider":"InstantResults-module__divider___Ky6zK","loadingState":"InstantResults-module__loadingState___l0fMq","errorState":"InstantResults-module__errorState___hTBbE","spinner":"InstantResults-module__spinner___85jF-"};
1590
1743
 
1591
- var FederatedInstantResultsLayout = function (_a) {
1592
- _a.query;
1593
- var products = _a.products,
1594
- contents = _a.contents,
1595
- isLoadingProducts = _a.isLoadingProducts,
1596
- isLoadingContents = _a.isLoadingContents,
1597
- productsError = _a.productsError,
1598
- contentsError = _a.contentsError,
1599
- onSeeAllProducts = _a.onSeeAllProducts,
1600
- onSeeAllContents = _a.onSeeAllContents;
1601
- _a.onSeeAllCombined;
1744
+ const FederatedInstantResultsLayout = ({
1745
+ query,
1746
+ products,
1747
+ contents,
1748
+ isLoadingProducts,
1749
+ isLoadingContents,
1750
+ productsError,
1751
+ contentsError,
1752
+ onSeeAllProducts,
1753
+ onSeeAllContents,
1754
+ onSeeAllCombined
1755
+ }) => {
1602
1756
  products.length + contents.length;
1757
+
1603
1758
  // Show first 3 results from each category
1604
- var displayProducts = products.slice(0, 3);
1605
- var displayContents = contents.slice(0, 3);
1759
+ const displayProducts = products.slice(0, 3);
1760
+ const displayContents = contents.slice(0, 3);
1606
1761
  return /*#__PURE__*/React.createElement("div", {
1607
1762
  className: styles$b.instantResultsLayout
1608
1763
  }, /*#__PURE__*/React.createElement("div", {
@@ -1640,13 +1795,14 @@ var FederatedInstantResultsLayout = function (_a) {
1640
1795
  className: styles$b.errorState
1641
1796
  }, /*#__PURE__*/React.createElement("p", null, productsError)) : displayProducts.length > 0 ? /*#__PURE__*/React.createElement("div", {
1642
1797
  className: styles$b.resultsList
1643
- }, displayProducts.map(function (product, index) {
1644
- return /*#__PURE__*/React.createElement(React.Fragment, {
1645
- key: product.id
1646
- }, /*#__PURE__*/React.createElement(ProductCardHorizontal, product), index < displayProducts.length - 1 && /*#__PURE__*/React.createElement("hr", {
1647
- className: styles$b.divider
1648
- }));
1649
- })) : null), /*#__PURE__*/React.createElement("div", {
1798
+ }, displayProducts.map((product, index) => /*#__PURE__*/React.createElement(React.Fragment, {
1799
+ key: product.id
1800
+ }, /*#__PURE__*/React.createElement(ProductCardHorizontal, _extends({}, product, {
1801
+ showProductPrice: true,
1802
+ className: "search-result"
1803
+ })), index < displayProducts.length - 1 && /*#__PURE__*/React.createElement("hr", {
1804
+ className: styles$b.divider
1805
+ })))) : null), /*#__PURE__*/React.createElement("div", {
1650
1806
  className: styles$b.resultsColumn
1651
1807
  }, /*#__PURE__*/React.createElement("div", {
1652
1808
  className: styles$b.columnHeader
@@ -1679,42 +1835,39 @@ var FederatedInstantResultsLayout = function (_a) {
1679
1835
  className: styles$b.errorState
1680
1836
  }, /*#__PURE__*/React.createElement("p", null, contentsError)) : displayContents.length > 0 ? /*#__PURE__*/React.createElement("div", {
1681
1837
  className: styles$b.resultsList
1682
- }, displayContents.map(function (content, index) {
1683
- return /*#__PURE__*/React.createElement(React.Fragment, {
1684
- key: content.id
1685
- }, /*#__PURE__*/React.createElement(ContentCardHorizontal, _extends({}, content, {
1686
- variant: "instant-view"
1687
- })), index < displayContents.length - 1 && /*#__PURE__*/React.createElement("hr", {
1688
- className: styles$b.divider
1689
- }));
1690
- })) : null)));
1838
+ }, displayContents.map((content, index) => /*#__PURE__*/React.createElement(React.Fragment, {
1839
+ key: content.id
1840
+ }, /*#__PURE__*/React.createElement(ContentCardHorizontal, _extends({}, content, {
1841
+ variant: "instant-view"
1842
+ })), index < displayContents.length - 1 && /*#__PURE__*/React.createElement("hr", {
1843
+ className: styles$b.divider
1844
+ })))) : null)));
1691
1845
  };
1692
1846
 
1693
1847
  var styles$a = {"resultsCount":"ResultsCount-module__resultsCount___cNM6f"};
1694
1848
 
1695
- var ResultsCount = function (_a) {
1696
- var count = _a.count,
1697
- type = _a.type,
1698
- _b = _a.className,
1699
- className = _b === void 0 ? '' : _b;
1700
- var label = count === 1 ? type.slice(0, -1) : type;
1849
+ const ResultsCount = ({
1850
+ count,
1851
+ type,
1852
+ className = ''
1853
+ }) => {
1854
+ const label = count === 1 ? type.slice(0, -1) : type;
1701
1855
  return /*#__PURE__*/React.createElement("span", {
1702
- className: "".concat(styles$a.resultsCount, " ").concat(className)
1856
+ className: `${styles$a.resultsCount} ${className}`
1703
1857
  }, count, " ", label);
1704
1858
  };
1705
1859
 
1706
1860
  var styles$9 = {"seeAllButton":"SeeAllLinkButton-module__seeAllButton___eAQqJ"};
1707
1861
 
1708
- var SeeAllLinkButton = function (_a) {
1709
- var onClick = _a.onClick,
1710
- _b = _a.label,
1711
- label = _b === void 0 ? 'See all results' : _b,
1712
- _c = _a.className,
1713
- className = _c === void 0 ? '' : _c;
1862
+ const SeeAllLinkButton = ({
1863
+ onClick,
1864
+ label = 'See all results',
1865
+ className = ''
1866
+ }) => {
1714
1867
  return /*#__PURE__*/React.createElement("button", {
1715
1868
  type: "button",
1716
1869
  onClick: onClick,
1717
- className: "".concat(styles$9.seeAllButton, " ").concat(className)
1870
+ className: `${styles$9.seeAllButton} ${className}`
1718
1871
  }, label, /*#__PURE__*/React.createElement("svg", {
1719
1872
  xmlns: "http://www.w3.org/2000/svg",
1720
1873
  viewBox: "0 0 24 24",
@@ -1731,17 +1884,17 @@ var SeeAllLinkButton = function (_a) {
1731
1884
 
1732
1885
  var styles$8 = {"resultsColumn":"ResultsColumn-module__resultsColumn___AexF5","columnHeader":"ResultsColumn-module__columnHeader___-aUWU","columnTitle":"ResultsColumn-module__columnTitle___Gddr-","resultsList":"ResultsColumn-module__resultsList___BkEie","columnFooter":"ResultsColumn-module__columnFooter___4zJUp","loadingState":"ResultsColumn-module__loadingState___wme5F","errorState":"ResultsColumn-module__errorState___NI4fW","emptyState":"ResultsColumn-module__emptyState___tvefj","spinner":"ResultsColumn-module__spinner___hhntn"};
1733
1886
 
1734
- var ResultsColumn = function (_a) {
1735
- var title = _a.title,
1736
- count = _a.count,
1737
- isLoading = _a.isLoading,
1738
- error = _a.error,
1739
- onSeeAll = _a.onSeeAll,
1740
- children = _a.children,
1741
- _b = _a.className,
1742
- className = _b === void 0 ? '' : _b;
1887
+ const ResultsColumn = ({
1888
+ title,
1889
+ count,
1890
+ isLoading,
1891
+ error,
1892
+ onSeeAll,
1893
+ children,
1894
+ className = ''
1895
+ }) => {
1743
1896
  return /*#__PURE__*/React.createElement("div", {
1744
- className: "".concat(styles$8.resultsColumn, " ").concat(className)
1897
+ className: `${styles$8.resultsColumn} ${className}`
1745
1898
  }, /*#__PURE__*/React.createElement("div", {
1746
1899
  className: styles$8.columnHeader
1747
1900
  }, /*#__PURE__*/React.createElement("h3", {
@@ -1764,7 +1917,7 @@ var ResultsColumn = function (_a) {
1764
1917
  className: styles$8.columnFooter
1765
1918
  }, /*#__PURE__*/React.createElement(SeeAllLinkButton, {
1766
1919
  onClick: onSeeAll,
1767
- label: "See all ".concat(title.toLowerCase())
1920
+ label: `See all ${title.toLowerCase()}`
1768
1921
  }))));
1769
1922
  };
1770
1923
 
@@ -1789,20 +1942,20 @@ const faXmark = {
1789
1942
  /**
1790
1943
  * FilterSearch - Search input for filtering facet values
1791
1944
  */
1792
- var FilterSearch = function (_a) {
1793
- var value = _a.value,
1794
- onChange = _a.onChange,
1795
- _b = _a.placeholder,
1796
- placeholder = _b === void 0 ? "Search" : _b,
1797
- className = _a.className;
1798
- var handleChange = function (e) {
1945
+ const FilterSearch = ({
1946
+ value,
1947
+ onChange,
1948
+ placeholder = "Search",
1949
+ className
1950
+ }) => {
1951
+ const handleChange = e => {
1799
1952
  onChange(e.target.value);
1800
1953
  };
1801
- var handleClear = function () {
1954
+ const handleClear = () => {
1802
1955
  onChange("");
1803
1956
  };
1804
1957
  return /*#__PURE__*/React.createElement("div", {
1805
- className: "".concat(styles$7.filterSearch, " ").concat(className || "")
1958
+ className: `${styles$7.filterSearch} ${className || ""}`
1806
1959
  }, !value && /*#__PURE__*/React.createElement(FontAwesomeIcon, {
1807
1960
  icon: faMagnifyingGlass,
1808
1961
  className: styles$7.searchIcon,
@@ -1824,43 +1977,49 @@ var FilterSearch = function (_a) {
1824
1977
  })));
1825
1978
  };
1826
1979
 
1827
- var CheckIcon = function () {
1828
- return /*#__PURE__*/React.createElement("svg", {
1829
- xmlns: "http://www.w3.org/2000/svg",
1830
- width: "9",
1831
- height: "7",
1832
- viewBox: "0 0 9 7",
1833
- fill: "none"
1834
- }, /*#__PURE__*/React.createElement("path", {
1835
- d: "M8.73456 0.104504C9.02185 0.279451 9.08614 0.615889 8.8772 0.856441L3.7342 6.77774C3.62371 6.90558 3.45294 6.98465 3.2641 6.99811C3.07525 7.01156 2.89244 6.95269 2.75984 6.84166L0.188342 4.68846C-0.0627808 4.47819 -0.0627808 4.13671 0.188342 3.92643C0.439465 3.71616 0.847289 3.71616 1.09841 3.92643L3.13753 5.63385L7.83856 0.222257C8.04749 -0.0182957 8.44929 -0.0721258 8.73658 0.102822L8.73456 0.104504Z",
1836
- fill: "#E2001A"
1837
- }));
1838
- };
1980
+ const CheckIcon = () => /*#__PURE__*/React.createElement("svg", {
1981
+ xmlns: "http://www.w3.org/2000/svg",
1982
+ width: "9",
1983
+ height: "7",
1984
+ viewBox: "0 0 9 7",
1985
+ fill: "none"
1986
+ }, /*#__PURE__*/React.createElement("path", {
1987
+ d: "M8.73456 0.104504C9.02185 0.279451 9.08614 0.615889 8.8772 0.856441L3.7342 6.77774C3.62371 6.90558 3.45294 6.98465 3.2641 6.99811C3.07525 7.01156 2.89244 6.95269 2.75984 6.84166L0.188342 4.68846C-0.0627808 4.47819 -0.0627808 4.13671 0.188342 3.92643C0.439465 3.71616 0.847289 3.71616 1.09841 3.92643L3.13753 5.63385L7.83856 0.222257C8.04749 -0.0182957 8.44929 -0.0721258 8.73658 0.102822L8.73456 0.104504Z",
1988
+ fill: "#E2001A"
1989
+ }));
1990
+
1839
1991
  /**
1840
1992
  * FilterItem - Individual facet item with checkbox and count
1841
1993
  */
1842
- var FilterItem = function (_a) {
1843
- var value = _a.value,
1844
- onToggle = _a.onToggle,
1845
- className = _a.className,
1846
- _b = _a.variant,
1847
- variant = _b === void 0 ? 'desktop' : _b,
1848
- _c = _a.showCheckbox,
1849
- showCheckbox = _c === void 0 ? true : _c;
1850
- var handleChange = function () {
1994
+ const FilterItem = ({
1995
+ value,
1996
+ onToggle,
1997
+ className,
1998
+ variant = 'desktop',
1999
+ showCheckbox = true
2000
+ }) => {
2001
+ const handleChange = () => {
1851
2002
  onToggle(value.value);
1852
2003
  };
1853
- var handleKeyDown = function (e) {
2004
+ const handleCheckboxKeyDown = e => {
2005
+ // Space toggles native checkboxes by default; add Enter support.
2006
+ if (e.key === "Enter") {
2007
+ e.preventDefault();
2008
+ handleChange();
2009
+ }
2010
+ };
2011
+ const handleKeyDown = e => {
1854
2012
  if (e.key === "Enter" || e.key === " ") {
1855
2013
  e.preventDefault();
1856
2014
  onToggle(value.value);
1857
2015
  }
1858
2016
  };
2017
+
1859
2018
  // Mobile variant: Plain button (no checkbox)
1860
2019
  if (variant === 'mobile') {
1861
2020
  return /*#__PURE__*/React.createElement("button", {
1862
2021
  type: "button",
1863
- className: "".concat(styles$7.filterItemMobile, " ").concat(value.isRefined ? styles$7.filterItemMobileRefined : '', " ").concat(className || ""),
2022
+ className: `${styles$7.filterItemMobile} ${value.isRefined ? styles$7.filterItemMobileRefined : ''} ${className || ""}`,
1864
2023
  onClick: handleChange,
1865
2024
  onKeyDown: handleKeyDown,
1866
2025
  "aria-pressed": value.isRefined
@@ -1870,11 +2029,12 @@ var FilterItem = function (_a) {
1870
2029
  className: styles$7.filterCount
1871
2030
  }, "(", value.count, ")"));
1872
2031
  }
2032
+
1873
2033
  // Desktop without checkbox (Content tab): Plain button with red text when selected
1874
2034
  if (!showCheckbox) {
1875
2035
  return /*#__PURE__*/React.createElement("button", {
1876
2036
  type: "button",
1877
- className: "".concat(styles$7.filterItemDesktopNoCheckbox, " ").concat(value.isRefined ? styles$7.filterItemDesktopRefined : '', " ").concat(className || ""),
2037
+ className: `${styles$7.filterItemDesktopNoCheckbox} ${value.isRefined ? styles$7.filterItemDesktopRefined : ''} ${className || ""}`,
1878
2038
  onClick: handleChange,
1879
2039
  onKeyDown: handleKeyDown,
1880
2040
  "aria-pressed": value.isRefined
@@ -1884,16 +2044,17 @@ var FilterItem = function (_a) {
1884
2044
  className: styles$7.filterCount
1885
2045
  }, "(", value.count, ")"));
1886
2046
  }
2047
+
1887
2048
  // Desktop with checkbox (Products tab): Multi-select checkboxes
1888
2049
  return /*#__PURE__*/React.createElement("label", {
1889
- className: "".concat(styles$7.filterItem, " ").concat(className || ""),
1890
- onKeyDown: handleKeyDown
2050
+ className: `${styles$7.filterItem} ${className || ""}`
1891
2051
  }, /*#__PURE__*/React.createElement("input", {
1892
2052
  type: "checkbox",
1893
2053
  checked: value.isRefined,
1894
2054
  onChange: handleChange,
2055
+ onKeyDown: handleCheckboxKeyDown,
1895
2056
  className: styles$7.filterCheckboxInput,
1896
- "aria-label": "".concat(value.value, " (").concat(value.count, " results)")
2057
+ "aria-label": `${value.value} (${value.count} results)`
1897
2058
  }), /*#__PURE__*/React.createElement("div", {
1898
2059
  className: styles$7.filterCheckbox
1899
2060
  }, value.isRefined && /*#__PURE__*/React.createElement(CheckIcon, null)), /*#__PURE__*/React.createElement("span", {
@@ -1906,58 +2067,54 @@ var FilterItem = function (_a) {
1906
2067
  /**
1907
2068
  * FilterAccordion - Collapsible facet section with optional search
1908
2069
  */
1909
- var FilterAccordion = function (_a) {
1910
- var facet = _a.facet,
1911
- isExpanded = _a.isExpanded,
1912
- onToggle = _a.onToggle,
1913
- onValueToggle = _a.onValueToggle,
1914
- className = _a.className,
1915
- _b = _a.variant,
1916
- variant = _b === void 0 ? 'desktop' : _b,
1917
- _c = _a.showCheckbox,
1918
- showCheckbox = _c === void 0 ? true : _c;
1919
- var _d = useState(""),
1920
- searchQuery = _d[0],
1921
- setSearchQuery = _d[1];
2070
+ const FilterAccordion = ({
2071
+ facet,
2072
+ isExpanded,
2073
+ onToggle,
2074
+ onValueToggle,
2075
+ className,
2076
+ variant = "desktop",
2077
+ showCheckbox = true
2078
+ }) => {
2079
+ const [searchQuery, setSearchQuery] = useState("");
2080
+
1922
2081
  // Filter facet values based on search query
1923
- var filteredValues = useMemo(function () {
2082
+ const filteredValues = useMemo(() => {
1924
2083
  if (!searchQuery.trim()) {
1925
2084
  return facet.values;
1926
2085
  }
1927
- var query = searchQuery.toLowerCase();
1928
- return facet.values.filter(function (value) {
1929
- return value.value.toLowerCase().includes(query);
1930
- });
2086
+ const query = searchQuery.toLowerCase();
2087
+ return facet.values.filter(value => value.value.toLowerCase().includes(query));
1931
2088
  }, [facet.values, searchQuery]);
1932
- var handleToggle = function () {
2089
+ const handleToggle = () => {
1933
2090
  onToggle();
1934
2091
  // Clear search when collapsing
1935
2092
  if (isExpanded) {
1936
2093
  setSearchQuery("");
1937
2094
  }
1938
2095
  };
1939
- var handleKeyDown = function (e) {
2096
+ const handleKeyDown = e => {
1940
2097
  if (e.key === "Enter" || e.key === " ") {
1941
2098
  e.preventDefault();
1942
2099
  handleToggle();
1943
2100
  }
1944
2101
  };
1945
- var handleValueToggle = function (value) {
2102
+ const handleValueToggle = value => {
1946
2103
  onValueToggle(facet.attribute, value);
1947
2104
  };
1948
2105
  return /*#__PURE__*/React.createElement("div", {
1949
- className: "".concat(styles$7.filterAccordion, " ").concat(className || "")
2106
+ className: `${styles$7.filterAccordion} ${className || ""}`
1950
2107
  }, /*#__PURE__*/React.createElement("button", {
1951
2108
  type: "button",
1952
- className: "".concat(styles$7.accordionHeader, " ").concat(isExpanded ? styles$7.accordionHeaderExpanded : ""),
2109
+ className: `${styles$7.accordionHeader} ${isExpanded ? styles$7.accordionHeaderExpanded : ""}`,
1953
2110
  onClick: handleToggle,
1954
2111
  onKeyDown: handleKeyDown,
1955
2112
  "aria-expanded": isExpanded,
1956
- "aria-controls": "accordion-".concat(facet.id)
2113
+ "aria-controls": `accordion-${facet.id}`
1957
2114
  }, /*#__PURE__*/React.createElement("span", {
1958
2115
  className: styles$7.accordionTitle
1959
2116
  }, facet.label), /*#__PURE__*/React.createElement("svg", {
1960
- className: "".concat(styles$7.accordionIcon, " ").concat(isExpanded ? styles$7.accordionIconExpanded : ""),
2117
+ className: `${styles$7.accordionIcon} ${isExpanded ? styles$7.accordionIconExpanded : ""}`,
1961
2118
  width: "16",
1962
2119
  height: "16",
1963
2120
  viewBox: "0 0 16 16",
@@ -1971,9 +2128,9 @@ var FilterAccordion = function (_a) {
1971
2128
  strokeLinecap: "round",
1972
2129
  strokeLinejoin: "round"
1973
2130
  }))), isExpanded && /*#__PURE__*/React.createElement("div", {
1974
- id: "accordion-".concat(facet.id),
2131
+ id: `accordion-${facet.id}`,
1975
2132
  className: styles$7.accordionContent
1976
- }, variant === 'desktop' && facet.searchable && facet.values.length > 5 && /*#__PURE__*/React.createElement("div", {
2133
+ }, facet.searchable && facet.values.length > 5 && (variant === "desktop" || variant === "mobile" && showCheckbox) && /*#__PURE__*/React.createElement("div", {
1977
2134
  className: styles$7.accordionSearch
1978
2135
  }, /*#__PURE__*/React.createElement(FilterSearch, {
1979
2136
  value: searchQuery,
@@ -1981,15 +2138,13 @@ var FilterAccordion = function (_a) {
1981
2138
  placeholder: "Search"
1982
2139
  })), /*#__PURE__*/React.createElement("div", {
1983
2140
  className: styles$7.filterList
1984
- }, filteredValues.length > 0 ? filteredValues.map(function (value) {
1985
- return /*#__PURE__*/React.createElement(FilterItem, {
1986
- key: value.value,
1987
- value: value,
1988
- onToggle: handleValueToggle,
1989
- variant: variant,
1990
- showCheckbox: showCheckbox
1991
- });
1992
- }) : /*#__PURE__*/React.createElement("div", {
2141
+ }, filteredValues.length > 0 ? filteredValues.map(value => /*#__PURE__*/React.createElement(FilterItem, {
2142
+ key: value.value,
2143
+ value: value,
2144
+ onToggle: handleValueToggle,
2145
+ variant: variant,
2146
+ showCheckbox: showCheckbox
2147
+ })) : /*#__PURE__*/React.createElement("div", {
1993
2148
  className: styles$7.noResults
1994
2149
  }, "No results found"))));
1995
2150
  };
@@ -1997,23 +2152,24 @@ var FilterAccordion = function (_a) {
1997
2152
  /**
1998
2153
  * AppliedFilterTag - Individual removable filter tag/chip
1999
2154
  */
2000
- var AppliedFilterTag = function (_a) {
2001
- var attribute = _a.attribute,
2002
- value = _a.value,
2003
- label = _a.label,
2004
- onRemove = _a.onRemove,
2005
- className = _a.className;
2006
- var handleRemove = function () {
2155
+ const AppliedFilterTag = ({
2156
+ attribute,
2157
+ value,
2158
+ label,
2159
+ onRemove,
2160
+ className
2161
+ }) => {
2162
+ const handleRemove = () => {
2007
2163
  onRemove(attribute, value);
2008
2164
  };
2009
- var handleKeyDown = function (e) {
2165
+ const handleKeyDown = e => {
2010
2166
  if (e.key === "Enter" || e.key === " ") {
2011
2167
  e.preventDefault();
2012
2168
  handleRemove();
2013
2169
  }
2014
2170
  };
2015
2171
  return /*#__PURE__*/React.createElement("div", {
2016
- className: "".concat(styles$7.appliedFilterTag, " ").concat(className || "")
2172
+ className: `${styles$7.appliedFilterTag} ${className || ""}`
2017
2173
  }, /*#__PURE__*/React.createElement("span", {
2018
2174
  className: styles$7.tagLabel
2019
2175
  }, label || value), /*#__PURE__*/React.createElement("button", {
@@ -2021,7 +2177,7 @@ var AppliedFilterTag = function (_a) {
2021
2177
  onClick: handleRemove,
2022
2178
  onKeyDown: handleKeyDown,
2023
2179
  className: styles$7.tagRemoveButton,
2024
- "aria-label": "Remove ".concat(label || value, " filter")
2180
+ "aria-label": `Remove ${label || value} filter`
2025
2181
  }, /*#__PURE__*/React.createElement("svg", {
2026
2182
  width: "10",
2027
2183
  height: "10",
@@ -2041,16 +2197,17 @@ var AppliedFilterTag = function (_a) {
2041
2197
  /**
2042
2198
  * AppliedFilters - Shows all active filters as removable tags
2043
2199
  */
2044
- var AppliedFilters = function (_a) {
2045
- var facets = _a.facets,
2046
- onRemove = _a.onRemove;
2047
- _a.onClearAll;
2048
- var className = _a.className;
2200
+ const AppliedFilters = ({
2201
+ facets,
2202
+ onRemove,
2203
+ onClearAll,
2204
+ className
2205
+ }) => {
2049
2206
  // Extract all refined (selected) filters
2050
- var appliedFilters = useMemo(function () {
2051
- var filters = [];
2052
- facets.forEach(function (facet) {
2053
- facet.values.forEach(function (value) {
2207
+ const appliedFilters = useMemo(() => {
2208
+ const filters = [];
2209
+ facets.forEach(facet => {
2210
+ facet.values.forEach(value => {
2054
2211
  if (value.isRefined) {
2055
2212
  filters.push({
2056
2213
  attribute: facet.attribute,
@@ -2063,25 +2220,24 @@ var AppliedFilters = function (_a) {
2063
2220
  });
2064
2221
  return filters;
2065
2222
  }, [facets]);
2223
+
2066
2224
  // Don't render if no filters are applied
2067
2225
  if (appliedFilters.length === 0) {
2068
2226
  return null;
2069
2227
  }
2070
2228
  return /*#__PURE__*/React.createElement("div", {
2071
- className: "".concat(styles$7.appliedFilters, " ").concat(className || "")
2229
+ className: `${styles$7.appliedFilters} ${className || ""}`
2072
2230
  }, /*#__PURE__*/React.createElement("h4", {
2073
2231
  className: styles$7.appliedFiltersTitle
2074
2232
  }, "Applied filters"), /*#__PURE__*/React.createElement("div", {
2075
2233
  className: styles$7.appliedFiltersList
2076
- }, appliedFilters.map(function (filter) {
2077
- return /*#__PURE__*/React.createElement(AppliedFilterTag, {
2078
- key: "".concat(filter.attribute, "-").concat(filter.value),
2079
- attribute: filter.attribute,
2080
- value: filter.value,
2081
- label: filter.label,
2082
- onRemove: onRemove
2083
- });
2084
- })));
2234
+ }, appliedFilters.map(filter => /*#__PURE__*/React.createElement(AppliedFilterTag, {
2235
+ key: `${filter.attribute}-${filter.value}`,
2236
+ attribute: filter.attribute,
2237
+ value: filter.value,
2238
+ label: filter.label,
2239
+ onRemove: onRemove
2240
+ }))));
2085
2241
  };
2086
2242
 
2087
2243
  /**
@@ -2091,44 +2247,39 @@ var AppliedFilters = function (_a) {
2091
2247
  * When facets change (e.g., after API refetch), component re-renders with new data.
2092
2248
  * Accordion expansion state persists across refetches, with new facets respecting defaultExpanded.
2093
2249
  */
2094
- var FiltersPanel = function (_a) {
2095
- var facets = _a.facets,
2096
- onFacetToggle = _a.onFacetToggle,
2097
- _b = _a.isLoading,
2098
- isLoading = _b === void 0 ? false : _b,
2099
- className = _a.className,
2100
- _c = _a.variant,
2101
- variant = _c === void 0 ? 'desktop' : _c,
2102
- _d = _a.showCheckbox,
2103
- showCheckbox = _d === void 0 ? true : _d;
2250
+ const FiltersPanel = ({
2251
+ facets,
2252
+ onFacetToggle,
2253
+ isLoading = false,
2254
+ className,
2255
+ variant = 'desktop',
2256
+ showCheckbox = true
2257
+ }) => {
2104
2258
  // Track which accordions are expanded (transient UI state)
2105
- var _e = useState(function () {
2106
- // Initialize with default expanded facets
2107
- var expanded = new Set();
2108
- facets.forEach(function (facet) {
2109
- if (facet.defaultExpanded) {
2110
- expanded.add(facet.id);
2111
- }
2112
- });
2113
- return expanded;
2114
- }),
2115
- expandedAccordions = _e[0],
2116
- setExpandedAccordions = _e[1];
2259
+ const [expandedAccordions, setExpandedAccordions] = useState(() => {
2260
+ // Initialize with default expanded facets
2261
+ const expanded = new Set();
2262
+ facets.forEach(facet => {
2263
+ if (facet.defaultExpanded) {
2264
+ expanded.add(facet.id);
2265
+ }
2266
+ });
2267
+ return expanded;
2268
+ });
2269
+
2117
2270
  // Sync expansion state when facets change (e.g., new facets appear after refetch)
2118
- useEffect(function () {
2119
- setExpandedAccordions(function (prev) {
2120
- var next = new Set(prev);
2271
+ useEffect(() => {
2272
+ setExpandedAccordions(prev => {
2273
+ const next = new Set(prev);
2121
2274
  // Add new facets with defaultExpanded
2122
- facets.forEach(function (facet) {
2275
+ facets.forEach(facet => {
2123
2276
  if (facet.defaultExpanded && !next.has(facet.id)) {
2124
2277
  next.add(facet.id);
2125
2278
  }
2126
2279
  });
2127
2280
  // Remove facets that no longer exist
2128
- var currentFacetIds = new Set(facets.map(function (f) {
2129
- return f.id;
2130
- }));
2131
- next.forEach(function (id) {
2281
+ const currentFacetIds = new Set(facets.map(f => f.id));
2282
+ next.forEach(id => {
2132
2283
  if (!currentFacetIds.has(id)) {
2133
2284
  next.delete(id);
2134
2285
  }
@@ -2136,9 +2287,9 @@ var FiltersPanel = function (_a) {
2136
2287
  return next;
2137
2288
  });
2138
2289
  }, [facets]);
2139
- var handleAccordionToggle = useCallback(function (facetId) {
2140
- setExpandedAccordions(function (prev) {
2141
- var next = new Set(prev);
2290
+ const handleAccordionToggle = useCallback(facetId => {
2291
+ setExpandedAccordions(prev => {
2292
+ const next = new Set(prev);
2142
2293
  if (next.has(facetId)) {
2143
2294
  next.delete(facetId);
2144
2295
  } else {
@@ -2147,16 +2298,16 @@ var FiltersPanel = function (_a) {
2147
2298
  return next;
2148
2299
  });
2149
2300
  }, []);
2150
- var handleValueToggle = useCallback(function (attribute, value) {
2301
+ const handleValueToggle = useCallback((attribute, value) => {
2151
2302
  onFacetToggle(attribute, value);
2152
2303
  }, [onFacetToggle]);
2153
- var handleRemoveFilter = useCallback(function (attribute, value) {
2304
+ const handleRemoveFilter = useCallback((attribute, value) => {
2154
2305
  onFacetToggle(attribute, value);
2155
2306
  }, [onFacetToggle]);
2156
- var handleClearAll = useCallback(function () {
2307
+ const handleClearAll = useCallback(() => {
2157
2308
  // Remove all refined facets
2158
- facets.forEach(function (facet) {
2159
- facet.values.forEach(function (value) {
2309
+ facets.forEach(facet => {
2310
+ facet.values.forEach(value => {
2160
2311
  if (value.isRefined) {
2161
2312
  onFacetToggle(facet.attribute, value.value);
2162
2313
  }
@@ -2165,7 +2316,7 @@ var FiltersPanel = function (_a) {
2165
2316
  }, [facets, onFacetToggle]);
2166
2317
  if (isLoading) {
2167
2318
  return /*#__PURE__*/React.createElement("div", {
2168
- className: "".concat(styles$7.filtersPanel, " ").concat(className || "")
2319
+ className: `${styles$7.filtersPanel} ${className || ""}`
2169
2320
  }, /*#__PURE__*/React.createElement("div", {
2170
2321
  className: styles$7.loadingState
2171
2322
  }, /*#__PURE__*/React.createElement("div", {
@@ -2176,29 +2327,32 @@ var FiltersPanel = function (_a) {
2176
2327
  return null;
2177
2328
  }
2178
2329
  return /*#__PURE__*/React.createElement("div", {
2179
- className: "".concat(styles$7.filtersPanel, " ").concat(className || "")
2330
+ className: `${styles$7.filtersPanel} ${className || ""}`
2180
2331
  }, showCheckbox && /*#__PURE__*/React.createElement(AppliedFilters, {
2181
2332
  facets: facets,
2182
2333
  onRemove: handleRemoveFilter,
2183
2334
  onClearAll: handleClearAll
2184
2335
  }), /*#__PURE__*/React.createElement("div", {
2185
2336
  className: styles$7.filtersList
2186
- }, facets.map(function (facet) {
2187
- return /*#__PURE__*/React.createElement(FilterAccordion, {
2188
- key: facet.id,
2189
- facet: facet,
2190
- isExpanded: expandedAccordions.has(facet.id),
2191
- onToggle: function () {
2192
- return handleAccordionToggle(facet.id);
2193
- },
2194
- onValueToggle: handleValueToggle,
2195
- variant: variant,
2196
- showCheckbox: showCheckbox
2197
- });
2198
- })));
2337
+ }, facets.map(facet => /*#__PURE__*/React.createElement(FilterAccordion, {
2338
+ key: facet.id,
2339
+ facet: facet,
2340
+ isExpanded: expandedAccordions.has(facet.id),
2341
+ onToggle: () => handleAccordionToggle(facet.id),
2342
+ onValueToggle: handleValueToggle,
2343
+ variant: variant,
2344
+ showCheckbox: showCheckbox
2345
+ }))));
2199
2346
  };
2200
2347
 
2201
- var styles$6 = {"productCardVertical":"ProductCardVertical-module__productCardVertical___kXgmt","productCardVertical--hover":"ProductCardVertical-module__productCardVertical--hover___8Nsyp","productCardVertical__button":"ProductCardVertical-module__productCardVertical__button___oQPJG","productCardVertical--focus":"ProductCardVertical-module__productCardVertical--focus___8U57I","productCardVertical__imageWrapper":"ProductCardVertical-module__productCardVertical__imageWrapper___SgKoZ","productCardVertical__image":"ProductCardVertical-module__productCardVertical__image___kg-QU","productCardVertical__content":"ProductCardVertical-module__productCardVertical__content___sZdOs","productCardVertical__title":"ProductCardVertical-module__productCardVertical__title___PPKWb","productCardVertical__description":"ProductCardVertical-module__productCardVertical__description___Ai90p","productCardVertical__footer":"ProductCardVertical-module__productCardVertical__footer___rv6BH"};
2348
+ var styles$6 = {"productCardVertical":"ProductCardVertical-module__productCardVertical___kXgmt","productCardVertical--hover":"ProductCardVertical-module__productCardVertical--hover___8Nsyp","productCardVertical__button":"ProductCardVertical-module__productCardVertical__button___oQPJG","productCardVertical--focus":"ProductCardVertical-module__productCardVertical--focus___8U57I","productCardVertical__imageWrapper":"ProductCardVertical-module__productCardVertical__imageWrapper___SgKoZ","productCardVertical__image":"ProductCardVertical-module__productCardVertical__image___kg-QU","productCardVertical__placeholderImage":"ProductCardVertical-module__productCardVertical__placeholderImage___w0sd0","productCardVertical__content":"ProductCardVertical-module__productCardVertical__content___sZdOs","productCardVertical__title":"ProductCardVertical-module__productCardVertical__title___PPKWb","productCardVertical__description":"ProductCardVertical-module__productCardVertical__description___Ai90p","productCardVertical__footer":"ProductCardVertical-module__productCardVertical__footer___rv6BH"};
2349
+
2350
+ const PLACEHOLDER_INDICATOR = "?placeholder-storybook";
2351
+ const PLACEHOLDER_SVG = `<svg xmlns="http://www.w3.org/2000/svg" width="440" height="133" viewBox="218.446 219.139 440 133" role="img" aria-label="Leybold placeholder logo"><g fill="#ffff"><path d="M290.317,313.442h37.784v12.782h-53.654v-70.62h15.87V313.442z"/><path d="M386.309,310.883c-3.912,12.593-15.135,16.722-24.761,16.722c-15.878,0-28.046-7.084-28.046-28.62c0-6.296,2.322-26.458,26.98-26.458c11.116,0,26.457,4.917,26.457,28.819v2.457h-38.626c0.428,3.935,1.274,12.785,13.232,12.785c4.125,0,8.356-1.965,9.521-5.704L386.309,310.883L386.309,310.883z M371.709,294.852c-0.85-8.456-6.666-11.017-11.434-11.017c-6.979,0-10.686,4.129-11.532,11.017H371.709z"/><path d="M423.556,325.343c-6.986,19.374-8.892,21.932-21.799,21.932c-2.014,0-4.553-0.096-6.665-0.194v-11.02c0.629,0.104,1.582,0.197,2.854,0.197c5.397,0,8.36-0.688,9.737-7.864l-20.741-54.488h16.508l12.062,38.553h0.209l11.539-38.553h15.658L423.556,325.343z"/><path d="M463.54,280.689h0.213c2.328-3.344,6.775-8.164,16.297-8.164c12.385,0,23.389,8.854,23.389,26.949c0,14.359-6.98,28.129-23.703,28.129c-6.141,0-12.701-2.067-16.299-7.968h-0.211v6.589h-14.498v-70.62h14.812V280.689z M475.604,284.427c-10.158,0-12.701,8.455-12.701,16.815c0,7.773,3.707,15.049,13.129,15.049c9.521,0,12.168-9.641,12.168-15.83C488.198,292.192,485.02,284.427,475.604,284.427z"/><path d="M538.094,327.604c-15.141,0-28.787-8.652-28.787-27.542c0-18.881,13.646-27.536,28.787-27.536c15.129,0,28.785,8.655,28.785,27.536C566.88,318.95,553.223,327.604,538.094,327.604z M538.094,284.129c-11.434,0-13.547,9.244-13.547,15.934c0,6.691,2.113,15.939,13.547,15.939c11.426,0,13.547-9.248,13.547-15.939C551.641,293.373,549.52,284.129,538.094,284.129z"/><path d="M588.811,326.225h-14.814v-70.62h14.814V326.225z"/><path d="M651.969,326.225h-14.5v-6.589h-0.213c-3.598,5.898-10.156,7.968-16.295,7.968c-16.727,0-23.703-13.77-23.703-28.129c0-18.097,11.004-26.949,23.381-26.949c9.523,0,13.975,4.82,16.295,8.164h0.221v-25.085h14.814V326.225z M624.663,316.291c9.418,0,13.121-7.273,13.121-15.05c0-8.359-2.537-16.814-12.703-16.814c-9.416,0-12.592,7.767-12.592,16.034C612.49,306.651,615.135,316.291,624.663,316.291z"/></g><g fill="#ffff"><path d="M268.323,226.771h-41.551v39.685C230.996,246.516,247.442,230.811,268.323,226.771z"/><path d="M226.771,286.726v39.688h41.551C247.442,322.371,230.996,306.67,226.771,286.726z"/><path d="M331.122,266.455V226.77h-41.552C310.449,230.811,326.892,246.516,331.122,266.455z"/></g></svg>`;
2352
+ const PLACEHOLDER_IMAGE_DATA_URI = `data:image/svg+xml,${encodeURIComponent(PLACEHOLDER_SVG)}`;
2353
+ const isPlaceholderImg = url => {
2354
+ return !!url && url.includes(PLACEHOLDER_INDICATOR);
2355
+ };
2202
2356
 
2203
2357
  /**
2204
2358
  * ProductCardVertical - Vertical product card for grid layouts
@@ -2218,41 +2372,45 @@ var styles$6 = {"productCardVertical":"ProductCardVertical-module__productCardVe
2218
2372
  * />
2219
2373
  * ```
2220
2374
  */
2221
- var ProductCardVertical = function (_a) {
2222
- var _b;
2223
- var id = _a.id,
2224
- title = _a.title,
2225
- url = _a.url,
2226
- imageUrl = _a.imageUrl;
2227
- _a.productId;
2228
- var description = _a.description,
2229
- _c = _a.buttonLabel,
2230
- buttonLabel = _c === void 0 ? 'BUY ONLINE' : _c,
2231
- onButtonClick = _a.onButtonClick,
2232
- className = _a.className,
2233
- _d = _a.variant,
2234
- variant = _d === void 0 ? 'desktop' : _d,
2235
- forceState = _a["data-force-state"];
2236
- var handleButtonClick = function (e) {
2375
+ const ProductCardVertical = ({
2376
+ id,
2377
+ title,
2378
+ url,
2379
+ imageUrl,
2380
+ productId,
2381
+ description,
2382
+ buttonLabel = "BUY ONLINE",
2383
+ onButtonClick,
2384
+ className,
2385
+ variant = "desktop",
2386
+ "data-force-state": forceState
2387
+ }) => {
2388
+ const hasPlaceholderImage = !imageUrl || isPlaceholderImg(imageUrl);
2389
+ const productImage = hasPlaceholderImage ? PLACEHOLDER_IMAGE_DATA_URI : imageUrl;
2390
+ const handleButtonClick = e => {
2237
2391
  e.preventDefault(); // Prevent card link navigation
2238
2392
  e.stopPropagation(); // Stop event bubbling
2239
- onButtonClick === null || onButtonClick === void 0 ? void 0 : onButtonClick();
2393
+ onButtonClick?.();
2240
2394
  };
2241
- var cardClasses = classNames(styles$6.productCardVertical, styles$6["productCardVertical--".concat(variant)], (_b = {}, _b[styles$6['productCardVertical--hover']] = forceState === 'hover', _b[styles$6['productCardVertical--focus']] = forceState === 'focus', _b), className);
2395
+ const cardClasses = classNames(styles$6.productCardVertical, styles$6[`productCardVertical--${variant}`], {
2396
+ [styles$6["productCardVertical--hover"]]: forceState === "hover",
2397
+ [styles$6["productCardVertical--focus"]]: forceState === "focus"
2398
+ }, className);
2242
2399
  return /*#__PURE__*/React.createElement("a", {
2243
2400
  href: url,
2244
2401
  className: cardClasses,
2245
- "aria-label": "View product: ".concat(title),
2402
+ "aria-label": `View product: ${title}`,
2246
2403
  "data-product-id": id
2247
- }, imageUrl && /*#__PURE__*/React.createElement("div", {
2404
+ }, /*#__PURE__*/React.createElement("div", {
2248
2405
  className: styles$6.productCardVertical__imageWrapper
2249
2406
  }, /*#__PURE__*/React.createElement(Image, {
2250
- src: imageUrl,
2407
+ src: productImage,
2251
2408
  alt: title,
2252
- className: styles$6.productCardVertical__image,
2409
+ className: styles$6.productCardVertical__image + (hasPlaceholderImage ? ` ${styles$6.productCardVertical__placeholderImage}` : ""),
2253
2410
  objectFit: "contain",
2254
2411
  objectPosition: "center",
2255
- loading: "lazy"
2412
+ loading: "lazy",
2413
+ fallbackSrc: PLACEHOLDER_IMAGE_DATA_URI
2256
2414
  })), /*#__PURE__*/React.createElement("div", {
2257
2415
  className: styles$6.productCardVertical__content
2258
2416
  }, /*#__PURE__*/React.createElement("h3", {
@@ -2263,7 +2421,7 @@ var ProductCardVertical = function (_a) {
2263
2421
  type: "button",
2264
2422
  onClick: handleButtonClick,
2265
2423
  className: styles$6.productCardVertical__button,
2266
- "aria-label": "".concat(buttonLabel, " - ").concat(title),
2424
+ "aria-label": `${buttonLabel} - ${title}`,
2267
2425
  tabIndex: -1
2268
2426
  }, /*#__PURE__*/React.createElement("span", null, buttonLabel), /*#__PURE__*/React.createElement(FontAwesomeIcon, {
2269
2427
  icon: faArrowUpRightFromSquare$1,
@@ -2271,21 +2429,19 @@ var ProductCardVertical = function (_a) {
2271
2429
  })));
2272
2430
  };
2273
2431
 
2274
- var styles$5 = {"resultsView":"ResultsView-module__resultsView___S4Wh2","searchBarWrapper":"ResultsView-module__searchBarWrapper___XNtwR","tabsContainer":"ResultsView-module__tabsContainer___mB-Q2","tabs":"ResultsView-module__tabs___rOexd","tabSeparator":"ResultsView-module__tabSeparator___MSq9p","mobileFilterButton":"ResultsView-module__mobileFilterButton___ZrMQY","resultsContainer":"ResultsView-module__resultsContainer___J4URa","sidebar":"ResultsView-module__sidebar___nQq5J","assistanceBanner":"ResultsView-module__assistanceBanner___1r72a","mainContent":"ResultsView-module__mainContent___S9eIG","productsGrid":"ResultsView-module__productsGrid___gnAQ-","contentsList":"ResultsView-module__contentsList___tcfNG","contentDivider":"ResultsView-module__contentDivider___5n6sl","resultsList":"ResultsView-module__resultsList___8eYNX","resultsSection":"ResultsView-module__resultsSection___sCUaO","sectionTitle":"ResultsView-module__sectionTitle___mfvH3","loadingState":"ResultsView-module__loadingState___W5YXx","errorState":"ResultsView-module__errorState___UkkG-","emptyState":"ResultsView-module__emptyState___D0Iyn","spinner":"ResultsView-module__spinner___nk8E5","emptyIcon":"ResultsView-module__emptyIcon___fes8T","paginationWrapper":"ResultsView-module__paginationWrapper___mDTyl","searchBarDesktopOnly":"ResultsView-module__searchBarDesktopOnly___dZHUw","tabsContainerDesktopOnly":"ResultsView-module__tabsContainerDesktopOnly___-MQpa"};
2275
-
2276
- var ResultsList = function (_a) {
2277
- var type = _a.type,
2278
- _b = _a.products,
2279
- products = _b === void 0 ? [] : _b,
2280
- _c = _a.contents,
2281
- contents = _c === void 0 ? [] : _c,
2282
- isLoading = _a.isLoading,
2283
- error = _a.error,
2284
- _d = _a.className,
2285
- className = _d === void 0 ? '' : _d;
2432
+ var styles$5 = {"resultsView":"ResultsView-module__resultsView___S4Wh2","searchBarWrapper":"ResultsView-module__searchBarWrapper___XNtwR","tabsContainer":"ResultsView-module__tabsContainer___mB-Q2","tabs":"ResultsView-module__tabs___rOexd","mobileFilterButton":"ResultsView-module__mobileFilterButton___ZrMQY","resultsContainer":"ResultsView-module__resultsContainer___J4URa","sidebar":"ResultsView-module__sidebar___nQq5J","assistanceBanner":"ResultsView-module__assistanceBanner___1r72a","mainContent":"ResultsView-module__mainContent___S9eIG","productsGrid":"ResultsView-module__productsGrid___gnAQ-","contentsList":"ResultsView-module__contentsList___tcfNG","contentDivider":"ResultsView-module__contentDivider___5n6sl","resultsList":"ResultsView-module__resultsList___8eYNX","resultsSection":"ResultsView-module__resultsSection___sCUaO","sectionTitle":"ResultsView-module__sectionTitle___mfvH3","loadingState":"ResultsView-module__loadingState___W5YXx","errorState":"ResultsView-module__errorState___UkkG-","emptyState":"ResultsView-module__emptyState___D0Iyn","spinner":"ResultsView-module__spinner___nk8E5","emptyIcon":"ResultsView-module__emptyIcon___fes8T","paginationWrapper":"ResultsView-module__paginationWrapper___mDTyl","searchBarDesktopOnly":"ResultsView-module__searchBarDesktopOnly___dZHUw","tabsContainerDesktopOnly":"ResultsView-module__tabsContainerDesktopOnly___-MQpa"};
2433
+
2434
+ const ResultsList = ({
2435
+ type,
2436
+ products = [],
2437
+ contents = [],
2438
+ isLoading,
2439
+ error,
2440
+ className = ''
2441
+ }) => {
2286
2442
  if (isLoading) {
2287
2443
  return /*#__PURE__*/React.createElement("div", {
2288
- className: "".concat(styles$5.loadingState, " ").concat(className)
2444
+ className: `${styles$5.loadingState} ${className}`
2289
2445
  }, /*#__PURE__*/React.createElement("div", {
2290
2446
  className: styles$5.spinner,
2291
2447
  "aria-label": "Loading..."
@@ -2293,15 +2449,15 @@ var ResultsList = function (_a) {
2293
2449
  }
2294
2450
  if (error) {
2295
2451
  return /*#__PURE__*/React.createElement("div", {
2296
- className: "".concat(styles$5.errorState, " ").concat(className)
2452
+ className: `${styles$5.errorState} ${className}`
2297
2453
  }, /*#__PURE__*/React.createElement("p", null, error));
2298
2454
  }
2299
- var hasProducts = products.length > 0;
2300
- var hasContents = contents.length > 0;
2301
- var hasResults = hasProducts || hasContents;
2455
+ const hasProducts = products.length > 0;
2456
+ const hasContents = contents.length > 0;
2457
+ const hasResults = hasProducts || hasContents;
2302
2458
  if (!hasResults) {
2303
2459
  return /*#__PURE__*/React.createElement("div", {
2304
- className: "".concat(styles$5.emptyState, " ").concat(className)
2460
+ className: `${styles$5.emptyState} ${className}`
2305
2461
  }, /*#__PURE__*/React.createElement("svg", {
2306
2462
  xmlns: "http://www.w3.org/2000/svg",
2307
2463
  viewBox: "0 0 24 24",
@@ -2319,61 +2475,55 @@ var ResultsList = function (_a) {
2319
2475
  d: "m21 21-4.35-4.35"
2320
2476
  })), /*#__PURE__*/React.createElement("h3", null, "No results found"), /*#__PURE__*/React.createElement("p", null, "Try adjusting your search or filters to find what you're looking for."));
2321
2477
  }
2478
+
2322
2479
  // Render based on type
2323
2480
  if (type === 'products') {
2324
2481
  return /*#__PURE__*/React.createElement("div", {
2325
- className: "".concat(styles$5.productsGrid, " ").concat(className)
2326
- }, products.map(function (product) {
2327
- return /*#__PURE__*/React.createElement(ProductCardVertical, _extends({
2328
- key: product.id
2329
- }, product, {
2330
- buttonLabel: "BUY ONLINE"
2331
- }));
2332
- }));
2482
+ className: `${styles$5.productsGrid} ${className}`
2483
+ }, products.map(product => /*#__PURE__*/React.createElement(ProductCardVertical, _extends({
2484
+ key: product.id
2485
+ }, product, {
2486
+ buttonLabel: "BUY ONLINE"
2487
+ }))));
2333
2488
  }
2334
2489
  if (type === 'content') {
2335
2490
  return /*#__PURE__*/React.createElement("div", {
2336
- className: "".concat(styles$5.contentsList, " ").concat(className)
2337
- }, contents.map(function (content, index) {
2338
- return /*#__PURE__*/React.createElement(React.Fragment, {
2339
- key: content.id
2340
- }, index > 0 && /*#__PURE__*/React.createElement("hr", {
2341
- className: styles$5.contentDivider
2342
- }), /*#__PURE__*/React.createElement(ContentCardHorizontal, _extends({}, content, {
2343
- variant: "results-view"
2344
- })));
2345
- }));
2491
+ className: `${styles$5.contentsList} ${className}`
2492
+ }, contents.map((content, index) => /*#__PURE__*/React.createElement(React.Fragment, {
2493
+ key: content.id
2494
+ }, index > 0 && /*#__PURE__*/React.createElement("hr", {
2495
+ className: styles$5.contentDivider
2496
+ }), /*#__PURE__*/React.createElement(ContentCardHorizontal, _extends({}, content, {
2497
+ variant: "results-view"
2498
+ })))));
2346
2499
  }
2500
+
2347
2501
  // type === 'all' - Show mixed results (not in current Figma design, but keep for compatibility)
2348
2502
  return /*#__PURE__*/React.createElement("div", {
2349
- className: "".concat(styles$5.resultsList, " ").concat(className)
2503
+ className: `${styles$5.resultsList} ${className}`
2350
2504
  }, hasProducts && /*#__PURE__*/React.createElement("div", {
2351
2505
  className: styles$5.resultsSection
2352
2506
  }, /*#__PURE__*/React.createElement("h3", {
2353
2507
  className: styles$5.sectionTitle
2354
2508
  }, "Products (", products.length, ")"), /*#__PURE__*/React.createElement("div", {
2355
2509
  className: styles$5.productsGrid
2356
- }, products.map(function (product) {
2357
- return /*#__PURE__*/React.createElement(ProductCardVertical, _extends({
2358
- key: product.id
2359
- }, product, {
2360
- buttonLabel: "BUY ONLINE"
2361
- }));
2362
- }))), hasContents && /*#__PURE__*/React.createElement("div", {
2510
+ }, products.map(product => /*#__PURE__*/React.createElement(ProductCardVertical, _extends({
2511
+ key: product.id
2512
+ }, product, {
2513
+ buttonLabel: "BUY ONLINE"
2514
+ }))))), hasContents && /*#__PURE__*/React.createElement("div", {
2363
2515
  className: styles$5.resultsSection
2364
2516
  }, /*#__PURE__*/React.createElement("h3", {
2365
2517
  className: styles$5.sectionTitle
2366
2518
  }, "Content (", contents.length, ")"), /*#__PURE__*/React.createElement("div", {
2367
2519
  className: styles$5.contentsList
2368
- }, contents.map(function (content, index) {
2369
- return /*#__PURE__*/React.createElement(React.Fragment, {
2370
- key: content.id
2371
- }, index > 0 && /*#__PURE__*/React.createElement("hr", {
2372
- className: styles$5.contentDivider
2373
- }), /*#__PURE__*/React.createElement(ContentCardHorizontal, _extends({}, content, {
2374
- variant: "results-view"
2375
- })));
2376
- }))));
2520
+ }, contents.map((content, index) => /*#__PURE__*/React.createElement(React.Fragment, {
2521
+ key: content.id
2522
+ }, index > 0 && /*#__PURE__*/React.createElement("hr", {
2523
+ className: styles$5.contentDivider
2524
+ }), /*#__PURE__*/React.createElement(ContentCardHorizontal, _extends({}, content, {
2525
+ variant: "results-view"
2526
+ })))))));
2377
2527
  };
2378
2528
 
2379
2529
  var styles$4 = {"tabButton":"TabButton-module__tabButton___cMU45","tabButton__count":"TabButton-module__tabButton__count___nlS1p","tabButton__label":"TabButton-module__tabButton__label___YGpiC","tabButton__results":"TabButton-module__tabButton__results___Nr6gr","tabButton--desktop":"TabButton-module__tabButton--desktop___fbAaC","tabButton--active":"TabButton-module__tabButton--active___gj6Jp","tabButton--mobile":"TabButton-module__tabButton--mobile___AnLwy"};
@@ -2405,25 +2555,27 @@ var styles$4 = {"tabButton":"TabButton-module__tabButton___cMU45","tabButton__co
2405
2555
  * />
2406
2556
  * ```
2407
2557
  */
2408
- var TabButton = function (_a) {
2409
- var _b;
2410
- var label = _a.label,
2411
- count = _a.count,
2412
- isActive = _a.isActive,
2413
- onClick = _a.onClick,
2414
- _c = _a.variant,
2415
- variant = _c === void 0 ? 'desktop' : _c,
2416
- className = _a.className;
2417
- var buttonClasses = classNames(styles$4.tabButton, styles$4["tabButton--".concat(variant)], (_b = {}, _b[styles$4['tabButton--active']] = isActive, _b), className);
2558
+ const TabButton = ({
2559
+ label,
2560
+ count,
2561
+ isActive,
2562
+ onClick,
2563
+ variant = 'desktop',
2564
+ className
2565
+ }) => {
2566
+ const buttonClasses = classNames(styles$4.tabButton, styles$4[`tabButton--${variant}`], {
2567
+ [styles$4['tabButton--active']]: isActive
2568
+ }, className);
2569
+
2418
2570
  // Split label to hide " RESULTS" on mobile
2419
- var labelParts = label.split(' RESULTS');
2420
- var mainLabel = labelParts[0];
2421
- var hasResults = labelParts.length > 1;
2571
+ const labelParts = label.split(' RESULTS');
2572
+ const mainLabel = labelParts[0];
2573
+ const hasResults = labelParts.length > 1;
2422
2574
  return /*#__PURE__*/React.createElement("button", {
2423
2575
  type: "button",
2424
2576
  role: "tab",
2425
2577
  "aria-selected": isActive,
2426
- "aria-controls": "tabpanel-".concat(label.toLowerCase().replace(/\s+/g, '-')),
2578
+ "aria-controls": `tabpanel-${label.toLowerCase().replace(/\s+/g, '-')}`,
2427
2579
  onClick: onClick,
2428
2580
  className: buttonClasses
2429
2581
  }, count !== undefined && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
@@ -2435,7 +2587,7 @@ var TabButton = function (_a) {
2435
2587
  }, " RESULTS")));
2436
2588
  };
2437
2589
 
2438
- var AssistanceIcon = function (props) {
2590
+ const AssistanceIcon = props => {
2439
2591
  return /*#__PURE__*/React.createElement("svg", _extends({
2440
2592
  xmlns: "http://www.w3.org/2000/svg",
2441
2593
  width: "87",
@@ -2468,24 +2620,21 @@ var styles$3 = {"assistanceBanner":"AssistanceBanner-module__assistanceBanner___
2468
2620
  * />
2469
2621
  * ```
2470
2622
  */
2471
- var AssistanceBanner = function (_a) {
2472
- var _b = _a.title,
2473
- title = _b === void 0 ? 'Need Assistance?' : _b,
2474
- _c = _a.description,
2475
- description = _c === void 0 ? "Can't find what you're looking for? Our team is ready to help." : _c,
2476
- _d = _a.linkText,
2477
- linkText = _d === void 0 ? 'Contact support' : _d,
2478
- _e = _a.linkUrl,
2479
- linkUrl = _e === void 0 ? '/contact' : _e,
2480
- onLinkClick = _a.onLinkClick,
2481
- className = _a.className;
2482
- var handleLinkClick = function (e) {
2623
+ const AssistanceBanner = ({
2624
+ title = 'Need Assistance?',
2625
+ description = "Can't find what you're looking for? Our team is ready to help.",
2626
+ linkText = 'Contact support',
2627
+ linkUrl = '/contact',
2628
+ onLinkClick,
2629
+ className
2630
+ }) => {
2631
+ const handleLinkClick = e => {
2483
2632
  if (onLinkClick) {
2484
2633
  e.preventDefault();
2485
2634
  onLinkClick();
2486
2635
  }
2487
2636
  };
2488
- var bannerClasses = classNames(styles$3.assistanceBanner, className);
2637
+ const bannerClasses = classNames(styles$3.assistanceBanner, className);
2489
2638
  return /*#__PURE__*/React.createElement("div", {
2490
2639
  className: bannerClasses
2491
2640
  }, /*#__PURE__*/React.createElement(AssistanceIcon, {
@@ -2516,7 +2665,11 @@ var AssistanceBanner = function (_a) {
2516
2665
  }))));
2517
2666
  };
2518
2667
 
2519
- var styles$2 = {"drawerOverlay":"FilterDrawer-module__drawerOverlay___P6M4y","drawerOverlay--open":"FilterDrawer-module__drawerOverlay--open___blJZo","drawerPanel":"FilterDrawer-module__drawerPanel___35h-U","drawerPanel--open":"FilterDrawer-module__drawerPanel--open___Fw1SY","drawerCloseButton":"FilterDrawer-module__drawerCloseButton___cfMmf","drawerContent":"FilterDrawer-module__drawerContent___KBff6"};
2668
+ var styles$2 = {"drawerOverlay":"FilterDrawer-module__drawerOverlay___P6M4y","drawerOverlay--open":"FilterDrawer-module__drawerOverlay--open___blJZo","drawerOverlay--closing":"FilterDrawer-module__drawerOverlay--closing___diQr0","drawerPanel":"FilterDrawer-module__drawerPanel___35h-U","drawerPanel--open":"FilterDrawer-module__drawerPanel--open___Fw1SY","drawerCloseButton":"FilterDrawer-module__drawerCloseButton___cfMmf","drawerContent":"FilterDrawer-module__drawerContent___KBff6"};
2669
+
2670
+ const OVERLAY_FADE_MS = 300;
2671
+ const PANEL_SLIDE_MS = 300;
2672
+ const CLOSE_ANIMATION_BUFFER_MS = 50;
2520
2673
 
2521
2674
  /**
2522
2675
  * FilterDrawer - Mobile slide-in filter panel
@@ -2538,85 +2691,133 @@ var styles$2 = {"drawerOverlay":"FilterDrawer-module__drawerOverlay___P6M4y","dr
2538
2691
  * </FilterDrawer>
2539
2692
  * ```
2540
2693
  */
2541
- var FilterDrawer = function (_a) {
2542
- var _b, _c;
2543
- var isOpen = _a.isOpen,
2544
- onClose = _a.onClose,
2545
- children = _a.children,
2546
- className = _a.className;
2547
- var drawerRef = useRef(null);
2548
- var previouslyFocusedElement = useRef(null);
2549
- // Focus management
2550
- useEffect(function () {
2694
+ const FilterDrawer = ({
2695
+ isOpen,
2696
+ onClose,
2697
+ children,
2698
+ className
2699
+ }) => {
2700
+ const drawerRef = useRef(null);
2701
+ const previouslyFocusedElement = useRef(null);
2702
+ const [renderState, setRenderState] = useState(isOpen ? "opening" : "closed");
2703
+
2704
+ // Mount/unmount sequencing for transitions.
2705
+ useEffect(() => {
2706
+ let closeTimer;
2707
+ let raf1;
2708
+ let raf2;
2551
2709
  if (isOpen) {
2552
- // Store previously focused element
2553
- previouslyFocusedElement.current = document.activeElement;
2554
- // Focus the drawer
2555
- if (drawerRef.current) {
2556
- drawerRef.current.focus();
2557
- }
2558
- // Prevent body scroll
2559
- document.body.style.overflow = 'hidden';
2560
- } else {
2710
+ // Ensure it is mounted in the "closed" styles first, then flip to "open" next frame.
2711
+ setRenderState("opening");
2712
+
2713
+ // Double rAF: guarantees at least one paint with the base styles
2714
+ // before we apply the `--open` classes.
2715
+ raf1 = window.requestAnimationFrame(() => {
2716
+ raf2 = window.requestAnimationFrame(() => {
2717
+ setRenderState("open");
2718
+ });
2719
+ });
2720
+ return () => {
2721
+ if (raf1) window.cancelAnimationFrame(raf1);
2722
+ if (raf2) window.cancelAnimationFrame(raf2);
2723
+ };
2724
+ }
2725
+
2726
+ // If we're currently rendered, play exit animation before unmounting.
2727
+ setRenderState(prev => prev === "closed" ? "closed" : "closing");
2728
+ closeTimer = window.setTimeout(() => {
2729
+ setRenderState("closed");
2730
+ }, PANEL_SLIDE_MS + OVERLAY_FADE_MS + CLOSE_ANIMATION_BUFFER_MS);
2731
+ return () => {
2732
+ if (closeTimer) window.clearTimeout(closeTimer);
2733
+ };
2734
+ }, [isOpen]);
2735
+
2736
+ // Focus management
2737
+ useEffect(() => {
2738
+ const isRendered = renderState !== "closed";
2739
+ if (!isRendered) {
2561
2740
  // Restore body scroll
2562
- document.body.style.overflow = '';
2741
+ document.body.style.overflow = "";
2742
+
2563
2743
  // Return focus to previously focused element
2564
2744
  if (previouslyFocusedElement.current) {
2565
2745
  previouslyFocusedElement.current.focus();
2566
2746
  }
2747
+
2748
+ // Reset for next open cycle
2749
+ previouslyFocusedElement.current = null;
2750
+ return;
2567
2751
  }
2568
- return function () {
2569
- document.body.style.overflow = '';
2752
+
2753
+ // Store previously focused element (once per open)
2754
+ if (!previouslyFocusedElement.current) {
2755
+ previouslyFocusedElement.current = document.activeElement;
2756
+ }
2757
+
2758
+ // Prevent body scroll for the whole time the drawer is mounted (open + closing animation)
2759
+ document.body.style.overflow = "hidden";
2760
+
2761
+ // Focus the drawer once it reaches open state
2762
+ if (renderState === "open" && drawerRef.current) {
2763
+ drawerRef.current.focus();
2764
+ }
2765
+ return () => {
2766
+ // In case the component unmounts unexpectedly.
2767
+ document.body.style.overflow = "";
2570
2768
  };
2571
- }, [isOpen]);
2769
+ }, [renderState]);
2770
+
2572
2771
  // Escape key handler
2573
- useEffect(function () {
2574
- var handleEscape = function (event) {
2575
- if (event.key === 'Escape' && isOpen) {
2772
+ useEffect(() => {
2773
+ const handleEscape = event => {
2774
+ if (event.key === "Escape" && renderState !== "closed") {
2576
2775
  onClose();
2577
2776
  }
2578
2777
  };
2579
- document.addEventListener('keydown', handleEscape);
2580
- return function () {
2581
- return document.removeEventListener('keydown', handleEscape);
2582
- };
2583
- }, [isOpen, onClose]);
2778
+ document.addEventListener("keydown", handleEscape);
2779
+ return () => document.removeEventListener("keydown", handleEscape);
2780
+ }, [renderState, onClose]);
2781
+
2584
2782
  // Focus trap implementation
2585
- useEffect(function () {
2586
- if (!isOpen || !drawerRef.current) return;
2587
- var drawer = drawerRef.current;
2588
- var focusableElements = drawer.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');
2589
- var firstElement = focusableElements[0];
2590
- var lastElement = focusableElements[focusableElements.length - 1];
2591
- var handleTab = function (event) {
2592
- if (event.key !== 'Tab') return;
2783
+ useEffect(() => {
2784
+ if (renderState !== "open" || !drawerRef.current) return;
2785
+ const drawer = drawerRef.current;
2786
+ const focusableElements = drawer.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');
2787
+ const firstElement = focusableElements[0];
2788
+ const lastElement = focusableElements[focusableElements.length - 1];
2789
+ const handleTab = event => {
2790
+ if (event.key !== "Tab") return;
2593
2791
  if (event.shiftKey) {
2594
2792
  // Shift + Tab
2595
2793
  if (document.activeElement === firstElement) {
2596
2794
  event.preventDefault();
2597
- lastElement === null || lastElement === void 0 ? void 0 : lastElement.focus();
2795
+ lastElement?.focus();
2598
2796
  }
2599
2797
  } else {
2600
2798
  // Tab
2601
2799
  if (document.activeElement === lastElement) {
2602
2800
  event.preventDefault();
2603
- firstElement === null || firstElement === void 0 ? void 0 : firstElement.focus();
2801
+ firstElement?.focus();
2604
2802
  }
2605
2803
  }
2606
2804
  };
2607
- drawer.addEventListener('keydown', handleTab);
2608
- return function () {
2609
- return drawer.removeEventListener('keydown', handleTab);
2610
- };
2611
- }, [isOpen]);
2612
- if (!isOpen) return null;
2613
- var handleOverlayClick = function (event) {
2805
+ drawer.addEventListener("keydown", handleTab);
2806
+ return () => drawer.removeEventListener("keydown", handleTab);
2807
+ }, [renderState]);
2808
+ if (renderState === "closed") return null;
2809
+ const handleOverlayClick = event => {
2614
2810
  if (event.target === event.currentTarget) {
2615
2811
  onClose();
2616
2812
  }
2617
2813
  };
2618
- var overlayClasses = classNames(styles$2.drawerOverlay, (_b = {}, _b[styles$2['drawerOverlay--open']] = isOpen, _b));
2619
- var panelClasses = classNames(styles$2.drawerPanel, (_c = {}, _c[styles$2['drawerPanel--open']] = isOpen, _c), className);
2814
+ const overlayClasses = classNames(styles$2.drawerOverlay, {
2815
+ [styles$2["drawerOverlay--open"]]: renderState === "open",
2816
+ [styles$2["drawerOverlay--closing"]]: renderState === "closing"
2817
+ });
2818
+ const panelClasses = classNames(styles$2.drawerPanel, {
2819
+ [styles$2["drawerPanel--open"]]: renderState === "open"
2820
+ }, className);
2620
2821
  return /*#__PURE__*/React.createElement("div", {
2621
2822
  className: overlayClasses,
2622
2823
  onClick: handleOverlayClick,
@@ -2640,63 +2841,80 @@ var FilterDrawer = function (_a) {
2640
2841
  }, children)));
2641
2842
  };
2642
2843
 
2643
- var FederatedResultsView = function (_a) {
2644
- var query = _a.query,
2645
- onQueryChange = _a.onQueryChange,
2646
- onSearchSubmit = _a.onSearchSubmit,
2647
- activeTab = _a.activeTab,
2648
- onTabChange = _a.onTabChange,
2649
- products = _a.products,
2650
- contents = _a.contents,
2651
- isLoadingProducts = _a.isLoadingProducts,
2652
- isLoadingContents = _a.isLoadingContents,
2653
- productsError = _a.productsError,
2654
- contentsError = _a.contentsError,
2655
- currentPage = _a.currentPage,
2656
- totalPages = _a.totalPages,
2657
- onPageChange = _a.onPageChange,
2658
- facets = _a.facets,
2659
- onFacetToggle = _a.onFacetToggle,
2660
- isFilterDrawerOpen = _a.isFilterDrawerOpen,
2661
- onFilterDrawerToggle = _a.onFilterDrawerToggle,
2662
- onFilterDrawerClose = _a.onFilterDrawerClose;
2663
- var isLoading = activeTab === "products" && isLoadingProducts || activeTab === "content" && isLoadingContents;
2664
- var error = activeTab === "products" ? productsError : contentsError;
2844
+ const FederatedResultsView = ({
2845
+ query,
2846
+ onQueryChange,
2847
+ onSearchSubmit,
2848
+ activeTab,
2849
+ onTabChange,
2850
+ products,
2851
+ contents,
2852
+ isLoadingProducts,
2853
+ isLoadingContents,
2854
+ productsError,
2855
+ contentsError,
2856
+ currentPage,
2857
+ totalPages,
2858
+ onPageChange,
2859
+ facets,
2860
+ onFacetToggle,
2861
+ isFilterDrawerOpen,
2862
+ onFilterDrawerToggle,
2863
+ onFilterDrawerClose
2864
+ }) => {
2865
+ const [isMobile, setIsMobile] = useState(false);
2866
+ useEffect(() => {
2867
+ if (typeof window === "undefined" || typeof window.matchMedia !== "function") {
2868
+ return;
2869
+ }
2870
+ const mql = window.matchMedia("(max-width: 768px)");
2871
+ const update = () => setIsMobile(mql.matches);
2872
+ update();
2873
+
2874
+ // Safari < 14 fallback
2875
+ if (typeof mql.addEventListener === "function") {
2876
+ mql.addEventListener("change", update);
2877
+ return () => mql.removeEventListener("change", update);
2878
+ }
2879
+ mql.addListener(update);
2880
+ return () => mql.removeListener(update);
2881
+ }, []);
2882
+ const isLoading = activeTab === "products" && isLoadingProducts || activeTab === "content" && isLoadingContents;
2883
+ const error = activeTab === "products" ? productsError : contentsError;
2884
+
2665
2885
  // Filter results based on active tab
2666
- var displayProducts = activeTab === "content" ? [] : products;
2667
- var displayContents = activeTab === "products" ? [] : contents;
2886
+ const displayProducts = activeTab === "content" ? [] : products;
2887
+ const displayContents = activeTab === "products" ? [] : contents;
2888
+
2668
2889
  // Content tab single-select handler (clears all others when selecting)
2669
- var handleContentCategorySelect = useCallback(function (attribute, value) {
2670
- var facet = facets.find(function (f) {
2671
- return f.attribute === attribute;
2672
- });
2890
+ const handleContentCategorySelect = useCallback((attribute, value) => {
2891
+ const facet = facets.find(f => f.attribute === attribute);
2673
2892
  if (!facet) return;
2893
+
2674
2894
  // Clear ALL values in this facet first
2675
- facet.values.forEach(function (v) {
2895
+ facet.values.forEach(v => {
2676
2896
  if (v.isRefined) {
2677
2897
  onFacetToggle(attribute, v.value); // Unselect
2678
2898
  }
2679
2899
  });
2900
+
2680
2901
  // Then select the clicked value (if not already selected)
2681
- var clickedValue = facet.values.find(function (v) {
2682
- return v.value === value;
2683
- });
2902
+ const clickedValue = facet.values.find(v => v.value === value);
2684
2903
  if (clickedValue && !clickedValue.isRefined) {
2685
2904
  onFacetToggle(attribute, value); // Select
2686
2905
  }
2687
2906
  }, [facets, onFacetToggle]);
2907
+
2688
2908
  // Track if any filters applied
2689
- var hasAppliedFilters = useMemo(function () {
2690
- return facets.some(function (facet) {
2691
- return facet.values.some(function (value) {
2692
- return value.isRefined;
2693
- });
2694
- });
2909
+ const hasAppliedFilters = useMemo(() => {
2910
+ return facets.some(facet => facet.values.some(value => value.isRefined));
2695
2911
  }, [facets]);
2912
+
2696
2913
  // Track previous filter state to detect transitions
2697
- var prevHasAppliedFilters = useRef(hasAppliedFilters);
2914
+ const prevHasAppliedFilters = useRef(hasAppliedFilters);
2915
+
2698
2916
  // Auto-close drawer when transitioning FROM filters applied TO no filters (mobile only)
2699
- useEffect(function () {
2917
+ useEffect(() => {
2700
2918
  // Only close if we HAD filters and now have NONE (not on initial open)
2701
2919
  if (prevHasAppliedFilters.current && !hasAppliedFilters && isFilterDrawerOpen && onFilterDrawerClose) {
2702
2920
  onFilterDrawerClose();
@@ -2706,7 +2924,7 @@ var FederatedResultsView = function (_a) {
2706
2924
  return /*#__PURE__*/React.createElement("div", {
2707
2925
  className: styles$5.resultsView
2708
2926
  }, /*#__PURE__*/React.createElement("div", {
2709
- className: "".concat(styles$5.searchBarWrapper, " ").concat(styles$5.searchBarDesktopOnly)
2927
+ className: `${styles$5.searchBarWrapper} ${styles$5.searchBarDesktopOnly}`
2710
2928
  }, /*#__PURE__*/React.createElement(SearchBar, {
2711
2929
  value: query,
2712
2930
  onChange: onQueryChange,
@@ -2714,7 +2932,7 @@ var FederatedResultsView = function (_a) {
2714
2932
  placeholder: "Refine your search...",
2715
2933
  variant: "results"
2716
2934
  })), /*#__PURE__*/React.createElement("div", {
2717
- className: "".concat(styles$5.tabsContainer, " ").concat(styles$5.tabsContainerDesktopOnly)
2935
+ className: `${styles$5.tabsContainer} ${styles$5.tabsContainerDesktopOnly}`
2718
2936
  }, /*#__PURE__*/React.createElement("div", {
2719
2937
  className: styles$5.tabs,
2720
2938
  role: "tablist"
@@ -2722,19 +2940,13 @@ var FederatedResultsView = function (_a) {
2722
2940
  label: "WEB SHOP RESULTS",
2723
2941
  count: products.length,
2724
2942
  isActive: activeTab === "products",
2725
- onClick: function () {
2726
- return onTabChange("products");
2727
- },
2943
+ onClick: () => onTabChange("products"),
2728
2944
  variant: "desktop"
2729
- }), /*#__PURE__*/React.createElement("div", {
2730
- className: styles$5.tabSeparator
2731
2945
  }), /*#__PURE__*/React.createElement(TabButton, {
2732
2946
  label: "WEBSITE RESULTS",
2733
2947
  count: contents.length,
2734
2948
  isActive: activeTab === "content",
2735
- onClick: function () {
2736
- return onTabChange("content");
2737
- },
2949
+ onClick: () => onTabChange("content"),
2738
2950
  variant: "desktop"
2739
2951
  })), onFilterDrawerToggle && /*#__PURE__*/React.createElement("button", {
2740
2952
  type: "button",
@@ -2763,9 +2975,9 @@ var FederatedResultsView = function (_a) {
2763
2975
  })), /*#__PURE__*/React.createElement("main", {
2764
2976
  className: styles$5.mainContent
2765
2977
  }, /*#__PURE__*/React.createElement("div", {
2766
- id: "tabpanel-".concat(activeTab),
2978
+ id: `tabpanel-${activeTab}`,
2767
2979
  role: "tabpanel",
2768
- "aria-labelledby": "tab-".concat(activeTab)
2980
+ "aria-labelledby": `tab-${activeTab}`
2769
2981
  }, /*#__PURE__*/React.createElement(ResultsList, {
2770
2982
  type: activeTab,
2771
2983
  products: displayProducts,
@@ -2778,9 +2990,9 @@ var FederatedResultsView = function (_a) {
2778
2990
  currentPage: currentPage,
2779
2991
  totalPages: totalPages,
2780
2992
  onPageChange: onPageChange,
2781
- maxVisiblePages: 10,
2993
+ maxVisiblePages: isMobile ? 3 : 10,
2782
2994
  showPrevious: false,
2783
- ariaLabel: "".concat(activeTab === "products" ? "Products" : "Content", " pagination")
2995
+ ariaLabel: `${activeTab === "products" ? "Products" : "Content"} pagination`
2784
2996
  }))))), onFilterDrawerClose && /*#__PURE__*/React.createElement(FilterDrawer, {
2785
2997
  isOpen: isFilterDrawerOpen || false,
2786
2998
  onClose: onFilterDrawerClose
@@ -2830,40 +3042,37 @@ var styles$1 = {"searchExperience":"FederatedSearchExperience-module__searchExpe
2830
3042
  * />
2831
3043
  * ```
2832
3044
  */
2833
- var FederatedSearchExperience = function (_a) {
2834
- var isOpen = _a.isOpen,
2835
- onClose = _a.onClose,
2836
- query = _a.query,
2837
- onQueryChange = _a.onQueryChange,
2838
- onSearchSubmit = _a.onSearchSubmit,
2839
- products = _a.products,
2840
- contents = _a.contents,
2841
- isLoadingProducts = _a.isLoadingProducts,
2842
- isLoadingContents = _a.isLoadingContents,
2843
- productsError = _a.productsError,
2844
- contentsError = _a.contentsError,
2845
- onSeeAllProducts = _a.onSeeAllProducts,
2846
- onSeeAllContents = _a.onSeeAllContents,
2847
- onSeeAllCombined = _a.onSeeAllCombined,
2848
- activeView = _a.activeView;
2849
- _a.onChangeView;
2850
- var activeTab = _a.activeTab,
2851
- onTabChange = _a.onTabChange,
2852
- currentPage = _a.currentPage,
2853
- totalPages = _a.totalPages,
2854
- onPageChange = _a.onPageChange,
2855
- facets = _a.facets,
2856
- onFacetToggle = _a.onFacetToggle,
2857
- isFilterDrawerOpen = _a.isFilterDrawerOpen,
2858
- onFilterDrawerToggle = _a.onFilterDrawerToggle,
2859
- onFilterDrawerClose = _a.onFilterDrawerClose;
3045
+ const FederatedSearchExperience = ({
3046
+ isOpen,
3047
+ onClose,
3048
+ query,
3049
+ onQueryChange,
3050
+ onSearchSubmit,
3051
+ products,
3052
+ contents,
3053
+ isLoadingProducts,
3054
+ isLoadingContents,
3055
+ productsError,
3056
+ contentsError,
3057
+ onSeeAllProducts,
3058
+ onSeeAllContents,
3059
+ onSeeAllCombined,
3060
+ activeView,
3061
+ onChangeView,
3062
+ activeTab,
3063
+ onTabChange,
3064
+ currentPage,
3065
+ totalPages,
3066
+ onPageChange,
3067
+ facets,
3068
+ onFacetToggle,
3069
+ isFilterDrawerOpen,
3070
+ onFilterDrawerToggle,
3071
+ onFilterDrawerClose
3072
+ }) => {
2860
3073
  // Track if any filters are active (for red dot indicator)
2861
- var hasAppliedFilters = useMemo(function () {
2862
- return facets.some(function (facet) {
2863
- return facet.values.some(function (value) {
2864
- return value.isRefined;
2865
- });
2866
- });
3074
+ const hasAppliedFilters = useMemo(() => {
3075
+ return facets.some(facet => facet.values.some(value => value.isRefined));
2867
3076
  }, [facets]);
2868
3077
  return /*#__PURE__*/React.createElement(SearchModal, {
2869
3078
  isOpen: isOpen,
@@ -2895,9 +3104,7 @@ var FederatedSearchExperience = function (_a) {
2895
3104
  label: "WEB SHOP RESULTS",
2896
3105
  count: products.length,
2897
3106
  isActive: activeTab === "products",
2898
- onClick: function () {
2899
- return onTabChange("products");
2900
- },
3107
+ onClick: () => onTabChange("products"),
2901
3108
  variant: "mobile"
2902
3109
  }), /*#__PURE__*/React.createElement("div", {
2903
3110
  className: styles$1.tabSeparator
@@ -2905,13 +3112,11 @@ var FederatedSearchExperience = function (_a) {
2905
3112
  label: "WEBSITE RESULTS",
2906
3113
  count: contents.length,
2907
3114
  isActive: activeTab === "content",
2908
- onClick: function () {
2909
- return onTabChange("content");
2910
- },
3115
+ onClick: () => onTabChange("content"),
2911
3116
  variant: "mobile"
2912
3117
  })), /*#__PURE__*/React.createElement("div", {
2913
3118
  className: styles$1.mobileFilterButtonWrapper
2914
- }, /*#__PURE__*/React.createElement("button", {
3119
+ }, onFilterDrawerToggle && /*#__PURE__*/React.createElement("button", {
2915
3120
  type: "button",
2916
3121
  className: styles$1.mobileFilterButton,
2917
3122
  onClick: onFilterDrawerToggle
@@ -2932,7 +3137,7 @@ var FederatedSearchExperience = function (_a) {
2932
3137
  }, /*#__PURE__*/React.createElement("div", {
2933
3138
  className: styles$1.searchExperience
2934
3139
  }, activeView === "instant" && /*#__PURE__*/React.createElement("div", {
2935
- className: "".concat(styles$1.searchBarSection, " ").concat(styles$1.searchBarDesktopOnly)
3140
+ className: `${styles$1.searchBarSection} ${styles$1.searchBarDesktopOnly}`
2936
3141
  }, /*#__PURE__*/React.createElement(SearchBar, {
2937
3142
  value: query,
2938
3143
  onChange: onQueryChange,
@@ -3000,14 +3205,13 @@ var FederatedSearchExperience = function (_a) {
3000
3205
 
3001
3206
  var styles = {"searchTrigger":"SearchTriggerButton-module__searchTrigger___PDbDB","searchIcon":"SearchTriggerButton-module__searchIcon___izByW","label":"SearchTriggerButton-module__label___mkS7T"};
3002
3207
 
3003
- var SearchTriggerButton = function (_a) {
3004
- var onOpen = _a.onOpen,
3005
- _b = _a.ariaLabel,
3006
- ariaLabel = _b === void 0 ? 'Open search' : _b,
3007
- label = _a.label,
3008
- _c = _a.className,
3009
- className = _c === void 0 ? '' : _c;
3010
- var handleKeyDown = function (event) {
3208
+ const SearchTriggerButton = ({
3209
+ onOpen,
3210
+ ariaLabel = 'Open search',
3211
+ label,
3212
+ className = ''
3213
+ }) => {
3214
+ const handleKeyDown = event => {
3011
3215
  if (event.key === 'Enter' || event.key === ' ') {
3012
3216
  event.preventDefault();
3013
3217
  onOpen();
@@ -3018,7 +3222,7 @@ var SearchTriggerButton = function (_a) {
3018
3222
  onClick: onOpen,
3019
3223
  onKeyDown: handleKeyDown,
3020
3224
  "aria-label": ariaLabel,
3021
- className: "".concat(styles.searchTrigger, " ").concat(className)
3225
+ className: `${styles.searchTrigger} ${className}`
3022
3226
  }, /*#__PURE__*/React.createElement("svg", {
3023
3227
  className: styles.searchIcon,
3024
3228
  xmlns: "http://www.w3.org/2000/svg",
@@ -3040,5 +3244,5 @@ var SearchTriggerButton = function (_a) {
3040
3244
  }, label));
3041
3245
  };
3042
3246
 
3043
- export { AlgoliaDynamicSearchLeybold as AlgoliaDynamicSearch, AlgoliaDynamicSearchLeybold, AppliedFilterTag, AppliedFilters, Button, ContentCardBase, ContentCardHorizontal, FederatedInstantResultsLayout, FederatedResultsView, FederatedSearchExperience, FilterAccordion, FilterItem, FilterSearch, FiltersPanel, Footer, FooterBottom, FooterLink, FooterLinkGroup, FooterSocialIcon, FooterSocialIcons, ModalCloseButton, Pagination, PaginationButton, PaginationEllipsis, PaginationItem, ProductCardHorizontal, ProductCardVertical, QrFormLeybold as QrForm, QrFormLeybold, ResultsColumn, ResultsCount, ResultsList, SearchBar, SearchIcon, SearchInput, SearchModal, SearchSubmitButton, SearchTriggerButton, SeeAllLinkButton };
3247
+ export { AlgoliaDynamicSearchLeybold as AlgoliaDynamicSearch, AlgoliaDynamicSearchLeybold, AppliedFilterTag, AppliedFilters, Button, CarouselCard, ContentCardBase, ContentCardHorizontal, FederatedInstantResultsLayout, FederatedResultsView, FederatedSearchExperience, FilterAccordion, FilterItem, FilterSearch, FiltersPanel, Footer, FooterBottom, FooterLink, FooterLinkGroup, FooterSocialIcon, FooterSocialIcons, ModalCloseButton, Pagination, PaginationButton, PaginationEllipsis, PaginationItem, ProductCardHorizontal, ProductCardVertical, QrFormLeybold as QrForm, QrFormLeybold, ResultsColumn, ResultsCount, ResultsList, SearchBar, SearchIcon, SearchInput, SearchModal, SearchSubmitButton, SearchTriggerButton, SeeAllLinkButton };
3044
3248
  //# sourceMappingURL=index.esm.js.map