@trafilea/afrodita-components 6.36.10 → 6.36.12

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.
@@ -20882,18 +20882,23 @@ var _playVideo = function () {
20882
20882
  _sendCommandToIframe('playVideo');
20883
20883
  };
20884
20884
 
20885
+ function closeZoom() {
20886
+ var closeButton = document.querySelectorAll('.iiz__btn.iiz__close.iiz__close--visible')[0];
20887
+ if (closeButton) {
20888
+ closeButton.click();
20889
+ }
20890
+ }
20891
+
20885
20892
  var afterChangeSlide = function (_a) {
20886
20893
  var _b;
20887
- var slide = _a.slide, contents = _a.contents, setSelectedImageIndex = _a.setSelectedImageIndex, setArrowsVisible = _a.setArrowsVisible, onChange = _a.onChange;
20894
+ var slide = _a.slide, contents = _a.contents, setSelectedImageIndex = _a.setSelectedImageIndex, onChange = _a.onChange;
20888
20895
  var activeSlide = contents[slide];
20889
20896
  // If autoplay is true and iframe is the active slide, play the video
20890
20897
  var autoplay = (_b = activeSlide === null || activeSlide === void 0 ? void 0 : activeSlide.url) === null || _b === void 0 ? void 0 : _b.includes('autoplay=1');
20891
20898
  autoplay ? _playVideo() : _stopVideo();
20892
- if (setArrowsVisible) {
20893
- setArrowsVisible(false);
20894
- }
20895
20899
  setSelectedImageIndex(Math.round(slide));
20896
20900
  onChange === null || onChange === void 0 ? void 0 : onChange(slide);
20901
+ closeZoom();
20897
20902
  };
20898
20903
 
20899
20904
  var TopTagContainer$1 = newStyled.div(templateObject_1$8 || (templateObject_1$8 = __makeTemplateObject(["\n position: absolute;\n border-top-left-radius: 8px;\n border-end-end-radius: 16px;\n overflow: hidden;\n left: ", ";\n top: ", ";\n"], ["\n position: absolute;\n border-top-left-radius: 8px;\n border-end-end-radius: 16px;\n overflow: hidden;\n left: ", ";\n top: ", ";\n"])), function (props) { return (props.borderRadiusVariant ? '13px' : '0'); }, function (props) { return (props.borderRadiusVariant ? '11px' : '0'); });
@@ -21026,7 +21031,6 @@ var MainContent = function (_a) {
21026
21031
  slide: e,
21027
21032
  contents: contents,
21028
21033
  setSelectedImageIndex: setSelectedImageIndex,
21029
- setArrowsVisible: setArrowsVisible,
21030
21034
  onChange: onChange,
21031
21035
  });
21032
21036
  } }, settings, { nextArrow: arrowsVisible ? (jsx$1(NavButtonContainer$1, __assign$1({ "data-testid": "main-gallery-next-button" }, { children: jsx$1(Button$1, { children: jsx$1(Icon.Arrows.ChevronRight, { height: 2.125, width: 1.25, fill: "#292929" }, void 0) }, void 0) }), void 0)) : undefined, prevArrow: arrowsVisible ? (jsx$1(NavButtonContainer$1, { children: jsx$1(Button$1, { children: jsx$1(Icon.Arrows.ChevronLeft, { height: 2.125, width: 1.25, fill: "#292929" }, void 0) }, void 0) }, void 0)) : undefined, ref: slick }, { children: contents.map(function (content, idx) {
@@ -21132,15 +21136,15 @@ var SubContainer = newStyled.div({
21132
21136
  },
21133
21137
  '@media screen and (min-color-index:0) and(-webkit-min-device-pixel-ratio:0)': {
21134
21138
  '@media': {
21135
- marginTop: '40px',
21136
- }
21139
+ marginTop: '40px !important',
21140
+ },
21137
21141
  },
21138
21142
  '@media not all and (min-resolution:.001dpcm)': {
21139
21143
  '@supports (-webkit-appearance:none) and (stroke-color:transparent)': {
21140
- marginTop: '40px',
21144
+ marginTop: '40px !important',
21141
21145
  },
21142
21146
  '@supports (-webkit-appearance:none) and (not (stroke-color:transparent))': {
21143
- marginTop: '40px',
21147
+ marginTop: '40px !important',
21144
21148
  },
21145
21149
  },
21146
21150
  '@media screen and (min-width: 380px) and (max-width: 400px) and (max-height: 860px) ': {
@@ -21188,6 +21192,13 @@ var ProductGalleryMobileV4 = function (_a) {
21188
21192
  useEffect(function () {
21189
21193
  setSelectedImageIndex(selectedValue);
21190
21194
  }, [selectedValue]);
21195
+ useEffect(function () {
21196
+ var body = document.querySelector('body');
21197
+ if (!body) {
21198
+ return;
21199
+ }
21200
+ body.style.overflow = galleryOpened ? 'hidden' : 'visible';
21201
+ }, [galleryOpened]);
21191
21202
  return (jsx$1("div", __assign$1({ ref: containerRef }, { children: galleryOpened ? (jsx$1(GalleryDetailed, { images: images, topTag: topTag, topRightTag: topRightTag, bottomTag: bottomTag, productImageDataTestId: productImageDataTestId, borderRadiusVariant: borderRadiusVariant, itemsOnViewport: itemsOnViewport, selectedImageIndex: selectedImageIndex, setSelectedImageIndex: setSelectedImageIndex, setGalleryOpened: setGalleryOpened }, void 0)) : (jsx$1(ContentGallery, { contents: images, containerRef: containerRef, customClick: customClick, topTag: topTag, topRightTag: topRightTag, bottomTag: bottomTag, testId: productImageDataTestId, borderRadiusVariant: borderRadiusVariant, itemsOnViewport: itemsOnViewport, selectedImageIndex: selectedImageIndex, setSelectedImageIndex: setSelectedImageIndex, setGalleryOpened: setGalleryOpened }, void 0)) }), void 0));
21192
21203
  };
21193
21204