@cntrl-site/components 1.0.17-3 → 1.0.17-5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +19 -1
- package/dist/index.mjs +82 -62
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8508,6 +8508,12 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
8508
8508
|
color: var(--${e}-question-color);
|
|
8509
8509
|
font: inherit;
|
|
8510
8510
|
padding-left: 0;
|
|
8511
|
+
outline: none;
|
|
8512
|
+
-webkit-tap-highlight-color: transparent;
|
|
8513
|
+
}
|
|
8514
|
+
.${e}-question-button:focus,
|
|
8515
|
+
.${e}-question-button:focus-visible {
|
|
8516
|
+
outline: none;
|
|
8511
8517
|
}
|
|
8512
8518
|
.${e}-question-row {
|
|
8513
8519
|
display: flex;
|
|
@@ -8644,7 +8650,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
8644
8650
|
left: 20px;
|
|
8645
8651
|
transform: translateY(-50%);
|
|
8646
8652
|
}
|
|
8647
|
-
`}function _i(e,t,n,r,i,l,o,c){return{fontSettings:{fontFamily:e,fontWeight:(t==null?void 0:t.fontWeight)??400,fontStyle:(t==null?void 0:t.fontStyle)??"normal"},fontSize:n??.01,lineHeight:r,letterSpacing:i??0,wordSpacing:l??0,textAppearance:o,color:c??"#000000"}}function Ou({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i,activeEvent:l}){const{prefix:o}=y.useScopedStyles(),c=i??!1,{wrapperWidth:s=1,cellMinHeight:p=0,dividerWidth:u=694e-6,dividerStyle:T="solid",entryHoverEffect:x="default",autoclose:f="off",icon:m,iconMaxWidth:g=.00833,iconPaddingRight:C=0,iconAnimation:w="rotate 45",questionColor:S="#000000",answerColor:v="#000000",dividerColor:M="#0000001F",iconColor:L="#000000",questionHoverColor:N="#666666",iconHoverColor:b="#666666",iconActiveColor:P="#000000",dividerHoverColor:B="#000000",questionFontFamily:$,questionFontSettings:E,questionFontSize:A,questionLineHeight:F,questionLetterSpacing:j,questionWordSpacing:te,questionTextAppearance:k,answerFontFamily:W,answerFontSettings:D,answerFontSize:H,answerLineHeight:I,answerLetterSpacing:K,answerWordSpacing:Q,answerTextAppearance:Z,questionPaddingLeft:R=0,questionPaddingTop:ne=0,questionPaddingBottom:h=0,answerPaddingLeft:ee=0,answerPaddingRight:ge=0,answerPaddingTop:le=0,answerPaddingBottom:be=0}=e,re=t??[],[ce,V]=d.useState(()=>new Set),U=!n||r;d.useEffect(()=>{V(new Set)},[f]);const G=pe=>y.scalingValue(pe,n??!1),se=Math.max(R,zt),ye=Math.max(ne,zt),Te=Math.max(h,zt),Se=Math.max(ee,zt),Le=Math.max(ge,zt),Ee=Math.max(le,zt),O=Math.max(be,zt),oe=Math.max(0,(s??1)-C-g),_=Math.max(0,(s??1)-ge),z=Math.max(0,(s??1)-ee),q=Math.max(C,zt),Y=Math.max(0,(s??1)-R-g),ae=d.useMemo(()=>ce.size===0?0:Math.min(...ce),[ce]),me=d.useCallback(pe=>ce.has(pe),[ce]),Fe=U&&x==="default"?`${o}-entry-hover-default`:"",he=m??"",ve=he!=="",We=w.replace(/^rotate /,""),ie=`${o}-icon-anim-${We}`,xe=yt(Ze(_i($,E,A,F,j,te,k,S),n)),Ae=yt(Ze(_i(W,D,H,I,K,Q,Z,v),n)),ke=Pi(A,F,`${o}-question`,`${o}-text-tight-leading`),Ve=Pi(H,I,`${o}-answer-text`,`${o}-text-tight-leading`),tt=Ei(A,F,o,n),ut=Ei(H,I,o,n),pt=y.buildColorVars(o,{questionColor:S,answerColor:v,dividerColor:M,iconColor:L,questionHoverColor:N,iconHoverColor:b,iconActiveColor:P,dividerHoverColor:B},Wu,Mu),xt=l&&l!=="default"?`${o}-state-${l}`:"",Et=d.useCallback(pe=>{U&&V(He=>{if(He.has(pe)){const Ue=new Set(He);return Ue.delete(pe),Ue}if(f==="on")return new Set([pe]);const Oe=new Set(He);return Oe.add(pe),Oe})},[U,f]),mt=d.useMemo(()=>Hu(o),[o]),_t={[`--${o}-divider-width`]:y.scalingValue(u,n??!1),[`--${o}-divider-style`]:T,[`--${o}-icon-max-width`]:y.scalingValue(g,n??!1),...p>0?{[`--${o}-question-min-height`]:y.scalingValue(p,n??!1)}:{}};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:mt}}),a.jsx("div",{style:pt,children:a.jsx("div",{className:`${o}-wrapper${n&&!r?` ${o}-editor`:""} ${Fe} ${xt}`.trim(),style:{width:y.scalingValue(s,n??!1),maxWidth:"100%",..._t},children:re.map((pe,He)=>{var At;const Oe=me(He),Ue=((At=pe.question)==null?void 0:At.trim())??"",Ct=pe.answer,Vt=((Ct==null?void 0:Ct.length)??0)>0,gt=c&&He===ae;return a.jsxs("div",{className:`${o}-item${Oe?` ${o}-item-open`:""}`.trim(),"data-faq-item":"",children:[a.jsxs("div",{className:`${o}-question-controls`,children:[gt&&a.jsxs(a.Fragment,{children:[a.jsx(jt,{"data-controls":"questionPaddingTop","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${o}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",top:0,left:0,width:"100%",height:G(ye),zIndex:2}}),a.jsx(jt,{"data-controls":"questionPaddingLeft","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(oe),className:`${o}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:G(se),height:"100%",zIndex:2}}),a.jsx(jt,{"data-controls":"iconPaddingRight","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Y),className:`${o}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,right:0,width:G(q),height:"100%",zIndex:2}})]}),a.jsxs("button",{type:"button",className:`${o}-question-button`,"aria-expanded":Oe,style:{...xe,...tt,paddingLeft:G(R),paddingRight:G(C)},onClick:()=>Et(He),children:[ne>0&&a.jsx("span",{className:`${o}-padding-handle`,style:{height:G(ne)},"aria-hidden":"true"}),a.jsxs("span",{className:`${o}-question-row`,children:[a.jsx("span",{className:ke,children:Ue}),Vt&&(ve?a.jsx("span",{className:`${o}-icon ${o}-icon-custom ${ie}`,"aria-hidden":"true",children:a.jsx(Nt,{url:he,fill:L,hoverFill:b,className:`${o}-icon-image`})}):a.jsx("span",{className:`${o}-icon ${o}-icon-default ${ie}`,"aria-hidden":"true"}))]}),h>0&&a.jsx("span",{className:`${o}-padding-handle`,style:{height:G(h)},"aria-hidden":"true"})]}),gt&&a.jsx(jt,{"data-controls":"questionPaddingBottom","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${o}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:G(Te),zIndex:2}})]}),Vt&&Ct&&a.jsx("div",{className:`${o}-panel`,"aria-hidden":!Oe,children:a.jsx("div",{className:`${o}-panel-inner`,children:a.jsxs("div",{className:`${o}-answer-controls`,children:[gt&&a.jsxs(a.Fragment,{children:[a.jsx(jt,{"data-controls":"answerPaddingTop","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${o}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",top:0,left:0,width:"100%",height:G(Ee),zIndex:2}}),a.jsx(jt,{"data-controls":"answerPaddingLeft","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(_),className:`${o}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:G(Se),height:"100%",zIndex:2}}),a.jsx(jt,{"data-controls":"answerPaddingRight","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(z),className:`${o}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,right:0,width:G(Le),height:"100%",zIndex:2}})]}),le>0&&a.jsx("div",{className:`${o}-padding-handle`,style:{height:G(le)}}),a.jsx("div",{className:`${o}-answer`,style:{...Ae,...ut,paddingLeft:G(ee),paddingRight:G(ge)},children:a.jsx("div",{className:Ve,children:a.jsx(Sn,{content:Ct})})}),be>0&&a.jsx("div",{className:`${o}-padding-handle`,style:{height:G(be)}}),gt&&a.jsx(jt,{"data-controls":"answerPaddingBottom","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${o}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:G(O),zIndex:2}})]})})})]},He)})})})]})}const Bu=`import { useCallback, useEffect, useMemo, useState, type CSSProperties, type ComponentPropsWithoutRef } from 'react';
|
|
8653
|
+
`}function _i(e,t,n,r,i,l,o,c){return{fontSettings:{fontFamily:e,fontWeight:(t==null?void 0:t.fontWeight)??400,fontStyle:(t==null?void 0:t.fontStyle)??"normal"},fontSize:n??.01,lineHeight:r,letterSpacing:i??0,wordSpacing:l??0,textAppearance:o,color:c??"#000000"}}function Ou({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i,activeEvent:l}){const{prefix:o}=y.useScopedStyles(),c=i??!1,{wrapperWidth:s=1,cellMinHeight:p=0,dividerWidth:u=694e-6,dividerStyle:T="solid",entryHoverEffect:x="default",autoclose:f="off",icon:m,iconMaxWidth:g=.00833,iconPaddingRight:C=0,iconAnimation:w="rotate 45",questionColor:S="#000000",answerColor:v="#000000",dividerColor:M="#0000001F",iconColor:L="#000000",questionHoverColor:N="#666666",iconHoverColor:b="#666666",iconActiveColor:P="#000000",dividerHoverColor:B="#000000",questionFontFamily:$,questionFontSettings:E,questionFontSize:A,questionLineHeight:F,questionLetterSpacing:j,questionWordSpacing:te,questionTextAppearance:k,answerFontFamily:W,answerFontSettings:D,answerFontSize:H,answerLineHeight:I,answerLetterSpacing:K,answerWordSpacing:Q,answerTextAppearance:Z,questionPaddingLeft:R=0,questionPaddingTop:ne=0,questionPaddingBottom:h=0,answerPaddingLeft:ee=0,answerPaddingRight:ge=0,answerPaddingTop:le=0,answerPaddingBottom:be=0}=e,re=t??[],[ce,V]=d.useState(()=>new Set),U=!n||r;d.useEffect(()=>{V(new Set)},[f]),d.useEffect(()=>{n&&!i&&!r&&V(new Set)},[n,i,r]);const G=pe=>y.scalingValue(pe,n??!1),se=Math.max(R,zt),ye=Math.max(ne,zt),Te=Math.max(h,zt),Se=Math.max(ee,zt),Le=Math.max(ge,zt),Ee=Math.max(le,zt),O=Math.max(be,zt),oe=Math.max(0,(s??1)-C-g),_=Math.max(0,(s??1)-ge),z=Math.max(0,(s??1)-ee),q=Math.max(C,zt),Y=Math.max(0,(s??1)-R-g),ae=d.useMemo(()=>ce.size===0?0:Math.min(...ce),[ce]),me=d.useCallback(pe=>ce.has(pe),[ce]),Fe=U&&x==="default"?`${o}-entry-hover-default`:"",he=m??"",ve=he!=="",We=w.replace(/^rotate /,""),ie=`${o}-icon-anim-${We}`,xe=yt(Ze(_i($,E,A,F,j,te,k,S),n)),Ae=yt(Ze(_i(W,D,H,I,K,Q,Z,v),n)),ke=Pi(A,F,`${o}-question`,`${o}-text-tight-leading`),Ve=Pi(H,I,`${o}-answer-text`,`${o}-text-tight-leading`),tt=Ei(A,F,o,n),ut=Ei(H,I,o,n),pt=y.buildColorVars(o,{questionColor:S,answerColor:v,dividerColor:M,iconColor:L,questionHoverColor:N,iconHoverColor:b,iconActiveColor:P,dividerHoverColor:B},Wu,Mu),xt=l&&l!=="default"?`${o}-state-${l}`:"",Et=d.useCallback(pe=>{U&&V(He=>{if(He.has(pe)){const Ue=new Set(He);return Ue.delete(pe),Ue}if(f==="on")return new Set([pe]);const Oe=new Set(He);return Oe.add(pe),Oe})},[U,f]),mt=d.useMemo(()=>Hu(o),[o]),_t={[`--${o}-divider-width`]:y.scalingValue(u,n??!1),[`--${o}-divider-style`]:T,[`--${o}-icon-max-width`]:y.scalingValue(g,n??!1),...p>0?{[`--${o}-question-min-height`]:y.scalingValue(p,n??!1)}:{}};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:mt}}),a.jsx("div",{style:pt,children:a.jsx("div",{className:`${o}-wrapper${n&&!r?` ${o}-editor`:""} ${Fe} ${xt}`.trim(),style:{width:y.scalingValue(s,n??!1),maxWidth:"100%",..._t},children:re.map((pe,He)=>{var At;const Oe=me(He),Ue=((At=pe.question)==null?void 0:At.trim())??"",Ct=pe.answer,Vt=((Ct==null?void 0:Ct.length)??0)>0,gt=c&&He===ae;return a.jsxs("div",{className:`${o}-item${Oe?` ${o}-item-open`:""}`.trim(),"data-faq-item":"",children:[a.jsxs("div",{className:`${o}-question-controls`,children:[gt&&a.jsxs(a.Fragment,{children:[a.jsx(jt,{"data-controls":"questionPaddingTop","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${o}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",top:0,left:0,width:"100%",height:G(ye),zIndex:2}}),a.jsx(jt,{"data-controls":"questionPaddingLeft","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(oe),className:`${o}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:G(se),height:"100%",zIndex:2}}),a.jsx(jt,{"data-controls":"iconPaddingRight","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Y),className:`${o}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,right:0,width:G(q),height:"100%",zIndex:2}})]}),a.jsxs("button",{type:"button",className:`${o}-question-button`,"aria-expanded":Oe,style:{...xe,...tt,paddingLeft:G(R),paddingRight:G(C)},onClick:()=>Et(He),children:[ne>0&&a.jsx("span",{className:`${o}-padding-handle`,style:{height:G(ne)},"aria-hidden":"true"}),a.jsxs("span",{className:`${o}-question-row`,children:[a.jsx("span",{className:ke,children:Ue}),Vt&&(ve?a.jsx("span",{className:`${o}-icon ${o}-icon-custom ${ie}`,"aria-hidden":"true",children:a.jsx(Nt,{url:he,fill:L,hoverFill:b,className:`${o}-icon-image`})}):a.jsx("span",{className:`${o}-icon ${o}-icon-default ${ie}`,"aria-hidden":"true"}))]}),h>0&&a.jsx("span",{className:`${o}-padding-handle`,style:{height:G(h)},"aria-hidden":"true"})]}),gt&&a.jsx(jt,{"data-controls":"questionPaddingBottom","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${o}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:G(Te),zIndex:2}})]}),Vt&&Ct&&a.jsx("div",{className:`${o}-panel`,"aria-hidden":!Oe,children:a.jsx("div",{className:`${o}-panel-inner`,children:a.jsxs("div",{className:`${o}-answer-controls`,children:[gt&&a.jsxs(a.Fragment,{children:[a.jsx(jt,{"data-controls":"answerPaddingTop","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${o}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",top:0,left:0,width:"100%",height:G(Ee),zIndex:2}}),a.jsx(jt,{"data-controls":"answerPaddingLeft","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(_),className:`${o}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:G(Se),height:"100%",zIndex:2}}),a.jsx(jt,{"data-controls":"answerPaddingRight","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(z),className:`${o}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,right:0,width:G(Le),height:"100%",zIndex:2}})]}),le>0&&a.jsx("div",{className:`${o}-padding-handle`,style:{height:G(le)}}),a.jsx("div",{className:`${o}-answer`,style:{...Ae,...ut,paddingLeft:G(ee),paddingRight:G(ge)},children:a.jsx("div",{className:Ve,children:a.jsx(Sn,{content:Ct})})}),be>0&&a.jsx("div",{className:`${o}-padding-handle`,style:{height:G(be)}}),gt&&a.jsx(jt,{"data-controls":"answerPaddingBottom","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${o}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:G(O),zIndex:2}})]})})})]},He)})})})]})}const Bu=`import { useCallback, useEffect, useMemo, useState, type CSSProperties, type ComponentPropsWithoutRef } from 'react';
|
|
8648
8654
|
import { CommonComponentProps } from '../props';
|
|
8649
8655
|
import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
|
|
8650
8656
|
import { omitTextColors, TextStyles, textStylesToCss } from '../utils/textStylesToCss';
|
|
@@ -8869,6 +8875,12 @@ function getCSS(P: string): string {
|
|
|
8869
8875
|
color: var(--\${P}-question-color);
|
|
8870
8876
|
font: inherit;
|
|
8871
8877
|
padding-left: 0;
|
|
8878
|
+
outline: none;
|
|
8879
|
+
-webkit-tap-highlight-color: transparent;
|
|
8880
|
+
}
|
|
8881
|
+
.\${P}-question-button:focus,
|
|
8882
|
+
.\${P}-question-button:focus-visible {
|
|
8883
|
+
outline: none;
|
|
8872
8884
|
}
|
|
8873
8885
|
.\${P}-question-row {
|
|
8874
8886
|
display: flex;
|
|
@@ -9084,6 +9096,12 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
|
|
|
9084
9096
|
useEffect(() => {
|
|
9085
9097
|
setOpenIndices(new Set());
|
|
9086
9098
|
}, [autoclose]);
|
|
9099
|
+
|
|
9100
|
+
useEffect(() => {
|
|
9101
|
+
if (isEditor && !isEditMode && !isPreviewMode) {
|
|
9102
|
+
setOpenIndices(new Set());
|
|
9103
|
+
}
|
|
9104
|
+
}, [isEditor, isEditMode, isPreviewMode]);
|
|
9087
9105
|
const scaled = (value: number) => scalingValue(value, isEditor ?? false);
|
|
9088
9106
|
const questionPaddingLeftWidth = Math.max(questionPaddingLeft, PADDING_HANDLE_SIZE);
|
|
9089
9107
|
const questionPaddingTopHeight = Math.max(questionPaddingTop, PADDING_HANDLE_SIZE);
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as l, Fragment as Ge, jsxs as re } from "react/jsx-runtime";
|
|
2
|
-
import en, { useState as de, useEffect as
|
|
2
|
+
import en, { useState as de, useEffect as Ae, useRef as Te, useCallback as ft, useMemo as He, useLayoutEffect as yt } from "react";
|
|
3
3
|
import Fe from "classnames";
|
|
4
4
|
import { s as L, u as an, b as Jn, g as Lr, r as zi } from "./readTestimonialTextMeasure-B1FI-93F.mjs";
|
|
5
5
|
import { createPortal as Vi } from "react-dom";
|
|
@@ -1853,7 +1853,7 @@ const Bl = "SvgImage-module__svg___q3xE-", Dl = "SvgImage-module__img___VsTm-",
|
|
|
1853
1853
|
return t.startsWith("data:image/svg+xml") ? !0 : (t.split(/[?#]/)[0] ?? t).endsWith(".svg");
|
|
1854
1854
|
}, Vl = (e) => `url("${e.replace(/\\/g, "\\\\").replace(/"/g, '\\"')}")`, qt = ({ url: e, fill: t = "#000000", hoverFill: n = "#CCCCCC", className: r = "", style: i }) => {
|
|
1855
1855
|
const [s, o] = de(() => typeof window > "u" ? !0 : CSS.supports("mask-image", 'url("")') || CSS.supports("-webkit-mask-image", 'url("")'));
|
|
1856
|
-
return
|
|
1856
|
+
return Ae(() => {
|
|
1857
1857
|
if (typeof window < "u" && window.CSS) {
|
|
1858
1858
|
const c = CSS.supports("mask-image", 'url("")') || CSS.supports("-webkit-mask-image", 'url("")');
|
|
1859
1859
|
o(c);
|
|
@@ -1886,7 +1886,7 @@ function jl({ settings: e, content: t, styles: n, isEditor: r }) {
|
|
|
1886
1886
|
const [i, s] = de(null), { widthSettings: o, fontSettings: c, letterSpacing: a, textAlign: u, wordSpacing: d, fontSizeLineHeight: w, textAppearance: v, color: h } = n.imageCaption ?? {}, [p, m] = de(void 0), [b, $] = de(null), [x, f] = de(0), [F, S] = de(0), { direction: M, transition: y, controls: T, pagination: O, imageCaption: C, triggers: P } = e, _ = Te(y.type), { x: W, y: V } = e.controls.offset, ee = (k) => {
|
|
1887
1887
|
i && i.go(k);
|
|
1888
1888
|
};
|
|
1889
|
-
return
|
|
1889
|
+
return Ae(() => {
|
|
1890
1890
|
if (!b) return;
|
|
1891
1891
|
const k = new ResizeObserver((R) => {
|
|
1892
1892
|
if (!i) return;
|
|
@@ -1897,7 +1897,7 @@ function jl({ settings: e, content: t, styles: n, isEditor: r }) {
|
|
|
1897
1897
|
});
|
|
1898
1898
|
});
|
|
1899
1899
|
return k.observe(b), () => k.unobserve(b);
|
|
1900
|
-
}, [b]),
|
|
1900
|
+
}, [b]), Ae(() => {
|
|
1901
1901
|
!i || _.current === y.type || (S((k) => k + 1), _.current = y.type);
|
|
1902
1902
|
}, [y.type]), /* @__PURE__ */ l("div", { className: Fe(ue.wrapper, { [ue.editor]: r }), ref: $, children: /* @__PURE__ */ re(
|
|
1903
1903
|
"div",
|
|
@@ -2804,7 +2804,7 @@ async function Ql(e, t, n, r) {
|
|
|
2804
2804
|
}
|
|
2805
2805
|
function Zl({ settings: e, content: t, isEditor: n }) {
|
|
2806
2806
|
const [r, i] = de(null), [s, o] = de([]), [c, a] = de(0), u = Te(0), [d, w] = de({ x: 0, y: 0 }), [v, h] = de(1), [p, m] = de("none"), b = Te({ x: 0, y: 0 }), [$, x] = de(!1), { sizeType: f, imageWidth: F, randomRangeImageWidth: S } = e.imageSize, { revealPosition: M, visible: y } = e.position, { cursorType: T, target: O, defaultCursorScale: C, defaultCursor: P, hoverCursorScale: _, hoverCursor: W } = e.cursor;
|
|
2807
|
-
|
|
2807
|
+
Ae(() => {
|
|
2808
2808
|
if (!r) return;
|
|
2809
2809
|
const k = (N, A) => {
|
|
2810
2810
|
const j = r.getBoundingClientRect(), X = N - j.left, Q = A - j.top;
|
|
@@ -2838,7 +2838,7 @@ function Zl({ settings: e, content: t, isEditor: n }) {
|
|
|
2838
2838
|
_,
|
|
2839
2839
|
C,
|
|
2840
2840
|
s
|
|
2841
|
-
]),
|
|
2841
|
+
]), Ae(() => {
|
|
2842
2842
|
$ || (m("none"), h(0));
|
|
2843
2843
|
}, [$]);
|
|
2844
2844
|
const V = async (k, R, D, N = {}) => {
|
|
@@ -2861,14 +2861,14 @@ function Zl({ settings: e, content: t, isEditor: n }) {
|
|
|
2861
2861
|
width: X
|
|
2862
2862
|
};
|
|
2863
2863
|
};
|
|
2864
|
-
return
|
|
2864
|
+
return Ae(() => {
|
|
2865
2865
|
if (!r || t.length === 0) return;
|
|
2866
2866
|
const k = r.getBoundingClientRect(), R = k.width, D = k.height, N = [];
|
|
2867
2867
|
(async () => {
|
|
2868
2868
|
const j = t[0], X = await V(j, R, D);
|
|
2869
2869
|
N.push(X), o(N), a(1);
|
|
2870
2870
|
})();
|
|
2871
|
-
}, [f, F, S, M, r]),
|
|
2871
|
+
}, [f, F, S, M, r]), Ae(() => {
|
|
2872
2872
|
y === "last One" && o((k) => k.length > 0 ? [k[k.length - 1]] : []);
|
|
2873
2873
|
}, [y]), /* @__PURE__ */ re(
|
|
2874
2874
|
"div",
|
|
@@ -3421,7 +3421,7 @@ function Hc(e, t) {
|
|
|
3421
3421
|
}
|
|
3422
3422
|
const Oc = ({ settings: e, content: t, styles: n, portalId: r, activeEvent: i, isEditor: s, isPreviewMode: o }) => {
|
|
3423
3423
|
const [c, a] = de(!1), { url: u } = e.thumbnailBlock.cover;
|
|
3424
|
-
return
|
|
3424
|
+
return Ae(() => {
|
|
3425
3425
|
i === "close" && a(!1), i === "open" && a(!0);
|
|
3426
3426
|
}, [i]), /* @__PURE__ */ re(Ge, { children: [
|
|
3427
3427
|
/* @__PURE__ */ l(
|
|
@@ -3447,9 +3447,9 @@ const Oc = ({ settings: e, content: t, styles: n, portalId: r, activeEvent: i, i
|
|
|
3447
3447
|
)
|
|
3448
3448
|
] });
|
|
3449
3449
|
}, Bc = ({ isOpen: e, onClose: t, content: n, lightboxStyles: r, settings: i, portalId: s, isEditor: o, metadata: c }) => {
|
|
3450
|
-
var
|
|
3450
|
+
var Ie;
|
|
3451
3451
|
const { widthSettings: a, fontSettings: u, letterSpacing: d, textAlign: w, wordSpacing: v, fontSizeLineHeight: h, textAppearance: p, color: m } = r.imageCaption ?? {}, [b, $] = de(0), [x, f] = de(0), [F, S] = de(!1), [M, y] = de(!1), [T, O] = de({}), C = Te(null), P = Te(null), _ = Te(null), W = Te(!1), V = Te(null), ee = Te(null), k = Te(null), R = Te(null), D = Te(!1), N = Te(null), [A, j] = de(!1), { appear: X, triggers: Q, slider: I, thumbnail: te, controls: g, area: J, caption: he, layout: le } = i.lightboxBlock, { appearClass: xe, backdropAppearClass: ne, backdropDisappearClass: ce, disappearClass: B } = Hc(X.type, X.direction), K = (c == null ? void 0 : c.itemId) ?? null;
|
|
3452
|
-
|
|
3452
|
+
Ae(() => {
|
|
3453
3453
|
const H = () => {
|
|
3454
3454
|
setTimeout(() => {
|
|
3455
3455
|
var E, z;
|
|
@@ -3461,7 +3461,7 @@ const Oc = ({ settings: e, content: t, styles: n, portalId: r, activeEvent: i, i
|
|
|
3461
3461
|
return window.addEventListener("ArticleEditor.Layout:change", H), window.addEventListener("ArticleEditor.ComponentContent:change", oe), () => {
|
|
3462
3462
|
window.removeEventListener("ArticleEditor.Layout:change", H), window.removeEventListener("ArticleEditor.ComponentContent:change", oe);
|
|
3463
3463
|
};
|
|
3464
|
-
}, []),
|
|
3464
|
+
}, []), Ae(() => {
|
|
3465
3465
|
if (!e || !te.isActive) {
|
|
3466
3466
|
j(!1);
|
|
3467
3467
|
return;
|
|
@@ -3523,7 +3523,7 @@ const Oc = ({ settings: e, content: t, styles: n, portalId: r, activeEvent: i, i
|
|
|
3523
3523
|
const oe = H.target;
|
|
3524
3524
|
(oe.classList.contains(Z.thumbsWrapper) || oe.classList.contains(Z.thumbsContainer)) && ve(H);
|
|
3525
3525
|
};
|
|
3526
|
-
|
|
3526
|
+
Ae(() => {
|
|
3527
3527
|
if (!e) return;
|
|
3528
3528
|
const H = (oe) => {
|
|
3529
3529
|
var E, z;
|
|
@@ -3540,7 +3540,7 @@ const Oc = ({ settings: e, content: t, styles: n, portalId: r, activeEvent: i, i
|
|
|
3540
3540
|
return window.addEventListener("keydown", H), () => {
|
|
3541
3541
|
window.removeEventListener("keydown", H);
|
|
3542
3542
|
};
|
|
3543
|
-
}, [e, U, n.length]),
|
|
3543
|
+
}, [e, U, n.length]), Ae(() => {
|
|
3544
3544
|
if (e) {
|
|
3545
3545
|
if ($(0), f((oe) => oe + 1), W.current = !1, S(!1), y(!1), O({}), !K) return;
|
|
3546
3546
|
const H = new CustomEvent("page-overlay", { detail: { itemId: K } });
|
|
@@ -3549,9 +3549,9 @@ const Oc = ({ settings: e, content: t, styles: n, portalId: r, activeEvent: i, i
|
|
|
3549
3549
|
return () => {
|
|
3550
3550
|
V.current && ee.current && (V.current.removeEventListener("animationend", ee.current), ee.current = null), y(!1);
|
|
3551
3551
|
};
|
|
3552
|
-
}, [e, K]),
|
|
3552
|
+
}, [e, K]), Ae(() => {
|
|
3553
3553
|
P.current !== null && P.current !== I.type && f((H) => H + 1), P.current = I.type;
|
|
3554
|
-
}, [I.type]),
|
|
3554
|
+
}, [I.type]), Ae(() => {
|
|
3555
3555
|
if (!e) return;
|
|
3556
3556
|
const H = document.body.style.overflow, oe = window.matchMedia("(max-width: 768px)").matches, E = gi(J.color);
|
|
3557
3557
|
document.body.style.overflow = "hidden", y(!1);
|
|
@@ -3566,7 +3566,7 @@ const Oc = ({ settings: e, content: t, styles: n, portalId: r, activeEvent: i, i
|
|
|
3566
3566
|
return document.addEventListener("touchmove", q, { passive: !1 }), () => {
|
|
3567
3567
|
document.body.style.overflow = H, document.removeEventListener("touchmove", q), V.current && k.current && (V.current.removeEventListener("animationend", k.current), k.current = null), y(!1);
|
|
3568
3568
|
};
|
|
3569
|
-
}, [e, o, J.color, I.type]),
|
|
3569
|
+
}, [e, o, J.color, I.type]), Ae(() => {
|
|
3570
3570
|
if (!e) return;
|
|
3571
3571
|
const H = (oe) => {
|
|
3572
3572
|
var z, q;
|
|
@@ -3611,7 +3611,7 @@ const Oc = ({ settings: e, content: t, styles: n, portalId: r, activeEvent: i, i
|
|
|
3611
3611
|
};
|
|
3612
3612
|
}, [e, U, b, n]);
|
|
3613
3613
|
const we = (I.type === "scale" || I.type === "fade") && I.direction === "vert" && Q.type === "drag";
|
|
3614
|
-
|
|
3614
|
+
Ae(() => {
|
|
3615
3615
|
var be, Oe;
|
|
3616
3616
|
if (!e || !we || !((Oe = (be = C.current) == null ? void 0 : be.splide) != null && Oe.root)) return;
|
|
3617
3617
|
const H = C.current.splide.root, oe = 30, E = (ie, Ce) => {
|
|
@@ -3799,7 +3799,7 @@ const Oc = ({ settings: e, content: t, styles: n, portalId: r, activeEvent: i, i
|
|
|
3799
3799
|
const H = mr(J.closeIconAlign, J.closeIconOffset, o), oe = `scale(${J.closeIconScale})`, E = H.transform ? `${H.transform} ${oe}` : oe;
|
|
3800
3800
|
return /* @__PURE__ */ l("button", { className: Z.closeButton, style: { ...H, transform: E }, onClick: U, "aria-label": "Close lightbox", children: /* @__PURE__ */ l(qt, { url: J.closeIconUrl, fill: J.closeIconColor ?? "#000000", hoverFill: J.closeIconHover ?? "#cccccc" }) });
|
|
3801
3801
|
})(),
|
|
3802
|
-
he && he.isActive && r.imageCaption && ((
|
|
3802
|
+
he && he.isActive && r.imageCaption && ((Ie = n[b]) == null ? void 0 : Ie.imageCaption) && /* @__PURE__ */ l(
|
|
3803
3803
|
"div",
|
|
3804
3804
|
{
|
|
3805
3805
|
className: Z.caption,
|
|
@@ -5248,7 +5248,7 @@ function Vc({ settings: e, isEditor: t, isEditMode: n, isPreviewMode: r, metadat
|
|
|
5248
5248
|
statusLetterSpacing: Pe,
|
|
5249
5249
|
statusWordSpacing: we,
|
|
5250
5250
|
statusTextAppearance: Ee,
|
|
5251
|
-
successMessage:
|
|
5251
|
+
successMessage: Ie,
|
|
5252
5252
|
errorMessage: H,
|
|
5253
5253
|
stateOverrides: oe
|
|
5254
5254
|
} = e, E = u === "B", z = w.slice(0, Math.min(d, w.length)), q = {
|
|
@@ -5475,7 +5475,7 @@ function Vc({ settings: e, isEditor: t, isEditMode: n, isPreviewMode: r, metadat
|
|
|
5475
5475
|
{
|
|
5476
5476
|
className: `${a}-success`,
|
|
5477
5477
|
style: { ...Me },
|
|
5478
|
-
children:
|
|
5478
|
+
children: Ie
|
|
5479
5479
|
}
|
|
5480
5480
|
),
|
|
5481
5481
|
Mt === "error" && /* @__PURE__ */ l(
|
|
@@ -7013,7 +7013,7 @@ const Zc = ({ settings: e, isEditor: t, isPreviewMode: n, metadata: r, activeEve
|
|
|
7013
7013
|
for (const Ce of Q)
|
|
7014
7014
|
(I[Ce.name] ?? "").trim().length > 0 || (ie = ie ?? { ...I }, ie[Ce.name] = "Filled");
|
|
7015
7015
|
return ie ?? I;
|
|
7016
|
-
}, [ce, I, Q]), K = xe === "error" ? Lr(Q, B) : null, U = i && i !== "default" ? `${s}-state-${i}` : "", se = Q.some((ie) => (B[ie.name] ?? "").trim().length > 0), ve = U !== `${s}-state-filled` && se ? `${s}-state-filled` : "", Pe = `${U} ${ve}`.trim(), we = r == null ? void 0 : r.submitUrl, Ee = u ?? "",
|
|
7016
|
+
}, [ce, I, Q]), K = xe === "error" ? Lr(Q, B) : null, U = i && i !== "default" ? `${s}-state-${i}` : "", se = Q.some((ie) => (B[ie.name] ?? "").trim().length > 0), ve = U !== `${s}-state-filled` && se ? `${s}-state-filled` : "", Pe = `${U} ${ve}`.trim(), we = r == null ? void 0 : r.submitUrl, Ee = u ?? "", Ie = (a == null ? void 0 : a.icon) ?? "", H = (a == null ? void 0 : a.mode) === "On", oe = Ee || "Submit", E = {
|
|
7017
7017
|
fontSettings: {
|
|
7018
7018
|
fontFamily: w,
|
|
7019
7019
|
fontWeight: (v == null ? void 0 : v.fontWeight) ?? 400,
|
|
@@ -7152,10 +7152,10 @@ const Zc = ({ settings: e, isEditor: t, isPreviewMode: n, metadata: r, activeEve
|
|
|
7152
7152
|
paddingBottom: L(A.bottom, t),
|
|
7153
7153
|
pointerEvents: o ? "auto" : void 0
|
|
7154
7154
|
},
|
|
7155
|
-
children: g === "submitting" ? "..." : H ?
|
|
7155
|
+
children: g === "submitting" ? "..." : H ? Ie && /* @__PURE__ */ l(
|
|
7156
7156
|
qt,
|
|
7157
7157
|
{
|
|
7158
|
-
url:
|
|
7158
|
+
url: Ie,
|
|
7159
7159
|
className: `${s}-submitBtnIcon`,
|
|
7160
7160
|
style: { maxWidth: L(V ?? 0, t) },
|
|
7161
7161
|
fill: `var(--${s}-button-text-color)`,
|
|
@@ -8533,28 +8533,28 @@ const ld = 30, cd = 20, to = 2, dd = 2, ud = (e, t) => Array.from({ length: t },
|
|
|
8533
8533
|
), he = F ? dd : 1;
|
|
8534
8534
|
yt(() => {
|
|
8535
8535
|
j.current = 0, D({}), A.current = null, te(to), P(0);
|
|
8536
|
-
}, [Q]),
|
|
8536
|
+
}, [Q]), Ae(() => {
|
|
8537
8537
|
if (!b || p !== "randomize") return;
|
|
8538
8538
|
const K = y.current;
|
|
8539
8539
|
if (!K) return;
|
|
8540
8540
|
const U = (we) => {
|
|
8541
8541
|
D((Ee) => {
|
|
8542
|
-
let
|
|
8542
|
+
let Ie = null;
|
|
8543
8543
|
for (const H of we)
|
|
8544
|
-
H in Ee && (md(K, H) || (
|
|
8545
|
-
return
|
|
8544
|
+
H in Ee && (md(K, H) || (Ie || (Ie = { ...Ee }), delete Ie[H]));
|
|
8545
|
+
return Ie ?? Ee;
|
|
8546
8546
|
});
|
|
8547
8547
|
}, se = new IntersectionObserver((we) => {
|
|
8548
8548
|
const Ee = /* @__PURE__ */ new Set();
|
|
8549
|
-
for (const
|
|
8550
|
-
const H =
|
|
8549
|
+
for (const Ie of we) {
|
|
8550
|
+
const H = Ie.target.dataset.marqueeItemIndex, oe = H !== void 0 ? Number(H) : NaN;
|
|
8551
8551
|
Number.isNaN(oe) || Ee.add(oe);
|
|
8552
8552
|
}
|
|
8553
8553
|
Ee.size > 0 && U(Ee);
|
|
8554
8554
|
}, { root: K, threshold: 0 });
|
|
8555
8555
|
Object.keys(R).forEach((we) => {
|
|
8556
8556
|
const Ee = Number(we);
|
|
8557
|
-
K.querySelectorAll(`[data-marquee-item-index="${Ee}"]`).forEach((
|
|
8557
|
+
K.querySelectorAll(`[data-marquee-item-index="${Ee}"]`).forEach((Ie) => se.observe(Ie));
|
|
8558
8558
|
});
|
|
8559
8559
|
let ve = 0;
|
|
8560
8560
|
const Pe = () => {
|
|
@@ -8570,9 +8570,9 @@ const ld = 30, cd = 20, to = 2, dd = 2, ud = (e, t) => Array.from({ length: t },
|
|
|
8570
8570
|
if (!K || !U) return;
|
|
8571
8571
|
let se = 0;
|
|
8572
8572
|
const ve = () => {
|
|
8573
|
-
const Ee = K.getBoundingClientRect().width,
|
|
8574
|
-
if (A.current =
|
|
8575
|
-
const E =
|
|
8573
|
+
const Ee = K.getBoundingClientRect().width, Ie = U.getBoundingClientRect().width, H = A.current, oe = typeof H == "number" && Math.abs(H - Ie) <= 0.25;
|
|
8574
|
+
if (A.current = Ie, x && Ie > 0 && I > 0) {
|
|
8575
|
+
const E = Ie / I;
|
|
8576
8576
|
if (E > 0 && Ee > 0) {
|
|
8577
8577
|
const z = Math.max(
|
|
8578
8578
|
to,
|
|
@@ -8584,11 +8584,11 @@ const ld = 30, cd = 20, to = 2, dd = 2, ud = (e, t) => Array.from({ length: t },
|
|
|
8584
8584
|
}
|
|
8585
8585
|
}
|
|
8586
8586
|
}
|
|
8587
|
-
if (
|
|
8588
|
-
P(
|
|
8587
|
+
if (Ie > 0 && C <= 0) {
|
|
8588
|
+
P(Ie);
|
|
8589
8589
|
return;
|
|
8590
8590
|
}
|
|
8591
|
-
oe &&
|
|
8591
|
+
oe && Ie !== C ? P(Ie) : !oe && C <= 0 && (cancelAnimationFrame(se), se = requestAnimationFrame(ve));
|
|
8592
8592
|
}, Pe = () => {
|
|
8593
8593
|
cancelAnimationFrame(se), se = requestAnimationFrame(ve);
|
|
8594
8594
|
};
|
|
@@ -9936,7 +9936,7 @@ const bd = 30, yi = 2, xd = ({ settings: e, content: t, isEditor: n, isPreviewMo
|
|
|
9936
9936
|
q.disconnect();
|
|
9937
9937
|
};
|
|
9938
9938
|
}, [ce, Ee, t, we]);
|
|
9939
|
-
const
|
|
9939
|
+
const Ie = ce ? { textMinHeightPx: I, captionMinHeightPx: g } : void 0, H = ce ? /* @__PURE__ */ l(
|
|
9940
9940
|
"div",
|
|
9941
9941
|
{
|
|
9942
9942
|
ref: Q,
|
|
@@ -9965,7 +9965,7 @@ const bd = 30, yi = 2, xd = ({ settings: e, content: t, isEditor: n, isPreviewMo
|
|
|
9965
9965
|
willChange: "transform"
|
|
9966
9966
|
},
|
|
9967
9967
|
children: [
|
|
9968
|
-
we(E, `card-${z}`,
|
|
9968
|
+
we(E, `card-${z}`, Ie),
|
|
9969
9969
|
S && /* @__PURE__ */ l(
|
|
9970
9970
|
"div",
|
|
9971
9971
|
{
|
|
@@ -11316,7 +11316,7 @@ const Td = 3e3, Ld = ({ settings: e, content: t, isEditor: n, isPreviewMode: r,
|
|
|
11316
11316
|
return "left";
|
|
11317
11317
|
}
|
|
11318
11318
|
}, [a]);
|
|
11319
|
-
|
|
11319
|
+
Ae(() => {
|
|
11320
11320
|
F(0), M(null), T(!1);
|
|
11321
11321
|
}, [o.length]);
|
|
11322
11322
|
const _ = o[f], W = S === null ? null : o[S], V = (ne) => {
|
|
@@ -11348,7 +11348,7 @@ const Td = 3e3, Ld = ({ settings: e, content: t, isEditor: n, isPreviewMode: r,
|
|
|
11348
11348
|
}, [I, te, o.length]), J = ft(() => {
|
|
11349
11349
|
I && F((ne) => te(ne, (ne + 1) % o.length));
|
|
11350
11350
|
}, [I, te, o.length]);
|
|
11351
|
-
|
|
11351
|
+
Ae(() => {
|
|
11352
11352
|
if (!x || !I) return;
|
|
11353
11353
|
const ne = Math.max(300, Td / c), ce = window.setInterval(() => {
|
|
11354
11354
|
F((B) => te(B, (B + 1) % o.length));
|
|
@@ -11356,7 +11356,7 @@ const Td = 3e3, Ld = ({ settings: e, content: t, isEditor: n, isPreviewMode: r,
|
|
|
11356
11356
|
return () => {
|
|
11357
11357
|
window.clearInterval(ce);
|
|
11358
11358
|
};
|
|
11359
|
-
}, [x, I, te, o.length, c]),
|
|
11359
|
+
}, [x, I, te, o.length, c]), Ae(() => () => {
|
|
11360
11360
|
O.current && window.clearTimeout(O.current);
|
|
11361
11361
|
}, []);
|
|
11362
11362
|
const he = (ne, ce) => {
|
|
@@ -12770,21 +12770,21 @@ function Rd({ images: e, index: t, imageDisplay: n, originRect: r, reverseClose:
|
|
|
12770
12770
|
p({ width: N, height: V, left: _.left + (W - N) / 2, top: _.top });
|
|
12771
12771
|
}
|
|
12772
12772
|
}, [n]);
|
|
12773
|
-
|
|
12773
|
+
Ae(() => {
|
|
12774
12774
|
F();
|
|
12775
12775
|
const C = w.current;
|
|
12776
12776
|
if (!C) return;
|
|
12777
12777
|
const P = new ResizeObserver(() => F());
|
|
12778
12778
|
return P.observe(C), () => P.disconnect();
|
|
12779
|
-
}, [F, t]),
|
|
12779
|
+
}, [F, t]), Ae(() => {
|
|
12780
12780
|
m === "opening" && h && b("open");
|
|
12781
|
-
}, [m, h]),
|
|
12781
|
+
}, [m, h]), Ae(() => {
|
|
12782
12782
|
if (m !== "closing") return;
|
|
12783
12783
|
const C = setTimeout(() => s(), Ht);
|
|
12784
12784
|
return () => clearTimeout(C);
|
|
12785
|
-
}, [m, s]),
|
|
12785
|
+
}, [m, s]), Ae(() => {
|
|
12786
12786
|
f.current !== t && x(!1), f.current = t;
|
|
12787
|
-
}, [t]),
|
|
12787
|
+
}, [t]), Ae(() => {
|
|
12788
12788
|
const C = (P) => {
|
|
12789
12789
|
P.key === "Escape" && (P.preventDefault(), P.stopPropagation(), m !== "closing" && b("closing"));
|
|
12790
12790
|
};
|
|
@@ -13040,7 +13040,7 @@ function Md({ settings: e, content: t, isEditor: n, isPreviewMode: r, isEditMode
|
|
|
13040
13040
|
wordSpacing: le ?? 0,
|
|
13041
13041
|
textAppearance: xe,
|
|
13042
13042
|
color: O
|
|
13043
|
-
},
|
|
13043
|
+
}, Ie = {
|
|
13044
13044
|
...St(rt(we, n)),
|
|
13045
13045
|
...ro(g, J, a, n)
|
|
13046
13046
|
}, H = no(
|
|
@@ -13078,7 +13078,7 @@ function Md({ settings: e, content: t, isEditor: n, isPreviewMode: r, isEditMode
|
|
|
13078
13078
|
height: "auto",
|
|
13079
13079
|
maxWidth: "100%"
|
|
13080
13080
|
}, [Gt, Ct] = de("ltr"), [Nt, On] = de(0), Se = Te(null);
|
|
13081
|
-
|
|
13081
|
+
Ae(() => {
|
|
13082
13082
|
const Re = Se.current;
|
|
13083
13083
|
if (!Re) return;
|
|
13084
13084
|
const ut = new ResizeObserver((pt) => {
|
|
@@ -13094,13 +13094,13 @@ function Md({ settings: e, content: t, isEditor: n, isPreviewMode: r, isEditMode
|
|
|
13094
13094
|
const Y = Re.currentTarget.getBoundingClientRect();
|
|
13095
13095
|
cr({ top: Y.top, left: Y.left, width: Y.width, height: Y.height }), lr(ut), yn(pt), Ke(!0);
|
|
13096
13096
|
};
|
|
13097
|
-
|
|
13097
|
+
Ae(() => {
|
|
13098
13098
|
if (!Qe || p !== "on" || typeof document > "u") return;
|
|
13099
13099
|
const Re = document.body.style.overflow;
|
|
13100
13100
|
return document.body.style.overflow = "hidden", () => {
|
|
13101
13101
|
document.body.style.overflow = Re;
|
|
13102
13102
|
};
|
|
13103
|
-
}, [Qe, p]),
|
|
13103
|
+
}, [Qe, p]), Ae(() => {
|
|
13104
13104
|
!n || r || (Ke(!1), cr(null));
|
|
13105
13105
|
}, [n, r]);
|
|
13106
13106
|
const Gr = He(() => kd(a), [a]);
|
|
@@ -13310,7 +13310,7 @@ function Md({ settings: e, content: t, isEditor: n, isPreviewMode: r, isEditMode
|
|
|
13310
13310
|
onPrev: () => yn((Re) => (Re - 1 + dt.length) % dt.length),
|
|
13311
13311
|
onNext: () => yn((Re) => (Re + 1) % dt.length),
|
|
13312
13312
|
counterClassName: q,
|
|
13313
|
-
counterStyle:
|
|
13313
|
+
counterStyle: Ie
|
|
13314
13314
|
}
|
|
13315
13315
|
) }),
|
|
13316
13316
|
document.body
|
|
@@ -15214,7 +15214,7 @@ function qd({
|
|
|
15214
15214
|
style: n
|
|
15215
15215
|
}) {
|
|
15216
15216
|
const r = Te(null);
|
|
15217
|
-
return
|
|
15217
|
+
return Ae(() => {
|
|
15218
15218
|
if (!e.isVideo) return;
|
|
15219
15219
|
const i = r.current;
|
|
15220
15220
|
if (!i) return;
|
|
@@ -16292,9 +16292,9 @@ function Lu({ settings: e, content: t, isEditor: n, isPreviewMode: r, isEditMode
|
|
|
16292
16292
|
for (; Le && !Le.style.getPropertyValue("--cntrl-article-width"); )
|
|
16293
16293
|
Le = Le.parentElement;
|
|
16294
16294
|
return Le && ye.observe(Le), () => ye.disconnect();
|
|
16295
|
-
}, [n, o]),
|
|
16295
|
+
}, [n, o]), Ae(() => {
|
|
16296
16296
|
j(void 0);
|
|
16297
|
-
}, [$, x, t, h]),
|
|
16297
|
+
}, [$, x, t, h]), Ae(() => {
|
|
16298
16298
|
n && !r && j(void 0);
|
|
16299
16299
|
}, [n, r]);
|
|
16300
16300
|
const Pe = Jn(a, {
|
|
@@ -16304,8 +16304,8 @@ function Lu({ settings: e, content: t, isEditor: n, isPreviewMode: r, isEditMode
|
|
|
16304
16304
|
textHoverColor: R,
|
|
16305
16305
|
backgroundHoverColor: D,
|
|
16306
16306
|
dividerHoverColor: N
|
|
16307
|
-
}, cu, du), we = s && s !== "default" ? `${a}-state-${s}` : "",
|
|
16308
|
-
|
|
16307
|
+
}, cu, du), we = s && s !== "default" ? `${a}-state-${s}` : "", Ie = `${!n || r ? y === "default" ? `${a}-entry-hover-default` : y === "blinds" ? `${a}-entry-hover-blinds` : y === "reveal" ? `${a}-entry-hover-reveal` : "" : ""} ${we}`.trim(), H = y === "reveal" && (!n || r), oe = (b == null ? void 0 : b[0]) ?? !1, E = (b == null ? void 0 : b[1]) ?? !1, z = Te(e), q = Te(o);
|
|
16308
|
+
Ae(() => {
|
|
16309
16309
|
if (!c || !n) {
|
|
16310
16310
|
z.current = e, q.current = o;
|
|
16311
16311
|
return;
|
|
@@ -16615,7 +16615,7 @@ function Lu({ settings: e, content: t, isEditor: n, isPreviewMode: r, isEditMode
|
|
|
16615
16615
|
"div",
|
|
16616
16616
|
{
|
|
16617
16617
|
ref: J,
|
|
16618
|
-
className: `${a}-wrapper ${
|
|
16618
|
+
className: `${a}-wrapper ${Ie}${Ft ? ` ${Ft}` : ""}${g ? ` ${a}-type-b` : ""}`.trim(),
|
|
16619
16619
|
style: {
|
|
16620
16620
|
width: L(v ?? 0, n),
|
|
16621
16621
|
...!g && u ? { [`--${a}-first-entry-handle-top`]: Nt } : {}
|
|
@@ -21006,6 +21006,12 @@ function Yu(e) {
|
|
|
21006
21006
|
color: var(--${e}-question-color);
|
|
21007
21007
|
font: inherit;
|
|
21008
21008
|
padding-left: 0;
|
|
21009
|
+
outline: none;
|
|
21010
|
+
-webkit-tap-highlight-color: transparent;
|
|
21011
|
+
}
|
|
21012
|
+
.${e}-question-button:focus,
|
|
21013
|
+
.${e}-question-button:focus-visible {
|
|
21014
|
+
outline: none;
|
|
21009
21015
|
}
|
|
21010
21016
|
.${e}-question-row {
|
|
21011
21017
|
display: flex;
|
|
@@ -21201,10 +21207,12 @@ function Xu({ settings: e, content: t, isEditor: n, isPreviewMode: r, isEditMode
|
|
|
21201
21207
|
answerPaddingTop: le = 0,
|
|
21202
21208
|
answerPaddingBottom: xe = 0
|
|
21203
21209
|
} = e, ne = t ?? [], [ce, B] = de(() => /* @__PURE__ */ new Set()), K = !n || r;
|
|
21204
|
-
|
|
21210
|
+
Ae(() => {
|
|
21205
21211
|
B(/* @__PURE__ */ new Set());
|
|
21206
|
-
}, [h])
|
|
21207
|
-
|
|
21212
|
+
}, [h]), Ae(() => {
|
|
21213
|
+
n && !i && !r && B(/* @__PURE__ */ new Set());
|
|
21214
|
+
}, [n, i, r]);
|
|
21215
|
+
const U = (me) => L(me, n ?? !1), se = Math.max(I, Xt), ve = Math.max(te, Xt), Pe = Math.max(g, Xt), we = Math.max(J, Xt), Ee = Math.max(he, Xt), Ie = Math.max(le, Xt), H = Math.max(xe, Xt), oe = Math.max(0, (a ?? 1) - b - m), E = Math.max(0, (a ?? 1) - he), z = Math.max(0, (a ?? 1) - J), q = Math.max(b, Xt), G = Math.max(0, (a ?? 1) - I - m), ae = He(() => ce.size === 0 ? 0 : Math.min(...ce), [ce]), ge = ft((me) => ce.has(me), [ce]), Ne = K && v === "default" ? `${o}-entry-hover-default` : "", fe = p ?? "", be = fe !== "", Oe = $.replace(/^rotate /, ""), ie = `${o}-icon-anim-${Oe}`, Ce = St(rt(
|
|
21208
21216
|
Bi(
|
|
21209
21217
|
C,
|
|
21210
21218
|
P,
|
|
@@ -21436,7 +21444,7 @@ function Xu({ settings: e, content: t, isEditor: n, isPreviewMode: r, isEditMode
|
|
|
21436
21444
|
top: 0,
|
|
21437
21445
|
left: 0,
|
|
21438
21446
|
width: "100%",
|
|
21439
|
-
height: U(
|
|
21447
|
+
height: U(Ie),
|
|
21440
21448
|
zIndex: 2
|
|
21441
21449
|
}
|
|
21442
21450
|
}
|
|
@@ -21768,6 +21776,12 @@ function getCSS(P: string): string {
|
|
|
21768
21776
|
color: var(--\${P}-question-color);
|
|
21769
21777
|
font: inherit;
|
|
21770
21778
|
padding-left: 0;
|
|
21779
|
+
outline: none;
|
|
21780
|
+
-webkit-tap-highlight-color: transparent;
|
|
21781
|
+
}
|
|
21782
|
+
.\${P}-question-button:focus,
|
|
21783
|
+
.\${P}-question-button:focus-visible {
|
|
21784
|
+
outline: none;
|
|
21771
21785
|
}
|
|
21772
21786
|
.\${P}-question-row {
|
|
21773
21787
|
display: flex;
|
|
@@ -21983,6 +21997,12 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
|
|
|
21983
21997
|
useEffect(() => {
|
|
21984
21998
|
setOpenIndices(new Set());
|
|
21985
21999
|
}, [autoclose]);
|
|
22000
|
+
|
|
22001
|
+
useEffect(() => {
|
|
22002
|
+
if (isEditor && !isEditMode && !isPreviewMode) {
|
|
22003
|
+
setOpenIndices(new Set());
|
|
22004
|
+
}
|
|
22005
|
+
}, [isEditor, isEditMode, isPreviewMode]);
|
|
21986
22006
|
const scaled = (value: number) => scalingValue(value, isEditor ?? false);
|
|
21987
22007
|
const questionPaddingLeftWidth = Math.max(questionPaddingLeft, PADDING_HANDLE_SIZE);
|
|
21988
22008
|
const questionPaddingTopHeight = Math.max(questionPaddingTop, PADDING_HANDLE_SIZE);
|