@cntrl-site/components 1.0.107-alpha.5 → 1.0.107-alpha.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cntrl-site/components",
3
- "version": "1.0.107-alpha.5",
3
+ "version": "1.0.107-alpha.6",
4
4
  "description": "Custom components for control editor and public websites.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -1,203 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),a=require("react"),jt=require("react-dom"),x=require("classnames"),Ft=require("./scalingValue-CSHYgTZl.js"),Ht=require("./buildColorVars-CE2D5cQV.js"),Ut=require("./useScopedStyles-Bf6yohVQ.js"),Vt=require("./LinkWrapper-CzFwFtgU.js"),W=require("./textStylesToCss-CNN3zZTV.js"),kt=require("./useLightboxScrollLock-Hf16Eq4g.js"),Ke=1,re=2,Xe=5,Ye=["title2","title3","title4"],H=["column1Width","column2Width","column3Width","column4Width"],oe={center:{x:"50%",y:"50%"},"left-top":{x:"0%",y:"0%"},"top-center":{x:"50%",y:"0%"},"top-right":{x:"100%",y:"0%"},"left-center":{x:"0%",y:"50%"},"right-center":{x:"100%",y:"50%"},"left-bottom":{x:"0%",y:"100%"},"bottom-center":{x:"50%",y:"100%"},"right-bottom":{x:"100%",y:"100%"}},Dt=Object.keys(oe),Ze=["column1","column2","column3","column4","column5"],zt={triggerColor:"trigger-color",triggerHoverColor:"trigger-hover-color",closeColor:"close-color",closeHoverColor:"close-hover-color",panelColor:"panel-color",textColor:"text-color",textHoverColor:"text-hover-color",overlayColor:"overlay-color"},Wt=["hover","open"],F=300,Je=.004,We=.004,Bt=20,Qe=.0139,Pe=.3194,et={top:.00972,right:.00972,bottom:.00972,left:.00972},ne=300,qt=1e3,Gt=["--cntrl-article-width","--cntrl-article-top","--cntrl-article-left","--cntrl-viewport-height"];function B(e){return Math.min(Math.max(Math.round(e??re),Ke),Xe)}function tt(e){const{panelWidth:o=Pe,panelPadding:n=et,columnGap:i=Qe}=e,l=(B(e.columns)-1)*i;return Math.max(0,o-n.left-n.right-l)}function ot(e){const o=B(e.columns),n=tt(e)/o;return Object.fromEntries(H.slice(0,o-1).map(i=>[i,n]))}function nt(e){const o=B(e.columns),n=tt(e),i=H.slice(0,o-1).map(m=>{const f=e[m];return typeof f=="number"?Math.max(0,f):n/o}),l=i.reduce((m,f)=>m+f,0),u=l>n?n/l:1;return[...i.map(m=>m*u),Math.max(0,n-l*u)]}function Kt(e,o){return typeof e.columns!="number"||e.columns===o.columns?e:{...e,...ot({...o,...e})}}function Xt(e){const o=e.reduce((n,i)=>n+i,0);return e.map(n=>`minmax(0, ${o>0?n/o*100:1}fr)`).join(" ")}function rt(e){const o=[];return e.forEach((n,i)=>{var p;const l=((p=n.group)==null?void 0:p.trim())??"",u=o[o.length-1];if(!u||l!==""&&l!==u.label){o.push({label:l,rows:[{item:n,index:i}]});return}u.rows.push({item:n,index:i})}),o}function A(e){const{image:o}=e??{};return(Array.isArray(o)?o:o?[o]:[]).filter(n=>!!(n!=null&&n.assetId))}function Yt(e){if(!Array.isArray(e))return e??"";const o=n=>n.text??(n.children??[]).map(o).join("");return e.map(o).join(`
2
- `)}function Be(e,o,n){return`${e}-${o}-${n}`}function at(e){return e.type==="video"?!0:e.type==="image"?!1:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.name??"")||/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.assetId)}function Zt(e){let o=e;for(;o;){if(getComputedStyle(o).getPropertyValue("--cntrl-article-width").trim())return o;o=o.parentElement}return e}function qe(e){const o={},n=Zt(e);if(!n)return o;const i=getComputedStyle(n);for(const l of Gt){const u=i.getPropertyValue(l).trim();u&&(o[l]=u)}return o}function Ge(e,o,n){const i=e,l=p=>i[`${o}${p}`]??(n?i[`${n}${p}`]:void 0),u=l("FontSettings");return{fontSettings:{fontFamily:l("FontFamily"),fontWeight:(u==null?void 0:u.fontWeight)??400,fontStyle:(u==null?void 0:u.fontStyle)??"normal"},fontSize:l("FontSize")??.01,lineHeight:l("LineHeight"),letterSpacing:l("LetterSpacing")??0,wordSpacing:l("WordSpacing")??0,textAlign:l("TextAlign"),textAppearance:l("TextAppearance"),color:"#000000"}}function Jt(e){return`
3
- .${e}-trigger,
4
- .${e}-close {
5
- display: inline-block;
6
- margin: 0;
7
- padding: 0;
8
- border: 0;
9
- background: none;
10
- cursor: pointer;
11
- white-space: nowrap;
12
- transition: color 150ms ease;
13
- -webkit-appearance: none;
14
- appearance: none;
15
- -webkit-tap-highlight-color: transparent;
16
- }
17
- .${e}-trigger {
18
- color: var(--${e}-trigger-color);
19
- transition: color 150ms ease, opacity ${F}ms ease;
20
- }
21
- .${e}-trigger-hidden {
22
- opacity: 0;
23
- }
24
- .${e}-close {
25
- color: var(--${e}-close-color);
26
- }
27
- .${e}-trigger:focus,
28
- .${e}-close:focus {
29
- outline: none;
30
- }
31
- .${e}-trigger:focus-visible,
32
- .${e}-close:focus-visible {
33
- outline: 1px solid currentColor;
34
- outline-offset: 2px;
35
- }
36
- .${e}-interactive .${e}-trigger:hover,
37
- .${e}-state-hover .${e}-trigger {
38
- color: var(--${e}-trigger-hover-color, var(--${e}-trigger-color));
39
- }
40
- .${e}-close:hover {
41
- color: var(--${e}-close-hover-color, var(--${e}-close-color));
42
- }
43
- .${e}-editor .${e}-trigger {
44
- cursor: default;
45
- }
46
- .${e}-overlay {
47
- position: fixed;
48
- inset: 0;
49
- z-index: 9997;
50
- overflow: hidden;
51
- overscroll-behavior: none;
52
- opacity: 0;
53
- pointer-events: none;
54
- transition: opacity ${F}ms ease;
55
- }
56
- .${e}-inline-layer {
57
- position: fixed;
58
- inset: 0;
59
- z-index: 9997;
60
- overflow: hidden;
61
- pointer-events: none;
62
- }
63
- .${e}-overlay-editor {
64
- inset: auto;
65
- top: var(--cntrl-article-top, 0);
66
- left: var(--cntrl-article-left, 0);
67
- width: var(--cntrl-article-width, 100vw) !important;
68
- height: var(--cntrl-viewport-height, 100vh) !important;
69
- }
70
- .${e}-overlay-edit-mode {
71
- z-index: 1;
72
- }
73
- .${e}-overlay-active {
74
- opacity: 1;
75
- pointer-events: auto;
76
- }
77
- .${e}-backdrop {
78
- position: absolute;
79
- inset: 0;
80
- background-color: var(--${e}-overlay-color);
81
- }
82
- .${e}-media-layer {
83
- position: absolute;
84
- inset: 0;
85
- pointer-events: none;
86
- }
87
- .${e}-media {
88
- position: absolute;
89
- inset: 0;
90
- width: 100%;
91
- height: 100%;
92
- object-fit: cover;
93
- opacity: 0;
94
- }
95
- .${e}-media-contain {
96
- object-fit: contain;
97
- }
98
- /* The image replaced stays whole under the next until that is in, then goes at once, so neither the page nor an older
99
- image shows between them; only the image coming in and, as the list is left, those on screen fade. */
100
- .${e}-media-visible,
101
- .${e}-media-fading {
102
- transition: opacity ${ne}ms cubic-bezier(0, 0, 0.58, 1);
103
- }
104
- .${e}-media-visible {
105
- z-index: 1;
106
- opacity: 1;
107
- }
108
- .${e}-media-covered {
109
- opacity: 1;
110
- }
111
- .${e}-media-fading {
112
- opacity: 0;
113
- }
114
- .${e}-close {
115
- position: absolute;
116
- z-index: 2;
117
- }
118
- .${e}-panel {
119
- position: absolute;
120
- top: var(--${e}-panel-y);
121
- left: var(--${e}-panel-x);
122
- z-index: 1;
123
- box-sizing: border-box;
124
- max-width: 100%;
125
- max-height: 100%;
126
- overflow-y: auto;
127
- transform: translate(calc(-1 * var(--${e}-panel-x)), calc(-1 * var(--${e}-panel-y) + 12px));
128
- background-color: var(--${e}-panel-color);
129
- color: var(--${e}-text-color);
130
- overscroll-behavior: contain;
131
- transition: transform ${F}ms cubic-bezier(0, 0, 0.58, 1);
132
- }
133
- .${e}-overlay-active .${e}-panel {
134
- transform: translate(calc(-1 * var(--${e}-panel-x)), calc(-1 * var(--${e}-panel-y)));
135
- }
136
- .${e}-panel-settled {
137
- transition: none;
138
- }
139
- .${e}-panel-inline {
140
- position: relative;
141
- top: auto;
142
- left: auto;
143
- max-height: none;
144
- transform: none;
145
- transition: none;
146
- }
147
- .${e}-media-layer-instant .${e}-media {
148
- transition: none;
149
- }
150
- .${e}-panel-copy {
151
- position: absolute;
152
- pointer-events: none;
153
- }
154
- @media (prefers-reduced-motion: reduce) {
155
- .${e}-panel {
156
- transition: none;
157
- }
158
- }
159
- .${e}-group ~ .${e}-group {
160
- margin-top: var(--${e}-group-gap);
161
- }
162
- .${e}-group {
163
- display: grid;
164
- grid-template-columns: var(--${e}-grid-columns);
165
- column-gap: var(--${e}-column-gap);
166
- }
167
- .${e}-row {
168
- grid-column: 2 / -1;
169
- display: grid;
170
- grid-template-columns: subgrid;
171
- align-items: baseline;
172
- }
173
- a.${e}-row {
174
- color: inherit;
175
- text-decoration: none;
176
- }
177
- .${e}-group-unlabeled .${e}-row {
178
- grid-column: 1 / -1;
179
- }
180
- .${e}-group-label {
181
- grid-column: 1;
182
- align-self: start;
183
- min-width: 0;
184
- overflow-wrap: anywhere;
185
- }
186
- .${e}-title {
187
- min-width: 0;
188
- overflow-wrap: anywhere;
189
- white-space: pre-line;
190
- transition: color 150ms cubic-bezier(0, 0, 0.58, 1);
191
- }
192
- .${e}-control-anchor {
193
- position: absolute;
194
- pointer-events: none;
195
- z-index: 2;
196
- }
197
- .${e}-interactive .${e}-row:hover .${e}-title,
198
- .${e}-row:focus-visible .${e}-title,
199
- .${e}-panel-copy .${e}-row-active .${e}-title,
200
- .${e}-state-hover .${e}-row:first-of-type .${e}-title {
201
- color: var(--${e}-text-hover-color, var(--${e}-text-color));
202
- }
203
- `}function Qt({P:e,media:o,isVisible:n,isLoaded:i,isCovered:l,isFading:u,onLoad:p}){const m=a.useRef(null),f=at(o),r=x(`${e}-media`,o.objectFit==="contain"&&`${e}-media-contain`,n&&i&&`${e}-media-visible`,l&&`${e}-media-covered`,u&&`${e}-media-fading`);return a.useEffect(()=>{var I;const R=m.current;!f||!R||(n?(I=R.play())==null||I.catch(()=>{}):R.pause())},[f,n]),f?c.jsx("video",{ref:m,className:r,src:o.assetId,muted:!0,loop:!0,playsInline:!0,preload:"auto",onLoadedData:p}):c.jsx("img",{className:r,src:o.assetId,alt:"",decoding:"async",onLoad:p})}function Pt(e,o,n,i,l){const u=o[o.length-1];let p=n;return o.slice(0,-1).map((m,f)=>{const r=p+m+i/2;return p+=m+i,c.jsx("div",{"data-controls":H[f],"data-controls-axis":"x","data-controls-variant":"column-width","data-controls-min":String(Bt),"data-controls-max-fraction":String(m+u),className:`${e}-control-anchor`,style:{top:0,left:l(r-We/2),width:l(We),height:"100%"}},H[f])})}function eo(e,o,n,i){const l=u=>i(Math.max(u,Je));return c.jsxs(c.Fragment,{children:[c.jsx("div",{"data-controls":"panelPadding.top","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${e}-control-anchor`,style:{top:0,left:0,width:"100%",height:l(n.top)}}),c.jsx("div",{"data-controls":"panelPadding.bottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-reverse":"","data-controls-min":"0",className:`${e}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:l(n.bottom)}}),c.jsx("div",{"data-controls":"panelPadding.left","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Math.max(0,o-n.right)),className:`${e}-control-anchor`,style:{top:0,left:0,width:l(n.left),height:"100%"}}),c.jsx("div",{"data-controls":"panelPadding.right","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Math.max(0,o-n.left)),className:`${e}-control-anchor`,style:{top:0,right:0,width:l(n.right),height:"100%"}})]})}function to({settings:e,content:o,isEditor:n,isEditMode:i,isPreviewMode:l,activeEvent:u,portalId:p,currentState:m,unavailableStates:f}){var Ve,ke;const{prefix:r}=Ut.useScopedStyles(),{type:R="b",triggerLabel:I="Archive",closeLabel:lt="Close",columns:st=re,columnGap:ae=Qe,hoverInterval:le=qt,panelPosition:it,panelWidth:se=Pe,panelPadding:_=et,panelRadius:ct=0,groupGap:ie=.0139,triggerColor:ut="#000000",triggerHoverColor:dt="#666666",closeColor:pt="#000000",closeHoverColor:ft="#666666",panelColor:mt="#FFFFFF",textColor:gt="#333132",textHoverColor:ht="#BBBBBB",overlayColor:vt="#FFFFFFE6"}=e,U=o??[],q=a.useRef(null),G=a.useRef(null),K=a.useRef(null),ce=a.useRef(null),ue=a.useRef(null),de=a.useRef(null),[yt,V]=a.useState(!1),[M,pe]=a.useState(!1),[T,fe]=a.useState(!1),[me,ge]=a.useState(!1),[g,E]=a.useState(null),[he,ve]=a.useState(0),[ye,$t]=a.useState(()=>new Set),[$e,wt]=a.useState(()=>new Set),[k,we]=a.useState(null),[Ct,xt]=a.useState(null),Ce=a.useRef(null),[S,bt]=a.useState(null),[xe,be]=a.useState({}),[L,X]=a.useState(null),[St,Se]=a.useState(!1),O=!!(n&&!l),w=!n||!!l,v=R==="a",_t=O&&m==="open"&&!(f!=null&&f.includes("open")),C=!v&&(_t||(w||!!i)&&yt),y=t=>Ft.scalingValue(t,n??!1),Et=a.useMemo(()=>Jt(r),[r]),_e=oe[it]??oe.center,Y=B(st),Ee=nt(e),Lt=["title",...Ye].slice(0,Y-1),N=Y>1,At=a.useMemo(()=>N?rt(o??[]):[{label:"",rows:(o??[]).map((t,s)=>({item:t,index:s}))}],[o,N]);kt.useLightboxScrollLock(C&&!O),a.useEffect(()=>{O&&!i&&V(!1)},[O,i]),a.useEffect(()=>{if(C){be(qe(q.current)),pe(!0);return}fe(!1),E(null);const t=window.setTimeout(()=>pe(!1),F);return()=>window.clearTimeout(t)},[C]),a.useEffect(()=>{var s;if(!C||!M)return;(s=K.current)==null||s.getBoundingClientRect();const t=requestAnimationFrame(()=>fe(!0));return()=>cancelAnimationFrame(t)},[C,M]),a.useEffect(()=>{if(!T){ge(!1);return}const t=window.setTimeout(()=>ge(!0),F);return()=>window.clearTimeout(t)},[T]);const D=a.useCallback(()=>{const t=G.current,s=K.current;if(!t||!s)return;const h=t.getBoundingClientRect(),d=s.getBoundingClientRect();bt({top:h.top-d.top,left:h.left-d.left})},[]);a.useLayoutEffect(()=>{if(M)return D(),window.addEventListener("resize",D),()=>window.removeEventListener("resize",D)},[M,D]),a.useEffect(()=>{var s;if(!C||!w)return;(s=ce.current)==null||s.focus({preventScroll:!0});const t=h=>{h.key==="Escape"&&V(!1)};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[C,w]),a.useLayoutEffect(()=>{if(!v||g===null)return;const t=ue.current,s=de.current;if(!t||!s)return;const h=t.getBoundingClientRect(),d=s.getBoundingClientRect();X({top:h.top-d.top,left:h.left-d.left,width:h.width})},[v,g]),a.useEffect(()=>{if(g!==null)return;const t=window.setTimeout(()=>X(null),ne);return()=>window.clearTimeout(t)},[g]);const Le=L!==null;a.useEffect(()=>{if(!v||!Le)return;const t=()=>{Se(!0),E(null),X(null)};return document.addEventListener("scroll",t,{capture:!0,passive:!0}),window.addEventListener("resize",t),()=>{document.removeEventListener("scroll",t,{capture:!0}),window.removeEventListener("resize",t)}},[v,Le]);const Ae=()=>{var t;w&&(V(!1),(t=G.current)==null||t.focus({preventScroll:!0}))},Re=w&&(v||C);a.useEffect(()=>{Re&&(o??[]).forEach(t=>A(t).forEach(s=>{at(s)||(new Image().src=s.assetId)}))},[Re,o]);const Z=g===null?0:A(U[g]).length;a.useEffect(()=>{if(Z<2)return;const t=window.setInterval(()=>{ve(s=>(s+1)%Z)},Math.max(100,le));return()=>window.clearInterval(t)},[g,Z,le]);const Ie=g===null||(Ve=A(U[g])[he])==null?void 0:Ve.assetId,b=g!==null&&Ie!==void 0?Be(g,he,Ie):null,Me=b!==null&&$e.has(b);a.useLayoutEffect(()=>{const t=Ce.current;Ce.current=b,b!==null&&(xt(b),we(t))},[b]),a.useEffect(()=>{if(!Me||k===null)return;const t=window.setTimeout(()=>we(null),ne);return()=>window.clearTimeout(t)},[Me,k]);const Te=t=>{if(!w||A(U[t]).length===0){E(null);return}$t(s=>s.has(t)?s:new Set(s).add(t)),v&&g===null&&be(qe(q.current)),g!==t&&ve(0),Se(!1),E(t)},Oe=t=>{E(s=>s===t?null:s)},Rt=t=>{!w&&t.target.closest("a")&&t.preventDefault()},Ne=W.omitTextColors(W.textStylesToCss(Ge(e,"trigger"),n)),j=Ze.slice(0,Y).map(t=>W.omitTextColors(W.textStylesToCss(Ge(e,t,"list"),n))),je=j[0].lineHeight,Fe=(ke=j[1])==null?void 0:ke.lineHeight,It=je!==void 0&&Fe!==void 0?`calc((${Fe} - ${je}) / 2)`:void 0,J=Ht.buildColorVars(r,{triggerColor:ut,triggerHoverColor:dt,closeColor:pt,closeHoverColor:ft,panelColor:mt,textColor:gt,textHoverColor:ht,overlayColor:vt},zt,Wt),Q=u&&u!=="default"?`${r}-state-${u}`:"",P=w?`${r}-interactive`:"",He=c.jsx("div",{className:x(`${r}-media-layer`,St&&`${r}-media-layer-instant`),"aria-hidden":"true",children:[...ye].flatMap(t=>A(U[t]).map((s,h)=>{const d=Be(t,h,s.assetId);return c.jsx(Qt,{P:r,media:s,isVisible:d===b,isLoaded:$e.has(d),isCovered:d===k,isFading:b===null&&(d===Ct||d===k),onLoad:()=>wt($=>$.has(d)?$:new Set($).add(d))},d)}))}),ee=!!i&&(v||me),te=t=>c.jsxs("div",{ref:t?void 0:ue,className:x(`${r}-panel`,T&&me&&`${r}-panel-settled`,v&&`${r}-panel-inline`,t&&`${r}-panel-copy`),style:{width:y(se),paddingTop:y(_.top),paddingRight:y(_.right),paddingBottom:y(_.bottom),paddingLeft:y(_.left),borderRadius:y(ct),[`--${r}-group-gap`]:y(ie),[`--${r}-panel-x`]:_e.x,[`--${r}-panel-y`]:_e.y,[`--${r}-grid-columns`]:Xt(Ee),[`--${r}-column-gap`]:y(ae),...t&&L?{top:L.top,left:L.left,width:L.width}:{}},"data-lightbox-scrollable":v?void 0:"","aria-hidden":t||void 0,onMouseLeave:t?void 0:()=>E(null),onClickCapture:t?void 0:Rt,children:[!t&&ee&&eo(r,se,_,y),!t&&ee&&Pt(r,Ee,_.left,ae,y),At.map((s,h)=>c.jsxs(a.Fragment,{children:[!t&&ee&&h>0&&c.jsx("div",{"data-controls":"groupGap","data-controls-paired":"","data-controls-axis":"y","data-controls-reverse":"","data-controls-min":"0",className:`${r}-control-anchor`,style:{left:0,width:"100%",height:y(Math.max(ie,Je))}}),c.jsxs("div",{className:x(`${r}-group`,!N&&`${r}-group-unlabeled`),style:{gridTemplateRows:`repeat(${s.rows.length}, auto) 1fr`},children:[N&&c.jsx("span",{className:`${r}-group-label`,style:{...j[0],gridRow:`1 / span ${s.rows.length+1}`,marginTop:It},children:s.label}),s.rows.map(({item:d,index:$})=>{var De;const z=!t&&((De=d.link)!=null&&De.value)?d.link:void 0,Ot=z?"a":"div";return c.jsxs(Ot,{className:x(`${r}-row`,t&&$===g&&`${r}-row-active`),...z?{href:Vt.buildValidUrl(z.value),...z.target==="blank"&&{target:"_blank",rel:"noreferrer"}}:{},...t?{}:{onMouseEnter:()=>Te($),onMouseLeave:()=>Oe($),onFocus:()=>Te($),onBlur:()=>Oe($)},children:[!N&&c.jsx("div",{className:`${r}-title`,style:j[0],children:d.group}),Lt.map((ze,Nt)=>c.jsx("div",{className:`${r}-title`,style:j[Nt+1],children:Yt(d[ze])},ze))]},$)})]})]},h))]}),Mt=M?c.jsxs("div",{ref:K,className:x(`${r}-overlay`,n&&`${r}-overlay-editor`,i&&`${r}-overlay-edit-mode`,T&&`${r}-overlay-active`,P,Q),style:{...J,...xe},role:"dialog","aria-modal":"true","aria-label":I,"data-selection":"none",children:[c.jsx("div",{className:`${r}-backdrop`,"aria-hidden":"true",onClick:Ae}),He,c.jsx("button",{ref:ce,type:"button",className:`${r}-close`,style:{...Ne,top:(S==null?void 0:S.top)??0,left:(S==null?void 0:S.left)??0,visibility:S?"visible":"hidden"},onClick:Ae,children:lt}),te(!1)]}):null,Tt=v&&ye.size>0?c.jsxs("div",{ref:de,className:x(`${r}-inline-layer`,n&&`${r}-overlay-editor`,P,Q),style:{...J,...xe},"aria-hidden":"true","data-selection":"none",children:[He,L&&te(!0)]}):null,Ue=Mt??Tt;return c.jsxs(c.Fragment,{children:[c.jsx("style",{dangerouslySetInnerHTML:{__html:Et}}),c.jsx("div",{ref:q,className:x(O&&`${r}-editor`,P,Q),style:J,children:v?te(!1):c.jsx("button",{ref:G,type:"button",className:x(`${r}-trigger`,T&&`${r}-trigger-hidden`),style:Ne,"aria-haspopup":"dialog","aria-expanded":C,onClick:()=>{w&&V(!0)},children:I})}),Ue&&typeof document<"u"&&jt.createPortal(Ue,(p?document.getElementById(p):null)??document.body)]})}exports.ARCHIVE_POPUP_COLUMN_STYLE_PREFIXES=Ze;exports.ARCHIVE_POPUP_COLUMN_WIDTH_KEYS=H;exports.ARCHIVE_POPUP_DEFAULT_COLUMNS=re;exports.ARCHIVE_POPUP_EXTRA_TITLE_KEYS=Ye;exports.ARCHIVE_POPUP_MAX_COLUMNS=Xe;exports.ARCHIVE_POPUP_MIN_COLUMNS=Ke;exports.ARCHIVE_POPUP_PANEL_POSITIONS=Dt;exports.ArchivePopup=to;exports.applyArchivePopupColumnCountChange=Kt;exports.getArchivePopupEqualColumnWidths=ot;exports.getArchivePopupRowMedia=A;exports.groupArchiveRows=rt;exports.resolveArchivePopupColumnWidths=nt;