FileMaster
Search
Toggle Dark Mode
Home
/
.
/
wp-content
/
plugins
/
cozy-addons
/
cozy-blocks
/
dist
/
accordion
/
build
Edit File: index.js
(()=>{"use strict";var e,o={108:()=>{const e=window.wp.blocks,o=window.wp.i18n,t=window.wp.blockEditor,n=window.wp.components,l=window.React,a=window.wp.primitives,i=(0,l.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,l.createElement)(a.Path,{d:"M10 1c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16c-3.9 0-7-3.1-7-7s3.1-7 7-7 7 3.1 7 7-3.1 7-7 7zm1-11H9v3H6v2h3v3h2v-3h3V9h-3V6zM10 1c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16c-3.9 0-7-3.1-7-7s3.1-7 7-7 7 3.1 7 7-3.1 7-7 7zm1-11H9v3H6v2h3v3h2v-3h3V9h-3V6z"})),s=window.wp.data,r=window.wp.element;function c(e,o){return`\n #${e} {\n padding: ${o.containerStyles.padding.top}px ${o.containerStyles.padding.right}px ${o.containerStyles.padding.bottom}px ${o.containerStyles.padding.left}px;\n border-style: ${o.containerStyles.border.type};\n border-width: ${o.containerStyles.border.width.top}px ${o.containerStyles.border.width.right}px ${o.containerStyles.border.width.bottom}px ${o.containerStyles.border.width.left}px;\n border-color: ${o.containerStyles.border.color};\n border-radius: ${o.containerStyles.borderRadius.top}px ${o.containerStyles.borderRadius.right}px ${o.containerStyles.borderRadius.bottom}px ${o.containerStyles.borderRadius.left}px;\n background-color: ${o.containerStyles.bgColor};\n }\n\n #${e} .cozy-accordion-wrapper {\n row-gap: ${o.rowGap}px;\n }\n #${e} .cozy-block-accordion-item {\n padding: ${o.accordionStyles.padding.top}px ${o.accordionStyles.padding.right}px ${o.accordionStyles.padding.bottom}px ${o.accordionStyles.padding.left}px;\n border-style: ${o.accordionStyles.border.type};\n border-width: ${o.accordionStyles.border.width.top}px ${o.accordionStyles.border.width.right}px ${o.accordionStyles.border.width.bottom}px ${o.accordionStyles.border.width.left}px;\n border-color: ${o.accordionStyles.border.color};\n border-radius: ${o.accordionStyles.borderRadius.top}px ${o.accordionStyles.borderRadius.right}px ${o.accordionStyles.borderRadius.bottom}px ${o.accordionStyles.borderRadius.left}px;\n background-color: ${o.accordionStyles.bgColor};\n }\n\n #${e} .cozy-block-accordion-item .cozy-accordion-title {\n gap: ${o.icon?.gap};\n }\n #${e} .cozy-block-accordion-item .cozy-accordion-title * {\n font-weight: ${o.titleTypography.fontWeight};\n font-size: ${o.titleTypography.fontSize}px;\n font-family: ${o.titleTypography.fontFamily};\n color: ${o.titleTypography.color};\n }\n\n #${e} .cozy-block-accordion-item .cozy-accordion-content {\n font-weight: ${o.typography.fontWeight};\n font-size: ${o.typography.fontSize}px;\n font-family: ${o.typography.fontFamily};\n color: ${o.typography.color};\n }\n\n #${e} .cozy-accordion-title .accordion-icon-wrapper svg {\n width: ${o.icon.size}px;\n height: ${o.icon.size}px;\n opacity: ${o.icon.opacity};\n rotate: ${o.icon.rotate}deg;\n }\n #${e}.icon-view-stacked .cozy-accordion-title .accordion-icon-wrapper {\n padding: ${o.iconBoxStyles.padding.top}px ${o.iconBoxStyles.padding.right}px ${o.iconBoxStyles.padding.bottom}px ${o.iconBoxStyles.padding.left}px;\n border: ${o.iconBoxStyles.borderWidth}px ${o.iconBoxStyles.borderType} ${o.iconBoxStyles.borderColor};\n border-radius: ${o.iconBoxStyles.borderRadius}px;\n background-color: ${o.iconBoxStyles.bgColor};\n }\n #${e}.icon-view-stacked .cozy-accordion-title.active .accordion-icon-wrapper {\n background-color: ${o.iconBoxStyles.bgColorHover};\n border-color: ${o.iconBoxStyles.borderColorHover};\n }\n #${e}.icon-layout-fill .cozy-accordion-title .accordion-icon-wrapper svg {\n fill: ${o.icon.color};\n }\n #${e}.icon-layout-outline .cozy-accordion-title .accordion-icon-wrapper svg {\n stroke: ${o.icon.color};\n fill: none;\n }\n #${e}.icon-layout-fill .cozy-accordion-title.active .accordion-icon-wrapper svg {\n fill: ${o.icon.colorHover};\n rotate: ${o.icon.rotateActive}deg;\n }\n #${e}.icon-layout-outline .cozy-accordion-title.active .accordion-icon-wrapper svg {\n stroke: ${o.icon.colorHover};\n fill: none;\n transform: rotate(${o.icon.rotateActive}deg);\n }\n\n `}const d=[{label:(0,o.__)("Thin","cozy-addons"),value:100},{label:(0,o.__)("Extra Light","cozy-addons"),value:200},{label:(0,o.__)("Light","cozy-addons"),value:300},{label:(0,o.__)("Normal","cozy-addons"),value:400},{label:(0,o.__)("Medium","cozy-addons"),value:500},{label:(0,o.__)("Semi Bold","cozy-addons"),value:600},{label:(0,o.__)("Bold","cozy-addons"),value:700},{label:(0,o.__)("Extra Bold","cozy-addons"),value:800}],p=window.ReactJSXRuntime,y=()=>(0,p.jsx)(p.Fragment,{children:(0,p.jsxs)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",padding:"16px",marginBottom:"10px"},children:[(0,p.jsx)("p",{children:(0,p.jsxs)("svg",{width:"41",height:"48",viewBox:"0 0 41 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,p.jsx)("path",{d:"M0 34.7721L6.88004 38.677V15.8055L20.4542 7.80977L23.9872 9.4833L30.4953 5.57841L20.4542 -7.62939e-06L0 11.9006V34.7721Z",fill:"#38DAC7"}),(0,p.jsx)("path",{d:"M32.9284 6.87939L34.2126 7.61318L12.3825 19.904L12.1991 40.45L20.6376 45.8616L41.0001 33.6625V35.4969L20.6376 47.6043L10.8232 41.2755V18.9868L32.9284 6.87939Z",fill:"#5566CA"}),(0,p.jsx)("path",{d:"M37.6063 9.53936L36.2305 8.71385L14.217 21.3716V38.9824L20.5459 43.5685L41.0001 31.3694V29.5349L20.5459 41.8258L15.5928 38.2486V22.1054L37.6063 9.53936Z",fill:"#5566CA"}),(0,p.jsx)("path",{d:"M41.0001 11.3738L39.5325 10.5483L17.3356 23.2061V37.2397L20.5459 39.6244L41.0001 27.4253V25.6826L20.5459 37.79L18.9866 36.5976V24.1233L41.0001 11.3738Z",fill:"#5566CA"})]})}),(0,p.jsx)("h2",{style:{fontSize:"18px",fontFamily:"Inter",marginTop:"-5px",marginBottom:"15px"},children:(0,o.__)("Access Without Limits!","cozy-addons")}),(0,p.jsx)("p",{style:{textAlign:"center",lineHeight:"20px"},children:(0,o.__)("Access more blocks and advanced features for effortless design. Upgrade today for a richer web-building experience!","cozy-addons")}),(0,p.jsx)("a",{href:"https://cozythemes.com/pricing-and-plans/",target:"_blank",children:(0,p.jsx)("button",{className:"cozy-block-premium-button",style:{backgroundColor:"#5566ca",borderRadius:"20px",padding:"10px",border:"none",color:"#fff",fontFamily:"Inter",fontSize:"10px",fontWeight:"500",cursor:"pointer"},children:(0,p.jsxs)("div",{style:{display:"flex",gap:"5px",margin:"0"},children:[(0,p.jsx)("div",{children:(0,p.jsx)("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,p.jsx)("path",{d:"M9.29768 0.0630875L0.24397 5.2847C-0.109583 5.48778 -0.0646564 5.97987 0.286944 6.12828L2.36334 6.99919L7.97527 2.05487C8.0827 1.95919 8.23506 2.10565 8.14325 2.21695L3.43767 7.94822V9.52017C3.43767 9.98102 3.99437 10.1626 4.26784 9.8287L5.50821 8.31924L7.94206 9.33857C8.21943 9.45573 8.53588 9.28194 8.58666 8.98317L9.99306 0.547365C10.0595 0.152913 9.6356 -0.132186 9.29768 0.0630875Z",fill:"white"})})}),(0,p.jsx)("div",{children:(0,o.__)("Upgrade to Pro","cozy-addons")})]})})})]})}),h=(0,l.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(a.Path,{d:"M9 9v6h11V9H9zM4 20h1.5V4H4v16z"})),x=(0,l.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(a.Path,{d:"M12.5 15v5H11v-5H4V9h7V4h1.5v5h7v6h-7Z"})),g=(0,l.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(a.Path,{d:"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"})),b=(0,l.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(a.Path,{d:"M9 15h6V9H9v6zm-5 5h1.5V4H4v16zM18.5 4v16H20V4h-1.5z"})),v=(0,r.memo)((({attributes:e,setAttributes:l})=>{const a=function(){let e=[{label:"Default",value:""}];if("object"==typeof cozyBlockAssets.googleFonts)for(let o in cozyBlockAssets.googleFonts)e.push({label:cozyBlockAssets.googleFonts[o],value:o});return e}(),[i,c]=(0,r.useState)(!0),v=(o,t)=>{let n={...e.containerStyles.padding};n={...n,top:Math.abs(t),right:Math.abs(t),bottom:Math.abs(t),left:Math.abs(t)},l(i?{...e,containerStyles:{...e.containerStyles,padding:n}}:{...e,containerStyles:{...e.containerStyles,padding:{...e.containerStyles.padding,[o]:Math.abs(t)}}})},[u,_]=(0,r.useState)(!0),C=(o,t)=>{let n={...e.containerStyles.borderRadius};n={...n,top:Math.abs(t),right:Math.abs(t),bottom:Math.abs(t),left:Math.abs(t)},l(u?{...e,containerStyles:{...e.containerStyles,borderRadius:n}}:{...e,containerStyles:{...e.containerStyles,borderRadius:{...e.containerStyles.borderRadius,[o]:Math.abs(t)}}})},[m,w]=(0,r.useState)(!0),j=(o,t)=>{let n={...e.containerStyles.border.width};n={...n,top:Math.abs(t),right:Math.abs(t),bottom:Math.abs(t),left:Math.abs(t)},l(m?{...e,containerStyles:{...e.containerStyles,border:{...e.containerStyles.border,width:n}}}:{...e,containerStyles:{...e.containerStyles,border:{...e.containerStyles.border,width:{...e.containerStyles.border.width,[o]:Math.abs(t)}}}})},[z,S]=(0,r.useState)(!0),f=(o,t)=>{let n={...e.accordionStyles.padding};n={...n,top:Math.abs(t),right:Math.abs(t),bottom:Math.abs(t),left:Math.abs(t)},l(z?{...e,accordionStyles:{...e.accordionStyles,padding:n}}:{...e,accordionStyles:{...e.accordionStyles,padding:{...e.accordionStyles.padding,[o]:Math.abs(t)}}})},[B,k]=(0,r.useState)(!0),L=(o,t)=>{let n={...e.accordionStyles.borderRadius};n={...n,top:Math.abs(t),right:Math.abs(t),bottom:Math.abs(t),left:Math.abs(t)},l(B?{...e,accordionStyles:{...e.accordionStyles,borderRadius:n}}:{...e,accordionStyles:{...e.accordionStyles,borderRadius:{...e.accordionStyles.borderRadius,[o]:Math.abs(t)}}})},[T,$]=(0,r.useState)(!0),V=(o,t)=>{let n={...e.accordionStyles.border.width};n={...n,top:Math.abs(t),right:Math.abs(t),bottom:Math.abs(t),left:Math.abs(t)},l(T?{...e,accordionStyles:{...e.accordionStyles,border:{...e.accordionStyles.border,width:n}}}:{...e,accordionStyles:{...e.accordionStyles,border:{...e.accordionStyles.border,width:{...e.accordionStyles.border.width,[o]:Math.abs(t)}}}})},[M,A]=(0,r.useState)(!0),H=(o,t)=>{let n={...e.iconBoxStyles.padding};n={...n,top:Math.abs(t),right:Math.abs(t),bottom:Math.abs(t),left:Math.abs(t)},l(M?{...e,iconBoxStyles:{...e.iconBoxStyles,padding:n}}:{...e,iconBoxStyles:{...e.iconBoxStyles,padding:{...e.iconBoxStyles.padding,[o]:Math.abs(t)}}})},[I,R]=(0,r.useState)(""),F=e=>{R(e.target.value)},P=Object.keys(cozyIcons.collection).filter((e=>e.toLowerCase().includes(I.toLowerCase()))),[N,D]=(0,r.useState)(""),Z=e=>{D(e.target.value)},O=Object.keys(cozyIcons.collection).filter((e=>e.toLowerCase().includes(N.toLowerCase()))),G=(0,s.select)("core/editor").getEditorSettings().colors,[W,E]=(0,r.useState)("general");return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(t.InspectorControls,{group:"settings",children:[(0,p.jsxs)(n.PanelBody,{title:(0,o.__)("Accordion","cozy-addons"),opened:"general"===W,onToggle:()=>E("general"),children:[(0,p.jsx)(n.RangeControl,{label:(0,o.__)("Spacing","cozy-addons"),min:0,max:200,step:1,value:e.rowGap,onChange:o=>l({...e,rowGap:Math.abs(o)}),__next40pxDefaultSize:!0}),(0,p.jsx)(n.SelectControl,{label:(0,o.__)("Title Tag","cozy-addons"),options:[{label:"H1",value:"h1"},{label:"H2",value:"h2"},{label:"H3",value:"h3"},{label:"H4",value:"h4"},{label:"H5",value:"h5"},{label:"H6",value:"h6"}],value:e.titleTag,onChange:o=>l({...e,titleTag:o}),__next40pxDefaultSize:!0}),(0,p.jsxs)(n.__experimentalToggleGroupControl,{label:(0,o.__)("Title Justification","cozy-addons"),value:e?.titleJustify,onChange:o=>l({...e,titleJustify:o}),children:[(0,p.jsx)(n.__experimentalToggleGroupControlOptionIcon,{label:(0,o.__)("Left","cozy-addons"),value:"left",icon:h}),(0,p.jsx)(n.__experimentalToggleGroupControlOptionIcon,{label:(0,o.__)("Center","cozy-addons"),value:"center",icon:x}),(0,p.jsx)(n.__experimentalToggleGroupControlOptionIcon,{label:(0,o.__)("Right","cozy-addons"),value:"right",icon:g}),(0,p.jsx)(n.__experimentalToggleGroupControlOptionIcon,{label:(0,o.__)("Space Between","cozy-addons"),value:"space-between",icon:b})]})]}),(0,p.jsxs)(n.PanelBody,{title:(0,o.__)("Icon","cozy-addons"),opened:"icon"===W,onToggle:()=>E("icon"),children:[(0,p.jsxs)(n.__experimentalToggleGroupControl,{label:(0,o.__)("Position","cozy-addons"),value:e.icon?.position,onChange:o=>l({...e,icon:{...e.icon,position:o}}),isBlock:!0,__next40pxDefaultSize:!0,children:[(0,p.jsx)(n.__experimentalToggleGroupControlOption,{label:(0,o.__)("Left","cozy-addons"),value:"left"}),(0,p.jsx)(n.__experimentalToggleGroupControlOption,{label:(0,o.__)("Right","cozy-addons"),value:"right"})]}),(0,p.jsx)("div",{style:{maxWidth:"40%",marginBottom:"16px"},children:(0,p.jsx)(n.__experimentalUnitControl,{label:(0,o.__)("Icon Gap"),value:e.icon?.gap,onChange:o=>l({...e,icon:{...e.icon,gap:o}}),__next40pxDefaultSize:!0})}),(0,p.jsxs)(n.__experimentalToggleGroupControl,{label:(0,o.__)("View","cozy-addons"),value:e.icon.view,onChange:o=>l({...e,icon:{...e.icon,view:o}}),isBlock:!0,__next40pxDefaultSize:!0,children:[(0,p.jsx)(n.__experimentalToggleGroupControlOption,{label:(0,o.__)("Default","cozy-addons"),value:"default"}),(0,p.jsx)(n.__experimentalToggleGroupControlOption,{label:(0,o.__)("Stacked","cozy-addons"),value:"stacked"})]}),(0,p.jsxs)(n.__experimentalToggleGroupControl,{label:(0,o.__)("Layout","cozy-addons"),value:e.icon.layout,onChange:o=>l({...e,icon:{...e.icon,layout:o}}),isBlock:!0,__next40pxDefaultSize:!0,children:[(0,p.jsx)(n.__experimentalToggleGroupControlOption,{label:(0,o.__)("Fill","cozy-addons"),value:"fill"}),(0,p.jsx)(n.__experimentalToggleGroupControlOption,{label:(0,o.__)("Outline","cozy-addons"),value:"outline"})]}),(0,p.jsx)(n.TabPanel,{className:"cozy-tab-panel",activeClass:"active-tab",tabs:[{name:"cozy-tab__default",title:(0,o.__)("Default","cozy-addons"),className:"tab-one"},{name:"cozy-tab__active",title:(0,o.__)("Active","cozy-addons"),className:"tab-two"}],children:t=>(0,p.jsxs)(p.Fragment,{children:["cozy-tab__default"===t.name&&(0,p.jsx)(p.Fragment,{children:(0,p.jsx)("div",{style:{margin:"22px 0"},children:(0,p.jsxs)(n.BaseControl,{children:[(0,p.jsxs)("div",{style:{display:"flex",gap:"150px",alignItems:"center"},children:[(0,p.jsx)(n.BaseControl.VisualLabel,{className:"margin-none",children:(0,o.__)("Select Icon","cozy-addons")}),(0,p.jsx)("svg",{width:16,height:16,viewBox:`${e.icon.viewBox.vx} ${e.icon.viewBox.vy} ${e.icon.viewBox.vw} ${e.icon.viewBox.vh}`,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:(0,p.jsx)("path",{d:e.icon.path,fill:"black"})})]}),(0,p.jsx)("input",{type:"text",className:"cozy-icon-search",placeholder:(0,o.__)("Search Icons...","cozy-addons"),value:I,onChange:F}),(0,p.jsx)("div",{className:"cozy-icon-list",children:P.map((o=>{const t=cozyIcons.collection[o],a=t.match(/d="([^"]+)"/),i=t.match(/viewBox\s*=\s*"([^"]*)"/),s=a?a[1]:"",r=i?i[1]:"";return(0,p.jsx)(n.Button,{onClick:()=>((o,t)=>{const n=t.split(" ");l({...e,icon:{...e.icon,path:o,viewBox:{vx:n[0],vy:n[1],vw:n[2],vh:n[3]}}})})(s,r),children:(0,p.jsx)("div",{className:"cozy-icon",title:o,dangerouslySetInnerHTML:{__html:t}})},o)}))})]})})}),"cozy-tab__active"===t.name&&(0,p.jsx)(p.Fragment,{children:(0,p.jsx)("div",{style:{margin:"22px 0"},children:(0,p.jsxs)(n.BaseControl,{children:[(0,p.jsxs)("div",{style:{display:"flex",gap:"150px",alignItems:"center"},children:[(0,p.jsx)(n.BaseControl.VisualLabel,{className:"margin-none",children:(0,o.__)("Select Icon","cozy-addons")}),(0,p.jsx)("svg",{width:16,height:16,viewBox:`${e.icon.activeViewBox.vx} ${e.icon.activeViewBox.vy} ${e.icon.activeViewBox.vw} ${e.icon.activeViewBox.vh}`,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:(0,p.jsx)("path",{d:e.icon.activePath,fill:"black"})})]}),(0,p.jsx)("input",{type:"text",className:"cozy-icon-search",placeholder:(0,o.__)("Search Icons...","cozy-addons"),value:N,onChange:Z}),(0,p.jsx)("div",{className:"cozy-icon-list",children:O.map((o=>{const t=cozyIcons.collection[o],a=t.match(/d="([^"]+)"/),i=t.match(/viewBox\s*=\s*"([^"]*)"/),s=a?a[1]:"",r=i?i[1]:"";return(0,p.jsx)(n.Button,{onClick:()=>((o,t)=>{const n=t.split(" ");l({...e,icon:{...e.icon,activePath:o,activeViewBox:{vx:n[0],vy:n[1],vw:n[2],vh:n[3]}}})})(s,r),children:(0,p.jsx)("div",{className:"cozy-icon",title:o,dangerouslySetInnerHTML:{__html:t}})},o)}))})]})})})]})})]}),!cozyBlockAssets.isPremium&&(0,p.jsx)(y,{})]},"setting"),(0,p.jsxs)(t.InspectorControls,{group:"styles",children:[(0,p.jsxs)(n.PanelBody,{title:(0,o.__)("Container Styles","cozy-addons"),opened:"container-styles"===W,onToggle:()=>E("container-styles"),children:[(0,p.jsx)("div",{style:{marginBottom:"22px"},children:(0,p.jsxs)(n.BaseControl,{children:[(0,p.jsx)(n.BaseControl.VisualLabel,{children:(0,o.__)("Padding","cozy-addons")}),(0,p.jsxs)("div",{style:{display:"flex",gap:"5px",height:"50px",position:"relative"},children:[(0,p.jsx)("button",{className:"cozy-link-styles "+(i?"":"cozy-attr-link-disabled"),onClick:()=>c(!i),children:(0,p.jsxs)("svg",{width:"10",height:"16",viewBox:"0 0 15 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,p.jsx)("path",{d:"M6.18931 9.59516L6.18931 19.3466H8.70581V9.59516H6.18931Z",fill:"black"}),(0,p.jsx)("path",{d:"M0.0553284 7.88029L0.0553284 13.2126H2.53381L2.53381 7.88029C2.82201 4.53678 5.6079 3.53757 6.94321 3.4415C10.9203 3.15534 12.1019 6.00678 12.3901 7.88029V13.2126L14.8398 13.2126V7.88029C14.1251 1.90809 9.2776 0.780139 6.94321 0.962687C1.84791 1.30857 0.0553284 5.92031 0.0553284 7.88029Z",fill:"black"}),(0,p.jsx)("path",{d:"M0.0553284 20.9042L0.0553284 15.5718H2.53381L2.53381 20.9042C2.82201 24.2477 5.6079 25.2469 6.94321 25.343C10.9203 25.6291 12.1019 22.7777 12.3901 20.9042V15.5718L14.8398 15.5718V20.9042C14.1251 26.8764 9.2776 28.0043 6.94321 27.8218C1.84791 27.4759 0.0553284 22.8641 0.0553284 20.9042Z",fill:"black"})]})}),(0,p.jsx)(n.TextControl,{type:"number",step:1,label:(0,o.__)("Top","cozy-addons"),value:e.containerStyles.padding.top,onChange:e=>v("top",e)}),(0,p.jsx)(n.TextControl,{type:"number",step:1,label:(0,o.__)("Right","cozy-addons"),value:e.containerStyles.padding.right,onChange:e=>v("right",e)}),(0,p.jsx)(n.TextControl,{type:"number",step:1,label:(0,o.__)("Bottom","cozy-addons"),value:e.containerStyles.padding.bottom,onChange:e=>v("bottom",e)}),(0,p.jsx)(n.TextControl,{type:"number",step:1,value:e.containerStyles.padding.left,label:(0,o.__)("Left","cozy-addons"),onChange:e=>v("left",e)})]})]})}),(0,p.jsx)(n.SelectControl,{label:(0,o.__)("Border Type","cozy-addons"),value:e.containerStyles.border.type,options:[{label:(0,o.__)("None","cozy-addons"),value:"none"},{label:(0,o.__)("Solid","cozy-addons"),value:"solid"},{label:(0,o.__)("Double","cozy-addons"),value:"double"},{label:(0,o.__)("Dotted","cozy-addons"),value:"dotted"},{label:(0,o.__)("Dashed","cozy-addons"),value:"dashed"},{label:(0,o.__)("Groove","cozy-addons"),value:"groove"}],onChange:o=>l({...e,containerStyles:{...e.containerStyles,border:{...e.containerStyles.border,type:o}}}),__next40pxDefaultSize:!0}),"none"!==e.containerStyles.border.type&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("div",{style:{margin:"22px 0"},children:(0,p.jsxs)(n.BaseControl,{children:[(0,p.jsx)(n.BaseControl.VisualLabel,{children:(0,o.__)("Border Width","cozy-addons")}),(0,p.jsxs)("div",{style:{display:"flex",gap:"5px",height:"50px",position:"relative"},children:[(0,p.jsx)("button",{className:"cozy-link-styles "+(m?"":"cozy-attr-link-disabled"),onClick:()=>w(!m),children:(0,p.jsxs)("svg",{width:"10",height:"16",viewBox:"0 0 15 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,p.jsx)("path",{d:"M6.18931 9.59516L6.18931 19.3466H8.70581V9.59516H6.18931Z",fill:"black"}),(0,p.jsx)("path",{d:"M0.0553284 7.88029L0.0553284 13.2126H2.53381L2.53381 7.88029C2.82201 4.53678 5.6079 3.53757 6.94321 3.4415C10.9203 3.15534 12.1019 6.00678 12.3901 7.88029V13.2126L14.8398 13.2126V7.88029C14.1251 1.90809 9.2776 0.780139 6.94321 0.962687C1.84791 1.30857 0.0553284 5.92031 0.0553284 7.88029Z",fill:"black"}),(0,p.jsx)("path",{d:"M0.0553284 20.9042L0.0553284 15.5718H2.53381L2.53381 20.9042C2.82201 24.2477 5.6079 25.2469 6.94321 25.343C10.9203 25.6291 12.1019 22.7777 12.3901 20.9042V15.5718L14.8398 15.5718V20.9042C14.1251 26.8764 9.2776 28.0043 6.94321 27.8218C1.84791 27.4759 0.0553284 22.8641 0.0553284 20.9042Z",fill:"black"})]})}),(0,p.jsx)(n.TextControl,{type:"number",step:1,label:(0,o.__)("Top","cozy-addons"),value:e.containerStyles.border.width.top,onChange:e=>j("top",e)}),(0,p.jsx)(n.TextControl,{type:"number",step:1,label:(0,o.__)("Right","cozy-addons"),value:e.containerStyles.border.width.right,onChange:e=>j("right",e)}),(0,p.jsx)(n.TextControl,{type:"number",step:1,value:e.containerStyles.border.width.bottom,label:(0,o.__)("Bottom","cozy-addons"),onChange:e=>j("bottom",e)}),(0,p.jsx)(n.TextControl,{type:"number",step:1,label:(0,o.__)("Left","cozy-addons"),value:e.containerStyles.border.width.left,onChange:e=>j("left",e)})]})]})}),(0,p.jsx)("div",{style:{marginTop:"22px"},children:(0,p.jsx)(n.ColorPalette,{title:(0,o.__)("Border Color","cozy-addons"),enableAlpha:!0,colors:G,value:e.containerStyles.border.color,onChange:o=>l({...e,containerStyles:{...e.containerStyles,border:{...e.containerStyles.border,color:o}}})})})]}),(0,p.jsx)("div",{style:{margin:"22px 0"},children:(0,p.jsxs)(n.BaseControl,{children:[(0,p.jsx)(n.BaseControl.VisualLabel,{children:(0,o.__)("Border Radius","cozy-addons")}),(0,p.jsxs)("div",{style:{display:"flex",gap:"5px",height:"50px",position:"relative"},children:[(0,p.jsx)("button",{className:"cozy-link-styles "+(u?"":"cozy-attr-link-disabled"),onClick:()=>_(!u),children:(0,p.jsxs)("svg",{width:"10",height:"16",viewBox:"0 0 15 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,p.jsx)("path",{d:"M6.18931 9.59516L6.18931 19.3466H8.70581V9.59516H6.18931Z",fill:"black"}),(0,p.jsx)("path",{d:"M0.0553284 7.88029L0.0553284 13.2126H2.53381L2.53381 7.88029C2.82201 4.53678 5.6079 3.53757 6.94321 3.4415C10.9203 3.15534 12.1019 6.00678 12.3901 7.88029V13.2126L14.8398 13.2126V7.88029C14.1251 1.90809 9.2776 0.780139 6.94321 0.962687C1.84791 1.30857 0.0553284 5.92031 0.0553284 7.88029Z",fill:"black"}),(0,p.jsx)("path",{d:"M0.0553284 20.9042L0.0553284 15.5718H2.53381L2.53381 20.9042C2.82201 24.2477 5.6079 25.2469 6.94321 25.343C10.9203 25.6291 12.1019 22.7777 12.3901 20.9042V15.5718L14.8398 15.5718V20.9042C14.1251 26.8764 9.2776 28.0043 6.94321 27.8218C1.84791 27.4759 0.0553284 22.8641 0.0553284 20.9042Z",fill:"black"})]})}),(0,p.jsx)(n.TextControl,{type:"number",step:1,label:(0,o.__)("TopL","cozy-addons"),value:e.containerStyles.borderRadius.top,onChange:e=>C("top",e)}),(0,p.jsx)(n.TextControl,{type:"number",step:1,label:(0,o.__)("TopR","cozy-addons"),value:e.containerStyles.borderRadius.right,onChange:e=>C("right",e)}),(0,p.jsx)(n.TextControl,{type:"number",step:1,value:e.containerStyles.borderRadius.left,label:(0,o.__)("BottomL","cozy-addons"),onChange:e=>C("left",e)}),(0,p.jsx)(n.TextControl,{type:"number",step:1,label:(0,o.__)("BottomR","cozy-addons"),value:e.containerStyles.borderRadius.bottom,onChange:e=>C("bottom",e)})]})]})}),(0,p.jsx)(t.PanelColorSettings,{className:"cozy-color-control",enableAlpha:!0,title:(0,o.__)("Background Color","cozy-addons"),colorSettings:[{label:(0,o.__)("Normal","cozy-addons"),value:e.containerStyles.bgColor,onChange:o=>l({...e,containerStyles:{...e.containerStyles,bgColor:o}})}]})]}),(0,p.jsxs)(n.PanelBody,{title:(0,o.__)("Accordion Styles","cozy-addons"),opened:"accordion-styles"===W,onToggle:()=>E("accordion-styles"),children:[(0,p.jsx)("div",{style:{marginBottom:"22px"},children:(0,p.jsxs)(n.BaseControl,{children:[(0,p.jsx)(n.BaseControl.VisualLabel,{children:(0,o.__)("Padding","cozy-addons")}),(0,p.jsxs)("div",{style:{display:"flex",gap:"5px",height:"50px",position:"relative"},children:[(0,p.jsx)("button",{className:"cozy-link-styles "+(z?"":"cozy-attr-link-disabled"),onClick:()=>S(!z),children:(0,p.jsxs)("svg",{width:"10",height:"16",viewBox:"0 0 15 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,p.jsx)("path",{d:"M6.18931 9.59516L6.18931 19.3466H8.70581V9.59516H6.18931Z",fill:"black"}),(0,p.jsx)("path",{d:"M0.0553284 7.88029L0.0553284 13.2126H2.53381L2.53381 7.88029C2.82201 4.53678 5.6079 3.53757 6.94321 3.4415C10.9203 3.15534 12.1019 6.00678 12.3901 7.88029V13.2126L14.8398 13.2126V7.88029C14.1251 1.90809 9.2776 0.780139 6.94321 0.962687C1.84791 1.30857 0.0553284 5.92031 0.0553284 7.88029Z",fill:"black"}),(0,p.jsx)("path",{d:"M0.0553284 20.9042L0.0553284 15.5718H2.53381L2.53381 20.9042C2.82201 24.2477 5.6079 25.2469 6.94321 25.343C10.9203 25.6291 12.1019 22.7777 12.3901 20.9042V15.5718L14.8398 15.5718V20.9042C14.1251 26.8764 9.2776 28.0043 6.94321 27.8218C1.84791 27.4759 0.0553284 22.8641 0.0553284 20.9042Z",fill:"black"})]})}),(0,p.jsx)(n.TextControl,{type:"number",step:1,label:(0,o.__)("Top","cozy-addons"),value:e.accordionStyles.padding.top,onChange:e=>f("top",e)}),(0,p.jsx)(n.TextControl,{type:"number",step:1,label:(0,o.__)("Right","cozy-addons"),value:e.accordionStyles.padding.right,onChange:e=>f("right",e)}),(0,p.jsx)(n.TextControl,{type:"number",step:1,label:(0,o.__)("Bottom","cozy-addons"),value:e.accordionStyles.padding.bottom,onChange:e=>f("bottom",e)}),(0,p.jsx)(n.TextControl,{type:"number",step:1,value:e.accordionStyles.padding.left,label:(0,o.__)("Left","cozy-addons"),onChange:e=>f("left",e)})]})]})}),(0,p.jsx)(n.SelectControl,{label:(0,o.__)("Border Type","cozy-addons"),value:e.accordionStyles.border.type,options:[{label:(0,o.__)("None","cozy-addons"),value:"none"},{label:(0,o.__)("Solid","cozy-addons"),value:"solid"},{label:(0,o.__)("Double","cozy-addons"),value:"double"},{label:(0,o.__)("Dotted","cozy-addons"),value:"dotted"},{label:(0,o.__)("Dashed","cozy-addons"),value:"dashed"},{label:(0,o.__)("Groove","cozy-addons"),value:"groove"}],onChange:o=>l({...e,accordionStyles:{...e.accordionStyles,border:{...e.accordionStyles.border,type:o}}}),__next40pxDefaultSize:!0}),"none"!==e.accordionStyles.border.type&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("div",{style:{margin:"22px 0"},children:(0,p.jsxs)(n.BaseControl,{children:[(0,p.jsx)(n.BaseControl.VisualLabel,{children:(0,o.__)("Border Width","cozy-addons")}),(0,p.jsxs)("div",{style:{display:"flex",gap:"5px",height:"50px",position:"relative"},children:[(0,p.jsx)("button",{className:"cozy-link-styles "+(T?"":"cozy-attr-link-disabled"),onClick:()=>$(!T),children:(0,p.jsxs)("svg",{width:"10",height:"16",viewBox:"0 0 15 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,p.jsx)("path",{d:"M6.18931 9.59516L6.18931 19.3466H8.70581V9.59516H6.18931Z",fill:"black"}),(0,p.jsx)("path",{d:"M0.0553284 7.88029L0.0553284 13.2126H2.53381L2.53381 7.88029C2.82201 4.53678 5.6079 3.53757 6.94321 3.4415C10.9203 3.15534 12.1019 6.00678 12.3901 7.88029V13.2126L14.8398 13.2126V7.88029C14.1251 1.90809 9.2776 0.780139 6.94321 0.962687C1.84791 1.30857 0.0553284 5.92031 0.0553284 7.88029Z",fill:"black"}),(0,p.jsx)("path",{d:"M0.0553284 20.9042L0.0553284 15.5718H2.53381L2.53381 20.9042C2.82201 24.2477 5.6079 25.2469 6.94321 25.343C10.9203 25.6291 12.1019 22.7777 12.3901 20.9042V15.5718L14.8398 15.5718V20.9042C14.1251 26.8764 9.2776 28.0043 6.94321 27.8218C1.84791 27.4759 0.0553284 22.8641 0.0553284 20.9042Z",fill:"black"})]})}),(0,p.jsx)(n.TextControl,{type:"number",step:1,label:(0,o.__)("Top","cozy-addons"),value:e.accordionStyles.border.width.top,onChange:e=>V("top",e)}),(0,p.jsx)(n.TextControl,{type:"number",step:1,label:(0,o.__)("Right","cozy-addons"),value:e.accordionStyles.border.width.right,onChange:e=>V("right",e)}),(0,p.jsx)(n.TextControl,{type:"number",step:1,value:e.accordionStyles.border.width.bottom,label:(0,o.__)("Bottom","cozy-addons"),onChange:e=>V("bottom",e)}),(0,p.jsx)(n.TextControl,{type:"number",step:1,label:(0,o.__)("Left","cozy-addons"),value:e.accordionStyles.border.width.left,onChange:e=>V("left",e)})]})]})}),(0,p.jsx)("div",{style:{marginTop:"22px"},children:(0,p.jsx)(n.ColorPalette,{title:(0,o.__)("Border Color","cozy-addons"),enableAlpha:!0,colors:G,value:e.accordionStyles.border.color,onChange:o=>l({...e,accordionStyles:{...e.accordionStyles,border:{...e.accordionStyles.border,color:o}}})})})]}),(0,p.jsx)("div",{style:{margin:"22px 0"},children:(0,p.jsxs)(n.BaseControl,{children:[(0,p.jsx)(n.BaseControl.VisualLabel,{children:(0,o.__)("Border Radius","cozy-addons")}),(0,p.jsxs)("div",{style:{display:"flex",gap:"5px",height:"50px",position:"relative"},children:[(0,p.jsx)("button",{className:"cozy-link-styles "+(B?"":"cozy-attr-link-disabled"),onClick:()=>k(!B),children:(0,p.jsxs)("svg",{width:"10",height:"16",viewBox:"0 0 15 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,p.jsx)("path",{d:"M6.18931 9.59516L6.18931 19.3466H8.70581V9.59516H6.18931Z",fill:"black"}),(0,p.jsx)("path",{d:"M0.0553284 7.88029L0.0553284 13.2126H2.53381L2.53381 7.88029C2.82201 4.53678 5.6079 3.53757 6.94321 3.4415C10.9203 3.15534 12.1019 6.00678 12.3901 7.88029V13.2126L14.8398 13.2126V7.88029C14.1251 1.90809 9.2776 0.780139 6.94321 0.962687C1.84791 1.30857 0.0553284 5.92031 0.0553284 7.88029Z",fill:"black"}),(0,p.jsx)("path",{d:"M0.0553284 20.9042L0.0553284 15.5718H2.53381L2.53381 20.9042C2.82201 24.2477 5.6079 25.2469 6.94321 25.343C10.9203 25.6291 12.1019 22.7777 12.3901 20.9042V15.5718L14.8398 15.5718V20.9042C14.1251 26.8764 9.2776 28.0043 6.94321 27.8218C1.84791 27.4759 0.0553284 22.8641 0.0553284 20.9042Z",fill:"black"})]})}),(0,p.jsx)(n.TextControl,{type:"number",step:1,label:(0,o.__)("TopL","cozy-addons"),value:e.accordionStyles.borderRadius.top,onChange:e=>L("top",e)}),(0,p.jsx)(n.TextControl,{type:"number",step:1,label:(0,o.__)("TopR","cozy-addons"),value:e.accordionStyles.borderRadius.right,onChange:e=>L("right",e)}),(0,p.jsx)(n.TextControl,{type:"number",step:1,value:e.accordionStyles.borderRadius.left,label:(0,o.__)("BottomL","cozy-addons"),onChange:e=>L("left",e)}),(0,p.jsx)(n.TextControl,{type:"number",step:1,label:(0,o.__)("BottomR","cozy-addons"),value:e.accordionStyles.borderRadius.bottom,onChange:e=>L("bottom",e)})]})]})}),(0,p.jsx)(t.PanelColorSettings,{className:"cozy-color-control",enableAlpha:!0,title:(0,o.__)("Color","cozy-addons"),colorSettings:[{label:(0,o.__)("Background","cozy-addons"),value:e.accordionStyles.bgColor,onChange:o=>l({...e,accordionStyles:{...e.accordionStyles,bgColor:o}})}]})]}),"stacked"===e.icon.view&&(0,p.jsxs)(n.PanelBody,{title:(0,o.__)("Icon Box Styles","cozy-addons"),opened:"icon-box-styles"===W,onToggle:()=>E("icon-box-styles"),children:[(0,p.jsx)("div",{style:{marginBottom:"22px"},children:(0,p.jsxs)(n.BaseControl,{children:[(0,p.jsx)(n.BaseControl.VisualLabel,{children:(0,o.__)("Padding","cozy-addons")}),(0,p.jsxs)("div",{style:{display:"flex",gap:"5px",height:"50px",position:"relative"},children:[(0,p.jsx)("button",{className:"cozy-link-styles "+(M?"":"cozy-attr-link-disabled"),onClick:()=>A(!M),children:(0,p.jsxs)("svg",{width:"10",height:"16",viewBox:"0 0 15 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,p.jsx)("path",{d:"M6.18931 9.59516L6.18931 19.3466H8.70581V9.59516H6.18931Z",fill:"black"}),(0,p.jsx)("path",{d:"M0.0553284 7.88029L0.0553284 13.2126H2.53381L2.53381 7.88029C2.82201 4.53678 5.6079 3.53757 6.94321 3.4415C10.9203 3.15534 12.1019 6.00678 12.3901 7.88029V13.2126L14.8398 13.2126V7.88029C14.1251 1.90809 9.2776 0.780139 6.94321 0.962687C1.84791 1.30857 0.0553284 5.92031 0.0553284 7.88029Z",fill:"black"}),(0,p.jsx)("path",{d:"M0.0553284 20.9042L0.0553284 15.5718H2.53381L2.53381 20.9042C2.82201 24.2477 5.6079 25.2469 6.94321 25.343C10.9203 25.6291 12.1019 22.7777 12.3901 20.9042V15.5718L14.8398 15.5718V20.9042C14.1251 26.8764 9.2776 28.0043 6.94321 27.8218C1.84791 27.4759 0.0553284 22.8641 0.0553284 20.9042Z",fill:"black"})]})}),(0,p.jsx)(n.TextControl,{type:"number",step:1,min:0,label:(0,o.__)("Top","cozy-addons"),value:e.iconBoxStyles.padding.top,onChange:e=>H("top",e)}),(0,p.jsx)(n.TextControl,{type:"number",step:1,min:0,label:(0,o.__)("Right","cozy-addons"),value:e.iconBoxStyles.padding.right,onChange:e=>H("right",e)}),(0,p.jsx)(n.TextControl,{type:"number",step:1,min:0,label:(0,o.__)("Bottom","cozy-addons"),value:e.iconBoxStyles.padding.bottom,onChange:e=>H("bottom",e)}),(0,p.jsx)(n.TextControl,{type:"number",step:1,min:0,label:(0,o.__)("Left","cozy-addons"),value:e.iconBoxStyles.padding.left,onChange:e=>H("left",e)})]})]})}),(0,p.jsx)(n.SelectControl,{label:(0,o.__)("Border Type","cozy-addons"),value:e.iconBoxStyles.borderType,options:[{label:(0,o.__)("None","cozy-addons"),value:"none"},{label:(0,o.__)("Solid","cozy-addons"),value:"solid"},{label:(0,o.__)("Double","cozy-addons"),value:"double"},{label:(0,o.__)("Dotted","cozy-addons"),value:"dotted"},{label:(0,o.__)("Dashed","cozy-addons"),value:"dashed"},{label:(0,o.__)("Groove","cozy-addons"),value:"groove"}],onChange:o=>l({...e,iconBoxStyles:{...e.iconBoxStyles,borderType:o}}),__next40pxDefaultSize:!0}),"none"!==e.iconBoxStyles.borderType&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(n.RangeControl,{label:(0,o.__)("Border Width","cozy-addons"),min:1,max:50,step:1,value:e.iconBoxStyles.borderWidth,onChange:o=>l({...e,iconBoxStyles:{...e.iconBoxStyles,borderWidth:Math.abs(o)}}),__next40pxDefaultSize:!0}),(0,p.jsx)(n.TabPanel,{className:"cozy-tab-panel",tabs:[{title:(0,o.__)("Default","cozy-addons"),name:"cozy-tab__one"},{title:(0,o.__)("Active","cozy-addons"),name:"cozy-tab__two"}],activeClass:"active-tab",children:t=>(0,p.jsxs)(p.Fragment,{children:["cozy-tab__one"===t.name&&(0,p.jsx)(p.Fragment,{children:(0,p.jsx)("div",{style:{marginTop:"22px"},children:(0,p.jsx)(n.ColorPalette,{title:(0,o.__)("Border Color","cozy-addons"),enableAlpha:!0,colors:G,value:e.iconBoxStyles.borderColor,onChange:o=>l({...e,iconBoxStyles:{...e.iconBoxStyles,borderColor:o}})})})}),"cozy-tab__two"===t.name&&(0,p.jsx)(p.Fragment,{children:(0,p.jsx)("div",{style:{marginTop:"22px"},children:(0,p.jsx)(n.ColorPalette,{title:(0,o.__)("Border Color","cozy-addons"),enableAlpha:!0,colors:G,value:e.iconBoxStyles.borderColorHover,onChange:o=>l({...e,iconBoxStyles:{...e.iconBoxStyles,borderColorHover:o}})})})})]})})]}),(0,p.jsx)(n.RangeControl,{label:(0,o.__)("Border Radius","cozy-addons"),min:1,max:100,step:1,value:e.iconBoxStyles.borderRadius,onChange:o=>l({...e,iconBoxStyles:{...e.iconBoxStyles,borderRadius:Math.abs(o)}}),__next40pxDefaultSize:!0}),(0,p.jsx)(t.PanelColorSettings,{className:"cozy-color-control",enableAlpha:!0,title:(0,o.__)("Color","cozy-addons"),colorSettings:[{label:(0,o.__)("Background (Default)","cozy-addons"),value:e.iconBoxStyles.bgColor,onChange:o=>l({...e,iconBoxStyles:{...e.iconBoxStyles,bgColor:o}})},{label:(0,o.__)("Background (Active)","cozy-addons"),value:e.iconBoxStyles.bgColorHover,onChange:o=>l({...e,iconBoxStyles:{...e.iconBoxStyles,bgColorHover:o}})}]})]}),(0,p.jsxs)(n.PanelBody,{title:(0,o.__)("Icon Styles","cozy-addons"),opened:"icon-styles"===W,onToggle:()=>E("icon-styles"),children:[(0,p.jsx)(n.RangeControl,{label:(0,o.__)("Size","cozy-addons"),min:10,max:100,step:1,value:e.icon.size,onChange:o=>l({...e,icon:{...e.icon,size:Math.abs(o)}}),__next40pxDefaultSize:!0}),(0,p.jsx)(n.RangeControl,{label:(0,o.__)("Opacity","cozy-addons"),min:0,max:1,step:.1,value:e.icon.opacity,onChange:o=>l({...e,icon:{...e.icon,opacity:o}}),__next40pxDefaultSize:!0}),(0,p.jsx)(n.RangeControl,{label:(0,o.__)("Rotate","cozy-addons"),min:0,max:360,step:1,value:e.icon.rotate,onChange:o=>l({...e,icon:{...e.icon,rotate:Math.abs(o)}}),__next40pxDefaultSize:!0}),(0,p.jsx)(n.RangeControl,{label:(0,o.__)("Rotate (Active)","cozy-addons"),min:0,max:360,step:45,value:e.icon.rotateActive,onChange:o=>l({...e,icon:{...e.icon,rotateActive:Math.abs(o)}}),__next40pxDefaultSize:!0}),(0,p.jsx)(t.PanelColorSettings,{className:"cozy-color-control",enableAlpha:!0,title:(0,o.__)("Color","cozy-addons"),colorSettings:[{label:(0,o.__)("Icon (Default)","cozy-addons"),value:e.icon.color,onChange:o=>l({...e,icon:{...e.icon,color:o}})},{label:(0,o.__)("Icon (Active)","cozy-addons"),value:e.icon.colorHover,onChange:o=>l({...e,icon:{...e.icon,colorHover:o}})}]})]}),(0,p.jsxs)(n.PanelBody,{title:(0,o.__)("Title Typography","cozy-addons"),opened:"title-typography"===W,onToggle:()=>E("title-typography"),children:[(0,p.jsx)(n.SelectControl,{label:(0,o.__)("Font","cozy-addons"),options:a,value:e.titleTypography.fontFamily,onChange:o=>l({...e,titleTypography:{...e.titleTypography,fontFamily:o}})}),(0,p.jsx)(n.TextControl,{label:(0,o.__)("Font Size","cozy-addons"),type:"number",min:10,value:e.titleTypography.fontSize,onChange:o=>l({...e,titleTypography:{...e.titleTypography,fontSize:Math.abs(o)}}),__next40pxDefaultSize:!0}),(0,p.jsx)(n.SelectControl,{label:(0,o.__)("Font Weight","cozy-addons"),options:d,value:e.titleTypography.fontWeight,onChange:o=>l({...e,titleTypography:{...e.titleTypography,fontWeight:o}}),__next40pxDefaultSize:!0}),(0,p.jsx)("div",{style:{marginTop:"22px"},children:(0,p.jsx)(n.ColorPalette,{title:(0,o.__)("Color","cozy-addons"),enableAlpha:!0,colors:G,value:e.titleTypography.color,onChange:o=>l({...e,titleTypography:{...e.titleTypography,color:o}}),__next40pxDefaultSize:!0})})]}),(0,p.jsxs)(n.PanelBody,{title:(0,o.__)("Typography","cozy-addons"),opened:"typography"===W,onToggle:()=>E("typography"),children:[(0,p.jsx)(n.SelectControl,{label:(0,o.__)("Font","cozy-addons"),options:a,value:e.typography.fontFamily,onChange:o=>l({...e,typography:{...e.typography,fontFamily:o}}),__next40pxDefaultSize:!0}),(0,p.jsx)(n.TextControl,{label:(0,o.__)("Font Size","cozy-addons"),type:"number",min:10,value:e.typography.fontSize,onChange:o=>l({...e,typography:{...e.typography,fontSize:Math.abs(o)}}),__next40pxDefaultSize:!0}),(0,p.jsx)(n.SelectControl,{label:(0,o.__)("Font Weight","cozy-addons"),options:d,value:e.typography.fontWeight,onChange:o=>l({...e,typography:{...e.typography,fontWeight:o}}),__next40pxDefaultSize:!0}),(0,p.jsx)("div",{style:{marginTop:"22px"},children:(0,p.jsx)(n.ColorPalette,{title:(0,o.__)("Color","cozy-addons"),enableAlpha:!0,colors:G,value:e.typography.color,onChange:o=>l({...e,typography:{...e.typography,color:o}})})})]})]},"style")]})})),u=(0,r.memo)((()=>{const e=(0,t.useInnerBlocksProps)({className:"cozy-accordion-wrapper"},{allowedBlocks:[["cozy-block/accordion-item"]],template:[["cozy-block/accordion-item"],["cozy-block/accordion-item"],["cozy-block/accordion-item"]],renderAppender:!1,orientation:"horizontal"});return(0,p.jsx)("div",{...e})})),_=(0,r.memo)((({clientId:l})=>{const{insertBlock:a,selectBlock:r}=(0,s.useDispatch)(t.store),c=(0,s.useSelect)((e=>e(t.store).getBlock(l).innerBlocks));return(0,p.jsxs)(n.ToolbarGroup,{children:[(0,p.jsx)(n.ToolbarButton,{icon:i,onClick:()=>{const o=(0,e.createBlock)("cozy-block/accordion-item",{});a(o,c.length,l,!1),r(o.clientId)},children:(0,o.__)("Add Accordion Item","cozy-addons")}),","]})})),C=(0,r.memo)((({attributes:e,blockId:o,clientId:n})=>(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(t.BlockControls,{children:(0,p.jsx)(_,{clientId:n})}),(0,p.jsx)("style",{dangerouslySetInnerHTML:{__html:c(o,e)}}),""!=e.titleTypography.fontFamily&&null!=e.titleTypography.fontFamily&&(0,p.jsx)("link",{rel:"stylesheet",href:`https://fonts.googleapis.com/css2?family=${e.titleTypography.fontFamily}:wght@100;200;300;400;500;600;700;800;900`}),""!=e.typography.fontFamily&&null!=e.typography.fontFamily&&(0,p.jsx)("link",{rel:"stylesheet",href:`https://fonts.googleapis.com/css2?family=${e.typography.fontFamily}:wght@100;200;300;400;500;600;700;800;900`}),(0,p.jsx)("div",{className:`cozy-block-accordion icon-view-${e.icon.view} icon-layout-${e.icon.layout}`,id:o,children:(0,p.jsx)(u,{})})]}))),m=JSON.parse('{"UU":"cozy-block/accordion","DD":"Accordion","h_":"Streamline content presentation with our \'Accordion\' block, allowing you to organize information in a compact and user-friendly manner. Users can easily expand and collapse sections to access the details they desire, creating a clean and efficient user experience."}'),w=(0,p.jsxs)("svg",{width:"27",height:"22",viewBox:"0 0 27 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,p.jsx)("path",{d:"M21.0772 6.5L19.1024 4.52517C18.9659 4.38867 18.9659 4.16796 19.1024 4.03291L19.4305 3.70474C19.567 3.56825 19.7878 3.56825 19.9228 3.70474L21.3226 5.10455L22.7224 3.70474C22.8589 3.56825 23.0796 3.56825 23.2147 3.70474L23.5428 4.03291C23.6793 4.16941 23.6793 4.39013 23.5428 4.52517L21.568 6.5C21.4344 6.6365 21.2137 6.6365 21.0772 6.5Z",fill:"#0C50FF"}),(0,p.jsx)("rect",{fill:"none",x:"1",y:"1",width:"25",height:"8",stroke:"#0C50FF",strokeWidth:"2"}),(0,p.jsx)("path",{d:"M21.0772 18.5L19.1024 16.5252C18.9659 16.3887 18.9659 16.168 19.1024 16.0329L19.4305 15.7047C19.567 15.5682 19.7878 15.5682 19.9228 15.7047L21.3226 17.1046L22.7224 15.7047C22.8589 15.5682 23.0796 15.5682 23.2147 15.7047L23.5428 16.0329C23.6793 16.1694 23.6793 16.3901 23.5428 16.5252L21.568 18.5C21.4344 18.6365 21.2137 18.6365 21.0772 18.5Z",fill:"#0C50FF"}),(0,p.jsx)("rect",{x:"1",y:"13",width:"25",height:"8",stroke:"#0C50FF",strokeWidth:"2",fill:"none"})]}),j=(0,r.memo)((({blockId:e,attributes:n,setAttributes:l})=>(0,p.jsx)(p.Fragment,{children:(0,p.jsx)("article",{className:"cozy-block-accordion-item",id:e,children:(0,p.jsxs)("header",{role:"tab","aria-expanded":!0,children:[(0,p.jsxs)("div",{className:"cozy-accordion-title "+(n.isModalOpen?"active":""),onClick:()=>l({...n,isModalOpen:!n.isModalOpen}),style:{display:"flex",justifyContent:n.parentAttrs?.titleJustify?n.parentAttrs?.titleJustify:"space-between",alignItems:"center",flexDirection:"row"},children:["left"===n.parentAttrs?.iconPosition&&(0,p.jsxs)("div",{className:"accordion-icon-wrapper",children:[!n.isModalOpen&&(0,p.jsx)("svg",{width:16,height:16,viewBox:`${n.parentAttrs.iconViewBox.vx} ${n.parentAttrs.iconViewBox.vy} ${n.parentAttrs.iconViewBox.vw} ${n.parentAttrs.iconViewBox.vh}`,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:(0,p.jsx)("path",{d:n.parentAttrs.iconPath})}),n.isModalOpen&&(0,p.jsx)("svg",{width:16,height:16,viewBox:`${n.parentAttrs.activeIconViewBox.vx} ${n.parentAttrs.activeIconViewBox.vy} ${n.parentAttrs.activeIconViewBox.vw} ${n.parentAttrs.activeIconViewBox.vh}`,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:(0,p.jsx)("path",{d:n.parentAttrs.activeIconPath})})]}),(0,p.jsx)(t.RichText,{placeholder:(0,o.__)("Accordion Title","cozy-addons"),tagName:n.parentAttrs.titleTag,value:n.title,onChange:e=>l({...n,title:e})}),"right"===n.parentAttrs?.iconPosition&&(0,p.jsxs)("div",{className:"accordion-icon-wrapper",children:[!n.isModalOpen&&(0,p.jsx)("svg",{width:16,height:16,viewBox:`${n.parentAttrs.iconViewBox.vx} ${n.parentAttrs.iconViewBox.vy} ${n.parentAttrs.iconViewBox.vw} ${n.parentAttrs.iconViewBox.vh}`,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:(0,p.jsx)("path",{d:n.parentAttrs.iconPath})}),n.isModalOpen&&(0,p.jsx)("svg",{width:16,height:16,viewBox:`${n.parentAttrs.activeIconViewBox.vx} ${n.parentAttrs.activeIconViewBox.vy} ${n.parentAttrs.activeIconViewBox.vw} ${n.parentAttrs.activeIconViewBox.vh}`,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:(0,p.jsx)("path",{d:n.parentAttrs.activeIconPath})})]})]}),(0,p.jsx)("div",{className:"cozy-accordion-content "+(n.isModalOpen?"display-block":""),children:(0,p.jsx)(t.InnerBlocks,{template:[["core/paragraph"]],orientation:"horizontal"})})]})})}))),z=(0,p.jsxs)("svg",{width:"26",height:"21",viewBox:"0 0 26 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,p.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M23 1H3C1.89543 1 1 1.89543 1 3V18C1 19.1046 1.89543 20 3 20H23C24.1046 20 25 19.1046 25 18V3C25 1.89543 24.1046 1 23 1ZM3 0C1.34315 0 0 1.34315 0 3V18C0 19.6569 1.34315 21 3 21H23C24.6569 21 26 19.6569 26 18V3C26 1.34315 24.6569 0 23 0H3Z",fill:"#5566CA"}),(0,p.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18 11.5C18 11.7761 17.7761 12 17.5 12H3.5C3.22386 12 3 11.7761 3 11.5C3 11.2239 3.22386 11 3.5 11H17.5C17.7761 11 18 11.2239 18 11.5Z",fill:"#B2BCF9"}),(0,p.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M23 13.5C23 13.7761 22.7761 14 22.5 14H3.5C3.22386 14 3 13.7761 3 13.5C3 13.2239 3.22386 13 3.5 13H22.5C22.7761 13 23 13.2239 23 13.5Z",fill:"#B2BCF9"}),(0,p.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16 15.5C16 15.7761 15.7761 16 15.5 16H3.5C3.22386 16 3 15.7761 3 15.5C3 15.2239 3.22386 15 3.5 15H15.5C15.7761 15 16 15.2239 16 15.5Z",fill:"#B2BCF9"}),(0,p.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16 6C16 6.55228 15.5523 7 15 7H4C3.44772 7 3 6.55228 3 6C3 5.44772 3.44772 5 4 5H15C15.5523 5 16 5.44772 16 6Z",fill:"#BAC4F9"}),(0,p.jsx)("path",{d:"M21.3415 5.06826L20.0661 6.38481C19.978 6.47581 19.978 6.62295 20.0661 6.71298L20.2781 6.93176C20.3662 7.02276 20.5088 7.02276 20.596 6.93176L21.5 5.99856L22.404 6.93176C22.4922 7.02276 22.6347 7.02276 22.7219 6.93176L22.9339 6.71298C23.022 6.62199 23.022 6.47484 22.9339 6.38481L21.6585 5.06826C21.5722 4.97726 21.4297 4.97726 21.3415 5.06826Z",fill:"#36CFC6"})]});(0,e.registerBlockType)("cozy-block/accordion-item",{title:(0,o.__)("Accordion Item","cozy-addons"),category:"cozy-block",textdomain:"cozy-addons",icon:{src:z},parent:["cozy-block/accordion"],attributes:{blockClientId:{type:"string",default:""},title:{type:"string",default:""},parentAttrs:{type:"object",default:{iconViewBox:{vx:0,vy:0,vw:14,vh:25},iconPath:"M10.8737 12.7121C10.9908 12.595 10.9908 12.405 10.8737 12.2879L1.00502 2.41924C0.887867 2.30208 0.887867 2.11213 1.00502 1.99497L1.99497 1.00502C2.11213 0.887867 2.30208 0.887867 2.41924 1.00502L13.7021 12.2879C13.8192 12.405 13.8192 12.595 13.7021 12.7121L2.41924 23.995C2.30208 24.1121 2.11213 24.1121 1.99497 23.995L1.00502 23.005C0.887867 22.8879 0.887868 22.6979 1.00503 22.5808L10.8737 12.7121Z",titleTag:"h2",titleJustify:"space-between",iconPosition:"right",activeIconViewBox:{vx:0,vy:0,vw:14,vh:25},activeIconPath:"M10.8737 12.7121C10.9908 12.595 10.9908 12.405 10.8737 12.2879L1.00502 2.41924C0.887867 2.30208 0.887867 2.11213 1.00502 1.99497L1.99497 1.00502C2.11213 0.887867 2.30208 0.887867 2.41924 1.00502L13.7021 12.2879C13.8192 12.405 13.8192 12.595 13.7021 12.7121L2.41924 23.995C2.30208 24.1121 2.11213 24.1121 1.99497 23.995L1.00502 23.005C0.887867 22.8879 0.887868 22.6979 1.00503 22.5808L10.8737 12.7121Z"}},isModalOpen:{type:"boolean",default:!1}},edit:function({attributes:e,setAttributes:o,clientId:t}){e.blockClientId=t;const n=(0,s.select)("core/block-editor").getBlockRootClientId(t),l=(0,s.useSelect)((e=>e("core/block-editor").getBlockAttributes(n)),[n]);(0,r.useEffect)((()=>{const e=(0,s.select)("core/block-editor").getBlock(t);if(e){const o={...e.attributes,parentAttrs:{...e.attributes.parentAttrs,iconViewBox:{...l.icon.viewBox},iconPath:l.icon.path,titleTag:l.titleTag,titleJustify:l?.titleJustify,iconPosition:l.icon?.position?l.icon?.position:"right",activeIconViewBox:{...l.icon.activeViewBox},activeIconPath:l.icon.activePath}};(0,s.dispatch)("core/block-editor").updateBlockAttributes(t,o)}}),[l]);const a=`cozyBlock_${t.replace(/-/gi,"_")}`,i=`\n \t#block-${t}.is-selected .cozy-accordion-content, #block-${t}.has-child-selected .cozy-accordion-content{\n\t\tdisplay: block;\n\t} \n `;return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("style",{dangerouslySetInnerHTML:{__html:i}}),(0,p.jsx)(j,{blockId:a,attributes:e,setAttributes:o})]})},save:function({attributes:e}){const o=`cozyBlock_${e.blockClientId.replace(/-/gi,"_")}`;return(0,p.jsx)(p.Fragment,{children:(0,p.jsx)("article",{className:"cozy-block-accordion-item",id:o,children:(0,p.jsxs)("header",{role:"tab","aria-expanded":!0,children:[(0,p.jsxs)("div",{className:"cozy-accordion-title",style:{display:"flex",justifyContent:e.parentAttrs?.titleJustify?e.parentAttrs?.titleJustify:"space-between",alignItems:"center",flexDirection:"row"},children:["left"===e.parentAttrs?.iconPosition&&(0,p.jsx)("div",{className:"accordion-icon-wrapper",children:(0,p.jsx)("svg",{width:16,height:16,viewBox:`${e.parentAttrs.iconViewBox.vx} ${e.parentAttrs.iconViewBox.vy} ${e.parentAttrs.iconViewBox.vw} ${e.parentAttrs.iconViewBox.vh}`,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:(0,p.jsx)("path",{d:e.parentAttrs.iconPath})})}),(0,p.jsx)(t.RichText.Content,{tagName:e.parentAttrs.titleTag,value:e.title}),"right"===e.parentAttrs?.iconPosition&&(0,p.jsx)("div",{className:"accordion-icon-wrapper",children:(0,p.jsx)("svg",{width:16,height:16,viewBox:`${e.parentAttrs.iconViewBox.vx} ${e.parentAttrs.iconViewBox.vy} ${e.parentAttrs.iconViewBox.vw} ${e.parentAttrs.iconViewBox.vh}`,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:(0,p.jsx)("path",{d:e.parentAttrs.iconPath})})})]}),(0,p.jsx)("div",{className:"cozy-accordion-content",children:(0,p.jsx)(t.InnerBlocks.Content,{})})]})})})},supports:{inserter:!1}}),(0,e.registerBlockType)(m.UU,{title:(0,o.__)(m.DD,"cozy-addons"),description:(0,o.__)(m.h_,"cozy-addons"),icon:{src:w},edit:function({attributes:e,setAttributes:o,clientId:n}){if(e.cover)return(0,p.jsx)("img",{src:e.cover});e.blockClientId=n;const l=(0,t.useBlockProps)({className:"cozy-block-wrapper"}),a=`cozyBlock_${n.replace(/-/gi,"_")}`;return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("div",{...l,children:(0,p.jsx)(C,{attributes:e,blockId:a,clientId:n})}),(0,p.jsx)(v,{attributes:e,setAttributes:o})]})},save:function({attributes:e}){const o=`cozyBlock_${(n=e.blockClientId,n.replace(/[;=()\s]/g,"")).replace(/-/gi,"_")}`;var n;return(0,p.jsx)(p.Fragment,{children:(0,p.jsx)("div",{className:`cozy-block-accordion icon-view-${e.icon.view} icon-layout-${e.icon.layout}`,id:o,children:(0,p.jsx)("div",{className:"cozy-accordion-wrapper",children:(0,p.jsx)(t.InnerBlocks.Content,{})})})})}})}},t={};function n(e){var l=t[e];if(void 0!==l)return l.exports;var a=t[e]={exports:{}};return o[e](a,a.exports,n),a.exports}n.m=o,e=[],n.O=(o,t,l,a)=>{if(!t){var i=1/0;for(d=0;d<e.length;d++){for(var[t,l,a]=e[d],s=!0,r=0;r<t.length;r++)(!1&a||i>=a)&&Object.keys(n.O).every((e=>n.O[e](t[r])))?t.splice(r--,1):(s=!1,a<i&&(i=a));if(s){e.splice(d--,1);var c=l();void 0!==c&&(o=c)}}return o}a=a||0;for(var d=e.length;d>0&&e[d-1][2]>a;d--)e[d]=e[d-1];e[d]=[t,l,a]},n.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),(()=>{var e={57:0,350:0};n.O.j=o=>0===e[o];var o=(o,t)=>{var l,a,[i,s,r]=t,c=0;if(i.some((o=>0!==e[o]))){for(l in s)n.o(s,l)&&(n.m[l]=s[l]);if(r)var d=r(n)}for(o&&o(t);c<i.length;c++)a=i[c],n.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return n.O(d)},t=globalThis.webpackChunkaccordion=globalThis.webpackChunkaccordion||[];t.forEach(o.bind(null,0)),t.push=o.bind(null,t.push.bind(t))})();var l=n.O(void 0,[350],(()=>n(108)));l=n.O(l)})();
Save
Back