@cntrl-site/components 0.1.0-alpha.30 → 0.1.0-alpha.32
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 +1 -1
- package/dist/Components/utils/getColorAlpha.d.ts +1 -0
- package/dist/components.css +1 -1
- package/dist/index.js +118 -67
- package/dist/index.mjs +118 -67
- package/package.json +1 -1
|
@@ -7,7 +7,7 @@ type LightboxGalleryProps = {
|
|
|
7
7
|
activeEvent: 'close' | 'open';
|
|
8
8
|
isEditor?: boolean;
|
|
9
9
|
};
|
|
10
|
-
export declare
|
|
10
|
+
export declare const LightboxGallery: ({ settings, content, styles, portalId, activeEvent, isEditor }: LightboxGalleryProps) => JSX.Element;
|
|
11
11
|
type LightboxImage = {
|
|
12
12
|
image: {
|
|
13
13
|
url: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getColorAlpha(color: string): number;
|
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__background___wf1Ii{position:absolute;z-index:9997;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:9998}.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;max-width:100%;max-height:100%;width:auto;height:auto}.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}.Lightbox-module__caption___3e-22{z-index:9999;position:absolute;display:flex}.Lightbox-module__captionBlock___7wXOq{pointer-events:none;position:absolute;top:0;z-index:1;left:0;right:0;bottom:0}.Lightbox-module__captionTextWrapper___uDnh6{position:relative;width:100%;height:100%}.Lightbox-module__captionText___6zbmg{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}.Lightbox-module__captionText___6zbmg.Lightbox-module__active___u7Yu8{opacity:1}.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:fixed;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__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__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}@keyframes Lightbox-module__lbFadeOut___0pD7Q{0%{opacity:1}to{opacity:0}}.Lightbox-module__fadeOut___h2fpQ{animation-name:Lightbox-module__lbFadeOut___0pD7Q!important}@keyframes Lightbox-module__lbSlideOutLeft___Z6pdg{0%{transform:translate(0)}to{transform:translate(-100%)}}@keyframes Lightbox-module__lbSlideOutRight___B5cYY{0%{transform:translate(0)}to{transform:translate(100%)}}@keyframes Lightbox-module__lbSlideOutTop___uZ10i{0%{transform:translateY(0)}to{transform:translateY(-100%)}}@keyframes Lightbox-module__lbSlideOutBottom___GyYfC{0%{transform:translateY(0)}to{transform:translateY(100%)}}.Lightbox-module__slideOutLeft___J-eMU{animation-name:Lightbox-module__lbSlideOutLeft___Z6pdg!important}.Lightbox-module__slideOutRight___iZUQz{animation-name:Lightbox-module__lbSlideOutRight___B5cYY!important}.Lightbox-module__slideOutTop___3TXF9{animation-name:Lightbox-module__lbSlideOutTop___uZ10i!important}.Lightbox-module__slideOutBottom___SB5ws{animation-name:Lightbox-module__lbSlideOutBottom___GyYfC!important}.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:9997;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:9998}.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;max-width:100%;max-height:100%;width:auto;height:auto}.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}.Lightbox-module__caption___3e-22{z-index:9999;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:fixed;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__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__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}@keyframes Lightbox-module__lbFadeOut___0pD7Q{0%{opacity:1}to{opacity:0}}.Lightbox-module__fadeOut___h2fpQ{animation-name:Lightbox-module__lbFadeOut___0pD7Q!important}@keyframes Lightbox-module__lbSlideOutLeft___Z6pdg{0%{transform:translate(0)}to{transform:translate(-100%)}}@keyframes Lightbox-module__lbSlideOutRight___B5cYY{0%{transform:translate(0)}to{transform:translate(100%)}}@keyframes Lightbox-module__lbSlideOutTop___uZ10i{0%{transform:translateY(0)}to{transform:translateY(-100%)}}@keyframes Lightbox-module__lbSlideOutBottom___GyYfC{0%{transform:translateY(0)}to{transform:translateY(100%)}}.Lightbox-module__slideOutLeft___J-eMU{animation-name:Lightbox-module__lbSlideOutLeft___Z6pdg!important}.Lightbox-module__slideOutRight___iZUQz{animation-name:Lightbox-module__lbSlideOutRight___B5cYY!important}.Lightbox-module__slideOutTop___3TXF9{animation-name:Lightbox-module__lbSlideOutTop___uZ10i!important}.Lightbox-module__slideOutBottom___SB5ws{animation-name:Lightbox-module__lbSlideOutBottom___GyYfC!important}.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
|
@@ -740,7 +740,7 @@ const ControlSliderComponent = {
|
|
|
740
740
|
}
|
|
741
741
|
},
|
|
742
742
|
hover: {
|
|
743
|
-
title: "
|
|
743
|
+
title: "Link Hover",
|
|
744
744
|
type: "string",
|
|
745
745
|
display: {
|
|
746
746
|
type: "settings-color-picker",
|
|
@@ -1246,7 +1246,7 @@ const ControlImageRevealSliderComponent = {
|
|
|
1246
1246
|
display: {
|
|
1247
1247
|
type: "ratio-group"
|
|
1248
1248
|
},
|
|
1249
|
-
enum: ["as
|
|
1249
|
+
enum: ["as Is", "custom", "random"]
|
|
1250
1250
|
},
|
|
1251
1251
|
imageWidth: {
|
|
1252
1252
|
type: "number",
|
|
@@ -1610,7 +1610,26 @@ function getDisplayedImageRect(img2) {
|
|
|
1610
1610
|
height: renderedH
|
|
1611
1611
|
};
|
|
1612
1612
|
}
|
|
1613
|
-
function
|
|
1613
|
+
function getColorAlpha(color) {
|
|
1614
|
+
const rgbaMatch = color.match(/rgba?\(([^)]+)\)/);
|
|
1615
|
+
if (rgbaMatch) {
|
|
1616
|
+
const values = rgbaMatch[1].split(",").map((v) => parseFloat(v.trim()));
|
|
1617
|
+
if (values.length === 4) {
|
|
1618
|
+
return values[3];
|
|
1619
|
+
}
|
|
1620
|
+
return 1;
|
|
1621
|
+
}
|
|
1622
|
+
const hexMatch = color.match(/^#([0-9a-fA-F]{8})$/);
|
|
1623
|
+
if (hexMatch) {
|
|
1624
|
+
const alphaHex = hexMatch[1].substring(6, 8);
|
|
1625
|
+
return parseInt(alphaHex, 16) / 255;
|
|
1626
|
+
}
|
|
1627
|
+
if (color.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/)) {
|
|
1628
|
+
return 1;
|
|
1629
|
+
}
|
|
1630
|
+
return 1;
|
|
1631
|
+
}
|
|
1632
|
+
const LightboxGallery = ({ settings, content, styles: styles2, portalId, activeEvent, isEditor }) => {
|
|
1614
1633
|
const [open, setOpen] = React.useState(false);
|
|
1615
1634
|
const { url } = settings.thumbnailBlock.cover;
|
|
1616
1635
|
React.useEffect(() => {
|
|
@@ -1627,15 +1646,30 @@ function LightboxGallery({ settings, content, styles: styles2, portalId, activeE
|
|
|
1627
1646
|
{
|
|
1628
1647
|
src: url,
|
|
1629
1648
|
alt: "Cover",
|
|
1630
|
-
style: {
|
|
1649
|
+
style: {
|
|
1650
|
+
width: "100%",
|
|
1651
|
+
height: "100%",
|
|
1652
|
+
cursor: "pointer",
|
|
1653
|
+
objectFit: "cover"
|
|
1654
|
+
},
|
|
1631
1655
|
onClick: () => setOpen(true)
|
|
1632
1656
|
}
|
|
1633
1657
|
),
|
|
1634
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1658
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1659
|
+
Lightbox,
|
|
1660
|
+
{
|
|
1661
|
+
isOpen: open,
|
|
1662
|
+
onClose: () => setOpen(false),
|
|
1663
|
+
content,
|
|
1664
|
+
settings,
|
|
1665
|
+
lightboxStyles: styles2,
|
|
1666
|
+
portalId,
|
|
1667
|
+
isEditor
|
|
1668
|
+
}
|
|
1669
|
+
)
|
|
1635
1670
|
] });
|
|
1636
|
-
}
|
|
1637
|
-
const Lightbox = ({ isOpen, onClose, content,
|
|
1638
|
-
const { widthSettings, fontSettings, letterSpacing, textAlign, wordSpacing, fontSizeLineHeight, textAppearance, color } = lightboxStyles.caption;
|
|
1671
|
+
};
|
|
1672
|
+
const Lightbox = ({ isOpen, onClose, content, lightboxStyles, settings, portalId, isEditor }) => {
|
|
1639
1673
|
const [currentIndex, setCurrentIndex] = React.useState(0);
|
|
1640
1674
|
const [splideKey, setSplideKey] = React.useState(0);
|
|
1641
1675
|
const [isClosing, setIsClosing] = React.useState(false);
|
|
@@ -1647,17 +1681,16 @@ const Lightbox = ({ isOpen, onClose, content, styles: lightboxStyles, settings,
|
|
|
1647
1681
|
const animationEndHandlerRef = React.useRef(null);
|
|
1648
1682
|
const appearAnimationEndHandlerRef = React.useRef(null);
|
|
1649
1683
|
const { appear, triggers, slider, thumbnail, controls, area, caption: caption2, layout } = settings.lightboxBlock;
|
|
1684
|
+
const { widthSettings, fontSettings, letterSpacing, textAlign, wordSpacing, fontSizeLineHeight, textAppearance, color } = lightboxStyles.caption;
|
|
1650
1685
|
const appearDurationMs = appear.duration ? parseInt(appear.duration) : 300;
|
|
1651
1686
|
React.useEffect(() => {
|
|
1652
|
-
|
|
1687
|
+
const handleLayoutChange = () => {
|
|
1653
1688
|
var _a, _b;
|
|
1654
1689
|
(_b = (_a = lightboxRef.current) == null ? void 0 : _a.splide) == null ? void 0 : _b.refresh();
|
|
1655
|
-
}
|
|
1690
|
+
};
|
|
1691
|
+
window.addEventListener("ArticleEditor.Layout:change", handleLayoutChange);
|
|
1656
1692
|
return () => {
|
|
1657
|
-
window.removeEventListener("ArticleEditor.Layout:change",
|
|
1658
|
-
var _a, _b;
|
|
1659
|
-
(_b = (_a = lightboxRef.current) == null ? void 0 : _a.splide) == null ? void 0 : _b.refresh();
|
|
1660
|
-
});
|
|
1693
|
+
window.removeEventListener("ArticleEditor.Layout:change", handleLayoutChange);
|
|
1661
1694
|
};
|
|
1662
1695
|
}, []);
|
|
1663
1696
|
const handleClose = React.useCallback(() => {
|
|
@@ -1690,13 +1723,8 @@ const Lightbox = ({ isOpen, onClose, content, styles: lightboxStyles, settings,
|
|
|
1690
1723
|
};
|
|
1691
1724
|
const handleImageWrapperClick = (e) => {
|
|
1692
1725
|
var _a, _b;
|
|
1693
|
-
const
|
|
1694
|
-
|
|
1695
|
-
if (e.target === e.currentTarget) {
|
|
1696
|
-
handleClose();
|
|
1697
|
-
}
|
|
1698
|
-
return;
|
|
1699
|
-
}
|
|
1726
|
+
const currentImage = content[currentIndex];
|
|
1727
|
+
const isCover = (currentImage == null ? void 0 : currentImage.image.objectFit) === "cover";
|
|
1700
1728
|
let clientX;
|
|
1701
1729
|
let clientY;
|
|
1702
1730
|
if ("changedTouches" in e && e.changedTouches.length > 0) {
|
|
@@ -1708,7 +1736,20 @@ const Lightbox = ({ isOpen, onClose, content, styles: lightboxStyles, settings,
|
|
|
1708
1736
|
} else {
|
|
1709
1737
|
return;
|
|
1710
1738
|
}
|
|
1711
|
-
|
|
1739
|
+
let inside;
|
|
1740
|
+
if (isCover && imageRef.current) {
|
|
1741
|
+
const imgRect = imageRef.current.getBoundingClientRect();
|
|
1742
|
+
inside = clientX >= imgRect.left && clientX <= imgRect.right && clientY >= imgRect.top && clientY <= imgRect.bottom;
|
|
1743
|
+
} else {
|
|
1744
|
+
const rect = imageRef.current ? getDisplayedImageRect(imageRef.current) : null;
|
|
1745
|
+
if (!rect) {
|
|
1746
|
+
if (e.target === e.currentTarget) {
|
|
1747
|
+
handleClose();
|
|
1748
|
+
}
|
|
1749
|
+
return;
|
|
1750
|
+
}
|
|
1751
|
+
inside = clientX >= rect.x && clientX <= rect.x + rect.width && clientY >= rect.y && clientY <= rect.y + rect.height;
|
|
1752
|
+
}
|
|
1712
1753
|
if (inside) {
|
|
1713
1754
|
if (triggers.type === "click" && triggers.switch === "image") {
|
|
1714
1755
|
if (triggers.repeat === "close" && currentIndex === content.length - 1) {
|
|
@@ -1753,6 +1794,32 @@ const Lightbox = ({ isOpen, onClose, content, styles: lightboxStyles, settings,
|
|
|
1753
1794
|
handleClose();
|
|
1754
1795
|
}
|
|
1755
1796
|
};
|
|
1797
|
+
const onImageClick = (e) => {
|
|
1798
|
+
var _a, _b;
|
|
1799
|
+
e.stopPropagation();
|
|
1800
|
+
if (triggers.type === "click" && triggers.switch === "image") {
|
|
1801
|
+
if (triggers.repeat === "close" && currentIndex === content.length - 1) {
|
|
1802
|
+
handleClose();
|
|
1803
|
+
} else {
|
|
1804
|
+
(_a = lightboxRef.current) == null ? void 0 : _a.go("+1");
|
|
1805
|
+
}
|
|
1806
|
+
}
|
|
1807
|
+
if (triggers.type === "click" && triggers.switch === "50/50") {
|
|
1808
|
+
const img2 = e.currentTarget;
|
|
1809
|
+
const rect = img2.getBoundingClientRect();
|
|
1810
|
+
const clickX = e.clientX - rect.left;
|
|
1811
|
+
const clickY = e.clientY - rect.top;
|
|
1812
|
+
const imgWidth = rect.width;
|
|
1813
|
+
const imgHeight = rect.height;
|
|
1814
|
+
let dir;
|
|
1815
|
+
if (slider.direction === "horiz") {
|
|
1816
|
+
dir = clickX < imgWidth / 2 ? "-1" : "+1";
|
|
1817
|
+
} else {
|
|
1818
|
+
dir = clickY < imgHeight / 2 ? "-1" : "+1";
|
|
1819
|
+
}
|
|
1820
|
+
(_b = lightboxRef.current) == null ? void 0 : _b.go(dir);
|
|
1821
|
+
}
|
|
1822
|
+
};
|
|
1756
1823
|
React.useEffect(() => {
|
|
1757
1824
|
if (!isOpen) return;
|
|
1758
1825
|
const onKeyDown = (event) => {
|
|
@@ -1909,11 +1976,18 @@ const Lightbox = ({ isOpen, onClose, content, styles: lightboxStyles, settings,
|
|
|
1909
1976
|
return;
|
|
1910
1977
|
}
|
|
1911
1978
|
if (e.touches.length === 0 && e.changedTouches.length > 0) {
|
|
1912
|
-
const
|
|
1913
|
-
|
|
1914
|
-
if (!rect) return;
|
|
1979
|
+
const currentImage = content[currentIndex];
|
|
1980
|
+
const isCover = (currentImage == null ? void 0 : currentImage.image.objectFit) === "cover";
|
|
1915
1981
|
const touch = e.changedTouches[0];
|
|
1916
|
-
|
|
1982
|
+
let inside;
|
|
1983
|
+
if (isCover && imageRef.current) {
|
|
1984
|
+
const imgRect = imageRef.current.getBoundingClientRect();
|
|
1985
|
+
inside = touch.clientX >= imgRect.left && touch.clientX <= imgRect.right && touch.clientY >= imgRect.top && touch.clientY <= imgRect.bottom;
|
|
1986
|
+
} else {
|
|
1987
|
+
const rect = imageRef.current ? getDisplayedImageRect(imageRef.current) : null;
|
|
1988
|
+
if (!rect) return;
|
|
1989
|
+
inside = touch.clientX >= rect.x && touch.clientX <= rect.x + rect.width && touch.clientY >= rect.y && touch.clientY <= rect.y + rect.height;
|
|
1990
|
+
}
|
|
1917
1991
|
if (!inside) {
|
|
1918
1992
|
e.stopPropagation();
|
|
1919
1993
|
isClosingRef.current = true;
|
|
@@ -1931,7 +2005,7 @@ const Lightbox = ({ isOpen, onClose, content, styles: lightboxStyles, settings,
|
|
|
1931
2005
|
return () => {
|
|
1932
2006
|
document.removeEventListener("touchend", handleTouchEnd);
|
|
1933
2007
|
};
|
|
1934
|
-
}, [isOpen, handleClose, currentIndex]);
|
|
2008
|
+
}, [isOpen, handleClose, currentIndex, content]);
|
|
1935
2009
|
if (!isOpen && !isClosing) return null;
|
|
1936
2010
|
return reactDom.createPortal(
|
|
1937
2011
|
/* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -1952,7 +2026,10 @@ const Lightbox = ({ isOpen, onClose, content, styles: lightboxStyles, settings,
|
|
|
1952
2026
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1953
2027
|
"div",
|
|
1954
2028
|
{
|
|
1955
|
-
className: cn(styles.backdropStyle, {
|
|
2029
|
+
className: cn(styles.backdropStyle, {
|
|
2030
|
+
[styles.editor]: isEditor,
|
|
2031
|
+
[isClosing ? backdropDisappearClass : backdropAppearClass]: isEditor
|
|
2032
|
+
}),
|
|
1956
2033
|
style: { ...isEditor && {
|
|
1957
2034
|
backgroundColor: area.color,
|
|
1958
2035
|
backdropFilter: `blur(${area.blur}px)`,
|
|
@@ -2023,6 +2100,7 @@ const Lightbox = ({ isOpen, onClose, content, styles: lightboxStyles, settings,
|
|
|
2023
2100
|
[styles.cover]: item.image.objectFit === "cover",
|
|
2024
2101
|
[styles.scaleSlide]: slider.type === "scale"
|
|
2025
2102
|
}),
|
|
2103
|
+
onClick: item.image.objectFit !== "contain" ? onImageClick : void 0,
|
|
2026
2104
|
src: item.image.url,
|
|
2027
2105
|
alt: item.image.name ?? "",
|
|
2028
2106
|
style: {
|
|
@@ -2049,12 +2127,11 @@ const Lightbox = ({ isOpen, onClose, content, styles: lightboxStyles, settings,
|
|
|
2049
2127
|
"button",
|
|
2050
2128
|
{
|
|
2051
2129
|
className: styles.arrowInner,
|
|
2052
|
-
style: {
|
|
2053
|
-
transform: `translate(${scalingValue(controls.offset.x, isEditor)}, ${scalingValue(controls.offset.y * (slider.direction === "horiz" ? 1 : -1), isEditor)}) scale(${controls.scale}) rotate(${slider.direction === "horiz" ? "0deg" : "90deg"})`
|
|
2054
|
-
},
|
|
2130
|
+
style: { transform: `translate(${scalingValue(controls.offset.x, isEditor)}, ${scalingValue(controls.offset.y * (slider.direction === "horiz" ? 1 : -1), isEditor)}) scale(${controls.scale}) rotate(${slider.direction === "horiz" ? "0deg" : "90deg"})` },
|
|
2055
2131
|
onClick: (e) => {
|
|
2056
2132
|
handleArrowClick("-1");
|
|
2057
2133
|
},
|
|
2134
|
+
"aria-label": "Previous",
|
|
2058
2135
|
children: controls.arrowsImgUrl && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2059
2136
|
SvgImage,
|
|
2060
2137
|
{
|
|
@@ -2077,9 +2154,7 @@ const Lightbox = ({ isOpen, onClose, content, styles: lightboxStyles, settings,
|
|
|
2077
2154
|
"button",
|
|
2078
2155
|
{
|
|
2079
2156
|
className: styles.arrowInner,
|
|
2080
|
-
style: {
|
|
2081
|
-
transform: `translate(${scalingValue(controls.offset.x * (slider.direction === "horiz" ? -1 : 1), isEditor)}, ${scalingValue(controls.offset.y, isEditor)}) scale(${controls.scale}) rotate(${slider.direction === "horiz" ? "0deg" : "90deg"})`
|
|
2082
|
-
},
|
|
2157
|
+
style: { transform: `translate(${scalingValue(controls.offset.x * (slider.direction === "horiz" ? -1 : 1), isEditor)}, ${scalingValue(controls.offset.y, isEditor)}) scale(${controls.scale}) rotate(${slider.direction === "horiz" ? "0deg" : "90deg"})` },
|
|
2083
2158
|
onClick: (e) => {
|
|
2084
2159
|
handleArrowClick("+1");
|
|
2085
2160
|
},
|
|
@@ -2106,11 +2181,9 @@ const Lightbox = ({ isOpen, onClose, content, styles: lightboxStyles, settings,
|
|
|
2106
2181
|
"button",
|
|
2107
2182
|
{
|
|
2108
2183
|
className: styles.closeButton,
|
|
2109
|
-
style: {
|
|
2110
|
-
...positionStyles,
|
|
2111
|
-
transform: combinedTransform
|
|
2112
|
-
},
|
|
2184
|
+
style: { ...positionStyles, transform: combinedTransform },
|
|
2113
2185
|
onClick: handleClose,
|
|
2186
|
+
"aria-label": "Close lightbox",
|
|
2114
2187
|
children: /* @__PURE__ */ jsxRuntime.jsx(SvgImage, { url: area.closeIconUrl })
|
|
2115
2188
|
}
|
|
2116
2189
|
);
|
|
@@ -2134,7 +2207,7 @@ const Lightbox = ({ isOpen, onClose, content, styles: lightboxStyles, settings,
|
|
|
2134
2207
|
textDecoration: textAppearance.textDecoration ?? "none",
|
|
2135
2208
|
fontVariant: textAppearance.fontVariant ?? "normal",
|
|
2136
2209
|
color,
|
|
2137
|
-
transitionDuration:
|
|
2210
|
+
transitionDuration: `${Math.round(parseInt(slider.duration) / 2)}ms`
|
|
2138
2211
|
},
|
|
2139
2212
|
onClick: (e) => e.stopPropagation(),
|
|
2140
2213
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2163,10 +2236,7 @@ const Lightbox = ({ isOpen, onClose, content, styles: lightboxStyles, settings,
|
|
|
2163
2236
|
[styles.thumbsAlignEnd]: thumbnail.align === "end"
|
|
2164
2237
|
}
|
|
2165
2238
|
),
|
|
2166
|
-
style: {
|
|
2167
|
-
gap: `${scalingValue(thumbnail.grid.gap, isEditor)}`,
|
|
2168
|
-
...getPositionStyles(thumbnail.position, thumbnail.offset, isEditor)
|
|
2169
|
-
},
|
|
2239
|
+
style: { gap: scalingValue(thumbnail.grid.gap, isEditor), ...getPositionStyles(thumbnail.position, thumbnail.offset, isEditor) },
|
|
2170
2240
|
children: content.map((item, index) => {
|
|
2171
2241
|
const isActive = index === currentIndex;
|
|
2172
2242
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2174,10 +2244,10 @@ const Lightbox = ({ isOpen, onClose, content, styles: lightboxStyles, settings,
|
|
|
2174
2244
|
{
|
|
2175
2245
|
className: styles.thumbItem,
|
|
2176
2246
|
style: {
|
|
2177
|
-
...slider.direction === "horiz" ? { height: isActive ?
|
|
2178
|
-
...slider.direction === "vert" ? { width: isActive ?
|
|
2179
|
-
...thumbnail.fit === "cover" && slider.direction === "horiz" ? { width: isActive ?
|
|
2180
|
-
...thumbnail.fit === "cover" && slider.direction === "vert" ? { height: isActive ?
|
|
2247
|
+
...slider.direction === "horiz" ? { height: isActive ? scalingValue(thumbnail.grid.height * (isActive ? thumbnail.activeState.scale : 1), isEditor) : scalingValue(thumbnail.grid.height, isEditor) } : {},
|
|
2248
|
+
...slider.direction === "vert" ? { width: isActive ? scalingValue(thumbnail.grid.width * (isActive ? thumbnail.activeState.scale : 1), isEditor) : scalingValue(thumbnail.grid.width, isEditor) } : {},
|
|
2249
|
+
...thumbnail.fit === "cover" && slider.direction === "horiz" ? { width: isActive ? scalingValue(thumbnail.grid.width * (isActive ? thumbnail.activeState.scale : 1), isEditor) : scalingValue(thumbnail.grid.width, isEditor) } : {},
|
|
2250
|
+
...thumbnail.fit === "cover" && slider.direction === "vert" ? { height: isActive ? scalingValue(thumbnail.grid.height * (isActive ? thumbnail.activeState.scale : 1), isEditor) : scalingValue(thumbnail.grid.height, isEditor) } : {},
|
|
2181
2251
|
transition: isActive ? "all 0.2s ease" : "none",
|
|
2182
2252
|
opacity: isActive ? thumbnail.activeState.opacity / 100 : thumbnail.opacity / 100,
|
|
2183
2253
|
["--thumb-hover"]: thumbnail.activeState.opacity / 100
|
|
@@ -2221,25 +2291,6 @@ const Lightbox = ({ isOpen, onClose, content, styles: lightboxStyles, settings,
|
|
|
2221
2291
|
document.getElementById(portalId)
|
|
2222
2292
|
);
|
|
2223
2293
|
};
|
|
2224
|
-
const getColorAlpha = (color) => {
|
|
2225
|
-
const rgbaMatch = color.match(/rgba?\(([^)]+)\)/);
|
|
2226
|
-
if (rgbaMatch) {
|
|
2227
|
-
const values = rgbaMatch[1].split(",").map((v) => parseFloat(v.trim()));
|
|
2228
|
-
if (values.length === 4) {
|
|
2229
|
-
return values[3];
|
|
2230
|
-
}
|
|
2231
|
-
return 1;
|
|
2232
|
-
}
|
|
2233
|
-
const hexMatch = color.match(/^#([0-9a-fA-F]{8})$/);
|
|
2234
|
-
if (hexMatch) {
|
|
2235
|
-
const alphaHex = hexMatch[1].substring(6, 8);
|
|
2236
|
-
return parseInt(alphaHex, 16) / 255;
|
|
2237
|
-
}
|
|
2238
|
-
if (color.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/)) {
|
|
2239
|
-
return 1;
|
|
2240
|
-
}
|
|
2241
|
-
return 1;
|
|
2242
|
-
};
|
|
2243
2294
|
const LightboxComponent = {
|
|
2244
2295
|
element: LightboxGallery,
|
|
2245
2296
|
id: "lightbox",
|
|
@@ -2795,7 +2846,7 @@ const LightboxComponent = {
|
|
|
2795
2846
|
}
|
|
2796
2847
|
},
|
|
2797
2848
|
hover: {
|
|
2798
|
-
title: "Hover",
|
|
2849
|
+
title: "Link Hover",
|
|
2799
2850
|
type: "string",
|
|
2800
2851
|
display: {
|
|
2801
2852
|
type: "settings-color-picker",
|
package/dist/index.mjs
CHANGED
|
@@ -738,7 +738,7 @@ const ControlSliderComponent = {
|
|
|
738
738
|
}
|
|
739
739
|
},
|
|
740
740
|
hover: {
|
|
741
|
-
title: "
|
|
741
|
+
title: "Link Hover",
|
|
742
742
|
type: "string",
|
|
743
743
|
display: {
|
|
744
744
|
type: "settings-color-picker",
|
|
@@ -1244,7 +1244,7 @@ const ControlImageRevealSliderComponent = {
|
|
|
1244
1244
|
display: {
|
|
1245
1245
|
type: "ratio-group"
|
|
1246
1246
|
},
|
|
1247
|
-
enum: ["as
|
|
1247
|
+
enum: ["as Is", "custom", "random"]
|
|
1248
1248
|
},
|
|
1249
1249
|
imageWidth: {
|
|
1250
1250
|
type: "number",
|
|
@@ -1608,7 +1608,26 @@ function getDisplayedImageRect(img2) {
|
|
|
1608
1608
|
height: renderedH
|
|
1609
1609
|
};
|
|
1610
1610
|
}
|
|
1611
|
-
function
|
|
1611
|
+
function getColorAlpha(color) {
|
|
1612
|
+
const rgbaMatch = color.match(/rgba?\(([^)]+)\)/);
|
|
1613
|
+
if (rgbaMatch) {
|
|
1614
|
+
const values = rgbaMatch[1].split(",").map((v) => parseFloat(v.trim()));
|
|
1615
|
+
if (values.length === 4) {
|
|
1616
|
+
return values[3];
|
|
1617
|
+
}
|
|
1618
|
+
return 1;
|
|
1619
|
+
}
|
|
1620
|
+
const hexMatch = color.match(/^#([0-9a-fA-F]{8})$/);
|
|
1621
|
+
if (hexMatch) {
|
|
1622
|
+
const alphaHex = hexMatch[1].substring(6, 8);
|
|
1623
|
+
return parseInt(alphaHex, 16) / 255;
|
|
1624
|
+
}
|
|
1625
|
+
if (color.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/)) {
|
|
1626
|
+
return 1;
|
|
1627
|
+
}
|
|
1628
|
+
return 1;
|
|
1629
|
+
}
|
|
1630
|
+
const LightboxGallery = ({ settings, content, styles: styles2, portalId, activeEvent, isEditor }) => {
|
|
1612
1631
|
const [open, setOpen] = React.useState(false);
|
|
1613
1632
|
const { url } = settings.thumbnailBlock.cover;
|
|
1614
1633
|
useEffect(() => {
|
|
@@ -1625,15 +1644,30 @@ function LightboxGallery({ settings, content, styles: styles2, portalId, activeE
|
|
|
1625
1644
|
{
|
|
1626
1645
|
src: url,
|
|
1627
1646
|
alt: "Cover",
|
|
1628
|
-
style: {
|
|
1647
|
+
style: {
|
|
1648
|
+
width: "100%",
|
|
1649
|
+
height: "100%",
|
|
1650
|
+
cursor: "pointer",
|
|
1651
|
+
objectFit: "cover"
|
|
1652
|
+
},
|
|
1629
1653
|
onClick: () => setOpen(true)
|
|
1630
1654
|
}
|
|
1631
1655
|
),
|
|
1632
|
-
/* @__PURE__ */ jsx(
|
|
1656
|
+
/* @__PURE__ */ jsx(
|
|
1657
|
+
Lightbox,
|
|
1658
|
+
{
|
|
1659
|
+
isOpen: open,
|
|
1660
|
+
onClose: () => setOpen(false),
|
|
1661
|
+
content,
|
|
1662
|
+
settings,
|
|
1663
|
+
lightboxStyles: styles2,
|
|
1664
|
+
portalId,
|
|
1665
|
+
isEditor
|
|
1666
|
+
}
|
|
1667
|
+
)
|
|
1633
1668
|
] });
|
|
1634
|
-
}
|
|
1635
|
-
const Lightbox = ({ isOpen, onClose, content,
|
|
1636
|
-
const { widthSettings, fontSettings, letterSpacing, textAlign, wordSpacing, fontSizeLineHeight, textAppearance, color } = lightboxStyles.caption;
|
|
1669
|
+
};
|
|
1670
|
+
const Lightbox = ({ isOpen, onClose, content, lightboxStyles, settings, portalId, isEditor }) => {
|
|
1637
1671
|
const [currentIndex, setCurrentIndex] = React.useState(0);
|
|
1638
1672
|
const [splideKey, setSplideKey] = React.useState(0);
|
|
1639
1673
|
const [isClosing, setIsClosing] = React.useState(false);
|
|
@@ -1645,17 +1679,16 @@ const Lightbox = ({ isOpen, onClose, content, styles: lightboxStyles, settings,
|
|
|
1645
1679
|
const animationEndHandlerRef = useRef(null);
|
|
1646
1680
|
const appearAnimationEndHandlerRef = useRef(null);
|
|
1647
1681
|
const { appear, triggers, slider, thumbnail, controls, area, caption: caption2, layout } = settings.lightboxBlock;
|
|
1682
|
+
const { widthSettings, fontSettings, letterSpacing, textAlign, wordSpacing, fontSizeLineHeight, textAppearance, color } = lightboxStyles.caption;
|
|
1648
1683
|
const appearDurationMs = appear.duration ? parseInt(appear.duration) : 300;
|
|
1649
1684
|
useEffect(() => {
|
|
1650
|
-
|
|
1685
|
+
const handleLayoutChange = () => {
|
|
1651
1686
|
var _a, _b;
|
|
1652
1687
|
(_b = (_a = lightboxRef.current) == null ? void 0 : _a.splide) == null ? void 0 : _b.refresh();
|
|
1653
|
-
}
|
|
1688
|
+
};
|
|
1689
|
+
window.addEventListener("ArticleEditor.Layout:change", handleLayoutChange);
|
|
1654
1690
|
return () => {
|
|
1655
|
-
window.removeEventListener("ArticleEditor.Layout:change",
|
|
1656
|
-
var _a, _b;
|
|
1657
|
-
(_b = (_a = lightboxRef.current) == null ? void 0 : _a.splide) == null ? void 0 : _b.refresh();
|
|
1658
|
-
});
|
|
1691
|
+
window.removeEventListener("ArticleEditor.Layout:change", handleLayoutChange);
|
|
1659
1692
|
};
|
|
1660
1693
|
}, []);
|
|
1661
1694
|
const handleClose = useCallback(() => {
|
|
@@ -1688,13 +1721,8 @@ const Lightbox = ({ isOpen, onClose, content, styles: lightboxStyles, settings,
|
|
|
1688
1721
|
};
|
|
1689
1722
|
const handleImageWrapperClick = (e) => {
|
|
1690
1723
|
var _a, _b;
|
|
1691
|
-
const
|
|
1692
|
-
|
|
1693
|
-
if (e.target === e.currentTarget) {
|
|
1694
|
-
handleClose();
|
|
1695
|
-
}
|
|
1696
|
-
return;
|
|
1697
|
-
}
|
|
1724
|
+
const currentImage = content[currentIndex];
|
|
1725
|
+
const isCover = (currentImage == null ? void 0 : currentImage.image.objectFit) === "cover";
|
|
1698
1726
|
let clientX;
|
|
1699
1727
|
let clientY;
|
|
1700
1728
|
if ("changedTouches" in e && e.changedTouches.length > 0) {
|
|
@@ -1706,7 +1734,20 @@ const Lightbox = ({ isOpen, onClose, content, styles: lightboxStyles, settings,
|
|
|
1706
1734
|
} else {
|
|
1707
1735
|
return;
|
|
1708
1736
|
}
|
|
1709
|
-
|
|
1737
|
+
let inside;
|
|
1738
|
+
if (isCover && imageRef.current) {
|
|
1739
|
+
const imgRect = imageRef.current.getBoundingClientRect();
|
|
1740
|
+
inside = clientX >= imgRect.left && clientX <= imgRect.right && clientY >= imgRect.top && clientY <= imgRect.bottom;
|
|
1741
|
+
} else {
|
|
1742
|
+
const rect = imageRef.current ? getDisplayedImageRect(imageRef.current) : null;
|
|
1743
|
+
if (!rect) {
|
|
1744
|
+
if (e.target === e.currentTarget) {
|
|
1745
|
+
handleClose();
|
|
1746
|
+
}
|
|
1747
|
+
return;
|
|
1748
|
+
}
|
|
1749
|
+
inside = clientX >= rect.x && clientX <= rect.x + rect.width && clientY >= rect.y && clientY <= rect.y + rect.height;
|
|
1750
|
+
}
|
|
1710
1751
|
if (inside) {
|
|
1711
1752
|
if (triggers.type === "click" && triggers.switch === "image") {
|
|
1712
1753
|
if (triggers.repeat === "close" && currentIndex === content.length - 1) {
|
|
@@ -1751,6 +1792,32 @@ const Lightbox = ({ isOpen, onClose, content, styles: lightboxStyles, settings,
|
|
|
1751
1792
|
handleClose();
|
|
1752
1793
|
}
|
|
1753
1794
|
};
|
|
1795
|
+
const onImageClick = (e) => {
|
|
1796
|
+
var _a, _b;
|
|
1797
|
+
e.stopPropagation();
|
|
1798
|
+
if (triggers.type === "click" && triggers.switch === "image") {
|
|
1799
|
+
if (triggers.repeat === "close" && currentIndex === content.length - 1) {
|
|
1800
|
+
handleClose();
|
|
1801
|
+
} else {
|
|
1802
|
+
(_a = lightboxRef.current) == null ? void 0 : _a.go("+1");
|
|
1803
|
+
}
|
|
1804
|
+
}
|
|
1805
|
+
if (triggers.type === "click" && triggers.switch === "50/50") {
|
|
1806
|
+
const img2 = e.currentTarget;
|
|
1807
|
+
const rect = img2.getBoundingClientRect();
|
|
1808
|
+
const clickX = e.clientX - rect.left;
|
|
1809
|
+
const clickY = e.clientY - rect.top;
|
|
1810
|
+
const imgWidth = rect.width;
|
|
1811
|
+
const imgHeight = rect.height;
|
|
1812
|
+
let dir;
|
|
1813
|
+
if (slider.direction === "horiz") {
|
|
1814
|
+
dir = clickX < imgWidth / 2 ? "-1" : "+1";
|
|
1815
|
+
} else {
|
|
1816
|
+
dir = clickY < imgHeight / 2 ? "-1" : "+1";
|
|
1817
|
+
}
|
|
1818
|
+
(_b = lightboxRef.current) == null ? void 0 : _b.go(dir);
|
|
1819
|
+
}
|
|
1820
|
+
};
|
|
1754
1821
|
useEffect(() => {
|
|
1755
1822
|
if (!isOpen) return;
|
|
1756
1823
|
const onKeyDown = (event) => {
|
|
@@ -1907,11 +1974,18 @@ const Lightbox = ({ isOpen, onClose, content, styles: lightboxStyles, settings,
|
|
|
1907
1974
|
return;
|
|
1908
1975
|
}
|
|
1909
1976
|
if (e.touches.length === 0 && e.changedTouches.length > 0) {
|
|
1910
|
-
const
|
|
1911
|
-
|
|
1912
|
-
if (!rect) return;
|
|
1977
|
+
const currentImage = content[currentIndex];
|
|
1978
|
+
const isCover = (currentImage == null ? void 0 : currentImage.image.objectFit) === "cover";
|
|
1913
1979
|
const touch = e.changedTouches[0];
|
|
1914
|
-
|
|
1980
|
+
let inside;
|
|
1981
|
+
if (isCover && imageRef.current) {
|
|
1982
|
+
const imgRect = imageRef.current.getBoundingClientRect();
|
|
1983
|
+
inside = touch.clientX >= imgRect.left && touch.clientX <= imgRect.right && touch.clientY >= imgRect.top && touch.clientY <= imgRect.bottom;
|
|
1984
|
+
} else {
|
|
1985
|
+
const rect = imageRef.current ? getDisplayedImageRect(imageRef.current) : null;
|
|
1986
|
+
if (!rect) return;
|
|
1987
|
+
inside = touch.clientX >= rect.x && touch.clientX <= rect.x + rect.width && touch.clientY >= rect.y && touch.clientY <= rect.y + rect.height;
|
|
1988
|
+
}
|
|
1915
1989
|
if (!inside) {
|
|
1916
1990
|
e.stopPropagation();
|
|
1917
1991
|
isClosingRef.current = true;
|
|
@@ -1929,7 +2003,7 @@ const Lightbox = ({ isOpen, onClose, content, styles: lightboxStyles, settings,
|
|
|
1929
2003
|
return () => {
|
|
1930
2004
|
document.removeEventListener("touchend", handleTouchEnd);
|
|
1931
2005
|
};
|
|
1932
|
-
}, [isOpen, handleClose, currentIndex]);
|
|
2006
|
+
}, [isOpen, handleClose, currentIndex, content]);
|
|
1933
2007
|
if (!isOpen && !isClosing) return null;
|
|
1934
2008
|
return createPortal(
|
|
1935
2009
|
/* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -1950,7 +2024,10 @@ const Lightbox = ({ isOpen, onClose, content, styles: lightboxStyles, settings,
|
|
|
1950
2024
|
/* @__PURE__ */ jsx(
|
|
1951
2025
|
"div",
|
|
1952
2026
|
{
|
|
1953
|
-
className: cn(styles.backdropStyle, {
|
|
2027
|
+
className: cn(styles.backdropStyle, {
|
|
2028
|
+
[styles.editor]: isEditor,
|
|
2029
|
+
[isClosing ? backdropDisappearClass : backdropAppearClass]: isEditor
|
|
2030
|
+
}),
|
|
1954
2031
|
style: { ...isEditor && {
|
|
1955
2032
|
backgroundColor: area.color,
|
|
1956
2033
|
backdropFilter: `blur(${area.blur}px)`,
|
|
@@ -2021,6 +2098,7 @@ const Lightbox = ({ isOpen, onClose, content, styles: lightboxStyles, settings,
|
|
|
2021
2098
|
[styles.cover]: item.image.objectFit === "cover",
|
|
2022
2099
|
[styles.scaleSlide]: slider.type === "scale"
|
|
2023
2100
|
}),
|
|
2101
|
+
onClick: item.image.objectFit !== "contain" ? onImageClick : void 0,
|
|
2024
2102
|
src: item.image.url,
|
|
2025
2103
|
alt: item.image.name ?? "",
|
|
2026
2104
|
style: {
|
|
@@ -2047,12 +2125,11 @@ const Lightbox = ({ isOpen, onClose, content, styles: lightboxStyles, settings,
|
|
|
2047
2125
|
"button",
|
|
2048
2126
|
{
|
|
2049
2127
|
className: styles.arrowInner,
|
|
2050
|
-
style: {
|
|
2051
|
-
transform: `translate(${scalingValue(controls.offset.x, isEditor)}, ${scalingValue(controls.offset.y * (slider.direction === "horiz" ? 1 : -1), isEditor)}) scale(${controls.scale}) rotate(${slider.direction === "horiz" ? "0deg" : "90deg"})`
|
|
2052
|
-
},
|
|
2128
|
+
style: { transform: `translate(${scalingValue(controls.offset.x, isEditor)}, ${scalingValue(controls.offset.y * (slider.direction === "horiz" ? 1 : -1), isEditor)}) scale(${controls.scale}) rotate(${slider.direction === "horiz" ? "0deg" : "90deg"})` },
|
|
2053
2129
|
onClick: (e) => {
|
|
2054
2130
|
handleArrowClick("-1");
|
|
2055
2131
|
},
|
|
2132
|
+
"aria-label": "Previous",
|
|
2056
2133
|
children: controls.arrowsImgUrl && /* @__PURE__ */ jsx(
|
|
2057
2134
|
SvgImage,
|
|
2058
2135
|
{
|
|
@@ -2075,9 +2152,7 @@ const Lightbox = ({ isOpen, onClose, content, styles: lightboxStyles, settings,
|
|
|
2075
2152
|
"button",
|
|
2076
2153
|
{
|
|
2077
2154
|
className: styles.arrowInner,
|
|
2078
|
-
style: {
|
|
2079
|
-
transform: `translate(${scalingValue(controls.offset.x * (slider.direction === "horiz" ? -1 : 1), isEditor)}, ${scalingValue(controls.offset.y, isEditor)}) scale(${controls.scale}) rotate(${slider.direction === "horiz" ? "0deg" : "90deg"})`
|
|
2080
|
-
},
|
|
2155
|
+
style: { transform: `translate(${scalingValue(controls.offset.x * (slider.direction === "horiz" ? -1 : 1), isEditor)}, ${scalingValue(controls.offset.y, isEditor)}) scale(${controls.scale}) rotate(${slider.direction === "horiz" ? "0deg" : "90deg"})` },
|
|
2081
2156
|
onClick: (e) => {
|
|
2082
2157
|
handleArrowClick("+1");
|
|
2083
2158
|
},
|
|
@@ -2104,11 +2179,9 @@ const Lightbox = ({ isOpen, onClose, content, styles: lightboxStyles, settings,
|
|
|
2104
2179
|
"button",
|
|
2105
2180
|
{
|
|
2106
2181
|
className: styles.closeButton,
|
|
2107
|
-
style: {
|
|
2108
|
-
...positionStyles,
|
|
2109
|
-
transform: combinedTransform
|
|
2110
|
-
},
|
|
2182
|
+
style: { ...positionStyles, transform: combinedTransform },
|
|
2111
2183
|
onClick: handleClose,
|
|
2184
|
+
"aria-label": "Close lightbox",
|
|
2112
2185
|
children: /* @__PURE__ */ jsx(SvgImage, { url: area.closeIconUrl })
|
|
2113
2186
|
}
|
|
2114
2187
|
);
|
|
@@ -2132,7 +2205,7 @@ const Lightbox = ({ isOpen, onClose, content, styles: lightboxStyles, settings,
|
|
|
2132
2205
|
textDecoration: textAppearance.textDecoration ?? "none",
|
|
2133
2206
|
fontVariant: textAppearance.fontVariant ?? "normal",
|
|
2134
2207
|
color,
|
|
2135
|
-
transitionDuration:
|
|
2208
|
+
transitionDuration: `${Math.round(parseInt(slider.duration) / 2)}ms`
|
|
2136
2209
|
},
|
|
2137
2210
|
onClick: (e) => e.stopPropagation(),
|
|
2138
2211
|
children: /* @__PURE__ */ jsx(
|
|
@@ -2161,10 +2234,7 @@ const Lightbox = ({ isOpen, onClose, content, styles: lightboxStyles, settings,
|
|
|
2161
2234
|
[styles.thumbsAlignEnd]: thumbnail.align === "end"
|
|
2162
2235
|
}
|
|
2163
2236
|
),
|
|
2164
|
-
style: {
|
|
2165
|
-
gap: `${scalingValue(thumbnail.grid.gap, isEditor)}`,
|
|
2166
|
-
...getPositionStyles(thumbnail.position, thumbnail.offset, isEditor)
|
|
2167
|
-
},
|
|
2237
|
+
style: { gap: scalingValue(thumbnail.grid.gap, isEditor), ...getPositionStyles(thumbnail.position, thumbnail.offset, isEditor) },
|
|
2168
2238
|
children: content.map((item, index) => {
|
|
2169
2239
|
const isActive = index === currentIndex;
|
|
2170
2240
|
return /* @__PURE__ */ jsx(
|
|
@@ -2172,10 +2242,10 @@ const Lightbox = ({ isOpen, onClose, content, styles: lightboxStyles, settings,
|
|
|
2172
2242
|
{
|
|
2173
2243
|
className: styles.thumbItem,
|
|
2174
2244
|
style: {
|
|
2175
|
-
...slider.direction === "horiz" ? { height: isActive ?
|
|
2176
|
-
...slider.direction === "vert" ? { width: isActive ?
|
|
2177
|
-
...thumbnail.fit === "cover" && slider.direction === "horiz" ? { width: isActive ?
|
|
2178
|
-
...thumbnail.fit === "cover" && slider.direction === "vert" ? { height: isActive ?
|
|
2245
|
+
...slider.direction === "horiz" ? { height: isActive ? scalingValue(thumbnail.grid.height * (isActive ? thumbnail.activeState.scale : 1), isEditor) : scalingValue(thumbnail.grid.height, isEditor) } : {},
|
|
2246
|
+
...slider.direction === "vert" ? { width: isActive ? scalingValue(thumbnail.grid.width * (isActive ? thumbnail.activeState.scale : 1), isEditor) : scalingValue(thumbnail.grid.width, isEditor) } : {},
|
|
2247
|
+
...thumbnail.fit === "cover" && slider.direction === "horiz" ? { width: isActive ? scalingValue(thumbnail.grid.width * (isActive ? thumbnail.activeState.scale : 1), isEditor) : scalingValue(thumbnail.grid.width, isEditor) } : {},
|
|
2248
|
+
...thumbnail.fit === "cover" && slider.direction === "vert" ? { height: isActive ? scalingValue(thumbnail.grid.height * (isActive ? thumbnail.activeState.scale : 1), isEditor) : scalingValue(thumbnail.grid.height, isEditor) } : {},
|
|
2179
2249
|
transition: isActive ? "all 0.2s ease" : "none",
|
|
2180
2250
|
opacity: isActive ? thumbnail.activeState.opacity / 100 : thumbnail.opacity / 100,
|
|
2181
2251
|
["--thumb-hover"]: thumbnail.activeState.opacity / 100
|
|
@@ -2219,25 +2289,6 @@ const Lightbox = ({ isOpen, onClose, content, styles: lightboxStyles, settings,
|
|
|
2219
2289
|
document.getElementById(portalId)
|
|
2220
2290
|
);
|
|
2221
2291
|
};
|
|
2222
|
-
const getColorAlpha = (color) => {
|
|
2223
|
-
const rgbaMatch = color.match(/rgba?\(([^)]+)\)/);
|
|
2224
|
-
if (rgbaMatch) {
|
|
2225
|
-
const values = rgbaMatch[1].split(",").map((v) => parseFloat(v.trim()));
|
|
2226
|
-
if (values.length === 4) {
|
|
2227
|
-
return values[3];
|
|
2228
|
-
}
|
|
2229
|
-
return 1;
|
|
2230
|
-
}
|
|
2231
|
-
const hexMatch = color.match(/^#([0-9a-fA-F]{8})$/);
|
|
2232
|
-
if (hexMatch) {
|
|
2233
|
-
const alphaHex = hexMatch[1].substring(6, 8);
|
|
2234
|
-
return parseInt(alphaHex, 16) / 255;
|
|
2235
|
-
}
|
|
2236
|
-
if (color.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/)) {
|
|
2237
|
-
return 1;
|
|
2238
|
-
}
|
|
2239
|
-
return 1;
|
|
2240
|
-
};
|
|
2241
2292
|
const LightboxComponent = {
|
|
2242
2293
|
element: LightboxGallery,
|
|
2243
2294
|
id: "lightbox",
|
|
@@ -2793,7 +2844,7 @@ const LightboxComponent = {
|
|
|
2793
2844
|
}
|
|
2794
2845
|
},
|
|
2795
2846
|
hover: {
|
|
2796
|
-
title: "Hover",
|
|
2847
|
+
title: "Link Hover",
|
|
2797
2848
|
type: "string",
|
|
2798
2849
|
display: {
|
|
2799
2850
|
type: "settings-color-picker",
|