@asantemedia-org/edwardsvacuum-design-system 1.6.20 → 1.6.22

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.css CHANGED
@@ -506,6 +506,38 @@
506
506
  transform: rotateY(0);
507
507
  }
508
508
  }
509
+ .accordion-section__header {
510
+ cursor: pointer;
511
+ -webkit-user-select: none;
512
+ -moz-user-select: none;
513
+ user-select: none;
514
+ display: flex;
515
+ justify-content: space-between;
516
+ align-items: center;
517
+ padding: 0 0 0.6rem 0;
518
+ border-bottom: 2px solid #C4262E;
519
+ }
520
+ .accordion-section__title {
521
+ flex: 1;
522
+ }
523
+ .accordion-section__icon {
524
+ transition: transform 0.3s ease;
525
+ display: inline-flex;
526
+ }
527
+ .accordion-section__icon.rotated {
528
+ transform: rotate(180deg);
529
+ }
530
+ .accordion-section__content {
531
+ max-height: 0;
532
+ overflow: hidden;
533
+ transition: max-height 0.3s ease;
534
+ }
535
+ .accordion-section__content.open {
536
+ max-height: 5000px;
537
+ }
538
+ .accordion-section.open .accordion-section__icon {
539
+ transform: rotate(180deg);
540
+ }
509
541
  .Button-module__cmp-button___SMjDF {
510
542
  font-family: "Calibri", "Calibri W05 Light", sans-serif;
511
543
  text-transform: uppercase;
@@ -506,6 +506,38 @@
506
506
  transform: rotateY(0);
507
507
  }
508
508
  }
509
+ .accordion-section__header {
510
+ cursor: pointer;
511
+ -webkit-user-select: none;
512
+ -moz-user-select: none;
513
+ user-select: none;
514
+ display: flex;
515
+ justify-content: space-between;
516
+ align-items: center;
517
+ padding: 0 0 0.6rem 0;
518
+ border-bottom: 2px solid #C4262E;
519
+ }
520
+ .accordion-section__title {
521
+ flex: 1;
522
+ }
523
+ .accordion-section__icon {
524
+ transition: transform 0.3s ease;
525
+ display: inline-flex;
526
+ }
527
+ .accordion-section__icon.rotated {
528
+ transform: rotate(180deg);
529
+ }
530
+ .accordion-section__content {
531
+ max-height: 0;
532
+ overflow: hidden;
533
+ transition: max-height 0.3s ease;
534
+ }
535
+ .accordion-section__content.open {
536
+ max-height: 5000px;
537
+ }
538
+ .accordion-section.open .accordion-section__icon {
539
+ transform: rotate(180deg);
540
+ }
509
541
  .Button-module__cmp-button___SMjDF {
510
542
  font-family: "Calibri", "Calibri W05 Light", sans-serif;
511
543
  text-transform: uppercase;
package/dist/index.esm.js CHANGED
@@ -1,6 +1,6 @@
1
- import React, { useRef, useState, useEffect } from 'react';
1
+ import React, { useState, useEffect } from 'react';
2
2
  import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
3
- import { faChevronRight, faArrowRight, faChevronDown } from '@fortawesome/pro-solid-svg-icons';
3
+ import { faChevronDown, faChevronRight, faArrowRight } from '@fortawesome/pro-solid-svg-icons';
4
4
  import { v4 } from 'uuid';
5
5
 
6
6
  /******************************************************************************
@@ -241,24 +241,63 @@ function requireClassnames() {
241
241
  var classnamesExports = requireClassnames();
242
242
  var classnames = /*@__PURE__*/getDefaultExportFromCjs(classnamesExports);
243
243
 
244
+ var AccordionSection = function (_a) {
245
+ var title = _a.title,
246
+ children = _a.children,
247
+ _b = _a.className,
248
+ className = _b === void 0 ? '' : _b,
249
+ _c = _a.defaultOpen,
250
+ defaultOpen = _c === void 0 ? false : _c;
251
+ var _d = useState(defaultOpen),
252
+ isOpen = _d[0],
253
+ setIsOpen = _d[1];
254
+ var toggleAccordion = function () {
255
+ setIsOpen(!isOpen);
256
+ };
257
+ return /*#__PURE__*/React.createElement("div", {
258
+ className: "accordion-section ".concat(className, " ").concat(isOpen ? 'open' : '')
259
+ }, /*#__PURE__*/React.createElement("h4", {
260
+ className: "accordion-section__header",
261
+ onClick: toggleAccordion,
262
+ role: "button",
263
+ tabIndex: 0,
264
+ onKeyDown: function (e) {
265
+ if (e.key === 'Enter' || e.key === ' ') {
266
+ e.preventDefault();
267
+ toggleAccordion();
268
+ }
269
+ },
270
+ "aria-expanded": isOpen
271
+ }, /*#__PURE__*/React.createElement("span", {
272
+ className: "accordion-section__title"
273
+ }, title), /*#__PURE__*/React.createElement("span", {
274
+ className: "accordion-section__icon ".concat(isOpen ? 'rotated' : '')
275
+ }, /*#__PURE__*/React.createElement(FontAwesomeIcon, {
276
+ icon: faChevronDown,
277
+ color: "#C4262EFF"
278
+ }))), /*#__PURE__*/React.createElement("div", {
279
+ className: "accordion-section__content ".concat(isOpen ? 'open' : '')
280
+ }, children));
281
+ };
282
+
244
283
  // Utility function to retrieve correct SCSS module class names
245
284
  var getStyle$1 = function (className) {
246
285
  if (styles$1[className]) return styles$1[className];
247
286
  var nestedMatch = Object.keys(styles$1).find(function (key) {
248
287
  return key.includes(className);
249
288
  });
250
- return nestedMatch ? styles$1[nestedMatch] : '';
289
+ return nestedMatch ? styles$1[nestedMatch] : "";
251
290
  };
252
291
  var cardSizeMapping = function (size) {
253
292
  var classSrting;
254
- if (size === 'small') {
255
- classSrting = 'col-3';
256
- } else if (size === 'medium') {
257
- classSrting = 'col-4';
258
- } else if (size === 'large') {
259
- classSrting = 'col-6';
293
+ if (size === "small") {
294
+ classSrting = "col-3";
295
+ } else if (size === "medium") {
296
+ classSrting = "col-4";
297
+ } else if (size === "large") {
298
+ classSrting = "col-6";
260
299
  } else {
261
- classSrting = '';
300
+ classSrting = "";
262
301
  }
263
302
  return classSrting;
264
303
  };
@@ -268,14 +307,14 @@ var getImageUrl = function (imageUrl) {
268
307
  }
269
308
  try {
270
309
  // Try loading from local assets (works in Storybook)
271
- return require('../../../assets/edwards-webshop-placeholder.png').default.src;
310
+ return require("../../../assets/edwards-webshop-placeholder.png").default.src;
272
311
  } catch (error) {
273
312
  // If that fails, load from node_modules (works in host app)
274
313
  try {
275
- return require('@asantemedia-org/edwardsvacuum-design-system/dist/assets/edwards-webshop-placeholder.png').default;
314
+ return require("@asantemedia-org/edwardsvacuum-design-system/dist/assets/edwards-webshop-placeholder.png").default;
276
315
  } catch (error) {
277
316
  console.error("Placeholder image not found in either local assets or node_modules.", error);
278
- return ''; // Fallback empty string if no image is found
317
+ return ""; // Fallback empty string if no image is found
279
318
  }
280
319
  }
281
320
  };
@@ -297,42 +336,42 @@ var Card = function (_a) {
297
336
  onClick = _a.onClick;
298
337
  var mode = getStyle$1("cmp-card--".concat(cardStyle));
299
338
  var width = cardSizeMapping(size);
300
- var categoryColour = colour ? getStyle$1("cmp-card__content-category-wrapper__colour-".concat(colour)) : '';
301
- var cardFooterColour = colour ? getStyle$1("cmp-card__footer--color-".concat(colour)) : '';
339
+ var categoryColour = colour ? getStyle$1("cmp-card__content-category-wrapper__colour-".concat(colour)) : "";
340
+ var cardFooterColour = colour ? getStyle$1("cmp-card__footer--color-".concat(colour)) : "";
302
341
  var contentImage = getImageUrl(imageUrl);
303
342
  return /*#__PURE__*/React.createElement("div", {
304
- className: classnames(getStyle$1('cmp-card'), mode, width, className && getStyle$1(className))
343
+ className: classnames(getStyle$1("cmp-card"), mode, width, className && getStyle$1(className))
305
344
  }, /*#__PURE__*/React.createElement("a", {
306
- className: getStyle$1('cmp-card__link'),
345
+ className: getStyle$1("cmp-card__link"),
307
346
  href: cardLink,
308
347
  onClick: onClick
309
348
  }, /*#__PURE__*/React.createElement("div", {
310
- className: getStyle$1('cmp-card__content-wrapper')
311
- }, cardStyle !== 'type-card-panel' && cardStyle !== 'type-card-no-image' && /*#__PURE__*/React.createElement("div", {
312
- className: "".concat(getStyle$1('cmp-card__image-wrapper'), " ").concat(!imageUrl || placeholder ? getStyle$1('placeholderImage') : '')
349
+ className: getStyle$1("cmp-card__content-wrapper")
350
+ }, cardStyle !== "type-card-panel" && cardStyle !== "type-card-no-image" && /*#__PURE__*/React.createElement("div", {
351
+ className: "".concat(getStyle$1("cmp-card__image-wrapper"), " ").concat(!imageUrl || placeholder ? getStyle$1("placeholderImage") : "")
313
352
  }, /*#__PURE__*/React.createElement("picture", null, /*#__PURE__*/React.createElement("img", {
314
353
  src: contentImage,
315
354
  alt: imageAlt
316
- }))), cardStyle === 'type-card-label' && /*#__PURE__*/React.createElement("div", {
317
- className: classnames(getStyle$1('cmp-card__content-category-wrapper'), categoryColour)
355
+ }))), cardStyle === "type-card-label" && /*#__PURE__*/React.createElement("div", {
356
+ className: classnames(getStyle$1("cmp-card__content-category-wrapper"), categoryColour)
318
357
  }, contentCategoryLabel && /*#__PURE__*/React.createElement("p", null, contentCategoryLabel)), /*#__PURE__*/React.createElement("div", {
319
- className: getStyle$1('cmp-card__title-wrapper')
358
+ className: getStyle$1("cmp-card__title-wrapper")
320
359
  }, date && /*#__PURE__*/React.createElement("div", {
321
- className: getStyle$1('cmp-card__date')
360
+ className: getStyle$1("cmp-card__date")
322
361
  }, date), title && /*#__PURE__*/React.createElement("h4", {
323
- className: getStyle$1('cmp-card__title')
362
+ className: getStyle$1("cmp-card__title")
324
363
  }, title), (city || country) && /*#__PURE__*/React.createElement("p", {
325
- className: getStyle$1('cmp-card__city-country')
326
- }, city, " ", city && country ? ', ' : '', " ", country), cardStyle === 'type-card-panel' ? /*#__PURE__*/React.createElement("span", {
327
- className: classnames(getStyle$1('cmp-card__footer'), cardFooterColour)
364
+ className: getStyle$1("cmp-card__city-country")
365
+ }, city, " ", city && country ? ", " : "", " ", country), cardStyle === "type-card-panel" ? /*#__PURE__*/React.createElement("span", {
366
+ className: classnames(getStyle$1("cmp-card__footer"), cardFooterColour)
328
367
  }, /*#__PURE__*/React.createElement(FontAwesomeIcon, {
329
368
  icon: faChevronRight
330
- })) : cardStyle === 'label' ? /*#__PURE__*/React.createElement("span", {
331
- className: getStyle$1('cmp-card__footer')
369
+ })) : cardStyle === "label" ? /*#__PURE__*/React.createElement("span", {
370
+ className: getStyle$1("cmp-card__footer")
332
371
  }, /*#__PURE__*/React.createElement(FontAwesomeIcon, {
333
372
  icon: faArrowRight
334
373
  })) : /*#__PURE__*/React.createElement("span", {
335
- className: getStyle$1('cmp-card__footer')
374
+ className: getStyle$1("cmp-card__footer")
336
375
  }, /*#__PURE__*/React.createElement("span", null, cta))))));
337
376
  };
338
377
  var ProductCard = function (_a) {
@@ -352,28 +391,28 @@ var ProductCard = function (_a) {
352
391
  var mode = getStyle$1("cmp-card--".concat(cardStyle));
353
392
  var productImage = getImageUrl(imageUrl);
354
393
  return /*#__PURE__*/React.createElement("div", {
355
- className: classnames(getStyle$1('cmp-card'), mode, width, className)
394
+ className: classnames(getStyle$1("cmp-card"), mode, width, className)
356
395
  }, /*#__PURE__*/React.createElement("a", {
357
396
  href: cardLink,
358
- className: getStyle$1('cmp-card__link'),
397
+ className: getStyle$1("cmp-card__link"),
359
398
  onClick: onClick,
360
399
  target: "_blank"
361
400
  }, /*#__PURE__*/React.createElement("div", {
362
- className: getStyle$1('cmp-card--type-card-product__wrapper')
401
+ className: getStyle$1("cmp-card--type-card-product__wrapper")
363
402
  }, /*#__PURE__*/React.createElement("div", {
364
- className: getStyle$1('cmp-card--type-card-product__image')
403
+ className: getStyle$1("cmp-card--type-card-product__image")
365
404
  }, /*#__PURE__*/React.createElement("figure", null, /*#__PURE__*/React.createElement("img", {
366
405
  src: productImage,
367
406
  alt: imageAlt,
368
- className: !imageUrl || placeholder ? 'placeholderImage' : undefined
407
+ className: !imageUrl || placeholder ? "placeholderImage" : undefined
369
408
  }))), /*#__PURE__*/React.createElement("div", {
370
- className: getStyle$1('cmp-card--type-card-product__meta')
409
+ className: getStyle$1("cmp-card--type-card-product__meta")
371
410
  }, /*#__PURE__*/React.createElement("p", {
372
- className: getStyle$1('cmp-card--type-card-product__title')
411
+ className: getStyle$1("cmp-card--type-card-product__title")
373
412
  }, title), productPrice && showProductPrice !== false ? /*#__PURE__*/React.createElement("p", {
374
- className: getStyle$1('cmp-card--type-card-product__prices')
375
- }, productPrice) : '', /*#__PURE__*/React.createElement("p", {
376
- className: getStyle$1('cmp-card--type-card-product__cta')
413
+ className: getStyle$1("cmp-card--type-card-product__prices")
414
+ }, productPrice) : "", /*#__PURE__*/React.createElement("p", {
415
+ className: getStyle$1("cmp-card--type-card-product__cta")
377
416
  }, cta ? cta : /*#__PURE__*/React.createElement(FontAwesomeIcon, {
378
417
  icon: faArrowRight
379
418
  }))))));
@@ -387,24 +426,26 @@ var ProductDetailsCard = function (_a) {
387
426
  _a.onClick;
388
427
  var hit = _a.hit,
389
428
  facets = _a.facets;
390
- var specificationRef = useRef(null);
391
- var handleClick = function () {
392
- var _a;
393
- (_a = specificationRef.current) === null || _a === void 0 ? void 0 : _a.classList.toggle("open");
394
- };
395
429
  return /*#__PURE__*/React.createElement("div", {
396
430
  className: className
397
- }, /*#__PURE__*/React.createElement("h3", null, title), /*#__PURE__*/React.createElement("p", null, "Product:", hit.code), /*#__PURE__*/React.createElement("img", {
431
+ }, /*#__PURE__*/React.createElement("div", {
432
+ className: "cmp-card--type-product_details__product-info"
433
+ }, /*#__PURE__*/React.createElement("div", {
434
+ className: "cmp-card--type-product_details__header"
435
+ }, /*#__PURE__*/React.createElement("h3", {
436
+ className: "cmp-card--type-product_details__header__title"
437
+ }, title), /*#__PURE__*/React.createElement("p", {
438
+ className: "cmp-card--type-product_details__header__product-code"
439
+ }, "Product:", hit.code), /*#__PURE__*/React.createElement("img", {
398
440
  src: hit.image,
399
- alt: imageAlt
400
- }), /*#__PURE__*/React.createElement("div", {
401
- className: "folding-specification-holder",
402
- onClick: handleClick,
403
- ref: specificationRef
404
- }, /*#__PURE__*/React.createElement("h4", null, "Specifications ", /*#__PURE__*/React.createElement(FontAwesomeIcon, {
405
- icon: faChevronDown,
406
- color: "#C4262EFF"
407
- })), /*#__PURE__*/React.createElement("ul", null, facets && facets.map(function (facet) {
441
+ alt: imageAlt,
442
+ className: "cmp-card--type-product_details__header__product-image"
443
+ })), facets && /*#__PURE__*/React.createElement(AccordionSection, {
444
+ title: "Specifications",
445
+ className: "folding-specification-holder"
446
+ }, /*#__PURE__*/React.createElement("ul", {
447
+ className: "folding-specification-list"
448
+ }, facets && facets.map(function (facet) {
408
449
  return hit[facet.name] && /*#__PURE__*/React.createElement("li", {
409
450
  key: facet.name
410
451
  }, /*#__PURE__*/React.createElement("strong", null, facet.label), /*#__PURE__*/React.createElement("br", null), facet.returnsHTML ? /*#__PURE__*/React.createElement("span", {
@@ -412,7 +453,30 @@ var ProductDetailsCard = function (_a) {
412
453
  __html: hit[facet.name]
413
454
  }
414
455
  }) : hit[facet.name]);
415
- }))));
456
+ })))), /*#__PURE__*/React.createElement("div", {
457
+ className: "cmp-card--type-product_details__spares-list"
458
+ }, hit.spares && /*#__PURE__*/React.createElement(AccordionSection, {
459
+ title: "Spares & Parts",
460
+ className: "folding-spares-holder"
461
+ }, /*#__PURE__*/React.createElement("ul", {
462
+ className: "folding-spares-list"
463
+ }, hit.spares && hit.spares.map(function (spare, index) {
464
+ var args = {
465
+ cardStyle: "type-card-product",
466
+ className: "cmp-card",
467
+ title: spare.name,
468
+ imageUrl: spare.image,
469
+ imageAlt: spare.name,
470
+ onClick: function () {},
471
+ productPrice: spare.price,
472
+ showProductPrice: false,
473
+ cardLink: spare.link,
474
+ cta: "Go to webshop"
475
+ };
476
+ return /*#__PURE__*/React.createElement("li", {
477
+ key: index
478
+ }, /*#__PURE__*/React.createElement(ProductCard, args));
479
+ })))));
416
480
  };
417
481
 
418
482
  function _extends() {
@@ -476,7 +540,7 @@ var Button = function (_a) {
476
540
  * @returns The cleaned class name without the prefix.
477
541
  */
478
542
  var cleanClassNames = function (className, prefixToRemove) {
479
- return className.startsWith(prefixToRemove) ? className.replace("".concat(prefixToRemove, "__"), "") : className;
543
+ return (className === null || className === void 0 ? void 0 : className.startsWith(prefixToRemove)) ? className === null || className === void 0 ? void 0 : className.replace("".concat(prefixToRemove, "__"), "") : className;
480
544
  };
481
545
  var PRODUCT_DETAILS = 'productDetails';
482
546
  var DynamicHeading = function (_a) {
@@ -544,12 +608,12 @@ var AlgoliaDynamicSearch = function (_a) {
544
608
  var backgroundStyles = {
545
609
  "dark-grey": {
546
610
  buttonStyle: "outlineWhite",
547
- containerBackground: styles$2.hasStyleGreyBackground,
611
+ containerBackground: styles$2 === null || styles$2 === void 0 ? void 0 : styles$2.hasStyleGreyBackground,
548
612
  textColour: "white"
549
613
  },
550
614
  "silver": {
551
615
  buttonStyle: "primary",
552
- containerBackground: styles$2.hasStyleSilverGradientBackground,
616
+ containerBackground: styles$2 === null || styles$2 === void 0 ? void 0 : styles$2.hasStyleSilverGradientBackground,
553
617
  textColour: "black"
554
618
  }
555
619
  };
@@ -557,26 +621,26 @@ var AlgoliaDynamicSearch = function (_a) {
557
621
  buttonStyle: "primary",
558
622
  containerBackground: ""};
559
623
  // Combine class names properly for SCSS Modules
560
- var componentClassNames = "\n ".concat(cleanClassNames(styles$2.cmpAlgoliaDynamicSearchWidget, 'cmpAlgoliaDynamicSearchWidget'), "\n ").concat(widgetStyleProps.containerBackground, "\n ").concat(styles$2["isQuery".concat(queryType.charAt(0).toUpperCase() + queryType.slice(1))] || '', "\n ").concat(isLoadingState ? styles$2.isLoading : '', "\n ").concat(className, "\n ").trim();
624
+ var componentClassNames = "\n ".concat(cleanClassNames(styles$2 === null || styles$2 === void 0 ? void 0 : styles$2.cmpAlgoliaDynamicSearchWidget, 'cmpAlgoliaDynamicSearchWidget'), "\n ").concat(widgetStyleProps === null || widgetStyleProps === void 0 ? void 0 : widgetStyleProps.containerBackground, "\n ").concat((styles$2 === null || styles$2 === void 0 ? void 0 : styles$2["isQuery".concat(queryType.charAt(0).toUpperCase() + queryType.slice(1))]) || '', "\n ").concat(isLoadingState ? styles$2 === null || styles$2 === void 0 ? void 0 : styles$2.isLoading : '', "\n ").concat(className, "\n ").trim();
561
625
  if (!hits || hits.length === 0) {
562
626
  return null;
563
627
  }
564
628
  return /*#__PURE__*/React.createElement("div", {
565
629
  className: componentClassNames
566
630
  }, isLoadingState && /*#__PURE__*/React.createElement("div", {
567
- className: styles$2.cmpAlgoliaDynamicSearchWidget__placeholder
631
+ className: styles$2 === null || styles$2 === void 0 ? void 0 : styles$2.cmpAlgoliaDynamicSearchWidget__placeholder
568
632
  }, /*#__PURE__*/React.createElement("div", {
569
633
  className: styles$2.cmpAlgoliaDynamicSearchWidget__placeholder__loading
570
634
  })), /*#__PURE__*/React.createElement("div", {
571
- className: styles$2.cmpAlgoliaDynamicSearchWidget__container
635
+ className: styles$2 === null || styles$2 === void 0 ? void 0 : styles$2.cmpAlgoliaDynamicSearchWidget__container
572
636
  }, queryType != PRODUCT_DETAILS && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
573
637
  className: styles$2.cmpAlgoliaDynamicSearchWidget__header
574
638
  }, /*#__PURE__*/React.createElement("div", {
575
- className: styles$2.cmpAlgoliaDynamicSearchWidget__header__text
639
+ className: styles$2 === null || styles$2 === void 0 ? void 0 : styles$2.cmpAlgoliaDynamicSearchWidget__header__text
576
640
  }, /*#__PURE__*/React.createElement(DynamicHeading, {
577
641
  titleSize: titleSize
578
642
  }, heading), /*#__PURE__*/React.createElement("p", null, subtext)), callToActionUrl && /*#__PURE__*/React.createElement("div", {
579
- className: styles$2.cmpAlgoliaDynamicSearchWidget__header__cta
643
+ className: styles$2 === null || styles$2 === void 0 ? void 0 : styles$2.cmpAlgoliaDynamicSearchWidget__header__cta
580
644
  }, function () {
581
645
  var _a = getCallToActionProps(callToActionType, callToActionUrl),
582
646
  finalUrl = _a.finalUrl,
@@ -584,7 +648,7 @@ var AlgoliaDynamicSearch = function (_a) {
584
648
  var isAnchor = !!callToActionTargetSelector || (callToActionType === null || callToActionType === void 0 ? void 0 : callToActionType.toLowerCase()) !== 'internal';
585
649
  return /*#__PURE__*/React.createElement(Button, {
586
650
  element: isAnchor ? 'a' : 'button',
587
- buttonStyle: widgetStyleProps.buttonStyle,
651
+ buttonStyle: widgetStyleProps === null || widgetStyleProps === void 0 ? void 0 : widgetStyleProps.buttonStyle,
588
652
  label: callToActionText,
589
653
  href: isAnchor ? finalUrl : undefined,
590
654
  target: target,
@@ -597,7 +661,7 @@ var AlgoliaDynamicSearch = function (_a) {
597
661
  } : undefined
598
662
  });
599
663
  }()))), /*#__PURE__*/React.createElement("div", {
600
- className: styles$2.cmpAlgoliaDynamicSearchWidget__cards
664
+ className: hits.count == 1 ? styles$2 === null || styles$2 === void 0 ? void 0 : styles$2.cmpAlgoliaDynamicSearchWidget__cardSingle : styles$2 === null || styles$2 === void 0 ? void 0 : styles$2.cmpAlgoliaDynamicSearchWidget__cards
601
665
  }, hits.slice(0, maxResults).map(function (hit, index) {
602
666
  var Component = Card;
603
667
  var title = hit.title;
@@ -613,7 +677,7 @@ var AlgoliaDynamicSearch = function (_a) {
613
677
  var contentCategoryLabel = hit.contentCategoryLabel || "";
614
678
  var contentCategoryColour = hit.contentCategoryColour || "";
615
679
  var price = showProductPrice ? hit.price : "";
616
- var cardClassName = styles$2.cmpCard;
680
+ var cardClassName = styles$2 === null || styles$2 === void 0 ? void 0 : styles$2.cmpCard;
617
681
  switch (queryType) {
618
682
  case "products":
619
683
  Component = ProductCard;
@@ -759,7 +823,7 @@ var QrFormField = function (props) {
759
823
  }, props.label, " ", props.required && /*#__PURE__*/React.createElement("span", {
760
824
  className: "required-asterisk"
761
825
  }, "*")), /*#__PURE__*/React.createElement(FormFieldRenderer, _extends({
762
- key: props.value,
826
+ key: props.name,
763
827
  type: props.type,
764
828
  value: supportsValue ? props.value : undefined,
765
829
  checked: props.checked,
@@ -1156,7 +1220,7 @@ var QrForm = function (props) {
1156
1220
  };
1157
1221
  return /*#__PURE__*/React.createElement("div", {
1158
1222
  className: "qr-journey-form-wrapper"
1159
- }, props.formHeader && /*#__PURE__*/React.createElement("h1", null, props.formHeader), "Show thank you:", props.showThankYou, !props.showThankYou ? /*#__PURE__*/React.createElement("form", {
1223
+ }, props.formHeader && /*#__PURE__*/React.createElement("h1", null, props.formHeader), !props.showThankYou ? /*#__PURE__*/React.createElement("form", {
1160
1224
  action: "".concat(props.formAction, "/").concat(props.hubspotAppId, "/").concat(props.hubspotId),
1161
1225
  onSubmit: handleSubmit
1162
1226
  }, currentPage === 0 && /*#__PURE__*/React.createElement("section", {
@@ -1198,5 +1262,5 @@ var QrForm = function (props) {
1198
1262
  })));
1199
1263
  };
1200
1264
 
1201
- export { AlgoliaDynamicSearch, FormFieldRenderer, QrForm };
1265
+ export { AccordionSection, AlgoliaDynamicSearch, FormFieldRenderer, QrForm };
1202
1266
  //# sourceMappingURL=index.esm.js.map