builder-settings-types 0.0.158 → 0.0.160
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/builder-settings-types.cjs.js +15 -15
- package/dist/builder-settings-types.es.js +133 -119
- package/dist/index.css +1 -1
- package/dist/index.d.ts +24 -0
- package/package.json +1 -1
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
<path d="M8 5.33333V8M8 10.6667H8.00667M14 8C14 11.3137 11.3137 14 8 14C4.68629 14 2 11.3137 2 8C2 4.68629 4.68629 2 8 2C11.3137 2 14 4.68629 14 8Z"
|
|
13
13
|
stroke="currentColor" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round"/>
|
|
14
14
|
</svg>
|
|
15
|
-
`,d.title=this.description,n.insertBefore(d,a)}}else{if(!h){const d=document.createElement("div");d.className="setting-group-description",d.textContent=this.description,o.insertBefore(d,o.firstChild)}u&&u.remove()}};if(e.onclick=l,e.onkeydown=h=>{(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),l())},Object.keys(this.settings).length>0){for(const h in this.settings)if(this.settings.hasOwnProperty(h)){const u=this.settings[h];o.appendChild(u.draw())}}else{const h=document.createElement("div");h.className="setting-group-empty",h.textContent="No settings in this group",o.appendChild(h)}return e.appendChild(i),e.appendChild(n),t.appendChild(e),t.appendChild(o),this.elementRef=t,this.pendingBlurHandler&&(this.setupBlurHandlers(),this.pendingBlurHandler=null),t}collapse(){if(!this.elementRef||this.isCollapsed)return;const t=this.elementRef.querySelector(".setting-group-content"),e=this.elementRef.querySelector(".setting-group-arrow"),i=this.elementRef.querySelector(".setting-group-title");t&&e&&i&&(this.isCollapsed=!0,t.classList.add("collapsed"),e.classList.add("rotated"),i.setAttribute("aria-expanded","false"))}expand(){if(!this.elementRef||!this.isCollapsed)return;const t=this.elementRef.querySelector(".setting-group-content"),e=this.elementRef.querySelector(".setting-group-arrow"),i=this.elementRef.querySelector(".setting-group-title");t&&e&&i&&(this.isCollapsed=!1,t.classList.remove("collapsed"),e.classList.remove("rotated"),i.setAttribute("aria-expanded","true"))}updateVisibility(){this.elementRef&&this.hideCondition&&(this.elementRef.style.display=this.hideCondition()?"none":"")}toggle(){this.isHidden?this.show():this.hide()}getJson(){return JSON.stringify(this.getValues(),null,2)}setJson(t){try{const e=JSON.parse(t);this.
|
|
15
|
+
`,d.title=this.description,n.insertBefore(d,a)}}else{if(!h){const d=document.createElement("div");d.className="setting-group-description",d.textContent=this.description,o.insertBefore(d,o.firstChild)}u&&u.remove()}};if(e.onclick=l,e.onkeydown=h=>{(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),l())},Object.keys(this.settings).length>0){for(const h in this.settings)if(this.settings.hasOwnProperty(h)){const u=this.settings[h];o.appendChild(u.draw())}}else{const h=document.createElement("div");h.className="setting-group-empty",h.textContent="No settings in this group",o.appendChild(h)}return e.appendChild(i),e.appendChild(n),t.appendChild(e),t.appendChild(o),this.elementRef=t,this.pendingBlurHandler&&(this.setupBlurHandlers(),this.pendingBlurHandler=null),t}collapse(){if(!this.elementRef||this.isCollapsed)return;const t=this.elementRef.querySelector(".setting-group-content"),e=this.elementRef.querySelector(".setting-group-arrow"),i=this.elementRef.querySelector(".setting-group-title");t&&e&&i&&(this.isCollapsed=!0,t.classList.add("collapsed"),e.classList.add("rotated"),i.setAttribute("aria-expanded","false"))}expand(){if(!this.elementRef||!this.isCollapsed)return;const t=this.elementRef.querySelector(".setting-group-content"),e=this.elementRef.querySelector(".setting-group-arrow"),i=this.elementRef.querySelector(".setting-group-title");t&&e&&i&&(this.isCollapsed=!1,t.classList.remove("collapsed"),e.classList.remove("rotated"),i.setAttribute("aria-expanded","true"))}updateVisibility(){this.elementRef&&this.hideCondition&&(this.elementRef.style.display=this.hideCondition()?"none":"")}toggle(){this.isHidden?this.show():this.hide()}getJson(){return JSON.stringify(this.getValues(),null,2)}setJson(t){try{const e=JSON.parse(t);let i=e;const s=Object.keys(this.settings),n=Object.keys(e);if(!s.some(o=>n.includes(o))&&n.length===1){const o=n[0];i=e[o]}this.setValue(i)}catch(e){throw console.error("Invalid JSON provided to setJson:",e),new Error("Invalid JSON format")}}};w.hiddenElements=new Set;let m=w;function R(c){return new m(c)}function W(c){return c}class T extends g{constructor(t={}){super(t),this.inputType="text",t.onChange&&this.setOnChange(t.onChange)}draw(){const t=e=>{this.props.maxLength!==void 0&&(e.maxLength=this.props.maxLength),this.props.className&&e.classList.add(this.props.className)};return this.createInput({value:this.value,inputType:this.inputType,title:this.props.title,placeholder:this.props.placeholder,icon:this.props.icon,inputClassName:"string-setting-input "+(this.props.inputClassName||""),wrapperClassName:"string-setting-wrapper "+(this.props.wrapperClassName||""),inputCustomizer:t})}}const I="<svg xmlns='http://www.w3.org/2000/svg' width='18' height='19' viewBox='0 0 18 19' fill='none'><path d='M8.99999 15.8542C9.79613 16.5667 10.8475 17 12 17C14.4853 17 16.5 14.9853 16.5 12.5C16.5 10.4248 15.0953 8.67769 13.1849 8.15763M4.81513 8.15762C2.9047 8.67768 1.5 10.4248 1.5 12.5C1.5 14.9853 3.51472 17 6 17C8.48528 17 10.5 14.9853 10.5 12.5C10.5 11.9146 10.3882 11.3554 10.1849 10.8424M13.5 6.5C13.5 8.98528 11.4853 11 9 11C6.51472 11 4.5 8.98528 4.5 6.5C4.5 4.01472 6.51472 2 9 2C11.4853 2 13.5 4.01472 13.5 6.5Z' stroke='#667085' stroke-linecap='round' stroke-linejoin='round'/></svg>";class M extends T{constructor(t){super({...t,icon:t.icon||I,title:t.title||"Color"}),this.inputType="color",this.element=null,this.detectChange=t.detectChange}hexToRgb(t){t=t.replace("#","");const e=parseInt(t.substring(0,2),16),i=parseInt(t.substring(2,4),16),s=parseInt(t.substring(4,6),16);return`${e}, ${i}, ${s}`}rgbToHex(t){const[e,i,s]=t.split(",").map(a=>parseInt(a.trim()));if(isNaN(e)||isNaN(i)||isNaN(s))return"#000000";const n=a=>{const o=a.toString(16);return o.length===1?"0"+o:o};return`#${n(e)}${n(i)}${n(s)}`}draw(){const t=document.createElement("div");t.className="color-setting-wrapper",this.element=t;const e=document.createElement("div");e.className="icon-container";const i=this.createIcon(this.props.icon||I),s=this.createLabel(this.title||"Color");e.appendChild(i),e.appendChild(s);const n=document.createElement("div");n.className="color-input-wrapper";const a=d=>{const f=d.value.split(",").map(x=>parseInt(x.trim()));if(f.length!==3||f.some(isNaN))return d.style.border="1px solid red",!1;const[p,C,v]=f,H=p>=0&&p<=255&&C>=0&&C<=255&&v>=0&&v<=255;return d.style.border=H?"":"1px solid red",H},o=document.createElement("div");o.className="color-preview",o.style.backgroundColor=this.value?`rgb(${this.value})`:"";const l=this.createInput({value:this.value,inputType:"text",inputClassName:"color-text-input"}),r=l.querySelector("input");r.readOnly=!0;const h=this.createInput({value:this.value?this.rgbToHex(this.value):"",inputType:this.inputType,inputClassName:"color-picker"}),u=h.querySelector("input");return r.oninput=d=>{var p;let f=d.target.value.trim();a(r)&&(this.value=f,(p=this.onChange)==null||p.call(this,f),u.value=this.rgbToHex(f),o.style.backgroundColor=`rgb(${f})`)},u.oninput=d=>{var C,v;const f=d.target.value,p=this.hexToRgb(f);this.value=p,(C=this.onChange)==null||C.call(this,p),(v=this.detectChange)==null||v.call(this,p),r.value=p,o.style.backgroundColor=`rgb(${p})`},u.onchange=d=>{var C,v;const f=d.target.value,p=this.hexToRgb(f);this.value=p,(C=this.onChange)==null||C.call(this,p),(v=this.detectChange)==null||v.call(this,p),r.value=p,o.style.backgroundColor=`rgb(${p})`},n.appendChild(o),n.appendChild(h),n.appendChild(l),t.appendChild(e),t.appendChild(n),this.value&&(r.value=this.value,u.value=this.rgbToHex(this.value),o.style.backgroundColor=`rgb(${this.value})`),t}getElement(){return this.element}}class b extends g{constructor(t){super(t),this.inputType="number",this.inputElement=null,this.mobileValue=t.mobile,this.validateProps(),this.value=this.validateValue(this.value)}draw(){const t=s=>{this.props.minValue!==void 0&&(s.min=String(this.props.minValue)),this.props.maxValue!==void 0&&(s.max=String(this.props.maxValue)),this.props.className&&s.classList.add(this.props.className),s.addEventListener("input",()=>{const n=this.props.minValue??Number.MIN_SAFE_INTEGER,a=this.props.maxValue??Number.MAX_SAFE_INTEGER;let o=Number(s.value);o<n&&(o=n),o>a&&(o=a),String(o)!==s.value&&(s.value=String(o)),this.setValue(o)}),s.addEventListener("blur",()=>{var a,o;const n=this.validateValue(Number(s.value));n!==Number(s.value)&&(s.value=String(n),this.setValue(n)),(o=(a=this.props).onBlur)==null||o.call(a)})},e=this.createInput({value:this.value,inputType:this.inputType,title:this.props.title,icon:this.props.icon,inputClassName:"number-setting-input "+(this.props.inputClassName||""),wrapperClassName:"number-setting-wrapper "+(this.props.wrapperClassName||""),inputCustomizer:t});if(this.inputElement=e.querySelector("input.number-setting-input"),!this.props.suffix||this.props.suffix==="none")return e;e.classList.add("suffix-wrapper"),this.inputElement&&(this.inputElement.style.paddingRight="35px");const i=document.createElement("span");return i.className="suffix-label",i.textContent=this.props.suffix,e.appendChild(i),e}setValue(t){const e=this.validateValue(t);super.setValue(e),this.inputElement&&this.inputElement.value!==String(e)&&(this.inputElement.value=String(e??""))}validateValue(t){(t==null||isNaN(t))&&(t=this.props.default??0);const e=this.props.minValue??Number.MIN_SAFE_INTEGER,i=this.props.maxValue??Number.MAX_SAFE_INTEGER;let s=Number(t);return s<e&&(s=e),s>i&&(s=i),s}getMobileValue(){return this.mobileValue}setMobileValue(t){this.mobileValue=t}validateProps(){this.props.minValue!==void 0&&(this.props.default??0)<this.props.minValue&&console.warn(`Default value ${this.props.default} is less than minValue ${this.props.minValue}`),this.props.maxValue!==void 0&&(this.props.default??0)>this.props.maxValue&&console.warn(`Default value ${this.props.default} is greater than maxValue ${this.props.maxValue}`)}}const G=`
|
|
16
16
|
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
|
|
17
17
|
<path d="M9 17C13.4183 17 17 13.4183 17 9C17 4.58172 13.4183 1 9 1C4.58172 1 1 4.58172 1 9C1 13.4183 4.58172 17 9 17Z" stroke="#667085" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
18
18
|
<path d="M9 1V17C4.58172 17 1 13.4183 1 9C1 4.58172 4.58172 1 9 1Z" fill="#667085" stroke="#667085" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
@@ -75,13 +75,13 @@
|
|
|
75
75
|
<span class="upload-label">Upload</span>
|
|
76
76
|
`;const o=document.createElement("input");return o.type="file",o.accept="image/*",o.style.display="none",i.appendChild(n),i.appendChild(this.previewWrapper),i.appendChild(a),t.appendChild(i),t.appendChild(o),s?this.updatePreviewState(this.value):this.updatePreviewState(null),a.onclick=()=>{o.click()},o.onchange=async()=>{var r,h,u;const l=(r=o.files)==null?void 0:r[0];if(l)try{a.classList.add("loading"),a.disabled=!0;const d=new FormData,f=this.props.formFieldName||"file";d.append(f,l,l.name);const p=this.props.uploadUrl;if(!p)throw new Error("No uploadUrl provided to UploadSetting.");const C=this.props.requestMethod||"POST",v={...this.props.requestHeaders||{}},x=await(await fetch(p,{method:C,body:d,headers:v})).json();console.log("Upload response:",x);let E;if(this.props.parseResponse)E=this.props.parseResponse(x);else if(E=(h=x==null?void 0:x.data)==null?void 0:h.url,!E)throw new Error("No URL found in response. Provide a parseResponse if needed.");console.log("Final URL:",E),this.value=E,this.updatePreviewState(E),(u=this.onChange)==null||u.call(this,E)}catch(d){console.error("Error uploading file:",d)}finally{a.classList.remove("loading"),a.disabled=!1,o.value=""}else o.value=""},t}}class Z extends b{constructor(t={}){const e={title:t.title||"Height",suffix:"px",minValue:t.minValue??0,maxValue:t.maxValue,icon:t.icon||X,...t};super(e),this.inputType="number",this.mobileValue=t.mobile}getMobileValue(){return this.mobileValue}}const X=`<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
|
|
77
77
|
<path d="M9 14L9 5M9 14L6.75 12.5M9 14L11.25 12.5M9 5L6.75 6.5M9 5L11.25 6.5M15.75 2.75H2.25M15.75 16.25H2.25" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
|
|
78
|
-
</svg>`;class
|
|
78
|
+
</svg>`;class K extends b{constructor(t={}){super({title:t.title||"Width",suffix:"px",minValue:t.minValue??0,maxValue:t.maxValue,icon:t.icon||Q,...t}),this.inputType="number",this.mobileValue=t.mobile}getMobileValue(){return this.mobileValue}}const Q=`<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
|
|
79
79
|
<path d="M4.5 9.5H13.5M4.5 9.5L6 7.25M4.5 9.5L6 11.75M13.5 9.5L12 7.25M13.5 9.5L12 11.75M15.75 16.25V2.75M2.25 16.25V2.75" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
|
|
80
|
-
</svg>`,
|
|
80
|
+
</svg>`,Y=`
|
|
81
81
|
<svg xmlns="http://www.w3.org/2000/svg" class="svg-select-api" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-down">
|
|
82
82
|
<polyline points="6 9 12 15 18 9"></polyline>
|
|
83
83
|
</svg>
|
|
84
|
-
`;class tt extends g{constructor(t={}){if(super(t),this.inputType="select",this._options=[],this.isOpen=!1,this.selectedOptionIndex=null,this.optionsListEl=null,this.svgContainer=null,this.buttonEl=null,this.isLoading=!1,this.container=null,this.hasInitializedOptions=!1,this.selectedOptionIndex=null,t.default!==void 0&&(this.value=t.default),this.initializeOptions(t),!t.getOptionsAsync&&this.value!==void 0){const e=this._options.findIndex(i=>JSON.stringify(i.value)===JSON.stringify(this.value));e!==-1&&(this.selectedOptionIndex=e)}t.onChange&&this.setOnChange(t.onChange),t.detectChange&&(this.detectChangeCallback=t.detectChange)}initializeOptions(t){this.hasInitializedOptions&&!t.getOptionsAsync||(this._options=[],t.options&&(this._options=[...t.options]),t.getOptions&&this._options.push(...t.getOptions()),t.getOptionsAsync?this.isLoading=!0:this.hasInitializedOptions=!0)}createOption(t,e){const i=document.createElement("li");i.classList.add("select-api-option"),i.textContent=t.name,i.dataset.index=String(e);const s=document.createElement("input");return s.type="radio",s.classList.add("select-api-radio"),s.name="select-api-radio-group",i.appendChild(s),this.selectedOptionIndex===e&&(s.checked=!0),i}draw(){const t=document.createElement("div");t.classList.add("select-api-container"),this.container=t;const e=document.createElement("div");if(e.classList.add("select-api-button"),this.props.title){e.classList.add("has-label");const n=document.createElement("div");n.className="select-label",n.textContent=this.props.title,e.appendChild(n);const a=document.createElement("span");if(a.className="select-value",this.isLoading)a.textContent=this.props.loadingText||"Loading options...";else{const o=this.selectedOptionIndex!==null&&this._options&&this.selectedOptionIndex>=0&&this.selectedOptionIndex<this._options.length?this._options[this.selectedOptionIndex]:null,l=o&&typeof o.name=="string"?o.name:"Select an option";a.textContent=l}e.appendChild(a)}else{const n=document.createElement("span");if(this.isLoading)n.textContent=this.props.loadingText||"Loading options...";else{const a=this.selectedOptionIndex!==null&&this._options&&this.selectedOptionIndex>=0&&this.selectedOptionIndex<this._options.length?this._options[this.selectedOptionIndex]:null,o=a&&typeof a.name=="string"?a.name:"Select an option";n.textContent=o}e.appendChild(n)}e.onclick=()=>{var n,a;this.isLoading||(this.isOpen=!this.isOpen,(n=this.optionsListEl)==null||n.classList.toggle("open",this.isOpen),(a=this.svgContainer)==null||a.classList.toggle("open",this.isOpen))},t.appendChild(e),this.buttonEl=e;const i=document.createElement("ul");i.classList.add("select-api-options"),this._options.forEach((n,a)=>{const o=this.createOption(n,a);o.onclick=l=>this.selectApiOption(l,a,e),i.appendChild(o)}),t.appendChild(i);const s=document.createElement("div");return s.classList.add("svg-container"),s.innerHTML=
|
|
84
|
+
`;class tt extends g{constructor(t={}){if(super(t),this.inputType="select",this._options=[],this.isOpen=!1,this.selectedOptionIndex=null,this.optionsListEl=null,this.svgContainer=null,this.buttonEl=null,this.isLoading=!1,this.container=null,this.hasInitializedOptions=!1,this.selectedOptionIndex=null,t.default!==void 0&&(this.value=t.default),this.initializeOptions(t),!t.getOptionsAsync&&this.value!==void 0){const e=this._options.findIndex(i=>JSON.stringify(i.value)===JSON.stringify(this.value));e!==-1&&(this.selectedOptionIndex=e)}t.onChange&&this.setOnChange(t.onChange),t.detectChange&&(this.detectChangeCallback=t.detectChange)}initializeOptions(t){this.hasInitializedOptions&&!t.getOptionsAsync||(this._options=[],t.options&&(this._options=[...t.options]),t.getOptions&&this._options.push(...t.getOptions()),t.getOptionsAsync?this.isLoading=!0:this.hasInitializedOptions=!0)}createOption(t,e){const i=document.createElement("li");i.classList.add("select-api-option"),i.textContent=t.name,i.dataset.index=String(e);const s=document.createElement("input");return s.type="radio",s.classList.add("select-api-radio"),s.name="select-api-radio-group",i.appendChild(s),this.selectedOptionIndex===e&&(s.checked=!0),i}draw(){const t=document.createElement("div");t.classList.add("select-api-container"),this.container=t;const e=document.createElement("div");if(e.classList.add("select-api-button"),this.props.title){e.classList.add("has-label");const n=document.createElement("div");n.className="select-label",n.textContent=this.props.title,e.appendChild(n);const a=document.createElement("span");if(a.className="select-value",this.isLoading)a.textContent=this.props.loadingText||"Loading options...";else{const o=this.selectedOptionIndex!==null&&this._options&&this.selectedOptionIndex>=0&&this.selectedOptionIndex<this._options.length?this._options[this.selectedOptionIndex]:null,l=o&&typeof o.name=="string"?o.name:"Select an option";a.textContent=l}e.appendChild(a)}else{const n=document.createElement("span");if(this.isLoading)n.textContent=this.props.loadingText||"Loading options...";else{const a=this.selectedOptionIndex!==null&&this._options&&this.selectedOptionIndex>=0&&this.selectedOptionIndex<this._options.length?this._options[this.selectedOptionIndex]:null,o=a&&typeof a.name=="string"?a.name:"Select an option";n.textContent=o}e.appendChild(n)}e.onclick=()=>{var n,a;this.isLoading||(this.isOpen=!this.isOpen,(n=this.optionsListEl)==null||n.classList.toggle("open",this.isOpen),(a=this.svgContainer)==null||a.classList.toggle("open",this.isOpen))},t.appendChild(e),this.buttonEl=e;const i=document.createElement("ul");i.classList.add("select-api-options"),this._options.forEach((n,a)=>{const o=this.createOption(n,a);o.onclick=l=>this.selectApiOption(l,a,e),i.appendChild(o)}),t.appendChild(i);const s=document.createElement("div");return s.classList.add("svg-container"),s.innerHTML=Y,t.appendChild(s),s.onclick=()=>{var n,a;this.isLoading||(this.isOpen=!this.isOpen,(n=this.optionsListEl)==null||n.classList.toggle("open",this.isOpen),(a=this.svgContainer)==null||a.classList.toggle("open",this.isOpen))},this.optionsListEl=i,this.svgContainer=s,this.props.getOptionsAsync&&!this.hasInitializedOptions?(this.isLoading=!0,this.updateButtonText(),this.props.getOptionsAsync().then(n=>{const a=new Set(this._options.map(l=>JSON.stringify(l.value))),o=n.filter(l=>!a.has(JSON.stringify(l.value)));if(this._options.push(...o),this.isLoading=!1,this.hasInitializedOptions=!0,this.value!==void 0){const l=this._options.findIndex(r=>JSON.stringify(r.value)===JSON.stringify(this.value));this.selectedOptionIndex=l!==-1?l:null}else this.selectedOptionIndex=null;this.updateOptionsList(),this.updateButtonText()}).catch(n=>{console.error("Failed to fetch async options:",n),this.isLoading=!1,this.updateButtonText(this.props.errorText||"Error: Could not load options",!0)})):this.props.getOptionsAsync&&this._options.length<=1&&(this.isLoading=!0,this.updateButtonText(),this.props.getOptionsAsync().then(n=>{const a=new Set(this._options.map(l=>JSON.stringify(l.value))),o=n.filter(l=>!a.has(JSON.stringify(l.value)));if(this._options.push(...o),this.isLoading=!1,this.value!==void 0){const l=this._options.findIndex(r=>JSON.stringify(r.value)===JSON.stringify(this.value));this.selectedOptionIndex=l!==-1?l:null}else this.selectedOptionIndex=null;this.updateOptionsList(),this.updateButtonText()}).catch(n=>{console.error("Failed to fetch async options:",n),this.isLoading=!1,this.updateButtonText(this.props.errorText||"Error: Could not load options",!0)})),t}selectApiOption(t,e,i){var l,r,h,u;const s=t.target,n=s.querySelector(".select-api-radio")||((l=s.closest(".select-api-option"))==null?void 0:l.querySelector(".select-api-radio"));n&&(n.checked=!0),this.selectedOptionIndex=e;const a=this._options[e].value;this.value=a;const o=i.querySelector(".select-value");if(o)o.textContent=this._options[e].name;else{const d=i.firstChild;d&&d.tagName==="SPAN"&&(d.textContent=this._options[e].name)}this.isOpen=!1,(r=this.optionsListEl)==null||r.classList.remove("open"),(h=this.svgContainer)==null||h.classList.remove("open"),(u=this.onChange)==null||u.call(this,a),this.detectChangeCallback&&this.detectChangeCallback(a)}updateOptionsList(){!this.optionsListEl||!this.buttonEl||(this.optionsListEl.innerHTML="",this._options.forEach((t,e)=>{var s;const i=this.createOption(t,e);i.onclick=n=>{this.buttonEl&&this.selectApiOption(n,e,this.buttonEl)},(s=this.optionsListEl)==null||s.appendChild(i)}))}updateButtonText(t,e=!1){if(!this.buttonEl)return;const i=this.buttonEl.querySelector(".select-value")||this.buttonEl.firstChild;if(i)if(e)i.textContent=t||"Error",this.buttonEl.classList.add("error"),this.buttonEl.setAttribute("disabled","true"),this.optionsListEl&&this.optionsListEl.classList.remove("open"),this.svgContainer&&(this.svgContainer.style.display="none");else if(this.isLoading)i.textContent=this.props.loadingText||"Loading options...",this.buttonEl.classList.remove("error"),this.buttonEl.removeAttribute("disabled"),this.svgContainer&&(this.svgContainer.style.display="");else{const s=this.selectedOptionIndex!==null&&this._options&&this.selectedOptionIndex>=0&&this.selectedOptionIndex<this._options.length?this._options[this.selectedOptionIndex]:null,n=s&&typeof s.name=="string"?s.name:"Select an option";i.textContent=t||n,this.buttonEl.classList.remove("error"),this.buttonEl.removeAttribute("disabled"),this.svgContainer&&(this.svgContainer.style.display="")}}setDetectChange(t){this.detectChangeCallback=t}setValue(t){this.value=t,this.selectedOptionIndex=this._options.findIndex(e=>JSON.stringify(e.value)===JSON.stringify(t)),this.updateButtonText()}}class et extends g{constructor(t){var e,i;super(t),this.inputType="text",this.value=t.default??((i=(e=t.options)==null?void 0:e[0])==null?void 0:i.value)??"",this.detectChangeCallback=t.detectChange}draw(){var a,o;const t=document.createElement("div");t.className="toggle-setting-container",this.props.icon&&t.classList.add("toggle-with-icon");const e=document.createElement("div");if(e.className="toggle-label",this.props.icon){const l=document.createElement("span");l.className="toggle-icon",l.innerHTML=this.props.icon,e.appendChild(l)}if(this.props.title){const l=document.createElement("span");l.textContent=this.props.title,e.appendChild(l)}t.appendChild(e);const i=document.createElement("label");i.className="toggle-switch";const s=document.createElement("input");s.type="checkbox",s.checked=((o=(a=this.props.options)==null?void 0:a.find(l=>l.value===this.value))==null?void 0:o.status)??!1,s.addEventListener("change",()=>{var r,h;const l=((h=(r=this.props.options)==null?void 0:r.find(u=>u.status===s.checked))==null?void 0:h.value)??"";this.value=l,this.onChange&&this.onChange(this.value),this.detectChangeCallback&&this.detectChangeCallback(this.value)});const n=document.createElement("span");if(n.className="toggle-slider",this.props.activeColor||this.props.inactiveColor){const l=document.createElement("style"),r=this.props.activeColor||"#4CAF50",h=this.props.inactiveColor||"#ccc";l.textContent=`
|
|
85
85
|
.toggle-switch input:checked + .toggle-slider {
|
|
86
86
|
background-color: ${r};
|
|
87
87
|
}
|
|
@@ -137,7 +137,15 @@
|
|
|
137
137
|
<path d="M2.25 2.75H2.2575M2.25 9.5H2.2575M2.25 12.875H2.2575M2.25 6.125H2.2575M5.625 2.75H5.6325M5.625 9.5H5.6325M12.375 2.75H12.3825M12.375 9.5H12.3825M9 2.75H9.0075M9 9.5H9.0075M9 12.875H9.0075M9 6.125H9.0075M15.75 2.75H15.7575M15.75 9.5H15.7575M15.75 12.875H15.7575M15.75 6.125H15.7575M15.75 16.25H2.25" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
|
|
138
138
|
</svg>`,Ct=`<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
|
|
139
139
|
<path d="M5.625 2.75H5.6325M5.625 9.5H5.6325M5.625 16.25H5.6325M12.375 2.75H12.3825M12.375 9.5H12.3825M12.375 16.25H12.3825M9 2.75H9.0075M9 9.5H9.0075M9 16.25H9.0075M9 12.875H9.0075M9 6.125H9.0075M15.75 2.75H15.7575M15.75 9.5H15.7575M15.75 16.25H15.7575M15.75 12.875H15.7575M15.75 6.125H15.7575M2.25 16.25V2.75" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
|
|
140
|
-
</svg>`;class vt extends m{constructor(t
|
|
140
|
+
</svg>`;class vt extends m{constructor(t){super({title:"Background Image",collapsed:t==null?void 0:t.collapsed,hideCondition:t==null?void 0:t.hideCondition,settings:{backgroundImage:new _({...t==null?void 0:t.uploadProps,default:(t==null?void 0:t.backgroundImage)??""}),opacity:new L({default:(t==null?void 0:t.opacity)??100}),backgroundColor:new M({default:(t==null?void 0:t.backgroundColor)??"0, 0, 30"}),opacityBG:new L({default:(t==null?void 0:t.opacityBG)??100})}})}draw(){const t=super.draw(),e=t.querySelector(".setting-group-content");if(!e)return t;const i=Array.from(e.children),[s,n,a,o]=i;e.innerHTML="",e.appendChild(s),e.appendChild(n);const l=document.createElement("div");return l.className="bgset-or-label",l.textContent="OR",e.appendChild(l),e.appendChild(a),e.appendChild(o),t}getCssCode(){const t=this.settings.backgroundImage.value||"",e=this.settings.opacity.value??100,i=this.settings.backgroundColor.value||"0, 0, 30",s=this.settings.opacityBG.value??100;return t?`
|
|
141
|
+
background-image: url("${t}");
|
|
142
|
+
background-size: cover;
|
|
143
|
+
background-position: center;
|
|
144
|
+
opacity: ${e/100};
|
|
145
|
+
`:`
|
|
146
|
+
background-color: ${i};
|
|
147
|
+
opacity: ${s/100};
|
|
148
|
+
`}}class bt extends m{constructor(t,e,i){super({title:`Tab ${t+1}`,hideCondition:i==null?void 0:i.hideCondition,collapsed:i==null?void 0:i.collapsed,settings:{name:new T({title:"Tab Name",default:`Tab ${t+1}`}),content:new T({title:"Content",default:""})}}),this.onDeleteCallback=e}draw(){const t=super.draw(),e=t.querySelector(".setting-group-arrow");e&&e.parentElement&&e.parentElement.removeChild(e);const i=t.querySelector(".setting-group-title");if(i){const s=document.createElement("div");s.className="tab-delete-container";const n=document.createElement("button");n.className="tab-delete-button",n.innerHTML=`
|
|
141
149
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="#f87171" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="trash-icon">
|
|
142
150
|
<polyline points="3 6 5 6 21 6"></polyline>
|
|
143
151
|
<path d="M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6"></path>
|
|
@@ -145,7 +153,7 @@
|
|
|
145
153
|
<path d="M14 11v6"></path>
|
|
146
154
|
<path d="M9 6V4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2"></path>
|
|
147
155
|
</svg>
|
|
148
|
-
`,n.onclick=()=>{var o;return(o=this.onDeleteCallback)==null?void 0:o.call(this)},s.appendChild(n);const a=i.querySelector("h3");a?a.insertAdjacentElement("afterend",s):i.appendChild(s)}return t}}class
|
|
156
|
+
`,n.onclick=()=>{var o;return(o=this.onDeleteCallback)==null?void 0:o.call(this)},s.appendChild(n);const a=i.querySelector("h3");a?a.insertAdjacentElement("afterend",s):i.appendChild(s)}return t}}class wt extends m{constructor(t){super({title:"Tabs",settings:{},hideCondition:t==null?void 0:t.hideCondition,collapsed:t==null?void 0:t.collapsed}),this.tabs=[],this._el=null,this.addTab()}addTab(t){const e=this.tabs.length,i=new bt(e,()=>this.removeTab(i),t);this.tabs.push(i),this.settings[`Tab ${e+1}`]=i}removeTab(t){const e=this.tabs.indexOf(t);e>=0&&(this.tabs.splice(e,1),delete this.settings[`Tab ${e+1}`],this.relabelTabs(),this.rerender())}relabelTabs(){this.settings={},this.tabs.forEach((t,e)=>{t.title=`Tab ${e+1}`,this.settings[`Tab ${e+1}`]=t})}draw(){const t=super.draw();this._el=t;const e=document.createElement("div");e.className="tabs-add-btn-container";const i=document.createElement("button");return i.className="tabs-add-button",i.innerHTML=`
|
|
149
157
|
<span class="add-icon">
|
|
150
158
|
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" stroke="#667085">
|
|
151
159
|
<g id="SVGRepo_bgCarrier" stroke-width="0"></g>
|
|
@@ -158,12 +166,4 @@
|
|
|
158
166
|
</svg>
|
|
159
167
|
</span>
|
|
160
168
|
<span class="add-label">Add Tab</span>
|
|
161
|
-
`,i.onclick=()=>{this.addTab(),this.rerender()},e.appendChild(i),t.appendChild(e),t}rerender(){if(!this._el)return;const t=this._el.querySelector(".setting-group-content");t&&(t.innerHTML="",Object.keys(this.settings).forEach(e=>{const i=this.settings[e];t.appendChild(i.draw())}))}}
|
|
162
|
-
background-image: url("${t}");
|
|
163
|
-
background-size: cover;
|
|
164
|
-
background-position: center;
|
|
165
|
-
opacity: ${e/100};
|
|
166
|
-
`:`
|
|
167
|
-
background-color: ${i};
|
|
168
|
-
opacity: ${s/100};
|
|
169
|
-
`}}exports.AlignSetting=A;exports.BackgroundSettingSet=wt;exports.BorderSettingSet=rt;exports.ButtonSetting=D;exports.ColorSetting=M;exports.DimensionSetting=F;exports.GapSetting=st;exports.HeaderTypographySettingSet=ut;exports.HeightSetting=Z;exports.MarginBottomSetting=at;exports.MarginSettingGroup=pt;exports.NumberSetting=b;exports.OpacitySetting=L;exports.SelectApiSettings=tt;exports.SelectSetting=N;exports.Setting=g;exports.SettingGroup=m;exports.StringSetting=T;exports.TabsContainerGroup=bt;exports.TabsSettings=k;exports.Toggle=et;exports.UploadSetting=_;exports.WidthSetting=Q;exports.asSettingGroupWithSettings=W;exports.createSettingGroup=R;exports.iterateSettings=V;
|
|
169
|
+
`,i.onclick=()=>{this.addTab(),this.rerender()},e.appendChild(i),t.appendChild(e),t}rerender(){if(!this._el)return;const t=this._el.querySelector(".setting-group-content");t&&(t.innerHTML="",Object.keys(this.settings).forEach(e=>{const i=this.settings[e];t.appendChild(i.draw())}))}}function xt(c){return c instanceof m}function Et(c){return c instanceof g}exports.AlignSetting=A;exports.BackgroundSettingSet=vt;exports.BorderSettingSet=rt;exports.ButtonSetting=D;exports.ColorSetting=M;exports.DimensionSetting=F;exports.GapSetting=st;exports.HeaderTypographySettingSet=ut;exports.HeightSetting=Z;exports.MarginBottomSetting=at;exports.MarginSettingGroup=pt;exports.NumberSetting=b;exports.OpacitySetting=L;exports.SelectApiSettings=tt;exports.SelectSetting=N;exports.Setting=g;exports.SettingGroup=m;exports.StringSetting=T;exports.TabsContainerGroup=wt;exports.TabsSettings=k;exports.Toggle=et;exports.UploadSetting=_;exports.WidthSetting=K;exports.asSettingGroupWithSettings=W;exports.createSettingGroup=R;exports.isSetting=Et;exports.isSettingGroup=xt;exports.iterateSettings=V;
|
|
@@ -5,7 +5,7 @@ let B = (c = 21) => {
|
|
|
5
5
|
t += R[e[c] & 63];
|
|
6
6
|
return t;
|
|
7
7
|
};
|
|
8
|
-
function
|
|
8
|
+
function y(c) {
|
|
9
9
|
if (c === null || typeof c != "object")
|
|
10
10
|
return c;
|
|
11
11
|
if (c instanceof Date)
|
|
@@ -13,12 +13,12 @@ function V(c) {
|
|
|
13
13
|
if (Array.isArray(c)) {
|
|
14
14
|
const i = [];
|
|
15
15
|
for (let s = 0; s < c.length; s++)
|
|
16
|
-
i[s] =
|
|
16
|
+
i[s] = y(c[s]);
|
|
17
17
|
return i;
|
|
18
18
|
}
|
|
19
19
|
const t = {};
|
|
20
20
|
for (const i in c)
|
|
21
|
-
Object.prototype.hasOwnProperty.call(c, i) && (t[i] =
|
|
21
|
+
Object.prototype.hasOwnProperty.call(c, i) && (t[i] = y(c[i]));
|
|
22
22
|
const e = Object.getPrototypeOf(c);
|
|
23
23
|
return e !== Object.prototype && Object.setPrototypeOf(t, e), t;
|
|
24
24
|
}
|
|
@@ -58,8 +58,8 @@ class g {
|
|
|
58
58
|
}
|
|
59
59
|
// Basic clone method
|
|
60
60
|
clone() {
|
|
61
|
-
const t = this.constructor, e =
|
|
62
|
-
return i.value =
|
|
61
|
+
const t = this.constructor, e = y(this.props), i = new t(e);
|
|
62
|
+
return i.value = y(this.value), i;
|
|
63
63
|
}
|
|
64
64
|
createInput(t) {
|
|
65
65
|
t = { ...this.props.inputProps, ...t };
|
|
@@ -120,7 +120,7 @@ class g {
|
|
|
120
120
|
return i.className = "input-icon " + (e || ""), i.innerHTML = t, i;
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
|
-
function
|
|
123
|
+
function T(c, t) {
|
|
124
124
|
for (const e in c)
|
|
125
125
|
if (c.hasOwnProperty(e)) {
|
|
126
126
|
const i = c[e];
|
|
@@ -153,7 +153,7 @@ const b = class b {
|
|
|
153
153
|
Object.keys(s).length > 0 && (this.lastChangeTime = Date.now(), this.initialValues = i, t(i), this.updateVisibility()), this.isHandlingChange = !1;
|
|
154
154
|
}, 50));
|
|
155
155
|
};
|
|
156
|
-
return this.changeHandlers.clear(),
|
|
156
|
+
return this.changeHandlers.clear(), T(this.settings, (i, s) => {
|
|
157
157
|
var n;
|
|
158
158
|
if (s instanceof b)
|
|
159
159
|
s.setOnChange((a) => {
|
|
@@ -188,7 +188,7 @@ const b = class b {
|
|
|
188
188
|
"focusout",
|
|
189
189
|
this.handleBlur,
|
|
190
190
|
!0
|
|
191
|
-
),
|
|
191
|
+
), T(this.settings, (t, e) => {
|
|
192
192
|
var i;
|
|
193
193
|
if (e instanceof b)
|
|
194
194
|
e.setOnBlur(this.handleBlur);
|
|
@@ -212,7 +212,7 @@ const b = class b {
|
|
|
212
212
|
}
|
|
213
213
|
clone() {
|
|
214
214
|
const t = {};
|
|
215
|
-
|
|
215
|
+
T(this.settings, (s, n) => {
|
|
216
216
|
typeof n.clone == "function" ? t[s] = n.clone() : (console.warn(
|
|
217
217
|
`Setting with key '${s}' does not have a clone method. Copying reference.`
|
|
218
218
|
), t[s] = n);
|
|
@@ -382,16 +382,22 @@ const b = class b {
|
|
|
382
382
|
setJson(t) {
|
|
383
383
|
try {
|
|
384
384
|
const e = JSON.parse(t);
|
|
385
|
-
|
|
385
|
+
let i = e;
|
|
386
|
+
const s = Object.keys(this.settings), n = Object.keys(e);
|
|
387
|
+
if (!s.some((o) => n.includes(o)) && n.length === 1) {
|
|
388
|
+
const o = n[0];
|
|
389
|
+
i = e[o];
|
|
390
|
+
}
|
|
391
|
+
this.setValue(i);
|
|
386
392
|
} catch (e) {
|
|
387
393
|
throw console.error("Invalid JSON provided to setJson:", e), new Error("Invalid JSON format");
|
|
388
394
|
}
|
|
389
395
|
}
|
|
390
396
|
};
|
|
391
397
|
b.hiddenElements = /* @__PURE__ */ new Set();
|
|
392
|
-
let
|
|
398
|
+
let m = b;
|
|
393
399
|
function _(c) {
|
|
394
|
-
return new
|
|
400
|
+
return new m(c);
|
|
395
401
|
}
|
|
396
402
|
function lt(c) {
|
|
397
403
|
return c;
|
|
@@ -449,11 +455,11 @@ class O extends H {
|
|
|
449
455
|
const n = document.createElement("div");
|
|
450
456
|
n.className = "color-input-wrapper";
|
|
451
457
|
const a = (d) => {
|
|
452
|
-
const
|
|
453
|
-
if (
|
|
458
|
+
const f = d.value.split(",").map((x) => parseInt(x.trim()));
|
|
459
|
+
if (f.length !== 3 || f.some(isNaN))
|
|
454
460
|
return d.style.border = "1px solid red", !1;
|
|
455
|
-
const [p, C, v] =
|
|
456
|
-
return d.style.border =
|
|
461
|
+
const [p, C, v] = f, M = p >= 0 && p <= 255 && C >= 0 && C <= 255 && v >= 0 && v <= 255;
|
|
462
|
+
return d.style.border = M ? "" : "1px solid red", M;
|
|
457
463
|
}, o = document.createElement("div");
|
|
458
464
|
o.className = "color-preview", o.style.backgroundColor = this.value ? `rgb(${this.value})` : "";
|
|
459
465
|
const l = this.createInput({
|
|
@@ -473,15 +479,15 @@ class O extends H {
|
|
|
473
479
|
);
|
|
474
480
|
return r.oninput = (d) => {
|
|
475
481
|
var p;
|
|
476
|
-
let
|
|
477
|
-
a(r) && (this.value =
|
|
482
|
+
let f = d.target.value.trim();
|
|
483
|
+
a(r) && (this.value = f, (p = this.onChange) == null || p.call(this, f), u.value = this.rgbToHex(f), o.style.backgroundColor = `rgb(${f})`);
|
|
478
484
|
}, u.oninput = (d) => {
|
|
479
485
|
var C, v;
|
|
480
|
-
const
|
|
486
|
+
const f = d.target.value, p = this.hexToRgb(f);
|
|
481
487
|
this.value = p, (C = this.onChange) == null || C.call(this, p), (v = this.detectChange) == null || v.call(this, p), r.value = p, o.style.backgroundColor = `rgb(${p})`;
|
|
482
488
|
}, u.onchange = (d) => {
|
|
483
489
|
var C, v;
|
|
484
|
-
const
|
|
490
|
+
const f = d.target.value, p = this.hexToRgb(f);
|
|
485
491
|
this.value = p, (C = this.onChange) == null || C.call(this, p), (v = this.detectChange) == null || v.call(this, p), r.value = p, o.style.backgroundColor = `rgb(${p})`;
|
|
486
492
|
}, n.appendChild(o), n.appendChild(h), n.appendChild(l), t.appendChild(e), t.appendChild(n), this.value && (r.value = this.value, u.value = this.rgbToHex(this.value), o.style.backgroundColor = `rgb(${this.value})`), t;
|
|
487
493
|
}
|
|
@@ -544,7 +550,7 @@ const $ = `
|
|
|
544
550
|
<path d="M9 17C13.4183 17 17 13.4183 17 9C17 4.58172 13.4183 1 9 1C4.58172 1 1 4.58172 1 9C1 13.4183 4.58172 17 9 17Z" stroke="#667085" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
545
551
|
<path d="M9 1V17C4.58172 17 1 13.4183 1 9C1 4.58172 4.58172 1 9 1Z" fill="#667085" stroke="#667085" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
546
552
|
</svg>`;
|
|
547
|
-
class
|
|
553
|
+
class V extends w {
|
|
548
554
|
constructor(t = {}) {
|
|
549
555
|
const e = {
|
|
550
556
|
title: "Opacity",
|
|
@@ -914,8 +920,8 @@ class U extends g {
|
|
|
914
920
|
if (l)
|
|
915
921
|
try {
|
|
916
922
|
a.classList.add("loading"), a.disabled = !0;
|
|
917
|
-
const d = new FormData(),
|
|
918
|
-
d.append(
|
|
923
|
+
const d = new FormData(), f = this.props.formFieldName || "file";
|
|
924
|
+
d.append(f, l, l.name);
|
|
919
925
|
const p = this.props.uploadUrl;
|
|
920
926
|
if (!p)
|
|
921
927
|
throw new Error("No uploadUrl provided to UploadSetting.");
|
|
@@ -1228,7 +1234,7 @@ class gt extends g {
|
|
|
1228
1234
|
return this.mobileValue;
|
|
1229
1235
|
}
|
|
1230
1236
|
}
|
|
1231
|
-
class k extends
|
|
1237
|
+
class k extends m {
|
|
1232
1238
|
constructor(t) {
|
|
1233
1239
|
var o;
|
|
1234
1240
|
if (!t.tabs)
|
|
@@ -1270,18 +1276,18 @@ class k extends f {
|
|
|
1270
1276
|
});
|
|
1271
1277
|
};
|
|
1272
1278
|
Object.values(this.settings).forEach((e) => {
|
|
1273
|
-
e instanceof
|
|
1279
|
+
e instanceof m ? e.setOnChange(() => {
|
|
1274
1280
|
t();
|
|
1275
1281
|
}) : e instanceof g && e.setOnChange(() => {
|
|
1276
1282
|
t();
|
|
1277
1283
|
});
|
|
1278
1284
|
}), this.tabs.forEach((e) => {
|
|
1279
1285
|
Object.entries(e.settings).forEach(([i, s]) => {
|
|
1280
|
-
(s instanceof
|
|
1286
|
+
(s instanceof m || s instanceof g) && (s instanceof k ? (s._parentTabsSettings = this, s.setOnChange((n) => {
|
|
1281
1287
|
Promise.resolve().then(() => {
|
|
1282
1288
|
this.tabValues[e.id] = this.getTabValues(e), this.triggerDebouncedChange();
|
|
1283
1289
|
});
|
|
1284
|
-
})) : s instanceof
|
|
1290
|
+
})) : s instanceof m ? s.setOnChange(() => {
|
|
1285
1291
|
Promise.resolve().then(() => {
|
|
1286
1292
|
this.tabValues[e.id] = this.getTabValues(e), this.triggerDebouncedChange();
|
|
1287
1293
|
});
|
|
@@ -1390,7 +1396,7 @@ class k extends f {
|
|
|
1390
1396
|
getTabValues(t) {
|
|
1391
1397
|
const e = {};
|
|
1392
1398
|
return Object.entries(t.settings).forEach(([i, s]) => {
|
|
1393
|
-
s instanceof k || s instanceof
|
|
1399
|
+
s instanceof k || s instanceof m ? e[i] = s.getValues() : (s instanceof g, e[i] = s.value);
|
|
1394
1400
|
}), e;
|
|
1395
1401
|
}
|
|
1396
1402
|
clone() {
|
|
@@ -1485,16 +1491,16 @@ class mt extends w {
|
|
|
1485
1491
|
}), this.inputType = "number";
|
|
1486
1492
|
}
|
|
1487
1493
|
}
|
|
1488
|
-
const
|
|
1494
|
+
const K = `
|
|
1489
1495
|
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
|
|
1490
1496
|
<path d="M5.625 9.5H5.6325M12.375 9.5H12.3825M9 9.5H9.0075M9 12.875H9.0075M9 6.125H9.0075M2.25 6.35L2.25 12.65C2.25 13.9101 2.25 14.5402 2.49524 15.0215C2.71095 15.4448 3.05516 15.789 3.47852 16.0048C3.95982 16.25 4.58988 16.25 5.85 16.25H12.15C13.4101 16.25 14.0402 16.25 14.5215 16.0048C14.9448 15.789 15.289 15.4448 15.5048 15.0215C15.75 14.5402 15.75 13.9101 15.75 12.65V6.35C15.75 5.08988 15.75 4.45982 15.5048 3.97852C15.289 3.55516 14.9448 3.21095 14.5215 2.99524C14.0402 2.75 13.4101 2.75 12.15 2.75L5.85 2.75C4.58988 2.75 3.95982 2.75 3.47852 2.99524C3.05516 3.21095 2.71095 3.55516 2.49524 3.97852C2.25 4.45982 2.25 5.08988 2.25 6.35Z" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1491
1497
|
</svg>
|
|
1492
|
-
`,
|
|
1498
|
+
`, Q = `
|
|
1493
1499
|
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
|
|
1494
1500
|
<path d="M6 2.75H5.85C4.58988 2.75 3.95982 2.75 3.47852 2.99524C3.05516 3.21095 2.71095 3.55516 2.49524 3.97852C2.25 4.45982 2.25 5.08988 2.25 6.35V6.5M6 16.25H5.85C4.58988 16.25 3.95982 16.25 3.47852 16.0048C3.05516 15.789 2.71095 15.4448 2.49524 15.0215C2.25 14.5402 2.25 13.9101 2.25 12.65V12.5M15.75 6.5V6.35C15.75 5.08988 15.75 4.45982 15.5048 3.97852C15.289 3.55516 14.9448 3.21095 14.5215 2.99524C14.0402 2.75 13.4101 2.75 12.15 2.75H12M15.75 12.5V12.65C15.75 13.9101 15.75 14.5402 15.5048 15.0215C15.289 15.4448 14.9448 15.789 14.5215 16.0048C14.0402 16.25 13.4101 16.25 12.15 16.25H12" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1495
1501
|
</svg>
|
|
1496
1502
|
`;
|
|
1497
|
-
class ft extends
|
|
1503
|
+
class ft extends m {
|
|
1498
1504
|
constructor(t) {
|
|
1499
1505
|
super({
|
|
1500
1506
|
title: "Border",
|
|
@@ -1503,21 +1509,21 @@ class ft extends f {
|
|
|
1503
1509
|
settings: {
|
|
1504
1510
|
size: new w({
|
|
1505
1511
|
title: "Size",
|
|
1506
|
-
icon:
|
|
1512
|
+
icon: Q,
|
|
1507
1513
|
default: (t == null ? void 0 : t.size) ?? 0,
|
|
1508
1514
|
suffix: "px"
|
|
1509
1515
|
}),
|
|
1510
1516
|
color: new O({
|
|
1511
1517
|
default: (t == null ? void 0 : t.color) ?? "0, 0, 30"
|
|
1512
1518
|
}),
|
|
1513
|
-
opacity: new
|
|
1519
|
+
opacity: new V({
|
|
1514
1520
|
default: (t == null ? void 0 : t.opacity) ?? 100,
|
|
1515
1521
|
minValue: 0,
|
|
1516
1522
|
maxValue: 100
|
|
1517
1523
|
}),
|
|
1518
1524
|
radius: new w({
|
|
1519
1525
|
title: "Radius",
|
|
1520
|
-
icon:
|
|
1526
|
+
icon: K,
|
|
1521
1527
|
default: (t == null ? void 0 : t.radius) ?? 12,
|
|
1522
1528
|
suffix: "px"
|
|
1523
1529
|
})
|
|
@@ -1537,7 +1543,7 @@ class ft extends f {
|
|
|
1537
1543
|
`;
|
|
1538
1544
|
}
|
|
1539
1545
|
}
|
|
1540
|
-
const
|
|
1546
|
+
const Y = `
|
|
1541
1547
|
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="13" viewBox="0 0 14 13" fill="none">
|
|
1542
1548
|
<path d="M1 2.75C1 2.05109 1 1.70163 1.11418 1.42597C1.26642 1.05843 1.55843 0.766422 1.92597 0.614181C2.20163 0.5 2.55109 0.5 3.25 0.5H10.75C11.4489 0.5 11.7984 0.5 12.074 0.614181C12.4416 0.766422 12.7336 1.05843 12.8858 1.42597C13 1.70163 13 2.05109 13 2.75M4.75 12.5H9.25M7 0.5V12.5" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1543
1549
|
</svg>
|
|
@@ -1550,7 +1556,7 @@ const K = `
|
|
|
1550
1556
|
<path d="M6 5.75H12M9 5.75V13.25M5.85 16.25H12.15C13.4101 16.25 14.0402 16.25 14.5215 16.0048C14.9448 15.789 15.289 15.4448 15.5048 15.0215C15.75 14.5402 15.75 13.9101 15.75 12.65V6.35C15.75 5.08988 15.75 4.45982 15.5048 3.97852C15.289 3.55516 14.9448 3.21095 14.5215 2.99524C14.0402 2.75 13.4101 2.75 12.15 2.75H5.85C4.58988 2.75 3.95982 2.75 3.47852 2.99524C3.05516 3.21095 2.71095 3.55516 2.49524 3.97852C2.25 4.45982 2.25 5.08988 2.25 6.35V12.65C2.25 13.9101 2.25 14.5402 2.49524 15.0215C2.71095 15.4448 3.05516 15.789 3.47852 16.0048C3.95982 16.25 4.58988 16.25 5.85 16.25Z" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1551
1557
|
</svg>
|
|
1552
1558
|
`;
|
|
1553
|
-
class Ct extends
|
|
1559
|
+
class Ct extends m {
|
|
1554
1560
|
constructor(t = {}) {
|
|
1555
1561
|
super({
|
|
1556
1562
|
title: t.title || "Typography",
|
|
@@ -1560,12 +1566,12 @@ class Ct extends f {
|
|
|
1560
1566
|
color: new O({
|
|
1561
1567
|
default: t.colorDefault ?? "0, 0, 30"
|
|
1562
1568
|
}),
|
|
1563
|
-
opacity: new
|
|
1569
|
+
opacity: new V({
|
|
1564
1570
|
default: t.colorOpacityDefault ?? 100
|
|
1565
1571
|
}),
|
|
1566
1572
|
fontFamily: new I({
|
|
1567
1573
|
title: "Font",
|
|
1568
|
-
icon:
|
|
1574
|
+
icon: Y,
|
|
1569
1575
|
default: t.fontFamilyDefault ?? "Satoshi",
|
|
1570
1576
|
options: t.fontFamilyOptions ?? [
|
|
1571
1577
|
{ name: "Satoshi", value: "Satoshi" },
|
|
@@ -1659,7 +1665,7 @@ class L extends g {
|
|
|
1659
1665
|
}), i;
|
|
1660
1666
|
}
|
|
1661
1667
|
}
|
|
1662
|
-
class vt extends
|
|
1668
|
+
class vt extends m {
|
|
1663
1669
|
constructor(t) {
|
|
1664
1670
|
super({
|
|
1665
1671
|
title: "Margins",
|
|
@@ -1712,7 +1718,81 @@ const it = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewB
|
|
|
1712
1718
|
</svg>`, at = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
|
|
1713
1719
|
<path d="M5.625 2.75H5.6325M5.625 9.5H5.6325M5.625 16.25H5.6325M12.375 2.75H12.3825M12.375 9.5H12.3825M12.375 16.25H12.3825M9 2.75H9.0075M9 9.5H9.0075M9 16.25H9.0075M9 12.875H9.0075M9 6.125H9.0075M15.75 2.75H15.7575M15.75 9.5H15.7575M15.75 16.25H15.7575M15.75 12.875H15.7575M15.75 6.125H15.7575M2.25 16.25V2.75" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1714
1720
|
</svg>`;
|
|
1715
|
-
class
|
|
1721
|
+
class bt extends m {
|
|
1722
|
+
/**
|
|
1723
|
+
* Constructs a new BackgroundSettingSet.
|
|
1724
|
+
*
|
|
1725
|
+
* @param props An object that may include default values for each setting and additional
|
|
1726
|
+
* properties for the UploadSetting via `uploadProps`.
|
|
1727
|
+
*
|
|
1728
|
+
* Example:
|
|
1729
|
+
* {
|
|
1730
|
+
* backgroundImage: 'https://example.com/myimage.png',
|
|
1731
|
+
* opacity: 80,
|
|
1732
|
+
* backgroundColor: "0, 0, 30",
|
|
1733
|
+
* opacityBG: 90,
|
|
1734
|
+
* uploadProps: {
|
|
1735
|
+
* uploadUrl: 'https://st-admapi.onaim.io/api/File/UploadImage',
|
|
1736
|
+
* requestMethod: 'POST',
|
|
1737
|
+
* requestHeaders: {
|
|
1738
|
+
* accept: 'text/plain',
|
|
1739
|
+
* Authorization: 'bearer <your-token-here>',
|
|
1740
|
+
* },
|
|
1741
|
+
* formFieldName: 'File',
|
|
1742
|
+
* parseResponse: (data) => data.data.url,
|
|
1743
|
+
* }
|
|
1744
|
+
* }
|
|
1745
|
+
*/
|
|
1746
|
+
constructor(t) {
|
|
1747
|
+
super({
|
|
1748
|
+
title: "Background Image",
|
|
1749
|
+
collapsed: t == null ? void 0 : t.collapsed,
|
|
1750
|
+
hideCondition: t == null ? void 0 : t.hideCondition,
|
|
1751
|
+
settings: {
|
|
1752
|
+
backgroundImage: new U({
|
|
1753
|
+
...t == null ? void 0 : t.uploadProps,
|
|
1754
|
+
default: (t == null ? void 0 : t.backgroundImage) ?? ""
|
|
1755
|
+
}),
|
|
1756
|
+
opacity: new V({
|
|
1757
|
+
default: (t == null ? void 0 : t.opacity) ?? 100
|
|
1758
|
+
}),
|
|
1759
|
+
backgroundColor: new O({
|
|
1760
|
+
default: (t == null ? void 0 : t.backgroundColor) ?? "0, 0, 30"
|
|
1761
|
+
}),
|
|
1762
|
+
opacityBG: new V({
|
|
1763
|
+
default: (t == null ? void 0 : t.opacityBG) ?? 100
|
|
1764
|
+
})
|
|
1765
|
+
}
|
|
1766
|
+
});
|
|
1767
|
+
}
|
|
1768
|
+
/**
|
|
1769
|
+
* Override draw() to reorder the child settings and insert an "OR" label between the two sections.
|
|
1770
|
+
*/
|
|
1771
|
+
draw() {
|
|
1772
|
+
const t = super.draw(), e = t.querySelector(".setting-group-content");
|
|
1773
|
+
if (!e) return t;
|
|
1774
|
+
const i = Array.from(e.children), [s, n, a, o] = i;
|
|
1775
|
+
e.innerHTML = "", e.appendChild(s), e.appendChild(n);
|
|
1776
|
+
const l = document.createElement("div");
|
|
1777
|
+
return l.className = "bgset-or-label", l.textContent = "OR", e.appendChild(l), e.appendChild(a), e.appendChild(o), t;
|
|
1778
|
+
}
|
|
1779
|
+
/**
|
|
1780
|
+
* Helper method to generate CSS based on the current settings.
|
|
1781
|
+
*/
|
|
1782
|
+
getCssCode() {
|
|
1783
|
+
const t = this.settings.backgroundImage.value || "", e = this.settings.opacity.value ?? 100, i = this.settings.backgroundColor.value || "0, 0, 30", s = this.settings.opacityBG.value ?? 100;
|
|
1784
|
+
return t ? `
|
|
1785
|
+
background-image: url("${t}");
|
|
1786
|
+
background-size: cover;
|
|
1787
|
+
background-position: center;
|
|
1788
|
+
opacity: ${e / 100};
|
|
1789
|
+
` : `
|
|
1790
|
+
background-color: ${i};
|
|
1791
|
+
opacity: ${s / 100};
|
|
1792
|
+
`;
|
|
1793
|
+
}
|
|
1794
|
+
}
|
|
1795
|
+
class ot extends m {
|
|
1716
1796
|
constructor(t, e, i) {
|
|
1717
1797
|
super({
|
|
1718
1798
|
title: `Tab ${t + 1}`,
|
|
@@ -1756,7 +1836,7 @@ class ot extends f {
|
|
|
1756
1836
|
return t;
|
|
1757
1837
|
}
|
|
1758
1838
|
}
|
|
1759
|
-
class
|
|
1839
|
+
class wt extends m {
|
|
1760
1840
|
// Store the rendered element
|
|
1761
1841
|
constructor(t) {
|
|
1762
1842
|
super({
|
|
@@ -1825,83 +1905,15 @@ class bt extends f {
|
|
|
1825
1905
|
}));
|
|
1826
1906
|
}
|
|
1827
1907
|
}
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
* properties for the UploadSetting via `uploadProps`.
|
|
1834
|
-
*
|
|
1835
|
-
* Example:
|
|
1836
|
-
* {
|
|
1837
|
-
* backgroundImage: 'https://example.com/myimage.png',
|
|
1838
|
-
* opacity: 80,
|
|
1839
|
-
* backgroundColor: "0, 0, 30",
|
|
1840
|
-
* opacityBG: 90,
|
|
1841
|
-
* uploadProps: {
|
|
1842
|
-
* uploadUrl: 'https://st-admapi.onaim.io/api/File/UploadImage',
|
|
1843
|
-
* requestMethod: 'POST',
|
|
1844
|
-
* requestHeaders: {
|
|
1845
|
-
* accept: 'text/plain',
|
|
1846
|
-
* Authorization: 'bearer <your-token-here>',
|
|
1847
|
-
* },
|
|
1848
|
-
* formFieldName: 'File',
|
|
1849
|
-
* parseResponse: (data) => data.data.url,
|
|
1850
|
-
* }
|
|
1851
|
-
* }
|
|
1852
|
-
*/
|
|
1853
|
-
constructor(t) {
|
|
1854
|
-
super({
|
|
1855
|
-
title: "Background Image",
|
|
1856
|
-
collapsed: t == null ? void 0 : t.collapsed,
|
|
1857
|
-
hideCondition: t == null ? void 0 : t.hideCondition,
|
|
1858
|
-
settings: {
|
|
1859
|
-
backgroundImage: new U({
|
|
1860
|
-
...t == null ? void 0 : t.uploadProps,
|
|
1861
|
-
default: (t == null ? void 0 : t.backgroundImage) ?? ""
|
|
1862
|
-
}),
|
|
1863
|
-
opacity: new y({
|
|
1864
|
-
default: (t == null ? void 0 : t.opacity) ?? 100
|
|
1865
|
-
}),
|
|
1866
|
-
backgroundColor: new O({
|
|
1867
|
-
default: (t == null ? void 0 : t.backgroundColor) ?? "0, 0, 30"
|
|
1868
|
-
}),
|
|
1869
|
-
opacityBG: new y({
|
|
1870
|
-
default: (t == null ? void 0 : t.opacityBG) ?? 100
|
|
1871
|
-
})
|
|
1872
|
-
}
|
|
1873
|
-
});
|
|
1874
|
-
}
|
|
1875
|
-
/**
|
|
1876
|
-
* Override draw() to reorder the child settings and insert an "OR" label between the two sections.
|
|
1877
|
-
*/
|
|
1878
|
-
draw() {
|
|
1879
|
-
const t = super.draw(), e = t.querySelector(".setting-group-content");
|
|
1880
|
-
if (!e) return t;
|
|
1881
|
-
const i = Array.from(e.children), [s, n, a, o] = i;
|
|
1882
|
-
e.innerHTML = "", e.appendChild(s), e.appendChild(n);
|
|
1883
|
-
const l = document.createElement("div");
|
|
1884
|
-
return l.className = "bgset-or-label", l.textContent = "OR", e.appendChild(l), e.appendChild(a), e.appendChild(o), t;
|
|
1885
|
-
}
|
|
1886
|
-
/**
|
|
1887
|
-
* Helper method to generate CSS based on the current settings.
|
|
1888
|
-
*/
|
|
1889
|
-
getCssCode() {
|
|
1890
|
-
const t = this.settings.backgroundImage.value || "", e = this.settings.opacity.value ?? 100, i = this.settings.backgroundColor.value || "0, 0, 30", s = this.settings.opacityBG.value ?? 100;
|
|
1891
|
-
return t ? `
|
|
1892
|
-
background-image: url("${t}");
|
|
1893
|
-
background-size: cover;
|
|
1894
|
-
background-position: center;
|
|
1895
|
-
opacity: ${e / 100};
|
|
1896
|
-
` : `
|
|
1897
|
-
background-color: ${i};
|
|
1898
|
-
opacity: ${s / 100};
|
|
1899
|
-
`;
|
|
1900
|
-
}
|
|
1908
|
+
function xt(c) {
|
|
1909
|
+
return c instanceof m;
|
|
1910
|
+
}
|
|
1911
|
+
function Et(c) {
|
|
1912
|
+
return c instanceof g;
|
|
1901
1913
|
}
|
|
1902
1914
|
export {
|
|
1903
1915
|
W as AlignSetting,
|
|
1904
|
-
|
|
1916
|
+
bt as BackgroundSettingSet,
|
|
1905
1917
|
ft as BorderSettingSet,
|
|
1906
1918
|
rt as ButtonSetting,
|
|
1907
1919
|
O as ColorSetting,
|
|
@@ -1912,18 +1924,20 @@ export {
|
|
|
1912
1924
|
mt as MarginBottomSetting,
|
|
1913
1925
|
vt as MarginSettingGroup,
|
|
1914
1926
|
w as NumberSetting,
|
|
1915
|
-
|
|
1927
|
+
V as OpacitySetting,
|
|
1916
1928
|
ut as SelectApiSettings,
|
|
1917
1929
|
I as SelectSetting,
|
|
1918
1930
|
g as Setting,
|
|
1919
|
-
|
|
1931
|
+
m as SettingGroup,
|
|
1920
1932
|
H as StringSetting,
|
|
1921
|
-
|
|
1933
|
+
wt as TabsContainerGroup,
|
|
1922
1934
|
k as TabsSettings,
|
|
1923
1935
|
pt as Toggle,
|
|
1924
1936
|
U as UploadSetting,
|
|
1925
1937
|
dt as WidthSetting,
|
|
1926
1938
|
lt as asSettingGroupWithSettings,
|
|
1927
1939
|
_ as createSettingGroup,
|
|
1928
|
-
|
|
1940
|
+
Et as isSetting,
|
|
1941
|
+
xt as isSettingGroup,
|
|
1942
|
+
T as iterateSettings
|
|
1929
1943
|
};
|
package/dist/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@import"https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap";@import"https://fonts.cdnfonts.com/css/satoshi";.setting-group{padding:16px;display:flex;flex-direction:column;width:100%;gap:8px;border:1px solid var(--Gray-200, #eaecf0);border-radius:8px;background:#fff;margin:0 auto;-webkit-user-select:none;user-select:none;box-shadow:0 1px 3px #1018281a,0 1px 2px #1018280f;position:relative}.setting-group.collapsed{padding:0;border:none;background:transparent;box-shadow:none}.setting-group .setting-group{width:100%;padding:12px;border:1px solid #d0d5dd;border-radius:8px;background-color:#fff;box-shadow:none;margin:0}.setting-group .setting-group.collapsed{padding:0;border:none;background:transparent;margin:0}.setting-group .setting-group .setting-group-content.collapsed{padding:0}.setting-group .setting-group .setting-group{border-radius:8px;box-shadow:0 12px 16px -4px #10182814,0 4px 6px -2px #10182808;border:1px solid #eaecf0;padding:8px;width:212px;margin:auto}.setting-group .setting-group .setting-group.collapsed{padding:0;border:none;background:transparent;margin:0;box-shadow:none}.setting-group .setting-group.collapsed{padding-bottom:0}.setting-group .setting-group .setting-group-content{padding:0}.setting-group-title{display:flex;justify-content:space-between;align-items:center;padding:4px 0;cursor:pointer;border-radius:6px}.setting-group-title:hover,.setting-group-title:hover .setting-group-arrow{background-color:transparent}.setting-group-title h3{color:var(--Gray-800, #1d2939);font-family:Inter,-apple-system,BlinkMacSystemFont,sans-serif;font-size:14px;font-weight:500;line-height:20px;margin:0;padding:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.setting-group-arrow{display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:4px;transform:rotate(180deg);transition:transform .2s ease;color:var(--Gray-500, #344054)}.setting-group-arrow.rotated{transform:rotate(0)}.setting-group-content{display:flex;flex-direction:column;width:100%;gap:8px;transition:all .3s ease-in-out;opacity:1;padding:0 16px 16px;overflow:visible}.setting-group-content.collapsed{opacity:0;margin:0;padding:0;pointer-events:none;display:none}.setting-group.main-group{padding:16px;border:none;border-bottom:1px solid var(--Border-default, #d5dce5);box-shadow:none;margin-top:4px;background:#f8f8f8;border-radius:8px;width:268px;position:relative;margin-bottom:8px}.setting-group.main-group.collapsed{padding:0;background:transparent!important;border:none;box-shadow:none;margin:0}.setting-group.main-group.collapsed .setting-group-title.collapsed-view{height:55px;background:#f8f8f8;border:none;margin-bottom:8px;border-bottom:1px solid var(--Border-default, #d5dce5)}.setting-group.main-group .setting-group-title h3{color:#344054;font-family:Satoshi;font-size:14px;font-weight:700;line-height:20px}.setting-group-content.main-content{width:100%;background:#f8f8f8;border:0;box-shadow:none;padding:0}.setting-divider{height:1px;width:100%;background-color:#f2f4f7;margin:4px 0}.setting-group-content>*:last-child{margin-bottom:0}.setting-group.active{border-color:#d6bbfb;box-shadow:0 0 0 4px #7f56d91a}.setting-group-empty{color:#667085;font-size:13px;font-style:italic;padding:12px 0;text-align:center}.setting-group-title.collapsed-view{display:flex;justify-content:space-between;align-items:center;padding:4px 8px;height:36px;border-radius:8px;border:1px solid var(--Gray-200, #eaecf0);background:var(--Base-White, #fff);margin-bottom:0;position:relative;overflow:hidden;cursor:pointer}.setting-group-title.collapsed-view:hover{border-color:var(--Gray-200, #eaecf0);box-shadow:none;background:#fff;transform:none}.setting-group.main-group .setting-group-title.collapsed-view{height:55px;background:#f8f8f8;border:none;border-bottom:1px solid var(--Border-default, #d5dce5)}.setting-group:not(.main-group) .setting-group-title.collapsed-view{height:36px;background:#fff;border:1px solid var(--Gray-200, #eaecf0);padding:14px}.setting-group-title .title-section{display:flex;align-items:center;gap:12px;flex:1;min-width:0}.setting-group-title .group-icon{display:flex;justify-content:center;align-items:center;color:var(--Gray-500, #667085);flex-shrink:0;width:20px;height:20px}.setting-group-title.collapsed-view h3{color:#344054;font-family:Satoshi;font-size:14px;font-weight:700;line-height:20px;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.setting-group-title.collapsed-view .group-badge{display:flex;padding:2px 8px;justify-content:center;align-items:center;border-radius:16px;background:var(--Gray-100, #f2f4f7);color:var(--Gray-700, #344054);font-size:12px;font-weight:500;line-height:18px;margin-left:8px}.setting-group-title .actions-section{display:flex;align-items:center;gap:8px;margin-left:12px}.setting-group-title.collapsed-view .setting-group-arrow{display:flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:4px;transition:transform .2s ease;color:var(--Gray-500, #667085)}.setting-group-title.collapsed-view:hover .setting-group-arrow{background-color:transparent;color:var(--Gray-500, #667085)}.setting-group-title .setting-group-arrow{display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:4px;transition:transform .2s ease;color:var(--Gray-500, #667085)}.setting-group-title:hover .setting-group-arrow{background-color:var(--Gray-100, #f2f4f7)}.setting-group-title .setting-group-arrow.rotated{transform:rotate(0)}.setting-group-title.collapsed-view .info-marker{width:16px;height:16px;color:var(--Gray-400, #98a2b3);cursor:help}.setting-group-description{color:#667085;font-size:13px;margin-bottom:8px}@media (max-width: 768px){.setting-group-title.collapsed-view{padding:10px 12px}.setting-group-title .title-section{gap:8px}.setting-group-title.collapsed-view .group-badge{display:none}}@media (max-width: 480px){.setting-group-title.collapsed-view h3{font-size:13px}.setting-group-title.collapsed-view .setting-group-arrow{width:24px;height:24px}.setting-group-title.collapsed-view{padding:0 10px}}.setting-group-title.collapsed-view.striped:before{content:"";position:absolute;top:0;left:0;width:4px;height:100%;background:var(--Primary-100, #f4ebff)}.custom_class{border:0!important;box-shadow:none!important;margin:4px 0!important}.custom_class>.setting-group-title{display:none!important}.custom_class .setting-group-content{padding:0!important}.custom_class .setting-group-content>.setting-group{border:1px solid var(--Gray-200, #eaecf0)!important;box-shadow:0 1px 3px #1018281a,0 1px 2px #1018280f!important;margin:0!important;padding:12px!important;border-radius:8px!important;background:#fff!important}.custom_class .setting-group-content>.setting-group.collapsed{padding:0!important;border:none!important;background:transparent!important;box-shadow:none!important}.custom_class .setting-group-content>.setting-group .setting-group.border-setting-set,.custom_class .setting-group-content>.setting-group .setting-group.header-typography-setting-set{width:100%;padding:12px;border:1px solid #d0d5dd;border-radius:8px;background-color:#fff;box-shadow:none;margin:0}.custom_class .setting-group-content>.setting-group .setting-group.border-setting-set.collapsed,.custom_class .setting-group-content>.setting-group .setting-group.header-typography-setting-set.collapsed{padding:0;border:none;background:transparent;margin:0}.custom_class .setting-group-content>.setting-group .setting-group-content{padding:0}.icon-container{display:flex;align-items:center;gap:4px}.input-icon{display:flex;align-items:center;justify-content:center;color:var(--color-text)}.input-label{color:#667085;font-family:Satoshi;font-size:12px;font-style:normal;font-weight:400;line-height:18px}.input-container{display:inline-flex;align-items:center;position:relative}.with-suffix{flex:1;padding-right:36px}.input-suffix{position:absolute;right:8px;top:50%;transform:translateY(-50%);color:#666;pointer-events:none;font-size:.9em}.string-setting-wrapper{display:grid;grid-template-columns:.7fr 1fr;place-content:center;align-items:center;position:relative}.string-setting-input{min-width:114px;max-width:122px;width:100%;max-height:33px;padding:8px;font-size:14px;border-radius:8px;color:var(--color-input-text);border:1px solid var(--color-border);background:var(--color-bg)}.string-setting-wrapper .string-setting-wrapper{display:block;width:100%}.color-setting-wrapper{display:grid;grid-template-columns:.7fr 1fr;place-content:center;align-items:center}.color-input-wrapper{position:relative;padding:8px 8px 8px 4px;width:100%;min-width:114px;max-width:122px;height:33px;display:flex;align-items:center;gap:4px;border:1px solid var(--color-border);border-radius:8px;background-color:var(--color-bg)}.color-text-input{border:none;outline:none;width:65px;color:var(--color-input-text);font-size:14px;text-align:center;background:transparent}.color-picker{position:absolute;left:0;top:0;width:25px;height:25px;opacity:0;cursor:pointer}.color-preview{width:25px;height:25px;border-radius:4px}.number-setting-wrapper{display:grid;grid-template-columns:.7fr 1fr;place-content:center;align-items:center;position:relative}.number-setting-input{min-width:114px;max-width:122px;width:100%;max-height:33px;height:100%;padding:8px;color:#292b2e;font-family:Satoshi;font-size:14px;font-style:normal;font-weight:400;line-height:normal;border:1px solid var(--color-border);background:var(--color-bg);box-sizing:border-box;border-radius:8px}.suffix-label{position:absolute;right:8px;padding-left:8px;border-left:1px solid var(--color-divider);font-size:12px;color:var(--color-text)}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.number-setting-wrapper .number-setting-wrapper{display:block;width:100%}input[type=number]{-moz-appearance:textfield}.select-container{display:grid;grid-template-columns:.7fr 1fr;place-content:center;align-items:center;position:relative;width:100%}.select-container .icon-container{display:flex;align-items:center;margin-bottom:0}.select-container .icon-container .input-label{color:#667085;font-family:Inter;font-size:12px;font-style:normal;font-weight:400;line-height:normal}.select-button{place-self:end;max-width:120px;width:100%;height:33px;min-height:33px;display:flex;align-items:center;justify-content:flex-start;padding:0 40px 0 16px;border-radius:8px;border:1px solid var(--color-border, #e4e7ec);background:var(--color-bg, #fff);cursor:pointer;font-size:14px;font-weight:400;color:#101828;position:relative;transition:all .2s ease;box-shadow:0 1px 2px #1018280d;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select-button:hover{border-color:#d0d5dd;box-shadow:0 1px 3px #1018281a}.select-button:focus{outline:none;border-color:#02cc59;box-shadow:0 0 0 4px #7f56d91a}.select-button.has-label{padding-top:0;height:33px}.select-button .select-label{position:absolute;top:8px;left:16px;color:#667085;font-family:Inter;font-size:12px;font-style:normal;font-weight:400;line-height:18px;pointer-events:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:80%}.select-button .select-value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}.select-button.loading{position:relative;color:#6e7891;background-color:#f9fafb;pointer-events:none;padding-left:36px!important}.select-button.loading:before{content:"";position:absolute;left:10px;top:25%;transform:translateY(-50%);width:16px;height:16px;border:2px solid #e4e7ec;border-top:2px solid #02CC59;border-radius:50%;animation:select-spin 1s linear infinite;z-index:2}@keyframes select-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.select-button.error{border-color:#f04438;color:#f04438;background-color:#fff4f4}.select-options{display:none;position:absolute;top:calc(100% + 2px);left:0;right:0;max-height:280px;overflow-y:auto;margin:0;padding:6px;list-style-type:none;z-index:100;flex-direction:column;color:#101828;align-items:flex-start;border:1px solid #e4e7ec;background:#fff;border-radius:8px;box-shadow:0 12px 16px -4px #10182814,0 4px 6px -2px #10182808;transition:opacity .2s ease,transform .2s ease;opacity:0;transform:translateY(-8px)}.select-options.open{display:flex;opacity:1;transform:translateY(0);animation:select-fade-in .2s ease forwards}@keyframes select-fade-in{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}.select-option{padding:10px 12px;width:100%;display:flex;align-items:center;justify-content:space-between;cursor:pointer;color:#344054;border-radius:6px;transition:background-color .15s ease;font-size:14px}.select-option:hover{background:#f9fafb}.select-option.selected{background:#b6dfc8;color:#344054;font-weight:400}.svg-container{position:absolute;right:10px;top:50%;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;width:20px;height:20px;pointer-events:none;z-index:1}.svg-container .svg-select{stroke:#667085;transition:transform .3s ease;width:16px;height:16px}.svg-container.open .svg-select{transform:rotate(180deg)}.select-options::-webkit-scrollbar{width:6px}.select-options::-webkit-scrollbar-track{background:transparent;border-radius:8px}.select-options::-webkit-scrollbar-thumb{background:#e4e7ec;border-radius:8px}.select-options::-webkit-scrollbar-thumb:hover{background:#d0d5dd}.select-option.empty-message{text-align:center;color:#6e7891;font-style:italic;cursor:default;justify-content:center}.align-setting-wrapper{display:grid;grid-template-columns:1fr 1fr;place-content:center;align-items:center}.align-setting-label{font-size:12px;color:var(--color-text)}.align-options-container{width:120px;color:#0006;background-color:#f5f6f7;border-radius:9999px;padding:4px 13px;display:flex;gap:8px}.align-option-button{display:flex;align-items:center;justify-content:center;width:26px;height:26px;background:transparent;border:none;cursor:pointer;border-radius:50%;transition:background-color .2s,color .2s}.align-option-button:hover{background-color:#fff}.align-option-button.selected{background-color:var(--color-white);color:var(--color-black)}.button-setting-wrapper{display:grid;grid-template-columns:1fr 1fr;place-content:center;align-items:center}.button-setting{padding:8px 16px;background-color:var(--button-bg, #007bff);color:var(--button-color, #fff);border:none;border-radius:4px;cursor:pointer;font-size:14px}.button-setting:hover{background-color:var(--button-bg-hover, #0056b3)}.dimension-setting-container{display:flex;flex-direction:column;gap:8px;position:relative;width:100%}.dimension-bracket{width:18px;height:42px;position:absolute;top:16px;right:122px;display:flex;align-items:center;justify-content:center;z-index:1}.dimension-bracket:before{content:"";position:absolute;width:13px;height:14px;background:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='15' viewBox='0 0 14 15' fill='none'><path d='M14 1H5C2.79086 1 1 2.79086 1 5V15' stroke='%23667085'/></svg>") no-repeat center center;background-size:contain;top:0;right:1px}.dimension-bracket:after{content:"";position:absolute;width:13px;height:14px;background:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='15' viewBox='0 0 14 15' fill='none'><path d='M14 14H5C2.79086 14 1 12.2091 1 10V4.76837e-07' stroke='%23667085'/></svg>") no-repeat center center;background-size:contain;bottom:0;right:1px}.dimension-lock-icon{transform:translate(-.25rem);width:24px;height:24px;background:none;border:none;padding:0;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;color:#667085;z-index:1;border-radius:4px;transition:background-color .15s ease,color .15s ease}.dimension-setting-container.aspect-locked .dimension-bracket:before,.dimension-setting-container.aspect-locked .dimension-bracket:after{filter:hue-rotate(210deg) saturate(2)}@media (max-width: 480px){.dimension-bracket{right:100px}}.upload-setting-wrapper{display:grid;grid-template-columns:1fr;gap:8px;width:100%}.icon-title-container{display:flex;align-items:center;gap:8px;margin-bottom:4px}.icon-title-container .input-label{color:#344054;font-family:Inter,-apple-system,BlinkMacSystemFont,sans-serif;font-size:14px;font-weight:500}.preview-button-container{display:flex;justify-content:space-between;align-items:center;align-self:stretch;width:100%;gap:12px;border-radius:12px}.preview-button-container.no-image{justify-content:center}.preview-button-container.no-image .preview-placeholder{display:none}.preview-button-container.no-image .upload-button{width:100%;min-width:140px;flex-grow:1;margin:0 auto}.no-image .preview-placeholder{display:none!important}.preview-wrapper{position:relative;width:91px;height:71px;border-radius:4px;overflow:hidden;background-color:#d3d3d3;flex-shrink:0;display:none}.preview-wrapper.has-image{display:block}.upload-preview{width:100%;height:100%;object-fit:cover;border-radius:4px;display:none;background-position:center;background-size:146.165% 100%;background-repeat:no-repeat}.preview-wrapper.has-image .upload-preview{display:block;object-fit:contain;padding:2px}.empty-state{width:100%;height:100%;display:flex;align-items:center;justify-content:center;background-color:#d3d3d3}.empty-state svg{width:100%;height:100%}.preview-wrapper.has-image .empty-state{display:none}.upload-button{width:100%;height:40px;display:flex;padding:5px 4px;flex-direction:row;align-items:center;gap:4px;border-radius:12px;border:1px solid var(--Gray-200, #eaecf0);background:var(--Base-White, #fff);cursor:pointer;transition:all .2s ease;box-shadow:0 1px 2px #1018280d;flex-grow:0;justify-content:center;min-width:90px}.preview-wrapper:not(.has-image)+.upload-button{flex-grow:0}.upload-button:hover{border-color:#d0d5dd;box-shadow:0 1px 3px #1018281a}.upload-icon{display:flex;align-items:center;justify-content:center}.upload-label{font-size:12px;font-weight:500;color:#344054}.delete-button{display:flex;width:24px;height:24px;padding:4px;justify-content:center;align-items:center;position:absolute;right:4px;top:4px;background:#fff;border:none;border-radius:50%;cursor:pointer;box-shadow:0 2px 4px #0000001a;transition:background-color .2s ease;z-index:2}.delete-button svg{width:14px;height:14px;flex-shrink:0}.delete-button:hover{background-color:#f3f4f6}.upload-setting-wrapper.no-label .preview-button-container{grid-row:1}.preview-placeholder{display:flex;justify-content:center;align-items:center;width:91px;height:71px;border-radius:4px;background-color:#f2f4f7;flex-shrink:0}.preview-button-container:not(:has(.preview-wrapper.has-image)) .preview-placeholder{display:flex}.height-setting{display:grid;grid-template-columns:1fr 1fr;place-content:center;align-items:center}.height-setting-wrapper{display:flex;align-items:center;justify-content:space-between;gap:2px}.height-input-wrapper{position:relative;padding:8px 8px 8px 4px;width:120px;height:33px;display:flex;align-items:center;gap:4px;border:1px solid var(--color-border);border-radius:8px;background-color:var(--color-bg)}.height-text-input{border:none;outline:none;width:65px;color:var(--color-input-text);font-size:14px;text-align:center;background:transparent}.width-setting{display:grid;grid-template-columns:1fr 1fr;place-content:center;align-items:center}.width-setting-wrapper{display:flex;align-items:center;justify-content:space-between;gap:2px}.width-input-wrapper{position:relative;padding:8px 8px 8px 4px;width:120px;height:33px;display:flex;align-items:center;gap:4px;border:1px solid var(--color-border);border-radius:8px;background-color:var(--color-bg)}.width-text-input{border:none;outline:none;width:65px;color:var(--color-input-text);font-size:14px;text-align:center;background:transparent}.width-setting .number-setting{width:100%}.select-api-container{display:grid;grid-template-columns:1fr;place-content:center;align-items:center;position:relative;width:100%}.select-api-button{width:100%;height:33px;min-height:33px;display:flex;align-items:center;justify-content:flex-start;padding:0 40px 0 16px;border-radius:8px;border:1px solid var(--color-border, #e4e7ec);background:#fff;cursor:pointer;color:#344054;font-family:Satoshi;font-size:14px;font-style:normal;font-weight:500;line-height:normal;position:relative;transition:all .2s ease;box-shadow:0 1px 2px #1018280d;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-right:40px!important}.select-api-button:hover{border-color:#d0d5dd;box-shadow:0 1px 3px #1018281a}.select-api-button:focus{outline:none;border-color:#b6dfc8;box-shadow:0 0 0 4px #7f56d91a}.select-api-button .select-label{position:absolute;top:2px;color:#667085;font-family:Satoshi;font-size:12px;font-style:normal;font-weight:400;line-height:normal;pointer-events:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:80%}.select-api-button .select-value{margin-top:6px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}.select-api-button.loading{position:relative;color:#6e7891;background-color:#f9fafb;pointer-events:none;padding-left:36px!important}.select-api-button.loading:before{content:"";position:absolute;left:10px;top:25%;transform:translateY(-50%);width:16px;height:16px;border:2px solid #e4e7ec;border-top:2px solid #02CC59;border-radius:50%;animation:select-api-spin 1s linear infinite;z-index:2}.select-api-button.has-label.loading{padding-left:36px!important}.select-api-button.has-label.loading .select-value{padding-left:0}.select-api-button.has-label.loading:before{top:18px;left:10px}@keyframes select-api-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.select-api-button.error{border-color:#f04438;color:#f04438;background-color:#fff4f4}.select-api-options{display:none;position:absolute;top:calc(100% + 4px);left:0;right:0;max-height:280px;overflow-y:auto;margin:0;padding:6px;list-style-type:none;z-index:100;flex-direction:column;color:#101828;align-items:flex-start;border:1px solid #e4e7ec;background:#fff;border-radius:8px;box-shadow:0 12px 16px -4px #10182814,0 4px 6px -2px #10182808;transition:opacity .2s ease,transform .2s ease;opacity:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;transform:translateY(-8px)}.select-api-options.open{display:flex;opacity:1;transform:translateY(0)}.select-api-option{padding:10px 12px;width:100%;display:flex;align-items:center;justify-content:space-between;cursor:pointer;color:#344054;border-radius:6px;transition:background-color .15s ease;font-size:14px}.select-api-option:hover{background:#f9fafb}.select-api-option.selected{background:#b6dfc8;color:#344054;font-weight:500}.select-api-option.disabled{opacity:.6;cursor:not-allowed;color:#6e7891}.select-api-radio{width:18px;height:18px;border-radius:50%;border:1.5px solid #e4e7ec;background:#fff;-webkit-appearance:none;-moz-appearance:none;appearance:none;position:relative;margin:0;cursor:pointer}.select-api-radio:checked{border-color:#02cc59;background:#fff;position:relative}.select-api-radio:checked:before{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:8px;height:8px;background:#02cc59;border-radius:50%}.svg-container{position:absolute;right:12px;top:50%;transform:translateY(-50%);width:24px;height:24px;display:flex;align-items:center;justify-content:center;pointer-events:none}.svg-container .svg-select-api{stroke:#667085;transition:transform .3s ease;width:16px;height:16px}.svg-container.open .svg-select-api{transform:rotate(180deg)}.select-api-container .icon-container{display:none}.select-api-options::-webkit-scrollbar{width:6px}.select-api-options::-webkit-scrollbar-track{background:transparent;border-radius:8px}.select-api-options::-webkit-scrollbar-thumb{background:#e4e7ec;border-radius:8px}.select-api-options::-webkit-scrollbar-thumb:hover{background:#d0d5dd}.select-api-option.empty-message{text-align:center;color:#6e7891;font-style:italic;cursor:default;justify-content:center}.select-api-option.empty-message:hover{background:transparent}.select-api-option:focus{outline:none;box-shadow:0 0 0 2px #b6dfc8}@keyframes fadeIn{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}.select-api-options.open{display:flex;animation:fadeIn .2s ease forwards}.select-api-button.has-label{height:48px}.toggle-setting-container{display:flex;justify-content:space-between;align-items:center;padding-left:3px;padding-right:3px}.toggle-label{color:#344054;font-family:Satoshi;font-size:14px;font-style:normal;font-weight:500;line-height:20px}.toggle-switch{position:relative;display:inline-block;width:36px;height:20px;padding:2px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#e4e7ec;transition:.4s;border-radius:34px}.toggle-slider:before{position:absolute;content:"";height:16px;width:16px;left:2px;bottom:2px;background-color:#fff;transition:.4s;border-radius:50%}input:checked+.toggle-slider{background-color:#02cc59}input:focus+.toggle-slider{box-shadow:0 0 1px #02cc59}input:checked+.toggle-slider:before{transform:translate(16px)}.toggle-with-icon .toggle-label{display:flex;align-items:center;gap:8px}.toggle-icon{display:flex;align-items:center;justify-content:center;color:#667085}.gap-settings-container{display:flex;flex-direction:column;gap:12px;width:100%}.gap-settings-title{font-size:14px;font-weight:500;color:#344054;margin-bottom:4px}.gap-input-wrapper{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:12px;width:100%}.gap-label-container{display:flex;flex-direction:row;align-items:center;gap:8px;flex:1}.gap-setting-icon{display:flex;align-items:center;justify-content:center;font-size:16px;color:#667085}.gap-setting-icon svg{width:16px;height:16px}.gap-input-label{font-size:13px;color:#667085}.gap-setting-inner-wrapper{position:relative;display:grid;grid-template-columns:1fr;place-content:center;align-items:center;width:120px}.gap-setting-input{width:100%;padding:8px;font-size:14px;border-radius:8px;color:#292b2e;border:1px solid var(--color-border);background:var(--color-bg);box-sizing:border-box}.suffix-wrapper{position:relative}.suffix-label{position:absolute;right:8px;top:50%;transform:translateY(-50%);padding-left:8px;border-left:1px solid var(--color-divider);font-size:12px;color:var(--color-text)}.gap-setting-input::-webkit-outer-spin-button,.gap-setting-input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.gap-setting-input[type=number]{-moz-appearance:textfield}.tabs-settings-container{display:flex;flex-direction:column;width:100%;border-radius:8px;background:transparent;overflow:visible;position:relative;z-index:1}.tabs-settings-container.main-tabs{background:#fff;border:1px solid #e5e7eb;box-shadow:0 1px 2px #1018280d}.tabs-title{padding:12px 16px;border-bottom:1px solid #e5e7eb}.tabs-title.main-title{background:#f9fafb;border-bottom:1px solid #e5e7eb;border-radius:8px 8px 0 0}.tabs-title h3{margin:0;color:#111827;font-family:Satoshi;font-size:14px;font-weight:500;line-height:20px}.tabs-header{width:100%;display:flex;padding:4px;justify-content:center;align-items:center;gap:4px;flex-shrink:0;align-self:stretch;background:#f1f3f2;position:relative;z-index:1;border-radius:400px}.tabs-header.main-header{background:#f9fafb;border-bottom:1px solid #e5e7eb;border-radius:8px 8px 0 0;padding:8px}.tab-button{display:flex;padding:4px 12px;justify-content:center;align-items:center;background-color:transparent;gap:8px;flex:1 0 0;border-radius:400px;color:#000000b3;font-family:Satoshi;font-size:12px;font-style:normal;font-weight:500;line-height:20px;border:1px solid transparent;box-shadow:0 0 #10182800;position:relative;z-index:1}.tab-button:active{box-shadow:0 1px 2px -1px #10182805}.tab-button.active{color:#000;font-weight:700;border-radius:400px;background:#fff;box-shadow:0 4px 8px -2px #1018280a}.tab-button.active:active{box-shadow:0 2px 4px -1px #1018280a}.tab-content{position:relative;overflow:visible;width:100%;z-index:1;margin-top:8px}.tab-panel{display:grid;gap:8px;position:absolute;width:100%;opacity:0;pointer-events:none;overflow:visible;z-index:1}.tab-panel.active{opacity:1;pointer-events:auto;position:relative;overflow:visible;z-index:1}.tab-panel .select-api-container{overflow:visible;position:relative;z-index:9999}.tab-panel .select-api-dropdown{position:absolute;z-index:10000}.tab-panel .select-api-container *{z-index:9999}.tab-panel .select-api-dropdown *{z-index:10000}.setting-group.main-group.collapsed .tabs-header,.setting-group.main-group.collapsed .setting-group,.setting-group .setting-group.collapsed .tabs-header{display:none}.margin-bottom-wrapper{display:grid;grid-template-columns:1fr auto;gap:auto}.margin-bottom-wrapper .setting-icon svg{width:18px;height:19px}.margin-bottom-wrapper .number-setting-input{background:#fff;min-width:95px;width:95px;padding:8px;border-radius:8px;border:1px solid #D0D5DD;font-size:14px;color:#292b2e}.margin-bottom-wrapper .setting-title{color:#667085;font-family:Inter,sans-serif;font-size:12px;font-weight:400;line-height:18px}.tab-delete-button{background:transparent;border:none;cursor:pointer;padding:2px 4px}.tab-delete-button svg{width:16px;height:16px}.tabs-add-btn-container{display:flex;justify-content:flex-end}.tabs-add-button{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border-radius:6px;cursor:pointer;font-size:14px;color:#667085;transition:transform .15s ease,box-shadow .3s ease}.tabs-add-button:hover{transform:scale(1);box-shadow:0 2px 6px #0000001a}.add-icon{display:flex;align-items:center;width:18px}.add-label{display:inline-block}.bgset-or-label{margin:8px 0;text-align:center;font-weight:500;color:#667085;align-self:center}:root{--color-border: #D5DCE5;--color-bg: #F8F8F8;--color-border-secondary: #eaecf0;--color-text: #667085;--color-title: #344054;--color-input-text: #292b2e;--color-white: #fff;--color-black: #000;--color-divider: #dcdcdc;--color-btn-text: #4b4b4b;--color-bg-icon: #f2f4f7}*{padding:0;margin:0;border:none}*,*:before,*:after{box-sizing:border-box}a,a:link,a:visited,a:hover{text-decoration:none}body{font-family:Satoshi,sans-serif;font-weight:400;font-size:12px;line-height:18px}aside,nav,footer,header,section,main{display:block}h1,h2,h3,h4,h5,h6,p{font-size:inherit;font-weight:inherit}ul,ul li{list-style:none}img{vertical-align:top}img,svg{max-width:100%;height:auto}address{font-style:normal}input::-ms-clear{display:none}button,input[type=submit]{display:inline-block;box-shadow:none;background-color:transparent;background:none;cursor:pointer}input:focus,input:active,button:focus,button:active{outline:none}button::-moz-focus-inner{padding:0;border:0}label{cursor:pointer}legend{display:block}
|
|
1
|
+
@import"https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap";@import"https://fonts.cdnfonts.com/css/satoshi";.setting-group{padding:16px;display:flex;flex-direction:column;width:100%;gap:8px;border:1px solid var(--Gray-200, #eaecf0);border-radius:8px;background:#fff;margin:0 auto;-webkit-user-select:none;user-select:none;box-shadow:0 1px 3px #1018281a,0 1px 2px #1018280f;position:relative}.setting-group.collapsed{padding:0;border:none;background:transparent;box-shadow:none}.setting-group .setting-group{width:100%;padding:12px;border:1px solid #d0d5dd;border-radius:8px;background-color:#fff;box-shadow:none;margin:0}.setting-group .setting-group.collapsed{padding:0;border:none;background:transparent;margin:0}.setting-group .setting-group .setting-group-content.collapsed{padding:0}.setting-group .setting-group .setting-group{border-radius:8px;box-shadow:0 12px 16px -4px #10182814,0 4px 6px -2px #10182808;border:1px solid #eaecf0;padding:8px;width:212px;margin:auto}.setting-group .setting-group .setting-group.collapsed{padding:0;border:none;background:transparent;margin:0;box-shadow:none}.setting-group .setting-group.collapsed{padding-bottom:0}.setting-group .setting-group .setting-group-content{padding:0}.setting-group-title{display:flex;justify-content:space-between;align-items:center;padding:4px 0;cursor:pointer;border-radius:6px}.setting-group-title:hover,.setting-group-title:hover .setting-group-arrow{background-color:transparent}.setting-group-title h3{color:var(--Gray-800, #1d2939);font-family:Inter,-apple-system,BlinkMacSystemFont,sans-serif;font-size:14px;font-weight:500;line-height:20px;margin:0;padding:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.setting-group-arrow{display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:4px;transform:rotate(180deg);transition:transform .2s ease;color:var(--Gray-500, #344054)}.setting-group-arrow.rotated{transform:rotate(0)}.setting-group-content{display:flex;flex-direction:column;width:100%;gap:8px;transition:all .3s ease-in-out;opacity:1;padding:0 16px 16px;overflow:visible}.setting-group-content.collapsed{opacity:0;margin:0;padding:0;pointer-events:none;display:none}.setting-group.main-group{padding:16px;border:none;border-bottom:1px solid var(--Border-default, #d5dce5);box-shadow:none;margin-top:4px;background:#f8f8f8;border-radius:8px;width:268px;position:relative;margin-bottom:8px}.setting-group.main-group.collapsed{padding:0;background:transparent!important;border:none;box-shadow:none;margin:0}.setting-group.main-group.collapsed .setting-group-title.collapsed-view{height:55px;background:#f8f8f8;border:none;margin-bottom:8px;border-bottom:1px solid var(--Border-default, #d5dce5)}.setting-group.main-group .setting-group-title h3{color:#344054;font-family:Satoshi;font-size:14px;font-weight:700;line-height:20px}.setting-group-content.main-content{width:100%;background:#f8f8f8;border:0;box-shadow:none;padding:0}.setting-divider{height:1px;width:100%;background-color:#f2f4f7;margin:4px 0}.setting-group-content>*:last-child{margin-bottom:0}.setting-group.active{border-color:#d6bbfb;box-shadow:0 0 0 4px #7f56d91a}.setting-group-empty{color:#667085;font-size:13px;font-style:italic;padding:12px 0;text-align:center}.setting-group-title.collapsed-view{display:flex;justify-content:space-between;align-items:center;padding:4px 8px;height:36px;border-radius:8px;border:1px solid var(--Gray-200, #eaecf0);background:var(--Base-White, #fff);margin-bottom:0;position:relative;overflow:hidden;cursor:pointer}.setting-group-title.collapsed-view:hover{border-color:var(--Gray-200, #eaecf0);box-shadow:none;background:#fff;transform:none}.setting-group.main-group .setting-group-title.collapsed-view{height:55px;background:#f8f8f8;border:none;border-bottom:1px solid var(--Border-default, #d5dce5)}.setting-group:not(.main-group) .setting-group-title.collapsed-view{height:36px;background:#fff;border:1px solid var(--Gray-200, #eaecf0);padding:14px}.setting-group-title .title-section{display:flex;align-items:center;gap:12px;flex:1;min-width:0}.setting-group-title .group-icon{display:flex;justify-content:center;align-items:center;color:var(--Gray-500, #667085);flex-shrink:0;width:20px;height:20px}.setting-group-title.collapsed-view h3{color:#344054;font-family:Satoshi;font-size:14px;font-weight:700;line-height:20px;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.setting-group-title.collapsed-view .group-badge{display:flex;padding:2px 8px;justify-content:center;align-items:center;border-radius:16px;background:var(--Gray-100, #f2f4f7);color:var(--Gray-700, #344054);font-size:12px;font-weight:500;line-height:18px;margin-left:8px}.setting-group-title .actions-section{display:flex;align-items:center;gap:8px;margin-left:12px}.setting-group-title.collapsed-view .setting-group-arrow{display:flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:4px;transition:transform .2s ease;color:var(--Gray-500, #667085)}.setting-group-title.collapsed-view:hover .setting-group-arrow{background-color:transparent;color:var(--Gray-500, #667085)}.setting-group-title .setting-group-arrow{display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:4px;transition:transform .2s ease;color:var(--Gray-500, #667085)}.setting-group-title:hover .setting-group-arrow{background-color:var(--Gray-100, #f2f4f7)}.setting-group-title .setting-group-arrow.rotated{transform:rotate(0)}.setting-group-title.collapsed-view .info-marker{width:16px;height:16px;color:var(--Gray-400, #98a2b3);cursor:help}.setting-group-description{color:#667085;font-size:13px;margin-bottom:8px}@media (max-width: 768px){.setting-group-title.collapsed-view{padding:10px 12px}.setting-group-title .title-section{gap:8px}.setting-group-title.collapsed-view .group-badge{display:none}}@media (max-width: 480px){.setting-group-title.collapsed-view h3{font-size:13px}.setting-group-title.collapsed-view .setting-group-arrow{width:24px;height:24px}.setting-group-title.collapsed-view{padding:0 10px}}.setting-group-title.collapsed-view.striped:before{content:"";position:absolute;top:0;left:0;width:4px;height:100%;background:var(--Primary-100, #f4ebff)}.custom_class{border:0!important;box-shadow:none!important;margin:4px 0!important}.custom_class>.setting-group-title{display:none!important}.custom_class .setting-group-content{padding:0!important}.custom_class .setting-group-content>.setting-group{border:1px solid var(--Gray-200, #eaecf0)!important;box-shadow:0 1px 3px #1018281a,0 1px 2px #1018280f!important;margin:0!important;padding:12px!important;border-radius:8px!important;background:#fff!important}.custom_class .setting-group-content>.setting-group.collapsed{padding:0!important;border:none!important;background:transparent!important;box-shadow:none!important}.custom_class .setting-group-content>.setting-group .setting-group.border-setting-set,.custom_class .setting-group-content>.setting-group .setting-group.header-typography-setting-set{width:100%;padding:12px;border:1px solid #d0d5dd;border-radius:8px;background-color:#fff;box-shadow:none;margin:0}.custom_class .setting-group-content>.setting-group .setting-group.border-setting-set.collapsed,.custom_class .setting-group-content>.setting-group .setting-group.header-typography-setting-set.collapsed{padding:0;border:none;background:transparent;margin:0}.custom_class .setting-group-content>.setting-group .setting-group-content{padding:0}.icon-container{display:flex;align-items:center;gap:4px}.input-icon{display:flex;align-items:center;justify-content:center;color:var(--color-text)}.input-label{color:#667085;font-family:Satoshi;font-size:12px;font-style:normal;font-weight:400;line-height:18px}.input-container{display:inline-flex;align-items:center;position:relative}.with-suffix{flex:1;padding-right:36px}.input-suffix{position:absolute;right:8px;top:50%;transform:translateY(-50%);color:#666;pointer-events:none;font-size:.9em}.string-setting-wrapper{display:grid;grid-template-columns:.7fr 1fr;place-content:center;align-items:center;position:relative}.string-setting-input{min-width:114px;max-width:122px;width:100%;max-height:33px;padding:8px;font-size:14px;border-radius:8px;color:var(--color-input-text);border:1px solid var(--color-border);background:var(--color-bg)}.string-setting-wrapper .string-setting-wrapper{display:block;width:100%}.color-setting-wrapper{display:grid;grid-template-columns:.7fr 1fr;place-content:center;align-items:center}.color-input-wrapper{position:relative;padding:8px 8px 8px 4px;width:100%;min-width:114px;max-width:122px;height:33px;display:flex;align-items:center;gap:4px;border:1px solid var(--color-border);border-radius:8px;background-color:var(--color-bg)}.color-text-input{border:none;outline:none;width:65px;color:var(--color-input-text);font-size:14px;text-align:center;background:transparent}.color-picker{position:absolute;left:0;top:0;width:25px;height:25px;opacity:0;cursor:pointer}.color-preview{width:25px;height:25px;border-radius:4px}.number-setting-wrapper{display:grid;grid-template-columns:.7fr 1fr;place-content:center;align-items:center;position:relative}.number-setting-input{min-width:114px;max-width:122px;width:100%;max-height:33px;height:100%;padding:8px;color:#292b2e;font-family:Satoshi;font-size:14px;font-style:normal;font-weight:400;line-height:normal;border:1px solid var(--color-border);background:var(--color-bg);box-sizing:border-box;border-radius:8px}.suffix-label{position:absolute;right:8px;padding-left:8px;border-left:1px solid var(--color-divider);font-size:12px;color:var(--color-text)}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.number-setting-wrapper .number-setting-wrapper{display:block;width:100%}input[type=number]{-moz-appearance:textfield}.select-container{display:grid;grid-template-columns:.7fr 1fr;place-content:center;align-items:center;position:relative;width:100%}.select-container .icon-container{display:flex;align-items:center;margin-bottom:0}.select-container .icon-container .input-label{color:#667085;font-family:Inter;font-size:12px;font-style:normal;font-weight:400;line-height:normal}.select-button{place-self:end;max-width:120px;width:100%;height:33px;min-height:33px;display:flex;align-items:center;justify-content:flex-start;padding:0 40px 0 16px;border-radius:8px;border:1px solid var(--color-border, #e4e7ec);background:var(--color-bg, #fff);cursor:pointer;font-size:14px;font-weight:400;color:#101828;position:relative;transition:all .2s ease;box-shadow:0 1px 2px #1018280d;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select-button:hover{border-color:#d0d5dd;box-shadow:0 1px 3px #1018281a}.select-button:focus{outline:none;border-color:#02cc59;box-shadow:0 0 0 4px #7f56d91a}.select-button.has-label{padding-top:0;height:33px}.select-button .select-label{position:absolute;top:8px;left:16px;color:#667085;font-family:Inter;font-size:12px;font-style:normal;font-weight:400;line-height:18px;pointer-events:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:80%}.select-button .select-value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}.select-button.loading{position:relative;color:#6e7891;background-color:#f9fafb;pointer-events:none;padding-left:36px!important}.select-button.loading:before{content:"";position:absolute;left:10px;top:25%;transform:translateY(-50%);width:16px;height:16px;border:2px solid #e4e7ec;border-top:2px solid #02CC59;border-radius:50%;animation:select-spin 1s linear infinite;z-index:2}@keyframes select-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.select-button.error{border-color:#f04438;color:#f04438;background-color:#fff4f4}.select-options{display:none;position:absolute;top:calc(100% + 2px);left:0;right:0;max-height:280px;overflow-y:auto;margin:0;padding:6px;list-style-type:none;z-index:100;flex-direction:column;color:#101828;align-items:flex-start;border:1px solid #e4e7ec;background:#fff;border-radius:8px;box-shadow:0 12px 16px -4px #10182814,0 4px 6px -2px #10182808;transition:opacity .2s ease,transform .2s ease;opacity:0;transform:translateY(-8px)}.select-options.open{display:flex;opacity:1;transform:translateY(0);animation:select-fade-in .2s ease forwards}@keyframes select-fade-in{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}.select-option{padding:10px 12px;width:100%;display:flex;align-items:center;justify-content:space-between;cursor:pointer;color:#344054;border-radius:6px;transition:background-color .15s ease;font-size:14px}.select-option:hover{background:#f9fafb}.select-option.selected{background:#b6dfc8;color:#344054;font-weight:400}.svg-container{position:absolute;right:10px;top:50%;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;width:20px;height:20px;pointer-events:none;z-index:1}.svg-container .svg-select{stroke:#667085;transition:transform .3s ease;width:16px;height:16px}.svg-container.open .svg-select{transform:rotate(180deg)}.select-options::-webkit-scrollbar{width:6px}.select-options::-webkit-scrollbar-track{background:transparent;border-radius:8px}.select-options::-webkit-scrollbar-thumb{background:#e4e7ec;border-radius:8px}.select-options::-webkit-scrollbar-thumb:hover{background:#d0d5dd}.select-option.empty-message{text-align:center;color:#6e7891;font-style:italic;cursor:default;justify-content:center}.align-setting-wrapper{display:grid;grid-template-columns:1fr 1fr;place-content:center;align-items:center}.align-setting-label{font-size:12px;color:var(--color-text)}.align-options-container{width:120px;color:#0006;background-color:#f5f6f7;border-radius:9999px;padding:4px 13px;display:flex;gap:8px}.align-option-button{display:flex;align-items:center;justify-content:center;width:26px;height:26px;background:transparent;border:none;cursor:pointer;border-radius:50%;transition:background-color .2s,color .2s}.align-option-button:hover{background-color:#fff}.align-option-button.selected{background-color:var(--color-white);color:var(--color-black)}.button-setting-wrapper{display:grid;grid-template-columns:1fr 1fr;place-content:center;align-items:center}.button-setting{padding:8px 16px;background-color:var(--button-bg, #007bff);color:var(--button-color, #fff);border:none;border-radius:4px;cursor:pointer;font-size:14px}.button-setting:hover{background-color:var(--button-bg-hover, #0056b3)}.dimension-setting-container{display:flex;flex-direction:column;gap:8px;position:relative;width:100%}.dimension-bracket{width:18px;height:42px;position:absolute;top:16px;right:122px;display:flex;align-items:center;justify-content:center;z-index:1}.dimension-bracket:before{content:"";position:absolute;width:13px;height:14px;background:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='15' viewBox='0 0 14 15' fill='none'><path d='M14 1H5C2.79086 1 1 2.79086 1 5V15' stroke='%23667085'/></svg>") no-repeat center center;background-size:contain;top:0;right:1px}.dimension-bracket:after{content:"";position:absolute;width:13px;height:14px;background:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='15' viewBox='0 0 14 15' fill='none'><path d='M14 14H5C2.79086 14 1 12.2091 1 10V4.76837e-07' stroke='%23667085'/></svg>") no-repeat center center;background-size:contain;bottom:0;right:1px}.dimension-lock-icon{transform:translate(-.25rem);width:24px;height:24px;background:none;border:none;padding:0;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;color:#667085;z-index:1;border-radius:4px;transition:background-color .15s ease,color .15s ease}.dimension-setting-container.aspect-locked .dimension-bracket:before,.dimension-setting-container.aspect-locked .dimension-bracket:after{filter:hue-rotate(210deg) saturate(2)}@media (max-width: 480px){.dimension-bracket{right:100px}}.upload-setting-wrapper{display:grid;grid-template-columns:1fr;gap:8px;width:100%}.icon-title-container{display:flex;align-items:center;gap:8px;margin-bottom:4px}.icon-title-container .input-label{color:#344054;font-family:Inter,-apple-system,BlinkMacSystemFont,sans-serif;font-size:14px;font-weight:500}.preview-button-container{display:flex;justify-content:space-between;align-items:center;align-self:stretch;width:100%;gap:12px;border-radius:12px}.preview-button-container.no-image{justify-content:center}.preview-button-container.no-image .preview-placeholder{display:none}.preview-button-container.no-image .upload-button{width:100%;min-width:140px;flex-grow:1;margin:0 auto}.no-image .preview-placeholder{display:none!important}.preview-wrapper{position:relative;width:91px;height:71px;border-radius:4px;overflow:hidden;background-color:#d3d3d3;flex-shrink:0;display:none}.preview-wrapper.has-image{display:block}.upload-preview{width:100%;height:100%;object-fit:cover;border-radius:4px;display:none;background-position:center;background-size:146.165% 100%;background-repeat:no-repeat}.preview-wrapper.has-image .upload-preview{display:block;object-fit:contain;padding:2px}.empty-state{width:100%;height:100%;display:flex;align-items:center;justify-content:center;background-color:#d3d3d3}.empty-state svg{width:100%;height:100%}.preview-wrapper.has-image .empty-state{display:none}.upload-button{width:100%;height:40px;display:flex;padding:5px 4px;flex-direction:row;align-items:center;gap:4px;border-radius:12px;border:1px solid var(--Gray-200, #eaecf0);background:var(--Base-White, #fff);cursor:pointer;transition:all .2s ease;box-shadow:0 1px 2px #1018280d;flex-grow:0;justify-content:center;min-width:90px}.preview-wrapper:not(.has-image)+.upload-button{flex-grow:0}.upload-button:hover{border-color:#d0d5dd;box-shadow:0 1px 3px #1018281a}.upload-icon{display:flex;align-items:center;justify-content:center}.upload-label{font-size:12px;font-weight:500;color:#344054}.delete-button{display:flex;width:24px;height:24px;padding:4px;justify-content:center;align-items:center;position:absolute;right:4px;top:4px;background:#fff;border:none;border-radius:50%;cursor:pointer;box-shadow:0 2px 4px #0000001a;transition:background-color .2s ease;z-index:2}.delete-button svg{width:14px;height:14px;flex-shrink:0}.delete-button:hover{background-color:#f3f4f6}.upload-setting-wrapper.no-label .preview-button-container{grid-row:1}.preview-placeholder{display:flex;justify-content:center;align-items:center;width:91px;height:71px;border-radius:4px;background-color:#f2f4f7;flex-shrink:0}.preview-button-container:not(:has(.preview-wrapper.has-image)) .preview-placeholder{display:flex}.height-setting{display:grid;grid-template-columns:1fr 1fr;place-content:center;align-items:center}.height-setting-wrapper{display:flex;align-items:center;justify-content:space-between;gap:2px}.height-input-wrapper{position:relative;padding:8px 8px 8px 4px;width:120px;height:33px;display:flex;align-items:center;gap:4px;border:1px solid var(--color-border);border-radius:8px;background-color:var(--color-bg)}.height-text-input{border:none;outline:none;width:65px;color:var(--color-input-text);font-size:14px;text-align:center;background:transparent}.width-setting{display:grid;grid-template-columns:1fr 1fr;place-content:center;align-items:center}.width-setting-wrapper{display:flex;align-items:center;justify-content:space-between;gap:2px}.width-input-wrapper{position:relative;padding:8px 8px 8px 4px;width:120px;height:33px;display:flex;align-items:center;gap:4px;border:1px solid var(--color-border);border-radius:8px;background-color:var(--color-bg)}.width-text-input{border:none;outline:none;width:65px;color:var(--color-input-text);font-size:14px;text-align:center;background:transparent}.width-setting .number-setting{width:100%}.select-api-container{display:grid;grid-template-columns:1fr;place-content:center;align-items:center;position:relative;width:100%}.select-api-button{width:100%;height:33px;min-height:33px;display:flex;align-items:center;justify-content:flex-start;padding:0 40px 0 16px;border-radius:8px;border:1px solid var(--color-border, #e4e7ec);background:#fff;cursor:pointer;color:#344054;font-family:Satoshi;font-size:14px;font-style:normal;font-weight:500;line-height:normal;position:relative;transition:all .2s ease;box-shadow:0 1px 2px #1018280d;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-right:40px!important}.select-api-button:hover{border-color:#d0d5dd;box-shadow:0 1px 3px #1018281a}.select-api-button:focus{outline:none;border-color:#b6dfc8;box-shadow:0 0 0 4px #7f56d91a}.select-api-button .select-label{position:absolute;top:2px;color:#667085;font-family:Satoshi;font-size:12px;font-style:normal;font-weight:400;line-height:normal;pointer-events:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:80%}.select-api-button .select-value{margin-top:6px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}.select-api-button.loading{position:relative;color:#6e7891;background-color:#f9fafb;pointer-events:none;padding-left:36px!important}.select-api-button.loading:before{content:"";position:absolute;left:10px;top:25%;transform:translateY(-50%);width:16px;height:16px;border:2px solid #e4e7ec;border-top:2px solid #02CC59;border-radius:50%;animation:select-api-spin 1s linear infinite;z-index:2}.select-api-button.has-label.loading{padding-left:36px!important}.select-api-button.has-label.loading .select-value{padding-left:0}.select-api-button.has-label.loading:before{top:18px;left:10px}@keyframes select-api-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.select-api-button.error{border-color:#f04438;color:#f04438;background-color:#fff4f4}.select-api-options{display:none;position:absolute;top:calc(100% + 4px);left:0;right:0;max-height:280px;overflow-y:auto;margin:0;padding:6px;list-style-type:none;z-index:100;flex-direction:column;color:#101828;align-items:flex-start;border:1px solid #e4e7ec;background:#fff;border-radius:8px;box-shadow:0 12px 16px -4px #10182814,0 4px 6px -2px #10182808;transition:opacity .2s ease,transform .2s ease;opacity:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;transform:translateY(-8px)}.select-api-options.open{display:flex;opacity:1;transform:translateY(0)}.select-api-option{padding:10px 12px;width:100%;display:flex;align-items:center;justify-content:space-between;cursor:pointer;color:#344054;border-radius:6px;transition:background-color .15s ease;font-size:14px}.select-api-option:hover{background:#f9fafb}.select-api-option.selected{background:#b6dfc8;color:#344054;font-weight:500}.select-api-option.disabled{opacity:.6;cursor:not-allowed;color:#6e7891}.select-api-radio{width:18px;height:18px;border-radius:50%;border:1.5px solid #e4e7ec;background:#fff;-webkit-appearance:none;-moz-appearance:none;appearance:none;position:relative;margin:0;cursor:pointer}.select-api-radio:checked{border-color:#02cc59;background:#fff;position:relative}.select-api-radio:checked:before{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:8px;height:8px;background:#02cc59;border-radius:50%}.svg-container{position:absolute;right:12px;top:50%;transform:translateY(-50%);width:24px;height:24px;display:flex;align-items:center;justify-content:center;pointer-events:none}.svg-container .svg-select-api{stroke:#667085;transition:transform .3s ease;width:16px;height:16px}.svg-container.open .svg-select-api{transform:rotate(180deg)}.select-api-container .icon-container{display:none}.select-api-options::-webkit-scrollbar{width:6px}.select-api-options::-webkit-scrollbar-track{background:transparent;border-radius:8px}.select-api-options::-webkit-scrollbar-thumb{background:#e4e7ec;border-radius:8px}.select-api-options::-webkit-scrollbar-thumb:hover{background:#d0d5dd}.select-api-option.empty-message{text-align:center;color:#6e7891;font-style:italic;cursor:default;justify-content:center}.select-api-option.empty-message:hover{background:transparent}.select-api-option:focus{outline:none;box-shadow:0 0 0 2px #b6dfc8}@keyframes fadeIn{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}.select-api-options.open{display:flex;animation:fadeIn .2s ease forwards}.select-api-button.has-label{height:48px}.toggle-setting-container{display:flex;justify-content:space-between;align-items:center;padding-left:3px;padding-right:3px}.toggle-label{color:#344054;font-family:Satoshi;font-size:14px;font-style:normal;font-weight:500;line-height:20px}.toggle-switch{position:relative;display:inline-block;width:36px;height:20px;padding:2px}.toggle-switch input{opacity:0;width:0;height:0}.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#e4e7ec;transition:.4s;border-radius:34px}.toggle-slider:before{position:absolute;content:"";height:16px;width:16px;left:2px;bottom:2px;background-color:#fff;transition:.4s;border-radius:50%}input:checked+.toggle-slider{background-color:#02cc59}input:focus+.toggle-slider{box-shadow:0 0 1px #02cc59}input:checked+.toggle-slider:before{transform:translate(16px)}.toggle-with-icon .toggle-label{display:flex;align-items:center;gap:8px}.toggle-icon{display:flex;align-items:center;justify-content:center;color:#667085}.gap-settings-container{display:flex;flex-direction:column;gap:12px;width:100%}.gap-settings-title{font-size:14px;font-weight:500;color:#344054;margin-bottom:4px}.gap-input-wrapper{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:12px;width:100%}.gap-label-container{display:flex;flex-direction:row;align-items:center;gap:8px;flex:1}.gap-setting-icon{display:flex;align-items:center;justify-content:center;font-size:16px;color:#667085}.gap-setting-icon svg{width:16px;height:16px}.gap-input-label{font-size:13px;color:#667085}.gap-setting-inner-wrapper{position:relative;display:grid;grid-template-columns:1fr;place-content:center;align-items:center;width:120px}.gap-setting-input{width:100%;padding:8px;font-size:14px;border-radius:8px;color:#292b2e;border:1px solid var(--color-border);background:var(--color-bg);box-sizing:border-box}.suffix-wrapper{position:relative}.suffix-label{position:absolute;right:8px;top:50%;transform:translateY(-50%);padding-left:8px;border-left:1px solid var(--color-divider);font-size:12px;color:var(--color-text)}.gap-setting-input::-webkit-outer-spin-button,.gap-setting-input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.gap-setting-input[type=number]{-moz-appearance:textfield}.tabs-settings-container{display:flex;flex-direction:column;width:100%;border-radius:8px;background:transparent;overflow:visible;position:relative;z-index:1}.tabs-settings-container.main-tabs{background:#fff;border:1px solid #e5e7eb;box-shadow:0 1px 2px #1018280d}.tabs-title{padding:12px 16px;border-bottom:1px solid #e5e7eb}.tabs-title.main-title{background:#f9fafb;border-bottom:1px solid #e5e7eb;border-radius:8px 8px 0 0}.tabs-title h3{margin:0;color:#111827;font-family:Satoshi;font-size:14px;font-weight:500;line-height:20px}.tabs-header{width:100%;display:flex;padding:4px;justify-content:center;align-items:center;gap:4px;flex-shrink:0;align-self:stretch;background:#f1f3f2;position:relative;z-index:1;border-radius:400px}.tabs-header.main-header{background:#f9fafb;border-bottom:1px solid #e5e7eb;border-radius:8px 8px 0 0;padding:8px}.tab-button{display:flex;padding:4px 12px;justify-content:center;align-items:center;background-color:transparent;gap:8px;flex:1 0 0;border-radius:400px;color:#000000b3;font-family:Satoshi;font-size:12px;font-style:normal;font-weight:500;line-height:20px;border:1px solid transparent;box-shadow:0 0 #10182800;position:relative;z-index:1}.tab-button:active{box-shadow:0 1px 2px -1px #10182805}.tab-button.active{color:#000;font-weight:700;border-radius:400px;background:#fff;box-shadow:0 4px 8px -2px #1018280a}.tab-button.active:active{box-shadow:0 2px 4px -1px #1018280a}.tab-content{position:relative;overflow:visible;width:100%;z-index:1;margin-top:8px}.tab-panel{display:grid;gap:8px;position:absolute;width:100%;opacity:0;pointer-events:none;overflow:visible;z-index:1}.tab-panel.active{opacity:1;pointer-events:auto;position:relative;overflow:visible;z-index:1}.tab-panel .select-api-container{overflow:visible;position:relative;z-index:9999}.tab-panel .select-api-dropdown{position:absolute;z-index:10000}.tab-panel .select-api-container *{z-index:9999}.tab-panel .select-api-dropdown *{z-index:10000}.setting-group.main-group.collapsed .tabs-header,.setting-group.main-group.collapsed .setting-group,.setting-group .setting-group.collapsed .tabs-header{display:none}.margin-bottom-wrapper{display:grid;grid-template-columns:1fr auto;gap:auto}.margin-bottom-wrapper .setting-icon svg{width:18px;height:19px}.margin-bottom-wrapper .number-setting-input{background:#fff;min-width:95px;width:95px;padding:8px;border-radius:8px;border:1px solid #D0D5DD;font-size:14px;color:#292b2e}.margin-bottom-wrapper .setting-title{color:#667085;font-family:Inter,sans-serif;font-size:12px;font-weight:400;line-height:18px}.bgset-or-label{margin:8px 0;text-align:center;font-weight:500;color:#667085;align-self:center}.tab-delete-button{background:transparent;border:none;cursor:pointer;padding:2px 4px}.tab-delete-button svg{width:16px;height:16px}.tabs-add-btn-container{display:flex;justify-content:flex-end}.tabs-add-button{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border-radius:6px;cursor:pointer;font-size:14px;color:#667085;transition:transform .15s ease,box-shadow .3s ease}.tabs-add-button:hover{transform:scale(1);box-shadow:0 2px 6px #0000001a}.add-icon{display:flex;align-items:center;width:18px}.add-label{display:inline-block}:root{--color-border: #D5DCE5;--color-bg: #F8F8F8;--color-border-secondary: #eaecf0;--color-text: #667085;--color-title: #344054;--color-input-text: #292b2e;--color-white: #fff;--color-black: #000;--color-divider: #dcdcdc;--color-btn-text: #4b4b4b;--color-bg-icon: #f2f4f7}*{padding:0;margin:0;border:none}*,*:before,*:after{box-sizing:border-box}a,a:link,a:visited,a:hover{text-decoration:none}body{font-family:Satoshi,sans-serif;font-weight:400;font-size:12px;line-height:18px}aside,nav,footer,header,section,main{display:block}h1,h2,h3,h4,h5,h6,p{font-size:inherit;font-weight:inherit}ul,ul li{list-style:none}img{vertical-align:top}img,svg{max-width:100%;height:auto}address{font-style:normal}input::-ms-clear{display:none}button,input[type=submit]{display:inline-block;box-shadow:none;background-color:transparent;background:none;cursor:pointer}input:focus,input:active,button:focus,button:active{outline:none}button::-moz-focus-inner{padding:0;border:0}label{cursor:pointer}legend{display:block}
|
package/dist/index.d.ts
CHANGED
|
@@ -116,6 +116,10 @@ export declare interface ColorSettingProps extends StringSettingsProps {
|
|
|
116
116
|
|
|
117
117
|
export declare function createSettingGroup<T extends Record<string, Setting<any, any> | SettingGroup<any>>>(groupProps: SettingGroupProps<T>): SettingGroupWithSettings<T>;
|
|
118
118
|
|
|
119
|
+
export declare type DeepPartial<T> = {
|
|
120
|
+
[P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
|
|
121
|
+
};
|
|
122
|
+
|
|
119
123
|
export declare class DimensionSetting extends Setting<DimensionValue, DimensionSettingProps> {
|
|
120
124
|
inputType: {
|
|
121
125
|
readonly width: "number";
|
|
@@ -156,6 +160,12 @@ export declare interface DimensionValue {
|
|
|
156
160
|
height: number;
|
|
157
161
|
}
|
|
158
162
|
|
|
163
|
+
declare type ExtractSettingGroupValues<T> = T extends SettingGroup<infer S> ? {
|
|
164
|
+
[K in keyof S]?: S[K] extends Setting<any, any> ? ExtractSettingValue<S[K]> : S[K] extends SettingGroup<any> ? ExtractSettingGroupValues<S[K]> : unknown;
|
|
165
|
+
} : never;
|
|
166
|
+
|
|
167
|
+
declare type ExtractSettingValue<T> = T extends Setting<infer V, any> ? V : never;
|
|
168
|
+
|
|
159
169
|
export declare class GapSetting extends Setting<number, GapSettingsProps> {
|
|
160
170
|
inputType: InputTypes;
|
|
161
171
|
private inputValues;
|
|
@@ -233,6 +243,10 @@ export declare interface IDrawable {
|
|
|
233
243
|
draw(): HTMLElement;
|
|
234
244
|
}
|
|
235
245
|
|
|
246
|
+
export declare type InferSettingsProps<T> = T extends {
|
|
247
|
+
getValues(): infer R;
|
|
248
|
+
} ? R : never;
|
|
249
|
+
|
|
236
250
|
declare type InputProps = {
|
|
237
251
|
iconClassName?: string;
|
|
238
252
|
labelClassName?: string;
|
|
@@ -248,6 +262,10 @@ declare type InputProps = {
|
|
|
248
262
|
|
|
249
263
|
export declare type InputTypes = "number" | "text" | "select" | "color" | "date" | "button";
|
|
250
264
|
|
|
265
|
+
export declare function isSetting(value: any): value is Setting<any, any>;
|
|
266
|
+
|
|
267
|
+
export declare function isSettingGroup(value: any): value is SettingGroup<any>;
|
|
268
|
+
|
|
251
269
|
export declare function iterateSettings<T extends Record<string, Setting<any, any> | SettingGroup<any>>>(settings: T, callback: (key: string, setting: Setting<any, any> | SettingGroup<any>) => void): void;
|
|
252
270
|
|
|
253
271
|
export declare class MarginBottomSetting extends NumberSetting {
|
|
@@ -496,6 +514,12 @@ export declare interface SettingProps<T> {
|
|
|
496
514
|
detectChange?: (value: T | undefined) => void;
|
|
497
515
|
}
|
|
498
516
|
|
|
517
|
+
export declare type SettingsToProps<T> = T extends SettingGroup<infer S> ? {
|
|
518
|
+
[K in keyof S]?: S[K] extends Setting<any, any> ? ExtractSettingValue<S[K]> : S[K] extends SettingGroup<any> ? ExtractSettingGroupValues<S[K]> : unknown;
|
|
519
|
+
} : never;
|
|
520
|
+
|
|
521
|
+
export declare type SettingsToPropsOptional<T> = DeepPartial<SettingsToProps<T>>;
|
|
522
|
+
|
|
499
523
|
export declare class StringSetting extends Setting<string, StringSettingsProps> {
|
|
500
524
|
inputType: InputTypes;
|
|
501
525
|
constructor(props?: StringSettingsProps);
|
package/package.json
CHANGED