@trafilea/afrodita-components 7.14.3 → 7.14.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.
|
@@ -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{useZoom as e}from"../../../organisms/ModalZoom/useZoom.js";import{ZoomButtonComponent as l}from"../../../organisms/ModalZoom/ZoomButton.js";import{Video as r}from"../../../molecules/Video/Video.js";import{Container as a,InnerImageZoomStyled as n,ImageStyled as s,TopTagContainer as m,BottomTagContainer as v,TopRightTagWrapper as c,TopRightTagContainer as u,ButtonSecondaryOutlineWrapper as h}from"./styled.js";var p=function(p){var g,z=p.content,b=p.topTag,y=p.topRightTag,f=p.bottomTag,j=p.testId,I=p.position,M=void 0===I?"vertical":I,V=p.borderRadiusVariant,R=p.ctaText,T=p.ctaAction,Z=p.hideCTA,w=p.withZoom,x=p.isRatioSquare,A=p.videoAutoplay,C=void 0!==A&&A,k=p.hideVideoControls,S=void 0!==k&&k,q=p.zoomOptions,B=null==z?void 0:z.url,P=null!==(g=null==z?void 0:z.isVideo)&&void 0!==g&&g,F=C||null==z?void 0:z.thumbnailUrl,H=S?{pointerEvents:"none"}:void 0,O=e((null==q?void 0:q.zoomModalId)||"zoom-modal-v1").handleZoomClick;return i(a,o({"data-testid":j,className:"stylefor".concat(M),borderRadiusVariant:V,position:M},{children:[!P&&i(d,{children:[w?t(n,{src:B,zoomSrc:B,zoomType:(null==q?void 0:q.zoomModalId)?"click":"hover",imgAttributes:{alt:z.alt,style:{objectFit:"cover",objectPosition:"center"},loading:"eager",decoding:"sync"},width:"horizontal"==M?360:530,height:"horizontal"==M?480:720,hideHint:!0,isRatioSquare:x,afterZoomIn:(null==q?void 0:q.zoomModalId)?O:void 0},void 0):t(s,{width:"horizontal"==M?"360px":"530px",height:"auto",src:B,alt:z.alt,objectFit:"cover",loading:"eager",decoding:"sync",isRatioSquare:x},void 0),t(m,o({borderRadiusVariant:V},{children:b}),void 0),t(v,o({isCTAHidden:Z},{children:f}),void 0),!!y&&t(c,{children:t(u,{children:y},void 0)},void 0)]},void 0),P&&t(r,{source:B,thumbnail:F,autoPlay:C,muted:!0,loop:!0,withProgressBar:!S,style:H,preload:"auto"},void 0),R&&T&&t("div",o({style:{display:Z?"none":"block"}},{children:t(h,{wide:!0,onClick:T,text:R},void 0)}),void 0),Boolean(null==q?void 0:q.zoomModalId)&&t(l,{modalId:(null==q?void 0:q.zoomModalId)||"zoom-modal-v1",showOnMobile:"v2"===(null==q?void 0:q.zoomVersion)},void 0)]}),void 0)};export{p as ImageProductSlide};
|
|
2
2
|
//# sourceMappingURL=ImageProductSlide.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"),t=require("../../../organisms/ModalZoom/ZoomButton.js"),d=require("../../../molecules/Video/Video.js"),a=require("./styled.js");exports.ImageProductSlide=function(n){var r,l=n.content,s=n.topTag,u=n.topRightTag,c=n.bottomTag,
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var o=require("tslib"),i=require("react/jsx-runtime"),e=require("../../../organisms/ModalZoom/useZoom.js"),t=require("../../../organisms/ModalZoom/ZoomButton.js"),d=require("../../../molecules/Video/Video.js"),a=require("./styled.js");exports.ImageProductSlide=function(n){var r,l=n.content,s=n.topTag,u=n.topRightTag,c=n.bottomTag,m=n.testId,v=n.position,g=void 0===v?"vertical":v,h=n.borderRadiusVariant,p=n.ctaText,j=n.ctaAction,x=n.hideCTA,y=n.withZoom,b=n.isRatioSquare,z=n.videoAutoplay,T=void 0!==z&&z,I=n.hideVideoControls,C=void 0!==I&&I,Z=n.zoomOptions,_=null==l?void 0:l.url,q=null!==(r=null==l?void 0:l.isVideo)&&void 0!==r&&r,M=T||null==l?void 0:l.thumbnailUrl,R=C?{pointerEvents:"none"}:void 0,V=e.useZoom((null==Z?void 0:Z.zoomModalId)||"zoom-modal-v1").handleZoomClick;return i.jsxs(a.Container,o.__assign({"data-testid":m,className:"stylefor".concat(g),borderRadiusVariant:h,position:g},{children:[!q&&i.jsxs(i.Fragment,{children:[y?i.jsx(a.InnerImageZoomStyled,{src:_,zoomSrc:_,zoomType:(null==Z?void 0:Z.zoomModalId)?"click":"hover",imgAttributes:{alt:l.alt,style:{objectFit:"cover",objectPosition:"center"},loading:"eager",decoding:"sync"},width:"horizontal"==g?360:530,height:"horizontal"==g?480:720,hideHint:!0,isRatioSquare:b,afterZoomIn:(null==Z?void 0:Z.zoomModalId)?V:void 0},void 0):i.jsx(a.ImageStyled,{width:"horizontal"==g?"360px":"530px",height:"auto",src:_,alt:l.alt,objectFit:"cover",loading:"eager",decoding:"sync",isRatioSquare:b},void 0),i.jsx(a.TopTagContainer,o.__assign({borderRadiusVariant:h},{children:s}),void 0),i.jsx(a.BottomTagContainer,o.__assign({isCTAHidden:x},{children:c}),void 0),!!u&&i.jsx(a.TopRightTagWrapper,{children:i.jsx(a.TopRightTagContainer,{children:u},void 0)},void 0)]},void 0),q&&i.jsx(d.Video,{source:_,thumbnail:M,autoPlay:T,muted:!0,loop:!0,withProgressBar:!C,style:R,preload:"auto"},void 0),p&&j&&i.jsx("div",o.__assign({style:{display:x?"none":"block"}},{children:i.jsx(a.ButtonSecondaryOutlineWrapper,{wide:!0,onClick:j,text:p},void 0)}),void 0),Boolean(null==Z?void 0:Z.zoomModalId)&&i.jsx(t.ZoomButtonComponent,{modalId:(null==Z?void 0:Z.zoomModalId)||"zoom-modal-v1",showOnMobile:"v2"===(null==Z?void 0:Z.zoomVersion)},void 0)]}),void 0)};
|
|
2
2
|
//# sourceMappingURL=ImageProductSlide.js.map
|
package/package.json
CHANGED