builder-settings-types 0.0.68 → 0.0.69

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.
@@ -71,7 +71,7 @@
71
71
  <svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
72
72
  <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"/>
73
73
  </svg>
74
- `;class P extends C{constructor(t){super({title:"Border",collapsed:t==null?void 0:t.collapsed,settings:{color:new y({default:(t==null?void 0:t.color)??"#00141E"}),opacity:new b({default:(t==null?void 0:t.opacity)??100,minValue:0,maxValue:100}),radius:new v({title:"Radius",icon:D,default:(t==null?void 0:t.radius)??12,suffix:"px"}),size:new v({title:"Size",icon:q,default:(t==null?void 0:t.size)??0,suffix:"px"})}})}getCssCode(){const t=this.settings.color.value??"#000000",e=this.settings.opacity.value??100,i=this.settings.radius.value??0,n=this.settings.size.value??0;return`
74
+ `;class P extends C{constructor(t){super({title:"Border",collapsed:t==null?void 0:t.collapsed,settings:{color:new y({default:(t==null?void 0:t.color)??"0, 0, 30"}),opacity:new b({default:(t==null?void 0:t.opacity)??100,minValue:0,maxValue:100}),radius:new v({title:"Radius",icon:D,default:(t==null?void 0:t.radius)??12,suffix:"px"}),size:new v({title:"Size",icon:q,default:(t==null?void 0:t.size)??0,suffix:"px"})}})}getCssCode(){const t=this.settings.color.value??"#000000",e=this.settings.opacity.value??100,i=this.settings.radius.value??0,n=this.settings.size.value??0;return`
75
75
  border-color: ${t};
76
76
  border-width: ${n}px;
77
77
  border-radius: ${i}px;
@@ -88,7 +88,7 @@
88
88
  <svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
89
89
  <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"/>
90
90
  </svg>
91
- `;class Y extends C{constructor(t={}){super({title:t.title||"Typography",collapsed:t.collapsed,settings:{color:new y({default:t.colorDefault??"#00141E"}),opacity:new b({default:t.colorOpacityDefault??100}),fontFamily:new H({title:"Font",icon:X,default:t.fontFamilyDefault??"Satoshi",options:t.fontFamilyOptions??[{name:"Satoshi",value:"Satoshi"},{name:"Arial",value:"Arial"},{name:"Roboto",value:"Roboto"}],getOptions:t.fontFamilyGetOptions,getOptionsAsync:t.fontFamilyGetOptionsAsync}),fontWeight:new H({title:"Weight",icon:J,default:t.fontWeightDefault??"bold",options:t.fontWeightOptions??[{name:"Regular",value:"400"},{name:"Medium",value:"500"},{name:"Bold",value:"600"}],getOptions:t.fontWeightGetOptions,getOptionsAsync:t.fontWeightGetOptionsAsync}),fontSize:new v({title:"Size",icon:Q,default:t.fontSizeDefault??12,suffix:"px"}),align:new L({title:"Align",default:t.alignDefault??"center"})}})}getCssCode(){const t=this.settings.color.value??"#000000",e=this.settings.opacity.value??100,i=this.settings.fontFamily.value??"Satoshi",n=this.settings.fontWeight.value??"bold",s=this.settings.fontSize.value??12,a=this.settings.align.value??"left";return`
91
+ `;class Y extends C{constructor(t={}){super({title:t.title||"Typography",collapsed:t.collapsed,settings:{color:new y({default:t.colorDefault??"0, 0, 30"}),opacity:new b({default:t.colorOpacityDefault??100}),fontFamily:new H({title:"Font",icon:X,default:t.fontFamilyDefault??"Satoshi",options:t.fontFamilyOptions??[{name:"Satoshi",value:"Satoshi"},{name:"Arial",value:"Arial"},{name:"Roboto",value:"Roboto"}],getOptions:t.fontFamilyGetOptions,getOptionsAsync:t.fontFamilyGetOptionsAsync}),fontWeight:new H({title:"Weight",icon:J,default:t.fontWeightDefault??"bold",options:t.fontWeightOptions??[{name:"Regular",value:"400"},{name:"Medium",value:"500"},{name:"Bold",value:"600"}],getOptions:t.fontWeightGetOptions,getOptionsAsync:t.fontWeightGetOptionsAsync}),fontSize:new v({title:"Size",icon:Q,default:t.fontSizeDefault??12,suffix:"px"}),align:new L({title:"Align",default:t.alignDefault??"center"})}})}getCssCode(){const t=this.settings.color.value??"#000000",e=this.settings.opacity.value??100,i=this.settings.fontFamily.value??"Satoshi",n=this.settings.fontWeight.value??"bold",s=this.settings.fontSize.value??12,a=this.settings.align.value??"left";return`
92
92
  color: ${t};
93
93
  opacity: ${e/100};
94
94
  font-family: ${i};
@@ -129,7 +129,7 @@
129
129
  </svg>
130
130
  </span>
131
131
  <span class="add-label">Add Tab</span>
132
- `,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())}))}}class ot extends C{constructor(t){super({title:"Background Image",collapsed:t==null?void 0:t.collapsed,settings:{backgroundImage:new V({...t==null?void 0:t.uploadProps,default:(t==null?void 0:t.backgroundImage)??""}),opacity:new b({default:(t==null?void 0:t.opacity)??100}),backgroundColor:new y({default:(t==null?void 0:t.backgroundColor)??"#00141E"}),opacityBG:new b({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),[n,s,a,o]=i;e.innerHTML="",e.appendChild(n),e.appendChild(s);const r=document.createElement("div");return r.className="bgset-or-label",r.textContent="OR",e.appendChild(r),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||"#00141E",n=this.settings.opacityBG.value??100;return t?`
132
+ `,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())}))}}class ot extends C{constructor(t){super({title:"Background Image",collapsed:t==null?void 0:t.collapsed,settings:{backgroundImage:new V({...t==null?void 0:t.uploadProps,default:(t==null?void 0:t.backgroundImage)??""}),opacity:new b({default:(t==null?void 0:t.opacity)??100}),backgroundColor:new y({default:(t==null?void 0:t.backgroundColor)??"0, 0, 30"}),opacityBG:new b({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),[n,s,a,o]=i;e.innerHTML="",e.appendChild(n),e.appendChild(s);const r=document.createElement("div");return r.className="bgset-or-label",r.textContent="OR",e.appendChild(r),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",n=this.settings.opacityBG.value??100;return t?`
133
133
  background-image: url("${t}");
134
134
  background-size: cover;
135
135
  background-position: center;
@@ -566,7 +566,7 @@ class it extends m {
566
566
  collapsed: t == null ? void 0 : t.collapsed,
567
567
  settings: {
568
568
  color: new y({
569
- default: (t == null ? void 0 : t.color) ?? "#00141E"
569
+ default: (t == null ? void 0 : t.color) ?? "0, 0, 30"
570
570
  }),
571
571
  opacity: new x({
572
572
  default: (t == null ? void 0 : t.opacity) ?? 100,
@@ -621,7 +621,7 @@ class nt extends m {
621
621
  collapsed: t.collapsed,
622
622
  settings: {
623
623
  color: new y({
624
- default: t.colorDefault ?? "#00141E"
624
+ default: t.colorDefault ?? "0, 0, 30"
625
625
  }),
626
626
  opacity: new x({
627
627
  default: t.colorOpacityDefault ?? 100
@@ -885,7 +885,7 @@ class ot extends m {
885
885
  * {
886
886
  * backgroundImage: 'https://example.com/myimage.png',
887
887
  * opacity: 80,
888
- * backgroundColor: '#00141E',
888
+ * backgroundColor: "0, 0, 30",
889
889
  * opacityBG: 90,
890
890
  * uploadProps: {
891
891
  * uploadUrl: 'https://st-admapi.onaim.io/api/File/UploadImage',
@@ -912,7 +912,7 @@ class ot extends m {
912
912
  default: (t == null ? void 0 : t.opacity) ?? 100
913
913
  }),
914
914
  backgroundColor: new y({
915
- default: (t == null ? void 0 : t.backgroundColor) ?? "#00141E"
915
+ default: (t == null ? void 0 : t.backgroundColor) ?? "0, 0, 30"
916
916
  }),
917
917
  opacityBG: new x({
918
918
  default: (t == null ? void 0 : t.opacityBG) ?? 100
@@ -935,7 +935,7 @@ class ot extends m {
935
935
  * Helper method to generate CSS based on the current settings.
936
936
  */
937
937
  getCssCode() {
938
- const t = this.settings.backgroundImage.value || "", e = this.settings.opacity.value ?? 100, i = this.settings.backgroundColor.value || "#00141E", n = this.settings.opacityBG.value ?? 100;
938
+ const t = this.settings.backgroundImage.value || "", e = this.settings.opacity.value ?? 100, i = this.settings.backgroundColor.value || "0, 0, 30", n = this.settings.opacityBG.value ?? 100;
939
939
  return t ? `
940
940
  background-image: url("${t}");
941
941
  background-size: cover;
package/dist/index.d.ts CHANGED
@@ -26,7 +26,7 @@ export declare class BackgroundSettingSet extends SettingGroup<{
26
26
  * {
27
27
  * backgroundImage: 'https://example.com/myimage.png',
28
28
  * opacity: 80,
29
- * backgroundColor: '#00141E',
29
+ * backgroundColor: "0, 0, 30",
30
30
  * opacityBG: 90,
31
31
  * uploadProps: {
32
32
  * uploadUrl: 'https://st-admapi.onaim.io/api/File/UploadImage',
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "builder-settings-types",
3
3
  "description": "builder settings",
4
- "version": "0.0.68",
4
+ "version": "0.0.69",
5
5
  "type": "module",
6
6
  "main": "dist/builder-settings-types.cjs.js",
7
7
  "module": "dist/builder-settings-types.es.js",