builder-settings-types 0.0.204 → 0.0.205
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.
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
|
|
137
137
|
<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"/>
|
|
138
138
|
</svg>
|
|
139
|
-
`;class kt extends f{constructor(t={}){const{showAlign:e=t.showAlign??!0,...i}=t;super({title:i.title||"Typography",collapsed:i.collapsed,hideCondition:i.hideCondition,settings:(()=>{const s={color:new C({default:i.colorDefault??"0, 0, 30"}),fontFamily:new y({title:"Font",icon:xt,default:i.fontFamilyDefault??"Satoshi",options:i.fontFamilyOptions??[{name:"Alt",value:"Croco Sans Black Caps Alt"},{name:"Regular",value:"Croco Sans Caps Regular"},{name:"Caps",value:"Croco Sans Black Caps"},{name:"FaraGo",value:"'FiraGO', sans-serif"}],getOptions:i.fontFamilyGetOptions,getOptionsAsync:i.fontFamilyGetOptionsAsync}),fontWeight:new y({title:"Weight",icon:yt,default:i.fontWeightDefault??"400",options:i.fontWeightOptions??[{name:"Regular",value:"400"},{name:"Medium",value:"500"},{name:"Bold",value:"600"}],getOptions:i.fontWeightGetOptions,getOptionsAsync:i.fontWeightGetOptionsAsync}),fontSize:new v({title:"Size",icon:Mt,default:i.fontSizeDefault??12,suffix:"px",mobile:i.fontSizeMobileDefault})};return e?
|
|
139
|
+
`;class kt extends f{constructor(t={}){const{showAlign:e=t.showAlign??!0,...i}=t;super({title:i.title||"Typography",collapsed:i.collapsed,hideCondition:i.hideCondition,settings:(()=>{const s={color:new C({default:i.colorDefault??"0, 0, 30"}),fontFamily:new y({title:"Font",icon:xt,default:i.fontFamilyDefault??"Satoshi",options:i.fontFamilyOptions??[{name:"Alt",value:"Croco Sans Black Caps Alt"},{name:"Regular",value:"Croco Sans Caps Regular"},{name:"Caps",value:"Croco Sans Black Caps"},{name:"FaraGo",value:"'FiraGO', sans-serif"}],getOptions:i.fontFamilyGetOptions,getOptionsAsync:i.fontFamilyGetOptionsAsync}),fontWeight:new y({title:"Weight",icon:yt,default:i.fontWeightDefault??"400",options:i.fontWeightOptions??[{name:"Regular",value:"400"},{name:"Medium",value:"500"},{name:"Bold",value:"600"}],getOptions:i.fontWeightGetOptions,getOptionsAsync:i.fontWeightGetOptionsAsync}),fontSize:new v({title:"Size",icon:Mt,default:i.fontSizeDefault??12,suffix:"px",mobile:i.fontSizeMobileDefault})};return e?{...s,align:new B({title:"Align",default:i.alignDefault??"center"})}:s})()})}getCssCode(){var a;const t=this.settings.color.value??"#000000",e=this.settings.fontFamily.value??"Satoshi",i=this.settings.fontWeight.value??"bold",s=this.settings.fontSize.value??12,n=((a=this.settings.align)==null?void 0:a.value)??"left";return`
|
|
140
140
|
color: ${t};
|
|
141
141
|
font-family: ${e};
|
|
142
142
|
font-weight: ${i};
|
|
@@ -22,7 +22,7 @@ function L(c) {
|
|
|
22
22
|
const e = Object.getPrototypeOf(c);
|
|
23
23
|
return e !== Object.prototype && Object.setPrototypeOf(t, e), t;
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function B(c) {
|
|
26
26
|
switch (c) {
|
|
27
27
|
case "number":
|
|
28
28
|
return 0;
|
|
@@ -81,7 +81,7 @@ class p {
|
|
|
81
81
|
const i = document.createElement("div");
|
|
82
82
|
i.className = t.wrapperClassName || "";
|
|
83
83
|
const s = document.createElement("input");
|
|
84
|
-
this.inputEl = s, s.value = String(t.value ||
|
|
84
|
+
this.inputEl = s, s.value = String(t.value || B(t.inputType)), s.type = t.inputType, s.placeholder = t.placeholder || "", s.className = t.inputClassName || "";
|
|
85
85
|
const n = (o) => {
|
|
86
86
|
const l = o.target;
|
|
87
87
|
let r = l.value;
|
|
@@ -122,7 +122,7 @@ class p {
|
|
|
122
122
|
return i.className = "input-icon " + (e || ""), i.innerHTML = t, i;
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function A(c) {
|
|
126
126
|
let t = 0, e = c.parentElement;
|
|
127
127
|
for (; e; )
|
|
128
128
|
e.classList.contains("setting-group") && e !== c && t++, e = e.parentElement;
|
|
@@ -180,7 +180,7 @@ class $ {
|
|
|
180
180
|
* Update nesting for a specific element
|
|
181
181
|
*/
|
|
182
182
|
updateElementNesting(t) {
|
|
183
|
-
const e =
|
|
183
|
+
const e = A(t);
|
|
184
184
|
this.applyNestingWithConfig(t, e);
|
|
185
185
|
}
|
|
186
186
|
/**
|
|
@@ -2010,13 +2010,13 @@ class Ot extends f {
|
|
|
2010
2010
|
mobile: i.fontSizeMobileDefault
|
|
2011
2011
|
})
|
|
2012
2012
|
};
|
|
2013
|
-
return e ?
|
|
2013
|
+
return e ? {
|
|
2014
2014
|
...s,
|
|
2015
2015
|
align: new _({
|
|
2016
2016
|
title: "Align",
|
|
2017
2017
|
default: i.alignDefault ?? "center"
|
|
2018
2018
|
})
|
|
2019
|
-
}
|
|
2019
|
+
} : s;
|
|
2020
2020
|
})()
|
|
2021
2021
|
});
|
|
2022
2022
|
}
|
|
@@ -2200,10 +2200,10 @@ class Tt extends f {
|
|
|
2200
2200
|
`;
|
|
2201
2201
|
}
|
|
2202
2202
|
}
|
|
2203
|
-
function
|
|
2203
|
+
function Bt(c) {
|
|
2204
2204
|
return c instanceof f;
|
|
2205
2205
|
}
|
|
2206
|
-
function
|
|
2206
|
+
function At(c) {
|
|
2207
2207
|
return c instanceof p;
|
|
2208
2208
|
}
|
|
2209
2209
|
export {
|
|
@@ -2237,7 +2237,7 @@ export {
|
|
|
2237
2237
|
xt as WidthSetting,
|
|
2238
2238
|
vt as asSettingGroupWithSettings,
|
|
2239
2239
|
z as createSettingGroup,
|
|
2240
|
-
|
|
2241
|
-
|
|
2240
|
+
At as isSetting,
|
|
2241
|
+
Bt as isSettingGroup,
|
|
2242
2242
|
b as iterateSettings
|
|
2243
2243
|
};
|
package/package.json
CHANGED