@trafilea/afrodita-components 7.25.2 → 7.25.4
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/build/es/components/atoms/Toggle/toggle.styled.js +1 -1
- package/build/es/components/gallery/ProductGallery.js +1 -1
- package/build/es/components/gallery/components/ImageProductSlide/ImageProductSlide.js +1 -1
- package/build/es/components/gallery/components/ImageProductSlide/styled.js +1 -1
- package/build/es/components/organisms/ProductGalleryMobile/ProductGalleryMobileV1/ImageProductSlide.js +1 -1
- package/build/es/components/organisms/ProductGalleryMobile/ProductGalleryMobileV1/ProductGalleryMobile.js +1 -1
- package/build/es/components/organisms/ProductGalleryMobile/ProductGalleryMobileV1/styled.js +2 -0
- package/build/es/components/organisms/ProductGalleryMobile/ProductGalleryMobileV1/styled.js.map +1 -0
- package/build/index.d.ts +22 -2
- package/build/lib/components/atoms/Toggle/toggle.styled.js +1 -1
- package/build/lib/components/gallery/ProductGallery.js +1 -1
- package/build/lib/components/gallery/components/ImageProductSlide/ImageProductSlide.js +1 -1
- package/build/lib/components/gallery/components/ImageProductSlide/styled.js +1 -1
- package/build/lib/components/organisms/ProductGalleryMobile/ProductGalleryMobileV1/ImageProductSlide.js +1 -1
- package/build/lib/components/organisms/ProductGalleryMobile/ProductGalleryMobileV1/ProductGalleryMobile.js +1 -1
- package/build/lib/components/organisms/ProductGalleryMobile/ProductGalleryMobileV1/styled.js +2 -0
- package/build/lib/components/organisms/ProductGalleryMobile/ProductGalleryMobileV1/styled.js.map +1 -0
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__makeTemplateObject as n}from"tslib";import t from"@emotion/styled";var o,
|
|
1
|
+
import{__makeTemplateObject as n}from"tslib";import t from"@emotion/styled";var i,o,r,e=t.label(i||(i=n(["\n display: flex;\n align-items: center;\n gap: 10px;\n cursor: pointer;\n"],["\n display: flex;\n align-items: center;\n gap: 10px;\n cursor: pointer;\n"]))),p=t.div(o||(o=n(["\n position: relative;\n width: 36px;\n height: 20px;\n background: #949494;\n border-radius: 60px;\n padding: 4px;\n transition: 300ms all;\n\n &:before {\n transition: 300ms all;\n content: '';\n position: absolute;\n width: 16px;\n height: 16px;\n border-radius: 35px;\n top: 50%;\n left: 2.5px;\n background: white;\n transform: translate(0, -50%);\n }\n"],["\n position: relative;\n width: 36px;\n height: 20px;\n background: #949494;\n border-radius: 60px;\n padding: 4px;\n transition: 300ms all;\n\n &:before {\n transition: 300ms all;\n content: '';\n position: absolute;\n width: 16px;\n height: 16px;\n border-radius: 35px;\n top: 50%;\n left: 2.5px;\n background: white;\n transform: translate(0, -50%);\n }\n"]))),a=t.input(r||(r=n(["\n opacity: 0;\n position: absolute;\n width: 36px;\n height: 20px;\n margin: 0;\n cursor: pointer;\n\n &:checked + div {\n background: ",";\n\n &:before {\n transform: translate(14.5px, -50%);\n }\n }\n\n &:focus-visible + div {\n outline: 2px solid currentColor;\n outline-offset: 2px;\n border-radius: 60px;\n }\n"],["\n opacity: 0;\n position: absolute;\n width: 36px;\n height: 20px;\n margin: 0;\n cursor: pointer;\n\n &:checked + div {\n background: ",";\n\n &:before {\n transform: translate(14.5px, -50%);\n }\n }\n\n &:focus-visible + div {\n outline: 2px solid currentColor;\n outline-offset: 2px;\n border-radius: 60px;\n }\n"])),(function(n){return n.$color}));export{a as InputWrapper,e as LabelWrapper,p as SwitchWrapper};
|
|
2
2
|
//# sourceMappingURL=toggle.styled.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as o}from"tslib";import{jsxs as i,Fragment as e,jsx as t}from"react/jsx-runtime";import{useState as r,useEffect as a}from"react";import{ZoomModalComponent as
|
|
1
|
+
import{__assign as o}from"tslib";import{jsxs as i,Fragment as e,jsx as t}from"react/jsx-runtime";import{useState as r,useEffect as a}from"react";import{ZoomModalComponent as n}from"../organisms/ModalZoom/index.js";import{ImagePreviewList as d}from"./components/ImagePreviewList/ImagePreviewList.js";import{ImageProductSlide as s}from"./components/ImageProductSlide/ImageProductSlide.js";import{Container as v}from"./styled.js";var l=function(l){var m=l.images,c=l.selectedValue,u=l.topTag,p=l.topRightTag,h=l.bottomTag,f=l.productImageDataTestId,g=l.previewListDataTestId,I=l.thumbnailPosition,w=l.borderRadiusVariant,P=void 0!==w&&w,T=l.previewImgBorderColor,V=l.ctaText,C=l.ctaAction,x=l.hideCTA,O=void 0===x||x,b=l.hasOverflowArrows,z=void 0!==b&&b,A=l.withZoom,R=void 0===A||A,y=l.hasToPreserveOrder,S=void 0!==y&&y,j=l.isRatioSquare,q=l.itemsOnViewport,B=void 0===q?6:q,L=l.videoAutoplay,M=void 0!==L&&L,Z=l.videoInPreview,D=void 0!==Z&&Z,N=l.hideVideoControls,k=void 0!==N&&N,E=l.alwaysPlayInPreview,F=void 0!==E&&E,G=l.zoomOptions,H=l.zoomIconVariant,J=l.chevronsColor,K=void 0===J?"#000":J,Q=l.showChevrons,U=void 0!==Q&&Q,W=r(function(o,i){if(i){var e=o.indexOf(i);return e>-1?e:0}return 0}(m,c)),X=W[0],Y=W[1];if(a((function(){if(c&&!S){var o=m.indexOf(c);o>-1&&Y(o)}}),[c,S]),0===m.length)return null;var $=m[X];return i(e,{children:[i(v,o({thumbnailPosition:I},{children:[t(d,{images:m,selectedImage:$,dataTestId:g,onClick:function(o){Y(o)},position:I,borderRadiusVariant:P,previewImgBorderColor:T,hasOverflowArrows:z,isRatioSquare:j,itemsOnViewport:B,videoInPreview:D,alwaysPlayInPreview:F},void 0),t(s,{content:$,topTag:u,topRightTag:p,bottomTag:h,testId:f,position:I,borderRadiusVariant:P,ctaText:V,ctaAction:C,hideCTA:O,withZoom:R,isRatioSquare:j,videoAutoplay:M,hideVideoControls:k,zoomOptions:G,zoomIconVariant:H,chevronsColor:K,onPrev:U?function(){X>0&&Y(X-1)}:void 0,onNext:U?function(){X<m.length-1&&Y(X+1)}:void 0,hasPrev:U&&X>0,hasNext:U&&X<m.length-1},void 0)]}),void 0),Boolean(null==G?void 0:G.zoomModalId)&&t(n,{version:null==G?void 0:G.zoomVersion,modalId:(null==G?void 0:G.zoomModalId)||"zoom-modal-v1",contents:m,initialSlide:X,fade:null==G?void 0:G.fade},void 0)]},void 0)};export{l as ProductGallery};
|
|
2
2
|
//# sourceMappingURL=ProductGallery.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as o}from"tslib";import{jsxs as i,Fragment as
|
|
1
|
+
import{__assign as o}from"tslib";import{jsxs as i,Fragment as d,jsx as t}from"react/jsx-runtime";import{Icon as e}from"../../../icons/index.js";import{useZoom as l}from"../../../organisms/ModalZoom/useZoom.js";import{ZoomButtonComponent as r}from"../../../organisms/ModalZoom/ZoomButton.js";import{Video as a}from"../../../molecules/Video/Video.js";import{Container as n,InnerImageZoomStyled as v,ImageStyled as s,TopTagContainer as m,BottomTagContainer as c,TopRightTagWrapper as h,TopRightTagContainer as u,ButtonSecondaryOutlineWrapper as g,ChevronPrev as p,ChevronNext as z}from"./styled.js";var b=function(b){var f,y=b.content,w=b.topTag,x=b.topRightTag,C=b.bottomTag,I=b.testId,j=b.position,A=void 0===j?"vertical":j,M=b.borderRadiusVariant,V=b.ctaText,R=b.ctaAction,P=b.hideCTA,T=b.withZoom,Z=b.isRatioSquare,k=b.videoAutoplay,N=void 0!==k&&k,S=b.hideVideoControls,q=void 0!==S&&S,B=b.zoomOptions,F=b.isActive,H=void 0===F||F,L=b.zoomIconVariant,O=b.chevronsColor,U=void 0===O?"#000":O,E=b.onPrev,D=b.onNext,G=b.hasPrev,J=void 0!==G&&G,K=b.hasNext,Q=void 0!==K&&K,W=null==y?void 0:y.url,X=null!==(f=null==y?void 0:y.isVideo)&&void 0!==f&&f,Y=N||null==y?void 0:y.thumbnailUrl,$=q?{pointerEvents:"none"}:void 0,_=l((null==B?void 0:B.zoomModalId)||"zoom-modal-v1").handleZoomClick;return i(n,o({"data-testid":I,className:"stylefor".concat(A),borderRadiusVariant:M,position:A},{children:[!X&&i(d,{children:[T?i(d,{children:[t(v,{src:W,zoomSrc:(null==y?void 0:y.zoomUrl)||W,zoomType:(null==B?void 0:B.zoomModalId)?"click":"hover",imgAttributes:{alt:y.alt,style:{objectFit:"cover",objectPosition:"center"},loading:"eager",decoding:"sync",fetchpriority:"high"},width:"horizontal"==A?360:530,height:"horizontal"==A?480:720,hideHint:!!L||!!(null==B?void 0:B.zoomModalId),isRatioSquare:Z,afterZoomIn:(null==B?void 0:B.zoomModalId)?_:void 0},void 0),L]},void 0):t(s,{width:"horizontal"==A?"360px":"530px",height:"auto",src:W,alt:y.alt,objectFit:"cover",loading:"eager",decoding:"sync",isRatioSquare:Z,fetchPriority:"high"},void 0),t(m,o({borderRadiusVariant:M},{children:w}),void 0),t(c,o({isCTAHidden:P},{children:C}),void 0),!!x&&t(h,{children:t(u,{children:x},void 0)},void 0)]},void 0),X&&t(a,{source:W,thumbnail:Y,autoPlay:N,muted:!0,loop:!0,withProgressBar:!q,style:$,isActive:H,lazyLoad:!1},void 0),V&&R&&t("div",o({style:{display:P?"none":"block"}},{children:t(g,{wide:!0,onClick:R,text:V},void 0)}),void 0),Boolean(null==B?void 0:B.zoomModalId)&&t(r,{modalId:(null==B?void 0:B.zoomModalId)||"zoom-modal-v1",showOnMobile:"v2"===(null==B?void 0:B.zoomVersion)},void 0),J&&E&&t(p,o({onClick:E,"aria-label":"Previous image"},{children:t(e.Arrows.ChevronLeft,{height:1.85,width:1.85,fill:U},void 0)}),void 0),Q&&D&&t(z,o({onClick:D,"aria-label":"Next image"},{children:t(e.Arrows.ChevronRight,{height:1.85,width:1.85,fill:U},void 0)}),void 0)]}),void 0)};export{b as ImageProductSlide};
|
|
2
2
|
//# sourceMappingURL=ImageProductSlide.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__makeTemplateObject as
|
|
1
|
+
import{__makeTemplateObject as n}from"tslib";import t from"@emotion/styled";import o from"react-inner-image-zoom";import"react/jsx-runtime";import"../../../../core/theme/Theme.js";import"react";import"../../../../types/enums.js";import"../../../pricing/clubOffer/ClubOfferTag.js";import"../../../pricing/discount/styled.js";import"../../../pricing/styles.js";import"../../../tooltip/Tooltip.js";import"../../../atoms/PriceLabel/PriceLabel.js";import"../../../atoms/ClubPriceMemberLabel/ClubPriceMemberLabel.styled.js";import"../../../atoms/HorizontalDivider/HorizontalDivider.js";import"../../../atoms/Icon/Icon.js";import{Image as e}from"../../../atoms/Image/Image.js";import"../../../atoms/PriceLabelV2/PriceLabelV2.js";import"../../../atoms/Toggle/toggle.styled.js";import"@emotion/react/jsx-runtime";import"../../../cta/styled.js";import i from"../../../cta/secondary/ButtonSecondaryOutline.js";var r,a,p,s,m,l,c,d,u,g,h,b=t.div(r||(r=n(["\n ","\n z-index: 0;\n position: relative;\n height: fit-content;\n /* &.styleforhorizontal {\n height: 30rem;\n } */\n display: block;\n overflow: hidden;\n white-space: nowrap;\n grid-area: ",";\n width: 100%;\n max-width: max-content;\n"],["\n ","\n z-index: 0;\n position: relative;\n height: fit-content;\n /* &.styleforhorizontal {\n height: 30rem;\n } */\n display: block;\n overflow: hidden;\n white-space: nowrap;\n grid-area: ",";\n width: 100%;\n max-width: max-content;\n"])),(function(n){return n.borderRadiusVariant&&"border-radius: 40px;"}),(function(n){return"horizontal"===n.position?"unset":"1/2"})),f=t.div(a||(a=n(["\n position: absolute;\n left: ",";\n top: ",";\n"],["\n position: absolute;\n left: ",";\n top: ",";\n"])),(function(n){var t=n.borderRadiusVariant,o=n.theme;return t?"50px":o.component.gallery.tagPosition.left}),(function(n){var t=n.borderRadiusVariant,o=n.theme;return t?"10px":o.component.gallery.tagPosition.top})),x=t.div(p||(p=n(["\n position: absolute;\n bottom: ",";\n left: 0;\n"],["\n position: absolute;\n bottom: ",";\n left: 0;\n"])),(function(n){return n.isCTAHidden?"60px":"120px"})),j=t.div(s||(s=n(["\n position: absolute;\n right: 0;\n top: 0;\n"],["\n position: absolute;\n right: 0;\n top: 0;\n"]))),y=t.div(m||(m=n(["\n white-space: pre-wrap;\n"],["\n white-space: pre-wrap;\n"]))),v=t(i)(l||(l=n(["\n text-transform: capitalize;\n margin-top: 12px;\n\n @media (max-width: 992px) {\n margin-top: 4px;\n }\n"],["\n text-transform: capitalize;\n margin-top: 12px;\n\n @media (max-width: 992px) {\n margin-top: 4px;\n }\n"]))),w=t(e)(c||(c=n(["\n aspect-ratio: ",";\n"],["\n aspect-ratio: ",";\n"])),(function(n){var t=n.theme;return n.isRatioSquare?"1 / 1":t.component.gallery.aspectRatio})),z=t(o)(d||(d=n(["\n aspect-ratio: ",";\n"],["\n aspect-ratio: ",";\n"])),(function(n){var t=n.theme;return n.isRatioSquare?"1 / 1":t.component.gallery.aspectRatio})),P=t.button(u||(u=n(["\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n background: transparent;\n border: none;\n padding: 0.188rem 0.625rem;\n cursor: pointer;\n z-index: 2;\n height: 40px;\n"],["\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n background: transparent;\n border: none;\n padding: 0.188rem 0.625rem;\n cursor: pointer;\n z-index: 2;\n height: 40px;\n"]))),R=t(P)(g||(g=n(["\n left: 10px;\n"],["\n left: 10px;\n"]))),L=t(P)(h||(h=n(["\n right: 10px;\n"],["\n right: 10px;\n"])));export{x as BottomTagContainer,v as ButtonSecondaryOutlineWrapper,P as ChevronButton,L as ChevronNext,R as ChevronPrev,b as Container,w as ImageStyled,z as InnerImageZoomStyled,y as TopRightTagContainer,j as TopRightTagWrapper,f as TopTagContainer};
|
|
2
2
|
//# sourceMappingURL=styled.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{__assign as o}from"tslib";import{jsxs as i,Fragment as r,jsx as e}from"react/jsx-runtime";import t from"@ant-design/react-slick";import{useMemo as l,useRef as n,useState as d,useCallback as a,useEffect as m}from"react";import s from"react-inner-image-zoom";import u from"../../../cta/primary/ButtonPrimary.js";import"@emotion/react/jsx-runtime";import"../../../../core/theme/Theme.js";import"../../../../types/enums.js";import"../../../cta/styled.js";import{Video as v}from"../../../molecules/Video/Video.js";import{ZoomModalComponent as c}from"../../ModalZoom/index.js";import{useZoom as h}from"../../ModalZoom/useZoom.js";import{Image as f}from"../../../atoms/Image/Image.js";import{usePreventVerticalScroll as p}from"../../../../hooks/usePreventVerticalScroll/usePreventVerticalScroll.js";import{Icon as g}from"../../../icons/index.js";import{stopVideoCommand as y,playVideoCommand as z}from"../utils/sendCommandToIframe.js";import{Container as k,NavButtonContainer as j,Button as b,ProgressBar as x,ViewContainerWrapper as C,TopTagContainer as V,BottomTagContainer as I,TopRightTagContainer as w,SlideContentWrapper as M}from"./styled.js";import{VideoDisplay as T}from"../../ModalZoom/VideoDisplay.js";import{ZoomButtonComponent as S}from"../../ModalZoom/ZoomButton.js";var B={dots:!0,infinite:!1,speed:200,slidesToShow:1,slidesToScroll:1},P=function(o,i){return o.loading=i?"eager":"lazy",o.decoding=i?"sync":"async",o.fetchpriority=i?"high":"auto",o},Z=function(Z){var A=Z.contents,O=Z.customClick,R=void 0!==O&&O,D=Z.topTag,L=Z.topRightTag,G=Z.bottomTag,U=Z.testId,E=Z.borderRadiusVariant,H=Z.selectedValue,N=Z.onChange,W=Z.videoAutoplay,q=void 0!==W&&W,F=Z.hideVideoControls,J=void 0!==F&&F,K=Z.videoMuted,Q=void 0===K||K,X=Z.videoLoop,Y=void 0===X||X,$=Z.enableZoom,_=void 0===$||$,oo=Z.zoomOptions,io=Z.chevronsColor,ro=void 0===io?"#000":io,eo=Z.sliderDotsOnBottom,to=void 0!==eo&&eo,lo=Z.zoomIconVariant,no=Z.baseSettings,ao=Z.progressBar,mo=o(o({},B),no),so=l((function(){if(!H||!(null==A?void 0:A.length))return 0;var o=A.findIndex((function(o){return o.url===H.url||o.key===H.key}));return Math.max(0,o)}),[A,H]),uo=n(null),vo=n(null),co=d(so),ho=co[0],fo=co[1],po=h((null==oo?void 0:oo.zoomModalId)||"zoom-modal-v1").handleZoomClick,go=Boolean(null==oo?void 0:oo.zoomModalId),yo=_&&!go,zo=1===mo.slidesToShow;p(vo);var ko=a((function(o){var i;null===(i=uo.current)||void 0===i||i.slickGoTo(o)}),[uo]),jo=(Math.round(ho)+1)/A.length*100,bo=n(!0);return m((function(){var o;if(bo.current)bo.current=!1;else if(H){var i=A.findIndex((function(o){return o.url===H.url||o.key===H.key}));-1!==i&&(null===(o=uo.current)||void 0===o||o.slickGoTo(i))}}),[A,H]),i(r,{children:[R&&e("div",o({style:{display:"flex",marginBottom:"20px",gap:"10px"}},{children:A.map((function(o,i){return e(u,{onClick:function(){return ko(i)},text:String(i+1),inline:!0},i)}))}),void 0),i(k,o({"data-testid":U,borderRadiusVariant:E,sliderDotsOnBottom:to,ref:vo,isOneSlidePerView:zo},{children:[e(t,o({afterChange:function(o){var i,r=A[o];(null===(i=null==r?void 0:r.url)||void 0===i?void 0:i.includes("autoplay=1"))?z():y(),fo(o),null==N||N(o)}},mo,{initialSlide:so,nextArrow:e(j,{children:e(b,{children:e(g.Arrows.ChevronRight,{height:2.125,width:1.25,fill:ro},void 0)},void 0)},void 0),prevArrow:e(j,{children:e(b,{children:e(g.Arrows.ChevronLeft,{height:2.125,width:1.25,fill:ro},void 0)},void 0)},void 0),ref:uo},{children:A.map((function(t,l){var n,d=null==t?void 0:t.url,a=null!==(n=null==t?void 0:t.isVideo)&&void 0!==n&&n,m=t.url===(null==H?void 0:H.url)||t.key===(null==H?void 0:H.key),u=l===ho,c={alt:t.alt,width:"100%",height:"510px"},h=function(){if(yo)return i(r,{children:[e(s,{src:d,zoomSrc:(null==t?void 0:t.zoomUrl)||d,zoomType:"hover",imgAttributes:P(c,m),height:510,fullscreenOnMobile:!0,className:"zoomWrapper",hideHint:!!lo},void 0),lo]},void 0);var o=P(c,m);return e(f,{src:d,alt:t.alt,width:"100%",height:"510px",loading:o.loading,decoding:o.decoding,fetchPriority:m?"high":"auto"},void 0)};return e(go?C:zo?"div":M,o({},go?{onClick:po}:{},{children:a?go?e(T,{content:t},void 0):e(v,{source:d,thumbnail:null==t?void 0:t.thumbnailUrl,autoPlay:q,muted:Q,loop:Y,withProgressBar:!J,style:J?{pointerEvents:"none"}:void 0,isActive:u,lazyLoad:!0},void 0):i(r,{children:[h(),e(V,o({borderRadiusVariant:E,"data-testid":"topTag"},{children:D}),void 0),e(I,o({"data-testid":"bottomTag"},{children:G}),void 0),!!L&&e(w,{children:L},void 0),go&&e(S,{modalId:(null==oo?void 0:oo.zoomModalId)||"zoom-modal-v1",showOnMobile:"v2"===(null==oo?void 0:oo.zoomVersion)},void 0)]},void 0)}),t.key)}))}),void 0),ao&&e(x,{progressInPercentage:jo,fillColor:ao.fillColor,backgroundColor:ao.backgroundColor},void 0)]}),void 0),go&&e(c,{version:null==oo?void 0:oo.zoomVersion,modalId:(null==oo?void 0:oo.zoomModalId)||"zoom-modal-v1",contents:A,initialSlide:ho,fade:null==oo?void 0:oo.fade},void 0)]},void 0)};export{Z as default};
|
|
2
2
|
//# sourceMappingURL=ImageProductSlide.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__makeTemplateObject as o,__assign as t}from"tslib";import{jsx as i}from"react/jsx-runtime";import e from"@emotion/styled";import{useState as
|
|
1
|
+
import{__makeTemplateObject as o,__assign as t}from"tslib";import{jsx as i}from"react/jsx-runtime";import e from"@emotion/styled";import{useState as n}from"react";import r from"./ImageProductSlide.js";var d,a=e.div(d||(d=o(["\n display: flex;\n flex-direction: column;\n height: fit-content;\n position: relative;\n max-width: 450px;\n\n > div {\n ","\n }\n"],["\n display: flex;\n flex-direction: column;\n height: fit-content;\n position: relative;\n max-width: 450px;\n\n > div {\n ","\n }\n"])),(function(o){return o.sliderDotsOnBottom&&" \n overflow: visible;\n "})),s=function(o){var e=o.images,d=o.customClick,s=o.topTag,l=o.topRightTag,m=o.bottomTag,v=o.productImageDataTestId,p=o.borderRadiusVariant,c=void 0!==p&&p,u=o.selectedValue,g=o.hasToPreserveOrder,f=void 0!==g&&g,h=o.itemsOnViewport,b=void 0===h?1:h,x=o.videoAutoplay,V=void 0!==x&&x,O=o.hideVideoControls,T=void 0!==O&&O,C=o.videoMuted,y=void 0===C||C,B=o.videoLoop,I=void 0===B||B,w=o.enableZoom,D=void 0===w||w,z=o.zoomOptions,R=o.chevronsColor,S=void 0===R?"#000":R,j=o.sliderDotsOnBottom,k=void 0!==j&&j,A=o.zoomIconVariant,L=o.baseSettings,M=o.progressBar,P=n(0),Z=P[0],q=P[1],E=f?null==e?void 0:e[Z]:u;return i(a,t({"data-testid":"product-gallery-mobile-v1",sliderDotsOnBottom:k},{children:i(r,{contents:e,customClick:d,topTag:s,topRightTag:l,bottomTag:m,testId:v,borderRadiusVariant:c,selectedValue:E,onChange:function(o){return q(o)},itemsOnViewport:b,videoAutoplay:V,hideVideoControls:T,videoMuted:y,videoLoop:I,enableZoom:D,zoomOptions:z,chevronsColor:S,zoomIconVariant:A,sliderDotsOnBottom:k,baseSettings:L,progressBar:M},void 0)}),void 0)};export{s as ProductGalleryMobile};
|
|
2
2
|
//# sourceMappingURL=ProductGalleryMobile.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__makeTemplateObject as n}from"tslib";import t from"@emotion/styled";var i,o,r,e,a,d,p,u,l,s=t.div(i||(i=n(["\n width: 80%;\n margin: 0 auto;\n height: 2px;\n margin-top: 2px;\n background: linear-gradient(\n to right,\n "," 0%,\n "," ","%,\n ","\n ","%,\n "," 100%\n );\n"],["\n width: 80%;\n margin: 0 auto;\n height: 2px;\n margin-top: 2px;\n background: linear-gradient(\n to right,\n "," 0%,\n "," ","%,\n ","\n ","%,\n "," 100%\n );\n"])),(function(n){return n.fillColor}),(function(n){return n.fillColor}),(function(n){var t=n.progressInPercentage;return void 0===t?0:t}),(function(n){return n.backgroundColor}),(function(n){var t=n.progressInPercentage;return void 0===t?0:t}),(function(n){return n.backgroundColor})),c=t.div(o||(o=n(["\n ","\n position: relative;\n max-height: 524px;\n overflow: hidden;\n & .slick-dots li.slick-active button:before {\n background-color: ",";\n }\n ","\n\n\n ","\n"],["\n ","\n position: relative;\n max-height: 524px;\n overflow: hidden;\n & .slick-dots li.slick-active button:before {\n background-color: ",";\n }\n ","\n\n\n ","\n"])),(function(n){return n.borderRadiusVariant&&"\n border-radius: 40px;\n "}),(function(n){return n.theme.component.slideNavigation.slideDots.selectedDotColor}),(function(n){return n.sliderDotsOnBottom&&"\n > div > ul {\n margin-bottom: -40px !important;\n\n > li.slick-active > button:before {\n background-color: #292929 !important;\n top: 0 !important;\n border: none !important;\n }\n\n > li > button:before {\n border: none !important;\n height: 10px !important;\n width: 10px !important;\n }\n }\n "}),(function(n){return!n.isOneSlidePerView&&"\n > div > div > div > div.slick-slide > div {\n margin-right: 7px;\n }\n > div > div > div > div.slick-slide:last-child > div {\n margin-left: 7px;\n margin-right: 0px;\n }\n "})),g=t.div(r||(r=n(["\n position: absolute;\n left: ",";\n top: ",";\n"],["\n position: absolute;\n left: ",";\n top: ",";\n"])),(function(n){return n.borderRadiusVariant?"13px":"0"}),(function(n){return n.borderRadiusVariant?"11px":"0"})),b=t.div(e||(e=n(["\n position: absolute;\n right: 0;\n top: 0;\n"],["\n position: absolute;\n right: 0;\n top: 0;\n"]))),m=t.div(a||(a=n(["\n position: absolute;\n bottom: 3.75rem;\n left: 0;\n"],["\n position: absolute;\n bottom: 3.75rem;\n left: 0;\n"]))),v=t.div(d||(d=n(["\n height: 40px;\n width: 40px;\n"],["\n height: 40px;\n width: 40px;\n"]))),h=t.button(p||(p=n(["\n background: transparent;\n border: none;\n padding: 0.188rem 0.625rem;\n z-index: 5;\n height: 40px !important;\n cursor: pointer;\n"],["\n background: transparent;\n border: none;\n padding: 0.188rem 0.625rem;\n z-index: 5;\n height: 40px !important;\n cursor: pointer;\n"]))),f=t.div(u||(u=n(["\n cursor: pointer;\n"],["\n cursor: pointer;\n"]))),x=t.div(l||(l=n(["\n position: relative;\n"],["\n position: relative;\n"])));export{m as BottomTagContainer,h as Button,c as Container,v as NavButtonContainer,s as ProgressBar,x as SlideContentWrapper,b as TopRightTagContainer,g as TopTagContainer,f as ViewContainerWrapper};
|
|
2
|
+
//# sourceMappingURL=styled.js.map
|
package/build/es/components/organisms/ProductGalleryMobile/ProductGalleryMobileV1/styled.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styled.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/build/index.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ import { IconName as IconName$1, ImageProps as ImageProps$1 } from 'src/componen
|
|
|
17
17
|
import { IconName as IconName$2 } from 'src/components/atoms/Icon/types';
|
|
18
18
|
import { OfferAtCartBenefitProps as OfferAtCartBenefitProps$1 } from 'src/components/molecules';
|
|
19
19
|
import { ProductItemProps as ProductItemProps$1 } from 'src/components/collection/product/types';
|
|
20
|
+
import { Settings as Settings$1 } from '@ant-design/react-slick';
|
|
20
21
|
import facepaint from 'facepaint';
|
|
21
22
|
export { default as createCache } from '@emotion/cache';
|
|
22
23
|
|
|
@@ -3535,6 +3536,12 @@ declare type ProductGalleryProps = {
|
|
|
3535
3536
|
hideVideoControls?: boolean;
|
|
3536
3537
|
alwaysPlayInPreview?: boolean;
|
|
3537
3538
|
zoomOptions?: ProductGalleryZoomOptionsType;
|
|
3539
|
+
/** Custom zoom icon element. When provided, hides the default zoom hint and renders this element instead. */
|
|
3540
|
+
zoomIconVariant?: JSX.Element;
|
|
3541
|
+
/** Color for navigation chevrons/arrows. Default: '#000' */
|
|
3542
|
+
chevronsColor?: string;
|
|
3543
|
+
/** Show chevron arrows on the main image for next/previous navigation. Default: false */
|
|
3544
|
+
showChevrons?: boolean;
|
|
3538
3545
|
};
|
|
3539
3546
|
declare const ProductGallery: FC<ProductGalleryProps>;
|
|
3540
3547
|
|
|
@@ -3806,7 +3813,7 @@ interface ProductOrderItemProps {
|
|
|
3806
3813
|
}
|
|
3807
3814
|
declare const SimpleOrderItem: ({ title, className, subtitle, midElement, image, price, tag, quantity, finalPriceStyle, isGift, isClub, isPrincingStyleTestEnabled, }: ProductOrderItemProps) => JSX.Element;
|
|
3808
3815
|
|
|
3809
|
-
interface ProgressBarProps {
|
|
3816
|
+
interface ProgressBarProps$1 {
|
|
3810
3817
|
description?: string;
|
|
3811
3818
|
fillColor: string;
|
|
3812
3819
|
widthAuto?: boolean;
|
|
@@ -3815,7 +3822,7 @@ interface ProgressBarProps {
|
|
|
3815
3822
|
backgroundColor?: string;
|
|
3816
3823
|
borderRadius?: string;
|
|
3817
3824
|
}
|
|
3818
|
-
declare const ProgressBar: ({ description, fillColor, widthAuto, percent, height, backgroundColor, borderRadius, }: ProgressBarProps) => JSX.Element;
|
|
3825
|
+
declare const ProgressBar: ({ description, fillColor, widthAuto, percent, height, backgroundColor, borderRadius, }: ProgressBarProps$1) => JSX.Element;
|
|
3819
3826
|
|
|
3820
3827
|
declare type QuantityPickerPropsOnChange = (value: number) => void;
|
|
3821
3828
|
declare type QuantityPickerPropsControlled = {
|
|
@@ -4761,6 +4768,14 @@ interface ProductCardV3Props extends ProductItemProps {
|
|
|
4761
4768
|
}
|
|
4762
4769
|
declare const ProductCardV3: FC<ProductCardV3Props>;
|
|
4763
4770
|
|
|
4771
|
+
/**
|
|
4772
|
+
* Progress bar styling options
|
|
4773
|
+
*/
|
|
4774
|
+
interface ProgressBarProps {
|
|
4775
|
+
fillColor: string;
|
|
4776
|
+
backgroundColor: string;
|
|
4777
|
+
}
|
|
4778
|
+
|
|
4764
4779
|
interface ProductGalleryMobileProps {
|
|
4765
4780
|
images: ContentType[];
|
|
4766
4781
|
customClick?: boolean;
|
|
@@ -4780,6 +4795,11 @@ interface ProductGalleryMobileProps {
|
|
|
4780
4795
|
enableZoom?: boolean;
|
|
4781
4796
|
/** Modal zoom options - when provided, uses modal zoom instead of inline zoom */
|
|
4782
4797
|
zoomOptions?: ProductGalleryZoomOptionsType;
|
|
4798
|
+
chevronsColor?: string;
|
|
4799
|
+
sliderDotsOnBottom?: boolean;
|
|
4800
|
+
zoomIconVariant?: JSX.Element;
|
|
4801
|
+
baseSettings?: Settings$1;
|
|
4802
|
+
progressBar?: ProgressBarProps;
|
|
4783
4803
|
}
|
|
4784
4804
|
declare const ProductGalleryMobile: react__default.FC<ProductGalleryMobileProps>;
|
|
4785
4805
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=require("tslib");function e(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}var t,r,
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=require("tslib");function e(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}var t,r,i,o=e(require("@emotion/styled")),a=o.default.label(t||(t=n.__makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: 10px;\n cursor: pointer;\n"],["\n display: flex;\n align-items: center;\n gap: 10px;\n cursor: pointer;\n"]))),p=o.default.div(r||(r=n.__makeTemplateObject(["\n position: relative;\n width: 36px;\n height: 20px;\n background: #949494;\n border-radius: 60px;\n padding: 4px;\n transition: 300ms all;\n\n &:before {\n transition: 300ms all;\n content: '';\n position: absolute;\n width: 16px;\n height: 16px;\n border-radius: 35px;\n top: 50%;\n left: 2.5px;\n background: white;\n transform: translate(0, -50%);\n }\n"],["\n position: relative;\n width: 36px;\n height: 20px;\n background: #949494;\n border-radius: 60px;\n padding: 4px;\n transition: 300ms all;\n\n &:before {\n transition: 300ms all;\n content: '';\n position: absolute;\n width: 16px;\n height: 16px;\n border-radius: 35px;\n top: 50%;\n left: 2.5px;\n background: white;\n transform: translate(0, -50%);\n }\n"]))),s=o.default.input(i||(i=n.__makeTemplateObject(["\n opacity: 0;\n position: absolute;\n width: 36px;\n height: 20px;\n margin: 0;\n cursor: pointer;\n\n &:checked + div {\n background: ",";\n\n &:before {\n transform: translate(14.5px, -50%);\n }\n }\n\n &:focus-visible + div {\n outline: 2px solid currentColor;\n outline-offset: 2px;\n border-radius: 60px;\n }\n"],["\n opacity: 0;\n position: absolute;\n width: 36px;\n height: 20px;\n margin: 0;\n cursor: pointer;\n\n &:checked + div {\n background: ",";\n\n &:before {\n transform: translate(14.5px, -50%);\n }\n }\n\n &:focus-visible + div {\n outline: 2px solid currentColor;\n outline-offset: 2px;\n border-radius: 60px;\n }\n"])),(function(n){return n.$color}));exports.InputWrapper=s,exports.LabelWrapper=a,exports.SwitchWrapper=p;
|
|
2
2
|
//# sourceMappingURL=toggle.styled.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var o=require("tslib"),e=require("react/jsx-runtime"),i=require("react"),t=require("../organisms/ModalZoom/index.js"),r=require("./components/ImagePreviewList/ImagePreviewList.js"),a=require("./components/ImageProductSlide/ImageProductSlide.js"),n=require("./styled.js");exports.ProductGallery=function(d){var s=d.images,l=d.selectedValue,v=d.topTag,u=d.topRightTag,m=d.bottomTag,c=d.productImageDataTestId,g=d.previewListDataTestId,h=d.thumbnailPosition,I=d.borderRadiusVariant,p=void 0!==I&&I,w=d.previewImgBorderColor,P=d.ctaText,f=d.ctaAction,x=d.hideCTA,T=void 0===x||x,C=d.hasOverflowArrows,j=void 0!==C&&C,V=d.withZoom,q=void 0===V||V,O=d.hasToPreserveOrder,b=void 0!==O&&O,y=d.isRatioSquare,z=d.itemsOnViewport,A=void 0===z?6:z,R=d.videoAutoplay,S=void 0!==R&&R,M=d.videoInPreview,L=void 0!==M&&M,Z=d.hideVideoControls,_=void 0!==Z&&Z,B=d.alwaysPlayInPreview,D=void 0!==B&&B,N=d.zoomOptions,k=d.zoomIconVariant,E=d.chevronsColor,F=void 0===E?"#000":E,G=d.showChevrons,H=void 0!==G&&G,J=i.useState(function(o,e){if(e){var i=o.indexOf(e);return i>-1?i:0}return 0}(s,l)),K=J[0],Q=J[1];if(i.useEffect((function(){if(l&&!b){var o=s.indexOf(l);o>-1&&Q(o)}}),[l,b]),0===s.length)return null;var U=s[K];return e.jsxs(e.Fragment,{children:[e.jsxs(n.Container,o.__assign({thumbnailPosition:h},{children:[e.jsx(r.ImagePreviewList,{images:s,selectedImage:U,dataTestId:g,onClick:function(o){Q(o)},position:h,borderRadiusVariant:p,previewImgBorderColor:w,hasOverflowArrows:j,isRatioSquare:y,itemsOnViewport:A,videoInPreview:L,alwaysPlayInPreview:D},void 0),e.jsx(a.ImageProductSlide,{content:U,topTag:v,topRightTag:u,bottomTag:m,testId:c,position:h,borderRadiusVariant:p,ctaText:P,ctaAction:f,hideCTA:T,withZoom:q,isRatioSquare:y,videoAutoplay:S,hideVideoControls:_,zoomOptions:N,zoomIconVariant:k,chevronsColor:F,onPrev:H?function(){K>0&&Q(K-1)}:void 0,onNext:H?function(){K<s.length-1&&Q(K+1)}:void 0,hasPrev:H&&K>0,hasNext:H&&K<s.length-1},void 0)]}),void 0),Boolean(null==N?void 0:N.zoomModalId)&&e.jsx(t.ZoomModalComponent,{version:null==N?void 0:N.zoomVersion,modalId:(null==N?void 0:N.zoomModalId)||"zoom-modal-v1",contents:s,initialSlide:K,fade:null==N?void 0:N.fade},void 0)]},void 0)};
|
|
2
2
|
//# sourceMappingURL=ProductGallery.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var o=require("tslib"),i=require("react/jsx-runtime"),e=require("../../../organisms/ModalZoom/useZoom.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var o=require("tslib"),i=require("react/jsx-runtime"),e=require("../../../icons/index.js"),t=require("../../../organisms/ModalZoom/useZoom.js"),d=require("../../../organisms/ModalZoom/ZoomButton.js"),r=require("../../../molecules/Video/Video.js"),n=require("./styled.js");exports.ImageProductSlide=function(a){var l,s=a.content,v=a.topTag,c=a.topRightTag,h=a.bottomTag,u=a.testId,m=a.position,g=void 0===m?"vertical":m,x=a.borderRadiusVariant,j=a.ctaText,p=a.ctaAction,y=a.hideCTA,z=a.withZoom,C=a.isRatioSquare,b=a.videoAutoplay,I=void 0!==b&&b,T=a.hideVideoControls,_=void 0!==T&&T,q=a.zoomOptions,w=a.isActive,M=void 0===w||w,P=a.zoomIconVariant,R=a.chevronsColor,V=void 0===R?"#000":R,Z=a.onPrev,f=a.onNext,A=a.hasPrev,S=void 0!==A&&A,k=a.hasNext,B=void 0!==k&&k,N=null==s?void 0:s.url,F=null!==(l=null==s?void 0:s.isVideo)&&void 0!==l&&l,O=I||null==s?void 0:s.thumbnailUrl,H=_?{pointerEvents:"none"}:void 0,L=t.useZoom((null==q?void 0:q.zoomModalId)||"zoom-modal-v1").handleZoomClick;return i.jsxs(n.Container,o.__assign({"data-testid":u,className:"stylefor".concat(g),borderRadiusVariant:x,position:g},{children:[!F&&i.jsxs(i.Fragment,{children:[z?i.jsxs(i.Fragment,{children:[i.jsx(n.InnerImageZoomStyled,{src:N,zoomSrc:(null==s?void 0:s.zoomUrl)||N,zoomType:(null==q?void 0:q.zoomModalId)?"click":"hover",imgAttributes:{alt:s.alt,style:{objectFit:"cover",objectPosition:"center"},loading:"eager",decoding:"sync",fetchpriority:"high"},width:"horizontal"==g?360:530,height:"horizontal"==g?480:720,hideHint:!!P||!!(null==q?void 0:q.zoomModalId),isRatioSquare:C,afterZoomIn:(null==q?void 0:q.zoomModalId)?L:void 0},void 0),P]},void 0):i.jsx(n.ImageStyled,{width:"horizontal"==g?"360px":"530px",height:"auto",src:N,alt:s.alt,objectFit:"cover",loading:"eager",decoding:"sync",isRatioSquare:C,fetchPriority:"high"},void 0),i.jsx(n.TopTagContainer,o.__assign({borderRadiusVariant:x},{children:v}),void 0),i.jsx(n.BottomTagContainer,o.__assign({isCTAHidden:y},{children:h}),void 0),!!c&&i.jsx(n.TopRightTagWrapper,{children:i.jsx(n.TopRightTagContainer,{children:c},void 0)},void 0)]},void 0),F&&i.jsx(r.Video,{source:N,thumbnail:O,autoPlay:I,muted:!0,loop:!0,withProgressBar:!_,style:H,isActive:M,lazyLoad:!1},void 0),j&&p&&i.jsx("div",o.__assign({style:{display:y?"none":"block"}},{children:i.jsx(n.ButtonSecondaryOutlineWrapper,{wide:!0,onClick:p,text:j},void 0)}),void 0),Boolean(null==q?void 0:q.zoomModalId)&&i.jsx(d.ZoomButtonComponent,{modalId:(null==q?void 0:q.zoomModalId)||"zoom-modal-v1",showOnMobile:"v2"===(null==q?void 0:q.zoomVersion)},void 0),S&&Z&&i.jsx(n.ChevronPrev,o.__assign({onClick:Z,"aria-label":"Previous image"},{children:i.jsx(e.Icon.Arrows.ChevronLeft,{height:1.85,width:1.85,fill:V},void 0)}),void 0),B&&f&&i.jsx(n.ChevronNext,o.__assign({onClick:f,"aria-label":"Next image"},{children:i.jsx(e.Icon.Arrows.ChevronRight,{height:1.85,width:1.85,fill:V},void 0)}),void 0)]}),void 0)};
|
|
2
2
|
//# sourceMappingURL=ImageProductSlide.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("@emotion/styled"),n=require("react-inner-image-zoom");require("react/jsx-runtime"),require("../../../../core/theme/Theme.js"),require("react"),require("../../../../types/enums.js"),require("../../../pricing/clubOffer/ClubOfferTag.js"),require("../../../pricing/discount/styled.js"),require("../../../pricing/styles.js"),require("../../../tooltip/Tooltip.js"),require("../../../atoms/PriceLabel/PriceLabel.js"),require("../../../atoms/ClubPriceMemberLabel/ClubPriceMemberLabel.styled.js"),require("../../../atoms/HorizontalDivider/HorizontalDivider.js"),require("../../../atoms/Icon/Icon.js");var r=require("../../../atoms/Image/Image.js");require("../../../atoms/PriceLabelV2/PriceLabelV2.js"),require("../../../atoms/Toggle/toggle.styled.js"),require("@emotion/react/jsx-runtime"),require("../../../cta/styled.js");var
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("@emotion/styled"),n=require("react-inner-image-zoom");require("react/jsx-runtime"),require("../../../../core/theme/Theme.js"),require("react"),require("../../../../types/enums.js"),require("../../../pricing/clubOffer/ClubOfferTag.js"),require("../../../pricing/discount/styled.js"),require("../../../pricing/styles.js"),require("../../../tooltip/Tooltip.js"),require("../../../atoms/PriceLabel/PriceLabel.js"),require("../../../atoms/ClubPriceMemberLabel/ClubPriceMemberLabel.styled.js"),require("../../../atoms/HorizontalDivider/HorizontalDivider.js"),require("../../../atoms/Icon/Icon.js");var r=require("../../../atoms/Image/Image.js");require("../../../atoms/PriceLabelV2/PriceLabelV2.js"),require("../../../atoms/Toggle/toggle.styled.js"),require("@emotion/react/jsx-runtime"),require("../../../cta/styled.js");var a=require("../../../cta/secondary/ButtonSecondaryOutline.js");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i,p,s,l,u,m,d,c,b,g,f,x=o(t),h=o(n),j=x.default.div(i||(i=e.__makeTemplateObject(["\n ","\n z-index: 0;\n position: relative;\n height: fit-content;\n /* &.styleforhorizontal {\n height: 30rem;\n } */\n display: block;\n overflow: hidden;\n white-space: nowrap;\n grid-area: ",";\n width: 100%;\n max-width: max-content;\n"],["\n ","\n z-index: 0;\n position: relative;\n height: fit-content;\n /* &.styleforhorizontal {\n height: 30rem;\n } */\n display: block;\n overflow: hidden;\n white-space: nowrap;\n grid-area: ",";\n width: 100%;\n max-width: max-content;\n"])),(function(e){return e.borderRadiusVariant&&"border-radius: 40px;"}),(function(e){return"horizontal"===e.position?"unset":"1/2"})),v=x.default.div(p||(p=e.__makeTemplateObject(["\n position: absolute;\n left: ",";\n top: ",";\n"],["\n position: absolute;\n left: ",";\n top: ",";\n"])),(function(e){var t=e.borderRadiusVariant,n=e.theme;return t?"50px":n.component.gallery.tagPosition.left}),(function(e){var t=e.borderRadiusVariant,n=e.theme;return t?"10px":n.component.gallery.tagPosition.top})),_=x.default.div(s||(s=e.__makeTemplateObject(["\n position: absolute;\n bottom: ",";\n left: 0;\n"],["\n position: absolute;\n bottom: ",";\n left: 0;\n"])),(function(e){return e.isCTAHidden?"60px":"120px"})),q=x.default.div(l||(l=e.__makeTemplateObject(["\n position: absolute;\n right: 0;\n top: 0;\n"],["\n position: absolute;\n right: 0;\n top: 0;\n"]))),T=x.default.div(u||(u=e.__makeTemplateObject(["\n white-space: pre-wrap;\n"],["\n white-space: pre-wrap;\n"]))),y=x.default(a)(m||(m=e.__makeTemplateObject(["\n text-transform: capitalize;\n margin-top: 12px;\n\n @media (max-width: 992px) {\n margin-top: 4px;\n }\n"],["\n text-transform: capitalize;\n margin-top: 12px;\n\n @media (max-width: 992px) {\n margin-top: 4px;\n }\n"]))),w=x.default(r.Image)(d||(d=e.__makeTemplateObject(["\n aspect-ratio: ",";\n"],["\n aspect-ratio: ",";\n"])),(function(e){var t=e.theme;return e.isRatioSquare?"1 / 1":t.component.gallery.aspectRatio})),O=x.default(h.default)(c||(c=e.__makeTemplateObject(["\n aspect-ratio: ",";\n"],["\n aspect-ratio: ",";\n"])),(function(e){var t=e.theme;return e.isRatioSquare?"1 / 1":t.component.gallery.aspectRatio})),k=x.default.button(b||(b=e.__makeTemplateObject(["\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n background: transparent;\n border: none;\n padding: 0.188rem 0.625rem;\n cursor: pointer;\n z-index: 2;\n height: 40px;\n"],["\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n background: transparent;\n border: none;\n padding: 0.188rem 0.625rem;\n cursor: pointer;\n z-index: 2;\n height: 40px;\n"]))),z=x.default(k)(g||(g=e.__makeTemplateObject(["\n left: 10px;\n"],["\n left: 10px;\n"]))),C=x.default(k)(f||(f=e.__makeTemplateObject(["\n right: 10px;\n"],["\n right: 10px;\n"])));exports.BottomTagContainer=_,exports.ButtonSecondaryOutlineWrapper=y,exports.ChevronButton=k,exports.ChevronNext=C,exports.ChevronPrev=z,exports.Container=j,exports.ImageStyled=w,exports.InnerImageZoomStyled=O,exports.TopRightTagContainer=T,exports.TopRightTagWrapper=q,exports.TopTagContainer=v;
|
|
2
2
|
//# sourceMappingURL=styled.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";var o=require("tslib"),e=require("react/jsx-runtime"),i=require("@ant-design/react-slick"),r=require("react"),n=require("react-inner-image-zoom"),t=require("../../../cta/primary/ButtonPrimary.js");require("@emotion/react/jsx-runtime"),require("../../../../core/theme/Theme.js"),require("../../../../types/enums.js"),require("../../../cta/styled.js");var l=require("../../../molecules/Video/Video.js"),d=require("../../ModalZoom/index.js"),a=require("../../ModalZoom/useZoom.js"),s=require("../../../atoms/Image/Image.js"),u=require("../../../../hooks/usePreventVerticalScroll/usePreventVerticalScroll.js"),c=require("../../../icons/index.js"),v=require("../utils/sendCommandToIframe.js"),m=require("./styled.js"),h=require("../../ModalZoom/VideoDisplay.js"),g=require("../../ModalZoom/ZoomButton.js");function f(o){return o&&"object"==typeof o&&"default"in o?o:{default:o}}var j=f(i),p=f(n),x={dots:!0,infinite:!1,speed:200,slidesToShow:1,slidesToScroll:1},y=function(o,e){return o.loading=e?"eager":"lazy",o.decoding=e?"sync":"async",o.fetchpriority=e?"high":"auto",o};module.exports=function(i){var n=i.contents,f=i.customClick,C=void 0!==f&&f,V=i.topTag,q=i.topRightTag,k=i.bottomTag,z=i.testId,T=i.borderRadiusVariant,b=i.selectedValue,I=i.onChange,_=i.videoAutoplay,B=void 0!==_&&_,M=i.hideVideoControls,w=void 0!==M&&M,S=i.videoMuted,Z=void 0===S||S,P=i.videoLoop,R=void 0===P||P,A=i.enableZoom,O=void 0===A||A,D=i.zoomOptions,F=i.chevronsColor,L=void 0===F?"#000":F,N=i.sliderDotsOnBottom,W=void 0!==N&&N,E=i.zoomIconVariant,G=i.baseSettings,U=i.progressBar,H=o.__assign(o.__assign({},x),G),J=r.useMemo((function(){if(!b||!(null==n?void 0:n.length))return 0;var o=n.findIndex((function(o){return o.url===b.url||o.key===b.key}));return Math.max(0,o)}),[n,b]),K=r.useRef(null),Q=r.useRef(null),X=r.useState(J),Y=X[0],$=X[1],oo=a.useZoom((null==D?void 0:D.zoomModalId)||"zoom-modal-v1").handleZoomClick,eo=Boolean(null==D?void 0:D.zoomModalId),io=O&&!eo,ro=1===H.slidesToShow;u.usePreventVerticalScroll(Q);var no=r.useCallback((function(o){var e;null===(e=K.current)||void 0===e||e.slickGoTo(o)}),[K]),to=(Math.round(Y)+1)/n.length*100,lo=r.useRef(!0);return r.useEffect((function(){var o;if(lo.current)lo.current=!1;else if(b){var e=n.findIndex((function(o){return o.url===b.url||o.key===b.key}));-1!==e&&(null===(o=K.current)||void 0===o||o.slickGoTo(e))}}),[n,b]),e.jsxs(e.Fragment,{children:[C&&e.jsx("div",o.__assign({style:{display:"flex",marginBottom:"20px",gap:"10px"}},{children:n.map((function(o,i){return e.jsx(t,{onClick:function(){return no(i)},text:String(i+1),inline:!0},i)}))}),void 0),e.jsxs(m.Container,o.__assign({"data-testid":z,borderRadiusVariant:T,sliderDotsOnBottom:W,ref:Q,isOneSlidePerView:ro},{children:[e.jsx(j.default,o.__assign({afterChange:function(o){var e,i=n[o];(null===(e=null==i?void 0:i.url)||void 0===e?void 0:e.includes("autoplay=1"))?v.playVideoCommand():v.stopVideoCommand(),$(o),null==I||I(o)}},H,{initialSlide:J,nextArrow:e.jsx(m.NavButtonContainer,{children:e.jsx(m.Button,{children:e.jsx(c.Icon.Arrows.ChevronRight,{height:2.125,width:1.25,fill:L},void 0)},void 0)},void 0),prevArrow:e.jsx(m.NavButtonContainer,{children:e.jsx(m.Button,{children:e.jsx(c.Icon.Arrows.ChevronLeft,{height:2.125,width:1.25,fill:L},void 0)},void 0)},void 0),ref:K},{children:n.map((function(i,r){var n,t=null==i?void 0:i.url,d=null!==(n=null==i?void 0:i.isVideo)&&void 0!==n&&n,a=i.url===(null==b?void 0:b.url)||i.key===(null==b?void 0:b.key),u=r===Y,c={alt:i.alt,width:"100%",height:"510px"},v=function(){if(io)return e.jsxs(e.Fragment,{children:[e.jsx(p.default,{src:t,zoomSrc:(null==i?void 0:i.zoomUrl)||t,zoomType:"hover",imgAttributes:y(c,a),height:510,fullscreenOnMobile:!0,className:"zoomWrapper",hideHint:!!E},void 0),E]},void 0);var o=y(c,a);return e.jsx(s.Image,{src:t,alt:i.alt,width:"100%",height:"510px",loading:o.loading,decoding:o.decoding,fetchPriority:a?"high":"auto"},void 0)},f=ro?"div":m.SlideContentWrapper,j=eo?m.ViewContainerWrapper:f,x=eo?{onClick:oo}:{};return e.jsx(j,o.__assign({},x,{children:d?eo?e.jsx(h.VideoDisplay,{content:i},void 0):e.jsx(l.Video,{source:t,thumbnail:null==i?void 0:i.thumbnailUrl,autoPlay:B,muted:Z,loop:R,withProgressBar:!w,style:w?{pointerEvents:"none"}:void 0,isActive:u,lazyLoad:!0},void 0):e.jsxs(e.Fragment,{children:[v(),e.jsx(m.TopTagContainer,o.__assign({borderRadiusVariant:T,"data-testid":"topTag"},{children:V}),void 0),e.jsx(m.BottomTagContainer,o.__assign({"data-testid":"bottomTag"},{children:k}),void 0),!!q&&e.jsx(m.TopRightTagContainer,{children:q},void 0),eo&&e.jsx(g.ZoomButtonComponent,{modalId:(null==D?void 0:D.zoomModalId)||"zoom-modal-v1",showOnMobile:"v2"===(null==D?void 0:D.zoomVersion)},void 0)]},void 0)}),i.key)}))}),void 0),U&&e.jsx(m.ProgressBar,{progressInPercentage:to,fillColor:U.fillColor,backgroundColor:U.backgroundColor},void 0)]}),void 0),eo&&e.jsx(d.ZoomModalComponent,{version:null==D?void 0:D.zoomVersion,modalId:(null==D?void 0:D.zoomModalId)||"zoom-modal-v1",contents:n,initialSlide:Y,fade:null==D?void 0:D.fade},void 0)]},void 0)};
|
|
2
2
|
//# sourceMappingURL=ImageProductSlide.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),o=require("react/jsx-runtime"),t=require("@emotion/styled"),i=require("react"),n=require("./ImageProductSlide.js");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d,a=r(t).default.div(d||(d=e.__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n height: fit-content;\n position: relative;\n max-width: 450px;\n\n > div {\n ","\n }\n"],["\n display: flex;\n flex-direction: column;\n height: fit-content;\n position: relative;\n max-width: 450px;\n\n > div {\n ","\n }\n"])),(function(e){return e.sliderDotsOnBottom&&" \n overflow: visible;\n "}));exports.ProductGalleryMobile=function(t){var r=t.images,d=t.customClick,s=t.topTag,l=t.topRightTag,u=t.bottomTag,v=t.productImageDataTestId,c=t.borderRadiusVariant,m=void 0!==c&&c,p=t.selectedValue,g=t.hasToPreserveOrder,f=void 0!==g&&g,b=t.itemsOnViewport,h=void 0===b?1:b,x=t.videoAutoplay,O=void 0!==x&&x,V=t.hideVideoControls,y=void 0!==V&&V,T=t.videoMuted,j=void 0===T||T,C=t.videoLoop,B=void 0===C||C,I=t.enableZoom,_=void 0===I||I,q=t.zoomOptions,w=t.chevronsColor,D=void 0===w?"#000":w,z=t.sliderDotsOnBottom,M=void 0!==z&&z,P=t.zoomIconVariant,R=t.baseSettings,S=t.progressBar,k=i.useState(0),A=k[0],L=k[1],Z=f?null==r?void 0:r[A]:p;return o.jsx(a,e.__assign({"data-testid":"product-gallery-mobile-v1",sliderDotsOnBottom:M},{children:o.jsx(n,{contents:r,customClick:d,topTag:s,topRightTag:l,bottomTag:u,testId:v,borderRadiusVariant:m,selectedValue:Z,onChange:function(e){return L(e)},itemsOnViewport:h,videoAutoplay:O,hideVideoControls:y,videoMuted:j,videoLoop:B,enableZoom:_,zoomOptions:q,chevronsColor:D,zoomIconVariant:P,sliderDotsOnBottom:M,baseSettings:R,progressBar:S},void 0)}),void 0)};
|
|
2
2
|
//# sourceMappingURL=ProductGalleryMobile.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=require("tslib");function t(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}var e,o,r,i,a,p,d,l,u,s=t(require("@emotion/styled")),c=s.default.div(e||(e=n.__makeTemplateObject(["\n width: 80%;\n margin: 0 auto;\n height: 2px;\n margin-top: 2px;\n background: linear-gradient(\n to right,\n "," 0%,\n "," ","%,\n ","\n ","%,\n "," 100%\n );\n"],["\n width: 80%;\n margin: 0 auto;\n height: 2px;\n margin-top: 2px;\n background: linear-gradient(\n to right,\n "," 0%,\n "," ","%,\n ","\n ","%,\n "," 100%\n );\n"])),(function(n){return n.fillColor}),(function(n){return n.fillColor}),(function(n){var t=n.progressInPercentage;return void 0===t?0:t}),(function(n){return n.backgroundColor}),(function(n){var t=n.progressInPercentage;return void 0===t?0:t}),(function(n){return n.backgroundColor})),m=s.default.div(o||(o=n.__makeTemplateObject(["\n ","\n position: relative;\n max-height: 524px;\n overflow: hidden;\n & .slick-dots li.slick-active button:before {\n background-color: ",";\n }\n ","\n\n\n ","\n"],["\n ","\n position: relative;\n max-height: 524px;\n overflow: hidden;\n & .slick-dots li.slick-active button:before {\n background-color: ",";\n }\n ","\n\n\n ","\n"])),(function(n){return n.borderRadiusVariant&&"\n border-radius: 40px;\n "}),(function(n){return n.theme.component.slideNavigation.slideDots.selectedDotColor}),(function(n){return n.sliderDotsOnBottom&&"\n > div > ul {\n margin-bottom: -40px !important;\n\n > li.slick-active > button:before {\n background-color: #292929 !important;\n top: 0 !important;\n border: none !important;\n }\n\n > li > button:before {\n border: none !important;\n height: 10px !important;\n width: 10px !important;\n }\n }\n "}),(function(n){return!n.isOneSlidePerView&&"\n > div > div > div > div.slick-slide > div {\n margin-right: 7px;\n }\n > div > div > div > div.slick-slide:last-child > div {\n margin-left: 7px;\n margin-right: 0px;\n }\n "})),b=s.default.div(r||(r=n.__makeTemplateObject(["\n position: absolute;\n left: ",";\n top: ",";\n"],["\n position: absolute;\n left: ",";\n top: ",";\n"])),(function(n){return n.borderRadiusVariant?"13px":"0"}),(function(n){return n.borderRadiusVariant?"11px":"0"})),g=s.default.div(i||(i=n.__makeTemplateObject(["\n position: absolute;\n right: 0;\n top: 0;\n"],["\n position: absolute;\n right: 0;\n top: 0;\n"]))),f=s.default.div(a||(a=n.__makeTemplateObject(["\n position: absolute;\n bottom: 3.75rem;\n left: 0;\n"],["\n position: absolute;\n bottom: 3.75rem;\n left: 0;\n"]))),v=s.default.div(p||(p=n.__makeTemplateObject(["\n height: 40px;\n width: 40px;\n"],["\n height: 40px;\n width: 40px;\n"]))),x=s.default.button(d||(d=n.__makeTemplateObject(["\n background: transparent;\n border: none;\n padding: 0.188rem 0.625rem;\n z-index: 5;\n height: 40px !important;\n cursor: pointer;\n"],["\n background: transparent;\n border: none;\n padding: 0.188rem 0.625rem;\n z-index: 5;\n height: 40px !important;\n cursor: pointer;\n"]))),h=s.default.div(l||(l=n.__makeTemplateObject(["\n cursor: pointer;\n"],["\n cursor: pointer;\n"]))),k=s.default.div(u||(u=n.__makeTemplateObject(["\n position: relative;\n"],["\n position: relative;\n"])));exports.BottomTagContainer=f,exports.Button=x,exports.Container=m,exports.NavButtonContainer=v,exports.ProgressBar=c,exports.SlideContentWrapper=k,exports.TopRightTagContainer=g,exports.TopTagContainer=b,exports.ViewContainerWrapper=h;
|
|
2
|
+
//# sourceMappingURL=styled.js.map
|
package/build/lib/components/organisms/ProductGalleryMobile/ProductGalleryMobileV1/styled.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styled.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/package.json
CHANGED