@asantemedia-org/edwardsvacuum-design-system 1.6.64 → 1.6.66

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
@@ -482,18 +482,15 @@
482
482
  font-size: 0.85rem;
483
483
  color: rgb(196, 38, 46);
484
484
  cursor: pointer;
485
- transition: border-color 0.2s ease, background-color 0.2s ease;
486
485
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
487
486
  background-repeat: no-repeat;
488
487
  background-position: right 0.5rem center;
489
488
  }
490
489
  .FacetUnitSelector-module__facet-unit-selector__dropdown___Xj3dK:hover {
491
- border-color: rgb(172, 174, 176);
492
490
  background-color: rgb(250, 250, 250);
493
491
  }
494
492
  .FacetUnitSelector-module__facet-unit-selector__dropdown___Xj3dK:focus {
495
493
  outline: none;
496
- border-color: rgb(196, 38, 46);
497
494
  box-shadow: 0 0 0 2px rgba(196, 38, 46, 0.15);
498
495
  }
499
496
  .FacetUnitSelector-module__facet-unit-selector__dropdown___Xj3dK option {
package/dist/index.d.ts CHANGED
@@ -6,7 +6,4 @@ export { QrForm } from "@stories/experiences/QRFormJourney/Qr-form/Qr-form";
6
6
  export type { allQrFromProps } from "@stories/experiences/QRFormJourney/Qr-form/Qr-form";
7
7
  export type { FormFieldType } from "@stories/experiences/QRFormJourney/FormFieldType";
8
8
  export { AccordionSection } from "@stories/components/AccordionSection";
9
- export { formatFacetValueAsString, isDelimitedFacetValue, parseDelimitedFacetValue } from "./utils/helpers/formatFacetValue";
10
- export { FacetUnitSelector } from "./stories/components/FacetUnitSelector";
11
- export { FriendlyCaptcha } from "./stories/experiences/QRFormJourney/Friendly-captcha/FriendlyCaptcha";
12
9
  import "@stories/experiences/QRFormJourney/Qr-form/Qr-form";
@@ -482,18 +482,15 @@
482
482
  font-size: 0.85rem;
483
483
  color: rgb(196, 38, 46);
484
484
  cursor: pointer;
485
- transition: border-color 0.2s ease, background-color 0.2s ease;
486
485
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
487
486
  background-repeat: no-repeat;
488
487
  background-position: right 0.5rem center;
489
488
  }
490
489
  .FacetUnitSelector-module__facet-unit-selector__dropdown___Xj3dK:hover {
491
- border-color: rgb(172, 174, 176);
492
490
  background-color: rgb(250, 250, 250);
493
491
  }
494
492
  .FacetUnitSelector-module__facet-unit-selector__dropdown___Xj3dK:focus {
495
493
  outline: none;
496
- border-color: rgb(196, 38, 46);
497
494
  box-shadow: 0 0 0 2px rgba(196, 38, 46, 0.15);
498
495
  }
499
496
  .FacetUnitSelector-module__facet-unit-selector__dropdown___Xj3dK option {
package/dist/index.esm.js CHANGED
@@ -370,17 +370,6 @@ var parseDelimitedFacetValue = function (value) {
370
370
  return entry !== null;
371
371
  });
372
372
  };
373
- /**
374
- * Formats a delimited facet value into a human-readable string list
375
- * Returns null if the value is not in delimited format
376
- */
377
- var formatFacetValueAsString = function (value) {
378
- if (!isDelimitedFacetValue(value)) return null;
379
- var entries = parseDelimitedFacetValue(value);
380
- return entries.map(function (e) {
381
- return "".concat(e.value, " ").concat(e.unit);
382
- }).join(', ');
383
- };
384
373
 
385
374
  var styles$2 = {"facet-unit-selector":"FacetUnitSelector-module__facet-unit-selector___1Zdhx","facet-unit-selector__value":"FacetUnitSelector-module__facet-unit-selector__value___E-LAN","facet-unit-selector__unit":"FacetUnitSelector-module__facet-unit-selector__unit___TxIk7","facet-unit-selector__dropdown":"FacetUnitSelector-module__facet-unit-selector__dropdown___Xj3dK"};
386
375
 
@@ -399,14 +388,28 @@ var FacetUnitSelector = function (_a) {
399
388
  var _c = useState(0),
400
389
  selectedIndex = _c[0],
401
390
  setSelectedIndex = _c[1];
391
+ var isChanging = useRef(false);
402
392
  var getClassName = function (name) {
403
393
  return usePlainClasses ? name : getStyle$2(name);
404
394
  };
405
395
  if (!entries || entries.length === 0) return null;
406
396
  var selectedEntry = entries[selectedIndex];
407
- var handleUnitChange = function (e) {
408
- setSelectedIndex(Number(e.target.value));
409
- };
397
+ var handleUnitChange = useCallback(function (e) {
398
+ // Stop event propagation to prevent AEM handlers
399
+ e.stopPropagation();
400
+ // Prevent multiple rapid changes
401
+ if (isChanging.current) return;
402
+ isChanging.current = true;
403
+ var newIndex = Number(e.target.value);
404
+ // Use requestAnimationFrame to defer state update
405
+ requestAnimationFrame(function () {
406
+ setSelectedIndex(newIndex);
407
+ // Reset change lock
408
+ setTimeout(function () {
409
+ isChanging.current = false;
410
+ }, 100);
411
+ });
412
+ }, []);
410
413
  return /*#__PURE__*/React.createElement("div", {
411
414
  className: getClassName("facet-unit-selector")
412
415
  }, /*#__PURE__*/React.createElement("span", {
@@ -1651,5 +1654,5 @@ var QrForm = function (props) {
1651
1654
  })));
1652
1655
  };
1653
1656
 
1654
- export { AccordionSection, AlgoliaDynamicSearchEdwards as AlgoliaDynamicSearch, AlgoliaDynamicSearchRaw, Card, FacetUnitSelector, FriendlyCaptcha, ProductCard, ProductDetailsCard, QrForm, formatFacetValueAsString, isDelimitedFacetValue, parseDelimitedFacetValue };
1657
+ export { AccordionSection, AlgoliaDynamicSearchEdwards as AlgoliaDynamicSearch, AlgoliaDynamicSearchRaw, Card, ProductCard, ProductDetailsCard, QrForm };
1655
1658
  //# sourceMappingURL=index.esm.js.map