@cntrl-site/components 0.1.0-alpha.1 → 0.1.0-alpha.10
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/Components/Lightbox/Lightbox.d.ts +2 -1
- package/dist/components.css +1 -1
- package/dist/index.js +277 -220
- package/dist/index.mjs +277 -220
- package/package.json +1 -1
|
@@ -5,8 +5,9 @@ type LightboxGalleryProps = {
|
|
|
5
5
|
styles: LightboxStyles;
|
|
6
6
|
portalId: string;
|
|
7
7
|
activeEvent: 'close' | 'open';
|
|
8
|
+
isEditor?: boolean;
|
|
8
9
|
};
|
|
9
|
-
export declare function LightboxGallery({ settings, content, styles, portalId, activeEvent }: LightboxGalleryProps): JSX.Element;
|
|
10
|
+
export declare function LightboxGallery({ settings, content, styles, portalId, activeEvent, isEditor }: LightboxGalleryProps): JSX.Element;
|
|
10
11
|
type LightboxImage = {
|
|
11
12
|
image: {
|
|
12
13
|
url: string;
|
package/dist/components.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.ControlSlider-module__wrapper___sHEkd{position:relative;width:100%;height:100%}.ControlSlider-module__slider___R3i9-{width:100%;height:100%}.ControlSlider-module__sliderItems___1MgPL{display:flex;overflow:hidden;width:100%;height:100%;transition:transform .3s ease-in-out}.ControlSlider-module__sliderItem___QQSkR{width:100%;height:100%;display:flex;position:relative}.ControlSlider-module__sliderImage___9hRl-{width:100%;height:100%;object-fit:cover}.ControlSlider-module__arrow___05ghY{position:absolute;display:flex;align-items:center;justify-content:center;border:none;background-color:transparent;top:50%;left:calc(var(--is-editor, 0) * -1.3888888889vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * -1.3888888889vw);z-index:1;transform:translate(-50%,-50%);padding:0;width:calc(var(--is-editor, 0) * 2.0833333333vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * 2.0833333333vw);height:calc(var(--is-editor, 0) * 2.0833333333vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * 2.0833333333vw)}.ControlSlider-module__arrow___05ghY.ControlSlider-module__arrowVertical___tBfVN{left:50%;top:calc(var(--is-editor, 0) * -1.3888888889vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * -1.3888888889vw);transform:translate(-50%,-50%)}.ControlSlider-module__nextArrow___-30Yc{left:unset;right:calc(var(--is-editor, 0) * -1.3888888889vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * -1.3888888889vw);transform:translate(50%,-50%)}.ControlSlider-module__nextArrow___-30Yc.ControlSlider-module__arrowVertical___tBfVN{left:50%;right:unset;top:unset;bottom:calc(var(--is-editor, 0) * -1.3888888889vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * -1.3888888889vw);transform:translate(-50%,50%)}.ControlSlider-module__arrowInner___aEra3{all:unset;cursor:pointer;width:100%;height:100%}.ControlSlider-module__arrowInner___aEra3:hover .ControlSlider-module__arrowIcon___S4ztF path{fill:var(--arrow-hover-color)!important}.ControlSlider-module__arrowImg___2dwJW{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.ControlSlider-module__arrowIcon___S4ztF{width:100%;height:100%}.ControlSlider-module__arrowIcon___S4ztF path{transition:fill .15s ease-in-out}.ControlSlider-module__mirror___brd6U{transform:translate(-50%,-50%) scaleX(-1)!important}.ControlSlider-module__arrowVertical___tBfVN.ControlSlider-module__mirror___brd6U{transform:translate(-50%,-50%) scaleY(-1)!important}.ControlSlider-module__pagination___bicLF{position:absolute;z-index:1;border-radius:50%}.ControlSlider-module__paginationInner___bT-P-{display:flex;gap:calc(var(--is-editor, 0) * 1.1111111111vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * 1.1111111111vw);padding-top:calc(var(--is-editor, 0) * .6944444444vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * .6944444444vw);padding-bottom:calc(var(--is-editor, 0) * .6944444444vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * .6944444444vw);padding-left:calc(var(--is-editor, 0) * 1.25vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * 1.25vw);padding-right:calc(var(--is-editor, 0) * 1.25vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * 1.25vw);border-radius:calc(var(--is-editor, 0) * 2.3611111111vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * 2.3611111111vw)}.ControlSlider-module__paginationVertical___zYqKw{flex-direction:column}.ControlSlider-module__paginationItem___nTRbk{all:unset;flex-shrink:0;position:relative;width:calc(var(--is-editor, 0) * 1.1111111111vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * 1.1111111111vw);height:calc(var(--is-editor, 0) * 1.1111111111vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * 1.1111111111vw);cursor:pointer}.ControlSlider-module__paginationItem___nTRbk:hover .ControlSlider-module__dot___p1Qun{background-color:var(--pagination-hover-color)!important}.ControlSlider-module__dot___p1Qun{border-radius:50%;scale:.5;transition:background-color .3s ease-in-out,transform .3s ease-in-out;width:calc(var(--is-editor, 0) * 1.1111111111vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * 1.1111111111vw);height:calc(var(--is-editor, 0) * 1.1111111111vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * 1.1111111111vw)}.ControlSlider-module__activeDot___LHFaj{transform:scale(2)}.ControlSlider-module__paginationInsideBottom___R3FWn{bottom:0;left:50%;transform:translate(-50%)}.ControlSlider-module__paginationInsideTop___V-qb-{left:50%;transform:translate(-50%);top:0}.ControlSlider-module__paginationOutsideBottom___14w8D{left:50%;transform:translate(-50%);bottom:calc(var(--is-editor, 0) * -2.4305555556vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * -2.4305555556vw)}.ControlSlider-module__paginationOutsideTop___SCLqB{left:50%;transform:translate(-50%);top:calc(var(--is-editor, 0) * -2.4305555556vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * -2.4305555556vw)}.ControlSlider-module__paginationInsideLeft___yOBRZ{top:50%;transform:translateY(-50%);left:calc(var(--is-editor, 0) * -2.4305555556vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * -2.4305555556vw)}.ControlSlider-module__paginationInsideRight___Rtt3o{top:50%;transform:translateY(-50%);right:calc(var(--is-editor, 0) * -2.4305555556vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * -2.4305555556vw)}.ControlSlider-module__paginationOutsideLeft___lahaw{top:50%;transform:translateY(-50%);left:calc(var(--is-editor, 0) * -5.4861111111vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * -5.4861111111vw)}.ControlSlider-module__paginationOutsideRight___EtuQa{top:50%;transform:translateY(-50%);right:calc(var(--is-editor, 0) * -5.4861111111vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * -5.4861111111vw)}.ControlSlider-module__imgWrapper___UjEgB,.ControlSlider-module__wrapperInner___DLAWV{width:100%;height:100%}.ControlSlider-module__captionBlock___dJ6-j{pointer-events:none;position:absolute;top:0;z-index:1;left:0;right:0;bottom:0}.ControlSlider-module__captionTextWrapper___HFlpf{position:relative;width:100%;height:100%}.ControlSlider-module__captionText___uGBVc{pointer-events:none;max-width:100%;transition-property:opacity;transition-timing-function:ease-in-out;position:absolute;display:inline-block;white-space:pre-wrap;overflow-wrap:break-word;opacity:0}.ControlSlider-module__captionText___uGBVc.ControlSlider-module__active___WZK4G{opacity:1}.ControlSlider-module__withPointerEvents___t-18M{pointer-events:auto}.ControlSlider-module__absolute___KxmYB{position:absolute}.ControlSlider-module__topLeftAlignment___zjnGM{top:0;left:0}.ControlSlider-module__topCenterAlignment___gD1xW{top:0;left:50%;transform:translate(-50%)}.ControlSlider-module__topRightAlignment___NMapS{top:0;right:0}.ControlSlider-module__middleLeftAlignment___OnUrY{top:50%;transform:translateY(-50%);left:0}.ControlSlider-module__middleCenterAlignment___Tdkl0{top:50%;transform:translate(-50%,-50%);left:50%}.ControlSlider-module__middleRightAlignment___wEbfX{top:50%;transform:translateY(-50%);right:0}.ControlSlider-module__bottomLeftAlignment___cTP2-{bottom:0;left:0}.ControlSlider-module__bottomCenterAlignment___c54fB{bottom:0;left:50%;transform:translate(-50%)}.ControlSlider-module__bottomRightAlignment___kEwrz{bottom:0;right:0}.ControlSlider-module__clickOverlay___DZA28{position:absolute;top:0;left:0;width:100%;height:100%;cursor:pointer}.ControlSlider-module__contain___pLyq7{object-fit:contain}.ControlSlider-module__cover___KdDat{object-fit:cover}.RichTextRenderer-module__link___BWeZ2{color:inherit;cursor:pointer;pointer-events:auto;transition:color .2s ease}.RichTextRenderer-module__link___BWeZ2:hover{color:var(--link-hover-color)}.SvgImage-module__svg___q3xE-{width:100%;height:100%;color:transparent;display:inline-block;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);background-color:var(--fill);transition:background-color .2s;-webkit-mask:var(--svg) no-repeat center/contain;mask:var(--svg) no-repeat center/contain}.SvgImage-module__svg___q3xE-:hover{background-color:var(--hover-fill)}.SvgImage-module__img___VsTm-{width:100%;height:100%;object-fit:contain}.ImageRevealSlider-module__imageRevealSlider___UE5Ob{position:absolute;top:0;left:0;width:100%;height:100%;overflow:hidden}.ImageRevealSlider-module__image___Qjt-e{width:100%;height:100%;object-fit:cover;position:relative;-webkit-user-select:none;user-select:none;pointer-events:none}.ImageRevealSlider-module__link___N-iLG{width:100%;height:100%;display:block}.Lightbox-module__backdropStyle___y7avj{position:fixed;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;z-index:9999}.Lightbox-module__contentStyle___FzFaW{position:relative;width:100%;max-width:100vw;max-height:100vh;height:100vh;overflow:auto;background:transparent;box-sizing:border-box}.Lightbox-module__imageStyle___Qb7f5{position:absolute;display:block;cursor:pointer;background-color:transparent}.Lightbox-module__imgWrapper___cdytV{display:flex;width:100%;height:100%;overflow:hidden}.Lightbox-module__contain___5gATW{object-fit:contain;max-width:100%;max-height:100%}.Lightbox-module__cover___8HZy7{width:100%;height:100%;object-fit:cover;max-width:100%;max-height:100%}.Lightbox-module__caption___3e-22{position:absolute;display:flex}.Lightbox-module__lightboxSplide___yMC4v.splide,.Lightbox-module__lightboxSplide___yMC4v .splide__track{height:100%}.Lightbox-module__arrow___s3Bn2{position:absolute;display:flex;align-items:center;justify-content:center;cursor:pointer;border:none;background-color:transparent;top:50%;z-index:1;transform:translate(-50%,-50%);padding:0;left:calc(var(--is-editor, 0) * 1.3888888889vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * 1.3888888889vw);width:calc(var(--is-editor, 0) * 2.0833333333vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * 2.0833333333vw);height:calc(var(--is-editor, 0) * 2.0833333333vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * 2.0833333333vw)}.Lightbox-module__arrow___s3Bn2.Lightbox-module__arrowVertical___6ztxz{left:50%;top:calc(var(--is-editor, 0) * 1.3888888889vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * 1.3888888889vw);transform:translate(-50%,-50%)}.Lightbox-module__nextArrow___i23DU{left:unset;right:calc(var(--is-editor, 0) * 1.3888888889vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * 1.3888888889vw);transform:translate(50%,-50%)}.Lightbox-module__nextArrow___i23DU.Lightbox-module__arrowVertical___6ztxz{left:50%;right:unset;top:unset;bottom:calc(var(--is-editor, 0) * 1.3888888889vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * 1.3888888889vw);transform:translate(-50%,50%)}.Lightbox-module__arrowInner___Mm3xe{all:unset;cursor:pointer;width:100%;height:100%}.Lightbox-module__arrowInner___Mm3xe:hover .Lightbox-module__arrowIcon___UpzOt path{fill:var(--arrow-hover-color)!important}.Lightbox-module__arrowImg___UxHPR{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.Lightbox-module__mirror___50NCE{transform:translate(-50%,-50%) scaleX(-1)!important}.Lightbox-module__arrowVertical___6ztxz.Lightbox-module__mirror___50NCE{transform:translate(-50%,-50%) scaleY(-1)!important}.Lightbox-module__thumbsContainerVertical___lVaf-{flex-direction:column;display:flex}.Lightbox-module__thumbsContainer___DqOCP{position:absolute;display:flex;align-items:center;justify-content:center;pointer-events:auto}.Lightbox-module__thumbsAlignStart___uiFIV{align-items:flex-start}.Lightbox-module__thumbsAlignCenter___sbUPA{align-items:center}.Lightbox-module__thumbsAlignEnd___OA9N4{align-items:flex-end}.Lightbox-module__thumbsContainerVertical___lVaf-.Lightbox-module__thumbsAlignStart___uiFIV{align-items:center;justify-content:flex-start}.Lightbox-module__thumbsContainerVertical___lVaf-.Lightbox-module__thumbsAlignCenter___sbUPA{align-items:center;justify-content:center}.Lightbox-module__thumbsContainerVertical___lVaf-.Lightbox-module__thumbsAlignEnd___OA9N4{align-items:center;justify-content:flex-end}.Lightbox-module__thumbItem___zROyu{all:unset;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;overflow:hidden;transition:transform .1s ease,opacity .1s ease}.Lightbox-module__thumbItem___zROyu:hover{opacity:var(--thumb-hover)!important}.Lightbox-module__thumbImage___xGakV{display:block;height:100%;width:calc(var(--is-editor, 0) * 5.5555555556vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * 5.5555555556vw)}.Lightbox-module__closeButton___r3Dur{all:unset;cursor:pointer;position:absolute;width:calc(var(--is-editor, 0) * 2.0833333333vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * 2.0833333333vw);height:calc(var(--is-editor, 0) * 2.0833333333vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * 2.0833333333vw)}@keyframes Lightbox-module__lbFadeIn___3xoHQ{0%{opacity:0}to{opacity:1}}.Lightbox-module__fadeIn___sHwRK{animation-name:Lightbox-module__lbFadeIn___3xoHQ}@keyframes Lightbox-module__lbSlideInLeft___vgE9-{0%{transform:translate(-100%)}to{transform:translate(0)}}@keyframes Lightbox-module__lbSlideInRight___nByIA{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes Lightbox-module__lbSlideInTop___hI5ju{0%{transform:translateY(-100%)}to{transform:translateY(0)}}@keyframes Lightbox-module__lbSlideInBottom___M6-9o{0%{transform:translateY(100%)}to{transform:translateY(0)}}.Lightbox-module__slideInLeft___P-XRo{animation-name:Lightbox-module__lbSlideInLeft___vgE9-}.Lightbox-module__slideInRight___ZQqFi{animation-name:Lightbox-module__lbSlideInRight___nByIA}.Lightbox-module__slideInTop___XRKCs{animation-name:Lightbox-module__lbSlideInTop___hI5ju}.Lightbox-module__slideInBottom___TYOBS{animation-name:Lightbox-module__lbSlideInBottom___M6-9o}.Lightbox-module__lightboxSplide___yMC4v.splide--fade .Lightbox-module__scaleSlide___wS7d4{opacity:0!important;transform:var(--position-transform, none) scale(.9)!important;transition:opacity var(--splide-speed, .5s) ease,transform var(--splide-speed, .5s) ease!important}.Lightbox-module__lightboxSplide___yMC4v.splide--fade .splide__slide.is-active .Lightbox-module__scaleSlide___wS7d4{opacity:1!important;transform:var(--position-transform, none) scale(1)!important}.Lightbox-module__lightboxSplide___yMC4v.splide--fade .splide__slide:not(.is-active) .Lightbox-module__scaleSlide___wS7d4{opacity:0!important;transform:var(--position-transform, none) scale(1.1)!important}.splide__container{box-sizing:border-box;position:relative}.splide__list{backface-visibility:hidden;display:-ms-flexbox;display:flex;height:100%;margin:0!important;padding:0!important}.splide.is-initialized:not(.is-active) .splide__list{display:block}.splide__pagination{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-pack:center;justify-content:center;margin:0;pointer-events:none}.splide__pagination li{display:inline-block;line-height:1;list-style-type:none;margin:0;pointer-events:auto}.splide:not(.is-overflow) .splide__pagination{display:none}.splide__progress__bar{width:0}.splide{position:relative;visibility:hidden}.splide.is-initialized,.splide.is-rendered{visibility:visible}.splide__slide{backface-visibility:hidden;box-sizing:border-box;-ms-flex-negative:0;flex-shrink:0;list-style-type:none!important;margin:0;position:relative}.splide__slide img{vertical-align:bottom}.splide__spinner{animation:splide-loading 1s linear infinite;border:2px solid #999;border-left-color:transparent;border-radius:50%;bottom:0;contain:strict;display:inline-block;height:20px;left:0;margin:auto;position:absolute;right:0;top:0;width:20px}.splide__sr{clip:rect(0 0 0 0);border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.splide__toggle.is-active .splide__toggle__play,.splide__toggle__pause{display:none}.splide__toggle.is-active .splide__toggle__pause{display:inline}.splide__track{overflow:hidden;position:relative;z-index:0}@keyframes splide-loading{0%{transform:rotate(0)}to{transform:rotate(1turn)}}.splide__track--draggable{-webkit-touch-callout:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.splide__track--fade>.splide__list>.splide__slide{margin:0!important;opacity:0;z-index:0}.splide__track--fade>.splide__list>.splide__slide.is-active{opacity:1;z-index:1}.splide--rtl{direction:rtl}.splide__track--ttb>.splide__list{display:block}.splide__arrow{-ms-flex-align:center;align-items:center;background:#ccc;border:0;border-radius:50%;cursor:pointer;display:-ms-flexbox;display:flex;height:2em;-ms-flex-pack:center;justify-content:center;opacity:.7;padding:0;position:absolute;top:50%;transform:translateY(-50%);width:2em;z-index:1}.splide__arrow svg{fill:#000;height:1.2em;width:1.2em}.splide__arrow:hover:not(:disabled){opacity:.9}.splide__arrow:disabled{opacity:.3}.splide__arrow:focus-visible{outline:3px solid #0bf;outline-offset:3px}.splide__arrow--prev{left:1em}.splide__arrow--prev svg{transform:scaleX(-1)}.splide__arrow--next{right:1em}.splide.is-focus-in .splide__arrow:focus{outline:3px solid #0bf;outline-offset:3px}.splide__pagination{bottom:.5em;left:0;padding:0 1em;position:absolute;right:0;z-index:1}.splide__pagination__page{background:#ccc;border:0;border-radius:50%;display:inline-block;height:8px;margin:3px;opacity:.7;padding:0;position:relative;transition:transform .2s linear;width:8px}.splide__pagination__page.is-active{background:#fff;transform:scale(1.4);z-index:1}.splide__pagination__page:hover{cursor:pointer;opacity:.9}.splide__pagination__page:focus-visible{outline:3px solid #0bf;outline-offset:3px}.splide.is-focus-in .splide__pagination__page:focus{outline:3px solid #0bf;outline-offset:3px}.splide__progress__bar{background:#ccc;height:3px}.splide__slide{-webkit-tap-highlight-color:rgba(0,0,0,0)}.splide__slide:focus{outline:0}@supports (outline-offset:-3px){.splide__slide:focus-visible{outline:3px solid #0bf;outline-offset:-3px}}@media screen and (-ms-high-contrast:none){.splide__slide:focus-visible{border:3px solid #0bf}}@supports (outline-offset:-3px){.splide.is-focus-in .splide__slide:focus{outline:3px solid #0bf;outline-offset:-3px}}@media screen and (-ms-high-contrast:none){.splide.is-focus-in .splide__slide:focus{border:3px solid #0bf}.splide.is-focus-in .splide__track>.splide__list>.splide__slide:focus{border-color:#0bf}}.splide__toggle{cursor:pointer}.splide__toggle:focus-visible{outline:3px solid #0bf;outline-offset:3px}.splide.is-focus-in .splide__toggle:focus{outline:3px solid #0bf;outline-offset:3px}.splide__track--nav>.splide__list>.splide__slide{border:3px solid transparent;cursor:pointer}.splide__track--nav>.splide__list>.splide__slide.is-active{border:3px solid #000}.splide__arrows--rtl .splide__arrow--prev{left:auto;right:1em}.splide__arrows--rtl .splide__arrow--prev svg{transform:scaleX(1)}.splide__arrows--rtl .splide__arrow--next{left:1em;right:auto}.splide__arrows--rtl .splide__arrow--next svg{transform:scaleX(-1)}.splide__arrows--ttb .splide__arrow{left:50%;transform:translate(-50%)}.splide__arrows--ttb .splide__arrow--prev{top:1em}.splide__arrows--ttb .splide__arrow--prev svg{transform:rotate(-90deg)}.splide__arrows--ttb .splide__arrow--next{bottom:1em;top:auto}.splide__arrows--ttb .splide__arrow--next svg{transform:rotate(90deg)}.splide__pagination--ttb{bottom:0;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;left:auto;padding:1em 0;right:.5em;top:0}
|
|
1
|
+
.ControlSlider-module__wrapper___sHEkd{position:relative;width:100%;height:100%}.ControlSlider-module__slider___R3i9-{width:100%;height:100%}.ControlSlider-module__sliderItems___1MgPL{display:flex;overflow:hidden;width:100%;height:100%;transition:transform .3s ease-in-out}.ControlSlider-module__sliderItem___QQSkR{width:100%;height:100%;display:flex;position:relative}.ControlSlider-module__sliderImage___9hRl-{width:100%;height:100%;object-fit:cover}.ControlSlider-module__arrow___05ghY{position:absolute;display:flex;align-items:center;justify-content:center;border:none;background-color:transparent;top:50%;left:calc(var(--is-editor, 0) * -1.3888888889vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * -1.3888888889vw);z-index:1;transform:translate(-50%,-50%);padding:0;width:calc(var(--is-editor, 0) * 2.0833333333vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * 2.0833333333vw);height:calc(var(--is-editor, 0) * 2.0833333333vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * 2.0833333333vw)}.ControlSlider-module__arrow___05ghY.ControlSlider-module__arrowVertical___tBfVN{left:50%;top:calc(var(--is-editor, 0) * -1.3888888889vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * -1.3888888889vw);transform:translate(-50%,-50%)}.ControlSlider-module__nextArrow___-30Yc{left:unset;right:calc(var(--is-editor, 0) * -1.3888888889vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * -1.3888888889vw);transform:translate(50%,-50%)}.ControlSlider-module__nextArrow___-30Yc.ControlSlider-module__arrowVertical___tBfVN{left:50%;right:unset;top:unset;bottom:calc(var(--is-editor, 0) * -1.3888888889vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * -1.3888888889vw);transform:translate(-50%,50%)}.ControlSlider-module__arrowInner___aEra3{all:unset;cursor:pointer;width:100%;height:100%}.ControlSlider-module__arrowInner___aEra3:hover .ControlSlider-module__arrowIcon___S4ztF path{fill:var(--arrow-hover-color)!important}.ControlSlider-module__arrowImg___2dwJW{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.ControlSlider-module__arrowIcon___S4ztF{width:100%;height:100%}.ControlSlider-module__arrowIcon___S4ztF path{transition:fill .15s ease-in-out}.ControlSlider-module__mirror___brd6U{transform:translate(-50%,-50%) scaleX(-1)!important}.ControlSlider-module__arrowVertical___tBfVN.ControlSlider-module__mirror___brd6U{transform:translate(-50%,-50%) scaleY(-1)!important}.ControlSlider-module__pagination___bicLF{position:absolute;z-index:1;border-radius:50%}.ControlSlider-module__paginationInner___bT-P-{display:flex;gap:calc(var(--is-editor, 0) * 1.1111111111vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * 1.1111111111vw);padding-top:calc(var(--is-editor, 0) * .6944444444vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * .6944444444vw);padding-bottom:calc(var(--is-editor, 0) * .6944444444vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * .6944444444vw);padding-left:calc(var(--is-editor, 0) * 1.25vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * 1.25vw);padding-right:calc(var(--is-editor, 0) * 1.25vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * 1.25vw);border-radius:calc(var(--is-editor, 0) * 2.3611111111vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * 2.3611111111vw)}.ControlSlider-module__paginationVertical___zYqKw{flex-direction:column}.ControlSlider-module__paginationItem___nTRbk{all:unset;flex-shrink:0;position:relative;width:calc(var(--is-editor, 0) * 1.1111111111vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * 1.1111111111vw);height:calc(var(--is-editor, 0) * 1.1111111111vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * 1.1111111111vw);cursor:pointer}.ControlSlider-module__paginationItem___nTRbk:hover .ControlSlider-module__dot___p1Qun{background-color:var(--pagination-hover-color)!important}.ControlSlider-module__dot___p1Qun{border-radius:50%;scale:.5;transition:background-color .3s ease-in-out,transform .3s ease-in-out;width:calc(var(--is-editor, 0) * 1.1111111111vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * 1.1111111111vw);height:calc(var(--is-editor, 0) * 1.1111111111vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * 1.1111111111vw)}.ControlSlider-module__activeDot___LHFaj{transform:scale(2)}.ControlSlider-module__paginationInsideBottom___R3FWn{bottom:0;left:50%;transform:translate(-50%)}.ControlSlider-module__paginationInsideTop___V-qb-{left:50%;transform:translate(-50%);top:0}.ControlSlider-module__paginationOutsideBottom___14w8D{left:50%;transform:translate(-50%);bottom:calc(var(--is-editor, 0) * -2.4305555556vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * -2.4305555556vw)}.ControlSlider-module__paginationOutsideTop___SCLqB{left:50%;transform:translate(-50%);top:calc(var(--is-editor, 0) * -2.4305555556vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * -2.4305555556vw)}.ControlSlider-module__paginationInsideLeft___yOBRZ{top:50%;transform:translateY(-50%);left:calc(var(--is-editor, 0) * -2.4305555556vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * -2.4305555556vw)}.ControlSlider-module__paginationInsideRight___Rtt3o{top:50%;transform:translateY(-50%);right:calc(var(--is-editor, 0) * -2.4305555556vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * -2.4305555556vw)}.ControlSlider-module__paginationOutsideLeft___lahaw{top:50%;transform:translateY(-50%);left:calc(var(--is-editor, 0) * -5.4861111111vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * -5.4861111111vw)}.ControlSlider-module__paginationOutsideRight___EtuQa{top:50%;transform:translateY(-50%);right:calc(var(--is-editor, 0) * -5.4861111111vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * -5.4861111111vw)}.ControlSlider-module__imgWrapper___UjEgB,.ControlSlider-module__wrapperInner___DLAWV{width:100%;height:100%}.ControlSlider-module__captionBlock___dJ6-j{pointer-events:none;position:absolute;top:0;z-index:1;left:0;right:0;bottom:0}.ControlSlider-module__captionTextWrapper___HFlpf{position:relative;width:100%;height:100%}.ControlSlider-module__captionText___uGBVc{pointer-events:none;max-width:100%;transition-property:opacity;transition-timing-function:ease-in-out;position:absolute;display:inline-block;white-space:pre-wrap;overflow-wrap:break-word;opacity:0}.ControlSlider-module__captionText___uGBVc.ControlSlider-module__active___WZK4G{opacity:1}.ControlSlider-module__withPointerEvents___t-18M{pointer-events:auto}.ControlSlider-module__absolute___KxmYB{position:absolute}.ControlSlider-module__topLeftAlignment___zjnGM{top:0;left:0}.ControlSlider-module__topCenterAlignment___gD1xW{top:0;left:50%;transform:translate(-50%)}.ControlSlider-module__topRightAlignment___NMapS{top:0;right:0}.ControlSlider-module__middleLeftAlignment___OnUrY{top:50%;transform:translateY(-50%);left:0}.ControlSlider-module__middleCenterAlignment___Tdkl0{top:50%;transform:translate(-50%,-50%);left:50%}.ControlSlider-module__middleRightAlignment___wEbfX{top:50%;transform:translateY(-50%);right:0}.ControlSlider-module__bottomLeftAlignment___cTP2-{bottom:0;left:0}.ControlSlider-module__bottomCenterAlignment___c54fB{bottom:0;left:50%;transform:translate(-50%)}.ControlSlider-module__bottomRightAlignment___kEwrz{bottom:0;right:0}.ControlSlider-module__clickOverlay___DZA28{position:absolute;top:0;left:0;width:100%;height:100%;cursor:pointer}.ControlSlider-module__contain___pLyq7{object-fit:contain}.ControlSlider-module__cover___KdDat{object-fit:cover}.RichTextRenderer-module__link___BWeZ2{color:inherit;cursor:pointer;pointer-events:auto;transition:color .2s ease}.RichTextRenderer-module__link___BWeZ2:hover{color:var(--link-hover-color)}.SvgImage-module__svg___q3xE-{width:100%;height:100%;color:transparent;display:inline-block;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);background-color:var(--fill);transition:background-color .2s;-webkit-mask:var(--svg) no-repeat center/contain;mask:var(--svg) no-repeat center/contain}.SvgImage-module__svg___q3xE-:hover{background-color:var(--hover-fill)}.SvgImage-module__img___VsTm-{width:100%;height:100%;object-fit:contain}.ImageRevealSlider-module__imageRevealSlider___UE5Ob{position:absolute;top:0;left:0;width:100%;height:100%;overflow:hidden}.ImageRevealSlider-module__image___Qjt-e{width:100%;height:100%;object-fit:cover;position:relative;-webkit-user-select:none;user-select:none;pointer-events:none}.ImageRevealSlider-module__link___N-iLG{width:100%;height:100%;display:block}.Lightbox-module__background___wf1Ii{position:absolute;z-index:9998;width:100%;height:100%;top:0;left:0}.Lightbox-module__backdropStyle___y7avj{position:fixed;top:0;left:0;right:0;bottom:0;width:100%;height:100%;z-index:9999}.Lightbox-module__editor___Vh82D{width:var(--cntrl-article-width)!important;margin-left:auto;margin-right:auto}.Lightbox-module__contentStyle___FzFaW{position:relative;width:100%;max-width:100vw;max-height:100vh;height:100vh;overflow:auto;background:transparent;box-sizing:border-box}.Lightbox-module__imageStyle___Qb7f5{position:relative;display:block;cursor:pointer;background-color:transparent}.Lightbox-module__imgWrapper___cdytV{position:relative;display:flex;width:100%;height:100%;overflow:hidden;box-sizing:border-box}.Lightbox-module__contain___5gATW{object-fit:contain;max-width:100%;max-height:100%}.Lightbox-module__cover___8HZy7{width:100%;height:100%;object-fit:cover;max-width:100%;max-height:100%}.Lightbox-module__caption___3e-22{position:absolute;display:flex}.Lightbox-module__lightboxSplide___yMC4v.splide,.Lightbox-module__lightboxSplide___yMC4v .splide__track{height:100%}.Lightbox-module__arrow___s3Bn2{position:absolute;display:flex;align-items:center;justify-content:center;cursor:pointer;border:none;background-color:transparent;top:50%;z-index:1;transform:translate(-50%,-50%);padding:0;left:calc(var(--is-editor, 0) * 1.3888888889vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * 1.3888888889vw);width:calc(var(--is-editor, 0) * 2.0833333333vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * 2.0833333333vw);height:calc(var(--is-editor, 0) * 2.0833333333vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * 2.0833333333vw)}.Lightbox-module__arrow___s3Bn2.Lightbox-module__arrowVertical___6ztxz{left:50%;top:calc(var(--is-editor, 0) * 1.3888888889vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * 1.3888888889vw);transform:translate(-50%,-50%)}.Lightbox-module__nextArrow___i23DU{left:unset;right:calc(var(--is-editor, 0) * 1.3888888889vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * 1.3888888889vw);transform:translate(50%,-50%)}.Lightbox-module__nextArrow___i23DU.Lightbox-module__arrowVertical___6ztxz{left:50%;right:unset;top:unset;bottom:calc(var(--is-editor, 0) * 1.3888888889vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * 1.3888888889vw);transform:translate(-50%,50%)}.Lightbox-module__arrowInner___Mm3xe{all:unset;cursor:pointer;width:100%;height:100%}.Lightbox-module__arrowInner___Mm3xe:hover .Lightbox-module__arrowIcon___UpzOt path{fill:var(--arrow-hover-color)!important}.Lightbox-module__arrowImg___UxHPR{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.Lightbox-module__mirror___50NCE{transform:translate(-50%,-50%) scaleX(-1)!important}.Lightbox-module__arrowVertical___6ztxz.Lightbox-module__mirror___50NCE{transform:translate(-50%,-50%) scaleY(-1)!important}.Lightbox-module__thumbsContainerVertical___lVaf-{flex-direction:column;display:flex}.Lightbox-module__thumbsContainer___DqOCP{position:absolute;display:flex;align-items:center;justify-content:center;pointer-events:auto}.Lightbox-module__thumbsAlignStart___uiFIV{align-items:flex-start}.Lightbox-module__thumbsAlignCenter___sbUPA{align-items:center}.Lightbox-module__thumbsAlignEnd___OA9N4{align-items:flex-end}.Lightbox-module__thumbsContainerVertical___lVaf-.Lightbox-module__thumbsAlignStart___uiFIV{align-items:center;justify-content:flex-start}.Lightbox-module__thumbsContainerVertical___lVaf-.Lightbox-module__thumbsAlignCenter___sbUPA{align-items:center;justify-content:center}.Lightbox-module__thumbsContainerVertical___lVaf-.Lightbox-module__thumbsAlignEnd___OA9N4{align-items:center;justify-content:flex-end}.Lightbox-module__thumbItem___zROyu{all:unset;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;overflow:hidden;transition:transform .1s ease,opacity .1s ease}.Lightbox-module__thumbItem___zROyu:hover{opacity:var(--thumb-hover)!important}.Lightbox-module__thumbImage___xGakV{display:block;height:100%;width:calc(var(--is-editor, 0) * 5.5555555556vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * 5.5555555556vw)}.Lightbox-module__closeButton___r3Dur{all:unset;cursor:pointer;position:absolute;width:calc(var(--is-editor, 0) * 2.0833333333vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * 2.0833333333vw);height:calc(var(--is-editor, 0) * 2.0833333333vw / var(--cntrl-reverse-layout-deviation, 1) + (1 - var(--is-editor, 0)) * 2.0833333333vw)}@keyframes Lightbox-module__lbFadeIn___3xoHQ{0%{opacity:0}to{opacity:1}}.Lightbox-module__fadeIn___sHwRK{animation-name:Lightbox-module__lbFadeIn___3xoHQ}@keyframes Lightbox-module__lbSlideInLeft___vgE9-{0%{transform:translate(-100%)}to{transform:translate(0)}}@keyframes Lightbox-module__lbSlideInRight___nByIA{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes Lightbox-module__lbSlideInTop___hI5ju{0%{transform:translateY(-100%)}to{transform:translateY(0)}}@keyframes Lightbox-module__lbSlideInBottom___M6-9o{0%{transform:translateY(100%)}to{transform:translateY(0)}}.Lightbox-module__slideInLeft___P-XRo{animation-name:Lightbox-module__lbSlideInLeft___vgE9-}.Lightbox-module__slideInRight___ZQqFi{animation-name:Lightbox-module__lbSlideInRight___nByIA}.Lightbox-module__slideInTop___XRKCs{animation-name:Lightbox-module__lbSlideInTop___hI5ju}.Lightbox-module__slideInBottom___TYOBS{animation-name:Lightbox-module__lbSlideInBottom___M6-9o}.Lightbox-module__lightboxSplide___yMC4v.splide--fade .Lightbox-module__scaleSlide___wS7d4{opacity:0!important;transform:var(--position-transform, none) scale(.9)!important;transition:opacity var(--splide-speed, .5s) ease,transform var(--splide-speed, .5s) ease!important}.Lightbox-module__lightboxSplide___yMC4v.splide--fade .splide__slide.is-active .Lightbox-module__scaleSlide___wS7d4{opacity:1!important;transform:var(--position-transform, none) scale(1)!important}.Lightbox-module__lightboxSplide___yMC4v.splide--fade .splide__slide:not(.is-active) .Lightbox-module__scaleSlide___wS7d4{opacity:0!important;transform:var(--position-transform, none) scale(1.1)!important}.splide__container{box-sizing:border-box;position:relative}.splide__list{backface-visibility:hidden;display:-ms-flexbox;display:flex;height:100%;margin:0!important;padding:0!important}.splide.is-initialized:not(.is-active) .splide__list{display:block}.splide__pagination{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-pack:center;justify-content:center;margin:0;pointer-events:none}.splide__pagination li{display:inline-block;line-height:1;list-style-type:none;margin:0;pointer-events:auto}.splide:not(.is-overflow) .splide__pagination{display:none}.splide__progress__bar{width:0}.splide{position:relative;visibility:hidden}.splide.is-initialized,.splide.is-rendered{visibility:visible}.splide__slide{backface-visibility:hidden;box-sizing:border-box;-ms-flex-negative:0;flex-shrink:0;list-style-type:none!important;margin:0;position:relative}.splide__slide img{vertical-align:bottom}.splide__spinner{animation:splide-loading 1s linear infinite;border:2px solid #999;border-left-color:transparent;border-radius:50%;bottom:0;contain:strict;display:inline-block;height:20px;left:0;margin:auto;position:absolute;right:0;top:0;width:20px}.splide__sr{clip:rect(0 0 0 0);border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.splide__toggle.is-active .splide__toggle__play,.splide__toggle__pause{display:none}.splide__toggle.is-active .splide__toggle__pause{display:inline}.splide__track{overflow:hidden;position:relative;z-index:0}@keyframes splide-loading{0%{transform:rotate(0)}to{transform:rotate(1turn)}}.splide__track--draggable{-webkit-touch-callout:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.splide__track--fade>.splide__list>.splide__slide{margin:0!important;opacity:0;z-index:0}.splide__track--fade>.splide__list>.splide__slide.is-active{opacity:1;z-index:1}.splide--rtl{direction:rtl}.splide__track--ttb>.splide__list{display:block}.splide__arrow{-ms-flex-align:center;align-items:center;background:#ccc;border:0;border-radius:50%;cursor:pointer;display:-ms-flexbox;display:flex;height:2em;-ms-flex-pack:center;justify-content:center;opacity:.7;padding:0;position:absolute;top:50%;transform:translateY(-50%);width:2em;z-index:1}.splide__arrow svg{fill:#000;height:1.2em;width:1.2em}.splide__arrow:hover:not(:disabled){opacity:.9}.splide__arrow:disabled{opacity:.3}.splide__arrow:focus-visible{outline:3px solid #0bf;outline-offset:3px}.splide__arrow--prev{left:1em}.splide__arrow--prev svg{transform:scaleX(-1)}.splide__arrow--next{right:1em}.splide.is-focus-in .splide__arrow:focus{outline:3px solid #0bf;outline-offset:3px}.splide__pagination{bottom:.5em;left:0;padding:0 1em;position:absolute;right:0;z-index:1}.splide__pagination__page{background:#ccc;border:0;border-radius:50%;display:inline-block;height:8px;margin:3px;opacity:.7;padding:0;position:relative;transition:transform .2s linear;width:8px}.splide__pagination__page.is-active{background:#fff;transform:scale(1.4);z-index:1}.splide__pagination__page:hover{cursor:pointer;opacity:.9}.splide__pagination__page:focus-visible{outline:3px solid #0bf;outline-offset:3px}.splide.is-focus-in .splide__pagination__page:focus{outline:3px solid #0bf;outline-offset:3px}.splide__progress__bar{background:#ccc;height:3px}.splide__slide{-webkit-tap-highlight-color:rgba(0,0,0,0)}.splide__slide:focus{outline:0}@supports (outline-offset:-3px){.splide__slide:focus-visible{outline:3px solid #0bf;outline-offset:-3px}}@media screen and (-ms-high-contrast:none){.splide__slide:focus-visible{border:3px solid #0bf}}@supports (outline-offset:-3px){.splide.is-focus-in .splide__slide:focus{outline:3px solid #0bf;outline-offset:-3px}}@media screen and (-ms-high-contrast:none){.splide.is-focus-in .splide__slide:focus{border:3px solid #0bf}.splide.is-focus-in .splide__track>.splide__list>.splide__slide:focus{border-color:#0bf}}.splide__toggle{cursor:pointer}.splide__toggle:focus-visible{outline:3px solid #0bf;outline-offset:3px}.splide.is-focus-in .splide__toggle:focus{outline:3px solid #0bf;outline-offset:3px}.splide__track--nav>.splide__list>.splide__slide{border:3px solid transparent;cursor:pointer}.splide__track--nav>.splide__list>.splide__slide.is-active{border:3px solid #000}.splide__arrows--rtl .splide__arrow--prev{left:auto;right:1em}.splide__arrows--rtl .splide__arrow--prev svg{transform:scaleX(1)}.splide__arrows--rtl .splide__arrow--next{left:1em;right:auto}.splide__arrows--rtl .splide__arrow--next svg{transform:scaleX(-1)}.splide__arrows--ttb .splide__arrow{left:50%;transform:translate(-50%)}.splide__arrows--ttb .splide__arrow--prev{top:1em}.splide__arrows--ttb .splide__arrow--prev svg{transform:rotate(-90deg)}.splide__arrows--ttb .splide__arrow--next{bottom:1em;top:auto}.splide__arrows--ttb .splide__arrow--next svg{transform:rotate(90deg)}.splide__pagination--ttb{bottom:0;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;left:auto;padding:1em 0;right:.5em;top:0}
|
package/dist/index.js
CHANGED
|
@@ -1443,7 +1443,9 @@ const ControlImageRevealSliderComponent = {
|
|
|
1443
1443
|
}
|
|
1444
1444
|
}
|
|
1445
1445
|
};
|
|
1446
|
+
const background = "Lightbox-module__background___wf1Ii";
|
|
1446
1447
|
const backdropStyle = "Lightbox-module__backdropStyle___y7avj";
|
|
1448
|
+
const editor = "Lightbox-module__editor___Vh82D";
|
|
1447
1449
|
const contentStyle = "Lightbox-module__contentStyle___FzFaW";
|
|
1448
1450
|
const imageStyle = "Lightbox-module__imageStyle___Qb7f5";
|
|
1449
1451
|
const imgWrapper = "Lightbox-module__imgWrapper___cdytV";
|
|
@@ -1472,7 +1474,9 @@ const slideInTop = "Lightbox-module__slideInTop___XRKCs";
|
|
|
1472
1474
|
const slideInBottom = "Lightbox-module__slideInBottom___TYOBS";
|
|
1473
1475
|
const scaleSlide = "Lightbox-module__scaleSlide___wS7d4";
|
|
1474
1476
|
const styles = {
|
|
1477
|
+
background,
|
|
1475
1478
|
backdropStyle,
|
|
1479
|
+
editor,
|
|
1476
1480
|
contentStyle,
|
|
1477
1481
|
imageStyle,
|
|
1478
1482
|
imgWrapper,
|
|
@@ -1535,7 +1539,7 @@ const getPositionStyles = (position, offset) => {
|
|
|
1535
1539
|
}
|
|
1536
1540
|
return styles2;
|
|
1537
1541
|
};
|
|
1538
|
-
function LightboxGallery({ settings, content, styles: styles2, portalId, activeEvent }) {
|
|
1542
|
+
function LightboxGallery({ settings, content, styles: styles2, portalId, activeEvent, isEditor }) {
|
|
1539
1543
|
const [open, setOpen] = React.useState(false);
|
|
1540
1544
|
const { url } = settings.thumbnailBlock.cover;
|
|
1541
1545
|
React.useEffect(() => {
|
|
@@ -1556,10 +1560,10 @@ function LightboxGallery({ settings, content, styles: styles2, portalId, activeE
|
|
|
1556
1560
|
onClick: () => setOpen(true)
|
|
1557
1561
|
}
|
|
1558
1562
|
),
|
|
1559
|
-
/* @__PURE__ */ jsxRuntime.jsx(Lightbox, { isOpen: open, onClose: () => setOpen(false), content, settings, portalId })
|
|
1563
|
+
/* @__PURE__ */ jsxRuntime.jsx(Lightbox, { isOpen: open, onClose: () => setOpen(false), content, settings, portalId, isEditor })
|
|
1560
1564
|
] });
|
|
1561
1565
|
}
|
|
1562
|
-
const Lightbox = ({ isOpen, onClose, content, settings, closeOnBackdropClick = true, closeOnEsc = true, portalId }) => {
|
|
1566
|
+
const Lightbox = ({ isOpen, onClose, content, settings, closeOnBackdropClick = true, closeOnEsc = true, portalId, isEditor }) => {
|
|
1563
1567
|
const [currentIndex, setCurrentIndex] = React.useState(0);
|
|
1564
1568
|
const lightboxRef = React.useRef(null);
|
|
1565
1569
|
const resizeObserverRef = React.useRef(null);
|
|
@@ -1576,6 +1580,20 @@ const Lightbox = ({ isOpen, onClose, content, settings, closeOnBackdropClick = t
|
|
|
1576
1580
|
onClose();
|
|
1577
1581
|
}
|
|
1578
1582
|
};
|
|
1583
|
+
const handleContentClick = (e) => {
|
|
1584
|
+
if (!closeOnBackdropClick) return;
|
|
1585
|
+
const target = e.target;
|
|
1586
|
+
const currentTarget = e.currentTarget;
|
|
1587
|
+
if (target === currentTarget) {
|
|
1588
|
+
onClose();
|
|
1589
|
+
return;
|
|
1590
|
+
}
|
|
1591
|
+
const isImg = target.tagName === "IMG" || target.closest("img");
|
|
1592
|
+
const isButton = target.tagName === "BUTTON" || target.closest("button");
|
|
1593
|
+
if (!isImg && !isButton) {
|
|
1594
|
+
onClose();
|
|
1595
|
+
}
|
|
1596
|
+
};
|
|
1579
1597
|
const onImageClick = (e) => {
|
|
1580
1598
|
var _a, _b;
|
|
1581
1599
|
if (triggers.type === "click" && triggers.switch === "image") {
|
|
@@ -1622,6 +1640,19 @@ const Lightbox = ({ isOpen, onClose, content, settings, closeOnBackdropClick = t
|
|
|
1622
1640
|
React.useEffect(() => {
|
|
1623
1641
|
if (isOpen) setCurrentIndex(0);
|
|
1624
1642
|
}, [isOpen]);
|
|
1643
|
+
React.useEffect(() => {
|
|
1644
|
+
if (!isOpen) return;
|
|
1645
|
+
const originalOverflow = document.body.style.overflow;
|
|
1646
|
+
document.body.style.overflow = "hidden";
|
|
1647
|
+
document.body.style.backgroundColor = area.color;
|
|
1648
|
+
const preventScroll = (e) => e.preventDefault();
|
|
1649
|
+
document.addEventListener("touchmove", preventScroll, { passive: false });
|
|
1650
|
+
return () => {
|
|
1651
|
+
document.body.style.overflow = originalOverflow;
|
|
1652
|
+
document.removeEventListener("touchmove", preventScroll);
|
|
1653
|
+
document.body.style.backgroundColor = "";
|
|
1654
|
+
};
|
|
1655
|
+
}, [isOpen]);
|
|
1625
1656
|
React.useEffect(() => {
|
|
1626
1657
|
if (!isOpen) return;
|
|
1627
1658
|
if (resizeObserverRef.current) {
|
|
@@ -1670,17 +1701,28 @@ const Lightbox = ({ isOpen, onClose, content, settings, closeOnBackdropClick = t
|
|
|
1670
1701
|
(_a = lightboxRef.current) == null ? void 0 : _a.go(dir);
|
|
1671
1702
|
};
|
|
1672
1703
|
const appearDurationMs = appear.duration ? parseInt(appear.duration) : 300;
|
|
1704
|
+
const backdropDurationMs = appear.type === "fade in" || appear.type === "mix" ? Math.floor(appearDurationMs * 0.7) : appearDurationMs;
|
|
1673
1705
|
const appearClass = (() => {
|
|
1674
1706
|
if (appear.type === "fade in") return styles.fadeIn;
|
|
1675
|
-
if (appear.type === "slide in") {
|
|
1676
|
-
|
|
1707
|
+
if (appear.type === "slide in" || appear.type === "mix") {
|
|
1708
|
+
switch (appear.direction) {
|
|
1709
|
+
case "left":
|
|
1710
|
+
return styles.slideInLeft;
|
|
1711
|
+
case "right":
|
|
1712
|
+
return styles.slideInRight;
|
|
1713
|
+
case "top":
|
|
1714
|
+
return styles.slideInTop;
|
|
1715
|
+
case "bottom":
|
|
1716
|
+
return styles.slideInBottom;
|
|
1717
|
+
default:
|
|
1718
|
+
return styles.slideInRight;
|
|
1719
|
+
}
|
|
1677
1720
|
}
|
|
1678
|
-
if (appear.type === "mix") return styles.fadeIn;
|
|
1679
1721
|
return styles.fadeIn;
|
|
1680
1722
|
})();
|
|
1681
1723
|
const backdropAppearClass = (() => {
|
|
1682
|
-
if (appear.type === "fade in") return styles.fadeIn;
|
|
1683
|
-
if (appear.type === "slide in"
|
|
1724
|
+
if (appear.type === "fade in" || appear.type === "mix") return styles.fadeIn;
|
|
1725
|
+
if (appear.type === "slide in") {
|
|
1684
1726
|
switch (appear.direction) {
|
|
1685
1727
|
case "left":
|
|
1686
1728
|
return styles.slideInLeft;
|
|
@@ -1698,228 +1740,242 @@ const Lightbox = ({ isOpen, onClose, content, settings, closeOnBackdropClick = t
|
|
|
1698
1740
|
})();
|
|
1699
1741
|
if (!isOpen) return null;
|
|
1700
1742
|
return reactDom.createPortal(
|
|
1701
|
-
/* @__PURE__ */ jsxRuntime.
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
options: {
|
|
1729
|
-
arrows: false,
|
|
1730
|
-
speed: triggers.duration ? parseInt(triggers.duration) : 500,
|
|
1731
|
-
direction: slider.direction === "horiz" || slider.type === "fade" || slider.type === "scale" ? "ltr" : "ttb",
|
|
1732
|
-
pagination: false,
|
|
1733
|
-
drag: triggers.type === "drag",
|
|
1734
|
-
perPage: 1,
|
|
1735
|
-
width: "100%",
|
|
1736
|
-
height: "100%",
|
|
1737
|
-
type: slider.type === "fade" || slider.type === "scale" ? "fade" : "loop",
|
|
1738
|
-
padding: 0,
|
|
1739
|
-
rewind: (slider.type === "scale" || slider.type === "fade") && appear.repeat !== "close"
|
|
1740
|
-
},
|
|
1741
|
-
style: { "--splide-speed": triggers.duration || "500ms" },
|
|
1742
|
-
children: content.map((item, index) => {
|
|
1743
|
-
const positionStyles = getPositionStyles(layout.position, layout.offset);
|
|
1744
|
-
const imageStyle2 = slider.type === "scale" ? (() => {
|
|
1745
|
-
const { transform, ...restStyles } = positionStyles;
|
|
1746
|
-
return {
|
|
1747
|
-
...restStyles,
|
|
1748
|
-
"--position-transform": transform || "none"
|
|
1749
|
-
};
|
|
1750
|
-
})() : positionStyles;
|
|
1751
|
-
return /* @__PURE__ */ jsxRuntime.jsx(reactSplide.SplideSlide, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1752
|
-
"div",
|
|
1753
|
-
{
|
|
1754
|
-
className: styles.imgWrapper,
|
|
1755
|
-
onClick: handleImageWrapperClick,
|
|
1756
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1757
|
-
"img",
|
|
1758
|
-
{
|
|
1759
|
-
className: cn(styles.imageStyle, {
|
|
1760
|
-
[styles.contain]: item.image.objectFit === "contain",
|
|
1761
|
-
[styles.cover]: item.image.objectFit === "cover",
|
|
1762
|
-
[styles.scaleSlide]: slider.type === "scale"
|
|
1763
|
-
}),
|
|
1764
|
-
src: item.image.url,
|
|
1765
|
-
alt: item.image.name ?? "",
|
|
1766
|
-
onClick: onImageClick,
|
|
1767
|
-
style: imageStyle2
|
|
1768
|
-
}
|
|
1769
|
-
)
|
|
1770
|
-
}
|
|
1771
|
-
) }, index);
|
|
1772
|
-
})
|
|
1773
|
-
}
|
|
1774
|
-
),
|
|
1775
|
-
controls.isActive && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1743
|
+
/* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1744
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1745
|
+
"div",
|
|
1746
|
+
{
|
|
1747
|
+
className: cn(styles.background, backdropAppearClass),
|
|
1748
|
+
style: { backgroundColor: area.color, backdropFilter: `blur(${area.blur}px)`, animationDuration: `${backdropDurationMs}ms`, animationTimingFunction: "ease", animationFillMode: "both" }
|
|
1749
|
+
}
|
|
1750
|
+
),
|
|
1751
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1752
|
+
"div",
|
|
1753
|
+
{
|
|
1754
|
+
className: cn(styles.backdropStyle, { [styles.editor]: isEditor }),
|
|
1755
|
+
onClick: handleBackdropClick,
|
|
1756
|
+
onTouchEnd: handleBackdropClick,
|
|
1757
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1758
|
+
"div",
|
|
1759
|
+
{
|
|
1760
|
+
className: cn(styles.contentStyle, appearClass),
|
|
1761
|
+
onClick: handleContentClick,
|
|
1762
|
+
style: {
|
|
1763
|
+
animationDuration: `${appearDurationMs}ms`,
|
|
1764
|
+
animationTimingFunction: "ease",
|
|
1765
|
+
animationFillMode: "both",
|
|
1766
|
+
...appear.type === "mix" && { animationDelay: `${backdropDurationMs}ms` },
|
|
1767
|
+
"--splide-speed": triggers.duration || "500ms"
|
|
1768
|
+
},
|
|
1769
|
+
children: [
|
|
1776
1770
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1771
|
+
reactSplide.Splide,
|
|
1772
|
+
{
|
|
1773
|
+
onMove: (splide) => {
|
|
1774
|
+
setCurrentIndex(splide.index);
|
|
1775
|
+
},
|
|
1776
|
+
ref: lightboxRef,
|
|
1777
|
+
className: styles.lightboxSplide,
|
|
1778
|
+
options: {
|
|
1779
|
+
arrows: false,
|
|
1780
|
+
speed: triggers.duration ? parseInt(triggers.duration) : 500,
|
|
1781
|
+
direction: slider.direction === "horiz" || slider.type === "fade" || slider.type === "scale" ? "ltr" : "ttb",
|
|
1782
|
+
pagination: false,
|
|
1783
|
+
drag: triggers.type === "drag",
|
|
1784
|
+
perPage: 1,
|
|
1785
|
+
width: "100%",
|
|
1786
|
+
height: "100%",
|
|
1787
|
+
type: slider.type === "fade" || slider.type === "scale" ? "fade" : "loop",
|
|
1788
|
+
padding: 0,
|
|
1789
|
+
rewind: (slider.type === "scale" || slider.type === "fade") && appear.repeat !== "close"
|
|
1790
|
+
},
|
|
1791
|
+
style: { "--splide-speed": triggers.duration || "500ms" },
|
|
1792
|
+
children: content.map((item, index) => {
|
|
1793
|
+
const positionStyles = getPositionStyles(layout.position, layout.offset);
|
|
1794
|
+
const imageStyle2 = slider.type === "scale" ? (() => {
|
|
1795
|
+
const { transform, ...restStyles } = positionStyles;
|
|
1796
|
+
return {
|
|
1797
|
+
...restStyles,
|
|
1798
|
+
"--position-transform": transform || "none"
|
|
1799
|
+
};
|
|
1800
|
+
})() : positionStyles;
|
|
1801
|
+
return /* @__PURE__ */ jsxRuntime.jsx(reactSplide.SplideSlide, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1802
|
+
"div",
|
|
1803
|
+
{
|
|
1804
|
+
className: styles.imgWrapper,
|
|
1805
|
+
onClick: handleImageWrapperClick,
|
|
1806
|
+
style: {
|
|
1807
|
+
padding: `${layout.padding.top}px ${layout.padding.right}px ${layout.padding.bottom}px ${layout.padding.left}px`
|
|
1808
|
+
},
|
|
1809
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1810
|
+
"img",
|
|
1811
|
+
{
|
|
1812
|
+
className: cn(styles.imageStyle, {
|
|
1813
|
+
[styles.contain]: item.image.objectFit === "contain",
|
|
1814
|
+
[styles.cover]: item.image.objectFit === "cover",
|
|
1815
|
+
[styles.scaleSlide]: slider.type === "scale"
|
|
1816
|
+
}),
|
|
1817
|
+
src: item.image.url,
|
|
1818
|
+
alt: item.image.name ?? "",
|
|
1819
|
+
onClick: onImageClick,
|
|
1820
|
+
style: imageStyle2
|
|
1821
|
+
}
|
|
1822
|
+
)
|
|
1823
|
+
}
|
|
1824
|
+
) }, index);
|
|
1825
|
+
})
|
|
1826
|
+
}
|
|
1827
|
+
),
|
|
1828
|
+
controls.isActive && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1829
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1830
|
+
"div",
|
|
1831
|
+
{
|
|
1832
|
+
className: cn(styles.arrow, { [styles.arrowVertical]: slider.direction === "vert" }),
|
|
1833
|
+
style: { color: controls.color, ["--arrow-hover-color"]: controls.hover },
|
|
1834
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1835
|
+
"button",
|
|
1836
|
+
{
|
|
1837
|
+
className: styles.arrowInner,
|
|
1838
|
+
style: {
|
|
1839
|
+
transform: `translate(${scalingValue(controls.offset.x)}, ${scalingValue(controls.offset.y * (slider.direction === "horiz" ? 1 : -1))}) scale(${controls.scale}) rotate(${slider.direction === "horiz" ? "0deg" : "90deg"})`
|
|
1840
|
+
},
|
|
1841
|
+
onClick: (e) => {
|
|
1842
|
+
handleArrowClick("-1");
|
|
1843
|
+
},
|
|
1844
|
+
children: controls.arrowsImgUrl && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1845
|
+
SvgImage,
|
|
1846
|
+
{
|
|
1847
|
+
url: controls.arrowsImgUrl,
|
|
1848
|
+
fill: controls.color,
|
|
1849
|
+
hoverFill: controls.hover,
|
|
1850
|
+
className: cn(styles.arrowImg, styles.mirror)
|
|
1851
|
+
}
|
|
1852
|
+
)
|
|
1853
|
+
}
|
|
1854
|
+
)
|
|
1855
|
+
}
|
|
1856
|
+
),
|
|
1857
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1858
|
+
"div",
|
|
1859
|
+
{
|
|
1860
|
+
className: cn(styles.arrow, styles.nextArrow, { [styles.arrowVertical]: slider.direction === "vert" }),
|
|
1861
|
+
style: { color: controls.color, ["--arrow-hover-color"]: controls.hover },
|
|
1862
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1863
|
+
"button",
|
|
1864
|
+
{
|
|
1865
|
+
className: styles.arrowInner,
|
|
1866
|
+
style: {
|
|
1867
|
+
transform: `translate(${scalingValue(controls.offset.x * (slider.direction === "horiz" ? -1 : 1))}, ${scalingValue(controls.offset.y)}) scale(${controls.scale}) rotate(${slider.direction === "horiz" ? "0deg" : "90deg"})`
|
|
1868
|
+
},
|
|
1869
|
+
onClick: (e) => {
|
|
1870
|
+
handleArrowClick("+1");
|
|
1871
|
+
},
|
|
1872
|
+
"aria-label": "Next",
|
|
1873
|
+
children: controls.arrowsImgUrl && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1874
|
+
SvgImage,
|
|
1875
|
+
{
|
|
1876
|
+
url: controls.arrowsImgUrl,
|
|
1877
|
+
fill: controls.color,
|
|
1878
|
+
hoverFill: controls.hover,
|
|
1879
|
+
className: styles.arrowImg
|
|
1880
|
+
}
|
|
1881
|
+
)
|
|
1882
|
+
}
|
|
1883
|
+
)
|
|
1884
|
+
}
|
|
1885
|
+
)
|
|
1886
|
+
] }),
|
|
1887
|
+
area.closeIconUrl && (() => {
|
|
1888
|
+
const positionStyles = getPositionStyles(area.closeIconAlign, area.closeIconOffset);
|
|
1889
|
+
const scaleTransform = `scale(${area.closeIconScale})`;
|
|
1890
|
+
const combinedTransform = positionStyles.transform ? `${positionStyles.transform} ${scaleTransform}` : scaleTransform;
|
|
1891
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1892
|
+
"button",
|
|
1893
|
+
{
|
|
1894
|
+
className: styles.closeButton,
|
|
1895
|
+
style: {
|
|
1896
|
+
...positionStyles,
|
|
1897
|
+
transform: combinedTransform
|
|
1898
|
+
},
|
|
1899
|
+
onClick: onClose,
|
|
1900
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(SvgImage, { url: area.closeIconUrl })
|
|
1901
|
+
}
|
|
1902
|
+
);
|
|
1903
|
+
})(),
|
|
1904
|
+
caption2.isActive && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1777
1905
|
"div",
|
|
1778
1906
|
{
|
|
1779
|
-
className:
|
|
1780
|
-
style: {
|
|
1781
|
-
|
|
1782
|
-
"
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
style: {
|
|
1786
|
-
transform: `translate(${scalingValue(controls.offset.x)}, ${scalingValue(controls.offset.y * (slider.direction === "horiz" ? 1 : -1))}) scale(${controls.scale}) rotate(${slider.direction === "horiz" ? "0deg" : "90deg"})`
|
|
1787
|
-
},
|
|
1788
|
-
onClick: (e) => {
|
|
1789
|
-
handleArrowClick("-1");
|
|
1790
|
-
},
|
|
1791
|
-
children: controls.arrowsImgUrl && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1792
|
-
SvgImage,
|
|
1793
|
-
{
|
|
1794
|
-
url: controls.arrowsImgUrl,
|
|
1795
|
-
fill: controls.color,
|
|
1796
|
-
hoverFill: controls.hover,
|
|
1797
|
-
className: cn(styles.arrowImg, styles.mirror)
|
|
1798
|
-
}
|
|
1799
|
-
)
|
|
1800
|
-
}
|
|
1801
|
-
)
|
|
1907
|
+
className: styles.caption,
|
|
1908
|
+
style: {
|
|
1909
|
+
...getPositionStyles(caption2.alignment, caption2.offset),
|
|
1910
|
+
["--link-hover-color"]: caption2.hover
|
|
1911
|
+
},
|
|
1912
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(RichTextRenderer, { content: content[currentIndex].imageCaption })
|
|
1802
1913
|
}
|
|
1803
1914
|
),
|
|
1804
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1915
|
+
thumbnail.isActive && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1805
1916
|
"div",
|
|
1806
1917
|
{
|
|
1807
|
-
className: cn(
|
|
1808
|
-
|
|
1809
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1810
|
-
"button",
|
|
1918
|
+
className: cn(
|
|
1919
|
+
styles.thumbsContainer,
|
|
1811
1920
|
{
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
onClick: (e) => {
|
|
1817
|
-
handleArrowClick("+1");
|
|
1818
|
-
},
|
|
1819
|
-
"aria-label": "Next",
|
|
1820
|
-
children: controls.arrowsImgUrl && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1821
|
-
SvgImage,
|
|
1822
|
-
{
|
|
1823
|
-
url: controls.arrowsImgUrl,
|
|
1824
|
-
fill: controls.color,
|
|
1825
|
-
hoverFill: controls.hover,
|
|
1826
|
-
className: styles.arrowImg
|
|
1827
|
-
}
|
|
1828
|
-
)
|
|
1921
|
+
[styles.thumbsContainerVertical]: slider.direction === "vert",
|
|
1922
|
+
[styles.thumbsAlignStart]: thumbnail.align === "start",
|
|
1923
|
+
[styles.thumbsAlignCenter]: thumbnail.align === "center",
|
|
1924
|
+
[styles.thumbsAlignEnd]: thumbnail.align === "end"
|
|
1829
1925
|
}
|
|
1830
|
-
)
|
|
1831
|
-
}
|
|
1832
|
-
)
|
|
1833
|
-
] }),
|
|
1834
|
-
area.closeIconUrl && (() => {
|
|
1835
|
-
const positionStyles = getPositionStyles(area.closeIconAlign, area.closeIconOffset);
|
|
1836
|
-
const scaleTransform = `scale(${area.closeIconScale})`;
|
|
1837
|
-
const combinedTransform = positionStyles.transform ? `${positionStyles.transform} ${scaleTransform}` : scaleTransform;
|
|
1838
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1839
|
-
"button",
|
|
1840
|
-
{
|
|
1841
|
-
className: styles.closeButton,
|
|
1926
|
+
),
|
|
1842
1927
|
style: {
|
|
1843
|
-
|
|
1844
|
-
|
|
1928
|
+
gap: `${thumbnail.grid.gap}px`,
|
|
1929
|
+
...slider.direction === "horiz" ? { height: `${thumbnail.grid.height}px` } : {},
|
|
1930
|
+
...slider.direction === "vert" ? { width: `${thumbnail.grid.width}px` } : {},
|
|
1931
|
+
...getPositionStyles(thumbnail.position, thumbnail.offset)
|
|
1845
1932
|
},
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
...getPositionStyles(thumbnail.position, thumbnail.offset)
|
|
1879
|
-
},
|
|
1880
|
-
children: content.map((item, index) => {
|
|
1881
|
-
const isActive = index === currentIndex;
|
|
1882
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1883
|
-
"button",
|
|
1884
|
-
{
|
|
1885
|
-
className: styles.thumbItem,
|
|
1886
|
-
style: {
|
|
1887
|
-
transform: `scale(${isActive ? thumbnail.activeState.scale : 1})`,
|
|
1888
|
-
...slider.direction === "horiz" ? { height: "100%" } : {},
|
|
1889
|
-
...slider.direction === "vert" ? { width: "100%" } : {},
|
|
1890
|
-
opacity: isActive ? thumbnail.activeState.opacity : thumbnail.opacity,
|
|
1891
|
-
["--thumb-hover"]: thumbnail.activeState.opacity
|
|
1892
|
-
},
|
|
1893
|
-
onClick: (e) => {
|
|
1894
|
-
var _a;
|
|
1895
|
-
e.stopPropagation();
|
|
1896
|
-
setCurrentIndex(index);
|
|
1897
|
-
(_a = lightboxRef.current) == null ? void 0 : _a.go(index);
|
|
1898
|
-
},
|
|
1899
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1900
|
-
"img",
|
|
1901
|
-
{
|
|
1902
|
-
src: item.image.url,
|
|
1903
|
-
alt: item.image.name ?? "",
|
|
1904
|
-
className: styles.thumbImage,
|
|
1905
|
-
style: {
|
|
1906
|
-
objectFit: thumbnail.fit === "cover" ? "cover" : "contain",
|
|
1907
|
-
...slider.direction === "horiz" ? { height: "100%" } : {},
|
|
1908
|
-
...slider.direction === "vert" ? { width: "100%" } : {}
|
|
1933
|
+
children: content.map((item, index) => {
|
|
1934
|
+
const isActive = index === currentIndex;
|
|
1935
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1936
|
+
"button",
|
|
1937
|
+
{
|
|
1938
|
+
className: styles.thumbItem,
|
|
1939
|
+
style: {
|
|
1940
|
+
transform: `scale(${isActive ? thumbnail.activeState.scale : 1})`,
|
|
1941
|
+
...slider.direction === "horiz" ? { height: "100%" } : {},
|
|
1942
|
+
...slider.direction === "vert" ? { width: "100%" } : {},
|
|
1943
|
+
opacity: isActive ? thumbnail.activeState.opacity : thumbnail.opacity,
|
|
1944
|
+
["--thumb-hover"]: thumbnail.activeState.opacity
|
|
1945
|
+
},
|
|
1946
|
+
onClick: (e) => {
|
|
1947
|
+
var _a;
|
|
1948
|
+
e.stopPropagation();
|
|
1949
|
+
setCurrentIndex(index);
|
|
1950
|
+
(_a = lightboxRef.current) == null ? void 0 : _a.go(index);
|
|
1951
|
+
},
|
|
1952
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1953
|
+
"img",
|
|
1954
|
+
{
|
|
1955
|
+
src: item.image.url,
|
|
1956
|
+
alt: item.image.name ?? "",
|
|
1957
|
+
className: styles.thumbImage,
|
|
1958
|
+
style: {
|
|
1959
|
+
objectFit: thumbnail.fit === "cover" ? "cover" : "contain",
|
|
1960
|
+
...thumbnail.fit === "fit" && slider.direction === "horiz" ? { width: "fit-content" } : {},
|
|
1961
|
+
...thumbnail.fit === "fit" && slider.direction === "vert" ? { height: "fit-content" } : {},
|
|
1962
|
+
...slider.direction === "horiz" ? { height: "100%" } : {},
|
|
1963
|
+
...slider.direction === "vert" ? { width: "100%" } : {}
|
|
1964
|
+
}
|
|
1909
1965
|
}
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
)
|
|
1915
|
-
}
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
),
|
|
1966
|
+
)
|
|
1967
|
+
},
|
|
1968
|
+
`${item.image.url}-${index}`
|
|
1969
|
+
);
|
|
1970
|
+
})
|
|
1971
|
+
}
|
|
1972
|
+
)
|
|
1973
|
+
]
|
|
1974
|
+
}
|
|
1975
|
+
)
|
|
1976
|
+
}
|
|
1977
|
+
)
|
|
1978
|
+
] }),
|
|
1923
1979
|
document.getElementById(portalId)
|
|
1924
1980
|
);
|
|
1925
1981
|
};
|
|
@@ -2118,7 +2174,8 @@ const LightboxComponent = {
|
|
|
2118
2174
|
type: "number",
|
|
2119
2175
|
label: "H",
|
|
2120
2176
|
display: {
|
|
2121
|
-
type: "numeric-input"
|
|
2177
|
+
type: "numeric-input",
|
|
2178
|
+
visible: true
|
|
2122
2179
|
}
|
|
2123
2180
|
},
|
|
2124
2181
|
width: {
|
|
@@ -2498,7 +2555,7 @@ const LightboxComponent = {
|
|
|
2498
2555
|
value: "vert"
|
|
2499
2556
|
},
|
|
2500
2557
|
then: {
|
|
2501
|
-
name: "properties.lightboxBlock.properties.thumbnail.properties.
|
|
2558
|
+
name: "properties.lightboxBlock.properties.thumbnail.properties.align.display.direction",
|
|
2502
2559
|
value: "vertical"
|
|
2503
2560
|
}
|
|
2504
2561
|
},
|
package/dist/index.mjs
CHANGED
|
@@ -1441,7 +1441,9 @@ const ControlImageRevealSliderComponent = {
|
|
|
1441
1441
|
}
|
|
1442
1442
|
}
|
|
1443
1443
|
};
|
|
1444
|
+
const background = "Lightbox-module__background___wf1Ii";
|
|
1444
1445
|
const backdropStyle = "Lightbox-module__backdropStyle___y7avj";
|
|
1446
|
+
const editor = "Lightbox-module__editor___Vh82D";
|
|
1445
1447
|
const contentStyle = "Lightbox-module__contentStyle___FzFaW";
|
|
1446
1448
|
const imageStyle = "Lightbox-module__imageStyle___Qb7f5";
|
|
1447
1449
|
const imgWrapper = "Lightbox-module__imgWrapper___cdytV";
|
|
@@ -1470,7 +1472,9 @@ const slideInTop = "Lightbox-module__slideInTop___XRKCs";
|
|
|
1470
1472
|
const slideInBottom = "Lightbox-module__slideInBottom___TYOBS";
|
|
1471
1473
|
const scaleSlide = "Lightbox-module__scaleSlide___wS7d4";
|
|
1472
1474
|
const styles = {
|
|
1475
|
+
background,
|
|
1473
1476
|
backdropStyle,
|
|
1477
|
+
editor,
|
|
1474
1478
|
contentStyle,
|
|
1475
1479
|
imageStyle,
|
|
1476
1480
|
imgWrapper,
|
|
@@ -1533,7 +1537,7 @@ const getPositionStyles = (position, offset) => {
|
|
|
1533
1537
|
}
|
|
1534
1538
|
return styles2;
|
|
1535
1539
|
};
|
|
1536
|
-
function LightboxGallery({ settings, content, styles: styles2, portalId, activeEvent }) {
|
|
1540
|
+
function LightboxGallery({ settings, content, styles: styles2, portalId, activeEvent, isEditor }) {
|
|
1537
1541
|
const [open, setOpen] = React.useState(false);
|
|
1538
1542
|
const { url } = settings.thumbnailBlock.cover;
|
|
1539
1543
|
useEffect(() => {
|
|
@@ -1554,10 +1558,10 @@ function LightboxGallery({ settings, content, styles: styles2, portalId, activeE
|
|
|
1554
1558
|
onClick: () => setOpen(true)
|
|
1555
1559
|
}
|
|
1556
1560
|
),
|
|
1557
|
-
/* @__PURE__ */ jsx(Lightbox, { isOpen: open, onClose: () => setOpen(false), content, settings, portalId })
|
|
1561
|
+
/* @__PURE__ */ jsx(Lightbox, { isOpen: open, onClose: () => setOpen(false), content, settings, portalId, isEditor })
|
|
1558
1562
|
] });
|
|
1559
1563
|
}
|
|
1560
|
-
const Lightbox = ({ isOpen, onClose, content, settings, closeOnBackdropClick = true, closeOnEsc = true, portalId }) => {
|
|
1564
|
+
const Lightbox = ({ isOpen, onClose, content, settings, closeOnBackdropClick = true, closeOnEsc = true, portalId, isEditor }) => {
|
|
1561
1565
|
const [currentIndex, setCurrentIndex] = React.useState(0);
|
|
1562
1566
|
const lightboxRef = useRef(null);
|
|
1563
1567
|
const resizeObserverRef = useRef(null);
|
|
@@ -1574,6 +1578,20 @@ const Lightbox = ({ isOpen, onClose, content, settings, closeOnBackdropClick = t
|
|
|
1574
1578
|
onClose();
|
|
1575
1579
|
}
|
|
1576
1580
|
};
|
|
1581
|
+
const handleContentClick = (e) => {
|
|
1582
|
+
if (!closeOnBackdropClick) return;
|
|
1583
|
+
const target = e.target;
|
|
1584
|
+
const currentTarget = e.currentTarget;
|
|
1585
|
+
if (target === currentTarget) {
|
|
1586
|
+
onClose();
|
|
1587
|
+
return;
|
|
1588
|
+
}
|
|
1589
|
+
const isImg = target.tagName === "IMG" || target.closest("img");
|
|
1590
|
+
const isButton = target.tagName === "BUTTON" || target.closest("button");
|
|
1591
|
+
if (!isImg && !isButton) {
|
|
1592
|
+
onClose();
|
|
1593
|
+
}
|
|
1594
|
+
};
|
|
1577
1595
|
const onImageClick = (e) => {
|
|
1578
1596
|
var _a, _b;
|
|
1579
1597
|
if (triggers.type === "click" && triggers.switch === "image") {
|
|
@@ -1620,6 +1638,19 @@ const Lightbox = ({ isOpen, onClose, content, settings, closeOnBackdropClick = t
|
|
|
1620
1638
|
useEffect(() => {
|
|
1621
1639
|
if (isOpen) setCurrentIndex(0);
|
|
1622
1640
|
}, [isOpen]);
|
|
1641
|
+
useEffect(() => {
|
|
1642
|
+
if (!isOpen) return;
|
|
1643
|
+
const originalOverflow = document.body.style.overflow;
|
|
1644
|
+
document.body.style.overflow = "hidden";
|
|
1645
|
+
document.body.style.backgroundColor = area.color;
|
|
1646
|
+
const preventScroll = (e) => e.preventDefault();
|
|
1647
|
+
document.addEventListener("touchmove", preventScroll, { passive: false });
|
|
1648
|
+
return () => {
|
|
1649
|
+
document.body.style.overflow = originalOverflow;
|
|
1650
|
+
document.removeEventListener("touchmove", preventScroll);
|
|
1651
|
+
document.body.style.backgroundColor = "";
|
|
1652
|
+
};
|
|
1653
|
+
}, [isOpen]);
|
|
1623
1654
|
useEffect(() => {
|
|
1624
1655
|
if (!isOpen) return;
|
|
1625
1656
|
if (resizeObserverRef.current) {
|
|
@@ -1668,17 +1699,28 @@ const Lightbox = ({ isOpen, onClose, content, settings, closeOnBackdropClick = t
|
|
|
1668
1699
|
(_a = lightboxRef.current) == null ? void 0 : _a.go(dir);
|
|
1669
1700
|
};
|
|
1670
1701
|
const appearDurationMs = appear.duration ? parseInt(appear.duration) : 300;
|
|
1702
|
+
const backdropDurationMs = appear.type === "fade in" || appear.type === "mix" ? Math.floor(appearDurationMs * 0.7) : appearDurationMs;
|
|
1671
1703
|
const appearClass = (() => {
|
|
1672
1704
|
if (appear.type === "fade in") return styles.fadeIn;
|
|
1673
|
-
if (appear.type === "slide in") {
|
|
1674
|
-
|
|
1705
|
+
if (appear.type === "slide in" || appear.type === "mix") {
|
|
1706
|
+
switch (appear.direction) {
|
|
1707
|
+
case "left":
|
|
1708
|
+
return styles.slideInLeft;
|
|
1709
|
+
case "right":
|
|
1710
|
+
return styles.slideInRight;
|
|
1711
|
+
case "top":
|
|
1712
|
+
return styles.slideInTop;
|
|
1713
|
+
case "bottom":
|
|
1714
|
+
return styles.slideInBottom;
|
|
1715
|
+
default:
|
|
1716
|
+
return styles.slideInRight;
|
|
1717
|
+
}
|
|
1675
1718
|
}
|
|
1676
|
-
if (appear.type === "mix") return styles.fadeIn;
|
|
1677
1719
|
return styles.fadeIn;
|
|
1678
1720
|
})();
|
|
1679
1721
|
const backdropAppearClass = (() => {
|
|
1680
|
-
if (appear.type === "fade in") return styles.fadeIn;
|
|
1681
|
-
if (appear.type === "slide in"
|
|
1722
|
+
if (appear.type === "fade in" || appear.type === "mix") return styles.fadeIn;
|
|
1723
|
+
if (appear.type === "slide in") {
|
|
1682
1724
|
switch (appear.direction) {
|
|
1683
1725
|
case "left":
|
|
1684
1726
|
return styles.slideInLeft;
|
|
@@ -1696,228 +1738,242 @@ const Lightbox = ({ isOpen, onClose, content, settings, closeOnBackdropClick = t
|
|
|
1696
1738
|
})();
|
|
1697
1739
|
if (!isOpen) return null;
|
|
1698
1740
|
return createPortal(
|
|
1699
|
-
/* @__PURE__ */
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
options: {
|
|
1727
|
-
arrows: false,
|
|
1728
|
-
speed: triggers.duration ? parseInt(triggers.duration) : 500,
|
|
1729
|
-
direction: slider.direction === "horiz" || slider.type === "fade" || slider.type === "scale" ? "ltr" : "ttb",
|
|
1730
|
-
pagination: false,
|
|
1731
|
-
drag: triggers.type === "drag",
|
|
1732
|
-
perPage: 1,
|
|
1733
|
-
width: "100%",
|
|
1734
|
-
height: "100%",
|
|
1735
|
-
type: slider.type === "fade" || slider.type === "scale" ? "fade" : "loop",
|
|
1736
|
-
padding: 0,
|
|
1737
|
-
rewind: (slider.type === "scale" || slider.type === "fade") && appear.repeat !== "close"
|
|
1738
|
-
},
|
|
1739
|
-
style: { "--splide-speed": triggers.duration || "500ms" },
|
|
1740
|
-
children: content.map((item, index) => {
|
|
1741
|
-
const positionStyles = getPositionStyles(layout.position, layout.offset);
|
|
1742
|
-
const imageStyle2 = slider.type === "scale" ? (() => {
|
|
1743
|
-
const { transform, ...restStyles } = positionStyles;
|
|
1744
|
-
return {
|
|
1745
|
-
...restStyles,
|
|
1746
|
-
"--position-transform": transform || "none"
|
|
1747
|
-
};
|
|
1748
|
-
})() : positionStyles;
|
|
1749
|
-
return /* @__PURE__ */ jsx(SplideSlide, { children: /* @__PURE__ */ jsx(
|
|
1750
|
-
"div",
|
|
1751
|
-
{
|
|
1752
|
-
className: styles.imgWrapper,
|
|
1753
|
-
onClick: handleImageWrapperClick,
|
|
1754
|
-
children: /* @__PURE__ */ jsx(
|
|
1755
|
-
"img",
|
|
1756
|
-
{
|
|
1757
|
-
className: cn(styles.imageStyle, {
|
|
1758
|
-
[styles.contain]: item.image.objectFit === "contain",
|
|
1759
|
-
[styles.cover]: item.image.objectFit === "cover",
|
|
1760
|
-
[styles.scaleSlide]: slider.type === "scale"
|
|
1761
|
-
}),
|
|
1762
|
-
src: item.image.url,
|
|
1763
|
-
alt: item.image.name ?? "",
|
|
1764
|
-
onClick: onImageClick,
|
|
1765
|
-
style: imageStyle2
|
|
1766
|
-
}
|
|
1767
|
-
)
|
|
1768
|
-
}
|
|
1769
|
-
) }, index);
|
|
1770
|
-
})
|
|
1771
|
-
}
|
|
1772
|
-
),
|
|
1773
|
-
controls.isActive && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1741
|
+
/* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1742
|
+
/* @__PURE__ */ jsx(
|
|
1743
|
+
"div",
|
|
1744
|
+
{
|
|
1745
|
+
className: cn(styles.background, backdropAppearClass),
|
|
1746
|
+
style: { backgroundColor: area.color, backdropFilter: `blur(${area.blur}px)`, animationDuration: `${backdropDurationMs}ms`, animationTimingFunction: "ease", animationFillMode: "both" }
|
|
1747
|
+
}
|
|
1748
|
+
),
|
|
1749
|
+
/* @__PURE__ */ jsx(
|
|
1750
|
+
"div",
|
|
1751
|
+
{
|
|
1752
|
+
className: cn(styles.backdropStyle, { [styles.editor]: isEditor }),
|
|
1753
|
+
onClick: handleBackdropClick,
|
|
1754
|
+
onTouchEnd: handleBackdropClick,
|
|
1755
|
+
children: /* @__PURE__ */ jsxs(
|
|
1756
|
+
"div",
|
|
1757
|
+
{
|
|
1758
|
+
className: cn(styles.contentStyle, appearClass),
|
|
1759
|
+
onClick: handleContentClick,
|
|
1760
|
+
style: {
|
|
1761
|
+
animationDuration: `${appearDurationMs}ms`,
|
|
1762
|
+
animationTimingFunction: "ease",
|
|
1763
|
+
animationFillMode: "both",
|
|
1764
|
+
...appear.type === "mix" && { animationDelay: `${backdropDurationMs}ms` },
|
|
1765
|
+
"--splide-speed": triggers.duration || "500ms"
|
|
1766
|
+
},
|
|
1767
|
+
children: [
|
|
1774
1768
|
/* @__PURE__ */ jsx(
|
|
1769
|
+
Splide,
|
|
1770
|
+
{
|
|
1771
|
+
onMove: (splide) => {
|
|
1772
|
+
setCurrentIndex(splide.index);
|
|
1773
|
+
},
|
|
1774
|
+
ref: lightboxRef,
|
|
1775
|
+
className: styles.lightboxSplide,
|
|
1776
|
+
options: {
|
|
1777
|
+
arrows: false,
|
|
1778
|
+
speed: triggers.duration ? parseInt(triggers.duration) : 500,
|
|
1779
|
+
direction: slider.direction === "horiz" || slider.type === "fade" || slider.type === "scale" ? "ltr" : "ttb",
|
|
1780
|
+
pagination: false,
|
|
1781
|
+
drag: triggers.type === "drag",
|
|
1782
|
+
perPage: 1,
|
|
1783
|
+
width: "100%",
|
|
1784
|
+
height: "100%",
|
|
1785
|
+
type: slider.type === "fade" || slider.type === "scale" ? "fade" : "loop",
|
|
1786
|
+
padding: 0,
|
|
1787
|
+
rewind: (slider.type === "scale" || slider.type === "fade") && appear.repeat !== "close"
|
|
1788
|
+
},
|
|
1789
|
+
style: { "--splide-speed": triggers.duration || "500ms" },
|
|
1790
|
+
children: content.map((item, index) => {
|
|
1791
|
+
const positionStyles = getPositionStyles(layout.position, layout.offset);
|
|
1792
|
+
const imageStyle2 = slider.type === "scale" ? (() => {
|
|
1793
|
+
const { transform, ...restStyles } = positionStyles;
|
|
1794
|
+
return {
|
|
1795
|
+
...restStyles,
|
|
1796
|
+
"--position-transform": transform || "none"
|
|
1797
|
+
};
|
|
1798
|
+
})() : positionStyles;
|
|
1799
|
+
return /* @__PURE__ */ jsx(SplideSlide, { children: /* @__PURE__ */ jsx(
|
|
1800
|
+
"div",
|
|
1801
|
+
{
|
|
1802
|
+
className: styles.imgWrapper,
|
|
1803
|
+
onClick: handleImageWrapperClick,
|
|
1804
|
+
style: {
|
|
1805
|
+
padding: `${layout.padding.top}px ${layout.padding.right}px ${layout.padding.bottom}px ${layout.padding.left}px`
|
|
1806
|
+
},
|
|
1807
|
+
children: /* @__PURE__ */ jsx(
|
|
1808
|
+
"img",
|
|
1809
|
+
{
|
|
1810
|
+
className: cn(styles.imageStyle, {
|
|
1811
|
+
[styles.contain]: item.image.objectFit === "contain",
|
|
1812
|
+
[styles.cover]: item.image.objectFit === "cover",
|
|
1813
|
+
[styles.scaleSlide]: slider.type === "scale"
|
|
1814
|
+
}),
|
|
1815
|
+
src: item.image.url,
|
|
1816
|
+
alt: item.image.name ?? "",
|
|
1817
|
+
onClick: onImageClick,
|
|
1818
|
+
style: imageStyle2
|
|
1819
|
+
}
|
|
1820
|
+
)
|
|
1821
|
+
}
|
|
1822
|
+
) }, index);
|
|
1823
|
+
})
|
|
1824
|
+
}
|
|
1825
|
+
),
|
|
1826
|
+
controls.isActive && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1827
|
+
/* @__PURE__ */ jsx(
|
|
1828
|
+
"div",
|
|
1829
|
+
{
|
|
1830
|
+
className: cn(styles.arrow, { [styles.arrowVertical]: slider.direction === "vert" }),
|
|
1831
|
+
style: { color: controls.color, ["--arrow-hover-color"]: controls.hover },
|
|
1832
|
+
children: /* @__PURE__ */ jsx(
|
|
1833
|
+
"button",
|
|
1834
|
+
{
|
|
1835
|
+
className: styles.arrowInner,
|
|
1836
|
+
style: {
|
|
1837
|
+
transform: `translate(${scalingValue(controls.offset.x)}, ${scalingValue(controls.offset.y * (slider.direction === "horiz" ? 1 : -1))}) scale(${controls.scale}) rotate(${slider.direction === "horiz" ? "0deg" : "90deg"})`
|
|
1838
|
+
},
|
|
1839
|
+
onClick: (e) => {
|
|
1840
|
+
handleArrowClick("-1");
|
|
1841
|
+
},
|
|
1842
|
+
children: controls.arrowsImgUrl && /* @__PURE__ */ jsx(
|
|
1843
|
+
SvgImage,
|
|
1844
|
+
{
|
|
1845
|
+
url: controls.arrowsImgUrl,
|
|
1846
|
+
fill: controls.color,
|
|
1847
|
+
hoverFill: controls.hover,
|
|
1848
|
+
className: cn(styles.arrowImg, styles.mirror)
|
|
1849
|
+
}
|
|
1850
|
+
)
|
|
1851
|
+
}
|
|
1852
|
+
)
|
|
1853
|
+
}
|
|
1854
|
+
),
|
|
1855
|
+
/* @__PURE__ */ jsx(
|
|
1856
|
+
"div",
|
|
1857
|
+
{
|
|
1858
|
+
className: cn(styles.arrow, styles.nextArrow, { [styles.arrowVertical]: slider.direction === "vert" }),
|
|
1859
|
+
style: { color: controls.color, ["--arrow-hover-color"]: controls.hover },
|
|
1860
|
+
children: /* @__PURE__ */ jsx(
|
|
1861
|
+
"button",
|
|
1862
|
+
{
|
|
1863
|
+
className: styles.arrowInner,
|
|
1864
|
+
style: {
|
|
1865
|
+
transform: `translate(${scalingValue(controls.offset.x * (slider.direction === "horiz" ? -1 : 1))}, ${scalingValue(controls.offset.y)}) scale(${controls.scale}) rotate(${slider.direction === "horiz" ? "0deg" : "90deg"})`
|
|
1866
|
+
},
|
|
1867
|
+
onClick: (e) => {
|
|
1868
|
+
handleArrowClick("+1");
|
|
1869
|
+
},
|
|
1870
|
+
"aria-label": "Next",
|
|
1871
|
+
children: controls.arrowsImgUrl && /* @__PURE__ */ jsx(
|
|
1872
|
+
SvgImage,
|
|
1873
|
+
{
|
|
1874
|
+
url: controls.arrowsImgUrl,
|
|
1875
|
+
fill: controls.color,
|
|
1876
|
+
hoverFill: controls.hover,
|
|
1877
|
+
className: styles.arrowImg
|
|
1878
|
+
}
|
|
1879
|
+
)
|
|
1880
|
+
}
|
|
1881
|
+
)
|
|
1882
|
+
}
|
|
1883
|
+
)
|
|
1884
|
+
] }),
|
|
1885
|
+
area.closeIconUrl && (() => {
|
|
1886
|
+
const positionStyles = getPositionStyles(area.closeIconAlign, area.closeIconOffset);
|
|
1887
|
+
const scaleTransform = `scale(${area.closeIconScale})`;
|
|
1888
|
+
const combinedTransform = positionStyles.transform ? `${positionStyles.transform} ${scaleTransform}` : scaleTransform;
|
|
1889
|
+
return /* @__PURE__ */ jsx(
|
|
1890
|
+
"button",
|
|
1891
|
+
{
|
|
1892
|
+
className: styles.closeButton,
|
|
1893
|
+
style: {
|
|
1894
|
+
...positionStyles,
|
|
1895
|
+
transform: combinedTransform
|
|
1896
|
+
},
|
|
1897
|
+
onClick: onClose,
|
|
1898
|
+
children: /* @__PURE__ */ jsx(SvgImage, { url: area.closeIconUrl })
|
|
1899
|
+
}
|
|
1900
|
+
);
|
|
1901
|
+
})(),
|
|
1902
|
+
caption2.isActive && /* @__PURE__ */ jsx(
|
|
1775
1903
|
"div",
|
|
1776
1904
|
{
|
|
1777
|
-
className:
|
|
1778
|
-
style: {
|
|
1779
|
-
|
|
1780
|
-
"
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
style: {
|
|
1784
|
-
transform: `translate(${scalingValue(controls.offset.x)}, ${scalingValue(controls.offset.y * (slider.direction === "horiz" ? 1 : -1))}) scale(${controls.scale}) rotate(${slider.direction === "horiz" ? "0deg" : "90deg"})`
|
|
1785
|
-
},
|
|
1786
|
-
onClick: (e) => {
|
|
1787
|
-
handleArrowClick("-1");
|
|
1788
|
-
},
|
|
1789
|
-
children: controls.arrowsImgUrl && /* @__PURE__ */ jsx(
|
|
1790
|
-
SvgImage,
|
|
1791
|
-
{
|
|
1792
|
-
url: controls.arrowsImgUrl,
|
|
1793
|
-
fill: controls.color,
|
|
1794
|
-
hoverFill: controls.hover,
|
|
1795
|
-
className: cn(styles.arrowImg, styles.mirror)
|
|
1796
|
-
}
|
|
1797
|
-
)
|
|
1798
|
-
}
|
|
1799
|
-
)
|
|
1905
|
+
className: styles.caption,
|
|
1906
|
+
style: {
|
|
1907
|
+
...getPositionStyles(caption2.alignment, caption2.offset),
|
|
1908
|
+
["--link-hover-color"]: caption2.hover
|
|
1909
|
+
},
|
|
1910
|
+
children: /* @__PURE__ */ jsx(RichTextRenderer, { content: content[currentIndex].imageCaption })
|
|
1800
1911
|
}
|
|
1801
1912
|
),
|
|
1802
|
-
/* @__PURE__ */ jsx(
|
|
1913
|
+
thumbnail.isActive && /* @__PURE__ */ jsx(
|
|
1803
1914
|
"div",
|
|
1804
1915
|
{
|
|
1805
|
-
className: cn(
|
|
1806
|
-
|
|
1807
|
-
children: /* @__PURE__ */ jsx(
|
|
1808
|
-
"button",
|
|
1916
|
+
className: cn(
|
|
1917
|
+
styles.thumbsContainer,
|
|
1809
1918
|
{
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
onClick: (e) => {
|
|
1815
|
-
handleArrowClick("+1");
|
|
1816
|
-
},
|
|
1817
|
-
"aria-label": "Next",
|
|
1818
|
-
children: controls.arrowsImgUrl && /* @__PURE__ */ jsx(
|
|
1819
|
-
SvgImage,
|
|
1820
|
-
{
|
|
1821
|
-
url: controls.arrowsImgUrl,
|
|
1822
|
-
fill: controls.color,
|
|
1823
|
-
hoverFill: controls.hover,
|
|
1824
|
-
className: styles.arrowImg
|
|
1825
|
-
}
|
|
1826
|
-
)
|
|
1919
|
+
[styles.thumbsContainerVertical]: slider.direction === "vert",
|
|
1920
|
+
[styles.thumbsAlignStart]: thumbnail.align === "start",
|
|
1921
|
+
[styles.thumbsAlignCenter]: thumbnail.align === "center",
|
|
1922
|
+
[styles.thumbsAlignEnd]: thumbnail.align === "end"
|
|
1827
1923
|
}
|
|
1828
|
-
)
|
|
1829
|
-
}
|
|
1830
|
-
)
|
|
1831
|
-
] }),
|
|
1832
|
-
area.closeIconUrl && (() => {
|
|
1833
|
-
const positionStyles = getPositionStyles(area.closeIconAlign, area.closeIconOffset);
|
|
1834
|
-
const scaleTransform = `scale(${area.closeIconScale})`;
|
|
1835
|
-
const combinedTransform = positionStyles.transform ? `${positionStyles.transform} ${scaleTransform}` : scaleTransform;
|
|
1836
|
-
return /* @__PURE__ */ jsx(
|
|
1837
|
-
"button",
|
|
1838
|
-
{
|
|
1839
|
-
className: styles.closeButton,
|
|
1924
|
+
),
|
|
1840
1925
|
style: {
|
|
1841
|
-
|
|
1842
|
-
|
|
1926
|
+
gap: `${thumbnail.grid.gap}px`,
|
|
1927
|
+
...slider.direction === "horiz" ? { height: `${thumbnail.grid.height}px` } : {},
|
|
1928
|
+
...slider.direction === "vert" ? { width: `${thumbnail.grid.width}px` } : {},
|
|
1929
|
+
...getPositionStyles(thumbnail.position, thumbnail.offset)
|
|
1843
1930
|
},
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
...getPositionStyles(thumbnail.position, thumbnail.offset)
|
|
1877
|
-
},
|
|
1878
|
-
children: content.map((item, index) => {
|
|
1879
|
-
const isActive = index === currentIndex;
|
|
1880
|
-
return /* @__PURE__ */ jsx(
|
|
1881
|
-
"button",
|
|
1882
|
-
{
|
|
1883
|
-
className: styles.thumbItem,
|
|
1884
|
-
style: {
|
|
1885
|
-
transform: `scale(${isActive ? thumbnail.activeState.scale : 1})`,
|
|
1886
|
-
...slider.direction === "horiz" ? { height: "100%" } : {},
|
|
1887
|
-
...slider.direction === "vert" ? { width: "100%" } : {},
|
|
1888
|
-
opacity: isActive ? thumbnail.activeState.opacity : thumbnail.opacity,
|
|
1889
|
-
["--thumb-hover"]: thumbnail.activeState.opacity
|
|
1890
|
-
},
|
|
1891
|
-
onClick: (e) => {
|
|
1892
|
-
var _a;
|
|
1893
|
-
e.stopPropagation();
|
|
1894
|
-
setCurrentIndex(index);
|
|
1895
|
-
(_a = lightboxRef.current) == null ? void 0 : _a.go(index);
|
|
1896
|
-
},
|
|
1897
|
-
children: /* @__PURE__ */ jsx(
|
|
1898
|
-
"img",
|
|
1899
|
-
{
|
|
1900
|
-
src: item.image.url,
|
|
1901
|
-
alt: item.image.name ?? "",
|
|
1902
|
-
className: styles.thumbImage,
|
|
1903
|
-
style: {
|
|
1904
|
-
objectFit: thumbnail.fit === "cover" ? "cover" : "contain",
|
|
1905
|
-
...slider.direction === "horiz" ? { height: "100%" } : {},
|
|
1906
|
-
...slider.direction === "vert" ? { width: "100%" } : {}
|
|
1931
|
+
children: content.map((item, index) => {
|
|
1932
|
+
const isActive = index === currentIndex;
|
|
1933
|
+
return /* @__PURE__ */ jsx(
|
|
1934
|
+
"button",
|
|
1935
|
+
{
|
|
1936
|
+
className: styles.thumbItem,
|
|
1937
|
+
style: {
|
|
1938
|
+
transform: `scale(${isActive ? thumbnail.activeState.scale : 1})`,
|
|
1939
|
+
...slider.direction === "horiz" ? { height: "100%" } : {},
|
|
1940
|
+
...slider.direction === "vert" ? { width: "100%" } : {},
|
|
1941
|
+
opacity: isActive ? thumbnail.activeState.opacity : thumbnail.opacity,
|
|
1942
|
+
["--thumb-hover"]: thumbnail.activeState.opacity
|
|
1943
|
+
},
|
|
1944
|
+
onClick: (e) => {
|
|
1945
|
+
var _a;
|
|
1946
|
+
e.stopPropagation();
|
|
1947
|
+
setCurrentIndex(index);
|
|
1948
|
+
(_a = lightboxRef.current) == null ? void 0 : _a.go(index);
|
|
1949
|
+
},
|
|
1950
|
+
children: /* @__PURE__ */ jsx(
|
|
1951
|
+
"img",
|
|
1952
|
+
{
|
|
1953
|
+
src: item.image.url,
|
|
1954
|
+
alt: item.image.name ?? "",
|
|
1955
|
+
className: styles.thumbImage,
|
|
1956
|
+
style: {
|
|
1957
|
+
objectFit: thumbnail.fit === "cover" ? "cover" : "contain",
|
|
1958
|
+
...thumbnail.fit === "fit" && slider.direction === "horiz" ? { width: "fit-content" } : {},
|
|
1959
|
+
...thumbnail.fit === "fit" && slider.direction === "vert" ? { height: "fit-content" } : {},
|
|
1960
|
+
...slider.direction === "horiz" ? { height: "100%" } : {},
|
|
1961
|
+
...slider.direction === "vert" ? { width: "100%" } : {}
|
|
1962
|
+
}
|
|
1907
1963
|
}
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
)
|
|
1913
|
-
}
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
),
|
|
1964
|
+
)
|
|
1965
|
+
},
|
|
1966
|
+
`${item.image.url}-${index}`
|
|
1967
|
+
);
|
|
1968
|
+
})
|
|
1969
|
+
}
|
|
1970
|
+
)
|
|
1971
|
+
]
|
|
1972
|
+
}
|
|
1973
|
+
)
|
|
1974
|
+
}
|
|
1975
|
+
)
|
|
1976
|
+
] }),
|
|
1921
1977
|
document.getElementById(portalId)
|
|
1922
1978
|
);
|
|
1923
1979
|
};
|
|
@@ -2116,7 +2172,8 @@ const LightboxComponent = {
|
|
|
2116
2172
|
type: "number",
|
|
2117
2173
|
label: "H",
|
|
2118
2174
|
display: {
|
|
2119
|
-
type: "numeric-input"
|
|
2175
|
+
type: "numeric-input",
|
|
2176
|
+
visible: true
|
|
2120
2177
|
}
|
|
2121
2178
|
},
|
|
2122
2179
|
width: {
|
|
@@ -2496,7 +2553,7 @@ const LightboxComponent = {
|
|
|
2496
2553
|
value: "vert"
|
|
2497
2554
|
},
|
|
2498
2555
|
then: {
|
|
2499
|
-
name: "properties.lightboxBlock.properties.thumbnail.properties.
|
|
2556
|
+
name: "properties.lightboxBlock.properties.thumbnail.properties.align.display.direction",
|
|
2500
2557
|
value: "vertical"
|
|
2501
2558
|
}
|
|
2502
2559
|
},
|