@trafilea/afrodita-components 7.25.4 → 7.25.5
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 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
|
|
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 c,BottomTagContainer as m,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,j=b.testId,A=b.position,I=void 0===A?"vertical":A,V=b.borderRadiusVariant,M=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":j,className:"stylefor".concat(I),borderRadiusVariant:V,position:I},{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"==I?360:530,height:"horizontal"==I?480:720,hideHint:!0,isRatioSquare:Z,afterZoomIn:(null==B?void 0:B.zoomModalId)?_:void 0},void 0),L]},void 0):t(s,{width:"horizontal"==I?"360px":"530px",height:"auto",src:W,alt:y.alt,objectFit:"cover",loading:"eager",decoding:"sync",isRatioSquare:Z,fetchPriority:"high"},void 0),t(c,o({borderRadiusVariant:V},{children:w}),void 0),t(m,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),M&&R&&t("div",o({style:{display:P?"none":"block"}},{children:t(g,{wide:!0,onClick:R,text:M},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
|
-
"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"),
|
|
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"),r=require("../../../organisms/ModalZoom/ZoomButton.js"),d=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,P=void 0===w||w,R=a.zoomIconVariant,V=a.chevronsColor,Z=void 0===V?"#000":V,f=a.onPrev,A=a.onNext,M=a.hasPrev,S=void 0!==M&&M,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:!0,isRatioSquare:C,afterZoomIn:(null==q?void 0:q.zoomModalId)?L:void 0},void 0),R]},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(d.Video,{source:N,thumbnail:O,autoPlay:I,muted:!0,loop:!0,withProgressBar:!_,style:H,isActive:P,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(r.ZoomButtonComponent,{modalId:(null==q?void 0:q.zoomModalId)||"zoom-modal-v1",showOnMobile:"v2"===(null==q?void 0:q.zoomVersion)},void 0),S&&f&&i.jsx(n.ChevronPrev,o.__assign({onClick:f,"aria-label":"Previous image"},{children:i.jsx(e.Icon.Arrows.ChevronLeft,{height:1.85,width:1.85,fill:Z},void 0)}),void 0),B&&A&&i.jsx(n.ChevronNext,o.__assign({onClick:A,"aria-label":"Next image"},{children:i.jsx(e.Icon.Arrows.ChevronRight,{height:1.85,width:1.85,fill:Z},void 0)}),void 0)]}),void 0)};
|
|
2
2
|
//# sourceMappingURL=ImageProductSlide.js.map
|
package/package.json
CHANGED